From e136a9db0210d626d9b0b2314aa11ef70f51a2ce Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Mon, 13 Mar 2017 22:48:12 +0900 Subject: [PATCH 001/593] Create README --- src/USER-EES/README | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/USER-EES/README diff --git a/src/USER-EES/README b/src/USER-EES/README new file mode 100644 index 0000000000..220c7fa203 --- /dev/null +++ b/src/USER-EES/README @@ -0,0 +1,10 @@ +This package implements the EES potential between ellipsoidal particles and a semi finite LJ wall introduced by Babadi and Ejtehadi. + +This potential has fixes in both "fix wall" style and "fix wall/region" style so can be used as a boundary of simulation box or on the sides of a region inside the simulation box. + +The ASPHERE package is required for using this fixes. + +For more details please refer to documentation of LAMMPS under "fix wall/ees" entry. +There are also some example of using this code in /examples/usr/EES. + +This implementation is done by Abdoreza Ershadinia at Sharif University of Technology--Tehran (a.ershdinia@physics.sahrif.edu). -- GitLab From 6311d33a5d5665513482d2cd20855ba517154f85 Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Mon, 13 Mar 2017 22:49:04 +0900 Subject: [PATCH 002/593] UPLOAD source files source files and install.sh added --- src/USER-EES/fix_wall_ees.cpp | 207 ++++++++++++++ src/USER-EES/fix_wall_ees.h | 51 ++++ src/USER-EES/fix_wall_region_ees.cpp | 405 +++++++++++++++++++++++++++ src/USER-EES/fix_wall_region_ees.h | 94 +++++++ src/USER-EES/install.sh | 34 +++ 5 files changed, 791 insertions(+) create mode 100644 src/USER-EES/fix_wall_ees.cpp create mode 100644 src/USER-EES/fix_wall_ees.h create mode 100644 src/USER-EES/fix_wall_region_ees.cpp create mode 100644 src/USER-EES/fix_wall_region_ees.h create mode 100644 src/USER-EES/install.sh diff --git a/src/USER-EES/fix_wall_ees.cpp b/src/USER-EES/fix_wall_ees.cpp new file mode 100644 index 0000000000..8ccadf274a --- /dev/null +++ b/src/USER-EES/fix_wall_ees.cpp @@ -0,0 +1,207 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "math.h" +#include "math_extra.h" +#include "fix_wall_ees.h" +#include "atom.h" +#include "atom_vec.h" +#include "atom_vec_ellipsoid.h" +#include "error.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- */ + +FixWallEES::FixWallEES(LAMMPS *lmp, int narg, char **arg) : + FixWall(lmp, narg, arg) {} + +/* ---------------------------------------------------------------------- */ + +void FixWallEES::precompute(int m) +{ + coeff1[m] = ( 2. / 4725. ) * epsilon[m] * pow(sigma[m],12.0); + coeff2[m] = ( 1. / 24. ) * epsilon[m] * pow(sigma[m],6.0); + + coeff3[m] = ( 2. / 315. ) * epsilon[m] * pow(sigma[m],12.0); + coeff4[m] = ( 1. / 3. ) * epsilon[m] * pow(sigma[m],6.0); + + coeff5[m] = ( 4. / 315. ) * epsilon[m] * pow(sigma[m],12.0); + coeff6[m] = ( 1. / 12. ) * epsilon[m] * pow(sigma[m],6.0); +} + +/* ---------------------------------------------------------------------- */ +void FixWallEES::init() +{ + avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + if (!avec) + error->all(FLERR,"Fix wall/ees requires atom style ellipsoid"); + + // check that all particles are finite-size ellipsoids + // no point particles allowed, spherical is OK + + int *ellipsoid = atom->ellipsoid; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) + if (ellipsoid[i] < 0) + error->one(FLERR,"Fix wall/ees requires extended particles"); + + FixWall::init(); +} + + +/* ---------------------------------------------------------------------- + interaction of all particles in group with a wall + m = index of wall coeffs + which = xlo,xhi,ylo,yhi,zlo,zhi + error if any particle is on or behind wall +------------------------------------------------------------------------- */ + +void FixWallEES::wall_particle(int m, int which, double coord) +{ + double delta; + + double **x = atom->x; + double **f = atom->f; + double **tor = atom->torque; + + + avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + AtomVecEllipsoid::Bonus *bonus = avec->bonus; + int *ellipsoid = atom->ellipsoid; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + + int dim = which / 2; + int side = which % 2; + if (side == 0) side = -1; + + int onflag = 0; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + + if (side < 0) + delta = x[i][dim] - coord; + else + delta = coord - x[i][dim]; + + if (delta >= cutoff[m]) + continue; + + double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; + double tempvec[3]= {0,0,0}; + double sigman = 0.0, sigman2 = 0.0; + double nhat[3] = {0,0,0}; + + nhat[dim]=-1*side; + nhat[(dim+1)%3] = 0 ; + nhat[(dim+2)%3] = 0 ; + + + double* shape = bonus[ellipsoid[i]].shape;; + MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); + MathExtra::transpose_matvec(A,nhat,tempvec); + for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; + for(int k = 0; k<3 ; k++) sigman2 += tempvec[k]*tempvec[k]; + sigman = sqrt(sigman2); + + if (delta <= sigman) { + onflag = 1; + continue; + } + + + double fwall = 0.0, twall = 0.0; + double delta2 = 0.0, delta3 = 0.0, delta4 = 0.0, delta5 = 0.0, delta6 = 0.0; + double sigman3 = 0.0, sigman4 = 0.0, sigman5 = 0.0, sigman6 = 0.0; + double hhss = 0.0, hhss2 = 0.0, hhss4 = 0.0, hhss7 = 0.0, hhss8 = 0.0; + double hps = 0.0; + double hms = 0.0; + + double tempvec2[3]= {0,0,0}; + + double SAn[3] = {0,0,0}; + double that[3] = {0,0,0}; + + double Lx[3][3] = {{0,0,0},{0,0,-1},{0,1,0}}; + double Ly[3][3] = {{0,0,1},{0,0,0},{-1,0,0}}; + double Lz[3][3] = {{0,-1,0},{1,0,0},{0,0,0}}; + + + for(int k = 0; k<3; k++) SAn[k] = tempvec[k]; + + sigman3 = sigman2 * sigman; + sigman4 = sigman2 * sigman2; + sigman5 = sigman4 * sigman; + sigman6 = sigman3 * sigman3; + + + delta2 = delta * delta; + delta3 = delta2 * delta; + delta4 = delta2 * delta2; + delta5 = delta3 * delta2; + delta6 = delta3 * delta3; + + hhss = delta2 - sigman2; + hhss2 = hhss * hhss; + hhss4 = hhss2 * hhss2; + hhss8 = hhss4 * hhss4; + hhss7 = hhss4 * hhss2 * hhss; + + hps = delta + sigman; + hms = delta - sigman; + + fwall = side*( + -1*coeff4[m]/hhss2 + + coeff3[m] * ( 21*delta6 + 63*delta4*sigman2 + 27*delta2*sigman4 + sigman6 ) / hhss8 + ); + f[i][dim] -= fwall; + + ewall[0] += -1*coeff2[m] * ( 4*delta/sigman2/hhss + 2*log(hms/hps)/sigman3 ) + + coeff1[m] * ( 35*delta5 + 70*delta3*sigman2 + 15*delta*sigman4 ) / hhss7; + + ewall[m+1] += fwall; + + twall = coeff6[m] * ( 6.*delta3/sigman4/hhss2 - 10.*delta/sigman2/hhss2 + 3.*log(hms/hps)/sigman5 ) + + coeff5[m] * ( 21.*delta5 + 30.*delta3*sigman2 + 5.*delta*sigman4 ) / hhss8 ; + + + MathExtra::matvec(Lx,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[0] = MathExtra::dot3(SAn,tempvec2); + + MathExtra::matvec(Ly,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[1] = MathExtra::dot3(SAn,tempvec2); + + MathExtra::matvec(Lz,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k < 3; k++) tempvec2[k] *= shape[k]; + that[2] = MathExtra::dot3(SAn,tempvec2); + + + for(int j = 0; j<3 ; j++) + tor[i][j] += twall * that[j]; + + } + + if (onflag) error->one(FLERR,"Particle on or inside fix wall surface"); +} diff --git a/src/USER-EES/fix_wall_ees.h b/src/USER-EES/fix_wall_ees.h new file mode 100644 index 0000000000..17246c094f --- /dev/null +++ b/src/USER-EES/fix_wall_ees.h @@ -0,0 +1,51 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(wall/ees,FixWallEES) + +#else + +#ifndef LMP_FIX_WALL_EES_H +#define LMP_FIX_WALL_EES_H + +#include "fix_wall.h" + +namespace LAMMPS_NS { + +class FixWallEES : public FixWall { + public: + FixWallEES(class LAMMPS *, int, char **); + void precompute(int); + void init(); + void wall_particle(int, int, double); + + private: + double coeff1[6],coeff2[6],coeff3[6],coeff4[6],coeff5[6],coeff6[6]; + class AtomVecEllipsoid *avec; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Particle on or inside fix wall surface + +Particles must be "exterior" to the wall in order for energy/force to +be calculated. + +*/ diff --git a/src/USER-EES/fix_wall_region_ees.cpp b/src/USER-EES/fix_wall_region_ees.cpp new file mode 100644 index 0000000000..20a5f74c15 --- /dev/null +++ b/src/USER-EES/fix_wall_region_ees.cpp @@ -0,0 +1,405 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ +#include +#include "math.h" +#include "stdlib.h" +#include "string.h" +#include "fix_wall_region_ees.h" +#include "atom.h" +#include "atom_vec.h" +#include "atom_vec_ellipsoid.h" +#include "domain.h" +#include "region.h" +#include "force.h" +#include "lattice.h" +#include "update.h" +#include "output.h" +#include "respa.h" +#include "error.h" +#include "math_extra.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +enum{LJ93,LJ126,COLLOID,HARMONIC,EES};//me + +/* ---------------------------------------------------------------------- */ +/// USAGE: +/// fix ID group-ID wall/region/ees region-ID epsilon sigma cutoff +/// +FixWallRegionEES::FixWallRegionEES(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg) +{ + if (narg != 7) error->all(FLERR,"Illegal fix wall/region/ees command"); + scalar_flag = 1; + vector_flag = 1; + size_vector = 3; + global_freq = 1; + extscalar = 1; + extvector = 1; + + // parse args + + iregion = domain->find_region(arg[3]); + if (iregion == -1) + error->all(FLERR,"Region ID for fix wall/region/ees does not exist"); + int n = strlen(arg[3]) + 1; + idregion = new char[n]; + strcpy(idregion,arg[3]); + + + + epsilon = force->numeric(FLERR,arg[4]); + sigma = force->numeric(FLERR,arg[5]); + cutoff = force->numeric(FLERR,arg[6]); + + if (cutoff <= 0.0) error->all(FLERR,"Fix wall/region/ees cutoff <= 0.0"); + + eflag = 0; + ewall[0] = ewall[1] = ewall[2] = ewall[3] = 0.0; +} + +/* ---------------------------------------------------------------------- */ + +FixWallRegionEES::~FixWallRegionEES() +{ + delete [] idregion; +} + +/* ---------------------------------------------------------------------- */ + +int FixWallRegionEES::setmask() +{ + int mask = 0; + mask |= POST_FORCE; + mask |= THERMO_ENERGY; + mask |= POST_FORCE_RESPA; + mask |= MIN_POST_FORCE; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::init() +{ + // set index and check validity of region + + iregion = domain->find_region(idregion); + if (iregion == -1) + error->all(FLERR,"Region ID for fix wall/region/ees does not exist"); + + + avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + if (!avec) + error->all(FLERR,"Fix wall/region/ees requires atom style ellipsoid"); + + // check that all particles are finite-size ellipsoids + // no point particles allowed, spherical is OK + + int *ellipsoid = atom->ellipsoid; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) + if (ellipsoid[i] < 0) + error->one(FLERR,"Fix wall/region/ees requires extended particles"); + + + // setup coefficients for each style + + coeff1 = ( 2. / 4725. ) * epsilon * pow(sigma,12.0); + coeff2 = ( 1. / 24. ) * epsilon * pow(sigma,6.0); + coeff3 = ( 2. / 315. ) * epsilon * pow(sigma,12.0); + coeff4 = ( 1. / 3. ) * epsilon * pow(sigma,6.0); + coeff5 = ( 4. / 315. ) * epsilon * pow(sigma,12.0); + coeff6 = ( 1. / 12. ) * epsilon * pow(sigma,6.0); + offset = 0; + + + if (strstr(update->integrate_style,"respa")) + nlevels_respa = ((Respa *) update->integrate)->nlevels; +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::setup(int vflag) +{ + if (strstr(update->integrate_style,"verlet")) + post_force(vflag); + else { + ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + post_force_respa(vflag,nlevels_respa-1,0); + ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + } +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::min_setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::post_force(int vflag) +{ + //me + //sth is needed here, but I dont know what + //that is calculation of sn + + int i,m,n; + double rinv,fx,fy,fz,tooclose[3];//me + double sn;//me + + eflag = 0; + ewall[0] = ewall[1] = ewall[2] = ewall[3] = 0.0; + + double **x = atom->x; + double **f = atom->f; + double *radius = atom->radius; + + double **tor = atom->torque; //me + + //avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");//me + AtomVecEllipsoid::Bonus *bonus = avec->bonus;//me + int *ellipsoid = atom->ellipsoid;//me + + int *mask = atom->mask; + int nlocal = atom->nlocal; + + Region *region = domain->regions[iregion]; + region->prematch(); + + int onflag = 0; + + // region->match() insures particle is in region or on surface, else error + // if returned contact dist r = 0, is on surface, also an error + // in COLLOID case, r <= radius is an error + + for (i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + if (!region->match(x[i][0],x[i][1],x[i][2])) { + onflag = 1; + continue; + } + + double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; + double tempvec[3]= {0,0,0}; + double sn2 = 0.0; + double nhat[3] = {0,0,0}; + double* shape = bonus[ellipsoid[i]].shape;; + MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); + + for(int which = 0 ; which < 3; which ++){//me + nhat[which]=1; + nhat[(which+1)%3] = 0 ; + nhat[(which+2)%3] = 0 ; + sn2 = 0 ; + MathExtra::transpose_matvec(A,nhat,tempvec); + for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; + for(int k = 0; k<3 ; k++) sn2 += tempvec[k]*tempvec[k]; + sn = sqrt(sn2); + tooclose[which] = sn; + } + + + + n = region->surface(x[i][0],x[i][1],x[i][2],cutoff); + + for (m = 0; m < n; m++) { + + if(region->contact[m].delx != 0 && region->contact[m].r <= tooclose[0] ){ + onflag = 1; + continue; + + }else if (region->contact[m].dely != 0 && region->contact[m].r <= tooclose[1]){ + onflag = 1; + continue; + }else if (region->contact[m].delz !=0 && region->contact[m].r <= tooclose[2]){ + onflag = 1; + continue; + } + else rinv = 1.0/region->contact[m].r; + + ees(m,i);//me + + ewall[0] += eng; + fx = fwall * region->contact[m].delx * rinv; + fy = fwall * region->contact[m].dely * rinv; + fz = fwall * region->contact[m].delz * rinv; + f[i][0] += fx; + f[i][1] += fy; + f[i][2] += fz; + + ewall[1] -= fx; + ewall[2] -= fy; + ewall[3] -= fz; + + tor[i][0] += torque[0]; + tor[i][1] += torque[1]; + tor[i][2] += torque[2]; + + } + } + + if (onflag) error->one(FLERR,"Particle on or inside surface of region " + "used in fix wall/region/ees"); +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::post_force_respa(int vflag, int ilevel, int iloop) +{ + if (ilevel == nlevels_respa-1) post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::min_post_force(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- + energy of wall interaction +------------------------------------------------------------------------- */ + +double FixWallRegionEES::compute_scalar() +{ + // only sum across procs one time + + if (eflag == 0) { + MPI_Allreduce(ewall,ewall_all,4,MPI_DOUBLE,MPI_SUM,world); + eflag = 1; + } + return ewall_all[0]; +} + +/* ---------------------------------------------------------------------- + components of force on wall +------------------------------------------------------------------------- */ + +double FixWallRegionEES::compute_vector(int n) +{ + // only sum across procs one time + + if (eflag == 0) { + MPI_Allreduce(ewall,ewall_all,4,MPI_DOUBLE,MPI_SUM,world); + eflag = 1; + } + return ewall_all[n+1]; +} + + + +//me +/* ---------------------------------------------------------------------- + EES interaction for ellipsoid particle with wall + compute eng and fwall and twall = magnitude of wall force and torque +------------------------------------------------------------------------- */ + +void FixWallRegionEES::ees(int m, int i) +{ + Region *region = domain->regions[iregion]; + region->prematch(); + + double delta = 0.0, delta2 = 0.0, delta3 = 0.0, delta4 = 0.0, delta5 = 0.0, delta6 = 0.0; + double sigman = 0.0, sigman2 = 0.0 , sigman3 = 0.0, sigman4 = 0.0, sigman5 = 0.0, sigman6 = 0.0; + double hhss = 0.0, hhss2 = 0.0, hhss4 = 0.0, hhss7 = 0.0, hhss8 = 0.0; //h^2 - s_n^2 + double hps = 0.0; //h+s_n + double hms = 0.0; //h-s_n + double twall = 0.0; + double tempvec[3]={0,0,0}; + double tempvec2[3]= {0,0,0}; + + double SAn[3] = {0,0,0}; + double that[3] = {0,0,0}; + + double Lx[3][3] = {{0,0,0},{0,0,-1},{0,1,0}}; + double Ly[3][3] = {{0,0,1},{0,0,0},{-1,0,0}}; + double Lz[3][3] = {{0,-1,0},{1,0,0},{0,0,0}}; + + double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; + double nhat[3] = {0,0,0}; + + nhat[0] = region->contact[m].delx / region->contact[m].r; + nhat[1] = region->contact[m].dely / region->contact[m].r; + nhat[2] = region->contact[m].delz / region->contact[m].r; + + //avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + AtomVecEllipsoid::Bonus *bonus = avec->bonus; + int *ellipsoid = atom->ellipsoid;//me + + double* shape = bonus[ellipsoid[i]].shape;; + MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); + + MathExtra::transpose_matvec(A,nhat,tempvec); + for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; + for(int k = 0; k<3 ; k++) sigman2 += tempvec[k]*tempvec[k]; + for(int k = 0; k<3; k++) SAn[k] = tempvec[k]; + + + sigman = sqrt(sigman2); + delta = fabs(region->contact[m].r); + + sigman3 = sigman2 * sigman; + sigman4 = sigman2 * sigman2; + sigman5 = sigman4 * sigman; + sigman6 = sigman3 * sigman3; + + delta2 = delta * delta; + delta3 = delta2 * delta; + delta4 = delta2 * delta2; + delta5 = delta3 * delta2; + delta6 = delta3 * delta3; + + hhss = delta2 - sigman2; + hhss2 = hhss * hhss; + hhss4 = hhss2 * hhss2; + hhss8 = hhss4 * hhss4; + hhss7 = hhss4 * hhss2 * hhss; + + hps = delta + sigman; + hms = delta - sigman; + + fwall = -1*coeff4/hhss2 + + coeff3 * ( 21*delta6 + 63*delta4*sigman2 + 27*delta2*sigman4 + sigman6 ) / hhss8 + ; + + eng = -1*coeff2 * ( 4*delta/sigman2/hhss + 2*log(hms/hps)/sigman3 ) + + coeff1 * ( 35*delta5 + 70*delta3*sigman2 + 15*delta*sigman4 ) / hhss7; + + twall = coeff6 * ( 6.*delta3/sigman4/hhss2 - 10.*delta/sigman2/hhss2 + 3.*log(hms/hps)/sigman5 ) + + coeff5 * ( 21.*delta5 + 30.*delta3*sigman2 + 5.*delta*sigman4 ) / hhss8 ; + + MathExtra::matvec(Lx,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[0] = MathExtra::dot3(SAn,tempvec2); + + MathExtra::matvec(Ly,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[1] = MathExtra::dot3(SAn,tempvec2); + + MathExtra::matvec(Lz,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k < 3; k++) tempvec2[k] *= shape[k]; + that[2] = MathExtra::dot3(SAn,tempvec2); + + for(int j = 0; j<3 ; j++) + torque[j] = twall * that[j]; + +} diff --git a/src/USER-EES/fix_wall_region_ees.h b/src/USER-EES/fix_wall_region_ees.h new file mode 100644 index 0000000000..59679a0b41 --- /dev/null +++ b/src/USER-EES/fix_wall_region_ees.h @@ -0,0 +1,94 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(wall/region/ees,FixWallRegionEES) + +#else + +#ifndef LMP_FIX_WALL_REGION_EES_H +#define LMP_FIX_WALL_REGION_EES_H + +#include "fix.h" + + +namespace LAMMPS_NS { + +class FixWallRegionEES : public Fix { + public: + FixWallRegionEES(class LAMMPS *, int, char **); + ~FixWallRegionEES(); + int setmask(); + void init(); + void setup(int); + void min_setup(int); + void post_force(int); + void post_force_respa(int, int, int); + void min_post_force(int); + double compute_scalar(); + double compute_vector(int); + + private: + class AtomVecEllipsoid *avec;//me + + int iregion; + double epsilon,sigma,cutoff; + int eflag; + double ewall[4],ewall_all[4]; + int nlevels_respa; + char *idregion; + + double coeff1,coeff2,coeff3,coeff4,offset; + double coeff5, coeff6;//me + double eng,fwall; + double torque[3];//me + + void ees(int, int);//me +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +E: Region ID for fix wall/region/ees does not exist + +Self-explanatory. + +E: Fix wall/region/ees cutoff <= 0.0 + +Self-explanatory. + +E: Fix wall/region/ees colloid requires atom style sphere + +Self-explanatory. + +E: Fix wall/region/ees colloid requires extended particles + +One of the particles has radius 0.0. + +E: Particle on or inside surface of region used in fix wall/region + +Particles must be "exterior" to the region surface in order for +energy/force to be calculated. + +*/ diff --git a/src/USER-EES/install.sh b/src/USER-EES/install.sh new file mode 100644 index 0000000000..6163d56ad4 --- /dev/null +++ b/src/USER-EES/install.sh @@ -0,0 +1,34 @@ +# Install/unInstall package files in LAMMPS +# mode = 0/1/2 for uninstall/install/update + +mode=$1 + +# enforce using portable C locale +LC_ALL=C +export LC_ALL + +# arg1 = file, arg2 = file it depends on + +action () { + if (test $mode = 0) then + rm -f ../$1 + elif (! cmp -s $1 ../$1) then + if (test -z "$2" || test -e ../$2) then + cp $1 .. + if (test $mode = 2) then + echo " updating src/$1" + fi + fi + elif (test -n "$2") then + if (test ! -e ../$2) then + rm -f ../$1 + fi + fi +} + +# all package files with dependencies + +action fix_wall_ees.cpp +action fix_wall_ees.h +action fix_wall_region_ees.cpp +action fix_wall_region_ees.h -- GitLab From 23c3f5622af6ec70c4905710589c78c3e364c96d Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Mon, 13 Mar 2017 22:51:15 +0900 Subject: [PATCH 003/593] DOC files for USER-EES txt doc files for fix_wall_ees and fix_wall_region_ees added. --- doc/src/fix_wall_ees.txt | 102 ++++++++++++++++++++++++++++++++ doc/src/fix_wall_region_ees.txt | 41 +++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 doc/src/fix_wall_ees.txt create mode 100644 doc/src/fix_wall_region_ees.txt diff --git a/doc/src/fix_wall_ees.txt b/doc/src/fix_wall_ees.txt new file mode 100644 index 0000000000..54511ffba7 --- /dev/null +++ b/doc/src/fix_wall_ees.txt @@ -0,0 +1,102 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +fix wall/ees command :h3 + + +[Syntax:] + +fix ID group-ID wall/ees face args ... keyword value ... :pre + +ID, group-ID are documented in "fix"_fix.html command :ulb,l +one or more face/arg pairs may be appended :l +face = {xlo} or {xhi} or {ylo} or {yhi} or {zlo} or {zhi} :l + args = coord epsilon sigma cutoff + coord = position of wall = EDGE or constant or variable + EDGE = current lo or hi edge of simulation box + constant = number like 0.0 or -30.0 (distance units) + variable = "equal-style variable"_variable.html like v_x or v_wiggle + epsilon = strength factor for wall-particle interaction (energy or energy/distance^2 units) + epsilon can be a variable (see below) + sigma = size factor for wall-particle interaction (distance units) + sigma can be a variable (see below) + cutoff = distance from wall at which wall-particle interaction is cut off (distance units) :pre +zero or more keyword/value pairs may be appended :l +keyword = {units} or {fld} :l + {units} value = {lattice} or {box} + {lattice} = the wall position is defined in lattice units + {box} = the wall position is defined in simulation box units + {fld} value = {yes} or {no} + {yes} = invoke the wall constraint to be compatible with implicit FLD + {no} = invoke the wall constraint in the normal way + {pbc} value = {yes} or {no} + {yes} = allow periodic boundary in a wall dimension + {no} = require non-perioidic boundaries in any wall dimension :pre +:ule + +[Examples:] + +fix wallhi all wall/ees xlo -1.0 1.0 1.0 2.5 units box +fix wallhi all wall/ees xhi EDGE 1.0 1.0 2.5 +fix wallhi all wall/ees v_wiggle 23.2 1.0 1.0 2.5 +fix zwalls all wall/ees zlo 0.0 1.0 1.0 0.858 zhi 40.0 1.0 1.0 0.858 :pre + +[Description:] +  +Bound the simulation domain on one or more of its faces with a flat +wall that interacts with the ellipsoidal atoms in the group by generating a force +on the atom in a direction perpendicular to the wall and a torque parallel with the wall.  The energy of +wall-particle interactions E is given by: + + + + +:c,image(Eqs/fix_wall_ees.jpg) +  +  +Introduced by Babadi and Ejtehadi in "(Babadi)"_#BabadiEjtehadi. Here, {r} is the distance from the particle to the wall at +position {coord}, and Rc is the {cutoff} distance at which the  +particle and wall no longer interact. Also,  sigma_n is the distance between center of ellipsoid and the nearest point of its surface to the wall  The energy of the wall (see the image below). + +:c,image(JPG/fix_wall_ees_image.jpg) + +  +Details of using this command and specifications are the same as fix/wall command.  +  +The prefactor {epsilon} can be thought of as an +effective Hamaker constant with energy units for the strength of the +ellipsoid-wall interaction.  More specifically, the {epsilon} pre-factor += 8 * pi^2 * rho_wall * rho_ellipsoid * epsilon * sigma_a * sigma_b * sigma_c, where epsilon +is the LJ parameters for the constituent LJ +particles and sigma_a, sigma_b, and sigma_c are radii of ellipsoidal particles. Rho_wall and rho_ellipsoid are the number density of the +constituent particles, in the wall and ellipsoid respectively, in units +of 1/volume. +  +NOTE: You must insure that r is always bigger than sigma_n for +all particles in the group, or LAMMPS will generate an error.  This +means you cannot start your simulation with particles touching the wall +position {coord} (r = sigma_n) or with particles penetrating the wall (0 =< r < sigma_n) or with particles on the wrong side of the +wall (r < 0). +  +[Restrictions:] none + +[Related commands:] + +"fix wall"_fix_wall.html, +"pair resquared"_pair_resquared.html + +[Default:] + +The option defaults units = lattice, fld = no, and pbc = no. + +:line + +:link(BabadiEjtehadi) +[(Babadi)] Babadi and Ejtehadi, EPL, 77 (2007) 23002. +:link(Babadi) +[(Berardi)] Babadi, Ejtehadi, Everaers, J Comp Phys, 219, 770-779 (2006). diff --git a/doc/src/fix_wall_region_ees.txt b/doc/src/fix_wall_region_ees.txt new file mode 100644 index 0000000000..efb417add1 --- /dev/null +++ b/doc/src/fix_wall_region_ees.txt @@ -0,0 +1,41 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +fix wall/region/ees command :h3 + +[Syntax:] + +fix ID group-ID wall/region/ees region-ID epsilon sigma cutoff :pre + +ID, group-ID are documented in "fix"_fix.html command +wall/region = style name of this fix command +region-ID = region whose boundary will act as wall +epsilon = strength factor for wall-particle interaction (energy or energy/distance^2 units) +sigma = size factor for wall-particle interaction (distance units) +cutoff = distance from wall at which wall-particle interaction is cut off (distance units) :ul + +[Examples:]o +o +fix wall all wall/region/ees mySphere 1.0 1.0 2.5 :pre + +[Description:] + +Treat the surface of the geometric region defined by the {region-ID} +as a bounding wall which interacts with nearby ellipsoidal particles according to +the EES potential introduced "fix wall/ees"_fix_wall_ees.html. + +Other details of this command is the same wiht "fix wall/region"_fix_wall_region.html command. + +[Restrictions:] none + +[Related commands:] + +"fix wall/lj93"_fix_wall.html, +"fix wall/ees"_fix_wall_ees.html + +[Default:] none -- GitLab From 68b2a454b5c178a74ac09b1f4ab32488bf006efc Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Mon, 13 Mar 2017 22:53:10 +0900 Subject: [PATCH 004/593] UPLOAD fix_wall_ees_image --- doc/src/JPG/fix_wall_ees_image.jpg | Bin 0 -> 6013 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/src/JPG/fix_wall_ees_image.jpg diff --git a/doc/src/JPG/fix_wall_ees_image.jpg b/doc/src/JPG/fix_wall_ees_image.jpg new file mode 100644 index 0000000000000000000000000000000000000000..00f958b760916f6fc608edad27142db743d49367 GIT binary patch literal 6013 zcmex=oIr{vToxRiB58Ws@a}h+4gA8|Jkme>bnI#o zl0M4~mOs8RHC*4gfT1_~PSN4>3t*CrdP@$?5MI$I`y|Y+Ax-^e|C?0^spW@Xr5dnQ z%lMt#)AygD`h~LFJiEUI+8NZDO?z=GASM*W1HsqI240_ZK76&YNq!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UPLOAD Formulas for EES --- doc/src/Eqs/fix_wall_ees.jpg | Bin 0 -> 106786 bytes doc/src/Eqs/fix_wall_ees.tex | 10 ++++++++++ 2 files changed, 10 insertions(+) create mode 100644 doc/src/Eqs/fix_wall_ees.jpg create mode 100644 doc/src/Eqs/fix_wall_ees.tex diff --git a/doc/src/Eqs/fix_wall_ees.jpg b/doc/src/Eqs/fix_wall_ees.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0f99dae8f717cdf5456b943a3ffb7e246a1078e5 GIT binary patch literal 106786 zcmex=(ot@(Yg8bb)eOwtB85tP31Q-|?7?=bY z7;^JUih|so6e1#{6hLAyoS0l(;203#1LI@T->xz+f?8>L1BhJ| z66DOlz{JA9z`>J_#7;tDL+u4QSIM!cBr`3wLLoRmt)x7$C{>{t6cV1!&I$oV`DvLs zsUTHQOp;=#9(1ZCwW0(h=A2(pS(KTcQKEq10wV)MLk2`#d=3PMF{9WSgc!&K2u6tI zFJfS@_{zY*JOLq=G?Rg0dn*Hj#4UuF$^r%k{uTy?ZRe9qi^?FTuz)C51}+AE1`!5H z1~~?01`P&X1|tS@25SZf23H0z27iVShDe4uhGd2ehFpdshH{1)hDL@qhHi!l3{x3q zG0bOJ!myHI9m6Ju?F@Su4l*2LIL&Z@;VQ#zh6fB!8D2AdVED%Hn~{-`ospMOm{F2Z zo>7%io6(5Tg3*rAmC=VWh%u5efiayikFk`ohOwEkn{g83EXIY5D;YO3?qod3c#`oV z<4wkgj4v5KG5%s=X5wKIVUlH1W721`U~**gW(r}7WlCo%WU69nVd`U=!L*2J4bwKJ zgG{HHt};Dfdd>8enSq&`S&UhcS(n*@*_qj&If^-rxrn)rxr=!k^CIST%)6M6Ghb$Y z!2E{!Ckq>kFpC0j7^=*oXvwRk}Zp^nyrUzF57yx18f)B z9V+@Hi=ym`z0|xnA za$<50a#?ay1p{H>&} z6spvuv|j11GMBQ2a+>lK~qeyV`cO z7wQt~p6XTVtJUvl@M_p=6lyHexT49XX`z{|Ial+77L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^`-|b1z<@``v*%UJN%ifLZ zcq_9qWp}^G)r3nc!dv4$>`e45JhrdzT=1s2mc#EPO%_+~JaWl%oyyWLF{b7R`6iY9 zNsiCFr@Lz{Z_0(w%Q6>+=Ghp=t_Vz8ywj`jUXR4tt@l@^?z;W%yycr zrDZEhWxJ2r-(G4$boYvD_1ZP-Ah-6G6_w26xQP7 z<*Re@(WNU(=if7H&Y9ueZ*z02YNk6$$1y+;ynu!vU8n)8ed*#mf|k&E>l#7#&{qL{ z=W6KdH-ffltnjsU)+{zq*u|E#zEDphc60zu7K70A!e+8Q<0;jIPe zypTu1E4RG)03RzaXT&%i_g39CtB8N98^gb!n)}ZHh4VsZ&HdI-p`o|LEKgqxy&9Bc zwRAUMXMCsSw;NuQKsV?XdZ`FaYnj!v?QW+2OT}BLMK4yz4WJ;$>Teq_9sj7?wSQm8 z`;X1YoYt(ja#!@2_LU@0c$=+lk^H-9tNBISTXVg4F7%%ApMh(Q>-uKj9iYwnOXZG! zQ&mg Date: Thu, 16 Mar 2017 21:10:41 +0900 Subject: [PATCH 006/593] Readme for examples --- examples/USER/ees/README | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/USER/ees/README diff --git a/examples/USER/ees/README b/examples/USER/ees/README new file mode 100644 index 0000000000..4eb40665a3 --- /dev/null +++ b/examples/USER/ees/README @@ -0,0 +1,13 @@ +Here one may find simple examples that show how to use "fix wall/ess" and "fix wall/region/ess" commands. + + +--in.fix_wall_region: + + This input file uses Data_region file to setup a system of three particles colliding with a + cubic region which its walls interact with particle with EES potential. To find out details + of how to set parameters of "fix wall/region/ees" see documentaion. + +--in.fix_wall + + This input file uses Data_wall to confine a ellipsoidal particle between two EES walls to + show how to use "fix wall/ees" command. For more details lookup LAMMPS's documentation. -- GitLab From 8f37285b056a5b200564dfabd8e8d2f767f82ec9 Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Thu, 16 Mar 2017 21:12:10 +0900 Subject: [PATCH 007/593] UPLOAD examples --- examples/USER/ees/Data_region | 28 ++++++++++++++++++++++++++++ examples/USER/ees/Data_wall | 22 ++++++++++++++++++++++ examples/USER/ees/in.fix_wall | 25 +++++++++++++++++++++++++ examples/USER/ees/in.fix_wall_region | 27 +++++++++++++++++++++++++++ 4 files changed, 102 insertions(+) create mode 100644 examples/USER/ees/Data_region create mode 100644 examples/USER/ees/Data_wall create mode 100644 examples/USER/ees/in.fix_wall create mode 100644 examples/USER/ees/in.fix_wall_region diff --git a/examples/USER/ees/Data_region b/examples/USER/ees/Data_region new file mode 100644 index 0000000000..80eefeafe6 --- /dev/null +++ b/examples/USER/ees/Data_region @@ -0,0 +1,28 @@ + +3 atoms +1 atom types +3 ellipsoids +0 60 xlo xhi +0 60 zlo zhi +0 60 ylo yhi + +Atoms +atom-ID atom-type ellipsoidflag density x y z +1 1 1 1 5 30 30 +2 1 1 1 30 5 30 +3 1 1 1 30 30 5 + + +Ellipsoids +atom-ID shapex shapey shapez quatw quati quatj quatk +1 14 6 8 0.89453 0.44700 0 0 +2 14 6 8 0.25755 0 0.96626 0 +3 14 6 8 0.95009 0 0 0.31197 + + +Velocities + +1 1.3 0 0 1 0 5 +2 0 .2 0 .1 3 0 +3 0 0 .9 .5 5 1 + diff --git a/examples/USER/ees/Data_wall b/examples/USER/ees/Data_wall new file mode 100644 index 0000000000..27fa6c5990 --- /dev/null +++ b/examples/USER/ees/Data_wall @@ -0,0 +1,22 @@ + +1 atoms +1 atom types +1 ellipsoids +0 60 xlo xhi +0 60 zlo zhi +0 60 ylo yhi + +Atoms +atom-ID atom-type ellipsoidflag density x y z +1 1 1 1 30 30 30 + + +Ellipsoids +atom-ID shapex shapey shapez quatw quati quatj quatk +1 14 6 8 0.44700 0 0.89453 0 + + +Velocities + +1 0 0 1 1 3 5 + diff --git a/examples/USER/ees/in.fix_wall b/examples/USER/ees/in.fix_wall new file mode 100644 index 0000000000..94db4c3b15 --- /dev/null +++ b/examples/USER/ees/in.fix_wall @@ -0,0 +1,25 @@ + +units lj +atom_style ellipsoid +boundary p p f +read_data Data_wall +#------------------------------------# +pair_style resquared 1 +pair_coeff 1 1 10.0 1.0 0.5 0.5 4 0.5 0.5 4 1 +#------------------------------------# +timestep 0.0001 +#------------------------------------# + +fix EES_substrate all wall/ees zhi EDGE 10 1 10 zlo EDGE 10 1 10 +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^# + +fix NVT all nve/asphere +#------------------------------------# +compute qw all property/atom quatw +compute qi all property/atom quati +compute qj all property/atom quatj +compute qk all property/atom quatk +#------------------------------------# +dump 1 all custom 5000 dump1 id type x y z c_qw c_qi c_qj c_qk +run 2000000 + diff --git a/examples/USER/ees/in.fix_wall_region b/examples/USER/ees/in.fix_wall_region new file mode 100644 index 0000000000..d457deae44 --- /dev/null +++ b/examples/USER/ees/in.fix_wall_region @@ -0,0 +1,27 @@ + +units lj +atom_style ellipsoid +boundary p p p +read_data Data_region +#------------------------------------# +region the_wall block 20. 40. 20. 40. 20. 40. side out +#------------------------------------# +pair_style resquared 1 +pair_coeff 1 1 10.0 1.0 0.5 0.5 4 0.5 0.5 4 1 +#------------------------------------# +timestep 0.0001 +#------------------------------------# + +fix EES_block all wall/region/ees the_wall 10. 1. 20 +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^# + +fix NVT all nve/asphere +#------------------------------------# +compute qw all property/atom quatw +compute qi all property/atom quati +compute qj all property/atom quatj +compute qk all property/atom quatk +#------------------------------------# +dump 1 all custom 5000 dump1 id type x y z c_qw c_qi c_qj c_qk +run 2000000 + -- GitLab From 1544b51dcbfa42da80e991cb5fbb3c5141a60ff8 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 29 Mar 2017 01:18:24 -0400 Subject: [PATCH 008/593] Support mixed Python use by honoring Python GIL This enables support to both drive LAMMPS with a Python interpreter and evaluating Python expressions inside of LAMMPS using that same interpreter. Previously this has been avoided through an error message because the binding code did not ensure that the necessary GIL (global interpreter lock) structures exist (see issue #438). All code paths which call Python C API functions must first acquire the GIL through a call PyGILState_Ensure and release it with PyGILState_Release. --- src/PYTHON/python.cpp | 94 ++++++++++++++++++++++++++++++++----------- src/PYTHON/python.h | 1 + 2 files changed, 71 insertions(+), 24 deletions(-) diff --git a/src/PYTHON/python.cpp b/src/PYTHON/python.cpp index 11bb848b33..74591c1c16 100644 --- a/src/PYTHON/python.cpp +++ b/src/PYTHON/python.cpp @@ -37,6 +37,8 @@ Python::Python(LAMMPS *lmp) : Pointers(lmp) nfunc = 0; pfuncs = NULL; + + external_interpreter = false; } /* ---------------------------------------------------------------------- */ @@ -44,6 +46,7 @@ Python::Python(LAMMPS *lmp) : Pointers(lmp) Python::~Python() { // clean up + PyGILState_STATE gstate = PyGILState_Ensure(); for (int i = 0; i < nfunc; i++) { delete [] pfuncs[i].name; @@ -54,7 +57,12 @@ Python::~Python() // shutdown Python interpreter - if (pyMain) Py_Finalize(); + if (pyMain && !external_interpreter) { + Py_Finalize(); + } + else { + PyGILState_Release(gstate); + } memory->sfree(pfuncs); } @@ -147,27 +155,20 @@ void Python::command(int narg, char **arg) int ifunc = create_entry(arg[0]); // one-time initialization of Python interpreter - // Py_SetArgv() enables finding of *.py module files in current dir - // only needed for module load, not for direct file read into __main__ // pymain stores pointer to main module + PyGILState_STATE gstate; if (pyMain == NULL) { - if (Py_IsInitialized()) - error->all(FLERR,"Cannot embed Python when also " - "extending Python with LAMMPS"); + external_interpreter = Py_IsInitialized(); Py_Initialize(); - - //char *arg = (char *) "./lmp"; - //PySys_SetArgv(1,&arg); - - //PyObject *pName = PyString_FromString("__main__"); - //if (!pName) errorX->all(FLERR,"Bad pName"); - //PyObject *pModule = PyImport_Import(pName); - //Py_DECREF(pName); + PyEval_InitThreads(); + gstate = PyGILState_Ensure(); PyObject *pModule = PyImport_AddModule("__main__"); if (!pModule) error->all(FLERR,"Could not initialize embedded Python"); pyMain = (void *) pModule; + } else { + gstate = PyGILState_Ensure(); } // send Python code to Python interpreter @@ -177,22 +178,44 @@ void Python::command(int narg, char **arg) if (pyfile) { FILE *fp = fopen(pyfile,"r"); - if (fp == NULL) error->all(FLERR,"Could not open Python file"); + + if (fp == NULL) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not open Python file"); + } + int err = PyRun_SimpleFile(fp,pyfile); - if (err) error->all(FLERR,"Could not process Python file"); + + if (err) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not process Python file"); + } + fclose(fp); } else if (herestr) { int err = PyRun_SimpleString(herestr); - if (err) error->all(FLERR,"Could not process Python string"); + + if (err) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not process Python string"); + } } // pFunc = function object for requested function PyObject *pModule = (PyObject *) pyMain; PyObject *pFunc = PyObject_GetAttrString(pModule,pfuncs[ifunc].name); - if (!pFunc) error->all(FLERR,"Could not find Python function"); - if (!PyCallable_Check(pFunc)) + + if (!pFunc) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not find Python function"); + } + + if (!PyCallable_Check(pFunc)) { + PyGILState_Release(gstate); error->all(FLERR,"Python function is not callable"); + } + pfuncs[ifunc].pFunc = (void *) pFunc; // clean-up input storage @@ -200,12 +223,14 @@ void Python::command(int narg, char **arg) delete [] istr; delete [] format; delete [] pyfile; + PyGILState_Release(gstate); } /* ------------------------------------------------------------------ */ void Python::invoke_function(int ifunc, char *result) { + PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *pValue; char *str; @@ -215,29 +240,43 @@ void Python::invoke_function(int ifunc, char *result) int ninput = pfuncs[ifunc].ninput; PyObject *pArgs = PyTuple_New(ninput); - if (!pArgs) error->all(FLERR,"Could not create Python function arguments"); + + if (!pArgs) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not create Python function arguments"); + } for (int i = 0; i < ninput; i++) { int itype = pfuncs[ifunc].itype[i]; if (itype == INT) { if (pfuncs[ifunc].ivarflag[i]) { str = input->variable->retrieve(pfuncs[ifunc].svalue[i]); - if (!str) + + if (!str) { + PyGILState_Release(gstate); error->all(FLERR,"Could not evaluate Python function input variable"); + } + pValue = PyInt_FromLong(atoi(str)); } else pValue = PyInt_FromLong(pfuncs[ifunc].ivalue[i]); } else if (itype == DOUBLE) { if (pfuncs[ifunc].ivarflag[i]) { str = input->variable->retrieve(pfuncs[ifunc].svalue[i]); - if (!str) + + if (!str) { + PyGILState_Release(gstate); error->all(FLERR,"Could not evaluate Python function input variable"); + } + pValue = PyFloat_FromDouble(atof(str)); } else pValue = PyFloat_FromDouble(pfuncs[ifunc].dvalue[i]); } else if (itype == STRING) { if (pfuncs[ifunc].ivarflag[i]) { str = input->variable->retrieve(pfuncs[ifunc].svalue[i]); - if (!str) + if (!str) { + PyGILState_Release(gstate); error->all(FLERR,"Could not evaluate Python function input variable"); + } pValue = PyString_FromString(str); } else pValue = PyString_FromString(pfuncs[ifunc].svalue[i]); } else if (itype == PTR) { @@ -250,7 +289,12 @@ void Python::invoke_function(int ifunc, char *result) // error check with one() since only some procs may fail pValue = PyObject_CallObject(pFunc,pArgs); - if (!pValue) error->one(FLERR,"Python function evaluation failed"); + + if (!pValue) { + PyGILState_Release(gstate); + error->one(FLERR,"Python function evaluation failed"); + } + Py_DECREF(pArgs); // function returned a value @@ -271,6 +315,8 @@ void Python::invoke_function(int ifunc, char *result) } Py_DECREF(pValue); } + + PyGILState_Release(gstate); } /* ------------------------------------------------------------------ */ diff --git a/src/PYTHON/python.h b/src/PYTHON/python.h index 5f65e3970b..78889b994f 100644 --- a/src/PYTHON/python.h +++ b/src/PYTHON/python.h @@ -21,6 +21,7 @@ namespace LAMMPS_NS { class Python : protected Pointers { public: int python_exists; + bool external_interpreter; Python(class LAMMPS *); ~Python(); -- GitLab From 6f1bbd3cece0583354bab333857ec107cb6e1d97 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 3 Apr 2017 18:08:15 -0400 Subject: [PATCH 009/593] protect fix ave/histo from segfaulting on non-existing computes, fixes or variables --- src/fix_ave_histo.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/fix_ave_histo.cpp b/src/fix_ave_histo.cpp index e0d010aacb..b4516a0fd2 100644 --- a/src/fix_ave_histo.cpp +++ b/src/fix_ave_histo.cpp @@ -205,14 +205,18 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) : for (int i = 0; i < nvalues; i++) { if (which[i] == X || which[i] == V || which[i] == F) kindflag = PERATOM; else if (which[i] == COMPUTE) { - Compute *compute = modify->compute[modify->find_compute(ids[i])]; + int c_id = modify->find_compute(ids[i]); + if (c_id < 0) error->all(FLERR,"Fix ave/histo input is invalid compute"); + Compute *compute = modify->compute[c_id]; if (compute->scalar_flag || compute->vector_flag || compute->array_flag) kindflag = GLOBAL; else if (compute->peratom_flag) kindflag = PERATOM; else if (compute->local_flag) kindflag = LOCAL; else error->all(FLERR,"Fix ave/histo input is invalid compute"); } else if (which[i] == FIX) { - Fix *fix = modify->fix[modify->find_fix(ids[i])]; + int f_id = modify->find_fix(ids[i]); + if (f_id < 0) error->all(FLERR,"Fix ave/histo input is invalid fix"); + Fix *fix = modify->fix[f_id]; if (fix->scalar_flag || fix->vector_flag || fix->array_flag) kindflag = GLOBAL; else if (fix->peratom_flag) kindflag = PERATOM; @@ -220,6 +224,7 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) : else error->all(FLERR,"Fix ave/histo input is invalid fix"); } else if (which[i] == VARIABLE) { int ivariable = input->variable->find(ids[i]); + if (ivariable < 0) error->all(FLERR,"Fix ave/histo input is invalid variable"); if (input->variable->equalstyle(ivariable)) kindflag = GLOBAL; else if (input->variable->atomstyle(ivariable)) kindflag = PERATOM; else error->all(FLERR,"Fix ave/histo input is invalid variable"); -- GitLab From 28e86917a05e3d03c60501983090876f05e981f9 Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Tue, 4 Apr 2017 12:35:26 -0400 Subject: [PATCH 010/593] Made fix adapt work with bond_harmonic. --- doc/src/fix_adapt.txt | 23 ++++++++- src/bond.cpp | 11 ++++ src/bond.h | 4 ++ src/fix_adapt.cpp | 113 +++++++++++++++++++++++++++++++++++++++++- src/fix_adapt.h | 7 ++- 5 files changed, 153 insertions(+), 5 deletions(-) diff --git a/doc/src/fix_adapt.txt b/doc/src/fix_adapt.txt index a35357a7ec..d7c32bef3d 100644 --- a/doc/src/fix_adapt.txt +++ b/doc/src/fix_adapt.txt @@ -22,6 +22,11 @@ attribute = {pair} or {kspace} or {atom} :l pparam = parameter to adapt over time I,J = type pair(s) to set parameter for v_name = variable with name that calculates value of pparam + {bond} args = bstyle bparam I v_name + bstyle = bond style name, e.g. harmonic + bparam = parameter to adapt over time + I = type bond to set parameter for + v_name = variable with name that calculates value of bparam {kspace} arg = v_name v_name = variable with name that calculates scale factor on K-space terms {atom} args = aparam v_name @@ -42,7 +47,10 @@ keyword = {scale} or {reset} :l fix 1 all adapt 1 pair soft a 1 1 v_prefactor fix 1 all adapt 1 pair soft a 2* 3 v_prefactor fix 1 all adapt 1 pair lj/cut epsilon * * v_scale1 coul/cut scale 3 3 v_scale2 scale yes reset yes -fix 1 all adapt 10 atom diameter v_size :pre +fix 1 all adapt 10 atom diameter v_size + +variable ramp_up equal "ramp(0.01,0.5)" +fix stretch all adapt 1 bond harmonic r0 1 v_ramp_up :pre [Description:] @@ -192,6 +200,19 @@ fix 1 all adapt 1 pair soft a * * v_prefactor :pre :line +The {bond} keyword uses the specified variable to change the value of +a bond coefficient over time, very similar to how the {pair} keyword +operates. The only difference is that now a bond coefficient for a +given bond type is adapted. + +Currently {bond} does not support bond_style hybrid nor bond_style +hybrid/overlay as bond styles. The only bonds that currently are +working with fix_adapt are + +"harmonic"_bond_harmonic.html: k,r0: type bonds :tb(c=3,s=:) + +:line + The {kspace} keyword used the specified variable as a scale factor on the energy, forces, virial calculated by whatever K-Space solver is defined by the "kspace_style"_kspace_style.html command. If the diff --git a/src/bond.cpp b/src/bond.cpp index 5a33f107cf..825ff1b199 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -292,3 +292,14 @@ double Bond::memory_usage() bytes += comm->nthreads*maxvatom*6 * sizeof(double); return bytes; } + +/* ----------------------------------------------------------------------- + Reset all type-based bond params via init. +-------------------------------------------------------------------------- */ +void Bond::reinit() +{ + if (!reinitflag) + error->all(FLERR,"Fix adapt interface to this bond style not supported"); + + init(); +} diff --git a/src/bond.h b/src/bond.h index 41604387a3..29de7ad7d2 100644 --- a/src/bond.h +++ b/src/bond.h @@ -30,6 +30,8 @@ class Bond : protected Pointers { double virial[6]; // accumulated virial double *eatom,**vatom; // accumulated per-atom energy/virial + int reinitflag; // 1 if compatible with fix adapt and alike + // KOKKOS host/device flag and data masks ExecutionSpace execution_space; @@ -49,6 +51,8 @@ class Bond : protected Pointers { virtual void write_data(FILE *) {} virtual double single(int, double, int, int, double &) = 0; virtual double memory_usage(); + virtual void *extract(char *, int &) {return NULL;} + virtual void reinit(); void write_file(int, char**); diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 4c7eb5f218..7efa0485ba 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -16,6 +16,7 @@ #include #include "fix_adapt.h" #include "atom.h" +#include "bond.h" #include "update.h" #include "group.h" #include "modify.h" @@ -35,7 +36,7 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; -enum{PAIR,KSPACE,ATOM}; +enum{PAIR,KSPACE,ATOM,BOND}; enum{DIAMETER,CHARGE}; /* ---------------------------------------------------------------------- */ @@ -68,6 +69,10 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL) if (iarg+3 > narg) error->all(FLERR,"Illegal fix adapt command"); nadapt++; iarg += 3; + } else if (strcmp(arg[iarg],"bond") == 0 ){ + if (iarg+5 > narg) error->all(FLERR,"Illegal fix adapt command"); + nadapt++; + iarg += 5; } else break; } @@ -103,6 +108,25 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL) } else error->all(FLERR,"Illegal fix adapt command"); nadapt++; iarg += 6; + } else if (strcmp(arg[iarg],"bond") == 0 ){ + if (iarg+5 > narg) error->all(FLERR, "Illegal fix adapt command"); + adapt[nadapt].which = BOND; + int n = strlen(arg[iarg+1]) + 1; + adapt[nadapt].bstyle = new char[n]; + strcpy(adapt[nadapt].bstyle,arg[iarg+1]); + n = strlen(arg[iarg+2]) + 1; + adapt[nadapt].bparam = new char[n]; + adapt[nadapt].bond = NULL; + strcpy(adapt[nadapt].bparam,arg[iarg+2]); + force->bounds(FLERR,arg[iarg+3],atom->ntypes, + adapt[nadapt].ilo,adapt[nadapt].ihi); + if (strstr(arg[iarg+4],"v_") == arg[iarg+4]) { + n = strlen(&arg[iarg+4][2]) + 1; + adapt[nadapt].var = new char[n]; + strcpy(adapt[nadapt].var,&arg[iarg+4][2]); + } else error->all(FLERR,"Illegal fix adapt command"); + nadapt++; + iarg += 5; } else if (strcmp(arg[iarg],"kspace") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix adapt command"); adapt[nadapt].which = KSPACE; @@ -160,6 +184,13 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL) for (int m = 0; m < nadapt; m++) if (adapt[m].which == PAIR) memory->create(adapt[m].array_orig,n+1,n+1,"adapt:array_orig"); + + // allocate bond style arrays: + n = atom->nbondtypes; + for (int m = 0; m < nadapt; ++m) + if (adapt[m].which == BOND) + // For now just use same storage and fake it to be one-dimensional: + memory->create(adapt[m].vector_orig,n+1,"adapt:vector_orig"); } /* ---------------------------------------------------------------------- */ @@ -172,6 +203,10 @@ FixAdapt::~FixAdapt() delete [] adapt[m].pstyle; delete [] adapt[m].pparam; memory->destroy(adapt[m].array_orig); + } else if (adapt[m].which == BOND) { + delete [] adapt[m].bstyle; + delete [] adapt[m].bparam; + memory->destroy(adapt[m].vector_orig); } } delete [] adapt; @@ -282,6 +317,7 @@ void FixAdapt::init() // setup and error checks anypair = 0; + anybond = 0; for (int m = 0; m < nadapt; m++) { Adapt *ad = &adapt[m]; @@ -350,7 +386,48 @@ void FixAdapt::init() } delete [] pstyle; + } else if (ad->which == BOND){ + ad->bond = NULL; + anybond = 1; + // Use same routines from pair to strip any suffices: + + int n = strlen(ad->bstyle) + 1; + char *bstyle = new char[n]; + strcpy(bstyle,ad->bstyle); + + if (lmp->suffix_enable) { + int len = 2 + strlen(bstyle) + strlen(lmp->suffix); + char *bsuffix = new char[len]; + strcpy(bsuffix,bstyle); + strcat(bsuffix,"/"); + strcat(bsuffix,lmp->suffix); + ad->bond = force->bond_match(bsuffix); + delete [] bsuffix; + } + // If not set grab regular one instead: + if (ad->bond == NULL) ad->bond = force->bond_match(bstyle); + if (ad->bond == NULL ) + error->all(FLERR,"Fix adapt bond style does not exist"); + + void *ptr = ad->bond->extract(ad->bparam,ad->bdim); + if( comm->me == 0 ){ + fprintf(screen,"Attempting to extract %s\n", ad->bparam); + fprintf(screen,"Got back %p\n", ptr); + } + + if (ptr == NULL) + error->all(FLERR,"Fix adapt bond style param not supported"); + + // For bond styles you should use a vector + + if (ad->bdim == 1) ad->vector = (double *) ptr; + + if (strcmp(force->bond_style,"hybrid") == 0 || + strcmp(force->bond_style,"hybrid_overlay") == 0) + error->all(FLERR,"Fix adapt does not support bond_style hybrid"); + delete [] bstyle; + } else if (ad->which == KSPACE) { if (force->kspace == NULL) error->all(FLERR,"Fix adapt kspace style does not exist"); @@ -368,7 +445,7 @@ void FixAdapt::init() } } - // make copy of original pair array values + // make copy of original pair/bond array values for (int m = 0; m < nadapt; m++) { Adapt *ad = &adapt[m]; @@ -378,7 +455,12 @@ void FixAdapt::init() ad->array_orig[i][j] = ad->array[i][j]; }else if (ad->which == PAIR && ad->pdim == 0){ ad->scalar_orig = *ad->scalar; + + }else if (ad->which == BOND && ad->bdim == 1){ + for (i = ad->ilo; i <= ad->ihi; ++i ) + ad->vector_orig[i] = ad->vector[i]; } + } // fixes that store initial per-atom values @@ -470,6 +552,18 @@ void FixAdapt::change_settings() ad->array[i][j] = value; } + // set bond type array values: + + } else if (ad->which == BOND) { + if (ad->pdim == 1){ + if (scaleflag) + for (i = ad->ilo; i <= ad->ihi; ++i ) + ad->vector[i] = value*ad->vector_orig[i]; + else + for (i = ad->ilo; i <= ad->ihi; ++i ) + ad->vector[i] = value; + } + // set kspace scale factor } else if (ad->which == KSPACE) { @@ -532,6 +626,14 @@ void FixAdapt::change_settings() } } } + if (anybond) { + for (int m = 0; m < nadapt; ++m ) { + Adapt *ad = &adapt[m]; + if (ad->which == BOND) { + ad->bond->reinit(); + } + } + } // reset KSpace charges if charges have changed @@ -554,6 +656,12 @@ void FixAdapt::restore_settings() ad->array[i][j] = ad->array_orig[i][j]; } + } else if (ad->which == BOND) { + if (ad->pdim == 1) { + for (int i = ad->ilo; i <= ad->ihi; i++) + ad->vector[i] = ad->vector_orig[i]; + } + } else if (ad->which == KSPACE) { *kspace_scale = 1.0; @@ -588,6 +696,7 @@ void FixAdapt::restore_settings() } if (anypair) force->pair->reinit(); + if (anybond) force->bond->reinit(); if (chgflag && force->kspace) force->kspace->qsum_qsq(); } diff --git a/src/fix_adapt.h b/src/fix_adapt.h index a6d45c78cc..6e49f4a284 100644 --- a/src/fix_adapt.h +++ b/src/fix_adapt.h @@ -43,7 +43,7 @@ class FixAdapt : public Fix { private: int nadapt,resetflag,scaleflag; - int anypair; + int anypair, anybond; int nlevels_respa; char *id_fix_diam,*id_fix_chg; class FixStore *fix_diam,*fix_chg; @@ -52,12 +52,15 @@ class FixAdapt : public Fix { int which,ivar; char *var; char *pstyle,*pparam; + char *bstyle,*bparam; int ilo,ihi,jlo,jhi; - int pdim; + int pdim,bdim; double *scalar,scalar_orig; + double *vector,*vector_orig; double **array,**array_orig; int aparam; class Pair *pair; + class Bond *bond; }; Adapt *adapt; -- GitLab From 03a6f5237f9a6cbd696f6c009d026f33ff695bb2 Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Tue, 4 Apr 2017 13:30:49 -0400 Subject: [PATCH 011/593] Made every keyword for user-manifold work as advertised. --- src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp | 27 ++++++++++++------- src/USER-MANIFOLD/fix_nve_manifold_rattle.h | 2 +- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp index 0d48e145e0..cb2a880c8d 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp @@ -94,6 +94,8 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg, dof_flag = 1; nevery = 0; + next_output = 0; + fprintf( screen, "nevery = %d\n", nevery ); dtv = dtf = 0; tolerance = force->numeric( FLERR, arg[3] ); @@ -145,6 +147,11 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg, while( argi < narg ){ if( strcmp(arg[argi], "every") == 0 ){ nevery = force->inumeric(FLERR,arg[argi+1]); + next_output = update->ntimestep + nevery; + if( comm->me == 0 ){ + fprintf(screen,"Outputing every %d steps, next is %d\n", + nevery, next_output); + } argi += 2; }else if( error_on_unknown_keyword ){ char msg[2048]; @@ -220,6 +227,11 @@ void FixNVEManifoldRattle::print_stats( const char *header ) x_iters * inv_tdiff, v_iters * inv_tdiff, stats.dofs_removed); fprintf(screen,"\n"); } + + stats.x_iters_per_atom = 0; + stats.v_iters_per_atom = 0; + stats.x_iters = 0; + stats.v_iters = 0; } @@ -263,14 +275,6 @@ void FixNVEManifoldRattle::init() void FixNVEManifoldRattle::update_var_params() { - if( nevery > 0 ){ - stats.x_iters = 0; - stats.v_iters = 0; - stats.natoms = 0; - stats.x_iters_per_atom = 0.0; - stats.v_iters_per_atom = 0.0; - } - double *ptr_params = ptr_m->params; for( int i = 0; i < nvars; ++i ){ @@ -358,7 +362,12 @@ void FixNVEManifoldRattle::final_integrate() ---------------------------------------------------------------------------*/ void FixNVEManifoldRattle::end_of_step() { - print_stats( "nve/manifold/rattle" ); + if (nevery && (update->ntimestep == next_output)){ + if( comm->me == 0 ){ + print_stats( "nve/manifold/rattle" ); + next_output += nevery; + } + } } /* ----------------------------------------------------------------------------- diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.h b/src/USER-MANIFOLD/fix_nve_manifold_rattle.h index 4bd17ab899..71aa1aed9a 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.h +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.h @@ -81,7 +81,7 @@ namespace LAMMPS_NS { protected: - int nevery; + int nevery, next_output; double dtv, dtf; double tolerance; -- GitLab From e190eb15f541e1e79d7fcfae9ed7df432f0ed532 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 4 Apr 2017 17:54:33 +0000 Subject: [PATCH 012/593] remove debug printf --- src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp index cb2a880c8d..4f6b62590d 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp @@ -95,7 +95,6 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg, nevery = 0; next_output = 0; - fprintf( screen, "nevery = %d\n", nevery ); dtv = dtf = 0; tolerance = force->numeric( FLERR, arg[3] ); -- GitLab From 8993daaa31dbc68d8a9558f5856118791b8d79c5 Mon Sep 17 00:00:00 2001 From: Oliver Henrich Date: Tue, 4 Apr 2017 19:54:22 +0100 Subject: [PATCH 013/593] Minor update to docu --- doc/src/Section_packages.txt | 4 ++-- doc/src/bond_oxdna.txt | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index 5c6463a71a..b327b7b1ce 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -1308,8 +1308,8 @@ oxdna/..."_pair_oxdna.html, "pair_style oxdna2/..."_pair_oxdna2.html, "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html -Author: Oliver Henrich at the University of Strathclyde, Glasgow, UK and -University of Edinburgh (ohenrich@ph.ed.ac.uk). +Author: Oliver Henrich at the University of Strathclyde, Glasgow +(oliver.henrich at strath.ac.uk, also ohenrich at ph.ed.ac.uk). Contact him directly if you have any questions. :line diff --git a/doc/src/bond_oxdna.txt b/doc/src/bond_oxdna.txt index 6cdbbd3546..f9b35a167c 100644 --- a/doc/src/bond_oxdna.txt +++ b/doc/src/bond_oxdna.txt @@ -46,9 +46,7 @@ for excluded volume interaction {oxdna/excv}, stacking {oxdna/stk}, cross-stacki and coaxial stacking interaction {oxdna/coaxstk} as well as hydrogen-bonding interaction {oxdna/hbond} (see also documentation of "pair_style oxdna/excv"_pair_oxdna.html). For the oxDNA2 "(Snodin)"_#oxdna2 bond style the analogous pair styles and an additional Debye-Hueckel pair style {oxdna2/dh} have to be defined. - -The coefficients -in the above example have to be kept fixed and cannot be changed without reparametrizing the entire model. +The coefficients in the above example have to be kept fixed and cannot be changed without reparametrizing the entire model. Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/. A simple python setup tool which creates single straight or helical DNA strands, -- GitLab From 874944f2ecf486f7eaf9f86d060f3c119d35d875 Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Tue, 4 Apr 2017 19:37:17 -0400 Subject: [PATCH 014/593] Made fix adapt support bond harmonic. --- src/fix_adapt.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 7efa0485ba..07559c7719 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -410,10 +410,6 @@ void FixAdapt::init() error->all(FLERR,"Fix adapt bond style does not exist"); void *ptr = ad->bond->extract(ad->bparam,ad->bdim); - if( comm->me == 0 ){ - fprintf(screen,"Attempting to extract %s\n", ad->bparam); - fprintf(screen,"Got back %p\n", ptr); - } if (ptr == NULL) error->all(FLERR,"Fix adapt bond style param not supported"); @@ -555,7 +551,7 @@ void FixAdapt::change_settings() // set bond type array values: } else if (ad->which == BOND) { - if (ad->pdim == 1){ + if (ad->bdim == 1){ if (scaleflag) for (i = ad->ilo; i <= ad->ihi; ++i ) ad->vector[i] = value*ad->vector_orig[i]; -- GitLab From 1725832b6c8af1fb24a0048b1d15ce97b0e7f2e7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 6 Apr 2017 11:08:57 -0400 Subject: [PATCH 015/593] address issue where uninstalling an empty package will erase all code in src --- src/Install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Install.sh b/src/Install.sh index 307188a09f..e9c8b80595 100644 --- a/src/Install.sh +++ b/src/Install.sh @@ -33,5 +33,5 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done -- GitLab From 62b9fa22b8ef940d2b8422908c9e59ad2c498f02 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 7 Apr 2017 15:11:26 -0400 Subject: [PATCH 016/593] when computing only rotational temperature, we must not subtract the default n-dim extra DOFs --- src/ASPHERE/compute_temp_asphere.cpp | 5 +++++ src/compute_temp_sphere.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp index 029b76cb27..e8d3fcb527 100644 --- a/src/ASPHERE/compute_temp_asphere.cpp +++ b/src/ASPHERE/compute_temp_asphere.cpp @@ -73,6 +73,11 @@ ComputeTempAsphere::ComputeTempAsphere(LAMMPS *lmp, int narg, char **arg) : } else error->all(FLERR,"Illegal compute temp/asphere command"); } + // when computing only the rotational temperature, + // do not remove DOFs for translation as set by default + + if (mode == ROTATE) extra_dof = 0; + vector = new double[6]; } diff --git a/src/compute_temp_sphere.cpp b/src/compute_temp_sphere.cpp index 50995dfa84..febb9339b4 100644 --- a/src/compute_temp_sphere.cpp +++ b/src/compute_temp_sphere.cpp @@ -67,6 +67,11 @@ ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) : } else error->all(FLERR,"Illegal compute temp/sphere command"); } + // when computing only the rotational temperature, + // do not remove DOFs for translation as set by default + + if (mode == ROTATE) extra_dof = 0; + vector = new double[6]; // error checks -- GitLab From d6357420ae18025c0f43be2f9f999b6873914fd8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 7 Apr 2017 15:29:56 -0400 Subject: [PATCH 017/593] propagate global package installation bugfix to explicit package scripts --- src/COMPRESS/Install.sh | 2 +- src/KIM/Install.sh | 2 +- src/MEAM/Install.sh | 2 +- src/MPIIO/Install.sh | 2 +- src/MSCG/Install.sh | 2 +- src/POEMS/Install.sh | 2 +- src/PYTHON/Install.sh | 2 +- src/REAX/Install.sh | 2 +- src/USER-ATC/Install.sh | 2 +- src/USER-AWPMD/Install.sh | 2 +- src/USER-COLVARS/Install.sh | 2 +- src/USER-H5MD/Install.sh | 2 +- src/USER-MISC/Install.sh | 2 +- src/USER-MOLFILE/Install.sh | 2 +- src/USER-NC-DUMP/Install.sh | 2 +- src/USER-QMMM/Install.sh | 2 +- src/USER-QUIP/Install.sh | 2 +- src/USER-SMD/Install.sh | 2 +- src/USER-VTK/Install.sh | 2 +- src/VORONOI/Install.sh | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/COMPRESS/Install.sh b/src/COMPRESS/Install.sh index ef1c8920c8..ab9dac33dc 100644 --- a/src/COMPRESS/Install.sh +++ b/src/COMPRESS/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/KIM/Install.sh b/src/KIM/Install.sh index bac9d97cc6..7ddb9c8227 100644 --- a/src/KIM/Install.sh +++ b/src/KIM/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/MEAM/Install.sh b/src/MEAM/Install.sh index 1825d4327f..7bfc76c0e2 100644 --- a/src/MEAM/Install.sh +++ b/src/MEAM/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/MPIIO/Install.sh b/src/MPIIO/Install.sh index 3834aea5c5..902bff2fc8 100644 --- a/src/MPIIO/Install.sh +++ b/src/MPIIO/Install.sh @@ -36,7 +36,7 @@ touch ../write_restart.cpp # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package to include/exclude LMP_MPIIO setting diff --git a/src/MSCG/Install.sh b/src/MSCG/Install.sh index f7c7452101..353403c7da 100755 --- a/src/MSCG/Install.sh +++ b/src/MSCG/Install.sh @@ -25,7 +25,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/POEMS/Install.sh b/src/POEMS/Install.sh index 7996f542be..be407d76f0 100644 --- a/src/POEMS/Install.sh +++ b/src/POEMS/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/PYTHON/Install.sh b/src/PYTHON/Install.sh index 3d6f71958a..71288cf377 100755 --- a/src/PYTHON/Install.sh +++ b/src/PYTHON/Install.sh @@ -35,7 +35,7 @@ touch ../variable.cpp # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/REAX/Install.sh b/src/REAX/Install.sh index f0083810e9..bf8c8dbca2 100644 --- a/src/REAX/Install.sh +++ b/src/REAX/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-ATC/Install.sh b/src/USER-ATC/Install.sh index 1137389018..f719fe220f 100755 --- a/src/USER-ATC/Install.sh +++ b/src/USER-ATC/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-AWPMD/Install.sh b/src/USER-AWPMD/Install.sh index 7922c53395..094e10c157 100644 --- a/src/USER-AWPMD/Install.sh +++ b/src/USER-AWPMD/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-COLVARS/Install.sh b/src/USER-COLVARS/Install.sh index c01719e766..d67883a416 100755 --- a/src/USER-COLVARS/Install.sh +++ b/src/USER-COLVARS/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-H5MD/Install.sh b/src/USER-H5MD/Install.sh index bdda732807..1070afaa96 100644 --- a/src/USER-H5MD/Install.sh +++ b/src/USER-H5MD/Install.sh @@ -27,7 +27,7 @@ action () { } for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-MISC/Install.sh b/src/USER-MISC/Install.sh index 203d923164..2d42125ec3 100644 --- a/src/USER-MISC/Install.sh +++ b/src/USER-MISC/Install.sh @@ -35,6 +35,6 @@ for file in *.cpp *.h; do elif (test $file = "pair_cdeam.h") then action pair_cdeam.h pair_eam_alloy.cpp else - action $file + test -f ${file} && action $file fi done diff --git a/src/USER-MOLFILE/Install.sh b/src/USER-MOLFILE/Install.sh index 19fd3bd361..85885f66b9 100644 --- a/src/USER-MOLFILE/Install.sh +++ b/src/USER-MOLFILE/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-NC-DUMP/Install.sh b/src/USER-NC-DUMP/Install.sh index 37ebd0a0a5..4d21f0f894 100644 --- a/src/USER-NC-DUMP/Install.sh +++ b/src/USER-NC-DUMP/Install.sh @@ -27,7 +27,7 @@ action () { } for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-QMMM/Install.sh b/src/USER-QMMM/Install.sh index 089b880a77..4bede66d80 100755 --- a/src/USER-QMMM/Install.sh +++ b/src/USER-QMMM/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-QUIP/Install.sh b/src/USER-QUIP/Install.sh index ee7faaf62a..20174e664a 100644 --- a/src/USER-QUIP/Install.sh +++ b/src/USER-QUIP/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-SMD/Install.sh b/src/USER-SMD/Install.sh index c0f48c5460..cb9aa5452b 100644 --- a/src/USER-SMD/Install.sh +++ b/src/USER-SMD/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-VTK/Install.sh b/src/USER-VTK/Install.sh index d02dc87772..3749242fb2 100644 --- a/src/USER-VTK/Install.sh +++ b/src/USER-VTK/Install.sh @@ -27,7 +27,7 @@ action () { } for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/VORONOI/Install.sh b/src/VORONOI/Install.sh index f21e9404eb..6373506b19 100755 --- a/src/VORONOI/Install.sh +++ b/src/VORONOI/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info -- GitLab From 1ad7d856feeefbe5056ea295903e7f154e280f36 Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Mon, 10 Apr 2017 09:57:54 -0400 Subject: [PATCH 018/593] Added forgotten #include string to bond_harmonic.cpp --- src/bond_harmonic.cpp | 215 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 src/bond_harmonic.cpp diff --git a/src/bond_harmonic.cpp b/src/bond_harmonic.cpp new file mode 100644 index 0000000000..f0b6d96cc8 --- /dev/null +++ b/src/bond_harmonic.cpp @@ -0,0 +1,215 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include +#include +#include +#include "bond_harmonic.h" +#include "atom.h" +#include "neighbor.h" +#include "domain.h" +#include "comm.h" +#include "force.h" +#include "memory.h" +#include "error.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +BondHarmonic::BondHarmonic(LAMMPS *lmp) : Bond(lmp) +{ + reinitflag = 1; +} + +/* ---------------------------------------------------------------------- */ + +BondHarmonic::~BondHarmonic() +{ + if (allocated && !copymode) { + memory->destroy(setflag); + memory->destroy(k); + memory->destroy(r0); + } +} + +/* ---------------------------------------------------------------------- */ + +void BondHarmonic::compute(int eflag, int vflag) +{ + int i1,i2,n,type; + double delx,dely,delz,ebond,fbond; + double rsq,r,dr,rk; + + ebond = 0.0; + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = 0; + + double **x = atom->x; + double **f = atom->f; + int **bondlist = neighbor->bondlist; + int nbondlist = neighbor->nbondlist; + int nlocal = atom->nlocal; + int newton_bond = force->newton_bond; + + for (n = 0; n < nbondlist; n++) { + i1 = bondlist[n][0]; + i2 = bondlist[n][1]; + type = bondlist[n][2]; + + delx = x[i1][0] - x[i2][0]; + dely = x[i1][1] - x[i2][1]; + delz = x[i1][2] - x[i2][2]; + + rsq = delx*delx + dely*dely + delz*delz; + r = sqrt(rsq); + dr = r - r0[type]; + rk = k[type] * dr; + + // force & energy + + if (r > 0.0) fbond = -2.0*rk/r; + else fbond = 0.0; + + if (eflag) ebond = rk*dr; + + // apply force to each of 2 atoms + + if (newton_bond || i1 < nlocal) { + f[i1][0] += delx*fbond; + f[i1][1] += dely*fbond; + f[i1][2] += delz*fbond; + } + + if (newton_bond || i2 < nlocal) { + f[i2][0] -= delx*fbond; + f[i2][1] -= dely*fbond; + f[i2][2] -= delz*fbond; + } + + if (evflag) ev_tally(i1,i2,nlocal,newton_bond,ebond,fbond,delx,dely,delz); + } +} + +/* ---------------------------------------------------------------------- */ + +void BondHarmonic::allocate() +{ + allocated = 1; + int n = atom->nbondtypes; + + memory->create(k,n+1,"bond:k"); + memory->create(r0,n+1,"bond:r0"); + + memory->create(setflag,n+1,"bond:setflag"); + for (int i = 1; i <= n; i++) setflag[i] = 0; +} + +/* ---------------------------------------------------------------------- + set coeffs for one or more types +------------------------------------------------------------------------- */ + +void BondHarmonic::coeff(int narg, char **arg) +{ + if (narg != 3) error->all(FLERR,"Incorrect args for bond coefficients"); + if (!allocated) allocate(); + + int ilo,ihi; + force->bounds(FLERR,arg[0],atom->nbondtypes,ilo,ihi); + + double k_one = force->numeric(FLERR,arg[1]); + double r0_one = force->numeric(FLERR,arg[2]); + + int count = 0; + for (int i = ilo; i <= ihi; i++) { + k[i] = k_one; + r0[i] = r0_one; + setflag[i] = 1; + count++; + } + + if (count == 0) error->all(FLERR,"Incorrect args for bond coefficients"); +} + +/* ---------------------------------------------------------------------- + return an equilbrium bond length +------------------------------------------------------------------------- */ + +double BondHarmonic::equilibrium_distance(int i) +{ + return r0[i]; +} + +/* ---------------------------------------------------------------------- + proc 0 writes out coeffs to restart file +------------------------------------------------------------------------- */ + +void BondHarmonic::write_restart(FILE *fp) +{ + fwrite(&k[1],sizeof(double),atom->nbondtypes,fp); + fwrite(&r0[1],sizeof(double),atom->nbondtypes,fp); +} + +/* ---------------------------------------------------------------------- + proc 0 reads coeffs from restart file, bcasts them +------------------------------------------------------------------------- */ + +void BondHarmonic::read_restart(FILE *fp) +{ + allocate(); + + if (comm->me == 0) { + fread(&k[1],sizeof(double),atom->nbondtypes,fp); + fread(&r0[1],sizeof(double),atom->nbondtypes,fp); + } + MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world); + MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world); + + for (int i = 1; i <= atom->nbondtypes; i++) setflag[i] = 1; +} + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void BondHarmonic::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->nbondtypes; i++) + fprintf(fp,"%d %g %g\n",i,k[i],r0[i]); +} + +/* ---------------------------------------------------------------------- */ + +double BondHarmonic::single(int type, double rsq, int i, int j, + double &fforce) +{ + double r = sqrt(rsq); + double dr = r - r0[type]; + double rk = k[type] * dr; + fforce = 0; + if (r > 0.0) fforce = -2.0*rk/r; + return rk*dr; +} + +/* ---------------------------------------------------------------------- + Return ptr to internal members upon request. +------------------------------------------------------------------------ */ +void *BondHarmonic::extract( char *str, int &dim ) +{ + dim = 1; + if( strcmp(str,"kappa") == 0 ) return (void*) k; + if( strcmp(str,"r0") == 0 ) return (void*) r0; + return NULL; +} + + -- GitLab From f19f5582209c34363c3072b08bafc9de3ac0205b Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Mon, 10 Apr 2017 10:06:03 -0400 Subject: [PATCH 019/593] Removed changed bond_harmonic from wrong position. --- src/MOLECULE/bond_harmonic.cpp | 19 ++- src/MOLECULE/bond_harmonic.h | 1 + src/bond_harmonic.cpp | 215 --------------------------------- 3 files changed, 19 insertions(+), 216 deletions(-) delete mode 100644 src/bond_harmonic.cpp diff --git a/src/MOLECULE/bond_harmonic.cpp b/src/MOLECULE/bond_harmonic.cpp index f164a51de4..0763d7d3e2 100644 --- a/src/MOLECULE/bond_harmonic.cpp +++ b/src/MOLECULE/bond_harmonic.cpp @@ -13,6 +13,7 @@ #include #include +#include #include "bond_harmonic.h" #include "atom.h" #include "neighbor.h" @@ -26,7 +27,10 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -BondHarmonic::BondHarmonic(LAMMPS *lmp) : Bond(lmp) {} +BondHarmonic::BondHarmonic(LAMMPS *lmp) : Bond(lmp) +{ + reinitflag = 1; +} /* ---------------------------------------------------------------------- */ @@ -196,3 +200,16 @@ double BondHarmonic::single(int type, double rsq, int i, int j, if (r > 0.0) fforce = -2.0*rk/r; return rk*dr; } + +/* ---------------------------------------------------------------------- + Return ptr to internal members upon request. +------------------------------------------------------------------------ */ +void *BondHarmonic::extract( char *str, int &dim ) +{ + dim = 1; + if( strcmp(str,"kappa")==0) return (void*) k; + if( strcmp(str,"r0")==0) return (void*) r0; + return NULL; +} + + diff --git a/src/MOLECULE/bond_harmonic.h b/src/MOLECULE/bond_harmonic.h index 7c7125b04c..a0fd24577a 100644 --- a/src/MOLECULE/bond_harmonic.h +++ b/src/MOLECULE/bond_harmonic.h @@ -36,6 +36,7 @@ class BondHarmonic : public Bond { void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); + virtual void *extract(char *, int &); protected: double *k,*r0; diff --git a/src/bond_harmonic.cpp b/src/bond_harmonic.cpp deleted file mode 100644 index f0b6d96cc8..0000000000 --- a/src/bond_harmonic.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#include -#include -#include -#include "bond_harmonic.h" -#include "atom.h" -#include "neighbor.h" -#include "domain.h" -#include "comm.h" -#include "force.h" -#include "memory.h" -#include "error.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -BondHarmonic::BondHarmonic(LAMMPS *lmp) : Bond(lmp) -{ - reinitflag = 1; -} - -/* ---------------------------------------------------------------------- */ - -BondHarmonic::~BondHarmonic() -{ - if (allocated && !copymode) { - memory->destroy(setflag); - memory->destroy(k); - memory->destroy(r0); - } -} - -/* ---------------------------------------------------------------------- */ - -void BondHarmonic::compute(int eflag, int vflag) -{ - int i1,i2,n,type; - double delx,dely,delz,ebond,fbond; - double rsq,r,dr,rk; - - ebond = 0.0; - if (eflag || vflag) ev_setup(eflag,vflag); - else evflag = 0; - - double **x = atom->x; - double **f = atom->f; - int **bondlist = neighbor->bondlist; - int nbondlist = neighbor->nbondlist; - int nlocal = atom->nlocal; - int newton_bond = force->newton_bond; - - for (n = 0; n < nbondlist; n++) { - i1 = bondlist[n][0]; - i2 = bondlist[n][1]; - type = bondlist[n][2]; - - delx = x[i1][0] - x[i2][0]; - dely = x[i1][1] - x[i2][1]; - delz = x[i1][2] - x[i2][2]; - - rsq = delx*delx + dely*dely + delz*delz; - r = sqrt(rsq); - dr = r - r0[type]; - rk = k[type] * dr; - - // force & energy - - if (r > 0.0) fbond = -2.0*rk/r; - else fbond = 0.0; - - if (eflag) ebond = rk*dr; - - // apply force to each of 2 atoms - - if (newton_bond || i1 < nlocal) { - f[i1][0] += delx*fbond; - f[i1][1] += dely*fbond; - f[i1][2] += delz*fbond; - } - - if (newton_bond || i2 < nlocal) { - f[i2][0] -= delx*fbond; - f[i2][1] -= dely*fbond; - f[i2][2] -= delz*fbond; - } - - if (evflag) ev_tally(i1,i2,nlocal,newton_bond,ebond,fbond,delx,dely,delz); - } -} - -/* ---------------------------------------------------------------------- */ - -void BondHarmonic::allocate() -{ - allocated = 1; - int n = atom->nbondtypes; - - memory->create(k,n+1,"bond:k"); - memory->create(r0,n+1,"bond:r0"); - - memory->create(setflag,n+1,"bond:setflag"); - for (int i = 1; i <= n; i++) setflag[i] = 0; -} - -/* ---------------------------------------------------------------------- - set coeffs for one or more types -------------------------------------------------------------------------- */ - -void BondHarmonic::coeff(int narg, char **arg) -{ - if (narg != 3) error->all(FLERR,"Incorrect args for bond coefficients"); - if (!allocated) allocate(); - - int ilo,ihi; - force->bounds(FLERR,arg[0],atom->nbondtypes,ilo,ihi); - - double k_one = force->numeric(FLERR,arg[1]); - double r0_one = force->numeric(FLERR,arg[2]); - - int count = 0; - for (int i = ilo; i <= ihi; i++) { - k[i] = k_one; - r0[i] = r0_one; - setflag[i] = 1; - count++; - } - - if (count == 0) error->all(FLERR,"Incorrect args for bond coefficients"); -} - -/* ---------------------------------------------------------------------- - return an equilbrium bond length -------------------------------------------------------------------------- */ - -double BondHarmonic::equilibrium_distance(int i) -{ - return r0[i]; -} - -/* ---------------------------------------------------------------------- - proc 0 writes out coeffs to restart file -------------------------------------------------------------------------- */ - -void BondHarmonic::write_restart(FILE *fp) -{ - fwrite(&k[1],sizeof(double),atom->nbondtypes,fp); - fwrite(&r0[1],sizeof(double),atom->nbondtypes,fp); -} - -/* ---------------------------------------------------------------------- - proc 0 reads coeffs from restart file, bcasts them -------------------------------------------------------------------------- */ - -void BondHarmonic::read_restart(FILE *fp) -{ - allocate(); - - if (comm->me == 0) { - fread(&k[1],sizeof(double),atom->nbondtypes,fp); - fread(&r0[1],sizeof(double),atom->nbondtypes,fp); - } - MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world); - MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world); - - for (int i = 1; i <= atom->nbondtypes; i++) setflag[i] = 1; -} - -/* ---------------------------------------------------------------------- - proc 0 writes to data file -------------------------------------------------------------------------- */ - -void BondHarmonic::write_data(FILE *fp) -{ - for (int i = 1; i <= atom->nbondtypes; i++) - fprintf(fp,"%d %g %g\n",i,k[i],r0[i]); -} - -/* ---------------------------------------------------------------------- */ - -double BondHarmonic::single(int type, double rsq, int i, int j, - double &fforce) -{ - double r = sqrt(rsq); - double dr = r - r0[type]; - double rk = k[type] * dr; - fforce = 0; - if (r > 0.0) fforce = -2.0*rk/r; - return rk*dr; -} - -/* ---------------------------------------------------------------------- - Return ptr to internal members upon request. ------------------------------------------------------------------------- */ -void *BondHarmonic::extract( char *str, int &dim ) -{ - dim = 1; - if( strcmp(str,"kappa") == 0 ) return (void*) k; - if( strcmp(str,"r0") == 0 ) return (void*) r0; - return NULL; -} - - -- GitLab From 8051b12ffc8cf2fc7d11163711db2850d909c27c Mon Sep 17 00:00:00 2001 From: ketankhare Date: Mon, 10 Apr 2017 18:39:37 -0400 Subject: [PATCH 020/593] Updated to 1.33 from 1.32 --- src/USER-MOLFILE/vmdplugin.h | 58 ++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/USER-MOLFILE/vmdplugin.h b/src/USER-MOLFILE/vmdplugin.h index 37299408fe..bbbc53c9bb 100644 --- a/src/USER-MOLFILE/vmdplugin.h +++ b/src/USER-MOLFILE/vmdplugin.h @@ -11,26 +11,26 @@ * * $RCSfile: vmdplugin.h,v $ * $Author: johns $ $Locker: $ $State: Exp $ - * $Revision: 1.32 $ $Date: 2009/02/24 05:12:35 $ + * $Revision: 1.33 $ $Date: 2015/10/29 05:10:54 $ * ***************************************************************************/ /** @file * This header must be included by every VMD plugin library. It defines the - * API for every plugin so that VMD can organize the plugins it finds. + * API for every plugin so that VMD can organize the plugins it finds. */ #ifndef VMD_PLUGIN_H #define VMD_PLUGIN_H -/* +/* * Preprocessor tricks to make it easier for us to redefine the names of * functions when building static plugins. */ #if !defined(VMDPLUGIN) -/** - * macro defining VMDPLUGIN if it hasn't already been set to the name of +/** + * macro defining VMDPLUGIN if it hasn't already been set to the name of * a static plugin that is being compiled. This is the catch-all case. */ #define VMDPLUGIN vmdplugin @@ -38,11 +38,11 @@ /** concatenation macro, joins args x and y together as a single string */ #define xcat(x, y) cat(x, y) /** concatenation macro, joins args x and y together as a single string */ -#define cat(x, y) x ## y +#define cat(x, y) x ## y /* - * macros to correctly define plugin function names depending on whether - * the plugin is being compiled for static linkage or dynamic loading. + * macros to correctly define plugin function names depending on whether + * the plugin is being compiled for static linkage or dynamic loading. * When compiled for static linkage, each plugin needs to have unique * function names for all of its entry points. When compiled for dynamic * loading, the plugins must name their entry points consistently so that @@ -59,13 +59,13 @@ /** "WIN32" is defined on both WIN32 and WIN64 platforms... */ -#if (defined(WIN32)) +#if (defined(WIN32)) #define WIN32_LEAN_AND_MEAN #include #if !defined(STATIC_PLUGIN) #if defined(VMDPLUGIN_EXPORTS) -/** +/** * Only define DllMain for plugins, not in VMD or in statically linked plugins * VMDPLUGIN_EXPORTS is only defined when compiling dynamically loaded plugins */ @@ -86,7 +86,7 @@ BOOL APIENTRY DllMain( HANDLE hModule, #endif /* ! STATIC_PLUGIN */ #else /** If we're not compiling on Windows, then this macro is defined empty */ -#define VMDPLUGIN_API +#define VMDPLUGIN_API #endif /** define plugin linkage correctly for both C and C++ based plugins */ @@ -96,13 +96,13 @@ BOOL APIENTRY DllMain( HANDLE hModule, #define VMDPLUGIN_EXTERN extern VMDPLUGIN_API #endif /* __cplusplus */ -/* - * Plugin API functions start here +/* + * Plugin API functions start here */ -/** - * Init routine: called the first time the library is loaded by the +/** + * Init routine: called the first time the library is loaded by the * application and before any other API functions are referenced. * Return 0 on success. */ @@ -110,15 +110,15 @@ VMDPLUGIN_EXTERN int VMDPLUGIN_init(void); /** * Macro for creating a struct header used in all plugin structures. - * - * This header should be placed at the top of every plugin API definition + * + * This header should be placed at the top of every plugin API definition * so that it can be treated as a subtype of the base plugin type. * * abiversion: Defines the ABI for the base plugin type (not for other plugins) * type: A string descriptor of the plugin type. * name: A name for the plugin. * author: A string identifier, possibly including newlines. - * Major and minor version. + * Major and minor version. * is_reentrant: Whether this library can be run concurrently with itself. */ #define vmdplugin_HEAD \ @@ -129,12 +129,12 @@ VMDPLUGIN_EXTERN int VMDPLUGIN_init(void); const char *author; \ int majorv; \ int minorv; \ - int is_reentrant; + int is_reentrant; -/** +/** * Typedef for generic plugin header, individual plugins can - * make their own structures as long as the header info remains - * the same as the generic plugin header, most easily done by + * make their own structures as long as the header info remains + * the same as the generic plugin header, most easily done by * using the vmdplugin_HEAD macro. */ typedef struct { @@ -144,7 +144,7 @@ typedef struct { /** * Use this macro to initialize the abiversion member of each plugin */ -#define vmdplugin_ABIVERSION 16 +#define vmdplugin_ABIVERSION 17 /*@{*/ /** Use this macro to indicate a plugin's thread-safety at registration time */ @@ -158,7 +158,7 @@ typedef struct { #define VMDPLUGIN_ERROR -1 /*@}*/ -/** +/** * Function pointer typedef for register callback functions */ typedef int (*vmdplugin_register_cb)(void *, vmdplugin_t *); @@ -175,16 +175,16 @@ typedef int (*vmdplugin_register_cb)(void *, vmdplugin_t *); VMDPLUGIN_EXTERN int VMDPLUGIN_register(void *, vmdplugin_register_cb); /** - * Allow the library to register Tcl extensions. + * Allow the library to register Tcl extensions. * This API is optional; if found by dlopen, it will be called after first - * calling init and register. + * calling init and register. */ -VMDPLUGIN_EXTERN int VMDPLUGIN_register_tcl(void *, void *tcl_interp, +VMDPLUGIN_EXTERN int VMDPLUGIN_register_tcl(void *, void *tcl_interp, vmdplugin_register_cb); /** - * The Fini method is called when the application will no longer use - * any plugins in the library. + * The Fini method is called when the application will no longer use + * any plugins in the library. */ VMDPLUGIN_EXTERN int VMDPLUGIN_fini(void); -- GitLab From b9177fd6dccf9d81a7f9a37148852f42d8a76ed1 Mon Sep 17 00:00:00 2001 From: ketankhare Date: Mon, 10 Apr 2017 18:40:30 -0400 Subject: [PATCH 021/593] Updated to 1.108 from 1.103 --- src/USER-MOLFILE/molfile_plugin.h | 341 ++++++++++++++++-------------- 1 file changed, 177 insertions(+), 164 deletions(-) diff --git a/src/USER-MOLFILE/molfile_plugin.h b/src/USER-MOLFILE/molfile_plugin.h index 7a2d7ca42e..714b06539f 100644 --- a/src/USER-MOLFILE/molfile_plugin.h +++ b/src/USER-MOLFILE/molfile_plugin.h @@ -11,14 +11,14 @@ * * $RCSfile: molfile_plugin.h,v $ * $Author: johns $ $Locker: $ $State: Exp $ - * $Revision: 1.103 $ $Date: 2011/03/05 03:56:11 $ + * $Revision: 1.108 $ $Date: 2016/02/26 03:17:01 $ * ***************************************************************************/ -/** @file +/** @file * API for C extensions to define a way to load structure, coordinate, - * trajectory, and volumetric data files - */ + * trajectory, and volumetric data files + */ #ifndef MOL_FILE_PLUGIN_H #define MOL_FILE_PLUGIN_H @@ -60,6 +60,21 @@ typedef ssize_t molfile_ssize_t; /**< for frame counts */ #define MOLFILE_MAXWAVEPERTS 25 /**< maximum number of wavefunctions * per timestep */ +/** + * Hard-coded direct-I/O page size constants for use by both VMD + * and the plugins that want to use direct, unbuffered I/O for high + * performance with SSDs etc. We use two constants to define the + * range of hardware page sizes that we can support, so that we can + * add support for larger 8KB or 16KB page sizes in the future + * as they become more prevalent in high-end storage systems. + * + * At present, VMD uses a hard-coded 4KB page size to reduce memory + * fragmentation, but these constants will make it easier to enable the + * use of larger page sizes in the future if it becomes necessary. + */ +#define MOLFILE_DIRECTIO_MIN_BLOCK_SIZE 4096 +#define MOLFILE_DIRECTIO_MAX_BLOCK_SIZE 4096 + /** * File level comments, origin information, and annotations. @@ -74,16 +89,16 @@ typedef struct { } molfile_metadata_t; -/* - * Struct for specifying atoms in a molecular structure. The first - * six components are required, the rest are optional and their presence is +/* + * Struct for specifying atoms in a molecular structure. The first + * six components are required, the rest are optional and their presence is * indicating by setting the corresponding bit in optsflag. When omitted, - * the application (for read_structure) or plugin (for write_structure) - * must be able to supply default values if the missing parameters are + * the application (for read_structure) or plugin (for write_structure) + * must be able to supply default values if the missing parameters are * part of its internal data structure. * Note that it is not possible to specify coordinates with this structure. - * This is intentional; all coordinate I/O is done with the read_timestep and - * write_timestep functions. + * This is intentional; all coordinate I/O is done with the read_timestep and + * write_timestep functions. */ /** @@ -96,8 +111,17 @@ typedef struct { char resname[8]; /**< required residue name string */ int resid; /**< required integer residue ID */ char segid[8]; /**< required segment name string, or "" */ +#if 0 && vmdplugin_ABIVERSION > 17 + /* The new PDB file formats allows for much larger structures, */ + /* which can therefore require longer chain ID strings. The */ + /* new PDBx/mmCIF file formats do not have length limits on */ + /* fields, so PDB chains could be arbitrarily long strings */ + /* in such files. At present, we know we need at least 3-char */ + /* chains for existing PDBx/mmCIF files. */ + char chain[4]; /**< required chain name, or "" */ +#else char chain[2]; /**< required chain name, or "" */ - +#endif /* rest are optional; use optflags to specify what's present */ char altloc[2]; /**< optional PDB alternate location code */ char insertion[2]; /**< optional PDB insertion code */ @@ -107,6 +131,23 @@ typedef struct { float charge; /**< optional charge value */ float radius; /**< optional radius value */ int atomicnumber; /**< optional element atomic number */ + +#if 0 + char complex[16]; + char assembly[16]; + int qmregion; + int qmregionlink; + int qmlayer; + int qmlayerlink; + int qmfrag; + int qmfraglink; + string qmecp; + int qmadapt; + int qmect; /**< boolean */ + int qmparam; + int autoparam; +#endif + #if defined(DESRES_CTNUMBER) int ctnumber; /**< mae ct block, 0-based, including meta */ #endif @@ -128,7 +169,7 @@ typedef struct { #define MOLFILE_CTNUMBER 0x0200 /**< ctnumber provided */ #endif #define MOLFILE_BADOPTIONS 0xFFFFFFFF /**< Detect badly behaved plugins */ - + /*@}*/ /*@{*/ @@ -140,38 +181,32 @@ typedef struct { #define MOLFILE_QMTS_SCFITER 0x0002 /*@}*/ -#if vmdplugin_ABIVERSION > 10 typedef struct molfile_timestep_metadata { unsigned int count; /**< total # timesteps; -1 if unknown */ unsigned int avg_bytes_per_timestep; /** bytes per timestep */ int has_velocities; /**< if timesteps have velocities */ } molfile_timestep_metadata_t; -#endif /* * Per-timestep atom coordinates and periodic cell information - */ + */ typedef struct { float *coords; /**< coordinates of all atoms, arranged xyzxyzxyz */ -#if vmdplugin_ABIVERSION > 10 float *velocities; /**< space for velocities of all atoms; same layout */ /**< NULL unless has_velocities is set */ -#endif - /*@{*/ + /*@{*/ /** * Unit cell specification of the form A, B, C, alpha, beta, gamma. * notes: A, B, C are side lengths of the unit cell * alpha = angle between b and c * beta = angle between a and c * gamma = angle between a and b - */ - float A, B, C, alpha, beta, gamma; - /*@}*/ + */ + float A, B, C, alpha, beta, gamma; + /*@}*/ -#if vmdplugin_ABIVERSION > 10 double physical_time; /**< physical time point associated with this frame */ -#endif #if defined(DESRES_READ_TIMESTEP2) /* HACK to support generic trajectory information */ @@ -188,7 +223,7 @@ typedef struct { /** * Metadata for volumetric datasets, read initially and used for subsequent - * memory allocations and file loading. + * memory allocations and file loading. */ typedef struct { char dataname[256]; /**< name of volumetric data set */ @@ -198,29 +233,48 @@ typedef struct { * x/y/z axis: * These the three cell sides, providing both direction and length * (not unit vectors) for the x, y, and z axes. In the simplest - * case, these would be <0,size,0> and <0,0,size) for + * case, these would be <0,size,0> and <0,0,size) for * an orthogonal cubic volume set. For other cell shapes these * axes can be oriented non-orthogonally, and the parallelpiped * may have different side lengths, not just a cube/rhombus. */ - float xaxis[3]; /**< direction (and length) for X axis */ + float xaxis[3]; /**< direction (and length) for X axis */ float yaxis[3]; /**< direction (and length) for Y axis */ float zaxis[3]; /**< direction (and length) for Z axis */ /* - * x/y/z size: + * x/y/z size: * Number of grid cells along each axis. This is _not_ the * physical size of the box, this is the number of voxels in each - * direction, independent of the shape of the volume set. + * direction, independent of the shape of the volume set. */ - int xsize; /**< number of grid cells along the X axis */ - int ysize; /**< number of grid cells along the Y axis */ - int zsize; /**< number of grid cells along the Z axis */ - - int has_color; /**< flag indicating presence of voxel color data */ + int xsize; /**< number of grid cells along the X axis */ + int ysize; /**< number of grid cells along the Y axis */ + int zsize; /**< number of grid cells along the Z axis */ + +#if vmdplugin_ABIVERSION > 16 + int has_scalar; /**< flag indicating presence of scalar volume */ + int has_gradient; /**< flag indicating presence of vector volume */ + int has_variance; /**< flag indicating presence of variance map */ +#endif + int has_color; /**< flag indicating presence of voxel color data */ } molfile_volumetric_t; +#if vmdplugin_ABIVERSION > 16 +/** + * Volumetric dataset read/write structure with both flag/parameter sets + * and VMD-allocated pointers for fields to be used by the plugin. + */ +typedef struct { + int setidx; /**< volumetric dataset index to load/save */ + float *scalar; /**< scalar density/potential field data */ + float *gradient; /**< gradient vector field */ + float *variance; /**< variance map indicating signal/noise */ + float *rgb3f; /**< RGB floating point color texture map */ + unsigned char *rgb3u; /**< RGB unsigned byte color texture map */ +} molfile_volumetric_readwrite_t; +#endif /************************************************************** @@ -231,9 +285,6 @@ typedef struct { ************************************************************** **************************************************************/ -#if vmdplugin_ABIVERSION > 9 - - /* macros for the convergence status of a QM calculation. */ #define MOLFILE_QMSTATUS_UNKNOWN -1 /* don't know yet */ #define MOLFILE_QMSTATUS_OPT_CONV 0 /* optimization converged */ @@ -297,10 +348,10 @@ typedef struct { /** * QM run info. Parameters that stay unchanged during a single file. - */ + */ typedef struct { int nproc; /**< number of processors used. */ - int memory; /**< amount of memory used in Mbyte. */ + int memory; /**< amount of memory used in Mbyte. */ int runtype; /**< flag indicating the calculation method. */ int scftype; /**< SCF type: RHF, UHF, ROHF, GVB or MCSCF wfn. */ int status; /**< indicates wether SCF and geometry optimization @@ -333,9 +384,9 @@ typedef struct { * array size = 2*num_basis_funcs * The basis must NOT be normalized. */ int *atomic_number; /**< atomic numbers (chem. element) of atoms in basis set */ - int *angular_momentum; /**< 3 ints per wave function coefficient do describe the + int *angular_momentum; /**< 3 ints per wave function coefficient do describe the * cartesian components of the angular momentum. - * E.g. S={0 0 0}, Px={1 0 0}, Dxy={1 1 0}, or Fyyz={0 2 1}. + * E.g. S={0 0 0}, Px={1 0 0}, Dxy={1 1 0}, or Fyyz={0 2 1}. */ int *shell_types; /**< type for each shell in basis */ } molfile_qm_basis_t; @@ -409,9 +460,9 @@ enum molfile_qm_wavefunc_type { MOLFILE_WAVE_MCSCFNAT, MOLFILE_WAVE_MCSCFOPT, MOLFILE_WAVE_CINATUR, MOLFILE_WAVE_PIPEK, MOLFILE_WAVE_BOYS, MOLFILE_WAVE_RUEDEN, - MOLFILE_WAVE_NAO, MOLFILE_WAVE_PNAO, MOLFILE_WAVE_NHO, - MOLFILE_WAVE_PNHO, MOLFILE_WAVE_NBO, MOLFILE_WAVE_PNBO, - MOLFILE_WAVE_PNLMO, MOLFILE_WAVE_NLMO, MOLFILE_WAVE_MOAO, + MOLFILE_WAVE_NAO, MOLFILE_WAVE_PNAO, MOLFILE_WAVE_NHO, + MOLFILE_WAVE_PNHO, MOLFILE_WAVE_NBO, MOLFILE_WAVE_PNBO, + MOLFILE_WAVE_PNLMO, MOLFILE_WAVE_NLMO, MOLFILE_WAVE_MOAO, MOLFILE_WAVE_NATO, MOLFILE_WAVE_UNKNOWN }; @@ -442,7 +493,7 @@ typedef struct molfile_qm_timestep_metadata { int has_orben_per_wavef[MOLFILE_MAXWAVEPERTS]; /**< orbital energy flags */ int has_occup_per_wavef[MOLFILE_MAXWAVEPERTS]; /**< orbital occupancy flags */ int num_wavef ; /**< # wavefunctions in this ts */ - int wavef_size; /**< size of one wavefunction + int wavef_size; /**< size of one wavefunction * (# of gaussian basis fctns) */ int num_charge_sets; /**< # of charge values per atom */ } molfile_qm_timestep_metadata_t; @@ -485,8 +536,6 @@ typedef struct { } molfile_qm_timestep_t; -#endif - /************************************************************** **************************************************************/ @@ -498,14 +547,14 @@ typedef struct { * from graphics file reader plugins. */ enum molfile_graphics_type { - MOLFILE_POINT, MOLFILE_TRIANGLE, MOLFILE_TRINORM, MOLFILE_NORMS, - MOLFILE_LINE, MOLFILE_CYLINDER, MOLFILE_CAPCYL, MOLFILE_CONE, + MOLFILE_POINT, MOLFILE_TRIANGLE, MOLFILE_TRINORM, MOLFILE_NORMS, + MOLFILE_LINE, MOLFILE_CYLINDER, MOLFILE_CAPCYL, MOLFILE_CONE, MOLFILE_SPHERE, MOLFILE_TEXT, MOLFILE_COLOR, MOLFILE_TRICOLOR }; /** * Individual graphics object/element data - */ + */ typedef struct { int type; /* One of molfile_graphics_type */ int style; /* A general style parameter */ @@ -521,13 +570,13 @@ typedef struct { type data style size ---- ---- ----- ---- point x, y, z pixel size -triangle x1,y1,z1,x2,y2,z2,x3,y3,z3 -trinorm x1,y1,z1,x2,y2,z2,x3,y3,z3 +triangle x1,y1,z1,x2,y2,z2,x3,y3,z3 +trinorm x1,y1,z1,x2,y2,z2,x3,y3,z3 the next array element must be NORMS -tricolor x1,y1,z1,x2,y2,z2,x3,y3,z3 +tricolor x1,y1,z1,x2,y2,z2,x3,y3,z3 the next array elements must be NORMS the following element must be COLOR, with three RGB triples -norms x1,y1,z1,x2,y2,z2,x3,y3,z3 +norms x1,y1,z1,x2,y2,z2,x3,y3,z3 line x1,y1,z1,x2,y2,z2 0=solid pixel width 1=stippled cylinder x1,y1,z1,x2,y2,z2 resolution radius @@ -541,41 +590,41 @@ color r, g, b /** * Main file reader API. Any function in this struct may be NULL * if not implemented by the plugin; the application checks this to determine - * what functionality is present in the plugin. - */ + * what functionality is present in the plugin. + */ typedef struct { /** - * Required header + * Required header */ vmdplugin_HEAD /** - * Filename extension for this file type. May be NULL if no filename + * Filename extension for this file type. May be NULL if no filename * extension exists and/or is known. For file types that match several * common extensions, list them in a comma separated list such as: * "pdb,ent,foo,bar,baz,ban" * The comma separated list will be expanded when filename extension matching * is performed. If multiple plugins solicit the same filename extensions, - * the one that lists the extension earliest in its list is selected. In the + * the one that lists the extension earliest in its list is selected. In the * case of a "tie", the first one tried/checked "wins". */ const char *filename_extension; /** * Try to open the file for reading. Return an opaque handle, or NULL on - * failure. Set the number of atoms; if the number of atoms cannot be - * determined, set natoms to MOLFILE_NUMATOMS_UNKNOWN. + * failure. Set the number of atoms; if the number of atoms cannot be + * determined, set natoms to MOLFILE_NUMATOMS_UNKNOWN. * Filetype should be the name under which this plugin was registered; * this is provided so that plugins can provide the same function pointer * to handle multiple file types. */ - void *(* open_file_read)(const char *filepath, const char *filetype, + void *(* open_file_read)(const char *filepath, const char *filetype, int *natoms); - + /** * Read molecular structure from the given file handle. atoms is allocated * by the caller and points to space for natoms. - * On success, place atom information in the passed-in pointer. + * On success, place atom information in the passed-in pointer. * optflags specifies which optional fields in the atoms will be set by * the plugin. */ @@ -587,15 +636,15 @@ typedef struct { * Each unique bond should be specified only once, so file formats that list * bonds twice will need post-processing before the results are returned to * the caller. - * If the plugin provides bond information, but the file loaded doesn't + * If the plugin provides bond information, but the file loaded doesn't * actually contain any bond info, the nbonds parameter should be * set to 0 and from/to should be set to NULL to indicate that no bond * information was actually present, and automatic bond search should be - * performed. + * performed. * * If the plugin provides bond order information, the bondorder array * will contain the bond order for each from/to pair. If not, the bondorder - * pointer should be set to NULL, in which case the caller will provide a + * pointer should be set to NULL, in which case the caller will provide a * default bond order value of 1.0. * * If the plugin provides bond type information, the bondtype array @@ -606,27 +655,23 @@ typedef struct { * and consistency checking. * * These arrays must be freed by the plugin in the close_file_read function. - * This function can be called only after read_structure(). - * Return MOLFILE_SUCCESS if no errors occur. + * This function can be called only after read_structure(). + * Return MOLFILE_SUCCESS if no errors occur. */ -#if vmdplugin_ABIVERSION > 14 - int (*read_bonds)(void *, int *nbonds, int **from, int **to, float **bondorder, + int (*read_bonds)(void *, int *nbonds, int **from, int **to, float **bondorder, int **bondtype, int *nbondtypes, char ***bondtypename); -#else - int (*read_bonds)(void *, int *nbonds, int **from, int **to, float **bondorder); -#endif /** - * XXX this function will be augmented and possibly superceded by a + * XXX this function will be augmented and possibly superceded by a * new QM-capable version named read_timestep(), when finished. * - * Read the next timestep from the file. Return MOLFILE_SUCCESS, or - * MOLFILE_EOF on EOF. If the molfile_timestep_t argument is NULL, then - * the frame should be skipped. Otherwise, the application must prepare - * molfile_timestep_t by allocating space in coords for the corresponding - * number of coordinates. - * The natoms parameter exists because some coordinate file formats - * (like CRD) cannot determine for themselves how many atoms are in a + * Read the next timestep from the file. Return MOLFILE_SUCCESS, or + * MOLFILE_EOF on EOF. If the molfile_timestep_t argument is NULL, then + * the frame should be skipped. Otherwise, the application must prepare + * molfile_timestep_t by allocating space in coords for the corresponding + * number of coordinates. + * The natoms parameter exists because some coordinate file formats + * (like CRD) cannot determine for themselves how many atoms are in a * timestep; the app must therefore obtain this information elsewhere * and provide it to the plugin. */ @@ -636,16 +681,16 @@ typedef struct { * Close the file and release all data. The handle cannot be reused. */ void (* close_file_read)(void *); - + /** * Open a coordinate file for writing using the given header information. * Return an opaque handle, or NULL on failure. The application must - * specify the number of atoms to be written. + * specify the number of atoms to be written. * filetype should be the name under which this plugin was registered. */ - void *(* open_file_write)(const char *filepath, const char *filetype, + void *(* open_file_write)(const char *filepath, const char *filetype, int natoms); - + /** * Write structure information. Return success. */ @@ -653,12 +698,12 @@ typedef struct { /** * Write a timestep to the coordinate file. Return MOLFILE_SUCCESS if no - * errors occur. If the file contains structure information in each - * timestep (like a multi-entry PDB), it will have to cache the information + * errors occur. If the file contains structure information in each + * timestep (like a multi-entry PDB), it will have to cache the information * from the initial calls from write_structure. */ int (* write_timestep)(void *, const molfile_timestep_t *); - + /** * Close the file and release all data. The handle cannot be reused. */ @@ -671,24 +716,27 @@ typedef struct { * the plugin and should be freed by close_file_read(). The application * may call this function any number of times. */ - int (* read_volumetric_metadata)(void *, int *nsets, + int (* read_volumetric_metadata)(void *, int *nsets, molfile_volumetric_t **metadata); - /** - * Read the specified volumetric data set into the space pointed to by - * datablock. The set is specified with a zero-based index. The space + /** + * Read the specified volumetric data set into the space pointed to by + * datablock. The set is specified with a zero-based index. The space * allocated for the datablock must be equal to - * xsize * ysize * zsize. No space will be allocated for colorblock + * xsize * ysize * zsize. No space will be allocated for colorblock * unless has_color is nonzero; in that case, colorblock should be * filled in with three RGB floats per datapoint. */ - int (* read_volumetric_data)(void *, int set, float *datablock, + int (* read_volumetric_data)(void *, int set, float *datablock, float *colorblock); +#if vmdplugin_ABIVERSION > 16 + int (* read_volumetric_data_ex)(void *, molfile_volumetric_readwrite_t *v); +#endif /** * Read raw graphics data stored in this file. Return the number of data - * elements and the data itself as an array of molfile_graphics_t in the - * pointer provided by the application. The plugin is responsible for + * elements and the data itself as an array of molfile_graphics_t in the + * pointer provided by the application. The plugin is responsible for * freeing the data when the file is closed. */ int (* read_rawgraphics)(void *, int *nelem, const molfile_graphics_t **data); @@ -698,19 +746,19 @@ typedef struct { * came from, what the accession code for the database is, textual remarks * and other notes pertaining to the contained structure/trajectory/volume * and anything else that's informative at the whole file level. - */ + */ int (* read_molecule_metadata)(void *, molfile_metadata_t **metadata); - + /** * Write bond information for the molecule. The arrays from * and to point to the (one-based) indices of bonded atoms. - * Each unique bond will be specified only once by the caller. - * File formats that list bonds twice will need to emit both the + * Each unique bond will be specified only once by the caller. + * File formats that list bonds twice will need to emit both the * from/to and to/from versions of each. - * This function must be called before write_structure(). + * This function must be called before write_structure(). * * Like the read_bonds() routine, the bondorder pointer is set to NULL - * if the caller doesn't have such information, in which case the + * if the caller doesn't have such information, in which case the * plugin should assume a bond order of 1.0 if the file format requires * bond order information. * @@ -721,76 +769,47 @@ typedef struct { * scheme is different from the index numbers. * if the pointers are set to NULL, then this information is not available. * bondtypenames can only be used of bondtypes is also given. - * Return MOLFILE_SUCCESS if no errors occur. + * Return MOLFILE_SUCCESS if no errors occur. */ -#if vmdplugin_ABIVERSION > 14 - int (* write_bonds)(void *, int nbonds, int *from, int *to, float *bondorder, + int (* write_bonds)(void *, int nbonds, int *from, int *to, float *bondorder, int *bondtype, int nbondtypes, char **bondtypename); -#else - int (* write_bonds)(void *, int nbonds, int *from, int *to, float *bondorder); -#endif -#if vmdplugin_ABIVERSION > 9 /** - * Write the specified volumetric data set into the space pointed to by + * Write the specified volumetric data set into the space pointed to by * datablock. The * allocated for the datablock must be equal to - * xsize * ysize * zsize. No space will be allocated for colorblock + * xsize * ysize * zsize. No space will be allocated for colorblock * unless has_color is nonzero; in that case, colorblock should be * filled in with three RGB floats per datapoint. */ int (* write_volumetric_data)(void *, molfile_volumetric_t *metadata, float *datablock, float *colorblock); +#if vmdplugin_ABIVERSION > 16 + int (* write_volumetric_data_ex)(void *, molfile_volumetric_t *metadata, + molfile_volumetric_readwrite_t *v); +#endif -#if vmdplugin_ABIVERSION > 15 - /** + /** * Read in Angles, Dihedrals, Impropers, and Cross Terms and optionally types. - * (Cross terms pertain to the CHARMM/NAMD CMAP feature) + * (Cross terms pertain to the CHARMM/NAMD CMAP feature) */ int (* read_angles)(void *handle, int *numangles, int **angles, int **angletypes, int *numangletypes, char ***angletypenames, int *numdihedrals, int **dihedrals, int **dihedraltypes, int *numdihedraltypes, - char ***dihedraltypenames, int *numimpropers, int **impropers, + char ***dihedraltypenames, int *numimpropers, int **impropers, int **impropertypes, int *numimpropertypes, char ***impropertypenames, int *numcterms, int **cterms, int *ctermcols, int *ctermrows); - /** + /** * Write out Angles, Dihedrals, Impropers, and Cross Terms - * (Cross terms pertain to the CHARMM/NAMD CMAP feature) + * (Cross terms pertain to the CHARMM/NAMD CMAP feature) */ int (* write_angles)(void *handle, int numangles, const int *angles, const int *angletypes, int numangletypes, const char **angletypenames, int numdihedrals, const int *dihedrals, const int *dihedraltypes, int numdihedraltypes, - const char **dihedraltypenames, int numimpropers, + const char **dihedraltypenames, int numimpropers, const int *impropers, const int *impropertypes, int numimpropertypes, - const char **impropertypenames, int numcterms, const int *cterms, + const char **impropertypenames, int numcterms, const int *cterms, int ctermcols, int ctermrows); -#else - /** - * Read in Angles, Dihedrals, Impropers, and Cross Terms - * Forces are in Kcal/mol - * (Cross terms pertain to the CHARMM/NAMD CMAP feature, forces are given - * as a 2-D matrix) - */ - int (* read_angles)(void *, - int *numangles, int **angles, double **angleforces, - int *numdihedrals, int **dihedrals, double **dihedralforces, - int *numimpropers, int **impropers, double **improperforces, - int *numcterms, int **cterms, - int *ctermcols, int *ctermrows, double **ctermforces); - - /** - * Write out Angles, Dihedrals, Impropers, and Cross Terms - * Forces are in Kcal/mol - * (Cross terms pertain to the CHARMM/NAMD CMAP feature, forces are given - * as a 2-D matrix) - */ - int (* write_angles)(void *, - int numangles, const int *angles, const double *angleforces, - int numdihedrals, const int *dihedrals, const double *dihedralforces, - int numimpropers, const int *impropers, const double *improperforces, - int numcterms, const int *cterms, - int ctermcols, int ctermrows, const double *ctermforces); -#endif /** @@ -798,7 +817,7 @@ typedef struct { * QM datasets in this file. * * The metadata are the sizes of the QM related data structure - * arrays that will be populated by the plugin when + * arrays that will be populated by the plugin when * read_qm_rundata() is called. Since the allocation of these * arrays is done by VMD rather than the plugin, VMD needs to * know the sizes beforehand. Consequently read_qm_metadata() @@ -811,7 +830,7 @@ typedef struct { * Read timestep independent QM data. * * Typical data that are defined only once per trajectory are - * general info about the calculation (such as the used method), + * general info about the calculation (such as the used method), * the basis set and normal modes. * The data structures to be populated must have been allocated * before by VMD according to sizes obtained through @@ -821,32 +840,27 @@ typedef struct { /** - * Read the next timestep from the file. Return MOLFILE_SUCCESS, or + * Read the next timestep from the file. Return MOLFILE_SUCCESS, or * MOLFILE_EOF on EOF. If the molfile_timestep_t or molfile_qm_metadata_t - * arguments are NULL, then the coordinate or qm data should be skipped. - * Otherwise, the application must prepare molfile_timestep_t and - * molfile_qm_timestep_t by allocating space for the corresponding + * arguments are NULL, then the coordinate or qm data should be skipped. + * Otherwise, the application must prepare molfile_timestep_t and + * molfile_qm_timestep_t by allocating space for the corresponding * number of coordinates, orbital wavefunction coefficients, etc. - * Since it is common for users to want to load only the final timestep + * Since it is common for users to want to load only the final timestep * data from a QM run, the application may provide any combination of - * valid, or NULL pointers for the molfile_timestep_t and + * valid, or NULL pointers for the molfile_timestep_t and * molfile_qm_timestep_t parameters, depending on what information the * user is interested in. - * The natoms and qm metadata parameters exist because some file formats - * cannot determine for themselves how many atoms etc are in a + * The natoms and qm metadata parameters exist because some file formats + * cannot determine for themselves how many atoms etc are in a * timestep; the app must therefore obtain this information elsewhere * and provide it to the plugin. */ int (* read_timestep)(void *, int natoms, molfile_timestep_t *, molfile_qm_metadata_t *, molfile_qm_timestep_t *); -#endif -#if vmdplugin_ABIVERSION > 10 int (* read_timestep_metadata)(void *, molfile_timestep_metadata_t *); -#endif -#if vmdplugin_ABIVERSION > 11 int (* read_qm_timestep_metadata)(void *, molfile_qm_timestep_metadata_t *); -#endif #if defined(DESRES_READ_TIMESTEP2) /** @@ -864,7 +878,6 @@ typedef struct { double * times ); #endif -#if vmdplugin_ABIVERSION > 13 /** * Console output, READ-ONLY function pointer. * Function pointer that plugins can use for printing to the host @@ -883,8 +896,8 @@ typedef struct { * application-provided services */ int (* cons_fputs)(const int, const char*); -#endif } molfile_plugin_t; #endif + -- GitLab From 3d3d1061d330398bd4f534f1b55ce7560146b91b Mon Sep 17 00:00:00 2001 From: ketankhare Date: Mon, 10 Apr 2017 18:41:36 -0400 Subject: [PATCH 022/593] README for updated header files from VMD 1.9.3 --- src/USER-MOLFILE/README | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/USER-MOLFILE/README b/src/USER-MOLFILE/README index f6defed6ae..9a2833365d 100644 --- a/src/USER-MOLFILE/README +++ b/src/USER-MOLFILE/README @@ -28,8 +28,7 @@ taken from. These header files can be found inside the VMD installation tree under: "plugins/include". For convenience, this package includes a set of header files that is -compatible with VMD 1.9 and 1.9.1 (the current version in June 2012) -and should be compilable with VMD versions back to about version 1.8.4 +compatible with VMD 1.9.3 (the current version in April 2017) The person who created this package is Axel Kohlmeyer at Temple U (akohlmey at gmail.com). Contact him directly if you have questions. -- GitLab From 84ea8a79e6b2917ded4a8af5cb24281524e234b0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 10 Apr 2017 20:43:24 -0400 Subject: [PATCH 023/593] correct link for dispersion parameter how-to and reformat --- doc/src/kspace_modify.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/src/kspace_modify.txt b/doc/src/kspace_modify.txt index 7a6c7191f0..b488df9627 100644 --- a/doc/src/kspace_modify.txt +++ b/doc/src/kspace_modify.txt @@ -290,9 +290,10 @@ to be specified using the {gewald/disp}, {mesh/disp}, {force/disp/real} or {force/disp/kspace} keywords, or the code will stop with an error message. When this option is set to {yes}, the error message will not appear and the simulation will start. -For a typical application, using the automatic parameter generation will provide -simulations that are either inaccurate or slow. Using this option is thus not -recommended. For guidelines on how to obtain good parameters, see the "How-To"_Section_howto.html#howto_23 discussion. +For a typical application, using the automatic parameter generation +will provide simulations that are either inaccurate or slow. Using this +option is thus not recommended. For guidelines on how to obtain good +parameters, see the "How-To"_Section_howto.html#howto_24 discussion. [Restrictions:] none -- GitLab From 49dd9449b875e17a951882d49c9351412f233b67 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 11 Apr 2017 08:35:09 -0600 Subject: [PATCH 024/593] fix gcmc updates from Aidan, trimming of output for replica commands --- doc/src/Section_start.txt | 3 +- doc/src/pair_buck.txt | 9 +- lib/voronoi/Install.py | 116 ++++++++++++++++++ lib/voronoi/README | 4 +- lib/voronoi/install.py | 163 ------------------------- src/MC/fix_gcmc.cpp | 32 ++++- src/MC/fix_gcmc.h | 13 +- src/Makefile | 71 +++++++++-- src/REPLICA/compute_event_displace.cpp | 58 ++++++++- src/REPLICA/compute_event_displace.h | 3 + src/finish.cpp | 40 +++--- src/integrate.h | 2 +- src/min.cpp | 10 +- src/min.h | 2 +- src/output.cpp | 15 +++ src/output.h | 1 + src/respa.cpp | 33 ++--- src/respa.h | 2 +- src/verlet.cpp | 15 ++- src/verlet.h | 2 +- src/write_restart.cpp | 3 + 21 files changed, 363 insertions(+), 234 deletions(-) create mode 100644 lib/voronoi/Install.py delete mode 100644 lib/voronoi/install.py diff --git a/doc/src/Section_start.txt b/doc/src/Section_start.txt index 47643569e6..5a5de9ac9b 100644 --- a/doc/src/Section_start.txt +++ b/doc/src/Section_start.txt @@ -455,8 +455,7 @@ and related PPPM operations are somewhat insensitive to floating point truncation errors and thus do not always need to be performed in double precision. Using the -DFFT_SINGLE setting trades off a little accuracy for reduced memory use and parallel communication costs for -transposing 3d FFT data. Note that single precision FFTs have only -been tested with the FFTW3, FFTW2, MKL, and KISS FFT options. +transposing 3d FFT data. Step 7 :h6 diff --git a/doc/src/pair_buck.txt b/doc/src/pair_buck.txt index 1b9f333376..49161404c3 100644 --- a/doc/src/pair_buck.txt +++ b/doc/src/pair_buck.txt @@ -75,7 +75,7 @@ Lennard-Jones 12/6) given by :c,image(Eqs/pair_buck.jpg) where rho is an ionic-pair dependent length parameter, and Rc is the -cutoff on both terms. +cutoff on both terms. The styles with {coul/cut} or {coul/long} or {coul/msm} add a Coulombic term as described for the "lj/cut"_pair_lj.html pair styles. @@ -120,6 +120,9 @@ cutoff (distance units) cutoff2 (distance units) :ul The second coefficient, rho, must be greater than zero. +The coefficients A, rho, and C can be written as analytical expressions +of epsilon and sigma, in analogy to the Lennard-Jones potential +"(Khrapak)"_#Khrapak. The latter 2 coefficients are optional. If not specified, the global A,C and Coulombic cutoffs are used. If only one cutoff is specified, @@ -127,7 +130,6 @@ it is used as the cutoff for both A,C and Coulombic interactions for this type pair. If both coefficients are specified, they are used as the A,C and Coulombic cutoffs for this type pair. You cannot specify 2 cutoffs for style {buck}, since it has no Coulombic terms. - For {buck/coul/long} only the LJ cutoff can be specified since a Coulombic cutoff cannot be specified for an individual I,J type pair. All type pairs use the same global Coulombic cutoff specified in the @@ -194,3 +196,6 @@ only enabled if LAMMPS was built with that package. See the "pair_coeff"_pair_coeff.html, "pair_style born"_pair_born.html [Default:] none + +:link(Khrapak) +[(Khrapak)] Khrapak, Chaudhuri, and Morfill, J Chem Phys, 134, 054120 (2011). diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py new file mode 100644 index 0000000000..8ae08917e5 --- /dev/null +++ b/lib/voronoi/Install.py @@ -0,0 +1,116 @@ +#!/usr/bin/env python + +# install.py tool to download, unpack, build, and link to the Voro++ library +# used to automate the steps described in the README file in this dir + +import sys,os,re,urllib,commands + +# help message + +help = """ +Syntax: install.py -v version -g gdir [gname] -b bdir -l ldir + specify one or more options, order does not matter + gdir,bdir,ldir can be paths relative to lib/latte, full paths, or contain ~ + -v = version of Voro++ to download and build + default = voro++-0.4.6 (current as of Jan 2015) + -g = grab (download) from math.lbl.gov/voro++ website + unpack tarfile in gdir to produce version dir (e.g. voro++-0.4.6) + if optional gname specified, rename version dir to gname within gdir + -b = build Voro++, bdir = Voro++ home directory + note that bdir must include the version suffix unless renamed + -l = create 2 softlinks (includelink,liblink) + in lib/voronoi to src dir of ldir = Voro++ home directory + note that ldir must include the version suffix unless renamed +""" + +# settings + +version = "voro++-0.4.6" +url = "http://math.lbl.gov/voro++/download/dir/%s.tar.gz" % version + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# expand to full path name +# process leading '~' or relative path + +def fullpath(path): + return os.path.abspath(os.path.expanduser(path)) + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +grabflag = 0 +buildflag = 0 +linkflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-v": + if iarg+2 > nargs: error() + version = args[iarg+1] + iarg += 2 + elif args[iarg] == "-g": + if iarg+2 > nargs: error() + grabflag = 1 + grabdir = args[iarg+1] + grabname = None + if iarg+2 < nargs and args[iarg+2][0] != '-': + grabname = args[iarg+2] + iarg += 1 + iarg += 2 + elif args[iarg] == "-b": + if iarg+2 > nargs: error() + buildflag = 1 + builddir = args[iarg+1] + iarg += 2 + elif args[iarg] == "-l": + if iarg+2 > nargs: error() + linkflag = 1 + linkdir = args[iarg+1] + iarg += 2 + else: error() + +# download and unpack Voro++ tarball + +if grabflag: + print "Downloading Voro++ ..." + grabdir = fullpath(grabdir) + if not os.path.isdir(grabdir): error("Grab directory does not exist") + urllib.urlretrieve(url,"%s/%s.tar.gz" % (grabdir,version)) + + print "Unpacking Voro++ tarball ..." + tardir = "%s/%s" % (grabdir,version) + if os.path.exists(tardir): commands.getoutput("rm -rf %s" % tardir) + cmd = "cd %s; tar zxvf %s.tar.gz" % (grabdir,version) + txt = commands.getoutput(cmd) + print tardir,grabdir,grabname + if grabname: os.rename(tardir,"%s/%s" % (grabdir,grabname)) + +# build Voro++ + +if buildflag: + print "Building Voro++ ..." + cmd = "cd %s; make" % builddir + txt = commands.getoutput(cmd) + print txt + +# create 2 links in lib/voronoi to Voro++ src dir + +if linkflag: + print "Creating links to Voro++ include and lib files" + if os.path.isfile("includelink") or os.path.islink("includelink"): + os.remove("includelink") + if os.path.isfile("liblink") or os.path.islink("liblink"): + os.remove("liblink") + cmd = "ln -s %s/src includelink" % linkdir + commands.getoutput(cmd) + cmd = "ln -s %s/src liblink" % linkdir + commands.getoutput(cmd) diff --git a/lib/voronoi/README b/lib/voronoi/README index 62acb30a5a..2507a9bae4 100644 --- a/lib/voronoi/README +++ b/lib/voronoi/README @@ -9,8 +9,8 @@ Laboratory. ----------------- You must perform the following steps yourself, or you can use the -install.py Python script to automate any or all steps of the process. -Type "python install.py" for instructions. +Install.py Python script to automate any or all steps of the process. +Type "python Install.py" for instructions. 1. Download Voro++ at http://math.lbl.gov/voro++/download either as a tarball or via SVN, and unpack the diff --git a/lib/voronoi/install.py b/lib/voronoi/install.py deleted file mode 100644 index 645d167564..0000000000 --- a/lib/voronoi/install.py +++ /dev/null @@ -1,163 +0,0 @@ -#!usr/local/python - -# install.py tool to download, unpack, build, and link to the Voro++ library -# used to automate the steps described in the README file in this dir - -import sys,os,re,urllib,commands - -help = """ -Syntax: install.py -d dir -v version -g -b -i installdir -l incdir libdir - specify one or more options, order does not matter - -d = dir to download tarball to, unpack tarball in, perform build in - dir will be created if it doesn't exist (only last level) - default = this dir - -v = version of Voro++ to download and work with - default = voro++-0.4.6 (current as of Jan 2015) - -g = download (grab) tarball from - http://math.lbl.gov/voro++/download/dir/version - -b = build Voro++ by invoking "make" in its home dir - no default - -i = install Voro++ by invoking "make install" in its home dir - installdir arg is optional: - if not specified, installs at PREFIX defined in config.mk file - if specified, will overwrite PREFIX and install there - if PREFIX starts with /usr, will invoke "sudo make install" - -l = create two links to incdir and libdir - incdir and libdir are optional (specify neither or both): - if specified, includelink and liblink are to those two dirs - these are dirs where Voro++ include files and lib file are - if not specified and no install, links are to Voro++ src dir - if not specified and install performed, - links are to include and lib dirs under PREFIX -""" - -def error(): - print help - sys.exit() - -# parse args - -args = sys.argv - -if len(args) == 1: error() - -dir = "." -version = "voro++-0.4.6" -grabflag = 0 -buildflag = 0 -installflag = 0 -linkflag = 0 - -iarg = 1 -while iarg < len(args): - if args[iarg] == "-d": - if iarg+2 > len(args): error() - dir = args[iarg+1] - iarg += 2 - elif args[iarg] == "-v": - if iarg+2 > len(args): error() - version = args[iarg+1] - iarg += 2 - elif args[iarg] == "-g": - grabflag = 1 - iarg += 1 - elif args[iarg] == "-b": - buildflag = 1 - iarg += 1 - elif args[iarg] == "-i": - installflag = 1 - if iarg+1 == len(args) or args[iarg+1][0] == '-': - installdir = "" - iarg += 1 - else: - if iarg+2 > len(args): error() - installdir = args[iarg+1] - iarg += 2 - elif args[iarg] == "-l": - linkflag = 1 - if iarg+1 == len(args) or args[iarg+1][0] == '-' or \ - iarg+2 == len(args) or args[iarg+2][0] == '-': - includedir = libdir = "" - iarg += 1 - else: - if iarg+3 > len(args): error() - includedir = args[iarg+1] - libdir = args[iarg+2] - iarg += 3 - else: error() - -dir = os.path.abspath(dir) -url = "http://math.lbl.gov/voro++/download/dir/%s.tar.gz" % version - -# create dir if does not exist - -if not os.path.isdir(dir): - if os.path.isfile(dir): - print "ERROR: Dir already exists as file" - sys.exit() - os.mkdir(dir) - if not os.path.isdir(dir): - print "ERROR: Unable to create dir" - sys.exit() - -# download and unpack tarball - -if grabflag: - print "Downloading Voro++ tarball ..." - urllib.urlretrieve(url,"%s/%s.tar.gz" % (dir,version)) - print "Unpacking Voro++ tarball ..." - cmd = "cd %s; tar zxvf %s.tar.gz" % (dir,version) - txt = commands.getoutput(cmd) - -# build Voro++ in its dir - -if buildflag: - print "Building Voro++ ..." - cmd = "cd %s/%s; make" % (dir,version) - txt = commands.getoutput(cmd) - print txt - -# install Voro++ -# if installdir set, overwrite PREFIX var in its config.mk file -# if PREFIX var starts with /usr, invoke sudo make install, else make install - -if installflag: - print "Installing Voro++ ..." - if installdir: - txt = open("%s/%s/config.mk" % (dir,version),'r').read() - txt = re.sub("PREFIX=.*?\n","PREFIX=%s\n" % installdir,txt) - open("%s/%s/config.mk" % (dir,version),'w').write(txt) - print "TXT:",txt - txt = open("%s/%s/config.mk" % (dir,version),'r').read() - var = re.findall("PREFIX=.*?\n",txt) - prefix = var[0].split('=')[1].strip() - if prefix.startswith("/usr"): - cmd = "cd %s/%s; sudo make install" % (dir,version) - else: - cmd = "cd %s/%s; make install" % (dir,version) - txt = commands.getoutput(cmd) - print txt - -# create links in this dir to Voro++ include and lib files - -if linkflag: - print "Creating links to Voro++ include and lib files" - if os.path.isfile("includelink") or os.path.islink("includelink"): - os.remove("includelink") - if os.path.isfile("liblink") or os.path.islink("liblink"): - os.remove("liblink") - if includedir: - cmd = "ln -s %s includelink" % includedir - txt = commands.getoutput(cmd) - cmd = "ln -s %s liblink" % linkdir - txt = commands.getoutput(cmd) - elif not installflag: - cmd = "ln -s %s/%s/src includelink" % (dir,version) - txt = commands.getoutput(cmd) - cmd = "ln -s %s/%s/src liblink" % (dir,version) - txt = commands.getoutput(cmd) - else: - cmd = "ln -s %s/include includelink" % prefix - txt = commands.getoutput(cmd) - cmd = "ln -s %s/lib liblink" % prefix - txt = commands.getoutput(cmd) diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 407c980729..cba5a0a176 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -60,7 +60,7 @@ using namespace MathConst; // this must be lower than MAXENERGYSIGNAL // by a large amount, so that it is still // less than total energy when negative -// energy changes are added to MAXENERGYSIGNAL +// energy contributions are added to MAXENERGYSIGNAL #define MAXENERGYTEST 1.0e50 @@ -701,6 +701,9 @@ void FixGCMC::pre_exchange() if (full_flag) { energy_stored = energy_full(); + if (overlap_flag && energy_stored > MAXENERGYTEST) + error->warning(FLERR,"Energy of old configuration in " + "fix gcmc is > MAXENERGYTEST."); if (mode == MOLECULE) { for (int i = 0; i < ncycles; i++) { @@ -778,6 +781,9 @@ void FixGCMC::attempt_atomic_translation() if (i >= 0) { double **x = atom->x; double energy_before = energy(i,ngcmc_type,-1,x[i]); + if (overlap_flag && energy_before > MAXENERGYTEST) + error->warning(FLERR,"Energy of old configuration in " + "fix gcmc is > MAXENERGYTEST."); double rsq = 1.1; double rx,ry,rz; rx = ry = rz = 0.0; @@ -998,6 +1004,9 @@ void FixGCMC::attempt_molecule_translation() if (translation_molecule == -1) return; double energy_before_sum = molecule_energy(translation_molecule); + if (overlap_flag && energy_before_sum > MAXENERGYTEST) + error->warning(FLERR,"Energy of old configuration in " + "fix gcmc is > MAXENERGYTEST."); double **x = atom->x; double rx,ry,rz; @@ -1095,6 +1104,9 @@ void FixGCMC::attempt_molecule_rotation() if (rotation_molecule == -1) return; double energy_before_sum = molecule_energy(rotation_molecule); + if (overlap_flag && energy_before_sum > MAXENERGYTEST) + error->warning(FLERR,"Energy of old configuration in " + "fix gcmc is > MAXENERGYTEST."); int nlocal = atom->nlocal; int *mask = atom->mask; @@ -2170,6 +2182,8 @@ double FixGCMC::molecule_energy(tagint gas_molecule_id) double FixGCMC::energy_full() { + int imolecule; + if (triclinic) domain->x2lamda(atom->nlocal); domain->pbc(); comm->exchange(); @@ -2185,14 +2199,15 @@ double FixGCMC::energy_full() // return signal value for energy if (overlap_flag) { + int overlaptestall; + int overlaptest = 0; double delx,dely,delz,rsq; double **x = atom->x; tagint *molecule = atom->molecule; int nall = atom->nlocal + atom->nghost; for (int i = 0; i < atom->nlocal; i++) { - int imolecule = molecule[i]; + if (mode == MOLECULE) imolecule = molecule[i]; for (int j = i+1; j < nall; j++) { - if (mode == MOLECULE) if (imolecule == molecule[j]) continue; @@ -2201,11 +2216,18 @@ double FixGCMC::energy_full() delz = x[i][2] - x[j][2]; rsq = delx*delx + dely*dely + delz*delz; - if (rsq < overlap_cutoff) return MAXENERGYSIGNAL; + if (rsq < overlap_cutoff) { + overlaptest = 1; + break; + } } + if (overlaptest) break; } + MPI_Allreduce(&overlaptest, &overlaptestall, 1, + MPI_INT, MPI_MAX, world); + if (overlaptestall) return MAXENERGYSIGNAL; } - + // clear forces so they don't accumulate over multiple // calls within fix gcmc timestep, e.g. for fix shake diff --git a/src/MC/fix_gcmc.h b/src/MC/fix_gcmc.h index 9b2184dda2..2519c00965 100644 --- a/src/MC/fix_gcmc.h +++ b/src/MC/fix_gcmc.h @@ -106,7 +106,7 @@ class FixGCMC : public Fix { double xlo,xhi,ylo,yhi,zlo,zhi; double region_xlo,region_xhi,region_ylo,region_yhi,region_zlo,region_zhi; double region_volume; - double energy_stored; + double energy_stored; // full energy of old/current configuration double *sublo,*subhi; int *local_gas_list; double **cutsq; @@ -214,9 +214,14 @@ W: Fix gcmc using full_energy option Fix gcmc has automatically turned on the full_energy option since it is required for systems like the one specified by the user. User input -included one or more of the following: kspace, triclinic, a hybrid -pair style, an eam pair style, or no "single" function for the pair -style. +included one or more of the following: kspace, a hybrid +pair style, an eam pair style, tail correction, +or no "single" function for the pair style. + +W: Energy of old configuration in fix gcmc is > MAXENERGYTEST. + +This probably means that a pair of atoms are closer than the +overlap cutoff distance for keyword overlap_cutoff. E: Invalid atom type in fix gcmc command diff --git a/src/Makefile b/src/Makefile index d7e990461f..e6821646d1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -43,6 +43,15 @@ endif # Package variables +# PACKAGE = standard packages +# PACKUSER = user packagse +# PACKLIB = all packages that require an additional lib +# PACKSYS = subset that reqiure a common system library +# PACKINT = subset that require an internal (provided) library +# PACKEXT = subset that require an external (downloaded) library +# PACKLIB = PACKSYS + PACKING + PACKEXT +# PACKSCRIPT = libs under lammps/lib that have an Install.py script + PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ granular kim kokkos kspace manybody mc meam misc molecule \ mpiio mscg opt peri poems \ @@ -55,10 +64,21 @@ PACKUSER = user-atc user-awpmd user-cg-cmm user-cgdna user-colvars \ user-quip user-reaxc user-smd user-smtbq user-sph user-tally \ user-vtk -PACKLIB = compress gpu kim kokkos meam mpiio mscg poems python reax voronoi \ - user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \ +PACKLIB = compress gpu kim kokkos meam mpiio mscg poems \ + python reax voronoi \ + user-atc user-awpmd user-colvars user-h5md user-molfile \ user-nc-dump user-qmmm user-quip user-smd user-vtk +PACKSYS = compress mpiio python + +PACKINT = gpu kokkos meam poems reax user-atc user-awpmd user-colvars + +PACKEXT = kim mscg voronoi \ + user-h5md user-molfile user-nc-dump user-qmmm user-quip \ + user-smd user-vtk + +PACKSCRIPT = voronoi + PACKALL = $(PACKAGE) $(PACKUSER) PACKAGEUC = $(shell echo $(PACKAGE) | tr a-z A-Z) @@ -66,6 +86,7 @@ PACKUSERUC = $(shell echo $(PACKUSER) | tr a-z A-Z) YESDIR = $(shell echo $(@:yes-%=%) | tr a-z A-Z) NODIR = $(shell echo $(@:no-%=%) | tr a-z A-Z) +LIBDIR = $(shell echo $(@:lib-%=%)) # List of all targets @@ -75,9 +96,9 @@ help: @echo 'make clean-machine delete object files for one machine' @echo 'make mpi-stubs build dummy MPI library in STUBS' @echo 'make install-python install LAMMPS wrapper in Python' - @echo 'make tar create lmp_src.tar.gz of src dir and packages' + @echo 'make tar create lmp_src.tar.gz for src dir and packages' @echo '' - @echo 'make package list available packages' + @echo 'make package list available packages and their dependencies' @echo 'make package-status (ps) status of all packages' @echo 'make yes-package install a single pgk in src dir' @echo 'make no-package remove a single pkg from src dir' @@ -87,11 +108,16 @@ help: @echo 'make no-standard (no-std) remove all standard pkgs' @echo 'make yes-user install all user pkgs' @echo 'make no-user remove all user pkgs' - @echo 'make no-lib remove all pkgs with external libs' + @echo 'make yes-lib install all pkgs with libs (incldued or ext)' + @echo 'make no-lib remove all pkgs with libs (included or ext)' + @echo 'make yes-ext install all pkgs with external libs' + @echo 'make no-ext remove all pkgs with external libs' @echo '' @echo 'make package-update (pu) replace src files with updated package files' @echo 'make package-overwrite replace package files with src files' @echo 'make package-diff (pd) diff src files against package files' + @echo '' + @echo 'make lib-package download/build/install a package library' @echo 'make purge purge obsolete copies of source files' @echo '' @echo 'make machine build LAMMPS for machine' @@ -221,6 +247,13 @@ package: @echo '' @echo 'User-contributed packages:' $(PACKUSER) @echo '' + @echo 'Packages that need system libraries:' $(PACKSYS) + @echo '' + @echo 'Packages that need provided libraries:' $(PACKINT) + @echo '' + @echo 'Packages that need external libraries:' $(PACKEXT) + @echo '' + @echo 'make package list available packages' @echo 'make package list available packages' @echo 'make package-status (ps) status of all packages' @echo 'make yes-package install a single pgk in src dir' @@ -229,13 +262,18 @@ package: @echo 'make no-all remove all pkgs from src dir' @echo 'make yes-standard (yes-std) install all standard pkgs' @echo 'make no-standard (no-srd) remove all standard pkgs' - @echo '' @echo 'make yes-user install all user pkgs' @echo 'make no-user remove all user pkgs' - @echo 'make no-lib remove all pkgs with external libs' + @echo 'make yes-lib install all pkgs with libs (included or ext)' + @echo 'make no-lib remove all pkgs with libs (included or ext)' + @echo 'make yes-ext install all pkgs with external libs' + @echo 'make no-ext remove all pkgs with external libs' + @echo '' @echo 'make package-update (pu) replace src files with package files' @echo 'make package-overwrite replace package files with src files' @echo 'make package-diff (pd) diff src files against package file' + @echo '' + @echo 'make lib-package download/build/install a package library' yes-all: @for p in $(PACKALL); do $(MAKE) yes-$$p; done @@ -255,9 +293,18 @@ yes-user: no-user: @for p in $(PACKUSER); do $(MAKE) no-$$p; done +yes-lib: + @for p in $(PACKLIB); do $(MAKE) yes-$$p; done + no-lib: @for p in $(PACKLIB); do $(MAKE) no-$$p; done +yes-ext: + @for p in $(PACKEXT); do $(MAKE) yes-$$p; done + +no-ext: + @for p in $(PACKEXT); do $(MAKE) no-$$p; done + yes-%: @if [ ! -e Makefile.package ]; \ then cp Makefile.package.empty Makefile.package; fi @@ -288,6 +335,16 @@ no-%: $(SHELL) Depend.sh $(NODIR) 0; \ fi; +# download/build/install a package library + +lib-%: + @if [ ! -e ../lib/$(LIBDIR)/Install.py ]; then \ + echo "Install script for lib $(@:lib-%=%) does not exist"; \ + else \ + echo "Installing lib for package $(@:lib-%=%)"; \ + cd ../lib/$(LIBDIR); python Install.py $(args); \ + fi; + # status = list src files that differ from package files # update = replace src files with newer package files # overwrite = overwrite package files with newer src files diff --git a/src/REPLICA/compute_event_displace.cpp b/src/REPLICA/compute_event_displace.cpp index 1431fc202e..330e2ebca3 100644 --- a/src/REPLICA/compute_event_displace.cpp +++ b/src/REPLICA/compute_event_displace.cpp @@ -84,7 +84,7 @@ void ComputeEventDisplace::init() } /* ---------------------------------------------------------------------- - return non-zero if an atom has moved > displace_dist since last event + return non-zero if any atom has moved > displace_dist since last event ------------------------------------------------------------------------- */ double ComputeEventDisplace::compute_scalar() @@ -145,6 +145,62 @@ double ComputeEventDisplace::compute_scalar() return scalar; } +/* ---------------------------------------------------------------------- + return count of atoms that have moved > displace_dist since last event +------------------------------------------------------------------------- */ + +int ComputeEventDisplace::all_events() +{ + invoked_scalar = update->ntimestep; + + if (id_event == NULL) return 0.0; + + int event = 0; + double **xevent = fix_event->array_atom; + + double **x = atom->x; + int *mask = atom->mask; + imageint *image = atom->image; + int nlocal = atom->nlocal; + + double *h = domain->h; + double xprd = domain->xprd; + double yprd = domain->yprd; + double zprd = domain->zprd; + int xbox,ybox,zbox; + double dx,dy,dz,rsq; + + if (triclinic == 0) { + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + xbox = (image[i] & IMGMASK) - IMGMAX; + ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; + zbox = (image[i] >> IMG2BITS) - IMGMAX; + dx = x[i][0] + xbox*xprd - xevent[i][0]; + dy = x[i][1] + ybox*yprd - xevent[i][1]; + dz = x[i][2] + zbox*zprd - xevent[i][2]; + rsq = dx*dx + dy*dy + dz*dz; + if (rsq >= displace_distsq) event++; + } + } else { + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + xbox = (image[i] & IMGMASK) - IMGMAX; + ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; + zbox = (image[i] >> IMG2BITS) - IMGMAX; + dx = x[i][0] + h[0]*xbox + h[5]*ybox + h[4]*zbox - xevent[i][0]; + dy = x[i][1] + h[1]*ybox + h[3]*zbox - xevent[i][1]; + dz = x[i][2] + h[2]*zbox - xevent[i][2]; + rsq = dx*dx + dy*dy + dz*dz; + if (rsq >= displace_distsq) event++; + } + } + + int allevents; + MPI_Allreduce(&event,&allevents,1,MPI_INT,MPI_SUM,world); + + return allevents; +} /* ---------------------------------------------------------------------- */ diff --git a/src/REPLICA/compute_event_displace.h b/src/REPLICA/compute_event_displace.h index c545c696a4..602f3c4b76 100644 --- a/src/REPLICA/compute_event_displace.h +++ b/src/REPLICA/compute_event_displace.h @@ -30,8 +30,11 @@ class ComputeEventDisplace : public Compute { ~ComputeEventDisplace(); void init(); double compute_scalar(); + + int all_events(); void reset_extra_compute_fix(const char *); + private: int triclinic; double displace_distsq; diff --git a/src/finish.cpp b/src/finish.cpp index b81b5e6785..45e9226388 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -130,7 +130,7 @@ void Finish::end(int flag) atom->natoms); if (logfile) fprintf(logfile,fmt1,time_loop,ntasks,update->nsteps, atom->natoms); - + // Gromacs/NAMD-style performance metric for suitable unit settings if ( timeflag && !minflag && !prdflag && !tadflag && @@ -144,7 +144,7 @@ void Finish::end(int flag) double one_fs = force->femtosecond; double t_step = ((double) time_loop) / ((double) update->nsteps); double step_t = 1.0/t_step; - + if (strcmp(update->unit_style,"lj") == 0) { double tau_day = 24.0*3600.0 / t_step * update->dt / one_fs; const char perf[] = "Performance: %.3f tau/day, %.3f timesteps/s\n"; @@ -161,26 +161,28 @@ void Finish::end(int flag) } // CPU use on MPI tasks and OpenMP threads - - if (lmp->kokkos) { - const char fmt2[] = - "%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n"; - if (screen) fprintf(screen,fmt2,cpu_loop,nprocs, - lmp->kokkos->num_threads); - if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs, - lmp->kokkos->num_threads); - } else { + + if (timeflag) { + if (lmp->kokkos) { + const char fmt2[] = + "%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n"; + if (screen) fprintf(screen,fmt2,cpu_loop,nprocs, + lmp->kokkos->num_threads); + if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs, + lmp->kokkos->num_threads); + } else { #if defined(_OPENMP) - const char fmt2[] = - "%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n"; - if (screen) fprintf(screen,fmt2,cpu_loop,nprocs,nthreads); - if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs,nthreads); + const char fmt2[] = + "%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n"; + if (screen) fprintf(screen,fmt2,cpu_loop,nprocs,nthreads); + if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs,nthreads); #else - const char fmt2[] = - "%.1f%% CPU use with %d MPI tasks x no OpenMP threads\n"; - if (screen) fprintf(screen,fmt2,cpu_loop,nprocs); - if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs); + const char fmt2[] = + "%.1f%% CPU use with %d MPI tasks x no OpenMP threads\n"; + if (screen) fprintf(screen,fmt2,cpu_loop,nprocs); + if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs); #endif + } } } } diff --git a/src/integrate.h b/src/integrate.h index 19ed546a9b..4ca3a788fa 100644 --- a/src/integrate.h +++ b/src/integrate.h @@ -23,7 +23,7 @@ class Integrate : protected Pointers { Integrate(class LAMMPS *, int, char **); virtual ~Integrate(); virtual void init(); - virtual void setup() = 0; + virtual void setup(int flag=1) = 0; virtual void setup_minimal(int) = 0; virtual void run(int) = 0; virtual void cleanup() {} diff --git a/src/min.cpp b/src/min.cpp index 9207c6bdc2..79d7d6a8bd 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -180,13 +180,15 @@ void Min::init() setup before run ------------------------------------------------------------------------- */ -void Min::setup() +void Min::setup(int flag) { if (comm->me == 0 && screen) { fprintf(screen,"Setting up %s style minimization ...\n", update->minimize_style); - fprintf(screen," Unit style : %s\n", update->unit_style); - timer->print_timeout(screen); + if (flag) { + fprintf(screen," Unit style : %s\n", update->unit_style); + timer->print_timeout(screen); + } } update->setupflag = 1; @@ -294,7 +296,7 @@ void Min::setup() requestor[m]->min_xf_get(m); modify->setup(vflag); - output->setup(); + output->setup(flag); update->setupflag = 0; // stats for initial thermo output diff --git a/src/min.h b/src/min.h index 639f87ed66..464018e825 100644 --- a/src/min.h +++ b/src/min.h @@ -31,7 +31,7 @@ class Min : protected Pointers { Min(class LAMMPS *); virtual ~Min(); virtual void init(); - void setup(); + void setup(int flag=1); void setup_minimal(int); void run(int); void cleanup(); diff --git a/src/output.cpp b/src/output.cpp index a2275b74be..5e56ccfebc 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -652,6 +652,21 @@ void Output::delete_dump(char *id) ndump--; } +/* ---------------------------------------------------------------------- + find a dump by ID + return index of dump or -1 if not found +------------------------------------------------------------------------- */ + +int Output::find_dump(const char *id) +{ + if (id == NULL) return -1; + int idump; + for (idump = 0; idump < ndump; idump++) + if (strcmp(id,dump[idump]->id) == 0) break; + if (idump == ndump) return -1; + return idump; +} + /* ---------------------------------------------------------------------- set thermo output frequency from input script ------------------------------------------------------------------------- */ diff --git a/src/output.h b/src/output.h index de5eaaa70b..5354759343 100644 --- a/src/output.h +++ b/src/output.h @@ -76,6 +76,7 @@ class Output : protected Pointers { void add_dump(int, char **); // add a Dump to Dump list void modify_dump(int, char **); // modify a Dump void delete_dump(char *); // delete a Dump from Dump list + int find_dump(const char *); // find a Dump ID void set_thermo(int, char **); // set thermo output freqquency void create_thermo(int, char **); // create a thermo style diff --git a/src/respa.cpp b/src/respa.cpp index 7646115fa9..5d51ff64ee 100644 --- a/src/respa.cpp +++ b/src/respa.cpp @@ -398,24 +398,27 @@ void Respa::init() setup before run ------------------------------------------------------------------------- */ -void Respa::setup() +void Respa::setup(int flag) { if (comm->me == 0 && screen) { fprintf(screen,"Setting up r-RESPA run ...\n"); - fprintf(screen," Unit style : %s\n", update->unit_style); - fprintf(screen," Current step : " BIGINT_FORMAT "\n", update->ntimestep); - fprintf(screen," Time steps :"); - for (int ilevel=0; ilevel < nlevels; ++ilevel) - fprintf(screen," %d:%g",ilevel+1, step[ilevel]); - fprintf(screen,"\n r-RESPA fixes :"); - for (int l=0; l < modify->n_post_force_respa; ++l) { - Fix *f = modify->fix[modify->list_post_force_respa[l]]; - if (f->respa_level >= 0) - fprintf(screen," %d:%s[%s]", - MIN(f->respa_level+1,nlevels),f->style,f->id); + if (flag) { + fprintf(screen," Unit style : %s\n", update->unit_style); + fprintf(screen," Current step : " BIGINT_FORMAT "\n", + update->ntimestep); + fprintf(screen," Time steps :"); + for (int ilevel=0; ilevel < nlevels; ++ilevel) + fprintf(screen," %d:%g",ilevel+1, step[ilevel]); + fprintf(screen,"\n r-RESPA fixes :"); + for (int l=0; l < modify->n_post_force_respa; ++l) { + Fix *f = modify->fix[modify->list_post_force_respa[l]]; + if (f->respa_level >= 0) + fprintf(screen," %d:%s[%s]", + MIN(f->respa_level+1,nlevels),f->style,f->id); + } + fprintf(screen,"\n"); + timer->print_timeout(screen); } - fprintf(screen,"\n"); - timer->print_timeout(screen); } update->setupflag = 1; @@ -482,7 +485,7 @@ void Respa::setup() sum_flevel_f(); modify->setup(vflag); - output->setup(); + output->setup(flag); update->setupflag = 0; } diff --git a/src/respa.h b/src/respa.h index 3355cd2eb7..0b08b12bd7 100644 --- a/src/respa.h +++ b/src/respa.h @@ -48,7 +48,7 @@ class Respa : public Integrate { Respa(class LAMMPS *, int, char **); virtual ~Respa(); virtual void init(); - virtual void setup(); + virtual void setup(int flag=1); virtual void setup_minimal(int); virtual void run(int); virtual void cleanup(); diff --git a/src/verlet.cpp b/src/verlet.cpp index 915648040e..b242b00722 100644 --- a/src/verlet.cpp +++ b/src/verlet.cpp @@ -85,14 +85,17 @@ void Verlet::init() setup before run ------------------------------------------------------------------------- */ -void Verlet::setup() +void Verlet::setup(int flag) { if (comm->me == 0 && screen) { fprintf(screen,"Setting up Verlet run ...\n"); - fprintf(screen," Unit style : %s\n", update->unit_style); - fprintf(screen," Current step : " BIGINT_FORMAT "\n", update->ntimestep); - fprintf(screen," Time step : %g\n", update->dt); - timer->print_timeout(screen); + if (flag) { + fprintf(screen," Unit style : %s\n", update->unit_style); + fprintf(screen," Current step : " BIGINT_FORMAT "\n", + update->ntimestep); + fprintf(screen," Time step : %g\n", update->dt); + timer->print_timeout(screen); + } } if (lmp->kokkos) @@ -148,7 +151,7 @@ void Verlet::setup() if (force->newton) comm->reverse_comm(); modify->setup(vflag); - output->setup(); + output->setup(flag); update->setupflag = 0; } diff --git a/src/verlet.h b/src/verlet.h index 0e2a333fab..29bd3f16b3 100644 --- a/src/verlet.h +++ b/src/verlet.h @@ -29,7 +29,7 @@ class Verlet : public Integrate { Verlet(class LAMMPS *, int, char **); virtual ~Verlet() {} virtual void init(); - virtual void setup(); + virtual void setup(int flag=1); virtual void setup_minimal(int); virtual void run(int); void cleanup(); diff --git a/src/write_restart.cpp b/src/write_restart.cpp index f1ee4a4472..77e2cb05d9 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -297,6 +297,9 @@ void WriteRestart::write(char *file) // communication buffer for my atom info // max_size = largest buffer needed by any proc + // NOTE: are assuming size_restart() returns 32-bit int + // for a huge one-proc problem, nlocal could be 32-bit + // but nlocal * doubles-peratom could oveflow int max_size; int send_size = atom->avec->size_restart(); -- GitLab From 4da8c1c4e2be368a1eee5f18563f3971317621c1 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 11 Apr 2017 09:00:37 -0600 Subject: [PATCH 025/593] patch 11Apr17 --- doc/src/Manual.txt | 4 +- doc/src/Section_commands.txt | 2 +- doc/src/Section_howto.txt | 2 +- doc/src/dihedral_charmm.txt | 33 +-- doc/src/pair_charmm.txt | 7 +- examples/cmap/in.cmap | 5 +- examples/cmap/log.5Oct16.cmap.g++.1 | 201 ------------------ examples/cmap/log.5Oct16.cmap.g++.4 | 201 ------------------ ...l_charmmfsh.cpp => dihedral_charmmfsw.cpp} | 26 +-- ...edral_charmmfsh.h => dihedral_charmmfsw.h} | 16 +- src/fix_adapt.cpp | 14 +- src/version.h | 2 +- 12 files changed, 57 insertions(+), 456 deletions(-) delete mode 100644 examples/cmap/log.5Oct16.cmap.g++.1 delete mode 100644 examples/cmap/log.5Oct16.cmap.g++.4 rename src/MOLECULE/{dihedral_charmmfsh.cpp => dihedral_charmmfsw.cpp} (95%) rename src/MOLECULE/{dihedral_charmmfsh.h => dihedral_charmmfsw.h} (84%) diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index ba79f78cb2..a5a874fa8b 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -1,7 +1,7 @@ LAMMPS Users Manual - + @@ -21,7 +21,7 @@

LAMMPS Documentation :c,h3 -31 Mar 2017 version :c,h4 +11 Apr 2017 version :c,h4 Version info: :h4 diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index e80b0303eb..3f1d6ff203 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -1155,7 +1155,7 @@ USER-OMP, t = OPT. "zero"_dihedral_zero.html, "hybrid"_dihedral_hybrid.html, "charmm (ko)"_dihedral_charmm.html, -"charmmfsh"_dihedral_charmm.html, +"charmmfsw"_dihedral_charmm.html, "class2 (ko)"_dihedral_class2.html, "harmonic (io)"_dihedral_harmonic.html, "helix (o)"_dihedral_helix.html, diff --git a/doc/src/Section_howto.txt b/doc/src/Section_howto.txt index 6f59f8b55e..579cb68474 100644 --- a/doc/src/Section_howto.txt +++ b/doc/src/Section_howto.txt @@ -215,7 +215,7 @@ documentation for the formula it computes. "special_bonds"_special_bonds.html charmm "special_bonds"_special_bonds.html amber :ul -NOTE: For CHARMM, the newer {charmmfsw} or {charmmfsh} styles were +NOTE: For CHARMM, newer {charmmfsw} or {charmmfsh} styles were released in March 2017. We recommend they be used instead of the older {charmm} styles. See discussion of the differences on the "pair charmm"_pair_charmm.html and "dihedral charmm"_dihedral_charmm.html diff --git a/doc/src/dihedral_charmm.txt b/doc/src/dihedral_charmm.txt index 9fe05a1148..918755ec38 100644 --- a/doc/src/dihedral_charmm.txt +++ b/doc/src/dihedral_charmm.txt @@ -10,25 +10,25 @@ dihedral_style charmm command :h3 dihedral_style charmm/intel command :h3 dihedral_style charmm/kk command :h3 dihedral_style charmm/omp command :h3 -dihedral_style charmmfsh command :h3 +dihedral_style charmmfsw command :h3 [Syntax:] dihedral_style style :pre -style = {charmm} or {charmmfsh} :ul +style = {charmm} or {charmmfsw} :ul [Examples:] dihedral_style charmm -dihedral_style charmmfsh +dihedral_style charmmfsw dihedral_coeff 1 0.2 1 180 1.0 dihedral_coeff 2 1.8 1 0 1.0 dihedral_coeff 1 3.1 2 180 0.5 :pre [Description:] -The {charmm} and {charmmfsh} dihedral styles use the potential +The {charmm} and {charmmfsw} dihedral styles use the potential :c,image(Eqs/dihedral_charmm.jpg) @@ -38,10 +38,12 @@ field (see comment on weighting factors below). See "(Cornell)"_#dihedral-Cornell for a description of the AMBER force field. -NOTE: The newer {charmmfsh} style was released in March 2017. We +NOTE: The newer {charmmfsw} style was released in March 2017. We recommend it be used instead of the older {charmm} style when running -a simulation with the CHARMM force field and Coulomb cutoffs, via the -"pair_style lj/charmmfsw/coul/charmmfsh"_pair_charmm.html command. +a simulation with the CHARMM force field, either with long-range +Coulombics or a Coulomb cutoff, via the "pair_style +lj/charmmfsw/coul/long"_pair_charmm.html and "pair_style +lj/charmmfsw/coul/charmmfsh"_pair_charmm.html commands respectively. Otherwise the older {charmm} style is fine to use. See the discussion below and more details on the "pair_style charmm"_pair_charmm.html doc page. @@ -86,17 +88,18 @@ default). Otherwise 1-4 non-bonded interactions in dihedrals will be computed twice. For simulations using the CHARMM force field with a Coulomb cutoff, -the difference between the {charmm} and {charmmfsh} styles is in the +the difference between the {charmm} and {charmmfsw} styles is in the computation of the 1-4 non-bond interactions, though only if the distance between the two atoms is within the switching region of the pairwise potential defined by the corresponding CHARMM pair style, i.e. within the outer cutoff specified for the pair style. The -{charmmfsh} style should only be used when using the "pair_style -lj/charmmfsw/coul/charmmfsh"_pair_charmm.html to make the Coulombic -pairwise calculations consistent. Use the {charmm} style with -long-range Coulombics or the older "pair_style -lj/charmm/coul/charmm"_pair_charmm.html command. See the discussion -on the "CHARMM pair_style"_pair_charmm.html doc page for details. +{charmmfsw} style should only be used when using the corresponding +"pair_style lj/charmmfsw/coul/charmmfsw"_pair_charmm.html or +"pair_style lj/charmmfsw/coul/long"_pair_charmm.html commands. Use +the {charmm} style with the older "pair_style"_pair_charmm.html +commands that have just "charmm" in their style name. See the +discussion on the "CHARMM pair_style"_pair_charmm.html doc page for +details. Note that for AMBER force fields, which use pair styles with "lj/cut", the special_bonds 1-4 scaling factor should be set to the AMBER @@ -104,7 +107,7 @@ defaults (1/2 and 5/6) and all the dihedral weighting factors (4th coeff above) must be set to 0.0. In this case, you can use any pair style you wish, since the dihedral does not need any Lennard-Jones parameter information and will not compute any 1-4 non-bonded -interactions. Likewise the {charmm} or {charmmfsh} styles are +interactions. Likewise the {charmm} or {charmmfsw} styles are identical in this case since no 1-4 non-bonded interactions are computed. diff --git a/doc/src/pair_charmm.txt b/doc/src/pair_charmm.txt index ba6e60e121..9c5973c725 100644 --- a/doc/src/pair_charmm.txt +++ b/doc/src/pair_charmm.txt @@ -99,9 +99,10 @@ artifacts. NOTE: The newer {charmmfsw} or {charmmfsh} styles were released in March 2017. We recommend they be used instead of the older {charmm} -styles. Eventually code from the new styles will propagate into the -related pair styles (e.g. implicit, accelerator, free energy -variants). +styles. This includes the newer "dihedral_style +charmmfsw"_dihedral_charmm.html command. Eventually code from the new +styles will propagate into the related pair styles (e.g. implicit, +accelerator, free energy variants). The general CHARMM formulas are as follows diff --git a/examples/cmap/in.cmap b/examples/cmap/in.cmap index d2b2714b82..3b6f2767ed 100644 --- a/examples/cmap/in.cmap +++ b/examples/cmap/in.cmap @@ -9,11 +9,10 @@ boundary p p p atom_style full bond_style harmonic angle_style charmm -dihedral_style charmm +dihedral_style charmmfsw improper_style harmonic -pair_style lj/charmm/coul/charmm 8 12 -#pair_style lj/charmmfsw/coul/charmmfsh 8 12 +pair_style lj/charmmfsw/coul/charmmfsh 8 12 pair_modify mix arithmetic fix cmap all cmap charmm22.cmap diff --git a/examples/cmap/log.5Oct16.cmap.g++.1 b/examples/cmap/log.5Oct16.cmap.g++.1 deleted file mode 100644 index fbfc2b8baf..0000000000 --- a/examples/cmap/log.5Oct16.cmap.g++.1 +++ /dev/null @@ -1,201 +0,0 @@ -LAMMPS (5 Oct 2016) -# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016 - -units real -neigh_modify delay 2 every 1 -#newton off - -boundary p p p - -atom_style full -bond_style harmonic -angle_style charmm -dihedral_style charmm -improper_style harmonic - -pair_style lj/charmm/coul/charmm 8 12 -#pair_style lj/charmmfsw/coul/charmmfsh 8 12 -pair_modify mix arithmetic - -fix cmap all cmap charmm22.cmap -Reading potential file charmm22.cmap with DATE: 2016-09-26 -fix_modify cmap energy yes - -read_data gagg.data fix cmap crossterm CMAP - orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 34 atoms - scanning bonds ... - 4 = max bonds/atom - scanning angles ... - 6 = max angles/atom - scanning dihedrals ... - 12 = max dihedrals/atom - scanning impropers ... - 1 = max impropers/atom - reading bonds ... - 33 bonds - reading angles ... - 57 angles - reading dihedrals ... - 75 dihedrals - reading impropers ... - 7 impropers - 4 = max # of 1-2 neighbors - 7 = max # of 1-3 neighbors - 13 = max # of 1-4 neighbors - 16 = max # of special neighbors - -special_bonds charmm -fix 1 all nve - -#fix 1 all nvt temp 300 300 100.0 -#fix 2 all shake 1e-9 500 0 m 1.0 - -velocity all create 0.0 12345678 dist uniform - -thermo 1000 -thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp -timestep 2.0 - -run 100000 -Neighbor list info ... - 1 neighbor list requests - update every 1 steps, delay 2 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 14 - ghost atom cutoff = 14 - binsize = 7 -> bins = 12 12 12 -Memory usage per processor = 14.6355 Mbytes -Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro - 0 26.542777 -0.93822087 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023 - 1000 28.673005 -0.47724367 0.80029132 3.151679 4.4684446 -2.3928648 0.18604953 - 2000 27.67955 -1.170342 0.72018905 4.0400131 4.4713764 -2.5490207 0.21834436 - 3000 29.256656 -0.35856055 0.73303546 3.7411606 4.4710568 -2.8939692 0.37728884 - 4000 30.097549 -1.1353905 0.79007053 3.0688444 4.4091469 -2.3383587 0.20743631 - 5000 28.357525 -1.0723742 0.9180297 3.6579424 4.8792664 -2.3185572 0.088366962 - 6000 29.214175 -0.95299225 0.81926009 3.6805429 4.6742897 -2.9343577 0.26697813 - 7000 27.018614 -0.52423475 0.72502764 3.8840137 4.7780956 -2.3916009 0.24952584 - 8000 29.682167 -1.0939711 0.76111486 3.1090116 4.9359719 -2.5662984 0.1411154 - 9000 27.909695 -0.80905986 0.78952533 4.203187 4.1301204 -2.000402 0.088859259 - 10000 27.480298 -0.86273377 1.1293962 4.3857421 4.899282 -3.3895621 0.12126215 - 11000 28.303203 -1.0221152 0.62762348 4.055414 4.5863024 -2.5842816 0.17996907 - 12000 28.311127 -0.94227367 0.91859012 3.6673926 4.7018632 -3.902715 0.30065704 - 13000 30.818607 -1.5220116 0.95710386 3.3364371 4.543427 -3.0423067 0.16712905 - 14000 27.643736 -1.0144117 0.95806952 4.1046912 4.800236 -4.0534389 0.29293405 - 15000 27.660491 -1.0390086 0.78061056 4.1139174 4.7197202 -2.3670379 0.22126985 - 16000 27.845157 -0.63654502 0.78007478 3.9365994 4.949418 -3.1470214 0.22335355 - 17000 28.44772 -1.0255112 0.70402007 4.0573343 4.2887527 -2.2099596 0.048050962 - 18000 27.128323 -0.96218536 1.1327159 4.3222585 4.326607 -2.2881766 0.13491257 - 19000 27.337633 -0.78999574 0.80152298 4.2239689 4.7073478 -2.2924164 0.12710292 - 20000 27.780537 -0.46458072 0.79707671 3.7232618 4.943417 -2.5290628 0.26191223 - 21000 26.435484 -0.7803224 1.0753217 4.4196051 5.9945933 -2.3340925 0.16448475 - 22000 28.619429 -1.1623149 0.9401731 3.8508844 5.1636737 -2.5551846 0.25318434 - 23000 28.399338 -0.79700962 0.85575503 4.488526 4.5975422 -2.5663549 0.13601693 - 24000 29.645532 -1.158744 0.83180313 3.8193399 4.60319 -2.6847864 0.24260466 - 25000 28.695339 -1.4802204 0.76583757 3.6786272 4.8959496 -2.3627896 0.080867326 - 26000 28.149711 -1.029689 0.79383806 3.7885067 4.3345813 -2.1041553 0.14598209 - 27000 29.580373 -1.0525813 1.0262723 3.7767318 4.6119758 -2.2802386 0.088556038 - 28000 28.44308 -0.93411225 0.8794395 3.948079 4.780246 -2.1814583 0.14340149 - 29000 29.335621 -1.6087988 0.71803091 3.7819186 4.6688385 -2.4282242 0.16061111 - 30000 28.706138 -1.3938241 0.67713818 4.031275 4.4756505 -2.1807056 0.11461356 - 31000 27.451944 0.010297225 0.65064883 3.6402029 4.3607811 -2.5511516 0.12637237 - 32000 27.070878 -1.103158 1.1932199 5.1329709 4.5201653 -2.2224479 0.11215427 - 33000 29.889976 -1.6228316 0.69407996 3.5361991 4.3502767 -1.9847454 0.09089949 - 34000 28.223151 -0.927208 1.043253 3.4650939 5.1028142 -2.8127219 0.10648823 - 35000 27.985986 -0.48153861 0.63878449 3.3724641 4.9551679 -2.6565919 0.12123115 - 36000 28.580688 -1.4500694 1.055762 4.0490064 4.423782 -2.3103578 0.072747638 - 37000 29.192947 -0.49678176 1.1146731 2.9233947 4.5738603 -2.4376144 0.22874047 - 38000 26.954594 -0.53812359 0.79230685 4.3356989 5.0284656 -2.3791255 0.0486081 - 39000 27.567555 -0.57870028 0.73614374 4.191991 4.9209556 -2.6122044 0.08635571 - 40000 28.494172 -0.79057135 0.79072816 4.1893209 4.4826919 -2.4179635 0.14612898 - 41000 28.44904 -1.1002948 0.93405654 4.3586358 4.4338415 -2.2950944 0.15705834 - 42000 28.95725 -1.0297067 1.1632348 4.274711 4.9979487 -2.7611464 0.15944725 - 43000 28.640394 -0.70938882 0.68100893 3.1844315 5.1817454 -2.2837487 0.14189233 - 44000 27.997558 -1.0115099 0.59125208 4.0883422 4.6033907 -2.2775964 0.094273258 - 45000 27.67163 -0.67992747 1.1225552 3.9020703 4.8171056 -2.1952679 0.041418433 - 46000 28.822607 -0.6687953 0.74160059 3.3193715 4.5546965 -2.3024572 0.047569065 - 47000 29.20147 -1.4456785 0.79223353 3.8288813 4.5811826 -2.5154936 0.061230141 - 48000 27.843026 -1.0222301 0.87322137 4.3432743 4.4266307 -2.1414153 0.06802794 - 49000 28.199573 -1.1887794 1.2781088 4.0779644 4.5881353 -2.319775 0.094803547 - 50000 28.759212 -1.354416 0.68534569 3.8394841 4.2308134 -2.1281844 0.1395951 - 51000 27.876455 -1.5705462 0.76557156 4.5335223 4.523708 -2.203702 0.14679803 - 52000 27.930587 -1.2277489 0.96071516 3.960953 5.1152188 -2.4101451 0.060949521 - 53000 27.031236 -1.4746477 1.2341141 5.0540975 4.3656865 -2.1288513 0.092725656 - 54000 28.809394 -1.1162427 0.94350207 3.4013958 4.4755547 -2.3342811 0.18855912 - 55000 28.948415 -1.1560418 0.6260139 3.5386373 4.5244978 -2.340212 0.17474657 - 56000 28.048368 -0.95784532 0.76432571 4.1404665 4.4570033 -2.0899628 0.045693628 - 57000 28.707642 -1.366574 0.9907873 3.729903 4.3131997 -2.2777698 0.065420213 - 58000 26.361663 -1.0424403 1.0452563 5.0977108 4.7035231 -2.3101244 0.13671642 - 59000 29.218218 -1.2210564 0.62435875 3.4236327 4.5481681 -2.1575943 0.037984042 - 60000 27.655546 -1.1053224 0.86323501 3.7641375 4.8946898 -2.2422249 0.077725979 - 61000 27.252108 -1.3744824 1.1150806 5.0444848 4.4878135 -2.2743829 0.058331257 - 62000 27.163469 -1.1715781 0.72099321 4.5295501 4.9509918 -2.2993961 0.050401105 - 63000 29.581575 -1.2238537 0.86303245 3.1194038 5.2218965 -2.5002427 0.055032632 - 64000 27.897822 -1.1011516 0.74540883 4.2869228 4.3394269 -2.2552393 0.1403321 - 65000 27.083245 -1.0633392 0.92771724 5.0805224 4.2747962 -2.2388039 0.064196692 - 66000 29.072723 -1.5514209 0.89798805 4.2600224 4.4261812 -2.3524752 0.15067414 - 67000 27.308181 -0.72224802 0.97109517 4.5074578 4.4559352 -2.1381121 0.089297603 - 68000 27.505686 -0.43855431 0.80785812 4.1917251 5.0157721 -2.3382145 0.11105164 - 69000 29.041681 -0.64735378 0.89874684 3.3891579 4.3753361 -2.2320941 0.14716747 - 70000 29.735756 -1.7061457 0.9206878 3.5767878 4.3851664 -2.2516304 0.097196062 - 71000 28.224352 -0.92217702 0.86093586 3.9507157 4.5596589 -2.2173397 0.089116669 - 72000 29.282336 -1.056142 0.65185725 3.8735742 4.4839333 -2.4314756 0.071909704 - 73000 26.257283 -0.64273826 0.98300685 5.063943 5.045958 -2.5544375 0.2180275 - 74000 28.825119 -0.97736616 0.87201848 3.55875 4.3653309 -2.2303567 0.098963875 - 75000 29.239507 -0.96508809 0.74517323 3.4306236 4.7651921 -2.6077732 0.17883654 - 76000 27.349841 -0.50990238 1.1183613 4.4252451 4.4097775 -2.4125794 0.18483606 - 77000 28.130197 -1.4081219 0.94921357 4.2572132 4.5162849 -2.4013797 0.073744606 - 78000 28.235774 -0.9214321 0.6324981 3.8697686 4.8092154 -2.2272847 0.092108346 - 79000 26.732846 -0.55949486 1.0989617 5.0088609 4.4930687 -2.277945 0.03855146 - 80000 28.529208 -0.94244671 0.79407482 3.961106 4.3930011 -2.3127726 0.091124948 - 81000 29.603852 -1.6116062 1.060847 3.7824932 4.151001 -1.9139868 0.19875986 - 82000 28.232876 -1.1833011 1.0182713 3.4195758 5.1394333 -2.4632697 0.28501012 - 83000 29.565482 -1.3479552 0.99056973 3.7851802 4.4781011 -2.7872481 0.2031991 - 84000 28.780274 -1.3073882 1.0512637 4.004638 4.502282 -2.3789146 0.015656202 - 85000 27.262312 -1.1305346 1.203524 4.7938623 4.1747105 -2.0952844 0.054240361 - 86000 28.157348 -1.0662817 0.81163796 3.9912709 4.8320213 -2.255237 0.14698333 - 87000 28.445543 -1.3365026 0.78156195 4.4767689 4.4457575 -2.5008786 0.13879386 - 88000 27.656717 -1.1490599 0.87974869 4.4629952 4.7023033 -2.3258145 0.081904139 - 89000 28.838821 -1.020709 0.85587929 3.7110705 4.4938307 -2.4914483 0.11447952 - 90000 27.356497 -0.59107077 0.81879666 4.5209332 4.4703836 -2.3806717 0.071307775 - 91000 27.780445 -0.80564513 0.94752313 3.8468943 4.2924253 -2.1011134 0.1118672 - 92000 28.555276 -1.3514732 0.80826674 3.9590742 4.5775954 -2.4891232 0.054254978 - 93000 28.747267 -1.2133243 0.75507246 4.1319789 4.9048611 -2.4913887 0.13045693 - 94000 27.479343 -0.69973695 0.99696121 3.5966229 4.549025 -2.4155312 0.41745762 - 95000 27.726945 -1.1905026 1.1120842 4.7433275 4.5386861 -2.7947142 0.33671682 - 96000 28.021114 -1.0341645 0.6663033 4.2397505 4.6203984 -1.9904034 0.10972565 - 97000 28.382022 -1.3916008 1.180588 4.0729621 4.6741792 -2.554927 0.13462346 - 98000 27.895969 -0.7496449 1.3072185 4.2611888 4.3726077 -2.1320701 0.15376665 - 99000 28.517889 -1.2183957 1.279778 3.957647 4.2638434 -2.2888407 0.042705003 - 100000 28.109211 -1.2538948 0.83671785 4.3734766 4.544545 -2.3076497 0.042189096 -Loop time of 2.84552 on 1 procs for 100000 steps with 34 atoms - -Performance: 6072.706 ns/day, 0.004 hours/ns, 35142.973 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.94207 | 0.94207 | 0.94207 | 0.0 | 33.11 -Bond | 1.6125 | 1.6125 | 1.6125 | 0.0 | 56.67 -Neigh | 0.0073986 | 0.0073986 | 0.0073986 | 0.0 | 0.26 -Comm | 0.012739 | 0.012739 | 0.012739 | 0.0 | 0.45 -Output | 0.00075531 | 0.00075531 | 0.00075531 | 0.0 | 0.03 -Modify | 0.21483 | 0.21483 | 0.21483 | 0.0 | 7.55 -Other | | 0.05524 | | | 1.94 - -Nlocal: 34 ave 34 max 34 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 395 ave 395 max 395 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 395 -Ave neighs/atom = 11.6176 -Ave special neighs/atom = 9.52941 -Neighbor list builds = 237 -Dangerous builds = 0 -Total wall time: 0:00:02 diff --git a/examples/cmap/log.5Oct16.cmap.g++.4 b/examples/cmap/log.5Oct16.cmap.g++.4 deleted file mode 100644 index de5d670073..0000000000 --- a/examples/cmap/log.5Oct16.cmap.g++.4 +++ /dev/null @@ -1,201 +0,0 @@ -LAMMPS (5 Oct 2016) -# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016 - -units real -neigh_modify delay 2 every 1 -#newton off - -boundary p p p - -atom_style full -bond_style harmonic -angle_style charmm -dihedral_style charmm -improper_style harmonic - -pair_style lj/charmm/coul/charmm 8 12 -#pair_style lj/charmmfsw/coul/charmmfsh 8 12 -pair_modify mix arithmetic - -fix cmap all cmap charmm22.cmap -Reading potential file charmm22.cmap with DATE: 2016-09-26 -fix_modify cmap energy yes - -read_data gagg.data fix cmap crossterm CMAP - orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509) - 1 by 2 by 2 MPI processor grid - reading atoms ... - 34 atoms - scanning bonds ... - 4 = max bonds/atom - scanning angles ... - 6 = max angles/atom - scanning dihedrals ... - 12 = max dihedrals/atom - scanning impropers ... - 1 = max impropers/atom - reading bonds ... - 33 bonds - reading angles ... - 57 angles - reading dihedrals ... - 75 dihedrals - reading impropers ... - 7 impropers - 4 = max # of 1-2 neighbors - 7 = max # of 1-3 neighbors - 13 = max # of 1-4 neighbors - 16 = max # of special neighbors - -special_bonds charmm -fix 1 all nve - -#fix 1 all nvt temp 300 300 100.0 -#fix 2 all shake 1e-9 500 0 m 1.0 - -velocity all create 0.0 12345678 dist uniform - -thermo 1000 -thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp -timestep 2.0 - -run 100000 -Neighbor list info ... - 1 neighbor list requests - update every 1 steps, delay 2 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 14 - ghost atom cutoff = 14 - binsize = 7 -> bins = 12 12 12 -Memory usage per processor = 15.9307 Mbytes -Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro - 0 26.542777 -0.93822087 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023 - 1000 28.673005 -0.47724367 0.80029132 3.151679 4.4684446 -2.3928648 0.18604953 - 2000 27.67955 -1.170342 0.72018905 4.0400131 4.4713764 -2.5490207 0.21834436 - 3000 29.256656 -0.35856055 0.73303546 3.7411606 4.4710568 -2.8939692 0.37728884 - 4000 30.097549 -1.1353905 0.79007053 3.0688444 4.4091469 -2.3383587 0.20743631 - 5000 28.357525 -1.0723742 0.9180297 3.6579424 4.8792663 -2.3185572 0.088366962 - 6000 29.214175 -0.95299239 0.81926011 3.6805428 4.6742897 -2.9343578 0.26697816 - 7000 27.018614 -0.52423469 0.72502751 3.8840141 4.7780958 -2.3916014 0.24952572 - 8000 29.682494 -1.0940368 0.76113051 3.1089345 4.9357863 -2.5662256 0.14112613 - 9000 27.853918 -0.7913741 0.79503268 4.2177256 4.146792 -2.00475 0.090585666 - 10000 27.13754 -0.80551128 1.1325023 4.4718283 5.2460631 -3.4947725 0.11893125 - 11000 28.277434 -1.4897448 0.90075953 4.1895717 4.3594269 -1.9553119 0.090222212 - 12000 28.630973 -1.222206 0.67796385 3.3905661 4.9691334 -2.9052721 0.13897658 - 13000 28.593007 -0.95684026 0.75585196 3.7242568 4.7417932 -2.3893117 0.2074121 - 14000 26.147115 -0.6026921 0.93591488 5.1292829 4.9821952 -2.2571835 0.11872421 - 15000 26.29432 -0.82424162 1.048979 4.5569495 5.1189308 -2.9750422 0.16195676 - 16000 29.189992 -0.80998247 0.74093508 3.8299275 4.4536688 -2.5497538 0.19155639 - 17000 25.878012 -0.3519646 1.0988924 4.7359591 5.3923098 -2.7211029 0.13405223 - 18000 27.726135 -0.28229987 0.63072344 4.1777888 4.7237271 -2.2177157 0.15939372 - 19000 27.153504 -0.66477422 0.77910129 4.2036117 5.113851 -2.3494315 0.094793307 - 20000 28.044833 -1.2835827 0.88745367 3.9955526 4.5077788 -3.0116467 0.17197859 - 21000 27.205696 -0.74090037 1.0023251 4.3421733 4.912671 -2.3473271 0.26089356 - 22000 27.385785 -0.93740972 0.84554838 4.562743 4.883866 -2.2110955 0.11573301 - 23000 27.05534 -0.95605442 0.96719024 3.9277618 5.0359014 -2.6135949 0.21368061 - 24000 28.273378 -0.97543103 0.8983443 4.2067985 4.4782971 -2.4230505 0.30311692 - 25000 27.477789 -0.20383849 0.8380706 3.8037992 4.8312504 -2.5831791 0.093843746 - 26000 30.344199 -1.9773473 0.92882437 3.7821405 4.5176677 -2.3020968 0.2194307 - 27000 27.32767 -0.9803839 0.92988865 3.7611603 5.0328211 -2.4647656 0.18213622 - 28000 27.34208 -1.037938 0.74488346 4.1727342 4.7056812 -2.2718346 0.17741362 - 29000 27.682777 -0.51006495 0.57074224 4.7332237 4.7080462 -2.0491512 0.2130517 - 30000 24.925731 0.13670248 0.84976065 4.4143762 6.0677158 -3.5479173 0.28059419 - 31000 28.623419 -0.90725708 1.0710501 3.6930688 4.6639301 -2.2225373 0.20988139 - 32000 27.732286 -1.1948367 0.89230134 4.4398373 4.8923907 -3.5849327 0.49167488 - 33000 28.800772 -1.5319589 0.93455495 4.1634728 4.6107706 -2.3503486 0.22636535 - 34000 27.374398 -1.0957453 0.89450276 3.9829508 4.991786 -2.3548834 0.15869465 - 35000 28.38753 -0.89261166 0.90000776 3.536864 4.4293294 -2.4218118 0.10640557 - 36000 27.713974 0.088038031 0.85190574 3.8969601 4.6256355 -2.7935475 0.34671662 - 37000 29.13007 -1.378597 0.74412556 3.131538 4.6458653 -2.9373734 0.38035616 - 38000 28.556573 -1.4055344 1.139984 4.0035753 4.2938358 -2.489329 0.25338326 - 39000 26.447036 -1.1829705 0.87032438 5.0804461 4.5772023 -2.7346466 0.32165802 - 40000 27.991454 -0.64295679 0.61020872 4.165871 4.4623087 -2.2244194 0.13826991 - 41000 29.483296 -1.2400745 0.66926627 3.3473666 4.5766617 -2.3051145 0.12171554 - 42000 26.948627 -1.2162288 1.1440628 4.3993073 5.1176533 -2.4734485 0.15497709 - 43000 28.04459 -0.26543193 0.83647367 3.5160747 4.6964397 -2.2805068 0.12618821 - 44000 28.213608 -1.216128 0.9132792 4.0206483 4.9483599 -2.3387049 0.10132022 - 45000 28.283506 -1.0390766 0.86113772 4.504509 4.7209088 -2.3043085 0.14588362 - 46000 27.433853 -0.57912107 0.78448334 4.5998579 5.1181394 -2.6165094 0.18722528 - 47000 27.552939 -1.1128925 0.80087638 4.3448001 4.8062869 -2.4296883 0.2702479 - 48000 28.874034 -1.3242519 0.71770727 3.5648565 4.4671824 -2.2608958 0.16115978 - 49000 29.216186 -1.2210307 0.76937497 3.9260628 4.7550577 -2.7316081 0.085505664 - 50000 28.065856 -1.1545547 0.86953819 4.4137666 4.732157 -2.4450867 0.23320539 - 51000 26.308975 -0.99728352 0.90408444 4.2400186 5.6340425 -2.2090554 0.079882158 - 52000 28.517571 -1.5027398 0.83520278 3.8176552 4.3001251 -2.0731682 0.1665375 - 53000 28.77579 -1.3564268 0.97253881 3.6866407 4.8532347 -2.5330776 0.17668411 - 54000 29.135315 -1.0994106 0.67605671 3.6819254 4.3134408 -1.9796929 0.076951331 - 55000 26.168938 -0.76247492 0.88784685 4.6533473 6.0484793 -2.1334561 0.036876985 - 56000 27.471775 -0.68648837 1.0576168 4.0354311 4.4767052 -2.2368959 0.24950568 - 57000 29.787083 -1.4914384 1.0702944 3.5388133 4.5173097 -2.6694464 0.27937092 - 58000 28.705448 -1.3016617 0.63337853 3.9552713 4.4119825 -1.8774657 0.17540021 - 59000 29.130155 -0.91647363 0.84384883 3.1076903 4.5346348 -2.3457338 0.16674486 - 60000 26.874199 -0.81598034 1.3432151 5.1322624 4.9545484 -2.9566615 0.25950486 - 61000 27.401306 -0.82895856 1.1636949 4.020154 4.5745928 -2.601466 0.18061051 - 62000 28.930313 -1.5231967 0.85173243 4.3517328 4.4878662 -2.5859205 0.1755493 - 63000 26.56874 0.026147233 0.60836216 4.4231618 4.4390677 -2.1721849 0.08594237 - 64000 26.729023 -0.76953985 0.76734633 4.5104288 5.0886456 -2.2118551 0.11339216 - 65000 28.900471 -1.3901477 0.86194657 4.2774976 4.498325 -2.3672362 0.20668335 - 66000 26.884253 -0.21198879 0.98509625 4.0843117 4.4344172 -2.3289416 0.23631017 - 67000 27.210888 -0.84075559 1.0396559 4.7253607 4.4314589 -2.2985702 0.19326507 - 68000 28.042102 -1.1898715 1.053534 3.8748712 4.4358449 -2.3998723 0.2431659 - 69000 28.939141 -1.6968936 0.98155912 4.0460838 5.0075204 -2.5547087 0.28645131 - 70000 27.15577 -0.85202797 1.1469079 4.7645212 4.6133209 -2.3410451 0.086576572 - 71000 25.507417 -0.27780727 0.95157881 4.8759406 4.853401 -2.9598705 0.41011008 - 72000 29.804703 -1.4847015 0.96345767 3.6797304 4.3678377 -2.4594626 0.14480206 - 73000 28.602798 -1.4906143 0.72497266 4.2442974 4.5360598 -2.3621638 0.14385651 - 74000 28.4928 -0.91319873 1.0377472 3.8033127 4.3991601 -2.4051911 0.095567428 - 75000 26.38168 -0.70733237 1.1557817 5.697939 4.5935618 -2.4285007 0.058980519 - 76000 27.16626 -0.83631031 0.84844246 4.7460887 4.5801472 -2.1260014 0.12845946 - 77000 29.040661 -1.3089499 0.80285084 4.664804 4.5215895 -2.6861939 0.13215598 - 78000 27.477871 -1.0600977 0.88595045 4.6264017 5.4095605 -2.474411 0.10987174 - 79000 26.151797 -0.55779685 0.91382436 4.99964 4.9184022 -2.2547241 0.22854038 - 80000 28.14523 -0.54460026 0.8982411 3.5374555 4.3785673 -2.3196807 0.088567964 - 81000 29.029941 -1.6467789 0.79042284 3.7269899 4.7407998 -2.3795824 0.1408727 - 82000 27.920287 -0.72798032 1.0076975 3.4449461 4.5621371 -2.8239074 0.25103454 - 83000 29.131054 -1.114367 0.76887285 3.459639 4.5163922 -2.607825 0.19991648 - 84000 28.249768 -0.69944068 1.0510846 4.0436296 4.6430538 -2.4213355 0.077299966 - 85000 28.06888 -0.62132922 0.91829312 4.1294147 4.3099557 -2.354063 0.15866186 - 86000 28.664264 -1.1022906 0.87831695 4.5773522 4.6045802 -2.9206875 0.33950063 - 87000 27.960967 -1.2852756 0.77694253 3.9011301 4.9114139 -3.2374868 0.3068138 - 88000 27.190678 -1.2803268 1.1545301 4.5769709 5.2404761 -2.3825838 0.10356039 - 89000 26.792931 -0.44516641 1.0236244 4.2007253 4.7098685 -2.3608551 0.034447062 - 90000 27.173991 -0.87185611 1.065719 4.1953618 4.6856408 -2.6539232 0.16957757 - 91000 28.626528 -1.239257 0.89524651 4.7048012 4.6344201 -2.7367901 0.43534143 - 92000 27.661812 -1.109044 0.92817391 5.0294489 4.3890711 -2.4108669 0.12570139 - 93000 28.156793 -1.0820907 0.92812693 4.938385 4.4901426 -2.4023366 0.30135781 - 94000 28.842149 -1.3524969 1.1451109 4.3125908 4.6959035 -2.6747199 0.2254607 - 95000 27.862247 -1.2119045 1.0218976 4.2614082 4.4931316 -2.6902934 0.16345201 - 96000 27.084973 -0.93738328 1.3984324 4.5647189 4.4232205 -2.2834097 0.11217888 - 97000 27.587078 -0.89397255 0.78218462 3.8944421 4.3981479 -2.4205318 0.16570942 - 98000 27.981746 -1.2380545 0.84847869 4.311441 4.7340377 -2.4270441 0.023565612 - 99000 27.476625 -0.8569146 0.82550381 4.1656963 4.4064921 -2.4169708 0.160814 - 100000 26.121325 -0.63610855 1.0803389 4.9257118 4.7073263 -2.4010334 0.066303044 -Loop time of 2.693 on 4 procs for 100000 steps with 34 atoms - -Performance: 6416.646 ns/day, 0.004 hours/ns, 37133.367 timesteps/s -98.4% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.065478 | 0.2501 | 0.63682 | 45.6 | 9.29 -Bond | 0.066944 | 0.44772 | 0.88814 | 53.7 | 16.63 -Neigh | 0.0076509 | 0.0077319 | 0.0078275 | 0.1 | 0.29 -Comm | 0.57917 | 1.4166 | 1.9823 | 46.9 | 52.60 -Output | 0.0033755 | 0.0035856 | 0.0037644 | 0.2 | 0.13 -Modify | 0.03866 | 0.1366 | 0.23978 | 24.6 | 5.07 -Other | | 0.4306 | | | 15.99 - -Nlocal: 8.5 ave 15 max 2 min -Histogram: 1 1 0 0 0 0 0 0 1 1 -Nghost: 25.5 ave 32 max 19 min -Histogram: 1 1 0 0 0 0 0 0 1 1 -Neighs: 98.75 ave 257 max 18 min -Histogram: 1 1 1 0 0 0 0 0 0 1 - -Total # of neighbors = 395 -Ave neighs/atom = 11.6176 -Ave special neighs/atom = 9.52941 -Neighbor list builds = 294 -Dangerous builds = 0 -Total wall time: 0:00:02 diff --git a/src/MOLECULE/dihedral_charmmfsh.cpp b/src/MOLECULE/dihedral_charmmfsw.cpp similarity index 95% rename from src/MOLECULE/dihedral_charmmfsh.cpp rename to src/MOLECULE/dihedral_charmmfsw.cpp index 93c1853fe5..613170bbfa 100644 --- a/src/MOLECULE/dihedral_charmmfsh.cpp +++ b/src/MOLECULE/dihedral_charmmfsw.cpp @@ -21,7 +21,7 @@ #include #include #include -#include "dihedral_charmmfsh.h" +#include "dihedral_charmmfsw.h" #include "atom.h" #include "comm.h" #include "neighbor.h" @@ -40,7 +40,7 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -DihedralCharmmfsh::DihedralCharmmfsh(LAMMPS *lmp) : Dihedral(lmp) +DihedralCharmmfsw::DihedralCharmmfsw(LAMMPS *lmp) : Dihedral(lmp) { weightflag = 0; writedata = 1; @@ -48,7 +48,7 @@ DihedralCharmmfsh::DihedralCharmmfsh(LAMMPS *lmp) : Dihedral(lmp) /* ---------------------------------------------------------------------- */ -DihedralCharmmfsh::~DihedralCharmmfsh() +DihedralCharmmfsw::~DihedralCharmmfsw() { if (allocated && !copymode) { memory->destroy(setflag); @@ -63,7 +63,7 @@ DihedralCharmmfsh::~DihedralCharmmfsh() /* ---------------------------------------------------------------------- */ -void DihedralCharmmfsh::compute(int eflag, int vflag) +void DihedralCharmmfsw::compute(int eflag, int vflag) { int i1,i2,i3,i4,i,m,n,type; double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z,vb2xm,vb2ym,vb2zm; @@ -322,7 +322,7 @@ void DihedralCharmmfsh::compute(int eflag, int vflag) /* ---------------------------------------------------------------------- */ -void DihedralCharmmfsh::allocate() +void DihedralCharmmfsw::allocate() { allocated = 1; int n = atom->ndihedraltypes; @@ -342,7 +342,7 @@ void DihedralCharmmfsh::allocate() set coeffs for one type ------------------------------------------------------------------------- */ -void DihedralCharmmfsh::coeff(int narg, char **arg) +void DihedralCharmmfsw::coeff(int narg, char **arg) { if (narg != 5) error->all(FLERR,"Incorrect args for dihedral coefficients"); if (!allocated) allocate(); @@ -384,7 +384,7 @@ void DihedralCharmmfsh::coeff(int narg, char **arg) error check and initialize all values needed for force computation ------------------------------------------------------------------------- */ -void DihedralCharmmfsh::init_style() +void DihedralCharmmfsw::init_style() { // insure use of CHARMM pair_style if any weight factors are non-zero // set local ptrs to LJ 14 arrays setup by Pair @@ -392,14 +392,14 @@ void DihedralCharmmfsh::init_style() if (weightflag) { int itmp; if (force->pair == NULL) - error->all(FLERR,"Dihedral charmmfsh is incompatible with Pair style"); + error->all(FLERR,"Dihedral charmmfsw is incompatible with Pair style"); lj14_1 = (double **) force->pair->extract("lj14_1",itmp); lj14_2 = (double **) force->pair->extract("lj14_2",itmp); lj14_3 = (double **) force->pair->extract("lj14_3",itmp); lj14_4 = (double **) force->pair->extract("lj14_4",itmp); int *ptr = (int *) force->pair->extract("implicit",itmp); if (!lj14_1 || !lj14_2 || !lj14_3 || !lj14_4 || !ptr) - error->all(FLERR,"Dihedral charmmfsh is incompatible with Pair style"); + error->all(FLERR,"Dihedral charmmfsw is incompatible with Pair style"); implicit = *ptr; } @@ -414,7 +414,7 @@ void DihedralCharmmfsh::init_style() if (p_cutcoul == NULL || p_cutljinner == NULL || p_cutlj == NULL || p_dihedflag == NULL) - error->all(FLERR,"Dihedral charmmfsh is incompatible with Pair style"); + error->all(FLERR,"Dihedral charmmfsw is incompatible with Pair style"); dihedflag = *p_dihedflag; cut_coul14 = *p_cutcoul; @@ -433,7 +433,7 @@ void DihedralCharmmfsh::init_style() proc 0 writes out coeffs to restart file ------------------------------------------------------------------------- */ -void DihedralCharmmfsh::write_restart(FILE *fp) +void DihedralCharmmfsw::write_restart(FILE *fp) { fwrite(&k[1],sizeof(double),atom->ndihedraltypes,fp); fwrite(&multiplicity[1],sizeof(int),atom->ndihedraltypes,fp); @@ -446,7 +446,7 @@ void DihedralCharmmfsh::write_restart(FILE *fp) proc 0 reads coeffs from restart file, bcasts them ------------------------------------------------------------------------- */ -void DihedralCharmmfsh::read_restart(FILE *fp) +void DihedralCharmmfsw::read_restart(FILE *fp) { allocate(); @@ -474,7 +474,7 @@ void DihedralCharmmfsh::read_restart(FILE *fp) proc 0 writes to data file ------------------------------------------------------------------------- */ -void DihedralCharmmfsh::write_data(FILE *fp) +void DihedralCharmmfsw::write_data(FILE *fp) { for (int i = 1; i <= atom->ndihedraltypes; i++) fprintf(fp,"%d %g %d %d %g\n",i,k[i],multiplicity[i],shift[i],weight[i]); diff --git a/src/MOLECULE/dihedral_charmmfsh.h b/src/MOLECULE/dihedral_charmmfsw.h similarity index 84% rename from src/MOLECULE/dihedral_charmmfsh.h rename to src/MOLECULE/dihedral_charmmfsw.h index 44ea9b2658..ab0ccf675d 100644 --- a/src/MOLECULE/dihedral_charmmfsh.h +++ b/src/MOLECULE/dihedral_charmmfsw.h @@ -13,22 +13,22 @@ #ifdef DIHEDRAL_CLASS -DihedralStyle(charmmfsh,DihedralCharmmfsh) +DihedralStyle(charmmfsw,DihedralCharmmfsw) #else -#ifndef LMP_DIHEDRAL_CHARMMFSH_H -#define LMP_DIHEDRAL_CHARMMFSH_H +#ifndef LMP_DIHEDRAL_CHARMMFSW_H +#define LMP_DIHEDRAL_CHARMMFSW_H #include #include "dihedral.h" namespace LAMMPS_NS { -class DihedralCharmmfsh : public Dihedral { +class DihedralCharmmfsw : public Dihedral { public: - DihedralCharmmfsh(class LAMMPS *); - virtual ~DihedralCharmmfsh(); + DihedralCharmmfsw(class LAMMPS *); + virtual ~DihedralCharmmfsw(); virtual void compute(int, int); virtual void coeff(int, char **); virtual void init_style(); @@ -73,9 +73,9 @@ E: Incorrect weight arg for dihedral coefficients Self-explanatory. Check the input script or data file. -E: Dihedral charmmfsh is incompatible with Pair style +E: Dihedral charmmfsw is incompatible with Pair style -Dihedral style charmmfsh must be used with a pair style charmm +Dihedral style charmmfsw must be used with a pair style charmm in order for the 1-4 epsilon/sigma parameters to be defined. */ diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 07559c7719..bc7aa843ef 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -186,10 +186,10 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL) memory->create(adapt[m].array_orig,n+1,n+1,"adapt:array_orig"); // allocate bond style arrays: + n = atom->nbondtypes; for (int m = 0; m < nadapt; ++m) if (adapt[m].which == BOND) - // For now just use same storage and fake it to be one-dimensional: memory->create(adapt[m].vector_orig,n+1,"adapt:vector_orig"); } @@ -389,7 +389,6 @@ void FixAdapt::init() } else if (ad->which == BOND){ ad->bond = NULL; anybond = 1; - // Use same routines from pair to strip any suffices: int n = strlen(ad->bstyle) + 1; char *bstyle = new char[n]; @@ -404,7 +403,6 @@ void FixAdapt::init() ad->bond = force->bond_match(bsuffix); delete [] bsuffix; } - // If not set grab regular one instead: if (ad->bond == NULL) ad->bond = force->bond_match(bstyle); if (ad->bond == NULL ) error->all(FLERR,"Fix adapt bond style does not exist"); @@ -414,7 +412,7 @@ void FixAdapt::init() if (ptr == NULL) error->all(FLERR,"Fix adapt bond style param not supported"); - // For bond styles you should use a vector + // for bond styles, use a vector if (ad->bdim == 1) ad->vector = (double *) ptr; @@ -449,10 +447,10 @@ void FixAdapt::init() for (i = ad->ilo; i <= ad->ihi; i++) for (j = MAX(ad->jlo,i); j <= ad->jhi; j++) ad->array_orig[i][j] = ad->array[i][j]; - }else if (ad->which == PAIR && ad->pdim == 0){ + } else if (ad->which == PAIR && ad->pdim == 0){ ad->scalar_orig = *ad->scalar; - }else if (ad->which == BOND && ad->bdim == 1){ + } else if (ad->which == BOND && ad->bdim == 1){ for (i = ad->ilo; i <= ad->ihi; ++i ) ad->vector_orig[i] = ad->vector[i]; } @@ -612,8 +610,10 @@ void FixAdapt::change_settings() modify->addstep_compute(update->ntimestep + nevery); // re-initialize pair styles if any PAIR settings were changed + // ditto for bond styles if any BOND setitings were changes // this resets other coeffs that may depend on changed values, - // and also offset and tail corrections + // and also offset and tail corrections + if (anypair) { for (int m = 0; m < nadapt; m++) { Adapt *ad = &adapt[m]; diff --git a/src/version.h b/src/version.h index 0d5dc11b4a..e6ffb22dc0 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "31 Mar 2017" +#define LAMMPS_VERSION "11 Apr 2017" -- GitLab From 9a027a01daf819a18db1dc20c03b4578088a7809 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Tue, 11 Apr 2017 20:24:42 -0400 Subject: [PATCH 026/593] Add Python 3 compatibility to PYTHON package --- examples/python/funcs.py | 6 +++-- examples/python/in.python | 9 ++++--- lib/python/Makefile.lammps.python3 | 6 +++++ lib/python/README | 4 --- python/lammps.py | 17 +++++++++---- src/PYTHON/python.cpp | 39 ++++++++++++++++++++++++------ 6 files changed, 58 insertions(+), 23 deletions(-) create mode 100644 lib/python/Makefile.lammps.python3 diff --git a/examples/python/funcs.py b/examples/python/funcs.py index 2f4830676e..f38aca53f2 100644 --- a/examples/python/funcs.py +++ b/examples/python/funcs.py @@ -1,9 +1,10 @@ # Python function that implements a loop of short runs # calls back to LAMMPS via "lmp" instance # lammps() must be called with ptr=lmpptr for this to work +from __future__ import print_function def loop(N,cut0,thresh,lmpptr): - print "LOOP ARGS",N,cut0,thresh,lmpptr + print("LOOP ARGS",N,cut0,thresh,lmpptr) from lammps import lammps lmp = lammps(ptr=lmpptr) natoms = lmp.get_natoms() @@ -12,11 +13,12 @@ def loop(N,cut0,thresh,lmpptr): cut = cut0 + i*0.1 lmp.set_variable("cut",cut) # set a variable in LAMMPS + lmp.command("pair_style lj/cut ${cut}") # LAMMPS command #lmp.command("pair_style lj/cut %d" % cut) # LAMMPS command option lmp.command("pair_coeff * * 1.0 1.0") # ditto lmp.command("run 10") # ditto pe = lmp.extract_compute("thermo_pe",0,0) # extract total PE from LAMMPS - print "PE",pe/natoms,thresh + print("PE",pe/natoms,thresh) if pe/natoms < thresh: return diff --git a/examples/python/in.python b/examples/python/in.python index cb2013fdd3..c5aa504d43 100644 --- a/examples/python/in.python +++ b/examples/python/in.python @@ -25,13 +25,14 @@ run 10 # example of catching a syntax error python simple here """ +from __future__ import print_function + def simple(): - import exceptions - print "Inside simple function" + print("Inside simple function") try: foo += 1 - except Exception, e: - print "FOO error:",e + except Exception as e: + print("FOO error:", e) """ python simple invoke diff --git a/lib/python/Makefile.lammps.python3 b/lib/python/Makefile.lammps.python3 new file mode 100644 index 0000000000..1d5d5f2d81 --- /dev/null +++ b/lib/python/Makefile.lammps.python3 @@ -0,0 +1,6 @@ +# Settings that the LAMMPS build will import when this package library is used +# See the README file for more explanation + +python_SYSINC = $(shell which python3-config > /dev/null 2>&1 && python3-config --includes || python-config --includes ) +python_SYSLIB = $(shell which python3-config > /dev/null 2>&1 && python3-config --ldflags || python-config --ldflags) +python_SYSPATH = diff --git a/lib/python/README b/lib/python/README index ddccc1a21a..077c2547d2 100644 --- a/lib/python/README +++ b/lib/python/README @@ -6,10 +6,6 @@ and your version of Python, and copy it to Makefile.lammps before building LAMMPS itself. You may need to edit one of the provided files to match your system. -Note that is not currently possible to use the PYTHON package with -Python 3, only with Python 2. The C API changed from Python 2 to 3 -and the LAMMPS code is not compatible with both. - If you create a new Makefile.lammps file suitable for some version of Python on some system, that is not a match to one of the provided Makefile.lammps.* files, you can send it to the developers, and we can diff --git a/python/lammps.py b/python/lammps.py index a36abb87e8..d428a097a8 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -30,7 +30,7 @@ from collections import namedtuple import os import select import re - +import sys class MPIAbortException(Exception): def __init__(self, message): @@ -151,9 +151,16 @@ class lammps(object): else: # magic to convert ptr to ctypes ptr - pythonapi.PyCObject_AsVoidPtr.restype = c_void_p - pythonapi.PyCObject_AsVoidPtr.argtypes = [py_object] - self.lmp = c_void_p(pythonapi.PyCObject_AsVoidPtr(ptr)) + if sys.version_info >= (3, 0): + # Python 3 (uses PyCapsule API) + pythonapi.PyCapsule_GetPointer.restype = c_void_p + pythonapi.PyCapsule_GetPointer.argtypes = [py_object, c_char_p] + self.lmp = c_void_p(pythonapi.PyCapsule_GetPointer(ptr, None)) + else: + # Python 2 (uses PyCObject API) + pythonapi.PyCObject_AsVoidPtr.restype = c_void_p + pythonapi.PyCObject_AsVoidPtr.argtypes = [py_object] + self.lmp = c_void_p(pythonapi.PyCObject_AsVoidPtr(ptr)) def __del__(self): if self.lmp and self.opened: @@ -305,7 +312,7 @@ class lammps(object): def set_variable(self,name,value): if name: name = name.encode() if value: value = str(value).encode() - return self.lib.lammps_set_variable(self.lmp,name,str(value)) + return self.lib.lammps_set_variable(self.lmp,name,value) # return current value of thermo keyword diff --git a/src/PYTHON/python.cpp b/src/PYTHON/python.cpp index 74591c1c16..c465086f63 100644 --- a/src/PYTHON/python.cpp +++ b/src/PYTHON/python.cpp @@ -25,6 +25,22 @@ enum{NONE,INT,DOUBLE,STRING,PTR}; #define VALUELENGTH 64 // also in variable.cpp +// Wrap API changes between Python 2 and 3 using macros +#if PY_MAJOR_VERSION == 2 +#define PY_INT_FROM_LONG(X) PyInt_FromLong(X) +#define PY_INT_AS_LONG(X) PyInt_AsLong(X) +#define PY_STRING_FROM_STRING(X) PyString_FromString(X) +#define PY_VOID_POINTER(X) PyCObject_FromVoidPtr((void *) X, NULL) +#define PY_STRING_AS_STRING(X) PyString_AsString(X) + +#elif PY_MAJOR_VERSION == 3 +#define PY_INT_FROM_LONG(X) PyLong_FromLong(X) +#define PY_INT_AS_LONG(X) PyLong_AsLong(X) +#define PY_STRING_FROM_STRING(X) PyUnicode_FromString(X) +#define PY_VOID_POINTER(X) PyCapsule_New((void *) X, NULL, NULL) +#define PY_STRING_AS_STRING(X) PyUnicode_AsUTF8(X) +#endif + /* ---------------------------------------------------------------------- */ Python::Python(LAMMPS *lmp) : Pointers(lmp) @@ -257,8 +273,10 @@ void Python::invoke_function(int ifunc, char *result) error->all(FLERR,"Could not evaluate Python function input variable"); } - pValue = PyInt_FromLong(atoi(str)); - } else pValue = PyInt_FromLong(pfuncs[ifunc].ivalue[i]); + pValue = PY_INT_FROM_LONG(atoi(str)); + } else { + pValue = PY_INT_FROM_LONG(pfuncs[ifunc].ivalue[i]); + } } else if (itype == DOUBLE) { if (pfuncs[ifunc].ivarflag[i]) { str = input->variable->retrieve(pfuncs[ifunc].svalue[i]); @@ -269,7 +287,9 @@ void Python::invoke_function(int ifunc, char *result) } pValue = PyFloat_FromDouble(atof(str)); - } else pValue = PyFloat_FromDouble(pfuncs[ifunc].dvalue[i]); + } else { + pValue = PyFloat_FromDouble(pfuncs[ifunc].dvalue[i]); + } } else if (itype == STRING) { if (pfuncs[ifunc].ivarflag[i]) { str = input->variable->retrieve(pfuncs[ifunc].svalue[i]); @@ -277,10 +297,13 @@ void Python::invoke_function(int ifunc, char *result) PyGILState_Release(gstate); error->all(FLERR,"Could not evaluate Python function input variable"); } - pValue = PyString_FromString(str); - } else pValue = PyString_FromString(pfuncs[ifunc].svalue[i]); + + pValue = PY_STRING_FROM_STRING(str); + } else { + pValue = PY_STRING_FROM_STRING(pfuncs[ifunc].svalue[i]); + } } else if (itype == PTR) { - pValue = PyCObject_FromVoidPtr((void *) lmp,NULL); + pValue = PY_VOID_POINTER(lmp); } PyTuple_SetItem(pArgs,i,pValue); } @@ -304,11 +327,11 @@ void Python::invoke_function(int ifunc, char *result) if (pfuncs[ifunc].noutput) { int otype = pfuncs[ifunc].otype; if (otype == INT) { - sprintf(result,"%ld",PyInt_AsLong(pValue)); + sprintf(result,"%ld",PY_INT_AS_LONG(pValue)); } else if (otype == DOUBLE) { sprintf(result,"%.15g",PyFloat_AsDouble(pValue)); } else if (otype == STRING) { - char *pystr = PyString_AsString(pValue); + char *pystr = PY_STRING_AS_STRING(pValue); if (pfuncs[ifunc].longstr) strncpy(pfuncs[ifunc].longstr,pystr,pfuncs[ifunc].length_longstr); else strncpy(result,pystr,VALUELENGTH-1); -- GitLab From 2d8bce78a6462e6c1a93496dab29eac66a610e22 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Tue, 11 Apr 2017 21:22:30 -0400 Subject: [PATCH 027/593] Refactor PYTHON package and wrapper classes --- src/.gitignore | 4 +- src/PYTHON/Install.sh | 8 +- src/PYTHON/{python.cpp => python_impl.cpp} | 20 ++-- src/PYTHON/python_impl.h | 130 +++++++++++++++++++++ src/lammps.cpp | 8 ++ src/lammps.h | 2 + src/pointers.h | 4 +- src/python.cpp | 99 ++++++++++++++++ src/{PYTHON => }/python.h | 54 ++++----- src/variable.cpp | 11 +- src/variable.h | 2 - 11 files changed, 282 insertions(+), 60 deletions(-) rename src/PYTHON/{python.cpp => python_impl.cpp} (97%) create mode 100644 src/PYTHON/python_impl.h create mode 100644 src/python.cpp rename src/{PYTHON => }/python.h (84%) diff --git a/src/.gitignore b/src/.gitignore index 97bc2276b0..bb6f0a392e 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -846,8 +846,8 @@ /pppm_tip4p_cg.h /prd.cpp /prd.h -/python.cpp -/python.h +/python_impl.cpp +/python_impl.h /reader_molfile.cpp /reader_molfile.h /reaxc_allocate.cpp diff --git a/src/PYTHON/Install.sh b/src/PYTHON/Install.sh index 71288cf377..50ca3dffc4 100755 --- a/src/PYTHON/Install.sh +++ b/src/PYTHON/Install.sh @@ -26,16 +26,14 @@ action () { fi } -# force rebuild of files with LMP_KOKKOS switch -# also variable so its *.d dependence on changed python_wrapper.h is rebuilt +# force rebuild of files using python header -touch ../python_wrapper.h -touch ../variable.cpp +touch ../python.h # all package files with no dependencies for file in *.cpp *.h; do - test -f ${file} && action $file + action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/PYTHON/python.cpp b/src/PYTHON/python_impl.cpp similarity index 97% rename from src/PYTHON/python.cpp rename to src/PYTHON/python_impl.cpp index c465086f63..d9abb75f13 100644 --- a/src/PYTHON/python.cpp +++ b/src/PYTHON/python_impl.cpp @@ -43,10 +43,8 @@ enum{NONE,INT,DOUBLE,STRING,PTR}; /* ---------------------------------------------------------------------- */ -Python::Python(LAMMPS *lmp) : Pointers(lmp) +PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp) { - python_exists = 1; - pyMain = NULL; // pfuncs stores interface info for each Python function @@ -59,7 +57,7 @@ Python::Python(LAMMPS *lmp) : Pointers(lmp) /* ---------------------------------------------------------------------- */ -Python::~Python() +PythonImpl::~PythonImpl() { // clean up PyGILState_STATE gstate = PyGILState_Ensure(); @@ -85,7 +83,7 @@ Python::~Python() /* ---------------------------------------------------------------------- */ -void Python::command(int narg, char **arg) +void PythonImpl::command(int narg, char **arg) { if (narg < 2) error->all(FLERR,"Invalid python command"); @@ -244,7 +242,7 @@ void Python::command(int narg, char **arg) /* ------------------------------------------------------------------ */ -void Python::invoke_function(int ifunc, char *result) +void PythonImpl::invoke_function(int ifunc, char *result) { PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *pValue; @@ -344,7 +342,7 @@ void Python::invoke_function(int ifunc, char *result) /* ------------------------------------------------------------------ */ -int Python::find(char *name) +int PythonImpl::find(char *name) { for (int i = 0; i < nfunc; i++) if (strcmp(name,pfuncs[i].name) == 0) return i; @@ -353,7 +351,7 @@ int Python::find(char *name) /* ------------------------------------------------------------------ */ -int Python::variable_match(char *name, char *varname, int numeric) +int PythonImpl::variable_match(char *name, char *varname, int numeric) { int ifunc = find(name); if (ifunc < 0) return -1; @@ -365,14 +363,14 @@ int Python::variable_match(char *name, char *varname, int numeric) /* ------------------------------------------------------------------ */ -char *Python::long_string(int ifunc) +char *PythonImpl::long_string(int ifunc) { return pfuncs[ifunc].longstr; } /* ------------------------------------------------------------------ */ -int Python::create_entry(char *name) +int PythonImpl::create_entry(char *name) { // ifunc = index to entry by name in pfuncs vector, can be old or new // free old vectors if overwriting old pfunc @@ -482,7 +480,7 @@ int Python::create_entry(char *name) /* ------------------------------------------------------------------ */ -void Python::deallocate(int i) +void PythonImpl::deallocate(int i) { delete [] pfuncs[i].itype; delete [] pfuncs[i].ivarflag; diff --git a/src/PYTHON/python_impl.h b/src/PYTHON/python_impl.h new file mode 100644 index 0000000000..07975b3fdf --- /dev/null +++ b/src/PYTHON/python_impl.h @@ -0,0 +1,130 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef LMP_PYTHON_IMPL_H +#define LMP_PYTHON_IMPL_H + +#include "pointers.h" + +namespace LAMMPS_NS { + +class PythonImpl : protected Pointers, public PythonInterface { + public: + bool external_interpreter; + + PythonImpl(class LAMMPS *); + ~PythonImpl(); + void command(int, char **); + void invoke_function(int, char *); + int find(char *); + int variable_match(char *, char *, int); + char *long_string(int); + + private: + int ninput,noutput,length_longstr; + char **istr; + char *ostr,*format; + void *pyMain; + + struct PyFunc { + char *name; + int ninput,noutput; + int *itype,*ivarflag; + int *ivalue; + double *dvalue; + char **svalue; + int otype; + char *ovarname; + char *longstr; + int length_longstr; + void *pFunc; + }; + + PyFunc *pfuncs; + int nfunc; + + int create_entry(char *); + void deallocate(int); +}; + +} + +#endif + +/* ERROR/WARNING messages: + +E: Invalid python command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +E: Python invoke of undefined function + +Cannot invoke a function that has not been previously defined. + +E: Python variable does not match Python function + +This matching is defined by the python-style variable and the python +command. + +E: Cannot embed Python when also extending Python with LAMMPS + +When running LAMMPS via Python through the LAMMPS library interface +you cannot also user the input script python command. + +E: Could not initialize embedded Python + +The main module in Python was not accessible. + +E: Could not open Python file + +The specified file of Python code cannot be opened. Check that the +path and name are correct. + +E: Could not process Python file + +The Python code in the specified file was not run successfully by +Python, probably due to errors in the Python code. + +E: Could not process Python string + +The Python code in the here string was not run successfully by Python, +probably due to errors in the Python code. + +E: Could not find Python function + +The provided Python code was run successfully, but it not +define a callable function with the required name. + +E: Python function is not callable + +The provided Python code was run successfully, but it not +define a callable function with the required name. + +E: Could not create Python function arguments + +This is an internal Python error, possibly because the number +of inputs to the function is too large. + +E: Could not evaluate Python function input variable + +Self-explanatory. + +E: Python function evaluation failed + +The Python function did not run successfully and/or did not return a +value (if it is supposed to return a value). This is probably due to +some error condition in the function. + +*/ diff --git a/src/lammps.cpp b/src/lammps.cpp index cc3133f2d9..bde7ca035d 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -45,6 +45,7 @@ #include "accelerator_kokkos.h" #include "accelerator_omp.h" #include "timer.h" +#include "python.h" #include "memory.h" #include "version.h" #include "error.h" @@ -67,6 +68,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) error = new Error(this); universe = new Universe(this,communicator); output = NULL; + python = NULL; screen = NULL; logfile = NULL; @@ -585,6 +587,7 @@ LAMMPS::~LAMMPS() if (world != universe->uworld) MPI_Comm_free(&world); + delete python; delete kokkos; delete [] suffix; delete [] suffix2; @@ -639,6 +642,8 @@ void LAMMPS::create() // must be after modify so can create Computes update = new Update(this); // must be after output, force, neighbor timer = new Timer(this); + + python = new Python(this); } /* ---------------------------------------------------------------------- @@ -759,6 +764,9 @@ void LAMMPS::destroy() delete timer; timer = NULL; + + delete python; + python = NULL; } /* ---------------------------------------------------------------------- diff --git a/src/lammps.h b/src/lammps.h index 02490a1836..c432784a0b 100644 --- a/src/lammps.h +++ b/src/lammps.h @@ -54,6 +54,8 @@ class LAMMPS { class KokkosLMP *kokkos; // KOKKOS accelerator class class AtomKokkos *atomKK; // KOKKOS version of Atom class + class Python * python; // Python interface + class CiteMe *citeme; // citation info LAMMPS(int, char **, MPI_Comm); diff --git a/src/pointers.h b/src/pointers.h index dd528c3a74..82b49c1dad 100644 --- a/src/pointers.h +++ b/src/pointers.h @@ -56,7 +56,8 @@ class Pointers { infile(ptr->infile), screen(ptr->screen), logfile(ptr->logfile), - atomKK(ptr->atomKK) {} + atomKK(ptr->atomKK), + python(ptr->python) {} virtual ~Pointers() {} protected: @@ -83,6 +84,7 @@ class Pointers { FILE *&logfile; class AtomKokkos *&atomKK; + class Python *&python; }; } diff --git a/src/python.cpp b/src/python.cpp new file mode 100644 index 0000000000..da3a874315 --- /dev/null +++ b/src/python.cpp @@ -0,0 +1,99 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "python.h" +#include "error.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +Python::Python(LAMMPS *lmp) : Pointers(lmp) +{ + // implementation of Python interface is only loaded on demand + // and only if PYTHON package has been installed and compiled into binary + impl = NULL; +} + +/* ---------------------------------------------------------------------- */ + +Python::~Python() +{ + delete impl; +} + +/* ---------------------------------------------------------------------- */ + +PythonInterface::~PythonInterface() +{ +} + +/* ---------------------------------------------------------------------- */ + +void Python::init() +{ +#if LMP_PYTHON + impl = new PythonImpl(lmp); +#else + error->all(FLERR,"Python support missing! Compile with PYTHON package installed!"); +#endif +} + +/* ---------------------------------------------------------------------- */ +bool Python::is_enabled() const { +#if LMP_PYTHON + return true; +#else + return false; +#endif +} + +/* ---------------------------------------------------------------------- */ + +void Python::command(int narg, char **arg) +{ + if(!impl) init(); + impl->command(narg, arg); +} + +/* ------------------------------------------------------------------ */ + +void Python::invoke_function(int ifunc, char *result) +{ + if(!impl) init(); + impl->invoke_function(ifunc, result); +} + +/* ------------------------------------------------------------------ */ + +int Python::find(char *name) +{ + if(!impl) init(); + return impl->find(name); +} + +/* ------------------------------------------------------------------ */ + +int Python::variable_match(char *name, char *varname, int numeric) +{ + if(!impl) init(); + return impl->variable_match(name, varname, numeric); +} + +/* ------------------------------------------------------------------ */ + +char * Python::long_string(int ifunc) +{ + if(!impl) init(); + return impl->long_string(ifunc); +} diff --git a/src/PYTHON/python.h b/src/python.h similarity index 84% rename from src/PYTHON/python.h rename to src/python.h index 78889b994f..0b504f8944 100644 --- a/src/PYTHON/python.h +++ b/src/python.h @@ -18,50 +18,42 @@ namespace LAMMPS_NS { -class Python : protected Pointers { - public: - int python_exists; - bool external_interpreter; +class PythonInterface { +public: + virtual ~PythonInterface(); + virtual void command(int, char **) = 0; + virtual void invoke_function(int, char *) = 0; + virtual int find(char *) = 0; + virtual int variable_match(char *, char *, int) = 0; + virtual char * long_string(int ifunc) = 0; +}; +class Python : protected Pointers { +public: Python(class LAMMPS *); ~Python(); + void command(int, char **); void invoke_function(int, char *); int find(char *); int variable_match(char *, char *, int); - char *long_string(int); - - private: - int ninput,noutput,length_longstr; - char **istr; - char *ostr,*format; - void *pyMain; - - struct PyFunc { - char *name; - int ninput,noutput; - int *itype,*ivarflag; - int *ivalue; - double *dvalue; - char **svalue; - int otype; - char *ovarname; - char *longstr; - int length_longstr; - void *pFunc; - }; - - PyFunc *pfuncs; - int nfunc; - - int create_entry(char *); - void deallocate(int); + char * long_string(int ifunc); + + bool is_enabled() const; + +private: + PythonInterface * impl; + void init(); }; } #endif +#if LMP_PYTHON +#include "python_impl.h" +#endif + /* ERROR/WARNING messages: E: Invalid python command diff --git a/src/variable.cpp b/src/variable.cpp index 3eea50a463..6e16597c63 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -34,7 +34,7 @@ #include "random_mars.h" #include "math_const.h" #include "atom_masks.h" -#include "python_wrapper.h" +#include "python.h" #include "memory.h" #include "info.h" #include "error.h" @@ -111,10 +111,6 @@ Variable::Variable(LAMMPS *lmp) : Pointers(lmp) precedence[MULTIPLY] = precedence[DIVIDE] = precedence[MODULO] = 6; precedence[CARAT] = 7; precedence[UNARY] = precedence[NOT] = 8; - - // Python wrapper, real or dummy - - python = new Python(lmp); } /* ---------------------------------------------------------------------- */ @@ -144,7 +140,6 @@ Variable::~Variable() delete randomequal; delete randomatom; - delete python; } /* ---------------------------------------------------------------------- @@ -464,7 +459,7 @@ void Variable::set(int narg, char **arg) } else if (strcmp(arg[1],"python") == 0) { if (narg != 3) error->all(FLERR,"Illegal variable command"); - if (!python->python_exists) + if (!python->is_enabled()) error->all(FLERR,"LAMMPS is not built with Python embedded"); int ivar = find(arg[0]); if (ivar >= 0) { @@ -735,7 +730,7 @@ void Variable::set_arrays(int i) void Variable::python_command(int narg, char **arg) { - if (!python->python_exists) + if (!python->is_enabled()) error->all(FLERR,"LAMMPS is not built with Python embedded"); python->command(narg,arg); } diff --git a/src/variable.h b/src/variable.h index 76607e96b4..886dd7b422 100644 --- a/src/variable.h +++ b/src/variable.h @@ -78,8 +78,6 @@ class Variable : protected Pointers { int precedence[18]; // precedence level of math operators // set length to include up to XOR in enum - class Python *python; // ptr to embedded Python interpreter - struct Tree { // parse tree for atom-style or vector-style vars double value; // single scalar double *array; // per-atom or per-type list of doubles -- GitLab From 05d7bc556ff51f191683006b0f1be3716df58128 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Tue, 11 Apr 2017 21:46:33 -0400 Subject: [PATCH 028/593] Initialize Python interpreter in PythonImpl constructor --- src/PYTHON/python_impl.cpp | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index d9abb75f13..0c671c0cc7 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -45,14 +45,26 @@ enum{NONE,INT,DOUBLE,STRING,PTR}; PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp) { - pyMain = NULL; - // pfuncs stores interface info for each Python function nfunc = 0; pfuncs = NULL; - external_interpreter = false; + // one-time initialization of Python interpreter + // pymain stores pointer to main module + external_interpreter = Py_IsInitialized(); + + Py_Initialize(); + PyEval_InitThreads(); + + PyGILState_STATE gstate = PyGILState_Ensure(); + + PyObject *pModule = PyImport_AddModule("__main__"); + if (!pModule) error->all(FLERR,"Could not initialize embedded Python"); + + pyMain = (void *) pModule; + + PyGILState_Release(gstate); } /* ---------------------------------------------------------------------- */ @@ -168,22 +180,7 @@ void PythonImpl::command(int narg, char **arg) int ifunc = create_entry(arg[0]); - // one-time initialization of Python interpreter - // pymain stores pointer to main module - PyGILState_STATE gstate; - - if (pyMain == NULL) { - external_interpreter = Py_IsInitialized(); - Py_Initialize(); - PyEval_InitThreads(); - gstate = PyGILState_Ensure(); - - PyObject *pModule = PyImport_AddModule("__main__"); - if (!pModule) error->all(FLERR,"Could not initialize embedded Python"); - pyMain = (void *) pModule; - } else { - gstate = PyGILState_Ensure(); - } + PyGILState_STATE gstate = PyGILState_Ensure(); // send Python code to Python interpreter // file: read the file via PyRun_SimpleFile() -- GitLab From 3fa9f0a27bdab6597980622d101350b658387197 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Tue, 11 Apr 2017 21:51:21 -0400 Subject: [PATCH 029/593] Delete python_wrapper.h --- src/python_wrapper.h | 47 -------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 src/python_wrapper.h diff --git a/src/python_wrapper.h b/src/python_wrapper.h deleted file mode 100644 index 97d7de31ef..0000000000 --- a/src/python_wrapper.h +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifndef LMP_PYTHON_WRAPPER_H -#define LMP_PYTHON_WRAPPER_H - -// true interface to embedded Python -// used when PYTHON package is installed - -#ifdef LMP_PYTHON - -#include "python.h" - -#else - -// dummy interface to PYTHON -// needed for compiling when PYTHON is not installed - -namespace LAMMPS_NS { - -class Python { - public: - int python_exists; - - Python(class LAMMPS *) {python_exists = 0;} - ~Python() {} - void command(int, char **) {} - void invoke_function(int, char *) {} - int find(char *) {return -1;} - int variable_match(char *, char *, int) {return -1;} - char *long_string(int) {return NULL;} -}; - -} - -#endif -#endif -- GitLab From 961096f9df1e3fdb29322d316a688f9d13947052 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 12 Apr 2017 11:17:15 -0400 Subject: [PATCH 030/593] Prevent segfault if Python was never initialized --- src/PYTHON/python.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/PYTHON/python.cpp b/src/PYTHON/python.cpp index 74591c1c16..c2ff7f03c7 100644 --- a/src/PYTHON/python.cpp +++ b/src/PYTHON/python.cpp @@ -45,23 +45,25 @@ Python::Python(LAMMPS *lmp) : Pointers(lmp) Python::~Python() { - // clean up - PyGILState_STATE gstate = PyGILState_Ensure(); - - for (int i = 0; i < nfunc; i++) { - delete [] pfuncs[i].name; - deallocate(i); - PyObject *pFunc = (PyObject *) pfuncs[i].pFunc; - Py_XDECREF(pFunc); - } + if(pyMain) { + // clean up + PyGILState_STATE gstate = PyGILState_Ensure(); + + for (int i = 0; i < nfunc; i++) { + delete [] pfuncs[i].name; + deallocate(i); + PyObject *pFunc = (PyObject *) pfuncs[i].pFunc; + Py_XDECREF(pFunc); + } - // shutdown Python interpreter + // shutdown Python interpreter - if (pyMain && !external_interpreter) { - Py_Finalize(); - } - else { - PyGILState_Release(gstate); + if (!external_interpreter) { + Py_Finalize(); + } + else { + PyGILState_Release(gstate); + } } memory->sfree(pfuncs); -- GitLab From 2f32fb7f8bda59f8044dda41bd86ab1a6f5db515 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 13 Apr 2017 11:19:48 -0600 Subject: [PATCH 031/593] patch 13Apr17 --- doc/src/Manual.txt | 4 +- examples/cmap/log.11Apr17.cmap.g++.1 | 205 +++++++++++++++++++++++++++ examples/cmap/log.11Apr17.cmap.g++.4 | 205 +++++++++++++++++++++++++++ src/KOKKOS/verlet_kokkos.cpp | 15 +- src/KOKKOS/verlet_kokkos.h | 2 +- src/MC/fix_gcmc.cpp | 9 +- src/MC/fix_gcmc.h | 2 +- src/version.h | 2 +- 8 files changed, 429 insertions(+), 15 deletions(-) create mode 100644 examples/cmap/log.11Apr17.cmap.g++.1 create mode 100644 examples/cmap/log.11Apr17.cmap.g++.4 diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index a5a874fa8b..a6bc459530 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -1,7 +1,7 @@ LAMMPS Users Manual - + @@ -21,7 +21,7 @@

LAMMPS Documentation :c,h3 -11 Apr 2017 version :c,h4 +13 Apr 2017 version :c,h4 Version info: :h4 diff --git a/examples/cmap/log.11Apr17.cmap.g++.1 b/examples/cmap/log.11Apr17.cmap.g++.1 new file mode 100644 index 0000000000..9b4fc29991 --- /dev/null +++ b/examples/cmap/log.11Apr17.cmap.g++.1 @@ -0,0 +1,205 @@ +LAMMPS (31 Mar 2017) +# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016 + +units real +neigh_modify delay 2 every 1 +#newton off + +boundary p p p + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmmfsw +improper_style harmonic + +pair_style lj/charmmfsw/coul/charmmfsh 8 12 +pair_modify mix arithmetic + +fix cmap all cmap charmm22.cmap +Reading potential file charmm22.cmap with DATE: 2016-09-26 +fix_modify cmap energy yes + +read_data gagg.data fix cmap crossterm CMAP + orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 34 atoms + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 12 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 33 bonds + reading angles ... + 57 angles + reading dihedrals ... + 75 dihedrals + reading impropers ... + 7 impropers + 4 = max # of 1-2 neighbors + 7 = max # of 1-3 neighbors + 13 = max # of 1-4 neighbors + 16 = max # of special neighbors + +special_bonds charmm +fix 1 all nve + +#fix 1 all nvt temp 300 300 100.0 +#fix 2 all shake 1e-9 500 0 m 1.0 + +velocity all create 0.0 12345678 dist uniform + +thermo 1000 +thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp +timestep 2.0 + +run 100000 +Neighbor list info ... + update every 1 steps, delay 2 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmmfsw/coul/charmmfsh, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 14.96 | 14.96 | 14.96 Mbytes +Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro + 0 16.287573 -0.85933785 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023 + 1000 18.816462 -0.84379243 0.78931817 2.7554247 4.4371421 -2.7762038 0.12697656 + 2000 18.091571 -1.045888 0.72306589 3.0951524 4.6725102 -2.3580092 0.22712496 + 3000 17.835596 -1.2171641 0.72666403 2.6696491 5.4373798 -2.0737041 0.075101693 + 4000 16.211232 -0.42713611 0.99472642 3.8961462 5.2009895 -2.5626866 0.17356243 + 5000 17.72183 -0.57081189 0.90733068 3.4376382 4.5457582 -2.3727543 0.12354518 + 6000 18.753977 -1.5772499 0.81468321 2.9236782 4.6033216 -2.3380859 0.12835782 + 7000 18.186024 -0.84205608 0.58996182 3.0329585 4.7221473 -2.5733243 0.10047631 + 8000 18.214306 -1.1360938 0.72597611 3.7493028 4.7319958 -2.8957969 0.2006046 + 9000 17.248408 -0.48641993 0.90266229 2.9721743 4.7651056 -2.1473354 0.1302043 + 10000 17.760655 -1.2968444 0.92384663 3.7007455 4.7378947 -2.2147779 0.06940579 + 11000 17.633929 -0.57368413 0.84872849 3.4277114 4.285393 -2.236944 0.17204973 + 12000 18.305835 -1.0675148 0.75879532 2.8853173 4.685027 -2.409087 0.087538866 + 13000 17.391558 -0.9975291 0.66671947 3.8065638 5.2285578 -2.4198822 0.06253594 + 14000 17.483387 -0.67727643 0.91966477 3.7317031 4.7770445 -2.6080027 0.11487095 + 15000 18.131749 -1.1918751 1.0025684 3.1238131 4.789742 -2.2546745 0.13782813 + 16000 16.972343 -0.43926531 0.60644597 3.7551592 4.8658618 -2.2627659 0.12353145 + 17000 18.080785 -1.2073565 0.7867072 3.5671106 4.43754 -2.5092904 0.17429146 + 18000 17.474576 -0.97836065 0.8678524 3.7961537 4.3409032 -1.8922572 0.134048 + 19000 17.000911 -1.2286864 0.83615834 3.9322908 4.9319492 -2.3281576 0.056689619 + 20000 17.043286 -0.8506561 0.80966589 3.5087339 4.8603878 -2.3365263 0.096794824 + 21000 17.314495 -1.1430889 0.95363892 4.2446032 4.2756745 -2.1829483 0.17119518 + 22000 18.954881 -0.998673 0.58688334 2.71536 4.6634319 -2.6862804 0.20328442 + 23000 17.160427 -0.97803282 0.86894041 4.0897736 4.3146238 -2.1962289 0.075339092 + 24000 17.602026 -1.0833323 0.94888776 3.7341878 4.3084335 -2.1640414 0.081493681 + 25000 17.845584 -1.3432612 0.93497086 3.8911043 4.468032 -2.3475883 0.093204333 + 26000 17.833261 -1.1020534 0.77931087 3.7628141 4.512381 -2.3134761 0.15568465 + 27000 17.68607 -1.3222026 1.1985872 3.5817624 4.6360755 -2.3492774 0.08427906 + 28000 18.326649 -1.2669291 0.74809075 3.2624429 4.4698564 -2.3679076 0.14677293 + 29000 17.720933 -1.0773886 0.83099482 3.7652834 4.6584594 -2.8255303 0.23092596 + 30000 18.201999 -1.0168706 1.0637455 3.453095 4.3738593 -2.8063214 0.18658217 + 31000 17.823502 -1.2685768 0.84805585 3.8600661 4.2195821 -2.1169716 0.12517101 + 32000 16.883133 -0.62062648 0.84434922 3.5042683 5.1264906 -2.2674699 0.030138165 + 33000 17.805715 -1.679553 1.2430372 4.314677 4.2523894 -2.3008321 0.18591872 + 34000 16.723767 -0.54189072 1.1282827 3.8542159 4.3026559 -2.2186336 0.05392425 + 35000 17.976909 -0.72092075 0.5876319 2.9726396 5.0881439 -2.491692 0.17356291 + 36000 18.782492 -1.514246 0.63237955 3.2777164 4.6077164 -2.502574 0.082537318 + 37000 17.247716 -0.6344626 0.79885976 3.452491 4.7618281 -2.3902444 0.11450271 + 38000 17.996494 -1.6712877 1.0111769 4.1689136 4.46963 -2.4076725 0.11875756 + 39000 17.586857 -0.74508086 0.95970486 3.7395038 4.6011357 -2.9854953 0.30143284 + 40000 17.494879 -0.30772446 0.72047991 3.2604877 4.7283734 -2.3812495 0.16399034 + 41000 15.855772 -0.49642605 0.82496448 4.5139653 4.76884 -2.214141 0.10899661 + 42000 17.898568 -1.3078863 1.1505144 4.0429873 4.3889581 -2.8696559 0.23336417 + 43000 19.014372 -1.6325979 1.1553166 3.5660772 4.4047997 -2.9302044 0.13672127 + 44000 18.250782 -0.97211613 0.72714301 3.2258362 4.7257298 -2.5533613 0.11968073 + 45000 17.335174 0.24746331 1.0415866 3.3220992 4.5251095 -3.0415216 0.24453084 + 46000 17.72846 -0.9541418 0.88153841 3.7893452 4.5251883 -2.4003613 0.051809816 + 47000 18.226762 -0.67057787 0.84352989 3.0609522 4.5449078 -2.4694254 0.073703949 + 48000 17.838074 -0.88768441 1.3812262 3.5890492 4.5827868 -3.0137515 0.21417113 + 49000 17.973733 -0.75118705 0.69667886 3.3989025 4.7058886 -2.8243945 0.26665792 + 50000 17.461583 -0.65040016 0.68943524 2.9374743 5.6971777 -2.4438011 0.1697603 + 51000 16.79766 -0.010684434 0.89795555 3.959039 4.56763 -2.5101098 0.15048853 + 52000 17.566543 -0.7262764 0.74354418 3.3423185 4.8426523 -2.4187649 0.16908776 + 53000 17.964274 -0.9270914 1.065952 3.0397181 4.4682262 -2.2179503 0.07873406 + 54000 17.941256 -0.5807578 0.76516121 3.7262371 4.6975126 -3.179899 0.24433708 + 55000 17.079478 -0.48559832 0.95364453 3.0414645 5.2811414 -2.7064882 0.30102814 + 56000 17.632179 -0.75403299 0.97577942 3.3672363 4.4851336 -2.3683659 0.051117638 + 57000 16.17128 -0.44699325 0.76341543 4.267716 5.0881056 -2.4122329 0.16671692 + 58000 16.899276 -0.76481024 1.0400825 3.973493 4.8823309 -2.4270284 0.048716383 + 59000 18.145412 -0.84968335 0.71698306 3.2024358 4.6115739 -2.2520353 0.19466966 + 60000 17.578258 -1.0067331 0.72822527 3.5375208 4.9110255 -2.2319607 0.11922362 + 61000 17.434762 -1.0244393 0.90593099 3.8446915 4.8571191 -2.6228357 0.23259208 + 62000 17.580489 -1.1135917 0.79577432 3.7043524 4.6058114 -2.351492 0.042904152 + 63000 18.207335 -1.1512268 0.82684507 3.4114738 4.351069 -2.1878441 0.082922105 + 64000 18.333083 -1.1182287 0.74058959 3.6905164 4.3226172 -2.7110393 0.14721704 + 65000 16.271579 -0.7122151 1.0200168 4.6983643 4.3681131 -2.194921 0.12831024 + 66000 17.316444 -0.5729385 0.85254108 3.5769963 4.5526705 -2.3321328 0.040452643 + 67000 17.19011 -0.8814312 1.1381258 3.8605789 4.4183813 -2.299607 0.091527355 + 68000 18.223367 -1.362189 0.74472056 3.259165 4.486512 -2.2181134 0.048952796 + 69000 17.646348 -0.91647162 0.73990335 3.9313692 5.2663097 -3.3816778 0.27769877 + 70000 18.173493 -1.3107718 0.96484426 3.219728 4.5045124 -2.3349534 0.082327407 + 71000 17.0627 -0.58509083 0.85964129 3.8490884 4.437895 -2.1673348 0.24151404 + 72000 17.809764 -0.35128902 0.65479258 3.3945008 4.6160508 -2.5486166 0.10829531 + 73000 18.27769 -1.0739758 0.80890957 3.6070901 4.6256762 -2.4576547 0.080025736 + 74000 18.109437 -1.0691837 0.66679323 3.5923203 4.4825716 -2.5048169 0.21372319 + 75000 17.914569 -1.3500765 1.2993494 3.362421 4.4160377 -2.1278163 0.19397641 + 76000 16.563928 -0.16539261 1.0067302 3.5742755 4.8581915 -2.1362429 0.059822408 + 77000 18.130477 -0.38361279 0.43406954 3.4725995 4.7005855 -2.8836242 0.11958174 + 78000 16.746204 -1.1732959 0.7455507 3.6296638 5.6344113 -2.459208 0.16099803 + 79000 18.243999 -1.5850155 1.0108545 3.4727867 4.3367411 -2.316686 0.070480814 + 80000 16.960715 -0.84100929 0.91604996 3.862215 4.780949 -2.3711596 0.073916605 + 81000 17.697722 -1.1126605 0.952804 3.7114455 4.4216316 -2.2770085 0.091372066 + 82000 17.835901 -1.3091474 0.71867629 3.8168122 5.0150205 -2.4730634 0.062592852 + 83000 19.168418 -1.476938 0.75592316 3.2304519 4.3946471 -2.2991395 0.13083324 + 84000 17.945778 -1.5223622 1.0859941 3.4334011 5.0286682 -2.7550892 0.2476269 + 85000 17.950251 -0.85843846 0.86888218 3.3101287 4.5511879 -2.3640013 0.12080834 + 86000 17.480699 -0.97493649 0.85049761 3.4973085 4.6344922 -2.343121 0.2009677 + 87000 17.980244 -1.114983 0.88796989 3.4113329 4.3535853 -2.2535412 0.14494917 + 88000 18.023866 -1.226683 0.62339706 3.7649269 4.5923973 -2.3923523 0.10464375 + 89000 16.362829 -0.311462 1.0265375 4.0101723 4.4184777 -2.0314129 0.056570704 + 90000 17.533149 -0.41526788 1.0362029 3.4247412 4.2734431 -2.4776658 0.16960663 + 91000 17.719099 -1.1956801 1.0069945 3.2380672 4.8982805 -2.2154906 0.12950936 + 92000 17.762654 -1.170027 0.95814525 3.5217717 4.5405343 -2.5983677 0.15037754 + 93000 17.393958 -0.45641026 0.6579069 3.6002204 4.5942053 -2.5559641 0.12026544 + 94000 16.8182 -0.92962066 0.86801362 4.2914398 4.659848 -2.5251987 0.18000415 + 95000 17.642086 -0.7994896 0.7003756 3.8036697 4.5252487 -2.4166307 0.15686517 + 96000 18.114292 -1.5102104 1.2635908 3.2764427 5.0659496 -2.2777806 0.054309645 + 97000 18.575765 -1.6015311 0.69500699 3.1649317 4.9945742 -2.4012125 0.067373724 + 98000 16.578893 -0.78030229 0.91524222 4.4429655 4.4622392 -2.4052655 0.15355705 + 99000 17.26063 -0.57832833 0.7098846 3.9000046 4.5576484 -2.5333026 0.25517222 + 100000 18.377235 -0.89109577 0.68988617 2.8751751 4.4115591 -2.3560731 0.12185212 +Loop time of 2.96043 on 1 procs for 100000 steps with 34 atoms + +Performance: 5836.990 ns/day, 0.004 hours/ns, 33778.875 timesteps/s +99.9% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.074 | 1.074 | 1.074 | 0.0 | 36.28 +Bond | 1.6497 | 1.6497 | 1.6497 | 0.0 | 55.72 +Neigh | 0.007576 | 0.007576 | 0.007576 | 0.0 | 0.26 +Comm | 0.012847 | 0.012847 | 0.012847 | 0.0 | 0.43 +Output | 0.0010746 | 0.0010746 | 0.0010746 | 0.0 | 0.04 +Modify | 0.16485 | 0.16485 | 0.16485 | 0.0 | 5.57 +Other | | 0.05037 | | | 1.70 + +Nlocal: 34 ave 34 max 34 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 395 ave 395 max 395 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 395 +Ave neighs/atom = 11.6176 +Ave special neighs/atom = 9.52941 +Neighbor list builds = 253 +Dangerous builds = 0 +Total wall time: 0:00:02 diff --git a/examples/cmap/log.11Apr17.cmap.g++.4 b/examples/cmap/log.11Apr17.cmap.g++.4 new file mode 100644 index 0000000000..ec471d5a7e --- /dev/null +++ b/examples/cmap/log.11Apr17.cmap.g++.4 @@ -0,0 +1,205 @@ +LAMMPS (31 Mar 2017) +# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016 + +units real +neigh_modify delay 2 every 1 +#newton off + +boundary p p p + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmmfsw +improper_style harmonic + +pair_style lj/charmmfsw/coul/charmmfsh 8 12 +pair_modify mix arithmetic + +fix cmap all cmap charmm22.cmap +Reading potential file charmm22.cmap with DATE: 2016-09-26 +fix_modify cmap energy yes + +read_data gagg.data fix cmap crossterm CMAP + orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 34 atoms + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 12 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 33 bonds + reading angles ... + 57 angles + reading dihedrals ... + 75 dihedrals + reading impropers ... + 7 impropers + 4 = max # of 1-2 neighbors + 7 = max # of 1-3 neighbors + 13 = max # of 1-4 neighbors + 16 = max # of special neighbors + +special_bonds charmm +fix 1 all nve + +#fix 1 all nvt temp 300 300 100.0 +#fix 2 all shake 1e-9 500 0 m 1.0 + +velocity all create 0.0 12345678 dist uniform + +thermo 1000 +thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp +timestep 2.0 + +run 100000 +Neighbor list info ... + update every 1 steps, delay 2 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmmfsw/coul/charmmfsh, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 14.94 | 15.57 | 16.2 Mbytes +Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro + 0 16.287573 -0.85933785 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023 + 1000 18.816462 -0.84379243 0.78931817 2.7554247 4.4371421 -2.7762038 0.12697656 + 2000 18.091571 -1.045888 0.72306589 3.0951524 4.6725102 -2.3580092 0.22712496 + 3000 17.835596 -1.2171641 0.72666403 2.6696491 5.4373798 -2.0737041 0.075101693 + 4000 16.211232 -0.42713611 0.99472642 3.8961462 5.2009895 -2.5626866 0.17356243 + 5000 17.72183 -0.57081189 0.90733068 3.4376382 4.5457582 -2.3727543 0.12354518 + 6000 18.753977 -1.5772499 0.81468321 2.9236782 4.6033216 -2.3380859 0.12835782 + 7000 18.186024 -0.84205609 0.58996181 3.0329584 4.7221473 -2.5733244 0.10047631 + 8000 18.214306 -1.1360934 0.72597583 3.7493032 4.7319959 -2.8957975 0.20060467 + 9000 17.248415 -0.48642024 0.90266262 2.9721744 4.7651003 -2.1473349 0.13020438 + 10000 17.760663 -1.2968458 0.92384687 3.7007432 4.7378917 -2.2147799 0.06940514 + 11000 17.63395 -0.57366075 0.84871737 3.4276851 4.2853865 -2.2369491 0.17205075 + 12000 18.305713 -1.0672299 0.75876262 2.8852171 4.6850229 -2.4090072 0.087568888 + 13000 17.383367 -0.99678627 0.66712651 3.8060954 5.233865 -2.4180629 0.062014239 + 14000 17.510901 -0.68723297 0.92448551 3.7550867 4.7321218 -2.6059088 0.11504409 + 15000 18.080165 -1.13316 0.99982253 3.09947 4.8171402 -2.2713372 0.14580371 + 16000 17.383245 -0.4535296 0.57826268 3.6453593 4.6541138 -2.2434512 0.13285609 + 17000 17.111153 -0.3414839 0.73667584 3.7485311 4.6262965 -2.6166049 0.12635815 + 18000 16.862046 -1.3592061 1.2371142 4.4878937 4.2937117 -2.2112584 0.066145125 + 19000 18.313891 -1.654238 0.90644101 3.3934089 4.550735 -2.1862171 0.081267736 + 20000 19.083561 -1.3081747 0.56257812 2.7633848 4.6211438 -2.5196707 0.13763071 + 21000 18.23741 -1.051353 0.64408722 3.1735565 4.6912533 -2.2491947 0.099394904 + 22000 17.914515 -0.89769621 0.61793801 3.1224992 4.8683543 -2.282475 0.14524537 + 23000 16.756122 -0.98277883 1.2554905 3.7916115 4.7301443 -2.3094994 0.10226772 + 24000 16.109857 -0.54593177 0.86934462 4.4293574 4.926985 -2.2652264 0.11414331 + 25000 18.590559 -1.497327 1.1898361 2.9134403 4.7854107 -2.4437918 0.067416154 + 26000 18.493391 -1.0533797 0.4889578 3.6563013 4.6171721 -2.3240835 0.11607829 + 27000 18.646522 -1.1229601 0.67956815 2.7937638 4.8991207 -2.4068997 0.10109147 + 28000 18.545103 -1.7237438 0.72488022 3.8041665 4.6459974 -2.4339333 0.21943258 + 29000 17.840505 -1.0909667 0.88133248 3.3698456 5.0311644 -2.5116617 0.08102693 + 30000 17.649527 -0.65409177 0.86781692 3.24112 4.9903073 -2.6234925 0.14799777 + 31000 18.156812 -0.77476556 0.83192789 2.9620784 4.9160635 -2.8571635 0.22283201 + 32000 18.251583 -1.3384075 0.8059007 3.2588176 4.4365328 -2.1875071 0.087883637 + 33000 17.702785 -0.88311587 0.98573641 3.4645713 4.2650091 -2.0909158 0.14233004 + 34000 17.123413 -1.4873429 1.0419563 4.2628178 4.6318762 -2.2292095 0.105354 + 35000 18.162061 -1.0136007 0.82436129 3.6365024 4.5801677 -2.6856989 0.28648222 + 36000 17.65618 -1.094718 0.8872444 3.5075241 4.6382423 -2.3895134 0.18116961 + 37000 17.336475 -1.0657995 0.98869254 3.9252927 4.4383632 -2.2048244 0.22285949 + 38000 17.369467 -0.97623132 0.6712095 4.1349304 4.597754 -2.4088341 0.14608514 + 39000 18.170206 -1.2344285 0.77546195 3.6451049 4.7482287 -2.9895286 0.25768859 + 40000 16.210866 -0.81407781 0.99246271 4.2676233 5.0253763 -2.2929865 0.13348624 + 41000 17.641798 -1.0868157 0.80119513 3.4302526 5.280872 -2.4025406 0.22747391 + 42000 18.349848 -1.613759 1.1497004 3.7800682 4.3237683 -2.8676401 0.2120425 + 43000 19.130245 -1.196778 0.71845659 2.9325758 4.3684415 -2.433424 0.12240982 + 44000 18.061321 -1.2410101 1.0329373 3.0751569 4.7138313 -2.2880904 0.075814461 + 45000 18.162713 -1.4414622 1.009159 4.2298758 4.589593 -2.8502298 0.21606844 + 46000 18.591574 -0.99730412 1.0955215 3.3965004 4.359466 -3.1049731 0.17322629 + 47000 18.380259 -1.2717381 0.72291269 3.3958016 4.6099628 -2.4605065 0.19825185 + 48000 18.130478 -1.5051279 1.2087492 3.2488529 4.6690881 -2.2518174 0.05633061 + 49000 16.419912 -0.89320635 0.98926144 4.0388252 4.9919488 -2.1699511 0.15646479 + 50000 16.453196 -1.0433497 0.778346 4.6078069 4.7320614 -2.3760788 0.17161976 + 51000 18.245221 -0.89550444 0.9310446 3.0758194 4.3944595 -2.3082379 0.19983428 + 52000 17.839632 -1.0221781 0.76425017 3.3331547 4.5368437 -2.0988773 0.21098435 + 53000 18.693035 -1.4231915 0.76333082 3.1612761 4.583242 -2.4485762 0.089191206 + 54000 16.334672 -0.36309884 1.0200365 4.6700448 4.1628702 -2.1713841 0.11431995 + 55000 17.33842 -0.61522682 0.89847366 3.4970659 4.673495 -2.4743036 0.068004878 + 56000 17.790294 -1.0150845 0.73697112 3.6000297 4.5988343 -2.4822509 0.11434632 + 57000 18.913486 -1.0985507 1.0231848 2.7483267 4.4421755 -2.574424 0.1763388 + 58000 17.586896 -0.98284126 0.96965633 3.3330357 4.5325543 -2.1936869 0.083230915 + 59000 17.77788 -1.1649953 0.83092298 3.8004148 4.3940176 -2.3136642 0.017207608 + 60000 17.013042 -0.21728023 1.1688832 3.5374476 4.5462244 -2.4425301 0.15028297 + 61000 17.236242 -1.1342147 1.0301086 3.685948 4.6842331 -2.328108 0.070210812 + 62000 17.529852 -1.2961547 1.0323133 3.4474598 5.1435839 -2.4553423 0.060842687 + 63000 18.754704 -1.1816999 0.51806039 3.140172 4.5832701 -2.2713213 0.06327871 + 64000 17.54594 -1.3592836 0.9694558 4.1363258 4.3547729 -2.3818433 0.12634448 + 65000 16.962312 -0.54192775 0.90321315 4.0788618 4.2008255 -2.1376711 0.039504515 + 66000 18.078619 -1.3552947 1.0716861 3.3285374 4.7229362 -2.3331115 0.21978698 + 67000 17.132732 -1.4376876 0.91486534 4.4461852 4.6894176 -2.3655045 0.068150385 + 68000 18.69286 -1.2856207 0.3895394 3.0620063 4.9922992 -2.3459189 0.079879643 + 69000 18.329552 -1.1545957 0.88632275 3.1741058 4.4562418 -2.7094867 0.25329613 + 70000 16.681168 -0.94434373 1.2450393 4.5737944 4.4902996 -2.4581775 0.15313095 + 71000 17.375032 -1.0514442 1.0741595 3.4896146 4.8407713 -2.5302576 0.13640847 + 72000 17.833013 -0.9047134 0.87067876 3.1658924 4.8825932 -2.4398117 0.2343991 + 73000 17.421411 -1.2190741 0.73706811 4.2895 4.6464636 -2.3872727 0.19696525 + 74000 17.383158 -0.34208984 0.71333984 3.2718891 4.2718495 -2.2484281 0.10827022 + 75000 17.20885 -1.2710479 1.125102 3.8414467 5.3222741 -2.375505 0.12910797 + 76000 16.811578 -0.545162 0.59076961 3.9118604 4.8031296 -2.2777895 0.063015508 + 77000 16.679231 -0.080955983 0.7253398 3.4203454 5.0987608 -2.379614 0.12961874 + 78000 18.164524 -1.3115525 0.92526408 3.5764487 4.3814882 -2.3712488 0.073436724 + 79000 17.738686 -1.0697859 1.2186866 3.0593848 4.6551053 -2.2505871 0.075340661 + 80000 16.767483 -0.84777477 1.03128 4.1982958 4.6992227 -2.4146425 0.079774219 + 81000 16.257265 0.62803774 0.84032194 3.3873471 5.0961071 -2.7219776 0.20467848 + 82000 18.232082 -1.2129302 0.50746051 3.9207128 4.5073437 -2.599371 0.094522372 + 83000 16.618985 -0.60917055 0.8825847 3.805497 4.9560959 -2.2194726 0.14852687 + 84000 17.90762 -0.82336075 0.90504161 3.0324198 4.7444271 -2.5036073 0.15860682 + 85000 16.699883 -0.50297228 0.83405307 3.8598996 4.7971968 -2.2427788 0.10338668 + 86000 16.353038 -0.0096880616 0.80705167 4.0865115 4.5364338 -2.4548873 0.098456203 + 87000 17.887331 -0.75281219 1.0030148 4.0117123 4.3443074 -2.9774392 0.16190152 + 88000 18.583708 -1.4867053 0.86324814 3.3971237 4.3526221 -2.221239 0.14459352 + 89000 17.684828 -1.283764 1.0021118 3.5426808 4.9057005 -2.3921967 0.05844702 + 90000 17.2597 -0.84306489 0.99797936 3.8896866 4.4315457 -2.5662899 0.18270206 + 91000 16.705581 -0.44704047 0.75239556 3.470805 4.976868 -2.1894571 0.12312848 + 92000 17.548071 -1.2222664 0.92898812 4.0813773 4.3432647 -2.1631158 0.14071343 + 93000 17.163675 -0.94994776 0.96876981 3.9137692 4.4388666 -2.1260232 0.13187968 + 94000 18.842071 -1.2822113 0.58767049 3.1393475 4.5820965 -2.7264682 0.10406266 + 95000 18.112287 -1.1011381 0.63546648 3.4672667 4.486275 -2.2991936 0.041589685 + 96000 17.102713 -0.6877313 0.8389032 3.6892719 4.5676004 -2.1905327 0.13507011 + 97000 16.778253 -1.2902153 1.1588744 4.2820083 4.9537657 -2.4798159 0.35696636 + 98000 18.34638 -1.2908146 1.185356 3.0739807 4.4575453 -2.3959144 0.22407922 + 99000 17.995148 -1.3939639 0.7727299 3.8774144 4.4345458 -2.1142776 0.13550099 + 100000 18.444746 -1.2456693 0.86061526 3.468696 4.5264336 -2.4239851 0.074369539 +Loop time of 2.52011 on 4 procs for 100000 steps with 34 atoms + +Performance: 6856.851 ns/day, 0.004 hours/ns, 39680.850 timesteps/s +98.8% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.072506 | 0.28131 | 0.69088 | 46.2 | 11.16 +Bond | 0.050544 | 0.45307 | 0.9416 | 57.6 | 17.98 +Neigh | 0.0060885 | 0.0061619 | 0.0062056 | 0.1 | 0.24 +Comm | 0.44686 | 1.3679 | 2.0111 | 53.5 | 54.28 +Output | 0.0028057 | 0.0029956 | 0.003264 | 0.3 | 0.12 +Modify | 0.028202 | 0.095174 | 0.15782 | 19.8 | 3.78 +Other | | 0.3135 | | | 12.44 + +Nlocal: 8.5 ave 14 max 2 min +Histogram: 1 0 1 0 0 0 0 0 0 2 +Nghost: 25.5 ave 32 max 20 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Neighs: 98.75 ave 242 max 31 min +Histogram: 2 0 1 0 0 0 0 0 0 1 + +Total # of neighbors = 395 +Ave neighs/atom = 11.6176 +Ave special neighs/atom = 9.52941 +Neighbor list builds = 246 +Dangerous builds = 0 +Total wall time: 0:00:02 diff --git a/src/KOKKOS/verlet_kokkos.cpp b/src/KOKKOS/verlet_kokkos.cpp index 53b4042376..e4a3f857d3 100644 --- a/src/KOKKOS/verlet_kokkos.cpp +++ b/src/KOKKOS/verlet_kokkos.cpp @@ -64,14 +64,17 @@ VerletKokkos::VerletKokkos(LAMMPS *lmp, int narg, char **arg) : setup before run ------------------------------------------------------------------------- */ -void VerletKokkos::setup() +void VerletKokkos::setup(int flag) { if (comm->me == 0 && screen) { fprintf(screen,"Setting up Verlet run ...\n"); - fprintf(screen," Unit style : %s\n", update->unit_style); - fprintf(screen," Current step : " BIGINT_FORMAT "\n", update->ntimestep); - fprintf(screen," Time step : %g\n", update->dt); - timer->print_timeout(screen); + if (flag) { + fprintf(screen," Unit style : %s\n", update->unit_style); + fprintf(screen," Current step : " BIGINT_FORMAT "\n", + update->ntimestep); + fprintf(screen," Time step : %g\n", update->dt); + timer->print_timeout(screen); + } } update->setupflag = 1; @@ -169,7 +172,7 @@ void VerletKokkos::setup() if (force->newton) comm->reverse_comm(); modify->setup(vflag); - output->setup(); + output->setup(flag); lmp->kokkos->auto_sync = 1; update->setupflag = 1; } diff --git a/src/KOKKOS/verlet_kokkos.h b/src/KOKKOS/verlet_kokkos.h index 03a9383324..6455239204 100644 --- a/src/KOKKOS/verlet_kokkos.h +++ b/src/KOKKOS/verlet_kokkos.h @@ -29,7 +29,7 @@ class VerletKokkos : public Verlet { public: VerletKokkos(class LAMMPS *, int, char **); ~VerletKokkos() {} - void setup(); + void setup(int flag=1); void setup_minimal(int); void run(int); diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index cba5a0a176..73758e3628 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -260,7 +260,7 @@ void FixGCMC::options(int narg, char **arg) grouptypebits = NULL; energy_intra = 0.0; tfac_insert = 1.0; - overlap_cutoff = 0.0; + overlap_cutoffsq = 0.0; overlap_flag = 0; int iarg = 0; @@ -366,7 +366,8 @@ void FixGCMC::options(int narg, char **arg) iarg += 2; } else if (strcmp(arg[iarg],"overlap_cutoff") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix gcmc command"); - overlap_cutoff = force->numeric(FLERR,arg[iarg+1]); + double rtmp = force->numeric(FLERR,arg[iarg+1]); + overlap_cutoffsq = rtmp*rtmp; overlap_flag = 1; iarg += 2; } else error->all(FLERR,"Illegal fix gcmc command"); @@ -2146,7 +2147,7 @@ double FixGCMC::energy(int i, int itype, tagint imolecule, double *coord) // if overlap check requested, if overlap, // return signal value for energy - if (overlap_flag && rsq < overlap_cutoff) + if (overlap_flag && rsq < overlap_cutoffsq) return MAXENERGYSIGNAL; if (rsq < cutsq[itype][jtype]) @@ -2216,7 +2217,7 @@ double FixGCMC::energy_full() delz = x[i][2] - x[j][2]; rsq = delx*delx + dely*dely + delz*delz; - if (rsq < overlap_cutoff) { + if (rsq < overlap_cutoffsq) { overlaptest = 1; break; } diff --git a/src/MC/fix_gcmc.h b/src/MC/fix_gcmc.h index 2519c00965..8a5375eed7 100644 --- a/src/MC/fix_gcmc.h +++ b/src/MC/fix_gcmc.h @@ -112,7 +112,7 @@ class FixGCMC : public Fix { double **cutsq; double **atom_coord; imageint imagezero; - double overlap_cutoff; + double overlap_cutoffsq; // square distance cutoff for overlap int overlap_flag; double energy_intra; diff --git a/src/version.h b/src/version.h index e6ffb22dc0..2068d64573 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "11 Apr 2017" +#define LAMMPS_VERSION "13 Apr 2017" -- GitLab From d3187b22c431f0e01b35c7c99248f9f6837f56a1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 13 Apr 2017 18:11:57 -0400 Subject: [PATCH 032/593] restore lost change to PYTHON/Install.sh --- src/PYTHON/Install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PYTHON/Install.sh b/src/PYTHON/Install.sh index 50ca3dffc4..9d2783ba0c 100755 --- a/src/PYTHON/Install.sh +++ b/src/PYTHON/Install.sh @@ -33,7 +33,7 @@ touch ../python.h # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info -- GitLab From 6c2dd7ebb17c391e3c1386f2e670d8c7eaa5bc4c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Apr 2017 11:44:36 -0400 Subject: [PATCH 033/593] pass the name of the python interpreter compatible with the python package to 'make install-python' --- lib/python/Makefile.lammps | 5 +++-- lib/python/Makefile.lammps.python2 | 5 +++-- lib/python/Makefile.lammps.python2.7 | 1 + lib/python/Makefile.lammps.python3 | 5 +++-- lib/python/README | 33 +++++++++++++++++----------- src/Makefile | 3 ++- 6 files changed, 32 insertions(+), 20 deletions(-) diff --git a/lib/python/Makefile.lammps b/lib/python/Makefile.lammps index 8538994694..4289674e99 100644 --- a/lib/python/Makefile.lammps +++ b/lib/python/Makefile.lammps @@ -1,6 +1,7 @@ # Settings that the LAMMPS build will import when this package library is used # See the README file for more explanation -python_SYSINC = $(shell which python2-config > /dev/null 2>&1 && python2-config --includes || python-config --includes ) -python_SYSLIB = $(shell which python2-config > /dev/null 2>&1 && python2-config --ldflags || python-config --ldflags) +python_SYSINC = $(shell which python-config > /dev/null 2>&1 && python-config --includes || :) +python_SYSLIB = $(shell which python-config > /dev/null 2>&1 && python-config --ldflags || :) python_SYSPATH = +PYTHON=python diff --git a/lib/python/Makefile.lammps.python2 b/lib/python/Makefile.lammps.python2 index 8538994694..266a91251e 100644 --- a/lib/python/Makefile.lammps.python2 +++ b/lib/python/Makefile.lammps.python2 @@ -1,6 +1,7 @@ # Settings that the LAMMPS build will import when this package library is used # See the README file for more explanation -python_SYSINC = $(shell which python2-config > /dev/null 2>&1 && python2-config --includes || python-config --includes ) -python_SYSLIB = $(shell which python2-config > /dev/null 2>&1 && python2-config --ldflags || python-config --ldflags) +python_SYSINC = $(shell which python2-config > /dev/null 2>&1 && python2-config --includes || which python-config > /dev/null 2>&1 && python-config --includes || :) +python_SYSLIB = $(shell which python2-config > /dev/null 2>&1 && python2-config --ldflags || which python-config > /dev/null 2>&1 && python-config --ldflags || :) python_SYSPATH = +PYTHON=$(shell which python2 > /dev/null 2>&1 && echo python2 || echo python) diff --git a/lib/python/Makefile.lammps.python2.7 b/lib/python/Makefile.lammps.python2.7 index b5807086f2..07c6a94b21 100644 --- a/lib/python/Makefile.lammps.python2.7 +++ b/lib/python/Makefile.lammps.python2.7 @@ -4,3 +4,4 @@ python_SYSINC = -I/usr/local/include/python2.7 python_SYSLIB = -lpython2.7 -lnsl -ldl -lreadline -ltermcap -lpthread -lutil -lm -Xlinker -export-dynamic python_SYSPATH = +PYTHON=python2.7 diff --git a/lib/python/Makefile.lammps.python3 b/lib/python/Makefile.lammps.python3 index 1d5d5f2d81..2aa160e923 100644 --- a/lib/python/Makefile.lammps.python3 +++ b/lib/python/Makefile.lammps.python3 @@ -1,6 +1,7 @@ # Settings that the LAMMPS build will import when this package library is used # See the README file for more explanation -python_SYSINC = $(shell which python3-config > /dev/null 2>&1 && python3-config --includes || python-config --includes ) -python_SYSLIB = $(shell which python3-config > /dev/null 2>&1 && python3-config --ldflags || python-config --ldflags) +python_SYSINC = $(shell which python3-config > /dev/null 2>&1 && python3-config --includes || which python-config > /dev/null 2>&1 && python-config --includes || :) +python_SYSLIB = $(shell which python3-config > /dev/null 2>&1 && python3-config --ldflags || which python-config > /dev/null 2>&1 && python-config --ldflags || : ) python_SYSPATH = +PYTHON=$(shell which python3 > /dev/null 2>&1 && echo python3 || echo python) diff --git a/lib/python/README b/lib/python/README index 077c2547d2..8de2bc4bd7 100644 --- a/lib/python/README +++ b/lib/python/README @@ -1,22 +1,26 @@ The Makefile.lammps file in this directory is used when building LAMMPS with its PYTHON package installed. The file has several settings needed to compile and link LAMMPS with the Python library. -You should choose a Makefile.lammps.* file compatible with your system -and your version of Python, and copy it to Makefile.lammps before -building LAMMPS itself. You may need to edit one of the provided -files to match your system. -If you create a new Makefile.lammps file suitable for some version of -Python on some system, that is not a match to one of the provided -Makefile.lammps.* files, you can send it to the developers, and we can -include it in the distribution for others to use. - -To illustrate, these are example settings from the -Makefile.lammps.python2.7 file: +The default Makefile.lammps will automatically choose the default +python interpreter of your system and will infer the flags from +the python-config utility, that is usually bundled with the python +installation. If needed, you can copy one of the other provided +Makefile.lammps.* files to to Makefile.lammps before building +LAMMPS itself. + +The files Makefile.lammps.python2 and Makefile.lammps.python3 are +similar to the default file, but meant for the case that both, +python 2 and python 3, are installed simultaneously and you want +to prefer one over the other. If neither of these files work, you +may have to create a custom Makefile.lammps file suitable for +the version of Python on your system. To illustrate, these are +example settings from the Makefile.lammps.python2.7 file: python_SYSINC = -I/usr/local/include/python2.7 python_SYSLIB = -lpython2.7 -lnsl -ldl -lreadline -ltermcap -lpthread -lutil -lm -python_SYSPATH = +python_SYSPATH = +PYTHON=python2.7 python_SYSINC refers to the directory where Python's Python.h file is found. LAMMPS includes this file. @@ -26,10 +30,13 @@ application (LAMMPS in this case) to "embed" Python in the application. The Python library itself is listed (-lpython2.7) are are several system libraries needed by Python. -python_SYSPATH = refers to the path (e.g. -L/usr/local/lib) where the +python_SYSPATH refers to the path (e.g. -L/usr/local/lib) where the Python library can be found. You may not need this setting if the path is already included in your LD_LIBRARY_PATH environment variable. +PYTHON is the name of the python interpreter. It is used for +installing the LAMMPS python module with "make install-python" + ------------------------- Note that the trickiest issue to figure out for inclusion in diff --git a/src/Makefile b/src/Makefile index e6821646d1..59f9540148 100644 --- a/src/Makefile +++ b/src/Makefile @@ -224,7 +224,8 @@ mpi-stubs: @cd STUBS; $(MAKE) clean; $(MAKE) # install LAMMPS shared lib and Python wrapper for Python usage - +# include python package settings to automatically adapt name of python interpreter +sinclude ../lib/python/Makefile.lammps install-python: @$(PYTHON) ../python/install.py -- GitLab From 3cbf4f3b58125fd2d8435f4643c05e01b1efdb2c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Apr 2017 11:57:53 -0400 Subject: [PATCH 034/593] correct logic bug in else branch of the conditional --- lib/python/Makefile.lammps.python2 | 4 ++-- lib/python/Makefile.lammps.python3 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/python/Makefile.lammps.python2 b/lib/python/Makefile.lammps.python2 index 266a91251e..7b54b4c3df 100644 --- a/lib/python/Makefile.lammps.python2 +++ b/lib/python/Makefile.lammps.python2 @@ -1,7 +1,7 @@ # Settings that the LAMMPS build will import when this package library is used # See the README file for more explanation -python_SYSINC = $(shell which python2-config > /dev/null 2>&1 && python2-config --includes || which python-config > /dev/null 2>&1 && python-config --includes || :) -python_SYSLIB = $(shell which python2-config > /dev/null 2>&1 && python2-config --ldflags || which python-config > /dev/null 2>&1 && python-config --ldflags || :) +python_SYSINC = $(shell which python2-config > /dev/null 2>&1 && python2-config --includes || (which python-config > /dev/null 2>&1 && python-config --includes || :)) +python_SYSLIB = $(shell which python2-config > /dev/null 2>&1 && python2-config --ldflags || (which python-config > /dev/null 2>&1 && python-config --ldflags || :)) python_SYSPATH = PYTHON=$(shell which python2 > /dev/null 2>&1 && echo python2 || echo python) diff --git a/lib/python/Makefile.lammps.python3 b/lib/python/Makefile.lammps.python3 index 2aa160e923..5c43b45ff6 100644 --- a/lib/python/Makefile.lammps.python3 +++ b/lib/python/Makefile.lammps.python3 @@ -1,7 +1,7 @@ # Settings that the LAMMPS build will import when this package library is used # See the README file for more explanation -python_SYSINC = $(shell which python3-config > /dev/null 2>&1 && python3-config --includes || which python-config > /dev/null 2>&1 && python-config --includes || :) -python_SYSLIB = $(shell which python3-config > /dev/null 2>&1 && python3-config --ldflags || which python-config > /dev/null 2>&1 && python-config --ldflags || : ) +python_SYSINC = $(shell which python3-config > /dev/null 2>&1 && python3-config --includes || (which python-config > /dev/null 2>&1 && python-config --includes || :)) +python_SYSLIB = $(shell which python3-config > /dev/null 2>&1 && python3-config --ldflags || (which python-config > /dev/null 2>&1 && python-config --ldflags || :)) python_SYSPATH = PYTHON=$(shell which python3 > /dev/null 2>&1 && echo python3 || echo python) -- GitLab From c9bc14133537b28760000a1f6b88cc6ab60d0314 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Apr 2017 12:57:35 -0400 Subject: [PATCH 035/593] remove doc text explaining restrictions that are lifted with the changes in this branch --- doc/src/Section_python.txt | 5 ----- doc/src/python.txt | 20 +++----------------- doc/src/tutorial_pylammps.txt | 2 +- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/doc/src/Section_python.txt b/doc/src/Section_python.txt index ff26d18e06..8bdd101b3d 100644 --- a/doc/src/Section_python.txt +++ b/doc/src/Section_python.txt @@ -118,11 +118,6 @@ check which version of Python you have installed, by simply typing 11.2 Overview of using Python from a LAMMPS script :link(py_2),h4 -NOTE: It is not currently possible to use the "python"_python.html -command described in this section with Python 3, only with Python 2. -The C API changed from Python 2 to 3 and the LAMMPS code is not -compatible with both. - LAMMPS has a "python"_python.html command which can be used in an input script to define and execute a Python function that you write the code for. The Python function can also be assigned to a LAMMPS diff --git a/doc/src/python.txt b/doc/src/python.txt index be6d1b215f..a5003be54c 100644 --- a/doc/src/python.txt +++ b/doc/src/python.txt @@ -50,7 +50,7 @@ def factorial(n): return n * factorial(n-1) """ :pre -python loop input 1 SELF return v_value format -f here """ +python loop input 1 SELF return v_value format pf here """ def loop(lmpptr,N,cut0): from lammps import lammps lmp = lammps(ptr=lmpptr) :pre @@ -59,7 +59,7 @@ def loop(lmpptr,N,cut0): for i in range(N): cut = cut0 + i*0.1 - lmp.set_variable("cut",cut) # set a variable in LAMMPS + lmp.set_variable("cut",cut) # set a variable in LAMMPS lmp.command("pair_style lj/cut $\{cut\}") # LAMMPS commands lmp.command("pair_coeff * * 1.0 1.0") lmp.command("run 100") @@ -67,11 +67,6 @@ def loop(lmpptr,N,cut0): [Description:] -NOTE: It is not currently possible to use the "python"_python.html -command described in this section with Python 3, only with Python 2. -The C API changed from Python 2 to 3 and the LAMMPS code is not -compatible with both. - Define a Python function or execute a previously defined function. Arguments, including LAMMPS variables, can be passed to the function from the LAMMPS input script and a value returned by the Python @@ -477,16 +472,7 @@ python"_Section_python.html. Note that it is important that the stand-alone LAMMPS executable and the LAMMPS shared library be consistent (built from the same source code files) in order for this to work. If the two have been built at different times using -different source files, problems may occur. - -As described above, you can use the python command to invoke a Python -function which calls back to LAMMPS through its Python-wrapped library -interface. However you cannot do the opposite. I.e. you cannot call -LAMMPS from Python and invoke the python command to "callback" to -Python and execute a Python function. LAMMPS will generate an error -if you try to do that. Note that we think there actually should be a -way to do that, but haven't yet been able to figure out how to do it -successfully. +different source files, problems may occur. [Related commands:] diff --git a/doc/src/tutorial_pylammps.txt b/doc/src/tutorial_pylammps.txt index 5d3491782e..a4a7a4041e 100644 --- a/doc/src/tutorial_pylammps.txt +++ b/doc/src/tutorial_pylammps.txt @@ -55,7 +55,7 @@ using the generated {auto} Makefile. cd $LAMMPS_DIR/src :pre # generate custom Makefile -python2 Make.py -jpg -png -s ffmpeg exceptions -m mpi -a file :pre +python Make.py -jpg -png -s ffmpeg exceptions -m mpi -a file :pre # add packages if necessary make yes-MOLECULE :pre -- GitLab From dd90c860ee622a612e0002ff63e79d6f59808268 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 17 Apr 2017 17:40:21 -0400 Subject: [PATCH 036/593] refactor msi2lmp documentation to emphasize lack of active development - put a note into the manual - reorder contents of the README file - request for information should be sent to lammps-users - add list of known missing features --- doc/src/Section_tools.txt | 9 +- tools/msi2lmp/README | 271 ++++++++++++++++++++------------------ 2 files changed, 148 insertions(+), 132 deletions(-) diff --git a/doc/src/Section_tools.txt b/doc/src/Section_tools.txt index 03611c7cdb..d95c4f0cd4 100644 --- a/doc/src/Section_tools.txt +++ b/doc/src/Section_tools.txt @@ -369,15 +369,18 @@ supports it. It has its own WWW page at msi2lmp tool :h4,link(msi) -The msi2lmp sub-directory contains a tool for creating LAMMPS input -data files from BIOVIA's Materias Studio files (formerly Accelrys' +The msi2lmp sub-directory contains a tool for creating LAMMPS template +input and data files from BIOVIA's Materias Studio files (formerly Accelrys' Insight MD code, formerly MSI/Biosym and its Discover MD code). This tool was written by John Carpenter (Cray), Michael Peachey (Cray), and Steve Lustig (Dupont). Several people contributed changes to remove bugs and adapt its output to changes in LAMMPS. -See the README file for more information. +This tool has several known limitations and is no longer under active +development, so there are no changes except for the occasional bugfix. + +See the README file in the tools/msi2lmp folder for more information. :line diff --git a/tools/msi2lmp/README b/tools/msi2lmp/README index a20f6e893f..db9b1aca5e 100644 --- a/tools/msi2lmp/README +++ b/tools/msi2lmp/README @@ -1,98 +1,50 @@ -Axel Kohlmeyer is the current maintainer of the msi2lmp tool. -Please send any inquiries about msi2lmp to the lammps-users mailing list. -06 Oct 2016 Axel Kohlmeyer - -Improved whitespace handling in parsing topology and force field -files to avoid bogus warnings about type name truncation. - -24 Oct 2015 Axel Kohlmeyer - -Added check to make certain that force field files -are consistent with the notation of non-bonded parameters -that the msi2lmp code expects. For Class 1 and OPLS-AA -the A-B notation with geometric mixing is expected and for -Class 2 the r-eps notation with sixthpower mixing. - -11 Sep 2014 Axel Kohlmeyer - -Refactored ReadMdfFile.c so it more consistently honors -the MAX_NAME and MAX_STRING string length defines and -potentially handles inputs with long names better. - -27 May 2014 Axel Kohlmeyer - -Added TopoTools style type hints as comments to all Mass, PairCoeff, -BondCoeff, AngleCoeff, DihedralCoeff, ImproperCoeff entries. -This should make it easier to identify force field entries with -the structure and force field map in the data file later. - -06 Mar 2014 Axel Kohlmeyer - -Fixed a bug in handling of triclinic cells, where the matrices to -convert to and from fractional coordinates were incorrectly built. - -26 Oct 2013 Axel Kohlmeyer - -Implemented writing out force field style hints in generated data -files for improved consistency checking when reading those files. -Also added writing out CGCMM style comments to identify atom types. + msi2lmp.exe -08 Oct 2013 Axel Kohlmeyer +This code has several known limitations listed below under "LIMITATIONS" +(and possibly some unknown ones, too) and is no longer under active +development. Only the occasional bugfix is applied. -Fixed a memory access violation with Class 2 force fields. -Free all allocated memory to better detection of memory errors. -Print out version number and data with all print levels > 0. -Added valgrind checks to the regression tests +Please send any inquiries about msi2lmp to the lammps-users +mailing list and not to individual people. -08 Oct 2013 Axel Kohlmeyer +------------------------------------------------------------------------ -Fixed a memory access violation with Class 2 force fields. -Free all allocated memory to better detection of memory errors. -Print out version number and data with all print levels > 0. -Added valgrind checks to the regression tests +OVERVIEW -02 Aug 2013 Axel Kohlmeyer - -Added rudimentary support for OPLS-AA based on -input provided by jeff greathouse. +This is the third version of a program that generates a LAMMPS data file +based on the information in MSI .car (atom coordinates), .mdf (molecular +topology) and .frc (forcefield) files. The .car and .mdf files are +specific to a molecular system while the .frc file is specific to a +forcefield version. The only coherency needed between .frc and +.car/.mdf files are the atom types. -18 Jul 2013 Axel Kohlmeyer - -Added support for writing out image flags -Improved accuracy of atom masses -Added flag for shifting the entire system -Fixed some minor logic bugs and prepared -for supporting other force fields and morse style bonds. - -12 Jul 2013 Axel Kohlmeyer - -Fixed the bug that caused improper coefficients to be wrong -Cleaned up the handling of box parameters and center the box -by default around the system/molecule. Added a flag to make -this step optional and center the box around the origin instead. -Added a regression test script with examples. - -1 Jul 2013 Axel Kohlmeyer +The first version was written by Steve Lustig at Dupont, but required +using Discover to derive internal coordinates and forcefield parameters -Cleanup and improved port to windows. -Removed some more static string limits. -Added print level 3 for additional output. -Make code stop at missing force field parameters -and added -i flag to override this. -Safer argument checking. -Provide short versions for all flags. +The second version was written by Michael Peachey while an intern in the +Cray Chemistry Applications Group managed by John Carpenter. This +version derived internal coordinates from the mdf file and looked up +parameters in the frc file thus eliminating the need for Discover. -23 Sep 2011 +The third version was written by John Carpenter to optimize the +performance of the program for large molecular systems (the original +code for deriving atom numbers was quadratic in time) and to make the +program fully dynamic. The second version used fixed dimension arrays +for the internal coordinates. -added support for triclinic boxes -see msi2lmp/TriclinicModification.pdf doc for details +The third version was revised in Fall 2011 by Stephanie Teich-McGoldrick +to add support non-orthogonal cells. ------------------------------ +The next revision was started in Summer/Fall 2013 by Axel Kohlmeyer to +improve portability to Windows compilers, clean up command line parsing +and improve compatibility with the then current LAMMPS versions. This +revision removes compatibility with the obsolete LAMMPS version written +in Fortran 90. - msi2lmp V3.6 4/10/2005 +INSTALLATION & USAGE - This program uses the .car and .mdf files from MSI/Biosyms's INSIGHT +This program uses the .car and .mdf files from MSI/Biosyms's INSIGHT program to produce a LAMMPS data file. 1. Building msi2lmp @@ -178,50 +130,111 @@ see msi2lmp/TriclinicModification.pdf doc for details -- the LAMMPS data file is written to .data protocol and error information is written to the screen. -**************************************************************** -* -* msi2lmp -* -* This is the third version of a program that generates a LAMMPS -* data file based on the information in MSI .car (atom -* coordinates), .mdf (molecular topology) and .frc (forcefield) -* files. The .car and .mdf files are specific to a molecular -* system while the .frc file is specific to a forcefield version. -* The only coherency needed between .frc and .car/.mdf files are -* the atom types. -* -* The first version was written by Steve Lustig at Dupont, but -* required using Discover to derive internal coordinates and -* forcefield parameters -* -* The second version was written by Michael Peachey while an -* intern in the Cray Chemistry Applications Group managed -* by John Carpenter. This version derived internal coordinates -* from the mdf file and looked up parameters in the frc file -* thus eliminating the need for Discover. -* -* The third version was written by John Carpenter to optimize -* the performance of the program for large molecular systems -* (the original code for deriving atom numbers was quadratic in time) -* and to make the program fully dynamic. The second version used -* fixed dimension arrays for the internal coordinates. -* -* The current maintainer is only reluctantly doing so because John Mayo no longer -* needs this code. -* -* V3.2 corresponds to adding code to MakeLists.c to gracefully deal with -* systems that may only be molecules of 1 to 3 atoms. In V3.1, the values -* for number_of_dihedrals, etc. could be unpredictable in these systems. -* -* V3.3 was generated in response to a strange error reading a MDF file generated by -* Accelys' Materials Studio GUI. Simply rewriting the input part of ReadMdfFile.c -* seems to have fixed the problem. -* -* V3.4 and V3.5 are minor upgrades to fix bugs associated mostly with .car and .mdf files -* written by Accelys' Materials Studio GUI. -* -* V3.6 outputs to LAMMPS 2005 (C++ version). -* -* Contact: Kelly L. Anderson, kelly.anderson@cantab.net -* -* April 2005 +------------------------------------------------------------------------ + +LIMITATIONS + +msi2lmp has the following known limitations: + +- there is no support to select morse bonds over harmonic bonds +- there is no support for auto-equivalences to supplement fully + parameterized interactions with heuristic ones +- there is no support for bond increments + +------------------------------------------------------------------------ + +CHANGELOG + +06 Oct 2016 Axel Kohlmeyer + +Improved whitespace handling in parsing topology and force field +files to avoid bogus warnings about type name truncation. + +24 Oct 2015 Axel Kohlmeyer + +Added check to make certain that force field files are consistent with +the notation of non-bonded parameters that the msi2lmp code expects. +For Class 1 and OPLS-AA the A-B notation with geometric mixing is +expected and for Class 2 the r-eps notation with sixthpower mixing. + +11 Sep 2014 Axel Kohlmeyer + +Refactored ReadMdfFile.c so it more consistently honors the MAX_NAME +and MAX_STRING string length defines and potentially handles inputs +with long names better. + +27 May 2014 Axel Kohlmeyer + +Added TopoTools style type hints as comments to all Mass, PairCoeff, +BondCoeff, AngleCoeff, DihedralCoeff, ImproperCoeff entries. +This should make it easier to identify force field entries with +the structure and force field map in the data file later. + +06 Mar 2014 Axel Kohlmeyer + +Fixed a bug in handling of triclinic cells, where the matrices to +convert to and from fractional coordinates were incorrectly built. + +26 Oct 2013 Axel Kohlmeyer + +Implemented writing out force field style hints in generated data +files for improved consistency checking when reading those files. +Also added writing out CGCMM style comments to identify atom types. + +08 Oct 2013 Axel Kohlmeyer + +Fixed a memory access violation with Class 2 force fields. Free all +allocated memory to better detection of memory errors. Print out +version number and data with all print levels > 0. Added valgrind +checks to the regression tests. + +02 Aug 2013 Axel Kohlmeyer + +Added rudimentary support for OPLS-AA based on input provided +by jeff greathouse. + +18 Jul 2013 Axel Kohlmeyer + +Added support for writing out image flags. Improved accuracy of atom +masses. Added flag for shifting the entire system. Fixed some minor +logic bugs and prepared for supporting other force fields and morse +style bonds. + +12 Jul 2013 Axel Kohlmeyer + +Fixed the bug that caused improper coefficients to be wrong. Cleaned up +the handling of box parameters and center the box by default around the +system/molecule. Added a flag to make this step optional and center the +box around the origin instead. Added a regression test script with +examples. + +1 Jul 2013 Axel Kohlmeyer + +Cleanup and improved port to windows. Removed some more static string +limits. Added print level 3 for additional output. Make code stop at +missing force field parameters and added -i flag to override this. +Safer argument checking. Provide short versions for all flags. + +23 Sep 2011 + +added support for triclinic boxes + +V3.6 outputs to LAMMPS 2005 (C++ version). + +Contact: Kelly L. Anderson, kelly.anderson@cantab.net + +V3.4 and V3.5 are minor upgrades to fix bugs associated mostly with .car + and .mdf files written by Accelys' Materials Studio GUI. April 2005 + +V3.3 was generated in response to a strange error reading a MDF file +generated by Accelys' Materials Studio GUI. Simply rewriting the input +part of ReadMdfFile.c seems to have fixed the problem. + +V3.2 corresponds to adding code to MakeLists.c to gracefully deal with +systems that may only be molecules of 1 to 3 atoms. In V3.1, the values +for number_of_dihedrals, etc. could be unpredictable in these systems. + +----------------------------- + + msi2lmp v3.9.8 6/10/2016 + -- GitLab From dec36e9bfe887b5097958fbd76c789bc703b5938 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 17 Apr 2017 17:40:57 -0400 Subject: [PATCH 037/593] fix typos and remove trailing whitespace --- tools/msi2lmp/src/GetParameters.c | 2 +- tools/msi2lmp/src/InitializeItems.c | 2 +- tools/msi2lmp/src/WriteDataFile.c | 2 +- tools/msi2lmp/src/msi2lmp.c | 7 ++----- tools/msi2lmp/src/msi2lmp.h | 4 ++-- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/tools/msi2lmp/src/GetParameters.c b/tools/msi2lmp/src/GetParameters.c index e183c529e0..192b4d296c 100644 --- a/tools/msi2lmp/src/GetParameters.c +++ b/tools/msi2lmp/src/GetParameters.c @@ -136,7 +136,7 @@ void GetParameters() if (forcefield & (FF_TYPE_CLASS1|FF_TYPE_OPLSAA)) { bondtypes[i].params[0] = ff_bond.data[k].ff_param[1]; bondtypes[i].params[1] = ff_bond.data[k].ff_param[0]; - } + } if (forcefield & FF_TYPE_CLASS2) { for (j=0; j < 4; j++) diff --git a/tools/msi2lmp/src/InitializeItems.c b/tools/msi2lmp/src/InitializeItems.c index 4df9fd0f10..1e33636913 100644 --- a/tools/msi2lmp/src/InitializeItems.c +++ b/tools/msi2lmp/src/InitializeItems.c @@ -68,7 +68,7 @@ void InitializeItems(void) if (forcefield & (FF_TYPE_CLASS1|FF_TYPE_OPLSAA)) { strcpy(ff_tor.keyword,"#torsion_1"); ff_tor.number_of_parameters = 3; - } + } if (forcefield & FF_TYPE_CLASS2) { strcpy(ff_tor.keyword,"#torsion_3"); diff --git a/tools/msi2lmp/src/WriteDataFile.c b/tools/msi2lmp/src/WriteDataFile.c index 498978406f..c03eba71c5 100644 --- a/tools/msi2lmp/src/WriteDataFile.c +++ b/tools/msi2lmp/src/WriteDataFile.c @@ -144,7 +144,7 @@ void WriteDataFile(char *nameroot) else if (forcefield & FF_TYPE_CLASS2) fputs(" # class2\n\n",DatF); } else fputs("\n\n",DatF); - + for (i=0; i < no_angle_types; i++) { fprintf(DatF, " %3i", i+1); for ( j = 0; j < m; j++) diff --git a/tools/msi2lmp/src/msi2lmp.c b/tools/msi2lmp/src/msi2lmp.c index c94d4b4d73..15cfddd258 100644 --- a/tools/msi2lmp/src/msi2lmp.c +++ b/tools/msi2lmp/src/msi2lmp.c @@ -142,9 +142,6 @@ * and to make the program fully dynamic. The second version used * fixed dimension arrays for the internal coordinates. * -* John Carpenter can be contacted by sending email to -* jec374@earthlink.net -* * November 2000 */ @@ -356,7 +353,7 @@ int main (int argc, char *argv[]) if (centerflag) puts(" Output is recentered around geometrical center"); if (hintflag) puts(" Output contains style flag hints"); else puts(" Style flag hints disabled"); - printf(" System translated by: %g %g %g\n",shift[0],shift[1],shift[2]); + printf(" System translated by: %g %g %g\n",shift[0],shift[1],shift[2]); } n = 0; @@ -374,7 +371,7 @@ int main (int argc, char *argv[]) if (n == 0) { if (iflag > 0) fputs(" WARNING",stderr); else fputs(" Error ",stderr); - + fputs("- forcefield name and class appear to be inconsistent\n\n",stderr); if (iflag == 0) return 7; } diff --git a/tools/msi2lmp/src/msi2lmp.h b/tools/msi2lmp/src/msi2lmp.h index 377ab1a6c3..4716f719d6 100644 --- a/tools/msi2lmp/src/msi2lmp.h +++ b/tools/msi2lmp/src/msi2lmp.h @@ -24,13 +24,13 @@ * and to make the program fully dynamic. The second version used * fixed dimension arrays for the internal coordinates. * -* The thrid version was revised in Fall 2011 by +* The third version was revised in Fall 2011 by * Stephanie Teich-McGoldrick to add support non-orthogonal cells. * * The next revision was started in Summer/Fall 2013 by * Axel Kohlmeyer to improve portability to Windows compilers, * clean up command line parsing and improve compatibility with -* the then current LAMMPS versions. This revision removes +* the then current LAMMPS versions. This revision removes * compatibility with the obsolete LAMMPS version written in Fortran 90. */ -- GitLab From 481927ff16eda37b9bb8f5689f7b1a8323b20c3c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 17 Apr 2017 17:49:49 -0400 Subject: [PATCH 038/593] correct 'thrid' instead of 'third' --- doc/src/python.txt | 2 +- src/USER-MISC/improper_ring.cpp | 2 +- src/USER-OMP/improper_ring_omp.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/python.txt b/doc/src/python.txt index be6d1b215f..69025d791c 100644 --- a/doc/src/python.txt +++ b/doc/src/python.txt @@ -310,7 +310,7 @@ which corresponds to SELF in the python command. The first line of the function imports the Python module lammps.py in the python dir of the distribution. The second line creates a Python object "lmp" which wraps the instance of LAMMPS that called the function. The -"ptr=lmpptr" argument is what makes that happen. The thrid line +"ptr=lmpptr" argument is what makes that happen. The third line invokes the command() function in the LAMMPS library interface. It takes a single string argument which is a LAMMPS input script command for LAMMPS to execute, the same as if it appeared in your input diff --git a/src/USER-MISC/improper_ring.cpp b/src/USER-MISC/improper_ring.cpp index 5a7937e4ee..adf17ed1d5 100644 --- a/src/USER-MISC/improper_ring.cpp +++ b/src/USER-MISC/improper_ring.cpp @@ -204,7 +204,7 @@ void ImproperRing::compute(int eflag, int vflag) cfact2 = ckjji / ckjkj; cfact3 = ckjji / cjiji; - /* Calculate the force acted on the thrid atom of the angle. */ + /* Calculate the force acted on the third atom of the angle. */ fkx = cfact2 * bvec2x[icomb] - bvec1x[icomb]; fky = cfact2 * bvec2y[icomb] - bvec1y[icomb]; fkz = cfact2 * bvec2z[icomb] - bvec1z[icomb]; diff --git a/src/USER-OMP/improper_ring_omp.cpp b/src/USER-OMP/improper_ring_omp.cpp index bd7593c51a..4eadc83183 100644 --- a/src/USER-OMP/improper_ring_omp.cpp +++ b/src/USER-OMP/improper_ring_omp.cpp @@ -206,7 +206,7 @@ void ImproperRingOMP::eval(int nfrom, int nto, ThrData * const thr) cfact2 = ckjji / ckjkj; cfact3 = ckjji / cjiji; - /* Calculate the force acted on the thrid atom of the angle. */ + /* Calculate the force acted on the third atom of the angle. */ fkx = cfact2 * bvec2x[icomb] - bvec1x[icomb]; fky = cfact2 * bvec2y[icomb] - bvec1y[icomb]; fkz = cfact2 * bvec2z[icomb] - bvec1z[icomb]; -- GitLab From 4bad52f30c8ef9d90c6248c969d1e1abd6adfd8f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 17 Apr 2017 17:52:06 -0400 Subject: [PATCH 039/593] fix typos --- src/QEQ/fix_qeq_point.cpp | 2 +- src/USER-REAXC/fix_qeq_reax.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QEQ/fix_qeq_point.cpp b/src/QEQ/fix_qeq_point.cpp index 9af70a445a..63d20ad911 100644 --- a/src/QEQ/fix_qeq_point.cpp +++ b/src/QEQ/fix_qeq_point.cpp @@ -58,7 +58,7 @@ void FixQEqPoint::init() neighbor->requests[irequest]->full = 1; int ntypes = atom->ntypes; - memory->create(shld,ntypes+1,ntypes+1,"qeq:shileding"); + memory->create(shld,ntypes+1,ntypes+1,"qeq:shielding"); if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index 26cf03f60a..a94ad3e6f3 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -375,7 +375,7 @@ void FixQEqReax::init_shielding() ntypes = atom->ntypes; if (shld == NULL) - memory->create(shld,ntypes+1,ntypes+1,"qeq:shileding"); + memory->create(shld,ntypes+1,ntypes+1,"qeq:shielding"); for( i = 1; i <= ntypes; ++i ) for( j = 1; j <= ntypes; ++j ) -- GitLab From dee353614420e6170f236a2d6ed6ae9832a783ae Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Apr 2017 11:42:31 -0400 Subject: [PATCH 040/593] update VMD molfile plugin headers and move them to lib/molfile (where they belong) --- lib/molfile/Makefile.lammps | 8 +++++- lib/molfile/README | 27 ++++++++++++++----- .../molfile}/molfile_plugin.h | 0 {src/USER-MOLFILE => lib/molfile}/vmdplugin.h | 0 src/USER-MOLFILE/README | 16 ++--------- 5 files changed, 29 insertions(+), 22 deletions(-) rename {src/USER-MOLFILE => lib/molfile}/molfile_plugin.h (100%) rename {src/USER-MOLFILE => lib/molfile}/vmdplugin.h (100%) diff --git a/lib/molfile/Makefile.lammps b/lib/molfile/Makefile.lammps index 08118991a0..a181f48aec 100644 --- a/lib/molfile/Makefile.lammps +++ b/lib/molfile/Makefile.lammps @@ -6,6 +6,9 @@ # When you build LAMMPS with the USER-MOLFILE package installed, it will # use the 3 settings in this file. They should be set as follows. # +# The molfile_SYSINC setting is to point to the folder with the VMD +# plugin headers. By default it points to bundled headers in this folder +# # The molfile_SYSLIB setting is for a system dynamic loading library # that will be used to load the molfile plugins. It contains functions # like dlopen(), dlsym() and so on for dynamic linking of executable @@ -24,7 +27,10 @@ # Settings that the LAMMPS build will import when this package is installed -molfile_SYSINC = +# change this to -I/path/to/your/lib/vmd/plugins/include if the bundled +# header files are incompatible with your VMD plugsins +molfile_SYSINC =-I../../lib/molfile +# ifneq ($(LIBOBJDIR),/Obj_mingw32) ifneq ($(LIBOBJDIR),/Obj_mingw64) ifneq ($(LIBOBJDIR),/Obj_mingw32-mpi) diff --git a/lib/molfile/README b/lib/molfile/README index 09ea3cc5c6..9e8260c202 100644 --- a/lib/molfile/README +++ b/lib/molfile/README @@ -6,17 +6,30 @@ and write_dump commands in a LAMMPS input script. More information about the VMD molfile plugins can be found at http://www.ks.uiuc.edu/Research/vmd/plugins/molfile. -More specifically, to be able to dynamically load and execute the -plugins from inside LAMMPS, you need to link with a system library -containing functions like dlopen(), dlsym() and so on for dynamic -linking of executable code into an executable. This library is -defined by setting the molfile_SYSLIB variable in the Makefile.lammps -file in this dir. +NOTE: while the programming interface (API) of the VMD molfile plugins +is backward compatible (i.e. you can expect to be able to compile this +package for plugins from newer VMD packages), the binary interface +(ABI) is not. So it is necessary to compile this package with the +VMD molfile plugin header files (vmdplugin.h and molfile_plugin.h) +matching VMD installation that the (binary) plugin files are taken from. +These header files can be found inside the VMD installation tree under +"plugins/include". For convenience, this package includes a set of +header files that is compatible with VMD 1.9.3 (the current version +in April 2017). You need to adjust the molfile_SYSINC variable in the +Makefile.lammps file in this directory, in case you want to use VMD +molfile plugins from a different version. The interface is compatible +with plugins starting from VMD version 1.8.4. + +In order to be able to dynamically load and execute the plugins from +inside LAMMPS, you need to link with a system library containing functions +like dlopen(), dlsym() and so on for dynamic linking of executable code +into an executable. This library is defined by setting the molfile_SYSLIB +variable in the Makefile.lammps file in this dir. For Linux and most current unix-like operating systems, this can be kept at the default setting of "-ldl" (on some platforms this library is called "-ldld"). For compilation on Windows, a slightly different mechanism is used that is part of the Windows programming environment -and this library is not needed. +and this kind of library is not needed. See the header of Makefile.lammps for more info. diff --git a/src/USER-MOLFILE/molfile_plugin.h b/lib/molfile/molfile_plugin.h similarity index 100% rename from src/USER-MOLFILE/molfile_plugin.h rename to lib/molfile/molfile_plugin.h diff --git a/src/USER-MOLFILE/vmdplugin.h b/lib/molfile/vmdplugin.h similarity index 100% rename from src/USER-MOLFILE/vmdplugin.h rename to lib/molfile/vmdplugin.h diff --git a/src/USER-MOLFILE/README b/src/USER-MOLFILE/README index 9a2833365d..4437b587e4 100644 --- a/src/USER-MOLFILE/README +++ b/src/USER-MOLFILE/README @@ -2,8 +2,8 @@ This package provides a C++ interface class to the VMD molfile plugins, http://www.ks.uiuc.edu/Research/vmd/plugins/molfile, and a set of LAMMPS classes that use this interface. -Molfile plugins provide a consistent programming interface to read and -write file formats commonly used in molecular simulations. This +Molfile plugins provide a consistent programming interface to read +and write file formats commonly used in molecular simulations. This package only provides the interface code, not the plugins; these can be taken as precompiled binaries directly from a VMD installation that matches the platform of your LAMMPS executable. Using the plugin @@ -18,17 +18,5 @@ LAMMPS, you need to link with an appropriate system library, which is done using the settings in lib/molfile/Makefile.lammps. See that file and the lib/molfile/README file for more details. -NOTE: while the programming interface (API) to the molfile plugins is -backward compatible (i.e. you can expect to be able to compile this -package for plugins from newer VMD packages), the binary interface -(ABI) is not. So it is necessary to compile this package with the -molfile plugin header files (vmdplugin.h and molfile_plugin.h) taken -from the _same_ VMD installation that the (binary) plugin files are -taken from. These header files can be found inside the VMD -installation tree under: "plugins/include". - -For convenience, this package includes a set of header files that is -compatible with VMD 1.9.3 (the current version in April 2017) - The person who created this package is Axel Kohlmeyer at Temple U (akohlmey at gmail.com). Contact him directly if you have questions. -- GitLab From 8d390100e0c21b0b86fb5895fb97d36db06a2351 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Apr 2017 11:44:23 -0400 Subject: [PATCH 041/593] update .gitignore and Purge.list for recent changes --- src/.gitignore | 12 ++++++++---- src/Purge.list | 6 ++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index 97bc2276b0..4fd0431208 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -47,8 +47,6 @@ /dump_molfile.h /molfile_interface.cpp /molfile_interface.h -/molfile_plugin.h -/vmdplugin.h /type_detector.h /intel_buffers.cpp @@ -76,8 +74,8 @@ /pair_awpmd_cut.cpp /pair_awpmd_cut.h -/dihedral_charmmfsh.cpp -/dihedral_charmmfsh.h +/dihedral_charmmfsw.cpp +/dihedral_charmmfsw.h /pair_lj_charmmfsw_coul_charmmfsh.cpp /pair_lj_charmmfsw_coul_charmmfsh.h /pair_lj_charmmfsw_coul_long.cpp @@ -163,6 +161,8 @@ /bond_nonlinear.h /bond_oxdna_fene.cpp /bond_oxdna_fene.h +/bond_oxdna2_fene.cpp +/bond_oxdna2_fene.h /bond_quartic.cpp /bond_quartic.h /bond_table.cpp @@ -770,6 +770,8 @@ /pair_nm_cut_coul_long.h /pair_oxdna_*.cpp /pair_oxdna_*.h +/pair_oxdna2_*.cpp +/pair_oxdna2_*.h /mf_oxdna.h /pair_peri_eps.cpp /pair_peri_eps.h @@ -848,6 +850,8 @@ /prd.h /python.cpp /python.h +/python_impl.cpp +/python_impl.h /reader_molfile.cpp /reader_molfile.h /reaxc_allocate.cpp diff --git a/src/Purge.list b/src/Purge.list index 554c5df824..9b09dd5382 100644 --- a/src/Purge.list +++ b/src/Purge.list @@ -16,6 +16,12 @@ style_region.h style_neigh_bin.h style_neigh_pair.h style_neigh_stencil.h +# deleted on 19 April 2017 +vmdplugin.h +molfile_plugin.h +# deleted on 13 April 2017 +dihedral_charmmfsh.cpp +dihedral_charmmfsh.h # deleted on ## XXX 2016 accelerator_intel.h neigh_bond.cpp -- GitLab From 25e8ed63a236f1245de2f1aa5b7565fcdfe1083e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Apr 2017 11:46:19 -0400 Subject: [PATCH 042/593] whitespace cleanup in VMD plugin headers --- lib/molfile/molfile_plugin.h | 210 +++++++++++++++++------------------ lib/molfile/vmdplugin.h | 54 ++++----- 2 files changed, 132 insertions(+), 132 deletions(-) diff --git a/lib/molfile/molfile_plugin.h b/lib/molfile/molfile_plugin.h index 714b06539f..c79e7a5abf 100644 --- a/lib/molfile/molfile_plugin.h +++ b/lib/molfile/molfile_plugin.h @@ -15,10 +15,10 @@ * ***************************************************************************/ -/** @file +/** @file * API for C extensions to define a way to load structure, coordinate, - * trajectory, and volumetric data files - */ + * trajectory, and volumetric data files + */ #ifndef MOL_FILE_PLUGIN_H #define MOL_FILE_PLUGIN_H @@ -63,9 +63,9 @@ typedef ssize_t molfile_ssize_t; /**< for frame counts */ /** * Hard-coded direct-I/O page size constants for use by both VMD * and the plugins that want to use direct, unbuffered I/O for high - * performance with SSDs etc. We use two constants to define the - * range of hardware page sizes that we can support, so that we can - * add support for larger 8KB or 16KB page sizes in the future + * performance with SSDs etc. We use two constants to define the + * range of hardware page sizes that we can support, so that we can + * add support for larger 8KB or 16KB page sizes in the future * as they become more prevalent in high-end storage systems. * * At present, VMD uses a hard-coded 4KB page size to reduce memory @@ -89,16 +89,16 @@ typedef struct { } molfile_metadata_t; -/* - * Struct for specifying atoms in a molecular structure. The first - * six components are required, the rest are optional and their presence is +/* + * Struct for specifying atoms in a molecular structure. The first + * six components are required, the rest are optional and their presence is * indicating by setting the corresponding bit in optsflag. When omitted, - * the application (for read_structure) or plugin (for write_structure) - * must be able to supply default values if the missing parameters are + * the application (for read_structure) or plugin (for write_structure) + * must be able to supply default values if the missing parameters are * part of its internal data structure. * Note that it is not possible to specify coordinates with this structure. - * This is intentional; all coordinate I/O is done with the read_timestep and - * write_timestep functions. + * This is intentional; all coordinate I/O is done with the read_timestep and + * write_timestep functions. */ /** @@ -169,7 +169,7 @@ typedef struct { #define MOLFILE_CTNUMBER 0x0200 /**< ctnumber provided */ #endif #define MOLFILE_BADOPTIONS 0xFFFFFFFF /**< Detect badly behaved plugins */ - + /*@}*/ /*@{*/ @@ -189,22 +189,22 @@ typedef struct molfile_timestep_metadata { /* * Per-timestep atom coordinates and periodic cell information - */ + */ typedef struct { float *coords; /**< coordinates of all atoms, arranged xyzxyzxyz */ float *velocities; /**< space for velocities of all atoms; same layout */ /**< NULL unless has_velocities is set */ - /*@{*/ + /*@{*/ /** * Unit cell specification of the form A, B, C, alpha, beta, gamma. * notes: A, B, C are side lengths of the unit cell * alpha = angle between b and c * beta = angle between a and c * gamma = angle between a and b - */ - float A, B, C, alpha, beta, gamma; - /*@}*/ + */ + float A, B, C, alpha, beta, gamma; + /*@}*/ double physical_time; /**< physical time point associated with this frame */ @@ -223,7 +223,7 @@ typedef struct { /** * Metadata for volumetric datasets, read initially and used for subsequent - * memory allocations and file loading. + * memory allocations and file loading. */ typedef struct { char dataname[256]; /**< name of volumetric data set */ @@ -233,20 +233,20 @@ typedef struct { * x/y/z axis: * These the three cell sides, providing both direction and length * (not unit vectors) for the x, y, and z axes. In the simplest - * case, these would be <0,size,0> and <0,0,size) for + * case, these would be <0,size,0> and <0,0,size) for * an orthogonal cubic volume set. For other cell shapes these * axes can be oriented non-orthogonally, and the parallelpiped * may have different side lengths, not just a cube/rhombus. */ - float xaxis[3]; /**< direction (and length) for X axis */ + float xaxis[3]; /**< direction (and length) for X axis */ float yaxis[3]; /**< direction (and length) for Y axis */ float zaxis[3]; /**< direction (and length) for Z axis */ /* - * x/y/z size: + * x/y/z size: * Number of grid cells along each axis. This is _not_ the * physical size of the box, this is the number of voxels in each - * direction, independent of the shape of the volume set. + * direction, independent of the shape of the volume set. */ int xsize; /**< number of grid cells along the X axis */ int ysize; /**< number of grid cells along the Y axis */ @@ -348,10 +348,10 @@ typedef struct { /** * QM run info. Parameters that stay unchanged during a single file. - */ + */ typedef struct { int nproc; /**< number of processors used. */ - int memory; /**< amount of memory used in Mbyte. */ + int memory; /**< amount of memory used in Mbyte. */ int runtype; /**< flag indicating the calculation method. */ int scftype; /**< SCF type: RHF, UHF, ROHF, GVB or MCSCF wfn. */ int status; /**< indicates wether SCF and geometry optimization @@ -384,9 +384,9 @@ typedef struct { * array size = 2*num_basis_funcs * The basis must NOT be normalized. */ int *atomic_number; /**< atomic numbers (chem. element) of atoms in basis set */ - int *angular_momentum; /**< 3 ints per wave function coefficient do describe the + int *angular_momentum; /**< 3 ints per wave function coefficient do describe the * cartesian components of the angular momentum. - * E.g. S={0 0 0}, Px={1 0 0}, Dxy={1 1 0}, or Fyyz={0 2 1}. + * E.g. S={0 0 0}, Px={1 0 0}, Dxy={1 1 0}, or Fyyz={0 2 1}. */ int *shell_types; /**< type for each shell in basis */ } molfile_qm_basis_t; @@ -460,9 +460,9 @@ enum molfile_qm_wavefunc_type { MOLFILE_WAVE_MCSCFNAT, MOLFILE_WAVE_MCSCFOPT, MOLFILE_WAVE_CINATUR, MOLFILE_WAVE_PIPEK, MOLFILE_WAVE_BOYS, MOLFILE_WAVE_RUEDEN, - MOLFILE_WAVE_NAO, MOLFILE_WAVE_PNAO, MOLFILE_WAVE_NHO, - MOLFILE_WAVE_PNHO, MOLFILE_WAVE_NBO, MOLFILE_WAVE_PNBO, - MOLFILE_WAVE_PNLMO, MOLFILE_WAVE_NLMO, MOLFILE_WAVE_MOAO, + MOLFILE_WAVE_NAO, MOLFILE_WAVE_PNAO, MOLFILE_WAVE_NHO, + MOLFILE_WAVE_PNHO, MOLFILE_WAVE_NBO, MOLFILE_WAVE_PNBO, + MOLFILE_WAVE_PNLMO, MOLFILE_WAVE_NLMO, MOLFILE_WAVE_MOAO, MOLFILE_WAVE_NATO, MOLFILE_WAVE_UNKNOWN }; @@ -493,7 +493,7 @@ typedef struct molfile_qm_timestep_metadata { int has_orben_per_wavef[MOLFILE_MAXWAVEPERTS]; /**< orbital energy flags */ int has_occup_per_wavef[MOLFILE_MAXWAVEPERTS]; /**< orbital occupancy flags */ int num_wavef ; /**< # wavefunctions in this ts */ - int wavef_size; /**< size of one wavefunction + int wavef_size; /**< size of one wavefunction * (# of gaussian basis fctns) */ int num_charge_sets; /**< # of charge values per atom */ } molfile_qm_timestep_metadata_t; @@ -547,14 +547,14 @@ typedef struct { * from graphics file reader plugins. */ enum molfile_graphics_type { - MOLFILE_POINT, MOLFILE_TRIANGLE, MOLFILE_TRINORM, MOLFILE_NORMS, - MOLFILE_LINE, MOLFILE_CYLINDER, MOLFILE_CAPCYL, MOLFILE_CONE, + MOLFILE_POINT, MOLFILE_TRIANGLE, MOLFILE_TRINORM, MOLFILE_NORMS, + MOLFILE_LINE, MOLFILE_CYLINDER, MOLFILE_CAPCYL, MOLFILE_CONE, MOLFILE_SPHERE, MOLFILE_TEXT, MOLFILE_COLOR, MOLFILE_TRICOLOR }; /** * Individual graphics object/element data - */ + */ typedef struct { int type; /* One of molfile_graphics_type */ int style; /* A general style parameter */ @@ -570,13 +570,13 @@ typedef struct { type data style size ---- ---- ----- ---- point x, y, z pixel size -triangle x1,y1,z1,x2,y2,z2,x3,y3,z3 -trinorm x1,y1,z1,x2,y2,z2,x3,y3,z3 +triangle x1,y1,z1,x2,y2,z2,x3,y3,z3 +trinorm x1,y1,z1,x2,y2,z2,x3,y3,z3 the next array element must be NORMS -tricolor x1,y1,z1,x2,y2,z2,x3,y3,z3 +tricolor x1,y1,z1,x2,y2,z2,x3,y3,z3 the next array elements must be NORMS the following element must be COLOR, with three RGB triples -norms x1,y1,z1,x2,y2,z2,x3,y3,z3 +norms x1,y1,z1,x2,y2,z2,x3,y3,z3 line x1,y1,z1,x2,y2,z2 0=solid pixel width 1=stippled cylinder x1,y1,z1,x2,y2,z2 resolution radius @@ -590,41 +590,41 @@ color r, g, b /** * Main file reader API. Any function in this struct may be NULL * if not implemented by the plugin; the application checks this to determine - * what functionality is present in the plugin. - */ + * what functionality is present in the plugin. + */ typedef struct { /** - * Required header + * Required header */ vmdplugin_HEAD /** - * Filename extension for this file type. May be NULL if no filename + * Filename extension for this file type. May be NULL if no filename * extension exists and/or is known. For file types that match several * common extensions, list them in a comma separated list such as: * "pdb,ent,foo,bar,baz,ban" * The comma separated list will be expanded when filename extension matching * is performed. If multiple plugins solicit the same filename extensions, - * the one that lists the extension earliest in its list is selected. In the + * the one that lists the extension earliest in its list is selected. In the * case of a "tie", the first one tried/checked "wins". */ const char *filename_extension; /** * Try to open the file for reading. Return an opaque handle, or NULL on - * failure. Set the number of atoms; if the number of atoms cannot be - * determined, set natoms to MOLFILE_NUMATOMS_UNKNOWN. + * failure. Set the number of atoms; if the number of atoms cannot be + * determined, set natoms to MOLFILE_NUMATOMS_UNKNOWN. * Filetype should be the name under which this plugin was registered; * this is provided so that plugins can provide the same function pointer * to handle multiple file types. */ - void *(* open_file_read)(const char *filepath, const char *filetype, + void *(* open_file_read)(const char *filepath, const char *filetype, int *natoms); - + /** * Read molecular structure from the given file handle. atoms is allocated * by the caller and points to space for natoms. - * On success, place atom information in the passed-in pointer. + * On success, place atom information in the passed-in pointer. * optflags specifies which optional fields in the atoms will be set by * the plugin. */ @@ -636,15 +636,15 @@ typedef struct { * Each unique bond should be specified only once, so file formats that list * bonds twice will need post-processing before the results are returned to * the caller. - * If the plugin provides bond information, but the file loaded doesn't + * If the plugin provides bond information, but the file loaded doesn't * actually contain any bond info, the nbonds parameter should be * set to 0 and from/to should be set to NULL to indicate that no bond * information was actually present, and automatic bond search should be - * performed. + * performed. * * If the plugin provides bond order information, the bondorder array * will contain the bond order for each from/to pair. If not, the bondorder - * pointer should be set to NULL, in which case the caller will provide a + * pointer should be set to NULL, in which case the caller will provide a * default bond order value of 1.0. * * If the plugin provides bond type information, the bondtype array @@ -655,23 +655,23 @@ typedef struct { * and consistency checking. * * These arrays must be freed by the plugin in the close_file_read function. - * This function can be called only after read_structure(). - * Return MOLFILE_SUCCESS if no errors occur. + * This function can be called only after read_structure(). + * Return MOLFILE_SUCCESS if no errors occur. */ - int (*read_bonds)(void *, int *nbonds, int **from, int **to, float **bondorder, + int (*read_bonds)(void *, int *nbonds, int **from, int **to, float **bondorder, int **bondtype, int *nbondtypes, char ***bondtypename); /** - * XXX this function will be augmented and possibly superceded by a + * XXX this function will be augmented and possibly superceded by a * new QM-capable version named read_timestep(), when finished. * - * Read the next timestep from the file. Return MOLFILE_SUCCESS, or - * MOLFILE_EOF on EOF. If the molfile_timestep_t argument is NULL, then - * the frame should be skipped. Otherwise, the application must prepare - * molfile_timestep_t by allocating space in coords for the corresponding - * number of coordinates. - * The natoms parameter exists because some coordinate file formats - * (like CRD) cannot determine for themselves how many atoms are in a + * Read the next timestep from the file. Return MOLFILE_SUCCESS, or + * MOLFILE_EOF on EOF. If the molfile_timestep_t argument is NULL, then + * the frame should be skipped. Otherwise, the application must prepare + * molfile_timestep_t by allocating space in coords for the corresponding + * number of coordinates. + * The natoms parameter exists because some coordinate file formats + * (like CRD) cannot determine for themselves how many atoms are in a * timestep; the app must therefore obtain this information elsewhere * and provide it to the plugin. */ @@ -681,16 +681,16 @@ typedef struct { * Close the file and release all data. The handle cannot be reused. */ void (* close_file_read)(void *); - + /** * Open a coordinate file for writing using the given header information. * Return an opaque handle, or NULL on failure. The application must - * specify the number of atoms to be written. + * specify the number of atoms to be written. * filetype should be the name under which this plugin was registered. */ - void *(* open_file_write)(const char *filepath, const char *filetype, + void *(* open_file_write)(const char *filepath, const char *filetype, int natoms); - + /** * Write structure information. Return success. */ @@ -698,12 +698,12 @@ typedef struct { /** * Write a timestep to the coordinate file. Return MOLFILE_SUCCESS if no - * errors occur. If the file contains structure information in each - * timestep (like a multi-entry PDB), it will have to cache the information + * errors occur. If the file contains structure information in each + * timestep (like a multi-entry PDB), it will have to cache the information * from the initial calls from write_structure. */ int (* write_timestep)(void *, const molfile_timestep_t *); - + /** * Close the file and release all data. The handle cannot be reused. */ @@ -716,18 +716,18 @@ typedef struct { * the plugin and should be freed by close_file_read(). The application * may call this function any number of times. */ - int (* read_volumetric_metadata)(void *, int *nsets, + int (* read_volumetric_metadata)(void *, int *nsets, molfile_volumetric_t **metadata); - /** - * Read the specified volumetric data set into the space pointed to by - * datablock. The set is specified with a zero-based index. The space + /** + * Read the specified volumetric data set into the space pointed to by + * datablock. The set is specified with a zero-based index. The space * allocated for the datablock must be equal to - * xsize * ysize * zsize. No space will be allocated for colorblock + * xsize * ysize * zsize. No space will be allocated for colorblock * unless has_color is nonzero; in that case, colorblock should be * filled in with three RGB floats per datapoint. */ - int (* read_volumetric_data)(void *, int set, float *datablock, + int (* read_volumetric_data)(void *, int set, float *datablock, float *colorblock); #if vmdplugin_ABIVERSION > 16 int (* read_volumetric_data_ex)(void *, molfile_volumetric_readwrite_t *v); @@ -735,8 +735,8 @@ typedef struct { /** * Read raw graphics data stored in this file. Return the number of data - * elements and the data itself as an array of molfile_graphics_t in the - * pointer provided by the application. The plugin is responsible for + * elements and the data itself as an array of molfile_graphics_t in the + * pointer provided by the application. The plugin is responsible for * freeing the data when the file is closed. */ int (* read_rawgraphics)(void *, int *nelem, const molfile_graphics_t **data); @@ -746,19 +746,19 @@ typedef struct { * came from, what the accession code for the database is, textual remarks * and other notes pertaining to the contained structure/trajectory/volume * and anything else that's informative at the whole file level. - */ + */ int (* read_molecule_metadata)(void *, molfile_metadata_t **metadata); - + /** * Write bond information for the molecule. The arrays from * and to point to the (one-based) indices of bonded atoms. - * Each unique bond will be specified only once by the caller. - * File formats that list bonds twice will need to emit both the + * Each unique bond will be specified only once by the caller. + * File formats that list bonds twice will need to emit both the * from/to and to/from versions of each. - * This function must be called before write_structure(). + * This function must be called before write_structure(). * * Like the read_bonds() routine, the bondorder pointer is set to NULL - * if the caller doesn't have such information, in which case the + * if the caller doesn't have such information, in which case the * plugin should assume a bond order of 1.0 if the file format requires * bond order information. * @@ -769,15 +769,15 @@ typedef struct { * scheme is different from the index numbers. * if the pointers are set to NULL, then this information is not available. * bondtypenames can only be used of bondtypes is also given. - * Return MOLFILE_SUCCESS if no errors occur. + * Return MOLFILE_SUCCESS if no errors occur. */ - int (* write_bonds)(void *, int nbonds, int *from, int *to, float *bondorder, + int (* write_bonds)(void *, int nbonds, int *from, int *to, float *bondorder, int *bondtype, int nbondtypes, char **bondtypename); /** - * Write the specified volumetric data set into the space pointed to by + * Write the specified volumetric data set into the space pointed to by * datablock. The * allocated for the datablock must be equal to - * xsize * ysize * zsize. No space will be allocated for colorblock + * xsize * ysize * zsize. No space will be allocated for colorblock * unless has_color is nonzero; in that case, colorblock should be * filled in with three RGB floats per datapoint. */ @@ -788,27 +788,27 @@ typedef struct { molfile_volumetric_readwrite_t *v); #endif - /** + /** * Read in Angles, Dihedrals, Impropers, and Cross Terms and optionally types. - * (Cross terms pertain to the CHARMM/NAMD CMAP feature) + * (Cross terms pertain to the CHARMM/NAMD CMAP feature) */ int (* read_angles)(void *handle, int *numangles, int **angles, int **angletypes, int *numangletypes, char ***angletypenames, int *numdihedrals, int **dihedrals, int **dihedraltypes, int *numdihedraltypes, - char ***dihedraltypenames, int *numimpropers, int **impropers, + char ***dihedraltypenames, int *numimpropers, int **impropers, int **impropertypes, int *numimpropertypes, char ***impropertypenames, int *numcterms, int **cterms, int *ctermcols, int *ctermrows); - /** + /** * Write out Angles, Dihedrals, Impropers, and Cross Terms - * (Cross terms pertain to the CHARMM/NAMD CMAP feature) + * (Cross terms pertain to the CHARMM/NAMD CMAP feature) */ int (* write_angles)(void *handle, int numangles, const int *angles, const int *angletypes, int numangletypes, const char **angletypenames, int numdihedrals, const int *dihedrals, const int *dihedraltypes, int numdihedraltypes, - const char **dihedraltypenames, int numimpropers, + const char **dihedraltypenames, int numimpropers, const int *impropers, const int *impropertypes, int numimpropertypes, - const char **impropertypenames, int numcterms, const int *cterms, + const char **impropertypenames, int numcterms, const int *cterms, int ctermcols, int ctermrows); @@ -817,7 +817,7 @@ typedef struct { * QM datasets in this file. * * The metadata are the sizes of the QM related data structure - * arrays that will be populated by the plugin when + * arrays that will be populated by the plugin when * read_qm_rundata() is called. Since the allocation of these * arrays is done by VMD rather than the plugin, VMD needs to * know the sizes beforehand. Consequently read_qm_metadata() @@ -830,7 +830,7 @@ typedef struct { * Read timestep independent QM data. * * Typical data that are defined only once per trajectory are - * general info about the calculation (such as the used method), + * general info about the calculation (such as the used method), * the basis set and normal modes. * The data structures to be populated must have been allocated * before by VMD according to sizes obtained through @@ -840,19 +840,19 @@ typedef struct { /** - * Read the next timestep from the file. Return MOLFILE_SUCCESS, or + * Read the next timestep from the file. Return MOLFILE_SUCCESS, or * MOLFILE_EOF on EOF. If the molfile_timestep_t or molfile_qm_metadata_t - * arguments are NULL, then the coordinate or qm data should be skipped. - * Otherwise, the application must prepare molfile_timestep_t and - * molfile_qm_timestep_t by allocating space for the corresponding + * arguments are NULL, then the coordinate or qm data should be skipped. + * Otherwise, the application must prepare molfile_timestep_t and + * molfile_qm_timestep_t by allocating space for the corresponding * number of coordinates, orbital wavefunction coefficients, etc. - * Since it is common for users to want to load only the final timestep + * Since it is common for users to want to load only the final timestep * data from a QM run, the application may provide any combination of - * valid, or NULL pointers for the molfile_timestep_t and + * valid, or NULL pointers for the molfile_timestep_t and * molfile_qm_timestep_t parameters, depending on what information the * user is interested in. - * The natoms and qm metadata parameters exist because some file formats - * cannot determine for themselves how many atoms etc are in a + * The natoms and qm metadata parameters exist because some file formats + * cannot determine for themselves how many atoms etc are in a * timestep; the app must therefore obtain this information elsewhere * and provide it to the plugin. */ diff --git a/lib/molfile/vmdplugin.h b/lib/molfile/vmdplugin.h index bbbc53c9bb..842d1e431c 100644 --- a/lib/molfile/vmdplugin.h +++ b/lib/molfile/vmdplugin.h @@ -17,20 +17,20 @@ /** @file * This header must be included by every VMD plugin library. It defines the - * API for every plugin so that VMD can organize the plugins it finds. + * API for every plugin so that VMD can organize the plugins it finds. */ #ifndef VMD_PLUGIN_H #define VMD_PLUGIN_H -/* +/* * Preprocessor tricks to make it easier for us to redefine the names of * functions when building static plugins. */ #if !defined(VMDPLUGIN) -/** - * macro defining VMDPLUGIN if it hasn't already been set to the name of +/** + * macro defining VMDPLUGIN if it hasn't already been set to the name of * a static plugin that is being compiled. This is the catch-all case. */ #define VMDPLUGIN vmdplugin @@ -38,11 +38,11 @@ /** concatenation macro, joins args x and y together as a single string */ #define xcat(x, y) cat(x, y) /** concatenation macro, joins args x and y together as a single string */ -#define cat(x, y) x ## y +#define cat(x, y) x ## y /* - * macros to correctly define plugin function names depending on whether - * the plugin is being compiled for static linkage or dynamic loading. + * macros to correctly define plugin function names depending on whether + * the plugin is being compiled for static linkage or dynamic loading. * When compiled for static linkage, each plugin needs to have unique * function names for all of its entry points. When compiled for dynamic * loading, the plugins must name their entry points consistently so that @@ -59,13 +59,13 @@ /** "WIN32" is defined on both WIN32 and WIN64 platforms... */ -#if (defined(WIN32)) +#if (defined(WIN32)) #define WIN32_LEAN_AND_MEAN #include #if !defined(STATIC_PLUGIN) #if defined(VMDPLUGIN_EXPORTS) -/** +/** * Only define DllMain for plugins, not in VMD or in statically linked plugins * VMDPLUGIN_EXPORTS is only defined when compiling dynamically loaded plugins */ @@ -86,7 +86,7 @@ BOOL APIENTRY DllMain( HANDLE hModule, #endif /* ! STATIC_PLUGIN */ #else /** If we're not compiling on Windows, then this macro is defined empty */ -#define VMDPLUGIN_API +#define VMDPLUGIN_API #endif /** define plugin linkage correctly for both C and C++ based plugins */ @@ -96,13 +96,13 @@ BOOL APIENTRY DllMain( HANDLE hModule, #define VMDPLUGIN_EXTERN extern VMDPLUGIN_API #endif /* __cplusplus */ -/* - * Plugin API functions start here +/* + * Plugin API functions start here */ -/** - * Init routine: called the first time the library is loaded by the +/** + * Init routine: called the first time the library is loaded by the * application and before any other API functions are referenced. * Return 0 on success. */ @@ -110,15 +110,15 @@ VMDPLUGIN_EXTERN int VMDPLUGIN_init(void); /** * Macro for creating a struct header used in all plugin structures. - * - * This header should be placed at the top of every plugin API definition + * + * This header should be placed at the top of every plugin API definition * so that it can be treated as a subtype of the base plugin type. * * abiversion: Defines the ABI for the base plugin type (not for other plugins) * type: A string descriptor of the plugin type. * name: A name for the plugin. * author: A string identifier, possibly including newlines. - * Major and minor version. + * Major and minor version. * is_reentrant: Whether this library can be run concurrently with itself. */ #define vmdplugin_HEAD \ @@ -129,12 +129,12 @@ VMDPLUGIN_EXTERN int VMDPLUGIN_init(void); const char *author; \ int majorv; \ int minorv; \ - int is_reentrant; + int is_reentrant; -/** +/** * Typedef for generic plugin header, individual plugins can - * make their own structures as long as the header info remains - * the same as the generic plugin header, most easily done by + * make their own structures as long as the header info remains + * the same as the generic plugin header, most easily done by * using the vmdplugin_HEAD macro. */ typedef struct { @@ -158,7 +158,7 @@ typedef struct { #define VMDPLUGIN_ERROR -1 /*@}*/ -/** +/** * Function pointer typedef for register callback functions */ typedef int (*vmdplugin_register_cb)(void *, vmdplugin_t *); @@ -175,16 +175,16 @@ typedef int (*vmdplugin_register_cb)(void *, vmdplugin_t *); VMDPLUGIN_EXTERN int VMDPLUGIN_register(void *, vmdplugin_register_cb); /** - * Allow the library to register Tcl extensions. + * Allow the library to register Tcl extensions. * This API is optional; if found by dlopen, it will be called after first - * calling init and register. + * calling init and register. */ -VMDPLUGIN_EXTERN int VMDPLUGIN_register_tcl(void *, void *tcl_interp, +VMDPLUGIN_EXTERN int VMDPLUGIN_register_tcl(void *, void *tcl_interp, vmdplugin_register_cb); /** - * The Fini method is called when the application will no longer use - * any plugins in the library. + * The Fini method is called when the application will no longer use + * any plugins in the library. */ VMDPLUGIN_EXTERN int VMDPLUGIN_fini(void); -- GitLab From dfa9815246c3f6b64d130fe0f3d34bd7c2626d65 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Apr 2017 17:07:28 -0400 Subject: [PATCH 043/593] update for fix gle docs from michele ceriotti --- doc/src/fix_gle.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/src/fix_gle.txt b/doc/src/fix_gle.txt index ca7625e2d0..b8d3cc9b34 100644 --- a/doc/src/fix_gle.txt +++ b/doc/src/fix_gle.txt @@ -67,9 +67,10 @@ target value as the {Tstart} and {Tstop} arguments, so that the diffusion matrix that gives canonical sampling for a given A is computed automatically. However, the GLE framework also allow for non-equilibrium sampling, that can be used for instance to model inexpensively zero-point energy -effects "(Ceriotti2)"_#Ceriotti2. This is achieved specifying the -{noneq} keyword followed by the name of the file that contains the -static covariance matrix for the non-equilibrium dynamics. +effects "(Ceriotti2)"_#Ceriotti2. This is achieved specifying the {noneq} + keyword followed by the name of the file that contains the static covariance +matrix for the non-equilibrium dynamics. Please note, that the covariance +matrix is expected to be given in [temperature units]. Since integrating GLE dynamics can be costly when used together with simple potentials, one can use the {every} optional keyword to @@ -148,7 +149,7 @@ dpd/tstat"_pair_dpd.html, "fix gld"_fix_gld.html 1170-80 (2010) :link(GLE4MD) -[(GLE4MD)] "http://epfl-cosmo.github.io/gle4md/"_http://epfl-cosmo.github.io/gle4md/ +[(GLE4MD)] "http://gle4md.org/"_http://gle4md.org/ :link(Ceriotti2) [(Ceriotti2)] Ceriotti, Bussi and Parrinello, Phys Rev Lett 103, -- GitLab From f0681f7e127837f8cb2d033eb180d90f6d4717b3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 20 Apr 2017 14:42:01 -0400 Subject: [PATCH 044/593] add support for USER-TALLY to pair styles hybrid and hybrid/overlay --- src/pair.h | 4 ++-- src/pair_hybrid.cpp | 17 +++++++++++++++++ src/pair_hybrid.h | 3 +++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/pair.h b/src/pair.h index 3f66c6095a..dd859e5f2a 100644 --- a/src/pair.h +++ b/src/pair.h @@ -194,8 +194,8 @@ class Pair : protected Pointers { int num_tally_compute; class Compute **list_tally_compute; public: - void add_tally_callback(class Compute *); - void del_tally_callback(class Compute *); + virtual void add_tally_callback(class Compute *); + virtual void del_tally_callback(class Compute *); protected: int instance_me; // which Pair class instantiation I am diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index 03e55006fc..e327066183 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -169,6 +169,23 @@ void PairHybrid::compute(int eflag, int vflag) if (vflag_fdotr) virial_fdotr_compute(); } + +/* ---------------------------------------------------------------------- */ + +void PairHybrid::add_tally_callback(Compute *ptr) +{ + for (int m = 0; m < nstyles; m++) + styles[m]->add_tally_callback(ptr); +} + +/* ---------------------------------------------------------------------- */ + +void PairHybrid::del_tally_callback(Compute *ptr) +{ + for (int m = 0; m < nstyles; m++) + styles[m]->del_tally_callback(ptr); +} + /* ---------------------------------------------------------------------- */ void PairHybrid::compute_inner() diff --git a/src/pair_hybrid.h b/src/pair_hybrid.h index e3de3b022a..8fd0b9e4e0 100644 --- a/src/pair_hybrid.h +++ b/src/pair_hybrid.h @@ -55,6 +55,9 @@ class PairHybrid : public Pair { int check_ijtype(int, int, char *); + virtual void add_tally_callback(class Compute *); + virtual void del_tally_callback(class Compute *); + protected: int nstyles; // # of sub-styles Pair **styles; // list of Pair style classes -- GitLab From 4e411364ffa4f79df1378f0c21a4f8a482ea76e5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 21 Apr 2017 14:01:38 -0400 Subject: [PATCH 045/593] add support to pair_modify to selectively disable compute/tally callbacks in sub-styles for pair hybrid and hybrid/overlay --- doc/src/pair_hybrid.txt | 6 ++++++ doc/src/pair_modify.txt | 29 ++++++++++++++++++++++------- src/pair_hybrid.cpp | 24 +++++++++++++++++++++--- src/pair_hybrid.h | 1 + 4 files changed, 50 insertions(+), 10 deletions(-) diff --git a/doc/src/pair_hybrid.txt b/doc/src/pair_hybrid.txt index 7ef54e7f07..1c0eee27a1 100644 --- a/doc/src/pair_hybrid.txt +++ b/doc/src/pair_hybrid.txt @@ -225,6 +225,12 @@ special_bonds lj/coul 1e-20 1e-20 0.5 pair_hybrid tersoff lj/cut/coul/long 12.0 pair_modify pair tersoff special lj/coul 1.0 1.0 1.0 :pre +For use with the various "compute */tally"_compute_tally.html +computes, the "pair_modify compute/tally"_pair_modify.html +command can be used to selectively turn off processing of +the compute tally styles, for example, if those pair styles +(e.g. manybody styles) do not support this feature. + See the "pair_modify"_pair_modify.html doc page for details on the specific syntax, requirements and restrictions. diff --git a/doc/src/pair_modify.txt b/doc/src/pair_modify.txt index 03fb80ae5e..34dbb5bc3d 100644 --- a/doc/src/pair_modify.txt +++ b/doc/src/pair_modify.txt @@ -15,11 +15,13 @@ pair_modify keyword values ... :pre one or more keyword/value pairs may be listed :ulb,l keyword = {pair} or {shift} or {mix} or {table} or {table/disp} or {tabinner} or {tabinner/disp} or {tail} or {compute} :l {pair} values = sub-style N {special} which wt1 wt2 wt3 + or sub-style N {compute/tally} flag sub-style = sub-style of "pair hybrid"_pair_hybrid.html N = which instance of sub-style (only if sub-style is used multiple times) - {special} which wt1 wt2 wt3 = override {special_bonds} settings (optional) - which = {lj/coul} or {lj} or {coul} - w1,w2,w3 = 1-2, 1-3, and 1-4 weights from 0.0 to 1.0 inclusive + {special} which wt1 wt2 wt3 = override {special_bonds} settings (optional) + which = {lj/coul} or {lj} or {coul} + w1,w2,w3 = 1-2, 1-3, and 1-4 weights from 0.0 to 1.0 inclusive + {compute/tally} flag = {yes} or {no} {mix} value = {geometric} or {arithmetic} or {sixthpower} {shift} value = {yes} or {no} {table} value = N @@ -40,6 +42,7 @@ pair_modify shift yes mix geometric pair_modify tail yes pair_modify table 12 pair_modify pair lj/cut compute no +pair_modify pair tersoff compute/tally no pair_modify pair lj/cut/coul/long 1 special lj/coul 0.0 0.0 0.0 :pre [Description:] @@ -60,9 +63,12 @@ keywords will be applied to. Note that if the {pair} keyword is not used, and the pair style is {hybrid} or {hybrid/overlay}, then all the specified keywords will be applied to all sub-styles. -The {special} keyword can only be used in conjunction with the {pair} -keyword and must directly follow it. It allows to override the +The {special} and {compute/tally} keywords can [only] be used in +conjunction with the {pair} keyword and must directly follow it. +{special} allows to override the "special_bonds"_special_bonds.html settings for the specified sub-style. +{compute/tally} allows to disable or enable registering +"compute */tally"_compute_tally.html computes for a given sub-style. More details are given below. The {mix} keyword affects pair coefficients for interactions between @@ -231,6 +237,14 @@ setting. Substituting 1.0e-10 for 0.0 and 0.9999999999 for 1.0 is usually a sufficient workaround in this case without causing a significant error. +The {compute/tally} keyword takes exactly 1 argument ({no} or {yes}), +and allows to selectively disable or enable processing of the various +"compute */tally"_compute_tally.html styles for a given +"pair hybrid or hybrid/overlay"_pair_hybrid.html sub-style. + +NOTE: Any "pair_modify pair compute/tally" command must be issued +[before] the corresponding compute style is defined. + :line [Restrictions:] none @@ -240,8 +254,9 @@ conflicting options. You cannot use {tail} yes with 2d simulations. [Related commands:] -"pair_style"_pair_style.html, "pair_coeff"_pair_coeff.html, -"thermo_style"_thermo_style.html +"pair_style"_pair_style.html, "pair_style hybrid"_pair_hybrid.html, +pair_coeff"_pair_coeff.html, "thermo_style"_thermo_style.html, +"compute */tally"_compute_tally.html [Default:] diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index e327066183..fa79f1cf97 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -33,7 +33,7 @@ using namespace LAMMPS_NS; PairHybrid::PairHybrid(LAMMPS *lmp) : Pair(lmp), styles(NULL), keywords(NULL), multiple(NULL), nmap(NULL), - map(NULL), special_lj(NULL), special_coul(NULL) + map(NULL), special_lj(NULL), special_coul(NULL), compute_tally(NULL) { nstyles = 0; @@ -62,6 +62,7 @@ PairHybrid::~PairHybrid() delete [] special_lj; delete [] special_coul; + delete [] compute_tally; delete [] svector; @@ -175,7 +176,7 @@ void PairHybrid::compute(int eflag, int vflag) void PairHybrid::add_tally_callback(Compute *ptr) { for (int m = 0; m < nstyles; m++) - styles[m]->add_tally_callback(ptr); + if (compute_tally[m]) styles[m]->add_tally_callback(ptr); } /* ---------------------------------------------------------------------- */ @@ -183,7 +184,7 @@ void PairHybrid::add_tally_callback(Compute *ptr) void PairHybrid::del_tally_callback(Compute *ptr) { for (int m = 0; m < nstyles; m++) - styles[m]->del_tally_callback(ptr); + if (compute_tally[m]) styles[m]->del_tally_callback(ptr); } /* ---------------------------------------------------------------------- */ @@ -270,6 +271,8 @@ void PairHybrid::settings(int narg, char **arg) special_lj = new double*[narg]; special_coul = new double*[narg]; + compute_tally = new int[narg]; + // allocate each sub-style // allocate uses suffix, but don't store suffix version in keywords, // else syntax in coeff() will not match @@ -289,6 +292,7 @@ void PairHybrid::settings(int narg, char **arg) styles[nstyles] = force->new_pair(arg[iarg],1,dummy); force->store_style(keywords[nstyles],arg[iarg],0); special_lj[nstyles] = special_coul[nstyles] = NULL; + compute_tally[nstyles] = 1; jarg = iarg + 1; while (jarg < narg && !force->pair_map->count(arg[jarg])) jarg++; @@ -799,6 +803,20 @@ void PairHybrid::modify_params(int narg, char **arg) iarg += 5; } + // if 2nd keyword (after pair) is compute/tally: + // set flag to register USER-TALLY computes accordingly + + if (iarg < narg && strcmp(arg[iarg],"compute/tally") == 0) { + if (narg < iarg+2) + error->all(FLERR,"Illegal pair_modify compute/tally command"); + if (strcmp(arg[iarg+1],"yes") == 0) { + compute_tally[m] = 1; + } else if (strcmp(arg[iarg+1],"no") == 0) { + compute_tally[m] = 0; + } else error->all(FLERR,"Illegal pair_modify compute/tally command"); + iarg += 2; + } + // apply the remaining keywords to the base pair style itself and the // sub-style except for "pair" and "special". // the former is important for some keywords like "tail" or "compute" diff --git a/src/pair_hybrid.h b/src/pair_hybrid.h index 8fd0b9e4e0..b8b9af5f40 100644 --- a/src/pair_hybrid.h +++ b/src/pair_hybrid.h @@ -72,6 +72,7 @@ class PairHybrid : public Pair { int ***map; // list of sub-styles itype,jtype points to double **special_lj; // list of per style LJ exclusion factors double **special_coul; // list of per style Coulomb exclusion factors + int *compute_tally; // list of on/off flags for tally computes void allocate(); void flags(); -- GitLab From 396e0b54234da5b34193b92638c08fba70142b7a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 21 Apr 2017 14:02:17 -0400 Subject: [PATCH 046/593] correct broken link in html bond doc overview --- doc/src/bonds.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/src/bonds.txt b/doc/src/bonds.txt index 3b50f6482f..169d56ecbe 100644 --- a/doc/src/bonds.txt +++ b/doc/src/bonds.txt @@ -16,7 +16,6 @@ Bond Styles :h1 bond_none bond_nonlinear bond_oxdna - bond_oxdna2 bond_quartic bond_table bond_zero -- GitLab From 8f14511831986229bc62d1072d1d7ef67968a403 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 21 Apr 2017 16:46:27 -0400 Subject: [PATCH 047/593] avoid division by zero by initializing unset (=automatic) g_ewald parameters to some number > 0. --- src/KSPACE/pppm_disp.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 5d6c2042be..b31d42a815 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -380,6 +380,12 @@ void PPPMDisp::init() alpha = qdist / (cos(0.5*theta) * blen); } + //if g_ewald and g_ewald_6 have not been specified, set some initial value + // to avoid problems when calculating the energies! + + if (!gewaldflag) g_ewald = 1; + if (!gewaldflag_6) g_ewald_6 = 1; + // initialize the pair style to get the coefficients neighrequest_flag = 0; @@ -387,12 +393,6 @@ void PPPMDisp::init() neighrequest_flag = 1; init_coeffs(); - //if g_ewald and g_ewald_6 have not been specified, set some initial value - // to avoid problems when calculating the energies! - - if (!gewaldflag) g_ewald = 1; - if (!gewaldflag_6) g_ewald_6 = 1; - // set accuracy (force units) from accuracy_relative or accuracy_absolute if (accuracy_absolute >= 0.0) accuracy = accuracy_absolute; -- GitLab From 197ce4580b2997e9726219565ad1a85080461d3f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 21 Apr 2017 17:27:08 -0400 Subject: [PATCH 048/593] avoid division by zero also for ewald/disp --- src/KSPACE/ewald_disp.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index 467a748d08..85e3da921b 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -138,13 +138,14 @@ void EwaldDisp::init() nsums += n[k]; } - if (!gewaldflag) g_ewald = 0.0; + if (!gewaldflag) g_ewald = g_ewald_6 = 1.0; pair->init(); // so B is defined init_coeffs(); init_coeff_sums(); if (function[0]) qsum_qsq(); else qsqsum = qsum = 0.0; natoms_original = atom->natoms; + if (!gewaldflag) g_ewald = g_ewald_6 = 0.0; // turn off coulombic if no charge @@ -218,8 +219,8 @@ void EwaldDisp::init() } if (!comm->me) { - if (screen) fprintf(screen, " G vector = %g\n", g_ewald); - if (logfile) fprintf(logfile, " G vector = %g\n", g_ewald); + if (screen) fprintf(screen, " G vector = %g, accuracy = %g\n", g_ewald,accuracy); + if (logfile) fprintf(logfile, " G vector = %g accuracy = %g\n", g_ewald,accuracy); } g_ewald_6 = g_ewald; -- GitLab From 0ac22e034c2a3b4627383d798b397defabd65851 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 22 Apr 2017 21:50:27 -0400 Subject: [PATCH 049/593] turn errors from manybody potentials for */tally computes into warnings --- src/USER-TALLY/compute_force_tally.cpp | 4 ++-- src/USER-TALLY/compute_heat_flux_tally.cpp | 4 ++-- src/USER-TALLY/compute_pe_mol_tally.cpp | 6 +++--- src/USER-TALLY/compute_pe_tally.cpp | 4 ++-- src/USER-TALLY/compute_stress_tally.cpp | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/USER-TALLY/compute_force_tally.cpp b/src/USER-TALLY/compute_force_tally.cpp index e9ecedd5ab..e97a1c751c 100644 --- a/src/USER-TALLY/compute_force_tally.cpp +++ b/src/USER-TALLY/compute_force_tally.cpp @@ -65,12 +65,12 @@ ComputeForceTally::~ComputeForceTally() void ComputeForceTally::init() { if (force->pair == NULL) - error->all(FLERR,"Trying to use compute force/tally with no pair style"); + error->all(FLERR,"Trying to use compute force/tally without pair style"); else force->pair->add_tally_callback(this); if (force->pair->single_enable == 0 || force->pair->manybody_flag) - error->all(FLERR,"Compute force/tally used with incompatible pair style."); + error->warning(FLERR,"Compute force/tally used with incompatible pair style"); if ((comm->me == 0) && (force->bond || force->angle || force->dihedral || force->improper || force->kspace)) diff --git a/src/USER-TALLY/compute_heat_flux_tally.cpp b/src/USER-TALLY/compute_heat_flux_tally.cpp index 214311cb3d..48cad538d5 100644 --- a/src/USER-TALLY/compute_heat_flux_tally.cpp +++ b/src/USER-TALLY/compute_heat_flux_tally.cpp @@ -64,12 +64,12 @@ ComputeHeatFluxTally::~ComputeHeatFluxTally() void ComputeHeatFluxTally::init() { if (force->pair == NULL) - error->all(FLERR,"Trying to use compute heat/flux/tally with no pair style"); + error->all(FLERR,"Trying to use compute heat/flux/tally without pair style"); else force->pair->add_tally_callback(this); if (force->pair->single_enable == 0 || force->pair->manybody_flag) - error->all(FLERR,"Compute heat/flux/tally used with incompatible pair style."); + error->warning(FLERR,"Compute heat/flux/tally used with incompatible pair style"); if ((comm->me == 0) && (force->bond || force->angle || force->dihedral || force->improper || force->kspace)) diff --git a/src/USER-TALLY/compute_pe_mol_tally.cpp b/src/USER-TALLY/compute_pe_mol_tally.cpp index 09ee04d57a..a30f2d6b9a 100644 --- a/src/USER-TALLY/compute_pe_mol_tally.cpp +++ b/src/USER-TALLY/compute_pe_mol_tally.cpp @@ -59,15 +59,15 @@ ComputePEMolTally::~ComputePEMolTally() void ComputePEMolTally::init() { if (force->pair == NULL) - error->all(FLERR,"Trying to use compute pe/mol/tally with no pair style"); + error->all(FLERR,"Trying to use compute pe/mol/tally without pair style"); else force->pair->add_tally_callback(this); if (atom->molecule_flag == 0) - error->all(FLERR,"Compute pe/mol/tally requires molecule IDs."); + error->all(FLERR,"Compute pe/mol/tally requires molecule IDs"); if (force->pair->single_enable == 0 || force->pair->manybody_flag) - error->all(FLERR,"Compute pe/mol/tally used with incompatible pair style."); + error->warning(FLERR,"Compute pe/mol/tally used with incompatible pair style"); if ((comm->me == 0) && (force->bond || force->angle || force->dihedral || force->improper || force->kspace)) diff --git a/src/USER-TALLY/compute_pe_tally.cpp b/src/USER-TALLY/compute_pe_tally.cpp index 68c00b6d2e..2117f2cb15 100644 --- a/src/USER-TALLY/compute_pe_tally.cpp +++ b/src/USER-TALLY/compute_pe_tally.cpp @@ -64,12 +64,12 @@ ComputePETally::~ComputePETally() void ComputePETally::init() { if (force->pair == NULL) - error->all(FLERR,"Trying to use compute pe/tally with no pair style"); + error->all(FLERR,"Trying to use compute pe/tally without a pair style"); else force->pair->add_tally_callback(this); if (force->pair->single_enable == 0 || force->pair->manybody_flag) - error->all(FLERR,"Compute pe/tally used with incompatible pair style."); + error->warning(FLERR,"Compute pe/tally used with incompatible pair style"); if ((comm->me == 0) && (force->bond || force->angle || force->dihedral || force->improper || force->kspace)) diff --git a/src/USER-TALLY/compute_stress_tally.cpp b/src/USER-TALLY/compute_stress_tally.cpp index 2575bd372a..66df9f6e4f 100644 --- a/src/USER-TALLY/compute_stress_tally.cpp +++ b/src/USER-TALLY/compute_stress_tally.cpp @@ -65,12 +65,12 @@ ComputeStressTally::~ComputeStressTally() void ComputeStressTally::init() { if (force->pair == NULL) - error->all(FLERR,"Trying to use compute stress/tally with no pair style"); + error->all(FLERR,"Trying to use compute stress/tally without pair style"); else force->pair->add_tally_callback(this); if (force->pair->single_enable == 0 || force->pair->manybody_flag) - error->all(FLERR,"Compute stress/tally used with incompatible pair style."); + error->warning(FLERR,"Compute stress/tally used with incompatible pair style"); if ((comm->me == 0) && (force->bond || force->angle || force->dihedral || force->improper || force->kspace)) -- GitLab From 958f05a6f384523e0207695a5c7b9765b6585608 Mon Sep 17 00:00:00 2001 From: Giacomo Fiorin Date: Tue, 25 Apr 2017 01:09:05 -0400 Subject: [PATCH 050/593] Allow requesting Python interpreter without having to define a function just for that --- src/python.cpp | 7 +++++++ src/python.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/python.cpp b/src/python.cpp index da3a874315..df29d73c05 100644 --- a/src/python.cpp +++ b/src/python.cpp @@ -60,6 +60,13 @@ bool Python::is_enabled() const { /* ---------------------------------------------------------------------- */ +void Python::request() +{ + if (!impl) init(); +} + +/* ---------------------------------------------------------------------- */ + void Python::command(int narg, char **arg) { if(!impl) init(); diff --git a/src/python.h b/src/python.h index 0b504f8944..bec6c5ae27 100644 --- a/src/python.h +++ b/src/python.h @@ -40,6 +40,7 @@ public: char * long_string(int ifunc); bool is_enabled() const; + void request(); private: PythonInterface * impl; -- GitLab From 2e1f8b4aefb7699d402d32306489a9976802cde8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 25 Apr 2017 10:21:02 -0400 Subject: [PATCH 051/593] make Python::init() method public and remove the now redundant Python::request() method --- src/python.cpp | 19 ++++++------------- src/python.h | 3 +-- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/python.cpp b/src/python.cpp index df29d73c05..fa1639b075 100644 --- a/src/python.cpp +++ b/src/python.cpp @@ -43,7 +43,7 @@ PythonInterface::~PythonInterface() void Python::init() { #if LMP_PYTHON - impl = new PythonImpl(lmp); + if (!impl) impl = new PythonImpl(lmp); #else error->all(FLERR,"Python support missing! Compile with PYTHON package installed!"); #endif @@ -60,16 +60,9 @@ bool Python::is_enabled() const { /* ---------------------------------------------------------------------- */ -void Python::request() -{ - if (!impl) init(); -} - -/* ---------------------------------------------------------------------- */ - void Python::command(int narg, char **arg) { - if(!impl) init(); + init(); impl->command(narg, arg); } @@ -77,7 +70,7 @@ void Python::command(int narg, char **arg) void Python::invoke_function(int ifunc, char *result) { - if(!impl) init(); + init(); impl->invoke_function(ifunc, result); } @@ -85,7 +78,7 @@ void Python::invoke_function(int ifunc, char *result) int Python::find(char *name) { - if(!impl) init(); + init(); return impl->find(name); } @@ -93,7 +86,7 @@ int Python::find(char *name) int Python::variable_match(char *name, char *varname, int numeric) { - if(!impl) init(); + init(); return impl->variable_match(name, varname, numeric); } @@ -101,6 +94,6 @@ int Python::variable_match(char *name, char *varname, int numeric) char * Python::long_string(int ifunc) { - if(!impl) init(); + init(); return impl->long_string(ifunc); } diff --git a/src/python.h b/src/python.h index bec6c5ae27..73f6354609 100644 --- a/src/python.h +++ b/src/python.h @@ -40,11 +40,10 @@ public: char * long_string(int ifunc); bool is_enabled() const; - void request(); + void init(); private: PythonInterface * impl; - void init(); }; } -- GitLab From ddc1e4e86ea713a6c9393611830c078c9c1d944d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 25 Apr 2017 13:27:20 -0400 Subject: [PATCH 052/593] detect and refuse to run pair style srp together with fix rigid --- doc/src/pair_srp.txt | 2 ++ src/USER-MISC/fix_srp.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/doc/src/pair_srp.txt b/doc/src/pair_srp.txt index 3f54445ba8..e7f1e00d10 100644 --- a/doc/src/pair_srp.txt +++ b/doc/src/pair_srp.txt @@ -150,6 +150,8 @@ hybrid"_pair_hybrid.html. This pair style requires the "newton"_newton.html command to be {on} for non-bonded interactions. +This pair style is not compatible with "rigid body integrators"_fix_rigid.html + [Related commands:] "pair_style hybrid"_pair_hybrid.html, "pair_coeff"_pair_coeff.html, diff --git a/src/USER-MISC/fix_srp.cpp b/src/USER-MISC/fix_srp.cpp index fbd8473cb0..f3dec42a83 100644 --- a/src/USER-MISC/fix_srp.cpp +++ b/src/USER-MISC/fix_srp.cpp @@ -101,6 +101,13 @@ void FixSRP::init() if (force->pair_match("hybrid",1) == NULL) error->all(FLERR,"Cannot use pair srp without pair_style hybrid"); + int has_rigid = 0; + for (int i = 0; i < modify->nfix; i++) + if (strncmp(modify->fix[i]->style,"rigid",5) == 0) ++has_rigid; + + if (has_rigid > 0) + error->all(FLERR,"Pair srp is not compatible with rigid fixes."); + if ((bptype < 1) || (bptype > atom->ntypes)) error->all(FLERR,"Illegal bond particle type"); -- GitLab From 8910ec6e594cdaea63dbd8cc634e520ebd1b95ae Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Tue, 25 Apr 2017 13:48:51 -0600 Subject: [PATCH 053/593] Updating Kokkos lib to 2.03.00 --- lib/kokkos/CHANGELOG.md | 23 + lib/kokkos/CMakeLists.txt | 11 +- lib/kokkos/Makefile.kokkos | 611 +++-- lib/kokkos/Makefile.targets | 13 +- lib/kokkos/README | 14 +- .../algorithms/cmake/Dependencies.cmake | 2 +- lib/kokkos/algorithms/src/Kokkos_Random.hpp | 8 +- lib/kokkos/algorithms/src/Kokkos_Sort.hpp | 325 ++- lib/kokkos/algorithms/unit_tests/TestSort.hpp | 67 +- lib/kokkos/bin/nvcc_wrapper | 5 +- .../deps/{QTHREAD.cmake => QTHREADS.cmake} | 3 +- ...TPLQTHREAD.cmake => FindTPLQTHREADS.cmake} | 3 +- .../config/kokkos_dev/config-core-all.sh | 15 +- lib/kokkos/config/master_history.txt | 3 +- lib/kokkos/config/test_all_sandia | 834 +++--- .../containers/src/Kokkos_DynamicView.hpp | 143 +- .../containers/src/Kokkos_UnorderedMap.hpp | 33 +- .../containers/unit_tests/CMakeLists.txt | 41 +- .../containers/unit_tests/TestDynamicView.hpp | 3 + lib/kokkos/core/cmake/Dependencies.cmake | 4 +- lib/kokkos/core/cmake/KokkosCore_config.h.in | 2 +- lib/kokkos/core/perf_test/Makefile | 1 - lib/kokkos/core/perf_test/PerfTestCuda.cpp | 10 + lib/kokkos/core/perf_test/PerfTestDriver.hpp | 336 +++ lib/kokkos/core/perf_test/PerfTestHost.cpp | 10 + lib/kokkos/core/perf_test/PerfTestMDRange.hpp | 564 ++++ lib/kokkos/core/src/CMakeLists.txt | 12 +- .../src/Cuda/KokkosExp_Cuda_IterateTile.hpp | 1300 +++++++++ lib/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp | 3 + lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp | 39 +- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Impl.cpp | 25 +- .../core/src/Cuda/Kokkos_Cuda_Parallel.hpp | 142 +- .../core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp | 155 +- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp | 2 +- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp | 61 +- .../core/src/KokkosExp_MDRangePolicy.hpp | 758 +++--- lib/kokkos/core/src/Kokkos_Array.hpp | 49 +- lib/kokkos/core/src/Kokkos_Concepts.hpp | 1 + lib/kokkos/core/src/Kokkos_Core.hpp | 9 +- lib/kokkos/core/src/Kokkos_Core_fwd.hpp | 131 +- lib/kokkos/core/src/Kokkos_Cuda.hpp | 2 +- lib/kokkos/core/src/Kokkos_HBWSpace.hpp | 173 +- lib/kokkos/core/src/Kokkos_HostSpace.hpp | 135 +- lib/kokkos/core/src/Kokkos_Macros.hpp | 351 ++- lib/kokkos/core/src/Kokkos_MemoryPool.hpp | 1 + lib/kokkos/core/src/Kokkos_OpenMP.hpp | 2 +- lib/kokkos/core/src/Kokkos_Pair.hpp | 61 +- lib/kokkos/core/src/Kokkos_Parallel.hpp | 33 +- .../core/src/Kokkos_Parallel_Reduce.hpp | 4 +- ...Kokkos_Qthread.hpp => Kokkos_Qthreads.hpp} | 101 +- lib/kokkos/core/src/Kokkos_Serial.hpp | 576 +--- lib/kokkos/core/src/Kokkos_TaskScheduler.hpp | 539 ++-- lib/kokkos/core/src/Kokkos_Threads.hpp | 1 - lib/kokkos/core/src/Makefile | 82 +- .../src/OpenMP/Kokkos_OpenMP_Parallel.hpp | 537 ++-- .../core/src/OpenMP/Kokkos_OpenMP_Task.cpp | 339 ++- .../core/src/OpenMP/Kokkos_OpenMP_Task.hpp | 284 +- .../core/src/OpenMP/Kokkos_OpenMPexec.cpp | 150 +- .../core/src/OpenMP/Kokkos_OpenMPexec.hpp | 790 +----- .../core/src/Qthread/Kokkos_QthreadExec.cpp | 511 ---- .../core/src/Qthread/Kokkos_QthreadExec.hpp | 620 ----- .../core/src/Qthreads/Kokkos_QthreadsExec.cpp | 519 ++++ .../core/src/Qthreads/Kokkos_QthreadsExec.hpp | 640 +++++ .../Kokkos_Qthreads_Parallel.hpp} | 102 +- .../src/Qthreads/Kokkos_Qthreads_Task.cpp | 320 +++ .../src/Qthreads/Kokkos_Qthreads_Task.hpp | 156 ++ .../Kokkos_Qthreads_TaskPolicy.cpp.old} | 47 +- .../Kokkos_Qthreads_TaskPolicy.hpp.old} | 76 +- .../Qthreads/Kokkos_Qthreads_TaskQueue.hpp | 319 +++ .../Kokkos_Qthreads_TaskQueue_impl.hpp | 436 +++ .../core/src/{Qthread => Qthreads}/README | 1 - .../core/src/Threads/Kokkos_ThreadsExec.cpp | 8 +- .../core/src/Threads/Kokkos_ThreadsExec.hpp | 30 +- .../core/src/Threads/Kokkos_ThreadsTeam.hpp | 32 +- .../src/impl/KokkosExp_Host_IterateTile.hpp | 2356 +++++++++++++++++ lib/kokkos/core/src/impl/Kokkos_BitOps.hpp | 21 +- lib/kokkos/core/src/impl/Kokkos_Core.cpp | 330 ++- .../core/src/impl/Kokkos_FunctorAnalysis.hpp | 653 +++++ lib/kokkos/core/src/impl/Kokkos_HBWSpace.cpp | 20 +- lib/kokkos/core/src/impl/Kokkos_HostSpace.cpp | 20 +- .../core/src/impl/Kokkos_HostThreadTeam.cpp | 463 ++++ .../core/src/impl/Kokkos_HostThreadTeam.hpp | 1090 ++++++++ .../core/src/impl/Kokkos_Memory_Fence.hpp | 12 +- lib/kokkos/core/src/impl/Kokkos_OldMacros.hpp | 10 +- .../src/impl/Kokkos_Profiling_Interface.cpp | 8 +- .../src/impl/Kokkos_Profiling_Interface.hpp | 4 +- lib/kokkos/core/src/impl/Kokkos_Reducer.hpp | 317 +++ lib/kokkos/core/src/impl/Kokkos_Serial.cpp | 143 +- .../core/src/impl/Kokkos_Serial_Task.cpp | 18 +- .../core/src/impl/Kokkos_Serial_Task.hpp | 225 +- .../core/src/impl/Kokkos_Synchronic.hpp | 693 ----- .../src/impl/Kokkos_Synchronic_Config.hpp | 169 -- .../core/src/impl/Kokkos_Synchronic_n3998.hpp | 162 -- lib/kokkos/core/src/impl/Kokkos_TaskQueue.hpp | 124 +- .../core/src/impl/Kokkos_TaskQueue_impl.hpp | 367 +-- lib/kokkos/core/src/impl/Kokkos_Utilities.hpp | 1 + lib/kokkos/core/src/impl/Kokkos_spinwait.cpp | 146 +- lib/kokkos/core/src/impl/Kokkos_spinwait.hpp | 28 +- lib/kokkos/core/unit_test/CMakeLists.txt | 28 +- lib/kokkos/core/unit_test/Makefile | 80 +- lib/kokkos/core/unit_test/TestAggregate.hpp | 97 +- lib/kokkos/core/unit_test/TestAtomic.hpp | 329 +-- .../core/unit_test/TestAtomicOperations.hpp | 744 +++--- lib/kokkos/core/unit_test/TestAtomicViews.hpp | 1301 +++++---- lib/kokkos/core/unit_test/TestCXX11.hpp | 383 +-- .../core/unit_test/TestCXX11Deduction.hpp | 52 +- .../core/unit_test/TestCompilerMacros.hpp | 38 +- .../core/unit_test/TestDefaultDeviceType.cpp | 24 +- .../unit_test/TestDefaultDeviceTypeInit.hpp | 461 ++-- .../unit_test/TestDefaultDeviceType_a.cpp | 18 +- .../unit_test/TestDefaultDeviceType_b.cpp | 18 +- .../unit_test/TestDefaultDeviceType_c.cpp | 18 +- .../unit_test/TestDefaultDeviceType_d.cpp | 222 +- lib/kokkos/core/unit_test/TestHWLOC.cpp | 22 +- lib/kokkos/core/unit_test/TestMDRange.hpp | 1730 ++++++++++-- lib/kokkos/core/unit_test/TestMemoryPool.hpp | 14 +- .../core/unit_test/TestPolicyConstruction.hpp | 739 +++--- lib/kokkos/core/unit_test/TestQthread.cpp | 287 -- lib/kokkos/core/unit_test/TestRange.hpp | 232 +- lib/kokkos/core/unit_test/TestReduce.hpp | 1915 ++++++++------ lib/kokkos/core/unit_test/TestScan.hpp | 81 +- lib/kokkos/core/unit_test/TestSharedAlloc.hpp | 159 +- lib/kokkos/core/unit_test/TestSynchronic.cpp | 449 ---- lib/kokkos/core/unit_test/TestSynchronic.hpp | 241 -- .../core/unit_test/TestTaskScheduler.hpp | 720 ++--- lib/kokkos/core/unit_test/TestTeam.hpp | 842 +++--- lib/kokkos/core/unit_test/TestTeamVector.hpp | 724 ++--- .../unit_test/TestTemplateMetaFunctions.hpp | 144 +- lib/kokkos/core/unit_test/TestTile.hpp | 102 +- lib/kokkos/core/unit_test/TestUtilities.hpp | 331 ++- lib/kokkos/core/unit_test/TestViewAPI.hpp | 1439 +++++----- lib/kokkos/core/unit_test/TestViewMapping.hpp | 1992 +++++++------- lib/kokkos/core/unit_test/TestViewOfClass.hpp | 76 +- .../core/unit_test/TestViewSpaceAssign.hpp | 40 +- lib/kokkos/core/unit_test/TestViewSubview.hpp | 1778 +++++++------ lib/kokkos/core/unit_test/UnitTestMain.cpp | 13 +- lib/kokkos/core/unit_test/cuda/TestCuda.hpp | 38 +- .../core/unit_test/cuda/TestCuda_Atomics.cpp | 248 +- .../core/unit_test/cuda/TestCuda_Other.cpp | 163 +- .../unit_test/cuda/TestCuda_Reductions_a.cpp | 14 +- .../unit_test/cuda/TestCuda_Reductions_b.cpp | 96 +- .../core/unit_test/cuda/TestCuda_Spaces.cpp | 264 +- .../unit_test/cuda/TestCuda_SubView_a.cpp | 43 +- .../unit_test/cuda/TestCuda_SubView_b.cpp | 18 +- .../unit_test/cuda/TestCuda_SubView_c01.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c02.cpp | 9 +- .../unit_test/cuda/TestCuda_SubView_c03.cpp | 9 +- .../unit_test/cuda/TestCuda_SubView_c04.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c05.cpp | 9 +- .../unit_test/cuda/TestCuda_SubView_c06.cpp | 9 +- .../unit_test/cuda/TestCuda_SubView_c07.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c08.cpp | 9 +- .../unit_test/cuda/TestCuda_SubView_c09.cpp | 9 +- .../unit_test/cuda/TestCuda_SubView_c10.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c11.cpp | 9 +- .../unit_test/cuda/TestCuda_SubView_c12.cpp | 9 +- .../unit_test/cuda/TestCuda_SubView_c_all.cpp | 24 +- .../core/unit_test/cuda/TestCuda_Team.cpp | 98 +- .../unit_test/cuda/TestCuda_ViewAPI_a.cpp | 9 +- .../unit_test/cuda/TestCuda_ViewAPI_b.cpp | 7 +- .../unit_test/cuda/TestCuda_ViewAPI_c.cpp | 7 +- .../unit_test/cuda/TestCuda_ViewAPI_d.cpp | 88 +- .../unit_test/cuda/TestCuda_ViewAPI_e.cpp | 16 +- .../unit_test/cuda/TestCuda_ViewAPI_f.cpp | 13 +- .../unit_test/cuda/TestCuda_ViewAPI_g.cpp | 9 +- .../unit_test/cuda/TestCuda_ViewAPI_h.cpp | 9 +- .../unit_test/cuda/TestCuda_ViewAPI_s.cpp | 11 +- .../core/unit_test/openmp/TestOpenMP.hpp | 27 +- .../unit_test/openmp/TestOpenMP_Atomics.cpp | 247 +- .../unit_test/openmp/TestOpenMP_Other.cpp | 185 +- .../openmp/TestOpenMP_Reductions.cpp | 106 +- .../unit_test/openmp/TestOpenMP_SubView_a.cpp | 43 +- .../unit_test/openmp/TestOpenMP_SubView_b.cpp | 18 +- .../openmp/TestOpenMP_SubView_c01.cpp | 7 +- .../openmp/TestOpenMP_SubView_c02.cpp | 9 +- .../openmp/TestOpenMP_SubView_c03.cpp | 9 +- .../openmp/TestOpenMP_SubView_c04.cpp | 7 +- .../openmp/TestOpenMP_SubView_c05.cpp | 9 +- .../openmp/TestOpenMP_SubView_c06.cpp | 9 +- .../openmp/TestOpenMP_SubView_c07.cpp | 7 +- .../openmp/TestOpenMP_SubView_c08.cpp | 9 +- .../openmp/TestOpenMP_SubView_c09.cpp | 9 +- .../openmp/TestOpenMP_SubView_c10.cpp | 7 +- .../openmp/TestOpenMP_SubView_c11.cpp | 9 +- .../openmp/TestOpenMP_SubView_c12.cpp | 9 +- .../openmp/TestOpenMP_SubView_c_all.cpp | 24 +- .../core/unit_test/openmp/TestOpenMP_Team.cpp | 93 +- .../unit_test/openmp/TestOpenMP_ViewAPI_a.cpp | 7 +- .../unit_test/openmp/TestOpenMP_ViewAPI_b.cpp | 109 +- .../core/unit_test/qthreads/TestQthreads.hpp | 109 + .../qthreads/TestQthreads_Atomics.cpp | 213 ++ .../unit_test/qthreads/TestQthreads_Other.cpp | 213 ++ .../qthreads/TestQthreads_Reductions.cpp | 168 ++ .../qthreads/TestQthreads_SubView_a.cpp | 125 + .../qthreads/TestQthreads_SubView_b.cpp | 66 + .../qthreads/TestQthreads_SubView_c01.cpp | 55 + .../qthreads/TestQthreads_SubView_c02.cpp | 55 + .../qthreads/TestQthreads_SubView_c03.cpp | 55 + .../qthreads/TestQthreads_SubView_c04.cpp | 55 + .../qthreads/TestQthreads_SubView_c05.cpp | 55 + .../qthreads/TestQthreads_SubView_c06.cpp | 55 + .../qthreads/TestQthreads_SubView_c07.cpp | 55 + .../qthreads/TestQthreads_SubView_c08.cpp | 55 + .../qthreads/TestQthreads_SubView_c09.cpp | 55 + .../qthreads/TestQthreads_SubView_c10.cpp | 55 + .../qthreads/TestQthreads_SubView_c11.cpp | 55 + .../qthreads/TestQthreads_SubView_c12.cpp | 55 + .../qthreads/TestQthreads_SubView_c_all.cpp | 12 + .../unit_test/qthreads/TestQthreads_Team.cpp | 143 + .../qthreads/TestQthreads_ViewAPI_a.cpp | 56 + .../qthreads/TestQthreads_ViewAPI_b.cpp | 138 + .../core/unit_test/serial/TestSerial.hpp | 30 +- .../unit_test/serial/TestSerial_Atomics.cpp | 248 +- .../unit_test/serial/TestSerial_Other.cpp | 133 +- .../serial/TestSerial_Reductions.cpp | 99 +- .../unit_test/serial/TestSerial_SubView_a.cpp | 43 +- .../unit_test/serial/TestSerial_SubView_b.cpp | 18 +- .../serial/TestSerial_SubView_c01.cpp | 7 +- .../serial/TestSerial_SubView_c02.cpp | 9 +- .../serial/TestSerial_SubView_c03.cpp | 9 +- .../serial/TestSerial_SubView_c04.cpp | 7 +- .../serial/TestSerial_SubView_c05.cpp | 9 +- .../serial/TestSerial_SubView_c06.cpp | 9 +- .../serial/TestSerial_SubView_c07.cpp | 7 +- .../serial/TestSerial_SubView_c08.cpp | 9 +- .../serial/TestSerial_SubView_c09.cpp | 9 +- .../serial/TestSerial_SubView_c10.cpp | 7 +- .../serial/TestSerial_SubView_c11.cpp | 9 +- .../serial/TestSerial_SubView_c12.cpp | 9 +- .../serial/TestSerial_SubView_c_all.cpp | 24 +- .../core/unit_test/serial/TestSerial_Team.cpp | 85 +- .../unit_test/serial/TestSerial_ViewAPI_a.cpp | 7 +- .../unit_test/serial/TestSerial_ViewAPI_b.cpp | 109 +- .../core/unit_test/threads/TestThreads.hpp | 22 +- .../unit_test/threads/TestThreads_Atomics.cpp | 246 +- .../unit_test/threads/TestThreads_Other.cpp | 169 +- .../threads/TestThreads_Reductions.cpp | 106 +- .../threads/TestThreads_SubView_a.cpp | 43 +- .../threads/TestThreads_SubView_b.cpp | 18 +- .../threads/TestThreads_SubView_c01.cpp | 7 +- .../threads/TestThreads_SubView_c02.cpp | 9 +- .../threads/TestThreads_SubView_c03.cpp | 9 +- .../threads/TestThreads_SubView_c04.cpp | 7 +- .../threads/TestThreads_SubView_c05.cpp | 9 +- .../threads/TestThreads_SubView_c06.cpp | 9 +- .../threads/TestThreads_SubView_c07.cpp | 7 +- .../threads/TestThreads_SubView_c08.cpp | 9 +- .../threads/TestThreads_SubView_c09.cpp | 9 +- .../threads/TestThreads_SubView_c10.cpp | 7 +- .../threads/TestThreads_SubView_c11.cpp | 9 +- .../threads/TestThreads_SubView_c12.cpp | 9 +- .../unit_test/threads/TestThreads_Team.cpp | 93 +- .../threads/TestThreads_ViewAPI_a.cpp | 7 +- .../threads/TestThreads_ViewAPI_b.cpp | 109 +- .../doc/design_notes_space_instances.md | 233 +- lib/kokkos/example/md_skeleton/types.h | 10 +- .../hello_world_lambda.cpp | 10 +- .../simple_reduce_lambda.cpp | 12 +- .../simple_view_lambda.cpp | 10 +- .../thread_teams_lambda.cpp | 10 +- lib/kokkos/generate_makefile.bash | 298 ++- 261 files changed, 27779 insertions(+), 17762 deletions(-) rename lib/kokkos/cmake/deps/{QTHREAD.cmake => QTHREADS.cmake} (98%) rename lib/kokkos/cmake/tpls/{FindTPLQTHREAD.cmake => FindTPLQTHREADS.cmake} (98%) create mode 100644 lib/kokkos/core/perf_test/PerfTestMDRange.hpp create mode 100644 lib/kokkos/core/src/Cuda/KokkosExp_Cuda_IterateTile.hpp rename lib/kokkos/core/src/{Kokkos_Qthread.hpp => Kokkos_Qthreads.hpp} (72%) delete mode 100644 lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.cpp delete mode 100644 lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.hpp create mode 100644 lib/kokkos/core/src/Qthreads/Kokkos_QthreadsExec.cpp create mode 100644 lib/kokkos/core/src/Qthreads/Kokkos_QthreadsExec.hpp rename lib/kokkos/core/src/{Qthread/Kokkos_Qthread_Parallel.hpp => Qthreads/Kokkos_Qthreads_Parallel.hpp} (86%) create mode 100644 lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_Task.cpp create mode 100644 lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_Task.hpp rename lib/kokkos/core/src/{Qthread/Kokkos_Qthread_TaskPolicy.cpp => Qthreads/Kokkos_Qthreads_TaskPolicy.cpp.old} (91%) rename lib/kokkos/core/src/{Qthread/Kokkos_Qthread_TaskPolicy.hpp => Qthreads/Kokkos_Qthreads_TaskPolicy.hpp.old} (90%) create mode 100644 lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskQueue.hpp create mode 100644 lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskQueue_impl.hpp rename lib/kokkos/core/src/{Qthread => Qthreads}/README (99%) create mode 100644 lib/kokkos/core/src/impl/KokkosExp_Host_IterateTile.hpp create mode 100644 lib/kokkos/core/src/impl/Kokkos_FunctorAnalysis.hpp create mode 100644 lib/kokkos/core/src/impl/Kokkos_HostThreadTeam.cpp create mode 100644 lib/kokkos/core/src/impl/Kokkos_HostThreadTeam.hpp create mode 100644 lib/kokkos/core/src/impl/Kokkos_Reducer.hpp delete mode 100644 lib/kokkos/core/src/impl/Kokkos_Synchronic.hpp delete mode 100644 lib/kokkos/core/src/impl/Kokkos_Synchronic_Config.hpp delete mode 100644 lib/kokkos/core/src/impl/Kokkos_Synchronic_n3998.hpp delete mode 100644 lib/kokkos/core/unit_test/TestQthread.cpp delete mode 100644 lib/kokkos/core/unit_test/TestSynchronic.cpp delete mode 100644 lib/kokkos/core/unit_test/TestSynchronic.hpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads.hpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_Atomics.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_Other.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_Reductions.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_a.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_b.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c01.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c02.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c03.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c04.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c05.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c06.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c07.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c08.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c09.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c10.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c11.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c12.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c_all.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_Team.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_ViewAPI_a.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_ViewAPI_b.cpp diff --git a/lib/kokkos/CHANGELOG.md b/lib/kokkos/CHANGELOG.md index 4a96e24418..c6fe991b97 100644 --- a/lib/kokkos/CHANGELOG.md +++ b/lib/kokkos/CHANGELOG.md @@ -1,5 +1,28 @@ # Change Log +## [2.03.00](https://github.com/kokkos/kokkos/tree/2.03.00) (2017-04-25) +[Full Changelog](https://github.com/kokkos/kokkos/compare/2.02.15...2.03.00) + +**Implemented enhancements:** + +- UnorderedMap: make it accept Devices or MemorySpaces [\#711](https://github.com/kokkos/kokkos/issues/711) +- sort to accept DynamicView and \[begin,end\) indices [\#691](https://github.com/kokkos/kokkos/issues/691) +- ENABLE Macros should only be used via \#ifdef or \#if defined [\#675](https://github.com/kokkos/kokkos/issues/675) +- Remove impl/Kokkos\_Synchronic\_\* [\#666](https://github.com/kokkos/kokkos/issues/666) +- Turning off IVDEP for Intel 14. [\#638](https://github.com/kokkos/kokkos/issues/638) +- Using an installed Kokkos in a target application using CMake [\#633](https://github.com/kokkos/kokkos/issues/633) +- Create Kokkos Bill of Materials [\#632](https://github.com/kokkos/kokkos/issues/632) +- MDRangePolicy and tagged evaluators [\#547](https://github.com/kokkos/kokkos/issues/547) +- Add PGI support [\#289](https://github.com/kokkos/kokkos/issues/289) + +**Fixed bugs:** + +- Output from PerTeam fails [\#733](https://github.com/kokkos/kokkos/issues/733) +- Cuda: architecture flag not added to link line [\#688](https://github.com/kokkos/kokkos/issues/688) +- Getting large chunks of memory for a thread team in a universal way [\#664](https://github.com/kokkos/kokkos/issues/664) +- Kokkos RNG normal\(\) function hangs for small seed value [\#655](https://github.com/kokkos/kokkos/issues/655) +- Kokkos Tests Errors on Shepard/HSW Builds [\#644](https://github.com/kokkos/kokkos/issues/644) + ## [2.02.15](https://github.com/kokkos/kokkos/tree/2.02.15) (2017-02-10) [Full Changelog](https://github.com/kokkos/kokkos/compare/2.02.07...2.02.15) diff --git a/lib/kokkos/CMakeLists.txt b/lib/kokkos/CMakeLists.txt index 16854c839a..1c820660ae 100644 --- a/lib/kokkos/CMakeLists.txt +++ b/lib/kokkos/CMakeLists.txt @@ -98,10 +98,10 @@ TRIBITS_ADD_OPTION_AND_DEFINE( ) TRIBITS_ADD_OPTION_AND_DEFINE( - Kokkos_ENABLE_QTHREAD - KOKKOS_HAVE_QTHREAD - "Enable QTHREAD support in Kokkos." - "${TPL_ENABLE_QTHREAD}" + Kokkos_ENABLE_Qthreads + KOKKOS_HAVE_QTHREADS + "Enable Qthreads support in Kokkos." + "${TPL_ENABLE_QTHREADS}" ) TRIBITS_ADD_OPTION_AND_DEFINE( @@ -110,7 +110,7 @@ TRIBITS_ADD_OPTION_AND_DEFINE( "Enable C++11 support in Kokkos." "${${PROJECT_NAME}_ENABLE_CXX11}" ) - + TRIBITS_ADD_OPTION_AND_DEFINE( Kokkos_ENABLE_HWLOC KOKKOS_HAVE_HWLOC @@ -213,4 +213,3 @@ TRIBITS_EXCLUDE_FILES( ) TRIBITS_PACKAGE_POSTPROCESS() - diff --git a/lib/kokkos/Makefile.kokkos b/lib/kokkos/Makefile.kokkos index 9d00c19027..5b094dba8c 100644 --- a/lib/kokkos/Makefile.kokkos +++ b/lib/kokkos/Makefile.kokkos @@ -1,39 +1,38 @@ -# Default settings common options +# Default settings common options. #LAMMPS specific settings: KOKKOS_PATH=../../lib/kokkos CXXFLAGS=$(CCFLAGS) -#Options: OpenMP,Serial,Pthreads,Cuda +# Options: Cuda,OpenMP,Pthreads,Qthreads,Serial KOKKOS_DEVICES ?= "OpenMP" #KOKKOS_DEVICES ?= "Pthreads" -#Options: KNC,SNB,HSW,Kepler,Kepler30,Kepler32,Kepler35,Kepler37,Maxwell,Maxwell50,Maxwell52,Maxwell53,Pascal61,ARMv80,ARMv81,ARMv8-ThunderX,BGQ,Power7,Power8,Power9,KNL,BDW,SKX +# Options: KNC,SNB,HSW,Kepler,Kepler30,Kepler32,Kepler35,Kepler37,Maxwell,Maxwell50,Maxwell52,Maxwell53,Pascal60,Pascal61,ARMv80,ARMv81,ARMv8-ThunderX,BGQ,Power7,Power8,Power9,KNL,BDW,SKX KOKKOS_ARCH ?= "" -#Options: yes,no +# Options: yes,no KOKKOS_DEBUG ?= "no" -#Options: hwloc,librt,experimental_memkind +# Options: hwloc,librt,experimental_memkind KOKKOS_USE_TPLS ?= "" -#Options: c++11,c++1z +# Options: c++11,c++1z KOKKOS_CXX_STANDARD ?= "c++11" -#Options: aggressive_vectorization,disable_profiling +# Options: aggressive_vectorization,disable_profiling KOKKOS_OPTIONS ?= "" -#Default settings specific options -#Options: force_uvm,use_ldg,rdc,enable_lambda +# Default settings specific options. +# Options: force_uvm,use_ldg,rdc,enable_lambda KOKKOS_CUDA_OPTIONS ?= "enable_lambda" -# Check for general settings - +# Check for general settings. KOKKOS_INTERNAL_ENABLE_DEBUG := $(strip $(shell echo $(KOKKOS_DEBUG) | grep "yes" | wc -l)) KOKKOS_INTERNAL_ENABLE_CXX11 := $(strip $(shell echo $(KOKKOS_CXX_STANDARD) | grep "c++11" | wc -l)) KOKKOS_INTERNAL_ENABLE_CXX1Z := $(strip $(shell echo $(KOKKOS_CXX_STANDARD) | grep "c++1z" | wc -l)) -# Check for external libraries +# Check for external libraries. KOKKOS_INTERNAL_USE_HWLOC := $(strip $(shell echo $(KOKKOS_USE_TPLS) | grep "hwloc" | wc -l)) KOKKOS_INTERNAL_USE_LIBRT := $(strip $(shell echo $(KOKKOS_USE_TPLS) | grep "librt" | wc -l)) KOKKOS_INTERNAL_USE_MEMKIND := $(strip $(shell echo $(KOKKOS_USE_TPLS) | grep "experimental_memkind" | wc -l)) -# Check for advanced settings +# Check for advanced settings. KOKKOS_INTERNAL_OPT_RANGE_AGGRESSIVE_VECTORIZATION := $(strip $(shell echo $(KOKKOS_OPTIONS) | grep "aggressive_vectorization" | wc -l)) KOKKOS_INTERNAL_DISABLE_PROFILING := $(strip $(shell echo $(KOKKOS_OPTIONS) | grep "disable_profiling" | wc -l)) KOKKOS_INTERNAL_CUDA_USE_LDG := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | grep "use_ldg" | wc -l)) @@ -41,21 +40,21 @@ KOKKOS_INTERNAL_CUDA_USE_UVM := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | gr KOKKOS_INTERNAL_CUDA_USE_RELOC := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | grep "rdc" | wc -l)) KOKKOS_INTERNAL_CUDA_USE_LAMBDA := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | grep "enable_lambda" | wc -l)) -# Check for Kokkos Host Execution Spaces one of which must be on - +# Check for Kokkos Host Execution Spaces one of which must be on. KOKKOS_INTERNAL_USE_OPENMP := $(strip $(shell echo $(KOKKOS_DEVICES) | grep OpenMP | wc -l)) KOKKOS_INTERNAL_USE_PTHREADS := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Pthread | wc -l)) +KOKKOS_INTERNAL_USE_QTHREADS := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Qthreads | wc -l)) KOKKOS_INTERNAL_USE_SERIAL := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Serial | wc -l)) -KOKKOS_INTERNAL_USE_QTHREAD := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Qthread | wc -l)) ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 0) ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 0) - KOKKOS_INTERNAL_USE_SERIAL := 1 +ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 0) + KOKKOS_INTERNAL_USE_SERIAL := 1 +endif endif endif -# Check for other Execution Spaces - +# Check for other Execution Spaces. KOKKOS_INTERNAL_USE_CUDA := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Cuda | wc -l)) ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) @@ -64,27 +63,25 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) KOKKOS_INTERNAL_COMPILER_NVCC_VERSION := $(shell nvcc --version 2>&1 | grep release | cut -d' ' -f5 | cut -d',' -f1 | tr -d .) endif -# Check OS - +# Check OS. KOKKOS_OS := $(shell uname -s) KOKKOS_INTERNAL_OS_CYGWIN := $(shell uname -s | grep CYGWIN | wc -l) KOKKOS_INTERNAL_OS_LINUX := $(shell uname -s | grep Linux | wc -l) KOKKOS_INTERNAL_OS_DARWIN := $(shell uname -s | grep Darwin | wc -l) -# Check compiler - -KOKKOS_INTERNAL_COMPILER_INTEL := $(shell $(CXX) --version 2>&1 | grep "Intel Corporation" | wc -l) -KOKKOS_INTERNAL_COMPILER_PGI := $(shell $(CXX) --version 2>&1 | grep PGI | wc -l) -KOKKOS_INTERNAL_COMPILER_XL := $(shell $(CXX) -qversion 2>&1 | grep XL | wc -l) -KOKKOS_INTERNAL_COMPILER_CRAY := $(shell $(CXX) -craype-verbose 2>&1 | grep "CC-" | wc -l) -KOKKOS_INTERNAL_COMPILER_NVCC := $(shell $(CXX) --version 2>&1 | grep "nvcc" | wc -l) +# Check compiler. +KOKKOS_INTERNAL_COMPILER_INTEL := $(shell $(CXX) --version 2>&1 | grep "Intel Corporation" | wc -l) +KOKKOS_INTERNAL_COMPILER_PGI := $(shell $(CXX) --version 2>&1 | grep PGI | wc -l) +KOKKOS_INTERNAL_COMPILER_XL := $(shell $(CXX) -qversion 2>&1 | grep XL | wc -l) +KOKKOS_INTERNAL_COMPILER_CRAY := $(shell $(CXX) -craype-verbose 2>&1 | grep "CC-" | wc -l) +KOKKOS_INTERNAL_COMPILER_NVCC := $(shell $(CXX) --version 2>&1 | grep "nvcc" | wc -l) ifneq ($(OMPI_CXX),) KOKKOS_INTERNAL_COMPILER_NVCC := $(shell $(OMPI_CXX) --version 2>&1 | grep "nvcc" | wc -l) endif ifneq ($(MPICH_CXX),) KOKKOS_INTERNAL_COMPILER_NVCC := $(shell $(MPICH_CXX) --version 2>&1 | grep "nvcc" | wc -l) endif -KOKKOS_INTERNAL_COMPILER_CLANG := $(shell $(CXX) --version 2>&1 | grep "clang" | wc -l) +KOKKOS_INTERNAL_COMPILER_CLANG := $(shell $(CXX) --version 2>&1 | grep "clang" | wc -l) ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 2) KOKKOS_INTERNAL_COMPILER_CLANG = 1 @@ -95,17 +92,17 @@ endif ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) KOKKOS_INTERNAL_COMPILER_CLANG_VERSION := $(shell clang --version | grep version | cut -d ' ' -f3 | tr -d '.') + ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) ifeq ($(shell test $(KOKKOS_INTERNAL_COMPILER_CLANG_VERSION) -lt 400; echo $$?),0) - $(error Compiling Cuda code directly with Clang requires version 4.0.0 or higher) + $(error Compiling Cuda code directly with Clang requires version 4.0.0 or higher) endif KOKKOS_INTERNAL_CUDA_USE_LAMBDA := 1 endif endif - ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) - KOKKOS_INTERNAL_OPENMP_FLAG := -mp + KOKKOS_INTERNAL_OPENMP_FLAG := -mp else ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp=libomp @@ -114,7 +111,7 @@ else KOKKOS_INTERNAL_OPENMP_FLAG := -qsmp=omp else ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) - # OpenMP is turned on by default in Cray compiler environment + # OpenMP is turned on by default in Cray compiler environment. KOKKOS_INTERNAL_OPENMP_FLAG := else KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp @@ -138,9 +135,9 @@ else endif endif -# Check for Kokkos Architecture settings +# Check for Kokkos Architecture settings. -#Intel based +# Intel based. KOKKOS_INTERNAL_USE_ARCH_KNC := $(strip $(shell echo $(KOKKOS_ARCH) | grep KNC | wc -l)) KOKKOS_INTERNAL_USE_ARCH_SNB := $(strip $(shell echo $(KOKKOS_ARCH) | grep SNB | wc -l)) KOKKOS_INTERNAL_USE_ARCH_HSW := $(strip $(shell echo $(KOKKOS_ARCH) | grep HSW | wc -l)) @@ -148,8 +145,8 @@ KOKKOS_INTERNAL_USE_ARCH_BDW := $(strip $(shell echo $(KOKKOS_ARCH) | grep BDW | KOKKOS_INTERNAL_USE_ARCH_SKX := $(strip $(shell echo $(KOKKOS_ARCH) | grep SKX | wc -l)) KOKKOS_INTERNAL_USE_ARCH_KNL := $(strip $(shell echo $(KOKKOS_ARCH) | grep KNL | wc -l)) -#NVIDIA based -NVCC_WRAPPER := $(KOKKOS_PATH)/config/nvcc_wrapper +# NVIDIA based. +NVCC_WRAPPER := $(KOKKOS_PATH)/config/nvcc_wrapper KOKKOS_INTERNAL_USE_ARCH_KEPLER30 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler30 | wc -l)) KOKKOS_INTERNAL_USE_ARCH_KEPLER32 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler32 | wc -l)) KOKKOS_INTERNAL_USE_ARCH_KEPLER35 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler35 | wc -l)) @@ -170,46 +167,46 @@ KOKKOS_INTERNAL_USE_ARCH_NVIDIA := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_AR + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53) | bc)) ifeq ($(KOKKOS_INTERNAL_USE_ARCH_NVIDIA), 0) -KOKKOS_INTERNAL_USE_ARCH_MAXWELL50 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Maxwell | wc -l)) -KOKKOS_INTERNAL_USE_ARCH_KEPLER35 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler | wc -l)) -KOKKOS_INTERNAL_USE_ARCH_NVIDIA := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_KEPLER30) \ - + $(KOKKOS_INTERNAL_USE_ARCH_KEPLER32) \ - + $(KOKKOS_INTERNAL_USE_ARCH_KEPLER35) \ - + $(KOKKOS_INTERNAL_USE_ARCH_KEPLER37) \ - + $(KOKKOS_INTERNAL_USE_ARCH_PASCAL61) \ - + $(KOKKOS_INTERNAL_USE_ARCH_PASCAL60) \ - + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL50) \ - + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL52) \ - + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53) | bc)) -endif - -#ARM based + KOKKOS_INTERNAL_USE_ARCH_MAXWELL50 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Maxwell | wc -l)) + KOKKOS_INTERNAL_USE_ARCH_KEPLER35 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler | wc -l)) + KOKKOS_INTERNAL_USE_ARCH_NVIDIA := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_KEPLER30) \ + + $(KOKKOS_INTERNAL_USE_ARCH_KEPLER32) \ + + $(KOKKOS_INTERNAL_USE_ARCH_KEPLER35) \ + + $(KOKKOS_INTERNAL_USE_ARCH_KEPLER37) \ + + $(KOKKOS_INTERNAL_USE_ARCH_PASCAL61) \ + + $(KOKKOS_INTERNAL_USE_ARCH_PASCAL60) \ + + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL50) \ + + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL52) \ + + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53) | bc)) +endif + +# ARM based. KOKKOS_INTERNAL_USE_ARCH_ARMV80 := $(strip $(shell echo $(KOKKOS_ARCH) | grep ARMv80 | wc -l)) KOKKOS_INTERNAL_USE_ARCH_ARMV81 := $(strip $(shell echo $(KOKKOS_ARCH) | grep ARMv81 | wc -l)) KOKKOS_INTERNAL_USE_ARCH_ARMV8_THUNDERX := $(strip $(shell echo $(KOKKOS_ARCH) | grep ARMv8-ThunderX | wc -l)) -#IBM based +# IBM based. KOKKOS_INTERNAL_USE_ARCH_BGQ := $(strip $(shell echo $(KOKKOS_ARCH) | grep BGQ | wc -l)) KOKKOS_INTERNAL_USE_ARCH_POWER7 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Power7 | wc -l)) KOKKOS_INTERNAL_USE_ARCH_POWER8 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Power8 | wc -l)) KOKKOS_INTERNAL_USE_ARCH_POWER9 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Power9 | wc -l)) KOKKOS_INTERNAL_USE_ARCH_IBM := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_BGQ)+$(KOKKOS_INTERNAL_USE_ARCH_POWER7)+$(KOKKOS_INTERNAL_USE_ARCH_POWER8)+$(KOKKOS_INTERNAL_USE_ARCH_POWER9) | bc)) -#AMD based +# AMD based. KOKKOS_INTERNAL_USE_ARCH_AMDAVX := $(strip $(shell echo $(KOKKOS_ARCH) | grep AMDAVX | wc -l)) -#Any AVX? +# Any AVX? KOKKOS_INTERNAL_USE_ARCH_AVX := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_SNB)+$(KOKKOS_INTERNAL_USE_ARCH_AMDAVX) | bc )) KOKKOS_INTERNAL_USE_ARCH_AVX2 := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_HSW)+$(KOKKOS_INTERNAL_USE_ARCH_BDW) | bc )) KOKKOS_INTERNAL_USE_ARCH_AVX512MIC := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_KNL) | bc )) KOKKOS_INTERNAL_USE_ARCH_AVX512XEON := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_SKX) | bc )) -# Decide what ISA level we are able to support -KOKKOS_INTERNAL_USE_ISA_X86_64 := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_SNB)+$(KOKKOS_INTERNAL_USE_ARCH_HSW)+$(KOKKOS_INTERNAL_USE_ARCH_BDW)+$(KOKKOS_INTERNAL_USE_ARCH_KNL)+$(KOKKOS_INTERNAL_USE_ARCH_SKX) | bc )) -KOKKOS_INTERNAL_USE_ISA_KNC := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_KNC) | bc )) -KOKKOS_INTERNAL_USE_ISA_POWERPCLE := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_POWER8)+$(KOKKOS_INTERNAL_USE_ARCH_POWER9) | bc )) +# Decide what ISA level we are able to support. +KOKKOS_INTERNAL_USE_ISA_X86_64 := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_SNB)+$(KOKKOS_INTERNAL_USE_ARCH_HSW)+$(KOKKOS_INTERNAL_USE_ARCH_BDW)+$(KOKKOS_INTERNAL_USE_ARCH_KNL)+$(KOKKOS_INTERNAL_USE_ARCH_SKX) | bc )) +KOKKOS_INTERNAL_USE_ISA_KNC := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_KNC) | bc )) +KOKKOS_INTERNAL_USE_ISA_POWERPCLE := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_POWER8)+$(KOKKOS_INTERNAL_USE_ARCH_POWER9) | bc )) -#Incompatible flags? +# Incompatible flags? KOKKOS_INTERNAL_USE_ARCH_MULTIHOST := $(strip $(shell echo "$(KOKKOS_INTERNAL_USE_ARCH_AVX)+$(KOKKOS_INTERNAL_USE_ARCH_AVX2)+$(KOKKOS_INTERNAL_USE_ARCH_KNC)+$(KOKKOS_INTERNAL_USE_ARCH_IBM)+$(KOKKOS_INTERNAL_USE_ARCH_AMDAVX)+$(KOKKOS_INTERNAL_USE_ARCH_ARMV80)+$(KOKKOS_INTERNAL_USE_ARCH_ARMV81)+$(KOKKOS_INTERNAL_USE_ARCH_ARMV8_THUNDERX)>1" | bc )) KOKKOS_INTERNAL_USE_ARCH_MULTIGPU := $(strip $(shell echo "$(KOKKOS_INTERNAL_USE_ARCH_NVIDIA)>1" | bc)) @@ -220,7 +217,7 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MULTIGPU), 1) $(error Defined Multiple GPU architectures: KOKKOS_ARCH=$(KOKKOS_ARCH) ) endif -#Generating the list of Flags +# Generating the list of Flags. KOKKOS_CPPFLAGS = -I./ -I$(KOKKOS_PATH)/core/src -I$(KOKKOS_PATH)/containers/src -I$(KOKKOS_PATH)/algorithms/src @@ -233,98 +230,96 @@ KOKKOS_CXXFLAGS = KOKKOS_LIBS = -lkokkos -ldl KOKKOS_LDFLAGS = -L$(shell pwd) -KOKKOS_SRC = +KOKKOS_SRC = KOKKOS_HEADERS = -#Generating the KokkosCore_config.h file +# Generating the KokkosCore_config.h file. tmp := $(shell echo "/* ---------------------------------------------" > KokkosCore_config.tmp) tmp := $(shell echo "Makefile constructed configuration:" >> KokkosCore_config.tmp) tmp := $(shell date >> KokkosCore_config.tmp) tmp := $(shell echo "----------------------------------------------*/" >> KokkosCore_config.tmp) - tmp := $(shell echo "/* Execution Spaces */" >> KokkosCore_config.tmp) + +ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) + tmp := $(shell echo "\#define KOKKOS_HAVE_CUDA 1" >> KokkosCore_config.tmp ) +endif + ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1) - tmp := $(shell echo '\#define KOKKOS_HAVE_OPENMP 1' >> KokkosCore_config.tmp) + tmp := $(shell echo '\#define KOKKOS_HAVE_OPENMP 1' >> KokkosCore_config.tmp) endif ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1) - tmp := $(shell echo "\#define KOKKOS_HAVE_PTHREAD 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_HAVE_PTHREAD 1" >> KokkosCore_config.tmp ) endif -ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1) - tmp := $(shell echo "\#define KOKKOS_HAVE_SERIAL 1" >> KokkosCore_config.tmp ) +ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1) + tmp := $(shell echo "\#define KOKKOS_HAVE_QTHREADS 1" >> KokkosCore_config.tmp ) endif -ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) - tmp := $(shell echo "\#define KOKKOS_HAVE_CUDA 1" >> KokkosCore_config.tmp ) +ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1) + tmp := $(shell echo "\#define KOKKOS_HAVE_SERIAL 1" >> KokkosCore_config.tmp ) endif ifeq ($(KOKKOS_INTERNAL_USE_ISA_X86_64), 1) - tmp := $(shell echo "\#ifndef __CUDA_ARCH__" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_USE_ISA_X86_64" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#endif" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#ifndef __CUDA_ARCH__" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_USE_ISA_X86_64" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#endif" >> KokkosCore_config.tmp ) endif ifeq ($(KOKKOS_INTERNAL_USE_ISA_KNC), 1) - tmp := $(shell echo "\#ifndef __CUDA_ARCH__" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_USE_ISA_KNC" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#endif" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#ifndef __CUDA_ARCH__" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_USE_ISA_KNC" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#endif" >> KokkosCore_config.tmp ) endif ifeq ($(KOKKOS_INTERNAL_USE_ISA_POWERPCLE), 1) - tmp := $(shell echo "\#ifndef __CUDA_ARCH__" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_USE_ISA_POWERPCLE" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#endif" >> KokkosCore_config.tmp ) -endif - -ifeq ($(KOKKOS_INTERNAL_USE_QTHREAD), 1) - KOKKOS_CPPFLAGS += -I$(QTHREAD_PATH)/include - KOKKOS_LDFLAGS += -L$(QTHREAD_PATH)/lib - tmp := $(shell echo "\#define KOKKOS_HAVE_QTHREAD 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#ifndef __CUDA_ARCH__" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_USE_ISA_POWERPCLE" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#endif" >> KokkosCore_config.tmp ) endif tmp := $(shell echo "/* General Settings */" >> KokkosCore_config.tmp) ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX11), 1) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX11_FLAG) - tmp := $(shell echo "\#define KOKKOS_HAVE_CXX11 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX11_FLAG) + tmp := $(shell echo "\#define KOKKOS_HAVE_CXX11 1" >> KokkosCore_config.tmp ) endif ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX1Z), 1) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX1Z_FLAG) - tmp := $(shell echo "\#define KOKKOS_HAVE_CXX11 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_HAVE_CXX1Z 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX1Z_FLAG) + tmp := $(shell echo "\#define KOKKOS_HAVE_CXX11 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_HAVE_CXX1Z 1" >> KokkosCore_config.tmp ) endif ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1) ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) - KOKKOS_CXXFLAGS += -lineinfo + KOKKOS_CXXFLAGS += -lineinfo endif - KOKKOS_CXXFLAGS += -g - KOKKOS_LDFLAGS += -g -ldl - tmp := $(shell echo "\#define KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_HAVE_DEBUG 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += -g + KOKKOS_LDFLAGS += -g -ldl + tmp := $(shell echo "\#define KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_HAVE_DEBUG 1" >> KokkosCore_config.tmp ) endif ifeq ($(KOKKOS_INTERNAL_USE_HWLOC), 1) - KOKKOS_CPPFLAGS += -I$(HWLOC_PATH)/include - KOKKOS_LDFLAGS += -L$(HWLOC_PATH)/lib - KOKKOS_LIBS += -lhwloc - tmp := $(shell echo "\#define KOKKOS_HAVE_HWLOC 1" >> KokkosCore_config.tmp ) + KOKKOS_CPPFLAGS += -I$(HWLOC_PATH)/include + KOKKOS_LDFLAGS += -L$(HWLOC_PATH)/lib + KOKKOS_LIBS += -lhwloc + tmp := $(shell echo "\#define KOKKOS_HAVE_HWLOC 1" >> KokkosCore_config.tmp ) endif ifeq ($(KOKKOS_INTERNAL_USE_LIBRT), 1) - tmp := $(shell echo "\#define KOKKOS_USE_LIBRT 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define PREC_TIMER 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_USE_LIBRT 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define PREC_TIMER 1" >> KokkosCore_config.tmp ) tmp := $(shell echo "\#define KOKKOSP_ENABLE_RTLIB 1" >> KokkosCore_config.tmp ) - KOKKOS_LIBS += -lrt + KOKKOS_LIBS += -lrt endif ifeq ($(KOKKOS_INTERNAL_USE_MEMKIND), 1) KOKKOS_CPPFLAGS += -I$(MEMKIND_PATH)/include - KOKKOS_LDFLAGS += -L$(MEMKIND_PATH)/lib - KOKKOS_LIBS += -lmemkind + KOKKOS_LDFLAGS += -L$(MEMKIND_PATH)/lib + KOKKOS_LIBS += -lmemkind tmp := $(shell echo "\#define KOKKOS_HAVE_HBWSPACE 1" >> KokkosCore_config.tmp ) endif @@ -341,262 +336,286 @@ endif tmp := $(shell echo "/* Cuda Settings */" >> KokkosCore_config.tmp) ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) + ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LDG), 1) - tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LDG_INTRINSIC 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LDG_INTRINSIC 1" >> KokkosCore_config.tmp ) endif ifeq ($(KOKKOS_INTERNAL_CUDA_USE_UVM), 1) - tmp := $(shell echo "\#define KOKKOS_CUDA_USE_UVM 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_USE_CUDA_UVM 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_CUDA_USE_UVM 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_USE_CUDA_UVM 1" >> KokkosCore_config.tmp ) endif ifeq ($(KOKKOS_INTERNAL_CUDA_USE_RELOC), 1) - tmp := $(shell echo "\#define KOKKOS_CUDA_USE_RELOCATABLE_DEVICE_CODE 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += --relocatable-device-code=true - KOKKOS_LDFLAGS += --relocatable-device-code=true + tmp := $(shell echo "\#define KOKKOS_CUDA_USE_RELOCATABLE_DEVICE_CODE 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += --relocatable-device-code=true + KOKKOS_LDFLAGS += --relocatable-device-code=true endif ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LAMBDA), 1) ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) ifeq ($(shell test $(KOKKOS_INTERNAL_COMPILER_NVCC_VERSION) -gt 70; echo $$?),0) - tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LAMBDA 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += -expt-extended-lambda + tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LAMBDA 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += -expt-extended-lambda else $(warning Warning: Cuda Lambda support was requested but NVCC version is too low. This requires NVCC for Cuda version 7.5 or higher. Disabling Lambda support now.) endif endif + ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LAMBDA 1" >> KokkosCore_config.tmp ) endif endif + endif -#Add Architecture flags +# Add Architecture flags. ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV80), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_ARMV80 1" >> KokkosCore_config.tmp ) - ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) - KOKKOS_CXXFLAGS += - KOKKOS_LDFLAGS += + tmp := $(shell echo "\#define KOKKOS_ARCH_ARMV80 1" >> KokkosCore_config.tmp ) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) + KOKKOS_CXXFLAGS += + KOKKOS_LDFLAGS += + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) + KOKKOS_CXXFLAGS += + KOKKOS_LDFLAGS += else - ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) - KOKKOS_CXXFLAGS += - KOKKOS_LDFLAGS += - else - KOKKOS_CXXFLAGS += -march=armv8-a - KOKKOS_LDFLAGS += -march=armv8-a - endif + KOKKOS_CXXFLAGS += -march=armv8-a + KOKKOS_LDFLAGS += -march=armv8-a endif + endif endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV81), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_ARMV81 1" >> KokkosCore_config.tmp ) - ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) - KOKKOS_CXXFLAGS += - KOKKOS_LDFLAGS += + tmp := $(shell echo "\#define KOKKOS_ARCH_ARMV81 1" >> KokkosCore_config.tmp ) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) + KOKKOS_CXXFLAGS += + KOKKOS_LDFLAGS += + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) + KOKKOS_CXXFLAGS += + KOKKOS_LDFLAGS += else - ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) - KOKKOS_CXXFLAGS += - KOKKOS_LDFLAGS += - else - KOKKOS_CXXFLAGS += -march=armv8.1-a - KOKKOS_LDFLAGS += -march=armv8.1-a - endif + KOKKOS_CXXFLAGS += -march=armv8.1-a + KOKKOS_LDFLAGS += -march=armv8.1-a endif + endif endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV8_THUNDERX), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_ARMV80 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_ARMV8_THUNDERX 1" >> KokkosCore_config.tmp ) - ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) - KOKKOS_CXXFLAGS += - KOKKOS_LDFLAGS += + tmp := $(shell echo "\#define KOKKOS_ARCH_ARMV80 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_ARMV8_THUNDERX 1" >> KokkosCore_config.tmp ) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) + KOKKOS_CXXFLAGS += + KOKKOS_LDFLAGS += + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) + KOKKOS_CXXFLAGS += + KOKKOS_LDFLAGS += else - ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) - KOKKOS_CXXFLAGS += - KOKKOS_LDFLAGS += - else - KOKKOS_CXXFLAGS += -march=armv8-a -mtune=thunderx - KOKKOS_LDFLAGS += -march=armv8-a -mtune=thunderx - endif + KOKKOS_CXXFLAGS += -march=armv8-a -mtune=thunderx + KOKKOS_LDFLAGS += -march=armv8-a -mtune=thunderx endif + endif endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_AVX 1" >> KokkosCore_config.tmp ) - ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1) - KOKKOS_CXXFLAGS += -mavx - KOKKOS_LDFLAGS += -mavx - else - ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) - - else - ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) - KOKKOS_CXXFLAGS += -tp=sandybridge - KOKKOS_LDFLAGS += -tp=sandybridge - else - # Assume that this is a really a GNU compiler - KOKKOS_CXXFLAGS += -mavx - KOKKOS_LDFLAGS += -mavx - endif - endif - endif + tmp := $(shell echo "\#define KOKKOS_ARCH_AVX 1" >> KokkosCore_config.tmp ) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1) + KOKKOS_CXXFLAGS += -mavx + KOKKOS_LDFLAGS += -mavx + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) + + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) + KOKKOS_CXXFLAGS += -tp=sandybridge + KOKKOS_LDFLAGS += -tp=sandybridge + else + # Assume that this is a really a GNU compiler. + KOKKOS_CXXFLAGS += -mavx + KOKKOS_LDFLAGS += -mavx + endif + endif + endif endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_POWER8), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_POWER8 1" >> KokkosCore_config.tmp ) - ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_POWER8 1" >> KokkosCore_config.tmp ) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) - else - # Assume that this is a really a GNU compiler or it could be XL on P8 - KOKKOS_CXXFLAGS += -mcpu=power8 -mtune=power8 - KOKKOS_LDFLAGS += -mcpu=power8 -mtune=power8 - endif + else + # Assume that this is a really a GNU compiler or it could be XL on P8. + KOKKOS_CXXFLAGS += -mcpu=power8 -mtune=power8 + KOKKOS_LDFLAGS += -mcpu=power8 -mtune=power8 + endif endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_POWER9), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_POWER9 1" >> KokkosCore_config.tmp ) - ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_POWER9 1" >> KokkosCore_config.tmp ) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) - else - # Assume that this is a really a GNU compiler or it could be XL on P9 - KOKKOS_CXXFLAGS += -mcpu=power9 -mtune=power9 - KOKKOS_LDFLAGS += -mcpu=power9 -mtune=power9 - endif + else + # Assume that this is a really a GNU compiler or it could be XL on P9. + KOKKOS_CXXFLAGS += -mcpu=power9 -mtune=power9 + KOKKOS_LDFLAGS += -mcpu=power9 -mtune=power9 + endif endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX2), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_AVX2 1" >> KokkosCore_config.tmp ) - ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1) - KOKKOS_CXXFLAGS += -xCORE-AVX2 - KOKKOS_LDFLAGS += -xCORE-AVX2 - else - ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) - - else - ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) - KOKKOS_CXXFLAGS += -tp=haswell - KOKKOS_LDFLAGS += -tp=haswell - else - # Assume that this is a really a GNU compiler - KOKKOS_CXXFLAGS += -march=core-avx2 -mtune=core-avx2 - KOKKOS_LDFLAGS += -march=core-avx2 -mtune=core-avx2 - endif - endif - endif + tmp := $(shell echo "\#define KOKKOS_ARCH_AVX2 1" >> KokkosCore_config.tmp ) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1) + KOKKOS_CXXFLAGS += -xCORE-AVX2 + KOKKOS_LDFLAGS += -xCORE-AVX2 + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) + + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) + KOKKOS_CXXFLAGS += -tp=haswell + KOKKOS_LDFLAGS += -tp=haswell + else + # Assume that this is a really a GNU compiler. + KOKKOS_CXXFLAGS += -march=core-avx2 -mtune=core-avx2 + KOKKOS_LDFLAGS += -march=core-avx2 -mtune=core-avx2 + endif + endif + endif endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX512MIC), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_AVX512MIC 1" >> KokkosCore_config.tmp ) - ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1) - KOKKOS_CXXFLAGS += -xMIC-AVX512 - KOKKOS_LDFLAGS += -xMIC-AVX512 - else - ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_AVX512MIC 1" >> KokkosCore_config.tmp ) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1) + KOKKOS_CXXFLAGS += -xMIC-AVX512 + KOKKOS_LDFLAGS += -xMIC-AVX512 + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) - else - ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) - else - # Asssume that this is really a GNU compiler - KOKKOS_CXXFLAGS += -march=knl - KOKKOS_LDFLAGS += -march=knl - endif - endif - endif + else + # Asssume that this is really a GNU compiler. + KOKKOS_CXXFLAGS += -march=knl + KOKKOS_LDFLAGS += -march=knl + endif + endif + endif endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX512XEON), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_AVX512XEON 1" >> KokkosCore_config.tmp ) - ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1) - KOKKOS_CXXFLAGS += -xCORE-AVX512 - KOKKOS_LDFLAGS += -xCORE-AVX512 - else - ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_AVX512XEON 1" >> KokkosCore_config.tmp ) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1) + KOKKOS_CXXFLAGS += -xCORE-AVX512 + KOKKOS_LDFLAGS += -xCORE-AVX512 + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) - else - ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) - else - # Nothing here yet - KOKKOS_CXXFLAGS += -march=skylake-avx512 - KOKKOS_LDFLAGS += -march=skylake-avx512 - endif - endif - endif + else + # Nothing here yet. + KOKKOS_CXXFLAGS += -march=skylake-avx512 + KOKKOS_LDFLAGS += -march=skylake-avx512 + endif + endif + endif endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KNC), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_KNC 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += -mmic - KOKKOS_LDFLAGS += -mmic + tmp := $(shell echo "\#define KOKKOS_ARCH_KNC 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += -mmic + KOKKOS_LDFLAGS += -mmic endif -#Figure out the architecture flag for Cuda +# Figure out the architecture flag for Cuda. ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) + ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG=-arch endif ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) - KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG=-x cuda --cuda-gpu-arch + KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG=--cuda-gpu-arch + KOKKOS_CXXFLAGS += -x cuda endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER30), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER30 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_30 + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER30 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_30 + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_30 endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER32), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER32 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_32 + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER32 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_32 + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_32 endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER35), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER35 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_35 + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER35 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_35 + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_35 endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER37), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER37 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_37 + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER37 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_37 + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_37 endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL50), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL50 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_50 + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL50 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_50 + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_50 endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL52), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL52 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_52 + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL52 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_52 + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_52 endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL53 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_53 + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL53 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_53 + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_53 endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_PASCAL61), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL61 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_61 + tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL61 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_61 + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_61 endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_PASCAL60), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL60 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_60 + tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL60 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_60 + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_60 endif + endif - + KOKKOS_INTERNAL_LS_CONFIG := $(shell ls KokkosCore_config.h) ifeq ($(KOKKOS_INTERNAL_LS_CONFIG), KokkosCore_config.h) -KOKKOS_INTERNAL_NEW_CONFIG := $(strip $(shell diff KokkosCore_config.h KokkosCore_config.tmp | grep define | wc -l)) + KOKKOS_INTERNAL_NEW_CONFIG := $(strip $(shell diff KokkosCore_config.h KokkosCore_config.tmp | grep define | wc -l)) else -KOKKOS_INTERNAL_NEW_CONFIG := 1 + KOKKOS_INTERNAL_NEW_CONFIG := 1 endif ifneq ($(KOKKOS_INTERNAL_NEW_CONFIG), 0) - tmp := $(shell cp KokkosCore_config.tmp KokkosCore_config.h) + tmp := $(shell cp KokkosCore_config.tmp KokkosCore_config.h) endif KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/*.hpp) @@ -609,53 +628,57 @@ KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/impl/*.cpp) KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/containers/src/impl/*.cpp) ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) - KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.cpp) - KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.hpp) - KOKKOS_CXXFLAGS += -I$(CUDA_PATH)/include - KOKKOS_LDFLAGS += -L$(CUDA_PATH)/lib64 - KOKKOS_LIBS += -lcudart -lcuda + KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.cpp) + KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.hpp) + KOKKOS_CXXFLAGS += -I$(CUDA_PATH)/include + KOKKOS_LDFLAGS += -L$(CUDA_PATH)/lib64 + KOKKOS_LIBS += -lcudart -lcuda endif -ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1) - KOKKOS_LIBS += -lpthread - KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Threads/*.cpp) - KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Threads/*.hpp) +ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1) + KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.cpp) + KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.hpp) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) + KOKKOS_CXXFLAGS += -Xcompiler $(KOKKOS_INTERNAL_OPENMP_FLAG) + else + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_OPENMP_FLAG) + endif + + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_OPENMP_FLAG) endif -ifeq ($(KOKKOS_INTERNAL_USE_QTHREAD), 1) - KOKKOS_LIBS += -lqthread - KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Qthread/*.cpp) - KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Qthread/*.hpp) +ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1) + KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Threads/*.cpp) + KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Threads/*.hpp) + KOKKOS_LIBS += -lpthread endif -ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1) - KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.cpp) - KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.hpp) - ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) - KOKKOS_CXXFLAGS += -Xcompiler $(KOKKOS_INTERNAL_OPENMP_FLAG) - else - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_OPENMP_FLAG) - endif - KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_OPENMP_FLAG) +ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1) + KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Qthreads/*.cpp) + KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Qthreads/*.hpp) + KOKKOS_CPPFLAGS += -I$(QTHREADS_PATH)/include + KOKKOS_LDFLAGS += -L$(QTHREADS_PATH)/lib + KOKKOS_LIBS += -lqthread endif -#Explicitly set the GCC Toolchain for Clang +# Explicitly set the GCC Toolchain for Clang. ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) - KOKKOS_INTERNAL_GCC_PATH = $(shell which g++) - KOKKOS_INTERNAL_GCC_TOOLCHAIN = $(KOKKOS_INTERNAL_GCC_PATH:/bin/g++=) - KOKKOS_CXXFLAGS += --gcc-toolchain=$(KOKKOS_INTERNAL_GCC_TOOLCHAIN) -DKOKKOS_CUDA_CLANG_WORKAROUND -DKOKKOS_CUDA_USE_LDG_INTRINSIC - KOKKOS_LDFLAGS += --gcc-toolchain=$(KOKKOS_INTERNAL_GCC_TOOLCHAIN) + KOKKOS_INTERNAL_GCC_PATH = $(shell which g++) + KOKKOS_INTERNAL_GCC_TOOLCHAIN = $(KOKKOS_INTERNAL_GCC_PATH:/bin/g++=) + KOKKOS_CXXFLAGS += --gcc-toolchain=$(KOKKOS_INTERNAL_GCC_TOOLCHAIN) -DKOKKOS_CUDA_CLANG_WORKAROUND -DKOKKOS_CUDA_USE_LDG_INTRINSIC + KOKKOS_LDFLAGS += --gcc-toolchain=$(KOKKOS_INTERNAL_GCC_TOOLCHAIN) endif -#With Cygwin functions such as fdopen and fileno are not defined -#when strict ansi is enabled. strict ansi gets enabled with --std=c++11 -#though. So we hard undefine it here. Not sure if that has any bad side effects -#This is needed for gtest actually, not for Kokkos itself! +# With Cygwin functions such as fdopen and fileno are not defined +# when strict ansi is enabled. strict ansi gets enabled with --std=c++11 +# though. So we hard undefine it here. Not sure if that has any bad side effects +# This is needed for gtest actually, not for Kokkos itself! ifeq ($(KOKKOS_INTERNAL_OS_CYGWIN), 1) KOKKOS_CXXFLAGS += -U__STRICT_ANSI__ endif -# Setting up dependencies +# Setting up dependencies. KokkosCore_config.h: diff --git a/lib/kokkos/Makefile.targets b/lib/kokkos/Makefile.targets index a48a5f6eb7..54cacb741b 100644 --- a/lib/kokkos/Makefile.targets +++ b/lib/kokkos/Makefile.targets @@ -18,6 +18,8 @@ Kokkos_Serial_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_Serial_Task.cpp Kokkos_TaskQueue.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_TaskQueue.cpp $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_TaskQueue.cpp +Kokkos_HostThreadTeam.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_HostThreadTeam.cpp + $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_HostThreadTeam.cpp Kokkos_spinwait.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_spinwait.cpp $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_spinwait.cpp Kokkos_Profiling_Interface.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_Profiling_Interface.cpp @@ -43,11 +45,11 @@ Kokkos_ThreadsExec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Threads/Kokk $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Threads/Kokkos_ThreadsExec.cpp endif -ifeq ($(KOKKOS_INTERNAL_USE_QTHREAD), 1) -Kokkos_QthreadExec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Qthread/Kokkos_QthreadExec.cpp - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Qthread/Kokkos_QthreadExec.cpp -Kokkos_Qthread_TaskPolicy.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Qthread/Kokkos_Qthread_TaskPolicy.cpp - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Qthread/Kokkos_Qthread_TaskPolicy.cpp +ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1) +Kokkos_QthreadsExec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Qthreads/Kokkos_QthreadsExec.cpp + $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Qthreads/Kokkos_QthreadsExec.cpp +Kokkos_Qthreads_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Qthreads/Kokkos_Qthreads_Task.cpp + $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Qthreads/Kokkos_Qthreads_Task.cpp endif ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1) @@ -59,4 +61,3 @@ endif Kokkos_HBWSpace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_HBWSpace.cpp $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_HBWSpace.cpp - diff --git a/lib/kokkos/README b/lib/kokkos/README index 7ebde23a1f..257a2e5db4 100644 --- a/lib/kokkos/README +++ b/lib/kokkos/README @@ -45,31 +45,39 @@ Primary tested compilers on X86 are: GCC 4.8.4 GCC 4.9.2 GCC 5.1.0 + GCC 5.2.0 Intel 14.0.4 Intel 15.0.2 Intel 16.0.1 Intel 17.0.098 + Intel 17.1.132 Clang 3.5.2 Clang 3.6.1 + Clang 3.7.1 + Clang 3.8.1 Clang 3.9.0 + PGI 17.1 Primary tested compilers on Power 8 are: GCC 5.4.0 (OpenMP,Serial) IBM XL 13.1.3 (OpenMP, Serial) (There is a workaround in place to avoid a compiler bug) Primary tested compilers on Intel KNL are: + GCC 6.2.0 Intel 16.2.181 (with gcc 4.7.2) Intel 17.0.098 (with gcc 4.7.2) + Intel 17.1.132 (with gcc 4.9.3) + Intel 17.2.174 (with gcc 4.9.3) + Intel 18.0.061 (beta) (with gcc 4.9.3) Secondary tested compilers are: - CUDA 7.0 (with gcc 4.7.2) - CUDA 7.5 (with gcc 4.7.2) + CUDA 7.0 (with gcc 4.8.4) + CUDA 7.5 (with gcc 4.8.4) CUDA 8.0 (with gcc 5.3.0 on X86 and gcc 5.4.0 on Power8) CUDA/Clang 8.0 using Clang/Trunk compiler Other compilers working: X86: - PGI 15.4 Cygwin 2.1.0 64bit with gcc 4.9.3 Known non-working combinations: diff --git a/lib/kokkos/algorithms/cmake/Dependencies.cmake b/lib/kokkos/algorithms/cmake/Dependencies.cmake index 1d71d8af34..c36b62523f 100644 --- a/lib/kokkos/algorithms/cmake/Dependencies.cmake +++ b/lib/kokkos/algorithms/cmake/Dependencies.cmake @@ -1,5 +1,5 @@ TRIBITS_PACKAGE_DEFINE_DEPENDENCIES( - LIB_REQUIRED_PACKAGES KokkosCore + LIB_REQUIRED_PACKAGES KokkosCore KokkosContainers LIB_OPTIONAL_TPLS Pthread CUDA HWLOC TEST_OPTIONAL_TPLS CUSPARSE ) diff --git a/lib/kokkos/algorithms/src/Kokkos_Random.hpp b/lib/kokkos/algorithms/src/Kokkos_Random.hpp index d376173bf1..bd73582362 100644 --- a/lib/kokkos/algorithms/src/Kokkos_Random.hpp +++ b/lib/kokkos/algorithms/src/Kokkos_Random.hpp @@ -547,7 +547,7 @@ namespace Kokkos { KOKKOS_INLINE_FUNCTION Random_XorShift64 (uint64_t state, int state_idx = 0) - : state_(state),state_idx_(state_idx){} + : state_(state==0?uint64_t(1318319):state),state_idx_(state_idx){} KOKKOS_INLINE_FUNCTION uint32_t urand() { @@ -719,6 +719,9 @@ namespace Kokkos { } void init(uint64_t seed, int num_states) { + if(seed==0) + seed = uint64_t(1318319); + num_states_ = num_states; locks_ = lock_type("Kokkos::Random_XorShift64::locks",num_states_); @@ -968,8 +971,9 @@ namespace Kokkos { inline void init(uint64_t seed, int num_states) { + if(seed==0) + seed = uint64_t(1318319); num_states_ = num_states; - locks_ = int_view_type("Kokkos::Random_XorShift1024::locks",num_states_); state_ = state_data_type("Kokkos::Random_XorShift1024::state",num_states_); p_ = int_view_type("Kokkos::Random_XorShift1024::p",num_states_); diff --git a/lib/kokkos/algorithms/src/Kokkos_Sort.hpp b/lib/kokkos/algorithms/src/Kokkos_Sort.hpp index 5b8c65fee1..237de751fe 100644 --- a/lib/kokkos/algorithms/src/Kokkos_Sort.hpp +++ b/lib/kokkos/algorithms/src/Kokkos_Sort.hpp @@ -53,69 +53,122 @@ namespace Kokkos { namespace Impl { - template + template< class DstViewType , class SrcViewType + , int Rank = DstViewType::Rank > struct CopyOp; - template - struct CopyOp { - template + template< class DstViewType , class SrcViewType > + struct CopyOp { KOKKOS_INLINE_FUNCTION - static void copy(DstType& dst, size_t i_dst, - SrcType& src, size_t i_src ) { + static void copy(DstViewType const& dst, size_t i_dst, + SrcViewType const& src, size_t i_src ) { dst(i_dst) = src(i_src); } }; - template - struct CopyOp { - template + template< class DstViewType , class SrcViewType > + struct CopyOp { KOKKOS_INLINE_FUNCTION - static void copy(DstType& dst, size_t i_dst, - SrcType& src, size_t i_src ) { - for(int j = 0;j< (int) dst.dimension_1(); j++) + static void copy(DstViewType const& dst, size_t i_dst, + SrcViewType const& src, size_t i_src ) { + for(int j = 0;j< (int) dst.extent(1); j++) dst(i_dst,j) = src(i_src,j); } }; - template - struct CopyOp { - template + template< class DstViewType , class SrcViewType > + struct CopyOp { KOKKOS_INLINE_FUNCTION - static void copy(DstType& dst, size_t i_dst, - SrcType& src, size_t i_src ) { - for(int j = 0; j +//---------------------------------------------------------------------------- + +template< class KeyViewType + , class BinSortOp + , class Space = typename KeyViewType::device_type + , class SizeType = typename KeyViewType::memory_space::size_type + > class BinSort { +public: + template< class DstViewType , class SrcViewType > + struct copy_functor { -public: - template - struct bin_sort_sort_functor { - typedef ExecutionSpace execution_space; - typedef typename ValuesViewType::non_const_type values_view_type; - typedef typename ValuesViewType::const_type const_values_view_type; - Kokkos::View > values; - values_view_type sorted_values; - typename PermuteViewType::const_type sort_order; - bin_sort_sort_functor(const_values_view_type values_, values_view_type sorted_values_, PermuteViewType sort_order_): - values(values_),sorted_values(sorted_values_),sort_order(sort_order_) {} + typedef typename SrcViewType::const_type src_view_type ; + + typedef Impl::CopyOp< DstViewType , src_view_type > copy_op ; + + DstViewType dst_values ; + src_view_type src_values ; + int dst_offset ; + + copy_functor( DstViewType const & dst_values_ + , int const & dst_offset_ + , SrcViewType const & src_values_ + ) + : dst_values( dst_values_ ) + , src_values( src_values_ ) + , dst_offset( dst_offset_ ) + {} + + KOKKOS_INLINE_FUNCTION + void operator() (const int& i) const { + // printf("copy: dst(%i) src(%i)\n",i+dst_offset,i); + copy_op::copy(dst_values,i+dst_offset,src_values,i); + } + }; + + template< class DstViewType + , class PermuteViewType + , class SrcViewType + > + struct copy_permute_functor { + + // If a Kokkos::View then can generate constant random access + // otherwise can only use the constant type. + + typedef typename std::conditional + < Kokkos::is_view< SrcViewType >::value + , Kokkos::View< typename SrcViewType::const_data_type + , typename SrcViewType::array_layout + , typename SrcViewType::device_type + , Kokkos::MemoryTraits + > + , typename SrcViewType::const_type + >::type src_view_type ; + + typedef typename PermuteViewType::const_type perm_view_type ; + + typedef Impl::CopyOp< DstViewType , src_view_type > copy_op ; + + DstViewType dst_values ; + perm_view_type sort_order ; + src_view_type src_values ; + + copy_permute_functor( DstViewType const & dst_values_ + , PermuteViewType const & sort_order_ + , SrcViewType const & src_values_ + ) + : dst_values( dst_values_ ) + , sort_order( sort_order_ ) + , src_values( src_values_ ) + {} KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { - //printf("Sort: %i %i\n",i,sort_order(i)); - CopyOp::copy(sorted_values,i,values,sort_order(i)); + // printf("copy_permute: dst(%i) src(%i)\n",i,sort_order(i)); + copy_op::copy(dst_values,i,src_values,sort_order(i)); } }; - typedef ExecutionSpace execution_space; + typedef typename Space::execution_space execution_space; typedef BinSortOp bin_op_type; struct bin_count_tag {}; @@ -124,84 +177,137 @@ public: struct bin_sort_bins_tag {}; public: + typedef SizeType size_type; typedef size_type value_type; - typedef Kokkos::View offset_type; - typedef Kokkos::View bin_count_type; + typedef Kokkos::View offset_type; + typedef Kokkos::View bin_count_type; + typedef typename KeyViewType::const_type const_key_view_type ; - typedef Kokkos::View const_key_view_type; - typedef Kokkos::View > const_rnd_key_view_type; + // If a Kokkos::View then can generate constant random access + // otherwise can only use the constant type. + + typedef typename std::conditional + < Kokkos::is_view< KeyViewType >::value + , Kokkos::View< typename KeyViewType::const_data_type, + typename KeyViewType::array_layout, + typename KeyViewType::device_type, + Kokkos::MemoryTraits > + , const_key_view_type + >::type const_rnd_key_view_type; typedef typename KeyViewType::non_const_value_type non_const_key_scalar; typedef typename KeyViewType::const_value_type const_key_scalar; + typedef Kokkos::View > bin_count_atomic_type ; + private: + const_key_view_type keys; const_rnd_key_view_type keys_rnd; public: - BinSortOp bin_op; - offset_type bin_offsets; + BinSortOp bin_op ; + offset_type bin_offsets ; + bin_count_atomic_type bin_count_atomic ; + bin_count_type bin_count_const ; + offset_type sort_order ; - Kokkos::View > bin_count_atomic; - bin_count_type bin_count_const; - - offset_type sort_order; - - bool sort_within_bins; + int range_begin ; + int range_end ; + bool sort_within_bins ; public: - // Constructor: takes the keys, the binning_operator and optionally whether to sort within bins (default false) - BinSort(const_key_view_type keys_, BinSortOp bin_op_, - bool sort_within_bins_ = false) - :keys(keys_),keys_rnd(keys_), bin_op(bin_op_) { + BinSort() {} - bin_count_atomic = Kokkos::View("Kokkos::SortImpl::BinSortFunctor::bin_count",bin_op.max_bins()); + //---------------------------------------- + // Constructor: takes the keys, the binning_operator and optionally whether to sort within bins (default false) + BinSort( const_key_view_type keys_ + , int range_begin_ + , int range_end_ + , BinSortOp bin_op_ + , bool sort_within_bins_ = false + ) + : keys(keys_) + , keys_rnd(keys_) + , bin_op(bin_op_) + , bin_offsets() + , bin_count_atomic() + , bin_count_const() + , sort_order() + , range_begin( range_begin_ ) + , range_end( range_end_ ) + , sort_within_bins( sort_within_bins_ ) + { + bin_count_atomic = Kokkos::View("Kokkos::SortImpl::BinSortFunctor::bin_count",bin_op.max_bins()); bin_count_const = bin_count_atomic; bin_offsets = offset_type("Kokkos::SortImpl::BinSortFunctor::bin_offsets",bin_op.max_bins()); - sort_order = offset_type("PermutationVector",keys.dimension_0()); - sort_within_bins = sort_within_bins_; + sort_order = offset_type("PermutationVector",range_end-range_begin); } + BinSort( const_key_view_type keys_ + , BinSortOp bin_op_ + , bool sort_within_bins_ = false + ) + : BinSort( keys_ , 0 , keys_.extent(0), bin_op_ , sort_within_bins_ ) {} + + //---------------------------------------- // Create the permutation vector, the bin_offset array and the bin_count array. Can be called again if keys changed void create_permute_vector() { - Kokkos::parallel_for (Kokkos::RangePolicy (0,keys.dimension_0()),*this); - Kokkos::parallel_scan(Kokkos::RangePolicy (0,bin_op.max_bins()) ,*this); + const size_t len = range_end - range_begin ; + Kokkos::parallel_for (Kokkos::RangePolicy (0,len),*this); + Kokkos::parallel_scan(Kokkos::RangePolicy (0,bin_op.max_bins()) ,*this); Kokkos::deep_copy(bin_count_atomic,0); - Kokkos::parallel_for (Kokkos::RangePolicy (0,keys.dimension_0()),*this); + Kokkos::parallel_for (Kokkos::RangePolicy (0,len),*this); if(sort_within_bins) - Kokkos::parallel_for (Kokkos::RangePolicy(0,bin_op.max_bins()) ,*this); + Kokkos::parallel_for (Kokkos::RangePolicy(0,bin_op.max_bins()) ,*this); } // Sort a view with respect ot the first dimension using the permutation array template - void sort(ValuesViewType values) { - ValuesViewType sorted_values = ValuesViewType("Copy", - values.dimension_0(), - values.dimension_1(), - values.dimension_2(), - values.dimension_3(), - values.dimension_4(), - values.dimension_5(), - values.dimension_6(), - values.dimension_7()); - - parallel_for(values.dimension_0(), - bin_sort_sort_functor >(values,sorted_values,sort_order)); - - deep_copy(values,sorted_values); + void sort( ValuesViewType const & values) + { + typedef + Kokkos::View< typename ValuesViewType::data_type, + typename ValuesViewType::array_layout, + typename ValuesViewType::device_type > + scratch_view_type ; + + const size_t len = range_end - range_begin ; + + scratch_view_type + sorted_values("Scratch", + len, + values.extent(1), + values.extent(2), + values.extent(3), + values.extent(4), + values.extent(5), + values.extent(6), + values.extent(7)); + + { + copy_permute_functor< scratch_view_type /* DstViewType */ + , offset_type /* PermuteViewType */ + , ValuesViewType /* SrcViewType */ + > + functor( sorted_values , sort_order , values ); + + parallel_for( Kokkos::RangePolicy(0,len),functor); + } + + { + copy_functor< ValuesViewType , scratch_view_type > + functor( values , range_begin , sorted_values ); + + parallel_for( Kokkos::RangePolicy(0,len),functor); + } } // Get the permutation vector @@ -217,9 +323,11 @@ public: bin_count_type get_bin_count() const {return bin_count_const;} public: + KOKKOS_INLINE_FUNCTION void operator() (const bin_count_tag& tag, const int& i) const { - bin_count_atomic(bin_op.bin(keys,i))++; + const int j = range_begin + i ; + bin_count_atomic(bin_op.bin(keys,j))++; } KOKKOS_INLINE_FUNCTION @@ -232,10 +340,11 @@ public: KOKKOS_INLINE_FUNCTION void operator() (const bin_binning_tag& tag, const int& i) const { - const int bin = bin_op.bin(keys,i); + const int j = range_begin + i ; + const int bin = bin_op.bin(keys,j); const int count = bin_count_atomic(bin)++; - sort_order(bin_offsets(bin) + count) = i; + sort_order(bin_offsets(bin) + count) = j ; } KOKKOS_INLINE_FUNCTION @@ -262,13 +371,19 @@ public: } }; +//---------------------------------------------------------------------------- + template struct BinOp1D { - const int max_bins_; - const double mul_; + int max_bins_; + double mul_; typename KeyViewType::const_value_type range_; typename KeyViewType::const_value_type min_; + BinOp1D():max_bins_(0),mul_(0.0), + range_(typename KeyViewType::const_value_type()), + min_(typename KeyViewType::const_value_type()) {} + //Construct BinOp with number of bins, minimum value and maxuimum value BinOp1D(int max_bins__, typename KeyViewType::const_value_type min, typename KeyViewType::const_value_type max ) @@ -302,12 +417,14 @@ struct BinOp3D { typename KeyViewType::non_const_value_type range_[3]; typename KeyViewType::non_const_value_type min_[3]; + BinOp3D() {} + BinOp3D(int max_bins__[], typename KeyViewType::const_value_type min[], typename KeyViewType::const_value_type max[] ) { - max_bins_[0] = max_bins__[0]+1; - max_bins_[1] = max_bins__[1]+1; - max_bins_[2] = max_bins__[2]+1; + max_bins_[0] = max_bins__[0]; + max_bins_[1] = max_bins__[1]; + max_bins_[2] = max_bins__[2]; mul_[0] = 1.0*max_bins__[0]/(max[0]-min[0]); mul_[1] = 1.0*max_bins__[1]/(max[1]-min[1]); mul_[2] = 1.0*max_bins__[2]/(max[2]-min[2]); @@ -364,7 +481,7 @@ bool try_std_sort(ViewType view) { possible = possible && (ViewType::Rank == 1); possible = possible && (stride[0] == 1); if(possible) { - std::sort(view.ptr_on_device(),view.ptr_on_device()+view.dimension_0()); + std::sort(view.data(),view.data()+view.extent(0)); } return possible; } @@ -386,7 +503,8 @@ struct min_max_functor { } template -void sort(ViewType view, bool always_use_kokkos_sort = false) { +void sort( ViewType const & view , bool const always_use_kokkos_sort = false) +{ if(!always_use_kokkos_sort) { if(Impl::try_std_sort(view)) return; } @@ -394,14 +512,37 @@ void sort(ViewType view, bool always_use_kokkos_sort = false) { Kokkos::Experimental::MinMaxScalar result; Kokkos::Experimental::MinMax reducer(result); - parallel_reduce(Kokkos::RangePolicy(0,view.dimension_0()), + parallel_reduce(Kokkos::RangePolicy(0,view.extent(0)), Impl::min_max_functor(view),reducer); if(result.min_val == result.max_val) return; - BinSort bin_sort(view,CompType(view.dimension_0()/2,result.min_val,result.max_val),true); + BinSort bin_sort(view,CompType(view.extent(0)/2,result.min_val,result.max_val),true); bin_sort.create_permute_vector(); bin_sort.sort(view); } +template +void sort( ViewType view + , size_t const begin + , size_t const end + ) +{ + typedef Kokkos::RangePolicy range_policy ; + typedef BinOp1D CompType; + + Kokkos::Experimental::MinMaxScalar result; + Kokkos::Experimental::MinMax reducer(result); + + parallel_reduce( range_policy( begin , end ) + , Impl::min_max_functor(view),reducer ); + + if(result.min_val == result.max_val) return; + + BinSort + bin_sort(view,begin,end,CompType((end-begin)/2,result.min_val,result.max_val),true); + + bin_sort.create_permute_vector(); + bin_sort.sort(view); +} } #endif diff --git a/lib/kokkos/algorithms/unit_tests/TestSort.hpp b/lib/kokkos/algorithms/unit_tests/TestSort.hpp index 03e4fb691e..61ffa6f43a 100644 --- a/lib/kokkos/algorithms/unit_tests/TestSort.hpp +++ b/lib/kokkos/algorithms/unit_tests/TestSort.hpp @@ -44,6 +44,7 @@ #include #include +#include #include #include @@ -192,17 +193,81 @@ void test_3D_sort(unsigned int n) { double epsilon = 1e-10; unsigned int equal_sum = (ratio > (1.0-epsilon)) && (ratio < (1.0+epsilon)) ? 1 : 0; - printf("3D Sort Sum: %f %f Fails: %u\n",sum_before,sum_after,sort_fails); + if ( sort_fails ) + printf("3D Sort Sum: %f %f Fails: %u\n",sum_before,sum_after,sort_fails); + ASSERT_EQ(sort_fails,0); ASSERT_EQ(equal_sum,1); } +//---------------------------------------------------------------------------- + +template +void test_dynamic_view_sort(unsigned int n ) +{ + typedef typename ExecutionSpace::memory_space memory_space ; + typedef Kokkos::Experimental::DynamicView KeyDynamicViewType; + typedef Kokkos::View KeyViewType; + + const size_t upper_bound = 2 * n ; + + typename KeyDynamicViewType::memory_pool + pool( memory_space() , 2 * n * sizeof(KeyType) ); + + KeyDynamicViewType keys("Keys",pool,upper_bound); + + keys.resize_serial(n); + + KeyViewType keys_view("KeysTmp", n ); + + // Test sorting array with all numbers equal + Kokkos::deep_copy(keys_view,KeyType(1)); + Kokkos::Experimental::deep_copy(keys,keys_view); + Kokkos::sort(keys, 0 /* begin */ , n /* end */ ); + + Kokkos::Random_XorShift64_Pool g(1931); + Kokkos::fill_random(keys_view,g,Kokkos::Random_XorShift64_Pool::generator_type::MAX_URAND); + + Kokkos::Experimental::deep_copy(keys,keys_view); + + double sum_before = 0.0; + double sum_after = 0.0; + unsigned int sort_fails = 0; + + Kokkos::parallel_reduce(n,sum(keys_view),sum_before); + + Kokkos::sort(keys, 0 /* begin */ , n /* end */ ); + + Kokkos::Experimental::deep_copy( keys_view , keys ); + + Kokkos::parallel_reduce(n,sum(keys_view),sum_after); + Kokkos::parallel_reduce(n-1,is_sorted_struct(keys_view),sort_fails); + + double ratio = sum_before/sum_after; + double epsilon = 1e-10; + unsigned int equal_sum = (ratio > (1.0-epsilon)) && (ratio < (1.0+epsilon)) ? 1 : 0; + + if ( sort_fails != 0 || equal_sum != 1 ) { + std::cout << " N = " << n + << " ; sum_before = " << sum_before + << " ; sum_after = " << sum_after + << " ; ratio = " << ratio + << std::endl ; + } + + ASSERT_EQ(sort_fails,0); + ASSERT_EQ(equal_sum,1); +} + +//---------------------------------------------------------------------------- + template void test_sort(unsigned int N) { test_1D_sort(N*N*N, true); test_1D_sort(N*N*N, false); test_3D_sort(N); + test_dynamic_view_sort(N*N); } } diff --git a/lib/kokkos/bin/nvcc_wrapper b/lib/kokkos/bin/nvcc_wrapper index cb206cf88b..09fa5d500a 100755 --- a/lib/kokkos/bin/nvcc_wrapper +++ b/lib/kokkos/bin/nvcc_wrapper @@ -140,6 +140,9 @@ do #strip of pedantic because it produces endless warnings about #LINE added by the preprocessor -pedantic|-Wpedantic|-ansi) ;; + #strip of -Woverloaded-virtual to avoid "cc1: warning: command line option ‘-Woverloaded-virtual’ is valid for C++/ObjC++ but not for C" + -Woverloaded-virtual) + ;; #strip -Xcompiler because we add it -Xcompiler) if [ $first_xcompiler_arg -eq 1 ]; then @@ -190,7 +193,7 @@ do object_files_xlinker="$object_files_xlinker -Xlinker $1" ;; #Handle object files which always need to use "-Xlinker": -x cu applies to all input files, so give them to linker, except if only linking - *.dylib) + @*|*.dylib) object_files="$object_files -Xlinker $1" object_files_xlinker="$object_files_xlinker -Xlinker $1" ;; diff --git a/lib/kokkos/cmake/deps/QTHREAD.cmake b/lib/kokkos/cmake/deps/QTHREADS.cmake similarity index 98% rename from lib/kokkos/cmake/deps/QTHREAD.cmake rename to lib/kokkos/cmake/deps/QTHREADS.cmake index 994b72b200..c312f2590b 100644 --- a/lib/kokkos/cmake/deps/QTHREAD.cmake +++ b/lib/kokkos/cmake/deps/QTHREADS.cmake @@ -63,8 +63,7 @@ # Source: https://code.google.com/p/qthreads # -TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( QTHREAD +TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( QTHREADS REQUIRED_HEADERS qthread.h REQUIRED_LIBS_NAMES "qthread" ) - diff --git a/lib/kokkos/cmake/tpls/FindTPLQTHREAD.cmake b/lib/kokkos/cmake/tpls/FindTPLQTHREADS.cmake similarity index 98% rename from lib/kokkos/cmake/tpls/FindTPLQTHREAD.cmake rename to lib/kokkos/cmake/tpls/FindTPLQTHREADS.cmake index 994b72b200..c312f2590b 100644 --- a/lib/kokkos/cmake/tpls/FindTPLQTHREAD.cmake +++ b/lib/kokkos/cmake/tpls/FindTPLQTHREADS.cmake @@ -63,8 +63,7 @@ # Source: https://code.google.com/p/qthreads # -TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( QTHREAD +TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( QTHREADS REQUIRED_HEADERS qthread.h REQUIRED_LIBS_NAMES "qthread" ) - diff --git a/lib/kokkos/config/kokkos_dev/config-core-all.sh b/lib/kokkos/config/kokkos_dev/config-core-all.sh index fa588c778f..d4fb25a8e1 100755 --- a/lib/kokkos/config/kokkos_dev/config-core-all.sh +++ b/lib/kokkos/config/kokkos_dev/config-core-all.sh @@ -6,7 +6,7 @@ #----------------------------------------------------------------------------- # Building on 'kokkos-dev.sandia.gov' with enabled capabilities: # -# Cuda, OpenMP, Threads, Qthread, hwloc +# Cuda, OpenMP, Threads, Qthreads, hwloc # # module loaded on 'kokkos-dev.sandia.gov' for this build # @@ -82,13 +82,13 @@ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON" CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_OpenMP:BOOL=ON" #----------------------------------------------------------------------------- -# Qthread +# Qthreads -QTHREAD_BASE_DIR="/home/projects/qthreads/2014-07-08/host/gnu/4.7.3" +QTHREADS_BASE_DIR="/home/projects/qthreads/2014-07-08/host/gnu/4.7.3" -CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_QTHREAD:BOOL=ON" -CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D QTHREAD_INCLUDE_DIRS:FILEPATH=${QTHREAD_BASE_DIR}/include" -CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D QTHREAD_LIBRARY_DIRS:FILEPATH=${QTHREAD_BASE_DIR}/lib" +CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_QTHREADS:BOOL=ON" +CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D QTHREADS_INCLUDE_DIRS:FILEPATH=${QTHREADS_BASE_DIR}/include" +CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D QTHREADS_LIBRARY_DIRS:FILEPATH=${QTHREADS_BASE_DIR}/lib" #----------------------------------------------------------------------------- # C++11 @@ -108,6 +108,3 @@ rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile* echo cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR} cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR} - -#----------------------------------------------------------------------------- - diff --git a/lib/kokkos/config/master_history.txt b/lib/kokkos/config/master_history.txt index 446cbb0216..9eaecb5031 100644 --- a/lib/kokkos/config/master_history.txt +++ b/lib/kokkos/config/master_history.txt @@ -4,4 +4,5 @@ tag: 2.01.10 date: 09:27:2016 master: e4119325 develop: e6cda11e tag: 2.02.00 date: 10:30:2016 master: 6c90a581 develop: ca3dd56e tag: 2.02.01 date: 11:01:2016 master: 9c698c86 develop: b0072304 tag: 2.02.07 date: 12:16:2016 master: 4b4cc4ba develop: 382c0966 -tag: 2.02.15 date: 02:10:2017 master: 8c64cd93 develop: 28dea8b6 +tag: 2.02.15 date: 02:10:2017 master: 8c64cd93 develop: 28dea8b6 +tag: 2.03.00 date: 04:25:2017 master: 120d9ce7 develop: 015ba641 diff --git a/lib/kokkos/config/test_all_sandia b/lib/kokkos/config/test_all_sandia index 2c15e951ba..6909606643 100755 --- a/lib/kokkos/config/test_all_sandia +++ b/lib/kokkos/config/test_all_sandia @@ -6,29 +6,29 @@ set -o pipefail -# Determine current machine +# Determine current machine. MACHINE="" HOSTNAME=$(hostname) PROCESSOR=`uname -p` if [[ "$HOSTNAME" =~ (white|ride).* ]]; then - MACHINE=white + MACHINE=white elif [[ "$HOSTNAME" =~ .*bowman.* ]]; then - MACHINE=bowman + MACHINE=bowman elif [[ "$HOSTNAME" =~ node.* ]]; then # Warning: very generic name - if [[ "$PROCESSOR" = "aarch64" ]]; then - MACHINE=sullivan - else - MACHINE=shepard - fi + if [[ "$PROCESSOR" = "aarch64" ]]; then + MACHINE=sullivan + else + MACHINE=shepard + fi elif [[ "$HOSTNAME" =~ apollo ]]; then - MACHINE=apollo + MACHINE=apollo elif [ ! -z "$SEMS_MODULEFILES_ROOT" ]; then - MACHINE=sems + MACHINE=sems else - echo "Unrecognized machine" >&2 - exit 1 + echo "Unrecognized machine" >&2 + exit 1 fi GCC_BUILD_LIST="OpenMP,Pthread,Serial,OpenMP_Serial,Pthread_Serial" @@ -45,10 +45,11 @@ CLANG_WARNING_FLAGS="-Wall,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limi INTEL_WARNING_FLAGS="-Wall,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wuninitialized" CUDA_WARNING_FLAGS="" -# Default. Machine specific can override +# Default. Machine specific can override. DEBUG=False ARGS="" CUSTOM_BUILD_LIST="" +QTHREADS_PATH="" DRYRUN=False BUILD_ONLY=False declare -i NUM_JOBS_TO_RUN_IN_PARALLEL=3 @@ -60,86 +61,90 @@ PRINT_HELP=False OPT_FLAG="" KOKKOS_OPTIONS="" - # -# Handle arguments +# Handle arguments. # while [[ $# > 0 ]] do -key="$1" -case $key in ---kokkos-path*) -KOKKOS_PATH="${key#*=}" -;; ---build-list*) -CUSTOM_BUILD_LIST="${key#*=}" -;; ---debug*) -DEBUG=True -;; ---build-only*) -BUILD_ONLY=True -;; ---test-script*) -TEST_SCRIPT=True -;; ---skip-hwloc*) -SKIP_HWLOC=True -;; ---num*) -NUM_JOBS_TO_RUN_IN_PARALLEL="${key#*=}" -;; ---dry-run*) -DRYRUN=True -;; ---spot-check*) -SPOT_CHECK=True -;; ---arch*) -ARCH_FLAG="--arch=${key#*=}" -;; ---opt-flag*) -OPT_FLAG="${key#*=}" -;; ---with-cuda-options*) -KOKKOS_CUDA_OPTIONS="--with-cuda-options=${key#*=}" -;; ---help*) -PRINT_HELP=True -;; -*) -# args, just append -ARGS="$ARGS $1" -;; -esac -shift + key="$1" + + case $key in + --kokkos-path*) + KOKKOS_PATH="${key#*=}" + ;; + --qthreads-path*) + QTHREADS_PATH="${key#*=}" + ;; + --build-list*) + CUSTOM_BUILD_LIST="${key#*=}" + ;; + --debug*) + DEBUG=True + ;; + --build-only*) + BUILD_ONLY=True + ;; + --test-script*) + TEST_SCRIPT=True + ;; + --skip-hwloc*) + SKIP_HWLOC=True + ;; + --num*) + NUM_JOBS_TO_RUN_IN_PARALLEL="${key#*=}" + ;; + --dry-run*) + DRYRUN=True + ;; + --spot-check*) + SPOT_CHECK=True + ;; + --arch*) + ARCH_FLAG="--arch=${key#*=}" + ;; + --opt-flag*) + OPT_FLAG="${key#*=}" + ;; + --with-cuda-options*) + KOKKOS_CUDA_OPTIONS="--with-cuda-options=${key#*=}" + ;; + --help*) + PRINT_HELP=True + ;; + *) + # args, just append + ARGS="$ARGS $1" + ;; + esac + + shift done SCRIPT_KOKKOS_ROOT=$( cd "$( dirname "$0" )" && cd .. && pwd ) -# set kokkos path +# Set kokkos path. if [ -z "$KOKKOS_PATH" ]; then - KOKKOS_PATH=$SCRIPT_KOKKOS_ROOT + KOKKOS_PATH=$SCRIPT_KOKKOS_ROOT else - # Ensure KOKKOS_PATH is abs path - KOKKOS_PATH=$( cd $KOKKOS_PATH && pwd ) + # Ensure KOKKOS_PATH is abs path. + KOKKOS_PATH=$( cd $KOKKOS_PATH && pwd ) fi # -# Machine specific config +# Machine specific config. # if [ "$MACHINE" = "sems" ]; then - source /projects/sems/modulefiles/utils/sems-modules-init.sh + source /projects/sems/modulefiles/utils/sems-modules-init.sh - BASE_MODULE_LIST="sems-env,kokkos-env,sems-/,kokkos-hwloc/1.10.1/base" - CUDA_MODULE_LIST="sems-env,kokkos-env,kokkos-/,sems-gcc/4.8.4,kokkos-hwloc/1.10.1/base" - CUDA8_MODULE_LIST="sems-env,kokkos-env,kokkos-/,sems-gcc/5.3.0,kokkos-hwloc/1.10.1/base" + BASE_MODULE_LIST="sems-env,kokkos-env,sems-/,kokkos-hwloc/1.10.1/base" + CUDA_MODULE_LIST="sems-env,kokkos-env,kokkos-/,sems-gcc/4.8.4,kokkos-hwloc/1.10.1/base" + CUDA8_MODULE_LIST="sems-env,kokkos-env,kokkos-/,sems-gcc/5.3.0,kokkos-hwloc/1.10.1/base" - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="" - fi + if [ -z "$ARCH_FLAG" ]; then + ARCH_FLAG="" + fi if [ "$SPOT_CHECK" = "True" ]; then # Format: (compiler module-list build-list exe-name warning-flag) @@ -153,120 +158,118 @@ if [ "$MACHINE" = "sems" ]; then # Format: (compiler module-list build-list exe-name warning-flag) COMPILERS=("gcc/4.7.2 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" "gcc/4.8.4 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/4.9.2 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/5.1.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" "intel/14.0.4 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" "intel/15.0.2 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" "intel/16.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" "clang/3.6.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" "clang/3.7.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" "clang/3.8.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "clang/3.9.0 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" "cuda/7.0.28 $CUDA_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/config/nvcc_wrapper $CUDA_WARNING_FLAGS" "cuda/7.5.18 $CUDA_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/config/nvcc_wrapper $CUDA_WARNING_FLAGS" "cuda/8.0.44 $CUDA8_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/config/nvcc_wrapper $CUDA_WARNING_FLAGS" ) fi - elif [ "$MACHINE" = "white" ]; then - source /etc/profile.d/modules.sh - SKIP_HWLOC=True - export SLURM_TASKS_PER_NODE=32 + source /etc/profile.d/modules.sh + SKIP_HWLOC=True + export SLURM_TASKS_PER_NODE=32 - BASE_MODULE_LIST="/" - IBM_MODULE_LIST="/xl/" - CUDA_MODULE_LIST="/,gcc/5.4.0" + BASE_MODULE_LIST="/" + IBM_MODULE_LIST="/xl/" + CUDA_MODULE_LIST="/,gcc/5.4.0" - # Don't do pthread on white - GCC_BUILD_LIST="OpenMP,Serial,OpenMP_Serial" + # Don't do pthread on white. + GCC_BUILD_LIST="OpenMP,Serial,OpenMP_Serial" - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/5.4.0 $BASE_MODULE_LIST $IBM_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "ibm/13.1.3 $IBM_MODULE_LIST $IBM_BUILD_LIST xlC $IBM_WARNING_FLAGS" - "cuda/8.0.44 $CUDA_MODULE_LIST $CUDA_IBM_BUILD_LIST ${KOKKOS_PATH}/config/nvcc_wrapper $CUDA_WARNING_FLAGS" - ) - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=Power8,Kepler37" - fi - NUM_JOBS_TO_RUN_IN_PARALLEL=2 + # Format: (compiler module-list build-list exe-name warning-flag) + COMPILERS=("gcc/5.4.0 $BASE_MODULE_LIST $IBM_BUILD_LIST g++ $GCC_WARNING_FLAGS" + "ibm/13.1.3 $IBM_MODULE_LIST $IBM_BUILD_LIST xlC $IBM_WARNING_FLAGS" + "cuda/8.0.44 $CUDA_MODULE_LIST $CUDA_IBM_BUILD_LIST ${KOKKOS_PATH}/config/nvcc_wrapper $CUDA_WARNING_FLAGS" + ) + + if [ -z "$ARCH_FLAG" ]; then + ARCH_FLAG="--arch=Power8,Kepler37" + fi + + NUM_JOBS_TO_RUN_IN_PARALLEL=2 elif [ "$MACHINE" = "bowman" ]; then - source /etc/profile.d/modules.sh - SKIP_HWLOC=True - export SLURM_TASKS_PER_NODE=32 + source /etc/profile.d/modules.sh + SKIP_HWLOC=True + export SLURM_TASKS_PER_NODE=32 - BASE_MODULE_LIST="/compilers/" + BASE_MODULE_LIST="/compilers/" - OLD_INTEL_BUILD_LIST="Pthread,Serial,Pthread_Serial" + OLD_INTEL_BUILD_LIST="Pthread,Serial,Pthread_Serial" - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("intel/16.2.181 $BASE_MODULE_LIST $OLD_INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/17.0.098 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - ) + # Format: (compiler module-list build-list exe-name warning-flag) + COMPILERS=("intel/16.2.181 $BASE_MODULE_LIST $OLD_INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" + "intel/17.0.098 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" + ) - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=KNL" - fi + if [ -z "$ARCH_FLAG" ]; then + ARCH_FLAG="--arch=KNL" + fi - NUM_JOBS_TO_RUN_IN_PARALLEL=2 + NUM_JOBS_TO_RUN_IN_PARALLEL=2 elif [ "$MACHINE" = "sullivan" ]; then - source /etc/profile.d/modules.sh - SKIP_HWLOC=True - export SLURM_TASKS_PER_NODE=96 + source /etc/profile.d/modules.sh + SKIP_HWLOC=True + export SLURM_TASKS_PER_NODE=96 - BASE_MODULE_LIST="/" + BASE_MODULE_LIST="/" - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/5.3.0 $BASE_MODULE_LIST $ARM_GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS") + # Format: (compiler module-list build-list exe-name warning-flag) + COMPILERS=("gcc/5.3.0 $BASE_MODULE_LIST $ARM_GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS") - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=ARMv8-ThunderX" - fi + if [ -z "$ARCH_FLAG" ]; then + ARCH_FLAG="--arch=ARMv8-ThunderX" + fi - NUM_JOBS_TO_RUN_IN_PARALLEL=2 + NUM_JOBS_TO_RUN_IN_PARALLEL=2 elif [ "$MACHINE" = "shepard" ]; then - source /etc/profile.d/modules.sh - SKIP_HWLOC=True - export SLURM_TASKS_PER_NODE=32 + source /etc/profile.d/modules.sh + SKIP_HWLOC=True + export SLURM_TASKS_PER_NODE=32 - BASE_MODULE_LIST="/compilers/" + BASE_MODULE_LIST="/compilers/" - OLD_INTEL_BUILD_LIST="Pthread,Serial,Pthread_Serial" + OLD_INTEL_BUILD_LIST="Pthread,Serial,Pthread_Serial" - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("intel/16.2.181 $BASE_MODULE_LIST $OLD_INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/17.0.098 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - ) + # Format: (compiler module-list build-list exe-name warning-flag) + COMPILERS=("intel/16.2.181 $BASE_MODULE_LIST $OLD_INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" + "intel/17.0.098 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" + ) - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=HSW" - fi - NUM_JOBS_TO_RUN_IN_PARALLEL=2 + if [ -z "$ARCH_FLAG" ]; then + ARCH_FLAG="--arch=HSW" + fi + NUM_JOBS_TO_RUN_IN_PARALLEL=2 elif [ "$MACHINE" = "apollo" ]; then - source /projects/sems/modulefiles/utils/sems-modules-init.sh - module use /home/projects/modulefiles/local/x86-64 - module load kokkos-env + source /projects/sems/modulefiles/utils/sems-modules-init.sh + module use /home/projects/modulefiles/local/x86-64 + module load kokkos-env - module load sems-git - module load sems-tex - module load sems-cmake/3.5.2 - module load sems-gdb + module load sems-git + module load sems-tex + module load sems-cmake/3.5.2 + module load sems-gdb - SKIP_HWLOC=True + SKIP_HWLOC=True - BASE_MODULE_LIST="sems-env,kokkos-env,sems-/,kokkos-hwloc/1.10.1/base" - CUDA_MODULE_LIST="sems-env,kokkos-env,kokkos-/,sems-gcc/4.8.4,kokkos-hwloc/1.10.1/base" - CUDA8_MODULE_LIST="sems-env,kokkos-env,kokkos-/,sems-gcc/5.3.0,kokkos-hwloc/1.10.1/base" + BASE_MODULE_LIST="sems-env,kokkos-env,sems-/,kokkos-hwloc/1.10.1/base" + CUDA_MODULE_LIST="sems-env,kokkos-env,kokkos-/,sems-gcc/4.8.4,kokkos-hwloc/1.10.1/base" + CUDA8_MODULE_LIST="sems-env,kokkos-env,kokkos-/,sems-gcc/5.3.0,kokkos-hwloc/1.10.1/base" - CLANG_MODULE_LIST="sems-env,kokkos-env,sems-git,sems-cmake/3.5.2,/,cuda/8.0.44" - NVCC_MODULE_LIST="sems-env,kokkos-env,sems-git,sems-cmake/3.5.2,/,sems-gcc/5.3.0" + CLANG_MODULE_LIST="sems-env,kokkos-env,sems-git,sems-cmake/3.5.2,/,cuda/8.0.44" + NVCC_MODULE_LIST="sems-env,kokkos-env,sems-git,sems-cmake/3.5.2,/,sems-gcc/5.3.0" - BUILD_LIST_CUDA_NVCC="Cuda_Serial,Cuda_OpenMP" - BUILD_LIST_CUDA_CLANG="Cuda_Serial,Cuda_Pthread" - BUILD_LIST_CLANG="Serial,Pthread,OpenMP" + BUILD_LIST_CUDA_NVCC="Cuda_Serial,Cuda_OpenMP" + BUILD_LIST_CUDA_CLANG="Cuda_Serial,Cuda_Pthread" + BUILD_LIST_CLANG="Serial,Pthread,OpenMP" if [ "$SPOT_CHECK" = "True" ]; then # Format: (compiler module-list build-list exe-name warning-flag) @@ -297,16 +300,16 @@ elif [ "$MACHINE" = "apollo" ]; then ) fi - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=SNB,Kepler35" - fi - NUM_JOBS_TO_RUN_IN_PARALLEL=2 -else - echo "Unhandled machine $MACHINE" >&2 - exit 1 -fi + if [ -z "$ARCH_FLAG" ]; then + ARCH_FLAG="--arch=SNB,Kepler35" + fi + NUM_JOBS_TO_RUN_IN_PARALLEL=2 +else + echo "Unhandled machine $MACHINE" >&2 + exit 1 +fi export OMP_NUM_THREADS=4 @@ -315,119 +318,149 @@ declare -i NUM_RESULTS_TO_KEEP=7 RESULT_ROOT_PREFIX=TestAll if [ "$PRINT_HELP" = "True" ]; then -echo "test_all_sandia :" -echo "--kokkos-path=/Path/To/Kokkos: Path to the Kokkos root directory" -echo " Defaults to root repo containing this script" -echo "--debug: Run tests in debug. Defaults to False" -echo "--test-script: Test this script, not Kokkos" -echo "--skip-hwloc: Do not do hwloc tests" -echo "--num=N: Number of jobs to run in parallel" -echo "--spot-check: Minimal test set to issue pull request" -echo "--dry-run: Just print what would be executed" -echo "--build-only: Just do builds, don't run anything" -echo "--opt-flag=FLAG: Optimization flag (default: -O3)" -echo "--arch=ARCHITECTURE: overwrite architecture flags" -echo "--with-cuda-options=OPT: set KOKKOS_CUDA_OPTIONS" -echo "--build-list=BUILD,BUILD,BUILD..." -echo " Provide a comma-separated list of builds instead of running all builds" -echo " Valid items:" -echo " OpenMP, Pthread, Serial, OpenMP_Serial, Pthread_Serial" -echo " Cuda_OpenMP, Cuda_Pthread, Cuda_Serial" -echo "" - -echo "ARGS: list of expressions matching compilers to test" -echo " supported compilers sems" -for COMPILER_DATA in "${COMPILERS[@]}"; do + echo "test_all_sandia :" + echo "--kokkos-path=/Path/To/Kokkos: Path to the Kokkos root directory" + echo " Defaults to root repo containing this script" + echo "--debug: Run tests in debug. Defaults to False" + echo "--test-script: Test this script, not Kokkos" + echo "--skip-hwloc: Do not do hwloc tests" + echo "--num=N: Number of jobs to run in parallel" + echo "--spot-check: Minimal test set to issue pull request" + echo "--dry-run: Just print what would be executed" + echo "--build-only: Just do builds, don't run anything" + echo "--opt-flag=FLAG: Optimization flag (default: -O3)" + echo "--arch=ARCHITECTURE: overwrite architecture flags" + echo "--with-cuda-options=OPT: set KOKKOS_CUDA_OPTIONS" + echo "--build-list=BUILD,BUILD,BUILD..." + echo " Provide a comma-separated list of builds instead of running all builds" + echo " Valid items:" + echo " OpenMP, Pthread, Qthreads, Serial, OpenMP_Serial, Pthread_Serial" + echo " Qthreads_Serial, Cuda_OpenMP, Cuda_Pthread, Cuda_Serial" + echo "" + + echo "ARGS: list of expressions matching compilers to test" + echo " supported compilers sems" + for COMPILER_DATA in "${COMPILERS[@]}"; do ARR=($COMPILER_DATA) COMPILER=${ARR[0]} echo " $COMPILER" -done -echo "" - -echo "Examples:" -echo " Run all tests" -echo " % test_all_sandia" -echo "" -echo " Run all gcc tests" -echo " % test_all_sandia gcc" -echo "" -echo " Run all gcc/4.7.2 and all intel tests" -echo " % test_all_sandia gcc/4.7.2 intel" -echo "" -echo " Run all tests in debug" -echo " % test_all_sandia --debug" -echo "" -echo " Run gcc/4.7.2 and only do OpenMP and OpenMP_Serial builds" -echo " % test_all_sandia gcc/4.7.2 --build-list=OpenMP,OpenMP_Serial" -echo "" -echo "If you want to kill the tests, do:" -echo " hit ctrl-z" -echo " % kill -9 %1" -echo -exit 0 + done + echo "" + + echo "Examples:" + echo " Run all tests" + echo " % test_all_sandia" + echo "" + echo " Run all gcc tests" + echo " % test_all_sandia gcc" + echo "" + echo " Run all gcc/4.7.2 and all intel tests" + echo " % test_all_sandia gcc/4.7.2 intel" + echo "" + echo " Run all tests in debug" + echo " % test_all_sandia --debug" + echo "" + echo " Run gcc/4.7.2 and only do OpenMP and OpenMP_Serial builds" + echo " % test_all_sandia gcc/4.7.2 --build-list=OpenMP,OpenMP_Serial" + echo "" + echo "If you want to kill the tests, do:" + echo " hit ctrl-z" + echo " % kill -9 %1" + echo + exit 0 fi -# set build type +# Set build type. if [ "$DEBUG" = "True" ]; then - BUILD_TYPE=debug + BUILD_TYPE=debug else - BUILD_TYPE=release + BUILD_TYPE=release fi -# If no args provided, do all compilers +# If no args provided, do all compilers. if [ -z "$ARGS" ]; then - ARGS='?' + ARGS='?' fi -# Process args to figure out which compilers to test +# Process args to figure out which compilers to test. COMPILERS_TO_TEST="" + for ARG in $ARGS; do - for COMPILER_DATA in "${COMPILERS[@]}"; do - ARR=($COMPILER_DATA) - COMPILER=${ARR[0]} - if [[ "$COMPILER" = $ARG* ]]; then - if [[ "$COMPILERS_TO_TEST" != *${COMPILER}* ]]; then - COMPILERS_TO_TEST="$COMPILERS_TO_TEST $COMPILER" - else - echo "Tried to add $COMPILER twice" - fi - fi - done + for COMPILER_DATA in "${COMPILERS[@]}"; do + ARR=($COMPILER_DATA) + COMPILER=${ARR[0]} + + if [[ "$COMPILER" = $ARG* ]]; then + if [[ "$COMPILERS_TO_TEST" != *${COMPILER}* ]]; then + COMPILERS_TO_TEST="$COMPILERS_TO_TEST $COMPILER" + else + echo "Tried to add $COMPILER twice" + fi + fi + done done +# Check if Qthreads build requested. +HAVE_QTHREADS_BUILD="False" +if [ -n "$CUSTOM_BUILD_LIST" ]; then + if [[ "$CUSTOM_BUILD_LIST" = *Qthreads* ]]; then + HAVE_QTHREADS_BUILD="True" + fi +else + for COMPILER_DATA in "${COMPILERS[@]}"; do + ARR=($COMPILER_DATA) + BUILD_LIST=${ARR[2]} + if [[ "$BUILD_LIST" = *Qthreads* ]]; then + HAVE_QTHREADS_BUILD="True" + fi + done +fi + +# Ensure Qthreads path is set if Qthreads build is requested. +if [ "$HAVE_QTHREADS_BUILD" = "True" ]; then + if [ -z "$QTHREADS_PATH" ]; then + echo "Need to supply Qthreads path (--qthreads-path) when testing Qthreads backend." >&2 + exit 1 + else + # Strip trailing slashes from path. + QTHREADS_PATH=$(echo $QTHREADS_PATH | sed 's/\/*$//') + fi +fi + # -# Functions +# Functions. # # get_compiler_name get_compiler_name() { - echo $1 | cut -d/ -f1 + echo $1 | cut -d/ -f1 } # get_compiler_version get_compiler_version() { - echo $1 | cut -d/ -f2 + echo $1 | cut -d/ -f2 } -# Do not call directly +# Do not call directly. get_compiler_data() { - local compiler=$1 - local item=$2 - local compiler_name=$(get_compiler_name $compiler) - local compiler_vers=$(get_compiler_version $compiler) - - local compiler_data - for compiler_data in "${COMPILERS[@]}" ; do - local arr=($compiler_data) - if [ "$compiler" = "${arr[0]}" ]; then - echo "${arr[$item]}" | tr , ' ' | sed -e "s//$compiler_name/g" -e "s//$compiler_vers/g" - return 0 - fi - done - - # Not found - echo "Unreconized compiler $compiler" >&2 - exit 1 + local compiler=$1 + local item=$2 + local compiler_name=$(get_compiler_name $compiler) + local compiler_vers=$(get_compiler_version $compiler) + + local compiler_data + for compiler_data in "${COMPILERS[@]}" ; do + local arr=($compiler_data) + + if [ "$compiler" = "${arr[0]}" ]; then + echo "${arr[$item]}" | tr , ' ' | sed -e "s//$compiler_name/g" -e "s//$compiler_vers/g" + return 0 + fi + done + + # Not found. + echo "Unreconized compiler $compiler" >&2 + exit 1 } # @@ -435,227 +468,232 @@ get_compiler_data() { # get_compiler_modules() { - get_compiler_data $1 1 + get_compiler_data $1 1 } get_compiler_build_list() { - get_compiler_data $1 2 + get_compiler_data $1 2 } get_compiler_exe_name() { - get_compiler_data $1 3 + get_compiler_data $1 3 } get_compiler_warning_flags() { - get_compiler_data $1 4 + get_compiler_data $1 4 } run_cmd() { - echo "RUNNING: $*" - if [ "$DRYRUN" != "True" ]; then - eval "$* 2>&1" - fi + echo "RUNNING: $*" + if [ "$DRYRUN" != "True" ]; then + eval "$* 2>&1" + fi } # report_and_log_test_results report_and_log_test_result() { - # Use sane var names - local success=$1; local desc=$2; local comment=$3; + # Use sane var names. + local success=$1; local desc=$2; local comment=$3; - if [ "$success" = "0" ]; then - echo " PASSED $desc" - echo $comment > $PASSED_DIR/$desc - else - # For failures, comment should be the name of the phase that failed - echo " FAILED $desc" >&2 - echo $comment > $FAILED_DIR/$desc - cat ${desc}.${comment}.log - fi + if [ "$success" = "0" ]; then + echo " PASSED $desc" + echo $comment > $PASSED_DIR/$desc + else + # For failures, comment should be the name of the phase that failed. + echo " FAILED $desc" >&2 + echo $comment > $FAILED_DIR/$desc + cat ${desc}.${comment}.log + fi } setup_env() { - local compiler=$1 - local compiler_modules=$(get_compiler_modules $compiler) - - module purge - - local mod - for mod in $compiler_modules; do - echo "Loading module $mod" - module load $mod 2>&1 - # It is ridiculously hard to check for the success of a loaded - # module. Module does not return error codes and piping to grep - # causes module to run in a subshell. - module list 2>&1 | grep "$mod" >& /dev/null || return 1 - done - - return 0 + local compiler=$1 + local compiler_modules=$(get_compiler_modules $compiler) + + module purge + + local mod + for mod in $compiler_modules; do + echo "Loading module $mod" + module load $mod 2>&1 + # It is ridiculously hard to check for the success of a loaded + # module. Module does not return error codes and piping to grep + # causes module to run in a subshell. + module list 2>&1 | grep "$mod" >& /dev/null || return 1 + done + + return 0 } # single_build_and_test single_build_and_test() { - # Use sane var names - local compiler=$1; local build=$2; local build_type=$3; + # Use sane var names. + local compiler=$1; local build=$2; local build_type=$3; + + # Set up env. + mkdir -p $ROOT_DIR/$compiler/"${build}-$build_type" + cd $ROOT_DIR/$compiler/"${build}-$build_type" + local desc=$(echo "${compiler}-${build}-${build_type}" | sed 's:/:-:g') + setup_env $compiler >& ${desc}.configure.log || { report_and_log_test_result 1 ${desc} configure && return 0; } - # set up env - mkdir -p $ROOT_DIR/$compiler/"${build}-$build_type" - cd $ROOT_DIR/$compiler/"${build}-$build_type" - local desc=$(echo "${compiler}-${build}-${build_type}" | sed 's:/:-:g') - setup_env $compiler >& ${desc}.configure.log || { report_and_log_test_result 1 ${desc} configure && return 0; } + # Set up flags. + local compiler_warning_flags=$(get_compiler_warning_flags $compiler) + local compiler_exe=$(get_compiler_exe_name $compiler) - # Set up flags - local compiler_warning_flags=$(get_compiler_warning_flags $compiler) - local compiler_exe=$(get_compiler_exe_name $compiler) + if [[ "$build_type" = hwloc* ]]; then + local extra_args=--with-hwloc=$(dirname $(dirname $(which hwloc-info))) + fi + if [[ "$build" = *Qthreads* ]]; then if [[ "$build_type" = hwloc* ]]; then - local extra_args=--with-hwloc=$(dirname $(dirname $(which hwloc-info))) + local extra_args="$extra_args --qthreads-path=${QTHREADS_PATH}_hwloc" + else + local extra_args="$extra_args --qthreads-path=$QTHREADS_PATH" fi + fi - if [[ "$OPT_FLAG" = "" ]]; then - OPT_FLAG="-O3" - fi + if [[ "$OPT_FLAG" = "" ]]; then + OPT_FLAG="-O3" + fi - if [[ "$build_type" = *debug* ]]; then - local extra_args="$extra_args --debug" - local cxxflags="-g $compiler_warning_flags" - else - local cxxflags="$OPT_FLAG $compiler_warning_flags" - fi + if [[ "$build_type" = *debug* ]]; then + local extra_args="$extra_args --debug" + local cxxflags="-g $compiler_warning_flags" + else + local cxxflags="$OPT_FLAG $compiler_warning_flags" + fi - if [[ "$compiler" == cuda* ]]; then - cxxflags="--keep --keep-dir=$(pwd) $cxxflags" - export TMPDIR=$(pwd) - fi + if [[ "$KOKKOS_CUDA_OPTIONS" != "" ]]; then + local extra_args="$extra_args $KOKKOS_CUDA_OPTIONS" + fi - if [[ "$KOKKOS_CUDA_OPTIONS" != "" ]]; then - local extra_args="$extra_args $KOKKOS_CUDA_OPTIONS" - fi + echo " Starting job $desc" - echo " Starting job $desc" + local comment="no_comment" - local comment="no_comment" + if [ "$TEST_SCRIPT" = "True" ]; then + local rand=$[ 1 + $[ RANDOM % 10 ]] + sleep $rand - if [ "$TEST_SCRIPT" = "True" ]; then - local rand=$[ 1 + $[ RANDOM % 10 ]] - sleep $rand - if [ $rand -gt 5 ]; then - run_cmd ls fake_problem >& ${desc}.configure.log || { report_and_log_test_result 1 $desc configure && return 0; } - fi - else - run_cmd ${KOKKOS_PATH}/generate_makefile.bash --with-devices=$build $ARCH_FLAG --compiler=$(which $compiler_exe) --cxxflags=\"$cxxflags\" $extra_args &>> ${desc}.configure.log || { report_and_log_test_result 1 ${desc} configure && return 0; } - local -i build_start_time=$(date +%s) - run_cmd make build-test >& ${desc}.build.log || { report_and_log_test_result 1 ${desc} build && return 0; } - local -i build_end_time=$(date +%s) - comment="build_time=$(($build_end_time-$build_start_time))" - if [[ "$BUILD_ONLY" == False ]]; then - run_cmd make test >& ${desc}.test.log || { report_and_log_test_result 1 ${desc} test && return 0; } - local -i run_end_time=$(date +%s) - comment="$comment run_time=$(($run_end_time-$build_end_time))" - fi + if [ $rand -gt 5 ]; then + run_cmd ls fake_problem >& ${desc}.configure.log || { report_and_log_test_result 1 $desc configure && return 0; } fi + else + run_cmd ${KOKKOS_PATH}/generate_makefile.bash --with-devices=$build $ARCH_FLAG --compiler=$(which $compiler_exe) --cxxflags=\"$cxxflags\" $extra_args &>> ${desc}.configure.log || { report_and_log_test_result 1 ${desc} configure && return 0; } + local -i build_start_time=$(date +%s) + run_cmd make build-test >& ${desc}.build.log || { report_and_log_test_result 1 ${desc} build && return 0; } + local -i build_end_time=$(date +%s) + comment="build_time=$(($build_end_time-$build_start_time))" + + if [[ "$BUILD_ONLY" == False ]]; then + run_cmd make test >& ${desc}.test.log || { report_and_log_test_result 1 ${desc} test && return 0; } + local -i run_end_time=$(date +%s) + comment="$comment run_time=$(($run_end_time-$build_end_time))" + fi + fi - report_and_log_test_result 0 $desc "$comment" + report_and_log_test_result 0 $desc "$comment" - return 0 + return 0 } # wait_for_jobs wait_for_jobs() { - local -i max_jobs=$1 - local -i num_active_jobs=$(jobs | wc -l) - while [ $num_active_jobs -ge $max_jobs ] - do - sleep 1 - num_active_jobs=$(jobs | wc -l) - jobs >& /dev/null - done + local -i max_jobs=$1 + local -i num_active_jobs=$(jobs | wc -l) + while [ $num_active_jobs -ge $max_jobs ] + do + sleep 1 + num_active_jobs=$(jobs | wc -l) + jobs >& /dev/null + done } # run_in_background run_in_background() { - local compiler=$1 - - local -i num_jobs=$NUM_JOBS_TO_RUN_IN_PARALLEL - # don't override command line input - # if [[ "$BUILD_ONLY" == True ]]; then - # num_jobs=8 - # else - if [[ "$compiler" == cuda* ]]; then - num_jobs=1 - fi - # fi - wait_for_jobs $num_jobs - - single_build_and_test $* & + local compiler=$1 + + local -i num_jobs=$NUM_JOBS_TO_RUN_IN_PARALLEL + # Don't override command line input. + # if [[ "$BUILD_ONLY" == True ]]; then + # num_jobs=8 + # else + if [[ "$compiler" == cuda* ]]; then + num_jobs=1 + fi + # fi + wait_for_jobs $num_jobs + + single_build_and_test $* & } # build_and_test_all build_and_test_all() { - # Get compiler data - local compiler=$1 - if [ -z "$CUSTOM_BUILD_LIST" ]; then - local compiler_build_list=$(get_compiler_build_list $compiler) - else - local compiler_build_list=$(echo "$CUSTOM_BUILD_LIST" | tr , ' ') - fi + # Get compiler data. + local compiler=$1 + if [ -z "$CUSTOM_BUILD_LIST" ]; then + local compiler_build_list=$(get_compiler_build_list $compiler) + else + local compiler_build_list=$(echo "$CUSTOM_BUILD_LIST" | tr , ' ') + fi - # do builds - local build - for build in $compiler_build_list - do - run_in_background $compiler $build $BUILD_TYPE + # Do builds. + local build + for build in $compiler_build_list + do + run_in_background $compiler $build $BUILD_TYPE - # If not cuda, do a hwloc test too - if [[ "$compiler" != cuda* && "$SKIP_HWLOC" == False ]]; then - run_in_background $compiler $build "hwloc-$BUILD_TYPE" - fi - done + # If not cuda, do a hwloc test too. + if [[ "$compiler" != cuda* && "$SKIP_HWLOC" == False ]]; then + run_in_background $compiler $build "hwloc-$BUILD_TYPE" + fi + done - return 0 + return 0 } get_test_root_dir() { - local existing_results=$(find . -maxdepth 1 -name "$RESULT_ROOT_PREFIX*" | sort) - local -i num_existing_results=$(echo $existing_results | tr ' ' '\n' | wc -l) - local -i num_to_delete=${num_existing_results}-${NUM_RESULTS_TO_KEEP} + local existing_results=$(find . -maxdepth 1 -name "$RESULT_ROOT_PREFIX*" | sort) + local -i num_existing_results=$(echo $existing_results | tr ' ' '\n' | wc -l) + local -i num_to_delete=${num_existing_results}-${NUM_RESULTS_TO_KEEP} - if [ $num_to_delete -gt 0 ]; then - /bin/rm -rf $(echo $existing_results | tr ' ' '\n' | head -n $num_to_delete) - fi + if [ $num_to_delete -gt 0 ]; then + /bin/rm -rf $(echo $existing_results | tr ' ' '\n' | head -n $num_to_delete) + fi - echo $(pwd)/${RESULT_ROOT_PREFIX}_$(date +"%Y-%m-%d_%H.%M.%S") + echo $(pwd)/${RESULT_ROOT_PREFIX}_$(date +"%Y-%m-%d_%H.%M.%S") } wait_summarize_and_exit() { - wait_for_jobs 1 - - echo "#######################################################" - echo "PASSED TESTS" - echo "#######################################################" - - local passed_test - for passed_test in $(\ls -1 $PASSED_DIR | sort) - do - echo $passed_test $(cat $PASSED_DIR/$passed_test) - done - - echo "#######################################################" - echo "FAILED TESTS" - echo "#######################################################" - - local failed_test - local -i rv=0 - for failed_test in $(\ls -1 $FAILED_DIR | sort) - do - echo $failed_test "("$(cat $FAILED_DIR/$failed_test)" failed)" - rv=$rv+1 - done - - exit $rv + wait_for_jobs 1 + + echo "#######################################################" + echo "PASSED TESTS" + echo "#######################################################" + + local passed_test + for passed_test in $(\ls -1 $PASSED_DIR | sort) + do + echo $passed_test $(cat $PASSED_DIR/$passed_test) + done + + echo "#######################################################" + echo "FAILED TESTS" + echo "#######################################################" + + local failed_test + local -i rv=0 + for failed_test in $(\ls -1 $FAILED_DIR | sort) + do + echo $failed_test "("$(cat $FAILED_DIR/$failed_test)" failed)" + rv=$rv+1 + done + + exit $rv } # -# Main +# Main. # ROOT_DIR=$(get_test_root_dir) @@ -669,8 +707,8 @@ mkdir -p $FAILED_DIR echo "Going to test compilers: " $COMPILERS_TO_TEST for COMPILER in $COMPILERS_TO_TEST; do - echo "Testing compiler $COMPILER" - build_and_test_all $COMPILER + echo "Testing compiler $COMPILER" + build_and_test_all $COMPILER done wait_summarize_and_exit diff --git a/lib/kokkos/containers/src/Kokkos_DynamicView.hpp b/lib/kokkos/containers/src/Kokkos_DynamicView.hpp index 3277c007d0..53e0eab693 100644 --- a/lib/kokkos/containers/src/Kokkos_DynamicView.hpp +++ b/lib/kokkos/containers/src/Kokkos_DynamicView.hpp @@ -60,7 +60,7 @@ class DynamicView : public Kokkos::ViewTraits< DataType , P ... > { public: - typedef ViewTraits< DataType , P ... > traits ; + typedef Kokkos::ViewTraits< DataType , P ... > traits ; private: @@ -123,30 +123,41 @@ public: enum { Rank = 1 }; - KOKKOS_INLINE_FUNCTION constexpr size_t size() const + KOKKOS_INLINE_FUNCTION + size_t size() const noexcept { - return - Kokkos::Impl::MemorySpaceAccess - < Kokkos::Impl::ActiveExecutionMemorySpace - , typename traits::memory_space - >::accessible - ? // Runtime size is at the end of the chunk pointer array - (*reinterpret_cast( m_chunks + m_chunk_max )) - << m_chunk_shift - : 0 ; + uintptr_t n = 0 ; + + if ( Kokkos::Impl::MemorySpaceAccess + < Kokkos::Impl::ActiveExecutionMemorySpace + , typename traits::memory_space + >::accessible ) { + n = *reinterpret_cast( m_chunks + m_chunk_max ); + } +#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + else { + Kokkos::Impl::DeepCopy< Kokkos::HostSpace + , typename traits::memory_space + , Kokkos::HostSpace::execution_space > + ( & n + , reinterpret_cast( m_chunks + m_chunk_max ) + , sizeof(uintptr_t) ); + } +#endif + return n << m_chunk_shift ; } template< typename iType > - KOKKOS_INLINE_FUNCTION constexpr + KOKKOS_INLINE_FUNCTION size_t extent( const iType & r ) const { return r == 0 ? size() : 1 ; } template< typename iType > - KOKKOS_INLINE_FUNCTION constexpr + KOKKOS_INLINE_FUNCTION size_t extent_int( const iType & r ) const { return r == 0 ? size() : 1 ; } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_0() const { return size(); } + KOKKOS_INLINE_FUNCTION size_t dimension_0() const { return size(); } KOKKOS_INLINE_FUNCTION constexpr size_t dimension_1() const { return 1 ; } KOKKOS_INLINE_FUNCTION constexpr size_t dimension_2() const { return 1 ; } KOKKOS_INLINE_FUNCTION constexpr size_t dimension_3() const { return 1 ; } @@ -270,10 +281,18 @@ public: } /** \brief Resizing in serial can grow or shrink the array size, */ + template< typename IntType > inline - void resize_serial( size_t n ) + typename std::enable_if + < std::is_integral::value && + Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace + , typename traits::memory_space + >::accessible + >::type + resize_serial( IntType const & n ) { - DynamicView::template verify_space< Kokkos::Impl::ActiveExecutionMemorySpace >::check(); + typedef typename traits::value_type value_type ; + typedef value_type * pointer_type ; const uintptr_t NC = ( n + m_chunk_mask ) >> m_chunk_shift ; @@ -286,8 +305,8 @@ public: if ( *pc < NC ) { while ( *pc < NC ) { - m_chunks[*pc] = - m_pool.allocate( sizeof(traits::value_type) << m_chunk_shift ); + m_chunks[*pc] = reinterpret_cast + ( m_pool.allocate( sizeof(value_type) << m_chunk_shift ) ); ++*pc ; } } @@ -295,12 +314,90 @@ public: while ( NC + 1 <= *pc ) { --*pc ; m_pool.deallocate( m_chunks[*pc] - , sizeof(traits::value_type) << m_chunk_shift ); + , sizeof(value_type) << m_chunk_shift ); m_chunks[*pc] = 0 ; } } } + //---------------------------------------- + + struct ResizeSerial { + memory_pool m_pool ; + typename traits::value_type ** m_chunks ; + uintptr_t * m_pc ; + uintptr_t m_nc ; + unsigned m_chunk_shift ; + + KOKKOS_INLINE_FUNCTION + void operator()( int ) const + { + typedef typename traits::value_type value_type ; + typedef value_type * pointer_type ; + + if ( *m_pc < m_nc ) { + while ( *m_pc < m_nc ) { + m_chunks[*m_pc] = reinterpret_cast + ( m_pool.allocate( sizeof(value_type) << m_chunk_shift ) ); + ++*m_pc ; + } + } + else { + while ( m_nc + 1 <= *m_pc ) { + --*m_pc ; + m_pool.deallocate( m_chunks[*m_pc] + , sizeof(value_type) << m_chunk_shift ); + m_chunks[*m_pc] = 0 ; + } + } + } + + ResizeSerial( memory_pool const & arg_pool + , typename traits::value_type ** arg_chunks + , uintptr_t * arg_pc + , uintptr_t arg_nc + , unsigned arg_chunk_shift + ) + : m_pool( arg_pool ) + , m_chunks( arg_chunks ) + , m_pc( arg_pc ) + , m_nc( arg_nc ) + , m_chunk_shift( arg_chunk_shift ) + {} + }; + + template< typename IntType > + inline + typename std::enable_if + < std::is_integral::value && + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace + , typename traits::memory_space + >::accessible + >::type + resize_serial( IntType const & n ) + { + const uintptr_t NC = ( n + m_chunk_mask ) >> m_chunk_shift ; + + if ( m_chunk_max < NC ) { + Kokkos::abort("DynamicView::resize_serial exceeded maximum size"); + } + + // Must dispatch kernel + + typedef Kokkos::RangePolicy< typename traits::execution_space > Range ; + + uintptr_t * const pc = + reinterpret_cast( m_chunks + m_chunk_max ); + + Kokkos::Impl::ParallelFor + closure( ResizeSerial( m_pool, m_chunks, pc, NC, m_chunk_shift ) + , Range(0,1) ); + + closure.execute(); + + traits::execution_space::fence(); + } + //---------------------------------------------------------------------- ~DynamicView() = default ; @@ -311,15 +408,17 @@ public: DynamicView & operator = ( const DynamicView & ) = default ; template< class RT , class ... RP > - KOKKOS_INLINE_FUNCTION DynamicView( const DynamicView & rhs ) : m_pool( rhs.m_pool ) , m_track( rhs.m_track ) - , m_chunks( rhs.m_chunks ) + , m_chunks( (typename traits::value_type **) rhs.m_chunks ) , m_chunk_shift( rhs.m_chunk_shift ) , m_chunk_mask( rhs.m_chunk_mask ) , m_chunk_max( rhs.m_chunk_max ) { + typedef typename DynamicView::traits SrcTraits ; + typedef Kokkos::Impl::ViewMapping< traits , SrcTraits , void > Mapping ; + static_assert( Mapping::is_assignable , "Incompatible DynamicView copy construction" ); } //---------------------------------------------------------------------- @@ -400,8 +499,6 @@ public: , m_chunk_mask( ( 1 << m_chunk_shift ) - 1 ) , m_chunk_max( ( arg_size_max + m_chunk_mask ) >> m_chunk_shift ) { - DynamicView::template verify_space< Kokkos::Impl::ActiveExecutionMemorySpace >::check(); - // A functor to deallocate all of the chunks upon final destruction typedef typename traits::memory_space memory_space ; diff --git a/lib/kokkos/containers/src/Kokkos_UnorderedMap.hpp b/lib/kokkos/containers/src/Kokkos_UnorderedMap.hpp index 8646d27792..193f1bc334 100644 --- a/lib/kokkos/containers/src/Kokkos_UnorderedMap.hpp +++ b/lib/kokkos/containers/src/Kokkos_UnorderedMap.hpp @@ -230,16 +230,17 @@ public: typedef typename Impl::remove_const::type value_type; typedef typename Impl::add_const::type const_value_type; - typedef Device execution_space; + typedef Device device_type; + typedef typename Device::execution_space execution_space; typedef Hasher hasher_type; typedef EqualTo equal_to_type; typedef uint32_t size_type; //map_types - typedef UnorderedMap declared_map_type; - typedef UnorderedMap insertable_map_type; - typedef UnorderedMap modifiable_map_type; - typedef UnorderedMap const_map_type; + typedef UnorderedMap declared_map_type; + typedef UnorderedMap insertable_map_type; + typedef UnorderedMap modifiable_map_type; + typedef UnorderedMap const_map_type; static const bool is_set = std::is_same::value; static const bool has_const_key = std::is_same::value; @@ -264,18 +265,18 @@ private: typedef typename Impl::if_c< is_set, int, declared_value_type>::type impl_value_type; typedef typename Impl::if_c< is_insertable_map - , View< key_type *, execution_space> - , View< const key_type *, execution_space, MemoryTraits > + , View< key_type *, device_type> + , View< const key_type *, device_type, MemoryTraits > >::type key_type_view; typedef typename Impl::if_c< is_insertable_map || is_modifiable_map - , View< impl_value_type *, execution_space> - , View< const impl_value_type *, execution_space, MemoryTraits > + , View< impl_value_type *, device_type> + , View< const impl_value_type *, device_type, MemoryTraits > >::type value_type_view; typedef typename Impl::if_c< is_insertable_map - , View< size_type *, execution_space> - , View< const size_type *, execution_space, MemoryTraits > + , View< size_type *, device_type> + , View< const size_type *, device_type, MemoryTraits > >::type size_type_view; typedef typename Impl::if_c< is_insertable_map @@ -285,7 +286,7 @@ private: enum { modified_idx = 0, erasable_idx = 1, failed_insert_idx = 2 }; enum { num_scalars = 3 }; - typedef View< int[num_scalars], LayoutLeft, execution_space> scalars_view; + typedef View< int[num_scalars], LayoutLeft, device_type> scalars_view; public: //! \name Public member functions @@ -757,7 +758,7 @@ public: Kokkos::deep_copy(tmp.m_available_indexes, src.m_available_indexes); - typedef Kokkos::Impl::DeepCopy< typename execution_space::memory_space, typename SDevice::memory_space > raw_deep_copy; + typedef Kokkos::Impl::DeepCopy< typename device_type::memory_space, typename SDevice::memory_space > raw_deep_copy; raw_deep_copy(tmp.m_hash_lists.ptr_on_device(), src.m_hash_lists.ptr_on_device(), sizeof(size_type)*src.m_hash_lists.dimension_0()); raw_deep_copy(tmp.m_next_index.ptr_on_device(), src.m_next_index.ptr_on_device(), sizeof(size_type)*src.m_next_index.dimension_0()); @@ -781,21 +782,21 @@ private: // private member functions void set_flag(int flag) const { - typedef Kokkos::Impl::DeepCopy< typename execution_space::memory_space, Kokkos::HostSpace > raw_deep_copy; + typedef Kokkos::Impl::DeepCopy< typename device_type::memory_space, Kokkos::HostSpace > raw_deep_copy; const int true_ = true; raw_deep_copy(m_scalars.ptr_on_device() + flag, &true_, sizeof(int)); } void reset_flag(int flag) const { - typedef Kokkos::Impl::DeepCopy< typename execution_space::memory_space, Kokkos::HostSpace > raw_deep_copy; + typedef Kokkos::Impl::DeepCopy< typename device_type::memory_space, Kokkos::HostSpace > raw_deep_copy; const int false_ = false; raw_deep_copy(m_scalars.ptr_on_device() + flag, &false_, sizeof(int)); } bool get_flag(int flag) const { - typedef Kokkos::Impl::DeepCopy< Kokkos::HostSpace, typename execution_space::memory_space > raw_deep_copy; + typedef Kokkos::Impl::DeepCopy< Kokkos::HostSpace, typename device_type::memory_space > raw_deep_copy; int result = false; raw_deep_copy(&result, m_scalars.ptr_on_device() + flag, sizeof(int)); return result; diff --git a/lib/kokkos/containers/unit_tests/CMakeLists.txt b/lib/kokkos/containers/unit_tests/CMakeLists.txt index b9d860f32f..0c59c616d6 100644 --- a/lib/kokkos/containers/unit_tests/CMakeLists.txt +++ b/lib/kokkos/containers/unit_tests/CMakeLists.txt @@ -3,38 +3,49 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../src ) -SET(SOURCES - UnitTestMain.cpp - TestCuda.cpp - ) - SET(LIBRARIES kokkoscore) IF(Kokkos_ENABLE_Pthread) - LIST( APPEND SOURCES - TestThreads.cpp +TRIBITS_ADD_EXECUTABLE_AND_TEST( + UnitTest_Threads + SOURCES TestThreads.cpp UnitTestMain.cpp + COMM serial mpi + NUM_MPI_PROCS 1 + FAIL_REGULAR_EXPRESSION " FAILED " + TESTONLYLIBS kokkos_gtest ) ENDIF() IF(Kokkos_ENABLE_Serial) - LIST( APPEND SOURCES - TestSerial.cpp +TRIBITS_ADD_EXECUTABLE_AND_TEST( + UnitTest_Serial + SOURCES TestSerial.cpp UnitTestMain.cpp + COMM serial mpi + NUM_MPI_PROCS 1 + FAIL_REGULAR_EXPRESSION " FAILED " + TESTONLYLIBS kokkos_gtest ) ENDIF() IF(Kokkos_ENABLE_OpenMP) - LIST( APPEND SOURCES - TestOpenMP.cpp +TRIBITS_ADD_EXECUTABLE_AND_TEST( + UnitTest_OpenMP + SOURCES TestOpenMP.cpp UnitTestMain.cpp + COMM serial mpi + NUM_MPI_PROCS 1 + FAIL_REGULAR_EXPRESSION " FAILED " + TESTONLYLIBS kokkos_gtest ) ENDIF() - +IF(Kokkos_ENABLE_Cuda) TRIBITS_ADD_EXECUTABLE_AND_TEST( - UnitTest - SOURCES ${SOURCES} + UnitTest_Cuda + SOURCES TestCuda.cpp UnitTestMain.cpp COMM serial mpi NUM_MPI_PROCS 1 FAIL_REGULAR_EXPRESSION " FAILED " TESTONLYLIBS kokkos_gtest ) - +ENDIF() + diff --git a/lib/kokkos/containers/unit_tests/TestDynamicView.hpp b/lib/kokkos/containers/unit_tests/TestDynamicView.hpp index 7e3ca005f4..beb07bd791 100644 --- a/lib/kokkos/containers/unit_tests/TestDynamicView.hpp +++ b/lib/kokkos/containers/unit_tests/TestDynamicView.hpp @@ -64,6 +64,7 @@ struct TestDynamicView typedef Kokkos::Experimental::MemoryPool memory_pool_type; typedef Kokkos::Experimental::DynamicView view_type; + typedef typename view_type::const_type const_view_type ; typedef typename Kokkos::TeamPolicy::member_type member_type ; typedef double value_type; @@ -136,6 +137,8 @@ struct TestDynamicView view_type da("A",pool,arg_total_size); + const_view_type ca(da); + // printf("TestDynamicView::run(%d) construct test functor\n",arg_total_size); TestDynamicView functor(da,arg_total_size); diff --git a/lib/kokkos/core/cmake/Dependencies.cmake b/lib/kokkos/core/cmake/Dependencies.cmake index ae9a20c50e..8d9872725e 100644 --- a/lib/kokkos/core/cmake/Dependencies.cmake +++ b/lib/kokkos/core/cmake/Dependencies.cmake @@ -1,6 +1,6 @@ TRIBITS_PACKAGE_DEFINE_DEPENDENCIES( - LIB_OPTIONAL_TPLS Pthread CUDA HWLOC QTHREAD DLlib + LIB_OPTIONAL_TPLS Pthread CUDA HWLOC QTHREADS DLlib TEST_OPTIONAL_TPLS CUSPARSE ) -TRIBITS_TPL_TENTATIVELY_ENABLE(DLlib) \ No newline at end of file +TRIBITS_TPL_TENTATIVELY_ENABLE(DLlib) diff --git a/lib/kokkos/core/cmake/KokkosCore_config.h.in b/lib/kokkos/core/cmake/KokkosCore_config.h.in index 9359b5a32b..a71e60f207 100644 --- a/lib/kokkos/core/cmake/KokkosCore_config.h.in +++ b/lib/kokkos/core/cmake/KokkosCore_config.h.in @@ -30,7 +30,7 @@ #cmakedefine KOKKOS_HAVE_PTHREAD #cmakedefine KOKKOS_HAVE_SERIAL -#cmakedefine KOKKOS_HAVE_QTHREAD +#cmakedefine KOKKOS_HAVE_QTHREADS #cmakedefine KOKKOS_HAVE_Winthread #cmakedefine KOKKOS_HAVE_OPENMP #cmakedefine KOKKOS_HAVE_HWLOC diff --git a/lib/kokkos/core/perf_test/Makefile b/lib/kokkos/core/perf_test/Makefile index 85f869971a..3a0ad2d4c1 100644 --- a/lib/kokkos/core/perf_test/Makefile +++ b/lib/kokkos/core/perf_test/Makefile @@ -60,4 +60,3 @@ clean: kokkos-clean gtest-all.o:$(GTEST_PATH)/gtest/gtest-all.cc $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $(GTEST_PATH)/gtest/gtest-all.cc - diff --git a/lib/kokkos/core/perf_test/PerfTestCuda.cpp b/lib/kokkos/core/perf_test/PerfTestCuda.cpp index 7386ecef20..65ce61fb53 100644 --- a/lib/kokkos/core/perf_test/PerfTestCuda.cpp +++ b/lib/kokkos/core/perf_test/PerfTestCuda.cpp @@ -52,6 +52,8 @@ #include +#include + #include #include #include @@ -72,6 +74,14 @@ class cuda : public ::testing::Test { } }; +//TEST_F( cuda, mdrange_lr ) { +// EXPECT_NO_THROW( (run_test_mdrange( 5, 8, "Kokkos::Cuda" )) ); +//} + +//TEST_F( cuda, mdrange_ll ) { +// EXPECT_NO_THROW( (run_test_mdrange( 5, 8, "Kokkos::Cuda" )) ); +//} + TEST_F( cuda, hexgrad ) { EXPECT_NO_THROW( run_test_hexgrad< Kokkos::Cuda >( 10 , 20, "Kokkos::Cuda" ) ); diff --git a/lib/kokkos/core/perf_test/PerfTestDriver.hpp b/lib/kokkos/core/perf_test/PerfTestDriver.hpp index 7b6cfc5b5c..4732c3275a 100644 --- a/lib/kokkos/core/perf_test/PerfTestDriver.hpp +++ b/lib/kokkos/core/perf_test/PerfTestDriver.hpp @@ -60,6 +60,342 @@ namespace Test { enum { NUMBER_OF_TRIALS = 5 }; +template< class DeviceType , class LayoutType > +void run_test_mdrange( int exp_beg , int exp_end, const char deviceTypeName[], int range_offset = 0, int tile_offset = 0 ) +// exp_beg = 6 => 2^6 = 64 is starting range length +{ +#define MDRANGE_PERFORMANCE_OUTPUT_VERBOSE 0 + + std::string label_mdrange ; + label_mdrange.append( "\"MDRange< double , " ); + label_mdrange.append( deviceTypeName ); + label_mdrange.append( " >\"" ); + + std::string label_range_col2 ; + label_range_col2.append( "\"RangeColTwo< double , " ); + label_range_col2.append( deviceTypeName ); + label_range_col2.append( " >\"" ); + + std::string label_range_col_all ; + label_range_col_all.append( "\"RangeColAll< double , " ); + label_range_col_all.append( deviceTypeName ); + label_range_col_all.append( " >\"" ); + + if ( std::is_same::value) { + std::cout << "--------------------------------------------------------------\n" + << "Performance tests for MDRange Layout Right" + << "\n--------------------------------------------------------------" << std::endl; + } else { + std::cout << "--------------------------------------------------------------\n" + << "Performance tests for MDRange Layout Left" + << "\n--------------------------------------------------------------" << std::endl; + } + + + for (int i = exp_beg ; i < exp_end ; ++i) { + const int range_length = (1<= min_bnd ) { + int tmid = min_bnd; + while ( tmid < tfast ) { + t0 = min_bnd; + t1 = tmid; + t2 = tfast; + int t2_rev = min_bnd; + int t1_rev = tmid; + int t0_rev = tfast; + +#if defined(KOKKOS_HAVE_CUDA) + //Note: Product of tile sizes must be < 1024 for Cuda + if ( t0*t1*t2 >= 1024 ) { + printf(" Exceeded Cuda tile limits; onto next range set\n\n"); + break; + } +#endif + + // Run 1 with tiles LayoutRight style + double seconds_1 = 0; + { seconds_1 = MultiDimRangePerf3D< DeviceType , double , LayoutType >::test_multi_index(range_length,range_length,range_length, t0, t1, t2) ; } + +#if MDRANGE_PERFORMANCE_OUTPUT_VERBOSE + std::cout << label_mdrange + << " , " << t0 << " , " << t1 << " , " << t2 + << " , " << seconds_1 + << std::endl ; +#endif + + if ( counter == 1 ) { + seconds_min = seconds_1; + t0_min = t0; + t1_min = t1; + t2_min = t2; + } + else { + if ( seconds_1 < seconds_min ) + { + seconds_min = seconds_1; + t0_min = t0; + t1_min = t1; + t2_min = t2; + } + } + + // Run 2 with tiles LayoutLeft style - reverse order of tile dims + double seconds_1rev = 0; + { seconds_1rev = MultiDimRangePerf3D< DeviceType , double , LayoutType >::test_multi_index(range_length,range_length,range_length, t0_rev, t1_rev, t2_rev) ; } + +#if MDRANGE_PERFORMANCE_OUTPUT_VERBOSE + std::cout << label_mdrange + << " , " << t0_rev << " , " << t1_rev << " , " << t2_rev + << " , " << seconds_1rev + << std::endl ; +#endif + + if ( seconds_1rev < seconds_min ) + { + seconds_min = seconds_1rev; + t0_min = t0_rev; + t1_min = t1_rev; + t2_min = t2_rev; + } + + ++counter; + tmid <<= 1; + } //end inner while + tfast >>=1; + } //end outer while + + std::cout << "\n" + << "--------------------------------------------------------------\n" + << label_mdrange + << "\n Min values " + << "\n Range length per dim (3D): " << range_length + << "\n TileDims: " << t0_min << " , " << t1_min << " , " << t2_min + << "\n Min time: " << seconds_min + << "\n---------------------------------------------------------------" + << std::endl ; + } //end scope + +#if !defined(KOKKOS_HAVE_CUDA) + double seconds_min_c = 0.0; + int t0c_min = 0, t1c_min = 0, t2c_min = 0; + int counter = 1; + { + int min_bnd = 8; + // Test 1_c: MDRange with 0 for 'inner' tile dim; this case will utilize the full span in that direction, should be similar to Collapse<2> + if ( std::is_same::value ) { + for ( unsigned int T0 = min_bnd; T0 < static_cast(range_length); T0<<=1 ) { + for ( unsigned int T1 = min_bnd; T1 < static_cast(range_length); T1<<=1 ) { + double seconds_c = 0; + { seconds_c = MultiDimRangePerf3D< DeviceType , double , LayoutType >::test_multi_index(range_length,range_length,range_length, T0, T1, 0) ; } + +#if MDRANGE_PERFORMANCE_OUTPUT_VERBOSE + std::cout << " MDRange LR with '0' tile - collapse-like \n" + << label_mdrange + << " , " << T0 << " , " << T1 << " , " << range_length + << " , " << seconds_c + << std::endl ; +#endif + + t2c_min = range_length; + if ( counter == 1 ) { + seconds_min_c = seconds_c; + t0c_min = T0; + t1c_min = T1; + } + else { + if ( seconds_c < seconds_min_c ) + { + seconds_min_c = seconds_c; + t0c_min = T0; + t1c_min = T1; + } + } + ++counter; + } + } + } + else { + for ( unsigned int T1 = min_bnd; T1 <= static_cast(range_length); T1<<=1 ) { + for ( unsigned int T2 = min_bnd; T2 <= static_cast(range_length); T2<<=1 ) { + double seconds_c = 0; + { seconds_c = MultiDimRangePerf3D< DeviceType , double , LayoutType >::test_multi_index(range_length,range_length,range_length, 0, T1, T2) ; } + +#if MDRANGE_PERFORMANCE_OUTPUT_VERBOSE + std::cout << " MDRange LL with '0' tile - collapse-like \n" + << label_mdrange + << " , " < style: " + << "\n Min values " + << "\n Range length per dim (3D): " << range_length + << "\n TileDims: " << t0c_min << " , " << t1c_min << " , " << t2c_min + << "\n Min time: " << seconds_min_c + << "\n---------------------------------------------------------------" + << std::endl ; + } //end scope test 2 +#endif + + + // Test 2: RangePolicy Collapse2 style + double seconds_2 = 0; + { seconds_2 = RangePolicyCollapseTwo< DeviceType , double , LayoutType >::test_index_collapse_two(range_length,range_length,range_length) ; } + std::cout << label_range_col2 + << " , " << range_length + << " , " << seconds_2 + << std::endl ; + + + // Test 3: RangePolicy Collapse all style - not necessary, always slow + /* + double seconds_3 = 0; + { seconds_3 = RangePolicyCollapseAll< DeviceType , double , LayoutType >::test_collapse_all(range_length,range_length,range_length) ; } + std::cout << label_range_col_all + << " , " << range_length + << " , " << seconds_3 + << "\n---------------------------------------------------------------" + << std::endl ; + */ + + // Compare fastest times... will never be collapse all so ignore it + // seconds_min = tiled MDRange + // seconds_min_c = collapse<2>-like MDRange (tiledim = span for fast dim) - only for non-Cuda, else tile too long + // seconds_2 = collapse<2>-style RangePolicy + // seconds_3 = collapse<3>-style RangePolicy + +#if !defined(KOKKOS_HAVE_CUDA) + if ( seconds_min < seconds_min_c ) { + if ( seconds_min < seconds_2 ) { + std::cout << "--------------------------------------------------------------\n" + << " Fastest run: MDRange tiled\n" + << " Time: " << seconds_min + << " Difference: " << seconds_2 - seconds_min + << " Other times: \n" + << " MDrange collapse-like (tiledim = span on fast dim) type: " << seconds_min_c << "\n" + << " Collapse2 Range Policy: " << seconds_2 << "\n" + << "\n--------------------------------------------------------------" + << "\n--------------------------------------------------------------" + //<< "\n\n" + << std::endl; + } + else if ( seconds_min > seconds_2 ) { + std::cout << " Fastest run: Collapse2 RangePolicy\n" + << " Time: " << seconds_2 + << " Difference: " << seconds_min - seconds_2 + << " Other times: \n" + << " MDrange Tiled: " << seconds_min << "\n" + << " MDrange collapse-like (tiledim = span on fast dim) type: " << seconds_min_c << "\n" + << "\n--------------------------------------------------------------" + << "\n--------------------------------------------------------------" + //<< "\n\n" + << std::endl; + } + } + else if ( seconds_min > seconds_min_c ) { + if ( seconds_min_c < seconds_2 ) { + std::cout << "--------------------------------------------------------------\n" + << " Fastest run: MDRange collapse-like (tiledim = span on fast dim) type\n" + << " Time: " << seconds_min_c + << " Difference: " << seconds_2 - seconds_min_c + << " Other times: \n" + << " MDrange Tiled: " << seconds_min << "\n" + << " Collapse2 Range Policy: " << seconds_2 << "\n" + << "\n--------------------------------------------------------------" + << "\n--------------------------------------------------------------" + //<< "\n\n" + << std::endl; + } + else if ( seconds_min_c > seconds_2 ) { + std::cout << " Fastest run: Collapse2 RangePolicy\n" + << " Time: " << seconds_2 + << " Difference: " << seconds_min_c - seconds_2 + << " Other times: \n" + << " MDrange Tiled: " << seconds_min << "\n" + << " MDrange collapse-like (tiledim = span on fast dim) type: " << seconds_min_c << "\n" + << "\n--------------------------------------------------------------" + << "\n--------------------------------------------------------------" + //<< "\n\n" + << std::endl; + } + } // end else if +#else + if ( seconds_min < seconds_2 ) { + std::cout << "--------------------------------------------------------------\n" + << " Fastest run: MDRange tiled\n" + << " Time: " << seconds_min + << " Difference: " << seconds_2 - seconds_min + << " Other times: \n" + << " Collapse2 Range Policy: " << seconds_2 << "\n" + << "\n--------------------------------------------------------------" + << "\n--------------------------------------------------------------" + //<< "\n\n" + << std::endl; + } + else if ( seconds_min > seconds_2 ) { + std::cout << " Fastest run: Collapse2 RangePolicy\n" + << " Time: " << seconds_2 + << " Difference: " << seconds_min - seconds_2 + << " Other times: \n" + << " MDrange Tiled: " << seconds_min << "\n" + << "\n--------------------------------------------------------------" + << "\n--------------------------------------------------------------" + //<< "\n\n" + << std::endl; + } +#endif + + } //end for + +#undef MDRANGE_PERFORMANCE_OUTPUT_VERBOSE + +} template< class DeviceType > diff --git a/lib/kokkos/core/perf_test/PerfTestHost.cpp b/lib/kokkos/core/perf_test/PerfTestHost.cpp index 606177ca50..831d581109 100644 --- a/lib/kokkos/core/perf_test/PerfTestHost.cpp +++ b/lib/kokkos/core/perf_test/PerfTestHost.cpp @@ -66,6 +66,8 @@ const char TestHostDeviceName[] = "Kokkos::Serial" ; #include +#include + #include #include #include @@ -102,6 +104,14 @@ protected: } }; +//TEST_F( host, mdrange_lr ) { +// EXPECT_NO_THROW( (run_test_mdrange (5, 8, TestHostDeviceName) ) ); +//} + +//TEST_F( host, mdrange_ll ) { +// EXPECT_NO_THROW( (run_test_mdrange (5, 8, TestHostDeviceName) ) ); +//} + TEST_F( host, hexgrad ) { EXPECT_NO_THROW(run_test_hexgrad< TestHostDevice>( 10, 20, TestHostDeviceName )); } diff --git a/lib/kokkos/core/perf_test/PerfTestMDRange.hpp b/lib/kokkos/core/perf_test/PerfTestMDRange.hpp new file mode 100644 index 0000000000..d910b513c6 --- /dev/null +++ b/lib/kokkos/core/perf_test/PerfTestMDRange.hpp @@ -0,0 +1,564 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +namespace Test { +template< class DeviceType + , typename ScalarType = double + , typename TestLayout = Kokkos::LayoutRight + > +struct MultiDimRangePerf3D +{ + typedef DeviceType execution_space; + typedef typename execution_space::size_type size_type; + + using iterate_type = Kokkos::Experimental::Iterate; + + typedef Kokkos::View view_type; + typedef typename view_type::HostMirror host_view_type; + + view_type A; + view_type B; + const long irange; + const long jrange; + const long krange; + + MultiDimRangePerf3D(const view_type & A_, const view_type & B_, const long &irange_, const long &jrange_, const long &krange_) + : A(A_), B(B_), irange(irange_), jrange(jrange_), krange(krange_) + {} + + KOKKOS_INLINE_FUNCTION + void operator()(const long i, const long j, const long k) const + { + A(i,j,k) = 0.25*(ScalarType)( B(i+2,j,k) + B(i+1,j,k) + + B(i,j+2,k) + B(i,j+1,k) + + B(i,j,k+2) + B(i,j,k+1) + + B(i,j,k) ); + } + + + struct InitZeroTag {}; +// struct InitViewTag {}; + + struct Init + { + + Init(const view_type & input_, const long &irange_, const long &jrange_, const long &krange_) + : input(input_), irange(irange_), jrange(jrange_), krange(krange_) {} + + KOKKOS_INLINE_FUNCTION + void operator()(const long i, const long j, const long k) const + { + input(i,j,k) = 1.0; + } + + KOKKOS_INLINE_FUNCTION + void operator()(const InitZeroTag&, const long i, const long j, const long k) const + { + input(i,j,k) = 0; + } + + view_type input; + const long irange; + const long jrange; + const long krange; + }; + + + static double test_multi_index(const unsigned int icount, const unsigned int jcount, const unsigned int kcount, const unsigned int Ti = 1, const unsigned int Tj = 1, const unsigned int Tk = 1, const long iter = 1) + { + //This test performs multidim range over all dims + view_type Atest("Atest", icount, jcount, kcount); + view_type Btest("Btest", icount+2, jcount+2, kcount+2); + typedef MultiDimRangePerf3D FunctorType; + + double dt_min = 0; + + // LayoutRight + if ( std::is_same::value ) { + Kokkos::Experimental::MDRangePolicy, execution_space > policy_initA({{0,0,0}},{{icount,jcount,kcount}},{{Ti,Tj,Tk}}); + Kokkos::Experimental::MDRangePolicy, execution_space > policy_initB({{0,0,0}},{{icount+2,jcount+2,kcount+2}},{{Ti,Tj,Tk}}); + + typedef typename Kokkos::Experimental::MDRangePolicy, execution_space > MDRangeType; + using tile_type = typename MDRangeType::tile_type; + using point_type = typename MDRangeType::point_type; + + Kokkos::Experimental::MDRangePolicy, execution_space > policy(point_type{{0,0,0}},point_type{{icount,jcount,kcount}},tile_type{{Ti,Tj,Tk}} ); + + Kokkos::Experimental::md_parallel_for( policy_initA, Init(Atest, icount, jcount, kcount) ); + execution_space::fence(); + Kokkos::Experimental::md_parallel_for( policy_initB, Init(Btest, icount+2, jcount+2, kcount+2) ); + execution_space::fence(); + + for (int i = 0; i < iter; ++i) + { + Kokkos::Timer timer; + Kokkos::Experimental::md_parallel_for( policy, FunctorType(Atest, Btest, icount, jcount, kcount) ); + execution_space::fence(); + const double dt = timer.seconds(); + if ( 0 == i ) dt_min = dt ; + else dt_min = dt < dt_min ? dt : dt_min ; + + //Correctness check - only the first run + if ( 0 == i ) + { + long numErrors = 0; + host_view_type Ahost("Ahost", icount, jcount, kcount); + Kokkos::deep_copy(Ahost, Atest); + host_view_type Bhost("Bhost", icount+2, jcount+2, kcount+2); + Kokkos::deep_copy(Bhost, Btest); + + // On KNL, this may vectorize - add print statement to prevent + // Also, compare against epsilon, as vectorization can change bitwise answer + for ( long l = 0; l < static_cast(icount); ++l ) { + for ( long j = 0; j < static_cast(jcount); ++j ) { + for ( long k = 0; k < static_cast(kcount); ++k ) { + ScalarType check = 0.25*(ScalarType)( Bhost(l+2,j,k) + Bhost(l+1,j,k) + + Bhost(l,j+2,k) + Bhost(l,j+1,k) + + Bhost(l,j,k+2) + Bhost(l,j,k+1) + + Bhost(l,j,k) ); + if ( Ahost(l,j,k) - check != 0 ) { + ++numErrors; + std::cout << " Correctness error at index: " << l << ","<, execution_space > policy_initA({{0,0,0}},{{icount,jcount,kcount}},{{Ti,Tj,Tk}}); + Kokkos::Experimental::MDRangePolicy, execution_space > policy_initB({{0,0,0}},{{icount+2,jcount+2,kcount+2}},{{Ti,Tj,Tk}}); + + //typedef typename Kokkos::Experimental::MDRangePolicy, execution_space > MDRangeType; + //using tile_type = typename MDRangeType::tile_type; + //using point_type = typename MDRangeType::point_type; + //Kokkos::Experimental::MDRangePolicy, execution_space > policy(point_type{{0,0,0}},point_type{{icount,jcount,kcount}},tile_type{{Ti,Tj,Tk}} ); + Kokkos::Experimental::MDRangePolicy, execution_space > policy({{0,0,0}},{{icount,jcount,kcount}},{{Ti,Tj,Tk}} ); + + Kokkos::Experimental::md_parallel_for( policy_initA, Init(Atest, icount, jcount, kcount) ); + execution_space::fence(); + Kokkos::Experimental::md_parallel_for( policy_initB, Init(Btest, icount+2, jcount+2, kcount+2) ); + execution_space::fence(); + + for (int i = 0; i < iter; ++i) + { + Kokkos::Timer timer; + Kokkos::Experimental::md_parallel_for( policy, FunctorType(Atest, Btest, icount, jcount, kcount) ); + execution_space::fence(); + const double dt = timer.seconds(); + if ( 0 == i ) dt_min = dt ; + else dt_min = dt < dt_min ? dt : dt_min ; + + //Correctness check - only the first run + if ( 0 == i ) + { + long numErrors = 0; + host_view_type Ahost("Ahost", icount, jcount, kcount); + Kokkos::deep_copy(Ahost, Atest); + host_view_type Bhost("Bhost", icount+2, jcount+2, kcount+2); + Kokkos::deep_copy(Bhost, Btest); + + // On KNL, this may vectorize - add print statement to prevent + // Also, compare against epsilon, as vectorization can change bitwise answer + for ( long l = 0; l < static_cast(icount); ++l ) { + for ( long j = 0; j < static_cast(jcount); ++j ) { + for ( long k = 0; k < static_cast(kcount); ++k ) { + ScalarType check = 0.25*(ScalarType)( Bhost(l+2,j,k) + Bhost(l+1,j,k) + + Bhost(l,j+2,k) + Bhost(l,j+1,k) + + Bhost(l,j,k+2) + Bhost(l,j,k+1) + + Bhost(l,j,k) ); + if ( Ahost(l,j,k) - check != 0 ) { + ++numErrors; + std::cout << " Correctness error at index: " << l << ","< +struct RangePolicyCollapseTwo +{ + // RangePolicy for 3D range, but will collapse only 2 dims => like Rank<2> for multi-dim; unroll 2 dims in one-dim + + typedef DeviceType execution_space; + typedef typename execution_space::size_type size_type; + typedef TestLayout layout; + + using iterate_type = Kokkos::Experimental::Iterate; + + typedef Kokkos::View view_type; + typedef typename view_type::HostMirror host_view_type; + + view_type A; + view_type B; + const long irange; + const long jrange; + const long krange; + + RangePolicyCollapseTwo(view_type & A_, const view_type & B_, const long &irange_, const long &jrange_, const long &krange_) + : A(A_), B(B_) , irange(irange_), jrange(jrange_), krange(krange_) + {} + + KOKKOS_INLINE_FUNCTION + void operator()(const long r) const + { + if ( std::is_same::value ) + { +//id(i,j,k) = k + j*Nk + i*Nk*Nj = k + Nk*(j + i*Nj) = k + Nk*r +//r = j + i*Nj + long i = int(r / jrange); + long j = int( r - i*jrange); + for (int k = 0; k < krange; ++k) { + A(i,j,k) = 0.25*(ScalarType)( B(i+2,j,k) + B(i+1,j,k) + + B(i,j+2,k) + B(i,j+1,k) + + B(i,j,k+2) + B(i,j,k+1) + + B(i,j,k) ); + } + } + else if ( std::is_same::value ) + { +//id(i,j,k) = i + j*Ni + k*Ni*Nj = i + Ni*(j + k*Nj) = i + Ni*r +//r = j + k*Nj + long k = int(r / jrange); + long j = int( r - k*jrange); + for (int i = 0; i < irange; ++i) { + A(i,j,k) = 0.25*(ScalarType)( B(i+2,j,k) + B(i+1,j,k) + + B(i,j+2,k) + B(i,j+1,k) + + B(i,j,k+2) + B(i,j,k+1) + + B(i,j,k) ); + } + } + } + + + struct Init + { + view_type input; + const long irange; + const long jrange; + const long krange; + + Init(const view_type & input_, const long &irange_, const long &jrange_, const long &krange_) + : input(input_), irange(irange_), jrange(jrange_), krange(krange_) {} + + KOKKOS_INLINE_FUNCTION + void operator()(const long r) const + { + if ( std::is_same::value ) + { + long i = int(r / jrange); + long j = int( r - i*jrange); + for (int k = 0; k < krange; ++k) { + input(i,j,k) = 1; + } + } + else if ( std::is_same::value ) + { + long k = int(r / jrange); + long j = int( r - k*jrange); + for (int i = 0; i < irange; ++i) { + input(i,j,k) = 1; + } + } + } + }; + + + static double test_index_collapse_two(const unsigned int icount, const unsigned int jcount, const unsigned int kcount, const long iter = 1) + { + // This test refers to collapsing two dims while using the RangePolicy + view_type Atest("Atest", icount, jcount, kcount); + view_type Btest("Btest", icount+2, jcount+2, kcount+2); + typedef RangePolicyCollapseTwo FunctorType; + + long collapse_index_rangeA = 0; + long collapse_index_rangeB = 0; + if ( std::is_same::value ) { + collapse_index_rangeA = icount*jcount; + collapse_index_rangeB = (icount+2)*(jcount+2); +// std::cout << " LayoutRight " << std::endl; + } else if ( std::is_same::value ) { + collapse_index_rangeA = kcount*jcount; + collapse_index_rangeB = (kcount+2)*(jcount+2); +// std::cout << " LayoutLeft " << std::endl; + } else { + std::cout << " LayoutRight or LayoutLeft required - will pass 0 as range instead " << std::endl; + exit(-1); + } + + Kokkos::RangePolicy policy(0, (collapse_index_rangeA) ); + Kokkos::RangePolicy policy_initB(0, (collapse_index_rangeB) ); + + double dt_min = 0; + + Kokkos::parallel_for( policy, Init(Atest,icount,jcount,kcount) ); + execution_space::fence(); + Kokkos::parallel_for( policy_initB, Init(Btest,icount+2,jcount+2,kcount+2) ); + execution_space::fence(); + + for (int i = 0; i < iter; ++i) + { + Kokkos::Timer timer; + Kokkos::parallel_for(policy, FunctorType(Atest, Btest, icount, jcount, kcount)); + execution_space::fence(); + const double dt = timer.seconds(); + if ( 0 == i ) dt_min = dt ; + else dt_min = dt < dt_min ? dt : dt_min ; + + //Correctness check - first iteration only + if ( 0 == i ) + { + long numErrors = 0; + host_view_type Ahost("Ahost", icount, jcount, kcount); + Kokkos::deep_copy(Ahost, Atest); + host_view_type Bhost("Bhost", icount+2, jcount+2, kcount+2); + Kokkos::deep_copy(Bhost, Btest); + + // On KNL, this may vectorize - add print statement to prevent + // Also, compare against epsilon, as vectorization can change bitwise answer + for ( long l = 0; l < static_cast(icount); ++l ) { + for ( long j = 0; j < static_cast(jcount); ++j ) { + for ( long k = 0; k < static_cast(kcount); ++k ) { + ScalarType check = 0.25*(ScalarType)( Bhost(l+2,j,k) + Bhost(l+1,j,k) + + Bhost(l,j+2,k) + Bhost(l,j+1,k) + + Bhost(l,j,k+2) + Bhost(l,j,k+1) + + Bhost(l,j,k) ); + if ( Ahost(l,j,k) - check != 0 ) { + ++numErrors; + std::cout << " Correctness error at index: " << l << ","< +struct RangePolicyCollapseAll +{ + // RangePolicy for 3D range, but will collapse all dims + + typedef DeviceType execution_space; + typedef typename execution_space::size_type size_type; + typedef TestLayout layout; + + typedef Kokkos::View view_type; + typedef typename view_type::HostMirror host_view_type; + + view_type A; + view_type B; + const long irange; + const long jrange; + const long krange; + + RangePolicyCollapseAll(view_type & A_, const view_type & B_, const long &irange_, const long &jrange_, const long &krange_) + : A(A_), B(B_), irange(irange_), jrange(jrange_), krange(krange_) + {} + + KOKKOS_INLINE_FUNCTION + void operator()(const long r) const + { + if ( std::is_same::value ) + { + long i = int(r / (jrange*krange)); + long j = int(( r - i*jrange*krange)/krange); + long k = int(r - i*jrange*krange - j*krange); + A(i,j,k) = 0.25*(ScalarType)( B(i+2,j,k) + B(i+1,j,k) + + B(i,j+2,k) + B(i,j+1,k) + + B(i,j,k+2) + B(i,j,k+1) + + B(i,j,k) ); + } + else if ( std::is_same::value ) + { + long k = int(r / (irange*jrange)); + long j = int(( r - k*irange*jrange)/irange); + long i = int(r - k*irange*jrange - j*irange); + A(i,j,k) = 0.25*(ScalarType)( B(i+2,j,k) + B(i+1,j,k) + + B(i,j+2,k) + B(i,j+1,k) + + B(i,j,k+2) + B(i,j,k+1) + + B(i,j,k) ); + } + } + + + struct Init + { + view_type input; + const long irange; + const long jrange; + const long krange; + + Init(const view_type & input_, const long &irange_, const long &jrange_, const long &krange_) + : input(input_), irange(irange_), jrange(jrange_), krange(krange_) {} + + KOKKOS_INLINE_FUNCTION + void operator()(const long r) const + { + if ( std::is_same::value ) + { + long i = int(r / (jrange*krange)); + long j = int(( r - i*jrange*krange)/krange); + long k = int(r - i*jrange*krange - j*krange); + input(i,j,k) = 1; + } + else if ( std::is_same::value ) + { + long k = int(r / (irange*jrange)); + long j = int(( r - k*irange*jrange)/irange); + long i = int(r - k*irange*jrange - j*irange); + input(i,j,k) = 1; + } + } + }; + + + static double test_collapse_all(const unsigned int icount, const unsigned int jcount, const unsigned int kcount, const long iter = 1) + { + //This test refers to collapsing all dims using the RangePolicy + view_type Atest("Atest", icount, jcount, kcount); + view_type Btest("Btest", icount+2, jcount+2, kcount+2); + typedef RangePolicyCollapseAll FunctorType; + + const long flat_index_range = icount*jcount*kcount; + Kokkos::RangePolicy policy(0, flat_index_range ); + Kokkos::RangePolicy policy_initB(0, (icount+2)*(jcount+2)*(kcount+2) ); + + double dt_min = 0; + + Kokkos::parallel_for( policy, Init(Atest,icount,jcount,kcount) ); + execution_space::fence(); + Kokkos::parallel_for( policy_initB, Init(Btest,icount+2,jcount+2,kcount+2) ); + execution_space::fence(); + + for (int i = 0; i < iter; ++i) + { + Kokkos::Timer timer; + Kokkos::parallel_for(policy, FunctorType(Atest, Btest, icount, jcount, kcount)); + execution_space::fence(); + const double dt = timer.seconds(); + if ( 0 == i ) dt_min = dt ; + else dt_min = dt < dt_min ? dt : dt_min ; + + //Correctness check - first iteration only + if ( 0 == i ) + { + long numErrors = 0; + host_view_type Ahost("Ahost", icount, jcount, kcount); + Kokkos::deep_copy(Ahost, Atest); + host_view_type Bhost("Bhost", icount+2, jcount+2, kcount+2); + Kokkos::deep_copy(Bhost, Btest); + + // On KNL, this may vectorize - add print statement to prevent + // Also, compare against epsilon, as vectorization can change bitwise answer + for ( long l = 0; l < static_cast(icount); ++l ) { + for ( long j = 0; j < static_cast(jcount); ++j ) { + for ( long k = 0; k < static_cast(kcount); ++k ) { + ScalarType check = 0.25*(ScalarType)( Bhost(l+2,j,k) + Bhost(l+1,j,k) + + Bhost(l,j+2,k) + Bhost(l,j+1,k) + + Bhost(l,j,k+2) + Bhost(l,j,k+1) + + Bhost(l,j,k) ); + if ( Ahost(l,j,k) - check != 0 ) { + ++numErrors; + std::cout << " Callapse ALL Correctness error at index: " << l << ","< +#include +#include + +#include + +/* only compile this file if CUDA is enabled for Kokkos */ +#if defined( __CUDACC__ ) && defined( KOKKOS_HAVE_CUDA ) + +#include + +//#include +// Including the file above, leads to following type of errors: +// /home/ndellin/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp(84): error: incomplete type is not allowed +// As a result, recreate cuda_parallel_launch and associated code + +#if defined(KOKKOS_ENABLE_PROFILING) +#include +#include +#endif + +namespace Kokkos { namespace Experimental { namespace Impl { + +// ------------------------------------------------------------------ // + +template< class DriverType > +__global__ +static void cuda_parallel_launch( const DriverType driver ) +{ + driver(); +} + +template< class DriverType > +struct CudaLaunch +{ + inline + CudaLaunch( const DriverType & driver + , const dim3 & grid + , const dim3 & block + ) + { + cuda_parallel_launch< DriverType ><<< grid , block >>>(driver); + } + +}; + +// ------------------------------------------------------------------ // +template< int N , typename RP , typename Functor , typename Tag > +struct apply_impl; + +//Rank 2 +// Specializations for void tag type +template< typename RP , typename Functor > +struct apply_impl<2,RP,Functor,void > +{ + using index_type = typename RP::index_type; + + __device__ + apply_impl( const RP & rp_ , const Functor & f_ ) + : m_rp(rp_) + , m_func(f_) + {} + + inline __device__ + void exec_range() const + { +// LL + if (RP::inner_direction == RP::Left) { + /* + index_type offset_1 = blockIdx.y*m_rp.m_tile[1] + threadIdx.y; + index_type offset_0 = blockIdx.x*m_rp.m_tile[0] + threadIdx.x; + + for ( index_type j = offset_1; j < m_rp.m_upper[1], threadIdx.y < m_rp.m_tile[1]; j += (gridDim.y*m_rp.m_tile[1]) ) { + for ( index_type i = offset_0; i < m_rp.m_upper[0], threadIdx.x < m_rp.m_tile[0]; i += (gridDim.x*m_rp.m_tile[0]) ) { + m_func(i, j); + } } +*/ + for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { + const index_type offset_1 = tile_id1*m_rp.m_tile[1] + threadIdx.y; + if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { + + for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { + const index_type offset_0 = tile_id0*m_rp.m_tile[0] + threadIdx.x; + if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { + m_func(offset_0 , offset_1); + } + } + } + } + } +// LR + else { +/* + index_type offset_1 = blockIdx.y*m_rp.m_tile[1] + threadIdx.y; + index_type offset_0 = blockIdx.x*m_rp.m_tile[0] + threadIdx.x; + + for ( index_type i = offset_0; i < m_rp.m_upper[0], threadIdx.x < m_rp.m_tile[0]; i += (gridDim.x*m_rp.m_tile[0]) ) { + for ( index_type j = offset_1; j < m_rp.m_upper[1], threadIdx.y < m_rp.m_tile[1]; j += (gridDim.y*m_rp.m_tile[1]) ) { + m_func(i, j); + } } +*/ + for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { + const index_type offset_0 = tile_id0*m_rp.m_tile[0] + threadIdx.x; + if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { + + for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { + const index_type offset_1 = tile_id1*m_rp.m_tile[1] + threadIdx.y; + if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { + m_func(offset_0 , offset_1); + } + } + } + } + } + + } //end exec_range + +private: + const RP & m_rp; + const Functor & m_func; + +}; + +// Specializations for tag type +template< typename RP , typename Functor , typename Tag > +struct apply_impl<2,RP,Functor,Tag> +{ + using index_type = typename RP::index_type; + + inline __device__ + apply_impl( const RP & rp_ , const Functor & f_ ) + : m_rp(rp_) + , m_func(f_) + {} + + inline __device__ + void exec_range() const + { + if (RP::inner_direction == RP::Left) { + // Loop over size maxnumblocks until full range covered +/* + index_type offset_1 = blockIdx.y*m_rp.m_tile[1] + threadIdx.y; + index_type offset_0 = blockIdx.x*m_rp.m_tile[0] + threadIdx.x; + + for ( index_type j = offset_1; j < m_rp.m_upper[1], threadIdx.y < m_rp.m_tile[1]; j += (gridDim.y*m_rp.m_tile[1]) ) { + for ( index_type i = offset_0; i < m_rp.m_upper[0], threadIdx.x < m_rp.m_tile[0]; i += (gridDim.x*m_rp.m_tile[0]) ) { + m_func(Tag(), i, j); + } } +*/ + for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { + const index_type offset_1 = tile_id1*m_rp.m_tile[1] + threadIdx.y; + if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { + + for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { + const index_type offset_0 = tile_id0*m_rp.m_tile[0] + threadIdx.x; + if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { + m_func(Tag(), offset_0 , offset_1); + } + } + } + } + } + else { +/* + index_type offset_1 = blockIdx.y*m_rp.m_tile[1] + threadIdx.y; + index_type offset_0 = blockIdx.x*m_rp.m_tile[0] + threadIdx.x; + + for ( index_type i = offset_0; i < m_rp.m_upper[0], threadIdx.x < m_rp.m_tile[0]; i += (gridDim.x*m_rp.m_tile[0]) ) { + for ( index_type j = offset_1; j < m_rp.m_upper[1], threadIdx.y < m_rp.m_tile[1]; j += (gridDim.y*m_rp.m_tile[1]) ) { + m_func(Tag(), i, j); + } } +*/ + for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { + const index_type offset_0 = tile_id0*m_rp.m_tile[0] + threadIdx.x; + if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { + + for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { + const index_type offset_1 = tile_id1*m_rp.m_tile[1] + threadIdx.y; + if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { + m_func(Tag(), offset_0 , offset_1); + } + } + } + } + } + + } //end exec_range + +private: + const RP & m_rp; + const Functor & m_func; +}; + + +//Rank 3 +// Specializations for void tag type +template< typename RP , typename Functor > +struct apply_impl<3,RP,Functor,void > +{ + using index_type = typename RP::index_type; + + __device__ + apply_impl( const RP & rp_ , const Functor & f_ ) + : m_rp(rp_) + , m_func(f_) + {} + + inline __device__ + void exec_range() const + { +// LL + if (RP::inner_direction == RP::Left) { + for ( index_type tile_id2 = blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { + const index_type offset_2 = tile_id2*m_rp.m_tile[2] + threadIdx.z; + if ( offset_2 < m_rp.m_upper[2] && threadIdx.z < m_rp.m_tile[2] ) { + + for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { + const index_type offset_1 = tile_id1*m_rp.m_tile[1] + threadIdx.y; + if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { + + for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { + const index_type offset_0 = tile_id0*m_rp.m_tile[0] + threadIdx.x; + if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { + m_func(offset_0 , offset_1 , offset_2); + } + } + } + } + } + } + } +// LR + else { + for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { + const index_type offset_0 = tile_id0*m_rp.m_tile[0] + threadIdx.x; + if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { + + for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { + const index_type offset_1 = tile_id1*m_rp.m_tile[1] + threadIdx.y; + if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { + + for ( index_type tile_id2 = blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { + const index_type offset_2 = tile_id2*m_rp.m_tile[2] + threadIdx.z; + if ( offset_2 < m_rp.m_upper[2] && threadIdx.z < m_rp.m_tile[2] ) { + m_func(offset_0 , offset_1 , offset_2); + } + } + } + } + } + } + } + + } //end exec_range + +private: + const RP & m_rp; + const Functor & m_func; +}; + +// Specializations for void tag type +template< typename RP , typename Functor , typename Tag > +struct apply_impl<3,RP,Functor,Tag> +{ + using index_type = typename RP::index_type; + + inline __device__ + apply_impl( const RP & rp_ , const Functor & f_ ) + : m_rp(rp_) + , m_func(f_) + {} + + inline __device__ + void exec_range() const + { + if (RP::inner_direction == RP::Left) { + for ( index_type tile_id2 = blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { + const index_type offset_2 = tile_id2*m_rp.m_tile[2] + threadIdx.z; + if ( offset_2 < m_rp.m_upper[2] && threadIdx.z < m_rp.m_tile[2] ) { + + for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { + const index_type offset_1 = tile_id1*m_rp.m_tile[1] + threadIdx.y; + if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { + + for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { + const index_type offset_0 = tile_id0*m_rp.m_tile[0] + threadIdx.x; + if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { + m_func(Tag(), offset_0 , offset_1 , offset_2); + } + } + } + } + } + } + } + else { + for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { + const index_type offset_0 = tile_id0*m_rp.m_tile[0] + threadIdx.x; + if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { + + for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { + const index_type offset_1 = tile_id1*m_rp.m_tile[1] + threadIdx.y; + if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { + + for ( index_type tile_id2 = blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { + const index_type offset_2 = tile_id2*m_rp.m_tile[2] + threadIdx.z; + if ( offset_2 < m_rp.m_upper[2] && threadIdx.z < m_rp.m_tile[2] ) { + m_func(Tag(), offset_0 , offset_1 , offset_2); + } + } + } + } + } + } + } + + } //end exec_range + +private: + const RP & m_rp; + const Functor & m_func; +}; + + +//Rank 4 +// Specializations for void tag type +template< typename RP , typename Functor > +struct apply_impl<4,RP,Functor,void > +{ + using index_type = typename RP::index_type; + + __device__ + apply_impl( const RP & rp_ , const Functor & f_ ) + : m_rp(rp_) + , m_func(f_) + {} + + static constexpr index_type max_blocks = 65535; + + inline __device__ + void exec_range() const + { +// LL + if (RP::inner_direction == RP::Left) { + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x % numbl0; + const index_type tile_id1 = blockIdx.x / numbl0; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + + for ( index_type tile_id3 = blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { + const index_type offset_3 = tile_id3*m_rp.m_tile[3] + threadIdx.z; + if ( offset_3 < m_rp.m_upper[3] && threadIdx.z < m_rp.m_tile[3] ) { + + for ( index_type tile_id2 = blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { + const index_type offset_2 = tile_id2*m_rp.m_tile[2] + threadIdx.y; + if ( offset_2 < m_rp.m_upper[2] && threadIdx.y < m_rp.m_tile[2] ) { + + for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + m_func(offset_0 , offset_1 , offset_2 , offset_3); + } + } + } + } + } + } + } + } + } +// LR + else { + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x / numbl1; + const index_type tile_id1 = blockIdx.x % numbl1; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + + for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + + for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type tile_id2 = blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { + const index_type offset_2 = tile_id2*m_rp.m_tile[2] + threadIdx.y; + if ( offset_2 < m_rp.m_upper[2] && threadIdx.y < m_rp.m_tile[2] ) { + + for ( index_type tile_id3 = blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { + const index_type offset_3 = tile_id3*m_rp.m_tile[3] + threadIdx.z; + if ( offset_3 < m_rp.m_upper[3] && threadIdx.z < m_rp.m_tile[3] ) { + m_func(offset_0 , offset_1 , offset_2 , offset_3); + } + } + } + } + } + } + } + } + } + + } //end exec_range + +private: + const RP & m_rp; + const Functor & m_func; +}; + +// Specializations for void tag type +template< typename RP , typename Functor , typename Tag > +struct apply_impl<4,RP,Functor,Tag> +{ + using index_type = typename RP::index_type; + + inline __device__ + apply_impl( const RP & rp_ , const Functor & f_ ) + : m_rp(rp_) + , m_func(f_) + {} + + static constexpr index_type max_blocks = 65535; + + inline __device__ + void exec_range() const + { + if (RP::inner_direction == RP::Left) { + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x % numbl0; + const index_type tile_id1 = blockIdx.x / numbl0; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + + for ( index_type tile_id3 = blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { + const index_type offset_3 = tile_id3*m_rp.m_tile[3] + threadIdx.z; + if ( offset_3 < m_rp.m_upper[3] && threadIdx.z < m_rp.m_tile[3] ) { + + for ( index_type tile_id2 = blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { + const index_type offset_2 = tile_id2*m_rp.m_tile[2] + threadIdx.y; + if ( offset_2 < m_rp.m_upper[2] && threadIdx.y < m_rp.m_tile[2] ) { + + for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + m_func(Tag(), offset_0 , offset_1 , offset_2 , offset_3); + } + } + } + } + } + } + } + } + } + else { + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x / numbl1; + const index_type tile_id1 = blockIdx.x % numbl1; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + + for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + + for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = tile_id1*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type tile_id2 = blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { + const index_type offset_2 = tile_id2*m_rp.m_tile[2] + threadIdx.y; + if ( offset_2 < m_rp.m_upper[2] && threadIdx.y < m_rp.m_tile[2] ) { + + for ( index_type tile_id3 = blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { + const index_type offset_3 = tile_id3*m_rp.m_tile[3] + threadIdx.z; + if ( offset_3 < m_rp.m_upper[3] && threadIdx.z < m_rp.m_tile[3] ) { + m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3); + } + } + } + } + } + } + } + } + } + + } //end exec_range + +private: + const RP & m_rp; + const Functor & m_func; +}; + + +//Rank 5 +// Specializations for void tag type +template< typename RP , typename Functor > +struct apply_impl<5,RP,Functor,void > +{ + using index_type = typename RP::index_type; + + __device__ + apply_impl( const RP & rp_ , const Functor & f_ ) + : m_rp(rp_) + , m_func(f_) + {} + + static constexpr index_type max_blocks = 65535; + + inline __device__ + void exec_range() const + { +// LL + if (RP::inner_direction == RP::Left) { + + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x % numbl0; + const index_type tile_id1 = blockIdx.x / numbl0; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id2 = blockIdx.y % numbl2; + const index_type tile_id3 = blockIdx.y / numbl2; + const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; + + for ( index_type tile_id4 = blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { + const index_type offset_4 = tile_id4*m_rp.m_tile[4] + threadIdx.z; + if ( offset_4 < m_rp.m_upper[4] && threadIdx.z < m_rp.m_tile[4] ) { + + for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { + const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3; + if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { + + for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { + const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2; + if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { + + for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + m_func(offset_0 , offset_1 , offset_2 , offset_3, offset_4); + } + } + } + } + } + } + } + } + } + } + } +// LR + else { + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x / numbl1; + const index_type tile_id1 = blockIdx.x % numbl1; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id2 = blockIdx.y / numbl3; + const index_type tile_id3 = blockIdx.y % numbl3; + const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; + + for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + + for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { + const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2; + if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { + + for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { + const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3; + if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { + + for ( index_type tile_id4 = blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { + const index_type offset_4 = tile_id4*m_rp.m_tile[4] + threadIdx.z; + if ( offset_4 < m_rp.m_upper[4] && threadIdx.z < m_rp.m_tile[4] ) { + m_func(offset_0 , offset_1 , offset_2 , offset_3 , offset_4); + } + } + } + } + } + } + } + } + } + } + } + + } //end exec_range + +private: + const RP & m_rp; + const Functor & m_func; +}; + +// Specializations for tag type +template< typename RP , typename Functor , typename Tag > +struct apply_impl<5,RP,Functor,Tag> +{ + using index_type = typename RP::index_type; + + __device__ + apply_impl( const RP & rp_ , const Functor & f_ ) + : m_rp(rp_) + , m_func(f_) + {} + + static constexpr index_type max_blocks = 65535; + + inline __device__ + void exec_range() const + { +// LL + if (RP::inner_direction == RP::Left) { + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x % numbl0; + const index_type tile_id1 = blockIdx.x / numbl0; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id2 = blockIdx.y % numbl2; + const index_type tile_id3 = blockIdx.y / numbl2; + const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; + + for ( index_type tile_id4 = blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { + const index_type offset_4 = tile_id4*m_rp.m_tile[4] + threadIdx.z; + if ( offset_4 < m_rp.m_upper[4] && threadIdx.z < m_rp.m_tile[4] ) { + + for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { + const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3; + if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { + + for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { + const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2; + if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { + + for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3, offset_4); + } + } + } + } + } + } + } + } + } + } + } +// LR + else { + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x / numbl1; + const index_type tile_id1 = blockIdx.x % numbl1; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id2 = blockIdx.y / numbl3; + const index_type tile_id3 = blockIdx.y % numbl3; + const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; + + for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + + for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { + const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2; + if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { + + for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { + const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3; + if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { + + for ( index_type tile_id4 = blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { + const index_type offset_4 = tile_id4*m_rp.m_tile[4] + threadIdx.z; + if ( offset_4 < m_rp.m_upper[4] && threadIdx.z < m_rp.m_tile[4] ) { + m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3 , offset_4); + } + } + } + } + } + } + } + } + } + } + } + + } //end exec_range + +private: + const RP & m_rp; + const Functor & m_func; +}; + + +//Rank 6 +// Specializations for void tag type +template< typename RP , typename Functor > +struct apply_impl<6,RP,Functor,void > +{ + using index_type = typename RP::index_type; + + __device__ + apply_impl( const RP & rp_ , const Functor & f_ ) + : m_rp(rp_) + , m_func(f_) + {} + + static constexpr index_type max_blocks = 65535; + + inline __device__ + void exec_range() const + { +// LL + if (RP::inner_direction == RP::Left) { + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x % numbl0; + const index_type tile_id1 = blockIdx.x / numbl0; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id2 = blockIdx.y % numbl2; + const index_type tile_id3 = blockIdx.y / numbl2; + const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; + + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl4 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl5 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl4 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id4 = blockIdx.z % numbl4; + const index_type tile_id5 = blockIdx.z / numbl4; + const index_type thr_id4 = threadIdx.z % m_rp.m_tile[4]; + const index_type thr_id5 = threadIdx.z / m_rp.m_tile[4]; + + for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { + const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5; + if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { + + for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { + const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4; + if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { + + for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { + const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3; + if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { + + for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { + const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2; + if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { + + for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + m_func(offset_0 , offset_1 , offset_2 , offset_3, offset_4, offset_5); + } + } + } + } + } + } + } + } + } + } + } + } + } +// LR + else { + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x / numbl1; + const index_type tile_id1 = blockIdx.x % numbl1; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id2 = blockIdx.y / numbl3; + const index_type tile_id3 = blockIdx.y % numbl3; + const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; + + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl5 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl4 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl5 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id4 = blockIdx.z / numbl5; + const index_type tile_id5 = blockIdx.z % numbl5; + const index_type thr_id4 = threadIdx.z / m_rp.m_tile[5]; + const index_type thr_id5 = threadIdx.z % m_rp.m_tile[5]; + + for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + + for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { + const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2; + if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { + + for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { + const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3; + if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { + + for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { + const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4; + if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { + + for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { + const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5; + if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { + m_func(offset_0 , offset_1 , offset_2 , offset_3 , offset_4 , offset_5); + } + } + } + } + } + } + } + } + } + } + } + } + } + + } //end exec_range + +private: + const RP & m_rp; + const Functor & m_func; +}; + +// Specializations for tag type +template< typename RP , typename Functor , typename Tag > +struct apply_impl<6,RP,Functor,Tag> +{ + using index_type = typename RP::index_type; + + __device__ + apply_impl( const RP & rp_ , const Functor & f_ ) + : m_rp(rp_) + , m_func(f_) + {} + + static constexpr index_type max_blocks = 65535; + + inline __device__ + void exec_range() const + { +// LL + if (RP::inner_direction == RP::Left) { + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x % numbl0; + const index_type tile_id1 = blockIdx.x / numbl0; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id2 = blockIdx.y % numbl2; + const index_type tile_id3 = blockIdx.y / numbl2; + const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; + + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl4 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; + const index_type numbl5 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl4 ) : + ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + + const index_type tile_id4 = blockIdx.z % numbl4; + const index_type tile_id5 = blockIdx.z / numbl4; + const index_type thr_id4 = threadIdx.z % m_rp.m_tile[4]; + const index_type thr_id5 = threadIdx.z / m_rp.m_tile[4]; + + for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { + const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5; + if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { + + for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { + const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4; + if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { + + for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { + const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3; + if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { + + for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { + const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2; + if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { + + for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3, offset_4, offset_5); + } + } + } + } + } + } + } + } + } + } + } + } + } +// LR + else { + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id0 = blockIdx.x / numbl1; + const index_type tile_id1 = blockIdx.x % numbl1; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id2 = blockIdx.y / numbl3; + const index_type tile_id3 = blockIdx.y % numbl3; + const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; + + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl5 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; + const index_type numbl4 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl5 ) : + ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + + const index_type tile_id4 = blockIdx.z / numbl5; + const index_type tile_id5 = blockIdx.z % numbl5; + const index_type thr_id4 = threadIdx.z / m_rp.m_tile[5]; + const index_type thr_id5 = threadIdx.z % m_rp.m_tile[5]; + + for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { + const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0; + if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { + + for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { + const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1; + if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { + + for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { + const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2; + if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { + + for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { + const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3; + if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { + + for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { + const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4; + if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { + + for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { + const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5; + if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { + m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3 , offset_4 , offset_5); + } + } + } + } + } + } + } + } + } + } + } + } + } + + } //end exec_range + +private: + const RP & m_rp; + const Functor & m_func; +}; + +// ---------------------------------------------------------------------------------- + +template < typename RP + , typename Functor + , typename Tag + > +struct DeviceIterateTile +{ + using index_type = typename RP::index_type; + using array_index_type = typename RP::array_index_type; + using point_type = typename RP::point_type; + + struct VoidDummy {}; + typedef typename std::conditional< std::is_same::value, VoidDummy, Tag>::type usable_tag; + + DeviceIterateTile( const RP & rp, const Functor & func ) + : m_rp{rp} + , m_func{func} + {} + +private: + inline __device__ + void apply() const + { + apply_impl(m_rp,m_func).exec_range(); + } //end apply + +public: + + inline + __device__ + void operator()(void) const + { + this-> apply(); + } + + inline + void execute() const + { + const array_index_type maxblocks = 65535; //not true for blockIdx.x for newer archs + if ( RP::rank == 2 ) + { + const dim3 block( m_rp.m_tile[0] , m_rp.m_tile[1] , 1); + const dim3 grid( + std::min( ( m_rp.m_upper[0] - m_rp.m_lower[0] + block.x - 1 ) / block.x , maxblocks ) + , std::min( ( m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1 ) / block.y , maxblocks ) + , 1 + ); + CudaLaunch< DeviceIterateTile >( *this , grid , block ); + } + else if ( RP::rank == 3 ) + { + const dim3 block( m_rp.m_tile[0] , m_rp.m_tile[1] , m_rp.m_tile[2] ); + const dim3 grid( + std::min( ( m_rp.m_upper[0] - m_rp.m_lower[0] + block.x - 1 ) / block.x , maxblocks ) + , std::min( ( m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1 ) / block.y , maxblocks ) + , std::min( ( m_rp.m_upper[2] - m_rp.m_lower[2] + block.z - 1 ) / block.z , maxblocks ) + ); + CudaLaunch< DeviceIterateTile >( *this , grid , block ); + } + else if ( RP::rank == 4 ) + { + // id0,id1 encoded within threadIdx.x; id2 to threadIdx.y; id3 to threadIdx.z + const dim3 block( m_rp.m_tile[0]*m_rp.m_tile[1] , m_rp.m_tile[2] , m_rp.m_tile[3] ); + const dim3 grid( + std::min( static_cast( m_rp.m_tile_end[0] * m_rp.m_tile_end[1] ) + , static_cast(maxblocks) ) + , std::min( ( m_rp.m_upper[2] - m_rp.m_lower[2] + block.y - 1 ) / block.y , maxblocks ) + , std::min( ( m_rp.m_upper[3] - m_rp.m_lower[3] + block.z - 1 ) / block.z , maxblocks ) + ); + CudaLaunch< DeviceIterateTile >( *this , grid , block ); + } + else if ( RP::rank == 5 ) + { + // id0,id1 encoded within threadIdx.x; id2,id3 to threadIdx.y; id4 to threadIdx.z + const dim3 block( m_rp.m_tile[0]*m_rp.m_tile[1] , m_rp.m_tile[2]*m_rp.m_tile[3] , m_rp.m_tile[4] ); + const dim3 grid( + std::min( static_cast( m_rp.m_tile_end[0] * m_rp.m_tile_end[1] ) + , static_cast(maxblocks) ) + , std::min( static_cast( m_rp.m_tile_end[2] * m_rp.m_tile_end[3] ) + , static_cast(maxblocks) ) + , std::min( ( m_rp.m_upper[4] - m_rp.m_lower[4] + block.z - 1 ) / block.z , maxblocks ) + ); + CudaLaunch< DeviceIterateTile >( *this , grid , block ); + } + else if ( RP::rank == 6 ) + { + // id0,id1 encoded within threadIdx.x; id2,id3 to threadIdx.y; id4,id5 to threadIdx.z + const dim3 block( m_rp.m_tile[0]*m_rp.m_tile[1] , m_rp.m_tile[2]*m_rp.m_tile[3] , m_rp.m_tile[4]*m_rp.m_tile[5] ); + const dim3 grid( + std::min( static_cast( m_rp.m_tile_end[0] * m_rp.m_tile_end[1] ) + , static_cast(maxblocks) ) + , std::min( static_cast( m_rp.m_tile_end[2] * m_rp.m_tile_end[3] ) + , static_cast(maxblocks) ) + , std::min( static_cast( m_rp.m_tile_end[4] * m_rp.m_tile_end[5] ) + , static_cast(maxblocks) ) + ); + CudaLaunch< DeviceIterateTile >( *this , grid , block ); + } + else + { + printf("Kokkos::MDRange Error: Exceeded rank bounds with Cuda\n"); + Kokkos::abort("Aborting"); + } + + } //end execute + +protected: + const RP m_rp; + const Functor m_func; +}; + +} } } //end namespace Kokkos::Experimental::Impl + +#endif +#endif diff --git a/lib/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp b/lib/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp index 0a0f41686b..a273db998b 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp @@ -131,6 +131,7 @@ namespace Impl { int* atomic; int* scratch; int* threadid; + int n; }; } } @@ -250,6 +251,7 @@ struct CudaParallelLaunch< DriverType , true > { locks.atomic = atomic_lock_array_cuda_space_ptr(false); locks.scratch = scratch_lock_array_cuda_space_ptr(false); locks.threadid = threadid_lock_array_cuda_space_ptr(false); + locks.n = Kokkos::Cuda::concurrency(); cudaMemcpyToSymbol( kokkos_impl_cuda_lock_arrays , & locks , sizeof(CudaLockArraysStruct) ); #endif @@ -292,6 +294,7 @@ struct CudaParallelLaunch< DriverType , false > { locks.atomic = atomic_lock_array_cuda_space_ptr(false); locks.scratch = scratch_lock_array_cuda_space_ptr(false); locks.threadid = threadid_lock_array_cuda_space_ptr(false); + locks.n = Kokkos::Cuda::concurrency(); cudaMemcpyToSymbol( kokkos_impl_cuda_lock_arrays , & locks , sizeof(CudaLockArraysStruct) ); #endif diff --git a/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp b/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp index 91a3c92138..303b3fa4f6 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -59,7 +59,7 @@ #include #include -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) #include #endif @@ -184,7 +184,7 @@ void * CudaUVMSpace::allocate( const size_t arg_alloc_size ) const enum { max_uvm_allocations = 65536 }; - if ( arg_alloc_size > 0 ) + if ( arg_alloc_size > 0 ) { Kokkos::Impl::num_uvm_allocations++; @@ -193,7 +193,7 @@ void * CudaUVMSpace::allocate( const size_t arg_alloc_size ) const } CUDA_SAFE_CALL( cudaMallocManaged( &ptr, arg_alloc_size , cudaMemAttachGlobal ) ); - } + } return ptr ; } @@ -375,7 +375,7 @@ deallocate( SharedAllocationRecord< void , void > * arg_rec ) SharedAllocationRecord< Kokkos::CudaSpace , void >:: ~SharedAllocationRecord() { - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { SharedAllocationHeader header ; @@ -395,7 +395,7 @@ SharedAllocationRecord< Kokkos::CudaSpace , void >:: SharedAllocationRecord< Kokkos::CudaUVMSpace , void >:: ~SharedAllocationRecord() { - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::fence(); //Make sure I can access the label ... Kokkos::Profiling::deallocateData( @@ -412,7 +412,7 @@ SharedAllocationRecord< Kokkos::CudaUVMSpace , void >:: SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >:: ~SharedAllocationRecord() { - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::deallocateData( Kokkos::Profiling::SpaceHandle(Kokkos::CudaHostPinnedSpace::name()),RecordBase::m_alloc_ptr->m_label, @@ -442,7 +442,7 @@ SharedAllocationRecord( const Kokkos::CudaSpace & arg_space , m_tex_obj( 0 ) , m_space( arg_space ) { - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::allocateData(Kokkos::Profiling::SpaceHandle(arg_space.name()),arg_label,data(),arg_alloc_size); } @@ -479,7 +479,7 @@ SharedAllocationRecord( const Kokkos::CudaUVMSpace & arg_space , m_tex_obj( 0 ) , m_space( arg_space ) { - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::allocateData(Kokkos::Profiling::SpaceHandle(arg_space.name()),arg_label,data(),arg_alloc_size); } @@ -510,7 +510,7 @@ SharedAllocationRecord( const Kokkos::CudaHostPinnedSpace & arg_space ) , m_space( arg_space ) { - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::allocateData(Kokkos::Profiling::SpaceHandle(arg_space.name()),arg_label,data(),arg_alloc_size); } @@ -745,14 +745,14 @@ print_records( std::ostream & s , const Kokkos::CudaSpace & space , bool detail //Formatting dependent on sizeof(uintptr_t) const char * format_string; - if (sizeof(uintptr_t) == sizeof(unsigned long)) { + if (sizeof(uintptr_t) == sizeof(unsigned long)) { format_string = "Cuda addr( 0x%.12lx ) list( 0x%.12lx 0x%.12lx ) extent[ 0x%.12lx + %.8ld ] count(%d) dealloc(0x%.12lx) %s\n"; } - else if (sizeof(uintptr_t) == sizeof(unsigned long long)) { + else if (sizeof(uintptr_t) == sizeof(unsigned long long)) { format_string = "Cuda addr( 0x%.12llx ) list( 0x%.12llx 0x%.12llx ) extent[ 0x%.12llx + %.8ld ] count(%d) dealloc(0x%.12llx) %s\n"; } - snprintf( buffer , 256 + snprintf( buffer , 256 , format_string , reinterpret_cast( r ) , reinterpret_cast( r->m_prev ) @@ -776,14 +776,14 @@ print_records( std::ostream & s , const Kokkos::CudaSpace & space , bool detail //Formatting dependent on sizeof(uintptr_t) const char * format_string; - if (sizeof(uintptr_t) == sizeof(unsigned long)) { + if (sizeof(uintptr_t) == sizeof(unsigned long)) { format_string = "Cuda [ 0x%.12lx + %ld ] %s\n"; } - else if (sizeof(uintptr_t) == sizeof(unsigned long long)) { + else if (sizeof(uintptr_t) == sizeof(unsigned long long)) { format_string = "Cuda [ 0x%.12llx + %ld ] %s\n"; } - snprintf( buffer , 256 + snprintf( buffer , 256 , format_string , reinterpret_cast< uintptr_t >( r->data() ) , r->size() @@ -883,6 +883,7 @@ void init_lock_arrays_cuda_space() { locks.atomic = atomic_lock_array_cuda_space_ptr(false); locks.scratch = scratch_lock_array_cuda_space_ptr(false); locks.threadid = threadid_lock_array_cuda_space_ptr(false); + locks.n = Kokkos::Cuda::concurrency(); cudaMemcpyToSymbol( kokkos_impl_cuda_lock_arrays , & locks , sizeof(CudaLockArraysStruct) ); init_lock_array_kernel_atomic<<<(CUDA_SPACE_ATOMIC_MASK+255)/256,256>>>(); init_lock_array_kernel_scratch_threadid<<<(Kokkos::Cuda::concurrency()+255)/256,256>>>(Kokkos::Cuda::concurrency()); diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Impl.cpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Impl.cpp index eeea97049f..44d908d102 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Impl.cpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Impl.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -505,18 +505,18 @@ void CudaInternal::initialize( int cuda_device_id , int stream_count ) std::cout << "Kokkos::Cuda::initialize WARNING: Cuda is allocating into UVMSpace by default" << std::endl; std::cout << " without setting CUDA_LAUNCH_BLOCKING=1." << std::endl; std::cout << " The code must call Cuda::fence() after each kernel" << std::endl; - std::cout << " or will likely crash when accessing data on the host." << std::endl; + std::cout << " or will likely crash when accessing data on the host." << std::endl; } const char * env_force_device_alloc = getenv("CUDA_MANAGED_FORCE_DEVICE_ALLOC"); bool force_device_alloc; if (env_force_device_alloc == 0) force_device_alloc=false; else force_device_alloc=atoi(env_force_device_alloc)!=0; - + const char * env_visible_devices = getenv("CUDA_VISIBLE_DEVICES"); bool visible_devices_one=true; if (env_visible_devices == 0) visible_devices_one=false; - + if(!visible_devices_one && !force_device_alloc) { std::cout << "Kokkos::Cuda::initialize WARNING: Cuda is allocating into UVMSpace by default" << std::endl; std::cout << " without setting CUDA_MANAGED_FORCE_DEVICE_ALLOC=1 or " << std::endl; @@ -536,6 +536,7 @@ void CudaInternal::initialize( int cuda_device_id , int stream_count ) locks.atomic = atomic_lock_array_cuda_space_ptr(false); locks.scratch = scratch_lock_array_cuda_space_ptr(false); locks.threadid = threadid_lock_array_cuda_space_ptr(false); + locks.n = Kokkos::Cuda::concurrency(); cudaMemcpyToSymbol( kokkos_impl_cuda_lock_arrays , & locks , sizeof(CudaLockArraysStruct) ); #endif } @@ -620,9 +621,9 @@ void CudaInternal::finalize() was_finalized = 1; if ( 0 != m_scratchSpace || 0 != m_scratchFlags ) { - atomic_lock_array_cuda_space_ptr(false); - scratch_lock_array_cuda_space_ptr(false); - threadid_lock_array_cuda_space_ptr(false); + atomic_lock_array_cuda_space_ptr(true); + scratch_lock_array_cuda_space_ptr(true); + threadid_lock_array_cuda_space_ptr(true); if ( m_stream ) { for ( size_type i = 1 ; i < m_streamCount ; ++i ) { @@ -700,7 +701,7 @@ void Cuda::initialize( const Cuda::SelectDevice config , size_t num_instances ) { Impl::CudaInternal::singleton().initialize( config.cuda_device_id , num_instances ); - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) Kokkos::Profiling::initialize(); #endif } @@ -739,7 +740,7 @@ void Cuda::finalize() { Impl::CudaInternal::singleton().finalize(); - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) Kokkos::Profiling::finalize(); #endif } diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp index fa29d732f4..56e6a3c1e3 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp @@ -61,7 +61,7 @@ #include #include -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) #include #include #endif @@ -586,13 +586,35 @@ public: void operator()(void) const { // Iterate this block through the league + int threadid = 0; + if ( m_scratch_size[1]>0 ) { + __shared__ int base_thread_id; + if (threadIdx.x==0 && threadIdx.y==0 ) { + threadid = ((blockIdx.x*blockDim.z + threadIdx.z) * blockDim.x * blockDim.y) % kokkos_impl_cuda_lock_arrays.n; + threadid = ((threadid + blockDim.x * blockDim.y-1)/(blockDim.x * blockDim.y)) * blockDim.x * blockDim.y; + if(threadid > kokkos_impl_cuda_lock_arrays.n) threadid-=blockDim.x * blockDim.y; + int done = 0; + while (!done) { + done = (0 == atomicCAS(&kokkos_impl_cuda_lock_arrays.atomic[threadid],0,1)); + if(!done) { + threadid += blockDim.x * blockDim.y; + if(threadid > kokkos_impl_cuda_lock_arrays.n) threadid = 0; + } + } + base_thread_id = threadid; + } + __syncthreads(); + threadid = base_thread_id; + } + + for ( int league_rank = blockIdx.x ; league_rank < m_league_size ; league_rank += gridDim.x ) { this-> template exec_team< WorkTag >( typename Policy::member_type( kokkos_impl_cuda_shared_memory() , m_shmem_begin , m_shmem_size - , m_scratch_ptr[1] + , (void*) ( ((char*)m_scratch_ptr[1]) + threadid/(blockDim.x*blockDim.y) * m_scratch_size[1]) , m_scratch_size[1] , league_rank , m_league_size ) ); @@ -946,11 +968,32 @@ public: __device__ inline void operator() () const { - run(Kokkos::Impl::if_c::select(1,1.0) ); + int threadid = 0; + if ( m_scratch_size[1]>0 ) { + __shared__ int base_thread_id; + if (threadIdx.x==0 && threadIdx.y==0 ) { + threadid = ((blockIdx.x*blockDim.z + threadIdx.z) * blockDim.x * blockDim.y) % kokkos_impl_cuda_lock_arrays.n; + threadid = ((threadid + blockDim.x * blockDim.y-1)/(blockDim.x * blockDim.y)) * blockDim.x * blockDim.y; + if(threadid > kokkos_impl_cuda_lock_arrays.n) threadid-=blockDim.x * blockDim.y; + int done = 0; + while (!done) { + done = (0 == atomicCAS(&kokkos_impl_cuda_lock_arrays.atomic[threadid],0,1)); + if(!done) { + threadid += blockDim.x * blockDim.y; + if(threadid > kokkos_impl_cuda_lock_arrays.n) threadid = 0; + } + } + base_thread_id = threadid; + } + __syncthreads(); + threadid = base_thread_id; + } + + run(Kokkos::Impl::if_c::select(1,1.0), threadid ); } __device__ inline - void run(const DummySHMEMReductionType&) const + void run(const DummySHMEMReductionType&, const int& threadid) const { const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) > word_count( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) / sizeof(size_type) ); @@ -964,7 +1007,7 @@ public: ( Member( kokkos_impl_cuda_shared_memory() + m_team_begin , m_shmem_begin , m_shmem_size - , m_scratch_ptr[1] + , (void*) ( ((char*)m_scratch_ptr[1]) + threadid/(blockDim.x*blockDim.y) * m_scratch_size[1]) , m_scratch_size[1] , league_rank , m_league_size ) @@ -992,7 +1035,7 @@ public: } __device__ inline - void run(const DummyShflReductionType&) const + void run(const DummyShflReductionType&, const int& threadid) const { value_type value; ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , &value); @@ -1003,7 +1046,7 @@ public: ( Member( kokkos_impl_cuda_shared_memory() + m_team_begin , m_shmem_begin , m_shmem_size - , m_scratch_ptr[1] + , (void*) ( ((char*)m_scratch_ptr[1]) + threadid/(blockDim.x*blockDim.y) * m_scratch_size[1]) , m_scratch_size[1] , league_rank , m_league_size ) @@ -1128,9 +1171,9 @@ public: Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelReduce< Cuda > requested too much L0 scratch memory")); } - if ( m_team_size > - Kokkos::Impl::cuda_get_max_block_size< ParallelReduce > - ( arg_functor , arg_policy.vector_length(), arg_policy.team_scratch_size(0),arg_policy.thread_scratch_size(0) ) / arg_policy.vector_length()) { + if ( unsigned(m_team_size) > + unsigned(Kokkos::Impl::cuda_get_max_block_size< ParallelReduce > + ( arg_functor , arg_policy.vector_length(), arg_policy.team_scratch_size(0),arg_policy.thread_scratch_size(0) ) / arg_policy.vector_length())) { Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelReduce< Cuda > requested too large team size.")); } @@ -1621,14 +1664,25 @@ void parallel_for(const Impl::ThreadVectorRangeBoundariesStruct KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries, const Lambda & lambda, ValueType& result) { +void parallel_reduce + ( Impl::ThreadVectorRangeBoundariesStruct + const & loop_boundaries + , Lambda const & lambda + , ValueType & result ) +{ #ifdef __CUDA_ARCH__ result = ValueType(); @@ -1636,52 +1690,42 @@ void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct 1) - result += shfl_down(result, 1,loop_boundaries.increment); - if (loop_boundaries.increment > 2) - result += shfl_down(result, 2,loop_boundaries.increment); - if (loop_boundaries.increment > 4) - result += shfl_down(result, 4,loop_boundaries.increment); - if (loop_boundaries.increment > 8) - result += shfl_down(result, 8,loop_boundaries.increment); - if (loop_boundaries.increment > 16) - result += shfl_down(result, 16,loop_boundaries.increment); - - result = shfl(result,0,loop_boundaries.increment); + Impl::cuda_intra_warp_vector_reduce( + Impl::Reducer< ValueType , Impl::ReduceSum< ValueType > >( & result ) ); + #endif } -/** \brief Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1. +/** \brief Intra-thread vector parallel_reduce. * - * The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a reduction of - * val is performed using JoinType(ValueType& val, const ValueType& update) and put into init_result. - * The input value of init_result is used as initializer for temporary variables of ValueType. Therefore - * the input value should be the neutral element with respect to the join operation (e.g. '0 for +-' or - * '1 for *'). This functionality requires C++11 support.*/ + * Calls lambda(iType i, ValueType & val) for each i=[0..N). + * + * The range [0..N) is mapped to all vector lanes of + * the calling thread and a reduction of val is performed + * using JoinType::operator()(ValueType& val, const ValueType& update) + * and output into result. + * + * The input value of result must be the identity value for the + * reduction operation; e.g., ( 0 , += ) or ( 1 , *= ). + */ template< typename iType, class Lambda, typename ValueType, class JoinType > KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries, const Lambda & lambda, const JoinType& join, ValueType& init_result) { - +void parallel_reduce + ( Impl::ThreadVectorRangeBoundariesStruct + const & loop_boundaries + , Lambda const & lambda + , JoinType const & join + , ValueType & result ) +{ #ifdef __CUDA_ARCH__ - ValueType result = init_result; for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { lambda(i,result); } - if (loop_boundaries.increment > 1) - join( result, shfl_down(result, 1,loop_boundaries.increment)); - if (loop_boundaries.increment > 2) - join( result, shfl_down(result, 2,loop_boundaries.increment)); - if (loop_boundaries.increment > 4) - join( result, shfl_down(result, 4,loop_boundaries.increment)); - if (loop_boundaries.increment > 8) - join( result, shfl_down(result, 8,loop_boundaries.increment)); - if (loop_boundaries.increment > 16) - join( result, shfl_down(result, 16,loop_boundaries.increment)); - - init_result = shfl(result,0,loop_boundaries.increment); + Impl::cuda_intra_warp_vector_reduce( + Impl::Reducer< ValueType , JoinType >( join , & result ) ); + #endif } diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp index ad9cca26ce..79b3867ba2 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp @@ -55,15 +55,163 @@ #include #include #include + //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { namespace Impl { +//---------------------------------------------------------------------------- + +template< typename T > +__device__ inline +void cuda_shfl( T & out , T const & in , int lane , + typename std::enable_if< sizeof(int) == sizeof(T) , int >::type width ) +{ + *reinterpret_cast(&out) = + __shfl( *reinterpret_cast(&in) , lane , width ); +} + +template< typename T > +__device__ inline +void cuda_shfl( T & out , T const & in , int lane , + typename std::enable_if + < ( sizeof(int) < sizeof(T) ) && ( 0 == ( sizeof(T) % sizeof(int) ) ) + , int >::type width ) +{ + enum : int { N = sizeof(T) / sizeof(int) }; + + for ( int i = 0 ; i < N ; ++i ) { + reinterpret_cast(&out)[i] = + __shfl( reinterpret_cast(&in)[i] , lane , width ); + } +} + +//---------------------------------------------------------------------------- + +template< typename T > +__device__ inline +void cuda_shfl_down( T & out , T const & in , int delta , + typename std::enable_if< sizeof(int) == sizeof(T) , int >::type width ) +{ + *reinterpret_cast(&out) = + __shfl_down( *reinterpret_cast(&in) , delta , width ); +} + +template< typename T > +__device__ inline +void cuda_shfl_down( T & out , T const & in , int delta , + typename std::enable_if + < ( sizeof(int) < sizeof(T) ) && ( 0 == ( sizeof(T) % sizeof(int) ) ) + , int >::type width ) +{ + enum : int { N = sizeof(T) / sizeof(int) }; + + for ( int i = 0 ; i < N ; ++i ) { + reinterpret_cast(&out)[i] = + __shfl_down( reinterpret_cast(&in)[i] , delta , width ); + } +} +//---------------------------------------------------------------------------- -//Shfl based reductions +template< typename T > +__device__ inline +void cuda_shfl_up( T & out , T const & in , int delta , + typename std::enable_if< sizeof(int) == sizeof(T) , int >::type width ) +{ + *reinterpret_cast(&out) = + __shfl_up( *reinterpret_cast(&in) , delta , width ); +} + +template< typename T > +__device__ inline +void cuda_shfl_up( T & out , T const & in , int delta , + typename std::enable_if + < ( sizeof(int) < sizeof(T) ) && ( 0 == ( sizeof(T) % sizeof(int) ) ) + , int >::type width ) +{ + enum : int { N = sizeof(T) / sizeof(int) }; + + for ( int i = 0 ; i < N ; ++i ) { + reinterpret_cast(&out)[i] = + __shfl_up( reinterpret_cast(&in)[i] , delta , width ); + } +} + +//---------------------------------------------------------------------------- +/** \brief Reduce within a warp over blockDim.x, the "vector" dimension. + * + * This will be called within a nested, intra-team parallel operation. + * Use shuffle operations to avoid conflicts with shared memory usage. + * + * Requires: + * blockDim.x is power of 2 + * blockDim.x <= 32 (one warp) + * + * Cannot use "butterfly" pattern because floating point + * addition is non-associative. Therefore, must broadcast + * the final result. + */ +template< class Reducer > +__device__ inline +void cuda_intra_warp_vector_reduce( Reducer const & reducer ) +{ + static_assert( + std::is_reference< typename Reducer::reference_type >::value , "" ); + + if ( 1 < blockDim.x ) { + + typename Reducer::value_type tmp ; + + for ( int i = blockDim.x ; ( i >>= 1 ) ; ) { + + cuda_shfl_down( tmp , reducer.reference() , i , blockDim.x ); + + if ( threadIdx.x < i ) { reducer.join( reducer.data() , & tmp ); } + } + + // Broadcast from root "lane" to all other "lanes" + + cuda_shfl( reducer.reference() , reducer.reference() , 0 , blockDim.x ); + } +} + +/** \brief Inclusive scan over blockDim.x, the "vector" dimension. + * + * This will be called within a nested, intra-team parallel operation. + * Use shuffle operations to avoid conflicts with shared memory usage. + * + * Algorithm is concurrent bottom-up reductions in triangular pattern + * where each CUDA thread is the root of a reduction tree from the + * zeroth CUDA thread to itself. + * + * Requires: + * blockDim.x is power of 2 + * blockDim.x <= 32 (one warp) + */ +template< typename ValueType > +__device__ inline +void cuda_intra_warp_vector_inclusive_scan( ValueType & local ) +{ + ValueType tmp ; + + // Bottom up: + // [t] += [t-1] if t >= 1 + // [t] += [t-2] if t >= 2 + // [t] += [t-4] if t >= 4 + // ... + + for ( int i = 1 ; i < blockDim.x ; i <<= 1 ) { + + cuda_shfl_up( tmp , local , i , blockDim.x ); + + if ( i <= threadIdx.x ) { local += tmp ; } + } +} + +//---------------------------------------------------------------------------- /* * Algorithmic constraints: * (a) threads with same threadIdx.y have same value @@ -98,7 +246,10 @@ inline void cuda_inter_warp_reduction( ValueType& value, const int max_active_thread = blockDim.y) { #define STEP_WIDTH 4 - __shared__ char sh_result[sizeof(ValueType)*STEP_WIDTH]; + // Depending on the ValueType _shared__ memory must be aligned up to 8byte boundaries + // The reason not to use ValueType directly is that for types with constructors it + // could lead to race conditions + __shared__ double sh_result[(sizeof(ValueType)+7)/8*STEP_WIDTH]; ValueType* result = (ValueType*) & sh_result; const unsigned step = 32 / blockDim.x; unsigned shift = STEP_WIDTH; diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp index c96b8b7d40..cf3e55d50c 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp @@ -91,7 +91,7 @@ void TaskQueueSpecialization< Kokkos::Cuda >::driver // Loop by priority and then type for ( int i = 0 ; i < Queue::NumQueue && end == task.ptr ; ++i ) { for ( int j = 0 ; j < 2 && end == task.ptr ; ++j ) { - task.ptr = Queue::pop_task( & queue->m_ready[i][j] ); + task.ptr = Queue::pop_ready_task( & queue->m_ready[i][j] ); } } diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp index 479294f307..a13e37837d 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp @@ -61,6 +61,8 @@ void set_cuda_task_base_apply_function_pointer } +template< class > class TaskExec ; + template<> class TaskQueueSpecialization< Kokkos::Cuda > { @@ -69,6 +71,7 @@ public: using execution_space = Kokkos::Cuda ; using memory_space = Kokkos::CudaUVMSpace ; using queue_type = TaskQueue< execution_space > ; + using member_type = TaskExec< Kokkos::Cuda > ; static void iff_single_thread_recursive_execute( queue_type * const ) {} @@ -79,13 +82,15 @@ public: static void execute( queue_type * const ); - template< typename FunctorType > + template< typename TaskType > static - void proc_set_apply( TaskBase::function_type * ptr ) + typename TaskType::function_type + get_function_pointer() { - using TaskType = TaskBase< execution_space - , typename FunctorType::value_type - , FunctorType > ; + using function_type = typename TaskType::function_type ; + + function_type * const ptr = + (function_type*) cuda_internal_scratch_unified( sizeof(function_type) ); CUDA_SAFE_CALL( cudaDeviceSynchronize() ); @@ -93,6 +98,8 @@ public: CUDA_SAFE_CALL( cudaGetLastError() ); CUDA_SAFE_CALL( cudaDeviceSynchronize() ); + + return *ptr ; } }; @@ -435,18 +442,26 @@ void parallel_reduce // blockDim.y == team_size // threadIdx.x == position in vec // threadIdx.y == member number -template< typename ValueType, typename iType, class Lambda > +template< typename iType, class Closure > KOKKOS_INLINE_FUNCTION void parallel_scan (const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda) { + const Closure & closure ) +{ + // Extract value_type from closure - ValueType accum = 0 ; - ValueType val, y, local_total; + using value_type = + typename Kokkos::Impl::FunctorAnalysis + < Kokkos::Impl::FunctorPatternInterface::SCAN + , void + , Closure >::value_type ; + + value_type accum = 0 ; + value_type val, y, local_total; for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { val = 0; - lambda(i,val,false); + closure(i,val,false); // intra-blockDim.y exclusive scan on 'val' // accum = accumulated, sum in total for this iteration @@ -458,7 +473,7 @@ void parallel_scan } // pass accum to all threads - local_total = shfl_warp_broadcast(val, + local_total = shfl_warp_broadcast(val, threadIdx.x+Impl::CudaTraits::WarpSize-blockDim.x, Impl::CudaTraits::WarpSize); @@ -467,7 +482,7 @@ void parallel_scan if ( threadIdx.y == 0 ) { val = 0 ; } val += accum; - lambda(i,val,true); + closure(i,val,true); accum += local_total; } } @@ -478,18 +493,26 @@ void parallel_scan // blockDim.y == team_size // threadIdx.x == position in vec // threadIdx.y == member number -template< typename iType, class Lambda, typename ValueType > +template< typename iType, class Closure > KOKKOS_INLINE_FUNCTION void parallel_scan (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda) + const Closure & closure ) { - ValueType accum = 0 ; - ValueType val, y, local_total; + // Extract value_type from closure + + using value_type = + typename Kokkos::Impl::FunctorAnalysis + < Kokkos::Impl::FunctorPatternInterface::SCAN + , void + , Closure >::value_type ; + + value_type accum = 0 ; + value_type val, y, local_total; for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { val = 0; - lambda(i,val,false); + closure(i,val,false); // intra-blockDim.x exclusive scan on 'val' // accum = accumulated, sum in total for this iteration @@ -501,14 +524,14 @@ void parallel_scan } // pass accum to all threads - local_total = shfl_warp_broadcast(val, blockDim.x-1, blockDim.x); + local_total = shfl_warp_broadcast(val, blockDim.x-1, blockDim.x); // make EXCLUSIVE scan by shifting values over one val = Kokkos::shfl_up(val, 1, blockDim.x); if ( threadIdx.x == 0 ) { val = 0 ; } val += accum; - lambda(i,val,true); + closure(i,val,true); accum += local_total; } } diff --git a/lib/kokkos/core/src/KokkosExp_MDRangePolicy.hpp b/lib/kokkos/core/src/KokkosExp_MDRangePolicy.hpp index 4e1ce855c5..a450ca36ae 100644 --- a/lib/kokkos/core/src/KokkosExp_MDRangePolicy.hpp +++ b/lib/kokkos/core/src/KokkosExp_MDRangePolicy.hpp @@ -44,36 +44,47 @@ #ifndef KOKKOS_CORE_EXP_MD_RANGE_POLICY_HPP #define KOKKOS_CORE_EXP_MD_RANGE_POLICY_HPP +#include + +#include #include #include -#include -#if defined(KOKKOS_OPT_RANGE_AGGRESSIVE_VECTORIZATION) && defined(KOKKOS_ENABLE_PRAGMA_IVDEP) && !defined(__CUDA_ARCH__) -#define KOKKOS_IMPL_MDRANGE_IVDEP +#if defined( __CUDACC__ ) && defined( KOKKOS_ENABLE_CUDA ) +#include #endif namespace Kokkos { namespace Experimental { +// ------------------------------------------------------------------ // + enum class Iterate { Default, // Default for the device Left, // Left indices stride fastest Right, // Right indices stride fastest - Flat, // Do not tile, only valid for inner direction }; template struct default_outer_direction { using type = Iterate; + #if defined( KOKKOS_ENABLE_CUDA) + static constexpr Iterate value = Iterate::Left; + #else static constexpr Iterate value = Iterate::Right; + #endif }; template struct default_inner_direction { using type = Iterate; + #if defined( KOKKOS_ENABLE_CUDA) + static constexpr Iterate value = Iterate::Left; + #else static constexpr Iterate value = Iterate::Right; + #endif }; @@ -86,7 +97,7 @@ struct Rank { static_assert( N != 0u, "Kokkos Error: rank 0 undefined"); static_assert( N != 1u, "Kokkos Error: rank 1 is not a multi-dimensional range"); - static_assert( N < 4u, "Kokkos Error: Unsupported rank..."); + static_assert( N < 7u, "Kokkos Error: Unsupported rank..."); using iteration_pattern = Rank; @@ -96,515 +107,370 @@ struct Rank }; - // multi-dimensional iteration pattern template struct MDRangePolicy + : public Kokkos::Impl::PolicyTraits { + using traits = Kokkos::Impl::PolicyTraits; using range_policy = RangePolicy; - static_assert( !std::is_same::value + using impl_range_policy = RangePolicy< typename traits::execution_space + , typename traits::schedule_type + , typename traits::index_type + > ; + + static_assert( !std::is_same::value , "Kokkos Error: MD iteration pattern not defined" ); - using iteration_pattern = typename range_policy::iteration_pattern; - using work_tag = typename range_policy::work_tag; + using iteration_pattern = typename traits::iteration_pattern; + using work_tag = typename traits::work_tag; static constexpr int rank = iteration_pattern::rank; static constexpr int outer_direction = static_cast ( - (iteration_pattern::outer_direction != Iterate::Default && iteration_pattern::outer_direction != Iterate::Flat) + (iteration_pattern::outer_direction != Iterate::Default) ? iteration_pattern::outer_direction - : default_outer_direction< typename range_policy::execution_space>::value ); + : default_outer_direction< typename traits::execution_space>::value ); static constexpr int inner_direction = static_cast ( iteration_pattern::inner_direction != Iterate::Default ? iteration_pattern::inner_direction - : default_inner_direction< typename range_policy::execution_space>::value ) ; + : default_inner_direction< typename traits::execution_space>::value ) ; // Ugly ugly workaround intel 14 not handling scoped enum correctly - static constexpr int Flat = static_cast( Iterate::Flat ); static constexpr int Right = static_cast( Iterate::Right ); - - - using size_type = typename range_policy::index_type; - using index_type = typename std::make_signed::type; - - - template - MDRangePolicy( std::initializer_list upper_corner ) + static constexpr int Left = static_cast( Iterate::Left ); + + using index_type = typename traits::index_type; + using array_index_type = long; + using point_type = Kokkos::Array; //was index_type + using tile_type = Kokkos::Array; + // If point_type or tile_type is not templated on a signed integral type (if it is unsigned), + // then if user passes in intializer_list of runtime-determined values of + // signed integral type that are not const will receive a compiler error due + // to an invalid case for implicit conversion - + // "conversion from integer or unscoped enumeration type to integer type that cannot represent all values of the original, except where source is a constant expression whose value can be stored exactly in the target type" + // This would require the user to either pass a matching index_type parameter + // as template parameter to the MDRangePolicy or static_cast the individual values + + MDRangePolicy( point_type const& lower, point_type const& upper, tile_type const& tile = tile_type{} ) + : m_lower(lower) + , m_upper(upper) + , m_tile(tile) + , m_num_tiles(1) { - static_assert( std::is_integral::value, "Kokkos Error: corner defined with non-integral type" ); - - // TODO check size of lists equal to rank - // static_asserts on initializer_list.size() require c++14 - - //static_assert( upper_corner.size() == rank, "Kokkos Error: upper_corner has incorrect rank" ); - - const auto u = upper_corner.begin(); - - m_num_tiles = 1; - for (int i=0; i(0); - m_dim[i] = static_cast(u[i]); - if (inner_direction != Flat) { - // default tile size to 4 - m_tile[i] = 4; - } else { - m_tile[i] = 1; + // Host + if ( true + #if defined(KOKKOS_ENABLE_CUDA) + && !std::is_same< typename traits::execution_space, Kokkos::Cuda >::value + #endif + ) + { + index_type span; + for (int i=0; i 0)) ) + { + m_tile[i] = 2; + } + else { + m_tile[i] = span; + } + } + m_tile_end[i] = static_cast((span + m_tile[i] - 1) / m_tile[i]); + m_num_tiles *= m_tile_end[i]; } - m_tile_dim[i] = (m_dim[i] + (m_tile[i] - 1)) / m_tile[i]; - m_num_tiles *= m_tile_dim[i]; } - } - - template - MDRangePolicy( std::initializer_list corner_a - , std::initializer_list corner_b - ) - { - static_assert( std::is_integral::value, "Kokkos Error: corner A defined with non-integral type" ); - static_assert( std::is_integral::value, "Kokkos Error: corner B defined with non-integral type" ); - - // TODO check size of lists equal to rank - // static_asserts on initializer_list.size() require c++14 - //static_assert( corner_a.size() == rank, "Kokkos Error: corner_a has incorrect rank" ); - //static_assert( corner_b.size() == rank, "Kokkos Error: corner_b has incorrect rank" ); - - - using A = typename std::make_signed::type; - using B = typename std::make_signed::type; - - const auto a = [=](int i) { return static_cast(corner_a.begin()[i]); }; - const auto b = [=](int i) { return static_cast(corner_b.begin()[i]); }; - - m_num_tiles = 1; - for (int i=0; i(a(i) <= b(i) ? a(i) : b(i)); - m_dim[i] = static_cast(a(i) <= b(i) ? b(i) - a(i) : a(i) - b(i)); - if (inner_direction != Flat) { - // default tile size to 4 - m_tile[i] = 4; - } else { - m_tile[i] = 1; + #if defined(KOKKOS_ENABLE_CUDA) + else // Cuda + { + index_type span; + for (int i=0; i 0)) ) + { + m_tile[i] = 2; + } + else { + m_tile[i] = 16; + } + } + m_tile_end[i] = static_cast((span + m_tile[i] - 1) / m_tile[i]); + m_num_tiles *= m_tile_end[i]; + } + index_type total_tile_size_check = 1; + for (int i=0; i= 1024 ) { // improve this check - 1024,1024,64 max per dim (Kepler), but product num_threads < 1024; more restrictions pending register limit + printf(" Tile dimensions exceed Cuda limits\n"); + Kokkos::abort(" Cuda ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); + //Kokkos::Impl::throw_runtime_exception( " Cuda ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); } - m_tile_dim[i] = (m_dim[i] + (m_tile[i] - 1)) / m_tile[i]; - m_num_tiles *= m_tile_dim[i]; - } - } - - template - MDRangePolicy( std::initializer_list corner_a - , std::initializer_list corner_b - , std::initializer_list tile - ) - { - static_assert( std::is_integral::value, "Kokkos Error: corner A defined with non-integral type" ); - static_assert( std::is_integral::value, "Kokkos Error: corner B defined with non-integral type" ); - static_assert( std::is_integral::value, "Kokkos Error: tile defined with non-integral type" ); - static_assert( inner_direction != Flat, "Kokkos Error: tiling not support with flat iteration" ); - - // TODO check size of lists equal to rank - // static_asserts on initializer_list.size() require c++14 - //static_assert( corner_a.size() == rank, "Kokkos Error: corner_a has incorrect rank" ); - //static_assert( corner_b.size() == rank, "Kokkos Error: corner_b has incorrect rank" ); - //static_assert( tile.size() == rank, "Kokkos Error: tile has incorrect rank" ); - - using A = typename std::make_signed::type; - using B = typename std::make_signed::type; - - const auto a = [=](int i) { return static_cast(corner_a.begin()[i]); }; - const auto b = [=](int i) { return static_cast(corner_b.begin()[i]); }; - const auto t = tile.begin(); - - m_num_tiles = 1; - for (int i=0; i(a(i) <= b(i) ? a(i) : b(i)); - m_dim[i] = static_cast(a(i) <= b(i) ? b(i) - a(i) : a(i) - b(i)); - m_tile[i] = static_cast(t[i] > (T)0 ? t[i] : (T)1 ); - m_tile_dim[i] = (m_dim[i] + (m_tile[i] - 1)) / m_tile[i]; - m_num_tiles *= m_tile_dim[i]; } + #endif } - index_type m_offset[rank]; - index_type m_dim[rank]; - int m_tile[rank]; - index_type m_tile_dim[rank]; - size_type m_num_tiles; // product of tile dims -}; - -namespace Impl { -// Serial, Threads, OpenMP -// use enable_if to overload for Cuda -template < typename MDRange, typename Functor, typename Enable = void > -struct MDForFunctor -{ - using work_tag = typename MDRange::work_tag; - using index_type = typename MDRange::index_type; - using size_type = typename MDRange::size_type; - - MDRange m_range; - Functor m_func; - - KOKKOS_INLINE_FUNCTION - MDForFunctor( MDRange const& range, Functor const& f ) - : m_range(range) - , m_func( f ) - {} - - KOKKOS_INLINE_FUNCTION - MDForFunctor( MDRange const& range, Functor && f ) - : m_range(range) - , m_func( std::forward(f) ) - {} - - KOKKOS_INLINE_FUNCTION - MDForFunctor( MDRange && range, Functor const& f ) - : m_range( std::forward(range) ) - , m_func( f ) - {} - - KOKKOS_INLINE_FUNCTION - MDForFunctor( MDRange && range, Functor && f ) - : m_range( std::forward(range) ) - , m_func( std::forward(f) ) - {} - - - KOKKOS_INLINE_FUNCTION - MDForFunctor( MDForFunctor const& ) = default; - - KOKKOS_INLINE_FUNCTION - MDForFunctor& operator=( MDForFunctor const& ) = default; - - KOKKOS_INLINE_FUNCTION - MDForFunctor( MDForFunctor && ) = default; - - KOKKOS_INLINE_FUNCTION - MDForFunctor& operator=( MDForFunctor && ) = default; - - // Rank-2, Flat, No Tag - template - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if<( std::is_integral::value - && std::is_same::value - && MDRange::rank == 2 - && MDRange::inner_direction == MDRange::Flat - )>::type - operator()(Idx t) const + template < typename LT , typename UT , typename TT = array_index_type > + MDRangePolicy( std::initializer_list const& lower, std::initializer_list const& upper, std::initializer_list const& tile = {} ) { - if ( MDRange::outer_direction == MDRange::Right ) { - m_func( m_range.m_offset[0] + ( t / m_range.m_dim[1] ) - , m_range.m_offset[1] + ( t % m_range.m_dim[1] ) ); - } else { - m_func( m_range.m_offset[0] + ( t % m_range.m_dim[0] ) - , m_range.m_offset[1] + ( t / m_range.m_dim[0] ) ); +#if 0 + // This should work, less duplicated code but not yet extensively tested + point_type lower_tmp, upper_tmp; + tile_type tile_tmp; + for ( auto i = 0; i < rank; ++i ) { + lower_tmp[i] = static_cast(lower.begin()[i]); + upper_tmp[i] = static_cast(upper.begin()[i]); + tile_tmp[i] = static_cast(tile.begin()[i]); } - } - // Rank-2, Flat, Tag - template - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if<( std::is_integral::value - && !std::is_same::value - && MDRange::rank == 2 - && MDRange::inner_direction == MDRange::Flat - )>::type - operator()(Idx t) const - { - if ( MDRange::outer_direction == MDRange::Right ) { - m_func( work_tag{}, m_range.m_offset[0] + ( t / m_range.m_dim[1] ) - , m_range.m_offset[1] + ( t % m_range.m_dim[1] ) ); - } else { - m_func( work_tag{}, m_range.m_offset[0] + ( t % m_range.m_dim[0] ) - , m_range.m_offset[1] + ( t / m_range.m_dim[0] ) ); - } - } + MDRangePolicy( lower_tmp, upper_tmp, tile_tmp ); - // Rank-2, Not Flat, No Tag - template - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if<( std::is_integral::value - && std::is_same::value - && MDRange::rank == 2 - && MDRange::inner_direction != MDRange::Flat - )>::type - operator()(Idx t) const - { - index_type t0, t1; - if ( MDRange::outer_direction == MDRange::Right ) { - t0 = t / m_range.m_tile_dim[1]; - t1 = t % m_range.m_tile_dim[1]; - } else { - t0 = t % m_range.m_tile_dim[0]; - t1 = t / m_range.m_tile_dim[0]; - } +#else + if(m_lower.size()!=rank || m_upper.size() != rank) + Kokkos::abort("MDRangePolicy: Constructor initializer lists have wrong size"); - const index_type b0 = t0 * m_range.m_tile[0] + m_range.m_offset[0]; - const index_type b1 = t1 * m_range.m_tile[1] + m_range.m_offset[1]; - - const index_type e0 = b0 + m_range.m_tile[0] <= (m_range.m_dim[0] + m_range.m_offset[0] ) ? b0 + m_range.m_tile[0] : ( m_range.m_dim[0] + m_range.m_offset[0] ); - const index_type e1 = b1 + m_range.m_tile[1] <= (m_range.m_dim[1] + m_range.m_offset[1] ) ? b1 + m_range.m_tile[1] : ( m_range.m_dim[1] + m_range.m_offset[1] ); - - if ( MDRange::inner_direction == MDRange::Right ) { - for (int i0=b0; i0(lower.begin()[i]); + m_upper[i] = static_cast(upper.begin()[i]); + if(tile.size()==rank) + m_tile[i] = static_cast(tile.begin()[i]); + else + m_tile[i] = 0; } - } - // Rank-2, Not Flat, Tag - template - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if<( std::is_integral::value - && !std::is_same::value - && MDRange::rank == 2 - && MDRange::inner_direction != MDRange::Flat - )>::type - operator()(Idx t) const - { - work_tag tag; - - index_type t0, t1; - if ( MDRange::outer_direction == MDRange::Right ) { - t0 = t / m_range.m_tile_dim[1]; - t1 = t % m_range.m_tile_dim[1]; - } else { - t0 = t % m_range.m_tile_dim[0]; - t1 = t / m_range.m_tile_dim[0]; - } + m_num_tiles = 1; - const index_type b0 = t0 * m_range.m_tile[0] + m_range.m_offset[0]; - const index_type b1 = t1 * m_range.m_tile[1] + m_range.m_offset[1]; - - const index_type e0 = b0 + m_range.m_tile[0] <= (m_range.m_dim[0] + m_range.m_offset[0] ) ? b0 + m_range.m_tile[0] : ( m_range.m_dim[0] + m_range.m_offset[0] ); - const index_type e1 = b1 + m_range.m_tile[1] <= (m_range.m_dim[1] + m_range.m_offset[1] ) ? b1 + m_range.m_tile[1] : ( m_range.m_dim[1] + m_range.m_offset[1] ); - - if ( MDRange::inner_direction == MDRange::Right ) { - for (int i0=b0; i0 - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if<( std::is_integral::value - && std::is_same::value - && MDRange::rank == 3 - && MDRange::inner_direction == MDRange::Flat - )>::type - operator()(Idx t) const - { - if ( MDRange::outer_direction == MDRange::Right ) { - const int64_t tmp_prod = m_range.m_dim[1]*m_range.m_dim[2]; - m_func( m_range.m_offset[0] + ( t / tmp_prod ) - , m_range.m_offset[1] + ( (t % tmp_prod) / m_range.m_dim[2] ) - , m_range.m_offset[2] + ( (t % tmp_prod) % m_range.m_dim[2] ) - ); - } else { - const int64_t tmp_prod = m_range.m_dim[0]*m_range.m_dim[1]; - m_func( m_range.m_offset[0] + ( (t % tmp_prod) % m_range.m_dim[0] ) - , m_range.m_offset[1] + ( (t % tmp_prod) / m_range.m_dim[0] ) - , m_range.m_offset[2] + ( t / tmp_prod ) - ); + // Host + if ( true + #if defined(KOKKOS_ENABLE_CUDA) + && !std::is_same< typename traits::execution_space, Kokkos::Cuda >::value + #endif + ) + { + index_type span; + for (int i=0; i 0)) ) + { + m_tile[i] = 2; + } + else { + m_tile[i] = span; + } + } + m_tile_end[i] = static_cast((span + m_tile[i] - 1) / m_tile[i]); + m_num_tiles *= m_tile_end[i]; + } } - } - - // Rank-3, Flat, Tag - template - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if<( std::is_integral::value - && !std::is_same::value - && MDRange::rank == 3 - && MDRange::inner_direction == MDRange::Flat - )>::type - operator()(Idx t) const - { - if ( MDRange::outer_direction == MDRange::Right ) { - const int64_t tmp_prod = m_range.m_dim[1]*m_range.m_dim[2]; - m_func( work_tag{} - , m_range.m_offset[0] + ( t / tmp_prod ) - , m_range.m_offset[1] + ( (t % tmp_prod) / m_range.m_dim[2] ) - , m_range.m_offset[2] + ( (t % tmp_prod) % m_range.m_dim[2] ) - ); - } else { - const int64_t tmp_prod = m_range.m_dim[0]*m_range.m_dim[1]; - m_func( work_tag{} - , m_range.m_offset[0] + ( (t % tmp_prod) % m_range.m_dim[0] ) - , m_range.m_offset[1] + ( (t % tmp_prod) / m_range.m_dim[0] ) - , m_range.m_offset[2] + ( t / tmp_prod ) - ); + #if defined(KOKKOS_ENABLE_CUDA) + else // Cuda + { + index_type span; + for (int i=0; i 0)) ) + { + m_tile[i] = 2; + } + else { + m_tile[i] = 16; + } + } + m_tile_end[i] = static_cast((span + m_tile[i] - 1) / m_tile[i]); + m_num_tiles *= m_tile_end[i]; + } + index_type total_tile_size_check = 1; + for (int i=0; i= 1024 ) { // improve this check - 1024,1024,64 max per dim (Kepler), but product num_threads < 1024; more restrictions pending register limit + printf(" Tile dimensions exceed Cuda limits\n"); + Kokkos::abort(" Cuda ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); + //Kokkos::Impl::throw_runtime_exception( " Cuda ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); + } } + #endif +#endif } - // Rank-3, Not Flat, No Tag - template - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if<( std::is_integral::value - && std::is_same::value - && MDRange::rank == 3 - && MDRange::inner_direction != MDRange::Flat - )>::type - operator()(Idx t) const - { - index_type t0, t1, t2; - if ( MDRange::outer_direction == MDRange::Right ) { - const index_type tmp_prod = ( m_range.m_tile_dim[1]*m_range.m_tile_dim[2]); - t0 = t / tmp_prod; - t1 = ( t % tmp_prod ) / m_range.m_tile_dim[2]; - t2 = ( t % tmp_prod ) % m_range.m_tile_dim[2]; - } else { - const index_type tmp_prod = ( m_range.m_tile_dim[0]*m_range.m_tile_dim[1]); - t0 = ( t % tmp_prod ) % m_range.m_tile_dim[0]; - t1 = ( t % tmp_prod ) / m_range.m_tile_dim[0]; - t2 = t / tmp_prod; - } - const index_type b0 = t0 * m_range.m_tile[0] + m_range.m_offset[0]; - const index_type b1 = t1 * m_range.m_tile[1] + m_range.m_offset[1]; - const index_type b2 = t2 * m_range.m_tile[2] + m_range.m_offset[2]; - - const index_type e0 = b0 + m_range.m_tile[0] <= (m_range.m_dim[0] + m_range.m_offset[0] ) ? b0 + m_range.m_tile[0] : ( m_range.m_dim[0] + m_range.m_offset[0] ); - const index_type e1 = b1 + m_range.m_tile[1] <= (m_range.m_dim[1] + m_range.m_offset[1] ) ? b1 + m_range.m_tile[1] : ( m_range.m_dim[1] + m_range.m_offset[1] ); - const index_type e2 = b2 + m_range.m_tile[2] <= (m_range.m_dim[2] + m_range.m_offset[2] ) ? b2 + m_range.m_tile[2] : ( m_range.m_dim[2] + m_range.m_offset[2] ); - - if ( MDRange::inner_direction == MDRange::Right ) { - for (int i0=b0; i0 - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if<( std::is_integral::value - && !std::is_same::value - && MDRange::rank == 3 - && MDRange::inner_direction != MDRange::Flat - )>::type - operator()(Idx t) const - { - work_tag tag; - - index_type t0, t1, t2; - if ( MDRange::outer_direction == MDRange::Right ) { - const index_type tmp_prod = ( m_range.m_tile_dim[1]*m_range.m_tile_dim[2]); - t0 = t / tmp_prod; - t1 = ( t % tmp_prod ) / m_range.m_tile_dim[2]; - t2 = ( t % tmp_prod ) % m_range.m_tile_dim[2]; - } else { - const index_type tmp_prod = ( m_range.m_tile_dim[0]*m_range.m_tile_dim[1]); - t0 = ( t % tmp_prod ) % m_range.m_tile_dim[0]; - t1 = ( t % tmp_prod ) / m_range.m_tile_dim[0]; - t2 = t / tmp_prod; - } +// ------------------------------------------------------------------ // +//md_parallel_for +// ------------------------------------------------------------------ // +template +void md_parallel_for( MDRange const& range + , Functor const& f + , const std::string& str = "" + , typename std::enable_if<( true + #if defined( KOKKOS_ENABLE_CUDA) + && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value + #endif + ) >::type* = 0 + ) +{ + Impl::MDFunctor g(range, f); - const index_type b0 = t0 * m_range.m_tile[0] + m_range.m_offset[0]; - const index_type b1 = t1 * m_range.m_tile[1] + m_range.m_offset[1]; - const index_type b2 = t2 * m_range.m_tile[2] + m_range.m_offset[2]; - - const index_type e0 = b0 + m_range.m_tile[0] <= (m_range.m_dim[0] + m_range.m_offset[0] ) ? b0 + m_range.m_tile[0] : ( m_range.m_dim[0] + m_range.m_offset[0] ); - const index_type e1 = b1 + m_range.m_tile[1] <= (m_range.m_dim[1] + m_range.m_offset[1] ) ? b1 + m_range.m_tile[1] : ( m_range.m_dim[1] + m_range.m_offset[1] ); - const index_type e2 = b2 + m_range.m_tile[2] <= (m_range.m_dim[2] + m_range.m_offset[2] ) ? b2 + m_range.m_tile[2] : ( m_range.m_dim[2] + m_range.m_offset[2] ); - - if ( MDRange::inner_direction == MDRange::Right ) { - for (int i0=b0; i0 +void md_parallel_for( const std::string& str + , MDRange const& range + , Functor const& f + , typename std::enable_if<( true + #if defined( KOKKOS_ENABLE_CUDA) + && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value + #endif + ) >::type* = 0 + ) +{ + Impl::MDFunctor g(range, f); + //using range_policy = typename MDRange::range_policy; + using range_policy = typename MDRange::impl_range_policy; -} // namespace Impl + Kokkos::parallel_for( range_policy(0, range.m_num_tiles).set_chunk_size(1), g, str ); +} +// Cuda specialization +#if defined( __CUDACC__ ) && defined( KOKKOS_ENABLE_CUDA ) +template +void md_parallel_for( const std::string& str + , MDRange const& range + , Functor const& f + , typename std::enable_if<( true + #if defined( KOKKOS_ENABLE_CUDA) + && std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value + #endif + ) >::type* = 0 + ) +{ + Impl::DeviceIterateTile closure(range, f); + closure.execute(); +} template void md_parallel_for( MDRange const& range , Functor const& f , const std::string& str = "" + , typename std::enable_if<( true + #if defined( KOKKOS_ENABLE_CUDA) + && std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value + #endif + ) >::type* = 0 ) { - Impl::MDForFunctor g(range, f); + Impl::DeviceIterateTile closure(range, f); + closure.execute(); +} +#endif +// ------------------------------------------------------------------ // - using range_policy = typename MDRange::range_policy; +// ------------------------------------------------------------------ // +//md_parallel_reduce +// ------------------------------------------------------------------ // +template +void md_parallel_reduce( MDRange const& range + , Functor const& f + , ValueType & v + , const std::string& str = "" + , typename std::enable_if<( true + #if defined( KOKKOS_ENABLE_CUDA) + && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value + #endif + ) >::type* = 0 + ) +{ + Impl::MDFunctor g(range, f, v); - Kokkos::parallel_for( range_policy(0, range.m_num_tiles).set_chunk_size(1), g, str ); + //using range_policy = typename MDRange::range_policy; + using range_policy = typename MDRange::impl_range_policy; + Kokkos::parallel_reduce( str, range_policy(0, range.m_num_tiles).set_chunk_size(1), g, v ); } -template -void md_parallel_for( const std::string& str +template +void md_parallel_reduce( const std::string& str , MDRange const& range , Functor const& f + , ValueType & v + , typename std::enable_if<( true + #if defined( KOKKOS_ENABLE_CUDA) + && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value + #endif + ) >::type* = 0 ) { - Impl::MDForFunctor g(range, f); + Impl::MDFunctor g(range, f, v); - using range_policy = typename MDRange::range_policy; + //using range_policy = typename MDRange::range_policy; + using range_policy = typename MDRange::impl_range_policy; - Kokkos::parallel_for( range_policy(0, range.m_num_tiles).set_chunk_size(1), g, str ); + Kokkos::parallel_reduce( str, range_policy(0, range.m_num_tiles).set_chunk_size(1), g, v ); } +// Cuda - parallel_reduce not implemented yet +/* +template +void md_parallel_reduce( MDRange const& range + , Functor const& f + , ValueType & v + , const std::string& str = "" + , typename std::enable_if<( true + #if defined( KOKKOS_ENABLE_CUDA) + && std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value + #endif + ) >::type* = 0 + ) +{ + Impl::DeviceIterateTile closure(range, f, v); + closure.execute(); +} + +template +void md_parallel_reduce( const std::string& str + , MDRange const& range + , Functor const& f + , ValueType & v + , typename std::enable_if<( true + #if defined( KOKKOS_ENABLE_CUDA) + && std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value + #endif + ) >::type* = 0 + ) +{ + Impl::DeviceIterateTile closure(range, f, v); + closure.execute(); +} +*/ + }} // namespace Kokkos::Experimental #endif //KOKKOS_CORE_EXP_MD_RANGE_POLICY_HPP diff --git a/lib/kokkos/core/src/Kokkos_Array.hpp b/lib/kokkos/core/src/Kokkos_Array.hpp index 8deb5142c4..abb263b7cc 100644 --- a/lib/kokkos/core/src/Kokkos_Array.hpp +++ b/lib/kokkos/core/src/Kokkos_Array.hpp @@ -59,8 +59,14 @@ template< class T = void , class Proxy = void > struct Array { -private: - T m_elem[N]; +public: + /** + * The elements of this C array shall not be accessed directly. The data + * member has to be declared public to enable aggregate initialization as for + * std::array. We mark it as private in the documentation. + * @private + */ + T m_internal_implementation_private_member_data[N]; public: typedef T & reference ; @@ -78,25 +84,32 @@ public: KOKKOS_INLINE_FUNCTION reference operator[]( const iType & i ) { - static_assert( std::is_integral::value , "Must be integral argument" ); - return m_elem[i]; + static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); + return m_internal_implementation_private_member_data[i]; } template< typename iType > KOKKOS_INLINE_FUNCTION const_reference operator[]( const iType & i ) const { - static_assert( std::is_integral::value , "Must be integral argument" ); - return m_elem[i]; + static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); + return m_internal_implementation_private_member_data[i]; } - KOKKOS_INLINE_FUNCTION pointer data() { return & m_elem[0] ; } - KOKKOS_INLINE_FUNCTION const_pointer data() const { return & m_elem[0] ; } + KOKKOS_INLINE_FUNCTION pointer data() + { + return & m_internal_implementation_private_member_data[0]; + } + KOKKOS_INLINE_FUNCTION const_pointer data() const + { + return & m_internal_implementation_private_member_data[0]; + } - ~Array() = default ; - Array() = default ; - Array( const Array & ) = default ; - Array & operator = ( const Array & ) = default ; + // Do not default unless move and move-assignment are also defined + // ~Array() = default ; + // Array() = default ; + // Array( const Array & ) = default ; + // Array & operator = ( const Array & ) = default ; // Some supported compilers are not sufficiently C++11 compliant // for default move constructor and move assignment operator. @@ -124,7 +137,7 @@ public: KOKKOS_INLINE_FUNCTION value_type operator[]( const iType & ) { - static_assert( std::is_integral::value , "Must be integer argument" ); + static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integer argument" ); return value_type(); } @@ -132,7 +145,7 @@ public: KOKKOS_INLINE_FUNCTION value_type operator[]( const iType & ) const { - static_assert( std::is_integral::value , "Must be integer argument" ); + static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integer argument" ); return value_type(); } @@ -181,7 +194,7 @@ public: KOKKOS_INLINE_FUNCTION reference operator[]( const iType & i ) { - static_assert( std::is_integral::value , "Must be integral argument" ); + static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); return m_elem[i]; } @@ -189,7 +202,7 @@ public: KOKKOS_INLINE_FUNCTION const_reference operator[]( const iType & i ) const { - static_assert( std::is_integral::value , "Must be integral argument" ); + static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); return m_elem[i]; } @@ -250,7 +263,7 @@ public: KOKKOS_INLINE_FUNCTION reference operator[]( const iType & i ) { - static_assert( std::is_integral::value , "Must be integral argument" ); + static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); return m_elem[i*m_stride]; } @@ -258,7 +271,7 @@ public: KOKKOS_INLINE_FUNCTION const_reference operator[]( const iType & i ) const { - static_assert( std::is_integral::value , "Must be integral argument" ); + static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); return m_elem[i*m_stride]; } diff --git a/lib/kokkos/core/src/Kokkos_Concepts.hpp b/lib/kokkos/core/src/Kokkos_Concepts.hpp index 3f9bdea40d..cfcdabf95e 100644 --- a/lib/kokkos/core/src/Kokkos_Concepts.hpp +++ b/lib/kokkos/core/src/Kokkos_Concepts.hpp @@ -102,6 +102,7 @@ KOKKOS_IMPL_IS_CONCEPT( memory_traits ) KOKKOS_IMPL_IS_CONCEPT( execution_space ) KOKKOS_IMPL_IS_CONCEPT( execution_policy ) KOKKOS_IMPL_IS_CONCEPT( array_layout ) +KOKKOS_IMPL_IS_CONCEPT( reducer ) namespace Impl { diff --git a/lib/kokkos/core/src/Kokkos_Core.hpp b/lib/kokkos/core/src/Kokkos_Core.hpp index 6d92f4bf61..16c1bce902 100644 --- a/lib/kokkos/core/src/Kokkos_Core.hpp +++ b/lib/kokkos/core/src/Kokkos_Core.hpp @@ -57,6 +57,10 @@ #include #endif +#if defined( KOKKOS_ENABLE_QTHREADS ) +#include +#endif + #if defined( KOKKOS_ENABLE_PTHREAD ) #include #endif @@ -76,6 +80,7 @@ #include +#include //---------------------------------------------------------------------------- @@ -105,6 +110,9 @@ void finalize_all(); void fence(); +/** \brief Print "Bill of Materials" */ +void print_configuration( std::ostream & , const bool detail = false ); + } // namespace Kokkos //---------------------------------------------------------------------------- @@ -159,4 +167,3 @@ void * kokkos_realloc( void * arg_alloc , const size_t arg_alloc_size ) //---------------------------------------------------------------------------- #endif - diff --git a/lib/kokkos/core/src/Kokkos_Core_fwd.hpp b/lib/kokkos/core/src/Kokkos_Core_fwd.hpp index e7e6a49d37..4029bf599c 100644 --- a/lib/kokkos/core/src/Kokkos_Core_fwd.hpp +++ b/lib/kokkos/core/src/Kokkos_Core_fwd.hpp @@ -63,7 +63,7 @@ namespace Kokkos { struct AUTO_t { KOKKOS_INLINE_FUNCTION - constexpr const AUTO_t & operator()() const { return *this ; } + constexpr const AUTO_t & operator()() const { return *this; } }; namespace { @@ -73,46 +73,49 @@ constexpr AUTO_t AUTO = Kokkos::AUTO_t(); struct InvalidType {}; -} +} // namespace Kokkos -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // Forward declarations for class inter-relationships namespace Kokkos { -class HostSpace ; ///< Memory space for main process and CPU execution spaces +class HostSpace; ///< Memory space for main process and CPU execution spaces #ifdef KOKKOS_ENABLE_HBWSPACE namespace Experimental { -class HBWSpace ; /// Memory space for hbw_malloc from memkind (e.g. for KNL processor) +class HBWSpace; /// Memory space for hbw_malloc from memkind (e.g. for KNL processor) } #endif #if defined( KOKKOS_ENABLE_SERIAL ) -class Serial ; ///< Execution space main process on CPU -#endif // defined( KOKKOS_ENABLE_SERIAL ) +class Serial; ///< Execution space main process on CPU. +#endif + +#if defined( KOKKOS_ENABLE_QTHREADS ) +class Qthreads; ///< Execution space with Qthreads back-end. +#endif #if defined( KOKKOS_ENABLE_PTHREAD ) -class Threads ; ///< Execution space with pthreads back-end +class Threads; ///< Execution space with pthreads back-end. #endif #if defined( KOKKOS_ENABLE_OPENMP ) -class OpenMP ; ///< OpenMP execution space +class OpenMP; ///< OpenMP execution space. #endif #if defined( KOKKOS_ENABLE_CUDA ) -class CudaSpace ; ///< Memory space on Cuda GPU -class CudaUVMSpace ; ///< Memory space on Cuda GPU with UVM -class CudaHostPinnedSpace ; ///< Memory space on Host accessible to Cuda GPU -class Cuda ; ///< Execution space for Cuda GPU +class CudaSpace; ///< Memory space on Cuda GPU +class CudaUVMSpace; ///< Memory space on Cuda GPU with UVM +class CudaHostPinnedSpace; ///< Memory space on Host accessible to Cuda GPU +class Cuda; ///< Execution space for Cuda GPU #endif template struct Device; + } // namespace Kokkos -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // Set the default execution space. @@ -122,60 +125,66 @@ struct Device; namespace Kokkos { -#if defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA ) - typedef Cuda DefaultExecutionSpace ; -#elif defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) - typedef OpenMP DefaultExecutionSpace ; -#elif defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) - typedef Threads DefaultExecutionSpace ; -#elif defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) - typedef Serial DefaultExecutionSpace ; +#if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA ) + typedef Cuda DefaultExecutionSpace; +#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) + typedef OpenMP DefaultExecutionSpace; +#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) + typedef Threads DefaultExecutionSpace; +//#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) +// typedef Qthreads DefaultExecutionSpace; +#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) + typedef Serial DefaultExecutionSpace; #else -# error "At least one of the following execution spaces must be defined in order to use Kokkos: Kokkos::Cuda, Kokkos::OpenMP, Kokkos::Serial, or Kokkos::Threads." +# error "At least one of the following execution spaces must be defined in order to use Kokkos: Kokkos::Cuda, Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qthreads, or Kokkos::Serial." #endif -#if defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) - typedef OpenMP DefaultHostExecutionSpace ; -#elif defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) - typedef Threads DefaultHostExecutionSpace ; -#elif defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) - typedef Serial DefaultHostExecutionSpace ; -#elif defined ( KOKKOS_ENABLE_OPENMP ) - typedef OpenMP DefaultHostExecutionSpace ; -#elif defined ( KOKKOS_ENABLE_PTHREAD ) - typedef Threads DefaultHostExecutionSpace ; -#elif defined ( KOKKOS_ENABLE_SERIAL ) - typedef Serial DefaultHostExecutionSpace ; +#if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) + typedef OpenMP DefaultHostExecutionSpace; +#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) + typedef Threads DefaultHostExecutionSpace; +//#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) +// typedef Qthreads DefaultHostExecutionSpace; +#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) + typedef Serial DefaultHostExecutionSpace; +#elif defined( KOKKOS_ENABLE_OPENMP ) + typedef OpenMP DefaultHostExecutionSpace; +#elif defined( KOKKOS_ENABLE_PTHREAD ) + typedef Threads DefaultHostExecutionSpace; +//#elif defined( KOKKOS_ENABLE_QTHREADS ) +// typedef Qthreads DefaultHostExecutionSpace; +#elif defined( KOKKOS_ENABLE_SERIAL ) + typedef Serial DefaultHostExecutionSpace; #else -# error "At least one of the following execution spaces must be defined in order to use Kokkos: Kokkos::OpenMP, Kokkos::Serial, or Kokkos::Threads." +# error "At least one of the following execution spaces must be defined in order to use Kokkos: Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qthreads, or Kokkos::Serial." #endif } // namespace Kokkos -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // Detect the active execution space and define its memory space. // This is used to verify whether a running kernel can access // a given memory space. namespace Kokkos { + namespace Impl { -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) && defined (KOKKOS_ENABLE_CUDA) -typedef Kokkos::CudaSpace ActiveExecutionMemorySpace ; +#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) && defined( KOKKOS_ENABLE_CUDA ) +typedef Kokkos::CudaSpace ActiveExecutionMemorySpace; #elif defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) -typedef Kokkos::HostSpace ActiveExecutionMemorySpace ; +typedef Kokkos::HostSpace ActiveExecutionMemorySpace; #else -typedef void ActiveExecutionMemorySpace ; +typedef void ActiveExecutionMemorySpace; #endif -template< class ActiveSpace , class MemorySpace > +template< class ActiveSpace, class MemorySpace > struct VerifyExecutionCanAccessMemorySpace { enum {value = 0}; }; template< class Space > -struct VerifyExecutionCanAccessMemorySpace< Space , Space > +struct VerifyExecutionCanAccessMemorySpace< Space, Space > { enum {value = 1}; KOKKOS_INLINE_FUNCTION static void verify(void) {} @@ -183,33 +192,33 @@ struct VerifyExecutionCanAccessMemorySpace< Space , Space > }; } // namespace Impl + } // namespace Kokkos -#define KOKKOS_RESTRICT_EXECUTION_TO_DATA( DATA_SPACE , DATA_PTR ) \ +#define KOKKOS_RESTRICT_EXECUTION_TO_DATA( DATA_SPACE, DATA_PTR ) \ Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< \ - Kokkos::Impl::ActiveExecutionMemorySpace , DATA_SPACE >::verify( DATA_PTR ) + Kokkos::Impl::ActiveExecutionMemorySpace, DATA_SPACE >::verify( DATA_PTR ) #define KOKKOS_RESTRICT_EXECUTION_TO_( DATA_SPACE ) \ Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< \ - Kokkos::Impl::ActiveExecutionMemorySpace , DATA_SPACE >::verify() + Kokkos::Impl::ActiveExecutionMemorySpace, DATA_SPACE >::verify() //---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- namespace Kokkos { void fence(); } -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { + namespace Impl { template< class Functor , class Policy , class EnableFunctor = void - , class EnablePolicy = void + , class EnablePolicy = void > struct FunctorPolicyExecutionSpace; @@ -220,18 +229,18 @@ struct FunctorPolicyExecutionSpace; /// /// This is an implementation detail of parallel_for. Users should /// skip this and go directly to the nonmember function parallel_for. -template< class FunctorType , class ExecPolicy , class ExecutionSpace = - typename Impl::FunctorPolicyExecutionSpace< FunctorType , ExecPolicy >::execution_space - > class ParallelFor ; +template< class FunctorType, class ExecPolicy, class ExecutionSpace = + typename Impl::FunctorPolicyExecutionSpace< FunctorType, ExecPolicy >::execution_space + > class ParallelFor; /// \class ParallelReduce /// \brief Implementation detail of parallel_reduce. /// /// This is an implementation detail of parallel_reduce. Users should /// skip this and go directly to the nonmember function parallel_reduce. -template< class FunctorType , class ExecPolicy , class ReducerType = InvalidType, class ExecutionSpace = - typename Impl::FunctorPolicyExecutionSpace< FunctorType , ExecPolicy >::execution_space - > class ParallelReduce ; +template< class FunctorType, class ExecPolicy, class ReducerType = InvalidType, class ExecutionSpace = + typename Impl::FunctorPolicyExecutionSpace< FunctorType, ExecPolicy >::execution_space + > class ParallelReduce; /// \class ParallelScan /// \brief Implementation detail of parallel_scan. @@ -239,10 +248,12 @@ template< class FunctorType , class ExecPolicy , class ReducerType = InvalidType /// This is an implementation detail of parallel_scan. Users should /// skip this and go directly to the documentation of the nonmember /// template function Kokkos::parallel_scan. -template< class FunctorType , class ExecPolicy , class ExecutionSapce = - typename Impl::FunctorPolicyExecutionSpace< FunctorType , ExecPolicy >::execution_space - > class ParallelScan ; +template< class FunctorType, class ExecPolicy, class ExecutionSapce = + typename Impl::FunctorPolicyExecutionSpace< FunctorType, ExecPolicy >::execution_space + > class ParallelScan; -}} -#endif /* #ifndef KOKKOS_CORE_FWD_HPP */ +} // namespace Impl + +} // namespace Kokkos +#endif /* #ifndef KOKKOS_CORE_FWD_HPP */ diff --git a/lib/kokkos/core/src/Kokkos_Cuda.hpp b/lib/kokkos/core/src/Kokkos_Cuda.hpp index afccdb6c52..433cac5e51 100644 --- a/lib/kokkos/core/src/Kokkos_Cuda.hpp +++ b/lib/kokkos/core/src/Kokkos_Cuda.hpp @@ -62,7 +62,6 @@ #include #include -#include /*--------------------------------------------------------------------------*/ @@ -295,6 +294,7 @@ struct VerifyExecutionCanAccessMemorySpace #include #include +#include //---------------------------------------------------------------------------- #endif /* #if defined( KOKKOS_ENABLE_CUDA ) */ diff --git a/lib/kokkos/core/src/Kokkos_HBWSpace.hpp b/lib/kokkos/core/src/Kokkos_HBWSpace.hpp index d6bf8dcdf4..fc39ce0e5b 100644 --- a/lib/kokkos/core/src/Kokkos_HBWSpace.hpp +++ b/lib/kokkos/core/src/Kokkos_HBWSpace.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -44,14 +44,16 @@ #ifndef KOKKOS_HBWSPACE_HPP #define KOKKOS_HBWSPACE_HPP - #include /*--------------------------------------------------------------------------*/ + #ifdef KOKKOS_ENABLE_HBWSPACE namespace Kokkos { + namespace Experimental { + namespace Impl { /// \brief Initialize lock array for arbitrary size atomics. @@ -67,7 +69,7 @@ void init_lock_array_hbw_space(); /// This function tries to aquire the lock for the hash value derived /// from the provided ptr. If the lock is successfully aquired the /// function returns true. Otherwise it returns false. -bool lock_address_hbw_space(void* ptr); +bool lock_address_hbw_space( void* ptr ); /// \brief Release lock for the address /// @@ -75,13 +77,16 @@ bool lock_address_hbw_space(void* ptr); /// from the provided ptr. This function should only be called /// after previously successfully aquiring a lock with /// lock_address. -void unlock_address_hbw_space(void* ptr); +void unlock_address_hbw_space( void* ptr ); } // namespace Impl -} // neamspace Experimental + +} // namespace Experimental + } // namespace Kokkos namespace Kokkos { + namespace Experimental { /// \class HBWSpace @@ -91,10 +96,9 @@ namespace Experimental { /// memory means the usual CPU-accessible memory. class HBWSpace { public: - //! Tag this class as a kokkos memory space - typedef HBWSpace memory_space ; - typedef size_t size_type ; + typedef HBWSpace memory_space; + typedef size_t size_type; /// \typedef execution_space /// \brief Default execution space for this memory space. @@ -103,21 +107,25 @@ public: /// useful for things like initializing a View (which happens in /// parallel using the View's default execution space). #if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) - typedef Kokkos::OpenMP execution_space ; + typedef Kokkos::OpenMP execution_space; #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) - typedef Kokkos::Threads execution_space ; + typedef Kokkos::Threads execution_space; +//#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) +// typedef Kokkos::Qthreads execution_space; #elif defined( KOKKOS_ENABLE_OPENMP ) - typedef Kokkos::OpenMP execution_space ; + typedef Kokkos::OpenMP execution_space; #elif defined( KOKKOS_ENABLE_PTHREAD ) - typedef Kokkos::Threads execution_space ; + typedef Kokkos::Threads execution_space; +//#elif defined( KOKKOS_ENABLE_QTHREADS ) +// typedef Kokkos::Qthreads execution_space; #elif defined( KOKKOS_ENABLE_SERIAL ) - typedef Kokkos::Serial execution_space ; + typedef Kokkos::Serial execution_space; #else -# error "At least one of the following host execution spaces must be defined: Kokkos::OpenMP, Kokkos::Serial, or Kokkos::Threads. You might be seeing this message if you disabled the Kokkos::Serial device explicitly using the Kokkos_ENABLE_Serial:BOOL=OFF CMake option, but did not enable any of the other host execution space devices." +# error "At least one of the following host execution spaces must be defined: Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qhreads, or Kokkos::Serial. You might be seeing this message if you disabled the Kokkos::Serial device explicitly using the Kokkos_ENABLE_Serial:BOOL=OFF CMake option, but did not enable any of the other host execution space devices." #endif //! This memory space preferred device_type - typedef Kokkos::Device device_type; + typedef Kokkos::Device< execution_space, memory_space > device_type; /*--------------------------------*/ /* Functions unique to the HBWSpace */ @@ -129,72 +137,73 @@ public: /**\brief Default memory space instance */ HBWSpace(); - HBWSpace( const HBWSpace & rhs ) = default ; - HBWSpace & operator = ( const HBWSpace & ) = default ; - ~HBWSpace() = default ; + HBWSpace( const HBWSpace & rhs ) = default; + HBWSpace & operator = ( const HBWSpace & ) = default; + ~HBWSpace() = default; /**\brief Non-default memory space instance to choose allocation mechansim, if available */ - enum AllocationMechanism { STD_MALLOC , POSIX_MEMALIGN , POSIX_MMAP , INTEL_MM_ALLOC }; + enum AllocationMechanism { STD_MALLOC, POSIX_MEMALIGN, POSIX_MMAP, INTEL_MM_ALLOC }; explicit HBWSpace( const AllocationMechanism & ); /**\brief Allocate untracked memory in the space */ - void * allocate( const size_t arg_alloc_size ) const ; + void * allocate( const size_t arg_alloc_size ) const; /**\brief Deallocate untracked memory in the space */ - void deallocate( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) const ; + void deallocate( void * const arg_alloc_ptr + , const size_t arg_alloc_size ) const; /**\brief Return Name of the MemorySpace */ static constexpr const char* name(); private: - AllocationMechanism m_alloc_mech ; + AllocationMechanism m_alloc_mech; static constexpr const char* m_name = "HBW"; - friend class Kokkos::Impl::SharedAllocationRecord< Kokkos::Experimental::HBWSpace , void > ; + friend class Kokkos::Impl::SharedAllocationRecord< Kokkos::Experimental::HBWSpace, void >; }; } // namespace Experimental + } // namespace Kokkos -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { + namespace Impl { template<> -class SharedAllocationRecord< Kokkos::Experimental::HBWSpace , void > - : public SharedAllocationRecord< void , void > +class SharedAllocationRecord< Kokkos::Experimental::HBWSpace, void > + : public SharedAllocationRecord< void, void > { private: - friend Kokkos::Experimental::HBWSpace ; + friend Kokkos::Experimental::HBWSpace; - typedef SharedAllocationRecord< void , void > RecordBase ; + typedef SharedAllocationRecord< void, void > RecordBase; - SharedAllocationRecord( const SharedAllocationRecord & ) = delete ; - SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ; + SharedAllocationRecord( const SharedAllocationRecord & ) = delete; + SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete; static void deallocate( RecordBase * ); /**\brief Root record for tracked allocations from this HBWSpace instance */ - static RecordBase s_root_record ; + static RecordBase s_root_record; - const Kokkos::Experimental::HBWSpace m_space ; + const Kokkos::Experimental::HBWSpace m_space; protected: ~SharedAllocationRecord(); - SharedAllocationRecord() = default ; + SharedAllocationRecord() = default; - SharedAllocationRecord( const Kokkos::Experimental::HBWSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const RecordBase::function_type arg_dealloc = & deallocate + SharedAllocationRecord( const Kokkos::Experimental::HBWSpace & arg_space + , const std::string & arg_label + , const size_t arg_alloc_size + , const RecordBase::function_type arg_dealloc = & deallocate ); public: @@ -206,23 +215,23 @@ public: } KOKKOS_INLINE_FUNCTION static - SharedAllocationRecord * allocate( const Kokkos::Experimental::HBWSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size + SharedAllocationRecord * allocate( const Kokkos::Experimental::HBWSpace & arg_space + , const std::string & arg_label + , const size_t arg_alloc_size ) { #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - return new SharedAllocationRecord( arg_space , arg_label , arg_alloc_size ); + return new SharedAllocationRecord( arg_space, arg_label, arg_alloc_size ); #else - return (SharedAllocationRecord *) 0 ; + return (SharedAllocationRecord *) 0; #endif } /**\brief Allocate tracked memory in the space */ static void * allocate_tracked( const Kokkos::Experimental::HBWSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size ); + , const std::string & arg_label + , const size_t arg_alloc_size ); /**\brief Reallocate tracked memory in the space */ static @@ -233,88 +242,93 @@ public: static void deallocate_tracked( void * const arg_alloc_ptr ); - static SharedAllocationRecord * get_record( void * arg_alloc_ptr ); - static void print_records( std::ostream & , const Kokkos::Experimental::HBWSpace & , bool detail = false ); + static void print_records( std::ostream &, const Kokkos::Experimental::HBWSpace &, bool detail = false ); }; } // namespace Impl -} // namespace Kokkos +} // namespace Kokkos -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { + namespace Impl { -static_assert( Kokkos::Impl::MemorySpaceAccess< Kokkos::Experimental::HBWSpace , Kokkos::Experimental::HBWSpace >::assignable , "" ); +static_assert( Kokkos::Impl::MemorySpaceAccess< Kokkos::Experimental::HBWSpace, Kokkos::Experimental::HBWSpace >::assignable, "" ); template<> -struct MemorySpaceAccess< Kokkos::HostSpace , Kokkos::Experimental::HBWSpace > { +struct MemorySpaceAccess< Kokkos::HostSpace, Kokkos::Experimental::HBWSpace > { enum { assignable = true }; enum { accessible = true }; enum { deepcopy = true }; }; template<> -struct MemorySpaceAccess< Kokkos::Experimental::HBWSpace , Kokkos::HostSpace> { +struct MemorySpaceAccess< Kokkos::Experimental::HBWSpace, Kokkos::HostSpace > { enum { assignable = false }; enum { accessible = true }; enum { deepcopy = true }; }; -}} +} // namespace Impl + +} // namespace Kokkos -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { -namespace Impl { +namespace Impl { -template -struct DeepCopy { - DeepCopy( void * dst , const void * src , size_t n ) { - memcpy( dst , src , n ); +template< class ExecutionSpace > +struct DeepCopy< Experimental::HBWSpace, Experimental::HBWSpace, ExecutionSpace > { + DeepCopy( void * dst, const void * src, size_t n ) { + memcpy( dst, src, n ); } - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) { + + DeepCopy( const ExecutionSpace& exec, void * dst, const void * src, size_t n ) { exec.fence(); - memcpy( dst , src , n ); + memcpy( dst, src, n ); } }; -template -struct DeepCopy { - DeepCopy( void * dst , const void * src , size_t n ) { - memcpy( dst , src , n ); +template< class ExecutionSpace > +struct DeepCopy< HostSpace, Experimental::HBWSpace, ExecutionSpace > { + DeepCopy( void * dst, const void * src, size_t n ) { + memcpy( dst, src, n ); } - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) { + + DeepCopy( const ExecutionSpace& exec, void * dst, const void * src, size_t n ) { exec.fence(); - memcpy( dst , src , n ); + memcpy( dst, src, n ); } }; -template -struct DeepCopy { - DeepCopy( void * dst , const void * src , size_t n ) { - memcpy( dst , src , n ); +template< class ExecutionSpace > +struct DeepCopy< Experimental::HBWSpace, HostSpace, ExecutionSpace > { + DeepCopy( void * dst, const void * src, size_t n ) { + memcpy( dst, src, n ); } - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) { + + DeepCopy( const ExecutionSpace& exec, void * dst, const void * src, size_t n ) { exec.fence(); - memcpy( dst , src , n ); + memcpy( dst, src, n ); } }; } // namespace Impl + } // namespace Kokkos namespace Kokkos { + namespace Impl { template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::Experimental::HBWSpace > +struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace, Kokkos::Experimental::HBWSpace > { enum { value = true }; inline static void verify( void ) { } @@ -322,7 +336,7 @@ struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::Experime }; template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::Experimental::HBWSpace , Kokkos::HostSpace > +struct VerifyExecutionCanAccessMemorySpace< Kokkos::Experimental::HBWSpace, Kokkos::HostSpace > { enum { value = true }; inline static void verify( void ) { } @@ -330,8 +344,9 @@ struct VerifyExecutionCanAccessMemorySpace< Kokkos::Experimental::HBWSpace , Kok }; } // namespace Impl + } // namespace Kokkos #endif -#endif /* #define KOKKOS_HBWSPACE_HPP */ +#endif // #define KOKKOS_HBWSPACE_HPP diff --git a/lib/kokkos/core/src/Kokkos_HostSpace.hpp b/lib/kokkos/core/src/Kokkos_HostSpace.hpp index e79de462bf..82006665ce 100644 --- a/lib/kokkos/core/src/Kokkos_HostSpace.hpp +++ b/lib/kokkos/core/src/Kokkos_HostSpace.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -60,6 +60,7 @@ /*--------------------------------------------------------------------------*/ namespace Kokkos { + namespace Impl { /// \brief Initialize lock array for arbitrary size atomics. @@ -83,9 +84,10 @@ bool lock_address_host_space(void* ptr); /// from the provided ptr. This function should only be called /// after previously successfully aquiring a lock with /// lock_address. -void unlock_address_host_space(void* ptr); +void unlock_address_host_space( void* ptr ); } // namespace Impl + } // namespace Kokkos namespace Kokkos { @@ -97,10 +99,9 @@ namespace Kokkos { /// memory means the usual CPU-accessible memory. class HostSpace { public: - //! Tag this class as a kokkos memory space - typedef HostSpace memory_space ; - typedef size_t size_type ; + typedef HostSpace memory_space; + typedef size_t size_type; /// \typedef execution_space /// \brief Default execution space for this memory space. @@ -109,21 +110,25 @@ public: /// useful for things like initializing a View (which happens in /// parallel using the View's default execution space). #if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) - typedef Kokkos::OpenMP execution_space ; + typedef Kokkos::OpenMP execution_space; #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) - typedef Kokkos::Threads execution_space ; + typedef Kokkos::Threads execution_space; +//#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) +// typedef Kokkos::Qthreads execution_space; #elif defined( KOKKOS_ENABLE_OPENMP ) - typedef Kokkos::OpenMP execution_space ; + typedef Kokkos::OpenMP execution_space; #elif defined( KOKKOS_ENABLE_PTHREAD ) - typedef Kokkos::Threads execution_space ; + typedef Kokkos::Threads execution_space; +//#elif defined( KOKKOS_ENABLE_QTHREADS ) +// typedef Kokkos::Qthreads execution_space; #elif defined( KOKKOS_ENABLE_SERIAL ) - typedef Kokkos::Serial execution_space ; + typedef Kokkos::Serial execution_space; #else -# error "At least one of the following host execution spaces must be defined: Kokkos::OpenMP, Kokkos::Serial, or Kokkos::Threads. You might be seeing this message if you disabled the Kokkos::Serial device explicitly using the Kokkos_ENABLE_Serial:BOOL=OFF CMake option, but did not enable any of the other host execution space devices." +# error "At least one of the following host execution spaces must be defined: Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qthreads, or Kokkos::Serial. You might be seeing this message if you disabled the Kokkos::Serial device explicitly using the Kokkos_ENABLE_Serial:BOOL=OFF CMake option, but did not enable any of the other host execution space devices." #endif //! This memory space preferred device_type - typedef Kokkos::Device device_type; + typedef Kokkos::Device< execution_space, memory_space > device_type; /*--------------------------------*/ /* Functions unique to the HostSpace */ @@ -135,61 +140,57 @@ public: /**\brief Default memory space instance */ HostSpace(); - HostSpace( HostSpace && rhs ) = default ; - HostSpace( const HostSpace & rhs ) = default ; - HostSpace & operator = ( HostSpace && ) = default ; - HostSpace & operator = ( const HostSpace & ) = default ; - ~HostSpace() = default ; + HostSpace( HostSpace && rhs ) = default; + HostSpace( const HostSpace & rhs ) = default; + HostSpace & operator = ( HostSpace && ) = default; + HostSpace & operator = ( const HostSpace & ) = default; + ~HostSpace() = default; /**\brief Non-default memory space instance to choose allocation mechansim, if available */ - enum AllocationMechanism { STD_MALLOC , POSIX_MEMALIGN , POSIX_MMAP , INTEL_MM_ALLOC }; + enum AllocationMechanism { STD_MALLOC, POSIX_MEMALIGN, POSIX_MMAP, INTEL_MM_ALLOC }; explicit HostSpace( const AllocationMechanism & ); /**\brief Allocate untracked memory in the space */ - void * allocate( const size_t arg_alloc_size ) const ; + void * allocate( const size_t arg_alloc_size ) const; /**\brief Deallocate untracked memory in the space */ - void deallocate( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) const ; + void deallocate( void * const arg_alloc_ptr + , const size_t arg_alloc_size ) const; /**\brief Return Name of the MemorySpace */ static constexpr const char* name(); private: - - AllocationMechanism m_alloc_mech ; + AllocationMechanism m_alloc_mech; static constexpr const char* m_name = "Host"; - friend class Kokkos::Impl::SharedAllocationRecord< Kokkos::HostSpace , void > ; + friend class Kokkos::Impl::SharedAllocationRecord< Kokkos::HostSpace, void >; }; } // namespace Kokkos -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { -namespace Impl { -static_assert( Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace , Kokkos::HostSpace >::assignable , "" ); +namespace Impl { +static_assert( Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace, Kokkos::HostSpace >::assignable, "" ); template< typename S > struct HostMirror { private: - // If input execution space can access HostSpace then keep it. // Example: Kokkos::OpenMP can access, Kokkos::Cuda cannot enum { keep_exe = Kokkos::Impl::MemorySpaceAccess - < typename S::execution_space::memory_space , Kokkos::HostSpace > - ::accessible }; + < typename S::execution_space::memory_space, Kokkos::HostSpace >::accessible }; // If HostSpace can access memory space then keep it. // Example: Cannot access Kokkos::CudaSpace, can access Kokkos::CudaUVMSpace enum { keep_mem = Kokkos::Impl::MemorySpaceAccess - < Kokkos::HostSpace , typename S::memory_space >::accessible }; + < Kokkos::HostSpace, typename S::memory_space >::accessible }; public: @@ -202,42 +203,41 @@ public: , typename S::memory_space > , Kokkos::HostSpace >::type - >::type Space ; + >::type Space; }; } // namespace Impl + } // namespace Kokkos -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { + namespace Impl { template<> -class SharedAllocationRecord< Kokkos::HostSpace , void > - : public SharedAllocationRecord< void , void > +class SharedAllocationRecord< Kokkos::HostSpace, void > + : public SharedAllocationRecord< void, void > { private: + friend Kokkos::HostSpace; - friend Kokkos::HostSpace ; - - typedef SharedAllocationRecord< void , void > RecordBase ; + typedef SharedAllocationRecord< void, void > RecordBase; - SharedAllocationRecord( const SharedAllocationRecord & ) = delete ; - SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ; + SharedAllocationRecord( const SharedAllocationRecord & ) = delete; + SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete; static void deallocate( RecordBase * ); /**\brief Root record for tracked allocations from this HostSpace instance */ - static RecordBase s_root_record ; + static RecordBase s_root_record; - const Kokkos::HostSpace m_space ; + const Kokkos::HostSpace m_space; protected: - ~SharedAllocationRecord(); - SharedAllocationRecord() = default ; + SharedAllocationRecord() = default; SharedAllocationRecord( const Kokkos::HostSpace & arg_space , const std::string & arg_label @@ -249,22 +249,23 @@ public: inline std::string get_label() const - { - return std::string( RecordBase::head()->m_label ); - } + { + return std::string( RecordBase::head()->m_label ); + } KOKKOS_INLINE_FUNCTION static SharedAllocationRecord * allocate( const Kokkos::HostSpace & arg_space , const std::string & arg_label , const size_t arg_alloc_size ) - { + { #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - return new SharedAllocationRecord( arg_space , arg_label , arg_alloc_size ); + return new SharedAllocationRecord( arg_space, arg_label, arg_alloc_size ); #else - return (SharedAllocationRecord *) 0 ; + return (SharedAllocationRecord *) 0; #endif - } + } + /**\brief Allocate tracked memory in the space */ static @@ -281,37 +282,37 @@ public: static void deallocate_tracked( void * const arg_alloc_ptr ); - static SharedAllocationRecord * get_record( void * arg_alloc_ptr ); - static void print_records( std::ostream & , const Kokkos::HostSpace & , bool detail = false ); + static void print_records( std::ostream &, const Kokkos::HostSpace &, bool detail = false ); }; } // namespace Impl + } // namespace Kokkos -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { + namespace Impl { -template< class DstSpace, class SrcSpace, class ExecutionSpace = typename DstSpace::execution_space> struct DeepCopy ; +template< class DstSpace, class SrcSpace, class ExecutionSpace = typename DstSpace::execution_space > struct DeepCopy; -template -struct DeepCopy { - DeepCopy( void * dst , const void * src , size_t n ) { - memcpy( dst , src , n ); +template< class ExecutionSpace > +struct DeepCopy< HostSpace, HostSpace, ExecutionSpace > { + DeepCopy( void * dst, const void * src, size_t n ) { + memcpy( dst, src, n ); } - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) { + + DeepCopy( const ExecutionSpace& exec, void * dst, const void * src, size_t n ) { exec.fence(); - memcpy( dst , src , n ); + memcpy( dst, src, n ); } }; } // namespace Impl -} // namespace Kokkos - -#endif /* #define KOKKOS_HOSTSPACE_HPP */ +} // namespace Kokkos +#endif // #define KOKKOS_HOSTSPACE_HPP diff --git a/lib/kokkos/core/src/Kokkos_Macros.hpp b/lib/kokkos/core/src/Kokkos_Macros.hpp index 52845b9e09..c138b08c94 100644 --- a/lib/kokkos/core/src/Kokkos_Macros.hpp +++ b/lib/kokkos/core/src/Kokkos_Macros.hpp @@ -45,22 +45,20 @@ #define KOKKOS_MACROS_HPP //---------------------------------------------------------------------------- -/** Pick up configure/build options via #define macros: +/** Pick up configure / build options via #define macros: * * KOKKOS_ENABLE_CUDA Kokkos::Cuda execution and memory spaces * KOKKOS_ENABLE_PTHREAD Kokkos::Threads execution space - * KOKKOS_ENABLE_QTHREAD Kokkos::Qthread execution space - * KOKKOS_ENABLE_OPENMP Kokkos::OpenMP execution space - * KOKKOS_ENABLE_HWLOC HWLOC library is available - * KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK insert array bounds checks, is expensive! - * - * KOKKOS_ENABLE_MPI negotiate MPI/execution space interactions - * - * KOKKOS_ENABLE_CUDA_UVM Use CUDA UVM for Cuda memory space + * KOKKOS_ENABLE_QTHREADS Kokkos::Qthreads execution space + * KOKKOS_ENABLE_OPENMP Kokkos::OpenMP execution space + * KOKKOS_ENABLE_HWLOC HWLOC library is available. + * KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK Insert array bounds checks, is expensive! + * KOKKOS_ENABLE_MPI Negotiate MPI/execution space interactions. + * KOKKOS_ENABLE_CUDA_UVM Use CUDA UVM for Cuda memory space. */ #ifndef KOKKOS_DONT_INCLUDE_CORE_CONFIG_H -#include + #include #endif #include @@ -86,7 +84,7 @@ * KOKKOS_ENABLE_INTEL_ATOMICS * KOKKOS_ENABLE_OPENMP_ATOMICS * - * A suite of 'KOKKOS_HAVE_PRAGMA_...' are defined for internal use. + * A suite of 'KOKKOS_ENABLE_PRAGMA_...' are defined for internal use. * * Macros for marking functions to run in an execution space: * @@ -98,64 +96,63 @@ //---------------------------------------------------------------------------- #if defined( KOKKOS_ENABLE_CUDA ) && defined( __CUDACC__ ) + // Compiling with a CUDA compiler. + // + // Include to pick up the CUDA_VERSION macro defined as: + // CUDA_VERSION = ( MAJOR_VERSION * 1000 ) + ( MINOR_VERSION * 10 ) + // + // When generating device code the __CUDA_ARCH__ macro is defined as: + // __CUDA_ARCH__ = ( MAJOR_CAPABILITY * 100 ) + ( MINOR_CAPABILITY * 10 ) + + #include + #include + + #if !defined( CUDA_VERSION ) + #error "#include did not define CUDA_VERSION." + #endif -/* Compiling with a CUDA compiler. - * - * Include to pick up the CUDA_VERSION macro defined as: - * CUDA_VERSION = ( MAJOR_VERSION * 1000 ) + ( MINOR_VERSION * 10 ) - * - * When generating device code the __CUDA_ARCH__ macro is defined as: - * __CUDA_ARCH__ = ( MAJOR_CAPABILITY * 100 ) + ( MINOR_CAPABILITY * 10 ) - */ + #if ( CUDA_VERSION < 7000 ) + // CUDA supports C++11 in device code starting with version 7.0. + // This includes auto type and device code internal lambdas. + #error "Cuda version 7.0 or greater required." + #endif -#include -#include + #if defined( __CUDA_ARCH__ ) && ( __CUDA_ARCH__ < 300 ) + // Compiling with CUDA compiler for device code. + #error "Cuda device capability >= 3.0 is required." + #endif -#if ! defined( CUDA_VERSION ) -#error "#include did not define CUDA_VERSION" -#endif + #ifdef KOKKOS_ENABLE_CUDA_LAMBDA + #if ( CUDA_VERSION < 7050 ) + // CUDA supports C++11 lambdas generated in host code to be given + // to the device starting with version 7.5. But the release candidate (7.5.6) + // still identifies as 7.0. + #error "Cuda version 7.5 or greater required for host-to-device Lambda support." + #endif -#if ( CUDA_VERSION < 7000 ) -// CUDA supports C++11 in device code starting with -// version 7.0. This includes auto type and device code internal -// lambdas. -#error "Cuda version 7.0 or greater required" -#endif + #if ( CUDA_VERSION < 8000 ) && defined( __NVCC__ ) + #define KOKKOS_LAMBDA [=]__device__ + #else + #define KOKKOS_LAMBDA [=]__host__ __device__ -#if defined( __CUDA_ARCH__ ) && ( __CUDA_ARCH__ < 300 ) -/* Compiling with CUDA compiler for device code. */ -#error "Cuda device capability >= 3.0 is required" -#endif + #if defined( KOKKOS_ENABLE_CXX1Z ) + #define KOKKOS_CLASS_LAMBDA [=,*this] __host__ __device__ + #endif + #endif -#ifdef KOKKOS_ENABLE_CUDA_LAMBDA -#if ( CUDA_VERSION < 7050 ) - // CUDA supports C++11 lambdas generated in host code to be given - // to the device starting with version 7.5. But the release candidate (7.5.6) - // still identifies as 7.0 - #error "Cuda version 7.5 or greater required for host-to-device Lambda support" -#endif -#if ( CUDA_VERSION < 8000 ) && defined(__NVCC__) - #define KOKKOS_LAMBDA [=]__device__ -#else - #define KOKKOS_LAMBDA [=]__host__ __device__ - #if defined( KOKKOS_ENABLE_CXX1Z ) - #define KOKKOS_CLASS_LAMBDA [=,*this] __host__ __device__ + #define KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA 1 #endif -#endif -#define KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA 1 -#endif -#endif /* #if defined( KOKKOS_ENABLE_CUDA ) && defined( __CUDACC__ ) */ +#endif // #if defined( KOKKOS_ENABLE_CUDA ) && defined( __CUDACC__ ) - -#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) +#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) // Cuda version 8.0 still needs the functor wrapper - #if (KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA /* && (CUDA_VERSION < 8000) */ ) && defined(__NVCC__) + #if /* ( CUDA_VERSION < 8000 ) && */ defined( __NVCC__ ) #define KOKKOS_IMPL_NEED_FUNCTOR_WRAPPER #endif #endif -/*--------------------------------------------------------------------------*/ -/* Language info: C++, CUDA, OPENMP */ +//---------------------------------------------------------------------------- +// Language info: C++, CUDA, OPENMP #if defined( KOKKOS_ENABLE_CUDA ) // Compiling Cuda code to 'ptx' @@ -163,20 +160,17 @@ #define KOKKOS_FORCEINLINE_FUNCTION __device__ __host__ __forceinline__ #define KOKKOS_INLINE_FUNCTION __device__ __host__ inline #define KOKKOS_FUNCTION __device__ __host__ -#endif /* #if defined( __CUDA_ARCH__ ) */ +#endif // #if defined( __CUDA_ARCH__ ) #if defined( _OPENMP ) + // Compiling with OpenMP. + // The value of _OPENMP is an integer value YYYYMM + // where YYYY and MM are the year and month designation + // of the supported OpenMP API version. +#endif // #if defined( _OPENMP ) - /* Compiling with OpenMP. - * The value of _OPENMP is an integer value YYYYMM - * where YYYY and MM are the year and month designation - * of the supported OpenMP API version. - */ - -#endif /* #if defined( _OPENMP ) */ - -/*--------------------------------------------------------------------------*/ -/* Mapping compiler built-ins to KOKKOS_COMPILER_*** macros */ +//---------------------------------------------------------------------------- +// Mapping compiler built-ins to KOKKOS_COMPILER_*** macros #if defined( __NVCC__ ) // NVIDIA compiler is being used. @@ -184,29 +178,28 @@ // Host code is compiled again with another compiler. // Device code is compile to 'ptx'. #define KOKKOS_COMPILER_NVCC __NVCC__ - #else -#if ! defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) - #if !defined (KOKKOS_ENABLE_CUDA) // Compiling with clang for Cuda does not work with LAMBDAs either - // CUDA (including version 6.5) does not support giving lambdas as - // arguments to global functions. Thus its not currently possible - // to dispatch lambdas from the host. - #define KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA 1 + #if !defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) + #if !defined( KOKKOS_ENABLE_CUDA ) // Compiling with clang for Cuda does not work with LAMBDAs either + // CUDA (including version 6.5) does not support giving lambdas as + // arguments to global functions. Thus its not currently possible + // to dispatch lambdas from the host. + #define KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA 1 #endif #endif -#endif /* #if defined( __NVCC__ ) */ +#endif // #if defined( __NVCC__ ) -#if !defined (KOKKOS_LAMBDA) +#if !defined( KOKKOS_LAMBDA ) #define KOKKOS_LAMBDA [=] #endif -#if defined( KOKKOS_ENABLE_CXX1Z ) && !defined (KOKKOS_CLASS_LAMBDA) +#if defined( KOKKOS_ENABLE_CXX1Z ) && !defined( KOKKOS_CLASS_LAMBDA ) #define KOKKOS_CLASS_LAMBDA [=,*this] #endif -//#if ! defined( __CUDA_ARCH__ ) /* Not compiling Cuda code to 'ptx'. */ +//#if !defined( __CUDA_ARCH__ ) // Not compiling Cuda code to 'ptx'. -/* Intel compiler for host code */ +// Intel compiler for host code. #if defined( __INTEL_COMPILER ) #define KOKKOS_COMPILER_INTEL __INTEL_COMPILER @@ -218,7 +211,7 @@ #define KOKKOS_COMPILER_INTEL __ECC #endif -/* CRAY compiler for host code */ +// CRAY compiler for host code #if defined( _CRAYC ) #define KOKKOS_COMPILER_CRAYC _CRAYC #endif @@ -234,50 +227,53 @@ #define KOKKOS_COMPILER_APPLECC __APPLE_CC__ #endif -#if defined (__clang__) && !defined (KOKKOS_COMPILER_INTEL) +#if defined( __clang__ ) && !defined( KOKKOS_COMPILER_INTEL ) #define KOKKOS_COMPILER_CLANG __clang_major__*100+__clang_minor__*10+__clang_patchlevel__ #endif -#if ! defined( __clang__ ) && ! defined( KOKKOS_COMPILER_INTEL ) &&defined( __GNUC__ ) +#if !defined( __clang__ ) && !defined( KOKKOS_COMPILER_INTEL ) &&defined( __GNUC__ ) #define KOKKOS_COMPILER_GNU __GNUC__*100+__GNUC_MINOR__*10+__GNUC_PATCHLEVEL__ + #if ( 472 > KOKKOS_COMPILER_GNU ) #error "Compiling with GCC version earlier than 4.7.2 is not supported." #endif #endif -#if defined( __PGIC__ ) && ! defined( __GNUC__ ) +#if defined( __PGIC__ ) && !defined( __GNUC__ ) #define KOKKOS_COMPILER_PGI __PGIC__*100+__PGIC_MINOR__*10+__PGIC_PATCHLEVEL__ + #if ( 1540 > KOKKOS_COMPILER_PGI ) #error "Compiling with PGI version earlier than 15.4 is not supported." #endif #endif -//#endif /* #if ! defined( __CUDA_ARCH__ ) */ +//#endif // #if !defined( __CUDA_ARCH__ ) -/*--------------------------------------------------------------------------*/ -/*--------------------------------------------------------------------------*/ -/* Intel compiler macros */ +//---------------------------------------------------------------------------- +// Intel compiler macros #if defined( KOKKOS_COMPILER_INTEL ) - #define KOKKOS_ENABLE_PRAGMA_UNROLL 1 - #define KOKKOS_ENABLE_PRAGMA_IVDEP 1 #define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 #define KOKKOS_ENABLE_PRAGMA_VECTOR 1 #define KOKKOS_ENABLE_PRAGMA_SIMD 1 + #if ( __INTEL_COMPILER > 1400 ) + #define KOKKOS_ENABLE_PRAGMA_IVDEP 1 + #endif + #define KOKKOS_RESTRICT __restrict__ #ifndef KOKKOS_ALIGN - #define KOKKOS_ALIGN(size) __attribute__((aligned(size))) + #define KOKKOS_ALIGN(size) __attribute__((aligned(size))) #endif #ifndef KOKKOS_ALIGN_PTR - #define KOKKOS_ALIGN_PTR(size) __attribute__((align_value(size))) + #define KOKKOS_ALIGN_PTR(size) __attribute__((align_value(size))) #endif #ifndef KOKKOS_ALIGN_SIZE - #define KOKKOS_ALIGN_SIZE 64 + #define KOKKOS_ALIGN_SIZE 64 #endif #if ( 1400 > KOKKOS_COMPILER_INTEL ) @@ -287,12 +283,13 @@ #warning "Compiling with Intel version 13.x probably works but is not officially supported. Official minimal version is 14.0." #endif #endif - #if ! defined( KOKKOS_ENABLE_ASM ) && ! defined( _WIN32 ) + + #if !defined( KOKKOS_ENABLE_ASM ) && !defined( _WIN32 ) #define KOKKOS_ENABLE_ASM 1 #endif - #if ! defined( KOKKOS_FORCEINLINE_FUNCTION ) - #if !defined (_WIN32) + #if !defined( KOKKOS_FORCEINLINE_FUNCTION ) + #if !defined( _WIN32 ) #define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline)) #else #define KOKKOS_FORCEINLINE_FUNCTION inline @@ -302,192 +299,170 @@ #if defined( __MIC__ ) // Compiling for Xeon Phi #endif - #endif -/*--------------------------------------------------------------------------*/ -/* Cray compiler macros */ +//---------------------------------------------------------------------------- +// Cray compiler macros #if defined( KOKKOS_COMPILER_CRAYC ) - - #endif -/*--------------------------------------------------------------------------*/ -/* IBM Compiler macros */ +//---------------------------------------------------------------------------- +// IBM Compiler macros #if defined( KOKKOS_COMPILER_IBM ) - #define KOKKOS_ENABLE_PRAGMA_UNROLL 1 //#define KOKKOS_ENABLE_PRAGMA_IVDEP 1 //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 //#define KOKKOS_ENABLE_PRAGMA_VECTOR 1 //#define KOKKOS_ENABLE_PRAGMA_SIMD 1 - #endif -/*--------------------------------------------------------------------------*/ -/* CLANG compiler macros */ +//---------------------------------------------------------------------------- +// CLANG compiler macros #if defined( KOKKOS_COMPILER_CLANG ) - //#define KOKKOS_ENABLE_PRAGMA_UNROLL 1 //#define KOKKOS_ENABLE_PRAGMA_IVDEP 1 //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 //#define KOKKOS_ENABLE_PRAGMA_VECTOR 1 //#define KOKKOS_ENABLE_PRAGMA_SIMD 1 - #if ! defined( KOKKOS_FORCEINLINE_FUNCTION ) + #if !defined( KOKKOS_FORCEINLINE_FUNCTION ) #define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline)) #endif - #endif -/*--------------------------------------------------------------------------*/ -/* GNU Compiler macros */ +//---------------------------------------------------------------------------- +// GNU Compiler macros #if defined( KOKKOS_COMPILER_GNU ) - //#define KOKKOS_ENABLE_PRAGMA_UNROLL 1 //#define KOKKOS_ENABLE_PRAGMA_IVDEP 1 //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 //#define KOKKOS_ENABLE_PRAGMA_VECTOR 1 //#define KOKKOS_ENABLE_PRAGMA_SIMD 1 - #if ! defined( KOKKOS_FORCEINLINE_FUNCTION ) + #if !defined( KOKKOS_FORCEINLINE_FUNCTION ) #define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline)) #endif - #if ! defined( KOKKOS_ENABLE_ASM ) && ! defined( __PGIC__ ) && \ - ( defined( __amd64 ) || \ - defined( __amd64__ ) || \ - defined( __x86_64 ) || \ - defined( __x86_64__ ) ) + #if !defined( KOKKOS_ENABLE_ASM ) && !defined( __PGIC__ ) && \ + ( defined( __amd64 ) || defined( __amd64__ ) || \ + defined( __x86_64 ) || defined( __x86_64__ ) ) #define KOKKOS_ENABLE_ASM 1 #endif - #endif -/*--------------------------------------------------------------------------*/ +//---------------------------------------------------------------------------- #if defined( KOKKOS_COMPILER_PGI ) - #define KOKKOS_ENABLE_PRAGMA_UNROLL 1 #define KOKKOS_ENABLE_PRAGMA_IVDEP 1 //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 #define KOKKOS_ENABLE_PRAGMA_VECTOR 1 //#define KOKKOS_ENABLE_PRAGMA_SIMD 1 - #endif -/*--------------------------------------------------------------------------*/ +//---------------------------------------------------------------------------- #if defined( KOKKOS_COMPILER_NVCC ) - - #if defined(__CUDA_ARCH__ ) + #if defined( __CUDA_ARCH__ ) #define KOKKOS_ENABLE_PRAGMA_UNROLL 1 #endif - #endif //---------------------------------------------------------------------------- -/** Define function marking macros if compiler specific macros are undefined: */ +// Define function marking macros if compiler specific macros are undefined: -#if ! defined( KOKKOS_FORCEINLINE_FUNCTION ) -#define KOKKOS_FORCEINLINE_FUNCTION inline +#if !defined( KOKKOS_FORCEINLINE_FUNCTION ) + #define KOKKOS_FORCEINLINE_FUNCTION inline #endif -#if ! defined( KOKKOS_INLINE_FUNCTION ) -#define KOKKOS_INLINE_FUNCTION inline +#if !defined( KOKKOS_INLINE_FUNCTION ) + #define KOKKOS_INLINE_FUNCTION inline #endif -#if ! defined( KOKKOS_FUNCTION ) -#define KOKKOS_FUNCTION /**/ +#if !defined( KOKKOS_FUNCTION ) + #define KOKKOS_FUNCTION /**/ #endif - //---------------------------------------------------------------------------- -///** Define empty macro for restrict if necessary: */ +// Define empty macro for restrict if necessary: -#if ! defined(KOKKOS_RESTRICT) -#define KOKKOS_RESTRICT +#if !defined( KOKKOS_RESTRICT ) + #define KOKKOS_RESTRICT #endif //---------------------------------------------------------------------------- -/** Define Macro for alignment: */ -#if ! defined KOKKOS_ALIGN_SIZE -#define KOKKOS_ALIGN_SIZE 16 -#endif +// Define Macro for alignment: -#if ! defined(KOKKOS_ALIGN) -#define KOKKOS_ALIGN(size) __attribute__((aligned(size))) +#if !defined KOKKOS_ALIGN_SIZE + #define KOKKOS_ALIGN_SIZE 16 #endif -#if ! defined(KOKKOS_ALIGN_PTR) -#define KOKKOS_ALIGN_PTR(size) __attribute__((aligned(size))) +#if !defined( KOKKOS_ALIGN ) + #define KOKKOS_ALIGN(size) __attribute__((aligned(size))) #endif -//---------------------------------------------------------------------------- -/** Determine the default execution space for parallel dispatch. - * There is zero or one default execution space specified. - */ - -#if 1 < ( ( defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA ) ? 1 : 0 ) + \ - ( defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) ? 1 : 0 ) + \ - ( defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) ? 1 : 0 ) + \ - ( defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) ? 1 : 0 ) ) - -#error "More than one KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_* specified" ; - +#if !defined( KOKKOS_ALIGN_PTR ) + #define KOKKOS_ALIGN_PTR(size) __attribute__((aligned(size))) #endif -/** If default is not specified then chose from enabled execution spaces. - * Priority: CUDA, OPENMP, THREADS, SERIAL - */ -#if defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA ) -#elif defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) -#elif defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) -#elif defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) -#elif defined ( KOKKOS_ENABLE_CUDA ) -#define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA -#elif defined ( KOKKOS_ENABLE_OPENMP ) -#define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP -#elif defined ( KOKKOS_ENABLE_PTHREAD ) -#define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS +//---------------------------------------------------------------------------- +// Determine the default execution space for parallel dispatch. +// There is zero or one default execution space specified. + +#if 1 < ( ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA ) ? 1 : 0 ) + \ + ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) ? 1 : 0 ) + \ + ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) ? 1 : 0 ) + \ + ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) ? 1 : 0 ) + \ + ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) ? 1 : 0 ) ) + #error "More than one KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_* specified." +#endif + +// If default is not specified then chose from enabled execution spaces. +// Priority: CUDA, OPENMP, THREADS, QTHREADS, SERIAL +#if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA ) +#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) +#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) +//#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) +#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) +#elif defined( KOKKOS_ENABLE_CUDA ) + #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA +#elif defined( KOKKOS_ENABLE_OPENMP ) + #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP +#elif defined( KOKKOS_ENABLE_PTHREAD ) + #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS +//#elif defined( KOKKOS_ENABLE_QTHREADS ) +// #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS #else -#define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL + #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL #endif //---------------------------------------------------------------------------- -/** Determine for what space the code is being compiled: */ +// Determine for what space the code is being compiled: -#if defined( __CUDACC__ ) && defined( __CUDA_ARCH__ ) && defined (KOKKOS_ENABLE_CUDA) -#define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA +#if defined( __CUDACC__ ) && defined( __CUDA_ARCH__ ) && defined( KOKKOS_ENABLE_CUDA ) + #define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA #else -#define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST + #define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST #endif -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- #if ( defined( _POSIX_C_SOURCE ) && _POSIX_C_SOURCE >= 200112L ) || \ ( defined( _XOPEN_SOURCE ) && _XOPEN_SOURCE >= 600 ) -#if defined(KOKKOS_ENABLE_PERFORMANCE_POSIX_MEMALIGN) -#define KOKKOS_ENABLE_POSIX_MEMALIGN 1 -#endif + #if defined( KOKKOS_ENABLE_PERFORMANCE_POSIX_MEMALIGN ) + #define KOKKOS_ENABLE_POSIX_MEMALIGN 1 + #endif #endif //---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- - -/**Enable Profiling by default**/ +// Enable Profiling by default #ifndef KOKKOS_ENABLE_PROFILING -#define KOKKOS_ENABLE_PROFILING 1 + #define KOKKOS_ENABLE_PROFILING 1 #endif -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- - -#endif /* #ifndef KOKKOS_MACROS_HPP */ - +#endif // #ifndef KOKKOS_MACROS_HPP diff --git a/lib/kokkos/core/src/Kokkos_MemoryPool.hpp b/lib/kokkos/core/src/Kokkos_MemoryPool.hpp index 2d45926e76..eadad10b49 100644 --- a/lib/kokkos/core/src/Kokkos_MemoryPool.hpp +++ b/lib/kokkos/core/src/Kokkos_MemoryPool.hpp @@ -1294,6 +1294,7 @@ public: KOKKOS_INLINE_FUNCTION size_t get_min_block_size() const { return MIN_BLOCK_SIZE; } + KOKKOS_INLINE_FUNCTION size_t get_mem_size() const { return m_data_size; } private: diff --git a/lib/kokkos/core/src/Kokkos_OpenMP.hpp b/lib/kokkos/core/src/Kokkos_OpenMP.hpp index a337d1a9d4..c0c43b92f4 100644 --- a/lib/kokkos/core/src/Kokkos_OpenMP.hpp +++ b/lib/kokkos/core/src/Kokkos_OpenMP.hpp @@ -66,7 +66,6 @@ #include #include -#include /*--------------------------------------------------------------------------*/ namespace Kokkos { @@ -196,6 +195,7 @@ struct VerifyExecutionCanAccessMemorySpace #include #include +#include /*--------------------------------------------------------------------------*/ #endif /* #if defined( KOKKOS_ENABLE_OPENMP ) && defined( _OPENMP ) */ diff --git a/lib/kokkos/core/src/Kokkos_Pair.hpp b/lib/kokkos/core/src/Kokkos_Pair.hpp index 83436826f4..067767f2f8 100644 --- a/lib/kokkos/core/src/Kokkos_Pair.hpp +++ b/lib/kokkos/core/src/Kokkos_Pair.hpp @@ -78,16 +78,14 @@ struct pair /// This calls the default constructors of T1 and T2. It won't /// compile if those default constructors are not defined and /// public. - KOKKOS_FORCEINLINE_FUNCTION - pair() - : first(), second() - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr + pair() = default ; /// \brief Constructor that takes both elements of the pair. /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(first_type const& f, second_type const& s) : first(f), second(s) {} @@ -97,7 +95,7 @@ struct pair /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair( const pair &p) : first(p.first), second(p.second) {} @@ -107,7 +105,7 @@ struct pair /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair( const volatile pair &p) : first(p.first), second(p.second) {} @@ -183,7 +181,7 @@ struct pair /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(first_type f, second_type s) : first(f), second(s) {} @@ -193,7 +191,7 @@ struct pair /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair( const pair &p) : first(p.first), second(p.second) {} @@ -247,7 +245,7 @@ struct pair /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(first_type const& f, second_type s) : first(f), second(s) {} @@ -257,7 +255,7 @@ struct pair /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair( const pair &p) : first(p.first), second(p.second) {} @@ -311,7 +309,7 @@ struct pair /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(first_type f, second_type const& s) : first(f), second(s) {} @@ -321,7 +319,7 @@ struct pair /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair( const pair &p) : first(p.first), second(p.second) {} @@ -366,31 +364,31 @@ bool operator== (const pair& lhs, const pair& rhs) //! Inequality operator for Kokkos::pair. template -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator!= (const pair& lhs, const pair& rhs) { return !(lhs==rhs); } //! Less-than operator for Kokkos::pair. template -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator< (const pair& lhs, const pair& rhs) { return lhs.first -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator<= (const pair& lhs, const pair& rhs) { return !(rhs -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator> (const pair& lhs, const pair& rhs) { return rhs -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator>= (const pair& lhs, const pair& rhs) { return !(lhs= (const pair& lhs, const pair& rhs) /// This is a "nonmember constructor" for Kokkos::pair. It works just /// like std::make_pair. template -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr pair make_pair (T1 x, T2 y) { return ( pair(x,y) ); } @@ -460,23 +458,21 @@ struct pair first_type first; enum { second = 0 }; - KOKKOS_FORCEINLINE_FUNCTION - pair() - : first() - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr + pair() = default ; - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(const first_type & f) : first(f) {} - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(const first_type & f, int) : first(f) {} template - KOKKOS_FORCEINLINE_FUNCTION + KOKKOS_FORCEINLINE_FUNCTION constexpr pair( const pair &p) : first(p.first) {} @@ -495,32 +491,32 @@ struct pair // template -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator== (const pair& lhs, const pair& rhs) { return lhs.first==rhs.first; } template -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator!= (const pair& lhs, const pair& rhs) { return !(lhs==rhs); } template -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator< (const pair& lhs, const pair& rhs) { return lhs.first -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator<= (const pair& lhs, const pair& rhs) { return !(rhs -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator> (const pair& lhs, const pair& rhs) { return rhs -KOKKOS_FORCEINLINE_FUNCTION +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator>= (const pair& lhs, const pair& rhs) { return !(lhs= (const pair& lhs, const pair& rhs) #endif //KOKKOS_PAIR_HPP + diff --git a/lib/kokkos/core/src/Kokkos_Parallel.hpp b/lib/kokkos/core/src/Kokkos_Parallel.hpp index 64b1502bcc..e412e608b2 100644 --- a/lib/kokkos/core/src/Kokkos_Parallel.hpp +++ b/lib/kokkos/core/src/Kokkos_Parallel.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -52,13 +52,14 @@ #include #include -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) #include #include #endif #include #include +#include #include #ifdef KOKKOS_DEBUG @@ -175,7 +176,7 @@ void parallel_for( const ExecPolicy & policy , typename Impl::enable_if< ! Impl::is_integral< ExecPolicy >::value >::type * = 0 ) { -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) uint64_t kpID = 0; if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::beginParallelFor("" == str ? typeid(FunctorType).name() : str, 0, &kpID); @@ -185,10 +186,10 @@ void parallel_for( const ExecPolicy & policy Kokkos::Impl::shared_allocation_tracking_claim_and_disable(); Impl::ParallelFor< FunctorType , ExecPolicy > closure( functor , policy ); Kokkos::Impl::shared_allocation_tracking_release_and_enable(); - + closure.execute(); -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::endParallelFor(kpID); } @@ -207,20 +208,20 @@ void parallel_for( const size_t work_count execution_space ; typedef RangePolicy< execution_space > policy ; -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) uint64_t kpID = 0; if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::beginParallelFor("" == str ? typeid(FunctorType).name() : str, 0, &kpID); } #endif - + Kokkos::Impl::shared_allocation_tracking_claim_and_disable(); Impl::ParallelFor< FunctorType , policy > closure( functor , policy(0,work_count) ); Kokkos::Impl::shared_allocation_tracking_release_and_enable(); closure.execute(); -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::endParallelFor(kpID); } @@ -417,7 +418,7 @@ void parallel_scan( const ExecutionPolicy & policy , typename Impl::enable_if< ! Impl::is_integral< ExecutionPolicy >::value >::type * = 0 ) { -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) uint64_t kpID = 0; if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::beginParallelScan("" == str ? typeid(FunctorType).name() : str, 0, &kpID); @@ -430,7 +431,7 @@ void parallel_scan( const ExecutionPolicy & policy closure.execute(); -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::endParallelScan(kpID); } @@ -450,20 +451,20 @@ void parallel_scan( const size_t work_count typedef Kokkos::RangePolicy< execution_space > policy ; -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) uint64_t kpID = 0; if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::beginParallelScan("" == str ? typeid(FunctorType).name() : str, 0, &kpID); } #endif - + Kokkos::Impl::shared_allocation_tracking_claim_and_disable(); Impl::ParallelScan< FunctorType , policy > closure( functor , policy(0,work_count) ); Kokkos::Impl::shared_allocation_tracking_release_and_enable(); closure.execute(); -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::endParallelScan(kpID); } diff --git a/lib/kokkos/core/src/Kokkos_Parallel_Reduce.hpp b/lib/kokkos/core/src/Kokkos_Parallel_Reduce.hpp index a3649b4422..900dce19fe 100644 --- a/lib/kokkos/core/src/Kokkos_Parallel_Reduce.hpp +++ b/lib/kokkos/core/src/Kokkos_Parallel_Reduce.hpp @@ -1094,7 +1094,7 @@ namespace Impl { const PolicyType& policy, const FunctorType& functor, ReturnType& return_value) { - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) uint64_t kpID = 0; if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::beginParallelReduce("" == label ? typeid(FunctorType).name() : label, 0, &kpID); @@ -1116,7 +1116,7 @@ namespace Impl { Kokkos::Impl::shared_allocation_tracking_release_and_enable(); closure.execute(); - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::endParallelReduce(kpID); } diff --git a/lib/kokkos/core/src/Kokkos_Qthread.hpp b/lib/kokkos/core/src/Kokkos_Qthreads.hpp similarity index 72% rename from lib/kokkos/core/src/Kokkos_Qthread.hpp rename to lib/kokkos/core/src/Kokkos_Qthreads.hpp index c58518b065..0507552c3f 100644 --- a/lib/kokkos/core/src/Kokkos_Qthread.hpp +++ b/lib/kokkos/core/src/Kokkos_Qthreads.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,57 +36,75 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ -#ifndef KOKKOS_QTHREAD_HPP -#define KOKKOS_QTHREAD_HPP +#ifndef KOKKOS_QTHREADS_HPP +#define KOKKOS_QTHREADS_HPP + +#include + +#ifdef KOKKOS_ENABLE_QTHREADS + +// Defines to enable experimental Qthreads functionality. +#define QTHREAD_LOCAL_PRIORITY +#define CLONED_TASKS + +#include #include #include -#include -#include -#include + #include -#include +#include +#include +//#include +//#include +//#include // Uncomment when Tasking working. +#include #include +#include /*--------------------------------------------------------------------------*/ namespace Kokkos { + namespace Impl { -class QthreadExec ; + +class QthreadsExec; + } // namespace Impl + } // namespace Kokkos /*--------------------------------------------------------------------------*/ namespace Kokkos { -/** \brief Execution space supported by Qthread */ -class Qthread { +/** \brief Execution space supported by Qthreads */ +class Qthreads { public: //! \name Type declarations that all Kokkos devices must provide. //@{ //! Tag this class as an execution space - typedef Qthread execution_space ; - typedef Kokkos::HostSpace memory_space ; + typedef Qthreads execution_space; + typedef Kokkos::HostSpace memory_space; //! This execution space preferred device_type - typedef Kokkos::Device device_type; + typedef Kokkos::Device< execution_space, memory_space > device_type; - typedef Kokkos::LayoutRight array_layout ; - typedef memory_space::size_type size_type ; + typedef Kokkos::LayoutRight array_layout; + typedef memory_space::size_type size_type; - typedef ScratchMemorySpace< Qthread > scratch_memory_space ; + typedef ScratchMemorySpace< Qthreads > scratch_memory_space; //@} /*------------------------------------------------------------------------*/ /** \brief Initialization will construct one or more instances */ - static Qthread & instance( int = 0 ); + static Qthreads & instance( int = 0 ); /** \brief Set the execution space to a "sleep" state. * @@ -100,14 +118,14 @@ public: bool sleep(); /** \brief Wake from the sleep state. - * + * * \return True if enters or is in the "ready" state. * False if functions are currently executing. */ static bool wake(); /** \brief Wait until all dispatched functions to complete. - * + * * The parallel_for or parallel_reduce dispatch of a functor may * return asynchronously, before the functor completes. This * method does not return until all dispatched functors on this @@ -128,26 +146,24 @@ public: static void finalize(); /** \brief Print configuration information to the given output stream. */ - static void print_configuration( std::ostream & , const bool detail = false ); + static void print_configuration( std::ostream &, const bool detail = false ); - int shepherd_size() const ; - int shepherd_worker_size() const ; + int shepherd_size() const; + int shepherd_worker_size() const; }; -/*--------------------------------------------------------------------------*/ - } // namespace Kokkos -/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ namespace Kokkos { + namespace Impl { template<> -struct MemorySpaceAccess - < Kokkos::Qthread::memory_space - , Kokkos::Qthread::scratch_memory_space +struct MemorySpaceAccess + < Kokkos::Qthreads::memory_space + , Kokkos::Qthreads::scratch_memory_space > { enum { assignable = false }; @@ -157,27 +173,26 @@ struct MemorySpaceAccess template<> struct VerifyExecutionCanAccessMemorySpace - < Kokkos::Qthread::memory_space - , Kokkos::Qthread::scratch_memory_space + < Kokkos::Qthreads::memory_space + , Kokkos::Qthreads::scratch_memory_space > { enum { value = true }; - inline static void verify( void ) { } - inline static void verify( const void * ) { } + inline static void verify( void ) {} + inline static void verify( const void * ) {} }; } // namespace Impl + } // namespace Kokkos /*--------------------------------------------------------------------------*/ -/*--------------------------------------------------------------------------*/ - -#include -#include -#include -#endif /* #define KOKKOS_QTHREAD_HPP */ +#include +#include +//#include // Uncomment when Tasking working. +//#include // Uncomment when Tasking working. -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- +#endif // #define KOKKOS_ENABLE_QTHREADS +#endif // #define KOKKOS_QTHREADS_HPP diff --git a/lib/kokkos/core/src/Kokkos_Serial.hpp b/lib/kokkos/core/src/Kokkos_Serial.hpp index f262535910..72710e8167 100644 --- a/lib/kokkos/core/src/Kokkos_Serial.hpp +++ b/lib/kokkos/core/src/Kokkos_Serial.hpp @@ -56,6 +56,8 @@ #include #include #include +#include +#include #include #include @@ -138,30 +140,15 @@ public: static void initialize( unsigned threads_count = 1 , unsigned use_numa_count = 0 , unsigned use_cores_per_numa = 0 , - bool allow_asynchronous_threadpool = false) { - (void) threads_count; - (void) use_numa_count; - (void) use_cores_per_numa; - (void) allow_asynchronous_threadpool; - - // Init the array of locks used for arbitrarily sized atomics - Impl::init_lock_array_host_space(); - #if (KOKKOS_ENABLE_PROFILING) - Kokkos::Profiling::initialize(); - #endif - } + bool allow_asynchronous_threadpool = false); - static int is_initialized() { return 1 ; } + static int is_initialized(); /** \brief Return the maximum amount of concurrency. */ static int concurrency() {return 1;}; //! Free any resources being consumed by the device. - static void finalize() { - #if (KOKKOS_ENABLE_PROFILING) - Kokkos::Profiling::finalize(); - #endif - } + static void finalize(); //! Print configuration information to the given output stream. static void print_configuration( std::ostream & , const bool /* detail */ = false ) {} @@ -177,10 +164,6 @@ public: inline static unsigned max_hardware_threads() { return thread_pool_size(0); } //-------------------------------------------------------------------------- - - static void * scratch_memory_resize( unsigned reduce_size , unsigned shared_size ); - - //-------------------------------------------------------------------------- }; } // namespace Kokkos @@ -192,7 +175,7 @@ namespace Kokkos { namespace Impl { template<> -struct MemorySpaceAccess +struct MemorySpaceAccess < Kokkos::Serial::memory_space , Kokkos::Serial::scratch_memory_space > @@ -213,22 +196,6 @@ struct VerifyExecutionCanAccessMemorySpace inline static void verify( const void * ) { } }; -namespace SerialImpl { - -struct Sentinel { - - void * m_scratch ; - unsigned m_reduce_end ; - unsigned m_shared_end ; - - Sentinel(); - ~Sentinel(); - static Sentinel & singleton(); -}; - -inline -unsigned align( unsigned n ); -} } // namespace Impl } // namespace Kokkos @@ -238,89 +205,26 @@ unsigned align( unsigned n ); namespace Kokkos { namespace Impl { -class SerialTeamMember { -private: - typedef Kokkos::ScratchMemorySpace< Kokkos::Serial > scratch_memory_space ; - const scratch_memory_space m_space ; - const int m_league_rank ; - const int m_league_size ; - - SerialTeamMember & operator = ( const SerialTeamMember & ); - -public: - - KOKKOS_INLINE_FUNCTION - const scratch_memory_space & team_shmem() const { return m_space ; } - - KOKKOS_INLINE_FUNCTION - const scratch_memory_space & team_scratch(int) const - { return m_space ; } - - KOKKOS_INLINE_FUNCTION - const scratch_memory_space & thread_scratch(int) const - { return m_space ; } - - KOKKOS_INLINE_FUNCTION int league_rank() const { return m_league_rank ; } - KOKKOS_INLINE_FUNCTION int league_size() const { return m_league_size ; } - KOKKOS_INLINE_FUNCTION int team_rank() const { return 0 ; } - KOKKOS_INLINE_FUNCTION int team_size() const { return 1 ; } +// Resize thread team data scratch memory +void serial_resize_thread_team_data( size_t pool_reduce_bytes + , size_t team_reduce_bytes + , size_t team_shared_bytes + , size_t thread_local_bytes ); - KOKKOS_INLINE_FUNCTION void team_barrier() const {} +HostThreadTeamData * serial_get_thread_team_data(); - template - KOKKOS_INLINE_FUNCTION - void team_broadcast(const ValueType& , const int& ) const {} - - template< class ValueType, class JoinOp > - KOKKOS_INLINE_FUNCTION - ValueType team_reduce( const ValueType & value , const JoinOp & ) const - { - return value ; - } - - /** \brief Intra-team exclusive prefix sum with team_rank() ordering - * with intra-team non-deterministic ordering accumulation. - * - * The global inter-team accumulation value will, at the end of the - * league's parallel execution, be the scan's total. - * Parallel execution ordering of the league's teams is non-deterministic. - * As such the base value for each team's scan operation is similarly - * non-deterministic. - */ - template< typename Type > - KOKKOS_INLINE_FUNCTION Type team_scan( const Type & value , Type * const global_accum ) const - { - const Type tmp = global_accum ? *global_accum : Type(0) ; - if ( global_accum ) { *global_accum += value ; } - return tmp ; - } - - /** \brief Intra-team exclusive prefix sum with team_rank() ordering. - * - * The highest rank thread can compute the reduction total as - * reduction_total = dev.team_scan( value ) + value ; - */ - template< typename Type > - KOKKOS_INLINE_FUNCTION Type team_scan( const Type & ) const - { return Type(0); } - - //---------------------------------------- - // Execution space specific: +} /* namespace Impl */ +} /* namespace Kokkos */ - SerialTeamMember( int arg_league_rank - , int arg_league_size - , int arg_shared_size - ); -}; -} // namespace Impl +namespace Kokkos { +namespace Impl { /* * < Kokkos::Serial , WorkArgTag > * < WorkArgTag , Impl::enable_if< std::is_same< Kokkos::Serial , Kokkos::DefaultExecutionSpace >::value >::type > * */ -namespace Impl { template< class ... Properties > class TeamPolicyInternal< Kokkos::Serial , Properties ... >:public PolicyTraits { @@ -441,14 +345,11 @@ public: return p; }; - typedef Impl::SerialTeamMember member_type ; + typedef Impl::HostThreadTeamMember< Kokkos::Serial > member_type ; }; } /* namespace Impl */ } /* namespace Kokkos */ -/*--------------------------------------------------------------------------*/ -/*--------------------------------------------------------------------------*/ - /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* Parallel patterns for Kokkos::Serial with RangePolicy */ @@ -521,11 +422,12 @@ private: typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType> ReducerConditional; typedef typename ReducerConditional::type ReducerTypeFwd; - typedef Kokkos::Impl::FunctorValueTraits< ReducerTypeFwd , WorkTag > ValueTraits ; + typedef FunctorAnalysis< FunctorPatternInterface::REDUCE , Policy , FunctorType > Analysis ; + typedef Kokkos::Impl::FunctorValueInit< ReducerTypeFwd , WorkTag > ValueInit ; - typedef typename ValueTraits::pointer_type pointer_type ; - typedef typename ValueTraits::reference_type reference_type ; + typedef typename Analysis::pointer_type pointer_type ; + typedef typename Analysis::reference_type reference_type ; const FunctorType m_functor ; const Policy m_policy ; @@ -535,34 +437,25 @@ private: template< class TagType > inline typename std::enable_if< std::is_same< TagType , void >::value >::type - exec( pointer_type ptr ) const + exec( reference_type update ) const { - reference_type update = ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , ptr ); - const typename Policy::member_type e = m_policy.end(); for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { m_functor( i , update ); } - - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , TagType >:: - final( ReducerConditional::select(m_functor , m_reducer) , ptr ); } template< class TagType > inline typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec( pointer_type ptr ) const + exec( reference_type update ) const { const TagType t{} ; - reference_type update = ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , ptr ); const typename Policy::member_type e = m_policy.end(); for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { m_functor( t , i , update ); } - - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , TagType >:: - final( ReducerConditional::select(m_functor , m_reducer) , ptr ); } public: @@ -570,10 +463,29 @@ public: inline void execute() const { - pointer_type ptr = (pointer_type) Kokkos::Serial::scratch_memory_resize - ( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) , 0 ); + const size_t pool_reduce_size = + Analysis::value_size( ReducerConditional::select(m_functor , m_reducer) ); + const size_t team_reduce_size = 0 ; // Never shrinks + const size_t team_shared_size = 0 ; // Never shrinks + const size_t thread_local_size = 0 ; // Never shrinks + + serial_resize_thread_team_data( pool_reduce_size + , team_reduce_size + , team_shared_size + , thread_local_size ); + + HostThreadTeamData & data = *serial_get_thread_team_data(); - this-> template exec< WorkTag >( m_result_ptr ? m_result_ptr : ptr ); + pointer_type ptr = + m_result_ptr ? m_result_ptr : pointer_type(data.pool_reduce_local()); + + reference_type update = + ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , ptr ); + + this-> template exec< WorkTag >( update ); + + Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTag >:: + final( ReducerConditional::select(m_functor , m_reducer) , ptr ); } template< class HostViewType > @@ -587,7 +499,7 @@ public: : m_functor( arg_functor ) , m_policy( arg_policy ) , m_reducer( InvalidType() ) - , m_result_ptr( arg_result_view.ptr_on_device() ) + , m_result_ptr( arg_result_view.data() ) { static_assert( Kokkos::is_view< HostViewType >::value , "Kokkos::Serial reduce result must be a View" ); @@ -623,11 +535,13 @@ private: typedef Kokkos::RangePolicy< Traits ... > Policy ; typedef typename Policy::work_tag WorkTag ; - typedef Kokkos::Impl::FunctorValueTraits< FunctorType , WorkTag > ValueTraits ; + + typedef FunctorAnalysis< FunctorPatternInterface::SCAN , Policy , FunctorType > Analysis ; + typedef Kokkos::Impl::FunctorValueInit< FunctorType , WorkTag > ValueInit ; - typedef typename ValueTraits::pointer_type pointer_type ; - typedef typename ValueTraits::reference_type reference_type ; + typedef typename Analysis::pointer_type pointer_type ; + typedef typename Analysis::reference_type reference_type ; const FunctorType m_functor ; const Policy m_policy ; @@ -635,10 +549,8 @@ private: template< class TagType > inline typename std::enable_if< std::is_same< TagType , void >::value >::type - exec( pointer_type ptr ) const + exec( reference_type update ) const { - reference_type update = ValueInit::init( m_functor , ptr ); - const typename Policy::member_type e = m_policy.end(); for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { m_functor( i , update , true ); @@ -648,11 +560,9 @@ private: template< class TagType > inline typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec( pointer_type ptr ) const + exec( reference_type update ) const { const TagType t{} ; - reference_type update = ValueInit::init( m_functor , ptr ); - const typename Policy::member_type e = m_policy.end(); for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { m_functor( t , i , update , true ); @@ -664,9 +574,22 @@ public: inline void execute() const { - pointer_type ptr = (pointer_type) - Kokkos::Serial::scratch_memory_resize( ValueTraits::value_size( m_functor ) , 0 ); - this-> template exec< WorkTag >( ptr ); + const size_t pool_reduce_size = Analysis::value_size( m_functor ); + const size_t team_reduce_size = 0 ; // Never shrinks + const size_t team_shared_size = 0 ; // Never shrinks + const size_t thread_local_size = 0 ; // Never shrinks + + serial_resize_thread_team_data( pool_reduce_size + , team_reduce_size + , team_shared_size + , thread_local_size ); + + HostThreadTeamData & data = *serial_get_thread_team_data(); + + reference_type update = + ValueInit::init( m_functor , pointer_type(data.pool_reduce_local()) ); + + this-> template exec< WorkTag >( update ); } inline @@ -696,6 +619,8 @@ class ParallelFor< FunctorType { private: + enum { TEAM_REDUCE_SIZE = 512 }; + typedef TeamPolicyInternal< Kokkos::Serial , Properties ...> Policy ; typedef typename Policy::member_type Member ; @@ -706,21 +631,21 @@ private: template< class TagType > inline typename std::enable_if< std::is_same< TagType , void >::value >::type - exec() const + exec( HostThreadTeamData & data ) const { for ( int ileague = 0 ; ileague < m_league ; ++ileague ) { - m_functor( Member(ileague,m_league,m_shared) ); + m_functor( Member(data,ileague,m_league) ); } } template< class TagType > inline typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec() const + exec( HostThreadTeamData & data ) const { const TagType t{} ; for ( int ileague = 0 ; ileague < m_league ; ++ileague ) { - m_functor( t , Member(ileague,m_league,m_shared) ); + m_functor( t , Member(data,ileague,m_league) ); } } @@ -729,15 +654,28 @@ public: inline void execute() const { - Kokkos::Serial::scratch_memory_resize( 0 , m_shared ); - this-> template exec< typename Policy::work_tag >(); + const size_t pool_reduce_size = 0 ; // Never shrinks + const size_t team_reduce_size = TEAM_REDUCE_SIZE ; + const size_t team_shared_size = m_shared ; + const size_t thread_local_size = 0 ; // Never shrinks + + serial_resize_thread_team_data( pool_reduce_size + , team_reduce_size + , team_shared_size + , thread_local_size ); + + HostThreadTeamData & data = *serial_get_thread_team_data(); + + this->template exec< typename Policy::work_tag >( data ); } ParallelFor( const FunctorType & arg_functor , const Policy & arg_policy ) : m_functor( arg_functor ) , m_league( arg_policy.league_size() ) - , m_shared( arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + FunctorTeamShmemSize< FunctorType >::value( arg_functor , 1 ) ) + , m_shared( arg_policy.scratch_size(0) + + arg_policy.scratch_size(1) + + FunctorTeamShmemSize< FunctorType >::value( arg_functor , 1 ) ) { } }; @@ -752,18 +690,22 @@ class ParallelReduce< FunctorType { private: + enum { TEAM_REDUCE_SIZE = 512 }; + typedef TeamPolicyInternal< Kokkos::Serial, Properties ... > Policy ; + + typedef FunctorAnalysis< FunctorPatternInterface::REDUCE , Policy , FunctorType > Analysis ; + typedef typename Policy::member_type Member ; typedef typename Policy::work_tag WorkTag ; typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType> ReducerConditional; typedef typename ReducerConditional::type ReducerTypeFwd; - typedef Kokkos::Impl::FunctorValueTraits< ReducerTypeFwd , WorkTag > ValueTraits ; typedef Kokkos::Impl::FunctorValueInit< ReducerTypeFwd , WorkTag > ValueInit ; - typedef typename ValueTraits::pointer_type pointer_type ; - typedef typename ValueTraits::reference_type reference_type ; + typedef typename Analysis::pointer_type pointer_type ; + typedef typename Analysis::reference_type reference_type ; const FunctorType m_functor ; const int m_league ; @@ -774,33 +716,23 @@ private: template< class TagType > inline typename std::enable_if< std::is_same< TagType , void >::value >::type - exec( pointer_type ptr ) const + exec( HostThreadTeamData & data , reference_type update ) const { - reference_type update = ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , ptr ); - for ( int ileague = 0 ; ileague < m_league ; ++ileague ) { - m_functor( Member(ileague,m_league,m_shared) , update ); + m_functor( Member(data,ileague,m_league) , update ); } - - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , TagType >:: - final( ReducerConditional::select(m_functor , m_reducer) , ptr ); } template< class TagType > inline typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec( pointer_type ptr ) const + exec( HostThreadTeamData & data , reference_type update ) const { const TagType t{} ; - reference_type update = ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , ptr ); - for ( int ileague = 0 ; ileague < m_league ; ++ileague ) { - m_functor( t , Member(ileague,m_league,m_shared) , update ); + m_functor( t , Member(data,ileague,m_league) , update ); } - - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , TagType >:: - final( ReducerConditional::select(m_functor , m_reducer) , ptr ); } public: @@ -808,10 +740,31 @@ public: inline void execute() const { - pointer_type ptr = (pointer_type) Kokkos::Serial::scratch_memory_resize - ( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) , m_shared ); + const size_t pool_reduce_size = + Analysis::value_size( ReducerConditional::select(m_functor, m_reducer)); + + const size_t team_reduce_size = TEAM_REDUCE_SIZE ; + const size_t team_shared_size = m_shared ; + const size_t thread_local_size = 0 ; // Never shrinks + + serial_resize_thread_team_data( pool_reduce_size + , team_reduce_size + , team_shared_size + , thread_local_size ); + - this-> template exec< WorkTag >( m_result_ptr ? m_result_ptr : ptr ); + HostThreadTeamData & data = *serial_get_thread_team_data(); + + pointer_type ptr = + m_result_ptr ? m_result_ptr : pointer_type(data.pool_reduce_local()); + + reference_type update = + ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , ptr ); + + this-> template exec< WorkTag >( data , update ); + + Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTag >:: + final( ReducerConditional::select(m_functor , m_reducer) , ptr ); } template< class ViewType > @@ -825,8 +778,10 @@ public: : m_functor( arg_functor ) , m_league( arg_policy.league_size() ) , m_reducer( InvalidType() ) - , m_result_ptr( arg_result.ptr_on_device() ) - , m_shared( arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + FunctorTeamShmemSize< FunctorType >::value( m_functor , 1 ) ) + , m_result_ptr( arg_result.data() ) + , m_shared( arg_policy.scratch_size(0) + + arg_policy.scratch_size(1) + + FunctorTeamShmemSize< FunctorType >::value( m_functor , 1 ) ) { static_assert( Kokkos::is_view< ViewType >::value , "Reduction result on Kokkos::Serial must be a Kokkos::View" ); @@ -838,13 +793,15 @@ public: inline ParallelReduce( const FunctorType & arg_functor - , Policy arg_policy - , const ReducerType& reducer ) - : m_functor( arg_functor ) - , m_league( arg_policy.league_size() ) - , m_reducer( reducer ) - , m_result_ptr( reducer.result_view().data() ) - , m_shared( arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + FunctorTeamShmemSize< FunctorType >::value( arg_functor , arg_policy.team_size() ) ) + , Policy arg_policy + , const ReducerType& reducer ) + : m_functor( arg_functor ) + , m_league( arg_policy.league_size() ) + , m_reducer( reducer ) + , m_result_ptr( reducer.result_view().data() ) + , m_shared( arg_policy.scratch_size(0) + + arg_policy.scratch_size(1) + + FunctorTeamShmemSize< FunctorType >::value( arg_functor , 1 ) ) { /*static_assert( std::is_same< typename ViewType::memory_space , Kokkos::HostSpace >::value @@ -858,261 +815,6 @@ public: /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ -/* Nested parallel patterns for Kokkos::Serial with TeamPolicy */ - -namespace Kokkos { -namespace Impl { - -template -struct TeamThreadRangeBoundariesStruct { - typedef iType index_type; - const iType begin ; - const iType end ; - enum {increment = 1}; - const SerialTeamMember& thread; - - KOKKOS_INLINE_FUNCTION - TeamThreadRangeBoundariesStruct (const SerialTeamMember& arg_thread, const iType& arg_count) - : begin(0) - , end(arg_count) - , thread(arg_thread) - {} - - KOKKOS_INLINE_FUNCTION - TeamThreadRangeBoundariesStruct (const SerialTeamMember& arg_thread, const iType& arg_begin, const iType & arg_end ) - : begin( arg_begin ) - , end( arg_end) - , thread( arg_thread ) - {} -}; - - template - struct ThreadVectorRangeBoundariesStruct { - typedef iType index_type; - enum {start = 0}; - const iType end; - enum {increment = 1}; - - KOKKOS_INLINE_FUNCTION - ThreadVectorRangeBoundariesStruct (const SerialTeamMember& thread, const iType& count): - end( count ) - {} - }; - -} // namespace Impl - -template< typename iType > -KOKKOS_INLINE_FUNCTION -Impl::TeamThreadRangeBoundariesStruct -TeamThreadRange( const Impl::SerialTeamMember& thread, const iType & count ) -{ - return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::SerialTeamMember >( thread, count ); -} - -template< typename iType1, typename iType2 > -KOKKOS_INLINE_FUNCTION -Impl::TeamThreadRangeBoundariesStruct< typename std::common_type< iType1, iType2 >::type, - Impl::SerialTeamMember > -TeamThreadRange( const Impl::SerialTeamMember& thread, const iType1 & begin, const iType2 & end ) -{ - typedef typename std::common_type< iType1, iType2 >::type iType; - return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::SerialTeamMember >( thread, iType(begin), iType(end) ); -} - -template -KOKKOS_INLINE_FUNCTION -Impl::ThreadVectorRangeBoundariesStruct - ThreadVectorRange(const Impl::SerialTeamMember& thread, const iType& count) { - return Impl::ThreadVectorRangeBoundariesStruct(thread,count); -} - -KOKKOS_INLINE_FUNCTION -Impl::ThreadSingleStruct PerTeam(const Impl::SerialTeamMember& thread) { - return Impl::ThreadSingleStruct(thread); -} - -KOKKOS_INLINE_FUNCTION -Impl::VectorSingleStruct PerThread(const Impl::SerialTeamMember& thread) { - return Impl::VectorSingleStruct(thread); -} - -} // namespace Kokkos - -namespace Kokkos { - - /** \brief Inter-thread parallel_for. Executes lambda(iType i) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all threads of the the calling thread team. - * This functionality requires C++11 support.*/ -template -KOKKOS_INLINE_FUNCTION -void parallel_for(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, const Lambda& lambda) { - for( iType i = loop_boundaries.begin; i < loop_boundaries.end; i+=loop_boundaries.increment) - lambda(i); -} - -/** \brief Inter-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all threads of the the calling thread team and a summation of - * val is performed and put into result. This functionality requires C++11 support.*/ -template< typename iType, class Lambda, typename ValueType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, - const Lambda & lambda, ValueType& result) { - - result = ValueType(); - - for( iType i = loop_boundaries.begin; i < loop_boundaries.end; i+=loop_boundaries.increment) { - ValueType tmp = ValueType(); - lambda(i,tmp); - result+=tmp; - } - - result = loop_boundaries.thread.team_reduce(result,Impl::JoinAdd()); -} - -/** \brief Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a reduction of - * val is performed using JoinType(ValueType& val, const ValueType& update) and put into init_result. - * The input value of init_result is used as initializer for temporary variables of ValueType. Therefore - * the input value should be the neutral element with respect to the join operation (e.g. '0 for +-' or - * '1 for *'). This functionality requires C++11 support.*/ -template< typename iType, class Lambda, typename ValueType, class JoinType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, - const Lambda & lambda, const JoinType& join, ValueType& init_result) { - - ValueType result = init_result; - - for( iType i = loop_boundaries.begin; i < loop_boundaries.end; i+=loop_boundaries.increment) { - ValueType tmp = ValueType(); - lambda(i,tmp); - join(result,tmp); - } - - init_result = loop_boundaries.thread.team_reduce(result,Impl::JoinLambdaAdapter(join)); -} - -} //namespace Kokkos - -namespace Kokkos { -/** \brief Intra-thread vector parallel_for. Executes lambda(iType i) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all vector lanes of the the calling thread. - * This functionality requires C++11 support.*/ -template -KOKKOS_INLINE_FUNCTION -void parallel_for(const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries, const Lambda& lambda) { - #ifdef KOKKOS_ENABLE_PRAGMA_IVDEP - #pragma ivdep - #endif - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) - lambda(i); -} - -/** \brief Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a summation of - * val is performed and put into result. This functionality requires C++11 support.*/ -template< typename iType, class Lambda, typename ValueType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries, const Lambda & lambda, ValueType& result) { - result = ValueType(); -#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP -#pragma ivdep -#endif - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - ValueType tmp = ValueType(); - lambda(i,tmp); - result+=tmp; - } -} - -/** \brief Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a reduction of - * val is performed using JoinType(ValueType& val, const ValueType& update) and put into init_result. - * The input value of init_result is used as initializer for temporary variables of ValueType. Therefore - * the input value should be the neutral element with respect to the join operation (e.g. '0 for +-' or - * '1 for *'). This functionality requires C++11 support.*/ -template< typename iType, class Lambda, typename ValueType, class JoinType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries, const Lambda & lambda, const JoinType& join, ValueType& init_result) { - - ValueType result = init_result; -#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP -#pragma ivdep -#endif - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - ValueType tmp = ValueType(); - lambda(i,tmp); - join(result,tmp); - } - init_result = result; -} - -/** \brief Intra-thread vector parallel exclusive prefix sum. Executes lambda(iType i, ValueType & val, bool final) - * for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all vector lanes in the thread and a scan operation is performed. - * Depending on the target execution space the operator might be called twice: once with final=false - * and once with final=true. When final==true val contains the prefix sum value. The contribution of this - * "i" needs to be added to val no matter whether final==true or not. In a serial execution - * (i.e. team_size==1) the operator is only called once with final==true. Scan_val will be set - * to the final sum value over all vector lanes. - * This functionality requires C++11 support.*/ -template< typename iType, class FunctorType > -KOKKOS_INLINE_FUNCTION -void parallel_scan(const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries, const FunctorType & lambda) { - - typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ; - typedef typename ValueTraits::value_type value_type ; - - value_type scan_val = value_type(); - -#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP -#pragma ivdep -#endif - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - lambda(i,scan_val,true); - } -} - -} // namespace Kokkos - -namespace Kokkos { - -template -KOKKOS_INLINE_FUNCTION -void single(const Impl::VectorSingleStruct& , const FunctorType& lambda) { - lambda(); -} - -template -KOKKOS_INLINE_FUNCTION -void single(const Impl::ThreadSingleStruct& , const FunctorType& lambda) { - lambda(); -} - -template -KOKKOS_INLINE_FUNCTION -void single(const Impl::VectorSingleStruct& , const FunctorType& lambda, ValueType& val) { - lambda(val); -} - -template -KOKKOS_INLINE_FUNCTION -void single(const Impl::ThreadSingleStruct& , const FunctorType& lambda, ValueType& val) { - lambda(val); -} -} - -//---------------------------------------------------------------------------- #include diff --git a/lib/kokkos/core/src/Kokkos_TaskScheduler.hpp b/lib/kokkos/core/src/Kokkos_TaskScheduler.hpp index e4271aa188..e25039d236 100644 --- a/lib/kokkos/core/src/Kokkos_TaskScheduler.hpp +++ b/lib/kokkos/core/src/Kokkos_TaskScheduler.hpp @@ -82,6 +82,15 @@ class Future ; template< typename Space > class TaskScheduler ; +template< typename Space > +void wait( TaskScheduler< Space > const & ); + +template< typename Space > +struct is_scheduler : public std::false_type {}; + +template< typename Space > +struct is_scheduler< TaskScheduler< Space > > : public std::true_type {}; + } // namespace Kokkos #include @@ -109,9 +118,6 @@ namespace Impl { template< typename Space , typename ResultType , typename FunctorType > class TaskBase ; -template< typename Space > -class TaskExec ; - } // namespace Impl } // namespace Kokkos @@ -312,6 +318,19 @@ public: } }; +// Is a Future with the given execution space +template< typename , typename ExecSpace = void > +struct is_future : public std::false_type {}; + +template< typename Arg1 , typename Arg2 , typename ExecSpace > +struct is_future< Future , ExecSpace > + : public std::integral_constant + < bool , + ( std::is_same< ExecSpace , void >::value || + std::is_same< ExecSpace + , typename Future::execution_space >::value ) + > {}; + } // namespace Kokkos //---------------------------------------------------------------------------- @@ -319,18 +338,59 @@ public: namespace Kokkos { -enum TaskType { TaskTeam = Impl::TaskBase::TaskTeam - , TaskSingle = Impl::TaskBase::TaskSingle }; +enum class TaskPriority : int { High = 0 + , Regular = 1 + , Low = 2 }; -enum TaskPriority { TaskHighPriority = 0 - , TaskRegularPriority = 1 - , TaskLowPriority = 2 }; +} // namespace Kokkos -template< typename Space > -void wait( TaskScheduler< Space > const & ); +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { +namespace Impl { + +//---------------------------------------------------------------------------- + +template< int TaskEnum , typename DepFutureType > +struct TaskPolicyData +{ + using execution_space = typename DepFutureType::execution_space ; + using scheduler_type = TaskScheduler< execution_space > ; + + enum : int { m_task_type = TaskEnum }; + + scheduler_type const * m_scheduler ; + DepFutureType const m_dependence ; + int m_priority ; + + TaskPolicyData() = delete ; + TaskPolicyData( TaskPolicyData && ) = default ; + TaskPolicyData( TaskPolicyData const & ) = default ; + TaskPolicyData & operator = ( TaskPolicyData && ) = default ; + TaskPolicyData & operator = ( TaskPolicyData const & ) = default ; + + KOKKOS_INLINE_FUNCTION + TaskPolicyData( DepFutureType && arg_future + , Kokkos::TaskPriority const & arg_priority ) + : m_scheduler( 0 ) + , m_dependence( arg_future ) + , m_priority( static_cast( arg_priority ) ) + {} + + KOKKOS_INLINE_FUNCTION + TaskPolicyData( scheduler_type const & arg_scheduler + , Kokkos::TaskPriority const & arg_priority ) + : m_scheduler( & arg_scheduler ) + , m_dependence() + , m_priority( static_cast( arg_priority ) ) + {} +}; +} // namespace Impl } // namespace Kokkos +//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { @@ -348,52 +408,13 @@ private: queue_type * m_queue ; //---------------------------------------- - // Process optional arguments to spawn and respawn functions - - KOKKOS_INLINE_FUNCTION static - void assign( task_base * const ) {} - - // TaskTeam or TaskSingle - template< typename ... Options > - KOKKOS_INLINE_FUNCTION static - void assign( task_base * const task - , TaskType const & arg - , Options const & ... opts ) - { - task->m_task_type = arg ; - assign( task , opts ... ); - } - - // TaskHighPriority or TaskRegularPriority or TaskLowPriority - template< typename ... Options > - KOKKOS_INLINE_FUNCTION static - void assign( task_base * const task - , TaskPriority const & arg - , Options const & ... opts ) - { - task->m_priority = arg ; - assign( task , opts ... ); - } - - // Future for a dependence - template< typename A1 , typename A2 , typename ... Options > - KOKKOS_INLINE_FUNCTION static - void assign( task_base * const task - , Future< A1 , A2 > const & arg - , Options const & ... opts ) - { - task->add_dependence( arg.m_task ); - assign( task , opts ... ); - } - - //---------------------------------------- public: - using execution_policy = TaskScheduler ; using execution_space = ExecSpace ; using memory_space = typename queue_type::memory_space ; - using member_type = Kokkos::Impl::TaskExec< ExecSpace > ; + using member_type = + typename Kokkos::Impl::TaskQueueSpecialization< ExecSpace >::member_type ; KOKKOS_INLINE_FUNCTION TaskScheduler() : m_track(), m_queue(0) {} @@ -460,18 +481,13 @@ public: //---------------------------------------- - /**\brief A task spawns a task with options - * - * 1) High, Normal, or Low priority - * 2) With or without dependence - * 3) Team or Serial - */ - template< typename FunctorType , typename ... Options > - KOKKOS_FUNCTION - Future< typename FunctorType::value_type , ExecSpace > - task_spawn( FunctorType const & arg_functor - , Options const & ... arg_options - ) const + template< int TaskEnum , typename DepFutureType , typename FunctorType > + KOKKOS_FUNCTION static + Kokkos::Future< typename FunctorType::value_type , execution_space > + spawn( Impl::TaskPolicyData const & arg_policy + , typename task_base::function_type arg_function + , FunctorType && arg_functor + ) { using value_type = typename FunctorType::value_type ; using future_type = Future< value_type , execution_space > ; @@ -479,11 +495,21 @@ public: , value_type , FunctorType > ; + queue_type * const queue = + arg_policy.m_scheduler ? arg_policy.m_scheduler->m_queue : ( + arg_policy.m_dependence.m_task + ? arg_policy.m_dependence.m_task->m_queue + : (queue_type*) 0 ); + + if ( 0 == queue ) { + Kokkos::abort("Kokkos spawn given null Future" ); + } + //---------------------------------------- // Give single-thread back-ends an opportunity to clear // queue of ready tasks before allocating a new task - m_queue->iff_single_thread_recursive_execute(); + queue->iff_single_thread_recursive_execute(); //---------------------------------------- @@ -491,176 +517,129 @@ public: // Allocate task from memory pool f.m_task = - reinterpret_cast< task_type * >(m_queue->allocate(sizeof(task_type))); + reinterpret_cast< task_type * >(queue->allocate(sizeof(task_type))); if ( f.m_task ) { // Placement new construction - new ( f.m_task ) task_type( arg_functor ); - - // Reference count starts at two - // +1 for matching decrement when task is complete - // +1 for future - f.m_task->m_queue = m_queue ; - f.m_task->m_ref_count = 2 ; - f.m_task->m_alloc_size = sizeof(task_type); - - assign( f.m_task , arg_options... ); - - // Spawning from within the execution space so the - // apply function pointer is guaranteed to be valid - f.m_task->m_apply = task_type::apply ; - - m_queue->schedule( f.m_task ); - // this task may be updated or executed at any moment + // Reference count starts at two: + // +1 for the matching decrement when task is complete + // +1 for the future + new ( f.m_task ) + task_type( arg_function + , queue + , arg_policy.m_dependence.m_task /* dependence */ + , 2 /* reference count */ + , int(sizeof(task_type)) /* allocation size */ + , int(arg_policy.m_task_type) + , int(arg_policy.m_priority) + , std::move(arg_functor) ); + + // The dependence (if any) is processed immediately + // within the schedule function, as such the dependence's + // reference count does not need to be incremented for + // the assignment. + + queue->schedule_runnable( f.m_task ); + // This task may be updated or executed at any moment, + // even during the call to 'schedule'. } return f ; } - /**\brief The host process spawns a task with options - * - * 1) High, Normal, or Low priority - * 2) With or without dependence - * 3) Team or Serial - */ - template< typename FunctorType , typename ... Options > - inline - Future< typename FunctorType::value_type , ExecSpace > - host_spawn( FunctorType const & arg_functor - , Options const & ... arg_options - ) const + template< typename FunctorType , typename A1 , typename A2 > + KOKKOS_FUNCTION static + void + respawn( FunctorType * arg_self + , Future const & arg_dependence + , TaskPriority const & arg_priority + ) { + // Precondition: task is in Executing state + using value_type = typename FunctorType::value_type ; - using future_type = Future< value_type , execution_space > ; using task_type = Impl::TaskBase< execution_space , value_type , FunctorType > ; - if ( m_queue == 0 ) { - Kokkos::abort("Kokkos::TaskScheduler not initialized"); - } + task_type * const task = static_cast< task_type * >( arg_self ); - future_type f ; + task->m_priority = static_cast(arg_priority); - // Allocate task from memory pool - f.m_task = - reinterpret_cast( m_queue->allocate(sizeof(task_type)) ); - - if ( f.m_task ) { - - // Placement new construction - new( f.m_task ) task_type( arg_functor ); - - // Reference count starts at two: - // +1 to match decrement when task completes - // +1 for the future - f.m_task->m_queue = m_queue ; - f.m_task->m_ref_count = 2 ; - f.m_task->m_alloc_size = sizeof(task_type); - - assign( f.m_task , arg_options... ); - - // Potentially spawning outside execution space so the - // apply function pointer must be obtained from execution space. - // Required for Cuda execution space function pointer. - m_queue->template proc_set_apply< FunctorType >( & f.m_task->m_apply ); + task->add_dependence( arg_dependence.m_task ); - m_queue->schedule( f.m_task ); - } - return f ; + // Postcondition: task is in Executing-Respawn state } + //---------------------------------------- /**\brief Return a future that is complete * when all input futures are complete. */ template< typename A1 , typename A2 > - KOKKOS_FUNCTION - Future< ExecSpace > - when_all( int narg , Future< A1 , A2 > const * const arg ) const + KOKKOS_FUNCTION static + Future< execution_space > + when_all( Future< A1 , A2 > const arg[] , int narg ) { - static_assert - ( std::is_same< execution_space - , typename Future< A1 , A2 >::execution_space - >::value - , "Future must have same execution space" ); - - using future_type = Future< ExecSpace > ; - using task_base = Kokkos::Impl::TaskBase< ExecSpace , void , void > ; + using future_type = Future< execution_space > ; + using task_base = Kokkos::Impl::TaskBase< execution_space , void , void > ; future_type f ; - size_t const size = sizeof(task_base) + narg * sizeof(task_base*); - - f.m_task = - reinterpret_cast< task_base * >( m_queue->allocate( size ) ); + if ( narg ) { - if ( f.m_task ) { - - new( f.m_task ) task_base(); - - // Reference count starts at two: - // +1 to match decrement when task completes - // +1 for the future - f.m_task->m_queue = m_queue ; - f.m_task->m_ref_count = 2 ; - f.m_task->m_alloc_size = size ; - f.m_task->m_dep_count = narg ; - f.m_task->m_task_type = task_base::Aggregate ; - - task_base ** const dep = f.m_task->aggregate_dependences(); - - // Assign dependences to increment their reference count - // The futures may be destroyed upon returning from this call - // so increment reference count to track this assignment. + queue_type * queue = 0 ; for ( int i = 0 ; i < narg ; ++i ) { - task_base * const t = dep[i] = arg[i].m_task ; + task_base * const t = arg[i].m_task ; if ( 0 != t ) { + // Increment reference count to track subsequent assignment. Kokkos::atomic_increment( &(t->m_ref_count) ); + if ( queue == 0 ) { + queue = t->m_queue ; + } + else if ( queue != t->m_queue ) { + Kokkos::abort("Kokkos when_all Futures must be in the same scheduler" ); + } } } - m_queue->schedule( f.m_task ); - // this when_all may be processed at any moment - } + if ( queue != 0 ) { - return f ; - } + size_t const size = sizeof(task_base) + narg * sizeof(task_base*); - /**\brief An executing task respawns itself with options - * - * 1) High, Normal, or Low priority - * 2) With or without dependence - */ - template< class FunctorType , typename ... Options > - KOKKOS_FUNCTION - void respawn( FunctorType * task_self - , Options const & ... arg_options ) const - { - using value_type = typename FunctorType::value_type ; - using task_type = Impl::TaskBase< execution_space - , value_type - , FunctorType > ; + f.m_task = + reinterpret_cast< task_base * >( queue->allocate( size ) ); - task_type * const task = static_cast< task_type * >( task_self ); + if ( f.m_task ) { - // Reschedule task with no dependences. - m_queue->reschedule( task ); + // Reference count starts at two: + // +1 to match decrement when task completes + // +1 for the future + new( f.m_task ) task_base( queue + , 2 /* reference count */ + , size /* allocation size */ + , narg /* dependence count */ + ); - // Dependences, if requested, are added here through parsing the arguments. - assign( task , arg_options... ); - } + // Assign dependences, reference counts were already incremented - //---------------------------------------- + task_base ** const dep = f.m_task->aggregate_dependences(); - template< typename S > - friend - void Kokkos::wait( Kokkos::TaskScheduler< S > const & ); + for ( int i = 0 ; i < narg ; ++i ) { dep[i] = arg[i].m_task ; } + + queue->schedule_aggregate( f.m_task ); + // this when_all may be processed at any moment + } + } + } + + return f ; + } //---------------------------------------- - inline + KOKKOS_INLINE_FUNCTION int allocation_capacity() const noexcept { return m_queue->m_memory.get_mem_size(); } @@ -676,12 +655,192 @@ public: long allocated_task_count_accum() const noexcept { return m_queue->m_accum_alloc ; } + //---------------------------------------- + + template< typename S > + friend + void Kokkos::wait( Kokkos::TaskScheduler< S > const & ); + }; +} // namespace Kokkos + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { + +//---------------------------------------------------------------------------- +// Construct a TaskTeam execution policy + +template< typename T > +Kokkos::Impl::TaskPolicyData + < Kokkos::Impl::TaskBase::TaskTeam + , typename std::conditional< Kokkos::is_future< T >::value , T , + typename Kokkos::Future< typename T::execution_space > >::type + > +KOKKOS_INLINE_FUNCTION +TaskTeam( T const & arg + , TaskPriority const & arg_priority = TaskPriority::Regular + ) +{ + static_assert( Kokkos::is_future::value || + Kokkos::is_scheduler::value + , "Kokkos TaskTeam argument must be Future or TaskScheduler" ); + + return + Kokkos::Impl::TaskPolicyData + < Kokkos::Impl::TaskBase::TaskTeam + , typename std::conditional< Kokkos::is_future< T >::value , T , + typename Kokkos::Future< typename T::execution_space > >::type + >( arg , arg_priority ); +} + +// Construct a TaskSingle execution policy + +template< typename T > +Kokkos::Impl::TaskPolicyData + < Kokkos::Impl::TaskBase::TaskSingle + , typename std::conditional< Kokkos::is_future< T >::value , T , + typename Kokkos::Future< typename T::execution_space > >::type + > +KOKKOS_INLINE_FUNCTION +TaskSingle( T const & arg + , TaskPriority const & arg_priority = TaskPriority::Regular + ) +{ + static_assert( Kokkos::is_future::value || + Kokkos::is_scheduler::value + , "Kokkos TaskSingle argument must be Future or TaskScheduler" ); + + return + Kokkos::Impl::TaskPolicyData + < Kokkos::Impl::TaskBase::TaskSingle + , typename std::conditional< Kokkos::is_future< T >::value , T , + typename Kokkos::Future< typename T::execution_space > >::type + >( arg , arg_priority ); +} + +//---------------------------------------------------------------------------- + +/**\brief A host control thread spawns a task with options + * + * 1) Team or Serial + * 2) With scheduler or dependence + * 3) High, Normal, or Low priority + */ +template< int TaskEnum + , typename DepFutureType + , typename FunctorType > +Future< typename FunctorType::value_type + , typename DepFutureType::execution_space > +host_spawn( Impl::TaskPolicyData const & arg_policy + , FunctorType && arg_functor + ) +{ + using exec_space = typename DepFutureType::execution_space ; + using scheduler = TaskScheduler< exec_space > ; + + typedef Impl::TaskBase< exec_space + , typename FunctorType::value_type + , FunctorType + > task_type ; + + static_assert( TaskEnum == task_type::TaskTeam || + TaskEnum == task_type::TaskSingle + , "Kokkos host_spawn requires TaskTeam or TaskSingle" ); + + // May be spawning a Cuda task, must use the specialization + // to query on-device function pointer. + typename task_type::function_type const ptr = + Kokkos::Impl::TaskQueueSpecialization< exec_space >:: + template get_function_pointer< task_type >(); + + return scheduler::spawn( arg_policy , ptr , std::move(arg_functor) ); +} + +/**\brief A task spawns a task with options + * + * 1) Team or Serial + * 2) With scheduler or dependence + * 3) High, Normal, or Low priority + */ +template< int TaskEnum + , typename DepFutureType + , typename FunctorType > +Future< typename FunctorType::value_type + , typename DepFutureType::execution_space > +KOKKOS_INLINE_FUNCTION +task_spawn( Impl::TaskPolicyData const & arg_policy + , FunctorType && arg_functor + ) +{ + using exec_space = typename DepFutureType::execution_space ; + using scheduler = TaskScheduler< exec_space > ; + + typedef Impl::TaskBase< exec_space + , typename FunctorType::value_type + , FunctorType + > task_type ; + +#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) && \ + defined( KOKKOS_ENABLE_CUDA ) + + static_assert( ! std::is_same< Kokkos::Cuda , exec_space >::value + , "Error calling Kokkos::task_spawn for Cuda space within Host code" ); + +#endif + + static_assert( TaskEnum == task_type::TaskTeam || + TaskEnum == task_type::TaskSingle + , "Kokkos host_spawn requires TaskTeam or TaskSingle" ); + + typename task_type::function_type const ptr = task_type::apply ; + + return scheduler::spawn( arg_policy , ptr , std::move(arg_functor) ); +} + +/**\brief A task respawns itself with options + * + * 1) With scheduler or dependence + * 2) High, Normal, or Low priority + */ +template< typename FunctorType , typename T > +void +KOKKOS_INLINE_FUNCTION +respawn( FunctorType * arg_self + , T const & arg + , TaskPriority const & arg_priority = TaskPriority::Regular + ) +{ + static_assert( Kokkos::is_future::value || + Kokkos::is_scheduler::value + , "Kokkos respawn argument must be Future or TaskScheduler" ); + + TaskScheduler< typename T::execution_space >:: + respawn( arg_self , arg , arg_priority ); +} + +//---------------------------------------------------------------------------- + +template< typename A1 , typename A2 > +KOKKOS_INLINE_FUNCTION +Future< typename Future< A1 , A2 >::execution_space > +when_all( Future< A1 , A2 > const arg[] + , int narg + ) +{ + return TaskScheduler< typename Future::execution_space >:: + when_all( arg , narg ); +} + +//---------------------------------------------------------------------------- +// Wait for all runnable tasks to complete + template< typename ExecSpace > inline -void wait( TaskScheduler< ExecSpace > const & policy ) -{ policy.m_queue->execute(); } +void wait( TaskScheduler< ExecSpace > const & scheduler ) +{ scheduler.m_queue->execute(); } } // namespace Kokkos diff --git a/lib/kokkos/core/src/Kokkos_Threads.hpp b/lib/kokkos/core/src/Kokkos_Threads.hpp index aca482b427..8aa968d053 100644 --- a/lib/kokkos/core/src/Kokkos_Threads.hpp +++ b/lib/kokkos/core/src/Kokkos_Threads.hpp @@ -230,4 +230,3 @@ struct VerifyExecutionCanAccessMemorySpace #endif /* #if defined( KOKKOS_ENABLE_PTHREAD ) */ #endif /* #define KOKKOS_THREADS_HPP */ - diff --git a/lib/kokkos/core/src/Makefile b/lib/kokkos/core/src/Makefile index 316f61fd4d..0668f89c86 100644 --- a/lib/kokkos/core/src/Makefile +++ b/lib/kokkos/core/src/Makefile @@ -31,23 +31,23 @@ KOKKOS_HEADERS_INCLUDE += $(wildcard $(KOKKOS_PATH)/algorithms/src/*.hpp) CONDITIONAL_COPIES = ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) - KOKKOS_HEADERS_CUDA += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.hpp) - CONDITIONAL_COPIES += copy-cuda + KOKKOS_HEADERS_CUDA += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.hpp) + CONDITIONAL_COPIES += copy-cuda endif ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1) - KOKKOS_HEADERS_THREADS += $(wildcard $(KOKKOS_PATH)/core/src/Threads/*.hpp) - CONDITIONAL_COPIES += copy-threads + KOKKOS_HEADERS_THREADS += $(wildcard $(KOKKOS_PATH)/core/src/Threads/*.hpp) + CONDITIONAL_COPIES += copy-threads endif -ifeq ($(KOKKOS_INTERNAL_USE_QTHREAD), 1) - KOKKOS_HEADERS_QTHREAD += $(wildcard $(KOKKOS_PATH)/core/src/Qthread/*.hpp) - CONDITIONAL_COPIES += copy-qthread +ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1) + KOKKOS_HEADERS_QTHREADS += $(wildcard $(KOKKOS_PATH)/core/src/Qthreads/*.hpp) + CONDITIONAL_COPIES += copy-qthreads endif ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1) - KOKKOS_HEADERS_OPENMP += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.hpp) - CONDITIONAL_COPIES += copy-openmp + KOKKOS_HEADERS_OPENMP += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.hpp) + CONDITIONAL_COPIES += copy-openmp endif ifeq ($(KOKKOS_OS),CYGWIN) @@ -60,6 +60,12 @@ ifeq ($(KOKKOS_OS),Darwin) COPY_FLAG = endif +ifeq ($(KOKKOS_DEBUG),"no") + KOKKOS_DEBUG_CMAKE = OFF +else + KOKKOS_DEBUG_CMAKE = ON +endif + messages: echo "Start Build" @@ -91,6 +97,7 @@ build-makefile-kokkos: echo "" >> Makefile.kokkos echo "#Internal settings which need to propagated for Kokkos examples" >> Makefile.kokkos echo "KOKKOS_INTERNAL_USE_CUDA = ${KOKKOS_INTERNAL_USE_CUDA}" >> Makefile.kokkos + echo "KOKKOS_INTERNAL_USE_QTHREADS = ${KOKKOS_INTERNAL_USE_QTHREADS}" >> Makefile.kokkos echo "KOKKOS_INTERNAL_USE_OPENMP = ${KOKKOS_INTERNAL_USE_OPENMP}" >> Makefile.kokkos echo "KOKKOS_INTERNAL_USE_PTHREADS = ${KOKKOS_INTERNAL_USE_PTHREADS}" >> Makefile.kokkos echo "" >> Makefile.kokkos @@ -107,7 +114,55 @@ build-makefile-kokkos: > Makefile.kokkos.tmp mv -f Makefile.kokkos.tmp Makefile.kokkos -build-lib: build-makefile-kokkos $(KOKKOS_LINK_DEPENDS) +build-cmake-kokkos: + rm -f kokkos.cmake + echo "#Global Settings used to generate this library" >> kokkos.cmake + echo "set(KOKKOS_PATH $(PREFIX) CACHE PATH \"Kokkos installation path\")" >> kokkos.cmake + echo "set(KOKKOS_DEVICES $(KOKKOS_DEVICES) CACHE STRING \"Kokkos devices list\")" >> kokkos.cmake + echo "set(KOKKOS_ARCH $(KOKKOS_ARCH) CACHE STRING \"Kokkos architecture flags\")" >> kokkos.cmake + echo "set(KOKKOS_DEBUG $(KOKKOS_DEBUG_CMAKE) CACHE BOOL \"Kokkos debug enabled ?)\")" >> kokkos.cmake + echo "set(KOKKOS_USE_TPLS $(KOKKOS_USE_TPLS) CACHE STRING \"Kokkos templates list\")" >> kokkos.cmake + echo "set(KOKKOS_CXX_STANDARD $(KOKKOS_CXX_STANDARD) CACHE STRING \"Kokkos C++ standard\")" >> kokkos.cmake + echo "set(KOKKOS_OPTIONS $(KOKKOS_OPTIONS) CACHE STRING \"Kokkos options\")" >> kokkos.cmake + echo "set(KOKKOS_CUDA_OPTIONS $(KOKKOS_CUDA_OPTIONS) CACHE STRING \"Kokkos Cuda options\")" >> kokkos.cmake + echo "if(NOT $ENV{CXX})" >> kokkos.cmake + echo ' message(WARNING "You are currently using compiler $${CMAKE_CXX_COMPILER} while Kokkos was built with $(CXX) ; make sure this is the behavior you intended to be.")' >> kokkos.cmake + echo "endif()" >> kokkos.cmake + echo "if(NOT DEFINED ENV{NVCC_WRAPPER})" >> kokkos.cmake + echo " set(NVCC_WRAPPER \"$(NVCC_WRAPPER)\" CACHE FILEPATH \"Path to command nvcc_wrapper\")" >> kokkos.cmake + echo "else()" >> kokkos.cmake + echo ' set(NVCC_WRAPPER $$ENV{NVCC_WRAPPER} CACHE FILEPATH "Path to command nvcc_wrapper")' >> kokkos.cmake + echo "endif()" >> kokkos.cmake + echo "" >> kokkos.cmake + echo "#Source and Header files of Kokkos relative to KOKKOS_PATH" >> kokkos.cmake + echo "set(KOKKOS_HEADERS \"$(KOKKOS_HEADERS)\" CACHE STRING \"Kokkos headers list\")" >> kokkos.cmake + echo "set(KOKKOS_SRC \"$(KOKKOS_SRC)\" CACHE STRING \"Kokkos source list\")" >> kokkos.cmake + echo "" >> kokkos.cmake + echo "#Variables used in application Makefiles" >> kokkos.cmake + echo "set(KOKKOS_CPP_DEPENDS \"$(KOKKOS_CPP_DEPENDS)\" CACHE STRING \"\")" >> kokkos.cmake + echo "set(KOKKOS_CXXFLAGS \"$(KOKKOS_CXXFLAGS)\" CACHE STRING \"\")" >> kokkos.cmake + echo "set(KOKKOS_CPPFLAGS \"$(KOKKOS_CPPFLAGS)\" CACHE STRING \"\")" >> kokkos.cmake + echo "set(KOKKOS_LINK_DEPENDS \"$(KOKKOS_LINK_DEPENDS)\" CACHE STRING \"\")" >> kokkos.cmake + echo "set(KOKKOS_LIBS \"$(KOKKOS_LIBS)\" CACHE STRING \"\")" >> kokkos.cmake + echo "set(KOKKOS_LDFLAGS \"$(KOKKOS_LDFLAGS)\" CACHE STRING \"\")" >> kokkos.cmake + echo "" >> kokkos.cmake + echo "#Internal settings which need to propagated for Kokkos examples" >> kokkos.cmake + echo "set(KOKKOS_INTERNAL_USE_CUDA \"${KOKKOS_INTERNAL_USE_CUDA}\" CACHE STRING \"\")" >> kokkos.cmake + echo "set(KOKKOS_INTERNAL_USE_OPENMP \"${KOKKOS_INTERNAL_USE_OPENMP}\" CACHE STRING \"\")" >> kokkos.cmake + echo "set(KOKKOS_INTERNAL_USE_PTHREADS \"${KOKKOS_INTERNAL_USE_PTHREADS}\" CACHE STRING \"\")" >> kokkos.cmake + echo "mark_as_advanced(KOKKOS_HEADERS KOKKOS_SRC KOKKOS_INTERNAL_USE_CUDA KOKKOS_INTERNAL_USE_OPENMP KOKKOS_INTERNAL_USE_PTHREADS)" >> kokkos.cmake + echo "" >> kokkos.cmake + sed \ + -e 's|$(KOKKOS_PATH)/core/src|$(PREFIX)/include|g' \ + -e 's|$(KOKKOS_PATH)/containers/src|$(PREFIX)/include|g' \ + -e 's|$(KOKKOS_PATH)/algorithms/src|$(PREFIX)/include|g' \ + -e 's|-L$(PWD)|-L$(PREFIX)/lib|g' \ + -e 's|= libkokkos.a|= $(PREFIX)/lib/libkokkos.a|g' \ + -e 's|= KokkosCore_config.h|= $(PREFIX)/include/KokkosCore_config.h|g' kokkos.cmake \ + > kokkos.cmake.tmp + mv -f kokkos.cmake.tmp kokkos.cmake + +build-lib: build-makefile-kokkos build-cmake-kokkos $(KOKKOS_LINK_DEPENDS) mkdir: mkdir -p $(PREFIX) @@ -124,9 +179,9 @@ copy-threads: mkdir mkdir -p $(PREFIX)/include/Threads cp $(COPY_FLAG) $(KOKKOS_HEADERS_THREADS) $(PREFIX)/include/Threads -copy-qthread: mkdir - mkdir -p $(PREFIX)/include/Qthread - cp $(COPY_FLAG) $(KOKKOS_HEADERS_QTHREAD) $(PREFIX)/include/Qthread +copy-qthreads: mkdir + mkdir -p $(PREFIX)/include/Qthreads + cp $(COPY_FLAG) $(KOKKOS_HEADERS_QTHREADS) $(PREFIX)/include/Qthreads copy-openmp: mkdir mkdir -p $(PREFIX)/include/OpenMP @@ -137,6 +192,7 @@ install: mkdir $(CONDITIONAL_COPIES) build-lib cp $(COPY_FLAG) $(KOKKOS_HEADERS_INCLUDE) $(PREFIX)/include cp $(COPY_FLAG) $(KOKKOS_HEADERS_INCLUDE_IMPL) $(PREFIX)/include/impl cp $(COPY_FLAG) Makefile.kokkos $(PREFIX) + cp $(COPY_FLAG) kokkos.cmake $(PREFIX) cp $(COPY_FLAG) libkokkos.a $(PREFIX)/lib cp $(COPY_FLAG) KokkosCore_config.h $(PREFIX)/include diff --git a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Parallel.hpp b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Parallel.hpp index a61791ca9c..ecacffb773 100644 --- a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Parallel.hpp +++ b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Parallel.hpp @@ -46,7 +46,6 @@ #include #include -#include #include #include @@ -107,58 +106,41 @@ private: public: - inline void execute() const { - this->template execute_schedule(); - } - - template - inline - typename std::enable_if< std::is_same::value >::type - execute_schedule() const + inline void execute() const { + enum { is_dynamic = std::is_same< typename Policy::schedule_type::type + , Kokkos::Dynamic >::value }; + OpenMPexec::verify_is_process("Kokkos::OpenMP parallel_for"); OpenMPexec::verify_initialized("Kokkos::OpenMP parallel_for"); #pragma omp parallel { - OpenMPexec & exec = * OpenMPexec::get_thread_omp(); - - const WorkRange range( m_policy, exec.pool_rank(), exec.pool_size() ); + HostThreadTeamData & data = *OpenMPexec::get_thread_data(); - ParallelFor::template exec_range< WorkTag >( m_functor , range.begin() , range.end() ); - } -/* END #pragma omp parallel */ - } + data.set_work_partition( m_policy.end() - m_policy.begin() + , m_policy.chunk_size() ); - template - inline - typename std::enable_if< std::is_same::value >::type - execute_schedule() const - { - OpenMPexec::verify_is_process("Kokkos::OpenMP parallel_for"); - OpenMPexec::verify_initialized("Kokkos::OpenMP parallel_for"); + if ( is_dynamic ) { + // Make sure work partition is set before stealing + if ( data.pool_rendezvous() ) data.pool_rendezvous_release(); + } -#pragma omp parallel - { - OpenMPexec & exec = * OpenMPexec::get_thread_omp(); + std::pair range(0,0); - const WorkRange range( m_policy, exec.pool_rank(), exec.pool_size() ); + do { - exec.set_work_range(range.begin(),range.end(),m_policy.chunk_size()); - exec.reset_steal_target(); - #pragma omp barrier - - long work_index = exec.get_work_index(); + range = is_dynamic ? data.get_work_stealing_chunk() + : data.get_work_partition(); - while(work_index != -1) { - const Member begin = static_cast(work_index) * m_policy.chunk_size(); - const Member end = begin + m_policy.chunk_size() < m_policy.end()?begin+m_policy.chunk_size():m_policy.end(); - ParallelFor::template exec_range< WorkTag >( m_functor , begin, end ); - work_index = exec.get_work_index(); - } + ParallelFor::template + exec_range< WorkTag >( m_functor + , range.first + m_policy.begin() + , range.second + m_policy.begin() ); + } while ( is_dynamic && 0 <= range.first ); } -/* END #pragma omp parallel */ + // END #pragma omp parallel } inline @@ -193,17 +175,18 @@ private: typedef typename Policy::WorkRange WorkRange ; typedef typename Policy::member_type Member ; + typedef FunctorAnalysis< FunctorPatternInterface::REDUCE , Policy , FunctorType > Analysis ; + typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType> ReducerConditional; typedef typename ReducerConditional::type ReducerTypeFwd; // Static Assert WorkTag void if ReducerType not InvalidType - typedef Kokkos::Impl::FunctorValueTraits< ReducerTypeFwd, WorkTag > ValueTraits ; typedef Kokkos::Impl::FunctorValueInit< ReducerTypeFwd, WorkTag > ValueInit ; typedef Kokkos::Impl::FunctorValueJoin< ReducerTypeFwd, WorkTag > ValueJoin ; - typedef typename ValueTraits::pointer_type pointer_type ; - typedef typename ValueTraits::reference_type reference_type ; + typedef typename Analysis::pointer_type pointer_type ; + typedef typename Analysis::reference_type reference_type ; const FunctorType m_functor ; const Policy m_policy ; @@ -247,92 +230,70 @@ private: public: - inline void execute() const { - this->template execute_schedule(); - } - - template - inline - typename std::enable_if< std::is_same::value >::type - execute_schedule() const + inline void execute() const { - OpenMPexec::verify_is_process("Kokkos::OpenMP parallel_reduce"); - OpenMPexec::verify_initialized("Kokkos::OpenMP parallel_reduce"); + enum { is_dynamic = std::is_same< typename Policy::schedule_type::type + , Kokkos::Dynamic >::value }; - OpenMPexec::resize_scratch( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) , 0 ); + OpenMPexec::verify_is_process("Kokkos::OpenMP parallel_for"); + OpenMPexec::verify_initialized("Kokkos::OpenMP parallel_for"); + + const size_t pool_reduce_bytes = + Analysis::value_size( ReducerConditional::select(m_functor, m_reducer)); + + OpenMPexec::resize_thread_data( pool_reduce_bytes + , 0 // team_reduce_bytes + , 0 // team_shared_bytes + , 0 // thread_local_bytes + ); #pragma omp parallel { - OpenMPexec & exec = * OpenMPexec::get_thread_omp(); - const WorkRange range( m_policy, exec.pool_rank(), exec.pool_size() ); - ParallelReduce::template exec_range< WorkTag > - ( m_functor , range.begin() , range.end() - , ValueInit::init( ReducerConditional::select(m_functor , m_reducer), exec.scratch_reduce() ) ); - } -/* END #pragma omp parallel */ + HostThreadTeamData & data = *OpenMPexec::get_thread_data(); - // Reduction: + data.set_work_partition( m_policy.end() - m_policy.begin() + , m_policy.chunk_size() ); - const pointer_type ptr = pointer_type( OpenMPexec::pool_rev(0)->scratch_reduce() ); + if ( is_dynamic ) { + // Make sure work partition is set before stealing + if ( data.pool_rendezvous() ) data.pool_rendezvous_release(); + } - for ( int i = 1 ; i < OpenMPexec::pool_size() ; ++i ) { - ValueJoin::join( ReducerConditional::select(m_functor , m_reducer) , ptr , OpenMPexec::pool_rev(i)->scratch_reduce() ); - } + reference_type update = + ValueInit::init( ReducerConditional::select(m_functor , m_reducer) + , data.pool_reduce_local() ); - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTag >::final( ReducerConditional::select(m_functor , m_reducer) , ptr ); + std::pair range(0,0); - if ( m_result_ptr ) { - const int n = ValueTraits::value_count( ReducerConditional::select(m_functor , m_reducer) ); + do { - for ( int j = 0 ; j < n ; ++j ) { m_result_ptr[j] = ptr[j] ; } - } - } + range = is_dynamic ? data.get_work_stealing_chunk() + : data.get_work_partition(); - template - inline - typename std::enable_if< std::is_same::value >::type - execute_schedule() const - { - OpenMPexec::verify_is_process("Kokkos::OpenMP parallel_reduce"); - OpenMPexec::verify_initialized("Kokkos::OpenMP parallel_reduce"); + ParallelReduce::template + exec_range< WorkTag >( m_functor + , range.first + m_policy.begin() + , range.second + m_policy.begin() + , update ); - OpenMPexec::resize_scratch( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) , 0 ); - -#pragma omp parallel - { - OpenMPexec & exec = * OpenMPexec::get_thread_omp(); - const WorkRange range( m_policy, exec.pool_rank(), exec.pool_size() ); - - exec.set_work_range(range.begin(),range.end(),m_policy.chunk_size()); - exec.reset_steal_target(); - #pragma omp barrier - - long work_index = exec.get_work_index(); - - reference_type update = ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , exec.scratch_reduce() ); - while(work_index != -1) { - const Member begin = static_cast(work_index) * m_policy.chunk_size(); - const Member end = begin + m_policy.chunk_size() < m_policy.end()?begin+m_policy.chunk_size():m_policy.end(); - ParallelReduce::template exec_range< WorkTag > - ( m_functor , begin,end - , update ); - work_index = exec.get_work_index(); - } + } while ( is_dynamic && 0 <= range.first ); } -/* END #pragma omp parallel */ +// END #pragma omp parallel // Reduction: - const pointer_type ptr = pointer_type( OpenMPexec::pool_rev(0)->scratch_reduce() ); + const pointer_type ptr = pointer_type( OpenMPexec::get_thread_data(0)->pool_reduce_local() ); for ( int i = 1 ; i < OpenMPexec::pool_size() ; ++i ) { - ValueJoin::join( ReducerConditional::select(m_functor , m_reducer) , ptr , OpenMPexec::pool_rev(i)->scratch_reduce() ); + ValueJoin::join( ReducerConditional::select(m_functor , m_reducer) + , ptr + , OpenMPexec::get_thread_data(i)->pool_reduce_local() ); } Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTag >::final( ReducerConditional::select(m_functor , m_reducer) , ptr ); if ( m_result_ptr ) { - const int n = ValueTraits::value_count( ReducerConditional::select(m_functor , m_reducer) ); + const int n = Analysis::value_count( ReducerConditional::select(m_functor , m_reducer) ); for ( int j = 0 ; j < n ; ++j ) { m_result_ptr[j] = ptr[j] ; } } @@ -394,17 +355,18 @@ private: typedef Kokkos::RangePolicy< Traits ... > Policy ; + typedef FunctorAnalysis< FunctorPatternInterface::SCAN , Policy , FunctorType > Analysis ; + typedef typename Policy::work_tag WorkTag ; typedef typename Policy::WorkRange WorkRange ; typedef typename Policy::member_type Member ; - typedef Kokkos::Impl::FunctorValueTraits< FunctorType, WorkTag > ValueTraits ; typedef Kokkos::Impl::FunctorValueInit< FunctorType, WorkTag > ValueInit ; typedef Kokkos::Impl::FunctorValueJoin< FunctorType, WorkTag > ValueJoin ; typedef Kokkos::Impl::FunctorValueOps< FunctorType, WorkTag > ValueOps ; - typedef typename ValueTraits::pointer_type pointer_type ; - typedef typename ValueTraits::reference_type reference_type ; + typedef typename Analysis::pointer_type pointer_type ; + typedef typename Analysis::reference_type reference_type ; const FunctorType m_functor ; const Policy m_policy ; @@ -452,53 +414,63 @@ public: OpenMPexec::verify_is_process("Kokkos::OpenMP parallel_scan"); OpenMPexec::verify_initialized("Kokkos::OpenMP parallel_scan"); - OpenMPexec::resize_scratch( 2 * ValueTraits::value_size( m_functor ) , 0 ); + const int value_count = Analysis::value_count( m_functor ); + const size_t pool_reduce_bytes = 2 * Analysis::value_size( m_functor ); + + OpenMPexec::resize_thread_data( pool_reduce_bytes + , 0 // team_reduce_bytes + , 0 // team_shared_bytes + , 0 // thread_local_bytes + ); #pragma omp parallel { - OpenMPexec & exec = * OpenMPexec::get_thread_omp(); - const WorkRange range( m_policy, exec.pool_rank(), exec.pool_size() ); - const pointer_type ptr = - pointer_type( exec.scratch_reduce() ) + - ValueTraits::value_count( m_functor ); + HostThreadTeamData & data = *OpenMPexec::get_thread_data(); + + const WorkRange range( m_policy, data.pool_rank(), data.pool_size() ); + + reference_type update_sum = + ValueInit::init( m_functor , data.pool_reduce_local() ); + ParallelScan::template exec_range< WorkTag > - ( m_functor , range.begin() , range.end() - , ValueInit::init( m_functor , ptr ) , false ); - } -/* END #pragma omp parallel */ + ( m_functor , range.begin() , range.end() , update_sum , false ); - { - const unsigned thread_count = OpenMPexec::pool_size(); - const unsigned value_count = ValueTraits::value_count( m_functor ); + if ( data.pool_rendezvous() ) { - pointer_type ptr_prev = 0 ; + pointer_type ptr_prev = 0 ; - for ( unsigned rank_rev = thread_count ; rank_rev-- ; ) { + const int n = data.pool_size(); - pointer_type ptr = pointer_type( OpenMPexec::pool_rev(rank_rev)->scratch_reduce() ); + for ( int i = 0 ; i < n ; ++i ) { - if ( ptr_prev ) { - for ( unsigned i = 0 ; i < value_count ; ++i ) { ptr[i] = ptr_prev[ i + value_count ] ; } - ValueJoin::join( m_functor , ptr + value_count , ptr ); - } - else { - ValueInit::init( m_functor , ptr ); + pointer_type ptr = (pointer_type) + data.pool_member(i)->pool_reduce_local(); + + if ( i ) { + for ( int j = 0 ; j < value_count ; ++j ) { + ptr[j+value_count] = ptr_prev[j+value_count] ; + } + ValueJoin::join( m_functor , ptr + value_count , ptr_prev ); + } + else { + ValueInit::init( m_functor , ptr + value_count ); + } + + ptr_prev = ptr ; } - ptr_prev = ptr ; + data.pool_rendezvous_release(); } - } -#pragma omp parallel - { - OpenMPexec & exec = * OpenMPexec::get_thread_omp(); - const WorkRange range( m_policy, exec.pool_rank(), exec.pool_size() ); - const pointer_type ptr = pointer_type( exec.scratch_reduce() ); + reference_type update_base = + ValueOps::reference + ( ((pointer_type)data.pool_reduce_local()) + value_count ); + ParallelScan::template exec_range< WorkTag > - ( m_functor , range.begin() , range.end() - , ValueOps::reference( ptr ) , true ); + ( m_functor , range.begin() , range.end() , update_base , true ); } /* END #pragma omp parallel */ + } //---------------------------------------- @@ -530,55 +502,59 @@ class ParallelFor< FunctorType { private: + enum { TEAM_REDUCE_SIZE = 512 }; + typedef Kokkos::Impl::TeamPolicyInternal< Kokkos::OpenMP, Properties ... > Policy ; - typedef typename Policy::work_tag WorkTag ; - typedef typename Policy::member_type Member ; + typedef typename Policy::work_tag WorkTag ; + typedef typename Policy::schedule_type::type SchedTag ; + typedef typename Policy::member_type Member ; const FunctorType m_functor ; const Policy m_policy ; const int m_shmem_size ; - template< class TagType, class Schedule > + template< class TagType > inline static - typename std::enable_if< std::is_same< TagType , void >::value && std::is_same::value>::type - exec_team( const FunctorType & functor , Member member ) + typename std::enable_if< ( std::is_same< TagType , void >::value ) >::type + exec_team( const FunctorType & functor + , HostThreadTeamData & data + , const int league_rank_begin + , const int league_rank_end + , const int league_size ) { - for ( ; member.valid_static() ; member.next_static() ) { - functor( member ); - } - } + for ( int r = league_rank_begin ; r < league_rank_end ; ) { - template< class TagType, class Schedule > - inline static - typename std::enable_if< (! std::is_same< TagType , void >::value) && std::is_same::value >::type - exec_team( const FunctorType & functor , Member member ) - { - const TagType t{} ; - for ( ; member.valid_static() ; member.next_static() ) { - functor( t , member ); - } - } + functor( Member( data, r , league_size ) ); - template< class TagType, class Schedule > - inline static - typename std::enable_if< std::is_same< TagType , void >::value && std::is_same::value>::type - exec_team( const FunctorType & functor , Member member ) - { - #pragma omp barrier - for ( ; member.valid_dynamic() ; member.next_dynamic() ) { - functor( member ); + if ( ++r < league_rank_end ) { + // Don't allow team members to lap one another + // so that they don't overwrite shared memory. + if ( data.team_rendezvous() ) { data.team_rendezvous_release(); } + } } } - template< class TagType, class Schedule > + + template< class TagType > inline static - typename std::enable_if< (! std::is_same< TagType , void >::value) && std::is_same::value >::type - exec_team( const FunctorType & functor , Member member ) + typename std::enable_if< ( ! std::is_same< TagType , void >::value ) >::type + exec_team( const FunctorType & functor + , HostThreadTeamData & data + , const int league_rank_begin + , const int league_rank_end + , const int league_size ) { - #pragma omp barrier - const TagType t{} ; - for ( ; member.valid_dynamic() ; member.next_dynamic() ) { - functor( t , member ); + const TagType t{}; + + for ( int r = league_rank_begin ; r < league_rank_end ; ) { + + functor( t , Member( data, r , league_size ) ); + + if ( ++r < league_rank_end ) { + // Don't allow team members to lap one another + // so that they don't overwrite shared memory. + if ( data.team_rendezvous() ) { data.team_rendezvous_release(); } + } } } @@ -587,31 +563,75 @@ public: inline void execute() const { + enum { is_dynamic = std::is_same< SchedTag , Kokkos::Dynamic >::value }; + OpenMPexec::verify_is_process("Kokkos::OpenMP parallel_for"); OpenMPexec::verify_initialized("Kokkos::OpenMP parallel_for"); - const size_t team_reduce_size = Policy::member_type::team_reduce_size(); + const size_t pool_reduce_size = 0 ; // Never shrinks + const size_t team_reduce_size = TEAM_REDUCE_SIZE * m_policy.team_size(); + const size_t team_shared_size = m_shmem_size + m_policy.scratch_size(1); + const size_t thread_local_size = 0 ; // Never shrinks - OpenMPexec::resize_scratch( 0 , team_reduce_size + m_shmem_size + m_policy.scratch_size(1)); + OpenMPexec::resize_thread_data( pool_reduce_size + , team_reduce_size + , team_shared_size + , thread_local_size ); #pragma omp parallel { - ParallelFor::template exec_team< WorkTag, typename Policy::schedule_type::type> - ( m_functor - , Member( * OpenMPexec::get_thread_omp(), m_policy, m_shmem_size, 0) ); + HostThreadTeamData & data = *OpenMPexec::get_thread_data(); + + const int active = data.organize_team( m_policy.team_size() ); + + if ( active ) { + data.set_work_partition( m_policy.league_size() + , ( 0 < m_policy.chunk_size() + ? m_policy.chunk_size() + : m_policy.team_iter() ) ); + } + + if ( is_dynamic ) { + // Must synchronize to make sure each team has set its + // partition before begining the work stealing loop. + if ( data.pool_rendezvous() ) data.pool_rendezvous_release(); + } + + if ( active ) { + + std::pair range(0,0); + + do { + + range = is_dynamic ? data.get_work_stealing_chunk() + : data.get_work_partition(); + + ParallelFor::template exec_team< WorkTag > + ( m_functor , data + , range.first , range.second , m_policy.league_size() ); + + } while ( is_dynamic && 0 <= range.first ); + } + + data.disband_team(); } -/* END #pragma omp parallel */ +// END #pragma omp parallel } + inline ParallelFor( const FunctorType & arg_functor , const Policy & arg_policy ) : m_functor( arg_functor ) , m_policy( arg_policy ) - , m_shmem_size( arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + FunctorTeamShmemSize< FunctorType >::value( arg_functor , arg_policy.team_size() ) ) + , m_shmem_size( arg_policy.scratch_size(0) + + arg_policy.scratch_size(1) + + FunctorTeamShmemSize< FunctorType > + ::value( arg_functor , arg_policy.team_size() ) ) {} }; +//---------------------------------------------------------------------------- template< class FunctorType , class ReducerType, class ... Properties > class ParallelReduce< FunctorType @@ -622,20 +642,26 @@ class ParallelReduce< FunctorType { private: + enum { TEAM_REDUCE_SIZE = 512 }; + typedef Kokkos::Impl::TeamPolicyInternal< Kokkos::OpenMP, Properties ... > Policy ; - typedef typename Policy::work_tag WorkTag ; - typedef typename Policy::member_type Member ; + typedef FunctorAnalysis< FunctorPatternInterface::REDUCE , Policy , FunctorType > Analysis ; + + typedef typename Policy::work_tag WorkTag ; + typedef typename Policy::schedule_type::type SchedTag ; + typedef typename Policy::member_type Member ; + + typedef Kokkos::Impl::if_c< std::is_same::value + , FunctorType, ReducerType> ReducerConditional; - typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType> ReducerConditional; typedef typename ReducerConditional::type ReducerTypeFwd; - typedef Kokkos::Impl::FunctorValueTraits< ReducerTypeFwd , WorkTag > ValueTraits ; typedef Kokkos::Impl::FunctorValueInit< ReducerTypeFwd , WorkTag > ValueInit ; typedef Kokkos::Impl::FunctorValueJoin< ReducerTypeFwd , WorkTag > ValueJoin ; - typedef typename ValueTraits::pointer_type pointer_type ; - typedef typename ValueTraits::reference_type reference_type ; + typedef typename Analysis::pointer_type pointer_type ; + typedef typename Analysis::reference_type reference_type ; const FunctorType m_functor ; const Policy m_policy ; @@ -645,22 +671,48 @@ private: template< class TagType > inline static - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec_team( const FunctorType & functor , Member member , reference_type update ) + typename std::enable_if< ( std::is_same< TagType , void >::value ) >::type + exec_team( const FunctorType & functor + , HostThreadTeamData & data + , reference_type & update + , const int league_rank_begin + , const int league_rank_end + , const int league_size ) { - for ( ; member.valid_static() ; member.next_static() ) { - functor( member , update ); + for ( int r = league_rank_begin ; r < league_rank_end ; ) { + + functor( Member( data, r , league_size ) , update ); + + if ( ++r < league_rank_end ) { + // Don't allow team members to lap one another + // so that they don't overwrite shared memory. + if ( data.team_rendezvous() ) { data.team_rendezvous_release(); } + } } } + template< class TagType > inline static - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec_team( const FunctorType & functor , Member member , reference_type update ) + typename std::enable_if< ( ! std::is_same< TagType , void >::value ) >::type + exec_team( const FunctorType & functor + , HostThreadTeamData & data + , reference_type & update + , const int league_rank_begin + , const int league_rank_end + , const int league_size ) { - const TagType t{} ; - for ( ; member.valid_static() ; member.next_static() ) { - functor( t , member , update ); + const TagType t{}; + + for ( int r = league_rank_begin ; r < league_rank_end ; ) { + + functor( t , Member( data, r , league_size ) , update ); + + if ( ++r < league_rank_end ) { + // Don't allow team members to lap one another + // so that they don't overwrite shared memory. + if ( data.team_rendezvous() ) { data.team_rendezvous_release(); } + } } } @@ -669,44 +721,89 @@ public: inline void execute() const { + enum { is_dynamic = std::is_same< SchedTag , Kokkos::Dynamic >::value }; + OpenMPexec::verify_is_process("Kokkos::OpenMP parallel_reduce"); + OpenMPexec::verify_initialized("Kokkos::OpenMP parallel_reduce"); + + const size_t pool_reduce_size = + Analysis::value_size( ReducerConditional::select(m_functor, m_reducer)); - const size_t team_reduce_size = Policy::member_type::team_reduce_size(); + const size_t team_reduce_size = TEAM_REDUCE_SIZE * m_policy.team_size(); + const size_t team_shared_size = m_shmem_size + m_policy.scratch_size(1); + const size_t thread_local_size = 0 ; // Never shrinks - OpenMPexec::resize_scratch( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) , team_reduce_size + m_shmem_size ); + OpenMPexec::resize_thread_data( pool_reduce_size + , team_reduce_size + , team_shared_size + , thread_local_size ); #pragma omp parallel { - OpenMPexec & exec = * OpenMPexec::get_thread_omp(); + HostThreadTeamData & data = *OpenMPexec::get_thread_data(); - ParallelReduce::template exec_team< WorkTag > - ( m_functor - , Member( exec , m_policy , m_shmem_size, 0 ) - , ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , exec.scratch_reduce() ) ); - } -/* END #pragma omp parallel */ + const int active = data.organize_team( m_policy.team_size() ); - { - const pointer_type ptr = pointer_type( OpenMPexec::pool_rev(0)->scratch_reduce() ); - - int max_active_threads = OpenMPexec::pool_size(); - if( max_active_threads > m_policy.league_size()* m_policy.team_size() ) - max_active_threads = m_policy.league_size()* m_policy.team_size(); + if ( active ) { + data.set_work_partition( m_policy.league_size() + , ( 0 < m_policy.chunk_size() + ? m_policy.chunk_size() + : m_policy.team_iter() ) ); + } - for ( int i = 1 ; i < max_active_threads ; ++i ) { - ValueJoin::join( ReducerConditional::select(m_functor , m_reducer) , ptr , OpenMPexec::pool_rev(i)->scratch_reduce() ); + if ( is_dynamic ) { + // Must synchronize to make sure each team has set its + // partition before begining the work stealing loop. + if ( data.pool_rendezvous() ) data.pool_rendezvous_release(); } - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTag >::final( ReducerConditional::select(m_functor , m_reducer) , ptr ); + if ( active ) { + reference_type update = + ValueInit::init( ReducerConditional::select(m_functor , m_reducer) + , data.pool_reduce_local() ); + + std::pair range(0,0); - if ( m_result_ptr ) { - const int n = ValueTraits::value_count( ReducerConditional::select(m_functor , m_reducer) ); + do { - for ( int j = 0 ; j < n ; ++j ) { m_result_ptr[j] = ptr[j] ; } + range = is_dynamic ? data.get_work_stealing_chunk() + : data.get_work_partition(); + + ParallelReduce::template exec_team< WorkTag > + ( m_functor , data , update + , range.first , range.second , m_policy.league_size() ); + + } while ( is_dynamic && 0 <= range.first ); + } else { + ValueInit::init( ReducerConditional::select(m_functor , m_reducer) + , data.pool_reduce_local() ); } + + data.disband_team(); + } +// END #pragma omp parallel + + // Reduction: + + const pointer_type ptr = pointer_type( OpenMPexec::get_thread_data(0)->pool_reduce_local() ); + + for ( int i = 1 ; i < OpenMPexec::pool_size() ; ++i ) { + ValueJoin::join( ReducerConditional::select(m_functor , m_reducer) + , ptr + , OpenMPexec::get_thread_data(i)->pool_reduce_local() ); + } + + Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTag >::final( ReducerConditional::select(m_functor , m_reducer) , ptr ); + + if ( m_result_ptr ) { + const int n = Analysis::value_count( ReducerConditional::select(m_functor , m_reducer) ); + + for ( int j = 0 ; j < n ; ++j ) { m_result_ptr[j] = ptr[j] ; } } } + //---------------------------------------- + template< class ViewType > inline ParallelReduce( const FunctorType & arg_functor , @@ -720,7 +817,10 @@ public: , m_policy( arg_policy ) , m_reducer( InvalidType() ) , m_result_ptr( arg_result.ptr_on_device() ) - , m_shmem_size( arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + FunctorTeamShmemSize< FunctorType >::value( arg_functor , arg_policy.team_size() ) ) + , m_shmem_size( arg_policy.scratch_size(0) + + arg_policy.scratch_size(1) + + FunctorTeamShmemSize< FunctorType > + ::value( arg_functor , arg_policy.team_size() ) ) {} inline @@ -731,7 +831,10 @@ public: , m_policy( arg_policy ) , m_reducer( reducer ) , m_result_ptr( reducer.result_view().data() ) - , m_shmem_size( arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + FunctorTeamShmemSize< FunctorType >::value( arg_functor , arg_policy.team_size() ) ) + , m_shmem_size( arg_policy.scratch_size(0) + + arg_policy.scratch_size(1) + + FunctorTeamShmemSize< FunctorType > + ::value( arg_functor , arg_policy.team_size() ) ) { /*static_assert( std::is_same< typename ViewType::memory_space , Kokkos::HostSpace >::value diff --git a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.cpp b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.cpp index 5b3e9873e1..9144d8c279 100644 --- a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.cpp +++ b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.cpp @@ -46,6 +46,7 @@ #if defined( KOKKOS_ENABLE_OPENMP ) && defined( KOKKOS_ENABLE_TASKDAG ) #include +#include //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -55,231 +56,214 @@ namespace Impl { template class TaskQueue< Kokkos::OpenMP > ; -//---------------------------------------------------------------------------- - -TaskExec< Kokkos::OpenMP >:: -TaskExec() - : m_self_exec( 0 ) - , m_team_exec( 0 ) - , m_sync_mask( 0 ) - , m_sync_value( 0 ) - , m_sync_step( 0 ) - , m_group_rank( 0 ) - , m_team_rank( 0 ) - , m_team_size( 1 ) -{ -} - -TaskExec< Kokkos::OpenMP >:: -TaskExec( Kokkos::Impl::OpenMPexec & arg_exec , int const arg_team_size ) - : m_self_exec( & arg_exec ) - , m_team_exec( arg_exec.pool_rev(arg_exec.pool_rank_rev() / arg_team_size) ) - , m_sync_mask( 0 ) - , m_sync_value( 0 ) - , m_sync_step( 0 ) - , m_group_rank( arg_exec.pool_rank_rev() / arg_team_size ) - , m_team_rank( arg_exec.pool_rank_rev() % arg_team_size ) - , m_team_size( arg_team_size ) -{ - // This team spans - // m_self_exec->pool_rev( team_size * group_rank ) - // m_self_exec->pool_rev( team_size * ( group_rank + 1 ) - 1 ) - - int64_t volatile * const sync = (int64_t *) m_self_exec->scratch_reduce(); - - sync[0] = int64_t(0) ; - sync[1] = int64_t(0) ; - - for ( int i = 0 ; i < m_team_size ; ++i ) { - m_sync_value |= int64_t(1) << (8*i); - m_sync_mask |= int64_t(3) << (8*i); - } +class HostThreadTeamDataSingleton : private HostThreadTeamData { +private: + + HostThreadTeamDataSingleton() : HostThreadTeamData() + { + Kokkos::OpenMP::memory_space space ; + const size_t num_pool_reduce_bytes = 32 ; + const size_t num_team_reduce_bytes = 32 ; + const size_t num_team_shared_bytes = 1024 ; + const size_t num_thread_local_bytes = 1024 ; + const size_t alloc_bytes = + HostThreadTeamData::scratch_size( num_pool_reduce_bytes + , num_team_reduce_bytes + , num_team_shared_bytes + , num_thread_local_bytes ); + + HostThreadTeamData::scratch_assign + ( space.allocate( alloc_bytes ) + , alloc_bytes + , num_pool_reduce_bytes + , num_team_reduce_bytes + , num_team_shared_bytes + , num_thread_local_bytes ); + } + + ~HostThreadTeamDataSingleton() + { + Kokkos::OpenMP::memory_space space ; + space.deallocate( HostThreadTeamData::scratch_buffer() + , HostThreadTeamData::scratch_bytes() ); + } + +public: + + static HostThreadTeamData & singleton() + { + static HostThreadTeamDataSingleton s ; + return s ; + } +}; - Kokkos::memory_fence(); -} - -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) +//---------------------------------------------------------------------------- -void TaskExec< Kokkos::OpenMP >::team_barrier_impl() const +void TaskQueueSpecialization< Kokkos::OpenMP >::execute + ( TaskQueue< Kokkos::OpenMP > * const queue ) { - if ( m_team_exec->scratch_reduce_size() < int(2 * sizeof(int64_t)) ) { - Kokkos::abort("TaskQueue scratch_reduce memory too small"); - } + using execution_space = Kokkos::OpenMP ; + using queue_type = TaskQueue< execution_space > ; + using task_root_type = TaskBase< execution_space , void , void > ; + using Member = Impl::HostThreadTeamMember< execution_space > ; - // Use team shared memory to synchronize. - // Alternate memory locations between barriers to avoid a sequence - // of barriers overtaking one another. + static task_root_type * const end = + (task_root_type *) task_root_type::EndTag ; - int64_t volatile * const sync = - ((int64_t *) m_team_exec->scratch_reduce()) + ( m_sync_step & 0x01 ); + HostThreadTeamData & team_data_single = + HostThreadTeamDataSingleton::singleton(); - // This team member sets one byte within the sync variable - int8_t volatile * const sync_self = - ((int8_t *) sync) + m_team_rank ; + const int team_size = Impl::OpenMPexec::pool_size(2); // Threads per core + // const int team_size = Impl::OpenMPexec::pool_size(1); // Threads per NUMA #if 0 -fprintf( stdout - , "barrier group(%d) member(%d) step(%d) wait(%lx) : before(%lx)\n" - , m_group_rank - , m_team_rank - , m_sync_step - , m_sync_value - , *sync - ); +fprintf(stdout,"TaskQueue execute %d\n", team_size ); fflush(stdout); #endif - *sync_self = int8_t( m_sync_value & 0x03 ); // signal arrival - while ( m_sync_value != *sync ); // wait for team to arrive +#pragma omp parallel + { + Impl::HostThreadTeamData & self = *Impl::OpenMPexec::get_thread_data(); -#if 0 -fprintf( stdout - , "barrier group(%d) member(%d) step(%d) wait(%lx) : after(%lx)\n" - , m_group_rank - , m_team_rank - , m_sync_step - , m_sync_value - , *sync - ); -fflush(stdout); -#endif + // Organizing threads into a team performs a barrier across the + // entire pool to insure proper initialization of the team + // rendezvous mechanism before a team rendezvous can be performed. - ++m_sync_step ; + if ( self.organize_team( team_size ) ) { - if ( 0 == ( 0x01 & m_sync_step ) ) { // Every other step - m_sync_value ^= m_sync_mask ; - if ( 1000 < m_sync_step ) m_sync_step = 0 ; - } -} + Member single_exec( team_data_single ); + Member team_exec( self ); +#if 0 +fprintf(stdout,"TaskQueue pool(%d of %d) team(%d of %d) league(%d of %d) running\n" + , self.pool_rank() + , self.pool_size() + , team_exec.team_rank() + , team_exec.team_size() + , team_exec.league_rank() + , team_exec.league_size() + ); +fflush(stdout); #endif -//---------------------------------------------------------------------------- - -void TaskQueueSpecialization< Kokkos::OpenMP >::execute - ( TaskQueue< Kokkos::OpenMP > * const queue ) -{ - using execution_space = Kokkos::OpenMP ; - using queue_type = TaskQueue< execution_space > ; - using task_root_type = TaskBase< execution_space , void , void > ; - using PoolExec = Kokkos::Impl::OpenMPexec ; - using Member = TaskExec< execution_space > ; + // Loop until all queues are empty and no tasks in flight - task_root_type * const end = (task_root_type *) task_root_type::EndTag ; + task_root_type * task = 0 ; - // Required: team_size <= 8 + do { + // Each team lead attempts to acquire either a thread team task + // or a single thread task for the team. - const int team_size = PoolExec::pool_size(2); // Threads per core - // const int team_size = PoolExec::pool_size(1); // Threads per NUMA + if ( 0 == team_exec.team_rank() ) { - if ( 8 < team_size ) { - Kokkos::abort("TaskQueue unsupported team size"); - } + bool leader_loop = false ; -#pragma omp parallel - { - PoolExec & self = *PoolExec::get_thread_omp(); + do { - Member single_exec ; - Member team_exec( self , team_size ); + if ( 0 != task && end != task ) { + // team member #0 completes the previously executed task, + // completion may delete the task + queue->complete( task ); + } - // Team shared memory - task_root_type * volatile * const task_shared = - (task_root_type **) team_exec.m_team_exec->scratch_thread(); + // If 0 == m_ready_count then set task = 0 -// Barrier across entire OpenMP thread pool to insure initialization -#pragma omp barrier + task = 0 < *((volatile int *) & queue->m_ready_count) ? end : 0 ; - // Loop until all queues are empty and no tasks in flight + // Attempt to acquire a task + // Loop by priority and then type + for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) { + for ( int j = 0 ; j < 2 && end == task ; ++j ) { + task = queue_type::pop_ready_task( & queue->m_ready[i][j] ); + } + } - do { + // If still tasks are still executing + // and no task could be acquired + // then continue this leader loop + leader_loop = end == task ; - task_root_type * task = 0 ; + if ( ( ! leader_loop ) && + ( 0 != task ) && + ( task_root_type::TaskSingle == task->m_task_type ) ) { - // Each team lead attempts to acquire either a thread team task - // or a single thread task for the team. + // if a single thread task then execute now - if ( 0 == team_exec.team_rank() ) { +#if 0 +fprintf(stdout,"TaskQueue pool(%d of %d) executing single task 0x%lx\n" + , self.pool_rank() + , self.pool_size() + , int64_t(task) + ); +fflush(stdout); +#endif - task = 0 < *((volatile int *) & queue->m_ready_count) ? end : 0 ; + (*task->m_apply)( task , & single_exec ); - // Loop by priority and then type - for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) { - for ( int j = 0 ; j < 2 && end == task ; ++j ) { - task = queue_type::pop_task( & queue->m_ready[i][j] ); - } + leader_loop = true ; + } + } while ( leader_loop ); } - } - - // Team lead broadcast acquired task to team members: - - if ( 1 < team_exec.team_size() ) { - - if ( 0 == team_exec.team_rank() ) *task_shared = task ; - - // Fence to be sure task_shared is stored before the barrier - Kokkos::memory_fence(); - // Whole team waits for every team member to reach this statement - team_exec.team_barrier(); + // Team lead either found 0 == m_ready_count or a team task + // Team lead broadcast acquired task: - // Fence to be sure task_shared is stored - Kokkos::memory_fence(); + team_exec.team_broadcast( task , 0); - task = *task_shared ; - } + if ( 0 != task ) { // Thread Team Task #if 0 -fprintf( stdout - , "\nexecute group(%d) member(%d) task_shared(0x%lx) task(0x%lx)\n" - , team_exec.m_group_rank - , team_exec.m_team_rank - , uintptr_t(task_shared) - , uintptr_t(task) +fprintf(stdout,"TaskQueue pool(%d of %d) team((%d of %d) league(%d of %d) executing team task 0x%lx\n" + , self.pool_rank() + , self.pool_size() + , team_exec.team_rank() + , team_exec.team_size() + , team_exec.league_rank() + , team_exec.league_size() + , int64_t(task) ); fflush(stdout); #endif - if ( 0 == task ) break ; // 0 == m_ready_count - - if ( end == task ) { - // All team members wait for whole team to reach this statement. - // Is necessary to prevent task_shared from being updated - // before it is read by all threads. - team_exec.team_barrier(); - } - else if ( task_root_type::TaskTeam == task->m_task_type ) { - // Thread Team Task - (*task->m_apply)( task , & team_exec ); + (*task->m_apply)( task , & team_exec ); - // The m_apply function performs a barrier - - if ( 0 == team_exec.team_rank() ) { - // team member #0 completes the task, which may delete the task - queue->complete( task ); + // The m_apply function performs a barrier } - } - else { - // Single Thread Task + } while( 0 != task ); - if ( 0 == team_exec.team_rank() ) { +#if 0 +fprintf(stdout,"TaskQueue pool(%d of %d) team(%d of %d) league(%d of %d) ending\n" + , self.pool_rank() + , self.pool_size() + , team_exec.team_rank() + , team_exec.team_size() + , team_exec.league_rank() + , team_exec.league_size() + ); +fflush(stdout); +#endif - (*task->m_apply)( task , & single_exec ); + } - queue->complete( task ); - } + self.disband_team(); + +#if 0 +fprintf(stdout,"TaskQueue pool(%d of %d) disbanded\n" + , self.pool_rank() + , self.pool_size() + ); +fflush(stdout); +#endif - // All team members wait for whole team to reach this statement. - // Not necessary to complete the task. - // Is necessary to prevent task_shared from being updated - // before it is read by all threads. - team_exec.team_barrier(); - } - } while(1); } // END #pragma omp parallel +#if 0 +fprintf(stdout,"TaskQueue execute %d end\n", team_size ); +fflush(stdout); +#endif + } void TaskQueueSpecialization< Kokkos::OpenMP >:: @@ -289,13 +273,16 @@ void TaskQueueSpecialization< Kokkos::OpenMP >:: using execution_space = Kokkos::OpenMP ; using queue_type = TaskQueue< execution_space > ; using task_root_type = TaskBase< execution_space , void , void > ; - using Member = TaskExec< execution_space > ; + using Member = Impl::HostThreadTeamMember< execution_space > ; if ( 1 == omp_get_num_threads() ) { task_root_type * const end = (task_root_type *) task_root_type::EndTag ; - Member single_exec ; + HostThreadTeamData & team_data_single = + HostThreadTeamDataSingleton::singleton(); + + Member single_exec( team_data_single ); task_root_type * task = end ; @@ -306,7 +293,7 @@ void TaskQueueSpecialization< Kokkos::OpenMP >:: // Loop by priority and then type for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) { for ( int j = 0 ; j < 2 && end == task ; ++j ) { - task = queue_type::pop_task( & queue->m_ready[i][j] ); + task = queue_type::pop_ready_task( & queue->m_ready[i][j] ); } } diff --git a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.hpp b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.hpp index 15dbb77c26..3cfdf790bf 100644 --- a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.hpp +++ b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.hpp @@ -60,6 +60,7 @@ public: using execution_space = Kokkos::OpenMP ; using queue_type = Kokkos::Impl::TaskQueue< execution_space > ; using task_base_type = Kokkos::Impl::TaskBase< execution_space , void , void > ; + using member_type = Kokkos::Impl::HostThreadTeamMember< execution_space > ; // Must specify memory space using memory_space = Kokkos::HostSpace ; @@ -70,296 +71,19 @@ public: // Must provide task queue execution function static void execute( queue_type * const ); - // Must provide mechanism to set function pointer in - // execution space from the host process. - template< typename FunctorType > + template< typename TaskType > static - void proc_set_apply( task_base_type::function_type * ptr ) - { - using TaskType = TaskBase< Kokkos::OpenMP - , typename FunctorType::value_type - , FunctorType - > ; - *ptr = TaskType::apply ; - } + typename TaskType::function_type + get_function_pointer() { return TaskType::apply ; } }; extern template class TaskQueue< Kokkos::OpenMP > ; -//---------------------------------------------------------------------------- - -template<> -class TaskExec< Kokkos::OpenMP > -{ -private: - - TaskExec( TaskExec && ) = delete ; - TaskExec( TaskExec const & ) = delete ; - TaskExec & operator = ( TaskExec && ) = delete ; - TaskExec & operator = ( TaskExec const & ) = delete ; - - - using PoolExec = Kokkos::Impl::OpenMPexec ; - - friend class Kokkos::Impl::TaskQueue< Kokkos::OpenMP > ; - friend class Kokkos::Impl::TaskQueueSpecialization< Kokkos::OpenMP > ; - - PoolExec * const m_self_exec ; ///< This thread's thread pool data structure - PoolExec * const m_team_exec ; ///< Team thread's thread pool data structure - int64_t m_sync_mask ; - int64_t mutable m_sync_value ; - int mutable m_sync_step ; - int m_group_rank ; ///< Which "team" subset of thread pool - int m_team_rank ; ///< Which thread within a team - int m_team_size ; - - TaskExec(); - TaskExec( PoolExec & arg_exec , int arg_team_size ); - - void team_barrier_impl() const ; - -public: - -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - void * team_shared() const - { return m_team_exec ? m_team_exec->scratch_thread() : (void*) 0 ; } - - int team_shared_size() const - { return m_team_exec ? m_team_exec->scratch_thread_size() : 0 ; } - - /**\brief Whole team enters this function call - * before any teeam member returns from - * this function call. - */ - void team_barrier() const { if ( 1 < m_team_size ) team_barrier_impl(); } -#else - KOKKOS_INLINE_FUNCTION void team_barrier() const {} - KOKKOS_INLINE_FUNCTION void * team_shared() const { return 0 ; } - KOKKOS_INLINE_FUNCTION int team_shared_size() const { return 0 ; } -#endif - - KOKKOS_INLINE_FUNCTION - int team_rank() const { return m_team_rank ; } - - KOKKOS_INLINE_FUNCTION - int team_size() const { return m_team_size ; } -}; - }} /* namespace Kokkos::Impl */ //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- -namespace Kokkos { - -template -KOKKOS_INLINE_FUNCTION -Impl::TeamThreadRangeBoundariesStruct > -TeamThreadRange - ( Impl::TaskExec< Kokkos::OpenMP > & thread, const iType & count ) -{ - return Impl::TeamThreadRangeBoundariesStruct >(thread,count); -} - -template -KOKKOS_INLINE_FUNCTION -Impl::TeamThreadRangeBoundariesStruct< typename std::common_type< iType1, iType2 >::type, - Impl::TaskExec< Kokkos::OpenMP > > -TeamThreadRange - ( Impl:: TaskExec< Kokkos::OpenMP > & thread, const iType1 & begin, const iType2 & end ) -{ - typedef typename std::common_type::type iType; - return Impl::TeamThreadRangeBoundariesStruct >(thread, begin, end); -} - -template -KOKKOS_INLINE_FUNCTION -Impl::ThreadVectorRangeBoundariesStruct > -ThreadVectorRange - ( Impl::TaskExec< Kokkos::OpenMP > & thread - , const iType & count ) -{ - return Impl::ThreadVectorRangeBoundariesStruct >(thread,count); -} - -/** \brief Inter-thread parallel_for. Executes lambda(iType i) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all threads of the the calling thread team. - * This functionality requires C++11 support. -*/ -template -KOKKOS_INLINE_FUNCTION -void parallel_for - ( const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries - , const Lambda& lambda - ) -{ - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - lambda(i); - } -} - -template -KOKKOS_INLINE_FUNCTION -void parallel_reduce - ( const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries - , const Lambda& lambda - , ValueType& initialized_result) -{ - int team_rank = loop_boundaries.thread.team_rank(); // member num within the team - ValueType result = initialized_result; - - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - lambda(i, result); - } - - if ( 1 < loop_boundaries.thread.team_size() ) { - - ValueType *shared = (ValueType*) loop_boundaries.thread.team_shared(); - - loop_boundaries.thread.team_barrier(); - shared[team_rank] = result; - - loop_boundaries.thread.team_barrier(); - - // reduce across threads to thread 0 - if (team_rank == 0) { - for (int i = 1; i < loop_boundaries.thread.team_size(); i++) { - shared[0] += shared[i]; - } - } - - loop_boundaries.thread.team_barrier(); - - // broadcast result - initialized_result = shared[0]; - } - else { - initialized_result = result ; - } -} - -template< typename iType, class Lambda, typename ValueType, class JoinType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce - (const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - const JoinType & join, - ValueType& initialized_result) -{ - int team_rank = loop_boundaries.thread.team_rank(); // member num within the team - ValueType result = initialized_result; - - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - lambda(i, result); - } - - if ( 1 < loop_boundaries.thread.team_size() ) { - ValueType *shared = (ValueType*) loop_boundaries.thread.team_shared(); - - loop_boundaries.thread.team_barrier(); - shared[team_rank] = result; - - loop_boundaries.thread.team_barrier(); - - // reduce across threads to thread 0 - if (team_rank == 0) { - for (int i = 1; i < loop_boundaries.thread.team_size(); i++) { - join(shared[0], shared[i]); - } - } - - loop_boundaries.thread.team_barrier(); - - // broadcast result - initialized_result = shared[0]; - } - else { - initialized_result = result ; - } -} - -// placeholder for future function -template< typename iType, class Lambda, typename ValueType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce - (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - ValueType& initialized_result) -{ -} - -// placeholder for future function -template< typename iType, class Lambda, typename ValueType, class JoinType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce - (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - const JoinType & join, - ValueType& initialized_result) -{ -} - -template< typename ValueType, typename iType, class Lambda > -KOKKOS_INLINE_FUNCTION -void parallel_scan - (const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda) -{ - ValueType accum = 0 ; - ValueType val, local_total; - ValueType *shared = (ValueType*) loop_boundaries.thread.team_shared(); - int team_size = loop_boundaries.thread.team_size(); - int team_rank = loop_boundaries.thread.team_rank(); // member num within the team - - // Intra-member scan - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - local_total = 0; - lambda(i,local_total,false); - val = accum; - lambda(i,val,true); - accum += local_total; - } - - shared[team_rank] = accum; - loop_boundaries.thread.team_barrier(); - - // Member 0 do scan on accumulated totals - if (team_rank == 0) { - for( iType i = 1; i < team_size; i+=1) { - shared[i] += shared[i-1]; - } - accum = 0; // Member 0 set accum to 0 in preparation for inter-member scan - } - - loop_boundaries.thread.team_barrier(); - - // Inter-member scan adding in accumulated totals - if (team_rank != 0) { accum = shared[team_rank-1]; } - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - local_total = 0; - lambda(i,local_total,false); - val = accum; - lambda(i,val,true); - accum += local_total; - } -} - -// placeholder for future function -template< typename iType, class Lambda, typename ValueType > -KOKKOS_INLINE_FUNCTION -void parallel_scan - (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda) -{ -} - - -} /* namespace Kokkos */ - -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- - #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ #endif /* #ifndef KOKKOS_IMPL_OPENMP_TASK_HPP */ diff --git a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.cpp b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.cpp index 34cf581a47..2d50c6e548 100644 --- a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.cpp +++ b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.cpp @@ -86,7 +86,7 @@ int OpenMPexec::m_map_rank[ OpenMPexec::MAX_THREAD_COUNT ] = { 0 }; int OpenMPexec::m_pool_topo[ 4 ] = { 0 }; -OpenMPexec * OpenMPexec::m_pool[ OpenMPexec::MAX_THREAD_COUNT ] = { 0 }; +HostThreadTeamData * OpenMPexec::m_pool[ OpenMPexec::MAX_THREAD_COUNT ] = { 0 }; void OpenMPexec::verify_is_process( const char * const label ) { @@ -113,67 +113,110 @@ void OpenMPexec::verify_initialized( const char * const label ) } -void OpenMPexec::clear_scratch() +} // namespace Impl +} // namespace Kokkos + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { +namespace Impl { + +void OpenMPexec::clear_thread_data() { + const size_t member_bytes = + sizeof(int64_t) * + HostThreadTeamData::align_to_int64( sizeof(HostThreadTeamData) ); + + const int old_alloc_bytes = + m_pool[0] ? ( member_bytes + m_pool[0]->scratch_bytes() ) : 0 ; + + Kokkos::HostSpace space ; + #pragma omp parallel { - const int rank_rev = m_map_rank[ omp_get_thread_num() ]; - typedef Kokkos::Experimental::Impl::SharedAllocationRecord< Kokkos::HostSpace , void > Record ; - if ( m_pool[ rank_rev ] ) { - Record * const r = Record::get_record( m_pool[ rank_rev ] ); - m_pool[ rank_rev ] = 0 ; - Record::decrement( r ); + const int rank = m_map_rank[ omp_get_thread_num() ]; + + if ( 0 != m_pool[rank] ) { + + m_pool[rank]->disband_pool(); + + space.deallocate( m_pool[rank] , old_alloc_bytes ); + + m_pool[rank] = 0 ; } } /* END #pragma omp parallel */ } -void OpenMPexec::resize_scratch( size_t reduce_size , size_t thread_size ) +void OpenMPexec::resize_thread_data( size_t pool_reduce_bytes + , size_t team_reduce_bytes + , size_t team_shared_bytes + , size_t thread_local_bytes ) { - enum { ALIGN_MASK = Kokkos::Impl::MEMORY_ALIGNMENT - 1 }; - enum { ALLOC_EXEC = ( sizeof(OpenMPexec) + ALIGN_MASK ) & ~ALIGN_MASK }; + const size_t member_bytes = + sizeof(int64_t) * + HostThreadTeamData::align_to_int64( sizeof(HostThreadTeamData) ); - const size_t old_reduce_size = m_pool[0] ? m_pool[0]->m_scratch_reduce_end : 0 ; - const size_t old_thread_size = m_pool[0] ? m_pool[0]->m_scratch_thread_end - m_pool[0]->m_scratch_reduce_end : 0 ; + HostThreadTeamData * root = m_pool[0] ; - reduce_size = ( reduce_size + ALIGN_MASK ) & ~ALIGN_MASK ; - thread_size = ( thread_size + ALIGN_MASK ) & ~ALIGN_MASK ; + const size_t old_pool_reduce = root ? root->pool_reduce_bytes() : 0 ; + const size_t old_team_reduce = root ? root->team_reduce_bytes() : 0 ; + const size_t old_team_shared = root ? root->team_shared_bytes() : 0 ; + const size_t old_thread_local = root ? root->thread_local_bytes() : 0 ; + const size_t old_alloc_bytes = root ? ( member_bytes + root->scratch_bytes() ) : 0 ; - // Requesting allocation and old allocation is too small: + // Allocate if any of the old allocation is tool small: - const bool allocate = ( old_reduce_size < reduce_size ) || - ( old_thread_size < thread_size ); + const bool allocate = ( old_pool_reduce < pool_reduce_bytes ) || + ( old_team_reduce < team_reduce_bytes ) || + ( old_team_shared < team_shared_bytes ) || + ( old_thread_local < thread_local_bytes ); if ( allocate ) { - if ( reduce_size < old_reduce_size ) { reduce_size = old_reduce_size ; } - if ( thread_size < old_thread_size ) { thread_size = old_thread_size ; } - } - const size_t alloc_size = allocate ? ALLOC_EXEC + reduce_size + thread_size : 0 ; - const int pool_size = m_pool_topo[0] ; + if ( pool_reduce_bytes < old_pool_reduce ) { pool_reduce_bytes = old_pool_reduce ; } + if ( team_reduce_bytes < old_team_reduce ) { team_reduce_bytes = old_team_reduce ; } + if ( team_shared_bytes < old_team_shared ) { team_shared_bytes = old_team_shared ; } + if ( thread_local_bytes < old_thread_local ) { thread_local_bytes = old_thread_local ; } - if ( allocate ) { + const size_t alloc_bytes = + member_bytes + + HostThreadTeamData::scratch_size( pool_reduce_bytes + , team_reduce_bytes + , team_shared_bytes + , thread_local_bytes ); + + const int pool_size = omp_get_max_threads(); - clear_scratch(); + Kokkos::HostSpace space ; #pragma omp parallel { - const int rank_rev = m_map_rank[ omp_get_thread_num() ]; - const int rank = pool_size - ( rank_rev + 1 ); + const int rank = m_map_rank[ omp_get_thread_num() ]; - typedef Kokkos::Experimental::Impl::SharedAllocationRecord< Kokkos::HostSpace , void > Record ; + if ( 0 != m_pool[rank] ) { - Record * const r = Record::allocate( Kokkos::HostSpace() - , "openmp_scratch" - , alloc_size ); + m_pool[rank]->disband_pool(); - Record::increment( r ); + space.deallocate( m_pool[rank] , old_alloc_bytes ); + } + + void * const ptr = space.allocate( alloc_bytes ); - m_pool[ rank_rev ] = reinterpret_cast( r->data() ); + m_pool[ rank ] = new( ptr ) HostThreadTeamData(); - new ( m_pool[ rank_rev ] ) OpenMPexec( rank , ALLOC_EXEC , reduce_size , thread_size ); + m_pool[ rank ]-> + scratch_assign( ((char *)ptr) + member_bytes + , alloc_bytes + , pool_reduce_bytes + , team_reduce_bytes + , team_shared_bytes + , thread_local_bytes ); } /* END #pragma omp parallel */ + + HostThreadTeamData::organize_pool( m_pool , pool_size ); } } @@ -197,14 +240,14 @@ void OpenMP::initialize( unsigned thread_count , // Before any other call to OMP query the maximum number of threads // and save the value for re-initialization unit testing. - //Using omp_get_max_threads(); is problematic in conjunction with - //Hwloc on Intel (essentially an initial call to the OpenMP runtime - //without a parallel region before will set a process mask for a single core - //The runtime will than bind threads for a parallel region to other cores on the - //entering the first parallel region and make the process mask the aggregate of - //the thread masks. The intend seems to be to make serial code run fast, if you - //compile with OpenMP enabled but don't actually use parallel regions or so - //static int omp_max_threads = omp_get_max_threads(); + // Using omp_get_max_threads(); is problematic in conjunction with + // Hwloc on Intel (essentially an initial call to the OpenMP runtime + // without a parallel region before will set a process mask for a single core + // The runtime will than bind threads for a parallel region to other cores on the + // entering the first parallel region and make the process mask the aggregate of + // the thread masks. The intend seems to be to make serial code run fast, if you + // compile with OpenMP enabled but don't actually use parallel regions or so + // static int omp_max_threads = omp_get_max_threads(); int nthreads = 0; #pragma omp parallel { @@ -268,8 +311,6 @@ void OpenMP::initialize( unsigned thread_count , // Call to 'bind_this_thread' is not thread safe so place this whole block in a critical region. // Call to 'new' may not be thread safe as well. - // Reverse the rank for threads so that the scan operation reduces to the highest rank thread. - const unsigned omp_rank = omp_get_thread_num(); const unsigned thread_r = Impl::s_using_hwloc && Kokkos::hwloc::can_bind_threads() ? Kokkos::hwloc::bind_this_thread( thread_count , threads_coord ) @@ -286,7 +327,19 @@ void OpenMP::initialize( unsigned thread_count , Impl::OpenMPexec::m_pool_topo[1] = Impl::s_using_hwloc ? thread_count / use_numa_count : thread_count; Impl::OpenMPexec::m_pool_topo[2] = Impl::s_using_hwloc ? thread_count / ( use_numa_count * use_cores_per_numa ) : 1; - Impl::OpenMPexec::resize_scratch( 1024 , 1024 ); + // New, unified host thread team data: + { + size_t pool_reduce_bytes = 32 * thread_count ; + size_t team_reduce_bytes = 32 * thread_count ; + size_t team_shared_bytes = 1024 * thread_count ; + size_t thread_local_bytes = 1024 ; + + Impl::OpenMPexec::resize_thread_data( pool_reduce_bytes + , team_reduce_bytes + , team_shared_bytes + , thread_local_bytes + ); + } } } @@ -309,7 +362,7 @@ void OpenMP::initialize( unsigned thread_count , // Init the array for used for arbitrarily sized atomics Impl::init_lock_array_host_space(); - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) Kokkos::Profiling::initialize(); #endif } @@ -321,7 +374,8 @@ void OpenMP::finalize() Impl::OpenMPexec::verify_initialized( "OpenMP::finalize" ); Impl::OpenMPexec::verify_is_process( "OpenMP::finalize" ); - Impl::OpenMPexec::clear_scratch(); + // New, unified host thread team data: + Impl::OpenMPexec::clear_thread_data(); Impl::OpenMPexec::m_pool_topo[0] = 0 ; Impl::OpenMPexec::m_pool_topo[1] = 0 ; @@ -333,7 +387,7 @@ void OpenMP::finalize() hwloc::unbind_this_thread(); } - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) Kokkos::Profiling::finalize(); #endif } diff --git a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.hpp b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.hpp index 63f7234da3..39ace31319 100644 --- a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.hpp +++ b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.hpp @@ -44,13 +44,22 @@ #ifndef KOKKOS_OPENMPEXEC_HPP #define KOKKOS_OPENMPEXEC_HPP +#include + #include -#include +#include #include + #include #include #include + +#include + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + namespace Kokkos { namespace Impl { @@ -60,41 +69,19 @@ namespace Impl { class OpenMPexec { public: + friend class Kokkos::OpenMP ; + enum { MAX_THREAD_COUNT = 4096 }; private: - static OpenMPexec * m_pool[ MAX_THREAD_COUNT ]; // Indexed by: m_pool_rank_rev - static int m_pool_topo[ 4 ]; static int m_map_rank[ MAX_THREAD_COUNT ]; - friend class Kokkos::OpenMP ; - - int const m_pool_rank ; - int const m_pool_rank_rev ; - int const m_scratch_exec_end ; - int const m_scratch_reduce_end ; - int const m_scratch_thread_end ; - - int volatile m_barrier_state ; - - // Members for dynamic scheduling - // Which thread am I stealing from currently - int m_current_steal_target; - // This thread's owned work_range - Kokkos::pair m_work_range KOKKOS_ALIGN(16); - // Team Offset if one thread determines work_range for others - long m_team_work_index; + static HostThreadTeamData * m_pool[ MAX_THREAD_COUNT ]; - // Is this thread stealing (i.e. its owned work_range is exhausted - bool m_stealing; - - OpenMPexec(); - OpenMPexec( const OpenMPexec & ); - OpenMPexec & operator = ( const OpenMPexec & ); - - static void clear_scratch(); + static + void clear_thread_data(); public: @@ -108,47 +95,9 @@ public: inline static int pool_size( int depth = 0 ) { return m_pool_topo[ depth ]; } - inline static - OpenMPexec * pool_rev( int pool_rank_rev ) { return m_pool[ pool_rank_rev ]; } - - inline int pool_rank() const { return m_pool_rank ; } - inline int pool_rank_rev() const { return m_pool_rank_rev ; } - - inline long team_work_index() const { return m_team_work_index ; } - - inline int scratch_reduce_size() const - { return m_scratch_reduce_end - m_scratch_exec_end ; } - - inline int scratch_thread_size() const - { return m_scratch_thread_end - m_scratch_reduce_end ; } - - inline void * scratch_reduce() const { return ((char *) this) + m_scratch_exec_end ; } - inline void * scratch_thread() const { return ((char *) this) + m_scratch_reduce_end ; } - - inline - void state_wait( int state ) - { Impl::spinwait( m_barrier_state , state ); } - - inline - void state_set( int state ) { m_barrier_state = state ; } - - ~OpenMPexec() {} - - OpenMPexec( const int arg_poolRank - , const int arg_scratch_exec_size - , const int arg_scratch_reduce_size - , const int arg_scratch_thread_size ) - : m_pool_rank( arg_poolRank ) - , m_pool_rank_rev( pool_size() - ( arg_poolRank + 1 ) ) - , m_scratch_exec_end( arg_scratch_exec_size ) - , m_scratch_reduce_end( m_scratch_exec_end + arg_scratch_reduce_size ) - , m_scratch_thread_end( m_scratch_reduce_end + arg_scratch_thread_size ) - , m_barrier_state(0) - {} - static void finalize(); - static void initialize( const unsigned team_count , + static void initialize( const unsigned team_count , const unsigned threads_per_team , const unsigned numa_count , const unsigned cores_per_numa ); @@ -156,133 +105,20 @@ public: static void verify_is_process( const char * const ); static void verify_initialized( const char * const ); - static void resize_scratch( size_t reduce_size , size_t thread_size ); - inline static - OpenMPexec * get_thread_omp() { return m_pool[ m_map_rank[ omp_get_thread_num() ] ]; } + static + void resize_thread_data( size_t pool_reduce_bytes + , size_t team_reduce_bytes + , size_t team_shared_bytes + , size_t thread_local_bytes ); - /* Dynamic Scheduling related functionality */ - // Initialize the work range for this thread - inline void set_work_range(const long& begin, const long& end, const long& chunk_size) { - m_work_range.first = (begin+chunk_size-1)/chunk_size; - m_work_range.second = end>0?(end+chunk_size-1)/chunk_size:m_work_range.first; - } - - // Claim and index from this thread's range from the beginning - inline long get_work_index_begin () { - Kokkos::pair work_range_new = m_work_range; - Kokkos::pair work_range_old = work_range_new; - if(work_range_old.first>=work_range_old.second) - return -1; - - work_range_new.first+=1; - - bool success = false; - while(!success) { - work_range_new = Kokkos::atomic_compare_exchange(&m_work_range,work_range_old,work_range_new); - success = ( (work_range_new == work_range_old) || - (work_range_new.first>=work_range_new.second)); - work_range_old = work_range_new; - work_range_new.first+=1; - } - if(work_range_old.first work_range_new = m_work_range; - Kokkos::pair work_range_old = work_range_new; - if(work_range_old.first>=work_range_old.second) - return -1; - work_range_new.second-=1; - bool success = false; - while(!success) { - work_range_new = Kokkos::atomic_compare_exchange(&m_work_range,work_range_old,work_range_new); - success = ( (work_range_new == work_range_old) || - (work_range_new.first>=work_range_new.second) ); - work_range_old = work_range_new; - work_range_new.second-=1; - } - if(work_range_old.first=m_pool_topo[0]) - m_current_steal_target = 0;//m_pool_topo[0]-1; - m_stealing = false; - } - - // Get a steal target; start with my-rank + 1 and go round robin, until arriving at this threads rank - // Returns -1 fi no active steal target available - inline int get_steal_target() { - while(( m_pool[m_current_steal_target]->m_work_range.second <= - m_pool[m_current_steal_target]->m_work_range.first ) && - (m_current_steal_target!=m_pool_rank) ) { - m_current_steal_target = (m_current_steal_target+1)%m_pool_topo[0]; - } - if(m_current_steal_target == m_pool_rank) - return -1; - else - return m_current_steal_target; - } - - inline int get_steal_target(int team_size) { - - while(( m_pool[m_current_steal_target]->m_work_range.second <= - m_pool[m_current_steal_target]->m_work_range.first ) && - (m_current_steal_target!=m_pool_rank_rev) ) { - if(m_current_steal_target + team_size < m_pool_topo[0]) - m_current_steal_target = (m_current_steal_target+team_size); - else - m_current_steal_target = 0; - } - - if(m_current_steal_target == m_pool_rank_rev) - return -1; - else - return m_current_steal_target; - } - - inline long steal_work_index (int team_size = 0) { - long index = -1; - int steal_target = team_size>0?get_steal_target(team_size):get_steal_target(); - while ( (steal_target != -1) && (index == -1)) { - index = m_pool[steal_target]->get_work_index_end(); - if(index == -1) - steal_target = team_size>0?get_steal_target(team_size):get_steal_target(); - } - return index; - } - - // Get a work index. Claim from owned range until its exhausted, then steal from other thread - inline long get_work_index (int team_size = 0) { - long work_index = -1; - if(!m_stealing) work_index = get_work_index_begin(); - - if( work_index == -1) { - memory_fence(); - m_stealing = true; - work_index = steal_work_index(team_size); - } - m_team_work_index = work_index; - memory_fence(); - return work_index; - } + inline static + HostThreadTeamData * get_thread_data() noexcept + { return m_pool[ m_map_rank[ omp_get_thread_num() ] ]; } + inline static + HostThreadTeamData * get_thread_data( int i ) noexcept + { return m_pool[i]; } }; } // namespace Impl @@ -294,356 +130,6 @@ public: namespace Kokkos { namespace Impl { -class OpenMPexecTeamMember { -public: - - enum { TEAM_REDUCE_SIZE = 512 }; - - /** \brief Thread states for team synchronization */ - enum { Active = 0 , Rendezvous = 1 }; - - typedef Kokkos::OpenMP execution_space ; - typedef execution_space::scratch_memory_space scratch_memory_space ; - - Impl::OpenMPexec & m_exec ; - scratch_memory_space m_team_shared ; - int m_team_scratch_size[2] ; - int m_team_base_rev ; - int m_team_rank_rev ; - int m_team_rank ; - int m_team_size ; - int m_league_rank ; - int m_league_end ; - int m_league_size ; - - int m_chunk_size; - int m_league_chunk_end; - Impl::OpenMPexec & m_team_lead_exec ; - int m_invalid_thread; - int m_team_alloc; - - // Fan-in team threads, root of the fan-in which does not block returns true - inline - bool team_fan_in() const - { - memory_fence(); - for ( int n = 1 , j ; ( ( j = m_team_rank_rev + n ) < m_team_size ) && ! ( m_team_rank_rev & n ) ; n <<= 1 ) { - - m_exec.pool_rev( m_team_base_rev + j )->state_wait( Active ); - } - - if ( m_team_rank_rev ) { - m_exec.state_set( Rendezvous ); - memory_fence(); - m_exec.state_wait( Rendezvous ); - } - - return 0 == m_team_rank_rev ; - } - - inline - void team_fan_out() const - { - memory_fence(); - for ( int n = 1 , j ; ( ( j = m_team_rank_rev + n ) < m_team_size ) && ! ( m_team_rank_rev & n ) ; n <<= 1 ) { - m_exec.pool_rev( m_team_base_rev + j )->state_set( Active ); - memory_fence(); - } - } - -public: - - KOKKOS_INLINE_FUNCTION - const execution_space::scratch_memory_space& team_shmem() const - { return m_team_shared.set_team_thread_mode(0,1,0) ; } - - KOKKOS_INLINE_FUNCTION - const execution_space::scratch_memory_space& team_scratch(int) const - { return m_team_shared.set_team_thread_mode(0,1,0) ; } - - KOKKOS_INLINE_FUNCTION - const execution_space::scratch_memory_space& thread_scratch(int) const - { return m_team_shared.set_team_thread_mode(0,team_size(),team_rank()) ; } - - KOKKOS_INLINE_FUNCTION int league_rank() const { return m_league_rank ; } - KOKKOS_INLINE_FUNCTION int league_size() const { return m_league_size ; } - KOKKOS_INLINE_FUNCTION int team_rank() const { return m_team_rank ; } - KOKKOS_INLINE_FUNCTION int team_size() const { return m_team_size ; } - - KOKKOS_INLINE_FUNCTION void team_barrier() const -#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - {} -#else - { - if ( 1 < m_team_size && !m_invalid_thread) { - team_fan_in(); - team_fan_out(); - } - } -#endif - - template - KOKKOS_INLINE_FUNCTION - void team_broadcast(ValueType& value, const int& thread_id) const - { -#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - { } -#else - // Make sure there is enough scratch space: - typedef typename if_c< sizeof(ValueType) < TEAM_REDUCE_SIZE - , ValueType , void >::type type ; - - type volatile * const shared_value = - ((type*) m_exec.pool_rev( m_team_base_rev )->scratch_thread()); - - if ( team_rank() == thread_id ) *shared_value = value; - memory_fence(); - team_barrier(); // Wait for 'thread_id' to write - value = *shared_value ; - team_barrier(); // Wait for team members to read -#endif - } - - template< class ValueType, class JoinOp > - KOKKOS_INLINE_FUNCTION ValueType - team_reduce( const ValueType & value - , const JoinOp & op_in ) const - #if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - { return ValueType(); } - #else - { - memory_fence(); - typedef ValueType value_type; - const JoinLambdaAdapter op(op_in); - #endif -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - // Make sure there is enough scratch space: - typedef typename if_c< sizeof(value_type) < TEAM_REDUCE_SIZE - , value_type , void >::type type ; - - type * const local_value = ((type*) m_exec.scratch_thread()); - - // Set this thread's contribution - *local_value = value ; - - // Fence to make sure the base team member has access: - memory_fence(); - - if ( team_fan_in() ) { - // The last thread to synchronize returns true, all other threads wait for team_fan_out() - type * const team_value = ((type*) m_exec.pool_rev( m_team_base_rev )->scratch_thread()); - - // Join to the team value: - for ( int i = 1 ; i < m_team_size ; ++i ) { - op.join( *team_value , *((type*) m_exec.pool_rev( m_team_base_rev + i )->scratch_thread()) ); - } - memory_fence(); - - // The base team member may "lap" the other team members, - // copy to their local value before proceeding. - for ( int i = 1 ; i < m_team_size ; ++i ) { - *((type*) m_exec.pool_rev( m_team_base_rev + i )->scratch_thread()) = *team_value ; - } - - // Fence to make sure all team members have access - memory_fence(); - } - - team_fan_out(); - - return *((type volatile const *)local_value); - } -#endif - /** \brief Intra-team exclusive prefix sum with team_rank() ordering - * with intra-team non-deterministic ordering accumulation. - * - * The global inter-team accumulation value will, at the end of the - * league's parallel execution, be the scan's total. - * Parallel execution ordering of the league's teams is non-deterministic. - * As such the base value for each team's scan operation is similarly - * non-deterministic. - */ - template< typename ArgType > - KOKKOS_INLINE_FUNCTION ArgType team_scan( const ArgType & value , ArgType * const global_accum ) const -#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - { return ArgType(); } -#else - { - // Make sure there is enough scratch space: - typedef typename if_c< sizeof(ArgType) < TEAM_REDUCE_SIZE , ArgType , void >::type type ; - - volatile type * const work_value = ((type*) m_exec.scratch_thread()); - - *work_value = value ; - - memory_fence(); - - if ( team_fan_in() ) { - // The last thread to synchronize returns true, all other threads wait for team_fan_out() - // m_team_base[0] == highest ranking team member - // m_team_base[ m_team_size - 1 ] == lowest ranking team member - // - // 1) copy from lower to higher rank, initialize lowest rank to zero - // 2) prefix sum from lowest to highest rank, skipping lowest rank - - type accum = 0 ; - - if ( global_accum ) { - for ( int i = m_team_size ; i-- ; ) { - type & val = *((type*) m_exec.pool_rev( m_team_base_rev + i )->scratch_thread()); - accum += val ; - } - accum = atomic_fetch_add( global_accum , accum ); - } - - for ( int i = m_team_size ; i-- ; ) { - type & val = *((type*) m_exec.pool_rev( m_team_base_rev + i )->scratch_thread()); - const type offset = accum ; - accum += val ; - val = offset ; - } - - memory_fence(); - } - - team_fan_out(); - - return *work_value ; - } -#endif - - /** \brief Intra-team exclusive prefix sum with team_rank() ordering. - * - * The highest rank thread can compute the reduction total as - * reduction_total = dev.team_scan( value ) + value ; - */ - template< typename Type > - KOKKOS_INLINE_FUNCTION Type team_scan( const Type & value ) const - { return this-> template team_scan( value , 0 ); } - - //---------------------------------------- - // Private for the driver - -private: - - typedef execution_space::scratch_memory_space space ; - -public: - - template< class ... Properties > - inline - OpenMPexecTeamMember( Impl::OpenMPexec & exec - , const TeamPolicyInternal< OpenMP, Properties ...> & team - , const int shmem_size_L1 - , const int shmem_size_L2 - ) - : m_exec( exec ) - , m_team_shared(0,0) - , m_team_scratch_size{ shmem_size_L1 , shmem_size_L2 } - , m_team_base_rev(0) - , m_team_rank_rev(0) - , m_team_rank(0) - , m_team_size( team.team_size() ) - , m_league_rank(0) - , m_league_end(0) - , m_league_size( team.league_size() ) - , m_chunk_size( team.chunk_size()>0?team.chunk_size():team.team_iter() ) - , m_league_chunk_end(0) - , m_team_lead_exec( *exec.pool_rev( team.team_alloc() * (m_exec.pool_rank_rev()/team.team_alloc()) )) - , m_team_alloc( team.team_alloc()) - { - const int pool_rank_rev = m_exec.pool_rank_rev(); - const int pool_team_rank_rev = pool_rank_rev % team.team_alloc(); - const int pool_league_rank_rev = pool_rank_rev / team.team_alloc(); - const int pool_num_teams = OpenMP::thread_pool_size(0)/team.team_alloc(); - const int chunks_per_team = ( team.league_size() + m_chunk_size*pool_num_teams-1 ) / (m_chunk_size*pool_num_teams); - int league_iter_end = team.league_size() - pool_league_rank_rev * chunks_per_team * m_chunk_size; - int league_iter_begin = league_iter_end - chunks_per_team * m_chunk_size; - if (league_iter_begin < 0) league_iter_begin = 0; - if (league_iter_end>team.league_size()) league_iter_end = team.league_size(); - - if ((team.team_alloc()>m_team_size)? - (pool_team_rank_rev >= m_team_size): - (m_exec.pool_size() - pool_num_teams*m_team_size > m_exec.pool_rank()) - ) - m_invalid_thread = 1; - else - m_invalid_thread = 0; - - m_team_rank_rev = pool_team_rank_rev ; - if ( pool_team_rank_rev < m_team_size && !m_invalid_thread ) { - m_team_base_rev = team.team_alloc() * pool_league_rank_rev ; - m_team_rank_rev = pool_team_rank_rev ; - m_team_rank = m_team_size - ( m_team_rank_rev + 1 ); - m_league_end = league_iter_end ; - m_league_rank = league_iter_begin ; - new( (void*) &m_team_shared ) space( ( (char*) m_exec.pool_rev(m_team_base_rev)->scratch_thread() ) + TEAM_REDUCE_SIZE , m_team_scratch_size[0] , - ( (char*) m_exec.pool_rev(m_team_base_rev)->scratch_thread() ) + TEAM_REDUCE_SIZE + m_team_scratch_size[0], - 0 ); - } - - if ( (m_team_rank_rev == 0) && (m_invalid_thread == 0) ) { - m_exec.set_work_range(m_league_rank,m_league_end,m_chunk_size); - m_exec.reset_steal_target(m_team_size); - } - } - - bool valid_static() const - { - return m_league_rank < m_league_end ; - } - - void next_static() - { - if ( m_league_rank < m_league_end ) { - team_barrier(); - new( (void*) &m_team_shared ) space( ( (char*) m_exec.pool_rev(m_team_base_rev)->scratch_thread() ) + TEAM_REDUCE_SIZE , m_team_scratch_size[0] , - ( (char*) m_exec.pool_rev(m_team_base_rev)->scratch_thread() ) + TEAM_REDUCE_SIZE + m_team_scratch_size[0], - 0); - } - m_league_rank++; - } - - bool valid_dynamic() { - if(m_invalid_thread) - return false; - if ((m_league_rank < m_league_chunk_end) && (m_league_rank < m_league_size)) { - return true; - } - - if ( m_team_rank_rev == 0 ) { - m_team_lead_exec.get_work_index(m_team_alloc); - } - team_barrier(); - - long work_index = m_team_lead_exec.team_work_index(); - - m_league_rank = work_index * m_chunk_size; - m_league_chunk_end = (work_index +1 ) * m_chunk_size; - - if(m_league_chunk_end > m_league_size) m_league_chunk_end = m_league_size; - - if(m_league_rank>=0) - return true; - return false; - } - - void next_dynamic() { - if(m_invalid_thread) - return; - - if ( m_league_rank < m_league_chunk_end ) { - team_barrier(); - new( (void*) &m_team_shared ) space( ( (char*) m_exec.pool_rev(m_team_base_rev)->scratch_thread() ) + TEAM_REDUCE_SIZE , m_team_scratch_size[0] , - ( (char*) m_exec.pool_rev(m_team_base_rev)->scratch_thread() ) + TEAM_REDUCE_SIZE + m_team_scratch_size[0], - 0); - } - m_league_rank++; - } - - static inline int team_reduce_size() { return TEAM_REDUCE_SIZE ; } -}; - template< class ... Properties > class TeamPolicyInternal< Kokkos::OpenMP, Properties ... >: public PolicyTraits { @@ -671,8 +157,11 @@ public: template< class FunctorType > inline static - int team_size_max( const FunctorType & ) - { return traits::execution_space::thread_pool_size(1); } + int team_size_max( const FunctorType & ) { + int pool_size = traits::execution_space::thread_pool_size(1); + int max_host_team_size = Impl::HostThreadTeamData::max_team_members; + return pool_size inline static @@ -702,7 +191,8 @@ private: , const int team_size_request ) { const int pool_size = traits::execution_space::thread_pool_size(0); - const int team_max = traits::execution_space::thread_pool_size(1); + const int max_host_team_size = Impl::HostThreadTeamData::max_team_members; + const int team_max = pool_size member_type ; }; } // namespace Impl @@ -850,216 +340,6 @@ int OpenMP::thread_pool_rank() #endif } -template< typename iType > -KOKKOS_INLINE_FUNCTION -Impl::TeamThreadRangeBoundariesStruct< iType, Impl::OpenMPexecTeamMember > -TeamThreadRange( const Impl::OpenMPexecTeamMember& thread, const iType& count ) { - return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::OpenMPexecTeamMember >( thread, count ); -} - -template< typename iType1, typename iType2 > -KOKKOS_INLINE_FUNCTION -Impl::TeamThreadRangeBoundariesStruct< typename std::common_type< iType1, iType2 >::type, - Impl::OpenMPexecTeamMember > -TeamThreadRange( const Impl::OpenMPexecTeamMember& thread, const iType1& begin, const iType2& end ) { - typedef typename std::common_type< iType1, iType2 >::type iType; - return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::OpenMPexecTeamMember >( thread, iType(begin), iType(end) ); -} - -template -KOKKOS_INLINE_FUNCTION -Impl::ThreadVectorRangeBoundariesStruct -ThreadVectorRange(const Impl::OpenMPexecTeamMember& thread, const iType& count) { - return Impl::ThreadVectorRangeBoundariesStruct(thread,count); -} - -KOKKOS_INLINE_FUNCTION -Impl::ThreadSingleStruct PerTeam(const Impl::OpenMPexecTeamMember& thread) { - return Impl::ThreadSingleStruct(thread); -} - -KOKKOS_INLINE_FUNCTION -Impl::VectorSingleStruct PerThread(const Impl::OpenMPexecTeamMember& thread) { - return Impl::VectorSingleStruct(thread); -} - } // namespace Kokkos -namespace Kokkos { - - /** \brief Inter-thread parallel_for. Executes lambda(iType i) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all threads of the the calling thread team. - * This functionality requires C++11 support.*/ -template -KOKKOS_INLINE_FUNCTION -void parallel_for(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, const Lambda& lambda) { - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) - lambda(i); -} - -/** \brief Inter-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all threads of the the calling thread team and a summation of - * val is performed and put into result. This functionality requires C++11 support.*/ -template< typename iType, class Lambda, typename ValueType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, - const Lambda & lambda, ValueType& result) { - - result = ValueType(); - - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - ValueType tmp = ValueType(); - lambda(i,tmp); - result+=tmp; - } - - result = loop_boundaries.thread.team_reduce(result,Impl::JoinAdd()); -} - -/** \brief Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a reduction of - * val is performed using JoinType(ValueType& val, const ValueType& update) and put into init_result. - * The input value of init_result is used as initializer for temporary variables of ValueType. Therefore - * the input value should be the neutral element with respect to the join operation (e.g. '0 for +-' or - * '1 for *'). This functionality requires C++11 support.*/ -template< typename iType, class Lambda, typename ValueType, class JoinType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, - const Lambda & lambda, const JoinType& join, ValueType& init_result) { - - ValueType result = init_result; - - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - ValueType tmp = ValueType(); - lambda(i,tmp); - join(result,tmp); - } - - init_result = loop_boundaries.thread.team_reduce(result,join); -} - -} //namespace Kokkos - -namespace Kokkos { -/** \brief Intra-thread vector parallel_for. Executes lambda(iType i) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all vector lanes of the the calling thread. - * This functionality requires C++11 support.*/ -template -KOKKOS_INLINE_FUNCTION -void parallel_for(const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries, const Lambda& lambda) { - #ifdef KOKKOS_ENABLE_PRAGMA_IVDEP - #pragma ivdep - #endif - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) - lambda(i); -} - -/** \brief Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a summation of - * val is performed and put into result. This functionality requires C++11 support.*/ -template< typename iType, class Lambda, typename ValueType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries, const Lambda & lambda, ValueType& result) { - result = ValueType(); -#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP -#pragma ivdep -#endif - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - ValueType tmp = ValueType(); - lambda(i,tmp); - result+=tmp; - } -} - -/** \brief Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a reduction of - * val is performed using JoinType(ValueType& val, const ValueType& update) and put into init_result. - * The input value of init_result is used as initializer for temporary variables of ValueType. Therefore - * the input value should be the neutral element with respect to the join operation (e.g. '0 for +-' or - * '1 for *'). This functionality requires C++11 support.*/ -template< typename iType, class Lambda, typename ValueType, class JoinType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries, const Lambda & lambda, const JoinType& join, ValueType& init_result) { - - ValueType result = init_result; -#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP -#pragma ivdep -#endif - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - ValueType tmp = ValueType(); - lambda(i,tmp); - join(result,tmp); - } - init_result = result; -} - -/** \brief Intra-thread vector parallel exclusive prefix sum. Executes lambda(iType i, ValueType & val, bool final) - * for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all vector lanes in the thread and a scan operation is performed. - * Depending on the target execution space the operator might be called twice: once with final=false - * and once with final=true. When final==true val contains the prefix sum value. The contribution of this - * "i" needs to be added to val no matter whether final==true or not. In a serial execution - * (i.e. team_size==1) the operator is only called once with final==true. Scan_val will be set - * to the final sum value over all vector lanes. - * This functionality requires C++11 support.*/ -template< typename iType, class FunctorType > -KOKKOS_INLINE_FUNCTION -void parallel_scan(const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries, const FunctorType & lambda) { - - typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ; - typedef typename ValueTraits::value_type value_type ; - - value_type scan_val = value_type(); - -#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP -#pragma ivdep -#endif - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - lambda(i,scan_val,true); - } -} - -} // namespace Kokkos - -namespace Kokkos { - -template -KOKKOS_INLINE_FUNCTION -void single(const Impl::VectorSingleStruct& single_struct, const FunctorType& lambda) { - lambda(); -} - -template -KOKKOS_INLINE_FUNCTION -void single(const Impl::ThreadSingleStruct& single_struct, const FunctorType& lambda) { - if(single_struct.team_member.team_rank()==0) lambda(); -} - -template -KOKKOS_INLINE_FUNCTION -void single(const Impl::VectorSingleStruct& single_struct, const FunctorType& lambda, ValueType& val) { - lambda(val); -} - -template -KOKKOS_INLINE_FUNCTION -void single(const Impl::ThreadSingleStruct& single_struct, const FunctorType& lambda, ValueType& val) { - if(single_struct.team_member.team_rank()==0) { - lambda(val); - } - single_struct.team_member.team_broadcast(val,0); -} -} - #endif /* #ifndef KOKKOS_OPENMPEXEC_HPP */ diff --git a/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.cpp b/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.cpp deleted file mode 100644 index b4df5e35bb..0000000000 --- a/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.cpp +++ /dev/null @@ -1,511 +0,0 @@ -/* -//@HEADER -// ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of the Corporation nor the names of the -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// -// ************************************************************************ -//@HEADER -*/ - -#include - -#if defined( KOKKOS_ENABLE_QTHREAD ) - -#include -#include -#include -#include -#include -#include -#include -#include - -// Defines to enable experimental Qthread functionality - -#define QTHREAD_LOCAL_PRIORITY -#define CLONED_TASKS - -#include - -//---------------------------------------------------------------------------- - -namespace Kokkos { -namespace Impl { -namespace { - -enum { MAXIMUM_QTHREAD_WORKERS = 1024 }; - -/** s_exec is indexed by the reverse rank of the workers - * for faster fan-in / fan-out lookups - * [ n - 1 , n - 2 , ... , 0 ] - */ -QthreadExec * s_exec[ MAXIMUM_QTHREAD_WORKERS ]; - -int s_number_shepherds = 0 ; -int s_number_workers_per_shepherd = 0 ; -int s_number_workers = 0 ; - -inline -QthreadExec ** worker_exec() -{ - return s_exec + s_number_workers - ( qthread_shep() * s_number_workers_per_shepherd + qthread_worker_local(NULL) + 1 ); -} - -const int s_base_size = QthreadExec::align_alloc( sizeof(QthreadExec) ); - -int s_worker_reduce_end = 0 ; /* End of worker reduction memory */ -int s_worker_shared_end = 0 ; /* Total of worker scratch memory */ -int s_worker_shared_begin = 0 ; /* Beginning of worker shared memory */ - -QthreadExecFunctionPointer volatile s_active_function = 0 ; -const void * volatile s_active_function_arg = 0 ; - -} /* namespace */ -} /* namespace Impl */ -} /* namespace Kokkos */ - -//---------------------------------------------------------------------------- - -namespace Kokkos { - -int Qthread::is_initialized() -{ - return Impl::s_number_workers != 0 ; -} - -int Qthread::concurrency() -{ - return Impl::s_number_workers_per_shepherd ; -} - -int Qthread::in_parallel() -{ - return Impl::s_active_function != 0 ; -} - -void Qthread::initialize( int thread_count ) -{ - // Environment variable: QTHREAD_NUM_SHEPHERDS - // Environment variable: QTHREAD_NUM_WORKERS_PER_SHEP - // Environment variable: QTHREAD_HWPAR - - { - char buffer[256]; - snprintf(buffer,sizeof(buffer),"QTHREAD_HWPAR=%d",thread_count); - putenv(buffer); - } - - const bool ok_init = ( QTHREAD_SUCCESS == qthread_initialize() ) && - ( thread_count == qthread_num_shepherds() * qthread_num_workers_local(NO_SHEPHERD) ) && - ( thread_count == qthread_num_workers() ); - - bool ok_symmetry = true ; - - if ( ok_init ) { - Impl::s_number_shepherds = qthread_num_shepherds(); - Impl::s_number_workers_per_shepherd = qthread_num_workers_local(NO_SHEPHERD); - Impl::s_number_workers = Impl::s_number_shepherds * Impl::s_number_workers_per_shepherd ; - - for ( int i = 0 ; ok_symmetry && i < Impl::s_number_shepherds ; ++i ) { - ok_symmetry = ( Impl::s_number_workers_per_shepherd == qthread_num_workers_local(i) ); - } - } - - if ( ! ok_init || ! ok_symmetry ) { - std::ostringstream msg ; - - msg << "Kokkos::Qthread::initialize(" << thread_count << ") FAILED" ; - msg << " : qthread_num_shepherds = " << qthread_num_shepherds(); - msg << " : qthread_num_workers_per_shepherd = " << qthread_num_workers_local(NO_SHEPHERD); - msg << " : qthread_num_workers = " << qthread_num_workers(); - - if ( ! ok_symmetry ) { - msg << " : qthread_num_workers_local = {" ; - for ( int i = 0 ; i < Impl::s_number_shepherds ; ++i ) { - msg << " " << qthread_num_workers_local(i) ; - } - msg << " }" ; - } - - Impl::s_number_workers = 0 ; - Impl::s_number_shepherds = 0 ; - Impl::s_number_workers_per_shepherd = 0 ; - - if ( ok_init ) { qthread_finalize(); } - - Kokkos::Impl::throw_runtime_exception( msg.str() ); - } - - Impl::QthreadExec::resize_worker_scratch( 256 , 256 ); - - // Init the array for used for arbitrarily sized atomics - Impl::init_lock_array_host_space(); - -} - -void Qthread::finalize() -{ - Impl::QthreadExec::clear_workers(); - - if ( Impl::s_number_workers ) { - qthread_finalize(); - } - - Impl::s_number_workers = 0 ; - Impl::s_number_shepherds = 0 ; - Impl::s_number_workers_per_shepherd = 0 ; -} - -void Qthread::print_configuration( std::ostream & s , const bool detail ) -{ - s << "Kokkos::Qthread {" - << " num_shepherds(" << Impl::s_number_shepherds << ")" - << " num_workers_per_shepherd(" << Impl::s_number_workers_per_shepherd << ")" - << " }" << std::endl ; -} - -Qthread & Qthread::instance( int ) -{ - static Qthread q ; - return q ; -} - -void Qthread::fence() -{ -} - -int Qthread::shepherd_size() const { return Impl::s_number_shepherds ; } -int Qthread::shepherd_worker_size() const { return Impl::s_number_workers_per_shepherd ; } - -} /* namespace Kokkos */ - -//---------------------------------------------------------------------------- - -namespace Kokkos { -namespace Impl { -namespace { - -aligned_t driver_exec_all( void * arg ) -{ - QthreadExec & exec = **worker_exec(); - - (*s_active_function)( exec , s_active_function_arg ); - -/* - fprintf( stdout - , "QthreadExec driver worker(%d:%d) shepherd(%d:%d) shepherd_worker(%d:%d) done\n" - , exec.worker_rank() - , exec.worker_size() - , exec.shepherd_rank() - , exec.shepherd_size() - , exec.shepherd_worker_rank() - , exec.shepherd_worker_size() - ); - fflush(stdout); -*/ - - return 0 ; -} - -aligned_t driver_resize_worker_scratch( void * arg ) -{ - static volatile int lock_begin = 0 ; - static volatile int lock_end = 0 ; - - QthreadExec ** const exec = worker_exec(); - - //---------------------------------------- - // Serialize allocation for thread safety - - while ( ! atomic_compare_exchange_strong( & lock_begin , 0 , 1 ) ); // Spin wait to claim lock - - const bool ok = 0 == *exec ; - - if ( ok ) { *exec = (QthreadExec *) malloc( s_base_size + s_worker_shared_end ); } - - lock_begin = 0 ; // release lock - - if ( ok ) { new( *exec ) QthreadExec(); } - - //---------------------------------------- - // Wait for all calls to complete to insure that each worker has executed. - - if ( s_number_workers == 1 + atomic_fetch_add( & lock_end , 1 ) ) { lock_end = 0 ; } - - while ( lock_end ); - -/* - fprintf( stdout - , "QthreadExec resize worker(%d:%d) shepherd(%d:%d) shepherd_worker(%d:%d) done\n" - , (**exec).worker_rank() - , (**exec).worker_size() - , (**exec).shepherd_rank() - , (**exec).shepherd_size() - , (**exec).shepherd_worker_rank() - , (**exec).shepherd_worker_size() - ); - fflush(stdout); -*/ - - //---------------------------------------- - - if ( ! ok ) { - fprintf( stderr , "Kokkos::QthreadExec resize failed\n" ); - fflush( stderr ); - } - - return 0 ; -} - -void verify_is_process( const char * const label , bool not_active = false ) -{ - const bool not_process = 0 != qthread_shep() || 0 != qthread_worker_local(NULL); - const bool is_active = not_active && ( s_active_function || s_active_function_arg ); - - if ( not_process || is_active ) { - std::string msg( label ); - msg.append( " : FAILED" ); - if ( not_process ) msg.append(" : not called by main process"); - if ( is_active ) msg.append(" : parallel execution in progress"); - Kokkos::Impl::throw_runtime_exception( msg ); - } -} - -} - -int QthreadExec::worker_per_shepherd() -{ - return s_number_workers_per_shepherd ; -} - -QthreadExec::QthreadExec() -{ - const int shepherd_rank = qthread_shep(); - const int shepherd_worker_rank = qthread_worker_local(NULL); - const int worker_rank = shepherd_rank * s_number_workers_per_shepherd + shepherd_worker_rank ; - - m_worker_base = s_exec ; - m_shepherd_base = s_exec + s_number_workers_per_shepherd * ( ( s_number_shepherds - ( shepherd_rank + 1 ) ) ); - m_scratch_alloc = ( (unsigned char *) this ) + s_base_size ; - m_reduce_end = s_worker_reduce_end ; - m_shepherd_rank = shepherd_rank ; - m_shepherd_size = s_number_shepherds ; - m_shepherd_worker_rank = shepherd_worker_rank ; - m_shepherd_worker_size = s_number_workers_per_shepherd ; - m_worker_rank = worker_rank ; - m_worker_size = s_number_workers ; - m_worker_state = QthreadExec::Active ; -} - -void QthreadExec::clear_workers() -{ - for ( int iwork = 0 ; iwork < s_number_workers ; ++iwork ) { - QthreadExec * const exec = s_exec[iwork] ; - s_exec[iwork] = 0 ; - free( exec ); - } -} - -void QthreadExec::shared_reset( Qthread::scratch_memory_space & space ) -{ - new( & space ) - Qthread::scratch_memory_space( - ((unsigned char *) (**m_shepherd_base).m_scratch_alloc ) + s_worker_shared_begin , - s_worker_shared_end - s_worker_shared_begin - ); -} - -void QthreadExec::resize_worker_scratch( const int reduce_size , const int shared_size ) -{ - const int exec_all_reduce_alloc = align_alloc( reduce_size ); - const int shepherd_scan_alloc = align_alloc( 8 ); - const int shepherd_shared_end = exec_all_reduce_alloc + shepherd_scan_alloc + align_alloc( shared_size ); - - if ( s_worker_reduce_end < exec_all_reduce_alloc || - s_worker_shared_end < shepherd_shared_end ) { - -/* - fprintf( stdout , "QthreadExec::resize\n"); - fflush(stdout); -*/ - - // Clear current worker memory before allocating new worker memory - clear_workers(); - - // Increase the buffers to an aligned allocation - s_worker_reduce_end = exec_all_reduce_alloc ; - s_worker_shared_begin = exec_all_reduce_alloc + shepherd_scan_alloc ; - s_worker_shared_end = shepherd_shared_end ; - - // Need to query which shepherd this main 'process' is running... - - const int main_shep = qthread_shep(); - - // Have each worker resize its memory for proper first-touch -#if 0 - for ( int jshep = 0 ; jshep < s_number_shepherds ; ++jshep ) { - for ( int i = jshep != main_shep ? 0 : 1 ; i < s_number_workers_per_shepherd ; ++i ) { - qthread_fork_to( driver_resize_worker_scratch , NULL , NULL , jshep ); - }} -#else - // If this function is used before the 'qthread.task_policy' unit test - // the 'qthread.task_policy' unit test fails with a seg-fault within libqthread.so. - for ( int jshep = 0 ; jshep < s_number_shepherds ; ++jshep ) { - const int num_clone = jshep != main_shep ? s_number_workers_per_shepherd : s_number_workers_per_shepherd - 1 ; - - if ( num_clone ) { - const int ret = qthread_fork_clones_to_local_priority - ( driver_resize_worker_scratch /* function */ - , NULL /* function data block */ - , NULL /* pointer to return value feb */ - , jshep /* shepherd number */ - , num_clone - 1 /* number of instances - 1 */ - ); - - assert(ret == QTHREAD_SUCCESS); - } - } -#endif - - driver_resize_worker_scratch( NULL ); - - // Verify all workers allocated - - bool ok = true ; - for ( int iwork = 0 ; ok && iwork < s_number_workers ; ++iwork ) { ok = 0 != s_exec[iwork] ; } - - if ( ! ok ) { - std::ostringstream msg ; - msg << "Kokkos::Impl::QthreadExec::resize : FAILED for workers {" ; - for ( int iwork = 0 ; iwork < s_number_workers ; ++iwork ) { - if ( 0 == s_exec[iwork] ) { msg << " " << ( s_number_workers - ( iwork + 1 ) ); } - } - msg << " }" ; - Kokkos::Impl::throw_runtime_exception( msg.str() ); - } - } -} - -void QthreadExec::exec_all( Qthread & , QthreadExecFunctionPointer func , const void * arg ) -{ - verify_is_process("QthreadExec::exec_all(...)",true); - -/* - fprintf( stdout , "QthreadExec::exec_all\n"); - fflush(stdout); -*/ - - s_active_function = func ; - s_active_function_arg = arg ; - - // Need to query which shepherd this main 'process' is running... - - const int main_shep = qthread_shep(); - -#if 0 - for ( int jshep = 0 , iwork = 0 ; jshep < s_number_shepherds ; ++jshep ) { - for ( int i = jshep != main_shep ? 0 : 1 ; i < s_number_workers_per_shepherd ; ++i , ++iwork ) { - qthread_fork_to( driver_exec_all , NULL , NULL , jshep ); - }} -#else - // If this function is used before the 'qthread.task_policy' unit test - // the 'qthread.task_policy' unit test fails with a seg-fault within libqthread.so. - for ( int jshep = 0 ; jshep < s_number_shepherds ; ++jshep ) { - const int num_clone = jshep != main_shep ? s_number_workers_per_shepherd : s_number_workers_per_shepherd - 1 ; - - if ( num_clone ) { - const int ret = qthread_fork_clones_to_local_priority - ( driver_exec_all /* function */ - , NULL /* function data block */ - , NULL /* pointer to return value feb */ - , jshep /* shepherd number */ - , num_clone - 1 /* number of instances - 1 */ - ); - - assert(ret == QTHREAD_SUCCESS); - } - } -#endif - - driver_exec_all( NULL ); - - s_active_function = 0 ; - s_active_function_arg = 0 ; -} - -void * QthreadExec::exec_all_reduce_result() -{ - return s_exec[0]->m_scratch_alloc ; -} - -} /* namespace Impl */ -} /* namespace Kokkos */ - -namespace Kokkos { -namespace Impl { - -QthreadTeamPolicyMember::QthreadTeamPolicyMember() - : m_exec( **worker_exec() ) - , m_team_shared(0,0) - , m_team_size( 1 ) - , m_team_rank( 0 ) - , m_league_size(1) - , m_league_end(1) - , m_league_rank(0) -{ - m_exec.shared_reset( m_team_shared ); -} - -QthreadTeamPolicyMember::QthreadTeamPolicyMember( const QthreadTeamPolicyMember::TaskTeam & ) - : m_exec( **worker_exec() ) - , m_team_shared(0,0) - , m_team_size( s_number_workers_per_shepherd ) - , m_team_rank( m_exec.shepherd_worker_rank() ) - , m_league_size(1) - , m_league_end(1) - , m_league_rank(0) -{ - m_exec.shared_reset( m_team_shared ); -} - -} /* namespace Impl */ -} /* namespace Kokkos */ - -//---------------------------------------------------------------------------- - -#endif /* #if defined( KOKKOS_ENABLE_QTHREAD ) */ - diff --git a/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.hpp b/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.hpp deleted file mode 100644 index f948eb2903..0000000000 --- a/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.hpp +++ /dev/null @@ -1,620 +0,0 @@ -/* -//@HEADER -// ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of the Corporation nor the names of the -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// -// ************************************************************************ -//@HEADER -*/ - -#ifndef KOKKOS_QTHREADEXEC_HPP -#define KOKKOS_QTHREADEXEC_HPP - -#include - -//---------------------------------------------------------------------------- - -namespace Kokkos { -namespace Impl { - -//---------------------------------------------------------------------------- - -class QthreadExec ; - -typedef void (*QthreadExecFunctionPointer)( QthreadExec & , const void * ); - -class QthreadExec { -private: - - enum { Inactive = 0 , Active = 1 }; - - const QthreadExec * const * m_worker_base ; - const QthreadExec * const * m_shepherd_base ; - - void * m_scratch_alloc ; ///< Scratch memory [ reduce , team , shared ] - int m_reduce_end ; ///< End of scratch reduction memory - - int m_shepherd_rank ; - int m_shepherd_size ; - - int m_shepherd_worker_rank ; - int m_shepherd_worker_size ; - - /* - * m_worker_rank = m_shepherd_rank * m_shepherd_worker_size + m_shepherd_worker_rank - * m_worker_size = m_shepherd_size * m_shepherd_worker_size - */ - int m_worker_rank ; - int m_worker_size ; - - int mutable volatile m_worker_state ; - - - friend class Kokkos::Qthread ; - - ~QthreadExec(); - QthreadExec( const QthreadExec & ); - QthreadExec & operator = ( const QthreadExec & ); - -public: - - QthreadExec(); - - /** Execute the input function on all available Qthread workers */ - static void exec_all( Qthread & , QthreadExecFunctionPointer , const void * ); - - //---------------------------------------- - /** Barrier across all workers participating in the 'exec_all' */ - void exec_all_barrier() const - { - const int rev_rank = m_worker_size - ( m_worker_rank + 1 ); - - int n , j ; - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) { - Impl::spinwait( m_worker_base[j]->m_worker_state , QthreadExec::Active ); - } - - if ( rev_rank ) { - m_worker_state = QthreadExec::Inactive ; - Impl::spinwait( m_worker_state , QthreadExec::Inactive ); - } - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) { - m_worker_base[j]->m_worker_state = QthreadExec::Active ; - } - } - - /** Barrier across workers within the shepherd with rank < team_rank */ - void shepherd_barrier( const int team_size ) const - { - if ( m_shepherd_worker_rank < team_size ) { - - const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 ); - - int n , j ; - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) { - Impl::spinwait( m_shepherd_base[j]->m_worker_state , QthreadExec::Active ); - } - - if ( rev_rank ) { - m_worker_state = QthreadExec::Inactive ; - Impl::spinwait( m_worker_state , QthreadExec::Inactive ); - } - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) { - m_shepherd_base[j]->m_worker_state = QthreadExec::Active ; - } - } - } - - //---------------------------------------- - /** Reduce across all workers participating in the 'exec_all' */ - template< class FunctorType , class ReducerType , class ArgTag > - inline - void exec_all_reduce( const FunctorType & func, const ReducerType & reduce ) const - { - typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType > ReducerConditional; - typedef typename ReducerConditional::type ReducerTypeFwd; - typedef Kokkos::Impl::FunctorValueJoin< ReducerTypeFwd, ArgTag > ValueJoin ; - - const int rev_rank = m_worker_size - ( m_worker_rank + 1 ); - - int n , j ; - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) { - const QthreadExec & fan = *m_worker_base[j]; - - Impl::spinwait( fan.m_worker_state , QthreadExec::Active ); - - ValueJoin::join( ReducerConditional::select(func , reduce) , m_scratch_alloc , fan.m_scratch_alloc ); - } - - if ( rev_rank ) { - m_worker_state = QthreadExec::Inactive ; - Impl::spinwait( m_worker_state , QthreadExec::Inactive ); - } - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) { - m_worker_base[j]->m_worker_state = QthreadExec::Active ; - } - } - - //---------------------------------------- - /** Scall across all workers participating in the 'exec_all' */ - template< class FunctorType , class ArgTag > - inline - void exec_all_scan( const FunctorType & func ) const - { - typedef Kokkos::Impl::FunctorValueInit< FunctorType , ArgTag > ValueInit ; - typedef Kokkos::Impl::FunctorValueJoin< FunctorType , ArgTag > ValueJoin ; - typedef Kokkos::Impl::FunctorValueOps< FunctorType , ArgTag > ValueOps ; - - const int rev_rank = m_worker_size - ( m_worker_rank + 1 ); - - int n , j ; - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) { - Impl::spinwait( m_worker_base[j]->m_worker_state , QthreadExec::Active ); - } - - if ( rev_rank ) { - m_worker_state = QthreadExec::Inactive ; - Impl::spinwait( m_worker_state , QthreadExec::Inactive ); - } - else { - // Root thread scans across values before releasing threads - // Worker data is in reverse order, so m_worker_base[0] is the - // highest ranking thread. - - // Copy from lower ranking to higher ranking worker. - for ( int i = 1 ; i < m_worker_size ; ++i ) { - ValueOps::copy( func - , m_worker_base[i-1]->m_scratch_alloc - , m_worker_base[i]->m_scratch_alloc - ); - } - - ValueInit::init( func , m_worker_base[m_worker_size-1]->m_scratch_alloc ); - - // Join from lower ranking to higher ranking worker. - // Value at m_worker_base[n-1] is zero so skip adding it to m_worker_base[n-2]. - for ( int i = m_worker_size - 1 ; --i > 0 ; ) { - ValueJoin::join( func , m_worker_base[i-1]->m_scratch_alloc , m_worker_base[i]->m_scratch_alloc ); - } - } - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) { - m_worker_base[j]->m_worker_state = QthreadExec::Active ; - } - } - - //---------------------------------------- - - template< class Type> - inline - volatile Type * shepherd_team_scratch_value() const - { return (volatile Type*)(((unsigned char *) m_scratch_alloc) + m_reduce_end); } - - template< class Type > - inline - void shepherd_broadcast( Type & value , const int team_size , const int team_rank ) const - { - if ( m_shepherd_base ) { - Type * const shared_value = m_shepherd_base[0]->shepherd_team_scratch_value(); - if ( m_shepherd_worker_rank == team_rank ) { *shared_value = value ; } - memory_fence(); - shepherd_barrier( team_size ); - value = *shared_value ; - } - } - - template< class Type > - inline - Type shepherd_reduce( const int team_size , const Type & value ) const - { - *shepherd_team_scratch_value() = value ; - - memory_fence(); - - const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 ); - - int n , j ; - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) { - Impl::spinwait( m_shepherd_base[j]->m_worker_state , QthreadExec::Active ); - } - - if ( rev_rank ) { - m_worker_state = QthreadExec::Inactive ; - Impl::spinwait( m_worker_state , QthreadExec::Inactive ); - } - else { - Type & accum = * m_shepherd_base[0]->shepherd_team_scratch_value(); - for ( int i = 1 ; i < n ; ++i ) { - accum += * m_shepherd_base[i]->shepherd_team_scratch_value(); - } - for ( int i = 1 ; i < n ; ++i ) { - * m_shepherd_base[i]->shepherd_team_scratch_value() = accum ; - } - - memory_fence(); - } - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) { - m_shepherd_base[j]->m_worker_state = QthreadExec::Active ; - } - - return *shepherd_team_scratch_value(); - } - - template< class JoinOp > - inline - typename JoinOp::value_type - shepherd_reduce( const int team_size - , const typename JoinOp::value_type & value - , const JoinOp & op ) const - { - typedef typename JoinOp::value_type Type ; - - *shepherd_team_scratch_value() = value ; - - memory_fence(); - - const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 ); - - int n , j ; - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) { - Impl::spinwait( m_shepherd_base[j]->m_worker_state , QthreadExec::Active ); - } - - if ( rev_rank ) { - m_worker_state = QthreadExec::Inactive ; - Impl::spinwait( m_worker_state , QthreadExec::Inactive ); - } - else { - volatile Type & accum = * m_shepherd_base[0]->shepherd_team_scratch_value(); - for ( int i = 1 ; i < team_size ; ++i ) { - op.join( accum , * m_shepherd_base[i]->shepherd_team_scratch_value() ); - } - for ( int i = 1 ; i < team_size ; ++i ) { - * m_shepherd_base[i]->shepherd_team_scratch_value() = accum ; - } - - memory_fence(); - } - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) { - m_shepherd_base[j]->m_worker_state = QthreadExec::Active ; - } - - return *shepherd_team_scratch_value(); - } - - template< class Type > - inline - Type shepherd_scan( const int team_size - , const Type & value - , Type * const global_value = 0 ) const - { - *shepherd_team_scratch_value() = value ; - - memory_fence(); - - const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 ); - - int n , j ; - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) { - Impl::spinwait( m_shepherd_base[j]->m_worker_state , QthreadExec::Active ); - } - - if ( rev_rank ) { - m_worker_state = QthreadExec::Inactive ; - Impl::spinwait( m_worker_state , QthreadExec::Inactive ); - } - else { - // Root thread scans across values before releasing threads - // Worker data is in reverse order, so m_shepherd_base[0] is the - // highest ranking thread. - - // Copy from lower ranking to higher ranking worker. - - Type accum = * m_shepherd_base[0]->shepherd_team_scratch_value(); - for ( int i = 1 ; i < team_size ; ++i ) { - const Type tmp = * m_shepherd_base[i]->shepherd_team_scratch_value(); - accum += tmp ; - * m_shepherd_base[i-1]->shepherd_team_scratch_value() = tmp ; - } - - * m_shepherd_base[team_size-1]->shepherd_team_scratch_value() = - global_value ? atomic_fetch_add( global_value , accum ) : 0 ; - - // Join from lower ranking to higher ranking worker. - for ( int i = team_size ; --i ; ) { - * m_shepherd_base[i-1]->shepherd_team_scratch_value() += * m_shepherd_base[i]->shepherd_team_scratch_value(); - } - - memory_fence(); - } - - for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) { - m_shepherd_base[j]->m_worker_state = QthreadExec::Active ; - } - - return *shepherd_team_scratch_value(); - } - - //---------------------------------------- - - static inline - int align_alloc( int size ) - { - enum { ALLOC_GRAIN = 1 << 6 /* power of two, 64bytes */}; - enum { ALLOC_GRAIN_MASK = ALLOC_GRAIN - 1 }; - return ( size + ALLOC_GRAIN_MASK ) & ~ALLOC_GRAIN_MASK ; - } - - void shared_reset( Qthread::scratch_memory_space & ); - - void * exec_all_reduce_value() const { return m_scratch_alloc ; } - - static void * exec_all_reduce_result(); - - static void resize_worker_scratch( const int reduce_size , const int shared_size ); - static void clear_workers(); - - //---------------------------------------- - - inline int worker_rank() const { return m_worker_rank ; } - inline int worker_size() const { return m_worker_size ; } - inline int shepherd_worker_rank() const { return m_shepherd_worker_rank ; } - inline int shepherd_worker_size() const { return m_shepherd_worker_size ; } - inline int shepherd_rank() const { return m_shepherd_rank ; } - inline int shepherd_size() const { return m_shepherd_size ; } - - static int worker_per_shepherd(); -}; - -} /* namespace Impl */ -} /* namespace Kokkos */ - -//---------------------------------------------------------------------------- - -namespace Kokkos { -namespace Impl { - -class QthreadTeamPolicyMember { -private: - - typedef Kokkos::Qthread execution_space ; - typedef execution_space::scratch_memory_space scratch_memory_space ; - - - Impl::QthreadExec & m_exec ; - scratch_memory_space m_team_shared ; - const int m_team_size ; - const int m_team_rank ; - const int m_league_size ; - const int m_league_end ; - int m_league_rank ; - -public: - - KOKKOS_INLINE_FUNCTION - const scratch_memory_space & team_shmem() const { return m_team_shared ; } - - KOKKOS_INLINE_FUNCTION int league_rank() const { return m_league_rank ; } - KOKKOS_INLINE_FUNCTION int league_size() const { return m_league_size ; } - KOKKOS_INLINE_FUNCTION int team_rank() const { return m_team_rank ; } - KOKKOS_INLINE_FUNCTION int team_size() const { return m_team_size ; } - - KOKKOS_INLINE_FUNCTION void team_barrier() const -#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - {} -#else - { m_exec.shepherd_barrier( m_team_size ); } -#endif - - template< typename Type > - KOKKOS_INLINE_FUNCTION Type team_broadcast( const Type & value , int rank ) const -#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - { return Type(); } -#else - { return m_exec.template shepherd_broadcast( value , m_team_size , rank ); } -#endif - - template< typename Type > - KOKKOS_INLINE_FUNCTION Type team_reduce( const Type & value ) const -#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - { return Type(); } -#else - { return m_exec.template shepherd_reduce( m_team_size , value ); } -#endif - - template< typename JoinOp > - KOKKOS_INLINE_FUNCTION typename JoinOp::value_type - team_reduce( const typename JoinOp::value_type & value - , const JoinOp & op ) const -#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - { return typename JoinOp::value_type(); } -#else - { return m_exec.template shepherd_reduce( m_team_size , value , op ); } -#endif - - /** \brief Intra-team exclusive prefix sum with team_rank() ordering. - * - * The highest rank thread can compute the reduction total as - * reduction_total = dev.team_scan( value ) + value ; - */ - template< typename Type > - KOKKOS_INLINE_FUNCTION Type team_scan( const Type & value ) const -#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - { return Type(); } -#else - { return m_exec.template shepherd_scan( m_team_size , value ); } -#endif - - /** \brief Intra-team exclusive prefix sum with team_rank() ordering - * with intra-team non-deterministic ordering accumulation. - * - * The global inter-team accumulation value will, at the end of the - * league's parallel execution, be the scan's total. - * Parallel execution ordering of the league's teams is non-deterministic. - * As such the base value for each team's scan operation is similarly - * non-deterministic. - */ - template< typename Type > - KOKKOS_INLINE_FUNCTION Type team_scan( const Type & value , Type * const global_accum ) const -#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - { return Type(); } -#else - { return m_exec.template shepherd_scan( m_team_size , value , global_accum ); } -#endif - - //---------------------------------------- - // Private driver for task-team parallel - - struct TaskTeam {}; - - QthreadTeamPolicyMember(); - explicit QthreadTeamPolicyMember( const TaskTeam & ); - - //---------------------------------------- - // Private for the driver ( for ( member_type i(exec,team); i ; i.next_team() ) { ... } - - // Initialize - template< class ... Properties > - QthreadTeamPolicyMember( Impl::QthreadExec & exec - , const Kokkos::Impl::TeamPolicyInternal & team ) - : m_exec( exec ) - , m_team_shared(0,0) - , m_team_size( team.m_team_size ) - , m_team_rank( exec.shepherd_worker_rank() ) - , m_league_size( team.m_league_size ) - , m_league_end( team.m_league_size - team.m_shepherd_iter * ( exec.shepherd_size() - ( exec.shepherd_rank() + 1 ) ) ) - , m_league_rank( m_league_end > team.m_shepherd_iter ? m_league_end - team.m_shepherd_iter : 0 ) - { - m_exec.shared_reset( m_team_shared ); - } - - // Continue - operator bool () const { return m_league_rank < m_league_end ; } - - // iterate - void next_team() { ++m_league_rank ; m_exec.shared_reset( m_team_shared ); } -}; - - -template< class ... Properties > -class TeamPolicyInternal< Kokkos::Qthread , Properties ... > - : public PolicyTraits< Properties... > -{ -private: - - const int m_league_size ; - const int m_team_size ; - const int m_shepherd_iter ; - -public: - - //! Tag this class as a kokkos execution policy - typedef TeamPolicyInternal execution_policy ; - typedef Qthread execution_space ; - typedef PolicyTraits< Properties ... > traits ; - - //---------------------------------------- - - template< class FunctorType > - inline static - int team_size_max( const FunctorType & ) - { return Qthread::instance().shepherd_worker_size(); } - - template< class FunctorType > - static int team_size_recommended( const FunctorType & f ) - { return team_size_max( f ); } - - template< class FunctorType > - inline static - int team_size_recommended( const FunctorType & f , const int& ) - { return team_size_max( f ); } - - //---------------------------------------- - - inline int team_size() const { return m_team_size ; } - inline int league_size() const { return m_league_size ; } - - // One active team per shepherd - TeamPolicyInternal( Kokkos::Qthread & q - , const int league_size - , const int team_size - , const int /* vector_length */ = 0 - ) - : m_league_size( league_size ) - , m_team_size( team_size < q.shepherd_worker_size() - ? team_size : q.shepherd_worker_size() ) - , m_shepherd_iter( ( league_size + q.shepherd_size() - 1 ) / q.shepherd_size() ) - { - } - - // One active team per shepherd - TeamPolicyInternal( const int league_size - , const int team_size - , const int /* vector_length */ = 0 - ) - : m_league_size( league_size ) - , m_team_size( team_size < Qthread::instance().shepherd_worker_size() - ? team_size : Qthread::instance().shepherd_worker_size() ) - , m_shepherd_iter( ( league_size + Qthread::instance().shepherd_size() - 1 ) / Qthread::instance().shepherd_size() ) - { - } - - typedef Impl::QthreadTeamPolicyMember member_type ; - - friend class Impl::QthreadTeamPolicyMember ; -}; - -} /* namespace Impl */ -} /* namespace Kokkos */ - -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- - -#endif /* #define KOKKOS_QTHREADEXEC_HPP */ - diff --git a/lib/kokkos/core/src/Qthreads/Kokkos_QthreadsExec.cpp b/lib/kokkos/core/src/Qthreads/Kokkos_QthreadsExec.cpp new file mode 100644 index 0000000000..1b92494084 --- /dev/null +++ b/lib/kokkos/core/src/Qthreads/Kokkos_QthreadsExec.cpp @@ -0,0 +1,519 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +#if defined( KOKKOS_ENABLE_QTHREADS ) + +#include +#include +#include +#include +#include + +#include +#include +#include + +// Defines to enable experimental Qthreads functionality. +//#define QTHREAD_LOCAL_PRIORITY +//#define CLONED_TASKS + +//#include + +//---------------------------------------------------------------------------- + +namespace Kokkos { + +namespace Impl { + +namespace { + +enum { MAXIMUM_QTHREADS_WORKERS = 1024 }; + +/** s_exec is indexed by the reverse rank of the workers + * for faster fan-in / fan-out lookups + * [ n - 1, n - 2, ..., 0 ] + */ +QthreadsExec * s_exec[ MAXIMUM_QTHREADS_WORKERS ]; + +int s_number_shepherds = 0; +int s_number_workers_per_shepherd = 0; +int s_number_workers = 0; + +inline +QthreadsExec ** worker_exec() +{ + return s_exec + s_number_workers - ( qthread_shep() * s_number_workers_per_shepherd + qthread_worker_local( NULL ) + 1 ); +} + +const int s_base_size = QthreadsExec::align_alloc( sizeof(QthreadsExec) ); + +int s_worker_reduce_end = 0; // End of worker reduction memory. +int s_worker_shared_end = 0; // Total of worker scratch memory. +int s_worker_shared_begin = 0; // Beginning of worker shared memory. + +QthreadsExecFunctionPointer volatile s_active_function = 0; +const void * volatile s_active_function_arg = 0; + +} // namespace + +} // namespace Impl + +} // namespace Kokkos + +//---------------------------------------------------------------------------- + +namespace Kokkos { + +int Qthreads::is_initialized() +{ + return Impl::s_number_workers != 0; +} + +int Qthreads::concurrency() +{ + return Impl::s_number_workers_per_shepherd; +} + +int Qthreads::in_parallel() +{ + return Impl::s_active_function != 0; +} + +void Qthreads::initialize( int thread_count ) +{ + // Environment variable: QTHREAD_NUM_SHEPHERDS + // Environment variable: QTHREAD_NUM_WORKERS_PER_SHEP + // Environment variable: QTHREAD_HWPAR + + { + char buffer[256]; + snprintf( buffer, sizeof(buffer), "QTHREAD_HWPAR=%d", thread_count ); + putenv( buffer ); + } + + const bool ok_init = ( QTHREAD_SUCCESS == qthread_initialize() ) && + ( thread_count == qthread_num_shepherds() * qthread_num_workers_local( NO_SHEPHERD ) ) && + ( thread_count == qthread_num_workers() ); + + bool ok_symmetry = true; + + if ( ok_init ) { + Impl::s_number_shepherds = qthread_num_shepherds(); + Impl::s_number_workers_per_shepherd = qthread_num_workers_local( NO_SHEPHERD ); + Impl::s_number_workers = Impl::s_number_shepherds * Impl::s_number_workers_per_shepherd; + + for ( int i = 0; ok_symmetry && i < Impl::s_number_shepherds; ++i ) { + ok_symmetry = ( Impl::s_number_workers_per_shepherd == qthread_num_workers_local( i ) ); + } + } + + if ( ! ok_init || ! ok_symmetry ) { + std::ostringstream msg; + + msg << "Kokkos::Qthreads::initialize(" << thread_count << ") FAILED"; + msg << " : qthread_num_shepherds = " << qthread_num_shepherds(); + msg << " : qthread_num_workers_per_shepherd = " << qthread_num_workers_local( NO_SHEPHERD ); + msg << " : qthread_num_workers = " << qthread_num_workers(); + + if ( ! ok_symmetry ) { + msg << " : qthread_num_workers_local = {"; + for ( int i = 0; i < Impl::s_number_shepherds; ++i ) { + msg << " " << qthread_num_workers_local( i ); + } + msg << " }"; + } + + Impl::s_number_workers = 0; + Impl::s_number_shepherds = 0; + Impl::s_number_workers_per_shepherd = 0; + + if ( ok_init ) { qthread_finalize(); } + + Kokkos::Impl::throw_runtime_exception( msg.str() ); + } + + Impl::QthreadsExec::resize_worker_scratch( 256, 256 ); + + // Init the array for used for arbitrarily sized atomics. + Impl::init_lock_array_host_space(); + +} + +void Qthreads::finalize() +{ + Impl::QthreadsExec::clear_workers(); + + if ( Impl::s_number_workers ) { + qthread_finalize(); + } + + Impl::s_number_workers = 0; + Impl::s_number_shepherds = 0; + Impl::s_number_workers_per_shepherd = 0; +} + +void Qthreads::print_configuration( std::ostream & s, const bool detail ) +{ + s << "Kokkos::Qthreads {" + << " num_shepherds(" << Impl::s_number_shepherds << ")" + << " num_workers_per_shepherd(" << Impl::s_number_workers_per_shepherd << ")" + << " }" << std::endl; +} + +Qthreads & Qthreads::instance( int ) +{ + static Qthreads q; + return q; +} + +void Qthreads::fence() +{ +} + +int Qthreads::shepherd_size() const { return Impl::s_number_shepherds; } +int Qthreads::shepherd_worker_size() const { return Impl::s_number_workers_per_shepherd; } + +} // namespace Kokkos + +//---------------------------------------------------------------------------- + +namespace Kokkos { + +namespace Impl { + +namespace { + +aligned_t driver_exec_all( void * arg ) +{ + QthreadsExec & exec = **worker_exec(); + + (*s_active_function)( exec, s_active_function_arg ); + +/* + fprintf( stdout + , "QthreadsExec driver worker(%d:%d) shepherd(%d:%d) shepherd_worker(%d:%d) done\n" + , exec.worker_rank() + , exec.worker_size() + , exec.shepherd_rank() + , exec.shepherd_size() + , exec.shepherd_worker_rank() + , exec.shepherd_worker_size() + ); + fflush(stdout); +*/ + + return 0; +} + +aligned_t driver_resize_worker_scratch( void * arg ) +{ + static volatile int lock_begin = 0; + static volatile int lock_end = 0; + + QthreadsExec ** const exec = worker_exec(); + + //---------------------------------------- + // Serialize allocation for thread safety. + + while ( ! atomic_compare_exchange_strong( & lock_begin, 0, 1 ) ); // Spin wait to claim lock. + + const bool ok = 0 == *exec; + + if ( ok ) { *exec = (QthreadsExec *) malloc( s_base_size + s_worker_shared_end ); } + + lock_begin = 0; // Release lock. + + if ( ok ) { new( *exec ) QthreadsExec(); } + + //---------------------------------------- + // Wait for all calls to complete to insure that each worker has executed. + + if ( s_number_workers == 1 + atomic_fetch_add( & lock_end, 1 ) ) { lock_end = 0; } + + while ( lock_end ); + +/* + fprintf( stdout + , "QthreadsExec resize worker(%d:%d) shepherd(%d:%d) shepherd_worker(%d:%d) done\n" + , (**exec).worker_rank() + , (**exec).worker_size() + , (**exec).shepherd_rank() + , (**exec).shepherd_size() + , (**exec).shepherd_worker_rank() + , (**exec).shepherd_worker_size() + ); + fflush(stdout); +*/ + + //---------------------------------------- + + if ( ! ok ) { + fprintf( stderr, "Kokkos::QthreadsExec resize failed\n" ); + fflush( stderr ); + } + + return 0; +} + +void verify_is_process( const char * const label, bool not_active = false ) +{ + const bool not_process = 0 != qthread_shep() || 0 != qthread_worker_local( NULL ); + const bool is_active = not_active && ( s_active_function || s_active_function_arg ); + + if ( not_process || is_active ) { + std::string msg( label ); + msg.append( " : FAILED" ); + if ( not_process ) msg.append(" : not called by main process"); + if ( is_active ) msg.append(" : parallel execution in progress"); + Kokkos::Impl::throw_runtime_exception( msg ); + } +} + +} // namespace + +int QthreadsExec::worker_per_shepherd() +{ + return s_number_workers_per_shepherd; +} + +QthreadsExec::QthreadsExec() +{ + const int shepherd_rank = qthread_shep(); + const int shepherd_worker_rank = qthread_worker_local( NULL ); + const int worker_rank = shepherd_rank * s_number_workers_per_shepherd + shepherd_worker_rank; + + m_worker_base = s_exec; + m_shepherd_base = s_exec + s_number_workers_per_shepherd * ( ( s_number_shepherds - ( shepherd_rank + 1 ) ) ); + m_scratch_alloc = ( (unsigned char *) this ) + s_base_size; + m_reduce_end = s_worker_reduce_end; + m_shepherd_rank = shepherd_rank; + m_shepherd_size = s_number_shepherds; + m_shepherd_worker_rank = shepherd_worker_rank; + m_shepherd_worker_size = s_number_workers_per_shepherd; + m_worker_rank = worker_rank; + m_worker_size = s_number_workers; + m_worker_state = QthreadsExec::Active; +} + +void QthreadsExec::clear_workers() +{ + for ( int iwork = 0; iwork < s_number_workers; ++iwork ) { + QthreadsExec * const exec = s_exec[iwork]; + s_exec[iwork] = 0; + free( exec ); + } +} + +void QthreadsExec::shared_reset( Qthreads::scratch_memory_space & space ) +{ + new( & space ) + Qthreads::scratch_memory_space( + ((unsigned char *) (**m_shepherd_base).m_scratch_alloc ) + s_worker_shared_begin, + s_worker_shared_end - s_worker_shared_begin + ); +} + +void QthreadsExec::resize_worker_scratch( const int reduce_size, const int shared_size ) +{ + const int exec_all_reduce_alloc = align_alloc( reduce_size ); + const int shepherd_scan_alloc = align_alloc( 8 ); + const int shepherd_shared_end = exec_all_reduce_alloc + shepherd_scan_alloc + align_alloc( shared_size ); + + if ( s_worker_reduce_end < exec_all_reduce_alloc || + s_worker_shared_end < shepherd_shared_end ) { + +/* + fprintf( stdout, "QthreadsExec::resize\n"); + fflush(stdout); +*/ + + // Clear current worker memory before allocating new worker memory. + clear_workers(); + + // Increase the buffers to an aligned allocation. + s_worker_reduce_end = exec_all_reduce_alloc; + s_worker_shared_begin = exec_all_reduce_alloc + shepherd_scan_alloc; + s_worker_shared_end = shepherd_shared_end; + + // Need to query which shepherd this main 'process' is running. + + const int main_shep = qthread_shep(); + + // Have each worker resize its memory for proper first-touch. +#if 0 + for ( int jshep = 0; jshep < s_number_shepherds; ++jshep ) { + for ( int i = jshep != main_shep ? 0 : 1; i < s_number_workers_per_shepherd; ++i ) { + qthread_fork_to( driver_resize_worker_scratch, NULL, NULL, jshep ); + } + } +#else + // If this function is used before the 'qthreads.task_policy' unit test, + // the 'qthreads.task_policy' unit test fails with a seg-fault within libqthread.so. + for ( int jshep = 0; jshep < s_number_shepherds; ++jshep ) { + const int num_clone = jshep != main_shep ? s_number_workers_per_shepherd : s_number_workers_per_shepherd - 1; + + if ( num_clone ) { + const int ret = qthread_fork_clones_to_local_priority + ( driver_resize_worker_scratch // Function + , NULL // Function data block + , NULL // Pointer to return value feb + , jshep // Shepherd number + , num_clone - 1 // Number of instances - 1 + ); + + assert( ret == QTHREAD_SUCCESS ); + } + } +#endif + + driver_resize_worker_scratch( NULL ); + + // Verify all workers allocated. + + bool ok = true; + for ( int iwork = 0; ok && iwork < s_number_workers; ++iwork ) { ok = 0 != s_exec[iwork]; } + + if ( ! ok ) { + std::ostringstream msg; + msg << "Kokkos::Impl::QthreadsExec::resize : FAILED for workers {"; + for ( int iwork = 0; iwork < s_number_workers; ++iwork ) { + if ( 0 == s_exec[iwork] ) { msg << " " << ( s_number_workers - ( iwork + 1 ) ); } + } + msg << " }"; + Kokkos::Impl::throw_runtime_exception( msg.str() ); + } + } +} + +void QthreadsExec::exec_all( Qthreads &, QthreadsExecFunctionPointer func, const void * arg ) +{ + verify_is_process("QthreadsExec::exec_all(...)",true); + +/* + fprintf( stdout, "QthreadsExec::exec_all\n"); + fflush(stdout); +*/ + + s_active_function = func; + s_active_function_arg = arg; + + // Need to query which shepherd this main 'process' is running. + + const int main_shep = qthread_shep(); + +#if 0 + for ( int jshep = 0, iwork = 0; jshep < s_number_shepherds; ++jshep ) { + for ( int i = jshep != main_shep ? 0 : 1; i < s_number_workers_per_shepherd; ++i, ++iwork ) { + qthread_fork_to( driver_exec_all, NULL, NULL, jshep ); + } + } +#else + // If this function is used before the 'qthreads.task_policy' unit test, + // the 'qthreads.task_policy' unit test fails with a seg-fault within libqthread.so. + for ( int jshep = 0; jshep < s_number_shepherds; ++jshep ) { + const int num_clone = jshep != main_shep ? s_number_workers_per_shepherd : s_number_workers_per_shepherd - 1; + + if ( num_clone ) { + const int ret = qthread_fork_clones_to_local_priority + ( driver_exec_all // Function + , NULL // Function data block + , NULL // Pointer to return value feb + , jshep // Shepherd number + , num_clone - 1 // Number of instances - 1 + ); + + assert(ret == QTHREAD_SUCCESS); + } + } +#endif + + driver_exec_all( NULL ); + + s_active_function = 0; + s_active_function_arg = 0; +} + +void * QthreadsExec::exec_all_reduce_result() +{ + return s_exec[0]->m_scratch_alloc; +} + +} // namespace Impl + +} // namespace Kokkos + +namespace Kokkos { + +namespace Impl { + +QthreadsTeamPolicyMember::QthreadsTeamPolicyMember() + : m_exec( **worker_exec() ) + , m_team_shared( 0, 0 ) + , m_team_size( 1 ) + , m_team_rank( 0 ) + , m_league_size( 1 ) + , m_league_end( 1 ) + , m_league_rank( 0 ) +{ + m_exec.shared_reset( m_team_shared ); +} + +QthreadsTeamPolicyMember::QthreadsTeamPolicyMember( const QthreadsTeamPolicyMember::TaskTeam & ) + : m_exec( **worker_exec() ) + , m_team_shared( 0, 0 ) + , m_team_size( s_number_workers_per_shepherd ) + , m_team_rank( m_exec.shepherd_worker_rank() ) + , m_league_size( 1 ) + , m_league_end( 1 ) + , m_league_rank( 0 ) +{ + m_exec.shared_reset( m_team_shared ); +} + +} // namespace Impl + +} // namespace Kokkos + +#endif // #if defined( KOKKOS_ENABLE_QTHREADS ) diff --git a/lib/kokkos/core/src/Qthreads/Kokkos_QthreadsExec.hpp b/lib/kokkos/core/src/Qthreads/Kokkos_QthreadsExec.hpp new file mode 100644 index 0000000000..64856eb99e --- /dev/null +++ b/lib/kokkos/core/src/Qthreads/Kokkos_QthreadsExec.hpp @@ -0,0 +1,640 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef KOKKOS_QTHREADSEXEC_HPP +#define KOKKOS_QTHREADSEXEC_HPP + +#include + +//---------------------------------------------------------------------------- + +namespace Kokkos { + +namespace Impl { + +class QthreadsExec; + +typedef void (*QthreadsExecFunctionPointer)( QthreadsExec &, const void * ); + +class QthreadsExec { +private: + enum { Inactive = 0, Active = 1 }; + + const QthreadsExec * const * m_worker_base; + const QthreadsExec * const * m_shepherd_base; + + void * m_scratch_alloc; ///< Scratch memory [ reduce, team, shared ] + int m_reduce_end; ///< End of scratch reduction memory + + int m_shepherd_rank; + int m_shepherd_size; + + int m_shepherd_worker_rank; + int m_shepherd_worker_size; + + /* + * m_worker_rank = m_shepherd_rank * m_shepherd_worker_size + m_shepherd_worker_rank + * m_worker_size = m_shepherd_size * m_shepherd_worker_size + */ + int m_worker_rank; + int m_worker_size; + + int mutable volatile m_worker_state; + + friend class Kokkos::Qthreads; + + ~QthreadsExec(); + QthreadsExec( const QthreadsExec & ); + QthreadsExec & operator = ( const QthreadsExec & ); + +public: + QthreadsExec(); + + /** Execute the input function on all available Qthreads workers. */ + static void exec_all( Qthreads &, QthreadsExecFunctionPointer, const void * ); + + /** Barrier across all workers participating in the 'exec_all'. */ + void exec_all_barrier() const + { + const int rev_rank = m_worker_size - ( m_worker_rank + 1 ); + + int n, j; + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ); n <<= 1 ) { + Impl::spinwait_while_equal( m_worker_base[j]->m_worker_state, QthreadsExec::Active ); + } + + if ( rev_rank ) { + m_worker_state = QthreadsExec::Inactive; + Impl::spinwait_while_equal( m_worker_state, QthreadsExec::Inactive ); + } + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ); n <<= 1 ) { + m_worker_base[j]->m_worker_state = QthreadsExec::Active; + } + } + + /** Barrier across workers within the shepherd with rank < team_rank. */ + void shepherd_barrier( const int team_size ) const + { + if ( m_shepherd_worker_rank < team_size ) { + + const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 ); + + int n, j; + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ); n <<= 1 ) { + Impl::spinwait_while_equal( m_shepherd_base[j]->m_worker_state, QthreadsExec::Active ); + } + + if ( rev_rank ) { + m_worker_state = QthreadsExec::Inactive; + Impl::spinwait_while_equal( m_worker_state, QthreadsExec::Inactive ); + } + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ); n <<= 1 ) { + m_shepherd_base[j]->m_worker_state = QthreadsExec::Active; + } + } + } + + /** Reduce across all workers participating in the 'exec_all'. */ + template< class FunctorType, class ReducerType, class ArgTag > + inline + void exec_all_reduce( const FunctorType & func, const ReducerType & reduce ) const + { + typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType > ReducerConditional; + typedef typename ReducerConditional::type ReducerTypeFwd; + typedef Kokkos::Impl::FunctorValueJoin< ReducerTypeFwd, ArgTag > ValueJoin; + + const int rev_rank = m_worker_size - ( m_worker_rank + 1 ); + + int n, j; + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ); n <<= 1 ) { + const QthreadsExec & fan = *m_worker_base[j]; + + Impl::spinwait_while_equal( fan.m_worker_state, QthreadsExec::Active ); + + ValueJoin::join( ReducerConditional::select( func, reduce ), m_scratch_alloc, fan.m_scratch_alloc ); + } + + if ( rev_rank ) { + m_worker_state = QthreadsExec::Inactive; + Impl::spinwait_while_equal( m_worker_state, QthreadsExec::Inactive ); + } + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ); n <<= 1 ) { + m_worker_base[j]->m_worker_state = QthreadsExec::Active; + } + } + + /** Scan across all workers participating in the 'exec_all'. */ + template< class FunctorType, class ArgTag > + inline + void exec_all_scan( const FunctorType & func ) const + { + typedef Kokkos::Impl::FunctorValueInit< FunctorType, ArgTag > ValueInit; + typedef Kokkos::Impl::FunctorValueJoin< FunctorType, ArgTag > ValueJoin; + typedef Kokkos::Impl::FunctorValueOps< FunctorType, ArgTag > ValueOps; + + const int rev_rank = m_worker_size - ( m_worker_rank + 1 ); + + int n, j; + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ); n <<= 1 ) { + Impl::spinwait_while_equal( m_worker_base[j]->m_worker_state, QthreadsExec::Active ); + } + + if ( rev_rank ) { + m_worker_state = QthreadsExec::Inactive; + Impl::spinwait_while_equal( m_worker_state, QthreadsExec::Inactive ); + } + else { + // Root thread scans across values before releasing threads. + // Worker data is in reverse order, so m_worker_base[0] is the + // highest ranking thread. + + // Copy from lower ranking to higher ranking worker. + for ( int i = 1; i < m_worker_size; ++i ) { + ValueOps::copy( func + , m_worker_base[i-1]->m_scratch_alloc + , m_worker_base[i]->m_scratch_alloc + ); + } + + ValueInit::init( func, m_worker_base[m_worker_size-1]->m_scratch_alloc ); + + // Join from lower ranking to higher ranking worker. + // Value at m_worker_base[n-1] is zero so skip adding it to m_worker_base[n-2]. + for ( int i = m_worker_size - 1; --i > 0; ) { + ValueJoin::join( func, m_worker_base[i-1]->m_scratch_alloc, m_worker_base[i]->m_scratch_alloc ); + } + } + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ); n <<= 1 ) { + m_worker_base[j]->m_worker_state = QthreadsExec::Active; + } + } + + //---------------------------------------- + + template< class Type > + inline + volatile Type * shepherd_team_scratch_value() const + { return (volatile Type*)( ( (unsigned char *) m_scratch_alloc ) + m_reduce_end ); } + + template< class Type > + inline + void shepherd_broadcast( Type & value, const int team_size, const int team_rank ) const + { + if ( m_shepherd_base ) { + Type * const shared_value = m_shepherd_base[0]->shepherd_team_scratch_value(); + if ( m_shepherd_worker_rank == team_rank ) { *shared_value = value; } + memory_fence(); + shepherd_barrier( team_size ); + value = *shared_value; + } + } + + template< class Type > + inline + Type shepherd_reduce( const int team_size, const Type & value ) const + { + volatile Type * const shared_value = shepherd_team_scratch_value(); + *shared_value = value; +// *shepherd_team_scratch_value() = value; + + memory_fence(); + + const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 ); + + int n, j; + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ); n <<= 1 ) { + Impl::spinwait_while_equal( m_shepherd_base[j]->m_worker_state, QthreadsExec::Active ); + } + + if ( rev_rank ) { + m_worker_state = QthreadsExec::Inactive; + Impl::spinwait_while_equal( m_worker_state, QthreadsExec::Inactive ); + } + else { + Type & accum = *m_shepherd_base[0]->shepherd_team_scratch_value(); + for ( int i = 1; i < n; ++i ) { + accum += *m_shepherd_base[i]->shepherd_team_scratch_value(); + } + for ( int i = 1; i < n; ++i ) { + *m_shepherd_base[i]->shepherd_team_scratch_value() = accum; + } + + memory_fence(); + } + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ); n <<= 1 ) { + m_shepherd_base[j]->m_worker_state = QthreadsExec::Active; + } + + return *shepherd_team_scratch_value(); + } + + template< class JoinOp > + inline + typename JoinOp::value_type + shepherd_reduce( const int team_size + , const typename JoinOp::value_type & value + , const JoinOp & op ) const + { + typedef typename JoinOp::value_type Type; + + volatile Type * const shared_value = shepherd_team_scratch_value(); + *shared_value = value; +// *shepherd_team_scratch_value() = value; + + memory_fence(); + + const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 ); + + int n, j; + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ); n <<= 1 ) { + Impl::spinwait_while_equal( m_shepherd_base[j]->m_worker_state, QthreadsExec::Active ); + } + + if ( rev_rank ) { + m_worker_state = QthreadsExec::Inactive; + Impl::spinwait_while_equal( m_worker_state, QthreadsExec::Inactive ); + } + else { + volatile Type & accum = *m_shepherd_base[0]->shepherd_team_scratch_value(); + for ( int i = 1; i < team_size; ++i ) { + op.join( accum, *m_shepherd_base[i]->shepherd_team_scratch_value() ); + } + for ( int i = 1; i < team_size; ++i ) { + *m_shepherd_base[i]->shepherd_team_scratch_value() = accum; + } + + memory_fence(); + } + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ); n <<= 1 ) { + m_shepherd_base[j]->m_worker_state = QthreadsExec::Active; + } + + return *shepherd_team_scratch_value(); + } + + template< class Type > + inline + Type shepherd_scan( const int team_size + , const Type & value + , Type * const global_value = 0 ) const + { + *shepherd_team_scratch_value() = value; + + memory_fence(); + + const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 ); + + int n, j; + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ); n <<= 1 ) { + Impl::spinwait_while_equal( m_shepherd_base[j]->m_worker_state, QthreadsExec::Active ); + } + + if ( rev_rank ) { + m_worker_state = QthreadsExec::Inactive; + Impl::spinwait_while_equal( m_worker_state, QthreadsExec::Inactive ); + } + else { + // Root thread scans across values before releasing threads. + // Worker data is in reverse order, so m_shepherd_base[0] is the + // highest ranking thread. + + // Copy from lower ranking to higher ranking worker. + + Type accum = *m_shepherd_base[0]->shepherd_team_scratch_value(); + for ( int i = 1; i < team_size; ++i ) { + const Type tmp = *m_shepherd_base[i]->shepherd_team_scratch_value(); + accum += tmp; + *m_shepherd_base[i-1]->shepherd_team_scratch_value() = tmp; + } + + *m_shepherd_base[team_size-1]->shepherd_team_scratch_value() = + global_value ? atomic_fetch_add( global_value, accum ) : 0; + + // Join from lower ranking to higher ranking worker. + for ( int i = team_size; --i; ) { + *m_shepherd_base[i-1]->shepherd_team_scratch_value() += *m_shepherd_base[i]->shepherd_team_scratch_value(); + } + + memory_fence(); + } + + for ( n = 1; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ); n <<= 1 ) { + m_shepherd_base[j]->m_worker_state = QthreadsExec::Active; + } + + return *shepherd_team_scratch_value(); + } + + //---------------------------------------- + + static inline + int align_alloc( int size ) + { + enum { ALLOC_GRAIN = 1 << 6 /* power of two, 64bytes */ }; + enum { ALLOC_GRAIN_MASK = ALLOC_GRAIN - 1 }; + return ( size + ALLOC_GRAIN_MASK ) & ~ALLOC_GRAIN_MASK; + } + + void shared_reset( Qthreads::scratch_memory_space & ); + + void * exec_all_reduce_value() const { return m_scratch_alloc; } + + static void * exec_all_reduce_result(); + + static void resize_worker_scratch( const int reduce_size, const int shared_size ); + static void clear_workers(); + + //---------------------------------------- + + inline int worker_rank() const { return m_worker_rank; } + inline int worker_size() const { return m_worker_size; } + inline int shepherd_worker_rank() const { return m_shepherd_worker_rank; } + inline int shepherd_worker_size() const { return m_shepherd_worker_size; } + inline int shepherd_rank() const { return m_shepherd_rank; } + inline int shepherd_size() const { return m_shepherd_size; } + + static int worker_per_shepherd(); +}; + +} // namespace Impl + +} // namespace Kokkos + +//---------------------------------------------------------------------------- + +namespace Kokkos { + +namespace Impl { + +class QthreadsTeamPolicyMember { +private: + typedef Kokkos::Qthreads execution_space; + typedef execution_space::scratch_memory_space scratch_memory_space; + + Impl::QthreadsExec & m_exec; + scratch_memory_space m_team_shared; + const int m_team_size; + const int m_team_rank; + const int m_league_size; + const int m_league_end; + int m_league_rank; + +public: + KOKKOS_INLINE_FUNCTION + const scratch_memory_space & team_shmem() const { return m_team_shared; } + + KOKKOS_INLINE_FUNCTION int league_rank() const { return m_league_rank; } + KOKKOS_INLINE_FUNCTION int league_size() const { return m_league_size; } + KOKKOS_INLINE_FUNCTION int team_rank() const { return m_team_rank; } + KOKKOS_INLINE_FUNCTION int team_size() const { return m_team_size; } + + KOKKOS_INLINE_FUNCTION void team_barrier() const +#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + {} +#else + { m_exec.shepherd_barrier( m_team_size ); } +#endif + + template< typename Type > + KOKKOS_INLINE_FUNCTION Type team_broadcast( const Type & value, int rank ) const +#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + { return Type(); } +#else + { return m_exec.template shepherd_broadcast( value, m_team_size, rank ); } +#endif + + template< typename Type > + KOKKOS_INLINE_FUNCTION Type team_reduce( const Type & value ) const +#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + { return Type(); } +#else + { return m_exec.template shepherd_reduce( m_team_size, value ); } +#endif + + template< typename JoinOp > + KOKKOS_INLINE_FUNCTION typename JoinOp::value_type + team_reduce( const typename JoinOp::value_type & value + , const JoinOp & op ) const +#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + { return typename JoinOp::value_type(); } +#else + { return m_exec.template shepherd_reduce( m_team_size, value, op ); } +#endif + + /** \brief Intra-team exclusive prefix sum with team_rank() ordering. + * + * The highest rank thread can compute the reduction total as + * reduction_total = dev.team_scan( value ) + value; + */ + template< typename Type > + KOKKOS_INLINE_FUNCTION Type team_scan( const Type & value ) const +#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + { return Type(); } +#else + { return m_exec.template shepherd_scan( m_team_size, value ); } +#endif + + /** \brief Intra-team exclusive prefix sum with team_rank() ordering + * with intra-team non-deterministic ordering accumulation. + * + * The global inter-team accumulation value will, at the end of the league's + * parallel execution, be the scan's total. Parallel execution ordering of + * the league's teams is non-deterministic. As such the base value for each + * team's scan operation is similarly non-deterministic. + */ + template< typename Type > + KOKKOS_INLINE_FUNCTION Type team_scan( const Type & value, Type * const global_accum ) const +#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + { return Type(); } +#else + { return m_exec.template shepherd_scan( m_team_size, value, global_accum ); } +#endif + + //---------------------------------------- + // Private driver for task-team parallel. + + struct TaskTeam {}; + + QthreadsTeamPolicyMember(); + explicit QthreadsTeamPolicyMember( const TaskTeam & ); + + //---------------------------------------- + // Private for the driver ( for ( member_type i( exec, team ); i; i.next_team() ) { ... } + + // Initialize. + template< class ... Properties > + QthreadsTeamPolicyMember( Impl::QthreadsExec & exec + , const Kokkos::Impl::TeamPolicyInternal< Qthreads, Properties... > & team ) + : m_exec( exec ) + , m_team_shared( 0, 0 ) + , m_team_size( team.m_team_size ) + , m_team_rank( exec.shepherd_worker_rank() ) + , m_league_size( team.m_league_size ) + , m_league_end( team.m_league_size - team.m_shepherd_iter * ( exec.shepherd_size() - ( exec.shepherd_rank() + 1 ) ) ) + , m_league_rank( m_league_end > team.m_shepherd_iter ? m_league_end - team.m_shepherd_iter : 0 ) + { + m_exec.shared_reset( m_team_shared ); + } + + // Continue. + operator bool () const { return m_league_rank < m_league_end; } + + // Iterate. + void next_team() { ++m_league_rank; m_exec.shared_reset( m_team_shared ); } +}; + +template< class ... Properties > +class TeamPolicyInternal< Kokkos::Qthreads, Properties ... > + : public PolicyTraits< Properties... > +{ +private: + const int m_league_size; + const int m_team_size; + const int m_shepherd_iter; + +public: + //! Tag this class as a kokkos execution policy. + typedef TeamPolicyInternal execution_policy; + typedef Qthreads execution_space; + typedef PolicyTraits< Properties ... > traits; + + //---------------------------------------- + + template< class FunctorType > + inline static + int team_size_max( const FunctorType & ) + { return Qthreads::instance().shepherd_worker_size(); } + + template< class FunctorType > + static int team_size_recommended( const FunctorType & f ) + { return team_size_max( f ); } + + template< class FunctorType > + inline static + int team_size_recommended( const FunctorType & f, const int& ) + { return team_size_max( f ); } + + //---------------------------------------- + + inline int team_size() const { return m_team_size; } + inline int league_size() const { return m_league_size; } + + // One active team per shepherd. + TeamPolicyInternal( Kokkos::Qthreads & q + , const int league_size + , const int team_size + , const int /* vector_length */ = 0 + ) + : m_league_size( league_size ) + , m_team_size( team_size < q.shepherd_worker_size() + ? team_size : q.shepherd_worker_size() ) + , m_shepherd_iter( ( league_size + q.shepherd_size() - 1 ) / q.shepherd_size() ) + {} + + // TODO: Make sure this is correct. + // One active team per shepherd. + TeamPolicyInternal( Kokkos::Qthreads & q + , const int league_size + , const Kokkos::AUTO_t & /* team_size_request */ + , const int /* vector_length */ = 0 + ) + : m_league_size( league_size ) + , m_team_size( q.shepherd_worker_size() ) + , m_shepherd_iter( ( league_size + q.shepherd_size() - 1 ) / q.shepherd_size() ) + {} + + // One active team per shepherd. + TeamPolicyInternal( const int league_size + , const int team_size + , const int /* vector_length */ = 0 + ) + : m_league_size( league_size ) + , m_team_size( team_size < Qthreads::instance().shepherd_worker_size() + ? team_size : Qthreads::instance().shepherd_worker_size() ) + , m_shepherd_iter( ( league_size + Qthreads::instance().shepherd_size() - 1 ) / Qthreads::instance().shepherd_size() ) + {} + + // TODO: Make sure this is correct. + // One active team per shepherd. + TeamPolicyInternal( const int league_size + , const Kokkos::AUTO_t & /* team_size_request */ + , const int /* vector_length */ = 0 + ) + : m_league_size( league_size ) + , m_team_size( Qthreads::instance().shepherd_worker_size() ) + , m_shepherd_iter( ( league_size + Qthreads::instance().shepherd_size() - 1 ) / Qthreads::instance().shepherd_size() ) + {} + + // TODO: Doesn't do anything yet. Fix this. + /** \brief set chunk_size to a discrete value*/ + inline TeamPolicyInternal set_chunk_size(typename traits::index_type chunk_size_) const { + TeamPolicyInternal p = *this; +// p.m_chunk_size = chunk_size_; + return p; + } + + typedef Impl::QthreadsTeamPolicyMember member_type; + + friend class Impl::QthreadsTeamPolicyMember; +}; + +} // namespace Impl + +} // namespace Kokkos + +//---------------------------------------------------------------------------- + +#endif // #define KOKKOS_QTHREADSEXEC_HPP diff --git a/lib/kokkos/core/src/Qthread/Kokkos_Qthread_Parallel.hpp b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_Parallel.hpp similarity index 86% rename from lib/kokkos/core/src/Qthread/Kokkos_Qthread_Parallel.hpp rename to lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_Parallel.hpp index cb5b180948..9f99607540 100644 --- a/lib/kokkos/core/src/Qthread/Kokkos_Qthread_Parallel.hpp +++ b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_Parallel.hpp @@ -41,8 +41,8 @@ //@HEADER */ -#ifndef KOKKOS_QTHREAD_PARALLEL_HPP -#define KOKKOS_QTHREAD_PARALLEL_HPP +#ifndef KOKKOS_QTHREADS_PARALLEL_HPP +#define KOKKOS_QTHREADS_PARALLEL_HPP #include @@ -51,7 +51,7 @@ #include #include -#include +#include //---------------------------------------------------------------------------- @@ -63,7 +63,7 @@ namespace Impl { template< class FunctorType , class ... Traits > class ParallelFor< FunctorType , Kokkos::RangePolicy< Traits ... > - , Kokkos::Qthread + , Kokkos::Qthreads > { private: @@ -99,7 +99,7 @@ private: } // Function is called once by every concurrent thread. - static void exec( QthreadExec & exec , const void * arg ) + static void exec( QthreadsExec & exec , const void * arg ) { const ParallelFor & self = * ((const ParallelFor *) arg ); @@ -116,7 +116,7 @@ public: inline void execute() const { - Impl::QthreadExec::exec_all( Qthread::instance() , & ParallelFor::exec , this ); + Impl::QthreadsExec::exec_all( Qthreads::instance() , & ParallelFor::exec , this ); } @@ -134,7 +134,7 @@ template< class FunctorType , class ReducerType , class ... Traits > class ParallelReduce< FunctorType , Kokkos::RangePolicy< Traits ... > , ReducerType - , Kokkos::Qthread + , Kokkos::Qthreads > { private: @@ -186,7 +186,7 @@ private: } } - static void exec( QthreadExec & exec , const void * arg ) + static void exec( QthreadsExec & exec , const void * arg ) { const ParallelReduce & self = * ((const ParallelReduce *) arg ); @@ -205,10 +205,10 @@ public: inline void execute() const { - QthreadExec::resize_worker_scratch( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) , 0 ); - Impl::QthreadExec::exec_all( Qthread::instance() , & ParallelReduce::exec , this ); + QthreadsExec::resize_worker_scratch( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) , 0 ); + Impl::QthreadsExec::exec_all( Qthreads::instance() , & ParallelReduce::exec , this ); - const pointer_type data = (pointer_type) QthreadExec::exec_all_reduce_result(); + const pointer_type data = (pointer_type) QthreadsExec::exec_all_reduce_result(); Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTag >::final( ReducerConditional::select(m_functor , m_reducer) , data ); @@ -246,11 +246,11 @@ public: template< class FunctorType , class ... Properties > class ParallelFor< FunctorType , TeamPolicy< Properties ... > - , Kokkos::Qthread > + , Kokkos::Qthreads > { private: - typedef Kokkos::Impl::TeamPolicyInternal< Kokkos::Qthread , Properties ... > Policy ; + typedef Kokkos::Impl::TeamPolicyInternal< Kokkos::Qthreads , Properties ... > Policy ; typedef typename Policy::member_type Member ; typedef typename Policy::work_tag WorkTag ; @@ -282,7 +282,7 @@ private: } } - static void exec( QthreadExec & exec , const void * arg ) + static void exec( QthreadsExec & exec , const void * arg ) { const ParallelFor & self = * ((const ParallelFor *) arg ); @@ -297,10 +297,10 @@ public: inline void execute() const { - QthreadExec::resize_worker_scratch + QthreadsExec::resize_worker_scratch ( /* reduction memory */ 0 , /* team shared memory */ FunctorTeamShmemSize< FunctorType >::value( m_functor , m_policy.team_size() ) ); - Impl::QthreadExec::exec_all( Qthread::instance() , & ParallelFor::exec , this ); + Impl::QthreadsExec::exec_all( Qthreads::instance() , & ParallelFor::exec , this ); } ParallelFor( const FunctorType & arg_functor , @@ -316,12 +316,12 @@ template< class FunctorType , class ReducerType , class ... Properties > class ParallelReduce< FunctorType , TeamPolicy< Properties... > , ReducerType - , Kokkos::Qthread + , Kokkos::Qthreads > { private: - typedef Kokkos::Impl::TeamPolicyInternal< Kokkos::Qthread , Properties ... > Policy ; + typedef Kokkos::Impl::TeamPolicyInternal< Kokkos::Qthreads , Properties ... > Policy ; typedef typename Policy::work_tag WorkTag ; typedef typename Policy::member_type Member ; @@ -365,7 +365,7 @@ private: } } - static void exec( QthreadExec & exec , const void * arg ) + static void exec( QthreadsExec & exec , const void * arg ) { const ParallelReduce & self = * ((const ParallelReduce *) arg ); @@ -383,13 +383,13 @@ public: inline void execute() const { - QthreadExec::resize_worker_scratch + QthreadsExec::resize_worker_scratch ( /* reduction memory */ ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) , /* team shared memory */ FunctorTeamShmemSize< FunctorType >::value( m_functor , m_policy.team_size() ) ); - Impl::QthreadExec::exec_all( Qthread::instance() , & ParallelReduce::exec , this ); + Impl::QthreadsExec::exec_all( Qthreads::instance() , & ParallelReduce::exec , this ); - const pointer_type data = (pointer_type) QthreadExec::exec_all_reduce_result(); + const pointer_type data = (pointer_type) QthreadsExec::exec_all_reduce_result(); Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTag >::final( ReducerConditional::select(m_functor , m_reducer), data ); @@ -429,7 +429,7 @@ public: template< class FunctorType , class ... Traits > class ParallelScan< FunctorType , Kokkos::RangePolicy< Traits ... > - , Kokkos::Qthread + , Kokkos::Qthreads > { private: @@ -474,7 +474,7 @@ private: } } - static void exec( QthreadExec & exec , const void * arg ) + static void exec( QthreadsExec & exec , const void * arg ) { const ParallelScan & self = * ((const ParallelScan *) arg ); @@ -497,8 +497,8 @@ public: inline void execute() const { - QthreadExec::resize_worker_scratch( ValueTraits::value_size( m_functor ) , 0 ); - Impl::QthreadExec::exec_all( Qthread::instance() , & ParallelScan::exec , this ); + QthreadsExec::resize_worker_scratch( ValueTraits::value_size( m_functor ) , 0 ); + Impl::QthreadsExec::exec_all( Qthreads::instance() , & ParallelScan::exec , this ); } ParallelScan( const FunctorType & arg_functor @@ -521,37 +521,37 @@ namespace Kokkos { template< typename iType > KOKKOS_INLINE_FUNCTION -Impl::TeamThreadRangeBoundariesStruct< iType, Impl::QthreadTeamPolicyMember > -TeamThreadRange( const Impl::QthreadTeamPolicyMember& thread, const iType& count ) +Impl::TeamThreadRangeBoundariesStruct< iType, Impl::QthreadsTeamPolicyMember > +TeamThreadRange( const Impl::QthreadsTeamPolicyMember& thread, const iType& count ) { - return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::QthreadTeamPolicyMember >( thread, count ); + return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::QthreadsTeamPolicyMember >( thread, count ); } template< typename iType1, typename iType2 > KOKKOS_INLINE_FUNCTION Impl::TeamThreadRangeBoundariesStruct< typename std::common_type< iType1, iType2 >::type, - Impl::QthreadTeamPolicyMember > -TeamThreadRange( const Impl::QthreadTeamPolicyMember& thread, const iType1 & begin, const iType2 & end ) + Impl::QthreadsTeamPolicyMember > +TeamThreadRange( const Impl::QthreadsTeamPolicyMember& thread, const iType1 & begin, const iType2 & end ) { typedef typename std::common_type< iType1, iType2 >::type iType; - return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::QthreadTeamPolicyMember >( thread, iType(begin), iType(end) ); + return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::QthreadsTeamPolicyMember >( thread, iType(begin), iType(end) ); } template KOKKOS_INLINE_FUNCTION -Impl::ThreadVectorRangeBoundariesStruct - ThreadVectorRange(const Impl::QthreadTeamPolicyMember& thread, const iType& count) { - return Impl::ThreadVectorRangeBoundariesStruct(thread,count); +Impl::ThreadVectorRangeBoundariesStruct + ThreadVectorRange(const Impl::QthreadsTeamPolicyMember& thread, const iType& count) { + return Impl::ThreadVectorRangeBoundariesStruct(thread,count); } KOKKOS_INLINE_FUNCTION -Impl::ThreadSingleStruct PerTeam(const Impl::QthreadTeamPolicyMember& thread) { - return Impl::ThreadSingleStruct(thread); +Impl::ThreadSingleStruct PerTeam(const Impl::QthreadsTeamPolicyMember& thread) { + return Impl::ThreadSingleStruct(thread); } KOKKOS_INLINE_FUNCTION -Impl::VectorSingleStruct PerThread(const Impl::QthreadTeamPolicyMember& thread) { - return Impl::VectorSingleStruct(thread); +Impl::VectorSingleStruct PerThread(const Impl::QthreadsTeamPolicyMember& thread) { + return Impl::VectorSingleStruct(thread); } /** \brief Inter-thread parallel_for. Executes lambda(iType i) for each i=0..N-1. @@ -560,7 +560,7 @@ Impl::VectorSingleStruct PerThread(const Impl::Qt * This functionality requires C++11 support.*/ template KOKKOS_INLINE_FUNCTION -void parallel_for(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, const Lambda& lambda) { +void parallel_for(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, const Lambda& lambda) { for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) lambda(i); } @@ -571,7 +571,7 @@ void parallel_for(const Impl::TeamThreadRangeBoundariesStruct KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, +void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, const Lambda & lambda, ValueType& result) { result = ValueType(); @@ -595,7 +595,7 @@ void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, +void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct& loop_boundaries, const Lambda & lambda, const JoinType& join, ValueType& init_result) { ValueType result = init_result; @@ -615,7 +615,7 @@ void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct KOKKOS_INLINE_FUNCTION -void parallel_for(const Impl::ThreadVectorRangeBoundariesStruct& +void parallel_for(const Impl::ThreadVectorRangeBoundariesStruct& loop_boundaries, const Lambda& lambda) { #ifdef KOKKOS_ENABLE_PRAGMA_IVDEP #pragma ivdep @@ -630,7 +630,7 @@ void parallel_for(const Impl::ThreadVectorRangeBoundariesStruct KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct& +void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct& loop_boundaries, const Lambda & lambda, ValueType& result) { result = ValueType(); #ifdef KOKKOS_ENABLE_PRAGMA_IVDEP @@ -652,7 +652,7 @@ void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct KOKKOS_INLINE_FUNCTION -void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct& +void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct& loop_boundaries, const Lambda & lambda, const JoinType& join, ValueType& init_result) { ValueType result = init_result; @@ -679,7 +679,7 @@ void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct KOKKOS_INLINE_FUNCTION -void parallel_scan(const Impl::ThreadVectorRangeBoundariesStruct& +void parallel_scan(const Impl::ThreadVectorRangeBoundariesStruct& loop_boundaries, const FunctorType & lambda) { typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ; @@ -697,25 +697,25 @@ void parallel_scan(const Impl::ThreadVectorRangeBoundariesStruct KOKKOS_INLINE_FUNCTION -void single(const Impl::VectorSingleStruct& single_struct, const FunctorType& lambda) { +void single(const Impl::VectorSingleStruct& single_struct, const FunctorType& lambda) { lambda(); } template KOKKOS_INLINE_FUNCTION -void single(const Impl::ThreadSingleStruct& single_struct, const FunctorType& lambda) { +void single(const Impl::ThreadSingleStruct& single_struct, const FunctorType& lambda) { if(single_struct.team_member.team_rank()==0) lambda(); } template KOKKOS_INLINE_FUNCTION -void single(const Impl::VectorSingleStruct& single_struct, const FunctorType& lambda, ValueType& val) { +void single(const Impl::VectorSingleStruct& single_struct, const FunctorType& lambda, ValueType& val) { lambda(val); } template KOKKOS_INLINE_FUNCTION -void single(const Impl::ThreadSingleStruct& single_struct, const FunctorType& lambda, ValueType& val) { +void single(const Impl::ThreadSingleStruct& single_struct, const FunctorType& lambda, ValueType& val) { if(single_struct.team_member.team_rank()==0) { lambda(val); } @@ -724,4 +724,4 @@ void single(const Impl::ThreadSingleStruct& singl } // namespace Kokkos -#endif /* #define KOKKOS_QTHREAD_PARALLEL_HPP */ +#endif /* #define KOKKOS_QTHREADS_PARALLEL_HPP */ diff --git a/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_Task.cpp b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_Task.cpp new file mode 100644 index 0000000000..614a2c03f0 --- /dev/null +++ b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_Task.cpp @@ -0,0 +1,320 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +#if defined( KOKKOS_ENABLE_QTHREADS ) && defined( KOKKOS_ENABLE_TASKPOLICY ) + +#include + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { +namespace Impl { + +template class TaskQueue< Kokkos::Qthreads > ; + +//---------------------------------------------------------------------------- + +TaskExec< Kokkos::Qthreads >::TaskExec() + : m_self_exec( 0 ), + m_team_exec( 0 ), + m_sync_mask( 0 ), + m_sync_value( 0 ), + m_sync_step( 0 ), + m_group_rank( 0 ), + m_team_rank( 0 ), + m_team_size( 1 ) +{} + +TaskExec< Kokkos::Qthreads >:: +TaskExec( Kokkos::Impl::QthreadsExec & arg_exec, int const arg_team_size ) + : m_self_exec( & arg_exec ), + m_team_exec( arg_exec.pool_rev(arg_exec.pool_rank_rev() / arg_team_size) ), + m_sync_mask( 0 ), + m_sync_value( 0 ), + m_sync_step( 0 ), + m_group_rank( arg_exec.pool_rank_rev() / arg_team_size ), + m_team_rank( arg_exec.pool_rank_rev() % arg_team_size ), + m_team_size( arg_team_size ) +{ + // This team spans + // m_self_exec->pool_rev( team_size * group_rank ) + // m_self_exec->pool_rev( team_size * ( group_rank + 1 ) - 1 ) + + int64_t volatile * const sync = (int64_t *) m_self_exec->scratch_reduce(); + + sync[0] = int64_t(0) ; + sync[1] = int64_t(0) ; + + for ( int i = 0 ; i < m_team_size ; ++i ) { + m_sync_value |= int64_t(1) << (8*i); + m_sync_mask |= int64_t(3) << (8*i); + } + + Kokkos::memory_fence(); +} + +#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + +void TaskExec< Kokkos::Qthreads >::team_barrier() const +{ + if ( 1 < m_team_size ) { + + if ( m_team_exec->scratch_reduce_size() < int(2 * sizeof(int64_t)) ) { + Kokkos::abort("TaskQueue scratch_reduce memory too small"); + } + + // Use team shared memory to synchronize. + // Alternate memory locations between barriers to avoid a sequence + // of barriers overtaking one another. + + int64_t volatile * const sync = + ((int64_t *) m_team_exec->scratch_reduce()) + ( m_sync_step & 0x01 ); + + // This team member sets one byte within the sync variable + int8_t volatile * const sync_self = + ((int8_t *) sync) + m_team_rank ; + +#if 0 +fprintf( stdout, + "barrier group(%d) member(%d) step(%d) wait(%lx) : before(%lx)\n", + m_group_rank, + m_team_rank, + m_sync_step, + m_sync_value, + *sync + ); +fflush(stdout); +#endif + + *sync_self = int8_t( m_sync_value & 0x03 ); // signal arrival + + while ( m_sync_value != *sync ); // wait for team to arrive + +#if 0 +fprintf( stdout, + "barrier group(%d) member(%d) step(%d) wait(%lx) : after(%lx)\n", + m_group_rank, + m_team_rank, + m_sync_step, + m_sync_value, + *sync + ); +fflush(stdout); +#endif + + ++m_sync_step ; + + if ( 0 == ( 0x01 & m_sync_step ) ) { // Every other step + m_sync_value ^= m_sync_mask ; + if ( 1000 < m_sync_step ) m_sync_step = 0 ; + } + } +} + +#endif + +//---------------------------------------------------------------------------- + +void TaskQueueSpecialization< Kokkos::Qthreads >::execute + ( TaskQueue< Kokkos::Qthreads > * const queue ) +{ + using execution_space = Kokkos::Qthreads ; + using queue_type = TaskQueue< execution_space > ; + using task_root_type = TaskBase< execution_space, void, void > ; + using PoolExec = Kokkos::Impl::QthreadsExec ; + using Member = TaskExec< execution_space > ; + + task_root_type * const end = (task_root_type *) task_root_type::EndTag ; + + // Required: team_size <= 8 + + const int team_size = PoolExec::pool_size(2); // Threads per core + // const int team_size = PoolExec::pool_size(1); // Threads per NUMA + + if ( 8 < team_size ) { + Kokkos::abort("TaskQueue unsupported team size"); + } + +#pragma omp parallel + { + PoolExec & self = *PoolExec::get_thread_omp(); + + Member single_exec ; + Member team_exec( self, team_size ); + + // Team shared memory + task_root_type * volatile * const task_shared = + (task_root_type **) team_exec.m_team_exec->scratch_thread(); + +// Barrier across entire Qthreads thread pool to insure initialization +#pragma omp barrier + + // Loop until all queues are empty and no tasks in flight + + do { + + // Each team lead attempts to acquire either a thread team task + // or collection of single thread tasks for the team. + + if ( 0 == team_exec.team_rank() ) { + + task_root_type * tmp = + 0 < *((volatile int *) & queue->m_ready_count) ? end : 0 ; + + // Loop by priority and then type + for ( int i = 0 ; i < queue_type::NumQueue && end == tmp ; ++i ) { + for ( int j = 0 ; j < 2 && end == tmp ; ++j ) { + tmp = queue_type::pop_task( & queue->m_ready[i][j] ); + } + } + + *task_shared = tmp ; + + // Fence to be sure shared_task_array is stored + Kokkos::memory_fence(); + } + + // Whole team waits for every team member to reach this statement + team_exec.team_barrier(); + + Kokkos::memory_fence(); + + task_root_type * const task = *task_shared ; + +#if 0 +fprintf( stdout, + "\nexecute group(%d) member(%d) task_shared(0x%lx) task(0x%lx)\n", + team_exec.m_group_rank, + team_exec.m_team_rank, + uintptr_t(task_shared), + uintptr_t(task) + ); +fflush(stdout); +#endif + + if ( 0 == task ) break ; // 0 == m_ready_count + + if ( end == task ) { + team_exec.team_barrier(); + } + else if ( task_root_type::TaskTeam == task->m_task_type ) { + // Thread Team Task + (*task->m_apply)( task, & team_exec ); + + // The m_apply function performs a barrier + + if ( 0 == team_exec.team_rank() ) { + // team member #0 completes the task, which may delete the task + queue->complete( task ); + } + } + else { + // Single Thread Task + + if ( 0 == team_exec.team_rank() ) { + + (*task->m_apply)( task, & single_exec ); + + queue->complete( task ); + } + + // All team members wait for whole team to reach this statement. + // Not necessary to complete the task. + // Is necessary to prevent task_shared from being updated + // before it is read by all threads. + team_exec.team_barrier(); + } + } while(1); + } +// END #pragma omp parallel + +} + +void TaskQueueSpecialization< Kokkos::Qthreads >:: + iff_single_thread_recursive_execute + ( TaskQueue< Kokkos::Qthreads > * const queue ) +{ + using execution_space = Kokkos::Qthreads ; + using queue_type = TaskQueue< execution_space > ; + using task_root_type = TaskBase< execution_space, void, void > ; + using Member = TaskExec< execution_space > ; + + if ( 1 == omp_get_num_threads() ) { + + task_root_type * const end = (task_root_type *) task_root_type::EndTag ; + + Member single_exec ; + + task_root_type * task = end ; + + do { + + task = end ; + + // Loop by priority and then type + for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) { + for ( int j = 0 ; j < 2 && end == task ; ++j ) { + task = queue_type::pop_task( & queue->m_ready[i][j] ); + } + } + + if ( end == task ) break ; + + (*task->m_apply)( task, & single_exec ); + + queue->complete( task ); + + } while(1); + } +} + +}} /* namespace Kokkos::Impl */ + +//---------------------------------------------------------------------------- + +#endif /* #if defined( KOKKOS_ENABLE_QTHREADS ) && defined( KOKKOS_ENABLE_TASKPOLICY ) */ + + diff --git a/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_Task.hpp b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_Task.hpp new file mode 100644 index 0000000000..836452dde9 --- /dev/null +++ b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_Task.hpp @@ -0,0 +1,156 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef KOKKOS_IMPL_QTHREADS_TASK_HPP +#define KOKKOS_IMPL_QTHREADS_TASK_HPP + +#if defined( KOKKOS_ENABLE_TASKPOLICY ) + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { +namespace Impl { + +template<> +class TaskQueueSpecialization< Kokkos::Qthreads > +{ +public: + + using execution_space = Kokkos::Qthreads ; + using queue_type = Kokkos::Impl::TaskQueue< execution_space > ; + using task_base_type = Kokkos::Impl::TaskBase< execution_space, void, void > ; + + // Must specify memory space + using memory_space = Kokkos::HostSpace ; + + static + void iff_single_thread_recursive_execute( queue_type * const ); + + // Must provide task queue execution function + static void execute( queue_type * const ); + + // Must provide mechanism to set function pointer in + // execution space from the host process. + template< typename FunctorType > + static + void proc_set_apply( task_base_type::function_type * ptr ) + { + using TaskType = TaskBase< execution_space, + typename FunctorType::value_type, + FunctorType + > ; + *ptr = TaskType::apply ; + } +}; + +extern template class TaskQueue< Kokkos::Qthreads > ; + +//---------------------------------------------------------------------------- + +template<> +class TaskExec< Kokkos::Qthreads > +{ +private: + + TaskExec( TaskExec && ) = delete ; + TaskExec( TaskExec const & ) = delete ; + TaskExec & operator = ( TaskExec && ) = delete ; + TaskExec & operator = ( TaskExec const & ) = delete ; + + + using PoolExec = Kokkos::Impl::QthreadsExec ; + + friend class Kokkos::Impl::TaskQueue< Kokkos::Qthreads > ; + friend class Kokkos::Impl::TaskQueueSpecialization< Kokkos::Qthreads > ; + + PoolExec * const m_self_exec ; ///< This thread's thread pool data structure + PoolExec * const m_team_exec ; ///< Team thread's thread pool data structure + int64_t m_sync_mask ; + int64_t mutable m_sync_value ; + int mutable m_sync_step ; + int m_group_rank ; ///< Which "team" subset of thread pool + int m_team_rank ; ///< Which thread within a team + int m_team_size ; + + TaskExec(); + TaskExec( PoolExec & arg_exec, int arg_team_size ); + +public: + +#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + void * team_shared() const + { return m_team_exec ? m_team_exec->scratch_thread() : (void*) 0 ; } + + int team_shared_size() const + { return m_team_exec ? m_team_exec->scratch_thread_size() : 0 ; } + + /**\brief Whole team enters this function call + * before any teeam member returns from + * this function call. + */ + void team_barrier() const ; +#else + KOKKOS_INLINE_FUNCTION void team_barrier() const {} + KOKKOS_INLINE_FUNCTION void * team_shared() const { return 0 ; } + KOKKOS_INLINE_FUNCTION int team_shared_size() const { return 0 ; } +#endif + + KOKKOS_INLINE_FUNCTION + int team_rank() const { return m_team_rank ; } + + KOKKOS_INLINE_FUNCTION + int team_size() const { return m_team_size ; } +}; + +}} /* namespace Kokkos::Impl */ + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +#endif /* #if defined( KOKKOS_ENABLE_TASKPOLICY ) */ +#endif /* #ifndef KOKKOS_IMPL_QTHREADS_TASK_HPP */ + diff --git a/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.cpp b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskPolicy.cpp.old similarity index 91% rename from lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.cpp rename to lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskPolicy.cpp.old index 50444177ce..aa159cff6a 100644 --- a/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.cpp +++ b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskPolicy.cpp.old @@ -41,11 +41,11 @@ //@HEADER */ -// Experimental unified task-data parallel manycore LDRD +// Experimental unified task-data parallel manycore LDRD. #include -#if defined( KOKKOS_ENABLE_QTHREAD ) +#if defined( KOKKOS_ENABLE_QTHREADS ) #include @@ -56,17 +56,15 @@ #include #include -#include +#include #if defined( KOKKOS_ENABLE_TASKDAG ) -//---------------------------------------------------------------------------- - namespace Kokkos { namespace Experimental { namespace Impl { -typedef TaskMember< Kokkos::Qthread , void , void > Task ; +typedef TaskMember< Kokkos::Qthreads , void , void > Task ; namespace { @@ -173,16 +171,16 @@ Task::TaskMember( const function_dealloc_type arg_dealloc void Task::throw_error_add_dependence() const { - std::cerr << "TaskMember< Qthread >::add_dependence ERROR" + std::cerr << "TaskMember< Qthreads >::add_dependence ERROR" << " state(" << m_state << ")" << " dep_size(" << m_dep_size << ")" << std::endl ; - throw std::runtime_error("TaskMember< Qthread >::add_dependence ERROR"); + throw std::runtime_error("TaskMember< Qthreads >::add_dependence ERROR"); } void Task::throw_error_verify_type() { - throw std::runtime_error("TaskMember< Qthread >::verify_type ERROR"); + throw std::runtime_error("TaskMember< Qthreads >::verify_type ERROR"); } //---------------------------------------------------------------------------- @@ -190,7 +188,7 @@ void Task::throw_error_verify_type() #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) void Task::assign( Task ** const lhs , Task * rhs , const bool no_throw ) { - static const char msg_error_header[] = "Kokkos::Impl::TaskManager::assign ERROR" ; + static const char msg_error_header[] = "Kokkos::Impl::TaskManager::assign ERROR" ; static const char msg_error_count[] = ": negative reference count" ; static const char msg_error_complete[] = ": destroy task that is not complete" ; static const char msg_error_dependences[] = ": destroy task that has dependences" ; @@ -294,7 +292,7 @@ fflush(stdout); assign( & m_dep[i] , 0 ); } - // Set qthread FEB to full so that dependent tasks are allowed to execute. + // Set Qthreads FEB to full so that dependent tasks are allowed to execute. // This 'task' may be deleted immediately following this function call. qthread_fill( & m_qfeb ); @@ -319,10 +317,10 @@ aligned_t Task::qthread_func( void * arg ) ); if ( task->m_apply_team && ! task->m_apply_single ) { - Kokkos::Impl::QthreadTeamPolicyMember::TaskTeam task_team_tag ; + Kokkos::Impl::QthreadsTeamPolicyMember::TaskTeam task_team_tag ; // Initialize team size and rank with shephered info - Kokkos::Impl::QthreadTeamPolicyMember member( task_team_tag ); + Kokkos::Impl::QthreadsTeamPolicyMember member( task_team_tag ); (*task->m_apply_team)( task , member ); @@ -344,7 +342,7 @@ fflush(stdout); } else if ( task->m_apply_team && task->m_apply_single == reinterpret_cast(1) ) { // Team hard-wired to one, no cloning - Kokkos::Impl::QthreadTeamPolicyMember member ; + Kokkos::Impl::QthreadsTeamPolicyMember member ; (*task->m_apply_team)( task , member ); task->closeout(); } @@ -384,8 +382,8 @@ void Task::schedule() // Increment active task count before spawning. Kokkos::atomic_increment( m_active_count ); - // spawn in qthread. must malloc the precondition array and give to qthread. - // qthread will eventually free this allocation so memory will not be leaked. + // spawn in Qthreads. must malloc the precondition array and give to Qthreads. + // Qthreads will eventually free this allocation so memory will not be leaked. // concern with thread safety of malloc, does this need to be guarded? aligned_t ** qprecon = (aligned_t **) malloc( ( m_dep_size + 1 ) * sizeof(aligned_t *) ); @@ -393,7 +391,7 @@ void Task::schedule() qprecon[0] = reinterpret_cast( uintptr_t(m_dep_size) ); for ( int i = 0 ; i < m_dep_size ; ++i ) { - qprecon[i+1] = & m_dep[i]->m_qfeb ; // Qthread precondition flag + qprecon[i+1] = & m_dep[i]->m_qfeb ; // Qthreads precondition flag } if ( m_apply_team && ! m_apply_single ) { @@ -446,7 +444,7 @@ fflush(stdout); namespace Kokkos { namespace Experimental { -TaskPolicy< Kokkos::Qthread >:: +TaskPolicy< Kokkos::Qthreads >:: TaskPolicy ( const unsigned /* arg_task_max_count */ , const unsigned /* arg_task_max_size */ @@ -462,7 +460,7 @@ TaskPolicy if ( m_team_size != 1 && m_team_size != num_worker_per_shepherd ) { std::ostringstream msg ; - msg << "Kokkos::Experimental::TaskPolicy< Kokkos::Qthread >( " + msg << "Kokkos::Experimental::TaskPolicy< Kokkos::Qthreads >( " << "default_depedence = " << arg_task_default_dependence_capacity << " , team_size = " << arg_task_team_size << " ) ERROR, valid team_size arguments are { (omitted) , 1 , " << num_worker_per_shepherd << " }" ; @@ -470,14 +468,14 @@ TaskPolicy } } -TaskPolicy< Kokkos::Qthread >::member_type & -TaskPolicy< Kokkos::Qthread >::member_single() +TaskPolicy< Kokkos::Qthreads >::member_type & +TaskPolicy< Kokkos::Qthreads >::member_single() { static member_type s ; return s ; } -void wait( Kokkos::Experimental::TaskPolicy< Kokkos::Qthread > & policy ) +void wait( Kokkos::Experimental::TaskPolicy< Kokkos::Qthreads > & policy ) { volatile int * const active_task_count = & policy.m_active_count ; while ( *active_task_count ) qthread_yield(); @@ -486,6 +484,5 @@ void wait( Kokkos::Experimental::TaskPolicy< Kokkos::Qthread > & policy ) } // namespace Experimental } // namespace Kokkos -#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ -#endif /* #if defined( KOKKOS_ENABLE_QTHREAD ) */ - +#endif // #if defined( KOKKOS_ENABLE_TASKDAG ) +#endif // #if defined( KOKKOS_ENABLE_QTHREADS ) diff --git a/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.hpp b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskPolicy.hpp.old similarity index 90% rename from lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.hpp rename to lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskPolicy.hpp.old index 565dbf7e61..1e5a4dc593 100644 --- a/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.hpp +++ b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskPolicy.hpp.old @@ -43,15 +43,15 @@ // Experimental unified task-data parallel manycore LDRD -#ifndef KOKKOS_QTHREAD_TASKSCHEDULER_HPP -#define KOKKOS_QTHREAD_TASKSCHEDULER_HPP +#ifndef KOKKOS_QTHREADS_TASKSCHEDULER_HPP +#define KOKKOS_QTHREADS_TASKSCHEDULER_HPP #include #include #include //---------------------------------------------------------------------------- -// Defines to enable experimental Qthread functionality +// Defines to enable experimental Qthreads functionality #define QTHREAD_LOCAL_PRIORITY #define CLONED_TASKS @@ -63,7 +63,7 @@ //---------------------------------------------------------------------------- -#include +#include #include #include @@ -78,13 +78,13 @@ namespace Experimental { namespace Impl { template<> -class TaskMember< Kokkos::Qthread , void , void > +class TaskMember< Kokkos::Qthreads , void , void > { public: typedef TaskMember * (* function_verify_type) ( TaskMember * ); typedef void (* function_single_type) ( TaskMember * ); - typedef void (* function_team_type) ( TaskMember * , Kokkos::Impl::QthreadTeamPolicyMember & ); + typedef void (* function_team_type) ( TaskMember * , Kokkos::Impl::QthreadsTeamPolicyMember & ); typedef void (* function_dealloc_type)( TaskMember * ); private: @@ -94,7 +94,7 @@ private: const function_single_type m_apply_single ; ///< Apply function const function_team_type m_apply_team ; ///< Apply function int volatile * const m_active_count ; ///< Count of active tasks on this policy - aligned_t m_qfeb ; ///< Qthread full/empty bit + aligned_t m_qfeb ; ///< Qthreads full/empty bit TaskMember ** const m_dep ; ///< Dependences const int m_dep_capacity ; ///< Capacity of dependences int m_dep_size ; ///< Actual count of dependences @@ -129,7 +129,7 @@ protected : ~TaskMember(); - // Used by TaskMember< Qthread , ResultType , void > + // Used by TaskMember< Qthreads , ResultType , void > TaskMember( const function_verify_type arg_verify , const function_dealloc_type arg_dealloc , const function_single_type arg_apply_single @@ -139,7 +139,7 @@ protected : , const unsigned arg_dependence_capacity ); - // Used for TaskMember< Qthread , void , void > + // Used for TaskMember< Qthreads , void , void > TaskMember( const function_dealloc_type arg_dealloc , const function_single_type arg_apply_single , const function_team_type arg_apply_team @@ -175,15 +175,15 @@ public: /* Inheritence Requirements on task types: * typedef FunctorType::value_type value_type ; * class DerivedTaskType - * : public TaskMember< Qthread , value_type , FunctorType > + * : public TaskMember< Qthreads , value_type , FunctorType > * { ... }; - * class TaskMember< Qthread , value_type , FunctorType > - * : public TaskMember< Qthread , value_type , void > + * class TaskMember< Qthreads , value_type , FunctorType > + * : public TaskMember< Qthreads , value_type , void > * , public Functor * { ... }; * If value_type != void - * class TaskMember< Qthread , value_type , void > - * : public TaskMember< Qthread , void , void > + * class TaskMember< Qthreads , value_type , void > + * : public TaskMember< Qthreads , void , void > * * Allocate space for DerivedTaskType followed by TaskMember*[ dependence_capacity ] * @@ -300,10 +300,10 @@ public: KOKKOS_INLINE_FUNCTION static void apply_single( typename std::enable_if< ! std::is_same< ResultType , void >::value , TaskMember * >::type t ) { - typedef TaskMember< Kokkos::Qthread , ResultType , FunctorType > derived_type ; + typedef TaskMember< Kokkos::Qthreads , ResultType , FunctorType > derived_type ; - // TaskMember< Kokkos::Qthread , ResultType , FunctorType > - // : public TaskMember< Kokkos::Qthread , ResultType , void > + // TaskMember< Kokkos::Qthreads , ResultType , FunctorType > + // : public TaskMember< Kokkos::Qthreads , ResultType , void > // , public FunctorType // { ... }; @@ -316,10 +316,10 @@ public: KOKKOS_INLINE_FUNCTION static void apply_single( typename std::enable_if< std::is_same< ResultType , void >::value , TaskMember * >::type t ) { - typedef TaskMember< Kokkos::Qthread , ResultType , FunctorType > derived_type ; + typedef TaskMember< Kokkos::Qthreads , ResultType , FunctorType > derived_type ; - // TaskMember< Kokkos::Qthread , ResultType , FunctorType > - // : public TaskMember< Kokkos::Qthread , ResultType , void > + // TaskMember< Kokkos::Qthreads , ResultType , FunctorType > + // : public TaskMember< Kokkos::Qthreads , ResultType , void > // , public FunctorType // { ... }; @@ -333,9 +333,9 @@ public: template< class FunctorType , class ResultType > KOKKOS_INLINE_FUNCTION static void apply_team( typename std::enable_if< ! std::is_same< ResultType , void >::value , TaskMember * >::type t - , Kokkos::Impl::QthreadTeamPolicyMember & member ) + , Kokkos::Impl::QthreadsTeamPolicyMember & member ) { - typedef TaskMember< Kokkos::Qthread , ResultType , FunctorType > derived_type ; + typedef TaskMember< Kokkos::Qthreads , ResultType , FunctorType > derived_type ; derived_type & m = * static_cast< derived_type * >( t ); @@ -345,9 +345,9 @@ public: template< class FunctorType , class ResultType > KOKKOS_INLINE_FUNCTION static void apply_team( typename std::enable_if< std::is_same< ResultType , void >::value , TaskMember * >::type t - , Kokkos::Impl::QthreadTeamPolicyMember & member ) + , Kokkos::Impl::QthreadsTeamPolicyMember & member ) { - typedef TaskMember< Kokkos::Qthread , ResultType , FunctorType > derived_type ; + typedef TaskMember< Kokkos::Qthreads , ResultType , FunctorType > derived_type ; derived_type & m = * static_cast< derived_type * >( t ); @@ -356,7 +356,7 @@ public: }; //---------------------------------------------------------------------------- -/** \brief Base class for tasks with a result value in the Qthread execution space. +/** \brief Base class for tasks with a result value in the Qthreads execution space. * * The FunctorType must be void because this class is accessed by the * Future class for the task and result value. @@ -365,8 +365,8 @@ public: * can correctly static_cast from the 'root class' to this class. */ template < class ResultType > -class TaskMember< Kokkos::Qthread , ResultType , void > - : public TaskMember< Kokkos::Qthread , void , void > +class TaskMember< Kokkos::Qthreads , ResultType , void > + : public TaskMember< Kokkos::Qthreads , void , void > { public: @@ -379,7 +379,7 @@ public: protected: - typedef TaskMember< Kokkos::Qthread , void , void > task_root_type ; + typedef TaskMember< Kokkos::Qthreads , void , void > task_root_type ; typedef task_root_type::function_dealloc_type function_dealloc_type ; typedef task_root_type::function_single_type function_single_type ; typedef task_root_type::function_team_type function_team_type ; @@ -404,16 +404,16 @@ protected: }; template< class ResultType , class FunctorType > -class TaskMember< Kokkos::Qthread , ResultType , FunctorType > - : public TaskMember< Kokkos::Qthread , ResultType , void > +class TaskMember< Kokkos::Qthreads , ResultType , FunctorType > + : public TaskMember< Kokkos::Qthreads , ResultType , void > , public FunctorType { public: typedef FunctorType functor_type ; - typedef TaskMember< Kokkos::Qthread , void , void > task_root_type ; - typedef TaskMember< Kokkos::Qthread , ResultType , void > task_base_type ; + typedef TaskMember< Kokkos::Qthreads , void , void > task_root_type ; + typedef TaskMember< Kokkos::Qthreads , ResultType , void > task_base_type ; typedef task_root_type::function_dealloc_type function_dealloc_type ; typedef task_root_type::function_single_type function_single_type ; typedef task_root_type::function_team_type function_team_type ; @@ -447,16 +447,16 @@ public: namespace Kokkos { namespace Experimental { -void wait( TaskPolicy< Kokkos::Qthread > & ); +void wait( TaskPolicy< Kokkos::Qthreads > & ); template<> -class TaskPolicy< Kokkos::Qthread > +class TaskPolicy< Kokkos::Qthreads > { public: - typedef Kokkos::Qthread execution_space ; + typedef Kokkos::Qthreads execution_space ; typedef TaskPolicy execution_policy ; - typedef Kokkos::Impl::QthreadTeamPolicyMember member_type ; + typedef Kokkos::Impl::QthreadsTeamPolicyMember member_type ; private: @@ -650,7 +650,7 @@ public: static member_type & member_single(); - friend void wait( TaskPolicy< Kokkos::Qthread > & ); + friend void wait( TaskPolicy< Kokkos::Qthreads > & ); }; } /* namespace Experimental */ @@ -660,5 +660,5 @@ public: //---------------------------------------------------------------------------- #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ -#endif /* #define KOKKOS_QTHREAD_TASK_HPP */ +#endif /* #define KOKKOS_QTHREADS_TASK_HPP */ diff --git a/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskQueue.hpp b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskQueue.hpp new file mode 100644 index 0000000000..55235cd6d2 --- /dev/null +++ b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskQueue.hpp @@ -0,0 +1,319 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#if defined( KOKKOS_ENABLE_TASKPOLICY ) + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { +namespace Impl { + +/** \brief Manage task allocation, deallocation, and scheduling. + * + * Task execution is handled here directly for the Qthread implementation. + */ +template<> +class TaskQueue< Kokkos::Qthread > { +private: + + using execution_space = Kokkos::Qthread ; + using memory_space = Kokkos::HostSpace + using device_type = Kokkos::Device< execution_space, memory_space > ; + using memory_pool = Kokkos::Experimental::MemoryPool< device_type > ; + using task_root_type = Kokkos::Impl::TaskBase< execution_space, void, void > ; + + friend class Kokkos::TaskScheduler< execution_space > ; + + struct Destroy { + TaskQueue * m_queue ; + void destroy_shared_allocation(); + }; + + //---------------------------------------- + + enum : int { TASK_STATE_NULL = 0, ///< Does not exist + TASK_STATE_CONSTRUCTING = 1, ///< Is under construction + TASK_STATE_WAITING = 2, ///< Is waiting for execution + TASK_STATE_EXECUTING = 4, ///< Is executing + TASK_STATE_RESPAWN = 8, ///< Requested respawn + TASK_STATE_COMPLETE = 16 ///< Execution is complete + }; + + // Queue is organized as [ priority ][ type ] + + memory_pool m_memory ; + unsigned m_team_size ; // Number of threads in a team + long m_accum_alloc ; // Accumulated number of allocations + int m_count_alloc ; // Current number of allocations + int m_max_alloc ; // Maximum number of allocations + int m_ready_count ; // Number of ready or executing + + //---------------------------------------- + + ~TaskQueue(); + TaskQueue() = delete ; + TaskQueue( TaskQueue && ) = delete ; + TaskQueue( TaskQueue const & ) = delete ; + TaskQueue & operator = ( TaskQueue && ) = delete ; + TaskQueue & operator = ( TaskQueue const & ) = delete ; + + TaskQueue + ( const memory_space & arg_space, + unsigned const arg_memory_pool_capacity, + unsigned const arg_memory_pool_superblock_capacity_log2 + ); + + // Schedule a task + // Precondition: + // task is not executing + // task->m_next is the dependence or zero + // Postcondition: + // task->m_next is linked list membership + KOKKOS_FUNCTION + void schedule( task_root_type * const ); + + // Reschedule a task + // Precondition: + // task is in Executing state + // task->m_next == LockTag + // Postcondition: + // task is in Executing-Respawn state + // task->m_next == 0 (no dependence) + KOKKOS_FUNCTION + void reschedule( task_root_type * ); + + // Complete a task + // Precondition: + // task is not executing + // task->m_next == LockTag => task is complete + // task->m_next != LockTag => task is respawn + // Postcondition: + // task->m_wait == LockTag => task is complete + // task->m_wait != LockTag => task is waiting + KOKKOS_FUNCTION + void complete( task_root_type * ); + +public: + + // If and only if the execution space is a single thread + // then execute ready tasks. + KOKKOS_INLINE_FUNCTION + void iff_single_thread_recursive_execute() + { +#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + specialization::iff_single_thread_recursive_execute( this ); +#endif + } + + void execute() { specialization::execute( this ); } + + template< typename FunctorType > + void proc_set_apply( typename task_root_type::function_type * ptr ) + { + specialization::template proc_set_apply< FunctorType >( ptr ); + } + + // Assign task pointer with reference counting of assigned tasks + template< typename LV, typename RV > + KOKKOS_FUNCTION static + void assign( TaskBase< execution_space, LV, void > ** const lhs, + TaskBase< execution_space, RV, void > * const rhs ) + { + using task_lhs = TaskBase< execution_space, LV, void > ; +#if 0 + { + printf( "assign( 0x%lx { 0x%lx %d %d }, 0x%lx { 0x%lx %d %d } )\n", + uintptr_t( lhs ? *lhs : 0 ), + uintptr_t( lhs && *lhs ? (*lhs)->m_next : 0 ), + int( lhs && *lhs ? (*lhs)->m_task_type : 0 ), + int( lhs && *lhs ? (*lhs)->m_ref_count : 0 ), + uintptr_t(rhs), + uintptr_t( rhs ? rhs->m_next : 0 ), + int( rhs ? rhs->m_task_type : 0 ), + int( rhs ? rhs->m_ref_count : 0 ) + ); + fflush( stdout ); + } +#endif + + if ( *lhs ) + { + const int count = Kokkos::atomic_fetch_add( &((*lhs)->m_ref_count), -1 ); + + if ( ( 1 == count ) && ( (*lhs)->m_state == TASK_STATE_COMPLETE ) ) { + // Reference count is zero and task is complete, deallocate. + (*lhs)->m_queue->deallocate( *lhs, (*lhs)->m_alloc_size ); + } + else if ( count <= 1 ) { + Kokkos::abort("TaskScheduler task has negative reference count or is incomplete" ); + } + + // GEM: Should I check that there are no dependences here? Can the state + // be set to complete while there are still dependences? + } + + if ( rhs ) { Kokkos::atomic_fetch_add( &(rhs->m_ref_count), 1 ); } + + // Force write of *lhs + + *static_cast< task_lhs * volatile * >(lhs) = rhs ; + + Kokkos::memory_fence(); + } + + KOKKOS_FUNCTION + size_t allocate_block_size( size_t n ); ///< Actual block size allocated + + KOKKOS_FUNCTION + void * allocate( size_t n ); ///< Allocate from the memory pool + + KOKKOS_FUNCTION + void deallocate( void * p, size_t n ); ///< Deallocate to the memory pool +}; + +} /* namespace Impl */ +} /* namespace Kokkos */ + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { +namespace Impl { + +template<> +class TaskBase< Kokkos::Qthread, void, void > +{ +public: + + enum : int16_t { TaskTeam = TaskBase< void, void, void >::TaskTeam, + TaskSingle = TaskBase< void, void, void >::TaskSingle, + Aggregate = TaskBase< void, void, void >::Aggregate }; + + enum : uintptr_t { LockTag = TaskBase< void, void, void >::LockTag, + EndTag = TaskBase< void, void, void >::EndTag }; + + using execution_space = Kokkos::Qthread ; + using queue_type = TaskQueue< execution_space > ; + + template< typename > friend class Kokkos::TaskScheduler ; + + typedef void (* function_type) ( TaskBase *, void * ); + + // sizeof(TaskBase) == 48 + + function_type m_apply ; ///< Apply function pointer + queue_type * m_queue ; ///< Queue in which this task resides + TaskBase * m_dep ; ///< Dependence + int32_t m_ref_count ; ///< Reference count + int32_t m_alloc_size ; ///< Allocation size + int32_t m_dep_count ; ///< Aggregate's number of dependences + int16_t m_task_type ; ///< Type of task + int16_t m_priority ; ///< Priority of runnable task + aligned_t m_qfeb ; ///< Qthread full/empty bit + int m_state ; ///< State of the task + + TaskBase( TaskBase && ) = delete ; + TaskBase( const TaskBase & ) = delete ; + TaskBase & operator = ( TaskBase && ) = delete ; + TaskBase & operator = ( const TaskBase & ) = delete ; + + KOKKOS_INLINE_FUNCTION ~TaskBase() = default ; + + KOKKOS_INLINE_FUNCTION + constexpr TaskBase() noexcept + : m_apply(0), + m_queue(0), + m_dep(0), + m_ref_count(0), + m_alloc_size(0), + m_dep_count(0), + m_task_type( TaskSingle ), + m_priority( 1 /* TaskRegularPriority */ ), + m_qfeb(0), + m_state( queue_type::TASK_STATE_CONSTRUCTING ) + { + qthread_empty( & m_qfeb ); // Set to full when complete + } + + //---------------------------------------- + + static aligned_t qthread_func( void * arg ); + + KOKKOS_INLINE_FUNCTION + TaskBase ** aggregate_dependences() + { return reinterpret_cast( this + 1 ); } + + KOKKOS_INLINE_FUNCTION + void requested_respawn() + { return m_state == queue_type::TASK_STATE_RESPAWN; } + + KOKKOS_INLINE_FUNCTION + void add_dependence( TaskBase* dep ) + { + // Assign dependence to m_dep. It will be processed in the subsequent + // call to schedule. Error if the dependence is reset. + if ( 0 != Kokkos::atomic_exchange( & m_dep, dep ) ) { + Kokkos::abort("TaskScheduler ERROR: resetting task dependence"); + } + + if ( 0 != dep ) { + // The future may be destroyed upon returning from this call + // so increment reference count to track this assignment. + Kokkos::atomic_fetch_add( &(dep->m_ref_count), 1 ); + } + } + + using get_return_type = void ; + + KOKKOS_INLINE_FUNCTION + get_return_type get() const {} +}; + +} /* namespace Impl */ +} /* namespace Kokkos */ + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +#endif /* #if defined( KOKKOS_ENABLE_TASKPOLICY ) */ diff --git a/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskQueue_impl.hpp b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskQueue_impl.hpp new file mode 100644 index 0000000000..4a9190c731 --- /dev/null +++ b/lib/kokkos/core/src/Qthreads/Kokkos_Qthreads_TaskQueue_impl.hpp @@ -0,0 +1,436 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#if defined( KOKKOS_ENABLE_TASKPOLICY ) + +namespace Kokkos { +namespace Impl { + +//---------------------------------------------------------------------------- + +template< typename ExecSpace > +void TaskQueue< ExecSpace >::Destroy::destroy_shared_allocation() +{ + m_queue->~TaskQueue(); +} + +//---------------------------------------------------------------------------- + +template< typename ExecSpace > +TaskQueue< ExecSpace >::TaskQueue + ( const TaskQueue< ExecSpace >::memory_space & arg_space, + unsigned const arg_memory_pool_capacity, + unsigned const arg_memory_pool_superblock_capacity_log2 ) + : m_memory( arg_space, + arg_memory_pool_capacity, + arg_memory_pool_superblock_capacity_log2 ) + m_team_size( unsigned( qthread_num_workers_local(NO_SHEPHERD) ) ), + m_accum_alloc(0), + m_count_alloc(0), + m_max_alloc(0), + m_ready_count(0) +{} + +//---------------------------------------------------------------------------- + +template< typename ExecSpace > +TaskQueue< ExecSpace >::~TaskQueue() +{ + // Verify that ready count is zero. + if ( 0 != m_ready_count ) { + Kokkos::abort("TaskQueue::~TaskQueue ERROR: has ready or executing tasks"); + } +} + +//---------------------------------------------------------------------------- + +template< typename ExecSpace > +KOKKOS_FUNCTION +size_t TaskQueue< ExecSpace >::allocate_block_size( size_t n ) +{ + return m_memory.allocate_block_size( n ); +} + +//---------------------------------------------------------------------------- + +template< typename ExecSpace > +KOKKOS_FUNCTION +void * TaskQueue< ExecSpace >::allocate( size_t n ) +{ + void * const p = m_memory.allocate(n); + + if ( p ) { + Kokkos::atomic_increment( & m_accum_alloc ); + Kokkos::atomic_increment( & m_count_alloc ); + + if ( m_max_alloc < m_count_alloc ) m_max_alloc = m_count_alloc ; + } + + return p ; +} + +//---------------------------------------------------------------------------- + +template< typename ExecSpace > +KOKKOS_FUNCTION +void TaskQueue< ExecSpace >::deallocate( void * p, size_t n ) +{ + m_memory.deallocate( p, n ); + Kokkos::atomic_decrement( & m_count_alloc ); +} + +//---------------------------------------------------------------------------- + +template< typename ExecSpace > +KOKKOS_FUNCTION +void TaskQueue< ExecSpace >::schedule + ( TaskQueue< ExecSpace >::task_root_type * const task ) +{ +#if 0 + printf( "schedule( 0x%lx { %d %d %d }\n", + uintptr_t(task), + task->m_task_type, + task->m_priority, + task->m_ref_count ); +#endif + + // The task has been constructed and is waiting to be executed. + task->m_state = TASK_STATE_WAITING ; + + if ( task->m_task_type != task_root_type::Aggregate ) { + // Scheduling a single or team task. + + // Increment active task count before spawning. + Kokkos::atomic_increment( m_ready_count ); + + if ( task->m_dep == 0 ) { + // Schedule a task with no dependences. + + if ( task_root_type::TaskTeam == task->m_task_type && m_team_size > 1 ) { + // If more than one shepherd spawn on a shepherd other than this shepherd + const int num_shepherd = qthread_num_shepherds(); + const int this_shepherd = qthread_shep(); + int spawn_shepherd = ( this_shepherd + 1 ) % num_shepherd ; + +#if 0 + fprintf( stdout, + "worker(%d.%d) task 0x%.12lx spawning on shepherd(%d) clone(%d)\n", + qthread_shep(), + qthread_worker_local(NULL), + reinterpret_cast(this), + spawn_shepherd, + m_team_size - 1 + ); + fflush(stdout); +#endif + + qthread_spawn_cloneable( + & task_root_type::qthread_func, + task, + 0, + NULL, + 0, // no depenedences + 0, // dependences array + spawn_shepherd, + unsigned( QTHREAD_SPAWN_SIMPLE | QTHREAD_SPAWN_LOCAL_PRIORITY ), + m_team_size - 1 + ); + } + else { + qthread_spawn( + & task_root_type::qthread_func, + task, + 0, + NULL, + 0, // no depenedences + 0, // dependences array + NO_SHEPHERD, + QTHREAD_SPAWN_SIMPLE /* allows optimization for non-blocking task */ + ); + } + } + else if ( task->m_dep->m_task_type != task_root_type::Aggregate ) + // Malloc the precondition array to pass to qthread_spawn(). For + // non-aggregate tasks, it is a single pointer since there are no + // dependences. Qthreads will eventually free this allocation so memory will + // not be leaked. Is malloc thread-safe? Should this call be guarded? The + // memory can't be allocated from the pool allocator because Qthreads frees + // it using free(). + aligned_t ** qprecon = (aligned_t **) malloc( sizeof(aligned_t *) ); + + *qprecon = reinterpret_cast( uintptr_t(m_dep_size) ); + + if ( task->m_task_type == task_root_type::TaskTeam && m_team_size > 1) { + // If more than one shepherd spawn on a shepherd other than this shepherd + const int num_shepherd = qthread_num_shepherds(); + const int this_shepherd = qthread_shep(); + int spawn_shepherd = ( this_shepherd + 1 ) % num_shepherd ; + +#if 0 + fprintf( stdout, + "worker(%d.%d) task 0x%.12lx spawning on shepherd(%d) clone(%d)\n", + qthread_shep(), + qthread_worker_local(NULL), + reinterpret_cast(this), + spawn_shepherd, + m_team_size - 1 + ); + fflush(stdout); +#endif + + qthread_spawn_cloneable( + & Task::qthread_func, + this, + 0, + NULL, + m_dep_size, + qprecon, /* dependences */ + spawn_shepherd, + unsigned( QTHREAD_SPAWN_SIMPLE | QTHREAD_SPAWN_LOCAL_PRIORITY ), + m_team_size - 1 + ); + } + else { + qthread_spawn( + & Task::qthread_func, /* function */ + this, /* function argument */ + 0, + NULL, + m_dep_size, + qprecon, /* dependences */ + NO_SHEPHERD, + QTHREAD_SPAWN_SIMPLE /* allows optimization for non-blocking task */ + ); + } + } + else { + // GEM: How do I handle an aggregate (when_all) task? + } +} + +//---------------------------------------------------------------------------- + +template< typename ExecSpace > +KOKKOS_FUNCTION +void TaskQueue< ExecSpace >::reschedule( task_root_type * task ) +{ + // Precondition: + // task is in Executing state + // task->m_next == LockTag + // + // Postcondition: + // task is in Executing-Respawn state + // task->m_next == 0 (no dependence) + + task_root_type * const zero = (task_root_type *) 0 ; + task_root_type * const lock = (task_root_type *) task_root_type::LockTag ; + + if ( lock != Kokkos::atomic_exchange( & task->m_next, zero ) ) { + Kokkos::abort("TaskScheduler::respawn ERROR: already respawned"); + } +} + +//---------------------------------------------------------------------------- + +template< typename ExecSpace > +KOKKOS_FUNCTION +void TaskQueue< ExecSpace >::complete + ( TaskQueue< ExecSpace >::task_root_type * task ) +{ + // Complete a runnable task that has finished executing + // or a when_all task when all of its dependeneces are complete. + + task_root_type * const zero = (task_root_type *) 0 ; + task_root_type * const lock = (task_root_type *) task_root_type::LockTag ; + task_root_type * const end = (task_root_type *) task_root_type::EndTag ; + +#if 0 + printf( "complete( 0x%lx { 0x%lx 0x%lx %d %d %d }\n", + uintptr_t(task), + uintptr_t(task->m_wait), + uintptr_t(task->m_next), + task->m_task_type, + task->m_priority, + task->m_ref_count + ); + fflush( stdout ); +#endif + + const bool runnable = task_root_type::Aggregate != task->m_task_type ; + + //---------------------------------------- + + if ( runnable && lock != task->m_next ) { + // Is a runnable task has finished executing and requested respawn. + // Schedule the task for subsequent execution. + + schedule( task ); + } + //---------------------------------------- + else { + // Is either an aggregate or a runnable task that executed + // and did not respawn. Transition this task to complete. + + // If 'task' is an aggregate then any of the runnable tasks that + // it depends upon may be attempting to complete this 'task'. + // Must only transition a task once to complete status. + // This is controled by atomically locking the wait queue. + + // Stop other tasks from adding themselves to this task's wait queue + // by locking the head of this task's wait queue. + + task_root_type * x = Kokkos::atomic_exchange( & task->m_wait, lock ); + + if ( x != (task_root_type *) lock ) { + + // This thread has transitioned this 'task' to complete. + // 'task' is no longer in a queue and is not executing + // so decrement the reference count from 'task's creation. + // If no other references to this 'task' then it will be deleted. + + TaskQueue::assign( & task, zero ); + + // This thread has exclusive access to the wait list so + // the concurrency-safe pop_task function is not needed. + // Schedule the tasks that have been waiting on the input 'task', + // which may have been deleted. + + while ( x != end ) { + + // Set x->m_next = zero <= no dependence + + task_root_type * const next = + (task_root_type *) Kokkos::atomic_exchange( & x->m_next, zero ); + + schedule( x ); + + x = next ; + } + } + } + + if ( runnable ) { + // A runnable task was popped from a ready queue and executed. + // If respawned into a ready queue then the ready count was incremented + // so decrement whether respawned or not. + Kokkos::atomic_decrement( & m_ready_count ); + } +} + +//---------------------------------------------------------------------------- + +template<> +aligned_t +TaskBase< Kokkos::Qthreads, void, void >::qthread_func( void * arg ) +{ + using execution_space = Kokkos::Qthreads ; + using task_root_type = TaskBase< execution_space , void , void > ; + using Member = Kokkos::Impl::QthreadsTeamPolicyMember; + + task_root_type * const task = reinterpret_cast< task_root_type * >( arg ); + + // First member of the team change state to executing. + // Use compare-exchange to avoid race condition with a respawn. + Kokkos::atomic_compare_exchange_strong( & task->m_state, + queue_type::TASK_STATE_WAITING, + queue_type::TASK_STATE_EXECUTING + ); + + if ( task_root_type::TaskTeam == task->m_task_type ) + { + if ( 1 < task->m_queue->m_team_size ) { + // Team task with team size of more than 1. + Member::TaskTeam task_team_tag ; + + // Initialize team size and rank with shephered info + Member member( task_team_tag ); + + (*task->m_apply)( task , & member ); + +#if 0 + fprintf( stdout, + "worker(%d.%d) task 0x%.12lx executed by member(%d:%d)\n", + qthread_shep(), + qthread_worker_local(NULL), + reinterpret_cast(task), + member.team_rank(), + member.team_size() + ); + fflush(stdout); +#endif + + member.team_barrier(); + if ( member.team_rank() == 0 ) task->closeout(); + member.team_barrier(); + } + else { + // Team task with team size of 1. + Member member ; + (*task->m_apply)( task , & member ); + task->closeout(); + } + } + else { + (*task->m_apply)( task ); + task->closeout(); + } + +#if 0 +fprintf( stdout + , "worker(%d.%d) task 0x%.12lx return\n" + , qthread_shep() + , qthread_worker_local(NULL) + , reinterpret_cast(task) + ); +fflush(stdout); +#endif + + return 0 ; +} + +} /* namespace Impl */ +} /* namespace Kokkos */ + + +#endif /* #if defined( KOKKOS_ENABLE_TASKPOLICY ) */ + diff --git a/lib/kokkos/core/src/Qthread/README b/lib/kokkos/core/src/Qthreads/README similarity index 99% rename from lib/kokkos/core/src/Qthread/README rename to lib/kokkos/core/src/Qthreads/README index 6e6c86a9ef..e35b1f698e 100644 --- a/lib/kokkos/core/src/Qthread/README +++ b/lib/kokkos/core/src/Qthreads/README @@ -22,4 +22,3 @@ sh autogen.sh # install make install - diff --git a/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp b/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp index 0f69be9ed4..b1f53489f4 100644 --- a/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp +++ b/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp @@ -264,7 +264,7 @@ void ThreadsExec::execute_sleep( ThreadsExec & exec , const void * ) const int rank_rev = exec.m_pool_size - ( exec.m_pool_rank + 1 ); for ( int i = 0 ; i < n ; ++i ) { - Impl::spinwait( exec.m_pool_base[ rank_rev + (1<m_pool_state , ThreadsExec::Active ); + Impl::spinwait_while_equal( exec.m_pool_base[ rank_rev + (1<m_pool_state , ThreadsExec::Active ); } exec.m_pool_state = ThreadsExec::Inactive ; @@ -308,7 +308,7 @@ void ThreadsExec::fence() { if ( s_thread_pool_size[0] ) { // Wait for the root thread to complete: - Impl::spinwait( s_threads_exec[0]->m_pool_state , ThreadsExec::Active ); + Impl::spinwait_while_equal( s_threads_exec[0]->m_pool_state , ThreadsExec::Active ); } s_current_function = 0 ; @@ -724,7 +724,7 @@ void ThreadsExec::initialize( unsigned thread_count , // Init the array for used for arbitrarily sized atomics Impl::init_lock_array_host_space(); - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) Kokkos::Profiling::initialize(); #endif } @@ -777,7 +777,7 @@ void ThreadsExec::finalize() s_threads_process.m_pool_fan_size = 0 ; s_threads_process.m_pool_state = ThreadsExec::Inactive ; - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) Kokkos::Profiling::finalize(); #endif } diff --git a/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.hpp b/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.hpp index 385dd492d0..a6db02ebac 100644 --- a/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.hpp +++ b/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.hpp @@ -187,13 +187,13 @@ public: // Fan-in reduction with highest ranking thread as the root for ( int i = 0 ; i < m_pool_fan_size ; ++i ) { // Wait: Active -> Rendezvous - Impl::spinwait( m_pool_base[ rev_rank + (1<m_pool_state , ThreadsExec::Active ); + Impl::spinwait_while_equal( m_pool_base[ rev_rank + (1<m_pool_state , ThreadsExec::Active ); } if ( rev_rank ) { m_pool_state = ThreadsExec::Rendezvous ; // Wait: Rendezvous -> Active - Impl::spinwait( m_pool_state , ThreadsExec::Rendezvous ); + Impl::spinwait_while_equal( m_pool_state , ThreadsExec::Rendezvous ); } else { // Root thread does the reduction and broadcast @@ -229,13 +229,13 @@ public: // Fan-in reduction with highest ranking thread as the root for ( int i = 0 ; i < m_pool_fan_size ; ++i ) { // Wait: Active -> Rendezvous - Impl::spinwait( m_pool_base[ rev_rank + (1<m_pool_state , ThreadsExec::Active ); + Impl::spinwait_while_equal( m_pool_base[ rev_rank + (1<m_pool_state , ThreadsExec::Active ); } if ( rev_rank ) { m_pool_state = ThreadsExec::Rendezvous ; // Wait: Rendezvous -> Active - Impl::spinwait( m_pool_state , ThreadsExec::Rendezvous ); + Impl::spinwait_while_equal( m_pool_state , ThreadsExec::Rendezvous ); } else { // Root thread does the reduction and broadcast @@ -264,7 +264,7 @@ public: ThreadsExec & fan = *m_pool_base[ rev_rank + ( 1 << i ) ] ; - Impl::spinwait( fan.m_pool_state , ThreadsExec::Active ); + Impl::spinwait_while_equal( fan.m_pool_state , ThreadsExec::Active ); Join::join( f , reduce_memory() , fan.reduce_memory() ); } @@ -280,7 +280,7 @@ public: const int rev_rank = m_pool_size - ( m_pool_rank + 1 ); for ( int i = 0 ; i < m_pool_fan_size ; ++i ) { - Impl::spinwait( m_pool_base[rev_rank+(1<m_pool_state , ThreadsExec::Active ); + Impl::spinwait_while_equal( m_pool_base[rev_rank+(1<m_pool_state , ThreadsExec::Active ); } } @@ -312,7 +312,7 @@ public: ThreadsExec & fan = *m_pool_base[ rev_rank + (1< ReductionAvailable (or ScanAvailable) - Impl::spinwait( fan.m_pool_state , ThreadsExec::Active ); + Impl::spinwait_while_equal( fan.m_pool_state , ThreadsExec::Active ); Join::join( f , work_value , fan.reduce_memory() ); } @@ -330,8 +330,8 @@ public: // Wait: Active -> ReductionAvailable // Wait: ReductionAvailable -> ScanAvailable - Impl::spinwait( th.m_pool_state , ThreadsExec::Active ); - Impl::spinwait( th.m_pool_state , ThreadsExec::ReductionAvailable ); + Impl::spinwait_while_equal( th.m_pool_state , ThreadsExec::Active ); + Impl::spinwait_while_equal( th.m_pool_state , ThreadsExec::ReductionAvailable ); Join::join( f , work_value + count , ((scalar_type *)th.reduce_memory()) + count ); } @@ -342,7 +342,7 @@ public: // Wait for all threads to complete inclusive scan // Wait: ScanAvailable -> Rendezvous - Impl::spinwait( m_pool_state , ThreadsExec::ScanAvailable ); + Impl::spinwait_while_equal( m_pool_state , ThreadsExec::ScanAvailable ); } //-------------------------------- @@ -350,7 +350,7 @@ public: for ( int i = 0 ; i < m_pool_fan_size ; ++i ) { ThreadsExec & fan = *m_pool_base[ rev_rank + (1< ScanAvailable - Impl::spinwait( fan.m_pool_state , ThreadsExec::ReductionAvailable ); + Impl::spinwait_while_equal( fan.m_pool_state , ThreadsExec::ReductionAvailable ); // Set: ScanAvailable -> Rendezvous fan.m_pool_state = ThreadsExec::Rendezvous ; } @@ -377,13 +377,13 @@ public: // Wait for all threads to copy previous thread's inclusive scan value // Wait for all threads: Rendezvous -> ScanCompleted for ( int i = 0 ; i < m_pool_fan_size ; ++i ) { - Impl::spinwait( m_pool_base[ rev_rank + (1<m_pool_state , ThreadsExec::Rendezvous ); + Impl::spinwait_while_equal( m_pool_base[ rev_rank + (1<m_pool_state , ThreadsExec::Rendezvous ); } if ( rev_rank ) { // Set: ScanAvailable -> ScanCompleted m_pool_state = ThreadsExec::ScanCompleted ; // Wait: ScanCompleted -> Active - Impl::spinwait( m_pool_state , ThreadsExec::ScanCompleted ); + Impl::spinwait_while_equal( m_pool_state , ThreadsExec::ScanCompleted ); } // Set: ScanCompleted -> Active for ( int i = 0 ; i < m_pool_fan_size ; ++i ) { @@ -410,7 +410,7 @@ public: // Fan-in reduction with highest ranking thread as the root for ( int i = 0 ; i < m_pool_fan_size ; ++i ) { // Wait: Active -> Rendezvous - Impl::spinwait( m_pool_base[ rev_rank + (1<m_pool_state , ThreadsExec::Active ); + Impl::spinwait_while_equal( m_pool_base[ rev_rank + (1<m_pool_state , ThreadsExec::Active ); } for ( unsigned i = 0 ; i < count ; ++i ) { work_value[i+count] = work_value[i]; } @@ -418,7 +418,7 @@ public: if ( rev_rank ) { m_pool_state = ThreadsExec::Rendezvous ; // Wait: Rendezvous -> Active - Impl::spinwait( m_pool_state , ThreadsExec::Rendezvous ); + Impl::spinwait_while_equal( m_pool_state , ThreadsExec::Rendezvous ); } else { // Root thread does the thread-scan before releasing threads diff --git a/lib/kokkos/core/src/Threads/Kokkos_ThreadsTeam.hpp b/lib/kokkos/core/src/Threads/Kokkos_ThreadsTeam.hpp index b9edb64551..7014954281 100644 --- a/lib/kokkos/core/src/Threads/Kokkos_ThreadsTeam.hpp +++ b/lib/kokkos/core/src/Threads/Kokkos_ThreadsTeam.hpp @@ -49,6 +49,7 @@ #include #include #include +#include #include @@ -103,13 +104,13 @@ public: // Wait for fan-in threads for ( n = 1 ; ( ! ( m_team_rank_rev & n ) ) && ( ( j = m_team_rank_rev + n ) < m_team_size ) ; n <<= 1 ) { - Impl::spinwait( m_team_base[j]->state() , ThreadsExec::Active ); + Impl::spinwait_while_equal( m_team_base[j]->state() , ThreadsExec::Active ); } // If not root then wait for release if ( m_team_rank_rev ) { m_exec->state() = ThreadsExec::Rendezvous ; - Impl::spinwait( m_exec->state() , ThreadsExec::Rendezvous ); + Impl::spinwait_while_equal( m_exec->state() , ThreadsExec::Rendezvous ); } return ! m_team_rank_rev ; @@ -350,6 +351,10 @@ public: const int team_rank_rev = pool_rank_rev % team.team_alloc(); const size_t pool_league_size = m_exec->pool_size() / team.team_alloc() ; const size_t pool_league_rank_rev = pool_rank_rev / team.team_alloc() ; + if(pool_league_rank_rev >= pool_league_size) { + m_invalid_thread = 1; + return; + } const size_t pool_league_rank = pool_league_size - ( pool_league_rank_rev + 1 ); const int pool_num_teams = m_exec->pool_size()/team.team_alloc(); @@ -505,7 +510,8 @@ private: , const int team_size_request ) { const int pool_size = traits::execution_space::thread_pool_size(0); - const int team_max = traits::execution_space::thread_pool_size(1); + const int max_host_team_size = Impl::HostThreadTeamData::max_team_members; + const int team_max = pool_size inline static - int team_size_max( const FunctorType & ) - { return traits::execution_space::thread_pool_size(1); } + int team_size_max( const FunctorType & ) { + int pool_size = traits::execution_space::thread_pool_size(1); + int max_host_team_size = Impl::HostThreadTeamData::max_team_members; + return pool_size static int team_size_recommended( const FunctorType & ) @@ -819,9 +829,7 @@ void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct KOKKOS_INLINE_FUNCTION void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries, const Lambda & lambda, const JoinType& join, ValueType& init_result) { + loop_boundaries, const Lambda & lambda, const JoinType& join, ValueType& result ) { - ValueType result = init_result; #ifdef KOKKOS_ENABLE_PRAGMA_IVDEP #pragma ivdep #endif for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - ValueType tmp = ValueType(); - lambda(i,tmp); - join(result,tmp); + lambda(i,result); } - init_result = result; } /** \brief Intra-thread vector parallel exclusive prefix sum. Executes lambda(iType i, ValueType & val, bool final) diff --git a/lib/kokkos/core/src/impl/KokkosExp_Host_IterateTile.hpp b/lib/kokkos/core/src/impl/KokkosExp_Host_IterateTile.hpp new file mode 100644 index 0000000000..c4db3e15ef --- /dev/null +++ b/lib/kokkos/core/src/impl/KokkosExp_Host_IterateTile.hpp @@ -0,0 +1,2356 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef KOKKOS_HOST_EXP_ITERATE_TILE_HPP +#define KOKKOS_HOST_EXP_ITERATE_TILE_HPP + +#include +#include +#include + +#include + +#if defined(KOKKOS_OPT_RANGE_AGGRESSIVE_VECTORIZATION) && defined(KOKKOS_HAVE_PRAGMA_IVDEP) && !defined(__CUDA_ARCH__) +#define KOKKOS_MDRANGE_IVDEP +#endif + + +#ifdef KOKKOS_MDRANGE_IVDEP + #define KOKKOS_ENABLE_IVDEP_MDRANGE _Pragma("ivdep") +#else + #define KOKKOS_ENABLE_IVDEP_MDRANGE +#endif + + + +namespace Kokkos { namespace Experimental { namespace Impl { + +// Temporary, for testing new loop macros +#define KOKKOS_ENABLE_NEW_LOOP_MACROS 1 + + +#define LOOP_1L(type, tile) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0=0; i0(tile[0]); ++i0) + +#define LOOP_2L(type, tile) \ + for( type i1=0; i1(tile[1]); ++i1) \ + LOOP_1L(type, tile) + +#define LOOP_3L(type, tile) \ + for( type i2=0; i2(tile[2]); ++i2) \ + LOOP_2L(type, tile) + +#define LOOP_4L(type, tile) \ + for( type i3=0; i3(tile[3]); ++i3) \ + LOOP_3L(type, tile) + +#define LOOP_5L(type, tile) \ + for( type i4=0; i4(tile[4]); ++i4) \ + LOOP_4L(type, tile) + +#define LOOP_6L(type, tile) \ + for( type i5=0; i5(tile[5]); ++i5) \ + LOOP_5L(type, tile) + +#define LOOP_7L(type, tile) \ + for( type i6=0; i6(tile[6]); ++i6) \ + LOOP_6L(type, tile) + +#define LOOP_8L(type, tile) \ + for( type i7=0; i7(tile[7]); ++i7) \ + LOOP_7L(type, tile) + + +#define LOOP_1R(type, tile) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for ( type i0=0; i0(tile[0]); ++i0 ) + +#define LOOP_2R(type, tile) \ + LOOP_1R(type, tile) \ + for ( type i1=0; i1(tile[1]); ++i1 ) + +#define LOOP_3R(type, tile) \ + LOOP_2R(type, tile) \ + for ( type i2=0; i2(tile[2]); ++i2 ) + +#define LOOP_4R(type, tile) \ + LOOP_3R(type, tile) \ + for ( type i3=0; i3(tile[3]); ++i3 ) + +#define LOOP_5R(type, tile) \ + LOOP_4R(type, tile) \ + for ( type i4=0; i4(tile[4]); ++i4 ) + +#define LOOP_6R(type, tile) \ + LOOP_5R(type, tile) \ + for ( type i5=0; i5(tile[5]); ++i5 ) + +#define LOOP_7R(type, tile) \ + LOOP_6R(type, tile) \ + for ( type i6=0; i6(tile[6]); ++i6 ) + +#define LOOP_8R(type, tile) \ + LOOP_7R(type, tile) \ + for ( type i7=0; i7(tile[7]); ++i7 ) + + +#define LOOP_ARGS_1 i0 + m_offset[0] +#define LOOP_ARGS_2 LOOP_ARGS_1, i1 + m_offset[1] +#define LOOP_ARGS_3 LOOP_ARGS_2, i2 + m_offset[2] +#define LOOP_ARGS_4 LOOP_ARGS_3, i3 + m_offset[3] +#define LOOP_ARGS_5 LOOP_ARGS_4, i4 + m_offset[4] +#define LOOP_ARGS_6 LOOP_ARGS_5, i5 + m_offset[5] +#define LOOP_ARGS_7 LOOP_ARGS_6, i6 + m_offset[6] +#define LOOP_ARGS_8 LOOP_ARGS_7, i7 + m_offset[7] + + + +// New Loop Macros... +// parallel_for, non-tagged +#define APPLY( func, ... ) \ + func( __VA_ARGS__ ); + +// LayoutRight +// d = 0 to start +#define LOOP_R_1( func, type, m_offset, extent, d, ... ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[d]); ++i0) { \ + APPLY( func, __VA_ARGS__, i0 + m_offset[d] ) \ + } + +#define LOOP_R_2( func, type, m_offset, extent, d, ... ) \ + for( type i1 = (type)0; i1 < static_cast(extent[d]); ++i1) { \ + LOOP_R_1( func, type, m_offset, extent, d+1 , __VA_ARGS__, i1 + m_offset[d] ) \ + } + +#define LOOP_R_3( func, type, m_offset, extent, d, ... ) \ + for( type i2 = (type)0; i2 < static_cast(extent[d]); ++i2) { \ + LOOP_R_2( func, type, m_offset, extent, d+1 , __VA_ARGS__, i2 + m_offset[d] ) \ + } + +#define LOOP_R_4( func, type, m_offset, extent, d, ... ) \ + for( type i3 = (type)0; i3 < static_cast(extent[d]); ++i3) { \ + LOOP_R_3( func, type, m_offset, extent, d+1 , __VA_ARGS__, i3 + m_offset[d] ) \ + } + +#define LOOP_R_5( func, type, m_offset, extent, d, ... ) \ + for( type i4 = (type)0; i4 < static_cast(extent[d]); ++i4) { \ + LOOP_R_4( func, type, m_offset, extent, d+1 , __VA_ARGS__, i4 + m_offset[d] ) \ + } + +#define LOOP_R_6( func, type, m_offset, extent, d, ... ) \ + for( type i5 = (type)0; i5 < static_cast(extent[d]); ++i5) { \ + LOOP_R_5( func, type, m_offset, extent, d+1 , __VA_ARGS__, i5 + m_offset[d] ) \ + } + +#define LOOP_R_7( func, type, m_offset, extent, d, ... ) \ + for( type i6 = (type)0; i6 < static_cast(extent[d]); ++i6) { \ + LOOP_R_6( func, type, m_offset, extent, d+1 , __VA_ARGS__, i6 + m_offset[d] ) \ + } + +#define LOOP_R_8( func, type, m_offset, extent, d, ... ) \ + for( type i7 = (type)0; i7 < static_cast(extent[d]); ++i7) { \ + LOOP_R_7( func, type, m_offset, extent, d+1 , __VA_ARGS__, i7 + m_offset[d] ) \ + } + +//LayoutLeft +// d = rank-1 to start +#define LOOP_L_1( func, type, m_offset, extent, d, ... ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[d]); ++i0) { \ + APPLY( func, i0 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_2( func, type, m_offset, extent, d, ... ) \ + for( type i1 = (type)0; i1 < static_cast(extent[d]); ++i1) { \ + LOOP_L_1( func, type, m_offset, extent, d-1, i1 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_3( func, type, m_offset, extent, d, ... ) \ + for( type i2 = (type)0; i2 < static_cast(extent[d]); ++i2) { \ + LOOP_L_2( func, type, m_offset, extent, d-1, i2 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_4( func, type, m_offset, extent, d, ... ) \ + for( type i3 = (type)0; i3 < static_cast(extent[d]); ++i3) { \ + LOOP_L_3( func, type, m_offset, extent, d-1, i3 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_5( func, type, m_offset, extent, d, ... ) \ + for( type i4 = (type)0; i4 < static_cast(extent[d]); ++i4) { \ + LOOP_L_4( func, type, m_offset, extent, d-1, i4 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_6( func, type, m_offset, extent, d, ... ) \ + for( type i5 = (type)0; i5 < static_cast(extent[d]); ++i5) { \ + LOOP_L_5( func, type, m_offset, extent, d-1, i5 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_7( func, type, m_offset, extent, d, ... ) \ + for( type i6 = (type)0; i6 < static_cast(extent[d]); ++i6) { \ + LOOP_L_6( func, type, m_offset, extent, d-1, i6 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_8( func, type, m_offset, extent, d, ... ) \ + for( type i7 = (type)0; i7 < static_cast(extent[d]); ++i7) { \ + LOOP_L_7( func, type, m_offset, extent, d-1, i7 + m_offset[d] , __VA_ARGS__ ) \ + } + +// Left vs Right +// TODO: rank not necessary to pass through, can hardcode the values +#define LOOP_LAYOUT_1( func, type, is_left, m_offset, extent, rank ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[0]); ++i0) { \ + APPLY( func, i0 + m_offset[0] ) \ + } + +#define LOOP_LAYOUT_2( func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i1 = (type)0; i1 < static_cast(extent[rank-1]); ++i1) { \ + LOOP_L_1( func, type, m_offset, extent, rank-2, i1 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i1 = (type)0; i1 < static_cast(extent[0]); ++i1) { \ + LOOP_R_1( func, type, m_offset, extent, 1 , i1 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_3( func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i2 = (type)0; i2 < static_cast(extent[rank-1]); ++i2) { \ + LOOP_L_2( func, type, m_offset, extent, rank-2, i2 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i2 = (type)0; i2 < static_cast(extent[0]); ++i2) { \ + LOOP_R_2( func, type, m_offset, extent, 1 , i2 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_4( func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i3 = (type)0; i3 < static_cast(extent[rank-1]); ++i3) { \ + LOOP_L_3( func, type, m_offset, extent, rank-2, i3 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i3 = (type)0; i3 < static_cast(extent[0]); ++i3) { \ + LOOP_R_3( func, type, m_offset, extent, 1 , i3 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_5( func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i4 = (type)0; i4 < static_cast(extent[rank-1]); ++i4) { \ + LOOP_L_4( func, type, m_offset, extent, rank-2, i4 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i4 = (type)0; i4 < static_cast(extent[0]); ++i4) { \ + LOOP_R_4( func, type, m_offset, extent, 1 , i4 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_6( func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i5 = (type)0; i5 < static_cast(extent[rank-1]); ++i5) { \ + LOOP_L_5( func, type, m_offset, extent, rank-2, i5 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i5 = (type)0; i5 < static_cast(extent[0]); ++i5) { \ + LOOP_R_5( func, type, m_offset, extent, 1 , i5 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_7( func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i6 = (type)0; i6 < static_cast(extent[rank-1]); ++i6) { \ + LOOP_L_6( func, type, m_offset, extent, rank-2, i6 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i6 = (type)0; i6 < static_cast(extent[0]); ++i6) { \ + LOOP_R_6( func, type, m_offset, extent, 1 , i6 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_8( func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i7 = (type)0; i7 < static_cast(extent[rank-1]); ++i7) { \ + LOOP_L_7( func, type, m_offset, extent, rank-2, i7 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i7 = (type)0; i7 < static_cast(extent[0]); ++i7) { \ + LOOP_R_7( func, type, m_offset, extent, 1 , i7 + m_offset[0] ) \ + } \ + } + +// Partial vs Full Tile +#define TILE_LOOP_1( func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_1( func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_1( func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_2( func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_2( func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_2( func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_3( func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_3( func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_3( func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_4( func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_4( func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_4( func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_5( func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_5( func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_5( func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_6( func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_6( func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_6( func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_7( func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_7( func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_7( func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_8( func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_8( func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_8( func, type, is_left, m_offset, extent_partial, rank ) } + + +// parallel_reduce, non-tagged +// Reduction version +#define APPLY_REDUX( val, func, ... ) \ + func( __VA_ARGS__, val ); + +// LayoutRight +// d = 0 to start +#define LOOP_R_1_REDUX( val, func, type, m_offset, extent, d, ... ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[d]); ++i0) { \ + APPLY_REDUX( val, func, __VA_ARGS__, i0 + m_offset[d] ) \ + } + +#define LOOP_R_2_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i1 = (type)0; i1 < static_cast(extent[d]); ++i1) { \ + LOOP_R_1_REDUX( val, func, type, m_offset, extent, d+1 , __VA_ARGS__, i1 + m_offset[d] ) \ + } + +#define LOOP_R_3_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i2 = (type)0; i2 < static_cast(extent[d]); ++i2) { \ + LOOP_R_2_REDUX( val, func, type, m_offset, extent, d+1 , __VA_ARGS__, i2 + m_offset[d] ) \ + } + +#define LOOP_R_4_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i3 = (type)0; i3 < static_cast(extent[d]); ++i3) { \ + LOOP_R_3_REDUX( val, func, type, m_offset, extent, d+1 , __VA_ARGS__, i3 + m_offset[d] ) \ + } + +#define LOOP_R_5_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i4 = (type)0; i4 < static_cast(extent[d]); ++i4) { \ + LOOP_R_4_REDUX( val, func, type, m_offset, extent, d+1 , __VA_ARGS__, i4 + m_offset[d] ) \ + } + +#define LOOP_R_6_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i5 = (type)0; i5 < static_cast(extent[d]); ++i5) { \ + LOOP_R_5_REDUX( val, func, type, m_offset, extent, d+1 , __VA_ARGS__, i5 + m_offset[d] ) \ + } + +#define LOOP_R_7_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i6 = (type)0; i6 < static_cast(extent[d]); ++i6) { \ + LOOP_R_6_REDUX( val, func, type, m_offset, extent, d+1 , __VA_ARGS__, i6 + m_offset[d] ) \ + } + +#define LOOP_R_8_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i7 = (type)0; i7 < static_cast(extent[d]); ++i7) { \ + LOOP_R_7_REDUX( val, func, type, m_offset, extent, d+1 , __VA_ARGS__, i7 + m_offset[d] ) \ + } + +//LayoutLeft +// d = rank-1 to start +#define LOOP_L_1_REDUX( val, func, type, m_offset, extent, d, ... ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[d]); ++i0) { \ + APPLY_REDUX( val, func, i0 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_2_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i1 = (type)0; i1 < static_cast(extent[d]); ++i1) { \ + LOOP_L_1_REDUX( val, func, type, m_offset, extent, d-1, i1 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_3_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i2 = (type)0; i2 < static_cast(extent[d]); ++i2) { \ + LOOP_L_2_REDUX( val, func, type, m_offset, extent, d-1, i2 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_4_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i3 = (type)0; i3 < static_cast(extent[d]); ++i3) { \ + LOOP_L_3_REDUX( val, func, type, m_offset, extent, d-1, i3 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_5_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i4 = (type)0; i4 < static_cast(extent[d]); ++i4) { \ + LOOP_L_4_REDUX( val, func, type, m_offset, extent, d-1, i4 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_6_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i5 = (type)0; i5 < static_cast(extent[d]); ++i5) { \ + LOOP_L_5_REDUX( val, func, type, m_offset, extent, d-1, i5 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_7_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i6 = (type)0; i6 < static_cast(extent[d]); ++i6) { \ + LOOP_L_6_REDUX( val, func, type, m_offset, extent, d-1, i6 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define LOOP_L_8_REDUX( val, func, type, m_offset, extent, d, ... ) \ + for( type i7 = (type)0; i7 < static_cast(extent[d]); ++i7) { \ + LOOP_L_7_REDUX( val, func, type, m_offset, extent, d-1, i7 + m_offset[d] , __VA_ARGS__ ) \ + } + +// Left vs Right +#define LOOP_LAYOUT_1_REDUX( val, func, type, is_left, m_offset, extent, rank ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[0]); ++i0) { \ + APPLY_REDUX( val, func, i0 + m_offset[0] ) \ + } + +#define LOOP_LAYOUT_2_REDUX( val, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i1 = (type)0; i1 < static_cast(extent[rank-1]); ++i1) { \ + LOOP_L_1_REDUX( val, func, type, m_offset, extent, rank-2, i1 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i1 = (type)0; i1 < static_cast(extent[0]); ++i1) { \ + LOOP_R_1_REDUX( val, func, type, m_offset, extent, 1 , i1 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_3_REDUX( val, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i2 = (type)0; i2 < static_cast(extent[rank-1]); ++i2) { \ + LOOP_L_2_REDUX( val, func, type, m_offset, extent, rank-2, i2 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i2 = (type)0; i2 < static_cast(extent[0]); ++i2) { \ + LOOP_R_2_REDUX( val, func, type, m_offset, extent, 1 , i2 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_4_REDUX( val, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i3 = (type)0; i3 < static_cast(extent[rank-1]); ++i3) { \ + LOOP_L_3_REDUX( val, func, type, m_offset, extent, rank-2, i3 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i3 = (type)0; i3 < static_cast(extent[0]); ++i3) { \ + LOOP_R_3_REDUX( val, func, type, m_offset, extent, 1 , i3 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_5_REDUX( val, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i4 = (type)0; i4 < static_cast(extent[rank-1]); ++i4) { \ + LOOP_L_4_REDUX( val, func, type, m_offset, extent, rank-2, i4 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i4 = (type)0; i4 < static_cast(extent[0]); ++i4) { \ + LOOP_R_4_REDUX( val, func, type, m_offset, extent, 1 , i4 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_6_REDUX( val, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i5 = (type)0; i5 < static_cast(extent[rank-1]); ++i5) { \ + LOOP_L_5_REDUX( val, func, type, m_offset, extent, rank-2, i5 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i5 = (type)0; i5 < static_cast(extent[0]); ++i5) { \ + LOOP_R_5_REDUX( val, func, type, m_offset, extent, 1 , i5 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_7_REDUX( val, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i6 = (type)0; i6 < static_cast(extent[rank-1]); ++i6) { \ + LOOP_L_6_REDUX( val, func, type, m_offset, extent, rank-2, i6 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i6 = (type)0; i6 < static_cast(extent[0]); ++i6) { \ + LOOP_R_6_REDUX( val, func, type, m_offset, extent, 1 , i6 + m_offset[0] ) \ + } \ + } + +#define LOOP_LAYOUT_8_REDUX( val, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i7 = (type)0; i7 < static_cast(extent[rank-1]); ++i7) { \ + LOOP_L_7_REDUX( val, func, type, m_offset, extent, rank-2, i7 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i7 = (type)0; i7 < static_cast(extent[0]); ++i7) { \ + LOOP_R_7_REDUX( val, func, type, m_offset, extent, 1 , i7 + m_offset[0] ) \ + } \ + } + +// Partial vs Full Tile +#define TILE_LOOP_1_REDUX( val, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_1_REDUX( val, func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_1_REDUX( val, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_2_REDUX( val, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_2_REDUX( val, func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_2_REDUX( val, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_3_REDUX( val, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_3_REDUX( val, func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_3_REDUX( val, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_4_REDUX( val, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_4_REDUX( val, func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_4_REDUX( val, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_5_REDUX( val, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_5_REDUX( val, func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_5_REDUX( val, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_6_REDUX( val, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_6_REDUX( val, func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_6_REDUX( val, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_7_REDUX( val, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_7_REDUX( val, func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_7_REDUX( val, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TILE_LOOP_8_REDUX( val, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { LOOP_LAYOUT_8_REDUX( val, func, type, is_left, m_offset, extent_full, rank ) } \ + else { LOOP_LAYOUT_8_REDUX( val, func, type, is_left, m_offset, extent_partial, rank ) } +// end New Loop Macros + + +// tagged macros +#define TAGGED_APPLY( tag, func, ... ) \ + func( tag, __VA_ARGS__ ); + +// LayoutRight +// d = 0 to start +#define TAGGED_LOOP_R_1( tag, func, type, m_offset, extent, d, ... ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[d]); ++i0) { \ + TAGGED_APPLY( tag, func, __VA_ARGS__, i0 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_2( tag, func, type, m_offset, extent, d, ... ) \ + for( type i1 = (type)0; i1 < static_cast(extent[d]); ++i1) { \ + TAGGED_LOOP_R_1( tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i1 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_3( tag, func, type, m_offset, extent, d, ... ) \ + for( type i2 = (type)0; i2 < static_cast(extent[d]); ++i2) { \ + TAGGED_LOOP_R_2( tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i2 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_4( tag, func, type, m_offset, extent, d, ... ) \ + for( type i3 = (type)0; i3 < static_cast(extent[d]); ++i3) { \ + TAGGED_LOOP_R_3( tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i3 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_5( tag, func, type, m_offset, extent, d, ... ) \ + for( type i4 = (type)0; i4 < static_cast(extent[d]); ++i4) { \ + TAGGED_LOOP_R_4( tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i4 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_6( tag, func, type, m_offset, extent, d, ... ) \ + for( type i5 = (type)0; i5 < static_cast(extent[d]); ++i5) { \ + TAGGED_LOOP_R_5( tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i5 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_7( tag, func, type, m_offset, extent, d, ... ) \ + for( type i6 = (type)0; i6 < static_cast(extent[d]); ++i6) { \ + TAGGED_LOOP_R_6( tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i6 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_8( tag, func, type, m_offset, extent, d, ... ) \ + for( type i7 = (type)0; i7 < static_cast(extent[d]); ++i7) { \ + TAGGED_LOOP_R_7( tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i7 + m_offset[d] ) \ + } + +//LayoutLeft +// d = rank-1 to start +#define TAGGED_LOOP_L_1( tag, func, type, m_offset, extent, d, ... ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[d]); ++i0) { \ + TAGGED_APPLY( tag, func, i0 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_2( tag, func, type, m_offset, extent, d, ... ) \ + for( type i1 = (type)0; i1 < static_cast(extent[d]); ++i1) { \ + TAGGED_LOOP_L_1( tag, func, type, m_offset, extent, d-1, i1 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_3( tag, func, type, m_offset, extent, d, ... ) \ + for( type i2 = (type)0; i2 < static_cast(extent[d]); ++i2) { \ + TAGGED_LOOP_L_2( tag, func, type, m_offset, extent, d-1, i2 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_4( tag, func, type, m_offset, extent, d, ... ) \ + for( type i3 = (type)0; i3 < static_cast(extent[d]); ++i3) { \ + TAGGED_LOOP_L_3( tag, func, type, m_offset, extent, d-1, i3 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_5( tag, func, type, m_offset, extent, d, ... ) \ + for( type i4 = (type)0; i4 < static_cast(extent[d]); ++i4) { \ + TAGGED_LOOP_L_4( tag, func, type, m_offset, extent, d-1, i4 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_6( tag, func, type, m_offset, extent, d, ... ) \ + for( type i5 = (type)0; i5 < static_cast(extent[d]); ++i5) { \ + TAGGED_LOOP_L_5( tag, func, type, m_offset, extent, d-1, i5 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_7( tag, func, type, m_offset, extent, d, ... ) \ + for( type i6 = (type)0; i6 < static_cast(extent[d]); ++i6) { \ + TAGGED_LOOP_L_6( tag, func, type, m_offset, extent, d-1, i6 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_8( tag, func, type, m_offset, extent, d, ... ) \ + for( type i7 = (type)0; i7 < static_cast(extent[d]); ++i7) { \ + TAGGED_LOOP_L_7( tag, func, type, m_offset, extent, d-1, i7 + m_offset[d] , __VA_ARGS__ ) \ + } + +// Left vs Right +// TODO: rank not necessary to pass through, can hardcode the values +#define TAGGED_LOOP_LAYOUT_1( tag, func, type, is_left, m_offset, extent, rank ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[0]); ++i0) { \ + TAGGED_APPLY( tag, func, i0 + m_offset[0] ) \ + } + +#define TAGGED_LOOP_LAYOUT_2( tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i1 = (type)0; i1 < static_cast(extent[rank-1]); ++i1) { \ + TAGGED_LOOP_L_1( tag, func, type, m_offset, extent, rank-2, i1 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i1 = (type)0; i1 < static_cast(extent[0]); ++i1) { \ + TAGGED_LOOP_R_1( tag, func, type, m_offset, extent, 1 , i1 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_3( tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i2 = (type)0; i2 < static_cast(extent[rank-1]); ++i2) { \ + TAGGED_LOOP_L_2( tag, func, type, m_offset, extent, rank-2, i2 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i2 = (type)0; i2 < static_cast(extent[0]); ++i2) { \ + TAGGED_LOOP_R_2( tag, func, type, m_offset, extent, 1 , i2 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_4( tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i3 = (type)0; i3 < static_cast(extent[rank-1]); ++i3) { \ + TAGGED_LOOP_L_3( tag, func, type, m_offset, extent, rank-2, i3 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i3 = (type)0; i3 < static_cast(extent[0]); ++i3) { \ + TAGGED_LOOP_R_3( tag, func, type, m_offset, extent, 1 , i3 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_5( tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i4 = (type)0; i4 < static_cast(extent[rank-1]); ++i4) { \ + TAGGED_LOOP_L_4( tag, func, type, m_offset, extent, rank-2, i4 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i4 = (type)0; i4 < static_cast(extent[0]); ++i4) { \ + TAGGED_LOOP_R_4( tag, func, type, m_offset, extent, 1 , i4 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_6( tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i5 = (type)0; i5 < static_cast(extent[rank-1]); ++i5) { \ + TAGGED_LOOP_L_5( tag, func, type, m_offset, extent, rank-2, i5 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i5 = (type)0; i5 < static_cast(extent[0]); ++i5) { \ + TAGGED_LOOP_R_5( tag, func, type, m_offset, extent, 1 , i5 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_7( tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i6 = (type)0; i6 < static_cast(extent[rank-1]); ++i6) { \ + TAGGED_LOOP_L_6( tag, func, type, m_offset, extent, rank-2, i6 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i6 = (type)0; i6 < static_cast(extent[0]); ++i6) { \ + TAGGED_LOOP_R_6( tag, func, type, m_offset, extent, 1 , i6 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_8( tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i7 = (type)0; i7 < static_cast(extent[rank-1]); ++i7) { \ + TAGGED_LOOP_L_7( tag, func, type, m_offset, extent, rank-2, i7 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i7 = (type)0; i7 < static_cast(extent[0]); ++i7) { \ + TAGGED_LOOP_R_7( tag, func, type, m_offset, extent, 1 , i7 + m_offset[0] ) \ + } \ + } + +// Partial vs Full Tile +#define TAGGED_TILE_LOOP_1( tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_1( tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_1( tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_2( tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_2( tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_2( tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_3( tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_3( tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_3( tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_4( tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_4( tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_4( tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_5( tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_5( tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_5( tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_6( tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_6( tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_6( tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_7( tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_7( tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_7( tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_8( tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_8( tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_8( tag, func, type, is_left, m_offset, extent_partial, rank ) } + + +// parallel_reduce, tagged +// Reduction version +#define TAGGED_APPLY_REDUX( val, tag, func, ... ) \ + func( tag, __VA_ARGS__, val ); + +// LayoutRight +// d = 0 to start +#define TAGGED_LOOP_R_1_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[d]); ++i0) { \ + TAGGED_APPLY_REDUX( val, tag, func, __VA_ARGS__, i0 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_2_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i1 = (type)0; i1 < static_cast(extent[d]); ++i1) { \ + TAGGED_LOOP_R_1_REDUX( val, tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i1 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_3_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i2 = (type)0; i2 < static_cast(extent[d]); ++i2) { \ + TAGGED_LOOP_R_2_REDUX( val, tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i2 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_4_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i3 = (type)0; i3 < static_cast(extent[d]); ++i3) { \ + TAGGED_LOOP_R_3_REDUX( val, tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i3 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_5_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i4 = (type)0; i4 < static_cast(extent[d]); ++i4) { \ + TAGGED_LOOP_R_4_REDUX( val, tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i4 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_6_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i5 = (type)0; i5 < static_cast(extent[d]); ++i5) { \ + TAGGED_LOOP_R_5_REDUX( val, tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i5 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_7_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i6 = (type)0; i6 < static_cast(extent[d]); ++i6) { \ + TAGGED_LOOP_R_6_REDUX( val, tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i6 + m_offset[d] ) \ + } + +#define TAGGED_LOOP_R_8_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i7 = (type)0; i7 < static_cast(extent[d]); ++i7) { \ + TAGGED_LOOP_R_7_REDUX( val, tag, func, type, m_offset, extent, d+1 , __VA_ARGS__, i7 + m_offset[d] ) \ + } + +//LayoutLeft +// d = rank-1 to start +#define TAGGED_LOOP_L_1_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[d]); ++i0) { \ + TAGGED_APPLY_REDUX( val, tag, func, i0 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_2_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i1 = (type)0; i1 < static_cast(extent[d]); ++i1) { \ + TAGGED_LOOP_L_1_REDUX( val, tag, func, type, m_offset, extent, d-1, i1 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_3_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i2 = (type)0; i2 < static_cast(extent[d]); ++i2) { \ + TAGGED_LOOP_L_2_REDUX( val, tag, func, type, m_offset, extent, d-1, i2 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_4_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i3 = (type)0; i3 < static_cast(extent[d]); ++i3) { \ + TAGGED_LOOP_L_3_REDUX( val, tag, func, type, m_offset, extent, d-1, i3 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_5_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i4 = (type)0; i4 < static_cast(extent[d]); ++i4) { \ + TAGGED_LOOP_L_4_REDUX( val, tag, func, type, m_offset, extent, d-1, i4 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_6_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i5 = (type)0; i5 < static_cast(extent[d]); ++i5) { \ + TAGGED_LOOP_L_5_REDUX( val, tag, func, type, m_offset, extent, d-1, i5 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_7_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i6 = (type)0; i6 < static_cast(extent[d]); ++i6) { \ + TAGGED_LOOP_L_6_REDUX( val, tag, func, type, m_offset, extent, d-1, i6 + m_offset[d] , __VA_ARGS__ ) \ + } + +#define TAGGED_LOOP_L_8_REDUX( val, tag, func, type, m_offset, extent, d, ... ) \ + for( type i7 = (type)0; i7 < static_cast(extent[d]); ++i7) { \ + TAGGED_LOOP_L_7_REDUX( val, tag, func, type, m_offset, extent, d-1, i7 + m_offset[d] , __VA_ARGS__ ) \ + } + +// Left vs Right +#define TAGGED_LOOP_LAYOUT_1_REDUX( val, tag, func, type, is_left, m_offset, extent, rank ) \ + KOKKOS_ENABLE_IVDEP_MDRANGE \ + for( type i0 = (type)0; i0 < static_cast(extent[0]); ++i0) { \ + TAGGED_APPLY_REDUX( val, tag, func, i0 + m_offset[0] ) \ + } + +#define TAGGED_LOOP_LAYOUT_2_REDUX( val, tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i1 = (type)0; i1 < static_cast(extent[rank-1]); ++i1) { \ + TAGGED_LOOP_L_1_REDUX( val, tag, func, type, m_offset, extent, rank-2, i1 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i1 = (type)0; i1 < static_cast(extent[0]); ++i1) { \ + TAGGED_LOOP_R_1_REDUX( val, tag, func, type, m_offset, extent, 1 , i1 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_3_REDUX( val, tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i2 = (type)0; i2 < static_cast(extent[rank-1]); ++i2) { \ + TAGGED_LOOP_L_2_REDUX( val, tag, func, type, m_offset, extent, rank-2, i2 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i2 = (type)0; i2 < static_cast(extent[0]); ++i2) { \ + TAGGED_LOOP_R_2_REDUX( val, tag, func, type, m_offset, extent, 1 , i2 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_4_REDUX( val, tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i3 = (type)0; i3 < static_cast(extent[rank-1]); ++i3) { \ + TAGGED_LOOP_L_3_REDUX( val, tag, func, type, m_offset, extent, rank-2, i3 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i3 = (type)0; i3 < static_cast(extent[0]); ++i3) { \ + TAGGED_LOOP_R_3_REDUX( val, tag, func, type, m_offset, extent, 1 , i3 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_5_REDUX( val, tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i4 = (type)0; i4 < static_cast(extent[rank-1]); ++i4) { \ + TAGGED_LOOP_L_4_REDUX( val, tag, func, type, m_offset, extent, rank-2, i4 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i4 = (type)0; i4 < static_cast(extent[0]); ++i4) { \ + TAGGED_LOOP_R_4_REDUX( val, tag, func, type, m_offset, extent, 1 , i4 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_6_REDUX( val, tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i5 = (type)0; i5 < static_cast(extent[rank-1]); ++i5) { \ + TAGGED_LOOP_L_5_REDUX( val, tag, func, type, m_offset, extent, rank-2, i5 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i5 = (type)0; i5 < static_cast(extent[0]); ++i5) { \ + TAGGED_LOOP_R_5_REDUX( val, tag, func, type, m_offset, extent, 1 , i5 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_7_REDUX( val, tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i6 = (type)0; i6 < static_cast(extent[rank-1]); ++i6) { \ + TAGGED_LOOP_L_6_REDUX( val, tag, func, type, m_offset, extent, rank-2, i6 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i6 = (type)0; i6 < static_cast(extent[0]); ++i6) { \ + TAGGED_LOOP_R_6_REDUX( val, tag, func, type, m_offset, extent, 1 , i6 + m_offset[0] ) \ + } \ + } + +#define TAGGED_LOOP_LAYOUT_8_REDUX( val, tag, func, type, is_left, m_offset, extent, rank ) \ + if (is_left) { \ + for( type i7 = (type)0; i7 < static_cast(extent[rank-1]); ++i7) { \ + TAGGED_LOOP_L_7_REDUX( val, tag, func, type, m_offset, extent, rank-2, i7 + m_offset[rank-1] ) \ + } \ + } \ + else { \ + for( type i7 = (type)0; i7 < static_cast(extent[0]); ++i7) { \ + TAGGED_LOOP_R_7_REDUX( val, tag, func, type, m_offset, extent, 1 , i7 + m_offset[0] ) \ + } \ + } + +// Partial vs Full Tile +#define TAGGED_TILE_LOOP_1_REDUX( val, tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_1_REDUX( val, tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_1_REDUX( val, tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_2_REDUX( val, tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_2_REDUX( val, tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_2_REDUX( val, tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_3_REDUX( val, tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_3_REDUX( val, tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_3_REDUX( val, tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_4_REDUX( val, tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_4_REDUX( val, tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_4_REDUX( val, tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_5_REDUX( val, tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_5_REDUX( val, tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_5_REDUX( val, tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_6_REDUX( val, tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_6_REDUX( val, tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_6_REDUX( val, tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_7_REDUX( val, tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_7_REDUX( val, tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_7_REDUX( val, tag, func, type, is_left, m_offset, extent_partial, rank ) } + +#define TAGGED_TILE_LOOP_8_REDUX( val, tag, func, type, is_left, cond, m_offset, extent_full, extent_partial, rank ) \ + if (cond) { TAGGED_LOOP_LAYOUT_8_REDUX( val, tag, func, type, is_left, m_offset, extent_full, rank ) } \ + else { TAGGED_LOOP_LAYOUT_8_REDUX( val, tag, func, type, is_left, m_offset, extent_partial, rank ) } + +// end tagged macros + + + + +// Structs for calling loops +template < int Rank, bool IsLeft, typename IType, typename Tagged, typename Enable = void > +struct Tile_Loop_Type; + +template < bool IsLeft, typename IType > +struct Tile_Loop_Type<1, IsLeft, IType, void, void > +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_1( func, IType, IsLeft, cond, offset, a, b, 1 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_1_REDUX( value, func, IType, IsLeft, cond, offset, a, b, 1 ); + } +}; + +template < bool IsLeft, typename IType > +struct Tile_Loop_Type<2, IsLeft, IType, void, void> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_2( func, IType, IsLeft, cond, offset, a, b, 2 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_2_REDUX( value, func, IType, IsLeft, cond, offset, a, b, 2 ); + } +}; + +template < bool IsLeft, typename IType > +struct Tile_Loop_Type<3, IsLeft, IType, void, void> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_3( func, IType, IsLeft, cond, offset, a, b, 3 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_3_REDUX( value, func, IType, IsLeft, cond, offset, a, b, 3 ); + } +}; + +template < bool IsLeft, typename IType > +struct Tile_Loop_Type<4, IsLeft, IType, void, void> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_4( func, IType, IsLeft, cond, offset, a, b, 4 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_4_REDUX( value, func, IType, IsLeft, cond, offset, a, b, 4 ); + } +}; + +template < bool IsLeft, typename IType > +struct Tile_Loop_Type<5, IsLeft, IType, void, void> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_5( func, IType, IsLeft, cond, offset, a, b, 5 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_5_REDUX( value, func, IType, IsLeft, cond, offset, a, b, 5 ); + } +}; + +template < bool IsLeft, typename IType > +struct Tile_Loop_Type<6, IsLeft, IType, void, void> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_6( func, IType, IsLeft, cond, offset, a, b, 6 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_6_REDUX( value, func, IType, IsLeft, cond, offset, a, b, 6 ); + } +}; + +template < bool IsLeft, typename IType > +struct Tile_Loop_Type<7, IsLeft, IType, void, void> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_7( func, IType, IsLeft, cond, offset, a, b, 7 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_7_REDUX( value, func, IType, IsLeft, cond, offset, a, b, 7 ); + } +}; + +template < bool IsLeft, typename IType > +struct Tile_Loop_Type<8, IsLeft, IType, void, void> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_8( func, IType, IsLeft, cond, offset, a, b, 8 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TILE_LOOP_8_REDUX( value, func, IType, IsLeft, cond, offset, a, b, 8 ); + } +}; + +// tagged versions + +template < bool IsLeft, typename IType, typename Tagged > +struct Tile_Loop_Type<1, IsLeft, IType, Tagged, typename std::enable_if< !std::is_same::value>::type > +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_1( Tagged(), func, IType, IsLeft, cond, offset, a, b, 1 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_1_REDUX( value, Tagged(), func, IType, IsLeft, cond, offset, a, b, 1 ); + } +}; + +template < bool IsLeft, typename IType, typename Tagged > +struct Tile_Loop_Type<2, IsLeft, IType, Tagged, typename std::enable_if< !std::is_same::value>::type> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_2( Tagged(), func, IType, IsLeft, cond, offset, a, b, 2 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_2_REDUX( value, Tagged(), func, IType, IsLeft, cond, offset, a, b, 2 ); + } +}; + +template < bool IsLeft, typename IType, typename Tagged > +struct Tile_Loop_Type<3, IsLeft, IType, Tagged, typename std::enable_if< !std::is_same::value>::type> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_3( Tagged(), func, IType, IsLeft, cond, offset, a, b, 3 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_3_REDUX( value, Tagged(), func, IType, IsLeft, cond, offset, a, b, 3 ); + } +}; + +template < bool IsLeft, typename IType, typename Tagged > +struct Tile_Loop_Type<4, IsLeft, IType, Tagged, typename std::enable_if< !std::is_same::value>::type> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_4( Tagged(), func, IType, IsLeft, cond, offset, a, b, 4 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_4_REDUX( value, Tagged(), func, IType, IsLeft, cond, offset, a, b, 4 ); + } +}; + +template < bool IsLeft, typename IType, typename Tagged > +struct Tile_Loop_Type<5, IsLeft, IType, Tagged, typename std::enable_if< !std::is_same::value>::type> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_5( Tagged(), func, IType, IsLeft, cond, offset, a, b, 5 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_5_REDUX( value, Tagged(), func, IType, IsLeft, cond, offset, a, b, 5 ); + } +}; + +template < bool IsLeft, typename IType, typename Tagged > +struct Tile_Loop_Type<6, IsLeft, IType, Tagged, typename std::enable_if< !std::is_same::value>::type> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_6( Tagged(), func, IType, IsLeft, cond, offset, a, b, 6 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_6_REDUX( value, Tagged(), func, IType, IsLeft, cond, offset, a, b, 6 ); + } +}; + +template < bool IsLeft, typename IType, typename Tagged > +struct Tile_Loop_Type<7, IsLeft, IType, Tagged, typename std::enable_if< !std::is_same::value>::type> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_7( Tagged(), func, IType, IsLeft, cond, offset, a, b, 7 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_7_REDUX( value, Tagged(), func, IType, IsLeft, cond, offset, a, b, 7 ); + } +}; + +template < bool IsLeft, typename IType, typename Tagged > +struct Tile_Loop_Type<8, IsLeft, IType, Tagged, typename std::enable_if< !std::is_same::value>::type> +{ + template < typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_8( Tagged(), func, IType, IsLeft, cond, offset, a, b, 8 ); + } + + template < typename ValType, typename Func, typename Offset, typename ExtentA, typename ExtentB > + static void apply(ValType &value, Func const& func, bool cond, Offset const& offset, ExtentA const& a, ExtentB const& b) + { + TAGGED_TILE_LOOP_8_REDUX( value, Tagged(), func, IType, IsLeft, cond, offset, a, b, 8 ); + } +}; +// end Structs for calling loops + + +template +using is_void = std::is_same< T , void >; + +template < typename RP + , typename Functor + , typename Tag = void + , typename ValueType = void + , typename Enable = void + > +struct HostIterateTile; + +//For ParallelFor +template < typename RP + , typename Functor + , typename Tag + , typename ValueType + > +struct HostIterateTile < RP , Functor , Tag , ValueType , typename std::enable_if< is_void::value >::type > +{ + using index_type = typename RP::index_type; + using point_type = typename RP::point_type; + + using value_type = ValueType; + + inline + HostIterateTile( RP const& rp, Functor const& func ) + : m_rp(rp) + , m_func(func) + { + } + + inline + bool check_iteration_bounds( point_type& partial_tile , point_type& offset ) const { + bool is_full_tile = true; + + for ( int i = 0; i < RP::rank; ++i ) { + if ((offset[i] + m_rp.m_tile[i]) <= m_rp.m_upper[i]) { + partial_tile[i] = m_rp.m_tile[i] ; + } + else { + is_full_tile = false ; + partial_tile[i] = (m_rp.m_upper[i] - 1 - offset[i]) == 0 ? 1 + : (m_rp.m_upper[i] - m_rp.m_tile[i]) > 0 ? (m_rp.m_upper[i] - offset[i]) + : (m_rp.m_upper[i] - m_rp.m_lower[i]) ; // when single tile encloses range + } + } + + return is_full_tile ; + } // end check bounds + + + template + struct RankTag + { + typedef RankTag type; + enum { value = (int)Rank }; + }; + +#if KOKKOS_ENABLE_NEW_LOOP_MACROS + template + inline + void + operator()(IType tile_idx) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + Tile_Loop_Type< RP::rank, (RP::inner_direction == RP::Left), index_type, Tag >::apply( m_func, full_tile, m_offset, m_rp.m_tile, m_tiledims ); + + } + +#else + template + inline + void + operator()(IType tile_idx) const + { operator_impl( tile_idx , RankTag() ); } + // added due to compiler error when using sfinae to choose operator based on rank w/ cuda+serial + + template + inline + void operator_impl( IType tile_idx , const RankTag<2> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_2L(index_type, m_tiledims) { + apply( LOOP_ARGS_2 ); + } + } else { +// #pragma simd + LOOP_2L(index_type, m_tiledims) { + apply( LOOP_ARGS_2 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_2R(index_type, m_tiledims) { + apply( LOOP_ARGS_2 ); + } + } else { +// #pragma simd + LOOP_2R(index_type, m_tiledims) { + apply( LOOP_ARGS_2 ); + } + } + } // end RP::Right + + } //end op() rank == 2 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<3> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_3L(index_type, m_tiledims) { + apply( LOOP_ARGS_3 ); + } + } else { +// #pragma simd + LOOP_3L(index_type, m_tiledims) { + apply( LOOP_ARGS_3 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_3R(index_type, m_tiledims) { + apply( LOOP_ARGS_3 ); + } + } else { +// #pragma simd + LOOP_3R(index_type, m_tiledims) { + apply( LOOP_ARGS_3 ); + } + } + } // end RP::Right + + } //end op() rank == 3 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<4> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_4L(index_type, m_tiledims) { + apply( LOOP_ARGS_4 ); + } + } else { +// #pragma simd + LOOP_4L(index_type, m_tiledims) { + apply( LOOP_ARGS_4 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_4R(index_type, m_tiledims) { + apply( LOOP_ARGS_4 ); + } + } else { +// #pragma simd + LOOP_4R(index_type, m_tiledims) { + apply( LOOP_ARGS_4 ); + } + } + } // end RP::Right + + } //end op() rank == 4 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<5> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_5L(index_type, m_tiledims) { + apply( LOOP_ARGS_5 ); + } + } else { +// #pragma simd + LOOP_5L(index_type, m_tiledims) { + apply( LOOP_ARGS_5 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_5R(index_type, m_tiledims) { + apply( LOOP_ARGS_5 ); + } + } else { +// #pragma simd + LOOP_5R(index_type, m_tiledims) { + apply( LOOP_ARGS_5 ); + } + } + } // end RP::Right + + } //end op() rank == 5 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<6> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_6L(index_type, m_tiledims) { + apply( LOOP_ARGS_6 ); + } + } else { +// #pragma simd + LOOP_6L(index_type, m_tiledims) { + apply( LOOP_ARGS_6 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_6R(index_type, m_tiledims) { + apply( LOOP_ARGS_6 ); + } + } else { +// #pragma simd + LOOP_6R(index_type, m_tiledims) { + apply( LOOP_ARGS_6 ); + } + } + } // end RP::Right + + } //end op() rank == 6 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<7> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_7L(index_type, m_tiledims) { + apply( LOOP_ARGS_7 ); + } + } else { +// #pragma simd + LOOP_7L(index_type, m_tiledims) { + apply( LOOP_ARGS_7 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_7R(index_type, m_tiledims) { + apply( LOOP_ARGS_7 ); + } + } else { +// #pragma simd + LOOP_7R(index_type, m_tiledims) { + apply( LOOP_ARGS_7 ); + } + } + } // end RP::Right + + } //end op() rank == 7 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<8> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_8L(index_type, m_tiledims) { + apply( LOOP_ARGS_8 ); + } + } else { +// #pragma simd + LOOP_8L(index_type, m_tiledims) { + apply( LOOP_ARGS_8 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_8R(index_type, m_tiledims) { + apply( LOOP_ARGS_8 ); + } + } else { +// #pragma simd + LOOP_8R(index_type, m_tiledims) { + apply( LOOP_ARGS_8 ); + } + } + } // end RP::Right + + } //end op() rank == 8 +#endif + + + template + typename std::enable_if<( sizeof...(Args) == RP::rank && std::is_same::value), void>::type + apply(Args &&... args) const + { + m_func(args...); + } + + template + typename std::enable_if<( sizeof...(Args) == RP::rank && !std::is_same::value), void>::type + apply(Args &&... args) const + { + m_func( m_tag, args...); + } + + + RP const& m_rp; + Functor const& m_func; + typename std::conditional< std::is_same::value,int,Tag>::type m_tag; +// value_type & m_v; + +}; + + +// ValueType: For reductions +template < typename RP + , typename Functor + , typename Tag + , typename ValueType + > +struct HostIterateTile < RP , Functor , Tag , ValueType , typename std::enable_if< !is_void::value >::type > +{ + using index_type = typename RP::index_type; + using point_type = typename RP::point_type; + + using value_type = ValueType; + + inline + HostIterateTile( RP const& rp, Functor const& func, value_type & v ) + : m_rp(rp) //Cuda 7.0 does not like braces... + , m_func(func) + , m_v(v) // use with non-void ValueType struct + { +// Errors due to braces rather than parenthesis for init (with cuda 7.0) +// /home/ndellin/kokkos/core/src/impl/KokkosExp_Host_IterateTile.hpp:1216:98: error: too many braces around initializer for ‘int’ [-fpermissive] +// /home/ndellin/kokkos/core/src/impl/KokkosExp_Host_IterateTile.hpp:1216:98: error: aggregate value used where an integer was expected + } + + inline + bool check_iteration_bounds( point_type& partial_tile , point_type& offset ) const { + bool is_full_tile = true; + + for ( int i = 0; i < RP::rank; ++i ) { + if ((offset[i] + m_rp.m_tile[i]) <= m_rp.m_upper[i]) { + partial_tile[i] = m_rp.m_tile[i] ; + } + else { + is_full_tile = false ; + partial_tile[i] = (m_rp.m_upper[i] - 1 - offset[i]) == 0 ? 1 + : (m_rp.m_upper[i] - m_rp.m_tile[i]) > 0 ? (m_rp.m_upper[i] - offset[i]) + : (m_rp.m_upper[i] - m_rp.m_lower[i]) ; // when single tile encloses range + } + } + + return is_full_tile ; + } // end check bounds + + + template + struct RankTag + { + typedef RankTag type; + enum { value = (int)Rank }; + }; + + +#if KOKKOS_ENABLE_NEW_LOOP_MACROS + template + inline + void + operator()(IType tile_idx) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + Tile_Loop_Type< RP::rank, (RP::inner_direction == RP::Left), index_type, Tag >::apply( m_v, m_func, full_tile, m_offset, m_rp.m_tile, m_tiledims ); + + } + +#else + template + inline + void + operator()(IType tile_idx) const + { operator_impl( tile_idx , RankTag() ); } + // added due to compiler error when using sfinae to choose operator based on rank + + + template + inline + void operator_impl( IType tile_idx , const RankTag<2> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_2L(index_type, m_tiledims) { + apply( LOOP_ARGS_2 ); + } + } else { +// #pragma simd + LOOP_2L(index_type, m_tiledims) { + apply( LOOP_ARGS_2 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_2R(index_type, m_tiledims) { + apply( LOOP_ARGS_2 ); + } + } else { +// #pragma simd + LOOP_2R(index_type, m_tiledims) { + apply( LOOP_ARGS_2 ); + } + } + } // end RP::Right + + } //end op() rank == 2 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<3> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_3L(index_type, m_tiledims) { + apply( LOOP_ARGS_3 ); + } + } else { +// #pragma simd + LOOP_3L(index_type, m_tiledims) { + apply( LOOP_ARGS_3 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_3R(index_type, m_tiledims) { + apply( LOOP_ARGS_3 ); + } + } else { +// #pragma simd + LOOP_3R(index_type, m_tiledims) { + apply( LOOP_ARGS_3 ); + } + } + } // end RP::Right + + } //end op() rank == 3 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<4> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_4L(index_type, m_tiledims) { + apply( LOOP_ARGS_4 ); + } + } else { +// #pragma simd + LOOP_4L(index_type, m_tiledims) { + apply( LOOP_ARGS_4 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_4R(index_type, m_tiledims) { + apply( LOOP_ARGS_4 ); + } + } else { +// #pragma simd + LOOP_4R(index_type, m_tiledims) { + apply( LOOP_ARGS_4 ); + } + } + } // end RP::Right + + } //end op() rank == 4 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<5> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_5L(index_type, m_tiledims) { + apply( LOOP_ARGS_5 ); + } + } else { +// #pragma simd + LOOP_5L(index_type, m_tiledims) { + apply( LOOP_ARGS_5 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_5R(index_type, m_tiledims) { + apply( LOOP_ARGS_5 ); + } + } else { +// #pragma simd + LOOP_5R(index_type, m_tiledims) { + apply( LOOP_ARGS_5 ); + } + } + } // end RP::Right + + } //end op() rank == 5 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<6> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_6L(index_type, m_tiledims) { + apply( LOOP_ARGS_6 ); + } + } else { +// #pragma simd + LOOP_6L(index_type, m_tiledims) { + apply( LOOP_ARGS_6 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_6R(index_type, m_tiledims) { + apply( LOOP_ARGS_6 ); + } + } else { +// #pragma simd + LOOP_6R(index_type, m_tiledims) { + apply( LOOP_ARGS_6 ); + } + } + } // end RP::Right + + } //end op() rank == 6 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<7> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_7L(index_type, m_tiledims) { + apply( LOOP_ARGS_7 ); + } + } else { +// #pragma simd + LOOP_7L(index_type, m_tiledims) { + apply( LOOP_ARGS_7 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_7R(index_type, m_tiledims) { + apply( LOOP_ARGS_7 ); + } + } else { +// #pragma simd + LOOP_7R(index_type, m_tiledims) { + apply( LOOP_ARGS_7 ); + } + } + } // end RP::Right + + } //end op() rank == 7 + + + template + inline + void operator_impl( IType tile_idx , const RankTag<8> ) const + { + point_type m_offset; + point_type m_tiledims; + + if (RP::outer_direction == RP::Left) { + for (int i=0; i=0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + tile_idx /= m_rp.m_tile_end[i]; + } + } + + //Check if offset+tiledim in bounds - if not, replace tile dims with the partial tile dims + const bool full_tile = check_iteration_bounds(m_tiledims , m_offset) ; + + if (RP::inner_direction == RP::Left) { + if ( full_tile ) { +// #pragma simd + LOOP_8L(index_type, m_tiledims) { + apply( LOOP_ARGS_8 ); + } + } else { +// #pragma simd + LOOP_8L(index_type, m_tiledims) { + apply( LOOP_ARGS_8 ); + } + } + } // end RP::Left + else { + if ( full_tile ) { +// #pragma simd + LOOP_8R(index_type, m_tiledims) { + apply( LOOP_ARGS_8 ); + } + } else { +// #pragma simd + LOOP_8R(index_type, m_tiledims) { + apply( LOOP_ARGS_8 ); + } + } + } // end RP::Right + + } //end op() rank == 8 +#endif + + + template + typename std::enable_if<( sizeof...(Args) == RP::rank && std::is_same::value), void>::type + apply(Args &&... args) const + { + m_func(args... , m_v); + } + + template + typename std::enable_if<( sizeof...(Args) == RP::rank && !std::is_same::value), void>::type + apply(Args &&... args) const + { + m_func( m_tag, args... , m_v); + } + + + RP const& m_rp; + Functor const& m_func; + value_type & m_v; + typename std::conditional< std::is_same::value,int,Tag>::type m_tag; + +}; + + +// ------------------------------------------------------------------ // + +// MDFunctor - wraps the range_policy and functor to pass to IterateTile +// Serial, Threads, OpenMP +// Cuda uses DeviceIterateTile directly within md_parallel_for +// ParallelReduce +template < typename MDRange, typename Functor, typename ValueType = void > +struct MDFunctor +{ + using range_policy = MDRange; + using functor_type = Functor; + using value_type = ValueType; + using work_tag = typename range_policy::work_tag; + using index_type = typename range_policy::index_type; + using iterate_type = typename Kokkos::Experimental::Impl::HostIterateTile< MDRange + , Functor + , work_tag + , value_type + >; + + + inline + MDFunctor( MDRange const& range, Functor const& f, ValueType & v ) + : m_range( range ) + , m_func( f ) + {} + + inline + MDFunctor( MDFunctor const& ) = default; + + inline + MDFunctor& operator=( MDFunctor const& ) = default; + + inline + MDFunctor( MDFunctor && ) = default; + + inline + MDFunctor& operator=( MDFunctor && ) = default; + +// KOKKOS_FORCEINLINE_FUNCTION //Caused cuda warning - __host__ warning + inline + void operator()(index_type t, value_type & v) const + { + iterate_type(m_range, m_func, v)(t); + } + + MDRange m_range; + Functor m_func; +}; + +// ParallelFor +template < typename MDRange, typename Functor > +struct MDFunctor< MDRange, Functor, void > +{ + using range_policy = MDRange; + using functor_type = Functor; + using work_tag = typename range_policy::work_tag; + using index_type = typename range_policy::index_type; + using iterate_type = typename Kokkos::Experimental::Impl::HostIterateTile< MDRange + , Functor + , work_tag + , void + >; + + + inline + MDFunctor( MDRange const& range, Functor const& f ) + : m_range( range ) + , m_func( f ) + {} + + inline + MDFunctor( MDFunctor const& ) = default; + + inline + MDFunctor& operator=( MDFunctor const& ) = default; + + inline + MDFunctor( MDFunctor && ) = default; + + inline + MDFunctor& operator=( MDFunctor && ) = default; + + inline + void operator()(index_type t) const + { + iterate_type(m_range, m_func)(t); + } + + MDRange m_range; + Functor m_func; +}; + +#undef KOKKOS_ENABLE_NEW_LOOP_MACROS + +} } } //end namespace Kokkos::Experimental::Impl + + +#endif diff --git a/lib/kokkos/core/src/impl/Kokkos_BitOps.hpp b/lib/kokkos/core/src/impl/Kokkos_BitOps.hpp index 0ffbc0548a..7d7fd3d133 100644 --- a/lib/kokkos/core/src/impl/Kokkos_BitOps.hpp +++ b/lib/kokkos/core/src/impl/Kokkos_BitOps.hpp @@ -56,12 +56,13 @@ int bit_scan_forward( unsigned i ) { #if defined( __CUDA_ARCH__ ) return __ffs(i) - 1; -#elif defined( __GNUC__ ) || defined( __GNUG__ ) - return __builtin_ffs(i) - 1; -#elif defined( __INTEL_COMPILER ) +#elif defined( KOKKOS_COMPILER_INTEL ) return _bit_scan_forward(i); +#elif defined( KOKKOS_COMPILER_IBM ) + return __cnttz4(i); +#elif defined( KOKKOS_COMPILER_GNU ) || defined( __GNUC__ ) || defined( __GNUG__ ) + return __builtin_ffs(i) - 1; #else - unsigned t = 1u; int r = 0; while ( i && ( i & t == 0 ) ) @@ -79,10 +80,12 @@ int bit_scan_reverse( unsigned i ) enum { shift = static_cast( sizeof(unsigned) * CHAR_BIT - 1 ) }; #if defined( __CUDA_ARCH__ ) return shift - __clz(i); +#elif defined( KOKKOS_COMPILER_INTEL ) + return _bit_scan_reverse(i); +#elif defined( KOKKOS_COMPILER_IBM ) + return shift - __cntlz4(i); #elif defined( __GNUC__ ) || defined( __GNUG__ ) return shift - __builtin_clz(i); -#elif defined( __INTEL_COMPILER ) - return _bit_scan_reverse(i); #else unsigned t = 1u << shift; int r = 0; @@ -101,10 +104,12 @@ int bit_count( unsigned i ) { #if defined( __CUDA_ARCH__ ) return __popc(i); -#elif defined( __GNUC__ ) || defined( __GNUG__ ) - return __builtin_popcount(i); #elif defined ( __INTEL_COMPILER ) return _popcnt32(i); +#elif defined( KOKKOS_COMPILER_IBM ) + return __popcnt4(i); +#elif defined( __GNUC__ ) || defined( __GNUG__ ) + return __builtin_popcount(i); #else // http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetNaive i = i - ( ( i >> 1 ) & ~0u / 3u ); // temp diff --git a/lib/kokkos/core/src/impl/Kokkos_Core.cpp b/lib/kokkos/core/src/impl/Kokkos_Core.cpp index cd38eaa9da..7c38430c44 100644 --- a/lib/kokkos/core/src/impl/Kokkos_Core.cpp +++ b/lib/kokkos/core/src/impl/Kokkos_Core.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -147,7 +147,7 @@ setenv("MEMKIND_HBW_NODES", "1", 0); } #endif -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) Kokkos::Profiling::initialize(); #endif } @@ -155,7 +155,7 @@ setenv("MEMKIND_HBW_NODES", "1", 0); void finalize_internal( const bool all_spaces = false ) { -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) Kokkos::Profiling::finalize(); #endif @@ -449,5 +449,323 @@ void fence() Impl::fence_internal(); } +void print_configuration( std::ostream & out , const bool detail ) +{ + std::ostringstream msg; + + msg << "Compiler:" << std::endl; +#ifdef KOKKOS_COMPILER_APPLECC + msg << " KOKKOS_COMPILER_APPLECC: " << KOKKOS_COMPILER_APPLECC << std::endl; +#endif +#ifdef KOKKOS_COMPILER_CLANG + msg << " KOKKOS_COMPILER_CLANG: " << KOKKOS_COMPILER_CLANG << std::endl; +#endif +#ifdef KOKKOS_COMPILER_CRAYC + msg << " KOKKOS_COMPILER_CRAYC: " << KOKKOS_COMPILER_CRAYC << std::endl; +#endif +#ifdef KOKKOS_COMPILER_GNU + msg << " KOKKOS_COMPILER_GNU: " << KOKKOS_COMPILER_GNU << std::endl; +#endif +#ifdef KOKKOS_COMPILER_IBM + msg << " KOKKOS_COMPILER_IBM: " << KOKKOS_COMPILER_IBM << std::endl; +#endif +#ifdef KOKKOS_COMPILER_INTEL + msg << " KOKKOS_COMPILER_INTEL: " << KOKKOS_COMPILER_INTEL << std::endl; +#endif +#ifdef KOKKOS_COMPILER_NVCC + msg << " KOKKOS_COMPILER_NVCC: " << KOKKOS_COMPILER_NVCC << std::endl; +#endif +#ifdef KOKKOS_COMPILER_PGI + msg << " KOKKOS_COMPILER_PGI: " << KOKKOS_COMPILER_PGI << std::endl; +#endif + + + msg << "Architecture:" << std::endl; +#ifdef KOKKOS_ENABLE_ISA_KNC + msg << " KOKKOS_ENABLE_ISA_KNC: yes" << std::endl; +#else + msg << " KOKKOS_ENABLE_ISA_KNC: no" << std::endl; +#endif +#ifdef KOKKOS_ENABLE_ISA_POWERPCLE + msg << " KOKKOS_ENABLE_ISA_POWERPCLE: yes" << std::endl; +#else + msg << " KOKKOS_ENABLE_ISA_POWERPCLE: no" << std::endl; +#endif +#ifdef KOKKOS_ENABLE_ISA_X86_64 + msg << " KOKKOS_ENABLE_ISA_X86_64: yes" << std::endl; +#else + msg << " KOKKOS_ENABLE_ISA_X86_64: no" << std::endl; +#endif + + + msg << "Devices:" << std::endl; + msg << " KOKKOS_ENABLE_CUDA: "; +#ifdef KOKKOS_ENABLE_CUDA + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_OPENMP: "; +#ifdef KOKKOS_ENABLE_OPENMP + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_PTHREAD: "; +#ifdef KOKKOS_ENABLE_PTHREAD + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_STDTHREAD: "; +#ifdef KOKKOS_ENABLE_STDTHREAD + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_WINTHREAD: "; +#ifdef KOKKOS_ENABLE_WINTHREAD + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_QTHREADS: "; +#ifdef KOKKOS_ENABLE_QTHREADS + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_SERIAL: "; +#ifdef KOKKOS_ENABLE_SERIAL + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + + + msg << "Default Device:" << std::endl; + msg << " KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA: "; +#ifdef KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP: "; +#ifdef KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS: "; +#ifdef KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS: "; +#ifdef KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL: "; +#ifdef KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + + + msg << "Atomics:" << std::endl; + msg << " KOKKOS_ENABLE_CUDA_ATOMICS: "; +#ifdef KOKKOS_ENABLE_CUDA_ATOMICS + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_GNU_ATOMICS: "; +#ifdef KOKKOS_ENABLE_GNU_ATOMICS + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_INTEL_ATOMICS: "; +#ifdef KOKKOS_ENABLE_INTEL_ATOMICS + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_OPENMP_ATOMICS: "; +#ifdef KOKKOS_ENABLE_OPENMP_ATOMICS + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_WINDOWS_ATOMICS: "; +#ifdef KOKKOS_ENABLE_WINDOWS_ATOMICS + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + + + msg << "Vectorization:" << std::endl; + msg << " KOKKOS_ENABLE_PRAGMA_IVDEP: "; +#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_PRAGMA_LOOPCOUNT: "; +#ifdef KOKKOS_ENABLE_PRAGMA_LOOPCOUNT + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_PRAGMA_SIMD: "; +#ifdef KOKKOS_ENABLE_PRAGMA_SIMD + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_PRAGMA_UNROLL: "; +#ifdef KOKKOS_ENABLE_PRAGMA_UNROLL + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_PRAGMA_VECTOR: "; +#ifdef KOKKOS_ENABLE_PRAGMA_VECTOR + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + + msg << "Memory:" << std::endl; + msg << " KOKKOS_ENABLE_HBWSPACE: "; +#ifdef KOKKOS_ENABLE_HBWSPACE + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_INTEL_MM_ALLOC: "; +#ifdef KOKKOS_ENABLE_INTEL_MM_ALLOC + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_POSIX_MEMALIGN: "; +#ifdef KOKKOS_ENABLE_POSIX_MEMALIGN + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + + + msg << "Options:" << std::endl; + msg << " KOKKOS_ENABLE_ASM: "; +#ifdef KOKKOS_ENABLE_ASM + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_CXX1Z: "; +#ifdef KOKKOS_ENABLE_CXX1Z + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK: "; +#ifdef KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_HWLOC: "; +#ifdef KOKKOS_ENABLE_HWLOC + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_LIBRT: "; +#ifdef KOKKOS_ENABLE_LIBRT + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_MPI: "; +#ifdef KOKKOS_ENABLE_MPI + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_PROFILING: "; +#ifdef KOKKOS_ENABLE_PROFILING + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + +#ifdef KOKKOS_ENABLE_CUDA + msg << "Cuda Options:" << std::endl; + msg << " KOKKOS_ENABLE_CUDA_LAMBDA: "; +#ifdef KOKKOS_ENABLE_CUDA_LAMBDA + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_CUDA_LDG_INTRINSIC: "; +#ifdef KOKKOS_ENABLE_CUDA_LDG_INTRINSIC + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE: "; +#ifdef KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_CUDA_UVM: "; +#ifdef KOKKOS_ENABLE_CUDA_UVM + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_CUSPARSE: "; +#ifdef KOKKOS_ENABLE_CUSPARSE + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + msg << " KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA: "; +#ifdef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA + msg << "yes" << std::endl; +#else + msg << "no" << std::endl; +#endif + +#endif + + msg << "\nRuntime Configuration:" << std::endl; +#ifdef KOKKOS_ENABLE_CUDA + Cuda::print_configuration(msg, detail); +#endif +#ifdef KOKKOS_ENABLE_OPENMP + OpenMP::print_configuration(msg, detail); +#endif +#if defined( KOKKOS_ENABLE_PTHREAD ) || defined( WINTHREAD ) + Threads::print_configuration(msg, detail); +#endif +#ifdef KOKKOS_ENABLE_QTHREADS + Qthreads::print_configuration(msg, detail); +#endif +#ifdef KOKKOS_ENABLE_SERIAL + Serial::print_configuration(msg, detail); +#endif + + out << msg.str() << std::endl; +} + } // namespace Kokkos diff --git a/lib/kokkos/core/src/impl/Kokkos_FunctorAnalysis.hpp b/lib/kokkos/core/src/impl/Kokkos_FunctorAnalysis.hpp new file mode 100644 index 0000000000..b425b3f19f --- /dev/null +++ b/lib/kokkos/core/src/impl/Kokkos_FunctorAnalysis.hpp @@ -0,0 +1,653 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef KOKKOS_FUNCTORANALYSIS_HPP +#define KOKKOS_FUNCTORANALYSIS_HPP + +#include +#include +#include +#include +#include + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { +namespace Impl { + +struct FunctorPatternInterface { + struct FOR {}; + struct REDUCE {}; + struct SCAN {}; +}; + +/** \brief Query Functor and execution policy argument tag for value type. + * + * If 'value_type' is not explicitly declared in the functor + * then attempt to deduce the type from FunctorType::operator() + * interface used by the pattern and policy. + * + * For the REDUCE pattern generate a Reducer and finalization function + * derived from what is available within the functor. + */ +template< typename PatternInterface , class Policy , class Functor > +struct FunctorAnalysis { +private: + + using FOR = FunctorPatternInterface::FOR ; + using REDUCE = FunctorPatternInterface::REDUCE ; + using SCAN = FunctorPatternInterface::SCAN ; + + //---------------------------------------- + + struct VOID {}; + + template< typename P = Policy , typename = std::false_type > + struct has_work_tag + { + using type = void ; + using wtag = VOID ; + }; + + template< typename P > + struct has_work_tag + < P , typename std::is_same< typename P::work_tag , void >::type > + { + using type = typename P::work_tag ; + using wtag = typename P::work_tag ; + }; + + using Tag = typename has_work_tag<>::type ; + using WTag = typename has_work_tag<>::wtag ; + + //---------------------------------------- + // Check for Functor::value_type, which is either a simple type T or T[] + + template< typename F , typename = std::false_type > + struct has_value_type { using type = void ; }; + + template< typename F > + struct has_value_type + < F , typename std::is_same< typename F::value_type , void >::type > + { + using type = typename F::value_type ; + + static_assert( ! std::is_reference< type >::value && + std::rank< type >::value <= 1 && + std::extent< type >::value == 0 + , "Kokkos Functor::value_type is T or T[]" ); + }; + + //---------------------------------------- + // If Functor::value_type does not exist then evaluate operator(), + // depending upon the pattern and whether the policy has a work tag, + // to determine the reduction or scan value_type. + + template< typename F + , typename P = PatternInterface + , typename V = typename has_value_type::type + , bool T = std::is_same< Tag , void >::value + > + struct deduce_value_type { using type = V ; }; + + template< typename F > + struct deduce_value_type< F , REDUCE , void , true > { + + template< typename M , typename A > + KOKKOS_INLINE_FUNCTION static + A deduce( void (Functor::*)( M , A & ) const ); + + using type = decltype( deduce( & F::operator() ) ); + }; + + template< typename F > + struct deduce_value_type< F , REDUCE , void , false > { + + template< typename M , typename A > + KOKKOS_INLINE_FUNCTION static + A deduce( void (Functor::*)( WTag , M , A & ) const ); + + template< typename M , typename A > + KOKKOS_INLINE_FUNCTION static + A deduce( void (Functor::*)( WTag const & , M , A & ) const ); + + using type = decltype( deduce( & F::operator() ) ); + }; + + template< typename F > + struct deduce_value_type< F , SCAN , void , true > { + + template< typename M , typename A , typename I > + KOKKOS_INLINE_FUNCTION static + A deduce( void (Functor::*)( M , A & , I ) const ); + + using type = decltype( deduce( & F::operator() ) ); + }; + + template< typename F > + struct deduce_value_type< F , SCAN , void , false > { + + template< typename M , typename A , typename I > + KOKKOS_INLINE_FUNCTION static + A deduce( void (Functor::*)( WTag , M , A & , I ) const ); + + template< typename M , typename A , typename I > + KOKKOS_INLINE_FUNCTION static + A deduce( void (Functor::*)( WTag const & , M , A & , I ) const ); + + using type = decltype( deduce( & F::operator() ) ); + }; + + //---------------------------------------- + + using candidate_type = typename deduce_value_type< Functor >::type ; + + enum { candidate_is_void = std::is_same< candidate_type , void >::value + , candidate_is_array = std::rank< candidate_type >::value == 1 }; + + //---------------------------------------- + +public: + + using value_type = typename std::remove_extent< candidate_type >::type ; + + static_assert( ! std::is_const< value_type >::value + , "Kokkos functor operator reduce argument cannot be const" ); + +private: + + // Stub to avoid defining a type 'void &' + using ValueType = typename + std::conditional< candidate_is_void , VOID , value_type >::type ; + +public: + + using pointer_type = typename + std::conditional< candidate_is_void , void , ValueType * >::type ; + + using reference_type = typename + std::conditional< candidate_is_array , ValueType * , typename + std::conditional< ! candidate_is_void , ValueType & , void > + ::type >::type ; + +private: + + template< bool IsArray , class FF > + KOKKOS_INLINE_FUNCTION static + typename std::enable_if< IsArray , unsigned >::type + get_length( FF const & f ) { return f.value_count ; } + + template< bool IsArray , class FF > + KOKKOS_INLINE_FUNCTION static + typename std::enable_if< ! IsArray , unsigned >::type + get_length( FF const & ) { return 1 ; } + +public: + + enum { StaticValueSize = ! candidate_is_void && + ! candidate_is_array + ? sizeof(ValueType) : 0 }; + + KOKKOS_FORCEINLINE_FUNCTION static + unsigned value_count( const Functor & f ) + { return FunctorAnalysis::template get_length< candidate_is_array >(f); } + + KOKKOS_FORCEINLINE_FUNCTION static + unsigned value_size( const Functor & f ) + { return FunctorAnalysis::template get_length< candidate_is_array >(f) * sizeof(ValueType); } + + //---------------------------------------- + + template< class Unknown > + KOKKOS_FORCEINLINE_FUNCTION static + unsigned value_count( const Unknown & ) + { return 1 ; } + + template< class Unknown > + KOKKOS_FORCEINLINE_FUNCTION static + unsigned value_size( const Unknown & ) + { return sizeof(ValueType); } + +private: + + enum INTERFACE : int + { DISABLE = 0 + , NO_TAG_NOT_ARRAY = 1 + , NO_TAG_IS_ARRAY = 2 + , HAS_TAG_NOT_ARRAY = 3 + , HAS_TAG_IS_ARRAY = 4 + , DEDUCED = + ! std::is_same< PatternInterface , REDUCE >::value ? DISABLE : ( + std::is_same::value + ? (candidate_is_array ? NO_TAG_IS_ARRAY : NO_TAG_NOT_ARRAY) + : (candidate_is_array ? HAS_TAG_IS_ARRAY : HAS_TAG_NOT_ARRAY) ) + }; + + //---------------------------------------- + // parallel_reduce join operator + + template< class F , INTERFACE > + struct has_join_function ; + + template< class F > + struct has_join_function< F , NO_TAG_NOT_ARRAY > + { + typedef volatile ValueType & vref_type ; + typedef volatile const ValueType & cvref_type ; + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void join( F const & f + , ValueType volatile * dst + , ValueType volatile const * src ) + { f.join( *dst , *src ); } + }; + + template< class F > + struct has_join_function< F , NO_TAG_IS_ARRAY > + { + typedef volatile ValueType * vref_type ; + typedef volatile const ValueType * cvref_type ; + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void join( F const & f + , ValueType volatile * dst + , ValueType volatile const * src ) + { f.join( dst , src ); } + }; + + template< class F > + struct has_join_function< F , HAS_TAG_NOT_ARRAY > + { + typedef volatile ValueType & vref_type ; + typedef volatile const ValueType & cvref_type ; + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag , vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag , vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag const & , vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag const & , vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void join( F const & f + , ValueType volatile * dst + , ValueType volatile const * src ) + { f.join( WTag() , *dst , *src ); } + }; + + template< class F > + struct has_join_function< F , HAS_TAG_IS_ARRAY > + { + typedef volatile ValueType * vref_type ; + typedef volatile const ValueType * cvref_type ; + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag , vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag , vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag const & , vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag const & , vref_type , cvref_type ) ); + + KOKKOS_INLINE_FUNCTION static + void join( F const & f + , ValueType volatile * dst + , ValueType volatile const * src ) + { f.join( WTag() , dst , src ); } + }; + + + template< class F = Functor + , INTERFACE = DEDUCED + , typename = void > + struct DeduceJoin + { + KOKKOS_INLINE_FUNCTION static + void join( F const & f + , ValueType volatile * dst + , ValueType volatile const * src ) + { + const int n = FunctorAnalysis::value_count( f ); + for ( int i = 0 ; i < n ; ++i ) dst[i] += src[i]; + } + }; + + template< class F > + struct DeduceJoin< F , DISABLE , void > + { + KOKKOS_INLINE_FUNCTION static + void join( F const & + , ValueType volatile * + , ValueType volatile const * ) {} + }; + + template< class F , INTERFACE I > + struct DeduceJoin< F , I , + decltype( has_join_function::enable_if( & F::join ) ) > + : public has_join_function {}; + + //---------------------------------------- + + template< class , INTERFACE > + struct has_init_function ; + + template< class F > + struct has_init_function< F , NO_TAG_NOT_ARRAY > + { + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void init( F const & f , ValueType * dst ) + { f.init( *dst ); } + }; + + template< class F > + struct has_init_function< F , NO_TAG_IS_ARRAY > + { + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void init( F const & f , ValueType * dst ) + { f.init( dst ); } + }; + + template< class F > + struct has_init_function< F , HAS_TAG_NOT_ARRAY > + { + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag , ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag const & , ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag , ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag const & , ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void init( F const & f , ValueType * dst ) + { f.init( WTag(), *dst ); } + }; + + template< class F > + struct has_init_function< F , HAS_TAG_IS_ARRAY > + { + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag , ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag const & , ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag , ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag const & , ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void init( F const & f , ValueType * dst ) + { f.init( WTag(), dst ); } + }; + + template< class F = Functor + , INTERFACE = DEDUCED + , typename = void > + struct DeduceInit + { + KOKKOS_INLINE_FUNCTION static + void init( F const & , ValueType * dst ) { new(dst) ValueType(); } + }; + + template< class F > + struct DeduceInit< F , DISABLE , void > + { + KOKKOS_INLINE_FUNCTION static + void init( F const & , ValueType * ) {} + }; + + template< class F , INTERFACE I > + struct DeduceInit< F , I , + decltype( has_init_function::enable_if( & F::init ) ) > + : public has_init_function {}; + + //---------------------------------------- + +public: + + struct Reducer + { + private: + + Functor const & m_functor ; + ValueType * const m_result ; + int const m_length ; + + public: + + using reducer = Reducer ; + using value_type = FunctorAnalysis::value_type ; + using memory_space = void ; + using reference_type = FunctorAnalysis::reference_type ; + + KOKKOS_INLINE_FUNCTION + void join( ValueType volatile * dst + , ValueType volatile const * src ) const noexcept + { DeduceJoin<>::join( m_functor , dst , src ); } + + KOKKOS_INLINE_FUNCTION + void init( ValueType * dst ) const noexcept + { DeduceInit<>::init( m_functor , dst ); } + + KOKKOS_INLINE_FUNCTION explicit + constexpr Reducer( Functor const & arg_functor + , ValueType * arg_value = 0 + , int arg_length = 0 ) noexcept + : m_functor( arg_functor ), m_result(arg_value), m_length(arg_length) {} + + KOKKOS_INLINE_FUNCTION + constexpr int length() const noexcept { return m_length ; } + + KOKKOS_INLINE_FUNCTION + ValueType & operator[]( int i ) const noexcept + { return m_result[i]; } + + private: + + template< bool IsArray > + constexpr + typename std::enable_if< IsArray , ValueType * >::type + ref() const noexcept { return m_result ; } + + template< bool IsArray > + constexpr + typename std::enable_if< ! IsArray , ValueType & >::type + ref() const noexcept { return *m_result ; } + + public: + + KOKKOS_INLINE_FUNCTION + auto result() const noexcept + -> decltype( Reducer::template ref< candidate_is_array >() ) + { return Reducer::template ref< candidate_is_array >(); } + }; + + //---------------------------------------- + +private: + + template< class , INTERFACE > + struct has_final_function ; + + // No tag, not array + template< class F > + struct has_final_function< F , NO_TAG_NOT_ARRAY > + { + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void final( F const & f , ValueType * dst ) + { f.final( *dst ); } + }; + + // No tag, is array + template< class F > + struct has_final_function< F , NO_TAG_IS_ARRAY > + { + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void final( F const & f , ValueType * dst ) + { f.final( dst ); } + }; + + // Has tag, not array + template< class F > + struct has_final_function< F , HAS_TAG_NOT_ARRAY > + { + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag , ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag const & , ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag , ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag const & , ValueType & ) ); + + KOKKOS_INLINE_FUNCTION static + void final( F const & f , ValueType * dst ) + { f.final( WTag(), *dst ); } + }; + + // Has tag, is array + template< class F > + struct has_final_function< F , HAS_TAG_IS_ARRAY > + { + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag , ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (F::*)( WTag const & , ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag , ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void enable_if( void (*)( WTag const & , ValueType * ) ); + + KOKKOS_INLINE_FUNCTION static + void final( F const & f , ValueType * dst ) + { f.final( WTag(), dst ); } + }; + + template< class F = Functor + , INTERFACE = DEDUCED + , typename = void > + struct DeduceFinal + { + KOKKOS_INLINE_FUNCTION + static void final( F const & , ValueType * ) {} + }; + + template< class F , INTERFACE I > + struct DeduceFinal< F , I , + decltype( has_final_function::enable_if( & F::final ) ) > + : public has_init_function {}; + +public: + + static void final( Functor const & f , ValueType * result ) + { DeduceFinal<>::final( f , result ); } + +}; + +} // namespace Impl +} // namespace Kokkos + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +#endif /* KOKKOS_FUNCTORANALYSIS_HPP */ + diff --git a/lib/kokkos/core/src/impl/Kokkos_HBWSpace.cpp b/lib/kokkos/core/src/impl/Kokkos_HBWSpace.cpp index 96d30d0c4a..eb1f5ce96c 100644 --- a/lib/kokkos/core/src/impl/Kokkos_HBWSpace.cpp +++ b/lib/kokkos/core/src/impl/Kokkos_HBWSpace.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -62,7 +62,7 @@ #include #endif -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) #include #endif @@ -198,7 +198,7 @@ void * HBWSpace::allocate( const size_t arg_alloc_size ) const case STD_MALLOC: msg << "STD_MALLOC" ; break ; } msg << " ]( " << arg_alloc_size << " ) FAILED" ; - if ( ptr == NULL ) { msg << " NULL" ; } + if ( ptr == NULL ) { msg << " NULL" ; } else { msg << " NOT ALIGNED " << ptr ; } std::cerr << msg.str() << std::endl ; @@ -218,7 +218,7 @@ void HBWSpace::deallocate( void * const arg_alloc_ptr , const size_t arg_alloc_s if ( m_alloc_mech == STD_MALLOC ) { void * alloc_ptr = *(reinterpret_cast(arg_alloc_ptr) -1); memkind_free(MEMKIND_TYPE, alloc_ptr ); - } + } } } @@ -249,7 +249,7 @@ deallocate( SharedAllocationRecord< void , void > * arg_rec ) SharedAllocationRecord< Kokkos::Experimental::HBWSpace , void >:: ~SharedAllocationRecord() { - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::deallocateData( Kokkos::Profiling::SpaceHandle(Kokkos::Experimental::HBWSpace::name()),RecordBase::m_alloc_ptr->m_label, @@ -278,7 +278,7 @@ SharedAllocationRecord( const Kokkos::Experimental::HBWSpace & arg_space ) , m_space( arg_space ) { - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::allocateData(Kokkos::Profiling::SpaceHandle(arg_space.name()),arg_label,data(),arg_alloc_size); } @@ -297,7 +297,7 @@ SharedAllocationRecord( const Kokkos::Experimental::HBWSpace & arg_space void * SharedAllocationRecord< Kokkos::Experimental::HBWSpace , void >:: allocate_tracked( const Kokkos::Experimental::HBWSpace & arg_space - , const std::string & arg_alloc_label + , const std::string & arg_alloc_label , const size_t arg_alloc_size ) { if ( ! arg_alloc_size ) return (void *) 0 ; diff --git a/lib/kokkos/core/src/impl/Kokkos_HostSpace.cpp b/lib/kokkos/core/src/impl/Kokkos_HostSpace.cpp index 3cd603728e..67be86c9a3 100644 --- a/lib/kokkos/core/src/impl/Kokkos_HostSpace.cpp +++ b/lib/kokkos/core/src/impl/Kokkos_HostSpace.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,14 +36,14 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ #include #include -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) #include #endif /*--------------------------------------------------------------------------*/ @@ -292,7 +292,7 @@ void * HostSpace::allocate( const size_t arg_alloc_size ) const case INTEL_MM_ALLOC: msg << "INTEL_MM_ALLOC" ; break ; } msg << " ]( " << arg_alloc_size << " ) FAILED" ; - if ( ptr == NULL ) { msg << " NULL" ; } + if ( ptr == NULL ) { msg << " NULL" ; } else { msg << " NOT ALIGNED " << ptr ; } std::cerr << msg.str() << std::endl ; @@ -312,7 +312,7 @@ void HostSpace::deallocate( void * const arg_alloc_ptr , const size_t arg_alloc_ if ( m_alloc_mech == STD_MALLOC ) { void * alloc_ptr = *(reinterpret_cast(arg_alloc_ptr) -1); free( alloc_ptr ); - } + } #if defined( KOKKOS_ENABLE_INTEL_MM_ALLOC ) else if ( m_alloc_mech == INTEL_MM_ALLOC ) { @@ -359,7 +359,7 @@ deallocate( SharedAllocationRecord< void , void > * arg_rec ) SharedAllocationRecord< Kokkos::HostSpace , void >:: ~SharedAllocationRecord() { - #if (KOKKOS_ENABLE_PROFILING) + #if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::deallocateData( Kokkos::Profiling::SpaceHandle(Kokkos::HostSpace::name()),RecordBase::m_alloc_ptr->m_label, @@ -388,7 +388,7 @@ SharedAllocationRecord( const Kokkos::HostSpace & arg_space ) , m_space( arg_space ) { -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) if(Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::allocateData(Kokkos::Profiling::SpaceHandle(arg_space.name()),arg_label,data(),arg_alloc_size); } @@ -406,7 +406,7 @@ SharedAllocationRecord( const Kokkos::HostSpace & arg_space void * SharedAllocationRecord< Kokkos::HostSpace , void >:: allocate_tracked( const Kokkos::HostSpace & arg_space - , const std::string & arg_alloc_label + , const std::string & arg_alloc_label , const size_t arg_alloc_size ) { if ( ! arg_alloc_size ) return (void *) 0 ; diff --git a/lib/kokkos/core/src/impl/Kokkos_HostThreadTeam.cpp b/lib/kokkos/core/src/impl/Kokkos_HostThreadTeam.cpp new file mode 100644 index 0000000000..ac200209c7 --- /dev/null +++ b/lib/kokkos/core/src/impl/Kokkos_HostThreadTeam.cpp @@ -0,0 +1,463 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include +#include +#include +#include +#include + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { +namespace Impl { + +void HostThreadTeamData::organize_pool + ( HostThreadTeamData * members[] , const int size ) +{ + bool ok = true ; + + // Verify not already a member of a pool: + for ( int rank = 0 ; rank < size && ok ; ++rank ) { + ok = ( 0 != members[rank] ) && ( 0 == members[rank]->m_pool_scratch ); + } + + if ( ok ) { + + int64_t * const root_scratch = members[0]->m_scratch ; + + for ( int i = m_pool_rendezvous ; i < m_pool_reduce ; ++i ) { + root_scratch[i] = 0 ; + } + + { + HostThreadTeamData ** const pool = + (HostThreadTeamData **) (root_scratch + m_pool_members); + + // team size == 1, league size == pool_size + + for ( int rank = 0 ; rank < size ; ++rank ) { + HostThreadTeamData * const mem = members[ rank ] ; + mem->m_pool_scratch = root_scratch ; + mem->m_team_scratch = mem->m_scratch ; + mem->m_pool_rank = rank ; + mem->m_pool_size = size ; + mem->m_team_base = rank ; + mem->m_team_rank = 0 ; + mem->m_team_size = 1 ; + mem->m_team_alloc = 1 ; + mem->m_league_rank = rank ; + mem->m_league_size = size ; + mem->m_pool_rendezvous_step = 0 ; + mem->m_team_rendezvous_step = 0 ; + pool[ rank ] = mem ; + } + } + + Kokkos::memory_fence(); + } + else { + Kokkos::Impl::throw_runtime_exception("Kokkos::Impl::HostThreadTeamData::organize_pool ERROR pool already exists"); + } +} + +void HostThreadTeamData::disband_pool() +{ + m_work_range.first = -1 ; + m_work_range.second = -1 ; + m_pool_scratch = 0 ; + m_team_scratch = 0 ; + m_pool_rank = 0 ; + m_pool_size = 1 ; + m_team_base = 0 ; + m_team_rank = 0 ; + m_team_size = 1 ; + m_team_alloc = 1 ; + m_league_rank = 0 ; + m_league_size = 1 ; + m_pool_rendezvous_step = 0 ; + m_team_rendezvous_step = 0 ; +} + +int HostThreadTeamData::organize_team( const int team_size ) +{ + // Pool is initialized + const bool ok_pool = 0 != m_pool_scratch ; + + // Team is not set + const bool ok_team = + m_team_scratch == m_scratch && + m_team_base == m_pool_rank && + m_team_rank == 0 && + m_team_size == 1 && + m_team_alloc == 1 && + m_league_rank == m_pool_rank && + m_league_size == m_pool_size ; + + if ( ok_pool && ok_team ) { + + if ( team_size <= 0 ) return 0 ; // No teams to organize + + if ( team_size == 1 ) return 1 ; // Already organized in teams of one + + HostThreadTeamData * const * const pool = + (HostThreadTeamData **) (m_pool_scratch + m_pool_members); + + // "league_size" in this context is the number of concurrent teams + // that the pool can accommodate. Excess threads are idle. + const int league_size = m_pool_size / team_size ; + const int team_alloc_size = m_pool_size / league_size ; + const int team_alloc_rank = m_pool_rank % team_alloc_size ; + const int league_rank = m_pool_rank / team_alloc_size ; + const int team_base_rank = league_rank * team_alloc_size ; + + m_team_scratch = pool[ team_base_rank ]->m_scratch ; + m_team_base = team_base_rank ; + // This needs to check overflow, if m_pool_size % team_alloc_size !=0 + // there are two corner cases: + // (i) if team_alloc_size == team_size there might be a non-full + // zombi team around (for example m_pool_size = 5 and team_size = 2 + // (ii) if team_alloc > team_size then the last team might have less + // threads than the others + m_team_rank = ( team_base_rank + team_size <= m_pool_size ) && + ( team_alloc_rank < team_size ) ? + team_alloc_rank : -1; + m_team_size = team_size ; + m_team_alloc = team_alloc_size ; + m_league_rank = league_rank ; + m_league_size = league_size ; + m_team_rendezvous_step = 0 ; + + if ( team_base_rank == m_pool_rank ) { + // Initialize team's rendezvous memory + for ( int i = m_team_rendezvous ; i < m_pool_reduce ; ++i ) { + m_scratch[i] = 0 ; + } + // Make sure team's rendezvous memory initialized + // is written before proceeding. + Kokkos::memory_fence(); + } + + // Organizing threads into a team performs a barrier across the + // entire pool to insure proper initialization of the team + // rendezvous mechanism before a team rendezvous can be performed. + + if ( pool_rendezvous() ) { + pool_rendezvous_release(); + } + } + else { + Kokkos::Impl::throw_runtime_exception("Kokkos::Impl::HostThreadTeamData::organize_team ERROR"); + } + + return 0 <= m_team_rank ; +} + +void HostThreadTeamData::disband_team() +{ + m_team_scratch = m_scratch ; + m_team_base = m_pool_rank ; + m_team_rank = 0 ; + m_team_size = 1 ; + m_team_alloc = 1 ; + m_league_rank = m_pool_rank ; + m_league_size = m_pool_size ; + m_team_rendezvous_step = 0 ; +} + +//---------------------------------------------------------------------------- +/* pattern for rendezvous + * + * if ( rendezvous() ) { + * ... all other threads are still in team_rendezvous() ... + * rendezvous_release(); + * ... all other threads are released from team_rendezvous() ... + * } + */ + +int HostThreadTeamData::rendezvous( int64_t * const buffer + , int & rendezvous_step + , int const size + , int const rank ) noexcept +{ + enum : int { shift_byte = 3 }; + enum : int { size_byte = ( 01 << shift_byte ) }; // == 8 + enum : int { mask_byte = size_byte - 1 }; + + enum : int { shift_mem_cycle = 2 }; + enum : int { size_mem_cycle = ( 01 << shift_mem_cycle ) }; // == 4 + enum : int { mask_mem_cycle = size_mem_cycle - 1 }; + + // Cycle step values: 1 <= step <= size_val_cycle + // An odd multiple of memory cycle so that when a memory location + // is reused it has a different value. + // Must be representable within a single byte: size_val_cycle < 16 + + enum : int { size_val_cycle = 3 * size_mem_cycle }; + + // Requires: + // Called by rank = [ 0 .. size ) + // buffer aligned to int64_t[4] + + // A sequence of rendezvous uses four cycled locations in memory + // and non-equal cycled synchronization values to + // 1) prevent rendezvous from overtaking one another and + // 2) give each spin wait location an int64_t[4] span + // so that it has its own cache line. + + const int step = ( rendezvous_step % size_val_cycle ) + 1 ; + + rendezvous_step = step ; + + // The leading int64_t[4] span is for thread 0 to write + // and all other threads to read spin-wait. + // sync_offset is the index into this array for this step. + + const int sync_offset = ( step & mask_mem_cycle ) + size_mem_cycle ; + + union { + int64_t full ; + int8_t byte[8] ; + } value ; + + if ( rank ) { + + const int group_begin = rank << shift_byte ; // == rank * size_byte + + if ( group_begin < size ) { + + // This thread waits for threads + // [ group_begin .. group_begin + 8 ) + // [ rank*8 .. rank*8 + 8 ) + // to write to their designated bytes. + + const int end = group_begin + size_byte < size + ? size_byte : size - group_begin ; + + value.full = 0 ; + for ( int i = 0 ; i < end ; ++i ) value.byte[i] = int8_t( step ); + + store_fence(); // This should not be needed but fixes #742 + + spinwait_until_equal( buffer[ (rank << shift_mem_cycle) + sync_offset ] + , value.full ); + } + + { + // This thread sets its designated byte. + // ( rank % size_byte ) + + // ( ( rank / size_byte ) * size_byte * size_mem_cycle ) + + // ( sync_offset * size_byte ) + const int offset = ( rank & mask_byte ) + + ( ( rank & ~mask_byte ) << shift_mem_cycle ) + + ( sync_offset << shift_byte ); + + // All of this thread's previous memory stores must be complete before + // this thread stores the step value at this thread's designated byte + // in the shared synchronization array. + + Kokkos::memory_fence(); + + ((volatile int8_t*) buffer)[ offset ] = int8_t( step ); + + // Memory fence to push the previous store out + Kokkos::memory_fence(); + } + + // Wait for thread 0 to release all other threads + + spinwait_until_equal( buffer[ step & mask_mem_cycle ] , int64_t(step) ); + + } + else { + // Thread 0 waits for threads [1..7] + // to write to their designated bytes. + + const int end = size_byte < size ? 8 : size ; + + value.full = 0 ; + for ( int i = 1 ; i < end ; ++i ) value.byte[i] = int8_t( step ); + + spinwait_until_equal( buffer[ sync_offset ], value.full ); + } + + return rank ? 0 : 1 ; +} + +void HostThreadTeamData:: + rendezvous_release( int64_t * const buffer + , int const rendezvous_step ) noexcept +{ + enum : int { shift_mem_cycle = 2 }; + enum : int { size_mem_cycle = ( 01 << shift_mem_cycle ) }; // == 4 + enum : int { mask_mem_cycle = size_mem_cycle - 1 }; + + // Requires: + // Called after team_rendezvous + // Called only by true == team_rendezvous(root) + + // Memory fence to be sure all previous writes are complete: + Kokkos::memory_fence(); + + ((volatile int64_t*) buffer)[ rendezvous_step & mask_mem_cycle ] = + int64_t( rendezvous_step ); + + // Memory fence to push the store out + Kokkos::memory_fence(); +} + +//---------------------------------------------------------------------------- + +int HostThreadTeamData::get_work_stealing() noexcept +{ + pair_int_t w( -1 , -1 ); + + if ( 1 == m_team_size || team_rendezvous() ) { + + // Attempt first from beginning of my work range + for ( int attempt = m_work_range.first < m_work_range.second ; attempt ; ) { + + // Query and attempt to update m_work_range + // from: [ w.first , w.second ) + // to: [ w.first + 1 , w.second ) = w_new + // + // If w is invalid then is just a query. + + const pair_int_t w_new( w.first + 1 , w.second ); + + w = Kokkos::atomic_compare_exchange( & m_work_range, w, w_new ); + + if ( w.first < w.second ) { + // m_work_range is viable + + // If steal is successful then don't repeat attempt to steal + attempt = ! ( w_new.first == w.first + 1 && + w_new.second == w.second ); + } + else { + // m_work_range is not viable + w.first = -1 ; + w.second = -1 ; + + attempt = 0 ; + } + } + + if ( w.first == -1 && m_steal_rank != m_pool_rank ) { + + HostThreadTeamData * const * const pool = + (HostThreadTeamData**)( m_pool_scratch + m_pool_members ); + + // Attempt from begining failed, try to steal from end of neighbor + + pair_int_t volatile * steal_range = + & ( pool[ m_steal_rank ]->m_work_range ); + + for ( int attempt = true ; attempt ; ) { + + // Query and attempt to update steal_work_range + // from: [ w.first , w.second ) + // to: [ w.first , w.second - 1 ) = w_new + // + // If w is invalid then is just a query. + + const pair_int_t w_new( w.first , w.second - 1 ); + + w = Kokkos::atomic_compare_exchange( steal_range, w, w_new ); + + if ( w.first < w.second ) { + // steal_work_range is viable + + // If steal is successful then don't repeat attempt to steal + attempt = ! ( w_new.first == w.first && + w_new.second == w.second - 1 ); + } + else { + // steal_work_range is not viable, move to next member + w.first = -1 ; + w.second = -1 ; + + // We need to figure out whether the next team is active + // m_steal_rank + m_team_alloc could be the next base_rank to steal from + // but only if there are another m_team_size threads available so that that + // base rank has a full team. + m_steal_rank = m_steal_rank + m_team_alloc + m_team_size <= m_pool_size ? + m_steal_rank + m_team_alloc : 0; + + steal_range = & ( pool[ m_steal_rank ]->m_work_range ); + + // If tried all other members then don't repeat attempt to steal + attempt = m_steal_rank != m_pool_rank ; + } + } + + if ( w.first != -1 ) w.first = w.second - 1 ; + } + + if ( 1 < m_team_size ) { + // Must share the work index + *((int volatile *) team_reduce()) = w.first ; + + team_rendezvous_release(); + } + } + else if ( 1 < m_team_size ) { + w.first = *((int volatile *) team_reduce()); + } + + // May exit because successfully stole work and w is good. + // May exit because no work left to steal and w = (-1,-1). + +#if 0 +fprintf(stdout,"HostThreadTeamData::get_work_stealing() pool(%d of %d) %d\n" + , m_pool_rank , m_pool_size , w.first ); +fflush(stdout); +#endif + + return w.first ; +} + +} // namespace Impl +} // namespace Kokkos + diff --git a/lib/kokkos/core/src/impl/Kokkos_HostThreadTeam.hpp b/lib/kokkos/core/src/impl/Kokkos_HostThreadTeam.hpp new file mode 100644 index 0000000000..6b5918eaef --- /dev/null +++ b/lib/kokkos/core/src/impl/Kokkos_HostThreadTeam.hpp @@ -0,0 +1,1090 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef KOKKOS_IMPL_HOSTTHREADTEAM_HPP +#define KOKKOS_IMPL_HOSTTHREADTEAM_HPP + +#include +#include +#include +#include +#include +#include +#include + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { +namespace Impl { + +template< class HostExecSpace > +class HostThreadTeamMember ; + +class HostThreadTeamData { +public: + + template< class > friend class HostThreadTeamMember ; + + // Assume upper bounds on number of threads: + // pool size <= 1024 threads + // pool rendezvous <= ( 1024 / 8 ) * 4 + 4 = 2052 + // team size <= 64 threads + // team rendezvous <= ( 64 / 8 ) * 4 + 4 = 36 + + enum : int { max_pool_members = 1024 }; + enum : int { max_team_members = 64 }; + enum : int { max_pool_rendezvous = ( max_pool_members / 8 ) * 4 + 4 }; + enum : int { max_team_rendezvous = ( max_team_members / 8 ) * 4 + 4 }; + +private: + + // per-thread scratch memory buffer chunks: + // + // [ pool_members ] = [ m_pool_members .. m_pool_rendezvous ) + // [ pool_rendezvous ] = [ m_pool_rendezvous .. m_team_rendezvous ) + // [ team_rendezvous ] = [ m_team_rendezvous .. m_pool_reduce ) + // [ pool_reduce ] = [ m_pool_reduce .. m_team_reduce ) + // [ team_reduce ] = [ m_team_reduce .. m_team_shared ) + // [ team_shared ] = [ m_team_shared .. m_thread_local ) + // [ thread_local ] = [ m_thread_local .. m_scratch_size ) + + enum : int { m_pool_members = 0 }; + enum : int { m_pool_rendezvous = m_pool_members + max_pool_members }; + enum : int { m_team_rendezvous = m_pool_rendezvous + max_pool_rendezvous }; + enum : int { m_pool_reduce = m_team_rendezvous + max_team_rendezvous }; + + using pair_int_t = Kokkos::pair ; + + pair_int_t m_work_range ; + int64_t m_work_end ; + int64_t * m_scratch ; // per-thread buffer + int64_t * m_pool_scratch ; // == pool[0]->m_scratch + int64_t * m_team_scratch ; // == pool[ 0 + m_team_base ]->m_scratch + int m_pool_rank ; + int m_pool_size ; + int m_team_reduce ; + int m_team_shared ; + int m_thread_local ; + int m_scratch_size ; + int m_team_base ; + int m_team_rank ; + int m_team_size ; + int m_team_alloc ; + int m_league_rank ; + int m_league_size ; + int m_work_chunk ; + int m_steal_rank ; // work stealing rank + int mutable m_pool_rendezvous_step ; + int mutable m_team_rendezvous_step ; + + HostThreadTeamData * team_member( int r ) const noexcept + { return ((HostThreadTeamData**)(m_pool_scratch+m_pool_members))[m_team_base+r]; } + + // Rendezvous pattern: + // if ( rendezvous(root) ) { + // ... only root thread here while all others wait ... + // rendezvous_release(); + // } + // else { + // ... all other threads release here ... + // } + // + // Requires: buffer[ ( max_threads / 8 ) * 4 + 4 ]; 0 == max_threads % 8 + // + static + int rendezvous( int64_t * const buffer + , int & rendezvous_step + , int const size + , int const rank ) noexcept ; + + static + void rendezvous_release( int64_t * const buffer + , int const rendezvous_step ) noexcept ; + +public: + + inline + int team_rendezvous( int const root ) const noexcept + { + return 1 == m_team_size ? 1 : + rendezvous( m_team_scratch + m_team_rendezvous + , m_team_rendezvous_step + , m_team_size + , ( m_team_rank + m_team_size - root ) % m_team_size ); + } + + inline + int team_rendezvous() const noexcept + { + return 1 == m_team_size ? 1 : + rendezvous( m_team_scratch + m_team_rendezvous + , m_team_rendezvous_step + , m_team_size + , m_team_rank ); + } + + inline + void team_rendezvous_release() const noexcept + { + if ( 1 < m_team_size ) { + rendezvous_release( m_team_scratch + m_team_rendezvous + , m_team_rendezvous_step ); + } + } + + inline + int pool_rendezvous() const noexcept + { + return 1 == m_pool_size ? 1 : + rendezvous( m_pool_scratch + m_pool_rendezvous + , m_pool_rendezvous_step + , m_pool_size + , m_pool_rank ); + } + + inline + void pool_rendezvous_release() const noexcept + { + if ( 1 < m_pool_size ) { + rendezvous_release( m_pool_scratch + m_pool_rendezvous + , m_pool_rendezvous_step ); + } + } + + //---------------------------------------- + + constexpr HostThreadTeamData() noexcept + : m_work_range(-1,-1) + , m_work_end(0) + , m_scratch(0) + , m_pool_scratch(0) + , m_team_scratch(0) + , m_pool_rank(0) + , m_pool_size(1) + , m_team_reduce(0) + , m_team_shared(0) + , m_thread_local(0) + , m_scratch_size(0) + , m_team_base(0) + , m_team_rank(0) + , m_team_size(1) + , m_team_alloc(1) + , m_league_rank(0) + , m_league_size(1) + , m_work_chunk(0) + , m_steal_rank(0) + , m_pool_rendezvous_step(0) + , m_team_rendezvous_step(0) + {} + + //---------------------------------------- + // Organize array of members into a pool. + // The 0th member is the root of the pool. + // Requires: members are not already in a pool. + // Requires: called by one thread. + // Pool members are ordered as "close" - sorted by NUMA and then CORE + // Each thread is its own team with team_size == 1. + static void organize_pool( HostThreadTeamData * members[] + , const int size ); + + // Called by each thread within the pool + void disband_pool(); + + //---------------------------------------- + // Each thread within a pool organizes itself into a team. + // Must be called by all threads of the pool. + // Organizing threads into a team performs a barrier across the + // entire pool to insure proper initialization of the team + // rendezvous mechanism before a team rendezvous can be performed. + // + // Return true if a valid member of a team. + // Return false if not a member and thread should be idled. + int organize_team( const int team_size ); + + // Each thread within a pool disbands itself from current team. + // Each thread becomes its own team with team_size == 1. + // Must be called by all threads of the pool. + void disband_team(); + + //---------------------------------------- + + constexpr int pool_rank() const { return m_pool_rank ; } + constexpr int pool_size() const { return m_pool_size ; } + + HostThreadTeamData * pool_member( int r ) const noexcept + { return ((HostThreadTeamData**)(m_pool_scratch+m_pool_members))[r]; } + + //---------------------------------------- + +private: + + enum : int { mask_to_16 = 0x0f }; // align to 16 bytes + enum : int { shift_to_8 = 3 }; // size to 8 bytes + +public: + + static constexpr int align_to_int64( int n ) + { return ( ( n + mask_to_16 ) & ~mask_to_16 ) >> shift_to_8 ; } + + constexpr int pool_reduce_bytes() const + { return m_scratch_size ? sizeof(int64_t) * ( m_team_reduce - m_pool_reduce ) : 0 ; } + + constexpr int team_reduce_bytes() const + { return sizeof(int64_t) * ( m_team_shared - m_team_reduce ); } + + constexpr int team_shared_bytes() const + { return sizeof(int64_t) * ( m_thread_local - m_team_shared ); } + + constexpr int thread_local_bytes() const + { return sizeof(int64_t) * ( m_scratch_size - m_thread_local ); } + + constexpr int scratch_bytes() const + { return sizeof(int64_t) * m_scratch_size ; } + + // Memory chunks: + + int64_t * scratch_buffer() const noexcept + { return m_scratch ; } + + int64_t * pool_reduce() const noexcept + { return m_pool_scratch + m_pool_reduce ; } + + int64_t * pool_reduce_local() const noexcept + { return m_scratch + m_pool_reduce ; } + + int64_t * team_reduce() const noexcept + { return m_team_scratch + m_team_reduce ; } + + int64_t * team_reduce_local() const noexcept + { return m_scratch + m_team_reduce ; } + + int64_t * team_shared() const noexcept + { return m_team_scratch + m_team_shared ; } + + int64_t * local_scratch() const noexcept + { return m_scratch + m_thread_local ; } + + // Given: + // pool_reduce_size = number bytes for pool reduce + // team_reduce_size = number bytes for team reduce + // team_shared_size = number bytes for team shared memory + // thread_local_size = number bytes for thread local memory + // Return: + // total number of bytes that must be allocated + static + size_t scratch_size( int pool_reduce_size + , int team_reduce_size + , int team_shared_size + , int thread_local_size ) + { + pool_reduce_size = align_to_int64( pool_reduce_size ); + team_reduce_size = align_to_int64( team_reduce_size ); + team_shared_size = align_to_int64( team_shared_size ); + thread_local_size = align_to_int64( thread_local_size ); + + const size_t total_bytes = ( + m_pool_reduce + + pool_reduce_size + + team_reduce_size + + team_shared_size + + thread_local_size ) * sizeof(int64_t); + + return total_bytes ; + } + + // Given: + // alloc_ptr = pointer to allocated memory + // alloc_size = number bytes of allocated memory + // pool_reduce_size = number bytes for pool reduce/scan operations + // team_reduce_size = number bytes for team reduce/scan operations + // team_shared_size = number bytes for team-shared memory + // thread_local_size = number bytes for thread-local memory + // Return: + // total number of bytes that must be allocated + void scratch_assign( void * const alloc_ptr + , size_t const alloc_size + , int pool_reduce_size + , int team_reduce_size + , int team_shared_size + , int /* thread_local_size */ ) + { + pool_reduce_size = align_to_int64( pool_reduce_size ); + team_reduce_size = align_to_int64( team_reduce_size ); + team_shared_size = align_to_int64( team_shared_size ); + // thread_local_size = align_to_int64( thread_local_size ); + + m_scratch = (int64_t *) alloc_ptr ; + m_team_reduce = m_pool_reduce + pool_reduce_size ; + m_team_shared = m_team_reduce + team_reduce_size ; + m_thread_local = m_team_shared + team_shared_size ; + m_scratch_size = align_to_int64( alloc_size ); + +#if 0 +fprintf(stdout,"HostThreadTeamData::scratch_assign { %d %d %d %d %d %d %d }\n" + , int(m_pool_members) + , int(m_pool_rendezvous) + , int(m_pool_reduce) + , int(m_team_reduce) + , int(m_team_shared) + , int(m_thread_local) + , int(m_scratch_size) + ); +fflush(stdout); +#endif + + } + + //---------------------------------------- + // Get a work index within the range. + // First try to steal from beginning of own teams's partition. + // If that fails then try to steal from end of another teams' partition. + int get_work_stealing() noexcept ; + + //---------------------------------------- + // Set the initial work partitioning of [ 0 .. length ) among the teams + // with granularity of chunk + + void set_work_partition( int64_t const length + , int const chunk ) noexcept + { + // Minimum chunk size to insure that + // m_work_end < std::numeric_limits::max() * m_work_chunk + + int const chunk_min = ( length + std::numeric_limits::max() ) + / std::numeric_limits::max(); + + m_work_end = length ; + m_work_chunk = std::max( chunk , chunk_min ); + + // Number of work chunks and partitioning of that number: + int const num = ( m_work_end + m_work_chunk - 1 ) / m_work_chunk ; + int const part = ( num + m_league_size - 1 ) / m_league_size ; + + m_work_range.first = part * m_league_rank ; + m_work_range.second = m_work_range.first + part ; + + // Steal from next team, round robin + // The next team is offset by m_team_alloc if it fits in the pool. + + m_steal_rank = m_team_base + m_team_alloc + m_team_size <= m_pool_size ? + m_team_base + m_team_alloc : 0 ; + } + + std::pair get_work_partition() noexcept + { + return std::pair + ( m_work_range.first * m_work_chunk + , m_work_range.second * m_work_chunk < m_work_end + ? m_work_range.second * m_work_chunk : m_work_end ); + } + + std::pair get_work_stealing_chunk() noexcept + { + std::pair x(-1,-1); + + const int i = get_work_stealing(); + + if ( 0 <= i ) { + x.first = m_work_chunk * i ; + x.second = x.first + m_work_chunk < m_work_end + ? x.first + m_work_chunk : m_work_end ; + } + + return x ; + } +}; + +//---------------------------------------------------------------------------- + +template< class HostExecSpace > +class HostThreadTeamMember { +public: + + using scratch_memory_space = typename HostExecSpace::scratch_memory_space ; + +private: + + scratch_memory_space m_scratch ; + HostThreadTeamData & m_data ; + int const m_league_rank ; + int const m_league_size ; + +public: + + constexpr HostThreadTeamMember( HostThreadTeamData & arg_data ) noexcept + : m_scratch( arg_data.team_shared() , arg_data.team_shared_bytes() ) + , m_data( arg_data ) + , m_league_rank(0) + , m_league_size(1) + {} + + constexpr HostThreadTeamMember( HostThreadTeamData & arg_data + , int const arg_league_rank + , int const arg_league_size + ) noexcept + : m_scratch( arg_data.team_shared() + , arg_data.team_shared_bytes() + , arg_data.team_shared() + , arg_data.team_shared_bytes() ) + , m_data( arg_data ) + , m_league_rank( arg_league_rank ) + , m_league_size( arg_league_size ) + {} + + ~HostThreadTeamMember() = default ; + HostThreadTeamMember() = delete ; + HostThreadTeamMember( HostThreadTeamMember && ) = default ; + HostThreadTeamMember( HostThreadTeamMember const & ) = default ; + HostThreadTeamMember & operator = ( HostThreadTeamMember && ) = default ; + HostThreadTeamMember & operator = ( HostThreadTeamMember const & ) = default ; + + //---------------------------------------- + + KOKKOS_INLINE_FUNCTION + int team_rank() const noexcept { return m_data.m_team_rank ; } + + KOKKOS_INLINE_FUNCTION + int team_size() const noexcept { return m_data.m_team_size ; } + + KOKKOS_INLINE_FUNCTION + int league_rank() const noexcept { return m_league_rank ; } + + KOKKOS_INLINE_FUNCTION + int league_size() const noexcept { return m_league_size ; } + + //---------------------------------------- + + KOKKOS_INLINE_FUNCTION + const scratch_memory_space & team_shmem() const + { return m_scratch.set_team_thread_mode(0,1,0); } + + KOKKOS_INLINE_FUNCTION + const scratch_memory_space & team_scratch(int) const + { return m_scratch.set_team_thread_mode(0,1,0); } + + KOKKOS_INLINE_FUNCTION + const scratch_memory_space & thread_scratch(int) const + { return m_scratch.set_team_thread_mode(0,m_data.m_team_size,m_data.m_team_rank); } + + //---------------------------------------- + // Team collectives + + KOKKOS_INLINE_FUNCTION void team_barrier() const noexcept +#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + { + if ( m_data.team_rendezvous() ) m_data.team_rendezvous_release(); + } +#else + {} +#endif + + template< class Closure > + KOKKOS_INLINE_FUNCTION + void team_barrier( Closure const & f ) const noexcept + { + if ( m_data.team_rendezvous() ) { + + // All threads have entered 'team_rendezvous' + // only this thread returned from 'team_rendezvous' + // with a return value of 'true' + + f(); + + m_data.team_rendezvous_release(); + } + } + + //-------------------------------------------------------------------------- + + template< typename T > + KOKKOS_INLINE_FUNCTION + void team_broadcast( T & value , const int source_team_rank ) const noexcept +#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + { + if ( 1 < m_data.m_team_size ) { + T volatile * const shared_value = (T*) m_data.team_reduce(); + + // Don't overwrite shared memory until all threads arrive + + if ( m_data.team_rendezvous( source_team_rank ) ) { + // All threads have entered 'team_rendezvous' + // only this thread returned from 'team_rendezvous' + // with a return value of 'true' + + *shared_value = value ; + + m_data.team_rendezvous_release(); + // This thread released all other threads from 'team_rendezvous' + // with a return value of 'false' + } + else { + value = *shared_value ; + } + } + } +#else + { Kokkos::abort("HostThreadTeamMember team_broadcast\n"); } +#endif + + //-------------------------------------------------------------------------- + + template< class Closure , typename T > + KOKKOS_INLINE_FUNCTION + void team_broadcast( Closure const & f , T & value , const int source_team_rank) const noexcept + { + T volatile * const shared_value = (T*) m_data.team_reduce(); + + // Don't overwrite shared memory until all threads arrive + + if ( m_data.team_rendezvous(source_team_rank) ) { + + // All threads have entered 'team_rendezvous' + // only this thread returned from 'team_rendezvous' + // with a return value of 'true' + + f( value ); + + if ( 1 < m_data.m_team_size ) { *shared_value = value ; } + + m_data.team_rendezvous_release(); + // This thread released all other threads from 'team_rendezvous' + // with a return value of 'false' + } + else { + value = *shared_value ; + } + } + + //-------------------------------------------------------------------------- + // team_reduce( Sum(result) ); + // team_reduce( Min(result) ); + // team_reduce( Max(result) ); + + template< typename ReducerType > + KOKKOS_INLINE_FUNCTION + typename std::enable_if< is_reducer< ReducerType >::value >::type + team_reduce( ReducerType const & reducer ) const noexcept +#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + { + if ( 1 < m_data.m_team_size ) { + + using value_type = typename ReducerType::value_type ; + + if ( 0 != m_data.m_team_rank ) { + // Non-root copies to their local buffer: + reducer.copy( (value_type*) m_data.team_reduce_local() + , reducer.data() ); + } + + // Root does not overwrite shared memory until all threads arrive + // and copy to their local buffer. + + if ( m_data.team_rendezvous() ) { + // All threads have entered 'team_rendezvous' + // only this thread returned from 'team_rendezvous' + // with a return value of 'true' + // + // This thread sums contributed values + for ( int i = 1 ; i < m_data.m_team_size ; ++i ) { + value_type * const src = + (value_type*) m_data.team_member(i)->team_reduce_local(); + + reducer.join( reducer.data() , src ); + } + + // Copy result to root member's buffer: + reducer.copy( (value_type*) m_data.team_reduce() , reducer.data() ); + + m_data.team_rendezvous_release(); + // This thread released all other threads from 'team_rendezvous' + // with a return value of 'false' + } + else { + // Copy from root member's buffer: + reducer.copy( reducer.data() , (value_type*) m_data.team_reduce() ); + } + } + } +#else + { Kokkos::abort("HostThreadTeamMember team_reduce\n"); } +#endif + + //-------------------------------------------------------------------------- + + template< typename ValueType , class JoinOp > + KOKKOS_INLINE_FUNCTION + ValueType + team_reduce( ValueType const & value + , JoinOp const & join ) const noexcept +#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + { + if ( 0 != m_data.m_team_rank ) { + // Non-root copies to their local buffer: + *((ValueType*) m_data.team_reduce_local()) = value ; + } + + // Root does not overwrite shared memory until all threads arrive + // and copy to their local buffer. + + if ( m_data.team_rendezvous() ) { + const Impl::Reducer< ValueType , JoinOp > reducer( join ); + + // All threads have entered 'team_rendezvous' + // only this thread returned from 'team_rendezvous' + // with a return value of 'true' + // + // This thread sums contributed values + + ValueType * const dst = (ValueType*) m_data.team_reduce_local(); + + *dst = value ; + + for ( int i = 1 ; i < m_data.m_team_size ; ++i ) { + ValueType * const src = + (ValueType*) m_data.team_member(i)->team_reduce_local(); + + reducer.join( dst , src ); + } + + m_data.team_rendezvous_release(); + // This thread released all other threads from 'team_rendezvous' + // with a return value of 'false' + } + + return *((ValueType*) m_data.team_reduce()); + } +#else + { Kokkos::abort("HostThreadTeamMember team_reduce\n"); return ValueType(); } +#endif + + + template< typename T > + KOKKOS_INLINE_FUNCTION + T team_scan( T const & value , T * const global = 0 ) const noexcept +#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + { + if ( 0 != m_data.m_team_rank ) { + // Non-root copies to their local buffer: + ((T*) m_data.team_reduce_local())[1] = value ; + } + + // Root does not overwrite shared memory until all threads arrive + // and copy to their local buffer. + + if ( m_data.team_rendezvous() ) { + // All threads have entered 'team_rendezvous' + // only this thread returned from 'team_rendezvous' + // with a return value of 'true' + // + // This thread scans contributed values + + { + T * prev = (T*) m_data.team_reduce_local(); + + prev[0] = 0 ; + prev[1] = value ; + + for ( int i = 1 ; i < m_data.m_team_size ; ++i ) { + T * const ptr = (T*) m_data.team_member(i)->team_reduce_local(); + + ptr[0] = prev[0] + prev[1] ; + + prev = ptr ; + } + } + + // If adding to global value then atomic_fetch_add to that value + // and sum previous value to every entry of the scan. + if ( global ) { + T * prev = (T*) m_data.team_reduce_local(); + + { + T * ptr = (T*) m_data.team_member( m_data.m_team_size - 1 )->team_reduce_local(); + prev[0] = Kokkos::atomic_fetch_add( global , ptr[0] + ptr[1] ); + } + + for ( int i = 1 ; i < m_data.m_team_size ; ++i ) { + T * ptr = (T*) m_data.team_member(i)->team_reduce_local(); + ptr[0] += prev[0] ; + } + } + + m_data.team_rendezvous_release(); + } + + return ((T*) m_data.team_reduce_local())[0]; + } +#else + { Kokkos::abort("HostThreadTeamMember team_scan\n"); return T(); } +#endif + +}; + + +}} /* namespace Kokkos::Impl */ + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { + +template +KOKKOS_INLINE_FUNCTION +Impl::TeamThreadRangeBoundariesStruct > +TeamThreadRange( Impl::HostThreadTeamMember const & member + , iType const & count ) +{ + return + Impl::TeamThreadRangeBoundariesStruct + >(member,0,count); +} + +template +KOKKOS_INLINE_FUNCTION +Impl::TeamThreadRangeBoundariesStruct + < typename std::common_type< iType1, iType2 >::type + , Impl::HostThreadTeamMember > +TeamThreadRange( Impl::HostThreadTeamMember const & member + , iType1 const & begin , iType2 const & end ) +{ + return + Impl::TeamThreadRangeBoundariesStruct + < typename std::common_type< iType1, iType2 >::type + , Impl::HostThreadTeamMember >( member , begin , end ); +} + +template +KOKKOS_INLINE_FUNCTION +Impl::ThreadVectorRangeBoundariesStruct > +ThreadVectorRange + ( Impl::HostThreadTeamMember const & member + , const iType & count ) +{ + return Impl::ThreadVectorRangeBoundariesStruct >(member,count); +} + +//---------------------------------------------------------------------------- +/** \brief Inter-thread parallel_for. + * + * Executes lambda(iType i) for each i=[0..N) + * + * The range [0..N) is mapped to all threads of the the calling thread team. +*/ +template +KOKKOS_INLINE_FUNCTION +void parallel_for + ( Impl::TeamThreadRangeBoundariesStruct > const & loop_boundaries + , Closure const & closure + ) +{ + for( iType i = loop_boundaries.start + ; i < loop_boundaries.end + ; i += loop_boundaries.increment ) { + closure (i); + } +} + +template +KOKKOS_INLINE_FUNCTION +void parallel_for + ( Impl::ThreadVectorRangeBoundariesStruct > const & loop_boundaries + , Closure const & closure + ) +{ + #ifdef KOKKOS_ENABLE_PRAGMA_IVDEP + #pragma ivdep + #endif + for( iType i = loop_boundaries.start + ; i < loop_boundaries.end + ; i += loop_boundaries.increment ) { + closure (i); + } +} + +//---------------------------------------------------------------------------- + +template< typename iType, class Space, class Closure, class Reducer > +KOKKOS_INLINE_FUNCTION +typename std::enable_if< Kokkos::is_reducer< Reducer >::value >::type +parallel_reduce + ( Impl::TeamThreadRangeBoundariesStruct > + const & loop_boundaries + , Closure const & closure + , Reducer const & reducer + ) +{ + reducer.init( reducer.data() ); + + for( iType i = loop_boundaries.start + ; i < loop_boundaries.end + ; i += loop_boundaries.increment ) { + closure( i , reducer.reference() ); + } + + loop_boundaries.thread.team_reduce( reducer ); +} + +template< typename iType, class Space, typename Closure, typename ValueType > +KOKKOS_INLINE_FUNCTION +typename std::enable_if< ! Kokkos::is_reducer::value >::type +parallel_reduce + ( Impl::TeamThreadRangeBoundariesStruct > + const & loop_boundaries + , Closure const & closure + , ValueType & result + ) +{ + Impl::Reducer< ValueType , Impl::ReduceSum< ValueType > > reducer( & result ); + + reducer.init( reducer.data() ); + + for( iType i = loop_boundaries.start + ; i < loop_boundaries.end + ; i += loop_boundaries.increment ) { + closure( i , reducer.reference() ); + } + + loop_boundaries.thread.team_reduce( reducer ); +} + +template< typename iType, class Space + , class Closure, class Joiner , typename ValueType > +KOKKOS_INLINE_FUNCTION +void parallel_reduce + ( Impl::TeamThreadRangeBoundariesStruct > + const & loop_boundaries + , Closure const & closure + , Joiner const & joiner + , ValueType & result + ) +{ + Impl::Reducer< ValueType , Joiner > reducer( joiner , & result ); + + reducer.init( reducer.data() ); + + for( iType i = loop_boundaries.start + ; i < loop_boundaries.end + ; i += loop_boundaries.increment ) { + closure( i , reducer.reference() ); + } + + loop_boundaries.thread.team_reduce( reducer ); +} + +//---------------------------------------------------------------------------- +/** \brief Inter-thread vector parallel_reduce. + * + * Executes lambda(iType i, ValueType & val) for each i=[0..N) + * + * The range [0..N) is mapped to all threads of the + * calling thread team and a summation of val is + * performed and put into result. + */ +template< typename iType, class Space , class Lambda, typename ValueType > +KOKKOS_INLINE_FUNCTION +void parallel_reduce + (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, + const Lambda & lambda, + ValueType& result) +{ + result = ValueType(); +#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP +#pragma ivdep +#endif + for( iType i = loop_boundaries.start ; + i < loop_boundaries.end ; + i += loop_boundaries.increment) { + lambda(i,result); + } +} + +/** \brief Intra-thread vector parallel_reduce. + * + * Executes lambda(iType i, ValueType & val) for each i=[0..N) + * + * The range [0..N) is mapped to all vector lanes of the the + * calling thread and a reduction of val is performed using + * JoinType(ValueType& val, const ValueType& update) + * and put into init_result. + * The input value of init_result is used as initializer for + * temporary variables of ValueType. Therefore * the input + * value should be the neutral element with respect to the + * join operation (e.g. '0 for +-' or * '1 for *'). + */ +template< typename iType, class Space + , class Lambda, class JoinType , typename ValueType > +KOKKOS_INLINE_FUNCTION +void parallel_reduce + (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, + const Lambda & lambda, + const JoinType & join, + ValueType& result) +{ +#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP +#pragma ivdep +#endif + for( iType i = loop_boundaries.start ; + i < loop_boundaries.end ; + i += loop_boundaries.increment ) { + lambda(i,result); + } +} + +//---------------------------------------------------------------------------- + +template< typename iType, class Space, class Closure > +KOKKOS_INLINE_FUNCTION +void parallel_scan + ( Impl::TeamThreadRangeBoundariesStruct > const & loop_boundaries + , Closure const & closure + ) +{ + // Extract ValueType from the closure + + using value_type = + typename Kokkos::Impl::FunctorAnalysis + < Kokkos::Impl::FunctorPatternInterface::SCAN + , void + , Closure >::value_type ; + + value_type accum = 0 ; + + // Intra-member scan + for ( iType i = loop_boundaries.start + ; i < loop_boundaries.end + ; i += loop_boundaries.increment ) { + closure(i,accum,false); + } + + // 'accum' output is the exclusive prefix sum + accum = loop_boundaries.thread.team_scan(accum); + + for ( iType i = loop_boundaries.start + ; i < loop_boundaries.end + ; i += loop_boundaries.increment ) { + closure(i,accum,true); + } +} + + +template< typename iType, class Space, class ClosureType > +KOKKOS_INLINE_FUNCTION +void parallel_scan + ( Impl::ThreadVectorRangeBoundariesStruct > const & loop_boundaries + , ClosureType const & closure + ) +{ + using value_type = typename + Kokkos::Impl::FunctorAnalysis + < Impl::FunctorPatternInterface::SCAN + , void + , ClosureType >::value_type ; + + value_type scan_val = value_type(); + +#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP +#pragma ivdep +#endif + for ( iType i = loop_boundaries.start + ; i < loop_boundaries.end + ; i += loop_boundaries.increment ) { + closure(i,scan_val,true); + } +} + +//---------------------------------------------------------------------------- + +template< class Space > +KOKKOS_INLINE_FUNCTION +Impl::ThreadSingleStruct > +PerTeam(const Impl::HostThreadTeamMember & member ) +{ + return Impl::ThreadSingleStruct >(member); +} + +template< class Space > +KOKKOS_INLINE_FUNCTION +Impl::VectorSingleStruct > +PerThread(const Impl::HostThreadTeamMember & member) +{ + return Impl::VectorSingleStruct >(member); +} + +template< class Space , class FunctorType > +KOKKOS_INLINE_FUNCTION +void single( const Impl::ThreadSingleStruct< Impl::HostThreadTeamMember > & single , const FunctorType & functor ) +{ + if ( single.team_member.team_rank() == 0 ) functor(); + // 'single' does not perform a barrier. + // single.team_member.team_barrier( functor ); +} + +template< class Space , class FunctorType , typename ValueType > +KOKKOS_INLINE_FUNCTION +void single( const Impl::ThreadSingleStruct< Impl::HostThreadTeamMember > & single , const FunctorType & functor , ValueType & val ) +{ + single.team_member.team_broadcast( functor , val , 0 ); +} + +template< class Space , class FunctorType > +KOKKOS_INLINE_FUNCTION +void single( const Impl::VectorSingleStruct< Impl::HostThreadTeamMember > & , const FunctorType & functor ) +{ + functor(); +} + +template< class Space , class FunctorType , typename ValueType > +KOKKOS_INLINE_FUNCTION +void single( const Impl::VectorSingleStruct< Impl::HostThreadTeamMember > & , const FunctorType & functor , ValueType & val ) +{ + functor(val); +} + +} /* namespace Kokkos */ + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +#endif /* #ifndef KOKKOS_IMPL_HOSTTHREADTEAM_HPP */ + diff --git a/lib/kokkos/core/src/impl/Kokkos_Memory_Fence.hpp b/lib/kokkos/core/src/impl/Kokkos_Memory_Fence.hpp index 84cf536bb7..7489018ac6 100644 --- a/lib/kokkos/core/src/impl/Kokkos_Memory_Fence.hpp +++ b/lib/kokkos/core/src/impl/Kokkos_Memory_Fence.hpp @@ -52,6 +52,10 @@ void memory_fence() { #if defined( __CUDA_ARCH__ ) __threadfence(); +#elif defined( KOKKOS_ENABLE_ASM ) && defined( KOKKOS_ENABLE_ISA_X86_64 ) + asm volatile ( + "mfence" ::: "memory" + ); #elif defined( KOKKOS_ENABLE_GNU_ATOMICS ) || \ ( defined( KOKKOS_COMPILER_NVCC ) && defined( KOKKOS_ENABLE_INTEL_ATOMICS ) ) __sync_synchronize(); @@ -76,8 +80,8 @@ void store_fence() { #if defined( KOKKOS_ENABLE_ASM ) && defined( KOKKOS_ENABLE_ISA_X86_64 ) asm volatile ( - "sfence" ::: "memory" - ); + "sfence" ::: "memory" + ); #else memory_fence(); #endif @@ -93,8 +97,8 @@ void load_fence() { #if defined( KOKKOS_ENABLE_ASM ) && defined( KOKKOS_ENABLE_ISA_X86_64 ) asm volatile ( - "lfence" ::: "memory" - ); + "lfence" ::: "memory" + ); #else memory_fence(); #endif diff --git a/lib/kokkos/core/src/impl/Kokkos_OldMacros.hpp b/lib/kokkos/core/src/impl/Kokkos_OldMacros.hpp index da95c943fe..5852efb011 100644 --- a/lib/kokkos/core/src/impl/Kokkos_OldMacros.hpp +++ b/lib/kokkos/core/src/impl/Kokkos_OldMacros.hpp @@ -129,8 +129,8 @@ #endif #ifdef KOKKOS_HAVE_CUDA_RDC -#ifndef KOKKOS_ENABLE_CUDA_RDC -#define KOKKOS_ENABLE_CUDA_RDC KOKKOS_HAVE_CUDA_RDC +#ifndef KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE +#define KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE KOKKOS_HAVE_CUDA_RDC #endif #endif @@ -242,9 +242,9 @@ #endif #endif -#ifdef KOKKOS_HAVE_QTHREAD -#ifndef KOKKOS_ENABLE_QTHREAD -#define KOKKOS_ENABLE_QTHREAD KOKKOS_HAVE_QTHREAD +#ifdef KOKKOS_HAVE_QTHREADS +#ifndef KOKKOS_ENABLE_QTHREADS +#define KOKKOS_ENABLE_QTHREADS KOKKOS_HAVE_QTHREADS #endif #endif diff --git a/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.cpp b/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.cpp index 99c5df4db3..0c006a8c00 100644 --- a/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.cpp +++ b/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.cpp @@ -43,7 +43,7 @@ #include -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) #include namespace Kokkos { @@ -84,21 +84,21 @@ namespace Kokkos { (*endScanCallee)(kernelID); } } - + void beginParallelReduce(const std::string& kernelPrefix, const uint32_t devID, uint64_t* kernelID) { if(NULL != beginReduceCallee) { Kokkos::fence(); (*beginReduceCallee)(kernelPrefix.c_str(), devID, kernelID); } } - + void endParallelReduce(const uint64_t kernelID) { if(NULL != endReduceCallee) { Kokkos::fence(); (*endReduceCallee)(kernelID); } } - + void pushRegion(const std::string& kName) { if( NULL != pushRegionCallee ) { diff --git a/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.hpp b/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.hpp index 3d6a389252..139a20d8f9 100644 --- a/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.hpp +++ b/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.hpp @@ -50,7 +50,7 @@ #include #include -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) #include #include #include @@ -59,7 +59,7 @@ #define KOKKOSP_INTERFACE_VERSION 20150628 -#if (KOKKOS_ENABLE_PROFILING) +#if defined(KOKKOS_ENABLE_PROFILING) namespace Kokkos { namespace Profiling { diff --git a/lib/kokkos/core/src/impl/Kokkos_Reducer.hpp b/lib/kokkos/core/src/impl/Kokkos_Reducer.hpp new file mode 100644 index 0000000000..b3ed5f1514 --- /dev/null +++ b/lib/kokkos/core/src/impl/Kokkos_Reducer.hpp @@ -0,0 +1,317 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef KOKKOS_IMPL_REDUCER_HPP +#define KOKKOS_IMPL_REDUCER_HPP + +#include + +//---------------------------------------------------------------------------- +/* Reducer abstraction: + * 1) Provides 'join' operation + * 2) Provides 'init' operation + * 3) Provides 'copy' operation + * 4) Optionally provides result value in a memory space + * + * Created from: + * 1) Functor::operator()( destination , source ) + * 2) Functor::{ join , init ) + */ +//---------------------------------------------------------------------------- + +namespace Kokkos { +namespace Impl { + +template< typename value_type > +struct ReduceSum +{ + KOKKOS_INLINE_FUNCTION static + void copy( value_type & dest + , value_type const & src ) noexcept + { dest = src ; } + + KOKKOS_INLINE_FUNCTION static + void init( value_type & dest ) noexcept + { new( &dest ) value_type(); } + + KOKKOS_INLINE_FUNCTION static + void join( value_type volatile & dest + , value_type const volatile & src ) noexcept + { dest += src ; } + + KOKKOS_INLINE_FUNCTION static + void join( value_type & dest + , value_type const & src ) noexcept + { dest += src ; } +}; + +template< typename T + , class ReduceOp = ReduceSum< T > + , typename MemorySpace = void > +struct Reducer + : private ReduceOp + , private integral_nonzero_constant + < int , ( std::rank::value == 1 ? std::extent::value : 1 )> +{ +private: + + // Determine if T is simple array + + enum : int { rank = std::rank::value }; + + static_assert( rank <= 1 , "Kokkos::Impl::Reducer type is at most rank-one" ); + + using length_t = + integral_nonzero_constant::value : 1 )> ; + +public: + + using reducer = Reducer ; + using memory_space = MemorySpace ; + using value_type = typename std::remove_extent::type ; + using reference_type = + typename std::conditional< ( rank != 0 ) + , value_type * + , value_type & + >::type ; +private: + + //-------------------------------------------------------------------------- + // Determine what functions 'ReduceOp' provides: + // copy( destination , source ) + // init( destination ) + // + // operator()( destination , source ) + // join( destination , source ) + // + // Provide defaults for missing optional operations + + template< class R , typename = void> + struct COPY { + KOKKOS_INLINE_FUNCTION static + void copy( R const & + , value_type * dst + , value_type const * src ) { *dst = *src ; } + }; + + template< class R > + struct COPY< R , decltype( ((R*)0)->copy( *((value_type*)0) + , *((value_type const *)0) ) ) > + { + KOKKOS_INLINE_FUNCTION static + void copy( R const & r + , value_type * dst + , value_type const * src ) { r.copy( *dst , *src ); } + }; + + template< class R , typename = void > + struct INIT { + KOKKOS_INLINE_FUNCTION static + void init( R const & , value_type * dst ) { new(dst) value_type(); } + }; + + template< class R > + struct INIT< R , decltype( ((R*)0)->init( *((value_type*)0 ) ) ) > + { + KOKKOS_INLINE_FUNCTION static + void init( R const & r , value_type * dst ) { r.init( *dst ); } + }; + + template< class R , typename V , typename = void > struct JOIN + { + // If no join function then try operator() + KOKKOS_INLINE_FUNCTION static + void join( R const & r , V * dst , V const * src ) + { r.operator()(*dst,*src); } + }; + + template< class R , typename V > + struct JOIN< R , V , decltype( ((R*)0)->join ( *((V *)0) , *((V const *)0) ) ) > + { + // If has join function use it + KOKKOS_INLINE_FUNCTION static + void join( R const & r , V * dst , V const * src ) + { r.join(*dst,*src); } + }; + + //-------------------------------------------------------------------------- + + value_type * const m_result ; + + template< int Rank > + KOKKOS_INLINE_FUNCTION + static constexpr + typename std::enable_if< ( 0 != Rank ) , reference_type >::type + ref( value_type * p ) noexcept { return p ; } + + template< int Rank > + KOKKOS_INLINE_FUNCTION + static constexpr + typename std::enable_if< ( 0 == Rank ) , reference_type >::type + ref( value_type * p ) noexcept { return *p ; } + +public: + + //-------------------------------------------------------------------------- + + KOKKOS_INLINE_FUNCTION + constexpr int length() const noexcept + { return length_t::value ; } + + KOKKOS_INLINE_FUNCTION + value_type * data() const noexcept + { return m_result ; } + + KOKKOS_INLINE_FUNCTION + reference_type reference() const noexcept + { return Reducer::template ref< rank >( m_result ); } + + //-------------------------------------------------------------------------- + + KOKKOS_INLINE_FUNCTION + void copy( value_type * const dest + , value_type const * const src ) const noexcept + { + for ( int i = 0 ; i < length() ; ++i ) { + Reducer::template COPY::copy( (ReduceOp &) *this , dest + i , src + i ); + } + } + + KOKKOS_INLINE_FUNCTION + void init( value_type * dest ) const noexcept + { + for ( int i = 0 ; i < length() ; ++i ) { + Reducer::template INIT::init( (ReduceOp &) *this , dest + i ); + } + } + + KOKKOS_INLINE_FUNCTION + void join( value_type * const dest + , value_type const * const src ) const noexcept + { + for ( int i = 0 ; i < length() ; ++i ) { + Reducer::template JOIN::join( (ReduceOp &) *this , dest + i , src + i ); + } + } + + KOKKOS_INLINE_FUNCTION + void join( value_type volatile * const dest + , value_type volatile const * const src ) const noexcept + { + for ( int i = 0 ; i < length() ; ++i ) { + Reducer::template JOIN::join( (ReduceOp &) *this , dest + i , src + i ); + } + } + + //-------------------------------------------------------------------------- + + template< typename ArgT > + KOKKOS_INLINE_FUNCTION explicit + constexpr Reducer + ( ArgT * arg_value + , typename std::enable_if + < std::is_same::value && + std::is_default_constructible< ReduceOp >::value + , int >::type arg_length = 1 + ) noexcept + : ReduceOp(), length_t( arg_length ), m_result( arg_value ) {} + + KOKKOS_INLINE_FUNCTION explicit + constexpr Reducer( ReduceOp const & arg_op + , value_type * arg_value = 0 + , int arg_length = 1 ) noexcept + : ReduceOp( arg_op ), length_t( arg_length ), m_result( arg_value ) {} + + KOKKOS_INLINE_FUNCTION explicit + constexpr Reducer( ReduceOp && arg_op + , value_type * arg_value = 0 + , int arg_length = 1 ) noexcept + : ReduceOp( arg_op ), length_t( arg_length ), m_result( arg_value ) {} + + Reducer( Reducer const & ) = default ; + Reducer( Reducer && ) = default ; + Reducer & operator = ( Reducer const & ) = default ; + Reducer & operator = ( Reducer && ) = default ; +}; + +} // namespace Impl +} // namespace Kokkos + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { + +template< typename ValueType > +constexpr +Impl::Reducer< ValueType , Impl::ReduceSum< ValueType > > +Sum( ValueType & arg_value ) +{ + static_assert( std::is_trivial::value + , "Kokkos reducer requires trivial value type" ); + return Impl::Reducer< ValueType , Impl::ReduceSum< ValueType > >( & arg_value ); +} + +template< typename ValueType > +constexpr +Impl::Reducer< ValueType[] , Impl::ReduceSum< ValueType > > +Sum( ValueType * arg_value , int arg_length ) +{ + static_assert( std::is_trivial::value + , "Kokkos reducer requires trivial value type" ); + return Impl::Reducer< ValueType[] , Impl::ReduceSum< ValueType > >( arg_value , arg_length ); +} + +//---------------------------------------------------------------------------- + +template< typename ValueType , class JoinType > +Impl::Reducer< ValueType , JoinType > +reducer( ValueType & value , JoinType const & lambda ) +{ + return Impl::Reducer< ValueType , JoinType >( lambda , & value ); +} + +} // namespace Kokkos + +#endif /* #ifndef KOKKOS_IMPL_REDUCER_HPP */ + diff --git a/lib/kokkos/core/src/impl/Kokkos_Serial.cpp b/lib/kokkos/core/src/impl/Kokkos_Serial.cpp index 76161c10f1..7949613306 100644 --- a/lib/kokkos/core/src/impl/Kokkos_Serial.cpp +++ b/lib/kokkos/core/src/impl/Kokkos_Serial.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -53,63 +53,126 @@ namespace Kokkos { namespace Impl { -namespace SerialImpl { +namespace { -Sentinel::Sentinel() : m_scratch(0), m_reduce_end(0), m_shared_end(0) {} +HostThreadTeamData g_serial_thread_team_data ; -Sentinel::~Sentinel() -{ - if ( m_scratch ) { free( m_scratch ); } - m_scratch = 0 ; - m_reduce_end = 0 ; - m_shared_end = 0 ; } -Sentinel & Sentinel::singleton() +// Resize thread team data scratch memory +void serial_resize_thread_team_data( size_t pool_reduce_bytes + , size_t team_reduce_bytes + , size_t team_shared_bytes + , size_t thread_local_bytes ) { - static Sentinel s ; return s ; + if ( pool_reduce_bytes < 512 ) pool_reduce_bytes = 512 ; + if ( team_reduce_bytes < 512 ) team_reduce_bytes = 512 ; + + const size_t old_pool_reduce = g_serial_thread_team_data.pool_reduce_bytes(); + const size_t old_team_reduce = g_serial_thread_team_data.team_reduce_bytes(); + const size_t old_team_shared = g_serial_thread_team_data.team_shared_bytes(); + const size_t old_thread_local = g_serial_thread_team_data.thread_local_bytes(); + const size_t old_alloc_bytes = g_serial_thread_team_data.scratch_bytes(); + + // Allocate if any of the old allocation is tool small: + + const bool allocate = ( old_pool_reduce < pool_reduce_bytes ) || + ( old_team_reduce < team_reduce_bytes ) || + ( old_team_shared < team_shared_bytes ) || + ( old_thread_local < thread_local_bytes ); + + if ( allocate ) { + + Kokkos::HostSpace space ; + + if ( old_alloc_bytes ) { + g_serial_thread_team_data.disband_team(); + g_serial_thread_team_data.disband_pool(); + + space.deallocate( g_serial_thread_team_data.scratch_buffer() + , g_serial_thread_team_data.scratch_bytes() ); + } + + if ( pool_reduce_bytes < old_pool_reduce ) { pool_reduce_bytes = old_pool_reduce ; } + if ( team_reduce_bytes < old_team_reduce ) { team_reduce_bytes = old_team_reduce ; } + if ( team_shared_bytes < old_team_shared ) { team_shared_bytes = old_team_shared ; } + if ( thread_local_bytes < old_thread_local ) { thread_local_bytes = old_thread_local ; } + + const size_t alloc_bytes = + HostThreadTeamData::scratch_size( pool_reduce_bytes + , team_reduce_bytes + , team_shared_bytes + , thread_local_bytes ); + + void * const ptr = space.allocate( alloc_bytes ); + + g_serial_thread_team_data. + scratch_assign( ((char *)ptr) + , alloc_bytes + , pool_reduce_bytes + , team_reduce_bytes + , team_shared_bytes + , thread_local_bytes ); + + HostThreadTeamData * pool[1] = { & g_serial_thread_team_data }; + + g_serial_thread_team_data.organize_pool( pool , 1 ); + g_serial_thread_team_data.organize_team(1); + } } -inline -unsigned align( unsigned n ) +// Get thread team data structure for omp_get_thread_num() +HostThreadTeamData * serial_get_thread_team_data() { - enum { ALIGN = 0x0100 /* 256 */ , MASK = ALIGN - 1 }; - return ( n + MASK ) & ~MASK ; + return & g_serial_thread_team_data ; } -} // namespace +} // namespace Impl +} // namespace Kokkos -SerialTeamMember::SerialTeamMember( int arg_league_rank - , int arg_league_size - , int arg_shared_size - ) - : m_space( ((char *) SerialImpl::Sentinel::singleton().m_scratch) + SerialImpl::Sentinel::singleton().m_reduce_end - , arg_shared_size ) - , m_league_rank( arg_league_rank ) - , m_league_size( arg_league_size ) -{} +/*--------------------------------------------------------------------------*/ -} // namespace Impl +namespace Kokkos { -void * Serial::scratch_memory_resize( unsigned reduce_size , unsigned shared_size ) +int Serial::is_initialized() { - static Impl::SerialImpl::Sentinel & s = Impl::SerialImpl::Sentinel::singleton(); + return 1 ; +} - reduce_size = Impl::SerialImpl::align( reduce_size ); - shared_size = Impl::SerialImpl::align( shared_size ); +void Serial::initialize( unsigned threads_count + , unsigned use_numa_count + , unsigned use_cores_per_numa + , bool allow_asynchronous_threadpool ) +{ + (void) threads_count; + (void) use_numa_count; + (void) use_cores_per_numa; + (void) allow_asynchronous_threadpool; + + // Init the array of locks used for arbitrarily sized atomics + Impl::init_lock_array_host_space(); + #if defined(KOKKOS_ENABLE_PROFILING) + Kokkos::Profiling::initialize(); + #endif +} - if ( ( s.m_reduce_end < reduce_size ) || - ( s.m_shared_end < s.m_reduce_end + shared_size ) ) { +void Serial::finalize() +{ + if ( Impl::g_serial_thread_team_data.scratch_buffer() ) { + Impl::g_serial_thread_team_data.disband_team(); + Impl::g_serial_thread_team_data.disband_pool(); - if ( s.m_scratch ) { free( s.m_scratch ); } + Kokkos::HostSpace space ; - if ( s.m_reduce_end < reduce_size ) s.m_reduce_end = reduce_size ; - if ( s.m_shared_end < s.m_reduce_end + shared_size ) s.m_shared_end = s.m_reduce_end + shared_size ; + space.deallocate( Impl::g_serial_thread_team_data.scratch_buffer() + , Impl::g_serial_thread_team_data.scratch_bytes() ); - s.m_scratch = malloc( s.m_shared_end ); + Impl::g_serial_thread_team_data.scratch_assign( (void*) 0, 0, 0, 0, 0, 0 ); } - return s.m_scratch ; + #if defined(KOKKOS_ENABLE_PROFILING) + Kokkos::Profiling::finalize(); + #endif } } // namespace Kokkos diff --git a/lib/kokkos/core/src/impl/Kokkos_Serial_Task.cpp b/lib/kokkos/core/src/impl/Kokkos_Serial_Task.cpp index 19f3abe71a..d22d604fbc 100644 --- a/lib/kokkos/core/src/impl/Kokkos_Serial_Task.cpp +++ b/lib/kokkos/core/src/impl/Kokkos_Serial_Task.cpp @@ -62,11 +62,13 @@ void TaskQueueSpecialization< Kokkos::Serial >::execute using execution_space = Kokkos::Serial ; using queue_type = TaskQueue< execution_space > ; using task_root_type = TaskBase< execution_space , void , void > ; - using Member = TaskExec< execution_space > ; + using Member = Impl::HostThreadTeamMember< execution_space > ; task_root_type * const end = (task_root_type *) task_root_type::EndTag ; - Member exec ; + Impl::HostThreadTeamData * const data = Impl::serial_get_thread_team_data(); + + Member exec( *data ); // Loop until all queues are empty while ( 0 < queue->m_ready_count ) { @@ -75,13 +77,13 @@ void TaskQueueSpecialization< Kokkos::Serial >::execute for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) { for ( int j = 0 ; j < 2 && end == task ; ++j ) { - task = queue_type::pop_task( & queue->m_ready[i][j] ); + task = queue_type::pop_ready_task( & queue->m_ready[i][j] ); } } if ( end != task ) { - // pop_task resulted in lock == task->m_next + // pop_ready_task resulted in lock == task->m_next // In the executing state (*task->m_apply)( task , & exec ); @@ -113,11 +115,13 @@ void TaskQueueSpecialization< Kokkos::Serial > :: using execution_space = Kokkos::Serial ; using queue_type = TaskQueue< execution_space > ; using task_root_type = TaskBase< execution_space , void , void > ; - using Member = TaskExec< execution_space > ; + using Member = Impl::HostThreadTeamMember< execution_space > ; task_root_type * const end = (task_root_type *) task_root_type::EndTag ; - Member exec ; + Impl::HostThreadTeamData * const data = Impl::serial_get_thread_team_data(); + + Member exec( *data ); // Loop until no runnable task @@ -129,7 +133,7 @@ void TaskQueueSpecialization< Kokkos::Serial > :: for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) { for ( int j = 0 ; j < 2 && end == task ; ++j ) { - task = queue_type::pop_task( & queue->m_ready[i][j] ); + task = queue_type::pop_ready_task( & queue->m_ready[i][j] ); } } diff --git a/lib/kokkos/core/src/impl/Kokkos_Serial_Task.hpp b/lib/kokkos/core/src/impl/Kokkos_Serial_Task.hpp index 178305c5d3..ac7f17c0ea 100644 --- a/lib/kokkos/core/src/impl/Kokkos_Serial_Task.hpp +++ b/lib/kokkos/core/src/impl/Kokkos_Serial_Task.hpp @@ -65,6 +65,7 @@ public: using memory_space = Kokkos::HostSpace ; using queue_type = Kokkos::Impl::TaskQueue< execution_space > ; using task_base_type = Kokkos::Impl::TaskBase< execution_space , void , void > ; + using member_type = Kokkos::Impl::HostThreadTeamMember< execution_space > ; static void iff_single_thread_recursive_execute( queue_type * const ); @@ -72,237 +73,19 @@ public: static void execute( queue_type * const ); - template< typename FunctorType > + template< typename TaskType > static - void proc_set_apply( task_base_type::function_type * ptr ) - { - using TaskType = TaskBase< Kokkos::Serial - , typename FunctorType::value_type - , FunctorType - > ; - *ptr = TaskType::apply ; - } + typename TaskType::function_type + get_function_pointer() { return TaskType::apply ; } }; extern template class TaskQueue< Kokkos::Serial > ; -//---------------------------------------------------------------------------- - -template<> -class TaskExec< Kokkos::Serial > -{ -public: - - KOKKOS_INLINE_FUNCTION void team_barrier() const {} - KOKKOS_INLINE_FUNCTION int team_rank() const { return 0 ; } - KOKKOS_INLINE_FUNCTION int team_size() const { return 1 ; } -}; - -template -struct TeamThreadRangeBoundariesStruct > -{ - typedef iType index_type; - const iType start ; - const iType end ; - enum {increment = 1}; - //const TaskExec< Kokkos::Serial > & thread; - TaskExec< Kokkos::Serial > & thread; - - KOKKOS_INLINE_FUNCTION - TeamThreadRangeBoundariesStruct - //( const TaskExec< Kokkos::Serial > & arg_thread, const iType& arg_count) - ( TaskExec< Kokkos::Serial > & arg_thread, const iType& arg_count) - : start(0) - , end(arg_count) - , thread(arg_thread) - {} - - KOKKOS_INLINE_FUNCTION - TeamThreadRangeBoundariesStruct - //( const TaskExec< Kokkos::Serial > & arg_thread - ( TaskExec< Kokkos::Serial > & arg_thread - , const iType& arg_start - , const iType & arg_end - ) - : start( arg_start ) - , end( arg_end) - , thread( arg_thread ) - {} -}; - -//---------------------------------------------------------------------------- - -template -struct ThreadVectorRangeBoundariesStruct > -{ - typedef iType index_type; - const iType start ; - const iType end ; - enum {increment = 1}; - TaskExec< Kokkos::Serial > & thread; - - KOKKOS_INLINE_FUNCTION - ThreadVectorRangeBoundariesStruct - ( TaskExec< Kokkos::Serial > & arg_thread, const iType& arg_count) - : start( 0 ) - , end(arg_count) - , thread(arg_thread) - {} -}; - }} /* namespace Kokkos::Impl */ //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- -namespace Kokkos { - -// OMP version needs non-const TaskExec -template< typename iType > -KOKKOS_INLINE_FUNCTION -Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Serial > > -TeamThreadRange( Impl::TaskExec< Kokkos::Serial > & thread, const iType & count ) -{ - return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Serial > >( thread, count ); -} - -// OMP version needs non-const TaskExec -template< typename iType1, typename iType2 > -KOKKOS_INLINE_FUNCTION -Impl::TeamThreadRangeBoundariesStruct< typename std::common_type< iType1, iType2 >::type, - Impl::TaskExec< Kokkos::Serial > > -TeamThreadRange( Impl::TaskExec< Kokkos::Serial > & thread, const iType1 & start, const iType2 & end ) -{ - typedef typename std::common_type< iType1, iType2 >::type iType; - return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Serial > >( - thread, iType(start), iType(end) ); -} - -// OMP version needs non-const TaskExec -template -KOKKOS_INLINE_FUNCTION -Impl::ThreadVectorRangeBoundariesStruct > -ThreadVectorRange - ( Impl::TaskExec< Kokkos::Serial > & thread - , const iType & count ) -{ - return Impl::ThreadVectorRangeBoundariesStruct >(thread,count); -} - - /** \brief Inter-thread parallel_for. Executes lambda(iType i) for each i=0..N-1. - * - * The range i=0..N-1 is mapped to all threads of the the calling thread team. - * This functionality requires C++11 support.*/ -template -KOKKOS_INLINE_FUNCTION -void parallel_for(const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, const Lambda& lambda) { - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) - lambda(i); -} - -template< typename iType, class Lambda, typename ValueType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce - (const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - ValueType& initialized_result) -{ - - ValueType result = initialized_result; - - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) - lambda(i, result); - - initialized_result = result; -} - -template< typename iType, class Lambda, typename ValueType, class JoinType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce - (const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - const JoinType & join, - ValueType& initialized_result) -{ - ValueType result = initialized_result; - - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) - lambda(i, result); - - initialized_result = result; -} - -template< typename iType, class Lambda, typename ValueType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce - (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - ValueType& initialized_result) -{ - initialized_result = ValueType(); -#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP -#pragma ivdep -#endif - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - ValueType tmp = ValueType(); - lambda(i,tmp); - initialized_result+=tmp; - } -} - -template< typename iType, class Lambda, typename ValueType, class JoinType > -KOKKOS_INLINE_FUNCTION -void parallel_reduce - (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - const JoinType & join, - ValueType& initialized_result) -{ - ValueType result = initialized_result; -#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP -#pragma ivdep -#endif - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - ValueType tmp = ValueType(); - lambda(i,tmp); - join(result,tmp); - } - initialized_result = result; -} - -template< typename ValueType, typename iType, class Lambda > -KOKKOS_INLINE_FUNCTION -void parallel_scan - (const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda) -{ - ValueType accum = 0 ; - ValueType val, local_total; - - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - local_total = 0; - lambda(i,local_total,false); - val = accum; - lambda(i,val,true); - accum += local_total; - } - -} - -// placeholder for future function -template< typename iType, class Lambda, typename ValueType > -KOKKOS_INLINE_FUNCTION -void parallel_scan - (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda) -{ -} - -} /* namespace Kokkos */ - -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- - #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ #endif /* #ifndef KOKKOS_IMPL_SERIAL_TASK_HPP */ diff --git a/lib/kokkos/core/src/impl/Kokkos_Synchronic.hpp b/lib/kokkos/core/src/impl/Kokkos_Synchronic.hpp deleted file mode 100644 index b2aea14df4..0000000000 --- a/lib/kokkos/core/src/impl/Kokkos_Synchronic.hpp +++ /dev/null @@ -1,693 +0,0 @@ -/* - -Copyright (c) 2014, NVIDIA Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -#ifndef KOKKOS_SYNCHRONIC_HPP -#define KOKKOS_SYNCHRONIC_HPP - -#include - -#include -#include -#include -#include -#include - -namespace Kokkos { -namespace Impl { - -enum notify_hint { - notify_all, - notify_one, - notify_none -}; -enum expect_hint { - expect_urgent, - expect_delay -}; - -namespace Details { - -template -bool __synchronic_spin_wait_for_update(S const& arg, T const& nval, int attempts) noexcept { - int i = 0; - for(;i < __SYNCHRONIC_SPIN_RELAX(attempts); ++i) - if(__builtin_expect(arg.load(std::memory_order_relaxed) != nval,1)) - return true; - else - __synchronic_relax(); - for(;i < attempts; ++i) - if(__builtin_expect(arg.load(std::memory_order_relaxed) != nval,1)) - return true; - else - __synchronic_yield(); - return false; -} - -struct __exponential_backoff { - __exponential_backoff(int arg_maximum=512) : maximum(arg_maximum), microseconds(8), x(123456789), y(362436069), z(521288629) { - } - static inline void sleep_for(std::chrono::microseconds const& time) { - auto t = time.count(); - if(__builtin_expect(t > 75,0)) { - portable_sleep(time); - } - else if(__builtin_expect(t > 25,0)) - __synchronic_yield(); - else - __synchronic_relax(); - } - void sleep_for_step() { - sleep_for(step()); - } - std::chrono::microseconds step() { - float const f = ranfu(); - int const t = int(microseconds * f); - if(__builtin_expect(f >= 0.95f,0)) - microseconds = 8; - else - microseconds = (std::min)(microseconds>>1,maximum); - return std::chrono::microseconds(t); - } -private : - int maximum, microseconds, x, y, z; - int xorshf96() { - int t; - x ^= x << 16; x ^= x >> 5; x ^= x << 1; - t = x; x = y; y = z; z = t ^ x ^ y; - return z; - } - float ranfu() { - return (float)(xorshf96()&(~0UL>>1)) / (float)(~0UL>>1); - } -}; - -template -struct __synchronic_base { - -protected: - std::atomic atom; - - void notify(notify_hint = notify_all) noexcept { - } - void notify(notify_hint = notify_all) volatile noexcept { - } - -public : - __synchronic_base() noexcept = default; - constexpr __synchronic_base(T v) noexcept : atom(v) { } - __synchronic_base(const __synchronic_base&) = delete; - ~__synchronic_base() { } - __synchronic_base& operator=(const __synchronic_base&) = delete; - __synchronic_base& operator=(const __synchronic_base&) volatile = delete; - - void expect_update(T val, expect_hint = expect_urgent) const noexcept { - if(__synchronic_spin_wait_for_update(atom, val, __SYNCHRONIC_SPIN_COUNT_A)) - return; - __exponential_backoff b; - while(atom.load(std::memory_order_relaxed) == val) { - __do_backoff(b); - if(__synchronic_spin_wait_for_update(atom, val, __SYNCHRONIC_SPIN_COUNT_B)) - return; - } - } - void expect_update(T val, expect_hint = expect_urgent) const volatile noexcept { - if(__synchronic_spin_wait_for_update(atom, val, __SYNCHRONIC_SPIN_COUNT_A)) - return; - __exponential_backoff b; - while(atom.load(std::memory_order_relaxed) == val) { - __do_backoff(b); - if(__synchronic_spin_wait_for_update(atom, val, __SYNCHRONIC_SPIN_COUNT_B)) - return; - } - } - - template - void expect_update_until(T val, std::chrono::time_point const& then, expect_hint = expect_urgent) const { - if(__synchronic_spin_wait_for_update(atom, val, __SYNCHRONIC_SPIN_COUNT_A)) - return; - __exponential_backoff b; - std::chrono::milliseconds remains = then - std::chrono::high_resolution_clock::now(); - while(remains > std::chrono::milliseconds::zero() && atom.load(std::memory_order_relaxed) == val) { - __do_backoff(b); - if(__synchronic_spin_wait_for_update(atom, val, __SYNCHRONIC_SPIN_COUNT_B)) - return; - remains = then - std::chrono::high_resolution_clock::now(); - } - } - template - void expect_update_until(T val, std::chrono::time_point const& then, expect_hint = expect_urgent) const volatile { - if(__synchronic_spin_wait_for_update(atom, val, __SYNCHRONIC_SPIN_COUNT_A)) - return; - __exponential_backoff b; - std::chrono::milliseconds remains = then - std::chrono::high_resolution_clock::now(); - while(remains > std::chrono::milliseconds::zero() && atom.load(std::memory_order_relaxed) == val) { - __do_backoff(b); - if(__synchronic_spin_wait_for_update(atom, val, __SYNCHRONIC_SPIN_COUNT_B)) - return; - remains = then - std::chrono::high_resolution_clock::now(); - } - } -}; - -#ifdef __SYNCHRONIC_COMPATIBLE -template -struct __synchronic_base::type> { - -public: - std::atomic atom; - - void notify(notify_hint hint = notify_all) noexcept { - if(__builtin_expect(hint == notify_none,1)) - return; - auto const x = count.fetch_add(0,std::memory_order_acq_rel); - if(__builtin_expect(x,0)) { - if(__builtin_expect(hint == notify_all,1)) - __synchronic_wake_all(&atom); - else - __synchronic_wake_one(&atom); - } - } - void notify(notify_hint hint = notify_all) volatile noexcept { - if(__builtin_expect(hint == notify_none,1)) - return; - auto const x = count.fetch_add(0,std::memory_order_acq_rel); - if(__builtin_expect(x,0)) { - if(__builtin_expect(hint == notify_all,1)) - __synchronic_wake_all_volatile(&atom); - else - __synchronic_wake_one_volatile(&atom); - } - } - -public : - __synchronic_base() noexcept : count(0) { } - constexpr __synchronic_base(T v) noexcept : atom(v), count(0) { } - __synchronic_base(const __synchronic_base&) = delete; - ~__synchronic_base() { } - __synchronic_base& operator=(const __synchronic_base&) = delete; - __synchronic_base& operator=(const __synchronic_base&) volatile = delete; - - void expect_update(T val, expect_hint = expect_urgent) const noexcept { - if(__builtin_expect(__synchronic_spin_wait_for_update(atom, val,__SYNCHRONIC_SPIN_COUNT_A),1)) - return; - while(__builtin_expect(atom.load(std::memory_order_relaxed) == val,1)) { - count.fetch_add(1,std::memory_order_release); - __synchronic_wait(&atom,val); - count.fetch_add(-1,std::memory_order_acquire); - } - } - void expect_update(T val, expect_hint = expect_urgent) const volatile noexcept { - if(__builtin_expect(__synchronic_spin_wait_for_update(atom, val,__SYNCHRONIC_SPIN_COUNT_A),1)) - return; - while(__builtin_expect(atom.load(std::memory_order_relaxed) == val,1)) { - count.fetch_add(1,std::memory_order_release); - __synchronic_wait_volatile(&atom,val); - count.fetch_add(-1,std::memory_order_acquire); - } - } - - template - void expect_update_until(T val, std::chrono::time_point const& then, expect_hint = expect_urgent) const { - if(__builtin_expect(__synchronic_spin_wait_for_update(atom, val,__SYNCHRONIC_SPIN_COUNT_A),1)) - return; - std::chrono::milliseconds remains = then - std::chrono::high_resolution_clock::now(); - while(__builtin_expect(remains > std::chrono::milliseconds::zero() && atom.load(std::memory_order_relaxed) == val,1)) { - count.fetch_add(1,std::memory_order_release); - __synchronic_wait_timed(&atom,val,remains); - count.fetch_add(-1,std::memory_order_acquire); - remains = then - std::chrono::high_resolution_clock::now(); - } - } - template - void expect_update_until(T val, std::chrono::time_point const& then, expect_hint = expect_urgent) const volatile { - if(__builtin_expect(__synchronic_spin_wait_for_update(atom, val,__SYNCHRONIC_SPIN_COUNT_A),1)) - return; - std::chrono::milliseconds remains = then - std::chrono::high_resolution_clock::now(); - while(__builtin_expect(remains > std::chrono::milliseconds::zero() && atom.load(std::memory_order_relaxed) == val,1)) { - count.fetch_add(1,std::memory_order_release); - __synchronic_wait_timed_volatile(&atom,val,remains); - count.fetch_add(-1,std::memory_order_acquire); - remains = then - std::chrono::high_resolution_clock::now(); - } - } -private: - mutable std::atomic count; -}; -#endif - -template -struct __synchronic : public __synchronic_base { - - __synchronic() noexcept = default; - constexpr __synchronic(T v) noexcept : __synchronic_base(v) { } - __synchronic(const __synchronic&) = delete; - __synchronic& operator=(const __synchronic&) = delete; - __synchronic& operator=(const __synchronic&) volatile = delete; -}; - -template -struct __synchronic::value>::type> : public __synchronic_base { - - T fetch_add(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.fetch_add(v,m); - this->notify(n); - return t; - } - T fetch_add(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) noexcept { - auto const t = this->atom.fetch_add(v,m); - this->notify(n); - return t; - } - T fetch_sub(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.fetch_sub(v,m); - this->notify(n); - return t; - } - T fetch_sub(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) noexcept { - auto const t = this->atom.fetch_sub(v,m); - this->notify(n); - return t; - } - T fetch_and(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.fetch_and(v,m); - this->notify(n); - return t; - } - T fetch_and(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) noexcept { - auto const t = this->atom.fetch_and(v,m); - this->notify(n); - return t; - } - T fetch_or(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.fetch_or(v,m); - this->notify(n); - return t; - } - T fetch_or(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) noexcept { - auto const t = this->atom.fetch_or(v,m); - this->notify(n); - return t; - } - T fetch_xor(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.fetch_xor(v,m); - this->notify(n); - return t; - } - T fetch_xor(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) noexcept { - auto const t = this->atom.fetch_xor(v,m); - this->notify(n); - return t; - } - - __synchronic() noexcept = default; - constexpr __synchronic(T v) noexcept : __synchronic_base(v) { } - __synchronic(const __synchronic&) = delete; - __synchronic& operator=(const __synchronic&) = delete; - __synchronic& operator=(const __synchronic&) volatile = delete; - - T operator=(T v) volatile noexcept { - auto const t = this->atom = v; - this->notify(); - return t; - } - T operator=(T v) noexcept { - auto const t = this->atom = v; - this->notify(); - return t; - } - T operator++(int) volatile noexcept { - auto const t = ++this->atom; - this->notify(); - return t; - } - T operator++(int) noexcept { - auto const t = ++this->atom; - this->notify(); - return t; - } - T operator--(int) volatile noexcept { - auto const t = --this->atom; - this->notify(); - return t; - } - T operator--(int) noexcept { - auto const t = --this->atom; - this->notify(); - return t; - } - T operator++() volatile noexcept { - auto const t = this->atom++; - this->notify(); - return t; - } - T operator++() noexcept { - auto const t = this->atom++; - this->notify(); - return t; - } - T operator--() volatile noexcept { - auto const t = this->atom--; - this->notify(); - return t; - } - T operator--() noexcept { - auto const t = this->atom--; - this->notify(); - return t; - } - T operator+=(T v) volatile noexcept { - auto const t = this->atom += v; - this->notify(); - return t; - } - T operator+=(T v) noexcept { - auto const t = this->atom += v; - this->notify(); - return t; - } - T operator-=(T v) volatile noexcept { - auto const t = this->atom -= v; - this->notify(); - return t; - } - T operator-=(T v) noexcept { - auto const t = this->atom -= v; - this->notify(); - return t; - } - T operator&=(T v) volatile noexcept { - auto const t = this->atom &= v; - this->notify(); - return t; - } - T operator&=(T v) noexcept { - auto const t = this->atom &= v; - this->notify(); - return t; - } - T operator|=(T v) volatile noexcept { - auto const t = this->atom |= v; - this->notify(); - return t; - } - T operator|=(T v) noexcept { - auto const t = this->atom |= v; - this->notify(); - return t; - } - T operator^=(T v) volatile noexcept { - auto const t = this->atom ^= v; - this->notify(); - return t; - } - T operator^=(T v) noexcept { - auto const t = this->atom ^= v; - this->notify(); - return t; - } -}; - -template -struct __synchronic : public __synchronic_base { - - T* fetch_add(ptrdiff_t v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.fetch_add(v,m); - this->notify(n); - return t; - } - T* fetch_add(ptrdiff_t v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) noexcept { - auto const t = this->atom.fetch_add(v,m); - this->notify(n); - return t; - } - T* fetch_sub(ptrdiff_t v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.fetch_sub(v,m); - this->notify(n); - return t; - } - T* fetch_sub(ptrdiff_t v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) noexcept { - auto const t = this->atom.fetch_sub(v,m); - this->notify(n); - return t; - } - - __synchronic() noexcept = default; - constexpr __synchronic(T* v) noexcept : __synchronic_base(v) { } - __synchronic(const __synchronic&) = delete; - __synchronic& operator=(const __synchronic&) = delete; - __synchronic& operator=(const __synchronic&) volatile = delete; - - T* operator=(T* v) volatile noexcept { - auto const t = this->atom = v; - this->notify(); - return t; - } - T* operator=(T* v) noexcept { - auto const t = this->atom = v; - this->notify(); - return t; - } - T* operator++(int) volatile noexcept { - auto const t = ++this->atom; - this->notify(); - return t; - } - T* operator++(int) noexcept { - auto const t = ++this->atom; - this->notify(); - return t; - } - T* operator--(int) volatile noexcept { - auto const t = --this->atom; - this->notify(); - return t; - } - T* operator--(int) noexcept { - auto const t = --this->atom; - this->notify(); - return t; - } - T* operator++() volatile noexcept { - auto const t = this->atom++; - this->notify(); - return t; - } - T* operator++() noexcept { - auto const t = this->atom++; - this->notify(); - return t; - } - T* operator--() volatile noexcept { - auto const t = this->atom--; - this->notify(); - return t; - } - T* operator--() noexcept { - auto const t = this->atom--; - this->notify(); - return t; - } - T* operator+=(ptrdiff_t v) volatile noexcept { - auto const t = this->atom += v; - this->notify(); - return t; - } - T* operator+=(ptrdiff_t v) noexcept { - auto const t = this->atom += v; - this->notify(); - return t; - } - T* operator-=(ptrdiff_t v) volatile noexcept { - auto const t = this->atom -= v; - this->notify(); - return t; - } - T* operator-=(ptrdiff_t v) noexcept { - auto const t = this->atom -= v; - this->notify(); - return t; - } -}; - -} //namespace Details - -template -struct synchronic : public Details::__synchronic { - - bool is_lock_free() const volatile noexcept { return this->atom.is_lock_free(); } - bool is_lock_free() const noexcept { return this->atom.is_lock_free(); } - void store(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) volatile noexcept { - this->atom.store(v,m); - this->notify(n); - } - void store(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) noexcept { - this->atom.store(v,m); - this->notify(n); - } - T load(std::memory_order m = std::memory_order_seq_cst) const volatile noexcept { return this->atom.load(m); } - T load(std::memory_order m = std::memory_order_seq_cst) const noexcept { return this->atom.load(m); } - - operator T() const volatile noexcept { return (T)this->atom; } - operator T() const noexcept { return (T)this->atom; } - - T exchange(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.exchange(v,m); - this->notify(n); - return t; - } - T exchange(T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) noexcept { - auto const t = this->atom.exchange(v,m); - this->notify(n); - return t; - } - bool compare_exchange_weak(T& r, T v, std::memory_order m1, std::memory_order m2, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.compare_exchange_weak(r,v,m1,m2); - this->notify(n); - return t; - } - bool compare_exchange_weak(T& r, T v, std::memory_order m1, std::memory_order m2, notify_hint n = notify_all) noexcept { - auto const t = this->atom.compare_exchange_weak(r,v,m1, m2); - this->notify(n); - return t; - } - bool compare_exchange_strong(T& r, T v, std::memory_order m1, std::memory_order m2, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.compare_exchange_strong(r,v,m1,m2); - this->notify(n); - return t; - } - bool compare_exchange_strong(T& r, T v, std::memory_order m1, std::memory_order m2, notify_hint n = notify_all) noexcept { - auto const t = this->atom.compare_exchange_strong(r,v,m1,m2); - this->notify(n); - return t; - } - bool compare_exchange_weak(T& r, T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.compare_exchange_weak(r,v,m); - this->notify(n); - return t; - } - bool compare_exchange_weak(T& r, T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) noexcept { - auto const t = this->atom.compare_exchange_weak(r,v,m); - this->notify(n); - return t; - } - bool compare_exchange_strong(T& r, T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) volatile noexcept { - auto const t = this->atom.compare_exchange_strong(r,v,m); - this->notify(n); - return t; - } - bool compare_exchange_strong(T& r, T v, std::memory_order m = std::memory_order_seq_cst, notify_hint n = notify_all) noexcept { - auto const t = this->atom.compare_exchange_strong(r,v,m); - this->notify(n); - return t; - } - - synchronic() noexcept = default; - constexpr synchronic(T val) noexcept : Details::__synchronic(val) { } - synchronic(const synchronic&) = delete; - ~synchronic() { } - synchronic& operator=(const synchronic&) = delete; - synchronic& operator=(const synchronic&) volatile = delete; - T operator=(T val) noexcept { - return Details::__synchronic::operator=(val); - } - T operator=(T val) volatile noexcept { - return Details::__synchronic::operator=(val); - } - - T load_when_not_equal(T val, std::memory_order order = std::memory_order_seq_cst, expect_hint h = expect_urgent) const noexcept { - Details::__synchronic::expect_update(val,h); - return load(order); - } - T load_when_not_equal(T val, std::memory_order order = std::memory_order_seq_cst, expect_hint h = expect_urgent) const volatile noexcept { - Details::__synchronic::expect_update(val,h); - return load(order); - } - T load_when_equal(T val, std::memory_order order = std::memory_order_seq_cst, expect_hint h = expect_urgent) const noexcept { - for(T nval = load(std::memory_order_relaxed); nval != val; nval = load(std::memory_order_relaxed)) - Details::__synchronic::expect_update(nval,h); - return load(order); - } - T load_when_equal(T val, std::memory_order order = std::memory_order_seq_cst, expect_hint h = expect_urgent) const volatile noexcept { - for(T nval = load(std::memory_order_relaxed); nval != val; nval = load(std::memory_order_relaxed)) - expect_update(nval,h); - return load(order); - } - template - void expect_update_for(T val, std::chrono::duration const& delta, expect_hint h = expect_urgent) const { - Details::__synchronic::expect_update_until(val, std::chrono::high_resolution_clock::now() + delta,h); - } - template < class Rep, class Period> - void expect_update_for(T val, std::chrono::duration const& delta, expect_hint h = expect_urgent) const volatile { - Details::__synchronic::expect_update_until(val, std::chrono::high_resolution_clock::now() + delta,h); - } -}; - -#include - -typedef synchronic synchronic_char; -typedef synchronic synchronic_schar; -typedef synchronic synchronic_uchar; -typedef synchronic synchronic_short; -typedef synchronic synchronic_ushort; -typedef synchronic synchronic_int; -typedef synchronic synchronic_uint; -typedef synchronic synchronic_long; -typedef synchronic synchronic_ulong; -typedef synchronic synchronic_llong; -typedef synchronic synchronic_ullong; -//typedef synchronic synchronic_char16_t; -//typedef synchronic synchronic_char32_t; -typedef synchronic synchronic_wchar_t; - -typedef synchronic synchronic_int_least8_t; -typedef synchronic synchronic_uint_least8_t; -typedef synchronic synchronic_int_least16_t; -typedef synchronic synchronic_uint_least16_t; -typedef synchronic synchronic_int_least32_t; -typedef synchronic synchronic_uint_least32_t; -//typedef synchronic synchronic_int_least_64_t; -typedef synchronic synchronic_uint_least64_t; -typedef synchronic synchronic_int_fast8_t; -typedef synchronic synchronic_uint_fast8_t; -typedef synchronic synchronic_int_fast16_t; -typedef synchronic synchronic_uint_fast16_t; -typedef synchronic synchronic_int_fast32_t; -typedef synchronic synchronic_uint_fast32_t; -typedef synchronic synchronic_int_fast64_t; -typedef synchronic synchronic_uint_fast64_t; -typedef synchronic synchronic_intptr_t; -typedef synchronic synchronic_uintptr_t; -typedef synchronic synchronic_size_t; -typedef synchronic synchronic_ptrdiff_t; -typedef synchronic synchronic_intmax_t; -typedef synchronic synchronic_uintmax_t; - -} -} - -#endif //__SYNCHRONIC_H diff --git a/lib/kokkos/core/src/impl/Kokkos_Synchronic_Config.hpp b/lib/kokkos/core/src/impl/Kokkos_Synchronic_Config.hpp deleted file mode 100644 index 0a6dd6e715..0000000000 --- a/lib/kokkos/core/src/impl/Kokkos_Synchronic_Config.hpp +++ /dev/null @@ -1,169 +0,0 @@ -/* - -Copyright (c) 2014, NVIDIA Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -#ifndef KOKKOS_SYNCHRONIC_CONFIG_H -#define KOKKOS_SYNCHRONIC_CONFIG_H - -#include -#include - -namespace Kokkos { -namespace Impl { - -//the default yield function used inside the implementation is the Standard one -#define __synchronic_yield std::this_thread::yield -#define __synchronic_relax __synchronic_yield - -#if defined(_MSC_VER) - //this is a handy GCC optimization that I use inside the implementation - #define __builtin_expect(condition,common) condition - #if _MSC_VER <= 1800 - //using certain keywords that VC++ temporarily doesn't support - #define _ALLOW_KEYWORD_MACROS - #define noexcept - #define constexpr - #endif - //yes, I define multiple assignment operators - #pragma warning(disable:4522) - //I don't understand how Windows is so bad at timing functions, but is OK - //with straight-up yield loops - #define __do_backoff(b) __synchronic_yield() -#else -#define __do_backoff(b) b.sleep_for_step() -#endif - -//certain platforms have efficient support for spin-waiting built into the operating system -#if defined(__linux__) || (defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0602) -#if defined(_WIN32_WINNT) -#include -#include - //the combination of WaitOnAddress and WakeByAddressAll is supported on Windows 8.1+ - #define __synchronic_wait(x,v) WaitOnAddress((PVOID)x,(PVOID)&v,sizeof(v),-1) - #define __synchronic_wait_timed(x,v,t) WaitOnAddress((PVOID)x,(PVOID)&v,sizeof(v),std::chrono::duration_cast(t).count()) - #define __synchronic_wake_one(x) WakeByAddressSingle((PVOID)x) - #define __synchronic_wake_all(x) WakeByAddressAll((PVOID)x) - #define __synchronic_wait_volatile(x,v) WaitOnAddress((PVOID)x,(PVOID)&v,sizeof(v),-1) - #define __synchronic_wait_timed_volatile(x,v,t) WaitOnAddress((PVOID)x,(PVOID)&v,sizeof(v),std::chrono::duration_cast(t).count()) - #define __synchronic_wake_one_volatile(x) WakeByAddressSingle((PVOID)x) - #define __synchronic_wake_all_volatile(x) WakeByAddressAll((PVOID)x) - #define __SYNCHRONIC_COMPATIBLE(x) (std::is_pod::value && (sizeof(x) <= 8)) - - inline void native_sleep(unsigned long microseconds) - { - // What to do if microseconds is < 1000? - Sleep(microseconds / 1000); - } - - inline void native_yield() - { - SwitchToThread(); - } -#elif defined(__linux__) - #include - #include - #include - #include - #include - #include - #include - #include - template < class Rep, class Period> - inline timespec to_timespec(std::chrono::duration const& delta) { - struct timespec ts; - ts.tv_sec = static_cast(std::chrono::duration_cast(delta).count()); - assert(!ts.tv_sec); - ts.tv_nsec = static_cast(std::chrono::duration_cast(delta).count()); - return ts; - } - inline long futex(void const* addr1, int op, int val1) { - return syscall(SYS_futex, addr1, op, val1, 0, 0, 0); - } - inline long futex(void const* addr1, int op, int val1, struct timespec timeout) { - return syscall(SYS_futex, addr1, op, val1, &timeout, 0, 0); - } - inline void native_sleep(unsigned long microseconds) - { - usleep(microseconds); - } - inline void native_yield() - { - pthread_yield(); - } - - //the combination of SYS_futex(WAIT) and SYS_futex(WAKE) is supported on all recent Linux distributions - #define __synchronic_wait(x,v) futex(x, FUTEX_WAIT_PRIVATE, v) - #define __synchronic_wait_timed(x,v,t) futex(x, FUTEX_WAIT_PRIVATE, v, to_timespec(t)) - #define __synchronic_wake_one(x) futex(x, FUTEX_WAKE_PRIVATE, 1) - #define __synchronic_wake_all(x) futex(x, FUTEX_WAKE_PRIVATE, INT_MAX) - #define __synchronic_wait_volatile(x,v) futex(x, FUTEX_WAIT, v) - #define __synchronic_wait_volatile_timed(x,v,t) futex(x, FUTEX_WAIT, v, to_timespec(t)) - #define __synchronic_wake_one_volatile(x) futex(x, FUTEX_WAKE, 1) - #define __synchronic_wake_all_volatile(x) futex(x, FUTEX_WAKE, INT_MAX) - #define __SYNCHRONIC_COMPATIBLE(x) (std::is_integral::value && (sizeof(x) <= 4)) - - //the yield function on Linux is better replaced by sched_yield, which is tuned for spin-waiting - #undef __synchronic_yield - #define __synchronic_yield sched_yield - - //for extremely short wait times, just let another hyper-thread run - #undef __synchronic_relax - #define __synchronic_relax() asm volatile("rep; nop" ::: "memory") - -#endif -#endif - -#ifdef _GLIBCXX_USE_NANOSLEEP -inline void portable_sleep(std::chrono::microseconds const& time) -{ std::this_thread::sleep_for(time); } -#else -inline void portable_sleep(std::chrono::microseconds const& time) -{ native_sleep(time.count()); } -#endif - -#ifdef _GLIBCXX_USE_SCHED_YIELD -inline void portable_yield() -{ std::this_thread::yield(); } -#else -inline void portable_yield() -{ native_yield(); } -#endif - -//this is the number of times we initially spin, on the first wait attempt -#define __SYNCHRONIC_SPIN_COUNT_A 16 - -//this is how decide to yield instead of just spinning, 'c' is the current trip count -//#define __SYNCHRONIC_SPIN_YIELD(c) true -#define __SYNCHRONIC_SPIN_RELAX(c) (c>>3) - -//this is the number of times we normally spin, on every subsequent wait attempt -#define __SYNCHRONIC_SPIN_COUNT_B 8 - -} -} - -#endif //__SYNCHRONIC_CONFIG_H diff --git a/lib/kokkos/core/src/impl/Kokkos_Synchronic_n3998.hpp b/lib/kokkos/core/src/impl/Kokkos_Synchronic_n3998.hpp deleted file mode 100644 index facc8d6d8e..0000000000 --- a/lib/kokkos/core/src/impl/Kokkos_Synchronic_n3998.hpp +++ /dev/null @@ -1,162 +0,0 @@ -/* - -Copyright (c) 2014, NVIDIA Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -#ifndef KOKKOS_SYNCHRONIC_N3998_HPP -#define KOKKOS_SYNCHRONIC_N3998_HPP - -#include -#include - -/* -In the section below, a synchronization point represents a point at which a -thread may block until a given synchronization condition has been reached or -at which it may notify other threads that a synchronization condition has -been achieved. -*/ -namespace Kokkos { namespace Impl { - - /* - A latch maintains an internal counter that is initialized when the latch - is created. The synchronization condition is reached when the counter is - decremented to 0. Threads may block at a synchronization point waiting - for the condition to be reached. When the condition is reached, any such - blocked threads will be released. - */ - struct latch { - latch(int val) : count(val), released(false) { } - latch(const latch&) = delete; - latch& operator=(const latch&) = delete; - ~latch( ) { } - void arrive( ) { - __arrive( ); - } - void arrive_and_wait( ) { - if(!__arrive( )) - wait( ); - } - void wait( ) { - while(!released.load_when_not_equal(false,std::memory_order_acquire)) - ; - } - bool try_wait( ) { - return released.load(std::memory_order_acquire); - } - private: - bool __arrive( ) { - if(count.fetch_add(-1,std::memory_order_release)!=1) - return false; - released.store(true,std::memory_order_release); - return true; - } - std::atomic count; - synchronic released; - }; - - /* - A barrier is created with an initial value representing the number of threads - that can arrive at the synchronization point. When that many threads have - arrived, the synchronization condition is reached and the threads are - released. The barrier will then reset, and may be reused for a new cycle, in - which the same set of threads may arrive again at the synchronization point. - The same set of threads shall arrive at the barrier in each cycle, otherwise - the behaviour is undefined. - */ - struct barrier { - barrier(int val) : expected(val), arrived(0), nexpected(val), epoch(0) { } - barrier(const barrier&) = delete; - barrier& operator=(const barrier&) = delete; - ~barrier() { } - void arrive_and_wait() { - int const myepoch = epoch.load(std::memory_order_relaxed); - if(!__arrive(myepoch)) - while(epoch.load_when_not_equal(myepoch,std::memory_order_acquire) == myepoch) - ; - } - void arrive_and_drop() { - nexpected.fetch_add(-1,std::memory_order_relaxed); - __arrive(epoch.load(std::memory_order_relaxed)); - } - private: - bool __arrive(int const myepoch) { - int const myresult = arrived.fetch_add(1,std::memory_order_acq_rel) + 1; - if(__builtin_expect(myresult == expected,0)) { - expected = nexpected.load(std::memory_order_relaxed); - arrived.store(0,std::memory_order_relaxed); - epoch.store(myepoch+1,std::memory_order_release); - return true; - } - return false; - } - int expected; - std::atomic arrived, nexpected; - synchronic epoch; - }; - - /* - A notifying barrier behaves as a barrier, but is constructed with a callable - completion function that is invoked after all threads have arrived at the - synchronization point, and before the synchronization condition is reached. - The completion may modify the set of threads that arrives at the barrier in - each cycle. - */ - struct notifying_barrier { - template - notifying_barrier(int val, T && f) : expected(val), arrived(0), nexpected(val), epoch(0), completion(std::forward(f)) { } - notifying_barrier(const notifying_barrier&) = delete; - notifying_barrier& operator=(const notifying_barrier&) = delete; - ~notifying_barrier( ) { } - void arrive_and_wait() { - int const myepoch = epoch.load(std::memory_order_relaxed); - if(!__arrive(myepoch)) - while(epoch.load_when_not_equal(myepoch,std::memory_order_acquire) == myepoch) - ; - } - void arrive_and_drop() { - nexpected.fetch_add(-1,std::memory_order_relaxed); - __arrive(epoch.load(std::memory_order_relaxed)); - } - private: - bool __arrive(int const myepoch) { - int const myresult = arrived.fetch_add(1,std::memory_order_acq_rel) + 1; - if(__builtin_expect(myresult == expected,0)) { - int const newexpected = completion(); - expected = newexpected ? newexpected : nexpected.load(std::memory_order_relaxed); - arrived.store(0,std::memory_order_relaxed); - epoch.store(myepoch+1,std::memory_order_release); - return true; - } - return false; - } - int expected; - std::atomic arrived, nexpected; - synchronic epoch; - std::function completion; - }; -}} - -#endif //__N3998_H diff --git a/lib/kokkos/core/src/impl/Kokkos_TaskQueue.hpp b/lib/kokkos/core/src/impl/Kokkos_TaskQueue.hpp index afa01d0cde..b514df3517 100644 --- a/lib/kokkos/core/src/impl/Kokkos_TaskQueue.hpp +++ b/lib/kokkos/core/src/impl/Kokkos_TaskQueue.hpp @@ -76,9 +76,6 @@ namespace Impl { template< typename Space , typename ResultType , typename FunctorType > class TaskBase ; -template< typename Space > -class TaskExec ; - } /* namespace Impl */ } /* namespace Kokkos */ @@ -149,8 +146,8 @@ private: // task->m_next is the dependence or zero // Postcondition: // task->m_next is linked list membership - KOKKOS_FUNCTION - void schedule( task_root_type * const ); + KOKKOS_FUNCTION void schedule_runnable( task_root_type * const ); + KOKKOS_FUNCTION void schedule_aggregate( task_root_type * const ); // Reschedule a task // Precondition: @@ -178,7 +175,7 @@ private: , task_root_type * const ); KOKKOS_FUNCTION - static task_root_type * pop_task( task_root_type * volatile * const ); + static task_root_type * pop_ready_task( task_root_type * volatile * const ); KOKKOS_FUNCTION static void decrement( task_root_type * task ); @@ -368,6 +365,7 @@ public: int16_t m_task_type ; ///< Type of task int16_t m_priority ; ///< Priority of runnable task + TaskBase() = delete ; TaskBase( TaskBase && ) = delete ; TaskBase( const TaskBase & ) = delete ; TaskBase & operator = ( TaskBase && ) = delete ; @@ -375,17 +373,43 @@ public: KOKKOS_INLINE_FUNCTION ~TaskBase() = default ; + // Constructor for a runnable task KOKKOS_INLINE_FUNCTION - constexpr TaskBase() noexcept - : m_apply(0) - , m_queue(0) - , m_wait(0) - , m_next(0) - , m_ref_count(0) - , m_alloc_size(0) - , m_dep_count(0) - , m_task_type( TaskSingle ) - , m_priority( 1 /* TaskRegularPriority */ ) + constexpr TaskBase( function_type arg_apply + , queue_type * arg_queue + , TaskBase * arg_dependence + , int arg_ref_count + , int arg_alloc_size + , int arg_task_type + , int arg_priority + ) noexcept + : m_apply( arg_apply ) + , m_queue( arg_queue ) + , m_wait( 0 ) + , m_next( arg_dependence ) + , m_ref_count( arg_ref_count ) + , m_alloc_size( arg_alloc_size ) + , m_dep_count( 0 ) + , m_task_type( arg_task_type ) + , m_priority( arg_priority ) + {} + + // Constructor for an aggregate task + KOKKOS_INLINE_FUNCTION + constexpr TaskBase( queue_type * arg_queue + , int arg_ref_count + , int arg_alloc_size + , int arg_dep_count + ) noexcept + : m_apply( 0 ) + , m_queue( arg_queue ) + , m_wait( 0 ) + , m_next( 0 ) + , m_ref_count( arg_ref_count ) + , m_alloc_size( arg_alloc_size ) + , m_dep_count( arg_dep_count ) + , m_task_type( Aggregate ) + , m_priority( 0 ) {} //---------------------------------------- @@ -406,9 +430,13 @@ public: KOKKOS_INLINE_FUNCTION void add_dependence( TaskBase* dep ) { + // Precondition: lock == m_next + + TaskBase * const lock = (TaskBase *) LockTag ; + // Assign dependence to m_next. It will be processed in the subsequent // call to schedule. Error if the dependence is reset. - if ( 0 != Kokkos::atomic_exchange( & m_next, dep ) ) { + if ( lock != Kokkos::atomic_exchange( & m_next, dep ) ) { Kokkos::abort("TaskScheduler ERROR: resetting task dependence"); } @@ -431,8 +459,13 @@ class TaskBase< ExecSpace , ResultType , void > { private: - static_assert( sizeof(TaskBase) == 48 , "" ); + using root_type = TaskBase ; + using function_type = typename root_type::function_type ; + using queue_type = typename root_type::queue_type ; + static_assert( sizeof(root_type) == 48 , "" ); + + TaskBase() = delete ; TaskBase( TaskBase && ) = delete ; TaskBase( const TaskBase & ) = delete ; TaskBase & operator = ( TaskBase && ) = delete ; @@ -444,9 +477,24 @@ public: KOKKOS_INLINE_FUNCTION ~TaskBase() = default ; + // Constructor for runnable task KOKKOS_INLINE_FUNCTION - TaskBase() - : TaskBase< ExecSpace , void , void >() + constexpr TaskBase( function_type arg_apply + , queue_type * arg_queue + , root_type * arg_dependence + , int arg_ref_count + , int arg_alloc_size + , int arg_task_type + , int arg_priority + ) + : root_type( arg_apply + , arg_queue + , arg_dependence + , arg_ref_count + , arg_alloc_size + , arg_task_type + , arg_priority + ) , m_result() {} @@ -471,11 +519,14 @@ private: public: - using root_type = TaskBase< ExecSpace , void , void > ; - using base_type = TaskBase< ExecSpace , ResultType , void > ; - using member_type = TaskExec< ExecSpace > ; - using functor_type = FunctorType ; - using result_type = ResultType ; + using root_type = TaskBase< ExecSpace , void , void > ; + using base_type = TaskBase< ExecSpace , ResultType , void > ; + using specialization = TaskQueueSpecialization< ExecSpace > ; + using function_type = typename root_type::function_type ; + using queue_type = typename root_type::queue_type ; + using member_type = typename specialization::member_type ; + using functor_type = FunctorType ; + using result_type = ResultType ; template< typename Type > KOKKOS_INLINE_FUNCTION static @@ -522,13 +573,30 @@ public: if ( 0 == member->team_rank() && !(task->requested_respawn()) ) { // Did not respawn, destroy the functor to free memory. static_cast(task)->~functor_type(); - // Cannot destroy the task until its dependences have been processed. + // Cannot destroy and deallocate the task until its dependences + // have been processed. } } + // Constructor for runnable task KOKKOS_INLINE_FUNCTION - TaskBase( functor_type const & arg_functor ) - : base_type() + constexpr TaskBase( function_type arg_apply + , queue_type * arg_queue + , root_type * arg_dependence + , int arg_ref_count + , int arg_alloc_size + , int arg_task_type + , int arg_priority + , FunctorType && arg_functor + ) + : base_type( arg_apply + , arg_queue + , arg_dependence + , arg_ref_count + , arg_alloc_size + , arg_task_type + , arg_priority + ) , functor_type( arg_functor ) {} diff --git a/lib/kokkos/core/src/impl/Kokkos_TaskQueue_impl.hpp b/lib/kokkos/core/src/impl/Kokkos_TaskQueue_impl.hpp index fefbbad8bd..23f5d3cd30 100644 --- a/lib/kokkos/core/src/impl/Kokkos_TaskQueue_impl.hpp +++ b/lib/kokkos/core/src/impl/Kokkos_TaskQueue_impl.hpp @@ -170,6 +170,7 @@ bool TaskQueue< ExecSpace >::push_task ) { // Push task into a concurrently pushed and popped queue. + // The queue can be either a ready task queue or a waiting task queue. // The queue is a linked list where 'task->m_next' form the links. // Fail the push attempt if the queue is locked; // otherwise retry until the push succeeds. @@ -227,13 +228,12 @@ bool TaskQueue< ExecSpace >::push_task template< typename ExecSpace > KOKKOS_FUNCTION typename TaskQueue< ExecSpace >::task_root_type * -TaskQueue< ExecSpace >::pop_task +TaskQueue< ExecSpace >::pop_ready_task ( TaskQueue< ExecSpace >::task_root_type * volatile * const queue ) { - // Pop task from a concurrently pushed and popped queue. + // Pop task from a concurrently pushed and popped ready task queue. // The queue is a linked list where 'task->m_next' form the links. - task_root_type * const zero = (task_root_type *) 0 ; task_root_type * const lock = (task_root_type *) task_root_type::LockTag ; task_root_type * const end = (task_root_type *) task_root_type::EndTag ; @@ -252,85 +252,83 @@ TaskQueue< ExecSpace >::pop_task // (1) lock, (2) end, or (3) a valid task. // Thus zero will never appear in the queue. // - // If queue is locked then just read by guaranteeing - // the CAS will fail. + // If queue is locked then just read by guaranteeing the CAS will fail. if ( lock == task ) task = 0 ; task_root_type * const x = task ; - task = Kokkos::atomic_compare_exchange(queue,task,lock); - - if ( x == task ) break ; // CAS succeeded and queue is locked - } + task = Kokkos::atomic_compare_exchange(queue,x,lock); - if ( end != task ) { + if ( x == task ) { + // CAS succeeded and queue is locked + // + // This thread has locked the queue and removed 'task' from the queue. + // Extract the next entry of the queue from 'task->m_next' + // and mark 'task' as popped from a queue by setting + // 'task->m_next = lock'. + // + // Place the next entry in the head of the queue, + // which also unlocks the queue. + // + // This thread has exclusive access to + // the queue and the popped task's m_next. - // This thread has locked the queue and removed 'task' from the queue. - // Extract the next entry of the queue from 'task->m_next' - // and mark 'task' as popped from a queue by setting - // 'task->m_next = lock'. + *queue = task->m_next ; task->m_next = lock ; - task_root_type * const next = - Kokkos::atomic_exchange( & task->m_next , lock ); + Kokkos::memory_fence(); - // Place the next entry in the head of the queue, - // which also unlocks the queue. - - task_root_type * const unlock = - Kokkos::atomic_exchange( queue , next ); +#if 0 + printf( "pop_ready_task( 0x%lx 0x%lx { 0x%lx 0x%lx %d %d %d } )\n" + , uintptr_t(queue) + , uintptr_t(task) + , uintptr_t(task->m_wait) + , uintptr_t(task->m_next) + , int(task->m_task_type) + , int(task->m_priority) + , int(task->m_ref_count) ); +#endif - if ( next == zero || next == lock || lock != unlock ) { - Kokkos::abort("TaskQueue::pop_task ERROR"); + return task ; } } -#if 0 - if ( end != task ) { - printf( "pop_task( 0x%lx 0x%lx { 0x%lx 0x%lx %d %d %d } )\n" - , uintptr_t(queue) - , uintptr_t(task) - , uintptr_t(task->m_wait) - , uintptr_t(task->m_next) - , int(task->m_task_type) - , int(task->m_priority) - , int(task->m_ref_count) ); - } -#endif - - return task ; + return end ; } //---------------------------------------------------------------------------- template< typename ExecSpace > KOKKOS_FUNCTION -void TaskQueue< ExecSpace >::schedule +void TaskQueue< ExecSpace >::schedule_runnable ( TaskQueue< ExecSpace >::task_root_type * const task ) { - // Schedule a runnable or when_all task upon construction / spawn + // Schedule a runnable task upon construction / spawn // and upon completion of other tasks that 'task' is waiting on. - - // Precondition on runnable task state: - // task is either constructing or executing + // + // Precondition: + // - called by a single thread for the input task + // - calling thread has exclusive access to the task + // - task is not a member of a queue + // - if runnable then task is either constructing or respawning // // Constructing state: // task->m_wait == 0 - // task->m_next == dependence - // Executing-respawn state: - // task->m_wait == head of linked list - // task->m_next == dependence + // task->m_next == dependence or 0 + // Respawn state: + // task->m_wait == head of linked list: 'end' or valid task + // task->m_next == dependence or 0 // // Task state transition: - // Constructing -> Waiting - // Executing-respawn -> Waiting + // Constructing -> Waiting + // Respawn -> Waiting // // Postcondition on task state: - // task->m_wait == head of linked list - // task->m_next == member of linked list + // task->m_wait == head of linked list (queue) + // task->m_next == member of linked list (queue) #if 0 - printf( "schedule( 0x%lx { 0x%lx 0x%lx %d %d %d }\n" + printf( "schedule_runnable( 0x%lx { 0x%lx 0x%lx %d %d %d }\n" , uintptr_t(task) , uintptr_t(task->m_wait) , uintptr_t(task->m_next) @@ -343,135 +341,204 @@ void TaskQueue< ExecSpace >::schedule task_root_type * const lock = (task_root_type *) task_root_type::LockTag ; task_root_type * const end = (task_root_type *) task_root_type::EndTag ; - //---------------------------------------- - { - // If Constructing then task->m_wait == 0 - // Change to waiting by task->m_wait = EndTag - - task_root_type * const init = - Kokkos::atomic_compare_exchange( & task->m_wait , zero , end ); + bool respawn = false ; - // Precondition + //---------------------------------------- - if ( lock == init ) { - Kokkos::abort("TaskQueue::schedule ERROR: task is complete"); - } + if ( zero == task->m_wait ) { + // Task in Constructing state + // - Transition to Waiting state + // Preconditions: + // - call occurs exclusively within a single thread - // if ( init == 0 ) Constructing -> Waiting - // else Executing-Respawn -> Waiting + task->m_wait = end ; + // Task in Waiting state } + else if ( lock != task->m_wait ) { + // Task in Executing state with Respawn request + // - Update dependence + // - Transition to Waiting state + respawn = true ; + } + else { + // Task in Complete state + Kokkos::abort("TaskQueue::schedule_runnable ERROR: task is complete"); + } + //---------------------------------------- + // Scheduling a runnable task which may have a depencency 'dep'. + // Extract dependence, if any, from task->m_next. + // If 'dep' is not null then attempt to push 'task' + // into the wait queue of 'dep'. + // If the push succeeds then 'task' may be + // processed or executed by another thread at any time. + // If the push fails then 'dep' is complete and 'task' + // is ready to execute. + + // Exclusive access so don't need an atomic exchange + // task_root_type * dep = Kokkos::atomic_exchange( & task->m_next , zero ); + task_root_type * dep = task->m_next ; task->m_next = zero ; + + const bool is_ready = + ( 0 == dep ) || ( ! push_task( & dep->m_wait , task ) ); + + if ( ( 0 != dep ) && respawn ) { + // Reference count for dep was incremented when + // respawn assigned dependency to task->m_next + // so that if dep completed prior to the + // above push_task dep would not be destroyed. + // dep reference count can now be decremented, + // which may deallocate the task. + TaskQueue::assign( & dep , (task_root_type *)0 ); + } - if ( task_root_type::Aggregate != task->m_task_type ) { + if ( is_ready ) { - // Scheduling a runnable task which may have a depencency 'dep'. - // Extract dependence, if any, from task->m_next. - // If 'dep' is not null then attempt to push 'task' - // into the wait queue of 'dep'. - // If the push succeeds then 'task' may be - // processed or executed by another thread at any time. - // If the push fails then 'dep' is complete and 'task' - // is ready to execute. + // No dependence or 'dep' is complete so push task into ready queue. + // Increment the ready count before pushing into ready queue + // to track number of ready + executing tasks. + // The ready count will be decremented when the task is complete. - task_root_type * dep = Kokkos::atomic_exchange( & task->m_next , zero ); + Kokkos::atomic_increment( & m_ready_count ); - const bool is_ready = - ( 0 == dep ) || ( ! push_task( & dep->m_wait , task ) ); + task_root_type * volatile * const ready_queue = + & m_ready[ task->m_priority ][ task->m_task_type ]; - // Reference count for dep was incremented when assigned - // to task->m_next so that if it completed prior to the - // above push_task dep would not be destroyed. - // dep reference count can now be decremented, - // which may deallocate the task. - TaskQueue::assign( & dep , (task_root_type *)0 ); + // A push_task fails if the ready queue is locked. + // A ready queue is only locked during a push or pop; + // i.e., it is never permanently locked. + // Retry push to ready queue until it succeeds. + // When the push succeeds then 'task' may be + // processed or executed by another thread at any time. - if ( is_ready ) { + while ( ! push_task( ready_queue , task ) ); + } - // No dependence or 'dep' is complete so push task into ready queue. - // Increment the ready count before pushing into ready queue - // to track number of ready + executing tasks. - // The ready count will be decremented when the task is complete. + //---------------------------------------- + // Postcondition: + // - A runnable 'task' was pushed into a wait or ready queue. + // - Concurrent execution may have already popped 'task' + // from a queue and processed it as appropriate. +} - Kokkos::atomic_increment( & m_ready_count ); +template< typename ExecSpace > +KOKKOS_FUNCTION +void TaskQueue< ExecSpace >::schedule_aggregate + ( TaskQueue< ExecSpace >::task_root_type * const task ) +{ + // Schedule an aggregate task upon construction + // and upon completion of other tasks that 'task' is waiting on. + // + // Precondition: + // - called by a single thread for the input task + // - calling thread has exclusive access to the task + // - task is not a member of a queue + // + // Constructing state: + // task->m_wait == 0 + // task->m_next == dependence or 0 + // + // Task state transition: + // Constructing -> Waiting + // + // Postcondition on task state: + // task->m_wait == head of linked list (queue) + // task->m_next == member of linked list (queue) + +#if 0 + printf( "schedule_aggregate( 0x%lx { 0x%lx 0x%lx %d %d %d }\n" + , uintptr_t(task) + , uintptr_t(task->m_wait) + , uintptr_t(task->m_next) + , task->m_task_type + , task->m_priority + , task->m_ref_count ); +#endif - task_root_type * volatile * const queue = - & m_ready[ task->m_priority ][ task->m_task_type ]; + task_root_type * const zero = (task_root_type *) 0 ; + task_root_type * const lock = (task_root_type *) task_root_type::LockTag ; + task_root_type * const end = (task_root_type *) task_root_type::EndTag ; - // A push_task fails if the ready queue is locked. - // A ready queue is only locked during a push or pop; - // i.e., it is never permanently locked. - // Retry push to ready queue until it succeeds. - // When the push succeeds then 'task' may be - // processed or executed by another thread at any time. + //---------------------------------------- - while ( ! push_task( queue , task ) ); - } + if ( zero == task->m_wait ) { + // Task in Constructing state + // - Transition to Waiting state + // Preconditions: + // - call occurs exclusively within a single thread + + task->m_wait = end ; + // Task in Waiting state + } + else if ( lock == task->m_wait ) { + // Task in Complete state + Kokkos::abort("TaskQueue::schedule_aggregate ERROR: task is complete"); } + //---------------------------------------- - else { - // Scheduling a 'when_all' task with multiple dependences. - // This scheduling may be called when the 'when_all' is - // (1) created or - // (2) being removed from a completed task's wait list. + // Scheduling a 'when_all' task with multiple dependences. + // This scheduling may be called when the 'when_all' is + // (1) created or + // (2) being removed from a completed task's wait list. - task_root_type ** const aggr = task->aggregate_dependences(); + task_root_type ** const aggr = task->aggregate_dependences(); - // Assume the 'when_all' is complete until a dependence is - // found that is not complete. + // Assume the 'when_all' is complete until a dependence is + // found that is not complete. - bool is_complete = true ; + bool is_complete = true ; - for ( int i = task->m_dep_count ; 0 < i && is_complete ; ) { + for ( int i = task->m_dep_count ; 0 < i && is_complete ; ) { - --i ; + --i ; - // Loop dependences looking for an incomplete task. - // Add this task to the incomplete task's wait queue. + // Loop dependences looking for an incomplete task. + // Add this task to the incomplete task's wait queue. - // Remove a task 'x' from the dependence list. - // The reference count of 'x' was incremented when - // it was assigned into the dependence list. + // Remove a task 'x' from the dependence list. + // The reference count of 'x' was incremented when + // it was assigned into the dependence list. - task_root_type * x = Kokkos::atomic_exchange( aggr + i , zero ); + // Exclusive access so don't need an atomic exchange + // task_root_type * x = Kokkos::atomic_exchange( aggr + i , zero ); + task_root_type * x = aggr[i] ; aggr[i] = zero ; - if ( x ) { + if ( x ) { - // If x->m_wait is not locked then push succeeds - // and the aggregate is not complete. - // If the push succeeds then this when_all 'task' may be - // processed by another thread at any time. - // For example, 'x' may be completeed by another - // thread and then re-schedule this when_all 'task'. + // If x->m_wait is not locked then push succeeds + // and the aggregate is not complete. + // If the push succeeds then this when_all 'task' may be + // processed by another thread at any time. + // For example, 'x' may be completeed by another + // thread and then re-schedule this when_all 'task'. - is_complete = ! push_task( & x->m_wait , task ); + is_complete = ! push_task( & x->m_wait , task ); - // Decrement reference count which had been incremented - // when 'x' was added to the dependence list. + // Decrement reference count which had been incremented + // when 'x' was added to the dependence list. - TaskQueue::assign( & x , zero ); - } + TaskQueue::assign( & x , zero ); } + } - if ( is_complete ) { - // The when_all 'task' was not added to a wait queue because - // all dependences were complete so this aggregate is complete. - // Complete the when_all 'task' to schedule other tasks - // that are waiting for the when_all 'task' to complete. + if ( is_complete ) { + // The when_all 'task' was not added to a wait queue because + // all dependences were complete so this aggregate is complete. + // Complete the when_all 'task' to schedule other tasks + // that are waiting for the when_all 'task' to complete. - task->m_next = lock ; + task->m_next = lock ; - complete( task ); + complete( task ); - // '*task' may have been deleted upon completion - } + // '*task' may have been deleted upon completion } + //---------------------------------------- // Postcondition: - // A runnable 'task' was pushed into a wait or ready queue. - // An aggregate 'task' was either pushed to a wait queue - // or completed. - // Concurrent execution may have already popped 'task' - // from a queue and processed it as appropriate. + // - An aggregate 'task' was either pushed to a wait queue or completed. + // - Concurrent execution may have already popped 'task' + // from a queue and processed it as appropriate. } //---------------------------------------------------------------------------- @@ -529,7 +596,7 @@ void TaskQueue< ExecSpace >::complete // Is a runnable task has finished executing and requested respawn. // Schedule the task for subsequent execution. - schedule( task ); + schedule_runnable( task ); } //---------------------------------------- else { @@ -556,18 +623,22 @@ void TaskQueue< ExecSpace >::complete TaskQueue::assign( & task , zero ); // This thread has exclusive access to the wait list so - // the concurrency-safe pop_task function is not needed. + // the concurrency-safe pop_ready_task function is not needed. // Schedule the tasks that have been waiting on the input 'task', // which may have been deleted. while ( x != end ) { + // Have exclusive access to 'x' until it is scheduled + // Set x->m_next = zero <= no dependence, not a respawn - // Set x->m_next = zero <= no dependence - - task_root_type * const next = - (task_root_type *) Kokkos::atomic_exchange( & x->m_next , zero ); + task_root_type * const next = x->m_next ; x->m_next = 0 ; - schedule( x ); + if ( task_root_type::Aggregate != x->m_task_type ) { + schedule_runnable( x ); + } + else { + schedule_aggregate( x ); + } x = next ; } diff --git a/lib/kokkos/core/src/impl/Kokkos_Utilities.hpp b/lib/kokkos/core/src/impl/Kokkos_Utilities.hpp index ff503cb273..d72cde03fd 100644 --- a/lib/kokkos/core/src/impl/Kokkos_Utilities.hpp +++ b/lib/kokkos/core/src/impl/Kokkos_Utilities.hpp @@ -45,6 +45,7 @@ #define KOKKOS_CORE_IMPL_UTILITIES_HPP #include +#include #include //---------------------------------------------------------------------------- diff --git a/lib/kokkos/core/src/impl/Kokkos_spinwait.cpp b/lib/kokkos/core/src/impl/Kokkos_spinwait.cpp index ad1b6dce39..93ff6c48a7 100644 --- a/lib/kokkos/core/src/impl/Kokkos_spinwait.cpp +++ b/lib/kokkos/core/src/impl/Kokkos_spinwait.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,52 +36,144 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ #include + #include +#include +#include + /*--------------------------------------------------------------------------*/ -#if ( KOKKOS_ENABLE_ASM ) - #if defined( __arm__ ) || defined( __aarch64__ ) - /* No-operation instruction to idle the thread. */ - #define YIELD asm volatile("nop") +#if !defined( _WIN32 ) + #if defined( KOKKOS_ENABLE_ASM ) + #if defined( __arm__ ) || defined( __aarch64__ ) + /* No-operation instruction to idle the thread. */ + #define KOKKOS_INTERNAL_PAUSE + #else + /* Pause instruction to prevent excess processor bus usage */ + #define KOKKOS_INTERNAL_PAUSE asm volatile("pause\n":::"memory") + #endif + #define KOKKOS_INTERNAL_NOP2 asm volatile("nop\n" "nop\n") + #define KOKKOS_INTERNAL_NOP4 KOKKOS_INTERNAL_NOP2; KOKKOS_INTERNAL_NOP2 + #define KOKKOS_INTERNAL_NOP8 KOKKOS_INTERNAL_NOP4; KOKKOS_INTERNAL_NOP4; + #define KOKKOS_INTERNAL_NOP16 KOKKOS_INTERNAL_NOP8; KOKKOS_INTERNAL_NOP8; + #define KOKKOS_INTERNAL_NOP32 KOKKOS_INTERNAL_NOP16; KOKKOS_INTERNAL_NOP16; + namespace { + inline void kokkos_internal_yield( const unsigned i ) noexcept { + switch (Kokkos::Impl::bit_scan_reverse((i >> 2)+1u)) { + case 0u: KOKKOS_INTERNAL_NOP2; break; + case 1u: KOKKOS_INTERNAL_NOP4; break; + case 2u: KOKKOS_INTERNAL_NOP8; break; + case 3u: KOKKOS_INTERNAL_NOP16; break; + default: KOKKOS_INTERNAL_NOP32; + } + KOKKOS_INTERNAL_PAUSE; + } + } #else - /* Pause instruction to prevent excess processor bus usage */ - #define YIELD asm volatile("pause\n":::"memory") + #include + namespace { + inline void kokkos_internal_yield( const unsigned ) noexcept { + sched_yield(); + } + } + #endif +#else // defined( _WIN32 ) + #if defined ( KOKKOS_ENABLE_WINTHREAD ) + #include + namespace { + inline void kokkos_internal_yield( const unsigned ) noexcept { + Sleep(0); + } + } + #elif defined( _MSC_VER ) + #define NOMINMAX + #include + #include + namespace { + inline void kokkos_internal_yield( const unsigned ) noexcept { + YieldProcessor(); + } + } + #else + #define KOKKOS_INTERNAL_PAUSE __asm__ __volatile__("pause\n":::"memory") + #define KOKKOS_INTERNAL_NOP2 __asm__ __volatile__("nop\n" "nop") + #define KOKKOS_INTERNAL_NOP4 KOKKOS_INTERNAL_NOP2; KOKKOS_INTERNAL_NOP2 + #define KOKKOS_INTERNAL_NOP8 KOKKOS_INTERNAL_NOP4; KOKKOS_INTERNAL_NOP4; + #define KOKKOS_INTERNAL_NOP16 KOKKOS_INTERNAL_NOP8; KOKKOS_INTERNAL_NOP8; + #define KOKKOS_INTERNAL_NOP32 KOKKOS_INTERNAL_NOP16; KOKKOS_INTERNAL_NOP16; + namespace { + inline void kokkos_internal_yield( const unsigned i ) noexcept { + switch (Kokkos::Impl::bit_scan_reverse((i >> 2)+1u)) { + case 0: KOKKOS_INTERNAL_NOP2; break; + case 1: KOKKOS_INTERNAL_NOP4; break; + case 2: KOKKOS_INTERNAL_NOP8; break; + case 3: KOKKOS_INTERNAL_NOP16; break; + default: KOKKOS_INTERNAL_NOP32; + } + KOKKOS_INTERNAL_PAUSE; + } + } #endif -#elif defined ( KOKKOS_ENABLE_WINTHREAD ) - #include - #define YIELD Sleep(0) -#elif defined ( _WIN32) && defined (_MSC_VER) - /* Windows w/ Visual Studio */ - #define NOMINMAX - #include - #include -#define YIELD YieldProcessor(); -#elif defined ( _WIN32 ) - /* Windows w/ Intel*/ - #define YIELD __asm__ __volatile__("pause\n":::"memory") -#else - #include - #define YIELD sched_yield() #endif + /*--------------------------------------------------------------------------*/ namespace Kokkos { namespace Impl { #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) -void spinwait( volatile int & flag , const int value ) + +void spinwait_while_equal( volatile int32_t & flag , const int32_t value ) +{ + Kokkos::store_fence(); + unsigned i = 0; + while ( value == flag ) { + kokkos_internal_yield(i); + ++i; + } + Kokkos::load_fence(); +} + +void spinwait_until_equal( volatile int32_t & flag , const int32_t value ) +{ + Kokkos::store_fence(); + unsigned i = 0; + while ( value != flag ) { + kokkos_internal_yield(i); + ++i; + } + Kokkos::load_fence(); +} + +void spinwait_while_equal( volatile int64_t & flag , const int64_t value ) { + Kokkos::store_fence(); + unsigned i = 0; while ( value == flag ) { - YIELD ; + kokkos_internal_yield(i); + ++i; + } + Kokkos::load_fence(); +} + +void spinwait_until_equal( volatile int64_t & flag , const int64_t value ) +{ + Kokkos::store_fence(); + unsigned i = 0; + while ( value != flag ) { + kokkos_internal_yield(i); + ++i; } + Kokkos::load_fence(); } + #endif } /* namespace Impl */ diff --git a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp b/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp index cc87771fae..6e34b8a943 100644 --- a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp +++ b/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -47,14 +47,30 @@ #include +#include + namespace Kokkos { namespace Impl { #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) -void spinwait( volatile int & flag , const int value ); + +void spinwait_while_equal( volatile int32_t & flag , const int32_t value ); +void spinwait_until_equal( volatile int32_t & flag , const int32_t value ); + +void spinwait_while_equal( volatile int64_t & flag , const int64_t value ); +void spinwait_until_equal( volatile int64_t & flag , const int64_t value ); #else + +KOKKOS_INLINE_FUNCTION +void spinwait_while_equal( volatile int32_t & , const int32_t ) {} +KOKKOS_INLINE_FUNCTION +void spinwait_until_equal( volatile int32_t & , const int32_t ) {} + +KOKKOS_INLINE_FUNCTION +void spinwait_while_equal( volatile int64_t & , const int64_t ) {} KOKKOS_INLINE_FUNCTION -void spinwait( volatile int & , const int ) {} +void spinwait_until_equal( volatile int64_t & , const int64_t ) {} + #endif } /* namespace Impl */ diff --git a/lib/kokkos/core/unit_test/CMakeLists.txt b/lib/kokkos/core/unit_test/CMakeLists.txt index 795657fe87..caf6c50129 100644 --- a/lib/kokkos/core/unit_test/CMakeLists.txt +++ b/lib/kokkos/core/unit_test/CMakeLists.txt @@ -115,10 +115,31 @@ IF(Kokkos_ENABLE_OpenMP) ) ENDIF() -IF(Kokkos_ENABLE_QTHREAD) +IF(Kokkos_ENABLE_Qthreads) TRIBITS_ADD_EXECUTABLE_AND_TEST( - UnitTest_Qthread - SOURCES UnitTestMain.cpp TestQthread.cpp + UnitTest_Qthreads + SOURCES + UnitTestMain.cpp + qthreads/TestQthreads_Atomics.cpp + qthreads/TestQthreads_Other.cpp + qthreads/TestQthreads_Reductions.cpp + qthreads/TestQthreads_SubView_a.cpp + qthreads/TestQthreads_SubView_b.cpp + qthreads/TestQthreads_SubView_c01.cpp + qthreads/TestQthreads_SubView_c02.cpp + qthreads/TestQthreads_SubView_c03.cpp + qthreads/TestQthreads_SubView_c04.cpp + qthreads/TestQthreads_SubView_c05.cpp + qthreads/TestQthreads_SubView_c06.cpp + qthreads/TestQthreads_SubView_c07.cpp + qthreads/TestQthreads_SubView_c08.cpp + qthreads/TestQthreads_SubView_c09.cpp + qthreads/TestQthreads_SubView_c10.cpp + qthreads/TestQthreads_SubView_c11.cpp + qthreads/TestQthreads_SubView_c12.cpp + qthreads/TestQthreads_Team.cpp + qthreads/TestQthreads_ViewAPI_a.cpp + qthreads/TestQthreads_ViewAPI_b.cpp COMM serial mpi NUM_MPI_PROCS 1 FAIL_REGULAR_EXPRESSION " FAILED " @@ -194,4 +215,3 @@ TRIBITS_ADD_EXECUTABLE_AND_TEST( FAIL_REGULAR_EXPRESSION " FAILED " TESTONLYLIBS kokkos_gtest ) - diff --git a/lib/kokkos/core/unit_test/Makefile b/lib/kokkos/core/unit_test/Makefile index cc59825fba..d93830a28d 100644 --- a/lib/kokkos/core/unit_test/Makefile +++ b/lib/kokkos/core/unit_test/Makefile @@ -6,6 +6,7 @@ vpath %.cpp ${KOKKOS_PATH}/core/unit_test vpath %.cpp ${KOKKOS_PATH}/core/unit_test/serial vpath %.cpp ${KOKKOS_PATH}/core/unit_test/threads vpath %.cpp ${KOKKOS_PATH}/core/unit_test/openmp +vpath %.cpp ${KOKKOS_PATH}/core/unit_test/qthreads vpath %.cpp ${KOKKOS_PATH}/core/unit_test/cuda TEST_HEADERS = $(wildcard $(KOKKOS_PATH)/core/unit_test/*.hpp) @@ -35,15 +36,15 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) OBJ_CUDA = TestCuda_Other.o TestCuda_Reductions_a.o TestCuda_Reductions_b.o TestCuda_Atomics.o TestCuda_Team.o TestCuda_Spaces.o OBJ_CUDA += TestCuda_SubView_a.o TestCuda_SubView_b.o ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1) - OBJ_OPENMP += TestCuda_SubView_c_all.o + OBJ_OPENMP += TestCuda_SubView_c_all.o else OBJ_CUDA += TestCuda_SubView_c01.o TestCuda_SubView_c02.o TestCuda_SubView_c03.o - OBJ_CUDA += TestCuda_SubView_c04.o TestCuda_SubView_c05.o TestCuda_SubView_c06.o - OBJ_CUDA += TestCuda_SubView_c07.o TestCuda_SubView_c08.o TestCuda_SubView_c09.o + OBJ_CUDA += TestCuda_SubView_c04.o TestCuda_SubView_c05.o TestCuda_SubView_c06.o + OBJ_CUDA += TestCuda_SubView_c07.o TestCuda_SubView_c08.o TestCuda_SubView_c09.o OBJ_CUDA += TestCuda_SubView_c10.o TestCuda_SubView_c11.o TestCuda_SubView_c12.o endif - OBJ_CUDA += TestCuda_ViewAPI_a.o TestCuda_ViewAPI_b.o TestCuda_ViewAPI_c.o TestCuda_ViewAPI_d.o - OBJ_CUDA += TestCuda_ViewAPI_e.o TestCuda_ViewAPI_f.o TestCuda_ViewAPI_g.o TestCuda_ViewAPI_h.o + OBJ_CUDA += TestCuda_ViewAPI_a.o TestCuda_ViewAPI_b.o TestCuda_ViewAPI_c.o TestCuda_ViewAPI_d.o + OBJ_CUDA += TestCuda_ViewAPI_e.o TestCuda_ViewAPI_f.o TestCuda_ViewAPI_g.o TestCuda_ViewAPI_h.o OBJ_CUDA += TestCuda_ViewAPI_s.o OBJ_CUDA += UnitTestMain.o gtest-all.o TARGETS += KokkosCore_UnitTest_Cuda @@ -51,13 +52,13 @@ endif endif ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1) - OBJ_THREADS = TestThreads_Other.o TestThreads_Reductions.o TestThreads_Atomics.o TestThreads_Team.o - OBJ_THREADS += TestThreads_SubView_a.o TestThreads_SubView_b.o + OBJ_THREADS = TestThreads_Other.o TestThreads_Reductions.o TestThreads_Atomics.o TestThreads_Team.o + OBJ_THREADS += TestThreads_SubView_a.o TestThreads_SubView_b.o OBJ_THREADS += TestThreads_SubView_c01.o TestThreads_SubView_c02.o TestThreads_SubView_c03.o - OBJ_THREADS += TestThreads_SubView_c04.o TestThreads_SubView_c05.o TestThreads_SubView_c06.o - OBJ_THREADS += TestThreads_SubView_c07.o TestThreads_SubView_c08.o TestThreads_SubView_c09.o + OBJ_THREADS += TestThreads_SubView_c04.o TestThreads_SubView_c05.o TestThreads_SubView_c06.o + OBJ_THREADS += TestThreads_SubView_c07.o TestThreads_SubView_c08.o TestThreads_SubView_c09.o OBJ_THREADS += TestThreads_SubView_c10.o TestThreads_SubView_c11.o TestThreads_SubView_c12.o - OBJ_THREADS += TestThreads_ViewAPI_a.o TestThreads_ViewAPI_b.o UnitTestMain.o gtest-all.o + OBJ_THREADS += TestThreads_ViewAPI_a.o TestThreads_ViewAPI_b.o UnitTestMain.o gtest-all.o TARGETS += KokkosCore_UnitTest_Threads TEST_TARGETS += test-threads endif @@ -66,11 +67,11 @@ ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1) OBJ_OPENMP = TestOpenMP_Other.o TestOpenMP_Reductions.o TestOpenMP_Atomics.o TestOpenMP_Team.o OBJ_OPENMP += TestOpenMP_SubView_a.o TestOpenMP_SubView_b.o ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1) - OBJ_OPENMP += TestOpenMP_SubView_c_all.o + OBJ_OPENMP += TestOpenMP_SubView_c_all.o else OBJ_OPENMP += TestOpenMP_SubView_c01.o TestOpenMP_SubView_c02.o TestOpenMP_SubView_c03.o - OBJ_OPENMP += TestOpenMP_SubView_c04.o TestOpenMP_SubView_c05.o TestOpenMP_SubView_c06.o - OBJ_OPENMP += TestOpenMP_SubView_c07.o TestOpenMP_SubView_c08.o TestOpenMP_SubView_c09.o + OBJ_OPENMP += TestOpenMP_SubView_c04.o TestOpenMP_SubView_c05.o TestOpenMP_SubView_c06.o + OBJ_OPENMP += TestOpenMP_SubView_c07.o TestOpenMP_SubView_c08.o TestOpenMP_SubView_c09.o OBJ_OPENMP += TestOpenMP_SubView_c10.o TestOpenMP_SubView_c11.o TestOpenMP_SubView_c12.o endif OBJ_OPENMP += TestOpenMP_ViewAPI_a.o TestOpenMP_ViewAPI_b.o UnitTestMain.o gtest-all.o @@ -78,28 +79,38 @@ endif TEST_TARGETS += test-openmp endif +ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1) + OBJ_QTHREADS = TestQthreads_Other.o TestQthreads_Reductions.o TestQthreads_Atomics.o TestQthreads_Team.o + OBJ_QTHREADS += TestQthreads_SubView_a.o TestQthreads_SubView_b.o +ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1) + OBJ_QTHREADS += TestQthreads_SubView_c_all.o +else + OBJ_QTHREADS += TestQthreads_SubView_c01.o TestQthreads_SubView_c02.o TestQthreads_SubView_c03.o + OBJ_QTHREADS += TestQthreads_SubView_c04.o TestQthreads_SubView_c05.o TestQthreads_SubView_c06.o + OBJ_QTHREADS += TestQthreads_SubView_c07.o TestQthreads_SubView_c08.o TestQthreads_SubView_c09.o + OBJ_QTHREADS += TestQthreads_SubView_c10.o TestQthreads_SubView_c11.o TestQthreads_SubView_c12.o +endif + OBJ_QTHREADS += TestQthreads_ViewAPI_a.o TestQthreads_ViewAPI_b.o UnitTestMain.o gtest-all.o + TARGETS += KokkosCore_UnitTest_Qthreads + TEST_TARGETS += test-qthreads +endif + ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1) - OBJ_SERIAL = TestSerial_Other.o TestSerial_Reductions.o TestSerial_Atomics.o TestSerial_Team.o - OBJ_SERIAL += TestSerial_SubView_a.o TestSerial_SubView_b.o + OBJ_SERIAL = TestSerial_Other.o TestSerial_Reductions.o TestSerial_Atomics.o TestSerial_Team.o + OBJ_SERIAL += TestSerial_SubView_a.o TestSerial_SubView_b.o ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1) - OBJ_OPENMP += TestSerial_SubView_c_all.o + OBJ_OPENMP += TestSerial_SubView_c_all.o else OBJ_SERIAL += TestSerial_SubView_c01.o TestSerial_SubView_c02.o TestSerial_SubView_c03.o - OBJ_SERIAL += TestSerial_SubView_c04.o TestSerial_SubView_c05.o TestSerial_SubView_c06.o - OBJ_SERIAL += TestSerial_SubView_c07.o TestSerial_SubView_c08.o TestSerial_SubView_c09.o + OBJ_SERIAL += TestSerial_SubView_c04.o TestSerial_SubView_c05.o TestSerial_SubView_c06.o + OBJ_SERIAL += TestSerial_SubView_c07.o TestSerial_SubView_c08.o TestSerial_SubView_c09.o OBJ_SERIAL += TestSerial_SubView_c10.o TestSerial_SubView_c11.o TestSerial_SubView_c12.o endif - OBJ_SERIAL += TestSerial_ViewAPI_a.o TestSerial_ViewAPI_b.o UnitTestMain.o gtest-all.o + OBJ_SERIAL += TestSerial_ViewAPI_a.o TestSerial_ViewAPI_b.o UnitTestMain.o gtest-all.o TARGETS += KokkosCore_UnitTest_Serial TEST_TARGETS += test-serial endif -ifeq ($(KOKKOS_INTERNAL_USE_QTHREAD), 1) - OBJ_QTHREAD = TestQthread.o UnitTestMain.o gtest-all.o - TARGETS += KokkosCore_UnitTest_Qthread - TEST_TARGETS += test-qthread -endif - OBJ_HWLOC = TestHWLOC.o UnitTestMain.o gtest-all.o TARGETS += KokkosCore_UnitTest_HWLOC TEST_TARGETS += test-hwloc @@ -115,10 +126,6 @@ TARGETS += ${INITTESTS_TARGETS} INITTESTS_TEST_TARGETS := $(addprefix test-default-init-,${INITTESTS_NUMBERS}) TEST_TARGETS += ${INITTESTS_TEST_TARGETS} -OBJ_SYNCHRONIC = TestSynchronic.o UnitTestMain.o gtest-all.o -TARGETS += KokkosCore_UnitTest_Synchronic -TEST_TARGETS += test-synchronic - KokkosCore_UnitTest_Cuda: $(OBJ_CUDA) $(KOKKOS_LINK_DEPENDS) $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_CUDA) $(KOKKOS_LIBS) $(LIB) -o KokkosCore_UnitTest_Cuda @@ -131,8 +138,8 @@ KokkosCore_UnitTest_OpenMP: $(OBJ_OPENMP) $(KOKKOS_LINK_DEPENDS) KokkosCore_UnitTest_Serial: $(OBJ_SERIAL) $(KOKKOS_LINK_DEPENDS) $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_SERIAL) $(KOKKOS_LIBS) $(LIB) -o KokkosCore_UnitTest_Serial -KokkosCore_UnitTest_Qthread: $(OBJ_QTHREAD) $(KOKKOS_LINK_DEPENDS) - $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_QTHREAD) $(KOKKOS_LIBS) $(LIB) -o KokkosCore_UnitTest_Qthread +KokkosCore_UnitTest_Qthreads: $(OBJ_QTHREADS) $(KOKKOS_LINK_DEPENDS) + $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_QTHREADS) $(KOKKOS_LIBS) $(LIB) -o KokkosCore_UnitTest_Qthreads KokkosCore_UnitTest_HWLOC: $(OBJ_HWLOC) $(KOKKOS_LINK_DEPENDS) $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_HWLOC) $(KOKKOS_LIBS) $(LIB) -o KokkosCore_UnitTest_HWLOC @@ -146,9 +153,6 @@ KokkosCore_UnitTest_Default: $(OBJ_DEFAULT) $(KOKKOS_LINK_DEPENDS) ${INITTESTS_TARGETS}: KokkosCore_UnitTest_DefaultDeviceTypeInit_%: TestDefaultDeviceTypeInit_%.o UnitTestMain.o gtest-all.o $(KOKKOS_LINK_DEPENDS) $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) TestDefaultDeviceTypeInit_$*.o UnitTestMain.o gtest-all.o $(KOKKOS_LIBS) $(LIB) -o KokkosCore_UnitTest_DefaultDeviceTypeInit_$* -KokkosCore_UnitTest_Synchronic: $(OBJ_SYNCHRONIC) $(KOKKOS_LINK_DEPENDS) - $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_SYNCHRONIC) $(KOKKOS_LIBS) $(LIB) -o KokkosCore_UnitTest_Synchronic - test-cuda: KokkosCore_UnitTest_Cuda ./KokkosCore_UnitTest_Cuda @@ -161,8 +165,8 @@ test-openmp: KokkosCore_UnitTest_OpenMP test-serial: KokkosCore_UnitTest_Serial ./KokkosCore_UnitTest_Serial -test-qthread: KokkosCore_UnitTest_Qthread - ./KokkosCore_UnitTest_Qthread +test-qthreads: KokkosCore_UnitTest_Qthreads + ./KokkosCore_UnitTest_Qthreads test-hwloc: KokkosCore_UnitTest_HWLOC ./KokkosCore_UnitTest_HWLOC @@ -176,9 +180,6 @@ test-default: KokkosCore_UnitTest_Default ${INITTESTS_TEST_TARGETS}: test-default-init-%: KokkosCore_UnitTest_DefaultDeviceTypeInit_% ./KokkosCore_UnitTest_DefaultDeviceTypeInit_$* -test-synchronic: KokkosCore_UnitTest_Synchronic - ./KokkosCore_UnitTest_Synchronic - build_all: $(TARGETS) test: $(TEST_TARGETS) @@ -193,4 +194,3 @@ clean: kokkos-clean gtest-all.o:$(GTEST_PATH)/gtest/gtest-all.cc $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $(GTEST_PATH)/gtest/gtest-all.cc - diff --git a/lib/kokkos/core/unit_test/TestAggregate.hpp b/lib/kokkos/core/unit_test/TestAggregate.hpp index d22837f3ed..f09cc5018c 100644 --- a/lib/kokkos/core/unit_test/TestAggregate.hpp +++ b/lib/kokkos/core/unit_test/TestAggregate.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -50,8 +50,6 @@ #include #include -/*--------------------------------------------------------------------------*/ - #include namespace Test { @@ -59,51 +57,68 @@ namespace Test { template< class DeviceType > void TestViewAggregate() { - typedef Kokkos::Array value_type ; - - typedef Kokkos::Experimental::Impl:: - ViewDataAnalysis< value_type * , Kokkos::LayoutLeft , value_type > - analysis_1d ; + typedef Kokkos::Array< double, 32 > value_type; + typedef Kokkos::Experimental::Impl::ViewDataAnalysis< value_type *, Kokkos::LayoutLeft, value_type > analysis_1d; - static_assert( std::is_same< typename analysis_1d::specialize , Kokkos::Array<> >::value , "" ); + static_assert( std::is_same< typename analysis_1d::specialize, Kokkos::Array<> >::value, "" ); + typedef Kokkos::ViewTraits< value_type **, DeviceType > a32_traits; + typedef Kokkos::ViewTraits< typename a32_traits::scalar_array_type, DeviceType > flat_traits; - typedef Kokkos::ViewTraits< value_type ** , DeviceType > a32_traits ; - typedef Kokkos::ViewTraits< typename a32_traits::scalar_array_type , DeviceType > flat_traits ; + static_assert( std::is_same< typename a32_traits::specialize, Kokkos::Array<> >::value, "" ); + static_assert( std::is_same< typename a32_traits::value_type, value_type >::value, "" ); + static_assert( a32_traits::rank == 2, "" ); + static_assert( a32_traits::rank_dynamic == 2, "" ); - static_assert( std::is_same< typename a32_traits::specialize , Kokkos::Array<> >::value , "" ); - static_assert( std::is_same< typename a32_traits::value_type , value_type >::value , "" ); - static_assert( a32_traits::rank == 2 , "" ); - static_assert( a32_traits::rank_dynamic == 2 , "" ); + static_assert( std::is_same< typename flat_traits::specialize, void >::value, "" ); + static_assert( flat_traits::rank == 3, "" ); + static_assert( flat_traits::rank_dynamic == 2, "" ); + static_assert( flat_traits::dimension::N2 == 32, "" ); - static_assert( std::is_same< typename flat_traits::specialize , void >::value , "" ); - static_assert( flat_traits::rank == 3 , "" ); - static_assert( flat_traits::rank_dynamic == 2 , "" ); - static_assert( flat_traits::dimension::N2 == 32 , "" ); + typedef Kokkos::View< Kokkos::Array< double, 32 > **, DeviceType > a32_type; + typedef typename a32_type::array_type a32_flat_type; + static_assert( std::is_same< typename a32_type::value_type, value_type >::value, "" ); + static_assert( std::is_same< typename a32_type::pointer_type, double * >::value, "" ); + static_assert( a32_type::Rank == 2, "" ); + static_assert( a32_flat_type::Rank == 3, "" ); - typedef Kokkos::View< Kokkos::Array ** , DeviceType > a32_type ; - - typedef typename a32_type::array_type a32_flat_type ; - - static_assert( std::is_same< typename a32_type::value_type , value_type >::value , "" ); - static_assert( std::is_same< typename a32_type::pointer_type , double * >::value , "" ); - static_assert( a32_type::Rank == 2 , "" ); - static_assert( a32_flat_type::Rank == 3 , "" ); - - a32_type x("test",4,5); + a32_type x( "test", 4, 5 ); a32_flat_type y( x ); - ASSERT_EQ( x.extent(0) , 4 ); - ASSERT_EQ( x.extent(1) , 5 ); - ASSERT_EQ( y.extent(0) , 4 ); - ASSERT_EQ( y.extent(1) , 5 ); - ASSERT_EQ( y.extent(2) , 32 ); -} - + ASSERT_EQ( x.extent( 0 ), 4 ); + ASSERT_EQ( x.extent( 1 ), 5 ); + ASSERT_EQ( y.extent( 0 ), 4 ); + ASSERT_EQ( y.extent( 1 ), 5 ); + ASSERT_EQ( y.extent( 2 ), 32 ); + + // Initialize arrays from brace-init-list as for std::array. + // + // Comment: Clang will issue the following warning if we don't use double + // braces here (one for initializing the Kokkos::Array and one for + // initializing the sub-aggreagate C-array data member), + // + // warning: suggest braces around initialization of subobject + // + // but single brace syntax would be valid as well. + Kokkos::Array< float, 2 > aggregate_initialization_syntax_1 = { { 1.41, 3.14 } }; + ASSERT_FLOAT_EQ( aggregate_initialization_syntax_1[0], 1.41 ); + ASSERT_FLOAT_EQ( aggregate_initialization_syntax_1[1], 3.14 ); + + Kokkos::Array< int, 3 > aggregate_initialization_syntax_2{ { 0, 1, 2 } }; // since C++11 + for ( int i = 0; i < 3; ++i ) { + ASSERT_EQ( aggregate_initialization_syntax_2[i], i ); + } + + // Note that this is a valid initialization. + Kokkos::Array< double, 3 > initialized_with_one_argument_missing = { { 255, 255 } }; + for (int i = 0; i < 2; ++i) { + ASSERT_DOUBLE_EQ( initialized_with_one_argument_missing[i], 255 ); + } + // But the following line would not compile +// Kokkos::Array< double, 3 > initialized_with_too_many{ { 1, 2, 3, 4 } }; } -/*--------------------------------------------------------------------------*/ -/*--------------------------------------------------------------------------*/ +} // namespace Test #endif /* #ifndef TEST_AGGREGATE_HPP */ diff --git a/lib/kokkos/core/unit_test/TestAtomic.hpp b/lib/kokkos/core/unit_test/TestAtomic.hpp index e948723574..ff77b8dca6 100644 --- a/lib/kokkos/core/unit_test/TestAtomic.hpp +++ b/lib/kokkos/core/unit_test/TestAtomic.hpp @@ -45,116 +45,129 @@ namespace TestAtomic { -// Struct for testing arbitrary size atomics +// Struct for testing arbitrary size atomics. -template +template< int N > struct SuperScalar { double val[N]; KOKKOS_INLINE_FUNCTION SuperScalar() { - for(int i=0; i -std::ostream& operator<<(std::ostream& os, const SuperScalar& dt) +template< int N > +std::ostream & operator<<( std::ostream & os, const SuperScalar< N > & dt ) { - os << "{ "; - for(int i=0;i +template< class T, class DEVICE_TYPE > struct ZeroFunctor { typedef DEVICE_TYPE execution_space; - typedef typename Kokkos::View type; - typedef typename Kokkos::View::HostMirror h_type; + typedef typename Kokkos::View< T, execution_space > type; + typedef typename Kokkos::View< T, execution_space >::HostMirror h_type; + type data; + KOKKOS_INLINE_FUNCTION - void operator()(int) const { + void operator()( int ) const { data() = 0; } }; @@ -163,47 +176,53 @@ struct ZeroFunctor { //--------------atomic_fetch_add--------------------- //--------------------------------------------------- -template -struct AddFunctor{ +template< class T, class DEVICE_TYPE > +struct AddFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_fetch_add(&data(),(T)1); + void operator()( int ) const { + Kokkos::atomic_fetch_add( &data(), (T) 1 ); } }; -template -T AddLoop(int loop) { - struct ZeroFunctor f_zero; - typename ZeroFunctor::type data("Data"); - typename ZeroFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T AddLoop( int loop ) { + struct ZeroFunctor< T, execution_space > f_zero; + typename ZeroFunctor< T, execution_space >::type data( "Data" ); + typename ZeroFunctor< T, execution_space >::h_type h_data( "HData" ); + f_zero.data = data; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for( 1, f_zero ); execution_space::fence(); - struct AddFunctor f_add; + struct AddFunctor< T, execution_space > f_add; + f_add.data = data; - Kokkos::parallel_for(loop,f_add); + Kokkos::parallel_for( loop, f_add ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T AddLoopSerial(int loop) { +template< class T > +T AddLoopSerial( int loop ) { T* data = new T[1]; data[0] = 0; - for(int i=0;i -struct CASFunctor{ +template< class T, class DEVICE_TYPE > +struct CASFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - T old = data(); - T newval, assumed; - do { - assumed = old; - newval = assumed + (T)1; - old = Kokkos::atomic_compare_exchange(&data(), assumed, newval); - } - while( old != assumed ); + void operator()( int ) const { + T old = data(); + T newval, assumed; + + do { + assumed = old; + newval = assumed + (T) 1; + old = Kokkos::atomic_compare_exchange( &data(), assumed, newval ); + } while( old != assumed ); } }; -template -T CASLoop(int loop) { - struct ZeroFunctor f_zero; - typename ZeroFunctor::type data("Data"); - typename ZeroFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T CASLoop( int loop ) { + struct ZeroFunctor< T, execution_space > f_zero; + typename ZeroFunctor< T, execution_space >::type data( "Data" ); + typename ZeroFunctor< T, execution_space >::h_type h_data( "HData" ); + f_zero.data = data; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for( 1, f_zero ); execution_space::fence(); - struct CASFunctor f_cas; + struct CASFunctor< T, execution_space > f_cas; + f_cas.data = data; - Kokkos::parallel_for(loop,f_cas); + Kokkos::parallel_for( loop, f_cas ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); return val; } -template -T CASLoopSerial(int loop) { +template< class T > +T CASLoopSerial( int loop ) { T* data = new T[1]; data[0] = 0; - for(int i=0;i -struct ExchFunctor{ +template< class T, class DEVICE_TYPE > +struct ExchFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data, data2; KOKKOS_INLINE_FUNCTION - void operator()(int i) const { - T old = Kokkos::atomic_exchange(&data(),(T)i); - Kokkos::atomic_fetch_add(&data2(),old); + void operator()( int i ) const { + T old = Kokkos::atomic_exchange( &data(), (T) i ); + Kokkos::atomic_fetch_add( &data2(), old ); } }; -template -T ExchLoop(int loop) { - struct ZeroFunctor f_zero; - typename ZeroFunctor::type data("Data"); - typename ZeroFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T ExchLoop( int loop ) { + struct ZeroFunctor< T, execution_space > f_zero; + typename ZeroFunctor< T, execution_space >::type data( "Data" ); + typename ZeroFunctor< T, execution_space >::h_type h_data( "HData" ); + f_zero.data = data; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for( 1, f_zero ); execution_space::fence(); - typename ZeroFunctor::type data2("Data"); - typename ZeroFunctor::h_type h_data2("HData"); + typename ZeroFunctor< T, execution_space >::type data2( "Data" ); + typename ZeroFunctor< T, execution_space >::h_type h_data2( "HData" ); + f_zero.data = data2; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for( 1, f_zero ); execution_space::fence(); - struct ExchFunctor f_exch; + struct ExchFunctor< T, execution_space > f_exch; + f_exch.data = data; f_exch.data2 = data2; - Kokkos::parallel_for(loop,f_exch); + Kokkos::parallel_for( loop, f_exch ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); - Kokkos::deep_copy(h_data2,data2); + Kokkos::deep_copy( h_data, data ); + Kokkos::deep_copy( h_data2, data2 ); T val = h_data() + h_data2(); return val; } -template -T ExchLoopSerial(typename std::conditional >::value,int,void>::type loop) { +template< class T > +T ExchLoopSerial( typename std::conditional< !std::is_same< T, Kokkos::complex >::value, int, void >::type loop ) { T* data = new T[1]; T* data2 = new T[1]; data[0] = 0; data2[0] = 0; - for(int i=0;i -T ExchLoopSerial(typename std::conditional >::value,int,void>::type loop) { +template< class T > +T ExchLoopSerial( typename std::conditional< std::is_same< T, Kokkos::complex >::value, int, void >::type loop ) { T* data = new T[1]; T* data2 = new T[1]; data[0] = 0; data2[0] = 0; - for(int i=0;ireal() = (static_cast(i)); - data->imag() = 0; - *data2+=old; + + for ( int i = 0; i < loop; i++ ) { + T old = *data; + data->real() = ( static_cast( i ) ); + data->imag() = 0; + *data2 += old; } T val = *data2 + *data; delete [] data; delete [] data2; + return val; } -template -T LoopVariant(int loop, int test) { - switch (test) { - case 1: return AddLoop(loop); - case 2: return CASLoop(loop); - case 3: return ExchLoop(loop); +template< class T, class DeviceType > +T LoopVariant( int loop, int test ) { + switch ( test ) { + case 1: return AddLoop< T, DeviceType >( loop ); + case 2: return CASLoop< T, DeviceType >( loop ); + case 3: return ExchLoop< T, DeviceType >( loop ); } + return 0; } -template -T LoopVariantSerial(int loop, int test) { - switch (test) { - case 1: return AddLoopSerial(loop); - case 2: return CASLoopSerial(loop); - case 3: return ExchLoopSerial(loop); +template< class T > +T LoopVariantSerial( int loop, int test ) { + switch ( test ) { + case 1: return AddLoopSerial< T >( loop ); + case 2: return CASLoopSerial< T >( loop ); + case 3: return ExchLoopSerial< T >( loop ); } + return 0; } -template -bool Loop(int loop, int test) +template< class T, class DeviceType > +bool Loop( int loop, int test ) { - T res = LoopVariant(loop,test); - T resSerial = LoopVariantSerial(loop,test); + T res = LoopVariant< T, DeviceType >( loop, test ); + T resSerial = LoopVariantSerial< T >( loop, test ); bool passed = true; @@ -387,16 +420,14 @@ bool Loop(int loop, int test) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = " << test << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - - return passed ; -} - + return passed; } +} // namespace TestAtomic diff --git a/lib/kokkos/core/unit_test/TestAtomicOperations.hpp b/lib/kokkos/core/unit_test/TestAtomicOperations.hpp index 7f15190451..e3ceca404f 100644 --- a/lib/kokkos/core/unit_test/TestAtomicOperations.hpp +++ b/lib/kokkos/core/unit_test/TestAtomicOperations.hpp @@ -49,14 +49,16 @@ namespace TestAtomicOperations { //--------------zero_functor--------------------- //----------------------------------------------- -template +template< class T, class DEVICE_TYPE > struct ZeroFunctor { typedef DEVICE_TYPE execution_space; - typedef typename Kokkos::View type; - typedef typename Kokkos::View::HostMirror h_type; + typedef typename Kokkos::View< T, execution_space > type; + typedef typename Kokkos::View< T, execution_space >::HostMirror h_type; + type data; + KOKKOS_INLINE_FUNCTION - void operator()(int) const { + void operator()( int ) const { data() = 0; } }; @@ -65,78 +67,84 @@ struct ZeroFunctor { //--------------init_functor--------------------- //----------------------------------------------- -template +template< class T, class DEVICE_TYPE > struct InitFunctor { typedef DEVICE_TYPE execution_space; - typedef typename Kokkos::View type; - typedef typename Kokkos::View::HostMirror h_type; + typedef typename Kokkos::View< T, execution_space > type; + typedef typename Kokkos::View< T, execution_space >::HostMirror h_type; + type data; - T init_value ; + T init_value; + KOKKOS_INLINE_FUNCTION - void operator()(int) const { + void operator()( int ) const { data() = init_value; } - InitFunctor(T _init_value) : init_value(_init_value) {} + InitFunctor( T _init_value ) : init_value( _init_value ) {} }; - //--------------------------------------------------- //--------------atomic_fetch_max--------------------- //--------------------------------------------------- -template -struct MaxFunctor{ +template< class T, class DEVICE_TYPE > +struct MaxFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; T i1; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - //Kokkos::atomic_fetch_max(&data(),(T)1); - Kokkos::atomic_fetch_max(&data(),(T)i1); + void operator()( int ) const { + //Kokkos::atomic_fetch_max( &data(), (T) 1 ); + Kokkos::atomic_fetch_max( &data(), (T) i1 ); } - MaxFunctor( T _i0 , T _i1 ) : i0(_i0) , i1(_i1) {} + MaxFunctor( T _i0, T _i1 ) : i0( _i0 ), i1( _i1 ) {} }; -template -T MaxAtomic(T i0 , T i1) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T MaxAtomic( T i0, T i1 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct MaxFunctor f(i0,i1); + struct MaxFunctor< T, execution_space > f( i0, i1 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T MaxAtomicCheck(T i0 , T i1) { +template< class T > +T MaxAtomicCheck( T i0, T i1 ) { T* data = new T[1]; data[0] = 0; - *data = (i0 > i1 ? i0 : i1) ; + *data = ( i0 > i1 ? i0 : i1 ); T val = *data; delete [] data; + return val; } -template -bool MaxAtomicTest(T i0, T i1) +template< class T, class DeviceType > +bool MaxAtomicTest( T i0, T i1 ) { - T res = MaxAtomic(i0,i1); - T resSerial = MaxAtomicCheck(i0,i1); + T res = MaxAtomic< T, DeviceType >( i0, i1 ); + T resSerial = MaxAtomicCheck( i0, i1 ); bool passed = true; @@ -144,71 +152,77 @@ bool MaxAtomicTest(T i0, T i1) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = MaxAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } //--------------------------------------------------- //--------------atomic_fetch_min--------------------- //--------------------------------------------------- -template -struct MinFunctor{ +template< class T, class DEVICE_TYPE > +struct MinFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; T i1; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_fetch_min(&data(),(T)i1); + void operator()( int ) const { + Kokkos::atomic_fetch_min( &data(), (T) i1 ); } - MinFunctor( T _i0 , T _i1 ) : i0(_i0) , i1(_i1) {} + + MinFunctor( T _i0, T _i1 ) : i0( _i0 ), i1( _i1 ) {} }; -template -T MinAtomic(T i0 , T i1) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T MinAtomic( T i0, T i1 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct MinFunctor f(i0,i1); + struct MinFunctor< T, execution_space > f( i0, i1 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T MinAtomicCheck(T i0 , T i1) { +template< class T > +T MinAtomicCheck( T i0, T i1 ) { T* data = new T[1]; data[0] = 0; - *data = (i0 < i1 ? i0 : i1) ; + *data = ( i0 < i1 ? i0 : i1 ); T val = *data; delete [] data; + return val; } -template -bool MinAtomicTest(T i0, T i1) +template< class T, class DeviceType > +bool MinAtomicTest( T i0, T i1 ) { - T res = MinAtomic(i0,i1); - T resSerial = MinAtomicCheck(i0,i1); + T res = MinAtomic< T, DeviceType >( i0, i1 ); + T resSerial = MinAtomicCheck< T >( i0, i1 ); bool passed = true; @@ -216,55 +230,60 @@ bool MinAtomicTest(T i0, T i1) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = MinAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } //--------------------------------------------------- //--------------atomic_increment--------------------- //--------------------------------------------------- -template -struct IncFunctor{ +template< class T, class DEVICE_TYPE > +struct IncFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_increment(&data()); + void operator()( int ) const { + Kokkos::atomic_increment( &data() ); } - IncFunctor( T _i0 ) : i0(_i0) {} + + IncFunctor( T _i0 ) : i0( _i0 ) {} }; -template -T IncAtomic(T i0) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T IncAtomic( T i0 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct IncFunctor f(i0); + struct IncFunctor< T, execution_space > f( i0 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T IncAtomicCheck(T i0) { +template< class T > +T IncAtomicCheck( T i0 ) { T* data = new T[1]; data[0] = 0; @@ -272,14 +291,15 @@ T IncAtomicCheck(T i0) { T val = *data; delete [] data; + return val; } -template -bool IncAtomicTest(T i0) +template< class T, class DeviceType > +bool IncAtomicTest( T i0 ) { - T res = IncAtomic(i0); - T resSerial = IncAtomicCheck(i0); + T res = IncAtomic< T, DeviceType >( i0 ); + T resSerial = IncAtomicCheck< T >( i0 ); bool passed = true; @@ -287,55 +307,60 @@ bool IncAtomicTest(T i0) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = IncAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } //--------------------------------------------------- //--------------atomic_decrement--------------------- //--------------------------------------------------- -template -struct DecFunctor{ +template< class T, class DEVICE_TYPE > +struct DecFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_decrement(&data()); + void operator()( int ) const { + Kokkos::atomic_decrement( &data() ); } - DecFunctor( T _i0 ) : i0(_i0) {} + + DecFunctor( T _i0 ) : i0( _i0 ) {} }; -template -T DecAtomic(T i0) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T DecAtomic( T i0 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct DecFunctor f(i0); + struct DecFunctor< T, execution_space > f( i0 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T DecAtomicCheck(T i0) { +template< class T > +T DecAtomicCheck( T i0 ) { T* data = new T[1]; data[0] = 0; @@ -343,14 +368,15 @@ T DecAtomicCheck(T i0) { T val = *data; delete [] data; + return val; } -template -bool DecAtomicTest(T i0) +template< class T, class DeviceType > +bool DecAtomicTest( T i0 ) { - T res = DecAtomic(i0); - T resSerial = DecAtomicCheck(i0); + T res = DecAtomic< T, DeviceType >( i0 ); + T resSerial = DecAtomicCheck< T >( i0 ); bool passed = true; @@ -358,71 +384,77 @@ bool DecAtomicTest(T i0) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = DecAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } //--------------------------------------------------- //--------------atomic_fetch_mul--------------------- //--------------------------------------------------- -template -struct MulFunctor{ +template< class T, class DEVICE_TYPE > +struct MulFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; T i1; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_fetch_mul(&data(),(T)i1); + void operator()( int ) const { + Kokkos::atomic_fetch_mul( &data(), (T) i1 ); } - MulFunctor( T _i0 , T _i1 ) : i0(_i0) , i1(_i1) {} + + MulFunctor( T _i0, T _i1 ) : i0( _i0 ), i1( _i1 ) {} }; -template -T MulAtomic(T i0 , T i1) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T MulAtomic( T i0, T i1 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct MulFunctor f(i0,i1); + struct MulFunctor< T, execution_space > f( i0, i1 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T MulAtomicCheck(T i0 , T i1) { +template< class T > +T MulAtomicCheck( T i0, T i1 ) { T* data = new T[1]; data[0] = 0; - *data = i0*i1 ; + *data = i0*i1; T val = *data; delete [] data; + return val; } -template -bool MulAtomicTest(T i0, T i1) +template< class T, class DeviceType > +bool MulAtomicTest( T i0, T i1 ) { - T res = MulAtomic(i0,i1); - T resSerial = MulAtomicCheck(i0,i1); + T res = MulAtomic< T, DeviceType >( i0, i1 ); + T resSerial = MulAtomicCheck< T >( i0, i1 ); bool passed = true; @@ -430,71 +462,77 @@ bool MulAtomicTest(T i0, T i1) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = MulAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } //--------------------------------------------------- //--------------atomic_fetch_div--------------------- //--------------------------------------------------- -template -struct DivFunctor{ +template< class T, class DEVICE_TYPE > +struct DivFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; T i1; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_fetch_div(&data(),(T)i1); + void operator()( int ) const { + Kokkos::atomic_fetch_div( &data(), (T) i1 ); } - DivFunctor( T _i0 , T _i1 ) : i0(_i0) , i1(_i1) {} + + DivFunctor( T _i0, T _i1 ) : i0( _i0 ), i1( _i1 ) {} }; -template -T DivAtomic(T i0 , T i1) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T DivAtomic( T i0, T i1 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct DivFunctor f(i0,i1); + struct DivFunctor< T, execution_space > f( i0, i1 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T DivAtomicCheck(T i0 , T i1) { +template< class T > +T DivAtomicCheck( T i0, T i1 ) { T* data = new T[1]; data[0] = 0; - *data = i0/i1 ; + *data = i0 / i1; T val = *data; delete [] data; + return val; } -template -bool DivAtomicTest(T i0, T i1) +template< class T, class DeviceType > +bool DivAtomicTest( T i0, T i1 ) { - T res = DivAtomic(i0,i1); - T resSerial = DivAtomicCheck(i0,i1); + T res = DivAtomic< T, DeviceType >( i0, i1 ); + T resSerial = DivAtomicCheck< T >( i0, i1 ); bool passed = true; @@ -502,71 +540,77 @@ bool DivAtomicTest(T i0, T i1) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = DivAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } //--------------------------------------------------- //--------------atomic_fetch_mod--------------------- //--------------------------------------------------- -template -struct ModFunctor{ +template< class T, class DEVICE_TYPE > +struct ModFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; T i1; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_fetch_mod(&data(),(T)i1); + void operator()( int ) const { + Kokkos::atomic_fetch_mod( &data(), (T) i1 ); } - ModFunctor( T _i0 , T _i1 ) : i0(_i0) , i1(_i1) {} + + ModFunctor( T _i0, T _i1 ) : i0( _i0 ), i1( _i1 ) {} }; -template -T ModAtomic(T i0 , T i1) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T ModAtomic( T i0, T i1 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct ModFunctor f(i0,i1); + struct ModFunctor< T, execution_space > f( i0, i1 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T ModAtomicCheck(T i0 , T i1) { +template< class T > +T ModAtomicCheck( T i0, T i1 ) { T* data = new T[1]; data[0] = 0; - *data = i0%i1 ; + *data = i0 % i1; T val = *data; delete [] data; + return val; } -template -bool ModAtomicTest(T i0, T i1) +template< class T, class DeviceType > +bool ModAtomicTest( T i0, T i1 ) { - T res = ModAtomic(i0,i1); - T resSerial = ModAtomicCheck(i0,i1); + T res = ModAtomic< T, DeviceType >( i0, i1 ); + T resSerial = ModAtomicCheck< T >( i0, i1 ); bool passed = true; @@ -574,71 +618,77 @@ bool ModAtomicTest(T i0, T i1) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = ModAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } //--------------------------------------------------- //--------------atomic_fetch_and--------------------- //--------------------------------------------------- -template -struct AndFunctor{ +template< class T, class DEVICE_TYPE > +struct AndFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; T i1; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_fetch_and(&data(),(T)i1); + void operator()( int ) const { + Kokkos::atomic_fetch_and( &data(), (T) i1 ); } - AndFunctor( T _i0 , T _i1 ) : i0(_i0) , i1(_i1) {} + + AndFunctor( T _i0, T _i1 ) : i0( _i0 ), i1( _i1 ) {} }; -template -T AndAtomic(T i0 , T i1) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T AndAtomic( T i0, T i1 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct AndFunctor f(i0,i1); + struct AndFunctor< T, execution_space > f( i0, i1 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T AndAtomicCheck(T i0 , T i1) { +template< class T > +T AndAtomicCheck( T i0, T i1 ) { T* data = new T[1]; data[0] = 0; - *data = i0&i1 ; + *data = i0 & i1; T val = *data; delete [] data; + return val; } -template -bool AndAtomicTest(T i0, T i1) +template< class T, class DeviceType > +bool AndAtomicTest( T i0, T i1 ) { - T res = AndAtomic(i0,i1); - T resSerial = AndAtomicCheck(i0,i1); + T res = AndAtomic< T, DeviceType >( i0, i1 ); + T resSerial = AndAtomicCheck< T >( i0, i1 ); bool passed = true; @@ -646,71 +696,77 @@ bool AndAtomicTest(T i0, T i1) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = AndAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } //--------------------------------------------------- //--------------atomic_fetch_or---------------------- //--------------------------------------------------- -template -struct OrFunctor{ +template< class T, class DEVICE_TYPE > +struct OrFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; T i1; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_fetch_or(&data(),(T)i1); + void operator()( int ) const { + Kokkos::atomic_fetch_or( &data(), (T) i1 ); } - OrFunctor( T _i0 , T _i1 ) : i0(_i0) , i1(_i1) {} + + OrFunctor( T _i0, T _i1 ) : i0( _i0 ), i1( _i1 ) {} }; -template -T OrAtomic(T i0 , T i1) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T OrAtomic( T i0, T i1 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct OrFunctor f(i0,i1); + struct OrFunctor< T, execution_space > f( i0, i1 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T OrAtomicCheck(T i0 , T i1) { +template< class T > +T OrAtomicCheck( T i0, T i1 ) { T* data = new T[1]; data[0] = 0; - *data = i0|i1 ; + *data = i0 | i1; T val = *data; delete [] data; + return val; } -template -bool OrAtomicTest(T i0, T i1) +template< class T, class DeviceType > +bool OrAtomicTest( T i0, T i1 ) { - T res = OrAtomic(i0,i1); - T resSerial = OrAtomicCheck(i0,i1); + T res = OrAtomic< T, DeviceType >( i0, i1 ); + T resSerial = OrAtomicCheck< T >( i0, i1 ); bool passed = true; @@ -718,71 +774,77 @@ bool OrAtomicTest(T i0, T i1) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = OrAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } //--------------------------------------------------- //--------------atomic_fetch_xor--------------------- //--------------------------------------------------- -template -struct XorFunctor{ +template< class T, class DEVICE_TYPE > +struct XorFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; T i1; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_fetch_xor(&data(),(T)i1); + void operator()( int ) const { + Kokkos::atomic_fetch_xor( &data(), (T) i1 ); } - XorFunctor( T _i0 , T _i1 ) : i0(_i0) , i1(_i1) {} + + XorFunctor( T _i0, T _i1 ) : i0( _i0 ), i1( _i1 ) {} }; -template -T XorAtomic(T i0 , T i1) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T XorAtomic( T i0, T i1 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct XorFunctor f(i0,i1); + struct XorFunctor< T, execution_space > f( i0, i1 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T XorAtomicCheck(T i0 , T i1) { +template< class T > +T XorAtomicCheck( T i0, T i1 ) { T* data = new T[1]; data[0] = 0; - *data = i0^i1 ; + *data = i0 ^ i1; T val = *data; delete [] data; + return val; } -template -bool XorAtomicTest(T i0, T i1) +template< class T, class DeviceType > +bool XorAtomicTest( T i0, T i1 ) { - T res = XorAtomic(i0,i1); - T resSerial = XorAtomicCheck(i0,i1); + T res = XorAtomic< T, DeviceType >( i0, i1 ); + T resSerial = XorAtomicCheck< T >( i0, i1 ); bool passed = true; @@ -790,71 +852,77 @@ bool XorAtomicTest(T i0, T i1) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = XorAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } //--------------------------------------------------- //--------------atomic_fetch_lshift--------------------- //--------------------------------------------------- -template -struct LShiftFunctor{ +template< class T, class DEVICE_TYPE > +struct LShiftFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; T i1; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_fetch_lshift(&data(),(T)i1); + void operator()( int ) const { + Kokkos::atomic_fetch_lshift( &data(), (T) i1 ); } - LShiftFunctor( T _i0 , T _i1 ) : i0(_i0) , i1(_i1) {} + + LShiftFunctor( T _i0, T _i1 ) : i0( _i0 ), i1( _i1 ) {} }; -template -T LShiftAtomic(T i0 , T i1) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T LShiftAtomic( T i0, T i1 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct LShiftFunctor f(i0,i1); + struct LShiftFunctor< T, execution_space > f( i0, i1 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T LShiftAtomicCheck(T i0 , T i1) { +template< class T > +T LShiftAtomicCheck( T i0, T i1 ) { T* data = new T[1]; data[0] = 0; - *data = i0< -bool LShiftAtomicTest(T i0, T i1) +template< class T, class DeviceType > +bool LShiftAtomicTest( T i0, T i1 ) { - T res = LShiftAtomic(i0,i1); - T resSerial = LShiftAtomicCheck(i0,i1); + T res = LShiftAtomic< T, DeviceType >( i0, i1 ); + T resSerial = LShiftAtomicCheck< T >( i0, i1 ); bool passed = true; @@ -862,71 +930,77 @@ bool LShiftAtomicTest(T i0, T i1) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = LShiftAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } //--------------------------------------------------- //--------------atomic_fetch_rshift--------------------- //--------------------------------------------------- -template -struct RShiftFunctor{ +template< class T, class DEVICE_TYPE > +struct RShiftFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View< T, execution_space > type; + type data; T i0; T i1; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_fetch_rshift(&data(),(T)i1); + void operator()( int ) const { + Kokkos::atomic_fetch_rshift( &data(), (T) i1 ); } - RShiftFunctor( T _i0 , T _i1 ) : i0(_i0) , i1(_i1) {} + + RShiftFunctor( T _i0, T _i1 ) : i0( _i0 ), i1( _i1 ) {} }; -template -T RShiftAtomic(T i0 , T i1) { - struct InitFunctor f_init(i0); - typename InitFunctor::type data("Data"); - typename InitFunctor::h_type h_data("HData"); +template< class T, class execution_space > +T RShiftAtomic( T i0, T i1 ) { + struct InitFunctor< T, execution_space > f_init( i0 ); + typename InitFunctor< T, execution_space >::type data( "Data" ); + typename InitFunctor< T, execution_space >::h_type h_data( "HData" ); + f_init.data = data; - Kokkos::parallel_for(1,f_init); + Kokkos::parallel_for( 1, f_init ); execution_space::fence(); - struct RShiftFunctor f(i0,i1); + struct RShiftFunctor< T, execution_space > f( i0, i1 ); + f.data = data; - Kokkos::parallel_for(1,f); + Kokkos::parallel_for( 1, f ); execution_space::fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy( h_data, data ); T val = h_data(); + return val; } -template -T RShiftAtomicCheck(T i0 , T i1) { +template< class T > +T RShiftAtomicCheck( T i0, T i1 ) { T* data = new T[1]; data[0] = 0; - *data = i0>>i1 ; + *data = i0 >> i1; T val = *data; delete [] data; + return val; } -template -bool RShiftAtomicTest(T i0, T i1) +template< class T, class DeviceType > +bool RShiftAtomicTest( T i0, T i1 ) { - T res = RShiftAtomic(i0,i1); - T resSerial = RShiftAtomicCheck(i0,i1); + T res = RShiftAtomic< T, DeviceType >( i0, i1 ); + T resSerial = RShiftAtomicCheck< T >( i0, i1 ); bool passed = true; @@ -934,52 +1008,52 @@ bool RShiftAtomicTest(T i0, T i1) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = RShiftAtomicTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } - //--------------------------------------------------- //--------------atomic_test_control------------------ //--------------------------------------------------- -template -bool AtomicOperationsTestIntegralType( int i0 , int i1 , int test ) +template< class T, class DeviceType > +bool AtomicOperationsTestIntegralType( int i0, int i1, int test ) { - switch (test) { - case 1: return MaxAtomicTest( (T)i0 , (T)i1 ); - case 2: return MinAtomicTest( (T)i0 , (T)i1 ); - case 3: return MulAtomicTest( (T)i0 , (T)i1 ); - case 4: return DivAtomicTest( (T)i0 , (T)i1 ); - case 5: return ModAtomicTest( (T)i0 , (T)i1 ); - case 6: return AndAtomicTest( (T)i0 , (T)i1 ); - case 7: return OrAtomicTest( (T)i0 , (T)i1 ); - case 8: return XorAtomicTest( (T)i0 , (T)i1 ); - case 9: return LShiftAtomicTest( (T)i0 , (T)i1 ); - case 10: return RShiftAtomicTest( (T)i0 , (T)i1 ); - case 11: return IncAtomicTest( (T)i0 ); - case 12: return DecAtomicTest( (T)i0 ); + switch ( test ) { + case 1: return MaxAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 2: return MinAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 3: return MulAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 4: return DivAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 5: return ModAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 6: return AndAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 7: return OrAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 8: return XorAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 9: return LShiftAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 10: return RShiftAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 11: return IncAtomicTest< T, DeviceType >( (T) i0 ); + case 12: return DecAtomicTest< T, DeviceType >( (T) i0 ); } + return 0; } -template -bool AtomicOperationsTestNonIntegralType( int i0 , int i1 , int test ) +template< class T, class DeviceType > +bool AtomicOperationsTestNonIntegralType( int i0, int i1, int test ) { - switch (test) { - case 1: return MaxAtomicTest( (T)i0 , (T)i1 ); - case 2: return MinAtomicTest( (T)i0 , (T)i1 ); - case 3: return MulAtomicTest( (T)i0 , (T)i1 ); - case 4: return DivAtomicTest( (T)i0 , (T)i1 ); + switch ( test ) { + case 1: return MaxAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 2: return MinAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 3: return MulAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); + case 4: return DivAtomicTest< T, DeviceType >( (T) i0, (T) i1 ); } + return 0; } -} // namespace - +} // namespace TestAtomicOperations diff --git a/lib/kokkos/core/unit_test/TestAtomicViews.hpp b/lib/kokkos/core/unit_test/TestAtomicViews.hpp index 739492d32f..71080e5c82 100644 --- a/lib/kokkos/core/unit_test/TestAtomicViews.hpp +++ b/lib/kokkos/core/unit_test/TestAtomicViews.hpp @@ -49,56 +49,52 @@ namespace TestAtomicViews { //-----------atomic view api tests----------------- //------------------------------------------------- -template< class T , class ... P > -size_t allocation_count( const Kokkos::View & view ) +template< class T, class ... P > +size_t allocation_count( const Kokkos::View< T, P... > & view ) { const size_t card = view.size(); const size_t alloc = view.span(); - const int memory_span = Kokkos::View::required_allocation_size(100); + const int memory_span = Kokkos::View< int* >::required_allocation_size( 100 ); - return (card <= alloc && memory_span == 400) ? alloc : 0 ; + return ( card <= alloc && memory_span == 400 ) ? alloc : 0; } -template< class DataType , - class DeviceType , +template< class DataType, + class DeviceType, unsigned Rank = Kokkos::ViewTraits< DataType >::rank > -struct TestViewOperator_LeftAndRight ; +struct TestViewOperator_LeftAndRight; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 1 > +template< class DataType, class DeviceType > +struct TestViewOperator_LeftAndRight< DataType, DeviceType, 1 > { - typedef typename DeviceType::execution_space execution_space ; - typedef typename DeviceType::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; + typedef typename DeviceType::execution_space execution_space; + typedef typename DeviceType::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , + static void join( volatile value_type & update, const volatile value_type & input ) - { update |= input ; } + { update |= input; } KOKKOS_INLINE_FUNCTION static void init( value_type & update ) - { update = 0 ; } + { update = 0; } + typedef Kokkos::View< DataType, Kokkos::LayoutLeft, execution_space, Kokkos::MemoryTraits > left_view; - typedef Kokkos:: - View< DataType, Kokkos::LayoutLeft, execution_space, Kokkos::MemoryTraits< Kokkos::Atomic > > left_view ; + typedef Kokkos::View< DataType, Kokkos::LayoutRight, execution_space, Kokkos::MemoryTraits > right_view; - typedef Kokkos:: - View< DataType, Kokkos::LayoutRight, execution_space, Kokkos::MemoryTraits< Kokkos::Atomic > > right_view ; + typedef Kokkos::View< DataType, Kokkos::LayoutStride, execution_space, Kokkos::MemoryTraits > stride_view; - typedef Kokkos:: - View< DataType, Kokkos::LayoutStride, execution_space, Kokkos::MemoryTraits< Kokkos::Atomic >> stride_view ; - - left_view left ; - right_view right ; - stride_view left_stride ; - stride_view right_stride ; - long left_alloc ; - long right_alloc ; + left_view left; + right_view right; + stride_view left_stride; + stride_view right_stride; + long left_alloc; + long right_alloc; TestViewOperator_LeftAndRight() : left( "left" ) @@ -111,357 +107,338 @@ struct TestViewOperator_LeftAndRight< DataType , DeviceType , 1 > static void testit() { - TestViewOperator_LeftAndRight driver ; + TestViewOperator_LeftAndRight driver; - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce( 1, driver, error_flag ); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ( error_flag, 0 ); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const + void operator()( const size_type, value_type & update ) const { - for ( unsigned i0 = 0 ; i0 < unsigned(left.dimension_0()) ; ++i0 ) + for ( unsigned i0 = 0; i0 < unsigned( left.dimension_0() ); ++i0 ) { - // below checks that values match, but unable to check the references - // - should this be able to be checked? - if ( left(i0) != left(i0,0,0,0,0,0,0,0) ) { update |= 3 ; } - if ( right(i0) != right(i0,0,0,0,0,0,0,0) ) { update |= 3 ; } - if ( left(i0) != left_stride(i0) ) { update |= 4 ; } - if ( right(i0) != right_stride(i0) ) { update |= 8 ; } - /* - if ( & left(i0) != & left(i0,0,0,0,0,0,0,0) ) { update |= 3 ; } - if ( & right(i0) != & right(i0,0,0,0,0,0,0,0) ) { update |= 3 ; } - if ( & left(i0) != & left_stride(i0) ) { update |= 4 ; } - if ( & right(i0) != & right_stride(i0) ) { update |= 8 ; } - */ + // Below checks that values match, but unable to check the references. + // Should this be able to be checked? + if ( left( i0 ) != left( i0, 0, 0, 0, 0, 0, 0, 0 ) ) { update |= 3; } + if ( right( i0 ) != right( i0, 0, 0, 0, 0, 0, 0, 0 ) ) { update |= 3; } + if ( left( i0 ) != left_stride( i0 ) ) { update |= 4; } + if ( right( i0 ) != right_stride( i0 ) ) { update |= 8; } +/* + if ( &left( i0 ) != &left( i0, 0, 0, 0, 0, 0, 0, 0 ) ) { update |= 3; } + if ( &right( i0 ) != &right( i0, 0, 0, 0, 0, 0, 0, 0 ) ) { update |= 3; } + if ( &left( i0 ) != &left_stride( i0 ) ) { update |= 4; } + if ( &right( i0 ) != &right_stride( i0 ) ) { update |= 8; } +*/ } } }; - template< typename T, class DeviceType > class TestAtomicViewAPI { public: - typedef DeviceType device ; + typedef DeviceType device; - enum { N0 = 1000 , - N1 = 3 , - N2 = 5 , + enum { N0 = 1000, + N1 = 3, + N2 = 5, N3 = 7 }; - typedef Kokkos::View< T , device > dView0 ; - typedef Kokkos::View< T* , device > dView1 ; - typedef Kokkos::View< T*[N1] , device > dView2 ; - typedef Kokkos::View< T*[N1][N2] , device > dView3 ; - typedef Kokkos::View< T*[N1][N2][N3] , device > dView4 ; - typedef Kokkos::View< const T*[N1][N2][N3] , device > const_dView4 ; - typedef Kokkos::View< T****, device, Kokkos::MemoryUnmanaged > dView4_unmanaged ; - typedef typename dView0::host_mirror_space host ; + typedef Kokkos::View< T, device > dView0; + typedef Kokkos::View< T*, device > dView1; + typedef Kokkos::View< T*[N1], device > dView2; + typedef Kokkos::View< T*[N1][N2], device > dView3; + typedef Kokkos::View< T*[N1][N2][N3], device > dView4; + typedef Kokkos::View< const T*[N1][N2][N3], device > const_dView4; + typedef Kokkos::View< T****, device, Kokkos::MemoryUnmanaged > dView4_unmanaged; + typedef typename dView0::host_mirror_space host; - typedef Kokkos::View< T , device , Kokkos::MemoryTraits< Kokkos::Atomic > > aView0 ; - typedef Kokkos::View< T* , device , Kokkos::MemoryTraits< Kokkos::Atomic > > aView1 ; - typedef Kokkos::View< T*[N1] , device , Kokkos::MemoryTraits< Kokkos::Atomic > > aView2 ; - typedef Kokkos::View< T*[N1][N2] , device , Kokkos::MemoryTraits< Kokkos::Atomic > > aView3 ; - typedef Kokkos::View< T*[N1][N2][N3] , device , Kokkos::MemoryTraits< Kokkos::Atomic > > aView4 ; - typedef Kokkos::View< const T*[N1][N2][N3] , device , Kokkos::MemoryTraits< Kokkos::Atomic > > const_aView4 ; + typedef Kokkos::View< T, device, Kokkos::MemoryTraits< Kokkos::Atomic > > aView0; + typedef Kokkos::View< T*, device, Kokkos::MemoryTraits< Kokkos::Atomic > > aView1; + typedef Kokkos::View< T*[N1], device, Kokkos::MemoryTraits< Kokkos::Atomic > > aView2; + typedef Kokkos::View< T*[N1][N2], device, Kokkos::MemoryTraits< Kokkos::Atomic > > aView3; + typedef Kokkos::View< T*[N1][N2][N3], device, Kokkos::MemoryTraits< Kokkos::Atomic > > aView4; + typedef Kokkos::View< const T*[N1][N2][N3], device, Kokkos::MemoryTraits< Kokkos::Atomic > > const_aView4; - typedef Kokkos::View< T****, device, Kokkos::MemoryTraits< Kokkos::Unmanaged | Kokkos::Atomic > > aView4_unmanaged ; + typedef Kokkos::View< T****, device, Kokkos::MemoryTraits< Kokkos::Unmanaged | Kokkos::Atomic > > aView4_unmanaged; - typedef typename aView0::host_mirror_space host_atomic ; + typedef typename aView0::host_mirror_space host_atomic; TestAtomicViewAPI() { - TestViewOperator_LeftAndRight< int[2] , device >::testit(); + TestViewOperator_LeftAndRight< int[2], device >::testit(); run_test_rank0(); run_test_rank4(); run_test_const(); } - static void run_test_rank0() { - dView0 dx , dy ; - aView0 ax , ay , az ; + dView0 dx, dy; + aView0 ax, ay, az; dx = dView0( "dx" ); dy = dView0( "dy" ); - ASSERT_EQ( dx.use_count() , size_t(1) ); - ASSERT_EQ( dy.use_count() , size_t(1) ); - - ax = dx ; - ay = dy ; - ASSERT_EQ( dx.use_count() , size_t(2) ); - ASSERT_EQ( dy.use_count() , size_t(2) ); - ASSERT_EQ( dx.use_count() , ax.use_count() ); - - az = ax ; - ASSERT_EQ( dx.use_count() , size_t(3) ); - ASSERT_EQ( ax.use_count() , size_t(3) ); - ASSERT_EQ( az.use_count() , size_t(3) ); - ASSERT_EQ( az.use_count() , ax.use_count() ); + ASSERT_EQ( dx.use_count(), size_t( 1 ) ); + ASSERT_EQ( dy.use_count(), size_t( 1 ) ); + + ax = dx; + ay = dy; + ASSERT_EQ( dx.use_count(), size_t( 2 ) ); + ASSERT_EQ( dy.use_count(), size_t( 2 ) ); + ASSERT_EQ( dx.use_count(), ax.use_count() ); + + az = ax; + ASSERT_EQ( dx.use_count(), size_t( 3 ) ); + ASSERT_EQ( ax.use_count(), size_t( 3 ) ); + ASSERT_EQ( az.use_count(), size_t( 3 ) ); + ASSERT_EQ( az.use_count(), ax.use_count() ); } static void run_test_rank4() { - dView4 dx , dy ; - aView4 ax , ay , az ; + dView4 dx, dy; + aView4 ax, ay, az; - dx = dView4( "dx" , N0 ); - dy = dView4( "dy" , N0 ); - ASSERT_EQ( dx.use_count() , size_t(1) ); - ASSERT_EQ( dy.use_count() , size_t(1) ); + dx = dView4( "dx", N0 ); + dy = dView4( "dy", N0 ); + ASSERT_EQ( dx.use_count(), size_t( 1 ) ); + ASSERT_EQ( dy.use_count(), size_t( 1 ) ); - ax = dx ; - ay = dy ; - ASSERT_EQ( dx.use_count() , size_t(2) ); - ASSERT_EQ( dy.use_count() , size_t(2) ); - ASSERT_EQ( dx.use_count() , ax.use_count() ); + ax = dx; + ay = dy; + ASSERT_EQ( dx.use_count(), size_t( 2 ) ); + ASSERT_EQ( dy.use_count(), size_t( 2 ) ); + ASSERT_EQ( dx.use_count(), ax.use_count() ); dView4_unmanaged unmanaged_dx = dx; - ASSERT_EQ( dx.use_count() , size_t(2) ); + ASSERT_EQ( dx.use_count(), size_t( 2 ) ); - az = ax ; - ASSERT_EQ( dx.use_count() , size_t(3) ); - ASSERT_EQ( ax.use_count() , size_t(3) ); - ASSERT_EQ( az.use_count() , size_t(3) ); - ASSERT_EQ( az.use_count() , ax.use_count() ); + az = ax; + ASSERT_EQ( dx.use_count(), size_t( 3 ) ); + ASSERT_EQ( ax.use_count(), size_t( 3 ) ); + ASSERT_EQ( az.use_count(), size_t( 3 ) ); + ASSERT_EQ( az.use_count(), ax.use_count() ); aView4_unmanaged unmanaged_ax = ax; - ASSERT_EQ( ax.use_count() , size_t(3) ); + ASSERT_EQ( ax.use_count(), size_t( 3 ) ); - aView4_unmanaged unmanaged_ax_from_ptr_dx = aView4_unmanaged(dx.data(), - dx.dimension_0(), - dx.dimension_1(), - dx.dimension_2(), - dx.dimension_3()); - ASSERT_EQ( ax.use_count() , size_t(3) ); + aView4_unmanaged unmanaged_ax_from_ptr_dx = + aView4_unmanaged( dx.data(), dx.dimension_0(), dx.dimension_1(), dx.dimension_2(), dx.dimension_3() ); + ASSERT_EQ( ax.use_count(), size_t( 3 ) ); - const_aView4 const_ax = ax ; - ASSERT_EQ( ax.use_count() , size_t(4) ); - ASSERT_EQ( const_ax.use_count() , ax.use_count() ); + const_aView4 const_ax = ax; + ASSERT_EQ( ax.use_count(), size_t( 4 ) ); + ASSERT_EQ( const_ax.use_count(), ax.use_count() ); ASSERT_FALSE( ax.data() == 0 ); ASSERT_FALSE( const_ax.data() == 0 ); // referenceable ptr ASSERT_FALSE( unmanaged_ax.data() == 0 ); ASSERT_FALSE( unmanaged_ax_from_ptr_dx.data() == 0 ); ASSERT_FALSE( ay.data() == 0 ); -// ASSERT_NE( ax , ay ); +// ASSERT_NE( ax, ay ); // Above test results in following runtime error from gtest: // Expected: (ax) != (ay), actual: 32-byte object <30-01 D0-A0 D8-7F 00-00 00-31 44-0C 01-00 00-00 E8-03 00-00 00-00 00-00 69-00 00-00 00-00 00-00> vs 32-byte object <80-01 D0-A0 D8-7F 00-00 00-A1 4A-0C 01-00 00-00 E8-03 00-00 00-00 00-00 69-00 00-00 00-00 00-00> - ASSERT_EQ( ax.dimension_0() , unsigned(N0) ); - ASSERT_EQ( ax.dimension_1() , unsigned(N1) ); - ASSERT_EQ( ax.dimension_2() , unsigned(N2) ); - ASSERT_EQ( ax.dimension_3() , unsigned(N3) ); + ASSERT_EQ( ax.dimension_0(), unsigned( N0 ) ); + ASSERT_EQ( ax.dimension_1(), unsigned( N1 ) ); + ASSERT_EQ( ax.dimension_2(), unsigned( N2 ) ); + ASSERT_EQ( ax.dimension_3(), unsigned( N3 ) ); - ASSERT_EQ( ay.dimension_0() , unsigned(N0) ); - ASSERT_EQ( ay.dimension_1() , unsigned(N1) ); - ASSERT_EQ( ay.dimension_2() , unsigned(N2) ); - ASSERT_EQ( ay.dimension_3() , unsigned(N3) ); + ASSERT_EQ( ay.dimension_0(), unsigned( N0 ) ); + ASSERT_EQ( ay.dimension_1(), unsigned( N1 ) ); + ASSERT_EQ( ay.dimension_2(), unsigned( N2 ) ); + ASSERT_EQ( ay.dimension_3(), unsigned( N3 ) ); - ASSERT_EQ( unmanaged_ax_from_ptr_dx.capacity(),unsigned(N0)*unsigned(N1)*unsigned(N2)*unsigned(N3) ); + ASSERT_EQ( unmanaged_ax_from_ptr_dx.capacity(), unsigned( N0 ) * unsigned( N1 ) * unsigned( N2 ) * unsigned( N3 ) ); } - typedef T DataType[2] ; + typedef T DataType[2]; static void check_auto_conversion_to_const( - const Kokkos::View< const DataType , device , Kokkos::MemoryTraits< Kokkos::Atomic> > & arg_const , - const Kokkos::View< const DataType , device , Kokkos::MemoryTraits< Kokkos::Atomic> > & arg ) + const Kokkos::View< const DataType, device, Kokkos::MemoryTraits > & arg_const, + const Kokkos::View< const DataType, device, Kokkos::MemoryTraits > & arg ) { ASSERT_TRUE( arg_const == arg ); } static void run_test_const() { - typedef Kokkos::View< DataType , device , Kokkos::MemoryTraits< Kokkos::Atomic> > typeX ; - typedef Kokkos::View< const DataType , device , Kokkos::MemoryTraits< Kokkos::Atomic> > const_typeX ; + typedef Kokkos::View< DataType, device, Kokkos::MemoryTraits > typeX; + typedef Kokkos::View< const DataType, device, Kokkos::MemoryTraits > const_typeX; typeX x( "X" ); - const_typeX xc = x ; + const_typeX xc = x; //ASSERT_TRUE( xc == x ); // const xc is referenceable, non-const x is not //ASSERT_TRUE( x == xc ); - check_auto_conversion_to_const( x , xc ); + check_auto_conversion_to_const( x, xc ); } - }; - //--------------------------------------------------- //-----------initialization functors----------------- //--------------------------------------------------- template struct InitFunctor_Seq { + typedef Kokkos::View< T*, execution_space > view_type; - typedef Kokkos::View< T* , execution_space > view_type ; - - view_type input ; - const long length ; + view_type input; + const long length; - InitFunctor_Seq( view_type & input_ , const long length_ ) - : input(input_) - , length(length_) + InitFunctor_Seq( view_type & input_, const long length_ ) + : input( input_ ) + , length( length_ ) {} KOKKOS_INLINE_FUNCTION void operator()( const long i ) const { if ( i < length ) { - input(i) = (T) i ; + input( i ) = (T) i; } } - }; - template struct InitFunctor_ModTimes { + typedef Kokkos::View< T*, execution_space > view_type; - typedef Kokkos::View< T* , execution_space > view_type ; - - view_type input ; - const long length ; - const long remainder ; + view_type input; + const long length; + const long remainder; - InitFunctor_ModTimes( view_type & input_ , const long length_ , const long remainder_ ) - : input(input_) - , length(length_) - , remainder(remainder_) + InitFunctor_ModTimes( view_type & input_, const long length_, const long remainder_ ) + : input( input_ ) + , length( length_ ) + , remainder( remainder_ ) {} KOKKOS_INLINE_FUNCTION void operator()( const long i ) const { if ( i < length ) { - if ( i % (remainder+1) == remainder ) { - input(i) = (T)2 ; + if ( i % ( remainder + 1 ) == remainder ) { + input( i ) = (T) 2; } else { - input(i) = (T)1 ; + input( i ) = (T) 1; } } } }; - template struct InitFunctor_ModShift { + typedef Kokkos::View< T*, execution_space > view_type; - typedef Kokkos::View< T* , execution_space > view_type ; - - view_type input ; - const long length ; - const long remainder ; + view_type input; + const long length; + const long remainder; - InitFunctor_ModShift( view_type & input_ , const long length_ , const long remainder_ ) - : input(input_) - , length(length_) - , remainder(remainder_) + InitFunctor_ModShift( view_type & input_, const long length_, const long remainder_ ) + : input( input_ ) + , length( length_ ) + , remainder( remainder_ ) {} KOKKOS_INLINE_FUNCTION void operator()( const long i ) const { if ( i < length ) { - if ( i % (remainder+1) == remainder ) { - input(i) = 1 ; + if ( i % ( remainder + 1 ) == remainder ) { + input( i ) = 1; } } } }; - //--------------------------------------------------- //-----------atomic view plus-equal------------------ //--------------------------------------------------- template struct PlusEqualAtomicViewFunctor { - - typedef Kokkos::View< T* , execution_space , Kokkos::MemoryTraits< Kokkos::Atomic > > atomic_view_type ; - - typedef Kokkos::View< T* , execution_space > view_type ; + typedef Kokkos::View< T*, execution_space, Kokkos::MemoryTraits > atomic_view_type; + typedef Kokkos::View< T*, execution_space > view_type; view_type input; atomic_view_type even_odd_result; const long length; // Wrap the result view in an atomic view, use this for operator - PlusEqualAtomicViewFunctor( const view_type & input_ , view_type & even_odd_result_ , const long length_) - : input(input_) - , even_odd_result(even_odd_result_) - , length(length_) + PlusEqualAtomicViewFunctor( const view_type & input_, view_type & even_odd_result_, const long length_ ) + : input( input_ ) + , even_odd_result( even_odd_result_ ) + , length( length_ ) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i) const { + void operator()( const long i ) const { if ( i < length ) { if ( i % 2 == 0 ) { - even_odd_result(0) += input(i); + even_odd_result( 0 ) += input( i ); } else { - even_odd_result(1) += input(i); + even_odd_result( 1 ) += input( i ); } } } - }; - -template -T PlusEqualAtomicView(const long input_length) { - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef typename view_type::HostMirror host_view_type ; +template< class T, class execution_space > +T PlusEqualAtomicView( const long input_length ) { + typedef Kokkos::View< T*, execution_space > view_type; + typedef typename view_type::HostMirror host_view_type; const long length = input_length; - view_type input("input_view",length) ; - view_type result_view("result_view",2) ; + view_type input( "input_view", length ); + view_type result_view( "result_view", 2 ); - InitFunctor_Seq init_f( input , length ) ; - Kokkos::parallel_for(Kokkos::RangePolicy(0, length) , init_f ); + InitFunctor_Seq< T, execution_space > init_f( input, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), init_f ); - PlusEqualAtomicViewFunctor functor(input, result_view, length); - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), functor); + PlusEqualAtomicViewFunctor< T, execution_space > functor( input, result_view, length ); + Kokkos::parallel_for( Kokkos::RangePolicy( 0, length ), functor ); Kokkos::fence(); - host_view_type h_result_view = Kokkos::create_mirror_view(result_view); - Kokkos::deep_copy(h_result_view, result_view); + host_view_type h_result_view = Kokkos::create_mirror_view( result_view ); + Kokkos::deep_copy( h_result_view, result_view ); - return (T) (h_result_view(0) + h_result_view(1) ) ; + return (T) ( h_result_view( 0 ) + h_result_view( 1 ) ); } -template +template< class T > T PlusEqualAtomicViewCheck( const long input_length ) { - const long N = input_length; T result[2]; + if ( N % 2 == 0 ) { - const long half_sum_end = (N/2) - 1; + const long half_sum_end = ( N / 2 ) - 1; const long full_sum_end = N - 1; - result[0] = half_sum_end*(half_sum_end + 1)/2 ; //even sum - result[1] = ( full_sum_end*(full_sum_end + 1)/2 ) - result[0] ; // odd sum + result[0] = half_sum_end * ( half_sum_end + 1 ) / 2; // Even sum. + result[1] = ( full_sum_end * ( full_sum_end + 1 ) / 2 ) - result[0]; // Odd sum. } else { - const long half_sum_end = (T)(N/2) ; + const long half_sum_end = (T) ( N / 2 ); const long full_sum_end = N - 2; - result[0] = half_sum_end*(half_sum_end - 1)/2 ; //even sum - result[1] = ( full_sum_end*(full_sum_end - 1)/2 ) - result[0] ; // odd sum + result[0] = half_sum_end * ( half_sum_end - 1 ) / 2; // Even sum. + result[1] = ( full_sum_end * ( full_sum_end - 1 ) / 2 ) - result[0]; // Odd sum. } - return (T)(result[0] + result[1]); + return (T) ( result[0] + result[1] ); } -template -bool PlusEqualAtomicViewTest(long input_length) +template< class T, class DeviceType > +bool PlusEqualAtomicViewTest( long input_length ) { - T res = PlusEqualAtomicView(input_length); - T resSerial = PlusEqualAtomicViewCheck(input_length); + T res = PlusEqualAtomicView< T, DeviceType >( input_length ); + T resSerial = PlusEqualAtomicViewCheck< T >( input_length ); bool passed = true; @@ -469,104 +446,98 @@ bool PlusEqualAtomicViewTest(long input_length) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = PlusEqualAtomicViewTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } - //--------------------------------------------------- //-----------atomic view minus-equal----------------- //--------------------------------------------------- template struct MinusEqualAtomicViewFunctor { - - typedef Kokkos::View< T* , execution_space , Kokkos::MemoryTraits< Kokkos::Atomic > > atomic_view_type ; - - typedef Kokkos::View< T* , execution_space > view_type ; + typedef Kokkos::View< T*, execution_space, Kokkos::MemoryTraits > atomic_view_type; + typedef Kokkos::View< T*, execution_space > view_type; view_type input; atomic_view_type even_odd_result; const long length; - // Wrap the result view in an atomic view, use this for operator - MinusEqualAtomicViewFunctor( const view_type & input_ , view_type & even_odd_result_ , const long length_) - : input(input_) - , even_odd_result(even_odd_result_) - , length(length_) + // Wrap the result view in an atomic view, use this for operator. + MinusEqualAtomicViewFunctor( const view_type & input_, view_type & even_odd_result_, const long length_ ) + : input( input_ ) + , even_odd_result( even_odd_result_ ) + , length( length_ ) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i) const { + void operator()( const long i ) const { if ( i < length ) { if ( i % 2 == 0 ) { - even_odd_result(0) -= input(i); + even_odd_result( 0 ) -= input( i ); } else { - even_odd_result(1) -= input(i); + even_odd_result( 1 ) -= input( i ); } } } - }; - -template -T MinusEqualAtomicView(const long input_length) { - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef typename view_type::HostMirror host_view_type ; +template< class T, class execution_space > +T MinusEqualAtomicView( const long input_length ) { + typedef Kokkos::View< T*, execution_space > view_type; + typedef typename view_type::HostMirror host_view_type; const long length = input_length; - view_type input("input_view",length) ; - view_type result_view("result_view",2) ; + view_type input( "input_view", length ); + view_type result_view( "result_view", 2 ); - InitFunctor_Seq init_f( input , length ) ; - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), init_f ); + InitFunctor_Seq< T, execution_space > init_f( input, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), init_f ); - MinusEqualAtomicViewFunctor functor(input, result_view,length); - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), functor); + MinusEqualAtomicViewFunctor< T, execution_space > functor( input, result_view, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), functor ); Kokkos::fence(); - host_view_type h_result_view = Kokkos::create_mirror_view(result_view); - Kokkos::deep_copy(h_result_view, result_view); + host_view_type h_result_view = Kokkos::create_mirror_view( result_view ); + Kokkos::deep_copy( h_result_view, result_view ); - return (T) (h_result_view(0) + h_result_view(1) ) ; + return (T) ( h_result_view( 0 ) + h_result_view( 1 ) ); } -template +template< class T > T MinusEqualAtomicViewCheck( const long input_length ) { - const long N = input_length; T result[2]; + if ( N % 2 == 0 ) { - const long half_sum_end = (N/2) - 1; + const long half_sum_end = ( N / 2 ) - 1; const long full_sum_end = N - 1; - result[0] = -1*( half_sum_end*(half_sum_end + 1)/2 ) ; //even sum - result[1] = -1*( ( full_sum_end*(full_sum_end + 1)/2 ) + result[0] ) ; // odd sum + result[0] = -1 * ( half_sum_end * ( half_sum_end + 1 ) / 2 ); // Even sum. + result[1] = -1 * ( ( full_sum_end * ( full_sum_end + 1 ) / 2 ) + result[0] ); // Odd sum. } else { - const long half_sum_end = (long)(N/2) ; + const long half_sum_end = (long) ( N / 2 ); const long full_sum_end = N - 2; - result[0] = -1*( half_sum_end*(half_sum_end - 1)/2 ) ; //even sum - result[1] = -1*( ( full_sum_end*(full_sum_end - 1)/2 ) + result[0] ) ; // odd sum + result[0] = -1 * ( half_sum_end * ( half_sum_end - 1 ) / 2 ); // Even sum. + result[1] = -1 * ( ( full_sum_end * ( full_sum_end - 1 ) / 2 ) + result[0] ); // Odd sum. } - return (result[0] + result[1]); + return ( result[0] + result[1] ); } -template -bool MinusEqualAtomicViewTest(long input_length) +template< class T, class DeviceType > +bool MinusEqualAtomicViewTest( long input_length ) { - T res = MinusEqualAtomicView(input_length); - T resSerial = MinusEqualAtomicViewCheck(input_length); + T res = MinusEqualAtomicView< T, DeviceType >( input_length ); + T resSerial = MinusEqualAtomicViewCheck< T >( input_length ); bool passed = true; @@ -574,83 +545,76 @@ bool MinusEqualAtomicViewTest(long input_length) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = MinusEqualAtomicViewTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } - //--------------------------------------------------- //-----------atomic view times-equal----------------- //--------------------------------------------------- template struct TimesEqualAtomicViewFunctor { - - typedef Kokkos::View< T* , execution_space , Kokkos::MemoryTraits< Kokkos::Atomic > > atomic_view_type ; - - typedef Kokkos::View< T* , execution_space > view_type ; + typedef Kokkos::View< T*, execution_space, Kokkos::MemoryTraits > atomic_view_type; + typedef Kokkos::View< T*, execution_space > view_type; view_type input; atomic_view_type result; const long length; // Wrap the result view in an atomic view, use this for operator - TimesEqualAtomicViewFunctor( const view_type & input_ , view_type & result_ , const long length_) - : input(input_) - , result(result_) - , length(length_) + TimesEqualAtomicViewFunctor( const view_type & input_, view_type & result_, const long length_ ) + : input( input_ ) + , result( result_ ) + , length( length_ ) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i) const { + void operator()( const long i ) const { if ( i < length && i > 0 ) { - result(0) *= (double)input(i); + result( 0 ) *= (double) input( i ); } } - }; - -template -T TimesEqualAtomicView(const long input_length, const long remainder) { - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef typename view_type::HostMirror host_view_type ; +template< class T, class execution_space > +T TimesEqualAtomicView( const long input_length, const long remainder ) { + typedef Kokkos::View< T*, execution_space > view_type; + typedef typename view_type::HostMirror host_view_type; const long length = input_length; - view_type input("input_view",length) ; - view_type result_view("result_view",1) ; - deep_copy(result_view, 1.0); + view_type input( "input_view", length ); + view_type result_view( "result_view", 1 ); + deep_copy( result_view, 1.0 ); - InitFunctor_ModTimes init_f( input , length , remainder ) ; - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), init_f ); + InitFunctor_ModTimes< T, execution_space > init_f( input, length, remainder ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), init_f ); - TimesEqualAtomicViewFunctor functor(input, result_view, length); - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), functor); + TimesEqualAtomicViewFunctor< T, execution_space > functor( input, result_view, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), functor ); Kokkos::fence(); - host_view_type h_result_view = Kokkos::create_mirror_view(result_view); - Kokkos::deep_copy(h_result_view, result_view); + host_view_type h_result_view = Kokkos::create_mirror_view( result_view ); + Kokkos::deep_copy( h_result_view, result_view ); - return (T) (h_result_view(0)) ; + return (T) ( h_result_view( 0 ) ); } -template +template< class T > T TimesEqualAtomicViewCheck( const long input_length, const long remainder ) { - - //Analytical result + // Analytical result. const long N = input_length; T result = 1.0; for ( long i = 2; i < N; ++i ) { - if ( i % (remainder+1) == remainder ) { + if ( i % ( remainder + 1 ) == remainder ) { result *= 2.0; } else { @@ -658,15 +622,15 @@ T TimesEqualAtomicViewCheck( const long input_length, const long remainder ) { } } - return (T)result; + return (T) result; } -template -bool TimesEqualAtomicViewTest(const long input_length) +template< class T, class DeviceType> +bool TimesEqualAtomicViewTest( const long input_length ) { const long remainder = 23; - T res = TimesEqualAtomicView(input_length, remainder); - T resSerial = TimesEqualAtomicViewCheck(input_length, remainder); + T res = TimesEqualAtomicView< T, DeviceType >( input_length, remainder ); + T resSerial = TimesEqualAtomicViewCheck< T >( input_length, remainder ); bool passed = true; @@ -674,101 +638,93 @@ bool TimesEqualAtomicViewTest(const long input_length) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = TimesEqualAtomicViewTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } - //--------------------------------------------------- //------------atomic view div-equal------------------ //--------------------------------------------------- template struct DivEqualAtomicViewFunctor { - - typedef Kokkos::View< T , execution_space , Kokkos::MemoryTraits< Kokkos::Atomic > > atomic_view_type ; - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef Kokkos::View< T , execution_space > scalar_view_type ; + typedef Kokkos::View< T, execution_space, Kokkos::MemoryTraits > atomic_view_type; + typedef Kokkos::View< T*, execution_space > view_type; + typedef Kokkos::View< T, execution_space > scalar_view_type; view_type input; atomic_view_type result; const long length; - // Wrap the result view in an atomic view, use this for operator - DivEqualAtomicViewFunctor( const view_type & input_ , scalar_view_type & result_ , const long length_) - : input(input_) - , result(result_) - , length(length_) + // Wrap the result view in an atomic view, use this for operator. + DivEqualAtomicViewFunctor( const view_type & input_, scalar_view_type & result_, const long length_ ) + : input( input_ ) + , result( result_ ) + , length( length_ ) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i) const { + void operator()( const long i ) const { if ( i < length && i > 0 ) { - result() /= (double)(input(i)); + result() /= (double) ( input( i ) ); } } - }; - -template -T DivEqualAtomicView(const long input_length, const long remainder) { - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef Kokkos::View< T , execution_space > scalar_view_type ; - typedef typename scalar_view_type::HostMirror host_scalar_view_type ; +template< class T, class execution_space > +T DivEqualAtomicView( const long input_length, const long remainder ) { + typedef Kokkos::View< T*, execution_space > view_type; + typedef Kokkos::View< T, execution_space > scalar_view_type; + typedef typename scalar_view_type::HostMirror host_scalar_view_type; const long length = input_length; - view_type input("input_view",length) ; - scalar_view_type result_view("result_view") ; - Kokkos::deep_copy(result_view, 12121212121); + view_type input( "input_view", length ); + scalar_view_type result_view( "result_view" ); + Kokkos::deep_copy( result_view, 12121212121 ); - InitFunctor_ModTimes init_f( input , length , remainder ) ; - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), init_f ); + InitFunctor_ModTimes< T, execution_space > init_f( input, length, remainder ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), init_f ); - DivEqualAtomicViewFunctor functor(input, result_view, length); - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), functor); + DivEqualAtomicViewFunctor< T, execution_space > functor( input, result_view, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), functor ); Kokkos::fence(); - host_scalar_view_type h_result_view = Kokkos::create_mirror_view(result_view); - Kokkos::deep_copy(h_result_view, result_view); + host_scalar_view_type h_result_view = Kokkos::create_mirror_view( result_view ); + Kokkos::deep_copy( h_result_view, result_view ); - return (T) (h_result_view()) ; + return (T) ( h_result_view() ); } -template -T DivEqualAtomicViewCheck( const long input_length , const long remainder ) { - +template< class T > +T DivEqualAtomicViewCheck( const long input_length, const long remainder ) { const long N = input_length; T result = 12121212121.0; for ( long i = 2; i < N; ++i ) { - if ( i % (remainder+1) == remainder ) { + if ( i % ( remainder + 1 ) == remainder ) { result /= 1.0; } else { result /= 2.0; } - } - return (T)result; + return (T) result; } -template -bool DivEqualAtomicViewTest(const long input_length) +template< class T, class DeviceType > +bool DivEqualAtomicViewTest( const long input_length ) { const long remainder = 23; - T res = DivEqualAtomicView(input_length, remainder); - T resSerial = DivEqualAtomicViewCheck(input_length, remainder); + T res = DivEqualAtomicView< T, DeviceType >( input_length, remainder ); + T resSerial = DivEqualAtomicViewCheck< T >( input_length, remainder ); bool passed = true; @@ -776,83 +732,76 @@ bool DivEqualAtomicViewTest(const long input_length) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = DivEqualAtomicViewTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } - //--------------------------------------------------- //------------atomic view mod-equal------------------ //--------------------------------------------------- -template +template< class T, class execution_space > struct ModEqualAtomicViewFunctor { - - typedef Kokkos::View< T , execution_space , Kokkos::MemoryTraits< Kokkos::Atomic > > atomic_view_type ; - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef Kokkos::View< T , execution_space > scalar_view_type ; + typedef Kokkos::View< T, execution_space, Kokkos::MemoryTraits > atomic_view_type; + typedef Kokkos::View< T*, execution_space > view_type; + typedef Kokkos::View< T, execution_space > scalar_view_type; view_type input; atomic_view_type result; const long length; - // Wrap the result view in an atomic view, use this for operator - ModEqualAtomicViewFunctor( const view_type & input_ , scalar_view_type & result_ , const long length_) - : input(input_) - , result(result_) - , length(length_) + // Wrap the result view in an atomic view, use this for operator. + ModEqualAtomicViewFunctor( const view_type & input_, scalar_view_type & result_, const long length_ ) + : input( input_ ) + , result( result_ ) + , length( length_ ) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i) const { + void operator()( const long i ) const { if ( i < length && i > 0 ) { - result() %= (double)(input(i)); + result() %= (double) ( input( i ) ); } } - }; - -template -T ModEqualAtomicView(const long input_length, const long remainder) { - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef Kokkos::View< T , execution_space > scalar_view_type ; - typedef typename scalar_view_type::HostMirror host_scalar_view_type ; +template< class T, class execution_space > +T ModEqualAtomicView( const long input_length, const long remainder ) { + typedef Kokkos::View< T*, execution_space > view_type; + typedef Kokkos::View< T, execution_space > scalar_view_type; + typedef typename scalar_view_type::HostMirror host_scalar_view_type; const long length = input_length; - view_type input("input_view",length) ; - scalar_view_type result_view("result_view") ; - Kokkos::deep_copy(result_view, 12121212121); + view_type input( "input_view", length ); + scalar_view_type result_view( "result_view" ); + Kokkos::deep_copy( result_view, 12121212121 ); - InitFunctor_ModTimes init_f( input , length , remainder ) ; - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), init_f ); + InitFunctor_ModTimes< T, execution_space > init_f( input, length, remainder ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), init_f ); - ModEqualAtomicViewFunctor functor(input, result_view, length); - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), functor); + ModEqualAtomicViewFunctor< T, execution_space > functor( input, result_view, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), functor ); Kokkos::fence(); - host_scalar_view_type h_result_view = Kokkos::create_mirror_view(result_view); - Kokkos::deep_copy(h_result_view, result_view); + host_scalar_view_type h_result_view = Kokkos::create_mirror_view( result_view ); + Kokkos::deep_copy( h_result_view, result_view ); - return (T) (h_result_view()) ; + return (T) ( h_result_view() ); } -template -T ModEqualAtomicViewCheck( const long input_length , const long remainder ) { - +template< class T > +T ModEqualAtomicViewCheck( const long input_length, const long remainder ) { const long N = input_length; T result = 12121212121; for ( long i = 2; i < N; ++i ) { - if ( i % (remainder+1) == remainder ) { + if ( i % ( remainder + 1 ) == remainder ) { result %= 1; } else { @@ -860,19 +809,18 @@ T ModEqualAtomicViewCheck( const long input_length , const long remainder ) { } } - return (T)result; + return (T) result; } -template -bool ModEqualAtomicViewTest(const long input_length) +template< class T, class DeviceType > +bool ModEqualAtomicViewTest( const long input_length ) { - - static_assert( std::is_integral::value, "ModEqualAtomicView Error: Type must be integral type for this unit test"); + static_assert( std::is_integral< T >::value, "ModEqualAtomicView Error: Type must be integral type for this unit test" ); const long remainder = 23; - T res = ModEqualAtomicView(input_length, remainder); - T resSerial = ModEqualAtomicViewCheck(input_length, remainder); + T res = ModEqualAtomicView< T, DeviceType >( input_length, remainder ); + T resSerial = ModEqualAtomicViewCheck< T >( input_length, remainder ); bool passed = true; @@ -880,142 +828,134 @@ bool ModEqualAtomicViewTest(const long input_length) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = ModEqualAtomicViewTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } - //--------------------------------------------------- //------------atomic view rs-equal------------------ //--------------------------------------------------- -template +template< class T, class execution_space > struct RSEqualAtomicViewFunctor { - - typedef Kokkos::View< T**** , execution_space , Kokkos::MemoryTraits< Kokkos::Atomic > > atomic_view_type ; - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef Kokkos::View< T**** , execution_space > result_view_type ; + typedef Kokkos::View< T****, execution_space, Kokkos::MemoryTraits > atomic_view_type; + typedef Kokkos::View< T*, execution_space > view_type; + typedef Kokkos::View< T****, execution_space > result_view_type; const view_type input; atomic_view_type result; const long length; const long value; - // Wrap the result view in an atomic view, use this for operator - RSEqualAtomicViewFunctor( const view_type & input_ , result_view_type & result_ , const long & length_ , const long & value_ ) - : input(input_) - , result(result_) - , length(length_) - , value(value_) + // Wrap the result view in an atomic view, use this for operator. + RSEqualAtomicViewFunctor( const view_type & input_, result_view_type & result_, const long & length_, const long & value_ ) + : input( input_ ) + , result( result_ ) + , length( length_ ) + , value( value_ ) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i) const { + void operator()( const long i ) const { if ( i < length ) { if ( i % 4 == 0 ) { - result(1,0,0,0) >>= input(i); + result( 1, 0, 0, 0 ) >>= input( i ); } else if ( i % 4 == 1 ) { - result(0,1,0,0) >>= input(i); + result( 0, 1, 0, 0 ) >>= input( i ); } else if ( i % 4 == 2 ) { - result(0,0,1,0) >>= input(i); + result( 0, 0, 1, 0 ) >>= input( i ); } else if ( i % 4 == 3 ) { - result(0,0,0,1) >>= input(i); + result( 0, 0, 0, 1 ) >>= input( i ); } } } - }; - -template -T RSEqualAtomicView(const long input_length, const long value, const long remainder) { - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef Kokkos::View< T**** , execution_space > result_view_type ; - typedef typename result_view_type::HostMirror host_scalar_view_type ; +template< class T, class execution_space > +T RSEqualAtomicView( const long input_length, const long value, const long remainder ) { + typedef Kokkos::View< T*, execution_space > view_type; + typedef Kokkos::View< T****, execution_space > result_view_type; + typedef typename result_view_type::HostMirror host_scalar_view_type; const long length = input_length; - view_type input("input_view",length) ; - result_view_type result_view("result_view",2,2,2,2) ; - host_scalar_view_type h_result_view = Kokkos::create_mirror_view(result_view); - h_result_view(1,0,0,0) = value; - h_result_view(0,1,0,0) = value; - h_result_view(0,0,1,0) = value; - h_result_view(0,0,0,1) = value; - Kokkos::deep_copy( result_view , h_result_view ); + view_type input( "input_view", length ); + result_view_type result_view( "result_view", 2, 2, 2, 2 ); + host_scalar_view_type h_result_view = Kokkos::create_mirror_view( result_view ); + h_result_view( 1, 0, 0, 0 ) = value; + h_result_view( 0, 1, 0, 0 ) = value; + h_result_view( 0, 0, 1, 0 ) = value; + h_result_view( 0, 0, 0, 1 ) = value; + Kokkos::deep_copy( result_view, h_result_view ); + InitFunctor_ModShift< T, execution_space > init_f( input, length, remainder ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), init_f ); - InitFunctor_ModShift init_f( input , length , remainder ) ; - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), init_f ); - - RSEqualAtomicViewFunctor functor(input, result_view, length, value); - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), functor); + RSEqualAtomicViewFunctor< T, execution_space > functor( input, result_view, length, value ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), functor ); Kokkos::fence(); - Kokkos::deep_copy(h_result_view, result_view); + Kokkos::deep_copy( h_result_view, result_view ); - return (T) (h_result_view(1,0,0,0)) ; + return (T) ( h_result_view( 1, 0, 0, 0 ) ); } -template +template< class T > T RSEqualAtomicViewCheck( const long input_length, const long value, const long remainder ) { - - T result[4] ; - result[0] = value ; - result[1] = value ; - result[2] = value ; - result[3] = value ; + T result[4]; + result[0] = value; + result[1] = value; + result[2] = value; + result[3] = value; T * input = new T[input_length]; for ( long i = 0; i < input_length; ++i ) { - if ( i % (remainder+1) == remainder ) { - input[i] = 1; - } - else { - input[i] = 0; - } + if ( i % ( remainder + 1 ) == remainder ) { + input[i] = 1; + } + else { + input[i] = 0; + } } for ( long i = 0; i < input_length; ++i ) { - if ( i % 4 == 0 ) { - result[0] >>= input[i]; - } - else if ( i % 4 == 1 ) { - result[1] >>= input[i]; - } - else if ( i % 4 == 2 ) { - result[2] >>= input[i]; - } - else if ( i % 4 == 3 ) { - result[3] >>= input[i]; - } + if ( i % 4 == 0 ) { + result[0] >>= input[i]; + } + else if ( i % 4 == 1 ) { + result[1] >>= input[i]; + } + else if ( i % 4 == 2 ) { + result[2] >>= input[i]; + } + else if ( i % 4 == 3 ) { + result[3] >>= input[i]; + } } + delete [] input; - return (T)result[0]; + return (T) result[0]; } -template -bool RSEqualAtomicViewTest(const long input_length) +template< class T, class DeviceType > +bool RSEqualAtomicViewTest( const long input_length ) { - - static_assert( std::is_integral::value, "RSEqualAtomicViewTest: Must be integral type for test"); + static_assert( std::is_integral< T >::value, "RSEqualAtomicViewTest: Must be integral type for test" ); const long remainder = 61042; //prime - 1 - const long value = 1073741825; // 2^30+1 - T res = RSEqualAtomicView(input_length, value, remainder); - T resSerial = RSEqualAtomicViewCheck(input_length, value, remainder); + const long value = 1073741825; // 2^30+1 + T res = RSEqualAtomicView< T, DeviceType >( input_length, value, remainder ); + T resSerial = RSEqualAtomicViewCheck< T >( input_length, value, remainder ); bool passed = true; @@ -1023,142 +963,134 @@ bool RSEqualAtomicViewTest(const long input_length) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = RSEqualAtomicViewTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } - //--------------------------------------------------- //------------atomic view ls-equal------------------ //--------------------------------------------------- template struct LSEqualAtomicViewFunctor { - - typedef Kokkos::View< T**** , execution_space , Kokkos::MemoryTraits< Kokkos::Atomic > > atomic_view_type ; - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef Kokkos::View< T**** , execution_space > result_view_type ; + typedef Kokkos::View< T****, execution_space, Kokkos::MemoryTraits > atomic_view_type; + typedef Kokkos::View< T*, execution_space > view_type; + typedef Kokkos::View< T****, execution_space > result_view_type; view_type input; atomic_view_type result; const long length; const long value; - // Wrap the result view in an atomic view, use this for operator - LSEqualAtomicViewFunctor( const view_type & input_ , result_view_type & result_ , const long & length_ , const long & value_ ) - : input(input_) - , result(result_) - , length(length_) - , value(value_) + // Wrap the result view in an atomic view, use this for operator. + LSEqualAtomicViewFunctor( const view_type & input_, result_view_type & result_, const long & length_, const long & value_ ) + : input( input_ ) + , result( result_ ) + , length( length_ ) + , value( value_ ) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i) const { + void operator()( const long i ) const { if ( i < length ) { if ( i % 4 == 0 ) { - result(1,0,0,0) <<= input(i); + result( 1, 0, 0, 0 ) <<= input( i ); } else if ( i % 4 == 1 ) { - result(0,1,0,0) <<= input(i); + result( 0, 1, 0, 0 ) <<= input( i ); } else if ( i % 4 == 2 ) { - result(0,0,1,0) <<= input(i); + result( 0, 0, 1, 0 ) <<= input( i ); } else if ( i % 4 == 3 ) { - result(0,0,0,1) <<= input(i); + result( 0, 0, 0, 1 ) <<= input( i ); } } } - }; - -template -T LSEqualAtomicView(const long input_length, const long value, const long remainder) { - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef Kokkos::View< T**** , execution_space > result_view_type ; - typedef typename result_view_type::HostMirror host_scalar_view_type ; +template< class T, class execution_space > +T LSEqualAtomicView( const long input_length, const long value, const long remainder ) { + typedef Kokkos::View< T*, execution_space > view_type; + typedef Kokkos::View< T****, execution_space > result_view_type; + typedef typename result_view_type::HostMirror host_scalar_view_type; const long length = input_length; - view_type input("input_view",length) ; - result_view_type result_view("result_view",2,2,2,2) ; - host_scalar_view_type h_result_view = Kokkos::create_mirror_view(result_view); - h_result_view(1,0,0,0) = value; - h_result_view(0,1,0,0) = value; - h_result_view(0,0,1,0) = value; - h_result_view(0,0,0,1) = value; - Kokkos::deep_copy( result_view , h_result_view ); + view_type input( "input_view", length ); + result_view_type result_view( "result_view", 2, 2, 2, 2 ); + host_scalar_view_type h_result_view = Kokkos::create_mirror_view( result_view ); + h_result_view( 1, 0, 0, 0 ) = value; + h_result_view( 0, 1, 0, 0 ) = value; + h_result_view( 0, 0, 1, 0 ) = value; + h_result_view( 0, 0, 0, 1 ) = value; + Kokkos::deep_copy( result_view, h_result_view ); - InitFunctor_ModShift init_f( input , length , remainder ) ; - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), init_f ); + InitFunctor_ModShift< T, execution_space > init_f( input, length, remainder ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), init_f ); - LSEqualAtomicViewFunctor functor(input, result_view, length, value); - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), functor); + LSEqualAtomicViewFunctor< T, execution_space > functor( input, result_view, length, value ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), functor ); Kokkos::fence(); - Kokkos::deep_copy(h_result_view, result_view); + Kokkos::deep_copy( h_result_view, result_view ); - return (T) (h_result_view(1,0,0,0)) ; + return (T) ( h_result_view( 1, 0, 0, 0 ) ); } -template +template< class T > T LSEqualAtomicViewCheck( const long input_length, const long value, const long remainder ) { - - T result[4] ; - result[0] = value ; - result[1] = value ; - result[2] = value ; - result[3] = value ; + T result[4]; + result[0] = value; + result[1] = value; + result[2] = value; + result[3] = value; T * input = new T[input_length]; for ( long i = 0; i < input_length; ++i ) { - if ( i % (remainder+1) == remainder ) { - input[i] = 1; - } - else { - input[i] = 0; - } + if ( i % ( remainder + 1 ) == remainder ) { + input[i] = 1; + } + else { + input[i] = 0; + } } for ( long i = 0; i < input_length; ++i ) { - if ( i % 4 == 0 ) { - result[0] <<= input[i]; - } - else if ( i % 4 == 1 ) { - result[1] <<= input[i]; - } - else if ( i % 4 == 2 ) { - result[2] <<= input[i]; - } - else if ( i % 4 == 3 ) { - result[3] <<= input[i]; - } + if ( i % 4 == 0 ) { + result[0] <<= input[i]; + } + else if ( i % 4 == 1 ) { + result[1] <<= input[i]; + } + else if ( i % 4 == 2 ) { + result[2] <<= input[i]; + } + else if ( i % 4 == 3 ) { + result[3] <<= input[i]; + } } delete [] input; - return (T)result[0]; + return (T) result[0]; } -template -bool LSEqualAtomicViewTest(const long input_length) +template< class T, class DeviceType > +bool LSEqualAtomicViewTest( const long input_length ) { - - static_assert( std::is_integral::value, "LSEqualAtomicViewTest: Must be integral type for test"); + static_assert( std::is_integral< T >::value, "LSEqualAtomicViewTest: Must be integral type for test" ); const long remainder = 61042; //prime - 1 - const long value = 1; // 2^30+1 - T res = LSEqualAtomicView(input_length, value, remainder); - T resSerial = LSEqualAtomicViewCheck(input_length, value, remainder); + const long value = 1; // 2^30+1 + T res = LSEqualAtomicView< T, DeviceType >( input_length, value, remainder ); + T resSerial = LSEqualAtomicViewCheck< T >( input_length, value, remainder ); bool passed = true; @@ -1166,104 +1098,96 @@ bool LSEqualAtomicViewTest(const long input_length) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = RSEqualAtomicViewTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } - //--------------------------------------------------- //-----------atomic view and-equal----------------- //--------------------------------------------------- -template +template< class T, class execution_space > struct AndEqualAtomicViewFunctor { - - typedef Kokkos::View< T* , execution_space , Kokkos::MemoryTraits< Kokkos::Atomic > > atomic_view_type ; - - typedef Kokkos::View< T* , execution_space > view_type ; + typedef Kokkos::View< T*, execution_space, Kokkos::MemoryTraits > atomic_view_type; + typedef Kokkos::View< T*, execution_space > view_type; view_type input; atomic_view_type even_odd_result; const long length; - // Wrap the result view in an atomic view, use this for operator - AndEqualAtomicViewFunctor( const view_type & input_ , view_type & even_odd_result_ , const long length_) - : input(input_) - , even_odd_result(even_odd_result_) - , length(length_) + // Wrap the result view in an atomic view, use this for operator. + AndEqualAtomicViewFunctor( const view_type & input_, view_type & even_odd_result_, const long length_ ) + : input( input_ ) + , even_odd_result( even_odd_result_ ) + , length( length_ ) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i) const { + void operator()( const long i ) const { if ( i < length ) { if ( i % 2 == 0 ) { - even_odd_result(0) &= input(i); + even_odd_result( 0 ) &= input( i ); } else { - even_odd_result(1) &= input(i); + even_odd_result( 1 ) &= input( i ); } } } - }; - -template -T AndEqualAtomicView(const long input_length) { - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef typename view_type::HostMirror host_view_type ; +template< class T, class execution_space > +T AndEqualAtomicView( const long input_length ) { + typedef Kokkos::View< T*, execution_space > view_type; + typedef typename view_type::HostMirror host_view_type; const long length = input_length; - view_type input("input_view",length) ; - view_type result_view("result_view",2) ; - Kokkos::deep_copy(result_view, 1); + view_type input( "input_view", length ); + view_type result_view( "result_view", 2 ); + Kokkos::deep_copy( result_view, 1 ); - InitFunctor_Seq init_f( input , length ) ; - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), init_f ); + InitFunctor_Seq< T, execution_space > init_f( input, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), init_f ); - AndEqualAtomicViewFunctor functor(input, result_view,length); - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), functor); + AndEqualAtomicViewFunctor< T, execution_space > functor( input, result_view, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), functor ); Kokkos::fence(); - host_view_type h_result_view = Kokkos::create_mirror_view(result_view); - Kokkos::deep_copy(h_result_view, result_view); + host_view_type h_result_view = Kokkos::create_mirror_view( result_view ); + Kokkos::deep_copy( h_result_view, result_view ); - return (T) (h_result_view(0)) ; + return (T) ( h_result_view( 0 ) ); } -template +template< class T > T AndEqualAtomicViewCheck( const long input_length ) { - const long N = input_length; - T result[2] = {1}; + T result[2] = { 1 }; for ( long i = 0; i < N; ++i ) { if ( N % 2 == 0 ) { - result[0] &= (T)i; + result[0] &= (T) i; } else { - result[1] &= (T)i; + result[1] &= (T) i; } } - return (result[0]); + return ( result[0] ); } -template -bool AndEqualAtomicViewTest(long input_length) +template< class T, class DeviceType > +bool AndEqualAtomicViewTest( long input_length ) { + static_assert( std::is_integral< T >::value, "AndEqualAtomicViewTest: Must be integral type for test" ); - static_assert( std::is_integral::value, "AndEqualAtomicViewTest: Must be integral type for test"); - - T res = AndEqualAtomicView(input_length); - T resSerial = AndEqualAtomicViewCheck(input_length); + T res = AndEqualAtomicView< T, DeviceType >( input_length ); + T resSerial = AndEqualAtomicViewCheck< T >( input_length ); bool passed = true; @@ -1271,103 +1195,96 @@ bool AndEqualAtomicViewTest(long input_length) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = AndEqualAtomicViewTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } - //--------------------------------------------------- //-----------atomic view or-equal----------------- //--------------------------------------------------- -template +template< class T, class execution_space > struct OrEqualAtomicViewFunctor { - - typedef Kokkos::View< T* , execution_space , Kokkos::MemoryTraits< Kokkos::Atomic > > atomic_view_type ; - - typedef Kokkos::View< T* , execution_space > view_type ; + typedef Kokkos::View< T*, execution_space, Kokkos::MemoryTraits > atomic_view_type; + typedef Kokkos::View< T*, execution_space > view_type; view_type input; atomic_view_type even_odd_result; const long length; - // Wrap the result view in an atomic view, use this for operator - OrEqualAtomicViewFunctor( const view_type & input_ , view_type & even_odd_result_ , const long length_) - : input(input_) - , even_odd_result(even_odd_result_) - , length(length_) + // Wrap the result view in an atomic view, use this for operator. + OrEqualAtomicViewFunctor( const view_type & input_, view_type & even_odd_result_, const long length_ ) + : input( input_ ) + , even_odd_result( even_odd_result_ ) + , length( length_ ) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i) const { + void operator()( const long i ) const { if ( i < length ) { if ( i % 2 == 0 ) { - even_odd_result(0) |= input(i); + even_odd_result( 0 ) |= input( i ); } else { - even_odd_result(1) |= input(i); + even_odd_result( 1 ) |= input( i ); } } } - }; - -template -T OrEqualAtomicView(const long input_length) { - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef typename view_type::HostMirror host_view_type ; +template< class T, class execution_space > +T OrEqualAtomicView( const long input_length ) { + typedef Kokkos::View< T*, execution_space > view_type; + typedef typename view_type::HostMirror host_view_type; const long length = input_length; - view_type input("input_view",length) ; - view_type result_view("result_view",2) ; + view_type input( "input_view", length ); + view_type result_view( "result_view", 2 ); - InitFunctor_Seq init_f( input , length ) ; - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), init_f ); + InitFunctor_Seq< T, execution_space > init_f( input, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), init_f ); - OrEqualAtomicViewFunctor functor(input, result_view,length); - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), functor); + OrEqualAtomicViewFunctor< T, execution_space > functor( input, result_view, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), functor ); Kokkos::fence(); - host_view_type h_result_view = Kokkos::create_mirror_view(result_view); - Kokkos::deep_copy(h_result_view, result_view); + host_view_type h_result_view = Kokkos::create_mirror_view( result_view ); + Kokkos::deep_copy( h_result_view, result_view ); - return (T) (h_result_view(0)) ; + return (T) ( h_result_view( 0 ) ); } -template +template< class T > T OrEqualAtomicViewCheck( const long input_length ) { const long N = input_length; - T result[2] = {0}; + T result[2] = { 0 }; for ( long i = 0; i < N; ++i ) { if ( i % 2 == 0 ) { - result[0] |= (T)i; + result[0] |= (T) i; } else { - result[1] |= (T)i; + result[1] |= (T) i; } } - return (T)(result[0]); + return (T) ( result[0] ); } -template -bool OrEqualAtomicViewTest(long input_length) +template< class T, class DeviceType > +bool OrEqualAtomicViewTest( long input_length ) { - - static_assert( std::is_integral::value, "OrEqualAtomicViewTest: Must be integral type for test"); + static_assert( std::is_integral< T >::value, "OrEqualAtomicViewTest: Must be integral type for test" ); - T res = OrEqualAtomicView(input_length); - T resSerial = OrEqualAtomicViewCheck(input_length); + T res = OrEqualAtomicView< T, DeviceType >( input_length ); + T resSerial = OrEqualAtomicViewCheck< T >( input_length ); bool passed = true; @@ -1375,103 +1292,95 @@ bool OrEqualAtomicViewTest(long input_length) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = OrEqualAtomicViewTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } - //--------------------------------------------------- //-----------atomic view xor-equal----------------- //--------------------------------------------------- -template +template< class T, class execution_space > struct XOrEqualAtomicViewFunctor { - - typedef Kokkos::View< T* , execution_space , Kokkos::MemoryTraits< Kokkos::Atomic > > atomic_view_type ; - - typedef Kokkos::View< T* , execution_space > view_type ; + typedef Kokkos::View< T*, execution_space, Kokkos::MemoryTraits > atomic_view_type; + typedef Kokkos::View< T*, execution_space > view_type; view_type input; atomic_view_type even_odd_result; const long length; - // Wrap the result view in an atomic view, use this for operator - XOrEqualAtomicViewFunctor( const view_type & input_ , view_type & even_odd_result_ , const long length_) - : input(input_) - , even_odd_result(even_odd_result_) - , length(length_) + // Wrap the result view in an atomic view, use this for operator. + XOrEqualAtomicViewFunctor( const view_type & input_, view_type & even_odd_result_, const long length_ ) + : input( input_ ) + , even_odd_result( even_odd_result_ ) + , length( length_ ) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i) const { + void operator()( const long i ) const { if ( i < length ) { if ( i % 2 == 0 ) { - even_odd_result(0) ^= input(i); + even_odd_result( 0 ) ^= input( i ); } else { - even_odd_result(1) ^= input(i); + even_odd_result( 1 ) ^= input( i ); } } } - }; - -template -T XOrEqualAtomicView(const long input_length) { - - typedef Kokkos::View< T* , execution_space > view_type ; - typedef typename view_type::HostMirror host_view_type ; +template< class T, class execution_space > +T XOrEqualAtomicView( const long input_length ) { + typedef Kokkos::View< T*, execution_space > view_type; + typedef typename view_type::HostMirror host_view_type; const long length = input_length; - view_type input("input_view",length) ; - view_type result_view("result_view",2) ; + view_type input( "input_view", length ); + view_type result_view( "result_view", 2 ); - InitFunctor_Seq init_f( input , length ) ; - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), init_f ); + InitFunctor_Seq< T, execution_space > init_f( input, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), init_f ); - XOrEqualAtomicViewFunctor functor(input, result_view,length); - Kokkos::parallel_for( Kokkos::RangePolicy(0, length), functor); + XOrEqualAtomicViewFunctor< T, execution_space > functor( input, result_view, length ); + Kokkos::parallel_for( Kokkos::RangePolicy< execution_space >( 0, length ), functor ); Kokkos::fence(); - host_view_type h_result_view = Kokkos::create_mirror_view(result_view); - Kokkos::deep_copy(h_result_view, result_view); + host_view_type h_result_view = Kokkos::create_mirror_view( result_view ); + Kokkos::deep_copy( h_result_view, result_view ); - return (T) (h_result_view(0)) ; + return (T) ( h_result_view( 0 ) ); } -template +template< class T > T XOrEqualAtomicViewCheck( const long input_length ) { - const long N = input_length; - T result[2] = {0}; + T result[2] = { 0 }; for ( long i = 0; i < N; ++i ) { if ( i % 2 == 0 ) { - result[0] ^= (T)i; + result[0] ^= (T) i; } else { - result[1] ^= (T)i; + result[1] ^= (T) i; } } - return (T)(result[0]); + return (T) ( result[0] ); } -template -bool XOrEqualAtomicViewTest(long input_length) +template< class T, class DeviceType > +bool XOrEqualAtomicViewTest( long input_length ) { + static_assert( std::is_integral< T >::value, "XOrEqualAtomicViewTest: Must be integral type for test" ); - static_assert( std::is_integral::value, "XOrEqualAtomicViewTest: Must be integral type for test"); - - T res = XOrEqualAtomicView(input_length); - T resSerial = XOrEqualAtomicViewCheck(input_length); + T res = XOrEqualAtomicView< T, DeviceType >( input_length ); + T resSerial = XOrEqualAtomicViewCheck< T >( input_length ); bool passed = true; @@ -1479,54 +1388,52 @@ bool XOrEqualAtomicViewTest(long input_length) passed = false; std::cout << "Loop<" - << typeid(T).name() + << typeid( T ).name() << ">( test = XOrEqualAtomicViewTest" << " FAILED : " << resSerial << " != " << res - << std::endl ; + << std::endl; } - return passed ; + return passed; } - // inc/dec? - //--------------------------------------------------- //--------------atomic_test_control------------------ //--------------------------------------------------- -template -bool AtomicViewsTestIntegralType( const int length , int test ) +template< class T, class DeviceType > +bool AtomicViewsTestIntegralType( const int length, int test ) { - static_assert( std::is_integral::value, "TestAtomicViews Error: Non-integral type passed into IntegralType tests"); - - switch (test) { - case 1: return PlusEqualAtomicViewTest( length ); - case 2: return MinusEqualAtomicViewTest( length ); - case 3: return RSEqualAtomicViewTest( length ); - case 4: return LSEqualAtomicViewTest( length ); - case 5: return ModEqualAtomicViewTest( length ); - case 6: return AndEqualAtomicViewTest( length ); - case 7: return OrEqualAtomicViewTest( length ); - case 8: return XOrEqualAtomicViewTest( length ); + static_assert( std::is_integral< T >::value, "TestAtomicViews Error: Non-integral type passed into IntegralType tests" ); + + switch ( test ) { + case 1: return PlusEqualAtomicViewTest< T, DeviceType >( length ); + case 2: return MinusEqualAtomicViewTest< T, DeviceType >( length ); + case 3: return RSEqualAtomicViewTest< T, DeviceType >( length ); + case 4: return LSEqualAtomicViewTest< T, DeviceType >( length ); + case 5: return ModEqualAtomicViewTest< T, DeviceType >( length ); + case 6: return AndEqualAtomicViewTest< T, DeviceType >( length ); + case 7: return OrEqualAtomicViewTest< T, DeviceType >( length ); + case 8: return XOrEqualAtomicViewTest< T, DeviceType >( length ); } + return 0; } - -template -bool AtomicViewsTestNonIntegralType( const int length , int test ) +template< class T, class DeviceType > +bool AtomicViewsTestNonIntegralType( const int length, int test ) { - switch (test) { - case 1: return PlusEqualAtomicViewTest( length ); - case 2: return MinusEqualAtomicViewTest( length ); - case 3: return TimesEqualAtomicViewTest( length ); - case 4: return DivEqualAtomicViewTest( length ); + switch ( test ) { + case 1: return PlusEqualAtomicViewTest< T, DeviceType >( length ); + case 2: return MinusEqualAtomicViewTest< T, DeviceType >( length ); + case 3: return TimesEqualAtomicViewTest< T, DeviceType >( length ); + case 4: return DivEqualAtomicViewTest< T, DeviceType >( length ); } + return 0; } -} // namespace - +} // namespace TestAtomicViews diff --git a/lib/kokkos/core/unit_test/TestCXX11.hpp b/lib/kokkos/core/unit_test/TestCXX11.hpp index d6dde5e963..e2ad623d9c 100644 --- a/lib/kokkos/core/unit_test/TestCXX11.hpp +++ b/lib/kokkos/core/unit_test/TestCXX11.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,283 +36,294 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ + #include namespace TestCXX11 { -template -struct FunctorAddTest{ - typedef Kokkos::View view_type; - view_type a_, b_; +template< class DeviceType > +struct FunctorAddTest { + typedef Kokkos::View< double**, DeviceType > view_type; typedef DeviceType execution_space; - FunctorAddTest(view_type & a, view_type &b):a_(a),b_(b) {} + typedef typename Kokkos::TeamPolicy< execution_space >::member_type team_member; + + view_type a_, b_; + + FunctorAddTest( view_type & a, view_type & b ) : a_( a ), b_( b ) {} + KOKKOS_INLINE_FUNCTION - void operator() (const int& i) const { - b_(i,0) = a_(i,1) + a_(i,2); - b_(i,1) = a_(i,0) - a_(i,3); - b_(i,2) = a_(i,4) + a_(i,0); - b_(i,3) = a_(i,2) - a_(i,1); - b_(i,4) = a_(i,3) + a_(i,4); + void operator() ( const int& i ) const { + b_( i, 0 ) = a_( i, 1 ) + a_( i, 2 ); + b_( i, 1 ) = a_( i, 0 ) - a_( i, 3 ); + b_( i, 2 ) = a_( i, 4 ) + a_( i, 0 ); + b_( i, 3 ) = a_( i, 2 ) - a_( i, 1 ); + b_( i, 4 ) = a_( i, 3 ) + a_( i, 4 ); } - typedef typename Kokkos::TeamPolicy< execution_space >::member_type team_member ; KOKKOS_INLINE_FUNCTION - void operator() (const team_member & dev) const { - const int begin = dev.league_rank() * 4 ; - const int end = begin + 4 ; - for ( int i = begin + dev.team_rank() ; i < end ; i += dev.team_size() ) { - b_(i,0) = a_(i,1) + a_(i,2); - b_(i,1) = a_(i,0) - a_(i,3); - b_(i,2) = a_(i,4) + a_(i,0); - b_(i,3) = a_(i,2) - a_(i,1); - b_(i,4) = a_(i,3) + a_(i,4); + void operator() ( const team_member & dev ) const { + const int begin = dev.league_rank() * 4; + const int end = begin + 4; + for ( int i = begin + dev.team_rank(); i < end; i += dev.team_size() ) { + b_( i, 0 ) = a_( i, 1 ) + a_( i, 2 ); + b_( i, 1 ) = a_( i, 0 ) - a_( i, 3 ); + b_( i, 2 ) = a_( i, 4 ) + a_( i, 0 ); + b_( i, 3 ) = a_( i, 2 ) - a_( i, 1 ); + b_( i, 4 ) = a_( i, 3 ) + a_( i, 4 ); } } }; -template +template< class DeviceType, bool PWRTest > double AddTestFunctor() { + typedef Kokkos::TeamPolicy< DeviceType > policy_type; - typedef Kokkos::TeamPolicy policy_type ; - - Kokkos::View a("A",100,5); - Kokkos::View b("B",100,5); - typename Kokkos::View::HostMirror h_a = Kokkos::create_mirror_view(a); - typename Kokkos::View::HostMirror h_b = Kokkos::create_mirror_view(b); + Kokkos::View< double**, DeviceType > a( "A", 100, 5 ); + Kokkos::View< double**, DeviceType > b( "B", 100, 5 ); + typename Kokkos::View< double**, DeviceType >::HostMirror h_a = Kokkos::create_mirror_view( a ); + typename Kokkos::View< double**, DeviceType >::HostMirror h_b = Kokkos::create_mirror_view( b ); - for(int i=0;i<100;i++) { - for(int j=0;j<5;j++) - h_a(i,j) = 0.1*i/(1.1*j+1.0) + 0.5*j; + for ( int i = 0; i < 100; i++ ) { + for ( int j = 0; j < 5; j++ ) { + h_a( i, j ) = 0.1 * i / ( 1.1 * j + 1.0 ) + 0.5 * j; + } } - Kokkos::deep_copy(a,h_a); + Kokkos::deep_copy( a, h_a ); - if(PWRTest==false) - Kokkos::parallel_for(100,FunctorAddTest(a,b)); - else - Kokkos::parallel_for(policy_type(25,Kokkos::AUTO),FunctorAddTest(a,b)); - Kokkos::deep_copy(h_b,b); + if ( PWRTest == false ) { + Kokkos::parallel_for( 100, FunctorAddTest< DeviceType >( a, b ) ); + } + else { + Kokkos::parallel_for( policy_type( 25, Kokkos::AUTO ), FunctorAddTest< DeviceType >( a, b ) ); + } + Kokkos::deep_copy( h_b, b ); double result = 0; - for(int i=0;i<100;i++) { - for(int j=0;j<5;j++) - result += h_b(i,j); + for ( int i = 0; i < 100; i++ ) { + for ( int j = 0; j < 5; j++ ) { + result += h_b( i, j ); } + } return result; } - -#if defined (KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) -template +#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) +template< class DeviceType, bool PWRTest > double AddTestLambda() { - - Kokkos::View a("A",100,5); - Kokkos::View b("B",100,5); - typename Kokkos::View::HostMirror h_a = Kokkos::create_mirror_view(a); - typename Kokkos::View::HostMirror h_b = Kokkos::create_mirror_view(b); - - for(int i=0;i<100;i++) { - for(int j=0;j<5;j++) - h_a(i,j) = 0.1*i/(1.1*j+1.0) + 0.5*j; + Kokkos::View< double**, DeviceType > a( "A", 100, 5 ); + Kokkos::View< double**, DeviceType > b( "B", 100, 5 ); + typename Kokkos::View< double**, DeviceType >::HostMirror h_a = Kokkos::create_mirror_view( a ); + typename Kokkos::View< double**, DeviceType >::HostMirror h_b = Kokkos::create_mirror_view( b ); + + for ( int i = 0; i < 100; i++ ) { + for ( int j = 0; j < 5; j++ ) { + h_a( i, j ) = 0.1 * i / ( 1.1 * j + 1.0 ) + 0.5 * j; + } } - Kokkos::deep_copy(a,h_a); - - if(PWRTest==false) { - Kokkos::parallel_for(100,KOKKOS_LAMBDA(const int& i) { - b(i,0) = a(i,1) + a(i,2); - b(i,1) = a(i,0) - a(i,3); - b(i,2) = a(i,4) + a(i,0); - b(i,3) = a(i,2) - a(i,1); - b(i,4) = a(i,3) + a(i,4); + Kokkos::deep_copy( a, h_a ); + + if ( PWRTest == false ) { + Kokkos::parallel_for( 100, KOKKOS_LAMBDA( const int & i ) { + b( i, 0 ) = a( i, 1 ) + a( i, 2 ); + b( i, 1 ) = a( i, 0 ) - a( i, 3 ); + b( i, 2 ) = a( i, 4 ) + a( i, 0 ); + b( i, 3 ) = a( i, 2 ) - a( i, 1 ); + b( i, 4 ) = a( i, 3 ) + a( i, 4 ); }); - } else { - typedef Kokkos::TeamPolicy policy_type ; - typedef typename policy_type::member_type team_member ; - - policy_type policy(25,Kokkos::AUTO); - - Kokkos::parallel_for(policy,KOKKOS_LAMBDA(const team_member & dev) { - const int begin = dev.league_rank() * 4 ; - const int end = begin + 4 ; - for ( int i = begin + dev.team_rank() ; i < end ; i += dev.team_size() ) { - b(i,0) = a(i,1) + a(i,2); - b(i,1) = a(i,0) - a(i,3); - b(i,2) = a(i,4) + a(i,0); - b(i,3) = a(i,2) - a(i,1); - b(i,4) = a(i,3) + a(i,4); + } + else { + typedef Kokkos::TeamPolicy< DeviceType > policy_type; + typedef typename policy_type::member_type team_member; + + policy_type policy( 25, Kokkos::AUTO ); + + Kokkos::parallel_for( policy, KOKKOS_LAMBDA( const team_member & dev ) { + const int begin = dev.league_rank() * 4; + const int end = begin + 4; + for ( int i = begin + dev.team_rank(); i < end; i += dev.team_size() ) { + b( i, 0 ) = a( i, 1 ) + a( i, 2 ); + b( i, 1 ) = a( i, 0 ) - a( i, 3 ); + b( i, 2 ) = a( i, 4 ) + a( i, 0 ); + b( i, 3 ) = a( i, 2 ) - a( i, 1 ); + b( i, 4 ) = a( i, 3 ) + a( i, 4 ); } }); } - Kokkos::deep_copy(h_b,b); + Kokkos::deep_copy( h_b, b ); double result = 0; - for(int i=0;i<100;i++) { - for(int j=0;j<5;j++) - result += h_b(i,j); + for ( int i = 0; i < 100; i++ ) { + for ( int j = 0; j < 5; j++ ) { + result += h_b( i, j ); } + } return result; } - #else -template +template< class DeviceType, bool PWRTest > double AddTestLambda() { - return AddTestFunctor(); + return AddTestFunctor< DeviceType, PWRTest >(); } #endif - -template -struct FunctorReduceTest{ - typedef Kokkos::View view_type; - view_type a_; +template< class DeviceType > +struct FunctorReduceTest { + typedef Kokkos::View< double**, DeviceType > view_type; typedef DeviceType execution_space; typedef double value_type; - FunctorReduceTest(view_type & a):a_(a) {} + typedef typename Kokkos::TeamPolicy< execution_space >::member_type team_member; + + view_type a_; + + FunctorReduceTest( view_type & a ) : a_( a ) {} KOKKOS_INLINE_FUNCTION - void operator() (const int& i, value_type& sum) const { - sum += a_(i,1) + a_(i,2); - sum += a_(i,0) - a_(i,3); - sum += a_(i,4) + a_(i,0); - sum += a_(i,2) - a_(i,1); - sum += a_(i,3) + a_(i,4); + void operator() ( const int & i, value_type & sum ) const { + sum += a_( i, 1 ) + a_( i, 2 ); + sum += a_( i, 0 ) - a_( i, 3 ); + sum += a_( i, 4 ) + a_( i, 0 ); + sum += a_( i, 2 ) - a_( i, 1 ); + sum += a_( i, 3 ) + a_( i, 4 ); } - typedef typename Kokkos::TeamPolicy< execution_space >::member_type team_member ; - KOKKOS_INLINE_FUNCTION - void operator() (const team_member & dev, value_type& sum) const { - const int begin = dev.league_rank() * 4 ; - const int end = begin + 4 ; - for ( int i = begin + dev.team_rank() ; i < end ; i += dev.team_size() ) { - sum += a_(i,1) + a_(i,2); - sum += a_(i,0) - a_(i,3); - sum += a_(i,4) + a_(i,0); - sum += a_(i,2) - a_(i,1); - sum += a_(i,3) + a_(i,4); + void operator() ( const team_member & dev, value_type & sum ) const { + const int begin = dev.league_rank() * 4; + const int end = begin + 4; + for ( int i = begin + dev.team_rank(); i < end; i += dev.team_size() ) { + sum += a_( i, 1 ) + a_( i, 2 ); + sum += a_( i, 0 ) - a_( i, 3 ); + sum += a_( i, 4 ) + a_( i, 0 ); + sum += a_( i, 2 ) - a_( i, 1 ); + sum += a_( i, 3 ) + a_( i, 4 ); } } + KOKKOS_INLINE_FUNCTION - void init(value_type& update) const {update = 0.0;} + void init( value_type & update ) const { update = 0.0; } + KOKKOS_INLINE_FUNCTION - void join(volatile value_type& update, volatile value_type const& input) const {update += input;} + void join( volatile value_type & update, volatile value_type const & input ) const { update += input; } }; -template +template< class DeviceType, bool PWRTest > double ReduceTestFunctor() { + typedef Kokkos::TeamPolicy< DeviceType > policy_type; + typedef Kokkos::View< double**, DeviceType > view_type; + typedef Kokkos::View< double, typename view_type::host_mirror_space, Kokkos::MemoryUnmanaged > unmanaged_result; - typedef Kokkos::TeamPolicy policy_type ; - typedef Kokkos::View view_type ; - typedef Kokkos::View unmanaged_result ; - - view_type a("A",100,5); - typename view_type::HostMirror h_a = Kokkos::create_mirror_view(a); + view_type a( "A", 100, 5 ); + typename view_type::HostMirror h_a = Kokkos::create_mirror_view( a ); - for(int i=0;i<100;i++) { - for(int j=0;j<5;j++) - h_a(i,j) = 0.1*i/(1.1*j+1.0) + 0.5*j; + for ( int i = 0; i < 100; i++ ) { + for ( int j = 0; j < 5; j++ ) { + h_a( i, j ) = 0.1 * i / ( 1.1 * j + 1.0 ) + 0.5 * j; + } } - Kokkos::deep_copy(a,h_a); + Kokkos::deep_copy( a, h_a ); double result = 0.0; - if(PWRTest==false) - Kokkos::parallel_reduce(100,FunctorReduceTest(a), unmanaged_result( & result )); - else - Kokkos::parallel_reduce(policy_type(25,Kokkos::AUTO),FunctorReduceTest(a), unmanaged_result( & result )); + if ( PWRTest == false ) { + Kokkos::parallel_reduce( 100, FunctorReduceTest< DeviceType >( a ), unmanaged_result( & result ) ); + } + else { + Kokkos::parallel_reduce( policy_type( 25, Kokkos::AUTO ), FunctorReduceTest< DeviceType >( a ), unmanaged_result( & result ) ); + } return result; } -#if defined (KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) -template +#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) +template< class DeviceType, bool PWRTest > double ReduceTestLambda() { + typedef Kokkos::TeamPolicy< DeviceType > policy_type; + typedef Kokkos::View< double**, DeviceType > view_type; + typedef Kokkos::View< double, typename view_type::host_mirror_space, Kokkos::MemoryUnmanaged > unmanaged_result; - typedef Kokkos::TeamPolicy policy_type ; - typedef Kokkos::View view_type ; - typedef Kokkos::View unmanaged_result ; - - view_type a("A",100,5); - typename view_type::HostMirror h_a = Kokkos::create_mirror_view(a); + view_type a( "A", 100, 5 ); + typename view_type::HostMirror h_a = Kokkos::create_mirror_view( a ); - for(int i=0;i<100;i++) { - for(int j=0;j<5;j++) - h_a(i,j) = 0.1*i/(1.1*j+1.0) + 0.5*j; + for ( int i = 0; i < 100; i++ ) { + for ( int j = 0; j < 5; j++ ) { + h_a( i, j ) = 0.1 * i / ( 1.1 * j + 1.0 ) + 0.5 * j; + } } - Kokkos::deep_copy(a,h_a); + Kokkos::deep_copy( a, h_a ); double result = 0.0; - if(PWRTest==false) { - Kokkos::parallel_reduce(100,KOKKOS_LAMBDA(const int& i, double& sum) { - sum += a(i,1) + a(i,2); - sum += a(i,0) - a(i,3); - sum += a(i,4) + a(i,0); - sum += a(i,2) - a(i,1); - sum += a(i,3) + a(i,4); + if ( PWRTest == false ) { + Kokkos::parallel_reduce( 100, KOKKOS_LAMBDA( const int & i, double & sum ) { + sum += a( i, 1 ) + a( i, 2 ); + sum += a( i, 0 ) - a( i, 3 ); + sum += a( i, 4 ) + a( i, 0 ); + sum += a( i, 2 ) - a( i, 1 ); + sum += a( i, 3 ) + a( i, 4 ); }, unmanaged_result( & result ) ); - } else { - typedef typename policy_type::member_type team_member ; - Kokkos::parallel_reduce(policy_type(25,Kokkos::AUTO),KOKKOS_LAMBDA(const team_member & dev, double& sum) { - const int begin = dev.league_rank() * 4 ; - const int end = begin + 4 ; - for ( int i = begin + dev.team_rank() ; i < end ; i += dev.team_size() ) { - sum += a(i,1) + a(i,2); - sum += a(i,0) - a(i,3); - sum += a(i,4) + a(i,0); - sum += a(i,2) - a(i,1); - sum += a(i,3) + a(i,4); + } + else { + typedef typename policy_type::member_type team_member; + Kokkos::parallel_reduce( policy_type( 25, Kokkos::AUTO ), KOKKOS_LAMBDA( const team_member & dev, double & sum ) { + const int begin = dev.league_rank() * 4; + const int end = begin + 4; + for ( int i = begin + dev.team_rank(); i < end; i += dev.team_size() ) { + sum += a( i, 1 ) + a( i, 2 ); + sum += a( i, 0 ) - a( i, 3 ); + sum += a( i, 4 ) + a( i, 0 ); + sum += a( i, 2 ) - a( i, 1 ); + sum += a( i, 3 ) + a( i, 4 ); } }, unmanaged_result( & result ) ); } return result; } - #else -template +template< class DeviceType, bool PWRTest > double ReduceTestLambda() { - return ReduceTestFunctor(); + return ReduceTestFunctor< DeviceType, PWRTest >(); } #endif -template -double TestVariantLambda(int test) { - switch (test) { - case 1: return AddTestLambda(); - case 2: return AddTestLambda(); - case 3: return ReduceTestLambda(); - case 4: return ReduceTestLambda(); +template< class DeviceType > +double TestVariantLambda( int test ) { + switch ( test ) { + case 1: return AddTestLambda< DeviceType, false >(); + case 2: return AddTestLambda< DeviceType, true >(); + case 3: return ReduceTestLambda< DeviceType, false >(); + case 4: return ReduceTestLambda< DeviceType, true >(); } + return 0; } - -template -double TestVariantFunctor(int test) { - switch (test) { - case 1: return AddTestFunctor(); - case 2: return AddTestFunctor(); - case 3: return ReduceTestFunctor(); - case 4: return ReduceTestFunctor(); +template< class DeviceType > +double TestVariantFunctor( int test ) { + switch ( test ) { + case 1: return AddTestFunctor< DeviceType, false >(); + case 2: return AddTestFunctor< DeviceType, true >(); + case 3: return ReduceTestFunctor< DeviceType, false >(); + case 4: return ReduceTestFunctor< DeviceType, true >(); } + return 0; } -template -bool Test(int test) { - +template< class DeviceType > +bool Test( int test ) { #ifdef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA - double res_functor = TestVariantFunctor(test); - double res_lambda = TestVariantLambda(test); + double res_functor = TestVariantFunctor< DeviceType >( test ); + double res_lambda = TestVariantLambda< DeviceType >( test ); - char testnames[5][256] = {" " - ,"AddTest","AddTest TeamPolicy" - ,"ReduceTest","ReduceTest TeamPolicy" + char testnames[5][256] = { " " + , "AddTest", "AddTest TeamPolicy" + , "ReduceTest", "ReduceTest TeamPolicy" }; bool passed = true; @@ -322,13 +333,13 @@ bool Test(int test) { std::cout << "CXX11 ( test = '" << testnames[test] << "' FAILED : " << res_functor << " != " << res_lambda - << std::endl ; + << std::endl; } - return passed ; + return passed; #else return true; #endif } -} +} // namespace TestCXX11 diff --git a/lib/kokkos/core/unit_test/TestCXX11Deduction.hpp b/lib/kokkos/core/unit_test/TestCXX11Deduction.hpp index 359e17a44f..b53b42b8e0 100644 --- a/lib/kokkos/core/unit_test/TestCXX11Deduction.hpp +++ b/lib/kokkos/core/unit_test/TestCXX11Deduction.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,10 +36,11 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ + #include #ifndef TESTCXX11DEDUCTION_HPP @@ -52,43 +53,40 @@ struct TestReductionDeductionTagB {}; template < class ExecSpace > struct TestReductionDeductionFunctor { - // KOKKOS_INLINE_FUNCTION - // void operator()( long i , long & value ) const - // { value += i + 1 ; } + // void operator()( long i, long & value ) const + // { value += i + 1; } KOKKOS_INLINE_FUNCTION - void operator()( TestReductionDeductionTagA , long i , long & value ) const + void operator()( TestReductionDeductionTagA, long i, long & value ) const { value += ( 2 * i + 1 ) + ( 2 * i + 2 ); } KOKKOS_INLINE_FUNCTION - void operator()( const TestReductionDeductionTagB & , const long i , long & value ) const - { value += ( 3 * i + 1 ) + ( 3 * i + 2 ) + ( 3 * i + 3 ) ; } - + void operator()( const TestReductionDeductionTagB &, const long i, long & value ) const + { value += ( 3 * i + 1 ) + ( 3 * i + 2 ) + ( 3 * i + 3 ); } }; template< class ExecSpace > void test_reduction_deduction() { - typedef TestReductionDeductionFunctor< ExecSpace > Functor ; + typedef TestReductionDeductionFunctor< ExecSpace > Functor; - const long N = 50 ; - // const long answer = N % 2 ? ( N * ((N+1)/2 )) : ( (N/2) * (N+1) ); - const long answerA = N % 2 ? ( (2*N) * (((2*N)+1)/2 )) : ( ((2*N)/2) * ((2*N)+1) ); - const long answerB = N % 2 ? ( (3*N) * (((3*N)+1)/2 )) : ( ((3*N)/2) * ((3*N)+1) ); - long result = 0 ; + const long N = 50; + // const long answer = N % 2 ? ( N * ( ( N + 1 ) / 2 ) ) : ( ( N / 2 ) * ( N + 1 ) ); + const long answerA = N % 2 ? ( ( 2 * N ) * ( ( ( 2 * N ) + 1 ) / 2 ) ) : ( ( ( 2 * N ) / 2 ) * ( ( 2 * N ) + 1 ) ); + const long answerB = N % 2 ? ( ( 3 * N ) * ( ( ( 3 * N ) + 1 ) / 2 ) ) : ( ( ( 3 * N ) / 2 ) * ( ( 3 * N ) + 1 ) ); + long result = 0; - // Kokkos::parallel_reduce( Kokkos::RangePolicy(0,N) , Functor() , result ); - // ASSERT_EQ( answer , result ); - - Kokkos::parallel_reduce( Kokkos::RangePolicy(0,N) , Functor() , result ); - ASSERT_EQ( answerA , result ); - - Kokkos::parallel_reduce( Kokkos::RangePolicy(0,N) , Functor() , result ); - ASSERT_EQ( answerB , result ); -} + // Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), Functor(), result ); + // ASSERT_EQ( answer, result ); + + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace, TestReductionDeductionTagA >( 0, N ), Functor(), result ); + ASSERT_EQ( answerA, result ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace, TestReductionDeductionTagB >( 0, N ), Functor(), result ); + ASSERT_EQ( answerB, result ); } -#endif +} // namespace TestCXX11 +#endif diff --git a/lib/kokkos/core/unit_test/TestCompilerMacros.hpp b/lib/kokkos/core/unit_test/TestCompilerMacros.hpp index 5add656a4d..4555438344 100644 --- a/lib/kokkos/core/unit_test/TestCompilerMacros.hpp +++ b/lib/kokkos/core/unit_test/TestCompilerMacros.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -47,17 +47,17 @@ namespace TestCompilerMacros { -template +template< class DEVICE_TYPE > struct AddFunctor { typedef DEVICE_TYPE execution_space; - typedef typename Kokkos::View type; - type a,b; + typedef typename Kokkos::View< int**, execution_space > type; + type a, b; int length; - AddFunctor(type a_, type b_):a(a_),b(b_),length(a.dimension_1()) {} + AddFunctor( type a_, type b_ ) : a( a_ ), b( b_ ), length( a.dimension_1() ) {} KOKKOS_INLINE_FUNCTION - void operator()(int i) const { + void operator()( int i ) const { #ifdef KOKKOS_ENABLE_PRAGMA_UNROLL #pragma unroll #endif @@ -75,21 +75,23 @@ struct AddFunctor { #pragma simd #endif #endif - for(int j=0;j +template< class DeviceType > bool Test() { - typedef typename Kokkos::View type; - type a("A",1024,128); - type b("B",1024,128); + typedef typename Kokkos::View< int**, DeviceType > type; + type a( "A", 1024, 128 ); + type b( "B", 1024, 128 ); - AddFunctor f(a,b); - Kokkos::parallel_for(1024,f); + AddFunctor< DeviceType > f( a, b ); + Kokkos::parallel_for( 1024, f ); DeviceType::fence(); + return true; } -} +} // namespace TestCompilerMacros diff --git a/lib/kokkos/core/unit_test/TestDefaultDeviceType.cpp b/lib/kokkos/core/unit_test/TestDefaultDeviceType.cpp index 7e08f67e69..f85a35c096 100644 --- a/lib/kokkos/core/unit_test/TestDefaultDeviceType.cpp +++ b/lib/kokkos/core/unit_test/TestDefaultDeviceType.cpp @@ -45,13 +45,10 @@ #include -#if !defined(KOKKOS_ENABLE_CUDA) || defined(__CUDACC__) -//---------------------------------------------------------------------------- +#if !defined( KOKKOS_ENABLE_CUDA ) || defined( __CUDACC__ ) #include - #include - #include #include #include @@ -78,24 +75,25 @@ protected: TEST_F( defaultdevicetype, host_space_access ) { - typedef Kokkos::HostSpace::execution_space host_exec_space ; - typedef Kokkos::Device< host_exec_space , Kokkos::HostSpace > device_space ; - typedef Kokkos::Impl::HostMirror< Kokkos::DefaultExecutionSpace >::Space mirror_space ; + typedef Kokkos::HostSpace::execution_space host_exec_space; + typedef Kokkos::Device< host_exec_space, Kokkos::HostSpace > device_space; + typedef Kokkos::Impl::HostMirror< Kokkos::DefaultExecutionSpace >::Space mirror_space; static_assert( - Kokkos::Impl::SpaceAccessibility< host_exec_space , Kokkos::HostSpace >::accessible , "" ); + Kokkos::Impl::SpaceAccessibility< host_exec_space, Kokkos::HostSpace >::accessible, "" ); static_assert( - Kokkos::Impl::SpaceAccessibility< device_space , Kokkos::HostSpace >::accessible , "" ); + Kokkos::Impl::SpaceAccessibility< device_space, Kokkos::HostSpace >::accessible, "" ); static_assert( - Kokkos::Impl::SpaceAccessibility< mirror_space , Kokkos::HostSpace >::accessible , "" ); + Kokkos::Impl::SpaceAccessibility< mirror_space, Kokkos::HostSpace >::accessible, "" ); } -TEST_F( defaultdevicetype, view_api) { - TestViewAPI< double , Kokkos::DefaultExecutionSpace >(); +TEST_F( defaultdevicetype, view_api ) +{ + TestViewAPI< double, Kokkos::DefaultExecutionSpace >(); } -} // namespace test +} // namespace Test #endif diff --git a/lib/kokkos/core/unit_test/TestDefaultDeviceTypeInit.hpp b/lib/kokkos/core/unit_test/TestDefaultDeviceTypeInit.hpp index 7778efde30..401da58a58 100644 --- a/lib/kokkos/core/unit_test/TestDefaultDeviceTypeInit.hpp +++ b/lib/kokkos/core/unit_test/TestDefaultDeviceTypeInit.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -44,376 +44,425 @@ #include #include + #ifdef KOKKOS_ENABLE_OPENMP #include #endif -#if !defined(KOKKOS_ENABLE_CUDA) || defined(__CUDACC__) -//---------------------------------------------------------------------------- +#if !defined( KOKKOS_ENABLE_CUDA ) || defined( __CUDACC__ ) namespace Test { namespace Impl { - char** init_kokkos_args(bool do_threads,bool do_numa,bool do_device,bool do_other, int& nargs, Kokkos::InitArguments& init_args) { - nargs = (do_threads?1:0) + - (do_numa?1:0) + - (do_device?1:0) + - (do_other?4:0); - char** args_kokkos = new char*[nargs]; - for(int i = 0; i < nargs; i++) - args_kokkos[i] = new char[20]; +char** init_kokkos_args( bool do_threads, bool do_numa, bool do_device, bool do_other, int & nargs, Kokkos::InitArguments & init_args ) { + nargs = ( do_threads ? 1 : 0 ) + + ( do_numa ? 1 : 0 ) + + ( do_device ? 1 : 0 ) + + ( do_other ? 4 : 0 ); - int threads_idx = do_other?1:0; - int numa_idx = (do_other?3:0) + (do_threads?1:0); - int device_idx = (do_other?3:0) + (do_threads?1:0) + (do_numa?1:0); + char** args_kokkos = new char*[nargs]; + for ( int i = 0; i < nargs; i++ ) { + args_kokkos[i] = new char[20]; + } + int threads_idx = do_other ? 1 : 0; + int numa_idx = ( do_other ? 3 : 0 ) + ( do_threads ? 1 : 0 ); + int device_idx = ( do_other ? 3 : 0 ) + ( do_threads ? 1 : 0 ) + ( do_numa ? 1 : 0 ); - if(do_threads) { - int nthreads = 3; + if ( do_threads ) { + int nthreads = 3; #ifdef KOKKOS_ENABLE_OPENMP - if(omp_get_max_threads() < 3) - nthreads = omp_get_max_threads(); + if ( omp_get_max_threads() < 3 ) + nthreads = omp_get_max_threads(); #endif - if(Kokkos::hwloc::available()) { - if(Kokkos::hwloc::get_available_threads_per_core()<3) - nthreads = Kokkos::hwloc::get_available_threads_per_core() - * Kokkos::hwloc::get_available_numa_count(); - } - -#ifdef KOKKOS_ENABLE_SERIAL - if(std::is_same::value || - std::is_same::value ) { - nthreads = 1; - } -#endif - init_args.num_threads = nthreads; - sprintf(args_kokkos[threads_idx],"--threads=%i",nthreads); + if ( Kokkos::hwloc::available() ) { + if ( Kokkos::hwloc::get_available_threads_per_core() < 3 ) + nthreads = Kokkos::hwloc::get_available_threads_per_core() + * Kokkos::hwloc::get_available_numa_count(); } - if(do_numa) { - int numa = 1; - if(Kokkos::hwloc::available()) - numa = Kokkos::hwloc::get_available_numa_count(); #ifdef KOKKOS_ENABLE_SERIAL - if(std::is_same::value || - std::is_same::value ) { - numa = 1; - } -#endif - - init_args.num_numa = numa; - sprintf(args_kokkos[numa_idx],"--numa=%i",numa); + if ( std::is_same< Kokkos::Serial, Kokkos::DefaultExecutionSpace >::value || + std::is_same< Kokkos::Serial, Kokkos::DefaultHostExecutionSpace >::value ) { + nthreads = 1; } +#endif - if(do_device) { + init_args.num_threads = nthreads; + sprintf( args_kokkos[threads_idx], "--threads=%i", nthreads ); + } - init_args.device_id = 0; - sprintf(args_kokkos[device_idx],"--device=%i",0); + if ( do_numa ) { + int numa = 1; + if ( Kokkos::hwloc::available() ) { + numa = Kokkos::hwloc::get_available_numa_count(); } - if(do_other) { - sprintf(args_kokkos[0],"--dummyarg=1"); - sprintf(args_kokkos[threads_idx+(do_threads?1:0)],"--dummy2arg"); - sprintf(args_kokkos[threads_idx+(do_threads?1:0)+1],"dummy3arg"); - sprintf(args_kokkos[device_idx+(do_device?1:0)],"dummy4arg=1"); +#ifdef KOKKOS_ENABLE_SERIAL + if ( std::is_same< Kokkos::Serial, Kokkos::DefaultExecutionSpace >::value || + std::is_same< Kokkos::Serial, Kokkos::DefaultHostExecutionSpace >::value ) { + numa = 1; } +#endif + init_args.num_numa = numa; + sprintf( args_kokkos[numa_idx], "--numa=%i", numa ); + } - return args_kokkos; + if ( do_device ) { + init_args.device_id = 0; + sprintf( args_kokkos[device_idx], "--device=%i", 0 ); } - Kokkos::InitArguments init_initstruct(bool do_threads, bool do_numa, bool do_device) { - Kokkos::InitArguments args; + if ( do_other ) { + sprintf( args_kokkos[0], "--dummyarg=1" ); + sprintf( args_kokkos[ threads_idx + ( do_threads ? 1 : 0 ) ], "--dummy2arg" ); + sprintf( args_kokkos[ threads_idx + ( do_threads ? 1 : 0 ) + 1 ], "dummy3arg" ); + sprintf( args_kokkos[ device_idx + ( do_device ? 1 : 0 ) ], "dummy4arg=1" ); + } + + return args_kokkos; +} + +Kokkos::InitArguments init_initstruct( bool do_threads, bool do_numa, bool do_device ) { + Kokkos::InitArguments args; - if(do_threads) { - int nthreads = 3; + if ( do_threads ) { + int nthreads = 3; #ifdef KOKKOS_ENABLE_OPENMP - if(omp_get_max_threads() < 3) - nthreads = omp_get_max_threads(); + if ( omp_get_max_threads() < 3 ) { + nthreads = omp_get_max_threads(); + } #endif - if(Kokkos::hwloc::available()) { - if(Kokkos::hwloc::get_available_threads_per_core()<3) - nthreads = Kokkos::hwloc::get_available_threads_per_core() - * Kokkos::hwloc::get_available_numa_count(); + if ( Kokkos::hwloc::available() ) { + if ( Kokkos::hwloc::get_available_threads_per_core() < 3 ) { + nthreads = Kokkos::hwloc::get_available_threads_per_core() + * Kokkos::hwloc::get_available_numa_count(); } + } + #ifdef KOKKOS_ENABLE_SERIAL - if(std::is_same::value || - std::is_same::value ) { - nthreads = 1; - } + if ( std::is_same< Kokkos::Serial, Kokkos::DefaultExecutionSpace >::value || + std::is_same< Kokkos::Serial, Kokkos::DefaultHostExecutionSpace >::value ) { + nthreads = 1; + } #endif - args.num_threads = nthreads; + args.num_threads = nthreads; + } + + if ( do_numa ) { + int numa = 1; + if ( Kokkos::hwloc::available() ) { + numa = Kokkos::hwloc::get_available_numa_count(); } - if(do_numa) { - int numa = 1; - if(Kokkos::hwloc::available()) - numa = Kokkos::hwloc::get_available_numa_count(); #ifdef KOKKOS_ENABLE_SERIAL - if(std::is_same::value || - std::is_same::value ) { - numa = 1; - } -#endif - args.num_numa = numa; + if ( std::is_same< Kokkos::Serial, Kokkos::DefaultExecutionSpace >::value || + std::is_same< Kokkos::Serial, Kokkos::DefaultHostExecutionSpace >::value ) { + numa = 1; } +#endif - if(do_device) { - args.device_id = 0; - } + args.num_numa = numa; + } - return args; + if ( do_device ) { + args.device_id = 0; } - void check_correct_initialization(const Kokkos::InitArguments& argstruct) { - ASSERT_EQ( Kokkos::DefaultExecutionSpace::is_initialized(), 1); - ASSERT_EQ( Kokkos::HostSpace::execution_space::is_initialized(), 1); - - //Figure out the number of threads the HostSpace ExecutionSpace should have initialized to - int expected_nthreads = argstruct.num_threads; - if(expected_nthreads<1) { - if(Kokkos::hwloc::available()) { - expected_nthreads = Kokkos::hwloc::get_available_numa_count() - * Kokkos::hwloc::get_available_cores_per_numa() - * Kokkos::hwloc::get_available_threads_per_core(); - } else { - #ifdef KOKKOS_ENABLE_OPENMP - if(std::is_same::value) { - expected_nthreads = omp_get_max_threads(); - } else - #endif - expected_nthreads = 1; + return args; +} + +void check_correct_initialization( const Kokkos::InitArguments & argstruct ) { + ASSERT_EQ( Kokkos::DefaultExecutionSpace::is_initialized(), 1 ); + ASSERT_EQ( Kokkos::HostSpace::execution_space::is_initialized(), 1 ); + + // Figure out the number of threads the HostSpace ExecutionSpace should have initialized to. + int expected_nthreads = argstruct.num_threads; + if ( expected_nthreads < 1 ) { + if ( Kokkos::hwloc::available() ) { + expected_nthreads = Kokkos::hwloc::get_available_numa_count() + * Kokkos::hwloc::get_available_cores_per_numa() + * Kokkos::hwloc::get_available_threads_per_core(); + } + else { +#ifdef KOKKOS_ENABLE_OPENMP + if ( std::is_same< Kokkos::HostSpace::execution_space, Kokkos::OpenMP >::value ) { + expected_nthreads = omp_get_max_threads(); } - #ifdef KOKKOS_ENABLE_SERIAL - if(std::is_same::value || - std::is_same::value ) + else +#endif expected_nthreads = 1; - #endif } - int expected_numa = argstruct.num_numa; - if(expected_numa<1) { - if(Kokkos::hwloc::available()) { - expected_numa = Kokkos::hwloc::get_available_numa_count(); - } else { - expected_numa = 1; - } - #ifdef KOKKOS_ENABLE_SERIAL - if(std::is_same::value || - std::is_same::value ) - expected_numa = 1; - #endif +#ifdef KOKKOS_ENABLE_SERIAL + if ( std::is_same< Kokkos::DefaultExecutionSpace, Kokkos::Serial >::value || + std::is_same< Kokkos::DefaultHostExecutionSpace, Kokkos::Serial >::value ) { + expected_nthreads = 1; } - ASSERT_EQ(Kokkos::HostSpace::execution_space::thread_pool_size(),expected_nthreads); +#endif + } -#ifdef KOKKOS_ENABLE_CUDA - if(std::is_same::value) { - int device; - cudaGetDevice( &device ); - int expected_device = argstruct.device_id; - if(argstruct.device_id<0) { - expected_device = 0; - } - ASSERT_EQ(expected_device,device); + int expected_numa = argstruct.num_numa; + + if ( expected_numa < 1 ) { + if ( Kokkos::hwloc::available() ) { + expected_numa = Kokkos::hwloc::get_available_numa_count(); + } + else { + expected_numa = 1; } + +#ifdef KOKKOS_ENABLE_SERIAL + if ( std::is_same< Kokkos::DefaultExecutionSpace, Kokkos::Serial >::value || + std::is_same< Kokkos::DefaultHostExecutionSpace, Kokkos::Serial >::value ) + expected_numa = 1; #endif } - //ToDo: Add check whether correct number of threads are actually started - void test_no_arguments() { - Kokkos::initialize(); - check_correct_initialization(Kokkos::InitArguments()); - Kokkos::finalize(); - } + ASSERT_EQ( Kokkos::HostSpace::execution_space::thread_pool_size(), expected_nthreads ); - void test_commandline_args(int nargs, char** args, const Kokkos::InitArguments& argstruct) { - Kokkos::initialize(nargs,args); - check_correct_initialization(argstruct); - Kokkos::finalize(); - } - void test_initstruct_args(const Kokkos::InitArguments& args) { - Kokkos::initialize(args); - check_correct_initialization(args); - Kokkos::finalize(); +#ifdef KOKKOS_ENABLE_CUDA + if ( std::is_same< Kokkos::DefaultExecutionSpace, Kokkos::Cuda >::value ) { + int device; + cudaGetDevice( &device ); + + int expected_device = argstruct.device_id; + if ( argstruct.device_id < 0 ) { + expected_device = 0; + } + + ASSERT_EQ( expected_device, device ); } +#endif +} + +// TODO: Add check whether correct number of threads are actually started. +void test_no_arguments() { + Kokkos::initialize(); + check_correct_initialization( Kokkos::InitArguments() ); + Kokkos::finalize(); } +void test_commandline_args( int nargs, char** args, const Kokkos::InitArguments & argstruct ) { + Kokkos::initialize( nargs, args ); + check_correct_initialization( argstruct ); + Kokkos::finalize(); +} + +void test_initstruct_args( const Kokkos::InitArguments & args ) { + Kokkos::initialize( args ); + check_correct_initialization( args ); + Kokkos::finalize(); +} + +} // namespace Impl + class defaultdevicetypeinit : public ::testing::Test { protected: - static void SetUpTestCase() - { - } + static void SetUpTestCase() {} - static void TearDownTestCase() - { - } + static void TearDownTestCase() {} }; #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_01 -TEST_F( defaultdevicetypeinit, no_args) { +TEST_F( defaultdevicetypeinit, no_args ) +{ Impl::test_no_arguments(); } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_02 -TEST_F( defaultdevicetypeinit, commandline_args_empty) { +TEST_F( defaultdevicetypeinit, commandline_args_empty ) +{ Kokkos::InitArguments argstruct; int nargs = 0; - char** args = Impl::init_kokkos_args(false,false,false,false,nargs, argstruct); - Impl::test_commandline_args(nargs,args,argstruct); - for(int i = 0; i < nargs; i++) + char** args = Impl::init_kokkos_args( false, false, false, false, nargs, argstruct ); + Impl::test_commandline_args( nargs, args, argstruct ); + + for ( int i = 0; i < nargs; i++ ) { delete [] args[i]; + } delete [] args; } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_03 -TEST_F( defaultdevicetypeinit, commandline_args_other) { +TEST_F( defaultdevicetypeinit, commandline_args_other ) +{ Kokkos::InitArguments argstruct; int nargs = 0; - char** args = Impl::init_kokkos_args(false,false,false,true,nargs, argstruct); - Impl::test_commandline_args(nargs,args,argstruct); - for(int i = 0; i < nargs; i++) + char** args = Impl::init_kokkos_args( false, false, false, true, nargs, argstruct ); + Impl::test_commandline_args( nargs, args, argstruct ); + + for ( int i = 0; i < nargs; i++ ) { delete [] args[i]; + } delete [] args; } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_04 -TEST_F( defaultdevicetypeinit, commandline_args_nthreads) { +TEST_F( defaultdevicetypeinit, commandline_args_nthreads ) +{ Kokkos::InitArguments argstruct; int nargs = 0; - char** args = Impl::init_kokkos_args(true,false,false,false,nargs, argstruct); - Impl::test_commandline_args(nargs,args,argstruct); - for(int i = 0; i < nargs; i++) + char** args = Impl::init_kokkos_args( true, false, false, false, nargs, argstruct ); + Impl::test_commandline_args( nargs, args, argstruct ); + + for ( int i = 0; i < nargs; i++ ) { delete [] args[i]; + } delete [] args; } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_05 -TEST_F( defaultdevicetypeinit, commandline_args_nthreads_numa) { +TEST_F( defaultdevicetypeinit, commandline_args_nthreads_numa ) +{ Kokkos::InitArguments argstruct; int nargs = 0; - char** args = Impl::init_kokkos_args(true,true,false,false,nargs, argstruct); - Impl::test_commandline_args(nargs,args,argstruct); - for(int i = 0; i < nargs; i++) + char** args = Impl::init_kokkos_args( true, true, false, false, nargs, argstruct ); + Impl::test_commandline_args( nargs, args, argstruct ); + + for ( int i = 0; i < nargs; i++ ) { delete [] args[i]; + } delete [] args; } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_06 -TEST_F( defaultdevicetypeinit, commandline_args_nthreads_numa_device) { +TEST_F( defaultdevicetypeinit, commandline_args_nthreads_numa_device ) +{ Kokkos::InitArguments argstruct; int nargs = 0; - char** args = Impl::init_kokkos_args(true,true,true,false,nargs, argstruct); - Impl::test_commandline_args(nargs,args,argstruct); - for(int i = 0; i < nargs; i++) + char** args = Impl::init_kokkos_args( true, true, true, false, nargs, argstruct ); + Impl::test_commandline_args( nargs, args, argstruct ); + + for ( int i = 0; i < nargs; i++ ) { delete [] args[i]; + } delete [] args; } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_07 -TEST_F( defaultdevicetypeinit, commandline_args_nthreads_device) { +TEST_F( defaultdevicetypeinit, commandline_args_nthreads_device ) +{ Kokkos::InitArguments argstruct; int nargs = 0; - char** args = Impl::init_kokkos_args(true,false,true,false,nargs, argstruct); - Impl::test_commandline_args(nargs,args,argstruct); - for(int i = 0; i < nargs; i++) + char** args = Impl::init_kokkos_args( true, false, true, false, nargs, argstruct ); + Impl::test_commandline_args( nargs, args, argstruct ); + + for ( int i = 0; i < nargs; i++ ) { delete [] args[i]; + } delete [] args; } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_08 -TEST_F( defaultdevicetypeinit, commandline_args_numa_device) { +TEST_F( defaultdevicetypeinit, commandline_args_numa_device ) +{ Kokkos::InitArguments argstruct; int nargs = 0; - char** args = Impl::init_kokkos_args(false,true,true,false,nargs, argstruct); - Impl::test_commandline_args(nargs,args,argstruct); - for(int i = 0; i < nargs; i++) + char** args = Impl::init_kokkos_args( false, true, true, false, nargs, argstruct ); + Impl::test_commandline_args( nargs, args, argstruct ); + + for ( int i = 0; i < nargs; i++ ) { delete [] args[i]; + } delete [] args; } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_09 -TEST_F( defaultdevicetypeinit, commandline_args_device) { +TEST_F( defaultdevicetypeinit, commandline_args_device ) +{ Kokkos::InitArguments argstruct; int nargs = 0; - char** args = Impl::init_kokkos_args(false,false,true,false,nargs, argstruct); - Impl::test_commandline_args(nargs,args,argstruct); - for(int i = 0; i < nargs; i++) + char** args = Impl::init_kokkos_args( false, false, true, false, nargs, argstruct ); + Impl::test_commandline_args( nargs, args, argstruct ); + + for ( int i = 0; i < nargs; i++ ) { delete [] args[i]; + } delete [] args; } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_10 -TEST_F( defaultdevicetypeinit, commandline_args_nthreads_numa_device_other) { +TEST_F( defaultdevicetypeinit, commandline_args_nthreads_numa_device_other ) +{ Kokkos::InitArguments argstruct; int nargs = 0; - char** args = Impl::init_kokkos_args(true,true,true,true,nargs, argstruct); - Impl::test_commandline_args(nargs,args,argstruct); - for(int i = 0; i < nargs; i++) + char** args = Impl::init_kokkos_args( true, true, true, true, nargs, argstruct ); + Impl::test_commandline_args( nargs, args, argstruct ); + + for ( int i = 0; i < nargs; i++ ) { delete [] args[i]; + } delete [] args; } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_11 -TEST_F( defaultdevicetypeinit, initstruct_default) { +TEST_F( defaultdevicetypeinit, initstruct_default ) +{ Kokkos::InitArguments args; - Impl::test_initstruct_args(args); + Impl::test_initstruct_args( args ); } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_12 -TEST_F( defaultdevicetypeinit, initstruct_nthreads) { - Kokkos::InitArguments args = Impl::init_initstruct(true,false,false); - Impl::test_initstruct_args(args); +TEST_F( defaultdevicetypeinit, initstruct_nthreads ) +{ + Kokkos::InitArguments args = Impl::init_initstruct( true, false, false ); + Impl::test_initstruct_args( args ); } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_13 -TEST_F( defaultdevicetypeinit, initstruct_nthreads_numa) { - Kokkos::InitArguments args = Impl::init_initstruct(true,true,false); - Impl::test_initstruct_args(args); +TEST_F( defaultdevicetypeinit, initstruct_nthreads_numa ) +{ + Kokkos::InitArguments args = Impl::init_initstruct( true, true, false ); + Impl::test_initstruct_args( args ); } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_14 -TEST_F( defaultdevicetypeinit, initstruct_device) { - Kokkos::InitArguments args = Impl::init_initstruct(false,false,true); - Impl::test_initstruct_args(args); +TEST_F( defaultdevicetypeinit, initstruct_device ) +{ + Kokkos::InitArguments args = Impl::init_initstruct( false, false, true ); + Impl::test_initstruct_args( args ); } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_15 -TEST_F( defaultdevicetypeinit, initstruct_nthreads_device) { - Kokkos::InitArguments args = Impl::init_initstruct(true,false,true); - Impl::test_initstruct_args(args); +TEST_F( defaultdevicetypeinit, initstruct_nthreads_device ) +{ + Kokkos::InitArguments args = Impl::init_initstruct( true, false, true ); + Impl::test_initstruct_args( args ); } #endif #ifdef KOKKOS_DEFAULTDEVICETYPE_INIT_TEST_16 -TEST_F( defaultdevicetypeinit, initstruct_nthreads_numa_device) { - Kokkos::InitArguments args = Impl::init_initstruct(true,true,true); - Impl::test_initstruct_args(args); +TEST_F( defaultdevicetypeinit, initstruct_nthreads_numa_device ) +{ + Kokkos::InitArguments args = Impl::init_initstruct( true, true, true ); + Impl::test_initstruct_args( args ); } #endif - -} // namespace test +} // namespace Test #endif diff --git a/lib/kokkos/core/unit_test/TestDefaultDeviceType_a.cpp b/lib/kokkos/core/unit_test/TestDefaultDeviceType_a.cpp index dd148a0624..4fdfa95910 100644 --- a/lib/kokkos/core/unit_test/TestDefaultDeviceType_a.cpp +++ b/lib/kokkos/core/unit_test/TestDefaultDeviceType_a.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -45,12 +45,10 @@ #include -#if !defined(KOKKOS_ENABLE_CUDA) || defined(__CUDACC__) -//---------------------------------------------------------------------------- +#if !defined( KOKKOS_ENABLE_CUDA ) || defined( __CUDACC__ ) #include - namespace Test { class defaultdevicetype : public ::testing::Test { @@ -66,11 +64,11 @@ protected: } }; - -TEST_F( defaultdevicetype, reduce_instantiation_a) { +TEST_F( defaultdevicetype, reduce_instantiation_a ) +{ TestReduceCombinatoricalInstantiation<>::execute_a(); } -} // namespace test +} // namespace Test #endif diff --git a/lib/kokkos/core/unit_test/TestDefaultDeviceType_b.cpp b/lib/kokkos/core/unit_test/TestDefaultDeviceType_b.cpp index c8edfdd5c3..841f34e03d 100644 --- a/lib/kokkos/core/unit_test/TestDefaultDeviceType_b.cpp +++ b/lib/kokkos/core/unit_test/TestDefaultDeviceType_b.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -45,12 +45,10 @@ #include -#if !defined(KOKKOS_ENABLE_CUDA) || defined(__CUDACC__) -//---------------------------------------------------------------------------- +#if !defined( KOKKOS_ENABLE_CUDA ) || defined( __CUDACC__ ) #include - namespace Test { class defaultdevicetype : public ::testing::Test { @@ -66,11 +64,11 @@ protected: } }; - -TEST_F( defaultdevicetype, reduce_instantiation_b) { +TEST_F( defaultdevicetype, reduce_instantiation_b ) +{ TestReduceCombinatoricalInstantiation<>::execute_b(); } -} // namespace test +} // namespace Test #endif diff --git a/lib/kokkos/core/unit_test/TestDefaultDeviceType_c.cpp b/lib/kokkos/core/unit_test/TestDefaultDeviceType_c.cpp index 405d49a9b8..602863be38 100644 --- a/lib/kokkos/core/unit_test/TestDefaultDeviceType_c.cpp +++ b/lib/kokkos/core/unit_test/TestDefaultDeviceType_c.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -45,12 +45,10 @@ #include -#if !defined(KOKKOS_ENABLE_CUDA) || defined(__CUDACC__) -//---------------------------------------------------------------------------- +#if !defined( KOKKOS_ENABLE_CUDA ) || defined( __CUDACC__ ) #include - namespace Test { class defaultdevicetype : public ::testing::Test { @@ -66,11 +64,11 @@ protected: } }; - -TEST_F( defaultdevicetype, reduce_instantiation_c) { +TEST_F( defaultdevicetype, reduce_instantiation_c ) +{ TestReduceCombinatoricalInstantiation<>::execute_c(); } -} // namespace test +} // namespace Test #endif diff --git a/lib/kokkos/core/unit_test/TestDefaultDeviceType_d.cpp b/lib/kokkos/core/unit_test/TestDefaultDeviceType_d.cpp index 426cc4f06c..5d3665b905 100644 --- a/lib/kokkos/core/unit_test/TestDefaultDeviceType_d.cpp +++ b/lib/kokkos/core/unit_test/TestDefaultDeviceType_d.cpp @@ -45,13 +45,10 @@ #include -#if !defined(KOKKOS_ENABLE_CUDA) || defined(__CUDACC__) -//---------------------------------------------------------------------------- +#if !defined( KOKKOS_ENABLE_CUDA ) || defined( __CUDACC__ ) #include - #include - #include #include #include @@ -76,162 +73,165 @@ protected: } }; -TEST_F( defaultdevicetype, test_utilities) { +TEST_F( defaultdevicetype, test_utilities ) +{ test_utilities(); } -TEST_F( defaultdevicetype, long_reduce) { - TestReduce< long , Kokkos::DefaultExecutionSpace >( 100000 ); +TEST_F( defaultdevicetype, long_reduce ) +{ + TestReduce< long, Kokkos::DefaultExecutionSpace >( 100000 ); } -TEST_F( defaultdevicetype, double_reduce) { - TestReduce< double , Kokkos::DefaultExecutionSpace >( 100000 ); +TEST_F( defaultdevicetype, double_reduce ) +{ + TestReduce< double, Kokkos::DefaultExecutionSpace >( 100000 ); } -TEST_F( defaultdevicetype, long_reduce_dynamic ) { - TestReduceDynamic< long , Kokkos::DefaultExecutionSpace >( 100000 ); +TEST_F( defaultdevicetype, long_reduce_dynamic ) +{ + TestReduceDynamic< long, Kokkos::DefaultExecutionSpace >( 100000 ); } -TEST_F( defaultdevicetype, double_reduce_dynamic ) { - TestReduceDynamic< double , Kokkos::DefaultExecutionSpace >( 100000 ); +TEST_F( defaultdevicetype, double_reduce_dynamic ) +{ + TestReduceDynamic< double, Kokkos::DefaultExecutionSpace >( 100000 ); } -TEST_F( defaultdevicetype, long_reduce_dynamic_view ) { - TestReduceDynamicView< long , Kokkos::DefaultExecutionSpace >( 100000 ); +TEST_F( defaultdevicetype, long_reduce_dynamic_view ) +{ + TestReduceDynamicView< long, Kokkos::DefaultExecutionSpace >( 100000 ); } - -TEST_F( defaultdevicetype , atomics ) +TEST_F( defaultdevicetype, atomics ) { - const int loop_count = 1e4 ; + const int loop_count = 1e4; - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::DefaultExecutionSpace >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::DefaultExecutionSpace >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::DefaultExecutionSpace >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::DefaultExecutionSpace >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::DefaultExecutionSpace >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::DefaultExecutionSpace >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::DefaultExecutionSpace >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::DefaultExecutionSpace >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::DefaultExecutionSpace >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::DefaultExecutionSpace >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::DefaultExecutionSpace >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::DefaultExecutionSpace >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::DefaultExecutionSpace >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::DefaultExecutionSpace >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::DefaultExecutionSpace >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::DefaultExecutionSpace >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::DefaultExecutionSpace >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::DefaultExecutionSpace >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::DefaultExecutionSpace >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::DefaultExecutionSpace >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::DefaultExecutionSpace >( 100, 3 ) ) ); } -/*TEST_F( defaultdevicetype , view_remap ) +/*TEST_F( defaultdevicetype, view_remap ) { - enum { N0 = 3 , N1 = 2 , N2 = 8 , N3 = 9 }; - - typedef Kokkos::View< double*[N1][N2][N3] , - Kokkos::LayoutRight , - Kokkos::DefaultExecutionSpace > output_type ; - - typedef Kokkos::View< int**[N2][N3] , - Kokkos::LayoutLeft , - Kokkos::DefaultExecutionSpace > input_type ; - - typedef Kokkos::View< int*[N0][N2][N3] , - Kokkos::LayoutLeft , - Kokkos::DefaultExecutionSpace > diff_type ; - - output_type output( "output" , N0 ); - input_type input ( "input" , N0 , N1 ); - diff_type diff ( "diff" , N0 ); - - int value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - input(i0,i1,i2,i3) = ++value ; - }}}} - - // Kokkos::deep_copy( diff , input ); // throw with incompatible shape - Kokkos::deep_copy( output , input ); - - value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - ++value ; - ASSERT_EQ( value , ((int) output(i0,i1,i2,i3) ) ); - }}}} -}*/ - -//---------------------------------------------------------------------------- + enum { N0 = 3, N1 = 2, N2 = 8, N3 = 9 }; + + typedef Kokkos::View< double*[N1][N2][N3], + Kokkos::LayoutRight, + Kokkos::DefaultExecutionSpace > output_type; + + typedef Kokkos::View< int**[N2][N3], + Kokkos::LayoutLeft, + Kokkos::DefaultExecutionSpace > input_type; + + typedef Kokkos::View< int*[N0][N2][N3], + Kokkos::LayoutLeft, + Kokkos::DefaultExecutionSpace > diff_type; + + output_type output( "output", N0 ); + input_type input ( "input", N0, N1 ); + diff_type diff ( "diff", N0 ); + + int value = 0; + for ( size_t i3 = 0; i3 < N3; ++i3 ) { + for ( size_t i2 = 0; i2 < N2; ++i2 ) { + for ( size_t i1 = 0; i1 < N1; ++i1 ) { + for ( size_t i0 = 0; i0 < N0; ++i0 ) { + input( i0, i1, i2, i3 ) = ++value; + } + } + } + } + // Kokkos::deep_copy( diff, input ); // Throw with incompatible shape. + Kokkos::deep_copy( output, input ); + + value = 0; + for ( size_t i3 = 0; i3 < N3; ++i3 ) { + for ( size_t i2 = 0; i2 < N2; ++i2 ) { + for ( size_t i1 = 0; i1 < N1; ++i1 ) { + for ( size_t i0 = 0; i0 < N0; ++i0 ) { + ++value; + ASSERT_EQ( value, ( (int) output( i0, i1, i2, i3 ) ) ); + } + } + } + } +}*/ -TEST_F( defaultdevicetype , view_aggregate ) +TEST_F( defaultdevicetype, view_aggregate ) { TestViewAggregate< Kokkos::DefaultExecutionSpace >(); } -//---------------------------------------------------------------------------- - -TEST_F( defaultdevicetype , scan ) +TEST_F( defaultdevicetype, scan ) { - TestScan< Kokkos::DefaultExecutionSpace >::test_range( 1 , 1000 ); + TestScan< Kokkos::DefaultExecutionSpace >::test_range( 1, 1000 ); TestScan< Kokkos::DefaultExecutionSpace >( 1000000 ); TestScan< Kokkos::DefaultExecutionSpace >( 10000000 ); Kokkos::DefaultExecutionSpace::fence(); } - -//---------------------------------------------------------------------------- - -TEST_F( defaultdevicetype , compiler_macros ) +TEST_F( defaultdevicetype, compiler_macros ) { ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::DefaultExecutionSpace >() ) ); } - -//---------------------------------------------------------------------------- -TEST_F( defaultdevicetype , cxx11 ) +TEST_F( defaultdevicetype, cxx11 ) { - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >(1) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >(2) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >(3) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >(4) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >( 1 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >( 2 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >( 3 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >( 4 ) ) ); } -TEST_F( defaultdevicetype , team_vector ) +#if !defined(KOKKOS_CUDA_CLANG_WORKAROUND) && !defined(KOKKOS_ARCH_PASCAL) +TEST_F( defaultdevicetype, team_vector ) { - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(0) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(1) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(2) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(3) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(4) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(5) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >( 0 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >( 1 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >( 2 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >( 3 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >( 4 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >( 5 ) ) ); } +#endif -TEST_F( defaultdevicetype , malloc ) +TEST_F( defaultdevicetype, malloc ) { - int* data = (int*) Kokkos::kokkos_malloc(100*sizeof(int)); - ASSERT_NO_THROW(data = (int*) Kokkos::kokkos_realloc(data,120*sizeof(int))); - Kokkos::kokkos_free(data); + int* data = (int*) Kokkos::kokkos_malloc( 100 * sizeof( int ) ); + ASSERT_NO_THROW( data = (int*) Kokkos::kokkos_realloc( data, 120 * sizeof( int ) ) ); + Kokkos::kokkos_free( data ); - int* data2 = (int*) Kokkos::kokkos_malloc(0); - ASSERT_TRUE(data2==NULL); - Kokkos::kokkos_free(data2); + int* data2 = (int*) Kokkos::kokkos_malloc( 0 ); + ASSERT_TRUE( data2 == NULL ); + Kokkos::kokkos_free( data2 ); } -} // namespace test +} // namespace Test #endif diff --git a/lib/kokkos/core/unit_test/TestHWLOC.cpp b/lib/kokkos/core/unit_test/TestHWLOC.cpp index 1637dec5de..d03d9b816f 100644 --- a/lib/kokkos/core/unit_test/TestHWLOC.cpp +++ b/lib/kokkos/core/unit_test/TestHWLOC.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -44,26 +44,24 @@ #include #include + #include namespace Test { class hwloc : public ::testing::Test { protected: - static void SetUpTestCase() - {} + static void SetUpTestCase() {} - static void TearDownTestCase() - {} + static void TearDownTestCase() {} }; -TEST_F( hwloc, query) +TEST_F( hwloc, query ) { std::cout << " NUMA[" << Kokkos::hwloc::get_available_numa_count() << "]" << " CORE[" << Kokkos::hwloc::get_available_cores_per_numa() << "]" << " PU[" << Kokkos::hwloc::get_available_threads_per_core() << "]" - << std::endl ; -} - + << std::endl; } +} // namespace Test diff --git a/lib/kokkos/core/unit_test/TestMDRange.hpp b/lib/kokkos/core/unit_test/TestMDRange.hpp index 9894d1ce69..1dc349cc12 100644 --- a/lib/kokkos/core/unit_test/TestMDRange.hpp +++ b/lib/kokkos/core/unit_test/TestMDRange.hpp @@ -47,509 +47,1675 @@ #include -/*--------------------------------------------------------------------------*/ - namespace Test { + namespace { template struct TestMDRange_2D { + using DataType = int; + using ViewType = typename Kokkos::View< DataType**, ExecSpace >; + using HostViewType = typename ViewType::HostMirror; - using DataType = int ; - using ViewType = typename Kokkos::View< DataType** , ExecSpace > ; - using HostViewType = typename ViewType::HostMirror ; + ViewType input_view; - ViewType input_view ; + TestMDRange_2D( const DataType N0, const DataType N1 ) : input_view( "input_view", N0, N1 ) {} - TestMDRange_2D( const DataType N0, const DataType N1 ) : input_view("input_view", N0, N1) {} + KOKKOS_INLINE_FUNCTION + void operator()( const int i, const int j ) const + { + input_view( i, j ) = 1; + } KOKKOS_INLINE_FUNCTION - void operator()( const int i , const int j ) const + void operator()( const int i, const int j, double &lsum ) const { - input_view(i,j) = 1; + lsum += input_view( i, j ) * 2; } + // tagged operators + struct InitTag {}; + KOKKOS_INLINE_FUNCTION + void operator()( const InitTag &, const int i, const int j ) const + { + input_view( i, j ) = 3; + } - static void test_for2( const int64_t N0, const int64_t N1 ) + static void test_reduce2( const int N0, const int N1 ) { + using namespace Kokkos::Experimental; + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 3, 3 } } ); + + TestMDRange_2D functor( N0, N1 ); + + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2, Iterate::Default, Iterate::Default>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 2, 6 } } ); + + TestMDRange_2D functor( N0, N1 ); + + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2, Iterate::Left, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 2, 6 } } ); + + TestMDRange_2D functor( N0, N1 ); + + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2, Iterate::Left, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 2, 6 } } ); + + TestMDRange_2D functor( N0, N1 ); + + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2, Iterate::Right, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 2, 6 } } ); + + TestMDRange_2D functor( N0, N1 ); + + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2, Iterate::Right, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 2, 6 } } ); + + TestMDRange_2D functor( N0, N1 ); + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 ); + } + } // end test_reduce2 + + static void test_for2( const int N0, const int N1 ) + { using namespace Kokkos::Experimental; { - using range_type = MDRangePolicy< ExecSpace, Rank<2>, Kokkos::IndexType >; - range_type range( {0,0}, {N0,N1} ); - TestMDRange_2D functor(N0,N1); + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2>, Kokkos::IndexType, InitTag > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 3, 3 } } ); + TestMDRange_2D functor( N0, N1 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2>, InitTag > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0}, {N0,N1} ); - TestMDRange_2D functor(N0,N1); + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 3, 3 } } ); + TestMDRange_2D functor( N0, N1 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2>, InitTag > range_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0}, {N0,N1} ); - TestMDRange_2D functor(N0,N1); + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } } ); + TestMDRange_2D functor( N0, N1 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0}, {N0,N1} ); - TestMDRange_2D functor(N0,N1); + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 3, 3 } } ); + TestMDRange_2D functor( N0, N1 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2, Iterate::Default, Iterate::Default>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0}, {N0,N1} ); - TestMDRange_2D functor(N0,N1); + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 4, 4 } } ); + TestMDRange_2D functor( N0, N1 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2, Iterate::Left, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0}, {N0,N1}, {3,3} ); - TestMDRange_2D functor(N0,N1); + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 3, 3 } } ); + TestMDRange_2D functor( N0, N1 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2, Iterate::Left, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0}, {N0,N1}, {7,7} ); - TestMDRange_2D functor(N0,N1); + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 7, 7 } } ); + TestMDRange_2D functor( N0, N1 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2, Iterate::Right, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0}, {N0,N1}, {16,16} ); - TestMDRange_2D functor(N0,N1); + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 16, 16 } } ); + TestMDRange_2D functor( N0, N1 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<2, Iterate::Right, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0}, {N0,N1}, {5,16} ); - TestMDRange_2D functor(N0,N1); + range_type range( point_type{ { 0, 0 } }, point_type{ { N0, N1 } }, tile_type{ { 5, 16 } } ); + TestMDRange_2D functor( N0, N1 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i struct TestMDRange_3D { + using DataType = int; + using ViewType = typename Kokkos::View< DataType***, ExecSpace >; + using HostViewType = typename ViewType::HostMirror; - using DataType = int ; - using ViewType = typename Kokkos::View< DataType*** , ExecSpace > ; - using HostViewType = typename ViewType::HostMirror ; + ViewType input_view; - ViewType input_view ; + TestMDRange_3D( const DataType N0, const DataType N1, const DataType N2 ) : input_view( "input_view", N0, N1, N2 ) {} - TestMDRange_3D( const DataType N0, const DataType N1, const DataType N2 ) : input_view("input_view", N0, N1, N2) {} + KOKKOS_INLINE_FUNCTION + void operator()( const int i, const int j, const int k ) const + { + input_view( i, j, k ) = 1; + } + + KOKKOS_INLINE_FUNCTION + void operator()( const int i, const int j, const int k, double &lsum ) const + { + lsum += input_view( i, j, k ) * 2; + } + // tagged operators + struct InitTag {}; KOKKOS_INLINE_FUNCTION - void operator()( const int i , const int j , const int k ) const + void operator()( const InitTag &, const int i, const int j, const int k ) const { - input_view(i,j,k) = 1; + input_view( i, j, k ) = 3; } - static void test_for3( const int64_t N0, const int64_t N1, const int64_t N2 ) + static void test_reduce3( const int N0, const int N1, const int N2 ) { using namespace Kokkos::Experimental; { - using range_type = MDRangePolicy< ExecSpace, Rank<3>, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 3, 3, 3 } } ); + + TestMDRange_3D functor( N0, N1, N2 ); + + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 * N2 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3, Iterate::Default, Iterate::Default >, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 2, 4, 6 } } ); + + TestMDRange_3D functor( N0, N1, N2 ); + + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 * N2 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3, Iterate::Left, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 2, 4, 6 } } ); + + TestMDRange_3D functor( N0, N1, N2 ); + + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 * N2 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3, Iterate::Left, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 2, 4, 6 } } ); + + TestMDRange_3D functor( N0, N1, N2 ); + + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 * N2 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3, Iterate::Right, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0,0}, {N0,N1,N2} ); - TestMDRange_3D functor(N0,N1,N2); + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 2, 4, 6 } } ); + + TestMDRange_3D functor( N0, N1, N2 ); + + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 * N2 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3, Iterate::Right, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 2, 4, 6 } } ); + + TestMDRange_3D functor( N0, N1, N2 ); + + md_parallel_for( range, functor ); + double sum = 0.0; + md_parallel_reduce( range, functor, sum ); + + ASSERT_EQ( sum, 2 * N0 * N1 * N2 ); + } + } // end test_reduce3 + + static void test_for3( const int N0, const int N1, const int N2 ) + { + using namespace Kokkos::Experimental; + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3> > range_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } } ); + TestMDRange_3D functor( N0, N1, N2 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + { + if ( h_view( i, j, k ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( "Defaults + No Tile: Errors in test_for3; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3>, Kokkos::IndexType, InitTag > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 3, 3, 3 } } ); + TestMDRange_3D functor( N0, N1, N2 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + { + if ( h_view( i, j, k ) != 3 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( "Defaults + InitTag op(): Errors in test_for3; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 3, 3, 3 } } ); + + TestMDRange_3D functor( N0, N1, N2 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + { + if ( h_view( i, j, k ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for3; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3, Iterate::Default, Iterate::Default>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 3, 3, 3 } } ); + TestMDRange_3D functor( N0, N1, N2 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + { + if ( h_view( i, j, k ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for3; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3, Iterate::Left, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 2, 4, 2 } } ); + TestMDRange_3D functor( N0, N1, N2 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3, Iterate::Left, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0,0}, {N0,N1,N2} ); - TestMDRange_3D functor(N0,N1,N2); + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 3, 5, 7 } } ); + TestMDRange_3D functor( N0, N1, N2 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3, Iterate::Right, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0,0}, {N0,N1,N2} ); - TestMDRange_3D functor(N0,N1,N2); + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 8, 8, 8 } } ); + TestMDRange_3D functor( N0, N1, N2 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<3, Iterate::Right, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0 } }, point_type{ { N0, N1, N2 } }, tile_type{ { 2, 4, 2 } } ); + TestMDRange_3D functor( N0, N1, N2 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + { + if ( h_view( i, j, k ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for3; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + } // end test_for3 +}; + +template +struct TestMDRange_4D { + using DataType = int; + using ViewType = typename Kokkos::View< DataType****, ExecSpace >; + using HostViewType = typename ViewType::HostMirror; + + ViewType input_view; + + TestMDRange_4D( const DataType N0, const DataType N1, const DataType N2, const DataType N3 ) : input_view( "input_view", N0, N1, N2, N3 ) {} + + KOKKOS_INLINE_FUNCTION + void operator()( const int i, const int j, const int k, const int l ) const + { + input_view( i, j, k, l ) = 1; + } + + KOKKOS_INLINE_FUNCTION + void operator()( const int i, const int j, const int k, const int l, double &lsum ) const + { + lsum += input_view( i, j, k, l ) * 2; + } + + // tagged operators + struct InitTag {}; + KOKKOS_INLINE_FUNCTION + void operator()( const InitTag &, const int i, const int j, const int k, const int l ) const + { + input_view( i, j, k, l ) = 3; + } + + static void test_for4( const int N0, const int N1, const int N2, const int N3 ) + { + using namespace Kokkos::Experimental; + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<4> > range_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0,0}, {N0,N1,N2} ); - TestMDRange_3D functor(N0,N1,N2); + range_type range( point_type{ { 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3 } } ); + TestMDRange_4D functor( N0, N1, N2, N3 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<4>, Kokkos::IndexType, InitTag > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0,0}, {N0,N1,N2} ); - TestMDRange_3D functor(N0,N1,N2); + range_type range( point_type{ { 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3 } }, tile_type{ { 3, 11, 3, 3 } } ); + TestMDRange_4D functor( N0, N1, N2, N3 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i m_upper dim2 InitTag op(): Errors in test_for4; mismatches = %d\n\n",counter); + } + + ASSERT_EQ( counter, 0 ); } { - using range_type = MDRangePolicy< ExecSpace, Rank<3, Iterate::Right, Iterate::Flat >, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<4>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3 } }, tile_type{ { 4, 4, 4, 4 } } ); - range_type range( {0,0,0}, {N0,N1,N2} ); - TestMDRange_3D functor(N0,N1,N2); + TestMDRange_4D functor( N0, N1, N2, N3 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<4, Iterate::Default, Iterate::Default>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0,0}, {N0,N1,N2}, {2,4,2} ); - TestMDRange_3D functor(N0,N1,N2); + range_type range( point_type{ { 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3 } }, tile_type{ { 4, 4, 4, 4 } } ); + + TestMDRange_4D functor( N0, N1, N2, N3 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<4, Iterate::Left, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3 } }, tile_type{ { 4, 4, 4, 4 } } ); - range_type range( {0,0,0}, {N0,N1,N2}, {3,5,7} ); - TestMDRange_3D functor(N0,N1,N2); + TestMDRange_4D functor( N0, N1, N2, N3 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<4, Iterate::Left, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3 } }, tile_type{ { 4, 4, 4, 4 } } ); - range_type range( {0,0,0}, {N0,N1,N2}, {8,8,8} ); - TestMDRange_3D functor(N0,N1,N2); + TestMDRange_4D functor( N0, N1, N2, N3 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType >; + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<4, Iterate::Right, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; - range_type range( {0,0,0}, {N0,N1,N2}, {2,4,2} ); - TestMDRange_3D functor(N0,N1,N2); + range_type range( point_type{ { 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3 } }, tile_type{ { 4, 4, 4, 4 } } ); + + TestMDRange_4D functor( N0, N1, N2, N3 ); md_parallel_for( range, functor ); HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); - Kokkos::deep_copy( h_view , functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); int counter = 0; - for ( int i=0; i, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3 } }, tile_type{ { 4, 4, 4, 4 } } ); + + TestMDRange_4D functor( N0, N1, N2, N3 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + { + if ( h_view( i, j, k, l ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for4; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + } // end test_for4 }; -} /* namespace */ -} /* namespace Test */ +template +struct TestMDRange_5D { + using DataType = int; + using ViewType = typename Kokkos::View< DataType*****, ExecSpace >; + using HostViewType = typename ViewType::HostMirror; + + ViewType input_view; + + TestMDRange_5D( const DataType N0, const DataType N1, const DataType N2, const DataType N3, const DataType N4 ) : input_view( "input_view", N0, N1, N2, N3, N4 ) {} + + KOKKOS_INLINE_FUNCTION + void operator()( const int i, const int j, const int k, const int l, const int m ) const + { + input_view( i, j, k, l, m ) = 1; + } + + KOKKOS_INLINE_FUNCTION + void operator()( const int i, const int j, const int k, const int l, const int m, double &lsum ) const + { + lsum += input_view( i, j, k, l, m ) * 2; + } + + // tagged operators + struct InitTag {}; + KOKKOS_INLINE_FUNCTION + void operator()( const InitTag &, const int i, const int j, const int k, const int l, const int m ) const + { + input_view( i, j, k, l, m ) = 3; + } + + static void test_for5( const int N0, const int N1, const int N2, const int N3, const int N4 ) + { + using namespace Kokkos::Experimental; + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<5> > range_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4 } } ); + TestMDRange_5D functor( N0, N1, N2, N3, N4 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + { + if ( h_view( i, j, k, l, m ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( "Defaults + No Tile: Errors in test_for5; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<5>, Kokkos::IndexType, InitTag > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4 } }, tile_type{ { 3, 3, 3, 3, 7 } } ); + TestMDRange_5D functor( N0, N1, N2, N3, N4 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + { + if ( h_view( i, j, k, l, m ) != 3 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( "Defaults + InitTag op(): Errors in test_for5; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<5>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4 } }, tile_type{ { 4, 4, 4, 2, 2 } } ); + + TestMDRange_5D functor( N0, N1, N2, N3, N4 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + { + if ( h_view( i, j, k, l, m ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for5; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<5, Iterate::Default, Iterate::Default>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4 } }, tile_type{ { 4, 4, 4, 2, 2 } } ); + + TestMDRange_5D functor( N0, N1, N2, N3, N4 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + { + if ( h_view( i, j, k, l, m ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for5; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<5, Iterate::Left, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4 } }, tile_type{ { 4, 4, 4, 2, 2 } } ); + + TestMDRange_5D functor( N0, N1, N2, N3, N4 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + { + if ( h_view( i, j, k, l, m ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for5; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<5, Iterate::Left, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4 } }, tile_type{ { 4, 4, 4, 2, 2 } } ); + + TestMDRange_5D functor( N0, N1, N2, N3, N4 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + { + if ( h_view( i, j, k, l, m ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for5; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<5, Iterate::Right, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4 } }, tile_type{ { 4, 4, 4, 2, 2 } } ); + + TestMDRange_5D functor( N0, N1, N2, N3, N4 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + { + if ( h_view( i, j, k, l, m ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for5; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<5, Iterate::Right, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4 } }, tile_type{ { 4, 4, 4, 2, 2 } } ); + + TestMDRange_5D functor( N0, N1, N2, N3, N4 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + { + if ( h_view( i, j, k, l, m ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for5; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + } +}; + +template +struct TestMDRange_6D { + using DataType = int; + using ViewType = typename Kokkos::View< DataType******, ExecSpace >; + using HostViewType = typename ViewType::HostMirror; + + ViewType input_view; + + TestMDRange_6D( const DataType N0, const DataType N1, const DataType N2, const DataType N3, const DataType N4, const DataType N5 ) : input_view( "input_view", N0, N1, N2, N3, N4, N5 ) {} + + KOKKOS_INLINE_FUNCTION + void operator()( const int i, const int j, const int k, const int l, const int m, const int n ) const + { + input_view( i, j, k, l, m, n ) = 1; + } + + KOKKOS_INLINE_FUNCTION + void operator()( const int i, const int j, const int k, const int l, const int m, const int n, double &lsum ) const + { + lsum += input_view( i, j, k, l, m, n ) * 2; + } + + // tagged operators + struct InitTag {}; + KOKKOS_INLINE_FUNCTION + void operator()( const InitTag &, const int i, const int j, const int k, const int l, const int m, const int n ) const + { + input_view( i, j, k, l, m, n ) = 3; + } + + static void test_for6( const int N0, const int N1, const int N2, const int N3, const int N4, const int N5 ) + { + using namespace Kokkos::Experimental; + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<6> > range_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4, N5 } } ); + TestMDRange_6D functor( N0, N1, N2, N3, N4, N5 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + for ( int n = 0; n < N5; ++n ) + { + if ( h_view( i, j, k, l, m, n ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( "Defaults + No Tile: Errors in test_for6; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<6>, Kokkos::IndexType, InitTag > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4, N5 } }, tile_type{ { 3, 3, 3, 3, 2, 3 } } ); //tile dims 3,3,3,3,3,3 more than cuda can handle with debugging + TestMDRange_6D functor( N0, N1, N2, N3, N4, N5 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + for ( int n = 0; n < N5; ++n ) + { + if ( h_view( i, j, k, l, m, n ) != 3 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( "Defaults + InitTag op(): Errors in test_for6; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<6>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4, N5 } }, tile_type{ { 4, 4, 4, 2, 2, 2 } } ); + + TestMDRange_6D functor( N0, N1, N2, N3, N4, N5 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + for ( int n = 0; n < N5; ++n ) + { + if ( h_view( i, j, k, l, m, n ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for6; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<6, Iterate::Default, Iterate::Default>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4, N5 } }, tile_type{ { 4, 4, 4, 2, 2, 2 } } ); + + TestMDRange_6D functor( N0, N1, N2, N3, N4, N5 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + for ( int n = 0; n < N5; ++n ) + { + if ( h_view( i, j, k, l, m, n ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for6; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<6, Iterate::Left, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4, N5 } }, tile_type{ { 4, 4, 4, 2, 2, 2 } } ); + + TestMDRange_6D functor( N0, N1, N2, N3, N4, N5 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + for ( int n = 0; n < N5; ++n ) + { + if ( h_view( i, j, k, l, m, n ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for6; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<6, Iterate::Left, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4, N5 } }, tile_type{ { 4, 4, 4, 2, 2, 2 } } ); + + TestMDRange_6D functor( N0, N1, N2, N3, N4, N5 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + for ( int n = 0; n < N5; ++n ) + { + if ( h_view( i, j, k, l, m, n ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for6; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<6, Iterate::Right, Iterate::Left>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4, N5 } }, tile_type{ { 4, 4, 4, 2, 2, 2 } } ); + + TestMDRange_6D functor( N0, N1, N2, N3, N4, N5 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + for ( int n = 0; n < N5; ++n ) + { + if ( h_view( i, j, k, l, m, n ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for6; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + + { + typedef typename Kokkos::Experimental::MDRangePolicy< ExecSpace, Rank<6, Iterate::Right, Iterate::Right>, Kokkos::IndexType > range_type; + typedef typename range_type::tile_type tile_type; + typedef typename range_type::point_type point_type; + + range_type range( point_type{ { 0, 0, 0, 0, 0, 0 } }, point_type{ { N0, N1, N2, N3, N4, N5 } }, tile_type{ { 4, 4, 4, 2, 2, 2 } } ); + + TestMDRange_6D functor( N0, N1, N2, N3, N4, N5 ); + + md_parallel_for( range, functor ); + + HostViewType h_view = Kokkos::create_mirror_view( functor.input_view ); + Kokkos::deep_copy( h_view, functor.input_view ); + + int counter = 0; + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < N2; ++k ) + for ( int l = 0; l < N3; ++l ) + for ( int m = 0; m < N4; ++m ) + for ( int n = 0; n < N5; ++n ) + { + if ( h_view( i, j, k, l, m, n ) != 1 ) { + ++counter; + } + } + + if ( counter != 0 ) { + printf( " Errors in test_for6; mismatches = %d\n\n", counter ); + } + + ASSERT_EQ( counter, 0 ); + } + } +}; -/*--------------------------------------------------------------------------*/ +} // namespace +} // namespace Test diff --git a/lib/kokkos/core/unit_test/TestMemoryPool.hpp b/lib/kokkos/core/unit_test/TestMemoryPool.hpp index 868e64e9da..925f0e35ed 100644 --- a/lib/kokkos/core/unit_test/TestMemoryPool.hpp +++ b/lib/kokkos/core/unit_test/TestMemoryPool.hpp @@ -156,7 +156,7 @@ struct fill_memory { void operator()( size_type i ) const { if ( i % STRIDE == 0 ) { - *m_pointers[i / STRIDE].ptr = i / STRIDE ; + *m_pointers[i / STRIDE].ptr = i / STRIDE; } } }; @@ -493,12 +493,12 @@ T smallest_power2_ge( T val ) // Find the most significant nonzero bit. int first_nonzero_bit = Kokkos::Impl::bit_scan_reverse( val ); - // If val is an integral power of 2, ceil( log2(val) ) is equal to the + // If val is an integral power of 2, ceil( log2( val ) ) is equal to the // most significant nonzero bit. Otherwise, you need to add 1. int lg2_size = first_nonzero_bit + !Kokkos::Impl::is_integral_power_of_two( val ); - return T(1) << T(lg2_size); + return T( 1 ) << T( lg2_size ); } // This test makes allocation requests for multiple sizes and interleaves @@ -547,7 +547,7 @@ void test_mempool2( unsigned base_chunk_size, size_t num_chunk_sizes, phase1_size = ( ( phase1_size + num_chunk_sizes - 1 ) / num_chunk_sizes ) * num_chunk_sizes; - // Make sure the phase 2 size is multiples of (2 * num_chunk_sizes). + // Make sure the phase 2 size is multiples of ( 2 * num_chunk_sizes ). phase2_size = ( ( phase2_size + 2 * num_chunk_sizes - 1 ) / ( 2 * num_chunk_sizes ) ) * 2 * num_chunk_sizes; @@ -567,7 +567,7 @@ void test_mempool2( unsigned base_chunk_size, size_t num_chunk_sizes, // each chunk size. work_view phase1_work( "Phase 1 Work", phase1_size ); typename work_view::HostMirror host_phase1_work = - create_mirror_view(phase1_work); + create_mirror_view( phase1_work ); size_t inner_size = phase1_size / num_chunk_sizes; unsigned chunk_size = base_chunk_size; @@ -589,7 +589,7 @@ void test_mempool2( unsigned base_chunk_size, size_t num_chunk_sizes, // deallocations with an equal number of allocations for each chunk size. work_view phase2_work( "Phase 2 Work", phase2_size ); typename work_view::HostMirror host_phase2_work = - create_mirror_view(phase2_work); + create_mirror_view( phase2_work ); inner_size = half_phase2_size / num_chunk_sizes; chunk_size = base_chunk_size; @@ -614,7 +614,7 @@ void test_mempool2( unsigned base_chunk_size, size_t num_chunk_sizes, // Initialize the phase 3 work view with all deallocations. work_view phase3_work( "Phase 3 Work", phase3_size ); typename work_view::HostMirror host_phase3_work = - create_mirror_view(phase3_work); + create_mirror_view( phase3_work ); inner_size = phase3_size / num_chunk_sizes; diff --git a/lib/kokkos/core/unit_test/TestPolicyConstruction.hpp b/lib/kokkos/core/unit_test/TestPolicyConstruction.hpp index 1bb45481c9..6f2ca6a61c 100644 --- a/lib/kokkos/core/unit_test/TestPolicyConstruction.hpp +++ b/lib/kokkos/core/unit_test/TestPolicyConstruction.hpp @@ -48,7 +48,7 @@ #include #include -struct SomeTag{}; +struct SomeTag {}; template< class ExecutionSpace > class TestRangePolicyConstruction { @@ -56,179 +56,194 @@ public: TestRangePolicyConstruction() { test_compile_time_parameters(); } + private: void test_compile_time_parameters() { { Kokkos::Impl::expand_variadic(); - Kokkos::Impl::expand_variadic(1,2,3); + Kokkos::Impl::expand_variadic( 1, 2, 3 ); } + { typedef Kokkos::RangePolicy<> policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, typename execution_space::size_type >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::RangePolicy policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< ExecutionSpace > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, typename execution_space::size_type >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::RangePolicy > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< ExecutionSpace, Kokkos::Schedule > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, typename execution_space::size_type >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::RangePolicy,Kokkos::IndexType > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< ExecutionSpace, Kokkos::Schedule, Kokkos::IndexType > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::RangePolicy, ExecutionSpace,Kokkos::Schedule > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< Kokkos::IndexType, ExecutionSpace, Kokkos::Schedule > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::RangePolicy,Kokkos::IndexType,SomeTag > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< ExecutionSpace, Kokkos::Schedule, Kokkos::IndexType, SomeTag > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } + { - typedef Kokkos::RangePolicy,ExecutionSpace,Kokkos::IndexType,SomeTag > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< Kokkos::Schedule, ExecutionSpace, Kokkos::IndexType, SomeTag > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } + { - typedef Kokkos::RangePolicy,Kokkos::IndexType,ExecutionSpace > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< SomeTag, Kokkos::Schedule, Kokkos::IndexType, ExecutionSpace > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } + { - typedef Kokkos::RangePolicy > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< Kokkos::Schedule > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, typename execution_space::size_type >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::RangePolicy,Kokkos::IndexType > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< Kokkos::Schedule, Kokkos::IndexType > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::RangePolicy, Kokkos::Schedule > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< Kokkos::IndexType, Kokkos::Schedule > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::RangePolicy,Kokkos::IndexType,SomeTag > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< Kokkos::Schedule, Kokkos::IndexType, SomeTag > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } + { - typedef Kokkos::RangePolicy,Kokkos::IndexType,SomeTag > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< Kokkos::Schedule, Kokkos::IndexType, SomeTag > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } + { - typedef Kokkos::RangePolicy,Kokkos::IndexType > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::RangePolicy< SomeTag, Kokkos::Schedule, Kokkos::IndexType > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } } }; @@ -240,258 +255,274 @@ public: test_compile_time_parameters(); test_run_time_parameters(); } + private: void test_compile_time_parameters() { { typedef Kokkos::TeamPolicy<> policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, typename execution_space::size_type >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::TeamPolicy policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, typename execution_space::size_type >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::TeamPolicy > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< ExecutionSpace, Kokkos::Schedule > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, typename execution_space::size_type >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::TeamPolicy,Kokkos::IndexType > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< ExecutionSpace, Kokkos::Schedule, Kokkos::IndexType > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::TeamPolicy, ExecutionSpace,Kokkos::Schedule > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< Kokkos::IndexType, ExecutionSpace, Kokkos::Schedule > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::TeamPolicy,Kokkos::IndexType,SomeTag > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< ExecutionSpace, Kokkos::Schedule, Kokkos::IndexType, SomeTag > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } + { - typedef Kokkos::TeamPolicy,ExecutionSpace,Kokkos::IndexType,SomeTag > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< Kokkos::Schedule, ExecutionSpace, Kokkos::IndexType, SomeTag > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } + { - typedef Kokkos::TeamPolicy,Kokkos::IndexType,ExecutionSpace > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< SomeTag, Kokkos::Schedule, Kokkos::IndexType, ExecutionSpace > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, ExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } + { - typedef Kokkos::TeamPolicy > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< Kokkos::Schedule > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, typename execution_space::size_type >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::TeamPolicy,Kokkos::IndexType > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< Kokkos::Schedule, Kokkos::IndexType > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::TeamPolicy, Kokkos::Schedule > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< Kokkos::IndexType, Kokkos::Schedule > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, void >::value ) ); } + { - typedef Kokkos::TeamPolicy,Kokkos::IndexType,SomeTag > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< Kokkos::Schedule, Kokkos::IndexType, SomeTag > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } + { - typedef Kokkos::TeamPolicy,Kokkos::IndexType,SomeTag > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< Kokkos::Schedule, Kokkos::IndexType, SomeTag > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } + { - typedef Kokkos::TeamPolicy,Kokkos::IndexType > policy_t; - typedef typename policy_t::execution_space execution_space; - typedef typename policy_t::index_type index_type; - typedef typename policy_t::schedule_type schedule_type; - typedef typename policy_t::work_tag work_tag; - - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same::value)); - ASSERT_TRUE((std::is_same >::value)); - ASSERT_TRUE((std::is_same::value)); + typedef Kokkos::TeamPolicy< SomeTag, Kokkos::Schedule, Kokkos::IndexType > policy_t; + typedef typename policy_t::execution_space execution_space; + typedef typename policy_t::index_type index_type; + typedef typename policy_t::schedule_type schedule_type; + typedef typename policy_t::work_tag work_tag; + + ASSERT_TRUE( ( std::is_same< execution_space, Kokkos::DefaultExecutionSpace >::value ) ); + ASSERT_TRUE( ( std::is_same< index_type, long >::value ) ); + ASSERT_TRUE( ( std::is_same< schedule_type, Kokkos::Schedule >::value ) ); + ASSERT_TRUE( ( std::is_same< work_tag, SomeTag >::value ) ); } } - template + template< class policy_t > void test_run_time_parameters_type() { int league_size = 131; - int team_size = 4 0); - ASSERT_EQ (p1.scratch_size(0), 0); - - policy_t p2 = p1.set_chunk_size(chunk_size); - ASSERT_EQ (p1.league_size() , league_size); - ASSERT_EQ (p1.team_size() , team_size); - ASSERT_TRUE(p1.chunk_size() > 0); - ASSERT_EQ (p1.scratch_size(0), 0); - - ASSERT_EQ (p2.league_size() , league_size); - ASSERT_EQ (p2.team_size() , team_size); - ASSERT_EQ (p2.chunk_size() , chunk_size); - ASSERT_EQ (p2.scratch_size(0), 0); - - policy_t p3 = p2.set_scratch_size(0,Kokkos::PerTeam(per_team_scratch)); - ASSERT_EQ (p2.league_size() , league_size); - ASSERT_EQ (p2.team_size() , team_size); - ASSERT_EQ (p2.chunk_size() , chunk_size); - ASSERT_EQ (p2.scratch_size(0), 0); - ASSERT_EQ (p3.league_size() , league_size); - ASSERT_EQ (p3.team_size() , team_size); - ASSERT_EQ (p3.chunk_size() , chunk_size); - ASSERT_EQ (p3.scratch_size(0), per_team_scratch); - - policy_t p4 = p2.set_scratch_size(0,Kokkos::PerThread(per_thread_scratch)); - ASSERT_EQ (p2.league_size() , league_size); - ASSERT_EQ (p2.team_size() , team_size); - ASSERT_EQ (p2.chunk_size() , chunk_size); - ASSERT_EQ (p2.scratch_size(0), 0); - ASSERT_EQ (p4.league_size() , league_size); - ASSERT_EQ (p4.team_size() , team_size); - ASSERT_EQ (p4.chunk_size() , chunk_size); - ASSERT_EQ (p4.scratch_size(0), per_thread_scratch*team_size); - - policy_t p5 = p2.set_scratch_size(0,Kokkos::PerThread(per_thread_scratch),Kokkos::PerTeam(per_team_scratch)); - ASSERT_EQ (p2.league_size() , league_size); - ASSERT_EQ (p2.team_size() , team_size); - ASSERT_EQ (p2.chunk_size() , chunk_size); - ASSERT_EQ (p2.scratch_size(0), 0); - ASSERT_EQ (p5.league_size() , league_size); - ASSERT_EQ (p5.team_size() , team_size); - ASSERT_EQ (p5.chunk_size() , chunk_size); - ASSERT_EQ (p5.scratch_size(0), scratch_size); - - policy_t p6 = p2.set_scratch_size(0,Kokkos::PerTeam(per_team_scratch),Kokkos::PerThread(per_thread_scratch)); - ASSERT_EQ (p2.league_size() , league_size); - ASSERT_EQ (p2.team_size() , team_size); - ASSERT_EQ (p2.chunk_size() , chunk_size); - ASSERT_EQ (p2.scratch_size(0), 0); - ASSERT_EQ (p6.league_size() , league_size); - ASSERT_EQ (p6.team_size() , team_size); - ASSERT_EQ (p6.chunk_size() , chunk_size); - ASSERT_EQ (p6.scratch_size(0), scratch_size); - - policy_t p7 = p3.set_scratch_size(0,Kokkos::PerTeam(per_team_scratch),Kokkos::PerThread(per_thread_scratch)); - ASSERT_EQ (p3.league_size() , league_size); - ASSERT_EQ (p3.team_size() , team_size); - ASSERT_EQ (p3.chunk_size() , chunk_size); - ASSERT_EQ (p3.scratch_size(0), per_team_scratch); - ASSERT_EQ (p7.league_size() , league_size); - ASSERT_EQ (p7.team_size() , team_size); - ASSERT_EQ (p7.chunk_size() , chunk_size); - ASSERT_EQ (p7.scratch_size(0), scratch_size); -} + int scratch_size = per_team_scratch + per_thread_scratch * team_size; + + policy_t p1( league_size, team_size ); + ASSERT_EQ ( p1.league_size(), league_size ); + ASSERT_EQ ( p1.team_size(), team_size ); + ASSERT_TRUE( p1.chunk_size() > 0 ); + ASSERT_EQ ( p1.scratch_size( 0 ), 0 ); + + policy_t p2 = p1.set_chunk_size( chunk_size ); + ASSERT_EQ ( p1.league_size(), league_size ); + ASSERT_EQ ( p1.team_size(), team_size ); + ASSERT_TRUE( p1.chunk_size() > 0 ); + ASSERT_EQ ( p1.scratch_size( 0 ), 0 ); + + ASSERT_EQ ( p2.league_size(), league_size ); + ASSERT_EQ ( p2.team_size(), team_size ); + ASSERT_EQ ( p2.chunk_size(), chunk_size ); + ASSERT_EQ ( p2.scratch_size( 0 ), 0 ); + + policy_t p3 = p2.set_scratch_size( 0, Kokkos::PerTeam( per_team_scratch ) ); + ASSERT_EQ ( p2.league_size(), league_size ); + ASSERT_EQ ( p2.team_size(), team_size ); + ASSERT_EQ ( p2.chunk_size(), chunk_size ); + ASSERT_EQ ( p2.scratch_size( 0 ), 0 ); + ASSERT_EQ ( p3.league_size(), league_size ); + ASSERT_EQ ( p3.team_size(), team_size ); + ASSERT_EQ ( p3.chunk_size(), chunk_size ); + ASSERT_EQ ( p3.scratch_size( 0 ), per_team_scratch ); + + policy_t p4 = p2.set_scratch_size( 0, Kokkos::PerThread( per_thread_scratch ) ); + ASSERT_EQ ( p2.league_size(), league_size ); + ASSERT_EQ ( p2.team_size(), team_size ); + ASSERT_EQ ( p2.chunk_size(), chunk_size ); + ASSERT_EQ ( p2.scratch_size( 0 ), 0 ); + ASSERT_EQ ( p4.league_size(), league_size ); + ASSERT_EQ ( p4.team_size(), team_size ); + ASSERT_EQ ( p4.chunk_size(), chunk_size ); + ASSERT_EQ ( p4.scratch_size( 0 ), per_thread_scratch * team_size ); + + policy_t p5 = p2.set_scratch_size( 0, Kokkos::PerThread( per_thread_scratch ), Kokkos::PerTeam( per_team_scratch ) ); + ASSERT_EQ ( p2.league_size(), league_size ); + ASSERT_EQ ( p2.team_size(), team_size ); + ASSERT_EQ ( p2.chunk_size(), chunk_size ); + ASSERT_EQ ( p2.scratch_size( 0 ), 0 ); + ASSERT_EQ ( p5.league_size(), league_size ); + ASSERT_EQ ( p5.team_size(), team_size ); + ASSERT_EQ ( p5.chunk_size(), chunk_size ); + ASSERT_EQ ( p5.scratch_size( 0 ), scratch_size ); + + policy_t p6 = p2.set_scratch_size( 0, Kokkos::PerTeam( per_team_scratch ), Kokkos::PerThread( per_thread_scratch ) ); + ASSERT_EQ ( p2.league_size(), league_size ); + ASSERT_EQ ( p2.team_size(), team_size ); + ASSERT_EQ ( p2.chunk_size(), chunk_size ); + ASSERT_EQ ( p2.scratch_size( 0 ), 0 ); + ASSERT_EQ ( p6.league_size(), league_size ); + ASSERT_EQ ( p6.team_size(), team_size ); + ASSERT_EQ ( p6.chunk_size(), chunk_size ); + ASSERT_EQ ( p6.scratch_size( 0 ), scratch_size ); + + policy_t p7 = p3.set_scratch_size( 0, Kokkos::PerTeam( per_team_scratch ), Kokkos::PerThread( per_thread_scratch ) ); + ASSERT_EQ ( p3.league_size(), league_size ); + ASSERT_EQ ( p3.team_size(), team_size ); + ASSERT_EQ ( p3.chunk_size(), chunk_size ); + ASSERT_EQ ( p3.scratch_size( 0 ), per_team_scratch ); + ASSERT_EQ ( p7.league_size(), league_size ); + ASSERT_EQ ( p7.team_size(), team_size ); + ASSERT_EQ ( p7.chunk_size(), chunk_size ); + ASSERT_EQ ( p7.scratch_size( 0 ), scratch_size ); + } + void test_run_time_parameters() { - test_run_time_parameters_type >(); - test_run_time_parameters_type,Kokkos::IndexType > >(); - test_run_time_parameters_type, ExecutionSpace, Kokkos::Schedule > >(); - test_run_time_parameters_type,Kokkos::IndexType,ExecutionSpace,SomeTag > >(); + test_run_time_parameters_type< Kokkos::TeamPolicy >(); + test_run_time_parameters_type< Kokkos::TeamPolicy, Kokkos::IndexType > >(); + test_run_time_parameters_type< Kokkos::TeamPolicy, ExecutionSpace, Kokkos::Schedule > >(); + test_run_time_parameters_type< Kokkos::TeamPolicy, Kokkos::IndexType, ExecutionSpace, SomeTag > >(); } }; diff --git a/lib/kokkos/core/unit_test/TestQthread.cpp b/lib/kokkos/core/unit_test/TestQthread.cpp deleted file mode 100644 index a465f39ca8..0000000000 --- a/lib/kokkos/core/unit_test/TestQthread.cpp +++ /dev/null @@ -1,287 +0,0 @@ -/* -//@HEADER -// ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of the Corporation nor the names of the -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// -// ************************************************************************ -//@HEADER -*/ - -#include - -#include -#include - -//---------------------------------------------------------------------------- - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -// #include - -namespace Test { - -class qthread : public ::testing::Test { -protected: - static void SetUpTestCase() - { - const unsigned numa_count = Kokkos::hwloc::get_available_numa_count(); - const unsigned cores_per_numa = Kokkos::hwloc::get_available_cores_per_numa(); - const unsigned threads_per_core = Kokkos::hwloc::get_available_threads_per_core(); - - int threads_count = std::max( 1u , numa_count ) - * std::max( 2u , ( cores_per_numa * threads_per_core ) / 2 ); - Kokkos::Qthread::initialize( threads_count ); - Kokkos::Qthread::print_configuration( std::cout , true ); - } - - static void TearDownTestCase() - { - Kokkos::Qthread::finalize(); - } -}; - -TEST_F( qthread , compiler_macros ) -{ - ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::Qthread >() ) ); -} - -TEST_F( qthread, view_impl) { - test_view_impl< Kokkos::Qthread >(); -} - -TEST_F( qthread, view_api) { - TestViewAPI< double , Kokkos::Qthread >(); -} - -TEST_F( qthread , view_nested_view ) -{ - ::Test::view_nested_view< Kokkos::Qthread >(); -} - -TEST_F( qthread , range_tag ) -{ - TestRange< Kokkos::Qthread , Kokkos::Schedule >::test_for(1000); - TestRange< Kokkos::Qthread , Kokkos::Schedule >::test_reduce(1000); - TestRange< Kokkos::Qthread , Kokkos::Schedule >::test_scan(1000); -} - -TEST_F( qthread , team_tag ) -{ - TestTeamPolicy< Kokkos::Qthread , Kokkos::Schedule >::test_for( 1000 ); - TestTeamPolicy< Kokkos::Qthread , Kokkos::Schedule >::test_reduce( 1000 ); -} - -TEST_F( qthread, long_reduce) { - TestReduce< long , Kokkos::Qthread >( 1000000 ); -} - -TEST_F( qthread, double_reduce) { - TestReduce< double , Kokkos::Qthread >( 1000000 ); -} - -TEST_F( qthread, long_reduce_dynamic ) { - TestReduceDynamic< long , Kokkos::Qthread >( 1000000 ); -} - -TEST_F( qthread, double_reduce_dynamic ) { - TestReduceDynamic< double , Kokkos::Qthread >( 1000000 ); -} - -TEST_F( qthread, long_reduce_dynamic_view ) { - TestReduceDynamicView< long , Kokkos::Qthread >( 1000000 ); -} - -TEST_F( qthread, team_long_reduce) { - TestReduceTeam< long , Kokkos::Qthread , Kokkos::Schedule >( 1000000 ); -} - -TEST_F( qthread, team_double_reduce) { - TestReduceTeam< double , Kokkos::Qthread , Kokkos::Schedule >( 1000000 ); -} - - -TEST_F( qthread , atomics ) -{ - const int loop_count = 1e4 ; - - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); - - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); - - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); - - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); - - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); - - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); - - ASSERT_TRUE( ( TestAtomic::Loop(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,3) ) ); - -#if defined( KOKKOS_ENABLE_ASM ) - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Qthread>(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Qthread>(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Qthread>(100,3) ) ); -#endif - -} - -TEST_F( qthread , view_remap ) -{ - enum { N0 = 3 , N1 = 2 , N2 = 8 , N3 = 9 }; - - typedef Kokkos::View< double*[N1][N2][N3] , - Kokkos::LayoutRight , - Kokkos::Qthread > output_type ; - - typedef Kokkos::View< int**[N2][N3] , - Kokkos::LayoutLeft , - Kokkos::Qthread > input_type ; - - typedef Kokkos::View< int*[N0][N2][N3] , - Kokkos::LayoutLeft , - Kokkos::Qthread > diff_type ; - - output_type output( "output" , N0 ); - input_type input ( "input" , N0 , N1 ); - diff_type diff ( "diff" , N0 ); - - int value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - input(i0,i1,i2,i3) = ++value ; - }}}} - - // Kokkos::deep_copy( diff , input ); // throw with incompatible shape - Kokkos::deep_copy( output , input ); - - value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - ++value ; - ASSERT_EQ( value , ((int) output(i0,i1,i2,i3) ) ); - }}}} -} - -//---------------------------------------------------------------------------- - -TEST_F( qthread , view_aggregate ) -{ - TestViewAggregate< Kokkos::Qthread >(); -} - -//---------------------------------------------------------------------------- - -TEST_F( qthread , scan ) -{ - TestScan< Kokkos::Qthread >::test_range( 1 , 1000 ); - TestScan< Kokkos::Qthread >( 1000000 ); - TestScan< Kokkos::Qthread >( 10000000 ); - Kokkos::Qthread::fence(); -} - -TEST_F( qthread, team_shared ) { - TestSharedTeam< Kokkos::Qthread , Kokkos::Schedule >(); -} - -TEST_F( qthread, shmem_size) { - TestShmemSize< Kokkos::Qthread >(); -} - -TEST_F( qthread , team_scan ) -{ - TestScanTeam< Kokkos::Qthread , Kokkos::Schedule >( 10 ); - TestScanTeam< Kokkos::Qthread , Kokkos::Schedule >( 10000 ); -} - -#if 0 /* disable */ -TEST_F( qthread , team_vector ) -{ - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthread >(0) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthread >(1) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthread >(2) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthread >(3) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthread >(4) ) ); -} -#endif - -//---------------------------------------------------------------------------- - -TEST_F( qthread , task_policy ) -{ - TestTaskScheduler::test_task_dep< Kokkos::Qthread >( 10 ); - for ( long i = 0 ; i < 25 ; ++i ) TestTaskScheduler::test_fib< Kokkos::Qthread >(i); - for ( long i = 0 ; i < 35 ; ++i ) TestTaskScheduler::test_fib2< Kokkos::Qthread >(i); -} - -TEST_F( qthread , task_team ) -{ - TestTaskScheduler::test_task_team< Kokkos::Qthread >(1000); -} - -//---------------------------------------------------------------------------- - -} // namespace test - diff --git a/lib/kokkos/core/unit_test/TestRange.hpp b/lib/kokkos/core/unit_test/TestRange.hpp index e342e844c7..90411a57a0 100644 --- a/lib/kokkos/core/unit_test/TestRange.hpp +++ b/lib/kokkos/core/unit_test/TestRange.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -45,198 +45,204 @@ #include -/*--------------------------------------------------------------------------*/ - namespace Test { + namespace { template< class ExecSpace, class ScheduleType > struct TestRange { + typedef int value_type; ///< typedef required for the parallel_reduce - typedef int value_type ; ///< typedef required for the parallel_reduce - - typedef Kokkos::View view_type ; + typedef Kokkos::View< int*, ExecSpace > view_type; - view_type m_flags ; + view_type m_flags; struct VerifyInitTag {}; struct ResetTag {}; struct VerifyResetTag {}; TestRange( const size_t N ) - : m_flags( Kokkos::ViewAllocateWithoutInitializing("flags"), N ) + : m_flags( Kokkos::ViewAllocateWithoutInitializing( "flags" ), N ) {} static void test_for( const size_t N ) - { - TestRange functor(N); + { + TestRange functor( N ); - typename view_type::HostMirror host_flags = Kokkos::create_mirror_view( functor.m_flags ); + typename view_type::HostMirror host_flags = Kokkos::create_mirror_view( functor.m_flags ); - Kokkos::parallel_for( Kokkos::RangePolicy(0,N) , functor ); - Kokkos::parallel_for( Kokkos::RangePolicy(0,N) , functor ); + Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace, ScheduleType >( 0, N ), functor ); + Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace, ScheduleType, VerifyInitTag >( 0, N ), functor ); - Kokkos::deep_copy( host_flags , functor.m_flags ); + Kokkos::deep_copy( host_flags, functor.m_flags ); - size_t error_count = 0 ; - for ( size_t i = 0 ; i < N ; ++i ) { - if ( int(i) != host_flags(i) ) ++error_count ; - } - ASSERT_EQ( error_count , size_t(0) ); + size_t error_count = 0; + for ( size_t i = 0; i < N; ++i ) { + if ( int( i ) != host_flags( i ) ) ++error_count; + } + ASSERT_EQ( error_count, size_t( 0 ) ); - Kokkos::parallel_for( Kokkos::RangePolicy(0,N) , functor ); - Kokkos::parallel_for( std::string("TestKernelFor") , Kokkos::RangePolicy(0,N) , functor ); + Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace, ScheduleType, ResetTag >( 0, N ), functor ); + Kokkos::parallel_for( std::string( "TestKernelFor" ), Kokkos::RangePolicy< ExecSpace, ScheduleType, VerifyResetTag >( 0, N ), functor ); - Kokkos::deep_copy( host_flags , functor.m_flags ); + Kokkos::deep_copy( host_flags, functor.m_flags ); - error_count = 0 ; - for ( size_t i = 0 ; i < N ; ++i ) { - if ( int(2*i) != host_flags(i) ) ++error_count ; - } - ASSERT_EQ( error_count , size_t(0) ); + error_count = 0; + for ( size_t i = 0; i < N; ++i ) { + if ( int( 2 * i ) != host_flags( i ) ) ++error_count; } + ASSERT_EQ( error_count, size_t( 0 ) ); + } KOKKOS_INLINE_FUNCTION void operator()( const int i ) const - { m_flags(i) = i ; } + { m_flags( i ) = i; } KOKKOS_INLINE_FUNCTION - void operator()( const VerifyInitTag & , const int i ) const - { if ( i != m_flags(i) ) { printf("TestRange::test_for error at %d != %d\n",i,m_flags(i)); } } + void operator()( const VerifyInitTag &, const int i ) const + { + if ( i != m_flags( i ) ) { + printf( "TestRange::test_for error at %d != %d\n", i, m_flags( i ) ); + } + } KOKKOS_INLINE_FUNCTION - void operator()( const ResetTag & , const int i ) const - { m_flags(i) = 2 * m_flags(i); } + void operator()( const ResetTag &, const int i ) const + { m_flags( i ) = 2 * m_flags( i ); } KOKKOS_INLINE_FUNCTION - void operator()( const VerifyResetTag & , const int i ) const - { if ( 2 * i != m_flags(i) ) { printf("TestRange::test_for error at %d != %d\n",i,m_flags(i)); } } + void operator()( const VerifyResetTag &, const int i ) const + { + if ( 2 * i != m_flags( i ) ) + { + printf( "TestRange::test_for error at %d != %d\n", i, m_flags( i ) ); + } + } //---------------------------------------- struct OffsetTag {}; static void test_reduce( const size_t N ) - { - TestRange functor(N); - int total = 0 ; + { + TestRange functor( N ); + int total = 0; - Kokkos::parallel_for( Kokkos::RangePolicy(0,N) , functor ); + Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace, ScheduleType >( 0, N ), functor ); - Kokkos::parallel_reduce( "TestKernelReduce" , Kokkos::RangePolicy(0,N) , functor , total ); - // sum( 0 .. N-1 ) - ASSERT_EQ( size_t((N-1)*(N)/2) , size_t(total) ); + Kokkos::parallel_reduce( "TestKernelReduce", Kokkos::RangePolicy< ExecSpace, ScheduleType >( 0, N ), functor, total ); + // sum( 0 .. N-1 ) + ASSERT_EQ( size_t( ( N - 1 ) * ( N ) / 2 ), size_t( total ) ); - Kokkos::parallel_reduce( Kokkos::RangePolicy(0,N) , functor , total ); - // sum( 1 .. N ) - ASSERT_EQ( size_t((N)*(N+1)/2) , size_t(total) ); - } + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace, ScheduleType, OffsetTag>( 0, N ), functor, total ); + // sum( 1 .. N ) + ASSERT_EQ( size_t( ( N ) * ( N + 1 ) / 2 ), size_t( total ) ); + } KOKKOS_INLINE_FUNCTION - void operator()( const int i , value_type & update ) const - { update += m_flags(i); } + void operator()( const int i, value_type & update ) const + { update += m_flags( i ); } KOKKOS_INLINE_FUNCTION - void operator()( const OffsetTag & , const int i , value_type & update ) const - { update += 1 + m_flags(i); } + void operator()( const OffsetTag &, const int i, value_type & update ) const + { update += 1 + m_flags( i ); } //---------------------------------------- static void test_scan( const size_t N ) - { - TestRange functor(N); + { + TestRange functor( N ); - Kokkos::parallel_for( Kokkos::RangePolicy(0,N) , functor ); + Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace, ScheduleType >( 0, N ), functor ); - Kokkos::parallel_scan( "TestKernelScan" , Kokkos::RangePolicy(0,N) , functor ); - } + Kokkos::parallel_scan( "TestKernelScan", Kokkos::RangePolicy< ExecSpace, ScheduleType, OffsetTag>( 0, N ), functor ); + } KOKKOS_INLINE_FUNCTION - void operator()( const OffsetTag & , const int i , value_type & update , bool final ) const - { - update += m_flags(i); + void operator()( const OffsetTag &, const int i, value_type & update, bool final ) const + { + update += m_flags( i ); - if ( final ) { - if ( update != (i*(i+1))/2 ) { - printf("TestRange::test_scan error %d : %d != %d\n",i,(i*(i+1))/2,m_flags(i)); - } + if ( final ) { + if ( update != ( i * ( i + 1 ) ) / 2 ) { + printf( "TestRange::test_scan error %d : %d != %d\n", i, ( i * ( i + 1 ) ) / 2, m_flags( i ) ); } } + } - static void test_dynamic_policy( const size_t N ) { - - - typedef Kokkos::RangePolicy > policy_t; + static void test_dynamic_policy( const size_t N ) + { + typedef Kokkos::RangePolicy< ExecSpace, Kokkos::Schedule > policy_t; { - Kokkos::View > count("Count",ExecSpace::concurrency()); - Kokkos::View a("A",N); - - Kokkos::parallel_for( policy_t(0,N), - KOKKOS_LAMBDA (const typename policy_t::member_type& i) { - for(int k=0; k<(i > count( "Count", ExecSpace::concurrency() ); + Kokkos::View< int*, ExecSpace > a( "A", N ); + + Kokkos::parallel_for( policy_t( 0, N ), KOKKOS_LAMBDA ( const typename policy_t::member_type& i ) { + for ( int k = 0; k < ( i < N / 2 ? 1 : 10000 ); k++ ) { + a( i )++; + } + count( ExecSpace::hardware_thread_id() )++; }); int error = 0; - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N), KOKKOS_LAMBDA(const typename policy_t::member_type& i, int& lsum) { - lsum += ( a(i)!= (i( 0, N ), KOKKOS_LAMBDA( const typename policy_t::member_type & i, int & lsum ) { + lsum += ( a( i ) != ( i < N / 2 ? 1 : 10000 ) ); + }, error ); + ASSERT_EQ( error, 0 ); - if( ( ExecSpace::concurrency()>(int)1) && (N>static_cast(4*ExecSpace::concurrency())) ) { + if ( ( ExecSpace::concurrency() > (int) 1 ) && ( N > static_cast( 4 * ExecSpace::concurrency() ) ) ) { size_t min = N; size_t max = 0; - for(int t=0; tmax) max = count(t); + for ( int t = 0; t < ExecSpace::concurrency(); t++ ) { + if ( count( t ) < min ) min = count( t ); + if ( count( t ) > max ) max = count( t ); } - ASSERT_TRUE(min2) - // ASSERT_TRUE(2*min 2 ) { + // ASSERT_TRUE( 2 * min < max ); + //} } - } { - Kokkos::View > count("Count",ExecSpace::concurrency()); - Kokkos::View a("A",N); + Kokkos::View< size_t*, ExecSpace, Kokkos::MemoryTraits > count( "Count", ExecSpace::concurrency() ); + Kokkos::View< int*, ExecSpace> a( "A", N ); int sum = 0; - Kokkos::parallel_reduce( policy_t(0,N), - KOKKOS_LAMBDA (const typename policy_t::member_type& i, int& lsum) { - for(int k=0; k<(i(0,N), KOKKOS_LAMBDA(const typename policy_t::member_type& i, int& lsum) { - lsum += ( a(i)!= (i( 0, N ), KOKKOS_LAMBDA( const typename policy_t::member_type & i, int & lsum ) { + lsum += ( a( i ) != ( i < N / 2 ? 1 : 10000 ) ); + }, error ); + ASSERT_EQ( error, 0 ); - if( ( ExecSpace::concurrency()>(int)1) && (N>static_cast(4*ExecSpace::concurrency())) ) { + if ( ( ExecSpace::concurrency() > (int) 1 ) && ( N > static_cast( 4 * ExecSpace::concurrency() ) ) ) { size_t min = N; size_t max = 0; - for(int t=0; tmax) max = count(t); + for ( int t = 0; t < ExecSpace::concurrency(); t++ ) { + if ( count( t ) < min ) min = count( t ); + if ( count( t ) > max ) max = count( t ); } - ASSERT_TRUE(min2) - // ASSERT_TRUE(2*min 2 ) { + // ASSERT_TRUE( 2 * min < max ); + //} } } - } }; -} /* namespace */ -} /* namespace Test */ - -/*--------------------------------------------------------------------------*/ +} // namespace +} // namespace Test diff --git a/lib/kokkos/core/unit_test/TestReduce.hpp b/lib/kokkos/core/unit_test/TestReduce.hpp index 645fc9e31b..7e77dadf62 100644 --- a/lib/kokkos/core/unit_test/TestReduce.hpp +++ b/lib/kokkos/core/unit_test/TestReduce.hpp @@ -48,24 +48,23 @@ #include -/*--------------------------------------------------------------------------*/ - namespace Test { -template< typename ScalarType , class DeviceType > +template< typename ScalarType, class DeviceType > class ReduceFunctor { public: - typedef DeviceType execution_space ; - typedef typename execution_space::size_type size_type ; + typedef DeviceType execution_space; + typedef typename execution_space::size_type size_type; struct value_type { - ScalarType value[3] ; + ScalarType value[3]; }; - const size_type nwork ; + const size_type nwork; - ReduceFunctor( const size_type & arg_nwork ) : nwork( arg_nwork ) {} + ReduceFunctor( const size_type & arg_nwork ) + : nwork( arg_nwork ) {} ReduceFunctor( const ReduceFunctor & rhs ) : nwork( rhs.nwork ) {} @@ -74,66 +73,63 @@ public: KOKKOS_INLINE_FUNCTION void init( value_type & dst ) const { - dst.value[0] = 0 ; - dst.value[1] = 0 ; - dst.value[2] = 0 ; + dst.value[0] = 0; + dst.value[1] = 0; + dst.value[2] = 0; } */ KOKKOS_INLINE_FUNCTION - void join( volatile value_type & dst , + void join( volatile value_type & dst, const volatile value_type & src ) const { - dst.value[0] += src.value[0] ; - dst.value[1] += src.value[1] ; - dst.value[2] += src.value[2] ; + dst.value[0] += src.value[0]; + dst.value[1] += src.value[1]; + dst.value[2] += src.value[2]; } KOKKOS_INLINE_FUNCTION - void operator()( size_type iwork , value_type & dst ) const + void operator()( size_type iwork, value_type & dst ) const { - dst.value[0] += 1 ; - dst.value[1] += iwork + 1 ; - dst.value[2] += nwork - iwork ; + dst.value[0] += 1; + dst.value[1] += iwork + 1; + dst.value[2] += nwork - iwork; } }; template< class DeviceType > -class ReduceFunctorFinal : public ReduceFunctor< long , DeviceType > { +class ReduceFunctorFinal : public ReduceFunctor< long, DeviceType > { public: - - typedef typename ReduceFunctor< long , DeviceType >::value_type value_type ; + typedef typename ReduceFunctor< long, DeviceType >::value_type value_type; ReduceFunctorFinal( const size_t n ) - : ReduceFunctor(n) - {} + : ReduceFunctor< long, DeviceType >( n ) {} KOKKOS_INLINE_FUNCTION void final( value_type & dst ) const { - dst.value[0] = - dst.value[0] ; - dst.value[1] = - dst.value[1] ; - dst.value[2] = - dst.value[2] ; + dst.value[0] = -dst.value[0]; + dst.value[1] = -dst.value[1]; + dst.value[2] = -dst.value[2]; } }; -template< typename ScalarType , class DeviceType > +template< typename ScalarType, class DeviceType > class RuntimeReduceFunctor { public: // Required for functor: - typedef DeviceType execution_space ; - typedef ScalarType value_type[] ; - const unsigned value_count ; - + typedef DeviceType execution_space; + typedef ScalarType value_type[]; + const unsigned value_count; // Unit test details: - typedef typename execution_space::size_type size_type ; + typedef typename execution_space::size_type size_type; - const size_type nwork ; + const size_type nwork; - RuntimeReduceFunctor( const size_type arg_nwork , + RuntimeReduceFunctor( const size_type arg_nwork, const size_type arg_count ) : value_count( arg_count ) , nwork( arg_nwork ) {} @@ -141,247 +137,251 @@ public: KOKKOS_INLINE_FUNCTION void init( ScalarType dst[] ) const { - for ( unsigned i = 0 ; i < value_count ; ++i ) dst[i] = 0 ; + for ( unsigned i = 0; i < value_count; ++i ) dst[i] = 0; } KOKKOS_INLINE_FUNCTION - void join( volatile ScalarType dst[] , + void join( volatile ScalarType dst[], const volatile ScalarType src[] ) const { - for ( unsigned i = 0 ; i < value_count ; ++i ) dst[i] += src[i] ; + for ( unsigned i = 0; i < value_count; ++i ) dst[i] += src[i]; } KOKKOS_INLINE_FUNCTION - void operator()( size_type iwork , ScalarType dst[] ) const + void operator()( size_type iwork, ScalarType dst[] ) const { - const size_type tmp[3] = { 1 , iwork + 1 , nwork - iwork }; + const size_type tmp[3] = { 1, iwork + 1, nwork - iwork }; - for ( size_type i = 0 ; i < value_count ; ++i ) { + for ( size_type i = 0; i < value_count; ++i ) { dst[i] += tmp[ i % 3 ]; } } }; -template< typename ScalarType , class DeviceType > +template< typename ScalarType, class DeviceType > class RuntimeReduceMinMax { public: // Required for functor: - typedef DeviceType execution_space ; - typedef ScalarType value_type[] ; - const unsigned value_count ; + typedef DeviceType execution_space; + typedef ScalarType value_type[]; + const unsigned value_count; // Unit test details: - typedef typename execution_space::size_type size_type ; + typedef typename execution_space::size_type size_type; - const size_type nwork ; - const ScalarType amin ; - const ScalarType amax ; + const size_type nwork; + const ScalarType amin; + const ScalarType amax; - RuntimeReduceMinMax( const size_type arg_nwork , + RuntimeReduceMinMax( const size_type arg_nwork, const size_type arg_count ) : value_count( arg_count ) , nwork( arg_nwork ) - , amin( std::numeric_limits::min() ) - , amax( std::numeric_limits::max() ) + , amin( std::numeric_limits< ScalarType >::min() ) + , amax( std::numeric_limits< ScalarType >::max() ) {} KOKKOS_INLINE_FUNCTION void init( ScalarType dst[] ) const { - for ( unsigned i = 0 ; i < value_count ; ++i ) { - dst[i] = i % 2 ? amax : amin ; + for ( unsigned i = 0; i < value_count; ++i ) { + dst[i] = i % 2 ? amax : amin; } } KOKKOS_INLINE_FUNCTION - void join( volatile ScalarType dst[] , + void join( volatile ScalarType dst[], const volatile ScalarType src[] ) const { - for ( unsigned i = 0 ; i < value_count ; ++i ) { + for ( unsigned i = 0; i < value_count; ++i ) { dst[i] = i % 2 ? ( dst[i] < src[i] ? dst[i] : src[i] ) // min : ( dst[i] > src[i] ? dst[i] : src[i] ); // max } } KOKKOS_INLINE_FUNCTION - void operator()( size_type iwork , ScalarType dst[] ) const + void operator()( size_type iwork, ScalarType dst[] ) const { - const ScalarType tmp[2] = { ScalarType(iwork + 1) - , ScalarType(nwork - iwork) }; + const ScalarType tmp[2] = { ScalarType( iwork + 1 ) + , ScalarType( nwork - iwork ) }; - for ( size_type i = 0 ; i < value_count ; ++i ) { - dst[i] = i % 2 ? ( dst[i] < tmp[i%2] ? dst[i] : tmp[i%2] ) - : ( dst[i] > tmp[i%2] ? dst[i] : tmp[i%2] ); + for ( size_type i = 0; i < value_count; ++i ) { + dst[i] = i % 2 ? ( dst[i] < tmp[i % 2] ? dst[i] : tmp[i % 2] ) + : ( dst[i] > tmp[i % 2] ? dst[i] : tmp[i % 2] ); } } }; template< class DeviceType > -class RuntimeReduceFunctorFinal : public RuntimeReduceFunctor< long , DeviceType > { +class RuntimeReduceFunctorFinal : public RuntimeReduceFunctor< long, DeviceType > { public: + typedef RuntimeReduceFunctor< long, DeviceType > base_type; + typedef typename base_type::value_type value_type; + typedef long scalar_type; - typedef RuntimeReduceFunctor< long , DeviceType > base_type ; - typedef typename base_type::value_type value_type ; - typedef long scalar_type ; - - RuntimeReduceFunctorFinal( const size_t theNwork , const size_t count ) : base_type(theNwork,count) {} + RuntimeReduceFunctorFinal( const size_t theNwork, const size_t count ) + : base_type( theNwork, count ) {} KOKKOS_INLINE_FUNCTION void final( value_type dst ) const { - for ( unsigned i = 0 ; i < base_type::value_count ; ++i ) { - dst[i] = - dst[i] ; + for ( unsigned i = 0; i < base_type::value_count; ++i ) { + dst[i] = -dst[i]; } } }; + } // namespace Test namespace { -template< typename ScalarType , class DeviceType > +template< typename ScalarType, class DeviceType > class TestReduce { public: - typedef DeviceType execution_space ; - typedef typename execution_space::size_type size_type ; - - //------------------------------------ + typedef DeviceType execution_space; + typedef typename execution_space::size_type size_type; TestReduce( const size_type & nwork ) { - run_test(nwork); - run_test_final(nwork); + run_test( nwork ); + run_test_final( nwork ); } void run_test( const size_type & nwork ) { - typedef Test::ReduceFunctor< ScalarType , execution_space > functor_type ; - typedef typename functor_type::value_type value_type ; + typedef Test::ReduceFunctor< ScalarType, execution_space > functor_type; + typedef typename functor_type::value_type value_type; enum { Count = 3 }; enum { Repeat = 100 }; value_type result[ Repeat ]; - const unsigned long nw = nwork ; - const unsigned long nsum = nw % 2 ? nw * (( nw + 1 )/2 ) - : (nw/2) * ( nw + 1 ); + const unsigned long nw = nwork; + const unsigned long nsum = nw % 2 ? nw * ( ( nw + 1 ) / 2 ) + : ( nw / 2 ) * ( nw + 1 ); - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - Kokkos::parallel_reduce( nwork , functor_type(nwork) , result[i] ); + for ( unsigned i = 0; i < Repeat; ++i ) { + Kokkos::parallel_reduce( nwork, functor_type( nwork ), result[i] ); } - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - for ( unsigned j = 0 ; j < Count ; ++j ) { - const unsigned long correct = 0 == j % 3 ? nw : nsum ; - ASSERT_EQ( (ScalarType) correct , result[i].value[j] ); + for ( unsigned i = 0; i < Repeat; ++i ) { + for ( unsigned j = 0; j < Count; ++j ) { + const unsigned long correct = 0 == j % 3 ? nw : nsum; + ASSERT_EQ( (ScalarType) correct, result[i].value[j] ); } } } void run_test_final( const size_type & nwork ) { - typedef Test::ReduceFunctorFinal< execution_space > functor_type ; - typedef typename functor_type::value_type value_type ; + typedef Test::ReduceFunctorFinal< execution_space > functor_type; + typedef typename functor_type::value_type value_type; enum { Count = 3 }; enum { Repeat = 100 }; value_type result[ Repeat ]; - const unsigned long nw = nwork ; - const unsigned long nsum = nw % 2 ? nw * (( nw + 1 )/2 ) - : (nw/2) * ( nw + 1 ); + const unsigned long nw = nwork; + const unsigned long nsum = nw % 2 ? nw * ( ( nw + 1 ) / 2 ) + : ( nw / 2 ) * ( nw + 1 ); - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - if(i%2==0) - Kokkos::parallel_reduce( nwork , functor_type(nwork) , result[i] ); - else - Kokkos::parallel_reduce( "Reduce", nwork , functor_type(nwork) , result[i] ); + for ( unsigned i = 0; i < Repeat; ++i ) { + if ( i % 2 == 0 ) { + Kokkos::parallel_reduce( nwork, functor_type( nwork ), result[i] ); + } + else { + Kokkos::parallel_reduce( "Reduce", nwork, functor_type( nwork ), result[i] ); + } } - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - for ( unsigned j = 0 ; j < Count ; ++j ) { - const unsigned long correct = 0 == j % 3 ? nw : nsum ; - ASSERT_EQ( (ScalarType) correct , - result[i].value[j] ); + for ( unsigned i = 0; i < Repeat; ++i ) { + for ( unsigned j = 0; j < Count; ++j ) { + const unsigned long correct = 0 == j % 3 ? nw : nsum; + ASSERT_EQ( (ScalarType) correct, -result[i].value[j] ); } } } }; -template< typename ScalarType , class DeviceType > +template< typename ScalarType, class DeviceType > class TestReduceDynamic { public: - typedef DeviceType execution_space ; - typedef typename execution_space::size_type size_type ; - - //------------------------------------ + typedef DeviceType execution_space; + typedef typename execution_space::size_type size_type; TestReduceDynamic( const size_type nwork ) { - run_test_dynamic(nwork); - run_test_dynamic_minmax(nwork); - run_test_dynamic_final(nwork); + run_test_dynamic( nwork ); + run_test_dynamic_minmax( nwork ); + run_test_dynamic_final( nwork ); } void run_test_dynamic( const size_type nwork ) { - typedef Test::RuntimeReduceFunctor< ScalarType , execution_space > functor_type ; + typedef Test::RuntimeReduceFunctor< ScalarType, execution_space > functor_type; enum { Count = 3 }; enum { Repeat = 100 }; - ScalarType result[ Repeat ][ Count ] ; + ScalarType result[ Repeat ][ Count ]; - const unsigned long nw = nwork ; - const unsigned long nsum = nw % 2 ? nw * (( nw + 1 )/2 ) - : (nw/2) * ( nw + 1 ); + const unsigned long nw = nwork; + const unsigned long nsum = nw % 2 ? nw * ( ( nw + 1 ) / 2 ) + : ( nw / 2 ) * ( nw + 1 ); - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - if(i%2==0) - Kokkos::parallel_reduce( nwork , functor_type(nwork,Count) , result[i] ); - else - Kokkos::parallel_reduce( "Reduce", nwork , functor_type(nwork,Count) , result[i] ); + for ( unsigned i = 0; i < Repeat; ++i ) { + if ( i % 2 == 0 ) { + Kokkos::parallel_reduce( nwork, functor_type( nwork, Count ), result[i] ); + } + else { + Kokkos::parallel_reduce( "Reduce", nwork, functor_type( nwork, Count ), result[i] ); + } } - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - for ( unsigned j = 0 ; j < Count ; ++j ) { - const unsigned long correct = 0 == j % 3 ? nw : nsum ; - ASSERT_EQ( (ScalarType) correct , result[i][j] ); + for ( unsigned i = 0; i < Repeat; ++i ) { + for ( unsigned j = 0; j < Count; ++j ) { + const unsigned long correct = 0 == j % 3 ? nw : nsum; + ASSERT_EQ( (ScalarType) correct, result[i][j] ); } } } void run_test_dynamic_minmax( const size_type nwork ) { - typedef Test::RuntimeReduceMinMax< ScalarType , execution_space > functor_type ; + typedef Test::RuntimeReduceMinMax< ScalarType, execution_space > functor_type; enum { Count = 2 }; enum { Repeat = 100 }; - ScalarType result[ Repeat ][ Count ] ; + ScalarType result[ Repeat ][ Count ]; - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - if(i%2==0) - Kokkos::parallel_reduce( nwork , functor_type(nwork,Count) , result[i] ); - else - Kokkos::parallel_reduce( "Reduce", nwork , functor_type(nwork,Count) , result[i] ); + for ( unsigned i = 0; i < Repeat; ++i ) { + if ( i % 2 == 0 ) { + Kokkos::parallel_reduce( nwork, functor_type( nwork, Count ), result[i] ); + } + else { + Kokkos::parallel_reduce( "Reduce", nwork, functor_type( nwork, Count ), result[i] ); + } } - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - for ( unsigned j = 0 ; j < Count ; ++j ) { + for ( unsigned i = 0; i < Repeat; ++i ) { + for ( unsigned j = 0; j < Count; ++j ) { if ( nwork == 0 ) { - ScalarType amin( std::numeric_limits::min() ); - ScalarType amax( std::numeric_limits::max() ); - const ScalarType correct = (j%2) ? amax : amin; - ASSERT_EQ( (ScalarType) correct , result[i][j] ); - } else { - const unsigned long correct = j % 2 ? 1 : nwork ; - ASSERT_EQ( (ScalarType) correct , result[i][j] ); + ScalarType amin( std::numeric_limits< ScalarType >::min() ); + ScalarType amax( std::numeric_limits< ScalarType >::max() ); + const ScalarType correct = ( j % 2 ) ? amax : amin; + ASSERT_EQ( (ScalarType) correct, result[i][j] ); + } + else { + const unsigned long correct = j % 2 ? 1 : nwork; + ASSERT_EQ( (ScalarType) correct, result[i][j] ); } } } @@ -389,169 +389,172 @@ public: void run_test_dynamic_final( const size_type nwork ) { - typedef Test::RuntimeReduceFunctorFinal< execution_space > functor_type ; + typedef Test::RuntimeReduceFunctorFinal< execution_space > functor_type; enum { Count = 3 }; enum { Repeat = 100 }; - typename functor_type::scalar_type result[ Repeat ][ Count ] ; + typename functor_type::scalar_type result[ Repeat ][ Count ]; - const unsigned long nw = nwork ; - const unsigned long nsum = nw % 2 ? nw * (( nw + 1 )/2 ) - : (nw/2) * ( nw + 1 ); + const unsigned long nw = nwork; + const unsigned long nsum = nw % 2 ? nw * ( ( nw + 1 ) / 2 ) + : ( nw / 2 ) * ( nw + 1 ); - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - if(i%2==0) - Kokkos::parallel_reduce( nwork , functor_type(nwork,Count) , result[i] ); - else - Kokkos::parallel_reduce( "TestKernelReduce" , nwork , functor_type(nwork,Count) , result[i] ); + for ( unsigned i = 0; i < Repeat; ++i ) { + if ( i % 2 == 0 ) { + Kokkos::parallel_reduce( nwork, functor_type( nwork, Count ), result[i] ); + } + else { + Kokkos::parallel_reduce( "TestKernelReduce", nwork, functor_type( nwork, Count ), result[i] ); + } } - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - for ( unsigned j = 0 ; j < Count ; ++j ) { - const unsigned long correct = 0 == j % 3 ? nw : nsum ; - ASSERT_EQ( (ScalarType) correct , - result[i][j] ); + for ( unsigned i = 0; i < Repeat; ++i ) { + for ( unsigned j = 0; j < Count; ++j ) { + const unsigned long correct = 0 == j % 3 ? nw : nsum; + ASSERT_EQ( (ScalarType) correct, -result[i][j] ); } } } }; -template< typename ScalarType , class DeviceType > +template< typename ScalarType, class DeviceType > class TestReduceDynamicView { public: - typedef DeviceType execution_space ; - typedef typename execution_space::size_type size_type ; - - //------------------------------------ + typedef DeviceType execution_space; + typedef typename execution_space::size_type size_type; TestReduceDynamicView( const size_type nwork ) { - run_test_dynamic_view(nwork); + run_test_dynamic_view( nwork ); } void run_test_dynamic_view( const size_type nwork ) { - typedef Test::RuntimeReduceFunctor< ScalarType , execution_space > functor_type ; + typedef Test::RuntimeReduceFunctor< ScalarType, execution_space > functor_type; - typedef Kokkos::View< ScalarType* , DeviceType > result_type ; - typedef typename result_type::HostMirror result_host_type ; + typedef Kokkos::View< ScalarType*, DeviceType > result_type; + typedef typename result_type::HostMirror result_host_type; - const unsigned CountLimit = 23 ; + const unsigned CountLimit = 23; - const unsigned long nw = nwork ; - const unsigned long nsum = nw % 2 ? nw * (( nw + 1 )/2 ) - : (nw/2) * ( nw + 1 ); + const unsigned long nw = nwork; + const unsigned long nsum = nw % 2 ? nw * ( ( nw + 1 ) / 2 ) + : ( nw / 2 ) * ( nw + 1 ); - for ( unsigned count = 0 ; count < CountLimit ; ++count ) { + for ( unsigned count = 0; count < CountLimit; ++count ) { - result_type result("result",count); + result_type result( "result", count ); result_host_type host_result = Kokkos::create_mirror( result ); // Test result to host pointer: - std::string str("TestKernelReduce"); - if(count%2==0) - Kokkos::parallel_reduce( nw , functor_type(nw,count) , host_result.ptr_on_device() ); - else - Kokkos::parallel_reduce( str , nw , functor_type(nw,count) , host_result.ptr_on_device() ); + std::string str( "TestKernelReduce" ); + if ( count % 2 == 0 ) { + Kokkos::parallel_reduce( nw, functor_type( nw, count ), host_result.ptr_on_device() ); + } + else { + Kokkos::parallel_reduce( str, nw, functor_type( nw, count ), host_result.ptr_on_device() ); + } - for ( unsigned j = 0 ; j < count ; ++j ) { - const unsigned long correct = 0 == j % 3 ? nw : nsum ; - ASSERT_EQ( host_result(j), (ScalarType) correct ); - host_result(j) = 0 ; + for ( unsigned j = 0; j < count; ++j ) { + const unsigned long correct = 0 == j % 3 ? nw : nsum; + ASSERT_EQ( host_result( j ), (ScalarType) correct ); + host_result( j ) = 0; } } } }; -} + +} // namespace // Computes y^T*A*x -// (modified from kokkos-tutorials/GTC2016/Exercises/ThreeLevelPar ) +// ( modified from kokkos-tutorials/GTC2016/Exercises/ThreeLevelPar ) #if ( ! defined( KOKKOS_ENABLE_CUDA ) ) || defined( KOKKOS_ENABLE_CUDA_LAMBDA ) -template< typename ScalarType , class DeviceType > +template< typename ScalarType, class DeviceType > class TestTripleNestedReduce { public: - typedef DeviceType execution_space ; - typedef typename execution_space::size_type size_type ; + typedef DeviceType execution_space; + typedef typename execution_space::size_type size_type; - //------------------------------------ - - TestTripleNestedReduce( const size_type & nrows , const size_type & ncols - , const size_type & team_size , const size_type & vector_length ) + TestTripleNestedReduce( const size_type & nrows, const size_type & ncols + , const size_type & team_size, const size_type & vector_length ) { - run_test( nrows , ncols , team_size, vector_length ); + run_test( nrows, ncols, team_size, vector_length ); } - void run_test( const size_type & nrows , const size_type & ncols + void run_test( const size_type & nrows, const size_type & ncols , const size_type & team_size, const size_type & vector_length ) { //typedef Kokkos::LayoutLeft Layout; typedef Kokkos::LayoutRight Layout; - typedef Kokkos::View ViewVector; - typedef Kokkos::View ViewMatrix; - ViewVector y( "y" , nrows ); - ViewVector x( "x" , ncols ); - ViewMatrix A( "A" , nrows , ncols ); + typedef Kokkos::View< ScalarType*, DeviceType > ViewVector; + typedef Kokkos::View< ScalarType**, Layout, DeviceType > ViewMatrix; + + ViewVector y( "y", nrows ); + ViewVector x( "x", ncols ); + ViewMatrix A( "A", nrows, ncols ); typedef Kokkos::RangePolicy range_policy; - // Initialize y vector - Kokkos::parallel_for( range_policy( 0 , nrows ) , KOKKOS_LAMBDA( const int i ) { y( i ) = 1; } ); + // Initialize y vector. + Kokkos::parallel_for( range_policy( 0, nrows ), KOKKOS_LAMBDA ( const int i ) { y( i ) = 1; } ); - // Initialize x vector - Kokkos::parallel_for( range_policy( 0 , ncols ) , KOKKOS_LAMBDA( const int i ) { x( i ) = 1; } ); + // Initialize x vector. + Kokkos::parallel_for( range_policy( 0, ncols ), KOKKOS_LAMBDA ( const int i ) { x( i ) = 1; } ); - typedef Kokkos::TeamPolicy team_policy; - typedef typename Kokkos::TeamPolicy::member_type member_type; + typedef Kokkos::TeamPolicy< DeviceType > team_policy; + typedef typename Kokkos::TeamPolicy< DeviceType >::member_type member_type; - // Initialize A matrix, note 2D indexing computation - Kokkos::parallel_for( team_policy( nrows , Kokkos::AUTO ) , KOKKOS_LAMBDA( const member_type& teamMember ) { + // Initialize A matrix, note 2D indexing computation. + Kokkos::parallel_for( team_policy( nrows, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type & teamMember ) { const int j = teamMember.league_rank(); - Kokkos::parallel_for( Kokkos::TeamThreadRange( teamMember , ncols ) , [&] ( const int i ) { - A( j , i ) = 1; + Kokkos::parallel_for( Kokkos::TeamThreadRange( teamMember, ncols ), [&] ( const int i ) { + A( j, i ) = 1; } ); } ); - // Three level parallelism kernel to force caching of vector x + // Three level parallelism kernel to force caching of vector x. ScalarType result = 0.0; int chunk_size = 128; - Kokkos::parallel_reduce( team_policy( nrows/chunk_size , team_size , vector_length ) , KOKKOS_LAMBDA ( const member_type& teamMember , double &update ) { + Kokkos::parallel_reduce( team_policy( nrows / chunk_size, team_size, vector_length ), + KOKKOS_LAMBDA ( const member_type & teamMember, double & update ) { const int row_start = teamMember.league_rank() * chunk_size; const int row_end = row_start + chunk_size; - Kokkos::parallel_for( Kokkos::TeamThreadRange( teamMember , row_start , row_end ) , [&] ( const int i ) { + Kokkos::parallel_for( Kokkos::TeamThreadRange( teamMember, row_start, row_end ), [&] ( const int i ) { ScalarType sum_i = 0.0; - Kokkos::parallel_reduce( Kokkos::ThreadVectorRange( teamMember , ncols ) , [&] ( const int j , ScalarType &innerUpdate ) { - innerUpdate += A( i , j ) * x( j ); - } , sum_i ); - Kokkos::single( Kokkos::PerThread( teamMember ) , [&] () { + Kokkos::parallel_reduce( Kokkos::ThreadVectorRange( teamMember, ncols ), [&] ( const int j, ScalarType &innerUpdate ) { + innerUpdate += A( i, j ) * x( j ); + }, sum_i ); + Kokkos::single( Kokkos::PerThread( teamMember ), [&] () { update += y( i ) * sum_i; } ); } ); - } , result ); + }, result ); - const ScalarType solution= ( ScalarType ) nrows * ( ScalarType ) ncols; - ASSERT_EQ( solution , result ); + const ScalarType solution = (ScalarType) nrows * (ScalarType) ncols; + ASSERT_EQ( solution, result ); } }; -#else /* #if ( ! defined( KOKKOS_ENABLE_CUDA ) ) || defined( KOKKOS_ENABLE_CUDA_LAMBDA ) */ +#else // #if ( ! defined( KOKKOS_ENABLE_CUDA ) ) || defined( KOKKOS_ENABLE_CUDA_LAMBDA ) -template< typename ScalarType , class DeviceType > +template< typename ScalarType, class DeviceType > class TestTripleNestedReduce { public: - typedef DeviceType execution_space ; - typedef typename execution_space::size_type size_type ; + typedef DeviceType execution_space; + typedef typename execution_space::size_type size_type; - TestTripleNestedReduce( const size_type & , const size_type - , const size_type & , const size_type ) - { } + TestTripleNestedReduce( const size_type &, const size_type + , const size_type &, const size_type ) + {} }; #endif @@ -559,38 +562,38 @@ public: //-------------------------------------------------------------------------- namespace Test { + namespace ReduceCombinatorical { -template +template< class Scalar, class Space = Kokkos::HostSpace > struct AddPlus { public: - //Required + // Required. typedef AddPlus reducer_type; typedef Scalar value_type; - typedef Kokkos::View > result_view_type; + typedef Kokkos::View< value_type, Space, Kokkos::MemoryTraits > result_view_type; private: result_view_type result; public: + AddPlus( value_type & result_ ) : result( &result_ ) {} - AddPlus(value_type& result_):result(&result_) {} - - //Required + // Required. KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { + void join( value_type & dest, const value_type & src ) const { dest += src + 1; } KOKKOS_INLINE_FUNCTION - void join(volatile value_type& dest, const volatile value_type& src) const { + void join( volatile value_type & dest, const volatile value_type & src ) const { dest += src + 1; } - //Optional + // Optional. KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { + void init( value_type & val ) const { val = value_type(); } @@ -599,624 +602,651 @@ public: } }; -template +template< int ISTEAM > struct FunctorScalar; template<> -struct FunctorScalar<0>{ - FunctorScalar(Kokkos::View r):result(r) {} - Kokkos::View result; +struct FunctorScalar< 0 > { + Kokkos::View< double > result; + + FunctorScalar( Kokkos::View< double > r ) : result( r ) {} KOKKOS_INLINE_FUNCTION - void operator() (const int& i,double& update) const { - update+=i; + void operator()( const int & i, double & update ) const { + update += i; } }; template<> -struct FunctorScalar<1>{ - FunctorScalar(Kokkos::View r):result(r) {} - Kokkos::View result; - +struct FunctorScalar< 1 > { typedef Kokkos::TeamPolicy<>::member_type team_type; + + Kokkos::View< double > result; + + FunctorScalar( Kokkos::View< double > r ) : result( r ) {} + KOKKOS_INLINE_FUNCTION - void operator() (const team_type& team,double& update) const { - update+=1.0/team.team_size()*team.league_rank(); + void operator()( const team_type & team, double & update ) const { + update += 1.0 / team.team_size() * team.league_rank(); } }; -template +template< int ISTEAM > struct FunctorScalarInit; template<> -struct FunctorScalarInit<0> { - FunctorScalarInit(Kokkos::View r):result(r) {} +struct FunctorScalarInit< 0 > { + Kokkos::View< double > result; - Kokkos::View result; + FunctorScalarInit( Kokkos::View< double > r ) : result( r ) {} KOKKOS_INLINE_FUNCTION - void operator() (const int& i, double& update) const { + void operator()( const int & i, double & update ) const { update += i; } KOKKOS_INLINE_FUNCTION - void init(double& update) const { + void init( double & update ) const { update = 0.0; } }; template<> -struct FunctorScalarInit<1> { - FunctorScalarInit(Kokkos::View r):result(r) {} +struct FunctorScalarInit< 1 > { + typedef Kokkos::TeamPolicy<>::member_type team_type; - Kokkos::View result; + Kokkos::View< double > result; + + FunctorScalarInit( Kokkos::View< double > r ) : result( r ) {} - typedef Kokkos::TeamPolicy<>::member_type team_type; KOKKOS_INLINE_FUNCTION - void operator() (const team_type& team,double& update) const { - update+=1.0/team.team_size()*team.league_rank(); + void operator()( const team_type & team, double & update ) const { + update += 1.0 / team.team_size() * team.league_rank(); } KOKKOS_INLINE_FUNCTION - void init(double& update) const { + void init( double & update ) const { update = 0.0; } }; -template +template< int ISTEAM > struct FunctorScalarFinal; - template<> -struct FunctorScalarFinal<0> { - FunctorScalarFinal(Kokkos::View r):result(r) {} - +struct FunctorScalarFinal< 0 > { Kokkos::View result; + + FunctorScalarFinal( Kokkos::View< double > r ) : result( r ) {} + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, double& update) const { + void operator()( const int & i, double & update ) const { update += i; } KOKKOS_INLINE_FUNCTION - void final(double& update) const { + void final( double & update ) const { result() = update; } }; template<> -struct FunctorScalarFinal<1> { - FunctorScalarFinal(Kokkos::View r):result(r) {} +struct FunctorScalarFinal< 1 > { + typedef Kokkos::TeamPolicy<>::member_type team_type; - Kokkos::View result; + Kokkos::View< double > result; - typedef Kokkos::TeamPolicy<>::member_type team_type; + FunctorScalarFinal( Kokkos::View< double > r ) : result( r ) {} KOKKOS_INLINE_FUNCTION - void operator() (const team_type& team, double& update) const { - update+=1.0/team.team_size()*team.league_rank(); + void operator()( const team_type & team, double & update ) const { + update += 1.0 / team.team_size() * team.league_rank(); } + KOKKOS_INLINE_FUNCTION - void final(double& update) const { + void final( double & update ) const { result() = update; } }; -template +template< int ISTEAM > struct FunctorScalarJoin; template<> -struct FunctorScalarJoin<0> { - FunctorScalarJoin(Kokkos::View r):result(r) {} - +struct FunctorScalarJoin< 0 > { Kokkos::View result; + + FunctorScalarJoin( Kokkos::View< double > r ) : result( r ) {} + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, double& update) const { + void operator()( const int & i, double & update ) const { update += i; } KOKKOS_INLINE_FUNCTION - void join(volatile double& dst, const volatile double& update) const { + void join( volatile double & dst, const volatile double & update ) const { dst += update; } }; template<> -struct FunctorScalarJoin<1> { - FunctorScalarJoin(Kokkos::View r):result(r) {} +struct FunctorScalarJoin< 1 > { + typedef Kokkos::TeamPolicy<>::member_type team_type; - Kokkos::View result; + Kokkos::View< double > result; + + FunctorScalarJoin( Kokkos::View< double > r ) : result( r ) {} - typedef Kokkos::TeamPolicy<>::member_type team_type; KOKKOS_INLINE_FUNCTION - void operator() (const team_type& team,double& update) const { - update+=1.0/team.team_size()*team.league_rank(); + void operator()( const team_type & team, double & update ) const { + update += 1.0 / team.team_size() * team.league_rank(); } KOKKOS_INLINE_FUNCTION - void join(volatile double& dst, const volatile double& update) const { + void join( volatile double & dst, const volatile double & update ) const { dst += update; } }; -template +template< int ISTEAM > struct FunctorScalarJoinFinal; template<> -struct FunctorScalarJoinFinal<0> { - FunctorScalarJoinFinal(Kokkos::View r):result(r) {} +struct FunctorScalarJoinFinal< 0 > { + Kokkos::View< double > result; + + FunctorScalarJoinFinal( Kokkos::View< double > r ) : result( r ) {} - Kokkos::View result; KOKKOS_INLINE_FUNCTION - void operator() (const int& i, double& update) const { + void operator()( const int & i, double & update ) const { update += i; } KOKKOS_INLINE_FUNCTION - void join(volatile double& dst, const volatile double& update) const { + void join( volatile double & dst, const volatile double & update ) const { dst += update; } KOKKOS_INLINE_FUNCTION - void final(double& update) const { + void final( double & update ) const { result() = update; } }; template<> -struct FunctorScalarJoinFinal<1> { - FunctorScalarJoinFinal(Kokkos::View r):result(r) {} +struct FunctorScalarJoinFinal< 1 > { + typedef Kokkos::TeamPolicy<>::member_type team_type; - Kokkos::View result; + Kokkos::View< double > result; + + FunctorScalarJoinFinal( Kokkos::View< double > r ) : result( r ) {} - typedef Kokkos::TeamPolicy<>::member_type team_type; KOKKOS_INLINE_FUNCTION - void operator() (const team_type& team,double& update) const { - update+=1.0/team.team_size()*team.league_rank(); + void operator()( const team_type & team, double & update ) const { + update += 1.0 / team.team_size() * team.league_rank(); } KOKKOS_INLINE_FUNCTION - void join(volatile double& dst, const volatile double& update) const { + void join( volatile double & dst, const volatile double & update ) const { dst += update; } KOKKOS_INLINE_FUNCTION - void final(double& update) const { + void final( double & update ) const { result() = update; } }; -template +template< int ISTEAM > struct FunctorScalarJoinInit; template<> -struct FunctorScalarJoinInit<0> { - FunctorScalarJoinInit(Kokkos::View r):result(r) {} +struct FunctorScalarJoinInit< 0 > { + Kokkos::View< double > result; + + FunctorScalarJoinInit( Kokkos::View< double > r ) : result( r ) {} - Kokkos::View result; KOKKOS_INLINE_FUNCTION - void operator() (const int& i, double& update) const { + void operator()( const int & i, double & update ) const { update += i; } KOKKOS_INLINE_FUNCTION - void join(volatile double& dst, const volatile double& update) const { + void join( volatile double & dst, const volatile double & update ) const { dst += update; } KOKKOS_INLINE_FUNCTION - void init(double& update) const { + void init( double & update ) const { update = 0.0; } }; template<> -struct FunctorScalarJoinInit<1> { - FunctorScalarJoinInit(Kokkos::View r):result(r) {} +struct FunctorScalarJoinInit< 1 > { + typedef Kokkos::TeamPolicy<>::member_type team_type; - Kokkos::View result; + Kokkos::View< double > result; + + FunctorScalarJoinInit( Kokkos::View< double > r ) : result( r ) {} - typedef Kokkos::TeamPolicy<>::member_type team_type; KOKKOS_INLINE_FUNCTION - void operator() (const team_type& team,double& update) const { - update+=1.0/team.team_size()*team.league_rank(); + void operator()( const team_type & team, double & update ) const { + update += 1.0 / team.team_size() * team.league_rank(); } KOKKOS_INLINE_FUNCTION - void join(volatile double& dst, const volatile double& update) const { + void join( volatile double & dst, const volatile double & update ) const { dst += update; } KOKKOS_INLINE_FUNCTION - void init(double& update) const { + void init( double & update ) const { update = 0.0; } }; -template +template< int ISTEAM > struct FunctorScalarJoinFinalInit; template<> -struct FunctorScalarJoinFinalInit<0> { - FunctorScalarJoinFinalInit(Kokkos::View r):result(r) {} - +struct FunctorScalarJoinFinalInit< 0 > { Kokkos::View result; + FunctorScalarJoinFinalInit( Kokkos::View< double > r ) : result( r ) {} + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, double& update) const { + void operator()( const int & i, double & update ) const { update += i; } KOKKOS_INLINE_FUNCTION - void join(volatile double& dst, const volatile double& update) const { + void join( volatile double & dst, const volatile double & update ) const { dst += update; } KOKKOS_INLINE_FUNCTION - void final(double& update) const { + void final( double & update ) const { result() = update; } KOKKOS_INLINE_FUNCTION - void init(double& update) const { + void init( double & update ) const { update = 0.0; } }; template<> -struct FunctorScalarJoinFinalInit<1> { - FunctorScalarJoinFinalInit(Kokkos::View r):result(r) {} +struct FunctorScalarJoinFinalInit< 1 > { + typedef Kokkos::TeamPolicy<>::member_type team_type; - Kokkos::View result; + Kokkos::View< double > result; + + FunctorScalarJoinFinalInit( Kokkos::View< double > r ) : result( r ) {} - typedef Kokkos::TeamPolicy<>::member_type team_type; KOKKOS_INLINE_FUNCTION - void operator() (const team_type& team,double& update) const { - update+=1.0/team.team_size()*team.league_rank(); + void operator()( const team_type & team, double & update ) const { + update += 1.0 / team.team_size() * team.league_rank(); } KOKKOS_INLINE_FUNCTION - void join(volatile double& dst, const volatile double& update) const { + void join( volatile double & dst, const volatile double & update ) const { dst += update; } KOKKOS_INLINE_FUNCTION - void final(double& update) const { + void final( double & update ) const { result() = update; } KOKKOS_INLINE_FUNCTION - void init(double& update) const { + void init( double & update ) const { update = 0.0; } }; + struct Functor1 { KOKKOS_INLINE_FUNCTION - void operator() (const int& i,double& update) const { - update+=i; + void operator()( const int & i, double & update ) const { + update += i; } }; struct Functor2 { typedef double value_type[]; + const unsigned value_count; - Functor2(unsigned n):value_count(n){} + Functor2( unsigned n ) : value_count( n ) {} KOKKOS_INLINE_FUNCTION - void operator() (const unsigned& i,double update[]) const { - for(unsigned j=0;j +template< class ExecSpace = Kokkos::DefaultExecutionSpace > struct TestReduceCombinatoricalInstantiation { - template - static void CallParallelReduce(Args... args) { - Kokkos::parallel_reduce(args...); + template< class ... Args > + static void CallParallelReduce( Args... args ) { + Kokkos::parallel_reduce( args... ); } - template - static void AddReturnArgument(Args... args) { - Kokkos::View result_view("ResultView"); - double expected_result = 1000.0*999.0/2.0; + template< class ... Args > + static void AddReturnArgument( Args... args ) { + Kokkos::View< double, Kokkos::HostSpace > result_view( "ResultView" ); + double expected_result = 1000.0 * 999.0 / 2.0; double value = 0; - Kokkos::parallel_reduce(args...,value); - ASSERT_EQ(expected_result,value); + Kokkos::parallel_reduce( args..., value ); + ASSERT_EQ( expected_result, value ); result_view() = 0; - CallParallelReduce(args...,result_view); - ASSERT_EQ(expected_result,result_view()); + CallParallelReduce( args..., result_view ); + ASSERT_EQ( expected_result, result_view() ); value = 0; - CallParallelReduce(args...,Kokkos::View>(&value)); - ASSERT_EQ(expected_result,value); + CallParallelReduce( args..., Kokkos::View< double, Kokkos::HostSpace, Kokkos::MemoryTraits >( &value ) ); + ASSERT_EQ( expected_result, value ); result_view() = 0; - const Kokkos::View> result_view_const_um = result_view; - CallParallelReduce(args...,result_view_const_um); - ASSERT_EQ(expected_result,result_view_const_um()); + const Kokkos::View< double, Kokkos::HostSpace, Kokkos::MemoryTraits > result_view_const_um = result_view; + CallParallelReduce( args..., result_view_const_um ); + ASSERT_EQ( expected_result, result_view_const_um() ); value = 0; - CallParallelReduce(args...,Test::ReduceCombinatorical::AddPlus(value)); - if((Kokkos::DefaultExecutionSpace::concurrency() > 1) && (ExecSpace::concurrency()>1)) - ASSERT_TRUE(expected_result 1) || (ExecSpace::concurrency()>1)) - ASSERT_TRUE(expected_result<=value); - else - ASSERT_EQ(expected_result,value); + CallParallelReduce( args..., Test::ReduceCombinatorical::AddPlus< double >( value ) ); + if ( ( Kokkos::DefaultExecutionSpace::concurrency() > 1 ) && ( ExecSpace::concurrency() > 1 ) ) { + ASSERT_TRUE( expected_result < value ); + } + else if ( ( Kokkos::DefaultExecutionSpace::concurrency() > 1 ) || ( ExecSpace::concurrency() > 1 ) ) { + ASSERT_TRUE( expected_result <= value ); + } + else { + ASSERT_EQ( expected_result, value ); + } value = 0; - Test::ReduceCombinatorical::AddPlus add(value); - CallParallelReduce(args...,add); - if((Kokkos::DefaultExecutionSpace::concurrency() > 1) && (ExecSpace::concurrency()>1)) - ASSERT_TRUE(expected_result 1) || (ExecSpace::concurrency()>1)) - ASSERT_TRUE(expected_result<=value); - else - ASSERT_EQ(expected_result,value); + Test::ReduceCombinatorical::AddPlus< double > add( value ); + CallParallelReduce( args..., add ); + if ( ( Kokkos::DefaultExecutionSpace::concurrency() > 1 ) && ( ExecSpace::concurrency() > 1 ) ) { + ASSERT_TRUE( expected_result < value ); + } + else if ( ( Kokkos::DefaultExecutionSpace::concurrency() > 1 ) || ( ExecSpace::concurrency() > 1 ) ) { + ASSERT_TRUE( expected_result <= value ); + } + else { + ASSERT_EQ( expected_result, value ); + } } - - template - static void AddLambdaRange(void*,Args... args) { - AddReturnArgument(args..., KOKKOS_LAMBDA (const int&i , double& lsum) { + template< class ... Args > + static void AddLambdaRange( void*, Args... args ) { + AddReturnArgument( args..., KOKKOS_LAMBDA ( const int & i, double & lsum ) { lsum += i; }); } - template - static void AddLambdaTeam(void*,Args... args) { - AddReturnArgument(args..., KOKKOS_LAMBDA (const Kokkos::TeamPolicy<>::member_type& team, double& update) { - update+=1.0/team.team_size()*team.league_rank(); + template< class ... Args > + static void AddLambdaTeam( void*, Args... args ) { + AddReturnArgument( args..., KOKKOS_LAMBDA ( const Kokkos::TeamPolicy<>::member_type & team, double & update ) { + update += 1.0 / team.team_size() * team.league_rank(); }); } - template - static void AddLambdaRange(Kokkos::InvalidType,Args... args) { - } + template< class ... Args > + static void AddLambdaRange( Kokkos::InvalidType, Args... args ) {} - template - static void AddLambdaTeam(Kokkos::InvalidType,Args... args) { - } + template< class ... Args > + static void AddLambdaTeam( Kokkos::InvalidType, Args... args ) {} - template - static void AddFunctor(Args... args) { - Kokkos::View result_view("FunctorView"); - auto h_r = Kokkos::create_mirror_view(result_view); - Test::ReduceCombinatorical::FunctorScalar functor(result_view); - double expected_result = 1000.0*999.0/2.0; + template< int ISTEAM, class ... Args > + static void AddFunctor( Args... args ) { + Kokkos::View< double > result_view( "FunctorView" ); + auto h_r = Kokkos::create_mirror_view( result_view ); + Test::ReduceCombinatorical::FunctorScalar< ISTEAM > functor( result_view ); + double expected_result = 1000.0 * 999.0 / 2.0; - AddReturnArgument(args..., functor); - AddReturnArgument(args..., Test::ReduceCombinatorical::FunctorScalar(result_view)); - AddReturnArgument(args..., Test::ReduceCombinatorical::FunctorScalarInit(result_view)); - AddReturnArgument(args..., Test::ReduceCombinatorical::FunctorScalarJoin(result_view)); - AddReturnArgument(args..., Test::ReduceCombinatorical::FunctorScalarJoinInit(result_view)); + AddReturnArgument( args..., functor ); + AddReturnArgument( args..., Test::ReduceCombinatorical::FunctorScalar< ISTEAM >( result_view ) ); + AddReturnArgument( args..., Test::ReduceCombinatorical::FunctorScalarInit< ISTEAM >( result_view ) ); + AddReturnArgument( args..., Test::ReduceCombinatorical::FunctorScalarJoin< ISTEAM >( result_view ) ); + AddReturnArgument( args..., Test::ReduceCombinatorical::FunctorScalarJoinInit< ISTEAM >( result_view ) ); h_r() = 0; - Kokkos::deep_copy(result_view,h_r); - CallParallelReduce(args..., Test::ReduceCombinatorical::FunctorScalarFinal(result_view)); - Kokkos::deep_copy(h_r,result_view); - ASSERT_EQ(expected_result,h_r()); + Kokkos::deep_copy( result_view, h_r ); + CallParallelReduce( args..., Test::ReduceCombinatorical::FunctorScalarFinal< ISTEAM >( result_view ) ); + Kokkos::deep_copy( h_r, result_view ); + ASSERT_EQ( expected_result, h_r() ); h_r() = 0; - Kokkos::deep_copy(result_view,h_r); - CallParallelReduce(args..., Test::ReduceCombinatorical::FunctorScalarJoinFinal(result_view)); - Kokkos::deep_copy(h_r,result_view); - ASSERT_EQ(expected_result,h_r()); + Kokkos::deep_copy( result_view, h_r ); + CallParallelReduce( args..., Test::ReduceCombinatorical::FunctorScalarJoinFinal< ISTEAM >( result_view ) ); + Kokkos::deep_copy( h_r, result_view ); + ASSERT_EQ( expected_result, h_r() ); h_r() = 0; - Kokkos::deep_copy(result_view,h_r); - CallParallelReduce(args..., Test::ReduceCombinatorical::FunctorScalarJoinFinalInit(result_view)); - Kokkos::deep_copy(h_r,result_view); - ASSERT_EQ(expected_result,h_r()); + Kokkos::deep_copy( result_view, h_r ); + CallParallelReduce( args..., Test::ReduceCombinatorical::FunctorScalarJoinFinalInit< ISTEAM >( result_view ) ); + Kokkos::deep_copy( h_r, result_view ); + ASSERT_EQ( expected_result, h_r() ); } - template - static void AddFunctorLambdaRange(Args... args) { - AddFunctor<0,Args...>(args...); - #ifdef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA - AddLambdaRange(typename std::conditional::value,void*,Kokkos::InvalidType>::type(), args...); - #endif + template< class ... Args > + static void AddFunctorLambdaRange( Args... args ) { + AddFunctor< 0, Args... >( args... ); +#ifdef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA + AddLambdaRange( typename std::conditional< std::is_same::value, void*, Kokkos::InvalidType >::type(), args... ); +#endif } - template - static void AddFunctorLambdaTeam(Args... args) { - AddFunctor<1,Args...>(args...); - #ifdef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA - AddLambdaTeam(typename std::conditional::value,void*,Kokkos::InvalidType>::type(), args...); - #endif + template< class ... Args > + static void AddFunctorLambdaTeam( Args... args ) { + AddFunctor< 1, Args... >( args... ); +#ifdef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA + AddLambdaTeam( typename std::conditional< std::is_same::value, void*, Kokkos::InvalidType >::type(), args... ); +#endif } - template - static void AddPolicy(Args... args) { + template< class ... Args > + static void AddPolicy( Args... args ) { int N = 1000; - Kokkos::RangePolicy policy(0,N); + Kokkos::RangePolicy< ExecSpace > policy( 0, N ); - AddFunctorLambdaRange(args...,1000); - AddFunctorLambdaRange(args...,N); - AddFunctorLambdaRange(args...,policy); - AddFunctorLambdaRange(args...,Kokkos::RangePolicy(0,N)); - AddFunctorLambdaRange(args...,Kokkos::RangePolicy >(0,N)); - AddFunctorLambdaRange(args...,Kokkos::RangePolicy >(0,N).set_chunk_size(10)); - AddFunctorLambdaRange(args...,Kokkos::RangePolicy >(0,N).set_chunk_size(10)); + AddFunctorLambdaRange( args..., 1000 ); + AddFunctorLambdaRange( args..., N ); + AddFunctorLambdaRange( args..., policy ); + AddFunctorLambdaRange( args..., Kokkos::RangePolicy< ExecSpace >( 0, N ) ); + AddFunctorLambdaRange( args..., Kokkos::RangePolicy< ExecSpace, Kokkos::Schedule >( 0, N ) ); + AddFunctorLambdaRange( args..., Kokkos::RangePolicy< ExecSpace, Kokkos::Schedule >( 0, N ).set_chunk_size( 10 ) ); + AddFunctorLambdaRange( args..., Kokkos::RangePolicy< ExecSpace, Kokkos::Schedule >( 0, N ).set_chunk_size( 10 ) ); - AddFunctorLambdaTeam(args...,Kokkos::TeamPolicy(N,Kokkos::AUTO)); - AddFunctorLambdaTeam(args...,Kokkos::TeamPolicy >(N,Kokkos::AUTO)); - AddFunctorLambdaTeam(args...,Kokkos::TeamPolicy >(N,Kokkos::AUTO).set_chunk_size(10)); - AddFunctorLambdaTeam(args...,Kokkos::TeamPolicy >(N,Kokkos::AUTO).set_chunk_size(10)); + AddFunctorLambdaTeam( args..., Kokkos::TeamPolicy< ExecSpace >( N, Kokkos::AUTO ) ); + AddFunctorLambdaTeam( args..., Kokkos::TeamPolicy< ExecSpace, Kokkos::Schedule >( N, Kokkos::AUTO ) ); + AddFunctorLambdaTeam( args..., Kokkos::TeamPolicy< ExecSpace, Kokkos::Schedule >( N, Kokkos::AUTO ).set_chunk_size( 10 ) ); + AddFunctorLambdaTeam( args..., Kokkos::TeamPolicy< ExecSpace, Kokkos::Schedule >( N, Kokkos::AUTO ).set_chunk_size( 10 ) ); } - static void execute_a() { AddPolicy(); } static void execute_b() { - std::string s("Std::String"); - AddPolicy(s.c_str()); - AddPolicy("Char Constant"); + std::string s( "Std::String" ); + AddPolicy( s.c_str() ); + AddPolicy( "Char Constant" ); } static void execute_c() { - std::string s("Std::String"); - AddPolicy(s); + std::string s( "Std::String" ); + AddPolicy( s ); } }; -template +template< class Scalar, class ExecSpace = Kokkos::DefaultExecutionSpace > struct TestReducers { - struct SumFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, Scalar& value) const { - value += values(i); + void operator()( const int & i, Scalar & value ) const { + value += values( i ); } }; struct ProdFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, Scalar& value) const { - value *= values(i); + void operator()( const int & i, Scalar & value ) const { + value *= values( i ); } }; struct MinFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, Scalar& value) const { - if(values(i) < value) - value = values(i); + void operator()( const int & i, Scalar & value ) const { + if ( values( i ) < value ) value = values( i ); } }; struct MaxFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, Scalar& value) const { - if(values(i) > value) - value = values(i); + void operator()( const int & i, Scalar & value ) const { + if ( values( i ) > value ) value = values( i ); } }; struct MinLocFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, - typename Kokkos::Experimental::MinLoc::value_type& value) const { - if(values(i) < value.val) { - value.val = values(i); + void operator()( const int & i, typename Kokkos::Experimental::MinLoc< Scalar, int >::value_type & value ) const { + if ( values( i ) < value.val ) { + value.val = values( i ); value.loc = i; } } }; struct MaxLocFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, - typename Kokkos::Experimental::MaxLoc::value_type& value) const { - if(values(i) > value.val) { - value.val = values(i); + void operator()( const int & i, typename Kokkos::Experimental::MaxLoc< Scalar, int >::value_type & value ) const { + if ( values( i ) > value.val ) { + value.val = values( i ); value.loc = i; } } }; struct MinMaxLocFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, - typename Kokkos::Experimental::MinMaxLoc::value_type& value) const { - if(values(i) > value.max_val) { - value.max_val = values(i); + void operator()( const int & i, typename Kokkos::Experimental::MinMaxLoc< Scalar, int >::value_type & value ) const { + if ( values( i ) > value.max_val ) { + value.max_val = values( i ); value.max_loc = i; } - if(values(i) < value.min_val) { - value.min_val = values(i); + + if ( values( i ) < value.min_val ) { + value.min_val = values( i ); value.min_loc = i; } } }; struct BAndFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, Scalar& value) const { - value = value & values(i); + void operator()( const int & i, Scalar & value ) const { + value = value & values( i ); } }; struct BOrFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, Scalar& value) const { - value = value | values(i); + void operator()( const int & i, Scalar & value ) const { + value = value | values( i ); } }; struct BXorFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, Scalar& value) const { - value = value ^ values(i); + void operator()( const int & i, Scalar & value ) const { + value = value ^ values( i ); } }; struct LAndFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, Scalar& value) const { - value = value && values(i); + void operator()( const int & i, Scalar & value ) const { + value = value && values( i ); } }; struct LOrFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, Scalar& value) const { - value = value || values(i); + void operator()( const int & i, Scalar & value ) const { + value = value || values( i ); } }; struct LXorFunctor { - Kokkos::View values; + Kokkos::View< const Scalar*, ExecSpace > values; + KOKKOS_INLINE_FUNCTION - void operator() (const int& i, Scalar& value) const { - value = value ? (!values(i)) : values(i); + void operator()( const int & i, Scalar & value ) const { + value = value ? ( !values( i ) ) : values( i ); } }; - static void test_sum(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); + static void test_sum( int N ) { + Kokkos::View< Scalar*, ExecSpace > values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); Scalar reference_sum = 0; - for(int i=0; i reducer_scalar(sum_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(sum_scalar,reference_sum); + Kokkos::Experimental::Sum< Scalar > reducer_scalar( sum_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( sum_scalar, reference_sum ); + Scalar sum_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(sum_scalar_view,reference_sum); + ASSERT_EQ( sum_scalar_view, reference_sum ); } + { Scalar sum_scalar_init = init; - Kokkos::Experimental::Sum reducer_scalar_init(sum_scalar_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar_init); - ASSERT_EQ(sum_scalar_init,reference_sum); + Kokkos::Experimental::Sum< Scalar > reducer_scalar_init( sum_scalar_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar_init ); + + ASSERT_EQ( sum_scalar_init, reference_sum ); + Scalar sum_scalar_init_view = reducer_scalar_init.result_view()(); - ASSERT_EQ(sum_scalar_init_view,reference_sum); + ASSERT_EQ( sum_scalar_init_view, reference_sum ); } + { - Kokkos::View sum_view("View"); + Kokkos::View< Scalar, Kokkos::HostSpace> sum_view( "View" ); sum_view() = init; - Kokkos::Experimental::Sum reducer_view(sum_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::Experimental::Sum< Scalar > reducer_view( sum_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + Scalar sum_view_scalar = sum_view(); - ASSERT_EQ(sum_view_scalar,reference_sum); + ASSERT_EQ( sum_view_scalar, reference_sum ); + Scalar sum_view_view = reducer_view.result_view()(); - ASSERT_EQ(sum_view_view,reference_sum); + ASSERT_EQ( sum_view_view, reference_sum ); } + { - Kokkos::View sum_view_init("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > sum_view_init( "View" ); sum_view_init() = init; - Kokkos::Experimental::Sum reducer_view_init(sum_view_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view_init); + Kokkos::Experimental::Sum< Scalar > reducer_view_init( sum_view_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view_init ); + Scalar sum_view_init_scalar = sum_view_init(); - ASSERT_EQ(sum_view_init_scalar,reference_sum); + ASSERT_EQ( sum_view_init_scalar, reference_sum ); + Scalar sum_view_init_view = reducer_view_init.result_view()(); - ASSERT_EQ(sum_view_init_view,reference_sum); + ASSERT_EQ( sum_view_init_view, reference_sum ); } } - static void test_prod(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); + static void test_prod( int N ) { + Kokkos::View< Scalar*, ExecSpace > values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); Scalar reference_prod = 1; - for(int i=0; i::value) + if ( std::is_arithmetic< Scalar >::value ) { Scalar prod_scalar = init; - Kokkos::Experimental::Prod reducer_scalar(prod_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(prod_scalar,reference_prod); + Kokkos::Experimental::Prod< Scalar > reducer_scalar( prod_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( prod_scalar, reference_prod ); + Scalar prod_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(prod_scalar_view,reference_prod); + ASSERT_EQ( prod_scalar_view, reference_prod ); } + { Scalar prod_scalar_init = init; - Kokkos::Experimental::Prod reducer_scalar_init(prod_scalar_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar_init); - ASSERT_EQ(prod_scalar_init,reference_prod); + Kokkos::Experimental::Prod< Scalar > reducer_scalar_init( prod_scalar_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar_init ); + + ASSERT_EQ( prod_scalar_init, reference_prod ); + Scalar prod_scalar_init_view = reducer_scalar_init.result_view()(); - ASSERT_EQ(prod_scalar_init_view,reference_prod); + ASSERT_EQ( prod_scalar_init_view, reference_prod ); } - if(std::is_arithmetic::value) + if ( std::is_arithmetic< Scalar >::value ) { - Kokkos::View prod_view("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > prod_view( "View" ); prod_view() = init; - Kokkos::Experimental::Prod reducer_view(prod_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::Experimental::Prod< Scalar > reducer_view( prod_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + Scalar prod_view_scalar = prod_view(); - ASSERT_EQ(prod_view_scalar,reference_prod); + ASSERT_EQ( prod_view_scalar, reference_prod ); + Scalar prod_view_view = reducer_view.result_view()(); - ASSERT_EQ(prod_view_view,reference_prod); + ASSERT_EQ( prod_view_view, reference_prod ); } + { - Kokkos::View prod_view_init("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > prod_view_init( "View" ); prod_view_init() = init; - Kokkos::Experimental::Prod reducer_view_init(prod_view_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view_init); + Kokkos::Experimental::Prod< Scalar > reducer_view_init( prod_view_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view_init ); + Scalar prod_view_init_scalar = prod_view_init(); - ASSERT_EQ(prod_view_init_scalar,reference_prod); + ASSERT_EQ( prod_view_init_scalar, reference_prod ); + Scalar prod_view_init_view = reducer_view_init.result_view()(); - ASSERT_EQ(prod_view_init_view,reference_prod); + ASSERT_EQ( prod_view_init_view, reference_prod ); } } - static void test_min(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); - Scalar reference_min = std::numeric_limits::max(); - for(int i=0; i values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); + Scalar reference_min = std::numeric_limits< Scalar >::max(); + + for ( int i = 0; i < N; i++ ) { + h_values( i ) = (Scalar) ( rand() % 100000 ); + + if ( h_values( i ) < reference_min ) reference_min = h_values( i ); } - Kokkos::deep_copy(values,h_values); + Kokkos::deep_copy( values, h_values ); MinFunctor f; f.values = values; - Scalar init = std::numeric_limits::max(); + Scalar init = std::numeric_limits< Scalar >::max(); { Scalar min_scalar = init; - Kokkos::Experimental::Min reducer_scalar(min_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(min_scalar,reference_min); + Kokkos::Experimental::Min< Scalar > reducer_scalar( min_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( min_scalar, reference_min ); + Scalar min_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(min_scalar_view,reference_min); + ASSERT_EQ( min_scalar_view, reference_min ); } + { Scalar min_scalar_init = init; - Kokkos::Experimental::Min reducer_scalar_init(min_scalar_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar_init); - ASSERT_EQ(min_scalar_init,reference_min); + Kokkos::Experimental::Min< Scalar > reducer_scalar_init( min_scalar_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar_init ); + + ASSERT_EQ( min_scalar_init, reference_min ); + Scalar min_scalar_init_view = reducer_scalar_init.result_view()(); - ASSERT_EQ(min_scalar_init_view,reference_min); + ASSERT_EQ( min_scalar_init_view, reference_min ); } + { - Kokkos::View min_view("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > min_view( "View" ); min_view() = init; - Kokkos::Experimental::Min reducer_view(min_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::Experimental::Min< Scalar > reducer_view( min_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + Scalar min_view_scalar = min_view(); - ASSERT_EQ(min_view_scalar,reference_min); + ASSERT_EQ( min_view_scalar, reference_min ); + Scalar min_view_view = reducer_view.result_view()(); - ASSERT_EQ(min_view_view,reference_min); + ASSERT_EQ( min_view_view, reference_min ); } + { - Kokkos::View min_view_init("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > min_view_init( "View" ); min_view_init() = init; - Kokkos::Experimental::Min reducer_view_init(min_view_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view_init); + Kokkos::Experimental::Min< Scalar > reducer_view_init( min_view_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view_init ); + Scalar min_view_init_scalar = min_view_init(); - ASSERT_EQ(min_view_init_scalar,reference_min); + ASSERT_EQ( min_view_init_scalar, reference_min ); + Scalar min_view_init_view = reducer_view_init.result_view()(); - ASSERT_EQ(min_view_init_view,reference_min); + ASSERT_EQ( min_view_init_view, reference_min ); } } - static void test_max(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); - Scalar reference_max = std::numeric_limits::min(); - for(int i=0; ireference_max) - reference_max = h_values(i); + static void test_max( int N ) { + Kokkos::View< Scalar*, ExecSpace > values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); + Scalar reference_max = std::numeric_limits< Scalar >::min(); + + for ( int i = 0; i < N; i++ ) { + h_values( i ) = (Scalar) ( rand() % 100000 + 1 ); + + if ( h_values( i ) > reference_max ) reference_max = h_values( i ); } - Kokkos::deep_copy(values,h_values); + Kokkos::deep_copy( values, h_values ); MaxFunctor f; f.values = values; - Scalar init = std::numeric_limits::min(); + Scalar init = std::numeric_limits< Scalar >::min(); { Scalar max_scalar = init; - Kokkos::Experimental::Max reducer_scalar(max_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(max_scalar,reference_max); + Kokkos::Experimental::Max< Scalar > reducer_scalar( max_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( max_scalar, reference_max ); + Scalar max_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(max_scalar_view,reference_max); + ASSERT_EQ( max_scalar_view, reference_max ); } + { Scalar max_scalar_init = init; - Kokkos::Experimental::Max reducer_scalar_init(max_scalar_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar_init); - ASSERT_EQ(max_scalar_init,reference_max); + Kokkos::Experimental::Max< Scalar > reducer_scalar_init( max_scalar_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar_init ); + + ASSERT_EQ( max_scalar_init, reference_max ); + Scalar max_scalar_init_view = reducer_scalar_init.result_view()(); - ASSERT_EQ(max_scalar_init_view,reference_max); + ASSERT_EQ( max_scalar_init_view, reference_max ); } + { - Kokkos::View max_view("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > max_view( "View" ); max_view() = init; - Kokkos::Experimental::Max reducer_view(max_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::Experimental::Max< Scalar > reducer_view( max_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + Scalar max_view_scalar = max_view(); - ASSERT_EQ(max_view_scalar,reference_max); + ASSERT_EQ( max_view_scalar, reference_max ); + Scalar max_view_view = reducer_view.result_view()(); - ASSERT_EQ(max_view_view,reference_max); + ASSERT_EQ( max_view_view, reference_max ); } + { - Kokkos::View max_view_init("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > max_view_init( "View" ); max_view_init() = init; - Kokkos::Experimental::Max reducer_view_init(max_view_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view_init); + Kokkos::Experimental::Max< Scalar > reducer_view_init( max_view_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view_init ); + Scalar max_view_init_scalar = max_view_init(); - ASSERT_EQ(max_view_init_scalar,reference_max); + ASSERT_EQ( max_view_init_scalar, reference_max ); + Scalar max_view_init_view = reducer_view_init.result_view()(); - ASSERT_EQ(max_view_init_view,reference_max); + ASSERT_EQ( max_view_init_view, reference_max ); } } - static void test_minloc(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); - Scalar reference_min = std::numeric_limits::max(); + static void test_minloc( int N ) { + typedef typename Kokkos::Experimental::MinLoc< Scalar, int >::value_type value_type; + + Kokkos::View< Scalar*, ExecSpace > values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); + Scalar reference_min = std::numeric_limits< Scalar >::max(); int reference_loc = -1; - for(int i=0; i::epsilon(); + } + else if ( h_values( i ) == reference_min ) { + // Make min unique. + h_values( i ) += std::numeric_limits< Scalar >::epsilon(); } } - Kokkos::deep_copy(values,h_values); + Kokkos::deep_copy( values, h_values ); MinLocFunctor f; - typedef typename Kokkos::Experimental::MinLoc::value_type value_type; f.values = values; - Scalar init = std::numeric_limits::max(); - + Scalar init = std::numeric_limits< Scalar >::max(); { value_type min_scalar; - Kokkos::Experimental::MinLoc reducer_scalar(min_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(min_scalar.val,reference_min); - ASSERT_EQ(min_scalar.loc,reference_loc); + Kokkos::Experimental::MinLoc< Scalar, int > reducer_scalar( min_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( min_scalar.val, reference_min ); + ASSERT_EQ( min_scalar.loc, reference_loc ); + value_type min_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(min_scalar_view.val,reference_min); - ASSERT_EQ(min_scalar_view.loc,reference_loc); + ASSERT_EQ( min_scalar_view.val, reference_min ); + ASSERT_EQ( min_scalar_view.loc, reference_loc ); } + { value_type min_scalar_init; - Kokkos::Experimental::MinLoc reducer_scalar_init(min_scalar_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar_init); - ASSERT_EQ(min_scalar_init.val,reference_min); - ASSERT_EQ(min_scalar_init.loc,reference_loc); + Kokkos::Experimental::MinLoc< Scalar, int > reducer_scalar_init( min_scalar_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar_init ); + + ASSERT_EQ( min_scalar_init.val, reference_min ); + ASSERT_EQ( min_scalar_init.loc, reference_loc ); + value_type min_scalar_init_view = reducer_scalar_init.result_view()(); - ASSERT_EQ(min_scalar_init_view.val,reference_min); - ASSERT_EQ(min_scalar_init_view.loc,reference_loc); + ASSERT_EQ( min_scalar_init_view.val, reference_min ); + ASSERT_EQ( min_scalar_init_view.loc, reference_loc ); } + { - Kokkos::View min_view("View"); - Kokkos::Experimental::MinLoc reducer_view(min_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::View< value_type, Kokkos::HostSpace > min_view( "View" ); + Kokkos::Experimental::MinLoc< Scalar, int > reducer_view( min_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + value_type min_view_scalar = min_view(); - ASSERT_EQ(min_view_scalar.val,reference_min); - ASSERT_EQ(min_view_scalar.loc,reference_loc); + ASSERT_EQ( min_view_scalar.val, reference_min ); + ASSERT_EQ( min_view_scalar.loc, reference_loc ); + value_type min_view_view = reducer_view.result_view()(); - ASSERT_EQ(min_view_view.val,reference_min); - ASSERT_EQ(min_view_view.loc,reference_loc); + ASSERT_EQ( min_view_view.val, reference_min ); + ASSERT_EQ( min_view_view.loc, reference_loc ); } + { - Kokkos::View min_view_init("View"); - Kokkos::Experimental::MinLoc reducer_view_init(min_view_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view_init); + Kokkos::View< value_type, Kokkos::HostSpace > min_view_init( "View" ); + Kokkos::Experimental::MinLoc< Scalar, int > reducer_view_init( min_view_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view_init ); + value_type min_view_init_scalar = min_view_init(); - ASSERT_EQ(min_view_init_scalar.val,reference_min); - ASSERT_EQ(min_view_init_scalar.loc,reference_loc); + ASSERT_EQ( min_view_init_scalar.val, reference_min ); + ASSERT_EQ( min_view_init_scalar.loc, reference_loc ); + value_type min_view_init_view = reducer_view_init.result_view()(); - ASSERT_EQ(min_view_init_view.val,reference_min); - ASSERT_EQ(min_view_init_view.loc,reference_loc); + ASSERT_EQ( min_view_init_view.val, reference_min ); + ASSERT_EQ( min_view_init_view.loc, reference_loc ); } } - static void test_maxloc(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); - Scalar reference_max = std::numeric_limits::min(); + static void test_maxloc( int N ) { + typedef typename Kokkos::Experimental::MaxLoc< Scalar, int >::value_type value_type; + + Kokkos::View< Scalar*, ExecSpace > values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); + Scalar reference_max = std::numeric_limits< Scalar >::min(); int reference_loc = -1; - for(int i=0; ireference_max) { - reference_max = h_values(i); + + for ( int i = 0; i < N; i++ ) { + h_values( i ) = (Scalar) ( rand() % 100000 ); + + if ( h_values( i ) > reference_max ) { + reference_max = h_values( i ); reference_loc = i; - } else if (h_values(i) == reference_max) { - // make max unique - h_values(i) -= std::numeric_limits::epsilon(); + } + else if ( h_values( i ) == reference_max ) { + // Make max unique. + h_values( i ) -= std::numeric_limits< Scalar >::epsilon(); } } - Kokkos::deep_copy(values,h_values); + Kokkos::deep_copy( values, h_values ); MaxLocFunctor f; - typedef typename Kokkos::Experimental::MaxLoc::value_type value_type; f.values = values; - Scalar init = std::numeric_limits::min(); - + Scalar init = std::numeric_limits< Scalar >::min(); { value_type max_scalar; - Kokkos::Experimental::MaxLoc reducer_scalar(max_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(max_scalar.val,reference_max); - ASSERT_EQ(max_scalar.loc,reference_loc); + Kokkos::Experimental::MaxLoc< Scalar, int > reducer_scalar( max_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( max_scalar.val, reference_max ); + ASSERT_EQ( max_scalar.loc, reference_loc ); + value_type max_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(max_scalar_view.val,reference_max); - ASSERT_EQ(max_scalar_view.loc,reference_loc); + ASSERT_EQ( max_scalar_view.val, reference_max ); + ASSERT_EQ( max_scalar_view.loc, reference_loc ); } + { value_type max_scalar_init; - Kokkos::Experimental::MaxLoc reducer_scalar_init(max_scalar_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar_init); - ASSERT_EQ(max_scalar_init.val,reference_max); - ASSERT_EQ(max_scalar_init.loc,reference_loc); + Kokkos::Experimental::MaxLoc< Scalar, int > reducer_scalar_init( max_scalar_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar_init ); + + ASSERT_EQ( max_scalar_init.val, reference_max ); + ASSERT_EQ( max_scalar_init.loc, reference_loc ); + value_type max_scalar_init_view = reducer_scalar_init.result_view()(); - ASSERT_EQ(max_scalar_init_view.val,reference_max); - ASSERT_EQ(max_scalar_init_view.loc,reference_loc); + ASSERT_EQ( max_scalar_init_view.val, reference_max ); + ASSERT_EQ( max_scalar_init_view.loc, reference_loc ); } + { - Kokkos::View max_view("View"); - Kokkos::Experimental::MaxLoc reducer_view(max_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::View< value_type, Kokkos::HostSpace > max_view( "View" ); + Kokkos::Experimental::MaxLoc< Scalar, int > reducer_view( max_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + value_type max_view_scalar = max_view(); - ASSERT_EQ(max_view_scalar.val,reference_max); - ASSERT_EQ(max_view_scalar.loc,reference_loc); + ASSERT_EQ( max_view_scalar.val, reference_max ); + ASSERT_EQ( max_view_scalar.loc, reference_loc ); + value_type max_view_view = reducer_view.result_view()(); - ASSERT_EQ(max_view_view.val,reference_max); - ASSERT_EQ(max_view_view.loc,reference_loc); + ASSERT_EQ( max_view_view.val, reference_max ); + ASSERT_EQ( max_view_view.loc, reference_loc ); } + { - Kokkos::View max_view_init("View"); - Kokkos::Experimental::MaxLoc reducer_view_init(max_view_init,init); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view_init); + Kokkos::View< value_type, Kokkos::HostSpace > max_view_init( "View" ); + Kokkos::Experimental::MaxLoc< Scalar, int > reducer_view_init( max_view_init, init ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view_init ); + value_type max_view_init_scalar = max_view_init(); - ASSERT_EQ(max_view_init_scalar.val,reference_max); - ASSERT_EQ(max_view_init_scalar.loc,reference_loc); + ASSERT_EQ( max_view_init_scalar.val, reference_max ); + ASSERT_EQ( max_view_init_scalar.loc, reference_loc ); + value_type max_view_init_view = reducer_view_init.result_view()(); - ASSERT_EQ(max_view_init_view.val,reference_max); - ASSERT_EQ(max_view_init_view.loc,reference_loc); + ASSERT_EQ( max_view_init_view.val, reference_max ); + ASSERT_EQ( max_view_init_view.loc, reference_loc ); } } - static void test_minmaxloc(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); - Scalar reference_max = std::numeric_limits::min(); - Scalar reference_min = std::numeric_limits::max(); + static void test_minmaxloc( int N ) { + typedef typename Kokkos::Experimental::MinMaxLoc< Scalar, int >::value_type value_type; + + Kokkos::View< Scalar*, ExecSpace > values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); + Scalar reference_max = std::numeric_limits< Scalar >::min(); + Scalar reference_min = std::numeric_limits< Scalar >::max(); int reference_minloc = -1; int reference_maxloc = -1; - for(int i=0; ireference_max) { - reference_max = h_values(i); + + for ( int i = 0; i < N; i++ ) { + if ( h_values( i ) > reference_max ) { + reference_max = h_values( i ); reference_maxloc = i; - } else if (h_values(i) == reference_max) { - // make max unique - h_values(i) -= std::numeric_limits::epsilon(); + } + else if ( h_values( i ) == reference_max ) { + // Make max unique. + h_values( i ) -= std::numeric_limits< Scalar >::epsilon(); } } - for(int i=0; i::epsilon(); + } + else if ( h_values( i ) == reference_min ) { + // Make min unique. + h_values( i ) += std::numeric_limits< Scalar >::epsilon(); } } - Kokkos::deep_copy(values,h_values); + + Kokkos::deep_copy( values, h_values ); MinMaxLocFunctor f; - typedef typename Kokkos::Experimental::MinMaxLoc::value_type value_type; f.values = values; - Scalar init_min = std::numeric_limits::max(); - Scalar init_max = std::numeric_limits::min(); - + Scalar init_min = std::numeric_limits< Scalar >::max(); + Scalar init_max = std::numeric_limits< Scalar >::min(); { value_type minmax_scalar; - Kokkos::Experimental::MinMaxLoc reducer_scalar(minmax_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(minmax_scalar.min_val,reference_min); - for(int i=0; i reducer_scalar( minmax_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( minmax_scalar.min_val, reference_min ); + + for ( int i = 0; i < N; i++ ) { + if ( ( i == minmax_scalar.min_loc ) && ( h_values( i ) == reference_min ) ) { reference_minloc = i; + } } - ASSERT_EQ(minmax_scalar.min_loc,reference_minloc); - ASSERT_EQ(minmax_scalar.max_val,reference_max); - for(int i=0; i reducer_scalar_init(minmax_scalar_init,init_min,init_max); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar_init); - ASSERT_EQ(minmax_scalar_init.min_val,reference_min); - ASSERT_EQ(minmax_scalar_init.min_loc,reference_minloc); - ASSERT_EQ(minmax_scalar_init.max_val,reference_max); - ASSERT_EQ(minmax_scalar_init.max_loc,reference_maxloc); + Kokkos::Experimental::MinMaxLoc< Scalar, int > reducer_scalar_init( minmax_scalar_init, init_min, init_max ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar_init ); + + ASSERT_EQ( minmax_scalar_init.min_val, reference_min ); + ASSERT_EQ( minmax_scalar_init.min_loc, reference_minloc ); + ASSERT_EQ( minmax_scalar_init.max_val, reference_max ); + ASSERT_EQ( minmax_scalar_init.max_loc, reference_maxloc ); + value_type minmax_scalar_init_view = reducer_scalar_init.result_view()(); - ASSERT_EQ(minmax_scalar_init_view.min_val,reference_min); - ASSERT_EQ(minmax_scalar_init_view.min_loc,reference_minloc); - ASSERT_EQ(minmax_scalar_init_view.max_val,reference_max); - ASSERT_EQ(minmax_scalar_init_view.max_loc,reference_maxloc); + ASSERT_EQ( minmax_scalar_init_view.min_val, reference_min ); + ASSERT_EQ( minmax_scalar_init_view.min_loc, reference_minloc ); + ASSERT_EQ( minmax_scalar_init_view.max_val, reference_max ); + ASSERT_EQ( minmax_scalar_init_view.max_loc, reference_maxloc ); } + { - Kokkos::View minmax_view("View"); - Kokkos::Experimental::MinMaxLoc reducer_view(minmax_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::View< value_type, Kokkos::HostSpace > minmax_view( "View" ); + Kokkos::Experimental::MinMaxLoc< Scalar, int > reducer_view( minmax_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + value_type minmax_view_scalar = minmax_view(); - ASSERT_EQ(minmax_view_scalar.min_val,reference_min); - ASSERT_EQ(minmax_view_scalar.min_loc,reference_minloc); - ASSERT_EQ(minmax_view_scalar.max_val,reference_max); - ASSERT_EQ(minmax_view_scalar.max_loc,reference_maxloc); + ASSERT_EQ( minmax_view_scalar.min_val, reference_min ); + ASSERT_EQ( minmax_view_scalar.min_loc, reference_minloc ); + ASSERT_EQ( minmax_view_scalar.max_val, reference_max ); + ASSERT_EQ( minmax_view_scalar.max_loc, reference_maxloc ); + value_type minmax_view_view = reducer_view.result_view()(); - ASSERT_EQ(minmax_view_view.min_val,reference_min); - ASSERT_EQ(minmax_view_view.min_loc,reference_minloc); - ASSERT_EQ(minmax_view_view.max_val,reference_max); - ASSERT_EQ(minmax_view_view.max_loc,reference_maxloc); + ASSERT_EQ( minmax_view_view.min_val, reference_min ); + ASSERT_EQ( minmax_view_view.min_loc, reference_minloc ); + ASSERT_EQ( minmax_view_view.max_val, reference_max ); + ASSERT_EQ( minmax_view_view.max_loc, reference_maxloc ); } + { - Kokkos::View minmax_view_init("View"); - Kokkos::Experimental::MinMaxLoc reducer_view_init(minmax_view_init,init_min,init_max); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view_init); + Kokkos::View< value_type, Kokkos::HostSpace > minmax_view_init( "View" ); + Kokkos::Experimental::MinMaxLoc< Scalar, int > reducer_view_init( minmax_view_init, init_min, init_max ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view_init ); + value_type minmax_view_init_scalar = minmax_view_init(); - ASSERT_EQ(minmax_view_init_scalar.min_val,reference_min); - ASSERT_EQ(minmax_view_init_scalar.min_loc,reference_minloc); - ASSERT_EQ(minmax_view_init_scalar.max_val,reference_max); - ASSERT_EQ(minmax_view_init_scalar.max_loc,reference_maxloc); + ASSERT_EQ( minmax_view_init_scalar.min_val, reference_min ); + ASSERT_EQ( minmax_view_init_scalar.min_loc, reference_minloc ); + ASSERT_EQ( minmax_view_init_scalar.max_val, reference_max ); + ASSERT_EQ( minmax_view_init_scalar.max_loc, reference_maxloc ); + value_type minmax_view_init_view = reducer_view_init.result_view()(); - ASSERT_EQ(minmax_view_init_view.min_val,reference_min); - ASSERT_EQ(minmax_view_init_view.min_loc,reference_minloc); - ASSERT_EQ(minmax_view_init_view.max_val,reference_max); - ASSERT_EQ(minmax_view_init_view.max_loc,reference_maxloc); + ASSERT_EQ( minmax_view_init_view.min_val, reference_min ); + ASSERT_EQ( minmax_view_init_view.min_loc, reference_minloc ); + ASSERT_EQ( minmax_view_init_view.max_val, reference_max ); + ASSERT_EQ( minmax_view_init_view.max_loc, reference_maxloc ); } } - static void test_BAnd(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); - Scalar reference_band = Scalar() | (~Scalar()); - for(int i=0; i values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); + Scalar reference_band = Scalar() | ( ~Scalar() ); + + for ( int i = 0; i < N; i++ ) { + h_values( i ) = (Scalar) ( rand() % 100000 + 1 ); + reference_band = reference_band & h_values( i ); } - Kokkos::deep_copy(values,h_values); + Kokkos::deep_copy( values, h_values ); BAndFunctor f; f.values = values; - Scalar init = Scalar() | (~Scalar()); + Scalar init = Scalar() | ( ~Scalar() ); { Scalar band_scalar = init; - Kokkos::Experimental::BAnd reducer_scalar(band_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(band_scalar,reference_band); + Kokkos::Experimental::BAnd< Scalar > reducer_scalar( band_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( band_scalar, reference_band ); Scalar band_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(band_scalar_view,reference_band); + + ASSERT_EQ( band_scalar_view, reference_band ); } { - Kokkos::View band_view("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > band_view( "View" ); band_view() = init; - Kokkos::Experimental::BAnd reducer_view(band_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::Experimental::BAnd< Scalar > reducer_view( band_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + Scalar band_view_scalar = band_view(); - ASSERT_EQ(band_view_scalar,reference_band); + ASSERT_EQ( band_view_scalar, reference_band ); + Scalar band_view_view = reducer_view.result_view()(); - ASSERT_EQ(band_view_view,reference_band); + ASSERT_EQ( band_view_view, reference_band ); } } - static void test_BOr(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); - Scalar reference_bor = Scalar() & (~Scalar()); - for(int i=0; i values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); + Scalar reference_bor = Scalar() & ( ~Scalar() ); + + for ( int i = 0; i < N; i++ ) { + h_values( i ) = (Scalar) ( ( rand() % 100000 + 1 ) * 2 ); + reference_bor = reference_bor | h_values( i ); } - Kokkos::deep_copy(values,h_values); + Kokkos::deep_copy( values, h_values ); BOrFunctor f; f.values = values; - Scalar init = Scalar() & (~Scalar()); + Scalar init = Scalar() & ( ~Scalar() ); { Scalar bor_scalar = init; - Kokkos::Experimental::BOr reducer_scalar(bor_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(bor_scalar,reference_bor); + Kokkos::Experimental::BOr< Scalar > reducer_scalar( bor_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( bor_scalar, reference_bor ); + Scalar bor_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(bor_scalar_view,reference_bor); + ASSERT_EQ( bor_scalar_view, reference_bor ); } { - Kokkos::View bor_view("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > bor_view( "View" ); bor_view() = init; - Kokkos::Experimental::BOr reducer_view(bor_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::Experimental::BOr< Scalar > reducer_view( bor_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + Scalar bor_view_scalar = bor_view(); - ASSERT_EQ(bor_view_scalar,reference_bor); + ASSERT_EQ( bor_view_scalar, reference_bor ); + Scalar bor_view_view = reducer_view.result_view()(); - ASSERT_EQ(bor_view_view,reference_bor); + ASSERT_EQ( bor_view_view, reference_bor ); } } - static void test_BXor(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); - Scalar reference_bxor = Scalar() & (~Scalar()); - for(int i=0; i values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); + Scalar reference_bxor = Scalar() & ( ~Scalar() ); + + for ( int i = 0; i < N; i++ ) { + h_values( i ) = (Scalar) ( ( rand() % 100000 + 1 ) * 2 ); + reference_bxor = reference_bxor ^ h_values( i ); } - Kokkos::deep_copy(values,h_values); + Kokkos::deep_copy( values, h_values ); BXorFunctor f; f.values = values; - Scalar init = Scalar() & (~Scalar()); + Scalar init = Scalar() & ( ~Scalar() ); { Scalar bxor_scalar = init; - Kokkos::Experimental::BXor reducer_scalar(bxor_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(bxor_scalar,reference_bxor); + Kokkos::Experimental::BXor< Scalar > reducer_scalar( bxor_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( bxor_scalar, reference_bxor ); + Scalar bxor_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(bxor_scalar_view,reference_bxor); + ASSERT_EQ( bxor_scalar_view, reference_bxor ); } { - Kokkos::View bxor_view("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > bxor_view( "View" ); bxor_view() = init; - Kokkos::Experimental::BXor reducer_view(bxor_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::Experimental::BXor< Scalar > reducer_view( bxor_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + Scalar bxor_view_scalar = bxor_view(); - ASSERT_EQ(bxor_view_scalar,reference_bxor); + ASSERT_EQ( bxor_view_scalar, reference_bxor ); + Scalar bxor_view_view = reducer_view.result_view()(); - ASSERT_EQ(bxor_view_view,reference_bxor); + ASSERT_EQ( bxor_view_view, reference_bxor ); } } - static void test_LAnd(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); + static void test_LAnd( int N ) { + Kokkos::View< Scalar*, ExecSpace > values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); Scalar reference_land = 1; - for(int i=0; i reducer_scalar(land_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(land_scalar,reference_land); + Kokkos::Experimental::LAnd< Scalar > reducer_scalar( land_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( land_scalar, reference_land ); + Scalar land_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(land_scalar_view,reference_land); + ASSERT_EQ( land_scalar_view, reference_land ); } { - Kokkos::View land_view("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > land_view( "View" ); land_view() = init; - Kokkos::Experimental::LAnd reducer_view(land_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::Experimental::LAnd< Scalar > reducer_view( land_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + Scalar land_view_scalar = land_view(); - ASSERT_EQ(land_view_scalar,reference_land); + ASSERT_EQ( land_view_scalar, reference_land ); + Scalar land_view_view = reducer_view.result_view()(); - ASSERT_EQ(land_view_view,reference_land); + ASSERT_EQ( land_view_view, reference_land ); } } - static void test_LOr(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); + static void test_LOr( int N ) { + Kokkos::View< Scalar*, ExecSpace > values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); Scalar reference_lor = 0; - for(int i=0; i reducer_scalar(lor_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(lor_scalar,reference_lor); + Kokkos::Experimental::LOr< Scalar > reducer_scalar( lor_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( lor_scalar, reference_lor ); + Scalar lor_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(lor_scalar_view,reference_lor); + ASSERT_EQ( lor_scalar_view, reference_lor ); } { - Kokkos::View lor_view("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > lor_view( "View" ); lor_view() = init; - Kokkos::Experimental::LOr reducer_view(lor_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::Experimental::LOr< Scalar > reducer_view( lor_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + Scalar lor_view_scalar = lor_view(); - ASSERT_EQ(lor_view_scalar,reference_lor); + ASSERT_EQ( lor_view_scalar, reference_lor ); + Scalar lor_view_view = reducer_view.result_view()(); - ASSERT_EQ(lor_view_view,reference_lor); + ASSERT_EQ( lor_view_view, reference_lor ); } } - static void test_LXor(int N) { - Kokkos::View values("Values",N); - auto h_values = Kokkos::create_mirror_view(values); + static void test_LXor( int N ) { + Kokkos::View< Scalar*, ExecSpace > values( "Values", N ); + auto h_values = Kokkos::create_mirror_view( values ); Scalar reference_lxor = 0; - for(int i=0; i reducer_scalar(lxor_scalar); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_scalar); - ASSERT_EQ(lxor_scalar,reference_lxor); + Kokkos::Experimental::LXor< Scalar > reducer_scalar( lxor_scalar ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_scalar ); + + ASSERT_EQ( lxor_scalar, reference_lxor ); + Scalar lxor_scalar_view = reducer_scalar.result_view()(); - ASSERT_EQ(lxor_scalar_view,reference_lxor); + ASSERT_EQ( lxor_scalar_view, reference_lxor ); } { - Kokkos::View lxor_view("View"); + Kokkos::View< Scalar, Kokkos::HostSpace > lxor_view( "View" ); lxor_view() = init; - Kokkos::Experimental::LXor reducer_view(lxor_view); - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,N),f,reducer_view); + Kokkos::Experimental::LXor< Scalar > reducer_view( lxor_view ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view ); + Scalar lxor_view_scalar = lxor_view(); - ASSERT_EQ(lxor_view_scalar,reference_lxor); + ASSERT_EQ( lxor_view_scalar, reference_lxor ); + Scalar lxor_view_view = reducer_view.result_view()(); - ASSERT_EQ(lxor_view_view,reference_lxor); + ASSERT_EQ( lxor_view_view, reference_lxor ); } } static void execute_float() { - test_sum(10001); - test_prod(35); - test_min(10003); - test_minloc(10003); - test_max(10007); - test_maxloc(10007); - test_minmaxloc(10007); + test_sum( 10001 ); + test_prod( 35 ); + test_min( 10003 ); + test_minloc( 10003 ); + test_max( 10007 ); + test_maxloc( 10007 ); + test_minmaxloc( 10007 ); } static void execute_integer() { - test_sum(10001); - test_prod(35); - test_min(10003); - test_minloc(10003); - test_max(10007); - test_maxloc(10007); - test_minmaxloc(10007); - test_BAnd(35); - test_BOr(35); - test_BXor(35); - test_LAnd(35); - test_LOr(35); - test_LXor(35); + test_sum( 10001 ); + test_prod( 35 ); + test_min( 10003 ); + test_minloc( 10003 ); + test_max( 10007 ); + test_maxloc( 10007 ); + test_minmaxloc( 10007 ); + test_BAnd( 35 ); + test_BOr( 35 ); + test_BXor( 35 ); + test_LAnd( 35 ); + test_LOr( 35 ); + test_LXor( 35 ); } static void execute_basic() { - test_sum(10001); - test_prod(35); + test_sum( 10001 ); + test_prod( 35 ); } }; -} - -/*--------------------------------------------------------------------------*/ +} // namespace Test diff --git a/lib/kokkos/core/unit_test/TestScan.hpp b/lib/kokkos/core/unit_test/TestScan.hpp index 1a9811a854..547e034976 100644 --- a/lib/kokkos/core/unit_test/TestScan.hpp +++ b/lib/kokkos/core/unit_test/TestScan.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,82 +36,81 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ -/*--------------------------------------------------------------------------*/ - #include namespace Test { -template< class Device , class WorkSpec = size_t > +template< class Device, class WorkSpec = size_t > struct TestScan { + typedef Device execution_space; + typedef long int value_type; - typedef Device execution_space ; - typedef long int value_type ; - - Kokkos::View > errors; + Kokkos::View< int, Device, Kokkos::MemoryTraits > errors; KOKKOS_INLINE_FUNCTION - void operator()( const int iwork , value_type & update , const bool final_pass ) const + void operator()( const int iwork, value_type & update, const bool final_pass ) const { - const value_type n = iwork + 1 ; - const value_type imbalance = ( (1000 <= n) && (0 == n % 1000) ) ? 1000 : 0 ; + const value_type n = iwork + 1; + const value_type imbalance = ( ( 1000 <= n ) && ( 0 == n % 1000 ) ) ? 1000 : 0; // Insert an artificial load imbalance - for ( value_type i = 0 ; i < imbalance ; ++i ) { ++update ; } + for ( value_type i = 0; i < imbalance; ++i ) { ++update; } - update += n - imbalance ; + update += n - imbalance; if ( final_pass ) { const value_type answer = n & 1 ? ( n * ( ( n + 1 ) / 2 ) ) : ( ( n / 2 ) * ( n + 1 ) ); if ( answer != update ) { errors()++; - if(errors()<20) - printf("TestScan(%d,%ld) != %ld\n",iwork,update,answer); + + if ( errors() < 20 ) { + printf( "TestScan(%d,%ld) != %ld\n", iwork, update, answer ); + } } } } KOKKOS_INLINE_FUNCTION - void init( value_type & update ) const { update = 0 ; } + void init( value_type & update ) const { update = 0; } KOKKOS_INLINE_FUNCTION - void join( volatile value_type & update , + void join( volatile value_type & update, volatile const value_type & input ) const - { update += input ; } + { update += input; } TestScan( const WorkSpec & N ) - { - Kokkos::View errors_a("Errors"); - Kokkos::deep_copy(errors_a,0); - errors = errors_a; - parallel_scan( N , *this ); - } + { + Kokkos::View< int, Device > errors_a( "Errors" ); + Kokkos::deep_copy( errors_a, 0 ); + errors = errors_a; + + parallel_scan( N , *this ); + } TestScan( const WorkSpec & Start , const WorkSpec & N ) - { - typedef Kokkos::RangePolicy exec_policy ; + { + typedef Kokkos::RangePolicy< execution_space > exec_policy ; - Kokkos::View errors_a("Errors"); - Kokkos::deep_copy(errors_a,0); - errors = errors_a; + Kokkos::View< int, Device > errors_a( "Errors" ); + Kokkos::deep_copy( errors_a, 0 ); + errors = errors_a; - parallel_scan( exec_policy( Start , N ) , *this ); - } + parallel_scan( exec_policy( Start , N ) , *this ); + } - static void test_range( const WorkSpec & begin , const WorkSpec & end ) - { - for ( WorkSpec i = begin ; i < end ; ++i ) { - (void) TestScan( i ); - } + static void test_range( const WorkSpec & begin, const WorkSpec & end ) + { + for ( WorkSpec i = begin; i < end; ++i ) { + (void) TestScan( i ); } + } }; -} - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/TestSharedAlloc.hpp b/lib/kokkos/core/unit_test/TestSharedAlloc.hpp index 291f9f60e4..6eca6bb38d 100644 --- a/lib/kokkos/core/unit_test/TestSharedAlloc.hpp +++ b/lib/kokkos/core/unit_test/TestSharedAlloc.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -54,162 +54,157 @@ namespace Test { struct SharedAllocDestroy { + volatile int * count; - volatile int * count ; - - SharedAllocDestroy() = default ; + SharedAllocDestroy() = default; SharedAllocDestroy( int * arg ) : count( arg ) {} void destroy_shared_allocation() - { - Kokkos::atomic_increment( count ); - } - + { + Kokkos::atomic_increment( count ); + } }; -template< class MemorySpace , class ExecutionSpace > +template< class MemorySpace, class ExecutionSpace > void test_shared_alloc() { #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + typedef const Kokkos::Impl::SharedAllocationHeader Header; + typedef Kokkos::Impl::SharedAllocationTracker Tracker; + typedef Kokkos::Impl::SharedAllocationRecord< void, void > RecordBase; + typedef Kokkos::Impl::SharedAllocationRecord< MemorySpace, void > RecordMemS; + typedef Kokkos::Impl::SharedAllocationRecord< MemorySpace, SharedAllocDestroy > RecordFull; - typedef const Kokkos::Impl::SharedAllocationHeader Header ; - typedef Kokkos::Impl::SharedAllocationTracker Tracker ; - typedef Kokkos::Impl::SharedAllocationRecord< void , void > RecordBase ; - typedef Kokkos::Impl::SharedAllocationRecord< MemorySpace , void > RecordMemS ; - typedef Kokkos::Impl::SharedAllocationRecord< MemorySpace , SharedAllocDestroy > RecordFull ; - - static_assert( sizeof(Tracker) == sizeof(int*), "SharedAllocationTracker has wrong size!" ); + static_assert( sizeof( Tracker ) == sizeof( int* ), "SharedAllocationTracker has wrong size!" ); - MemorySpace s ; + MemorySpace s; - const size_t N = 1200 ; - const size_t size = 8 ; + const size_t N = 1200; + const size_t size = 8; RecordMemS * rarray[ N ]; Header * harray[ N ]; - RecordMemS ** const r = rarray ; - Header ** const h = harray ; + RecordMemS ** const r = rarray; + Header ** const h = harray; + + Kokkos::RangePolicy< ExecutionSpace > range( 0, N ); - Kokkos::RangePolicy< ExecutionSpace > range(0,N); - - //---------------------------------------- { - // Since always executed on host space, leave [=] - Kokkos::parallel_for( range , [=]( size_t i ){ - char name[64] ; - sprintf(name,"test_%.2d",int(i)); + // Since always executed on host space, leave [=] + Kokkos::parallel_for( range, [=] ( size_t i ) { + char name[64]; + sprintf( name, "test_%.2d", int( i ) ); - r[i] = RecordMemS::allocate( s , name , size * ( i + 1 ) ); + r[i] = RecordMemS::allocate( s, name, size * ( i + 1 ) ); h[i] = Header::get_header( r[i]->data() ); - ASSERT_EQ( r[i]->use_count() , 0 ); + ASSERT_EQ( r[i]->use_count(), 0 ); - for ( size_t j = 0 ; j < ( i / 10 ) + 1 ; ++j ) RecordBase::increment( r[i] ); + for ( size_t j = 0; j < ( i / 10 ) + 1; ++j ) RecordBase::increment( r[i] ); - ASSERT_EQ( r[i]->use_count() , ( i / 10 ) + 1 ); - ASSERT_EQ( r[i] , RecordMemS::get_record( r[i]->data() ) ); + ASSERT_EQ( r[i]->use_count(), ( i / 10 ) + 1 ); + ASSERT_EQ( r[i], RecordMemS::get_record( r[i]->data() ) ); }); // Sanity check for the whole set of allocation records to which this record belongs. RecordBase::is_sane( r[0] ); - // RecordMemS::print_records( std::cout , s , true ); + // RecordMemS::print_records( std::cout, s, true ); - Kokkos::parallel_for( range , [=]( size_t i ){ - while ( 0 != ( r[i] = static_cast< RecordMemS *>( RecordBase::decrement( r[i] ) ) ) ) { + Kokkos::parallel_for( range, [=] ( size_t i ) { + while ( 0 != ( r[i] = static_cast< RecordMemS * >( RecordBase::decrement( r[i] ) ) ) ) { if ( r[i]->use_count() == 1 ) RecordBase::is_sane( r[i] ); } }); } - //---------------------------------------- + { - int destroy_count = 0 ; - SharedAllocDestroy counter( & destroy_count ); + int destroy_count = 0; + SharedAllocDestroy counter( &destroy_count ); - Kokkos::parallel_for( range , [=]( size_t i ){ - char name[64] ; - sprintf(name,"test_%.2d",int(i)); + Kokkos::parallel_for( range, [=] ( size_t i ) { + char name[64]; + sprintf( name, "test_%.2d", int( i ) ); - RecordFull * rec = RecordFull::allocate( s , name , size * ( i + 1 ) ); + RecordFull * rec = RecordFull::allocate( s, name, size * ( i + 1 ) ); - rec->m_destroy = counter ; + rec->m_destroy = counter; - r[i] = rec ; + r[i] = rec; h[i] = Header::get_header( r[i]->data() ); - ASSERT_EQ( r[i]->use_count() , 0 ); + ASSERT_EQ( r[i]->use_count(), 0 ); - for ( size_t j = 0 ; j < ( i / 10 ) + 1 ; ++j ) RecordBase::increment( r[i] ); + for ( size_t j = 0; j < ( i / 10 ) + 1; ++j ) RecordBase::increment( r[i] ); - ASSERT_EQ( r[i]->use_count() , ( i / 10 ) + 1 ); - ASSERT_EQ( r[i] , RecordMemS::get_record( r[i]->data() ) ); + ASSERT_EQ( r[i]->use_count(), ( i / 10 ) + 1 ); + ASSERT_EQ( r[i], RecordMemS::get_record( r[i]->data() ) ); }); RecordBase::is_sane( r[0] ); - Kokkos::parallel_for( range , [=]( size_t i ){ - while ( 0 != ( r[i] = static_cast< RecordMemS *>( RecordBase::decrement( r[i] ) ) ) ) { + Kokkos::parallel_for( range, [=] ( size_t i ) { + while ( 0 != ( r[i] = static_cast< RecordMemS * >( RecordBase::decrement( r[i] ) ) ) ) { if ( r[i]->use_count() == 1 ) RecordBase::is_sane( r[i] ); } }); - ASSERT_EQ( destroy_count , int(N) ); + ASSERT_EQ( destroy_count, int( N ) ); } - //---------------------------------------- { - int destroy_count = 0 ; + int destroy_count = 0; { - RecordFull * rec = RecordFull::allocate( s , "test" , size ); + RecordFull * rec = RecordFull::allocate( s, "test", size ); - // ... Construction of the allocated { rec->data() , rec->size() } + // ... Construction of the allocated { rec->data(), rec->size() } - // Copy destruction function object into the allocation record + // Copy destruction function object into the allocation record. rec->m_destroy = SharedAllocDestroy( & destroy_count ); - ASSERT_EQ( rec->use_count() , 0 ); + ASSERT_EQ( rec->use_count(), 0 ); - // Start tracking, increments the use count from 0 to 1 - Tracker track ; + // Start tracking, increments the use count from 0 to 1. + Tracker track; track.assign_allocated_record_to_uninitialized( rec ); - ASSERT_EQ( rec->use_count() , 1 ); - ASSERT_EQ( track.use_count() , 1 ); + ASSERT_EQ( rec->use_count(), 1 ); + ASSERT_EQ( track.use_count(), 1 ); + + // Verify construction / destruction increment. + for ( size_t i = 0; i < N; ++i ) { + ASSERT_EQ( rec->use_count(), 1 ); - // Verify construction / destruction increment - for ( size_t i = 0 ; i < N ; ++i ) { - ASSERT_EQ( rec->use_count() , 1 ); { - Tracker local_tracker ; + Tracker local_tracker; local_tracker.assign_allocated_record_to_uninitialized( rec ); - ASSERT_EQ( rec->use_count() , 2 ); - ASSERT_EQ( local_tracker.use_count() , 2 ); + ASSERT_EQ( rec->use_count(), 2 ); + ASSERT_EQ( local_tracker.use_count(), 2 ); } - ASSERT_EQ( rec->use_count() , 1 ); - ASSERT_EQ( track.use_count() , 1 ); + + ASSERT_EQ( rec->use_count(), 1 ); + ASSERT_EQ( track.use_count(), 1 ); } - Kokkos::parallel_for( range , [=]( size_t i ){ - Tracker local_tracker ; + Kokkos::parallel_for( range, [=] ( size_t i ) { + Tracker local_tracker; local_tracker.assign_allocated_record_to_uninitialized( rec ); - ASSERT_GT( rec->use_count() , 1 ); + ASSERT_GT( rec->use_count(), 1 ); }); - ASSERT_EQ( rec->use_count() , 1 ); - ASSERT_EQ( track.use_count() , 1 ); + ASSERT_EQ( rec->use_count(), 1 ); + ASSERT_EQ( track.use_count(), 1 ); // Destruction of 'track' object deallocates the 'rec' and invokes the destroy function object. } - ASSERT_EQ( destroy_count , 1 ); + ASSERT_EQ( destroy_count, 1 ); } #endif /* #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) */ } - -} - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/TestSynchronic.cpp b/lib/kokkos/core/unit_test/TestSynchronic.cpp deleted file mode 100644 index dc1abbd8b3..0000000000 --- a/lib/kokkos/core/unit_test/TestSynchronic.cpp +++ /dev/null @@ -1,449 +0,0 @@ -/* - -Copyright (c) 2014, NVIDIA Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -//#undef _WIN32_WINNT -//#define _WIN32_WINNT 0x0602 - -#if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) || \ - defined(__APPLE__) || defined(__ARM_ARCH_8A) || defined(_CRAYC) - -// Skip for now - -#else - -#include - -#ifdef USEOMP -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -//#include
-//#undef __SYNCHRONIC_COMPATIBLE - -#include -#include - -#include "TestSynchronic.hpp" - -// Uncomment to allow test to dump output -//#define VERBOSE_TEST - -namespace Test { - -unsigned next_table[] = - { - 0, 1, 2, 3, //0-3 - 4, 4, 6, 6, //4-7 - 8, 8, 8, 8, //8-11 - 12, 12, 12, 12, //12-15 - 16, 16, 16, 16, //16-19 - 16, 16, 16, 16, //20-23 - 24, 24, 24, 24, //24-27 - 24, 24, 24, 24, //28-31 - 32, 32, 32, 32, //32-35 - 32, 32, 32, 32, //36-39 - 40, 40, 40, 40, //40-43 - 40, 40, 40, 40, //44-47 - 48, 48, 48, 48, //48-51 - 48, 48, 48, 48, //52-55 - 56, 56, 56, 56, //56-59 - 56, 56, 56, 56, //60-63 - }; - -//change this if you want to allow oversubscription of the system, by default only the range {1-(system size)} is tested -#define FOR_GAUNTLET(x) for(unsigned x = (std::min)(std::thread::hardware_concurrency()*8,unsigned(sizeof(next_table)/sizeof(unsigned))); x; x = next_table[x-1]) - -//set this to override the benchmark of barriers to use OMP barriers instead of n3998 std::barrier -//#define USEOMP - -#if defined(__SYNCHRONIC_COMPATIBLE) - #define PREFIX "futex-" -#else - #define PREFIX "backoff-" -#endif - -//this test uses a custom Mersenne twister to eliminate implementation variation -MersenneTwister mt; - -int dummya = 1, dummyb =1; - -int dummy1 = 1; -std::atomic dummy2(1); -std::atomic dummy3(1); - -double time_item(int const count = (int)1E8) { - - clock_t const start = clock(); - - for(int i = 0;i < count; ++i) - mt.integer(); - - clock_t const end = clock(); - double elapsed_seconds = (end - start) / double(CLOCKS_PER_SEC); - - return elapsed_seconds / count; -} -double time_nil(int const count = (int)1E08) { - - clock_t const start = clock(); - - dummy3 = count; - for(int i = 0;i < (int)1E6; ++i) { - if(dummy1) { - // Do some work while holding the lock - int workunits = dummy3;//(int) (mtc.poissonInterval((float)num_items_critical) + 0.5f); - for (int j = 1; j < workunits; j++) - dummy1 &= j; // Do one work unit - dummy2.fetch_add(dummy1,std::memory_order_relaxed); - } - } - - clock_t const end = clock(); - double elapsed_seconds = (end - start) / double(CLOCKS_PER_SEC); - - return elapsed_seconds / count; -} - - -template -void testmutex_inner(mutex_type& m, std::atomic& t,std::atomic& wc,std::atomic& wnc, int const num_iterations, - int const num_items_critical, int const num_items_noncritical, MersenneTwister& mtc, MersenneTwister& mtnc, bool skip) { - - for(int k = 0; k < num_iterations; ++k) { - - if(num_items_noncritical) { - // Do some work without holding the lock - int workunits = num_items_noncritical;//(int) (mtnc.poissonInterval((float)num_items_noncritical) + 0.5f); - for (int i = 1; i < workunits; i++) - mtnc.integer(); // Do one work unit - wnc.fetch_add(workunits,std::memory_order_relaxed); - } - - t.fetch_add(1,std::memory_order_relaxed); - - if(!skip) { - std::unique_lock l(m); - if(num_items_critical) { - // Do some work while holding the lock - int workunits = num_items_critical;//(int) (mtc.poissonInterval((float)num_items_critical) + 0.5f); - for (int i = 1; i < workunits; i++) - mtc.integer(); // Do one work unit - wc.fetch_add(workunits,std::memory_order_relaxed); - } - } - } -} -template -void testmutex_outer(std::map>& results, std::string const& name, double critical_fraction, double critical_duration) { - - std::ostringstream truename; - truename << name << " (f=" << critical_fraction << ",d=" << critical_duration << ")"; - - std::vector& data = results[truename.str()]; - - double const workItemTime = time_item() , - nilTime = time_nil(); - - int const num_items_critical = (critical_duration <= 0 ? 0 : (std::max)( int(critical_duration / workItemTime + 0.5), int(100 * nilTime / workItemTime + 0.5))), - num_items_noncritical = (num_items_critical <= 0 ? 0 : int( ( 1 - critical_fraction ) * num_items_critical / critical_fraction + 0.5 )); - - FOR_GAUNTLET(num_threads) { - - //Kokkos::Impl::portable_sleep(std::chrono::microseconds(2000000)); - - int const num_iterations = (num_items_critical + num_items_noncritical != 0) ? -#ifdef __SYNCHRONIC_JUST_YIELD - int( 1 / ( 8 * workItemTime ) / (num_items_critical + num_items_noncritical) / num_threads + 0.5 ) : -#else - int( 1 / ( 8 * workItemTime ) / (num_items_critical + num_items_noncritical) / num_threads + 0.5 ) : -#endif -#ifdef WIN32 - int( 1 / workItemTime / (20 * num_threads * num_threads) ); -#else - int( 1 / workItemTime / (200 * num_threads * num_threads) ); -#endif - -#ifdef VERBOSE_TEST - std::cerr << "running " << truename.str() << " #" << num_threads << ", " << num_iterations << " * " << num_items_noncritical << "\n" << std::flush; -#endif - - - std::atomic t[2], wc[2], wnc[2]; - - clock_t start[2], end[2]; - for(int pass = 0; pass < 2; ++pass) { - - t[pass] = 0; - wc[pass] = 0; - wnc[pass] = 0; - - srand(num_threads); - std::vector randomsnc(num_threads), - randomsc(num_threads); - - mutex_type m; - - start[pass] = clock(); -#ifdef USEOMP - omp_set_num_threads(num_threads); - std::atomic _j(0); - #pragma omp parallel - { - int const j = _j.fetch_add(1,std::memory_order_relaxed); - testmutex_inner(m, t[pass], wc[pass], wnc[pass], num_iterations, num_items_critical, num_items_noncritical, randomsc[j], randomsnc[j], pass==0); - num_threads = omp_get_num_threads(); - } -#else - std::vector threads(num_threads); - for(unsigned j = 0; j < num_threads; ++j) - threads[j] = new std::thread([&,j](){ - testmutex_inner(m, t[pass], wc[pass], wnc[pass], num_iterations, num_items_critical, num_items_noncritical, randomsc[j], randomsnc[j], pass==0); - } - ); - for(unsigned j = 0; j < num_threads; ++j) { - threads[j]->join(); - delete threads[j]; - } -#endif - end[pass] = clock(); - } - if(t[0] != t[1]) throw std::string("mismatched iteration counts"); - if(wnc[0] != wnc[1]) throw std::string("mismatched work item counts"); - - double elapsed_seconds_0 = (end[0] - start[0]) / double(CLOCKS_PER_SEC), - elapsed_seconds_1 = (end[1] - start[1]) / double(CLOCKS_PER_SEC); - double time = (elapsed_seconds_1 - elapsed_seconds_0 - wc[1]*workItemTime) / num_iterations; - - data.push_back(time); -#ifdef VERBOSE_TEST - std::cerr << truename.str() << " : " << num_threads << "," << elapsed_seconds_1 / num_iterations << " - " << elapsed_seconds_0 / num_iterations << " - " << wc[1]*workItemTime/num_iterations << " = " << time << " \n"; -#endif - } -} - -template -void testbarrier_inner(barrier_type& b, int const num_threads, int const j, std::atomic& t,std::atomic& w, - int const num_iterations_odd, int const num_iterations_even, - int const num_items_noncritical, MersenneTwister& arg_mt, bool skip) { - - for(int k = 0; k < (std::max)(num_iterations_even,num_iterations_odd); ++k) { - - if(k >= (~j & 0x1 ? num_iterations_odd : num_iterations_even )) { - if(!skip) - b.arrive_and_drop(); - break; - } - - if(num_items_noncritical) { - // Do some work without holding the lock - int workunits = (int) (arg_mt.poissonInterval((float)num_items_noncritical) + 0.5f); - for (int i = 1; i < workunits; i++) - arg_mt.integer(); // Do one work unit - w.fetch_add(workunits,std::memory_order_relaxed); - } - - t.fetch_add(1,std::memory_order_relaxed); - - if(!skip) { - int const thiscount = (std::min)(k+1,num_iterations_odd)*((num_threads>>1)+(num_threads&1)) + (std::min)(k+1,num_iterations_even)*(num_threads>>1); - if(t.load(std::memory_order_relaxed) > thiscount) { - std::cerr << "FAILURE: some threads have run ahead of the barrier (" << t.load(std::memory_order_relaxed) << ">" << thiscount << ").\n"; - EXPECT_TRUE(false); - } -#ifdef USEOMP - #pragma omp barrier -#else - b.arrive_and_wait(); -#endif - if(t.load(std::memory_order_relaxed) < thiscount) { - std::cerr << "FAILURE: some threads have fallen behind the barrier (" << t.load(std::memory_order_relaxed) << "<" << thiscount << ").\n"; - EXPECT_TRUE(false); - } - } - } -} -template -void testbarrier_outer(std::map>& results, std::string const& name, double barrier_frequency, double phase_duration, bool randomIterations = false) { - - std::vector& data = results[name]; - - double const workItemTime = time_item(); - int const num_items_noncritical = int( phase_duration / workItemTime + 0.5 ); - - FOR_GAUNTLET(num_threads) { - - int const num_iterations = int( barrier_frequency ); -#ifdef VERBOSE_TEST - std::cerr << "running " << name << " #" << num_threads << ", " << num_iterations << " * " << num_items_noncritical << "\r" << std::flush; -#endif - - srand(num_threads); - - MersenneTwister local_mt; - int const num_iterations_odd = randomIterations ? int(local_mt.poissonInterval((float)num_iterations)+0.5f) : num_iterations, - num_iterations_even = randomIterations ? int(local_mt.poissonInterval((float)num_iterations)+0.5f) : num_iterations; - - std::atomic t[2], w[2]; - std::chrono::time_point start[2], end[2]; - for(int pass = 0; pass < 2; ++pass) { - - t[pass] = 0; - w[pass] = 0; - - srand(num_threads); - std::vector randoms(num_threads); - - barrier_type b(num_threads); - - start[pass] = std::chrono::high_resolution_clock::now(); -#ifdef USEOMP - omp_set_num_threads(num_threads); - std::atomic _j(0); - #pragma omp parallel - { - int const j = _j.fetch_add(1,std::memory_order_relaxed); - testbarrier_inner(b, num_threads, j, t[pass], w[pass], num_iterations_odd, num_iterations_even, num_items_noncritical, randoms[j], pass==0); - num_threads = omp_get_num_threads(); - } -#else - std::vector threads(num_threads); - for(unsigned j = 0; j < num_threads; ++j) - threads[j] = new std::thread([&,j](){ - testbarrier_inner(b, num_threads, j, t[pass], w[pass], num_iterations_odd, num_iterations_even, num_items_noncritical, randoms[j], pass==0); - }); - for(unsigned j = 0; j < num_threads; ++j) { - threads[j]->join(); - delete threads[j]; - } -#endif - end[pass] = std::chrono::high_resolution_clock::now(); - } - - if(t[0] != t[1]) throw std::string("mismatched iteration counts"); - if(w[0] != w[1]) throw std::string("mismatched work item counts"); - - int const phases = (std::max)(num_iterations_odd, num_iterations_even); - - std::chrono::duration elapsed_seconds_0 = end[0]-start[0], - elapsed_seconds_1 = end[1]-start[1]; - double const time = (elapsed_seconds_1.count() - elapsed_seconds_0.count()) / phases; - - data.push_back(time); -#ifdef VERBOSE_TEST - std::cerr << name << " : " << num_threads << "," << elapsed_seconds_1.count() / phases << " - " << elapsed_seconds_0.count() / phases << " = " << time << " \n"; -#endif - } -} - -template -struct mutex_tester; -template -struct mutex_tester { - static void run(std::map>& results, std::string const name[], double critical_fraction, double critical_duration) { - testmutex_outer(results, *name, critical_fraction, critical_duration); - } -}; -template -struct mutex_tester { - static void run(std::map>& results, std::string const name[], double critical_fraction, double critical_duration) { - mutex_tester::run(results, name, critical_fraction, critical_duration); - mutex_tester::run(results, ++name, critical_fraction, critical_duration); - } -}; - -TEST( synchronic, main ) -{ - //warm up - time_item(); - - //measure up -#ifdef VERBOSE_TEST - std::cerr << "measuring work item speed...\r"; - std::cerr << "work item speed is " << time_item() << " per item, nil is " << time_nil() << "\n"; -#endif - try { - - std::pair testpoints[] = { {1, 0}, /*{1E-1, 10E-3}, {5E-1, 2E-6}, {3E-1, 50E-9},*/ }; - for(auto x : testpoints ) { - - std::map> results; - - //testbarrier_outer(results, PREFIX"bar 1khz 100us", 1E3, x.second); - - std::string const names[] = { - PREFIX"tkt", PREFIX"mcs", PREFIX"ttas", PREFIX"std" -#ifdef WIN32 - ,PREFIX"srw" -#endif - }; - - //run --> - - mutex_tester< - ticket_mutex, mcs_mutex, ttas_mutex, std::mutex -#ifdef WIN32 - ,srw_mutex -#endif - >::run(results, names, x.first, x.second); - - //<-- run - -#ifdef VERBOSE_TEST - std::cout << "threads"; - for(auto & i : results) - std::cout << ",\"" << i.first << '\"'; - std::cout << std::endl; - int j = 0; - FOR_GAUNTLET(num_threads) { - std::cout << num_threads; - for(auto & i : results) - std::cout << ',' << i.second[j]; - std::cout << std::endl; - ++j; - } -#endif - } - } - catch(std::string & e) { - std::cerr << "EXCEPTION : " << e << std::endl; - EXPECT_TRUE( false ); - } -} - -} // namespace Test - -#endif diff --git a/lib/kokkos/core/unit_test/TestSynchronic.hpp b/lib/kokkos/core/unit_test/TestSynchronic.hpp deleted file mode 100644 index f4341b9781..0000000000 --- a/lib/kokkos/core/unit_test/TestSynchronic.hpp +++ /dev/null @@ -1,241 +0,0 @@ -/* - -Copyright (c) 2014, NVIDIA Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -#ifndef TEST_SYNCHRONIC_HPP -#define TEST_SYNCHRONIC_HPP - -#include -#include -#include - -namespace Test { - -template -struct dumb_mutex { - - dumb_mutex () : locked(0) { - } - - void lock() { - while(1) { - bool state = false; - if (locked.compare_exchange_weak(state,true,std::memory_order_acquire)) { - break; - } - while (locked.load(std::memory_order_relaxed)) { - if (!truly) { - Kokkos::Impl::portable_yield(); - } - } - } - } - - void unlock() { - locked.store(false,std::memory_order_release); - } - -private : - std::atomic locked; -}; - -#ifdef WIN32 -#include -#include -#include -struct srw_mutex { - - srw_mutex () { - InitializeSRWLock(&_lock); - } - - void lock() { - AcquireSRWLockExclusive(&_lock); - } - void unlock() { - ReleaseSRWLockExclusive(&_lock); - } - -private : - SRWLOCK _lock; -}; -#endif - -struct ttas_mutex { - - ttas_mutex() : locked(false) { - } - - ttas_mutex(const ttas_mutex&) = delete; - ttas_mutex& operator=(const ttas_mutex&) = delete; - - void lock() { - for(int i = 0;; ++i) { - bool state = false; - if(locked.compare_exchange_weak(state,true,std::memory_order_relaxed,Kokkos::Impl::notify_none)) - break; - locked.expect_update(true); - } - std::atomic_thread_fence(std::memory_order_acquire); - } - void unlock() { - locked.store(false,std::memory_order_release); - } - -private : - Kokkos::Impl::synchronic locked; -}; - -struct ticket_mutex { - - ticket_mutex() : active(0), queue(0) { - } - - ticket_mutex(const ticket_mutex&) = delete; - ticket_mutex& operator=(const ticket_mutex&) = delete; - - void lock() { - int const me = queue.fetch_add(1, std::memory_order_relaxed); - while(me != active.load_when_equal(me, std::memory_order_acquire)) - ; - } - - void unlock() { - active.fetch_add(1,std::memory_order_release); - } -private : - Kokkos::Impl::synchronic active; - std::atomic queue; -}; - -struct mcs_mutex { - - mcs_mutex() : head(nullptr) { - } - - mcs_mutex(const mcs_mutex&) = delete; - mcs_mutex& operator=(const mcs_mutex&) = delete; - - struct unique_lock { - - unique_lock(mcs_mutex & arg_m) : m(arg_m), next(nullptr), ready(false) { - - unique_lock * const h = m.head.exchange(this,std::memory_order_acquire); - if(__builtin_expect(h != nullptr,0)) { - h->next.store(this,std::memory_order_seq_cst,Kokkos::Impl::notify_one); - while(!ready.load_when_not_equal(false,std::memory_order_acquire)) - ; - } - } - - unique_lock(const unique_lock&) = delete; - unique_lock& operator=(const unique_lock&) = delete; - - ~unique_lock() { - unique_lock * h = this; - if(__builtin_expect(!m.head.compare_exchange_strong(h,nullptr,std::memory_order_release, std::memory_order_relaxed),0)) { - unique_lock * n = next.load(std::memory_order_relaxed); - while(!n) - n = next.load_when_not_equal(n,std::memory_order_relaxed); - n->ready.store(true,std::memory_order_release,Kokkos::Impl::notify_one); - } - } - - private: - mcs_mutex & m; - Kokkos::Impl::synchronic next; - Kokkos::Impl::synchronic ready; - }; - -private : - std::atomic head; -}; - -} - -namespace std { -template<> -struct unique_lock : Test::mcs_mutex::unique_lock { - unique_lock(Test::mcs_mutex & arg_m) : Test::mcs_mutex::unique_lock(arg_m) { - } - unique_lock(const unique_lock&) = delete; - unique_lock& operator=(const unique_lock&) = delete; -}; - -} - -/* #include */ -#include - -namespace Test { - -//------------------------------------- -// MersenneTwister -//------------------------------------- -#define MT_IA 397 -#define MT_LEN 624 - -class MersenneTwister -{ - volatile unsigned long m_buffer[MT_LEN][64/sizeof(unsigned long)]; - volatile int m_index; - -public: - MersenneTwister() { - for (int i = 0; i < MT_LEN; i++) - m_buffer[i][0] = rand(); - m_index = 0; - for (int i = 0; i < MT_LEN * 100; i++) - integer(); - } - unsigned long integer() { - // Indices - int i = m_index; - int i2 = m_index + 1; if (i2 >= MT_LEN) i2 = 0; // wrap-around - int j = m_index + MT_IA; if (j >= MT_LEN) j -= MT_LEN; // wrap-around - - // Twist - unsigned long s = (m_buffer[i][0] & 0x80000000) | (m_buffer[i2][0] & 0x7fffffff); - unsigned long r = m_buffer[j][0] ^ (s >> 1) ^ ((s & 1) * 0x9908B0DF); - m_buffer[m_index][0] = r; - m_index = i2; - - // Swizzle - r ^= (r >> 11); - r ^= (r << 7) & 0x9d2c5680UL; - r ^= (r << 15) & 0xefc60000UL; - r ^= (r >> 18); - return r; - } - float poissonInterval(float ooLambda) { - return -logf(1.0f - integer() * 2.3283e-10f) * ooLambda; - } -}; - -} // namespace Test - -#endif //TEST_HPP diff --git a/lib/kokkos/core/unit_test/TestTaskScheduler.hpp b/lib/kokkos/core/unit_test/TestTaskScheduler.hpp index 1134553980..57e47d4baa 100644 --- a/lib/kokkos/core/unit_test/TestTaskScheduler.hpp +++ b/lib/kokkos/core/unit_test/TestTaskScheduler.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,12 +36,11 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ - #ifndef KOKKOS_UNITTEST_TASKSCHEDULER_HPP #define KOKKOS_UNITTEST_TASKSCHEDULER_HPP @@ -51,9 +50,6 @@ #if defined( KOKKOS_ENABLE_TASKDAG ) -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- - namespace TestTaskScheduler { namespace { @@ -61,14 +57,14 @@ namespace { inline long eval_fib( long n ) { - constexpr long mask = 0x03 ; + constexpr long mask = 0x03; - long fib[4] = { 0 , 1 , 1 , 2 }; + long fib[4] = { 0, 1, 1, 2 }; - for ( long i = 2 ; i <= n ; ++i ) { + for ( long i = 2; i <= n; ++i ) { fib[ i & mask ] = fib[ ( i - 1 ) & mask ] + fib[ ( i - 2 ) & mask ]; } - + return fib[ n & mask ]; } @@ -77,100 +73,93 @@ long eval_fib( long n ) template< typename Space > struct TestFib { - typedef Kokkos::TaskScheduler policy_type ; - typedef Kokkos::Future future_type ; - typedef long value_type ; + typedef Kokkos::TaskScheduler< Space > sched_type; + typedef Kokkos::Future< long, Space > future_type; + typedef long value_type; - policy_type policy ; - future_type fib_m1 ; - future_type fib_m2 ; - const value_type n ; + sched_type sched; + future_type fib_m1; + future_type fib_m2; + const value_type n; KOKKOS_INLINE_FUNCTION - TestFib( const policy_type & arg_policy , const value_type arg_n ) - : policy(arg_policy) - , fib_m1() , fib_m2() - , n( arg_n ) - {} + TestFib( const sched_type & arg_sched, const value_type arg_n ) + : sched( arg_sched ), fib_m1(), fib_m2(), n( arg_n ) {} KOKKOS_INLINE_FUNCTION - void operator()( typename policy_type::member_type & , value_type & result ) - { + void operator()( typename sched_type::member_type &, value_type & result ) + { #if 0 - printf( "\nTestFib(%ld) %d %d\n" - , n - , int( ! fib_m1.is_null() ) - , int( ! fib_m2.is_null() ) - ); + printf( "\nTestFib(%ld) %d %d\n", n, int( !fib_m1.is_null() ), int( !fib_m2.is_null() ) ); #endif - if ( n < 2 ) { - result = n ; - } - else if ( ! fib_m2.is_null() && ! fib_m1.is_null() ) { - result = fib_m1.get() + fib_m2.get(); - } - else { - - // Spawn new children and respawn myself to sum their results: - // Spawn lower value at higher priority as it has a shorter - // path to completion. - - fib_m2 = policy.task_spawn( TestFib(policy,n-2) - , Kokkos::TaskSingle - , Kokkos::TaskHighPriority ); + if ( n < 2 ) { + result = n; + } + else if ( !fib_m2.is_null() && !fib_m1.is_null() ) { + result = fib_m1.get() + fib_m2.get(); + } + else { + // Spawn new children and respawn myself to sum their results. + // Spawn lower value at higher priority as it has a shorter + // path to completion. - fib_m1 = policy.task_spawn( TestFib(policy,n-1) - , Kokkos::TaskSingle ); + fib_m2 = Kokkos::task_spawn( Kokkos::TaskSingle( sched, Kokkos::TaskPriority::High ) + , TestFib( sched, n - 2 ) ); - Kokkos::Future dep[] = { fib_m1 , fib_m2 }; + fib_m1 = Kokkos::task_spawn( Kokkos::TaskSingle( sched ) + , TestFib( sched, n - 1 ) ); - Kokkos::Future fib_all = policy.when_all( 2 , dep ); + Kokkos::Future< Space > dep[] = { fib_m1, fib_m2 }; + Kokkos::Future< Space > fib_all = Kokkos::when_all( dep, 2 ); - if ( ! fib_m2.is_null() && ! fib_m1.is_null() && ! fib_all.is_null() ) { - // High priority to retire this branch - policy.respawn( this , Kokkos::TaskHighPriority , fib_all ); - } - else { + if ( !fib_m2.is_null() && !fib_m1.is_null() && !fib_all.is_null() ) { + // High priority to retire this branch. + Kokkos::respawn( this, fib_all, Kokkos::TaskPriority::High ); + } + else { #if 1 - printf( "TestFib(%ld) insufficient memory alloc_capacity(%d) task_max(%d) task_accum(%ld)\n" - , n - , policy.allocation_capacity() - , policy.allocated_task_count_max() - , policy.allocated_task_count_accum() - ); + printf( "TestFib(%ld) insufficient memory alloc_capacity(%d) task_max(%d) task_accum(%ld)\n" + , n + , sched.allocation_capacity() + , sched.allocated_task_count_max() + , sched.allocated_task_count_accum() + ); #endif - Kokkos::abort("TestFib insufficient memory"); - } + Kokkos::abort( "TestFib insufficient memory" ); + } } + } - static void run( int i , size_t MemoryCapacity = 16000 ) - { - typedef typename policy_type::memory_space memory_space ; + static void run( int i, size_t MemoryCapacity = 16000 ) + { + typedef typename sched_type::memory_space memory_space; - enum { Log2_SuperBlockSize = 12 }; + enum { Log2_SuperBlockSize = 12 }; - policy_type root_policy( memory_space() , MemoryCapacity , Log2_SuperBlockSize ); + sched_type root_sched( memory_space(), MemoryCapacity, Log2_SuperBlockSize ); - future_type f = root_policy.host_spawn( TestFib(root_policy,i) , Kokkos::TaskSingle ); - Kokkos::wait( root_policy ); - ASSERT_EQ( eval_fib(i) , f.get() ); + future_type f = Kokkos::host_spawn( Kokkos::TaskSingle( root_sched ) + , TestFib( root_sched, i ) ); + + Kokkos::wait( root_sched ); + + ASSERT_EQ( eval_fib( i ), f.get() ); #if 0 - fprintf( stdout , "\nTestFib::run(%d) spawn_size(%d) when_all_size(%d) alloc_capacity(%d) task_max(%d) task_accum(%ld)\n" - , i - , int(root_policy.template spawn_allocation_size()) - , int(root_policy.when_all_allocation_size(2)) - , root_policy.allocation_capacity() - , root_policy.allocated_task_count_max() - , root_policy.allocated_task_count_accum() - ); - fflush( stdout ); + fprintf( stdout, "\nTestFib::run(%d) spawn_size(%d) when_all_size(%d) alloc_capacity(%d) task_max(%d) task_accum(%ld)\n" + , i + , int(root_sched.template spawn_allocation_size()) + , int(root_sched.when_all_allocation_size(2)) + , root_sched.allocation_capacity() + , root_sched.allocated_task_count_max() + , root_sched.allocated_task_count_accum() + ); + fflush( stdout ); #endif - } - + } }; } // namespace TestTaskScheduler @@ -181,73 +170,71 @@ namespace TestTaskScheduler { template< class Space > struct TestTaskDependence { + typedef Kokkos::TaskScheduler< Space > sched_type; + typedef Kokkos::Future< Space > future_type; + typedef Kokkos::View< long, Space > accum_type; + typedef void value_type; - typedef Kokkos::TaskScheduler policy_type ; - typedef Kokkos::Future future_type ; - typedef Kokkos::View accum_type ; - typedef void value_type ; - - policy_type m_policy ; - accum_type m_accum ; - long m_count ; + sched_type m_sched; + accum_type m_accum; + long m_count; KOKKOS_INLINE_FUNCTION TestTaskDependence( long n - , const policy_type & arg_policy - , const accum_type & arg_accum ) - : m_policy( arg_policy ) + , const sched_type & arg_sched + , const accum_type & arg_accum ) + : m_sched( arg_sched ) , m_accum( arg_accum ) - , m_count( n ) - {} + , m_count( n ) {} KOKKOS_INLINE_FUNCTION - void operator()( typename policy_type::member_type & ) - { - enum { CHUNK = 8 }; - const int n = CHUNK < m_count ? CHUNK : m_count ; + void operator()( typename sched_type::member_type & ) + { + enum { CHUNK = 8 }; + const int n = CHUNK < m_count ? CHUNK : m_count; - if ( 1 < m_count ) { - future_type f[ CHUNK ] ; + if ( 1 < m_count ) { + future_type f[ CHUNK ]; - const int inc = ( m_count + n - 1 ) / n ; + const int inc = ( m_count + n - 1 ) / n; - for ( int i = 0 ; i < n ; ++i ) { - long begin = i * inc ; - long count = begin + inc < m_count ? inc : m_count - begin ; - f[i] = m_policy.task_spawn( TestTaskDependence(count,m_policy,m_accum) , Kokkos::TaskSingle ); - } + for ( int i = 0; i < n; ++i ) { + long begin = i * inc; + long count = begin + inc < m_count ? inc : m_count - begin; + f[i] = Kokkos::task_spawn( Kokkos::TaskSingle( m_sched ) + , TestTaskDependence( count, m_sched, m_accum ) ); + } - m_count = 0 ; + m_count = 0; - m_policy.respawn( this , m_policy.when_all( n , f ) ); - } - else if ( 1 == m_count ) { - Kokkos::atomic_increment( & m_accum() ); - } + Kokkos::respawn( this, Kokkos::when_all( f, n ) ); + } + else if ( 1 == m_count ) { + Kokkos::atomic_increment( & m_accum() ); } + } static void run( int n ) - { - typedef typename policy_type::memory_space memory_space ; + { + typedef typename sched_type::memory_space memory_space; - // enum { MemoryCapacity = 4000 }; // Triggers infinite loop in memory pool - enum { MemoryCapacity = 16000 }; - enum { Log2_SuperBlockSize = 12 }; - policy_type policy( memory_space() , MemoryCapacity , Log2_SuperBlockSize ); + // enum { MemoryCapacity = 4000 }; // Triggers infinite loop in memory pool. + enum { MemoryCapacity = 16000 }; + enum { Log2_SuperBlockSize = 12 }; + sched_type sched( memory_space(), MemoryCapacity, Log2_SuperBlockSize ); - accum_type accum("accum"); + accum_type accum( "accum" ); - typename accum_type::HostMirror host_accum = - Kokkos::create_mirror_view( accum ); + typename accum_type::HostMirror host_accum = Kokkos::create_mirror_view( accum ); - policy.host_spawn( TestTaskDependence(n,policy,accum) , Kokkos::TaskSingle ); + Kokkos::host_spawn( Kokkos::TaskSingle( sched ), TestTaskDependence( n, sched, accum ) ); - Kokkos::wait( policy ); + Kokkos::wait( sched ); - Kokkos::deep_copy( host_accum , accum ); + Kokkos::deep_copy( host_accum, accum ); - ASSERT_EQ( host_accum() , n ); - } + ASSERT_EQ( host_accum(), n ); + } }; } // namespace TestTaskScheduler @@ -258,294 +245,317 @@ namespace TestTaskScheduler { template< class ExecSpace > struct TestTaskTeam { - //enum { SPAN = 8 }; enum { SPAN = 33 }; //enum { SPAN = 1 }; - typedef void value_type ; - typedef Kokkos::TaskScheduler policy_type ; - typedef Kokkos::Future future_type ; - typedef Kokkos::View view_type ; + typedef void value_type; + typedef Kokkos::TaskScheduler< ExecSpace > sched_type; + typedef Kokkos::Future< ExecSpace > future_type; + typedef Kokkos::View< long*, ExecSpace > view_type; - policy_type policy ; - future_type future ; + sched_type sched; + future_type future; - view_type parfor_result ; - view_type parreduce_check ; - view_type parscan_result ; - view_type parscan_check ; - const long nvalue ; + view_type parfor_result; + view_type parreduce_check; + view_type parscan_result; + view_type parscan_check; + const long nvalue; KOKKOS_INLINE_FUNCTION - TestTaskTeam( const policy_type & arg_policy - , const view_type & arg_parfor_result - , const view_type & arg_parreduce_check - , const view_type & arg_parscan_result - , const view_type & arg_parscan_check - , const long arg_nvalue ) - : policy(arg_policy) + TestTaskTeam( const sched_type & arg_sched + , const view_type & arg_parfor_result + , const view_type & arg_parreduce_check + , const view_type & arg_parscan_result + , const view_type & arg_parscan_check + , const long arg_nvalue ) + : sched( arg_sched ) , future() , parfor_result( arg_parfor_result ) , parreduce_check( arg_parreduce_check ) , parscan_result( arg_parscan_result ) , parscan_check( arg_parscan_check ) - , nvalue( arg_nvalue ) - {} + , nvalue( arg_nvalue ) {} KOKKOS_INLINE_FUNCTION - void operator()( typename policy_type::member_type & member ) - { - const long end = nvalue + 1 ; - const long begin = 0 < end - SPAN ? end - SPAN : 0 ; - - if ( 0 < begin && future.is_null() ) { - if ( member.team_rank() == 0 ) { - future = policy.task_spawn - ( TestTaskTeam( policy , - parfor_result , - parreduce_check, - parscan_result, - parscan_check, - begin - 1 ) - , Kokkos::TaskTeam ); - - assert( ! future.is_null() ); - - policy.respawn( this , future ); - } - return ; - } + void operator()( typename sched_type::member_type & member ) + { + const long end = nvalue + 1; + const long begin = 0 < end - SPAN ? end - SPAN : 0; - Kokkos::parallel_for( Kokkos::TeamThreadRange(member,begin,end) - , [&]( int i ) { parfor_result[i] = i ; } - ); - - // test parallel_reduce without join - - long tot = 0; - long expected = (begin+end-1)*(end-begin)*0.5; - - Kokkos::parallel_reduce( Kokkos::TeamThreadRange(member,begin,end) - , [&]( int i, long &res) { res += parfor_result[i]; } - , tot); - Kokkos::parallel_for( Kokkos::TeamThreadRange(member,begin,end) - , [&]( int i ) { parreduce_check[i] = expected-tot ; } - ); - - // test parallel_reduce with join - - tot = 0; - Kokkos::parallel_reduce( Kokkos::TeamThreadRange(member,begin,end) - , [&]( int i, long &res) { res += parfor_result[i]; } - , [&]( long& val1, const long& val2) { val1 += val2; } - , tot); - Kokkos::parallel_for( Kokkos::TeamThreadRange(member,begin,end) - , [&]( int i ) { parreduce_check[i] += expected-tot ; } - ); - - // test parallel_scan - - // Exclusive scan - Kokkos::parallel_scan( Kokkos::TeamThreadRange(member,begin,end) - , [&]( int i, long &val , const bool final ) { - if ( final ) { parscan_result[i] = val; } - val += i; - } - ); + if ( 0 < begin && future.is_null() ) { if ( member.team_rank() == 0 ) { - for ( long i = begin ; i < end ; ++i ) { - parscan_check[i] = (i*(i-1)-begin*(begin-1))*0.5-parscan_result[i]; - } + future = Kokkos::task_spawn( Kokkos::TaskTeam( sched ) + , TestTaskTeam( sched + , parfor_result + , parreduce_check + , parscan_result + , parscan_check + , begin - 1 ) + ); + + assert( !future.is_null() ); + + Kokkos::respawn( this, future ); } - // Inclusive scan - Kokkos::parallel_scan( Kokkos::TeamThreadRange(member,begin,end) - , [&]( int i, long &val , const bool final ) { - val += i; - if ( final ) { parscan_result[i] = val; } - } - ); - if ( member.team_rank() == 0 ) { - for ( long i = begin ; i < end ; ++i ) { - parscan_check[i] += (i*(i+1)-begin*(begin-1))*0.5-parscan_result[i]; - } + return; + } + + Kokkos::parallel_for( Kokkos::TeamThreadRange( member, begin, end ) + , [&] ( int i ) { parfor_result[i] = i; } + ); + + // Test parallel_reduce without join. + + long tot = 0; + long expected = ( begin + end - 1 ) * ( end - begin ) * 0.5; + + Kokkos::parallel_reduce( Kokkos::TeamThreadRange( member, begin, end ) + , [&] ( int i, long & res ) { res += parfor_result[i]; } + , tot + ); + + Kokkos::parallel_for( Kokkos::TeamThreadRange( member, begin, end ) + , [&] ( int i ) { parreduce_check[i] = expected - tot; } + ); + + // Test parallel_reduce with join. + + tot = 0; + Kokkos::parallel_reduce( Kokkos::TeamThreadRange( member, begin, end ) + , [&] ( int i, long & res ) { res += parfor_result[i]; } +#if 0 + , Kokkos::Sum( tot ) +#else + , [] ( long & dst, const long & src ) { dst += src; } + , tot +#endif + ); + + Kokkos::parallel_for( Kokkos::TeamThreadRange( member, begin, end ) + , [&] ( int i ) { parreduce_check[i] += expected - tot; } + ); + + // Test parallel_scan. + + // Exclusive scan. + Kokkos::parallel_scan( Kokkos::TeamThreadRange( member, begin, end ) + , [&] ( int i, long & val, const bool final ) + { + if ( final ) { parscan_result[i] = val; } + + val += i; + }); + + // Wait for 'parscan_result' before testing it. + member.team_barrier(); + + if ( member.team_rank() == 0 ) { + for ( long i = begin; i < end; ++i ) { + parscan_check[i] = ( i * ( i - 1 ) - begin * ( begin - 1 ) ) * 0.5 - parscan_result[i]; } - // ThreadVectorRange check - /* - long result = 0; - expected = (begin+end-1)*(end-begin)*0.5; - Kokkos::parallel_reduce( Kokkos::TeamThreadRange( member , 0 , 1 ) - , [&] ( const int i , long & outerUpdate ) { - long sum_j = 0.0; - Kokkos::parallel_reduce( Kokkos::ThreadVectorRange( member , end - begin ) - , [&] ( const int j , long &innerUpdate ) { - innerUpdate += begin+j; - } , sum_j ); - outerUpdate += sum_j ; - } , result ); - Kokkos::parallel_for( Kokkos::TeamThreadRange(member,begin,end) - , [&]( int i ) { - parreduce_check[i] += result-expected ; - } - ); - */ } - static void run( long n ) + // Don't overwrite 'parscan_result' until it has been tested. + member.team_barrier(); + + // Inclusive scan. + Kokkos::parallel_scan( Kokkos::TeamThreadRange( member, begin, end ) + , [&] ( int i, long & val, const bool final ) { - // const unsigned memory_capacity = 10000 ; // causes memory pool infinite loop - // const unsigned memory_capacity = 100000 ; // fails with SPAN=1 for serial and OMP - const unsigned memory_capacity = 400000 ; - - policy_type root_policy( typename policy_type::memory_space() - , memory_capacity ); - - view_type root_parfor_result("parfor_result",n+1); - view_type root_parreduce_check("parreduce_check",n+1); - view_type root_parscan_result("parscan_result",n+1); - view_type root_parscan_check("parscan_check",n+1); - - typename view_type::HostMirror - host_parfor_result = Kokkos::create_mirror_view( root_parfor_result ); - typename view_type::HostMirror - host_parreduce_check = Kokkos::create_mirror_view( root_parreduce_check ); - typename view_type::HostMirror - host_parscan_result = Kokkos::create_mirror_view( root_parscan_result ); - typename view_type::HostMirror - host_parscan_check = Kokkos::create_mirror_view( root_parscan_check ); - - future_type f = root_policy.host_spawn( - TestTaskTeam( root_policy , - root_parfor_result , - root_parreduce_check , - root_parscan_result, - root_parscan_check, - n ) , - Kokkos::TaskTeam ); - - Kokkos::wait( root_policy ); - - Kokkos::deep_copy( host_parfor_result , root_parfor_result ); - Kokkos::deep_copy( host_parreduce_check , root_parreduce_check ); - Kokkos::deep_copy( host_parscan_result , root_parscan_result ); - Kokkos::deep_copy( host_parscan_check , root_parscan_check ); - - for ( long i = 0 ; i <= n ; ++i ) { - const long answer = i ; - if ( host_parfor_result(i) != answer ) { - std::cerr << "TestTaskTeam::run ERROR parallel_for result(" << i << ") = " - << host_parfor_result(i) << " != " << answer << std::endl ; - } - if ( host_parreduce_check(i) != 0 ) { - std::cerr << "TestTaskTeam::run ERROR parallel_reduce check(" << i << ") = " - << host_parreduce_check(i) << " != 0" << std::endl ; - } - if ( host_parscan_check(i) != 0 ) { - std::cerr << "TestTaskTeam::run ERROR parallel_scan check(" << i << ") = " - << host_parscan_check(i) << " != 0" << std::endl ; - } + val += i; + + if ( final ) { parscan_result[i] = val; } + }); + + // Wait for 'parscan_result' before testing it. + member.team_barrier(); + + if ( member.team_rank() == 0 ) { + for ( long i = begin; i < end; ++i ) { + parscan_check[i] += ( i * ( i + 1 ) - begin * ( begin - 1 ) ) * 0.5 - parscan_result[i]; } } + + // ThreadVectorRange check. +/* + long result = 0; + expected = ( begin + end - 1 ) * ( end - begin ) * 0.5; + Kokkos::parallel_reduce( Kokkos::TeamThreadRange( member, 0, 1 ) + , [&] ( const int i, long & outerUpdate ) + { + long sum_j = 0.0; + + Kokkos::parallel_reduce( Kokkos::ThreadVectorRange( member, end - begin ) + , [&] ( const int j, long & innerUpdate ) + { + innerUpdate += begin + j; + }, sum_j ); + + outerUpdate += sum_j; + }, result ); + + Kokkos::parallel_for( Kokkos::TeamThreadRange( member, begin, end ) + , [&] ( int i ) + { + parreduce_check[i] += result - expected; + }); +*/ + } + + static void run( long n ) + { + //const unsigned memory_capacity = 10000; // Causes memory pool infinite loop. + //const unsigned memory_capacity = 100000; // Fails with SPAN=1 for serial and OMP. + const unsigned memory_capacity = 400000; + + sched_type root_sched( typename sched_type::memory_space(), memory_capacity ); + + view_type root_parfor_result( "parfor_result", n + 1 ); + view_type root_parreduce_check( "parreduce_check", n + 1 ); + view_type root_parscan_result( "parscan_result", n + 1 ); + view_type root_parscan_check( "parscan_check", n + 1 ); + + typename view_type::HostMirror + host_parfor_result = Kokkos::create_mirror_view( root_parfor_result ); + typename view_type::HostMirror + host_parreduce_check = Kokkos::create_mirror_view( root_parreduce_check ); + typename view_type::HostMirror + host_parscan_result = Kokkos::create_mirror_view( root_parscan_result ); + typename view_type::HostMirror + host_parscan_check = Kokkos::create_mirror_view( root_parscan_check ); + + future_type f = Kokkos::host_spawn( Kokkos::TaskTeam( root_sched ) + , TestTaskTeam( root_sched + , root_parfor_result + , root_parreduce_check + , root_parscan_result + , root_parscan_check + , n ) + ); + + Kokkos::wait( root_sched ); + + Kokkos::deep_copy( host_parfor_result, root_parfor_result ); + Kokkos::deep_copy( host_parreduce_check, root_parreduce_check ); + Kokkos::deep_copy( host_parscan_result, root_parscan_result ); + Kokkos::deep_copy( host_parscan_check, root_parscan_check ); + + for ( long i = 0; i <= n; ++i ) { + const long answer = i; + + if ( host_parfor_result( i ) != answer ) { + std::cerr << "TestTaskTeam::run ERROR parallel_for result(" << i << ") = " + << host_parfor_result( i ) << " != " << answer << std::endl; + } + + if ( host_parreduce_check( i ) != 0 ) { + std::cerr << "TestTaskTeam::run ERROR parallel_reduce check(" << i << ") = " + << host_parreduce_check( i ) << " != 0" << std::endl; + } + + if ( host_parscan_check( i ) != 0 ) { + std::cerr << "TestTaskTeam::run ERROR parallel_scan check(" << i << ") = " + << host_parscan_check( i ) << " != 0" << std::endl; + } + } + } }; template< class ExecSpace > struct TestTaskTeamValue { - enum { SPAN = 8 }; - typedef long value_type ; - typedef Kokkos::TaskScheduler policy_type ; - typedef Kokkos::Future future_type ; - typedef Kokkos::View view_type ; + typedef long value_type; + typedef Kokkos::TaskScheduler< ExecSpace > sched_type; + typedef Kokkos::Future< value_type, ExecSpace > future_type; + typedef Kokkos::View< long*, ExecSpace > view_type; - policy_type policy ; - future_type future ; + sched_type sched; + future_type future; - view_type result ; - const long nvalue ; + view_type result; + const long nvalue; KOKKOS_INLINE_FUNCTION - TestTaskTeamValue( const policy_type & arg_policy - , const view_type & arg_result - , const long arg_nvalue ) - : policy(arg_policy) + TestTaskTeamValue( const sched_type & arg_sched + , const view_type & arg_result + , const long arg_nvalue ) + : sched( arg_sched ) , future() , result( arg_result ) - , nvalue( arg_nvalue ) - {} + , nvalue( arg_nvalue ) {} KOKKOS_INLINE_FUNCTION - void operator()( typename policy_type::member_type const & member + void operator()( typename sched_type::member_type const & member , value_type & final ) - { - const long end = nvalue + 1 ; - const long begin = 0 < end - SPAN ? end - SPAN : 0 ; + { + const long end = nvalue + 1; + const long begin = 0 < end - SPAN ? end - SPAN : 0; - if ( 0 < begin && future.is_null() ) { - if ( member.team_rank() == 0 ) { - - future = policy.task_spawn - ( TestTaskTeamValue( policy , result , begin - 1 ) - , Kokkos::TaskTeam ); + if ( 0 < begin && future.is_null() ) { + if ( member.team_rank() == 0 ) { + future = sched.task_spawn( TestTaskTeamValue( sched, result, begin - 1 ) + , Kokkos::TaskTeam ); - assert( ! future.is_null() ); + assert( !future.is_null() ); - policy.respawn( this , future ); - } - return ; + sched.respawn( this , future ); } - Kokkos::parallel_for( Kokkos::TeamThreadRange(member,begin,end) - , [&]( int i ) { result[i] = i + 1 ; } - ); + return; + } - if ( member.team_rank() == 0 ) { - final = result[nvalue] ; - } + Kokkos::parallel_for( Kokkos::TeamThreadRange( member, begin, end ) + , [&] ( int i ) { result[i] = i + 1; } + ); - Kokkos::memory_fence(); + if ( member.team_rank() == 0 ) { + final = result[nvalue]; } + Kokkos::memory_fence(); + } + static void run( long n ) - { - // const unsigned memory_capacity = 10000 ; // causes memory pool infinite loop - const unsigned memory_capacity = 100000 ; + { + //const unsigned memory_capacity = 10000; // Causes memory pool infinite loop. + const unsigned memory_capacity = 100000; - policy_type root_policy( typename policy_type::memory_space() - , memory_capacity ); + sched_type root_sched( typename sched_type::memory_space() + , memory_capacity ); - view_type root_result("result",n+1); + view_type root_result( "result", n + 1 ); - typename view_type::HostMirror - host_result = Kokkos::create_mirror_view( root_result ); + typename view_type::HostMirror host_result = Kokkos::create_mirror_view( root_result ); - future_type fv = root_policy.host_spawn - ( TestTaskTeamValue( root_policy, root_result, n ) , Kokkos::TaskTeam ); + future_type fv = root_sched.host_spawn( TestTaskTeamValue( root_sched, root_result, n ) + , Kokkos::TaskTeam ); - Kokkos::wait( root_policy ); + Kokkos::wait( root_sched ); - Kokkos::deep_copy( host_result , root_result ); + Kokkos::deep_copy( host_result, root_result ); - if ( fv.get() != n + 1 ) { - std::cerr << "TestTaskTeamValue ERROR future = " - << fv.get() << " != " << n + 1 << std::endl ; - } - for ( long i = 0 ; i <= n ; ++i ) { - const long answer = i + 1 ; - if ( host_result(i) != answer ) { - std::cerr << "TestTaskTeamValue ERROR result(" << i << ") = " - << host_result(i) << " != " << answer << std::endl ; - } + if ( fv.get() != n + 1 ) { + std::cerr << "TestTaskTeamValue ERROR future = " + << fv.get() << " != " << n + 1 << std::endl; + } + + for ( long i = 0; i <= n; ++i ) { + const long answer = i + 1; + + if ( host_result( i ) != answer ) { + std::cerr << "TestTaskTeamValue ERROR result(" << i << ") = " + << host_result( i ) << " != " << answer << std::endl; } } + } }; -} // namespace TestTaskScheduler - -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- -#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ -#endif /* #ifndef KOKKOS_UNITTEST_TASKSCHEDULER_HPP */ +} // namespace TestTaskScheduler +#endif // #if defined( KOKKOS_ENABLE_TASKDAG ) +#endif // #ifndef KOKKOS_UNITTEST_TASKSCHEDULER_HPP diff --git a/lib/kokkos/core/unit_test/TestTeam.hpp b/lib/kokkos/core/unit_test/TestTeam.hpp index bcf4d3a173..11a523921d 100644 --- a/lib/kokkos/core/unit_test/TestTeam.hpp +++ b/lib/kokkos/core/unit_test/TestTeam.hpp @@ -48,177 +48,169 @@ #include -/*--------------------------------------------------------------------------*/ - namespace Test { + namespace { template< class ExecSpace, class ScheduleType > struct TestTeamPolicy { + typedef typename Kokkos::TeamPolicy< ScheduleType, ExecSpace >::member_type team_member; + typedef Kokkos::View< int**, ExecSpace > view_type; - typedef typename Kokkos::TeamPolicy< ScheduleType, ExecSpace >::member_type team_member ; - typedef Kokkos::View view_type ; - - view_type m_flags ; + view_type m_flags; TestTeamPolicy( const size_t league_size ) - : m_flags( Kokkos::ViewAllocateWithoutInitializing("flags") - , Kokkos::TeamPolicy< ScheduleType, ExecSpace >::team_size_max( *this ) - , league_size ) - {} + : m_flags( Kokkos::ViewAllocateWithoutInitializing( "flags" ), + Kokkos::TeamPolicy< ScheduleType, ExecSpace >::team_size_max( *this ), + league_size ) {} struct VerifyInitTag {}; KOKKOS_INLINE_FUNCTION void operator()( const team_member & member ) const - { - const int tid = member.team_rank() + member.team_size() * member.league_rank(); + { + const int tid = member.team_rank() + member.team_size() * member.league_rank(); - m_flags( member.team_rank() , member.league_rank() ) = tid ; - } + m_flags( member.team_rank(), member.league_rank() ) = tid; + } KOKKOS_INLINE_FUNCTION - void operator()( const VerifyInitTag & , const team_member & member ) const - { - const int tid = member.team_rank() + member.team_size() * member.league_rank(); + void operator()( const VerifyInitTag &, const team_member & member ) const + { + const int tid = member.team_rank() + member.team_size() * member.league_rank(); - if ( tid != m_flags( member.team_rank() , member.league_rank() ) ) { - printf("TestTeamPolicy member(%d,%d) error %d != %d\n" - , member.league_rank() , member.team_rank() - , tid , m_flags( member.team_rank() , member.league_rank() ) ); - } + if ( tid != m_flags( member.team_rank(), member.league_rank() ) ) { + printf( "TestTeamPolicy member(%d,%d) error %d != %d\n", + member.league_rank(), member.team_rank(), + tid, m_flags( member.team_rank(), member.league_rank() ) ); } + } - // included for test_small_league_size - TestTeamPolicy() - : m_flags() - {} + // Included for test_small_league_size. + TestTeamPolicy() : m_flags() {} + + // Included for test_small_league_size. + struct NoOpTag {}; - // included for test_small_league_size - struct NoOpTag {} ; KOKKOS_INLINE_FUNCTION - void operator()( const NoOpTag & , const team_member & member ) const - {} + void operator()( const NoOpTag &, const team_member & member ) const {} static void test_small_league_size() { - int bs = 8; // batch size (number of elements per batch) int ns = 16; // total number of "problems" to process - // calculate total scratch memory space size + // Calculate total scratch memory space size. const int level = 0; int mem_size = 960; - const int num_teams = ns/bs; - const Kokkos::TeamPolicy< ExecSpace, NoOpTag > policy(num_teams, Kokkos::AUTO()); + const int num_teams = ns / bs; + const Kokkos::TeamPolicy< ExecSpace, NoOpTag > policy( num_teams, Kokkos::AUTO() ); - Kokkos::parallel_for ( policy.set_scratch_size(level, Kokkos::PerTeam(mem_size), Kokkos::PerThread(0)) - , TestTeamPolicy() - ); + Kokkos::parallel_for( policy.set_scratch_size( level, Kokkos::PerTeam( mem_size ), Kokkos::PerThread( 0 ) ), + TestTeamPolicy() ); } static void test_for( const size_t league_size ) - { - TestTeamPolicy functor( league_size ); + { + TestTeamPolicy functor( league_size ); - const int team_size = Kokkos::TeamPolicy< ScheduleType, ExecSpace >::team_size_max( functor ); + const int team_size = Kokkos::TeamPolicy< ScheduleType, ExecSpace >::team_size_max( functor ); - Kokkos::parallel_for( Kokkos::TeamPolicy< ScheduleType, ExecSpace >( league_size , team_size ) , functor ); - Kokkos::parallel_for( Kokkos::TeamPolicy< ScheduleType, ExecSpace , VerifyInitTag >( league_size , team_size ) , functor ); + Kokkos::parallel_for( Kokkos::TeamPolicy< ScheduleType, ExecSpace >( league_size, team_size ), functor ); + Kokkos::parallel_for( Kokkos::TeamPolicy< ScheduleType, ExecSpace, VerifyInitTag >( league_size, team_size ), functor ); - test_small_league_size(); - } + test_small_league_size(); + } struct ReduceTag {}; - typedef long value_type ; + typedef long value_type; KOKKOS_INLINE_FUNCTION - void operator()( const team_member & member , value_type & update ) const - { - update += member.team_rank() + member.team_size() * member.league_rank(); - } + void operator()( const team_member & member, value_type & update ) const + { + update += member.team_rank() + member.team_size() * member.league_rank(); + } KOKKOS_INLINE_FUNCTION - void operator()( const ReduceTag & , const team_member & member , value_type & update ) const - { - update += 1 + member.team_rank() + member.team_size() * member.league_rank(); - } + void operator()( const ReduceTag &, const team_member & member, value_type & update ) const + { + update += 1 + member.team_rank() + member.team_size() * member.league_rank(); + } static void test_reduce( const size_t league_size ) - { - TestTeamPolicy functor( league_size ); + { + TestTeamPolicy functor( league_size ); - const int team_size = Kokkos::TeamPolicy< ScheduleType, ExecSpace >::team_size_max( functor ); - const long N = team_size * league_size ; + const int team_size = Kokkos::TeamPolicy< ScheduleType, ExecSpace >::team_size_max( functor ); + const long N = team_size * league_size; - long total = 0 ; + long total = 0; - Kokkos::parallel_reduce( Kokkos::TeamPolicy< ScheduleType, ExecSpace >( league_size , team_size ) , functor , total ); - ASSERT_EQ( size_t((N-1)*(N))/2 , size_t(total) ); + Kokkos::parallel_reduce( Kokkos::TeamPolicy< ScheduleType, ExecSpace >( league_size, team_size ), functor, total ); + ASSERT_EQ( size_t( ( N - 1 ) * ( N ) ) / 2, size_t( total ) ); - Kokkos::parallel_reduce( Kokkos::TeamPolicy< ScheduleType, ExecSpace , ReduceTag >( league_size , team_size ) , functor , total ); - ASSERT_EQ( (size_t(N)*size_t(N+1))/2 , size_t(total) ); - } + Kokkos::parallel_reduce( Kokkos::TeamPolicy< ScheduleType, ExecSpace, ReduceTag >( league_size, team_size ), functor, total ); + ASSERT_EQ( ( size_t( N ) * size_t( N + 1 ) ) / 2, size_t( total ) ); + } }; -} -} +} // namespace + +} // namespace Test /*--------------------------------------------------------------------------*/ namespace Test { -template< typename ScalarType , class DeviceType, class ScheduleType > +template< typename ScalarType, class DeviceType, class ScheduleType > class ReduceTeamFunctor { public: - typedef DeviceType execution_space ; - typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type ; - typedef typename execution_space::size_type size_type ; + typedef DeviceType execution_space; + typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type; + typedef typename execution_space::size_type size_type; struct value_type { - ScalarType value[3] ; + ScalarType value[3]; }; - const size_type nwork ; + const size_type nwork; ReduceTeamFunctor( const size_type & arg_nwork ) : nwork( arg_nwork ) {} - ReduceTeamFunctor( const ReduceTeamFunctor & rhs ) - : nwork( rhs.nwork ) {} + ReduceTeamFunctor( const ReduceTeamFunctor & rhs ) : nwork( rhs.nwork ) {} KOKKOS_INLINE_FUNCTION void init( value_type & dst ) const { - dst.value[0] = 0 ; - dst.value[1] = 0 ; - dst.value[2] = 0 ; + dst.value[0] = 0; + dst.value[1] = 0; + dst.value[2] = 0; } KOKKOS_INLINE_FUNCTION - void join( volatile value_type & dst , - const volatile value_type & src ) const + void join( volatile value_type & dst, const volatile value_type & src ) const { - dst.value[0] += src.value[0] ; - dst.value[1] += src.value[1] ; - dst.value[2] += src.value[2] ; + dst.value[0] += src.value[0]; + dst.value[1] += src.value[1]; + dst.value[2] += src.value[2]; } KOKKOS_INLINE_FUNCTION - void operator()( const typename policy_type::member_type ind , value_type & dst ) const + void operator()( const typename policy_type::member_type ind, value_type & dst ) const { const int thread_rank = ind.team_rank() + ind.team_size() * ind.league_rank(); const int thread_size = ind.team_size() * ind.league_size(); - const int chunk = ( nwork + thread_size - 1 ) / thread_size ; + const int chunk = ( nwork + thread_size - 1 ) / thread_size; - size_type iwork = chunk * thread_rank ; - const size_type iwork_end = iwork + chunk < nwork ? iwork + chunk : nwork ; + size_type iwork = chunk * thread_rank; + const size_type iwork_end = iwork + chunk < nwork ? iwork + chunk : nwork; - for ( ; iwork < iwork_end ; ++iwork ) { - dst.value[0] += 1 ; - dst.value[1] += iwork + 1 ; - dst.value[2] += nwork - iwork ; + for ( ; iwork < iwork_end; ++iwork ) { + dst.value[0] += 1; + dst.value[1] += iwork + 1; + dst.value[2] += nwork - iwork; } } }; @@ -227,58 +219,53 @@ public: namespace { -template< typename ScalarType , class DeviceType, class ScheduleType > +template< typename ScalarType, class DeviceType, class ScheduleType > class TestReduceTeam { public: - typedef DeviceType execution_space ; - typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type ; - typedef typename execution_space::size_type size_type ; - - //------------------------------------ + typedef DeviceType execution_space; + typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type; + typedef typename execution_space::size_type size_type; - TestReduceTeam( const size_type & nwork ) - { - run_test(nwork); - } + TestReduceTeam( const size_type & nwork ) { run_test( nwork ); } void run_test( const size_type & nwork ) { - typedef Test::ReduceTeamFunctor< ScalarType , execution_space , ScheduleType> functor_type ; - typedef typename functor_type::value_type value_type ; - typedef Kokkos::View< value_type, Kokkos::HostSpace, Kokkos::MemoryUnmanaged > result_type ; + typedef Test::ReduceTeamFunctor< ScalarType, execution_space, ScheduleType> functor_type; + typedef typename functor_type::value_type value_type; + typedef Kokkos::View< value_type, Kokkos::HostSpace, Kokkos::MemoryUnmanaged > result_type; enum { Count = 3 }; enum { Repeat = 100 }; value_type result[ Repeat ]; - const unsigned long nw = nwork ; - const unsigned long nsum = nw % 2 ? nw * (( nw + 1 )/2 ) - : (nw/2) * ( nw + 1 ); + const unsigned long nw = nwork; + const unsigned long nsum = nw % 2 ? nw * ( ( nw + 1 ) / 2 ) + : ( nw / 2 ) * ( nw + 1 ); - const unsigned team_size = policy_type::team_size_recommended( functor_type(nwork) ); - const unsigned league_size = ( nwork + team_size - 1 ) / team_size ; + const unsigned team_size = policy_type::team_size_recommended( functor_type( nwork ) ); + const unsigned league_size = ( nwork + team_size - 1 ) / team_size; - policy_type team_exec( league_size , team_size ); + policy_type team_exec( league_size, team_size ); - for ( unsigned i = 0 ; i < Repeat ; ++i ) { + for ( unsigned i = 0; i < Repeat; ++i ) { result_type tmp( & result[i] ); - Kokkos::parallel_reduce( team_exec , functor_type(nwork) , tmp ); + Kokkos::parallel_reduce( team_exec, functor_type( nwork ), tmp ); } execution_space::fence(); - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - for ( unsigned j = 0 ; j < Count ; ++j ) { - const unsigned long correct = 0 == j % 3 ? nw : nsum ; - ASSERT_EQ( (ScalarType) correct , result[i].value[j] ); + for ( unsigned i = 0; i < Repeat; ++i ) { + for ( unsigned j = 0; j < Count; ++j ) { + const unsigned long correct = 0 == j % 3 ? nw : nsum; + ASSERT_EQ( (ScalarType) correct, result[i].value[j] ); } } } }; -} +} // namespace /*--------------------------------------------------------------------------*/ @@ -288,53 +275,51 @@ template< class DeviceType, class ScheduleType > class ScanTeamFunctor { public: - typedef DeviceType execution_space ; - typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type ; + typedef DeviceType execution_space; + typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type; + typedef long int value_type; - typedef long int value_type ; - Kokkos::View< value_type , execution_space > accum ; - Kokkos::View< value_type , execution_space > total ; + Kokkos::View< value_type, execution_space > accum; + Kokkos::View< value_type, execution_space > total; - ScanTeamFunctor() : accum("accum"), total("total") {} + ScanTeamFunctor() : accum( "accum" ), total( "total" ) {} KOKKOS_INLINE_FUNCTION - void init( value_type & error ) const { error = 0 ; } + void init( value_type & error ) const { error = 0; } KOKKOS_INLINE_FUNCTION - void join( value_type volatile & error , - value_type volatile const & input ) const - { if ( input ) error = 1 ; } + void join( value_type volatile & error, value_type volatile const & input ) const + { if ( input ) error = 1; } struct JoinMax { - typedef long int value_type ; + typedef long int value_type; + KOKKOS_INLINE_FUNCTION - void join( value_type volatile & dst - , value_type volatile const & input ) const - { if ( dst < input ) dst = input ; } + void join( value_type volatile & dst, value_type volatile const & input ) const + { if ( dst < input ) dst = input; } }; KOKKOS_INLINE_FUNCTION - void operator()( const typename policy_type::member_type ind , value_type & error ) const + void operator()( const typename policy_type::member_type ind, value_type & error ) const { if ( 0 == ind.league_rank() && 0 == ind.team_rank() ) { const long int thread_count = ind.league_size() * ind.team_size(); - total() = ( thread_count * ( thread_count + 1 ) ) / 2 ; + total() = ( thread_count * ( thread_count + 1 ) ) / 2; } // Team max: - const int long m = ind.team_reduce( (long int) ( ind.league_rank() + ind.team_rank() ) , JoinMax() ); + const int long m = ind.team_reduce( (long int) ( ind.league_rank() + ind.team_rank() ), JoinMax() ); if ( m != ind.league_rank() + ( ind.team_size() - 1 ) ) { - printf("ScanTeamFunctor[%d.%d of %d.%d] reduce_max_answer(%ld) != reduce_max(%ld)\n" - , ind.league_rank(), ind.team_rank() - , ind.league_size(), ind.team_size() - , (long int)(ind.league_rank() + ( ind.team_size() - 1 )) , m ); + printf( "ScanTeamFunctor[%d.%d of %d.%d] reduce_max_answer(%ld) != reduce_max(%ld)\n", + ind.league_rank(), ind.team_rank(), + ind.league_size(), ind.team_size(), + (long int) ( ind.league_rank() + ( ind.team_size() - 1 ) ), m ); } // Scan: const long int answer = - ( ind.league_rank() + 1 ) * ind.team_rank() + - ( ind.team_rank() * ( ind.team_rank() + 1 ) ) / 2 ; + ( ind.league_rank() + 1 ) * ind.team_rank() + ( ind.team_rank() * ( ind.team_rank() + 1 ) ) / 2; const long int result = ind.team_scan( ind.league_rank() + 1 + ind.team_rank() + 1 ); @@ -343,16 +328,17 @@ public: ind.team_scan( ind.league_rank() + 1 + ind.team_rank() + 1 ); if ( answer != result || answer != result2 ) { - printf("ScanTeamFunctor[%d.%d of %d.%d] answer(%ld) != scan_first(%ld) or scan_second(%ld)\n", - ind.league_rank(), ind.team_rank(), - ind.league_size(), ind.team_size(), - answer,result,result2); - error = 1 ; + printf( "ScanTeamFunctor[%d.%d of %d.%d] answer(%ld) != scan_first(%ld) or scan_second(%ld)\n", + ind.league_rank(), ind.team_rank(), + ind.league_size(), ind.team_size(), + answer, result, result2 ); + + error = 1; } const long int thread_rank = ind.team_rank() + ind.team_size() * ind.league_rank(); - ind.team_scan( 1 + thread_rank , accum.ptr_on_device() ); + ind.team_scan( 1 + thread_rank, accum.ptr_on_device() ); } }; @@ -360,47 +346,45 @@ template< class DeviceType, class ScheduleType > class TestScanTeam { public: - typedef DeviceType execution_space ; - typedef long int value_type ; - - typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type ; - typedef Test::ScanTeamFunctor functor_type ; + typedef DeviceType execution_space; + typedef long int value_type; + typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type; + typedef Test::ScanTeamFunctor functor_type; - //------------------------------------ - - TestScanTeam( const size_t nteam ) - { - run_test(nteam); - } + TestScanTeam( const size_t nteam ) { run_test( nteam ); } void run_test( const size_t nteam ) { - typedef Kokkos::View< long int , Kokkos::HostSpace , Kokkos::MemoryUnmanaged > result_type ; - const unsigned REPEAT = 100000 ; + typedef Kokkos::View< long int, Kokkos::HostSpace, Kokkos::MemoryUnmanaged > result_type; + + const unsigned REPEAT = 100000; unsigned Repeat; - if ( nteam == 0 ) - { + + if ( nteam == 0 ) { Repeat = 1; - } else { - Repeat = ( REPEAT + nteam - 1 ) / nteam ; //error here } + else { + Repeat = ( REPEAT + nteam - 1 ) / nteam; // Error here. + } + + functor_type functor; - functor_type functor ; + policy_type team_exec( nteam, policy_type::team_size_max( functor ) ); - policy_type team_exec( nteam , policy_type::team_size_max( functor ) ); + for ( unsigned i = 0; i < Repeat; ++i ) { + long int accum = 0; + long int total = 0; + long int error = 0; + Kokkos::deep_copy( functor.accum, total ); - for ( unsigned i = 0 ; i < Repeat ; ++i ) { - long int accum = 0 ; - long int total = 0 ; - long int error = 0 ; - Kokkos::deep_copy( functor.accum , total ); - Kokkos::parallel_reduce( team_exec , functor , result_type( & error ) ); + Kokkos::parallel_reduce( team_exec, functor, result_type( & error ) ); DeviceType::fence(); - Kokkos::deep_copy( accum , functor.accum ); - Kokkos::deep_copy( total , functor.total ); - ASSERT_EQ( error , 0 ); - ASSERT_EQ( total , accum ); + Kokkos::deep_copy( accum, functor.accum ); + Kokkos::deep_copy( total, functor.total ); + + ASSERT_EQ( error, 0 ); + ASSERT_EQ( total, accum ); } execution_space::fence(); @@ -416,18 +400,18 @@ namespace Test { template< class ExecSpace, class ScheduleType > struct SharedTeamFunctor { - typedef ExecSpace execution_space ; - typedef int value_type ; - typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type ; + typedef ExecSpace execution_space; + typedef int value_type; + typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type; enum { SHARED_COUNT = 1000 }; - typedef typename ExecSpace::scratch_memory_space shmem_space ; + typedef typename ExecSpace::scratch_memory_space shmem_space; - // tbd: MemoryUnmanaged should be the default for shared memory space - typedef Kokkos::View shared_int_array_type ; + // TBD: MemoryUnmanaged should be the default for shared memory space. + typedef Kokkos::View< int*, shmem_space, Kokkos::MemoryUnmanaged > shared_int_array_type; - // Tell how much shared memory will be required by this functor: + // Tell how much shared memory will be required by this functor. inline unsigned team_shmem_size( int team_size ) const { @@ -436,19 +420,26 @@ struct SharedTeamFunctor { } KOKKOS_INLINE_FUNCTION - void operator()( const typename policy_type::member_type & ind , value_type & update ) const + void operator()( const typename policy_type::member_type & ind, value_type & update ) const { - const shared_int_array_type shared_A( ind.team_shmem() , SHARED_COUNT ); - const shared_int_array_type shared_B( ind.team_shmem() , SHARED_COUNT ); - - if ((shared_A.ptr_on_device () == NULL && SHARED_COUNT > 0) || - (shared_B.ptr_on_device () == NULL && SHARED_COUNT > 0)) { - printf ("Failed to allocate shared memory of size %lu\n", - static_cast (SHARED_COUNT)); - ++update; // failure to allocate is an error + const shared_int_array_type shared_A( ind.team_shmem(), SHARED_COUNT ); + const shared_int_array_type shared_B( ind.team_shmem(), SHARED_COUNT ); + + if ( ( shared_A.ptr_on_device () == NULL && SHARED_COUNT > 0 ) || + ( shared_B.ptr_on_device () == NULL && SHARED_COUNT > 0 ) ) + { + printf ("member( %d/%d , %d/%d ) Failed to allocate shared memory of size %lu\n" + , ind.league_rank() + , ind.league_size() + , ind.team_rank() + , ind.team_size() + , static_cast( SHARED_COUNT ) + ); + + ++update; // Failure to allocate is an error. } else { - for ( int i = ind.team_rank() ; i < SHARED_COUNT ; i += ind.team_size() ) { + for ( int i = ind.team_rank(); i < SHARED_COUNT; i += ind.team_size() ) { shared_A[i] = i + ind.league_rank(); shared_B[i] = 2 * i + ind.league_rank(); } @@ -456,12 +447,13 @@ struct SharedTeamFunctor { ind.team_barrier(); if ( ind.team_rank() + 1 == ind.team_size() ) { - for ( int i = 0 ; i < SHARED_COUNT ; ++i ) { + for ( int i = 0; i < SHARED_COUNT; ++i ) { if ( shared_A[i] != i + ind.league_rank() ) { - ++update ; + ++update; } + if ( shared_B[i] != 2 * i + ind.league_rank() ) { - ++update ; + ++update; } } } @@ -469,78 +461,79 @@ struct SharedTeamFunctor { } }; -} +} // namespace Test namespace { template< class ExecSpace, class ScheduleType > struct TestSharedTeam { - - TestSharedTeam() - { run(); } + TestSharedTeam() { run(); } void run() { - typedef Test::SharedTeamFunctor Functor ; - typedef Kokkos::View< typename Functor::value_type , Kokkos::HostSpace , Kokkos::MemoryUnmanaged > result_type ; + typedef Test::SharedTeamFunctor Functor; + typedef Kokkos::View< typename Functor::value_type, Kokkos::HostSpace, Kokkos::MemoryUnmanaged > result_type; - const size_t team_size = Kokkos::TeamPolicy< ScheduleType, ExecSpace >::team_size_max( Functor() ); + const size_t team_size = Kokkos::TeamPolicy< ScheduleType, ExecSpace >::team_size_max( Functor() ); - Kokkos::TeamPolicy< ScheduleType, ExecSpace > team_exec( 8192 / team_size , team_size ); + Kokkos::TeamPolicy< ScheduleType, ExecSpace > team_exec( 8192 / team_size, team_size ); - typename Functor::value_type error_count = 0 ; + typename Functor::value_type error_count = 0; - Kokkos::parallel_reduce( team_exec , Functor() , result_type( & error_count ) ); + Kokkos::parallel_reduce( team_exec, Functor(), result_type( & error_count ) ); - ASSERT_EQ( error_count , 0 ); + ASSERT_EQ( error_count, 0 ); } }; -} + +} // namespace namespace Test { -#if defined (KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) +#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) template< class MemorySpace, class ExecSpace, class ScheduleType > struct TestLambdaSharedTeam { - - TestLambdaSharedTeam() - { run(); } + TestLambdaSharedTeam() { run(); } void run() { - typedef Test::SharedTeamFunctor Functor ; - //typedef Kokkos::View< typename Functor::value_type , Kokkos::HostSpace , Kokkos::MemoryUnmanaged > result_type ; - typedef Kokkos::View< typename Functor::value_type , MemorySpace, Kokkos::MemoryUnmanaged > result_type ; + typedef Test::SharedTeamFunctor< ExecSpace, ScheduleType > Functor; + //typedef Kokkos::View< typename Functor::value_type, Kokkos::HostSpace, Kokkos::MemoryUnmanaged > result_type; + typedef Kokkos::View< typename Functor::value_type, MemorySpace, Kokkos::MemoryUnmanaged > result_type; - typedef typename ExecSpace::scratch_memory_space shmem_space ; + typedef typename ExecSpace::scratch_memory_space shmem_space; - // tbd: MemoryUnmanaged should be the default for shared memory space - typedef Kokkos::View shared_int_array_type ; + // TBD: MemoryUnmanaged should be the default for shared memory space. + typedef Kokkos::View< int*, shmem_space, Kokkos::MemoryUnmanaged > shared_int_array_type; const int SHARED_COUNT = 1000; int team_size = 1; + #ifdef KOKKOS_ENABLE_CUDA - if(std::is_same::value) - team_size = 128; + if ( std::is_same< ExecSpace, Kokkos::Cuda >::value ) team_size = 128; #endif - Kokkos::TeamPolicy< ScheduleType, ExecSpace > team_exec( 8192 / team_size , team_size); - team_exec = team_exec.set_scratch_size(0,Kokkos::PerTeam(SHARED_COUNT*2*sizeof(int))); - typename Functor::value_type error_count = 0 ; + Kokkos::TeamPolicy< ScheduleType, ExecSpace > team_exec( 8192 / team_size, team_size ); + team_exec = team_exec.set_scratch_size( 0, Kokkos::PerTeam( SHARED_COUNT * 2 * sizeof( int ) ) ); + + typename Functor::value_type error_count = 0; - Kokkos::parallel_reduce( team_exec , KOKKOS_LAMBDA - ( const typename Kokkos::TeamPolicy< ScheduleType, ExecSpace >::member_type & ind , int & update ) { + Kokkos::parallel_reduce( team_exec, KOKKOS_LAMBDA + ( const typename Kokkos::TeamPolicy< ScheduleType, ExecSpace >::member_type & ind, int & update ) + { + const shared_int_array_type shared_A( ind.team_shmem(), SHARED_COUNT ); + const shared_int_array_type shared_B( ind.team_shmem(), SHARED_COUNT ); - const shared_int_array_type shared_A( ind.team_shmem() , SHARED_COUNT ); - const shared_int_array_type shared_B( ind.team_shmem() , SHARED_COUNT ); + if ( ( shared_A.ptr_on_device () == NULL && SHARED_COUNT > 0 ) || + ( shared_B.ptr_on_device () == NULL && SHARED_COUNT > 0 ) ) + { + printf( "Failed to allocate shared memory of size %lu\n", + static_cast( SHARED_COUNT ) ); - if ((shared_A.ptr_on_device () == NULL && SHARED_COUNT > 0) || - (shared_B.ptr_on_device () == NULL && SHARED_COUNT > 0)) { - printf ("Failed to allocate shared memory of size %lu\n", - static_cast (SHARED_COUNT)); - ++update; // failure to allocate is an error - } else { - for ( int i = ind.team_rank() ; i < SHARED_COUNT ; i += ind.team_size() ) { + ++update; // Failure to allocate is an error. + } + else { + for ( int i = ind.team_rank(); i < SHARED_COUNT; i += ind.team_size() ) { shared_A[i] = i + ind.league_rank(); shared_B[i] = 2 * i + ind.league_rank(); } @@ -548,196 +541,213 @@ struct TestLambdaSharedTeam { ind.team_barrier(); if ( ind.team_rank() + 1 == ind.team_size() ) { - for ( int i = 0 ; i < SHARED_COUNT ; ++i ) { + for ( int i = 0; i < SHARED_COUNT; ++i ) { if ( shared_A[i] != i + ind.league_rank() ) { - ++update ; + ++update; } + if ( shared_B[i] != 2 * i + ind.league_rank() ) { - ++update ; + ++update; } } } } }, result_type( & error_count ) ); - ASSERT_EQ( error_count , 0 ); + ASSERT_EQ( error_count, 0 ); } }; #endif -} + +} // namespace Test namespace Test { template< class ExecSpace, class ScheduleType > struct ScratchTeamFunctor { - typedef ExecSpace execution_space ; - typedef int value_type ; - typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type ; + typedef ExecSpace execution_space; + typedef int value_type; + typedef Kokkos::TeamPolicy< ScheduleType, execution_space > policy_type; enum { SHARED_TEAM_COUNT = 100 }; enum { SHARED_THREAD_COUNT = 10 }; - typedef typename ExecSpace::scratch_memory_space shmem_space ; + typedef typename ExecSpace::scratch_memory_space shmem_space; - // tbd: MemoryUnmanaged should be the default for shared memory space - typedef Kokkos::View shared_int_array_type ; + // TBD: MemoryUnmanaged should be the default for shared memory space. + typedef Kokkos::View< size_t*, shmem_space, Kokkos::MemoryUnmanaged > shared_int_array_type; KOKKOS_INLINE_FUNCTION - void operator()( const typename policy_type::member_type & ind , value_type & update ) const + void operator()( const typename policy_type::member_type & ind, value_type & update ) const { - const shared_int_array_type scratch_ptr( ind.team_scratch(1) , 3*ind.team_size() ); - const shared_int_array_type scratch_A( ind.team_scratch(1) , SHARED_TEAM_COUNT ); - const shared_int_array_type scratch_B( ind.thread_scratch(1) , SHARED_THREAD_COUNT ); - - if ((scratch_ptr.ptr_on_device () == NULL ) || - (scratch_A. ptr_on_device () == NULL && SHARED_TEAM_COUNT > 0) || - (scratch_B. ptr_on_device () == NULL && SHARED_THREAD_COUNT > 0)) { - printf ("Failed to allocate shared memory of size %lu\n", - static_cast (SHARED_TEAM_COUNT)); - ++update; // failure to allocate is an error + const shared_int_array_type scratch_ptr( ind.team_scratch( 1 ), 3 * ind.team_size() ); + const shared_int_array_type scratch_A( ind.team_scratch( 1 ), SHARED_TEAM_COUNT ); + const shared_int_array_type scratch_B( ind.thread_scratch( 1 ), SHARED_THREAD_COUNT ); + + if ( ( scratch_ptr.ptr_on_device () == NULL ) || + ( scratch_A. ptr_on_device () == NULL && SHARED_TEAM_COUNT > 0 ) || + ( scratch_B. ptr_on_device () == NULL && SHARED_THREAD_COUNT > 0 ) ) + { + printf( "Failed to allocate shared memory of size %lu\n", + static_cast( SHARED_TEAM_COUNT ) ); + + ++update; // Failure to allocate is an error. } else { - Kokkos::parallel_for(Kokkos::TeamThreadRange(ind,0,(int)SHARED_TEAM_COUNT),[&] (const int &i) { + Kokkos::parallel_for( Kokkos::TeamThreadRange( ind, 0, (int) SHARED_TEAM_COUNT ), [&] ( const int & i ) { scratch_A[i] = i + ind.league_rank(); }); - for(int i=0; i struct TestScratchTeam { - - TestScratchTeam() - { run(); } + TestScratchTeam() { run(); } void run() { - typedef Test::ScratchTeamFunctor Functor ; - typedef Kokkos::View< typename Functor::value_type , Kokkos::HostSpace , Kokkos::MemoryUnmanaged > result_type ; + typedef Test::ScratchTeamFunctor Functor; + typedef Kokkos::View< typename Functor::value_type, Kokkos::HostSpace, Kokkos::MemoryUnmanaged > result_type; const size_t team_size = Kokkos::TeamPolicy< ScheduleType, ExecSpace >::team_size_max( Functor() ); - Kokkos::TeamPolicy< ScheduleType, ExecSpace > team_exec( 8192 / team_size , team_size ); + Kokkos::TeamPolicy< ScheduleType, ExecSpace > team_exec( 8192 / team_size, team_size ); + + typename Functor::value_type error_count = 0; + + int team_scratch_size = Functor::shared_int_array_type::shmem_size( Functor::SHARED_TEAM_COUNT ) + + Functor::shared_int_array_type::shmem_size( 3 * team_size ); - typename Functor::value_type error_count = 0 ; + int thread_scratch_size = Functor::shared_int_array_type::shmem_size( Functor::SHARED_THREAD_COUNT ); - int team_scratch_size = Functor::shared_int_array_type::shmem_size(Functor::SHARED_TEAM_COUNT) + - Functor::shared_int_array_type::shmem_size(3*team_size); - int thread_scratch_size = Functor::shared_int_array_type::shmem_size(Functor::SHARED_THREAD_COUNT); - Kokkos::parallel_reduce( team_exec.set_scratch_size(0,Kokkos::PerTeam(team_scratch_size), - Kokkos::PerThread(thread_scratch_size)) , - Functor() , result_type( & error_count ) ); + Kokkos::parallel_reduce( team_exec.set_scratch_size( 0, Kokkos::PerTeam( team_scratch_size ), + Kokkos::PerThread( thread_scratch_size ) ), + Functor(), result_type( & error_count ) ); - ASSERT_EQ( error_count , 0 ); + ASSERT_EQ( error_count, 0 ); } }; -} + +} // namespace namespace Test { -template< class ExecSpace> + +template< class ExecSpace > KOKKOS_INLINE_FUNCTION -int test_team_mulit_level_scratch_loop_body(const typename Kokkos::TeamPolicy::member_type& team) { - Kokkos::View> a_team1(team.team_scratch(0),128); - Kokkos::View> a_thread1(team.thread_scratch(0),16); - Kokkos::View> a_team2(team.team_scratch(0),128); - Kokkos::View> a_thread2(team.thread_scratch(0),16); - - Kokkos::View> b_team1(team.team_scratch(1),128000); - Kokkos::View> b_thread1(team.thread_scratch(1),16000); - Kokkos::View> b_team2(team.team_scratch(1),128000); - Kokkos::View> b_thread2(team.thread_scratch(1),16000); - - Kokkos::View> a_team3(team.team_scratch(0),128); - Kokkos::View> a_thread3(team.thread_scratch(0),16); - Kokkos::View> b_team3(team.team_scratch(1),128000); - Kokkos::View> b_thread3(team.thread_scratch(1),16000); +int test_team_mulit_level_scratch_loop_body( const typename Kokkos::TeamPolicy::member_type& team ) { + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > a_team1( team.team_scratch( 0 ), 128 ); + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > a_thread1( team.thread_scratch( 0 ), 16 ); + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > a_team2( team.team_scratch( 0 ), 128 ); + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > a_thread2( team.thread_scratch( 0 ), 16 ); + + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > b_team1( team.team_scratch( 1 ), 128000 ); + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > b_thread1( team.thread_scratch( 1 ), 16000 ); + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > b_team2( team.team_scratch( 1 ), 128000 ); + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > b_thread2( team.thread_scratch( 1 ), 16000 ); + + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > a_team3( team.team_scratch( 0 ), 128 ); + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > a_thread3( team.thread_scratch( 0 ), 16 ); + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > b_team3( team.team_scratch( 1 ), 128000 ); + Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits > b_thread3( team.thread_scratch( 1 ), 16000 ); // The explicit types for 0 and 128 are here to test TeamThreadRange accepting different // types for begin and end. - Kokkos::parallel_for(Kokkos::TeamThreadRange(team,int(0),unsigned(128)), [&] (const int& i) + Kokkos::parallel_for( Kokkos::TeamThreadRange( team, int( 0 ), unsigned( 128 ) ), [&] ( const int & i ) { - a_team1(i) = 1000000 + i; - a_team2(i) = 2000000 + i; - a_team3(i) = 3000000 + i; + a_team1( i ) = 1000000 + i + team.league_rank() * 100000; + a_team2( i ) = 2000000 + i + team.league_rank() * 100000; + a_team3( i ) = 3000000 + i + team.league_rank() * 100000; }); team.team_barrier(); - Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,16), [&] (const int& i) + + Kokkos::parallel_for( Kokkos::ThreadVectorRange( team, 16 ), [&] ( const int & i ) { - a_thread1(i) = 1000000 + 100000*team.team_rank() + 16-i; - a_thread2(i) = 2000000 + 100000*team.team_rank() + 16-i; - a_thread3(i) = 3000000 + 100000*team.team_rank() + 16-i; + a_thread1( i ) = 1000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000; + a_thread2( i ) = 2000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000; + a_thread3( i ) = 3000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000; }); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,128000), [&] (const int& i) + Kokkos::parallel_for( Kokkos::TeamThreadRange( team, 0, 128000 ), [&] ( const int & i ) { - b_team1(i) = 1000000 + i; - b_team2(i) = 2000000 + i; - b_team3(i) = 3000000 + i; + b_team1( i ) = 1000000 + i + team.league_rank() * 100000; + b_team2( i ) = 2000000 + i + team.league_rank() * 100000; + b_team3( i ) = 3000000 + i + team.league_rank() * 100000; }); team.team_barrier(); - Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,16000), [&] (const int& i) + + Kokkos::parallel_for( Kokkos::ThreadVectorRange( team, 16000 ), [&] ( const int & i ) { - b_thread1(i) = 1000000 + 100000*team.team_rank() + 16-i; - b_thread2(i) = 2000000 + 100000*team.team_rank() + 16-i; - b_thread3(i) = 3000000 + 100000*team.team_rank() + 16-i; + b_thread1( i ) = 1000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000; + b_thread2( i ) = 2000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000; + b_thread3( i ) = 3000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000; }); team.team_barrier(); + int error = 0; - Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,128), [&] (const int& i) + Kokkos::parallel_for( Kokkos::TeamThreadRange( team, 0, 128 ), [&] ( const int & i ) { - if(a_team1(i) != 1000000 + i) error++; - if(a_team2(i) != 2000000 + i) error++; - if(a_team3(i) != 3000000 + i) error++; + if ( a_team1( i ) != 1000000 + i + team.league_rank() * 100000 ) error++; + if ( a_team2( i ) != 2000000 + i + team.league_rank() * 100000 ) error++; + if ( a_team3( i ) != 3000000 + i + team.league_rank() * 100000 ) error++; }); team.team_barrier(); - Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,16), [&] (const int& i) + + Kokkos::parallel_for( Kokkos::ThreadVectorRange( team, 16 ), [&] ( const int & i ) { - if(a_thread1(i) != 1000000 + 100000*team.team_rank() + 16-i) error++; - if(a_thread2(i) != 2000000 + 100000*team.team_rank() + 16-i) error++; - if(a_thread3(i) != 3000000 + 100000*team.team_rank() + 16-i) error++; + if ( a_thread1( i ) != 1000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000 ) error++; + if ( a_thread2( i ) != 2000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000 ) error++; + if ( a_thread3( i ) != 3000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000 ) error++; }); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,128000), [&] (const int& i) + Kokkos::parallel_for( Kokkos::TeamThreadRange( team, 0, 128000 ), [&] ( const int & i ) { - if(b_team1(i) != 1000000 + i) error++; - if(b_team2(i) != 2000000 + i) error++; - if(b_team3(i) != 3000000 + i) error++; + if ( b_team1( i ) != 1000000 + i + team.league_rank() * 100000 ) error++; + if ( b_team2( i ) != 2000000 + i + team.league_rank() * 100000 ) error++; + if ( b_team3( i ) != 3000000 + i + team.league_rank() * 100000 ) error++; }); team.team_barrier(); - Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,16000), [&] (const int& i) + + Kokkos::parallel_for( Kokkos::ThreadVectorRange( team, 16000 ), [&] ( const int & i ) { - if(b_thread1(i) != 1000000 + 100000*team.team_rank() + 16-i) error++; - if(b_thread2(i) != 2000000 + 100000*team.team_rank() + 16-i) error++; - if( b_thread3(i) != 3000000 + 100000*team.team_rank() + 16-i) error++; + if ( b_thread1( i ) != 1000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000 ) error++; + if ( b_thread2( i ) != 2000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000 ) error++; + if ( b_thread3( i ) != 3000000 + 100000 * team.team_rank() + 16 - i + team.league_rank() * 100000 ) error++; }); return error; @@ -748,93 +758,107 @@ struct TagFor {}; template< class ExecSpace, class ScheduleType > struct ClassNoShmemSizeFunction { - Kokkos::View > errors; + typedef typename Kokkos::TeamPolicy< ExecSpace, ScheduleType >::member_type member_type; + + Kokkos::View< int, ExecSpace, Kokkos::MemoryTraits > errors; KOKKOS_INLINE_FUNCTION - void operator() (const TagFor&, const typename Kokkos::TeamPolicy::member_type& team) const { - int error = test_team_mulit_level_scratch_loop_body(team); + void operator()( const TagFor &, const member_type & team ) const { + int error = test_team_mulit_level_scratch_loop_body< ExecSpace >( team ); errors() += error; } KOKKOS_INLINE_FUNCTION - void operator() (const TagReduce&, const typename Kokkos::TeamPolicy::member_type& team, int& error) const { - error += test_team_mulit_level_scratch_loop_body(team); + void operator() ( const TagReduce &, const member_type & team, int & error ) const { + error += test_team_mulit_level_scratch_loop_body< ExecSpace >( team ); } void run() { - Kokkos::View d_errors = Kokkos::View("Errors"); + Kokkos::View< int, ExecSpace > d_errors = Kokkos::View< int, ExecSpace >( "Errors" ); errors = d_errors; - const int per_team0 = 3*Kokkos::View>::shmem_size(128); - const int per_thread0 = 3*Kokkos::View>::shmem_size(16); + const int per_team0 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 128 ); + const int per_thread0 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 16 ); + + const int per_team1 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 128000 ); + const int per_thread1 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 16000 ); - const int per_team1 = 3*Kokkos::View>::shmem_size(128000); - const int per_thread1 = 3*Kokkos::View>::shmem_size(16000); { - Kokkos::TeamPolicy policy(10,8,16); - Kokkos::parallel_for(policy.set_scratch_size(0,Kokkos::PerTeam(per_team0),Kokkos::PerThread(per_thread0)).set_scratch_size(1,Kokkos::PerTeam(per_team1),Kokkos::PerThread(per_thread1)), - *this); - Kokkos::fence(); - typename Kokkos::View::HostMirror h_errors = Kokkos::create_mirror_view(d_errors); - Kokkos::deep_copy(h_errors,d_errors); - ASSERT_EQ(h_errors(),0); + Kokkos::TeamPolicy< TagFor, ExecSpace, ScheduleType > policy( 10, 8, 16 ); + + Kokkos::parallel_for( policy.set_scratch_size( 0, Kokkos::PerTeam( per_team0 ), Kokkos::PerThread( per_thread0 ) ).set_scratch_size( 1, Kokkos::PerTeam( per_team1 ), Kokkos::PerThread( per_thread1 ) ), *this ); + Kokkos::fence(); + + typename Kokkos::View< int, ExecSpace >::HostMirror h_errors = Kokkos::create_mirror_view( d_errors ); + Kokkos::deep_copy( h_errors, d_errors ); + ASSERT_EQ( h_errors(), 0 ); } { - int error = 0; - Kokkos::TeamPolicy policy(10,8,16); - Kokkos::parallel_reduce(policy.set_scratch_size(0,Kokkos::PerTeam(per_team0),Kokkos::PerThread(per_thread0)).set_scratch_size(1,Kokkos::PerTeam(per_team1),Kokkos::PerThread(per_thread1)), - *this,error); - Kokkos::fence(); - ASSERT_EQ(error,0); + int error = 0; + Kokkos::TeamPolicy< TagReduce, ExecSpace, ScheduleType > policy( 10, 8, 16 ); + + Kokkos::parallel_reduce( policy.set_scratch_size( 0, Kokkos::PerTeam( per_team0 ), Kokkos::PerThread( per_thread0 ) ).set_scratch_size( 1, Kokkos::PerTeam( per_team1 ), Kokkos::PerThread( per_thread1 ) ), *this, error ); + Kokkos::fence(); + + ASSERT_EQ( error, 0 ); } }; }; template< class ExecSpace, class ScheduleType > struct ClassWithShmemSizeFunction { - Kokkos::View > errors; + typedef typename Kokkos::TeamPolicy< ExecSpace, ScheduleType >::member_type member_type; + + Kokkos::View< int, ExecSpace, Kokkos::MemoryTraits > errors; KOKKOS_INLINE_FUNCTION - void operator() (const TagFor&, const typename Kokkos::TeamPolicy::member_type& team) const { - int error = test_team_mulit_level_scratch_loop_body(team); + void operator()( const TagFor &, const member_type & team ) const { + int error = test_team_mulit_level_scratch_loop_body< ExecSpace >( team ); errors() += error; } KOKKOS_INLINE_FUNCTION - void operator() (const TagReduce&, const typename Kokkos::TeamPolicy::member_type& team, int& error) const { - error += test_team_mulit_level_scratch_loop_body(team); + void operator() ( const TagReduce &, const member_type & team, int & error ) const { + error += test_team_mulit_level_scratch_loop_body< ExecSpace >( team ); } void run() { - Kokkos::View d_errors = Kokkos::View("Errors"); + Kokkos::View< int, ExecSpace > d_errors = Kokkos::View< int, ExecSpace >( "Errors" ); errors = d_errors; - const int per_team1 = 3*Kokkos::View>::shmem_size(128000); - const int per_thread1 = 3*Kokkos::View>::shmem_size(16000); + const int per_team1 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 128000 ); + const int per_thread1 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 16000 ); + { - Kokkos::TeamPolicy policy(10,8,16); - Kokkos::parallel_for(policy.set_scratch_size(1,Kokkos::PerTeam(per_team1),Kokkos::PerThread(per_thread1)), - *this); - Kokkos::fence(); - typename Kokkos::View::HostMirror h_errors= Kokkos::create_mirror_view(d_errors); - Kokkos::deep_copy(h_errors,d_errors); - ASSERT_EQ(h_errors(),0); + Kokkos::TeamPolicy< TagFor, ExecSpace, ScheduleType > policy( 10, 8, 16 ); + + Kokkos::parallel_for( policy.set_scratch_size( 1, Kokkos::PerTeam( per_team1 ), + Kokkos::PerThread( per_thread1 ) ), + *this ); + Kokkos::fence(); + + typename Kokkos::View< int, ExecSpace >::HostMirror h_errors = Kokkos::create_mirror_view( d_errors ); + Kokkos::deep_copy( h_errors, d_errors ); + ASSERT_EQ( h_errors(), 0 ); } { - int error = 0; - Kokkos::TeamPolicy policy(10,8,16); - Kokkos::parallel_reduce(policy.set_scratch_size(1,Kokkos::PerTeam(per_team1),Kokkos::PerThread(per_thread1)), - *this,error); - Kokkos::fence(); - ASSERT_EQ(error,0); + int error = 0; + Kokkos::TeamPolicy< TagReduce, ExecSpace, ScheduleType > policy( 10, 8, 16 ); + + Kokkos::parallel_reduce( policy.set_scratch_size( 1, Kokkos::PerTeam( per_team1 ), + Kokkos::PerThread( per_thread1 ) ), + *this, error ); + Kokkos::fence(); + + ASSERT_EQ( error, 0 ); } }; - unsigned team_shmem_size(int team_size) const { - const int per_team0 = 3*Kokkos::View>::shmem_size(128); - const int per_thread0 = 3*Kokkos::View>::shmem_size(16); + unsigned team_shmem_size( int team_size ) const { + const int per_team0 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 128 ); + const int per_thread0 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 16 ); return per_team0 + team_size * per_thread0; } }; @@ -842,67 +866,68 @@ struct ClassWithShmemSizeFunction { template< class ExecSpace, class ScheduleType > void test_team_mulit_level_scratch_test_lambda() { #ifdef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA - Kokkos::View > errors; - Kokkos::View d_errors("Errors"); + Kokkos::View< int, ExecSpace, Kokkos::MemoryTraits > errors; + Kokkos::View< int, ExecSpace > d_errors( "Errors" ); errors = d_errors; - const int per_team0 = 3*Kokkos::View>::shmem_size(128); - const int per_thread0 = 3*Kokkos::View>::shmem_size(16); + const int per_team0 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 128 ); + const int per_thread0 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 16 ); + + const int per_team1 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 128000 ); + const int per_thread1 = 3 * Kokkos::View< double*, ExecSpace, Kokkos::MemoryTraits >::shmem_size( 16000 ); - const int per_team1 = 3*Kokkos::View>::shmem_size(128000); - const int per_thread1 = 3*Kokkos::View>::shmem_size(16000); + Kokkos::TeamPolicy< ExecSpace, ScheduleType > policy( 10, 8, 16 ); - Kokkos::TeamPolicy policy(10,8,16); - Kokkos::parallel_for(policy.set_scratch_size(0,Kokkos::PerTeam(per_team0),Kokkos::PerThread(per_thread0)).set_scratch_size(1,Kokkos::PerTeam(per_team1),Kokkos::PerThread(per_thread1)), - KOKKOS_LAMBDA(const typename Kokkos::TeamPolicy::member_type& team) { - int error = test_team_mulit_level_scratch_loop_body(team); + Kokkos::parallel_for( policy.set_scratch_size( 0, Kokkos::PerTeam( per_team0 ), Kokkos::PerThread( per_thread0 ) ).set_scratch_size( 1, Kokkos::PerTeam( per_team1 ), Kokkos::PerThread( per_thread1 ) ), + KOKKOS_LAMBDA ( const typename Kokkos::TeamPolicy< ExecSpace >::member_type & team ) + { + int error = test_team_mulit_level_scratch_loop_body< ExecSpace >( team ); errors() += error; }); Kokkos::fence(); - typename Kokkos::View::HostMirror h_errors= Kokkos::create_mirror_view(errors); - Kokkos::deep_copy(h_errors,d_errors); - ASSERT_EQ(h_errors(),0); + + typename Kokkos::View< int, ExecSpace >::HostMirror h_errors = Kokkos::create_mirror_view( errors ); + Kokkos::deep_copy( h_errors, d_errors ); + ASSERT_EQ( h_errors(), 0 ); int error = 0; - Kokkos::parallel_reduce(policy.set_scratch_size(0,Kokkos::PerTeam(per_team0),Kokkos::PerThread(per_thread0)).set_scratch_size(1,Kokkos::PerTeam(per_team1),Kokkos::PerThread(per_thread1)), - KOKKOS_LAMBDA(const typename Kokkos::TeamPolicy::member_type& team, int& count) { - count += test_team_mulit_level_scratch_loop_body(team); - },error); - ASSERT_EQ(error,0); + Kokkos::parallel_reduce( policy.set_scratch_size( 0, Kokkos::PerTeam( per_team0 ), Kokkos::PerThread( per_thread0 ) ).set_scratch_size( 1, Kokkos::PerTeam( per_team1 ), Kokkos::PerThread( per_thread1 ) ), + KOKKOS_LAMBDA ( const typename Kokkos::TeamPolicy< ExecSpace >::member_type & team, int & count ) + { + count += test_team_mulit_level_scratch_loop_body< ExecSpace >( team ); + }, error ); + ASSERT_EQ( error, 0 ); Kokkos::fence(); #endif } - -} +} // namespace Test namespace { + template< class ExecSpace, class ScheduleType > struct TestMultiLevelScratchTeam { - - TestMultiLevelScratchTeam() - { run(); } + TestMultiLevelScratchTeam() { run(); } void run() { #ifdef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA - Test::test_team_mulit_level_scratch_test_lambda(); + Test::test_team_mulit_level_scratch_test_lambda< ExecSpace, ScheduleType >(); #endif - Test::ClassNoShmemSizeFunction c1; + Test::ClassNoShmemSizeFunction< ExecSpace, ScheduleType > c1; c1.run(); - Test::ClassWithShmemSizeFunction c2; + Test::ClassWithShmemSizeFunction< ExecSpace, ScheduleType > c2; c2.run(); - } }; -} + +} // namespace namespace Test { template< class ExecSpace > struct TestShmemSize { - TestShmemSize() { run(); } void run() @@ -915,9 +940,8 @@ struct TestShmemSize { size_t size = view_type::shmem_size( d1, d2, d3 ); - ASSERT_EQ( size, d1 * d2 * d3 * sizeof(long) ); + ASSERT_EQ( size, d1 * d2 * d3 * sizeof( long ) ); } }; -} -/*--------------------------------------------------------------------------*/ +} // namespace Test diff --git a/lib/kokkos/core/unit_test/TestTeamVector.hpp b/lib/kokkos/core/unit_test/TestTeamVector.hpp index d9b06c29e4..8d16ac66db 100644 --- a/lib/kokkos/core/unit_test/TestTeamVector.hpp +++ b/lib/kokkos/core/unit_test/TestTeamVector.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -50,36 +50,47 @@ namespace TestTeamVector { struct my_complex { - double re,im; + double re, im; int dummy; + KOKKOS_INLINE_FUNCTION my_complex() { re = 0.0; im = 0.0; dummy = 0; } + KOKKOS_INLINE_FUNCTION - my_complex(const my_complex& src) { + my_complex( const my_complex & src ) { re = src.re; im = src.im; dummy = src.dummy; } KOKKOS_INLINE_FUNCTION - my_complex(const volatile my_complex& src) { + my_complex & operator=( const my_complex & src ) { re = src.re; im = src.im; dummy = src.dummy; + return *this ; } KOKKOS_INLINE_FUNCTION - my_complex(const double& val) { + my_complex( const volatile my_complex & src ) { + re = src.re; + im = src.im; + dummy = src.dummy; + } + + KOKKOS_INLINE_FUNCTION + my_complex( const double & val ) { re = val; im = 0.0; dummy = 0; } + KOKKOS_INLINE_FUNCTION - my_complex& operator += (const my_complex& src) { + my_complex & operator+=( const my_complex & src ) { re += src.re; im += src.im; dummy += src.dummy; @@ -87,252 +98,278 @@ struct my_complex { } KOKKOS_INLINE_FUNCTION - void operator += (const volatile my_complex& src) volatile { + void operator+=( const volatile my_complex & src ) volatile { re += src.re; im += src.im; dummy += src.dummy; } + KOKKOS_INLINE_FUNCTION - my_complex& operator *= (const my_complex& src) { - double re_tmp = re*src.re - im*src.im; + my_complex & operator*=( const my_complex & src ) { + double re_tmp = re * src.re - im * src.im; double im_tmp = re * src.im + im * src.re; re = re_tmp; im = im_tmp; dummy *= src.dummy; return *this; } + KOKKOS_INLINE_FUNCTION - void operator *= (const volatile my_complex& src) volatile { - double re_tmp = re*src.re - im*src.im; + void operator*=( const volatile my_complex & src ) volatile { + double re_tmp = re * src.re - im * src.im; double im_tmp = re * src.im + im * src.re; re = re_tmp; im = im_tmp; dummy *= src.dummy; } + KOKKOS_INLINE_FUNCTION - bool operator == (const my_complex& src) { - return (re == src.re) && (im == src.im) && ( dummy == src.dummy ); + bool operator==( const my_complex & src ) { + return ( re == src.re ) && ( im == src.im ) && ( dummy == src.dummy ); } + KOKKOS_INLINE_FUNCTION - bool operator != (const my_complex& src) { - return (re != src.re) || (im != src.im) || ( dummy != src.dummy ); + bool operator!=( const my_complex & src ) { + return ( re != src.re ) || ( im != src.im ) || ( dummy != src.dummy ); } + KOKKOS_INLINE_FUNCTION - bool operator != (const double& val) { - return (re != val) || - (im != 0) || (dummy != 0); + bool operator!=( const double & val ) { + return ( re != val ) || ( im != 0 ) || ( dummy != 0 ); } + KOKKOS_INLINE_FUNCTION - my_complex& operator= (const int& val) { + my_complex & operator=( const int & val ) { re = val; im = 0.0; dummy = 0; return *this; } + KOKKOS_INLINE_FUNCTION - my_complex& operator= (const double& val) { + my_complex & operator=( const double & val ) { re = val; im = 0.0; dummy = 0; return *this; } + KOKKOS_INLINE_FUNCTION operator double() { return re; } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_team_for { - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_team_for(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; - unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;} + functor_team_for( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} - KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team) const { + unsigned team_shmem_size( int team_size ) const { return team_size * 13 * sizeof( Scalar ) + 8; } - typedef typename ExecutionSpace::scratch_memory_space shmem_space ; - typedef Kokkos::View shared_int; + KOKKOS_INLINE_FUNCTION + void operator()( typename policy_type::member_type team ) const { + typedef typename ExecutionSpace::scratch_memory_space shmem_space; + typedef Kokkos::View< Scalar*, shmem_space, Kokkos::MemoryUnmanaged > shared_int; typedef typename shared_int::size_type size_type; - const size_type shmemSize = team.team_size () * 13; - shared_int values = shared_int (team.team_shmem (), shmemSize); + const size_type shmemSize = team.team_size() * 13; + shared_int values = shared_int( team.team_shmem(), shmemSize ); - if (values.ptr_on_device () == NULL || values.dimension_0 () < shmemSize) { - printf ("FAILED to allocate shared memory of size %u\n", - static_cast (shmemSize)); + if ( values.ptr_on_device() == NULL || values.dimension_0() < shmemSize ) { + printf( "FAILED to allocate shared memory of size %u\n", + static_cast( shmemSize ) ); } else { + // Initialize shared memory. + values( team.team_rank() ) = 0; - // Initialize shared memory - values(team.team_rank ()) = 0; - - // Accumulate value into per thread shared memory - // This is non blocking - Kokkos::parallel_for(Kokkos::TeamThreadRange(team,131),[&] (int i) + // Accumulate value into per thread shared memory. + // This is non blocking. + Kokkos::parallel_for( Kokkos::TeamThreadRange( team, 131 ), [&] ( int i ) { - values(team.team_rank ()) += i - team.league_rank () + team.league_size () + team.team_size (); + values( team.team_rank() ) += i - team.league_rank() + team.league_size() + team.team_size(); }); - // Wait for all memory to be written - team.team_barrier (); - // One thread per team executes the comparison - Kokkos::single(Kokkos::PerTeam(team),[&]() + + // Wait for all memory to be written. + team.team_barrier(); + + // One thread per team executes the comparison. + Kokkos::single( Kokkos::PerTeam( team ), [&] () { - Scalar test = 0; - Scalar value = 0; - for (int i = 0; i < 131; ++i) { - test += i - team.league_rank () + team.league_size () + team.team_size (); - } - for (int i = 0; i < team.team_size (); ++i) { - value += values(i); - } - if (test != value) { - printf ("FAILED team_parallel_for %i %i %f %f\n", - team.league_rank (), team.team_rank (), - static_cast (test), static_cast (value)); - flag() = 1; - } + Scalar test = 0; + Scalar value = 0; + + for ( int i = 0; i < 131; ++i ) { + test += i - team.league_rank() + team.league_size() + team.team_size(); + } + + for ( int i = 0; i < team.team_size(); ++i ) { + value += values( i ); + } + + if ( test != value ) { + printf ( "FAILED team_parallel_for %i %i %f %f\n", + team.league_rank(), team.team_rank(), + static_cast( test ), static_cast( value ) ); + flag() = 1; + } }); } } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_team_reduce { - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_team_reduce(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; - unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;} + functor_team_reduce( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} - KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team) const { + unsigned team_shmem_size( int team_size ) const { return team_size * 13 * sizeof( Scalar ) + 8; } + KOKKOS_INLINE_FUNCTION + void operator()( typename policy_type::member_type team ) const { Scalar value = Scalar(); - Kokkos::parallel_reduce(Kokkos::TeamThreadRange(team,131),[&] (int i, Scalar& val) + + Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, 131 ), [&] ( int i, Scalar & val ) { - val += i - team.league_rank () + team.league_size () + team.team_size (); - },value); + val += i - team.league_rank() + team.league_size() + team.team_size(); + }, value ); - team.team_barrier (); - Kokkos::single(Kokkos::PerTeam(team),[&]() - { - Scalar test = 0; - for (int i = 0; i < 131; ++i) { - test += i - team.league_rank () + team.league_size () + team.team_size (); - } - if (test != value) { - if(team.league_rank() == 0) - printf ("FAILED team_parallel_reduce %i %i %f %f %lu\n", - team.league_rank (), team.team_rank (), - static_cast (test), static_cast (value),sizeof(Scalar)); - flag() = 1; - } + team.team_barrier(); + + Kokkos::single( Kokkos::PerTeam( team ), [&] () + { + Scalar test = 0; + + for ( int i = 0; i < 131; ++i ) { + test += i - team.league_rank() + team.league_size() + team.team_size(); + } + + if ( test != value ) { + if ( team.league_rank() == 0 ) { + printf( "FAILED team_parallel_reduce %i %i %f %f %lu\n", + team.league_rank(), team.team_rank(), + static_cast( test ), static_cast( value ), sizeof( Scalar ) ); + } + + flag() = 1; + } }); } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_team_reduce_join { - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_team_reduce_join(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; - unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;} + functor_team_reduce_join( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} - KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team) const { + unsigned team_shmem_size( int team_size ) const { return team_size * 13 * sizeof( Scalar ) + 8; } + KOKKOS_INLINE_FUNCTION + void operator()( typename policy_type::member_type team ) const { Scalar value = 0; - Kokkos::parallel_reduce(Kokkos::TeamThreadRange(team,131) - , [&] (int i, Scalar& val) - { - val += i - team.league_rank () + team.league_size () + team.team_size (); - } - , [&] (volatile Scalar& val, const volatile Scalar& src) - {val+=src;} - , value + Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, 131 ), [&] ( int i, Scalar & val ) + { + val += i - team.league_rank() + team.league_size() + team.team_size(); + }, + [] ( volatile Scalar & val, const volatile Scalar & src ) { val += src; }, + value ); - team.team_barrier (); - Kokkos::single(Kokkos::PerTeam(team),[&]() + team.team_barrier(); + + Kokkos::single( Kokkos::PerTeam( team ), [&] () { - Scalar test = 0; - for (int i = 0; i < 131; ++i) { - test += i - team.league_rank () + team.league_size () + team.team_size (); - } - if (test != value) { - printf ("FAILED team_vector_parallel_reduce_join %i %i %f %f\n", - team.league_rank (), team.team_rank (), - static_cast (test), static_cast (value)); - flag() = 1; - } + Scalar test = 0; + + for ( int i = 0; i < 131; ++i ) { + test += i - team.league_rank() + team.league_size() + team.team_size(); + } + + if ( test != value ) { + printf( "FAILED team_vector_parallel_reduce_join %i %i %f %f\n", + team.league_rank(), team.team_rank(), + static_cast( test ), static_cast( value ) ); + + flag() = 1; + } }); } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_team_vector_for { - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_team_vector_for(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; - unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;} + functor_team_vector_for( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} - KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team) const { + unsigned team_shmem_size( int team_size ) const { return team_size * 13 * sizeof( Scalar ) + 8; } - typedef typename ExecutionSpace::scratch_memory_space shmem_space ; - typedef Kokkos::View shared_int; + KOKKOS_INLINE_FUNCTION + void operator()( typename policy_type::member_type team ) const { + typedef typename ExecutionSpace::scratch_memory_space shmem_space; + typedef Kokkos::View< Scalar*, shmem_space, Kokkos::MemoryUnmanaged > shared_int; typedef typename shared_int::size_type size_type; - const size_type shmemSize = team.team_size () * 13; - shared_int values = shared_int (team.team_shmem (), shmemSize); + const size_type shmemSize = team.team_size() * 13; + shared_int values = shared_int( team.team_shmem(), shmemSize ); - if (values.ptr_on_device () == NULL || values.dimension_0 () < shmemSize) { - printf ("FAILED to allocate shared memory of size %u\n", - static_cast (shmemSize)); + if ( values.ptr_on_device() == NULL || values.dimension_0() < shmemSize ) { + printf( "FAILED to allocate shared memory of size %u\n", + static_cast( shmemSize ) ); } else { - Kokkos::single(Kokkos::PerThread(team),[&] () + team.team_barrier(); + + Kokkos::single( Kokkos::PerThread( team ), [&] () { - values(team.team_rank ()) = 0; + values( team.team_rank() ) = 0; }); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team,131),[&] (int i) + Kokkos::parallel_for( Kokkos::TeamThreadRange( team, 131 ), [&] ( int i ) { - Kokkos::single(Kokkos::PerThread(team),[&] () + Kokkos::single( Kokkos::PerThread( team ), [&] () { - values(team.team_rank ()) += i - team.league_rank () + team.league_size () + team.team_size (); + values( team.team_rank() ) += i - team.league_rank() + team.league_size() + team.team_size(); }); }); - team.team_barrier (); - Kokkos::single(Kokkos::PerTeam(team),[&]() + team.team_barrier(); + + Kokkos::single( Kokkos::PerTeam( team ), [&] () { Scalar test = 0; Scalar value = 0; - for (int i = 0; i < 131; ++i) { - test += i - team.league_rank () + team.league_size () + team.team_size (); + + for ( int i = 0; i < 131; ++i ) { + test += i - team.league_rank() + team.league_size() + team.team_size(); } - for (int i = 0; i < team.team_size (); ++i) { - value += values(i); + + for ( int i = 0; i < team.team_size(); ++i ) { + value += values( i ); } - if (test != value) { - printf ("FAILED team_vector_parallel_for %i %i %f %f\n", - team.league_rank (), team.team_rank (), - static_cast (test), static_cast (value)); + + if ( test != value ) { + printf( "FAILED team_vector_parallel_for %i %i %f %f\n", + team.league_rank(), team.team_rank(), + static_cast( test ), static_cast( value ) ); + flag() = 1; } }); @@ -340,164 +377,176 @@ struct functor_team_vector_for { } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_team_vector_reduce { - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_team_vector_reduce(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; + functor_team_vector_reduce( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} - unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;} + unsigned team_shmem_size( int team_size ) const { return team_size * 13 * sizeof( Scalar ) + 8; } KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team) const { - + void operator()( typename policy_type::member_type team ) const { Scalar value = Scalar(); - Kokkos::parallel_reduce(Kokkos::TeamThreadRange(team,131),[&] (int i, Scalar& val) + + Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, 131 ), [&] ( int i, Scalar & val ) { - val += i - team.league_rank () + team.league_size () + team.team_size (); - },value); + val += i - team.league_rank() + team.league_size() + team.team_size(); + }, value ); - team.team_barrier (); - Kokkos::single(Kokkos::PerTeam(team),[&]() + team.team_barrier(); + + Kokkos::single( Kokkos::PerTeam( team ), [&] () { Scalar test = 0; - for (int i = 0; i < 131; ++i) { - test += i - team.league_rank () + team.league_size () + team.team_size (); + + for ( int i = 0; i < 131; ++i ) { + test += i - team.league_rank() + team.league_size() + team.team_size(); } - if (test != value) { - if(team.league_rank() == 0) - printf ("FAILED team_vector_parallel_reduce %i %i %f %f %lu\n", - team.league_rank (), team.team_rank (), - static_cast (test), static_cast (value),sizeof(Scalar)); - flag() = 1; + + if ( test != value ) { + if ( team.league_rank() == 0 ) { + printf( "FAILED team_vector_parallel_reduce %i %i %f %f %lu\n", + team.league_rank(), team.team_rank(), + static_cast( test ), static_cast( value ), sizeof( Scalar ) ); + } + + flag() = 1; } }); } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_team_vector_reduce_join { - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_team_vector_reduce_join(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; - unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;} + functor_team_vector_reduce_join( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} - KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team) const { + unsigned team_shmem_size( int team_size ) const { return team_size * 13 * sizeof( Scalar ) + 8; } + KOKKOS_INLINE_FUNCTION + void operator()( typename policy_type::member_type team ) const { Scalar value = 0; - Kokkos::parallel_reduce(Kokkos::TeamThreadRange(team,131) - , [&] (int i, Scalar& val) - { - val += i - team.league_rank () + team.league_size () + team.team_size (); - } - , [&] (volatile Scalar& val, const volatile Scalar& src) - {val+=src;} - , value + + Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, 131 ), [&] ( int i, Scalar & val ) + { + val += i - team.league_rank() + team.league_size() + team.team_size(); + }, + [] ( volatile Scalar & val, const volatile Scalar & src ) { val += src; }, + value ); - team.team_barrier (); - Kokkos::single(Kokkos::PerTeam(team),[&]() + team.team_barrier(); + + Kokkos::single( Kokkos::PerTeam( team ), [&] () { Scalar test = 0; - for (int i = 0; i < 131; ++i) { - test += i - team.league_rank () + team.league_size () + team.team_size (); + + for ( int i = 0; i < 131; ++i ) { + test += i - team.league_rank() + team.league_size() + team.team_size(); } - if (test != value) { - printf ("FAILED team_vector_parallel_reduce_join %i %i %f %f\n", - team.league_rank (), team.team_rank (), - static_cast (test), static_cast (value)); + + if ( test != value ) { + printf( "FAILED team_vector_parallel_reduce_join %i %i %f %f\n", + team.league_rank(), team.team_rank(), + static_cast( test ), static_cast( value ) ); + flag() = 1; } }); } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_vec_single { - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_vec_single(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; + functor_vec_single( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team) const { - - // Warning: this test case intentionally violates permissable semantics + void operator()( typename policy_type::member_type team ) const { + // Warning: this test case intentionally violates permissable semantics. // It is not valid to get references to members of the enclosing region // inside a parallel_for and write to it. Scalar value = 0; - Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,13),[&] (int i) + Kokkos::parallel_for( Kokkos::ThreadVectorRange( team, 13 ), [&] ( int i ) { - value = i; // This write is violating Kokkos semantics for nested parallelism + value = i; // This write is violating Kokkos semantics for nested parallelism. }); - Kokkos::single(Kokkos::PerThread(team),[&] (Scalar& val) + Kokkos::single( Kokkos::PerThread( team ), [&] ( Scalar & val ) { val = 1; - },value); + }, value ); Scalar value2 = 0; - Kokkos::parallel_reduce(Kokkos::ThreadVectorRange(team,13), [&] (int i, Scalar& val) + Kokkos::parallel_reduce( Kokkos::ThreadVectorRange( team, 13 ), [&] ( int i, Scalar & val ) { val += value; - },value2); + }, value2 ); + + if ( value2 != ( value * 13 ) ) { + printf( "FAILED vector_single broadcast %i %i %f %f\n", + team.league_rank(), team.team_rank(), (double) value2, (double) value ); - if(value2!=(value*13)) { - printf("FAILED vector_single broadcast %i %i %f %f\n",team.league_rank(),team.team_rank(),(double) value2,(double) value); - flag()=1; + flag() = 1; } } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_vec_for { - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_vec_for(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; + + functor_vec_for( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} - unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;} + unsigned team_shmem_size( int team_size ) const { return team_size * 13 * sizeof( Scalar ) + 8; } KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team) const { + void operator()( typename policy_type::member_type team ) const { + typedef typename ExecutionSpace::scratch_memory_space shmem_space; + typedef Kokkos::View< Scalar*, shmem_space, Kokkos::MemoryUnmanaged > shared_int; - typedef typename ExecutionSpace::scratch_memory_space shmem_space ; - typedef Kokkos::View shared_int; - shared_int values = shared_int(team.team_shmem(),team.team_size()*13); + shared_int values = shared_int( team.team_shmem(), team.team_size() * 13 ); - if (values.ptr_on_device () == NULL || - values.dimension_0() < (unsigned) team.team_size() * 13) { - printf ("FAILED to allocate memory of size %i\n", - static_cast (team.team_size () * 13)); + if ( values.ptr_on_device() == NULL || values.dimension_0() < (unsigned) team.team_size() * 13 ) { + printf( "FAILED to allocate memory of size %i\n", static_cast( team.team_size() * 13 ) ); flag() = 1; } else { - Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,13), [&] (int i) + Kokkos::parallel_for( Kokkos::ThreadVectorRange( team, 13 ), [&] ( int i ) { - values(13*team.team_rank() + i) = i - team.team_rank() - team.league_rank() + team.league_size() + team.team_size(); + values( 13 * team.team_rank() + i ) = + i - team.team_rank() - team.league_rank() + team.league_size() + team.team_size(); }); - Kokkos::single(Kokkos::PerThread(team),[&] () + Kokkos::single( Kokkos::PerThread( team ), [&] () { Scalar test = 0; Scalar value = 0; - for (int i = 0; i < 13; ++i) { + + for ( int i = 0; i < 13; ++i ) { test += i - team.team_rank() - team.league_rank() + team.league_size() + team.team_size(); - value += values(13*team.team_rank() + i); + value += values( 13 * team.team_rank() + i ); } - if (test != value) { - printf ("FAILED vector_par_for %i %i %f %f\n", - team.league_rank (), team.team_rank (), - static_cast (test), static_cast (value)); + + if ( test != value ) { + printf( "FAILED vector_par_for %i %i %f %f\n", + team.league_rank(), team.team_rank(), + static_cast( test ), static_cast( value ) ); + flag() = 1; } }); @@ -505,169 +554,192 @@ struct functor_vec_for { } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_vec_red { - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_vec_red(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; + + functor_vec_red( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team) const { + void operator()( typename policy_type::member_type team ) const { Scalar value = 0; - Kokkos::parallel_reduce(Kokkos::ThreadVectorRange(team,13),[&] (int i, Scalar& val) + // When no reducer is given the default is summation. + Kokkos::parallel_reduce( Kokkos::ThreadVectorRange( team, 13 ), [&] ( int i, Scalar & val ) { val += i; - }, value); + }, value ); - Kokkos::single(Kokkos::PerThread(team),[&] () + Kokkos::single( Kokkos::PerThread( team ), [&] () { Scalar test = 0; - for(int i = 0; i < 13; i++) { - test+=i; - } - if(test!=value) { - printf("FAILED vector_par_reduce %i %i %f %f\n",team.league_rank(),team.team_rank(),(double) test,(double) value); - flag()=1; + + for ( int i = 0; i < 13; i++ ) test += i; + + if ( test != value ) { + printf( "FAILED vector_par_reduce %i %i %f %f\n", + team.league_rank(), team.team_rank(), (double) test, (double) value ); + + flag() = 1; } }); } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_vec_red_join { - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_vec_red_join(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; + + functor_vec_red_join( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team) const { + void operator()( typename policy_type::member_type team ) const { + // Must initialize to the identity value for the reduce operation + // for this test: + // ( identity, operation ) = ( 1 , *= ) Scalar value = 1; - Kokkos::parallel_reduce(Kokkos::ThreadVectorRange(team,13) - , [&] (int i, Scalar& val) - { val *= i; } - , [&] (Scalar& val, const Scalar& src) - {val*=src;} - , value + Kokkos::parallel_reduce( Kokkos::ThreadVectorRange( team, 13 ), [&] ( int i, Scalar & val ) + { + val *= ( i % 5 + 1 ); + }, + [&] ( Scalar & val, const Scalar & src ) { val *= src; }, + value ); - Kokkos::single(Kokkos::PerThread(team),[&] () + Kokkos::single( Kokkos::PerThread( team ), [&] () { Scalar test = 1; - for(int i = 0; i < 13; i++) { - test*=i; - } - if(test!=value) { - printf("FAILED vector_par_reduce_join %i %i %f %f\n",team.league_rank(),team.team_rank(),(double) test,(double) value); - flag()=1; + + for ( int i = 0; i < 13; i++ ) test *= ( i % 5 + 1 ); + + if ( test != value ) { + printf( "FAILED vector_par_reduce_join %i %i %f %f\n", + team.league_rank(), team.team_rank(), (double) test, (double) value ); + + flag() = 1; } }); } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_vec_scan { - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_vec_scan(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; + functor_vec_scan( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team) const { - Kokkos::parallel_scan(Kokkos::ThreadVectorRange(team,13),[&] (int i, Scalar& val, bool final) + void operator()( typename policy_type::member_type team ) const { + Kokkos::parallel_scan( Kokkos::ThreadVectorRange( team, 13 ), [&] ( int i, Scalar & val, bool final ) { val += i; - if(final) { + + if ( final ) { Scalar test = 0; - for(int k = 0; k <= i; k++) { - test+=k; - } - if(test!=val) { - printf("FAILED vector_par_scan %i %i %f %f\n",team.league_rank(),team.team_rank(),(double) test,(double) val); - flag()=1; + for ( int k = 0; k <= i; k++ ) test += k; + + if ( test != val ) { + printf( "FAILED vector_par_scan %i %i %f %f\n", + team.league_rank(), team.team_rank(), (double) test, (double) val ); + + flag() = 1; } } }); } }; -template +template< typename Scalar, class ExecutionSpace > struct functor_reduce { typedef double value_type; - typedef Kokkos::TeamPolicy policy_type; + typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type; typedef ExecutionSpace execution_space; - Kokkos::View flag; - functor_reduce(Kokkos::View flag_):flag(flag_) {} + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag; + functor_reduce( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {} KOKKOS_INLINE_FUNCTION - void operator() (typename policy_type::member_type team, double& sum) const { + void operator()( typename policy_type::member_type team, double & sum ) const { sum += team.league_rank() * 100 + team.thread_rank(); } }; -template -bool test_scalar(int nteams, int team_size, int test) { - Kokkos::View d_flag("flag"); - typename Kokkos::View::HostMirror h_flag("h_flag"); - h_flag() = 0 ; - Kokkos::deep_copy(d_flag,h_flag); - - if(test==0) - Kokkos::parallel_for( std::string("A") , Kokkos::TeamPolicy(nteams,team_size,8), - functor_vec_red(d_flag)); - if(test==1) - Kokkos::parallel_for( Kokkos::TeamPolicy(nteams,team_size,8), - functor_vec_red_join(d_flag)); - if(test==2) - Kokkos::parallel_for( Kokkos::TeamPolicy(nteams,team_size,8), - functor_vec_scan(d_flag)); - if(test==3) - Kokkos::parallel_for( Kokkos::TeamPolicy(nteams,team_size,8), - functor_vec_for(d_flag)); - if(test==4) - Kokkos::parallel_for( "B" , Kokkos::TeamPolicy(nteams,team_size,8), - functor_vec_single(d_flag)); - if(test==5) - Kokkos::parallel_for( Kokkos::TeamPolicy(nteams,team_size), - functor_team_for(d_flag)); - if(test==6) - Kokkos::parallel_for( Kokkos::TeamPolicy(nteams,team_size), - functor_team_reduce(d_flag)); - if(test==7) - Kokkos::parallel_for( Kokkos::TeamPolicy(nteams,team_size), - functor_team_reduce_join(d_flag)); - if(test==8) - Kokkos::parallel_for( Kokkos::TeamPolicy(nteams,team_size,8), - functor_team_vector_for(d_flag)); - if(test==9) - Kokkos::parallel_for( Kokkos::TeamPolicy(nteams,team_size,8), - functor_team_vector_reduce(d_flag)); - if(test==10) - Kokkos::parallel_for( Kokkos::TeamPolicy(nteams,team_size,8), - functor_team_vector_reduce_join(d_flag)); - - Kokkos::deep_copy(h_flag,d_flag); - - return (h_flag() == 0); +template< typename Scalar, class ExecutionSpace > +bool test_scalar( int nteams, int team_size, int test ) { + Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > d_flag( "flag" ); + typename Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace >::HostMirror h_flag( "h_flag" ); + h_flag() = 0; + Kokkos::deep_copy( d_flag, h_flag ); + + if ( test == 0 ) { + Kokkos::parallel_for( std::string( "A" ), Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size, 8 ), + functor_vec_red< Scalar, ExecutionSpace >( d_flag ) ); + } + else if ( test == 1 ) { + Kokkos::parallel_for( Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size, 8 ), + functor_vec_red_join< Scalar, ExecutionSpace >( d_flag ) ); + } + else if ( test == 2 ) { + Kokkos::parallel_for( Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size, 8 ), + functor_vec_scan< Scalar, ExecutionSpace >( d_flag ) ); + } + else if ( test == 3 ) { + Kokkos::parallel_for( Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size, 8 ), + functor_vec_for< Scalar, ExecutionSpace >( d_flag ) ); + } + else if ( test == 4 ) { + Kokkos::parallel_for( "B", Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size, 8 ), + functor_vec_single< Scalar, ExecutionSpace >( d_flag ) ); + } + else if ( test == 5 ) { + Kokkos::parallel_for( Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size ), + functor_team_for< Scalar, ExecutionSpace >( d_flag ) ); + } + else if ( test == 6 ) { + Kokkos::parallel_for( Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size ), + functor_team_reduce< Scalar, ExecutionSpace >( d_flag ) ); + } + else if ( test == 7 ) { + Kokkos::parallel_for( Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size ), + functor_team_reduce_join< Scalar, ExecutionSpace >( d_flag ) ); + } + else if ( test == 8 ) { + Kokkos::parallel_for( Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size, 8 ), + functor_team_vector_for< Scalar, ExecutionSpace >( d_flag ) ); + } + else if ( test == 9 ) { + Kokkos::parallel_for( Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size, 8 ), + functor_team_vector_reduce< Scalar, ExecutionSpace >( d_flag ) ); + } + else if ( test == 10 ) { + Kokkos::parallel_for( Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size, 8 ), + functor_team_vector_reduce_join< Scalar, ExecutionSpace >( d_flag ) ); + } + + Kokkos::deep_copy( h_flag, d_flag ); + + return ( h_flag() == 0 ); } -template -bool Test(int test) { +template< class ExecutionSpace > +bool Test( int test ) { bool passed = true; - passed = passed && test_scalar(317,33,test); - passed = passed && test_scalar(317,33,test); - passed = passed && test_scalar(317,33,test); - passed = passed && test_scalar(317,33,test); - passed = passed && test_scalar(317,33,test); - return passed; -} + passed = passed && test_scalar< int, ExecutionSpace >( 317, 33, test ); + passed = passed && test_scalar< long long int, ExecutionSpace >( 317, 33, test ); + passed = passed && test_scalar< float, ExecutionSpace >( 317, 33, test ); + passed = passed && test_scalar< double, ExecutionSpace >( 317, 33, test ); + passed = passed && test_scalar< my_complex, ExecutionSpace >( 317, 33, test ); + return passed; } +} // namespace TestTeamVector diff --git a/lib/kokkos/core/unit_test/TestTemplateMetaFunctions.hpp b/lib/kokkos/core/unit_test/TestTemplateMetaFunctions.hpp index 203c952679..7bcf3f8a32 100644 --- a/lib/kokkos/core/unit_test/TestTemplateMetaFunctions.hpp +++ b/lib/kokkos/core/unit_test/TestTemplateMetaFunctions.hpp @@ -47,152 +47,162 @@ namespace { -template +template< class Scalar, class ExecutionSpace > struct SumPlain { typedef ExecutionSpace execution_space; - typedef typename Kokkos::View type; + typedef typename Kokkos::View< Scalar*, execution_space > type; + type view; - SumPlain(type view_):view(view_) {} + + SumPlain( type view_ ) : view( view_ ) {} KOKKOS_INLINE_FUNCTION - void operator() (int i, Scalar& val) { + void operator() ( int i, Scalar & val ) { val += Scalar(); } }; -template +template< class Scalar, class ExecutionSpace > struct SumInitJoinFinalValueType { typedef ExecutionSpace execution_space; - typedef typename Kokkos::View type; - type view; + typedef typename Kokkos::View< Scalar*, execution_space > type; typedef Scalar value_type; - SumInitJoinFinalValueType(type view_):view(view_) {} + + type view; + + SumInitJoinFinalValueType( type view_ ) : view( view_ ) {} KOKKOS_INLINE_FUNCTION - void init(value_type& val) const { + void init( value_type & val ) const { val = value_type(); } KOKKOS_INLINE_FUNCTION - void join(volatile value_type& val, volatile value_type& src) const { + void join( volatile value_type & val, volatile value_type & src ) const { val += src; } KOKKOS_INLINE_FUNCTION - void operator() (int i, value_type& val) const { + void operator()( int i, value_type & val ) const { val += value_type(); } - }; -template +template< class Scalar, class ExecutionSpace > struct SumInitJoinFinalValueType2 { typedef ExecutionSpace execution_space; - typedef typename Kokkos::View type; - type view; + typedef typename Kokkos::View< Scalar*, execution_space > type; typedef Scalar value_type; - SumInitJoinFinalValueType2(type view_):view(view_) {} + + type view; + + SumInitJoinFinalValueType2( type view_ ) : view( view_ ) {} KOKKOS_INLINE_FUNCTION - void init(volatile value_type& val) const { + void init( volatile value_type & val ) const { val = value_type(); } KOKKOS_INLINE_FUNCTION - void join(volatile value_type& val, const volatile value_type& src) const { + void join( volatile value_type & val, const volatile value_type & src ) const { val += src; } KOKKOS_INLINE_FUNCTION - void operator() (int i, value_type& val) const { + void operator()( int i, value_type & val ) const { val += value_type(); } - }; -template +template< class Scalar, class ExecutionSpace > struct SumInitJoinFinalValueTypeArray { typedef ExecutionSpace execution_space; - typedef typename Kokkos::View type; - type view; + typedef typename Kokkos::View< Scalar*, execution_space > type; typedef Scalar value_type[]; + + type view; int n; - SumInitJoinFinalValueTypeArray(type view_, int n_):view(view_),n(n_) {} + + SumInitJoinFinalValueTypeArray( type view_, int n_ ) : view( view_ ), n( n_ ) {} KOKKOS_INLINE_FUNCTION - void init(value_type val) const { - for(int k=0;k +template< class Scalar, class ExecutionSpace > struct SumWrongInitJoinFinalValueType { typedef ExecutionSpace execution_space; - typedef typename Kokkos::View type; - type view; + typedef typename Kokkos::View< Scalar*, execution_space > type; typedef Scalar value_type; - SumWrongInitJoinFinalValueType(type view_):view(view_) {} + + type view; + + SumWrongInitJoinFinalValueType( type view_ ) : view( view_ ) {} KOKKOS_INLINE_FUNCTION - void init(double& val) const { + void init( double & val ) const { val = double(); } KOKKOS_INLINE_FUNCTION - void join(volatile value_type& val, const value_type& src) const { + void join( volatile value_type & val, const value_type & src ) const { val += src; } KOKKOS_INLINE_FUNCTION - void operator() (int i, value_type& val) const { + void operator()( int i, value_type & val ) const { val += value_type(); } - }; -template +template< class Scalar, class ExecutionSpace > void TestTemplateMetaFunctions() { - typedef typename Kokkos::View type; - type a("A",100); + typedef typename Kokkos::View< Scalar*, ExecutionSpace > type; + type a( "A", 100 ); /* - int sum_plain_has_init_arg = Kokkos::Impl::FunctorHasInit, Scalar& >::value; - ASSERT_EQ(sum_plain_has_init_arg,0); - int sum_initjoinfinalvaluetype_has_init_arg = Kokkos::Impl::FunctorHasInit, Scalar >::value; - ASSERT_EQ(sum_initjoinfinalvaluetype_has_init_arg,1); - int sum_initjoinfinalvaluetype_has_init_arg2 = Kokkos::Impl::FunctorHasInit, Scalar >::value; - ASSERT_EQ(sum_initjoinfinalvaluetype_has_init_arg2,1); - int sum_wronginitjoinfinalvaluetype_has_init_arg = Kokkos::Impl::FunctorHasInit, Scalar >::value; - ASSERT_EQ(sum_wronginitjoinfinalvaluetype_has_init_arg,0); - - //int sum_initjoinfinalvaluetypearray_has_init_arg = Kokkos::Impl::FunctorHasInit, Scalar[] >::value; - //ASSERT_EQ(sum_initjoinfinalvaluetypearray_has_init_arg,1); - - //printf("Values Init: %i %i %i\n",sum_plain_has_init_arg,sum_initjoinfinalvaluetype_has_init_arg,sum_wronginitjoinfinalvaluetype_has_init_arg); - - int sum_plain_has_join_arg = Kokkos::Impl::FunctorHasJoin, Scalar >::value; - ASSERT_EQ(sum_plain_has_join_arg,0); - int sum_initjoinfinalvaluetype_has_join_arg = Kokkos::Impl::FunctorHasJoin, Scalar >::value; - ASSERT_EQ(sum_initjoinfinalvaluetype_has_join_arg,1); - int sum_initjoinfinalvaluetype_has_join_arg2 = Kokkos::Impl::FunctorHasJoin, Scalar >::value; - ASSERT_EQ(sum_initjoinfinalvaluetype_has_join_arg2,1); - int sum_wronginitjoinfinalvaluetype_has_join_arg = Kokkos::Impl::FunctorHasJoin, Scalar >::value; - ASSERT_EQ(sum_wronginitjoinfinalvaluetype_has_join_arg,0); + int sum_plain_has_init_arg = Kokkos::Impl::FunctorHasInit< SumPlain, Scalar & >::value; + ASSERT_EQ( sum_plain_has_init_arg, 0 ); + int sum_initjoinfinalvaluetype_has_init_arg = Kokkos::Impl::FunctorHasInit< SumInitJoinFinalValueType, Scalar >::value; + ASSERT_EQ( sum_initjoinfinalvaluetype_has_init_arg, 1 ); + int sum_initjoinfinalvaluetype_has_init_arg2 = Kokkos::Impl::FunctorHasInit< SumInitJoinFinalValueType2, Scalar >::value; + ASSERT_EQ( sum_initjoinfinalvaluetype_has_init_arg2, 1 ); + int sum_wronginitjoinfinalvaluetype_has_init_arg = Kokkos::Impl::FunctorHasInit< SumWrongInitJoinFinalValueType, Scalar >::value; + ASSERT_EQ( sum_wronginitjoinfinalvaluetype_has_init_arg, 0 ); + + //int sum_initjoinfinalvaluetypearray_has_init_arg = Kokkos::Impl::FunctorHasInit< SumInitJoinFinalValueTypeArray, Scalar[] >::value; + //ASSERT_EQ( sum_initjoinfinalvaluetypearray_has_init_arg, 1 ); + + //printf( "Values Init: %i %i %i\n", sum_plain_has_init_arg, sum_initjoinfinalvaluetype_has_init_arg, sum_wronginitjoinfinalvaluetype_has_init_arg ); + + int sum_plain_has_join_arg = Kokkos::Impl::FunctorHasJoin< SumPlain, Scalar >::value; + ASSERT_EQ( sum_plain_has_join_arg, 0 ); + int sum_initjoinfinalvaluetype_has_join_arg = Kokkos::Impl::FunctorHasJoin< SumInitJoinFinalValueType, Scalar >::value; + ASSERT_EQ( sum_initjoinfinalvaluetype_has_join_arg, 1 ); + int sum_initjoinfinalvaluetype_has_join_arg2 = Kokkos::Impl::FunctorHasJoin< SumInitJoinFinalValueType2, Scalar >::value; + ASSERT_EQ( sum_initjoinfinalvaluetype_has_join_arg2, 1 ); + int sum_wronginitjoinfinalvaluetype_has_join_arg = Kokkos::Impl::FunctorHasJoin< SumWrongInitJoinFinalValueType, Scalar >::value; + ASSERT_EQ( sum_wronginitjoinfinalvaluetype_has_join_arg, 0 ); + + //printf( "Values Join: %i %i %i\n", sum_plain_has_join_arg, sum_initjoinfinalvaluetype_has_join_arg, sum_wronginitjoinfinalvaluetype_has_join_arg ); */ - //printf("Values Join: %i %i %i\n",sum_plain_has_join_arg,sum_initjoinfinalvaluetype_has_join_arg,sum_wronginitjoinfinalvaluetype_has_join_arg); } -} +} // namespace diff --git a/lib/kokkos/core/unit_test/TestTile.hpp b/lib/kokkos/core/unit_test/TestTile.hpp index 842131debb..7d096c24c3 100644 --- a/lib/kokkos/core/unit_test/TestTile.hpp +++ b/lib/kokkos/core/unit_test/TestTile.hpp @@ -1,12 +1,12 @@ //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -35,7 +35,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER @@ -47,108 +47,96 @@ namespace TestTile { -template < typename Device , typename TileLayout> +template < typename Device, typename TileLayout > struct ReduceTileErrors { - typedef Device execution_space ; - - typedef Kokkos::View< ptrdiff_t**, TileLayout, Device> array_type; - typedef Kokkos::View< ptrdiff_t[ TileLayout::N0 ][ TileLayout::N1 ], Kokkos::LayoutLeft , Device > tile_type ; - - array_type m_array ; - + typedef Device execution_space; + typedef Kokkos::View< ptrdiff_t**, TileLayout, Device > array_type; + typedef Kokkos::View< ptrdiff_t[ TileLayout::N0 ][ TileLayout::N1 ], Kokkos::LayoutLeft, Device > tile_type; typedef ptrdiff_t value_type; - ReduceTileErrors( array_type a ) - : m_array(a) - {} + array_type m_array; + ReduceTileErrors( array_type a ) : m_array( a ) {} KOKKOS_INLINE_FUNCTION - static void init( value_type & errors ) - { - errors = 0; - } + static void init( value_type & errors ) { errors = 0; } KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & errors , + static void join( volatile value_type & errors, const volatile value_type & src_errors ) { errors += src_errors; } - // Initialize + // Initialize. KOKKOS_INLINE_FUNCTION void operator()( size_t iwork ) const { const size_t i = iwork % m_array.dimension_0(); const size_t j = iwork / m_array.dimension_0(); - if ( j < m_array.dimension_1() ) { - m_array(i,j) = & m_array(i,j) - & m_array(0,0); -// printf("m_array(%d,%d) = %d\n",int(i),int(j),int(m_array(i,j))); + if ( j < m_array.dimension_1() ) { + m_array( i, j ) = &m_array( i, j ) - &m_array( 0, 0 ); + //printf( "m_array(%d, %d) = %d\n", int( i ), int( j ), int( m_array( i, j ) ) ); } } // Verify: KOKKOS_INLINE_FUNCTION - void operator()( size_t iwork , value_type & errors ) const + void operator()( size_t iwork, value_type & errors ) const { - const size_t tile_dim0 = ( m_array.dimension_0() + TileLayout::N0 - 1 ) / TileLayout::N0 ; - const size_t tile_dim1 = ( m_array.dimension_1() + TileLayout::N1 - 1 ) / TileLayout::N1 ; + const size_t tile_dim0 = ( m_array.dimension_0() + TileLayout::N0 - 1 ) / TileLayout::N0; + const size_t tile_dim1 = ( m_array.dimension_1() + TileLayout::N1 - 1 ) / TileLayout::N1; - const size_t itile = iwork % tile_dim0 ; - const size_t jtile = iwork / tile_dim0 ; + const size_t itile = iwork % tile_dim0; + const size_t jtile = iwork / tile_dim0; if ( jtile < tile_dim1 ) { + tile_type tile = Kokkos::Experimental::tile_subview( m_array, itile, jtile ); - tile_type tile = Kokkos::Experimental::tile_subview( m_array , itile , jtile ); - - if ( tile(0,0) != ptrdiff_t(( itile + jtile * tile_dim0 ) * TileLayout::N0 * TileLayout::N1 ) ) { - ++errors ; + if ( tile( 0, 0 ) != ptrdiff_t( ( itile + jtile * tile_dim0 ) * TileLayout::N0 * TileLayout::N1 ) ) { + ++errors; } else { + for ( size_t j = 0; j < size_t( TileLayout::N1 ); ++j ) { + for ( size_t i = 0; i < size_t( TileLayout::N0 ); ++i ) { + const size_t iglobal = i + itile * TileLayout::N0; + const size_t jglobal = j + jtile * TileLayout::N1; - for ( size_t j = 0 ; j < size_t(TileLayout::N1) ; ++j ) { - for ( size_t i = 0 ; i < size_t(TileLayout::N0) ; ++i ) { - const size_t iglobal = i + itile * TileLayout::N0 ; - const size_t jglobal = j + jtile * TileLayout::N1 ; - - if ( iglobal < m_array.dimension_0() && jglobal < m_array.dimension_1() ) { - if ( tile(i,j) != ptrdiff_t( tile(0,0) + i + j * TileLayout::N0 ) ) ++errors ; - -// printf("tile(%d,%d)(%d,%d) = %d\n",int(itile),int(jtile),int(i),int(j),int(tile(i,j))); + if ( iglobal < m_array.dimension_0() && jglobal < m_array.dimension_1() ) { + if ( tile( i, j ) != ptrdiff_t( tile( 0, 0 ) + i + j * TileLayout::N0 ) ) ++errors; + //printf( "tile(%d, %d)(%d, %d) = %d\n", int( itile ), int( jtile ), int( i ), int( j ), int( tile( i, j ) ) ); + } } } - } } } } }; -template< class Space , unsigned N0 , unsigned N1 > -void test( const size_t dim0 , const size_t dim1 ) +template< class Space, unsigned N0, unsigned N1 > +void test( const size_t dim0, const size_t dim1 ) { - typedef Kokkos::LayoutTileLeft array_layout ; - typedef ReduceTileErrors< Space , array_layout > functor_type ; + typedef Kokkos::LayoutTileLeft< N0, N1 > array_layout; + typedef ReduceTileErrors< Space, array_layout > functor_type; - const size_t tile_dim0 = ( dim0 + N0 - 1 ) / N0 ; - const size_t tile_dim1 = ( dim1 + N1 - 1 ) / N1 ; - - typename functor_type::array_type array("",dim0,dim1); + const size_t tile_dim0 = ( dim0 + N0 - 1 ) / N0; + const size_t tile_dim1 = ( dim1 + N1 - 1 ) / N1; - Kokkos::parallel_for( Kokkos::RangePolicy(0,dim0*dim1) , functor_type( array ) ); + typename functor_type::array_type array( "", dim0, dim1 ); - ptrdiff_t error = 0 ; + Kokkos::parallel_for( Kokkos::RangePolicy< Space, size_t >( 0, dim0 * dim1 ), functor_type( array ) ); - Kokkos::parallel_reduce( Kokkos::RangePolicy(0,tile_dim0*tile_dim1) , functor_type( array ) , error ); + ptrdiff_t error = 0; - EXPECT_EQ( error , ptrdiff_t(0) ); + Kokkos::parallel_reduce( Kokkos::RangePolicy< Space, size_t >( 0, tile_dim0 * tile_dim1 ), functor_type( array ), error ); + + EXPECT_EQ( error, ptrdiff_t( 0 ) ); } -} /* namespace TestTile */ +} // namespace TestTile #endif //TEST_TILE_HPP - diff --git a/lib/kokkos/core/unit_test/TestUtilities.hpp b/lib/kokkos/core/unit_test/TestUtilities.hpp index 947be03e39..be4a93b894 100644 --- a/lib/kokkos/core/unit_test/TestUtilities.hpp +++ b/lib/kokkos/core/unit_test/TestUtilities.hpp @@ -49,258 +49,253 @@ #include -/*--------------------------------------------------------------------------*/ - namespace Test { inline void test_utilities() { using namespace Kokkos::Impl; + { - using i = integer_sequence; - using j = make_integer_sequence; + using i = integer_sequence< int >; + using j = make_integer_sequence< int, 0 >; - static_assert( std::is_same::value, "Error: make_integer_sequence" ); + static_assert( std::is_same< i, j >::value, "Error: make_integer_sequence" ); static_assert( i::size() == 0u, "Error: integer_sequence.size()" ); } - { - using i = integer_sequence; - using j = make_integer_sequence; + using i = integer_sequence< int, 0 >; + using j = make_integer_sequence< int, 1 >; - static_assert( std::is_same::value, "Error: make_integer_sequence" ); + static_assert( std::is_same< i, j >::value, "Error: make_integer_sequence" ); static_assert( i::size() == 1u, "Error: integer_sequence.size()" ); - static_assert( integer_sequence_at<0, i>::value == 0, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 0, i >::value == 0, "Error: integer_sequence_at" ); - static_assert( at(0, i{}) == 0, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 0, i{} ) == 0, "Error: at(unsigned, integer_sequence)" ); } - { - using i = integer_sequence; - using j = make_integer_sequence; + using i = integer_sequence< int, 0, 1 >; + using j = make_integer_sequence< int, 2 >; - static_assert( std::is_same::value, "Error: make_integer_sequence" ); + static_assert( std::is_same< i, j >::value, "Error: make_integer_sequence" ); static_assert( i::size() == 2u, "Error: integer_sequence.size()" ); - static_assert( integer_sequence_at<0, i>::value == 0, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<1, i>::value == 1, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 0, i >::value == 0, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 1, i >::value == 1, "Error: integer_sequence_at" ); - static_assert( at(0, i{}) == 0, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(1, i{}) == 1, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 0, i{} ) == 0, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 1, i{} ) == 1, "Error: at(unsigned, integer_sequence)" ); } { - using i = integer_sequence; - using j = make_integer_sequence; + using i = integer_sequence< int, 0, 1, 2 >; + using j = make_integer_sequence< int, 3 >; - static_assert( std::is_same::value, "Error: make_integer_sequence" ); + static_assert( std::is_same< i, j >::value, "Error: make_integer_sequence" ); static_assert( i::size() == 3u, "Error: integer_sequence.size()" ); - static_assert( integer_sequence_at<0, i>::value == 0, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<1, i>::value == 1, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<2, i>::value == 2, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 0, i >::value == 0, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 1, i >::value == 1, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 2, i >::value == 2, "Error: integer_sequence_at" ); - static_assert( at(0, i{}) == 0, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(1, i{}) == 1, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(2, i{}) == 2, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 0, i{} ) == 0, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 1, i{} ) == 1, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 2, i{} ) == 2, "Error: at(unsigned, integer_sequence)" ); } { - using i = integer_sequence; - using j = make_integer_sequence; + using i = integer_sequence< int, 0, 1, 2, 3 >; + using j = make_integer_sequence< int, 4 >; - static_assert( std::is_same::value, "Error: make_integer_sequence" ); + static_assert( std::is_same< i, j >::value, "Error: make_integer_sequence" ); static_assert( i::size() == 4u, "Error: integer_sequence.size()" ); - static_assert( integer_sequence_at<0, i>::value == 0, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<1, i>::value == 1, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<2, i>::value == 2, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<3, i>::value == 3, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 0, i >::value == 0, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 1, i >::value == 1, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 2, i >::value == 2, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 3, i >::value == 3, "Error: integer_sequence_at" ); - static_assert( at(0, i{}) == 0, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(1, i{}) == 1, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(2, i{}) == 2, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(3, i{}) == 3, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 0, i{} ) == 0, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 1, i{} ) == 1, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 2, i{} ) == 2, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 3, i{} ) == 3, "Error: at(unsigned, integer_sequence)" ); } { - using i = integer_sequence; - using j = make_integer_sequence; + using i = integer_sequence< int, 0, 1, 2, 3, 4 >; + using j = make_integer_sequence< int, 5 >; - static_assert( std::is_same::value, "Error: make_integer_sequence" ); + static_assert( std::is_same< i, j >::value, "Error: make_integer_sequence" ); static_assert( i::size() == 5u, "Error: integer_sequence.size()" ); - static_assert( integer_sequence_at<0, i>::value == 0, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<1, i>::value == 1, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<2, i>::value == 2, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<3, i>::value == 3, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<4, i>::value == 4, "Error: integer_sequence_at" ); - - static_assert( at(0, i{}) == 0, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(1, i{}) == 1, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(2, i{}) == 2, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(3, i{}) == 3, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(4, i{}) == 4, "Error: at(unsigned, integer_sequence)" ); + static_assert( integer_sequence_at< 0, i >::value == 0, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 1, i >::value == 1, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 2, i >::value == 2, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 3, i >::value == 3, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 4, i >::value == 4, "Error: integer_sequence_at" ); + + static_assert( at( 0, i{} ) == 0, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 1, i{} ) == 1, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 2, i{} ) == 2, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 3, i{} ) == 3, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 4, i{} ) == 4, "Error: at(unsigned, integer_sequence)" ); } { - using i = integer_sequence; - using j = make_integer_sequence; + using i = integer_sequence< int, 0, 1, 2, 3, 4, 5 >; + using j = make_integer_sequence< int, 6 >; - static_assert( std::is_same::value, "Error: make_integer_sequence" ); + static_assert( std::is_same< i, j >::value, "Error: make_integer_sequence" ); static_assert( i::size() == 6u, "Error: integer_sequence.size()" ); - static_assert( integer_sequence_at<0, i>::value == 0, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<1, i>::value == 1, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<2, i>::value == 2, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<3, i>::value == 3, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<4, i>::value == 4, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<5, i>::value == 5, "Error: integer_sequence_at" ); - - static_assert( at(0, i{}) == 0, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(1, i{}) == 1, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(2, i{}) == 2, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(3, i{}) == 3, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(4, i{}) == 4, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(5, i{}) == 5, "Error: at(unsigned, integer_sequence)" ); + static_assert( integer_sequence_at< 0, i >::value == 0, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 1, i >::value == 1, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 2, i >::value == 2, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 3, i >::value == 3, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 4, i >::value == 4, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 5, i >::value == 5, "Error: integer_sequence_at" ); + + static_assert( at( 0, i{} ) == 0, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 1, i{} ) == 1, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 2, i{} ) == 2, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 3, i{} ) == 3, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 4, i{} ) == 4, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 5, i{} ) == 5, "Error: at(unsigned, integer_sequence)" ); } { - using i = integer_sequence; - using j = make_integer_sequence; + using i = integer_sequence< int, 0, 1, 2, 3, 4, 5, 6 >; + using j = make_integer_sequence< int, 7 >; - static_assert( std::is_same::value, "Error: make_integer_sequence" ); + static_assert( std::is_same< i, j >::value, "Error: make_integer_sequence" ); static_assert( i::size() == 7u, "Error: integer_sequence.size()" ); - static_assert( integer_sequence_at<0, i>::value == 0, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<1, i>::value == 1, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<2, i>::value == 2, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<3, i>::value == 3, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<4, i>::value == 4, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<5, i>::value == 5, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<6, i>::value == 6, "Error: integer_sequence_at" ); - - static_assert( at(0, i{}) == 0, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(1, i{}) == 1, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(2, i{}) == 2, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(3, i{}) == 3, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(4, i{}) == 4, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(5, i{}) == 5, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(6, i{}) == 6, "Error: at(unsigned, integer_sequence)" ); + static_assert( integer_sequence_at< 0, i >::value == 0, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 1, i >::value == 1, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 2, i >::value == 2, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 3, i >::value == 3, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 4, i >::value == 4, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 5, i >::value == 5, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 6, i >::value == 6, "Error: integer_sequence_at" ); + + static_assert( at( 0, i{} ) == 0, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 1, i{} ) == 1, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 2, i{} ) == 2, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 3, i{} ) == 3, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 4, i{} ) == 4, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 5, i{} ) == 5, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 6, i{} ) == 6, "Error: at(unsigned, integer_sequence)" ); } { - using i = integer_sequence; - using j = make_integer_sequence; + using i = integer_sequence< int, 0, 1, 2, 3, 4, 5, 6, 7 >; + using j = make_integer_sequence< int, 8 >; - static_assert( std::is_same::value, "Error: make_integer_sequence" ); + static_assert( std::is_same< i, j >::value, "Error: make_integer_sequence" ); static_assert( i::size() == 8u, "Error: integer_sequence.size()" ); - static_assert( integer_sequence_at<0, i>::value == 0, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<1, i>::value == 1, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<2, i>::value == 2, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<3, i>::value == 3, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<4, i>::value == 4, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<5, i>::value == 5, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<6, i>::value == 6, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<7, i>::value == 7, "Error: integer_sequence_at" ); - - static_assert( at(0, i{}) == 0, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(1, i{}) == 1, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(2, i{}) == 2, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(3, i{}) == 3, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(4, i{}) == 4, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(5, i{}) == 5, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(6, i{}) == 6, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(7, i{}) == 7, "Error: at(unsigned, integer_sequence)" ); + static_assert( integer_sequence_at< 0, i >::value == 0, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 1, i >::value == 1, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 2, i >::value == 2, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 3, i >::value == 3, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 4, i >::value == 4, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 5, i >::value == 5, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 6, i >::value == 6, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 7, i >::value == 7, "Error: integer_sequence_at" ); + + static_assert( at( 0, i{} ) == 0, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 1, i{} ) == 1, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 2, i{} ) == 2, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 3, i{} ) == 3, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 4, i{} ) == 4, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 5, i{} ) == 5, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 6, i{} ) == 6, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 7, i{} ) == 7, "Error: at(unsigned, integer_sequence)" ); } { - using i = integer_sequence; - using j = make_integer_sequence; + using i = integer_sequence< int, 0, 1, 2, 3, 4, 5, 6, 7, 8 >; + using j = make_integer_sequence< int, 9 >; - static_assert( std::is_same::value, "Error: make_integer_sequence" ); + static_assert( std::is_same< i, j >::value, "Error: make_integer_sequence" ); static_assert( i::size() == 9u, "Error: integer_sequence.size()" ); - static_assert( integer_sequence_at<0, i>::value == 0, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<1, i>::value == 1, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<2, i>::value == 2, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<3, i>::value == 3, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<4, i>::value == 4, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<5, i>::value == 5, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<6, i>::value == 6, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<7, i>::value == 7, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<8, i>::value == 8, "Error: integer_sequence_at" ); - - static_assert( at(0, i{}) == 0, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(1, i{}) == 1, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(2, i{}) == 2, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(3, i{}) == 3, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(4, i{}) == 4, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(5, i{}) == 5, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(6, i{}) == 6, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(7, i{}) == 7, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(8, i{}) == 8, "Error: at(unsigned, integer_sequence)" ); + static_assert( integer_sequence_at< 0, i >::value == 0, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 1, i >::value == 1, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 2, i >::value == 2, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 3, i >::value == 3, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 4, i >::value == 4, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 5, i >::value == 5, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 6, i >::value == 6, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 7, i >::value == 7, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 8, i >::value == 8, "Error: integer_sequence_at" ); + + static_assert( at( 0, i{} ) == 0, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 1, i{} ) == 1, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 2, i{} ) == 2, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 3, i{} ) == 3, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 4, i{} ) == 4, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 5, i{} ) == 5, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 6, i{} ) == 6, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 7, i{} ) == 7, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 8, i{} ) == 8, "Error: at(unsigned, integer_sequence)" ); } { - using i = integer_sequence; - using j = make_integer_sequence; + using i = integer_sequence< int, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 >; + using j = make_integer_sequence< int, 10 >; - static_assert( std::is_same::value, "Error: make_integer_sequence" ); + static_assert( std::is_same< i, j >::value, "Error: make_integer_sequence" ); static_assert( i::size() == 10u, "Error: integer_sequence.size()" ); - static_assert( integer_sequence_at<0, i>::value == 0, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<1, i>::value == 1, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<2, i>::value == 2, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<3, i>::value == 3, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<4, i>::value == 4, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<5, i>::value == 5, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<6, i>::value == 6, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<7, i>::value == 7, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<8, i>::value == 8, "Error: integer_sequence_at" ); - static_assert( integer_sequence_at<9, i>::value == 9, "Error: integer_sequence_at" ); - - static_assert( at(0, i{}) == 0, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(1, i{}) == 1, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(2, i{}) == 2, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(3, i{}) == 3, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(4, i{}) == 4, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(5, i{}) == 5, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(6, i{}) == 6, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(7, i{}) == 7, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(8, i{}) == 8, "Error: at(unsigned, integer_sequence)" ); - static_assert( at(9, i{}) == 9, "Error: at(unsigned, integer_sequence)" ); + static_assert( integer_sequence_at< 0, i >::value == 0, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 1, i >::value == 1, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 2, i >::value == 2, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 3, i >::value == 3, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 4, i >::value == 4, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 5, i >::value == 5, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 6, i >::value == 6, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 7, i >::value == 7, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 8, i >::value == 8, "Error: integer_sequence_at" ); + static_assert( integer_sequence_at< 9, i >::value == 9, "Error: integer_sequence_at" ); + + static_assert( at( 0, i{} ) == 0, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 1, i{} ) == 1, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 2, i{} ) == 2, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 3, i{} ) == 3, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 4, i{} ) == 4, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 5, i{} ) == 5, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 6, i{} ) == 6, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 7, i{} ) == 7, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 8, i{} ) == 8, "Error: at(unsigned, integer_sequence)" ); + static_assert( at( 9, i{} ) == 9, "Error: at(unsigned, integer_sequence)" ); } { - using i = make_integer_sequence; - using r = reverse_integer_sequence; - using gr = integer_sequence; + using i = make_integer_sequence< int, 5 >; + using r = reverse_integer_sequence< i >; + using gr = integer_sequence< int, 4, 3, 2, 1, 0 >; - static_assert( std::is_same::value, "Error: reverse_integer_sequence" ); + static_assert( std::is_same< r, gr >::value, "Error: reverse_integer_sequence" ); } { - using s = make_integer_sequence; - using e = exclusive_scan_integer_sequence; - using i = inclusive_scan_integer_sequence; + using s = make_integer_sequence< int, 10 >; + using e = exclusive_scan_integer_sequence< s >; + using i = inclusive_scan_integer_sequence< s >; - using ge = integer_sequence; - using gi = integer_sequence; + using ge = integer_sequence< int, 0, 0, 1, 3, 6, 10, 15, 21, 28, 36 >; + using gi = integer_sequence< int, 0, 1, 3, 6, 10, 15, 21, 28, 36, 45 >; - static_assert( e::value == 45, "Error: scan value"); - static_assert( i::value == 45, "Error: scan value"); + static_assert( e::value == 45, "Error: scan value" ); + static_assert( i::value == 45, "Error: scan value" ); - static_assert( std::is_same< e::type, ge >::value, "Error: exclusive_scan"); - static_assert( std::is_same< i::type, gi >::value, "Error: inclusive_scan"); + static_assert( std::is_same< e::type, ge >::value, "Error: exclusive_scan" ); + static_assert( std::is_same< i::type, gi >::value, "Error: inclusive_scan" ); } - - } } // namespace Test diff --git a/lib/kokkos/core/unit_test/TestViewAPI.hpp b/lib/kokkos/core/unit_test/TestViewAPI.hpp index a96f31cc12..cbf86dc58c 100644 --- a/lib/kokkos/core/unit_test/TestViewAPI.hpp +++ b/lib/kokkos/core/unit_test/TestViewAPI.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -48,103 +48,92 @@ #include #include -/*--------------------------------------------------------------------------*/ - - -/*--------------------------------------------------------------------------*/ - namespace Test { -template< class T , class ... P > -size_t allocation_count( const Kokkos::View & view ) +template< class T, class ... P > +size_t allocation_count( const Kokkos::View< T, P... > & view ) { const size_t card = view.size(); const size_t alloc = view.span(); - const int memory_span = Kokkos::View::required_allocation_size(100); + const int memory_span = Kokkos::View< int* >::required_allocation_size( 100 ); - return (card <= alloc && memory_span == 400) ? alloc : 0 ; + return ( card <= alloc && memory_span == 400 ) ? alloc : 0; } /*--------------------------------------------------------------------------*/ -template< typename T, class DeviceType> +template< typename T, class DeviceType > struct TestViewOperator { - typedef typename DeviceType::execution_space execution_space ; + typedef typename DeviceType::execution_space execution_space; - static const unsigned N = 100 ; - static const unsigned D = 3 ; + static const unsigned N = 100; + static const unsigned D = 3; - typedef Kokkos::View< T*[D] , execution_space > view_type ; + typedef Kokkos::View< T*[D], execution_space > view_type; - const view_type v1 ; - const view_type v2 ; + const view_type v1; + const view_type v2; TestViewOperator() - : v1( "v1" , N ) - , v2( "v2" , N ) + : v1( "v1", N ) + , v2( "v2", N ) {} static void testit() { - Kokkos::parallel_for( N , TestViewOperator() ); + Kokkos::parallel_for( N, TestViewOperator() ); } KOKKOS_INLINE_FUNCTION void operator()( const unsigned i ) const { - const unsigned X = 0 ; - const unsigned Y = 1 ; - const unsigned Z = 2 ; + const unsigned X = 0; + const unsigned Y = 1; + const unsigned Z = 2; - v2(i,X) = v1(i,X); - v2(i,Y) = v1(i,Y); - v2(i,Z) = v1(i,Z); + v2( i, X ) = v1( i, X ); + v2( i, Y ) = v1( i, Y ); + v2( i, Z ) = v1( i, Z ); } }; /*--------------------------------------------------------------------------*/ -template< class DataType , - class DeviceType , +template< class DataType, + class DeviceType, unsigned Rank = Kokkos::ViewTraits< DataType >::rank > -struct TestViewOperator_LeftAndRight ; +struct TestViewOperator_LeftAndRight; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 8 > +template< class DataType, class DeviceType > +struct TestViewOperator_LeftAndRight< DataType, DeviceType, 8 > { - typedef typename DeviceType::execution_space execution_space ; - typedef typename DeviceType::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; + typedef typename DeviceType::execution_space execution_space; + typedef typename DeviceType::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , + static void join( volatile value_type & update, const volatile value_type & input ) - { update |= input ; } + { update |= input; } KOKKOS_INLINE_FUNCTION static void init( value_type & update ) - { update = 0 ; } - + { update = 0; } - typedef Kokkos:: - View< DataType, Kokkos::LayoutLeft, execution_space > left_view ; + typedef Kokkos::View< DataType, Kokkos::LayoutLeft, execution_space > left_view; + typedef Kokkos::View< DataType, Kokkos::LayoutRight, execution_space > right_view; + typedef Kokkos::View< DataType, Kokkos::LayoutStride, execution_space > stride_view; - typedef Kokkos:: - View< DataType, Kokkos::LayoutRight, execution_space > right_view ; - - typedef Kokkos:: - View< DataType, Kokkos::LayoutStride, execution_space > stride_view ; - - left_view left ; - right_view right ; - stride_view left_stride ; - stride_view right_stride ; - long left_alloc ; - long right_alloc ; + left_view left; + right_view right; + stride_view left_stride; + stride_view right_stride; + long left_alloc; + long right_alloc; TestViewOperator_LeftAndRight() : left( "left" ) @@ -157,93 +146,89 @@ struct TestViewOperator_LeftAndRight< DataType , DeviceType , 8 > static void testit() { - TestViewOperator_LeftAndRight driver ; + TestViewOperator_LeftAndRight driver; - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce( 1, driver, error_flag ); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ( error_flag, 0 ); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const + void operator()( const size_type, value_type & update ) const { - long offset ; - - offset = -1 ; - for ( unsigned i7 = 0 ; i7 < unsigned(left.dimension_7()) ; ++i7 ) - for ( unsigned i6 = 0 ; i6 < unsigned(left.dimension_6()) ; ++i6 ) - for ( unsigned i5 = 0 ; i5 < unsigned(left.dimension_5()) ; ++i5 ) - for ( unsigned i4 = 0 ; i4 < unsigned(left.dimension_4()) ; ++i4 ) - for ( unsigned i3 = 0 ; i3 < unsigned(left.dimension_3()) ; ++i3 ) - for ( unsigned i2 = 0 ; i2 < unsigned(left.dimension_2()) ; ++i2 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.dimension_1()) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.dimension_0()) ; ++i0 ) + long offset = -1; + + for ( unsigned i7 = 0; i7 < unsigned( left.dimension_7() ); ++i7 ) + for ( unsigned i6 = 0; i6 < unsigned( left.dimension_6() ); ++i6 ) + for ( unsigned i5 = 0; i5 < unsigned( left.dimension_5() ); ++i5 ) + for ( unsigned i4 = 0; i4 < unsigned( left.dimension_4() ); ++i4 ) + for ( unsigned i3 = 0; i3 < unsigned( left.dimension_3() ); ++i3 ) + for ( unsigned i2 = 0; i2 < unsigned( left.dimension_2() ); ++i2 ) + for ( unsigned i1 = 0; i1 < unsigned( left.dimension_1() ); ++i1 ) + for ( unsigned i0 = 0; i0 < unsigned( left.dimension_0() ); ++i0 ) { const long j = & left( i0, i1, i2, i3, i4, i5, i6, i7 ) - & left( 0, 0, 0, 0, 0, 0, 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; + if ( j <= offset || left_alloc <= j ) { update |= 1; } + offset = j; - if ( & left(i0,i1,i2,i3,i4,i5,i6,i7) != - & left_stride(i0,i1,i2,i3,i4,i5,i6,i7) ) { - update |= 4 ; + if ( & left( i0, i1, i2, i3, i4, i5, i6, i7 ) != + & left_stride( i0, i1, i2, i3, i4, i5, i6, i7 ) ) { + update |= 4; } } - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.dimension_0()) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.dimension_1()) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(right.dimension_2()) ; ++i2 ) - for ( unsigned i3 = 0 ; i3 < unsigned(right.dimension_3()) ; ++i3 ) - for ( unsigned i4 = 0 ; i4 < unsigned(right.dimension_4()) ; ++i4 ) - for ( unsigned i5 = 0 ; i5 < unsigned(right.dimension_5()) ; ++i5 ) - for ( unsigned i6 = 0 ; i6 < unsigned(right.dimension_6()) ; ++i6 ) - for ( unsigned i7 = 0 ; i7 < unsigned(right.dimension_7()) ; ++i7 ) + offset = -1; + + for ( unsigned i0 = 0; i0 < unsigned( right.dimension_0() ); ++i0 ) + for ( unsigned i1 = 0; i1 < unsigned( right.dimension_1() ); ++i1 ) + for ( unsigned i2 = 0; i2 < unsigned( right.dimension_2() ); ++i2 ) + for ( unsigned i3 = 0; i3 < unsigned( right.dimension_3() ); ++i3 ) + for ( unsigned i4 = 0; i4 < unsigned( right.dimension_4() ); ++i4 ) + for ( unsigned i5 = 0; i5 < unsigned( right.dimension_5() ); ++i5 ) + for ( unsigned i6 = 0; i6 < unsigned( right.dimension_6() ); ++i6 ) + for ( unsigned i7 = 0; i7 < unsigned( right.dimension_7() ); ++i7 ) { const long j = & right( i0, i1, i2, i3, i4, i5, i6, i7 ) - & right( 0, 0, 0, 0, 0, 0, 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; + if ( j <= offset || right_alloc <= j ) { update |= 2; } + offset = j; - if ( & right(i0,i1,i2,i3,i4,i5,i6,i7) != - & right_stride(i0,i1,i2,i3,i4,i5,i6,i7) ) { - update |= 8 ; + if ( & right( i0, i1, i2, i3, i4, i5, i6, i7 ) != + & right_stride( i0, i1, i2, i3, i4, i5, i6, i7 ) ) { + update |= 8; } } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 7 > +template< class DataType, class DeviceType > +struct TestViewOperator_LeftAndRight< DataType, DeviceType, 7 > { - typedef typename DeviceType::execution_space execution_space ; - typedef typename DeviceType::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; + typedef typename DeviceType::execution_space execution_space; + typedef typename DeviceType::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , + static void join( volatile value_type & update, const volatile value_type & input ) - { update |= input ; } + { update |= input; } KOKKOS_INLINE_FUNCTION static void init( value_type & update ) - { update = 0 ; } - - - typedef Kokkos:: - View< DataType, Kokkos::LayoutLeft, execution_space > left_view ; + { update = 0; } - typedef Kokkos:: - View< DataType, Kokkos::LayoutRight, execution_space > right_view ; + typedef Kokkos::View< DataType, Kokkos::LayoutLeft, execution_space > left_view; + typedef Kokkos::View< DataType, Kokkos::LayoutRight, execution_space > right_view; - left_view left ; - right_view right ; - long left_alloc ; - long right_alloc ; + left_view left; + right_view right; + long left_alloc; + long right_alloc; TestViewOperator_LeftAndRight() : left( "left" ) @@ -254,81 +239,77 @@ struct TestViewOperator_LeftAndRight< DataType , DeviceType , 7 > static void testit() { - TestViewOperator_LeftAndRight driver ; + TestViewOperator_LeftAndRight driver; - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce( 1, driver, error_flag ); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ( error_flag, 0 ); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const + void operator()( const size_type, value_type & update ) const { - long offset ; - - offset = -1 ; - for ( unsigned i6 = 0 ; i6 < unsigned(left.dimension_6()) ; ++i6 ) - for ( unsigned i5 = 0 ; i5 < unsigned(left.dimension_5()) ; ++i5 ) - for ( unsigned i4 = 0 ; i4 < unsigned(left.dimension_4()) ; ++i4 ) - for ( unsigned i3 = 0 ; i3 < unsigned(left.dimension_3()) ; ++i3 ) - for ( unsigned i2 = 0 ; i2 < unsigned(left.dimension_2()) ; ++i2 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.dimension_1()) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.dimension_0()) ; ++i0 ) + long offset = -1; + + for ( unsigned i6 = 0; i6 < unsigned( left.dimension_6() ); ++i6 ) + for ( unsigned i5 = 0; i5 < unsigned( left.dimension_5() ); ++i5 ) + for ( unsigned i4 = 0; i4 < unsigned( left.dimension_4() ); ++i4 ) + for ( unsigned i3 = 0; i3 < unsigned( left.dimension_3() ); ++i3 ) + for ( unsigned i2 = 0; i2 < unsigned( left.dimension_2() ); ++i2 ) + for ( unsigned i1 = 0; i1 < unsigned( left.dimension_1() ); ++i1 ) + for ( unsigned i0 = 0; i0 < unsigned( left.dimension_0() ); ++i0 ) { const long j = & left( i0, i1, i2, i3, i4, i5, i6 ) - & left( 0, 0, 0, 0, 0, 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; + if ( j <= offset || left_alloc <= j ) { update |= 1; } + offset = j; } - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.dimension_0()) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.dimension_1()) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(right.dimension_2()) ; ++i2 ) - for ( unsigned i3 = 0 ; i3 < unsigned(right.dimension_3()) ; ++i3 ) - for ( unsigned i4 = 0 ; i4 < unsigned(right.dimension_4()) ; ++i4 ) - for ( unsigned i5 = 0 ; i5 < unsigned(right.dimension_5()) ; ++i5 ) - for ( unsigned i6 = 0 ; i6 < unsigned(right.dimension_6()) ; ++i6 ) + offset = -1; + + for ( unsigned i0 = 0; i0 < unsigned( right.dimension_0() ); ++i0 ) + for ( unsigned i1 = 0; i1 < unsigned( right.dimension_1() ); ++i1 ) + for ( unsigned i2 = 0; i2 < unsigned( right.dimension_2() ); ++i2 ) + for ( unsigned i3 = 0; i3 < unsigned( right.dimension_3() ); ++i3 ) + for ( unsigned i4 = 0; i4 < unsigned( right.dimension_4() ); ++i4 ) + for ( unsigned i5 = 0; i5 < unsigned( right.dimension_5() ); ++i5 ) + for ( unsigned i6 = 0; i6 < unsigned( right.dimension_6() ); ++i6 ) { const long j = & right( i0, i1, i2, i3, i4, i5, i6 ) - & right( 0, 0, 0, 0, 0, 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; + if ( j <= offset || right_alloc <= j ) { update |= 2; } + offset = j; } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 6 > +template< class DataType, class DeviceType > +struct TestViewOperator_LeftAndRight< DataType, DeviceType, 6 > { - typedef typename DeviceType::execution_space execution_space ; - typedef typename DeviceType::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; + typedef typename DeviceType::execution_space execution_space; + typedef typename DeviceType::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , + static void join( volatile value_type & update, const volatile value_type & input ) - { update |= input ; } + { update |= input; } KOKKOS_INLINE_FUNCTION static void init( value_type & update ) - { update = 0 ; } - - - typedef Kokkos:: - View< DataType, Kokkos::LayoutLeft, execution_space > left_view ; + { update = 0; } - typedef Kokkos:: - View< DataType, Kokkos::LayoutRight, execution_space > right_view ; + typedef Kokkos::View< DataType, Kokkos::LayoutLeft, execution_space > left_view; + typedef Kokkos::View< DataType, Kokkos::LayoutRight, execution_space > right_view; - left_view left ; - right_view right ; - long left_alloc ; - long right_alloc ; + left_view left; + right_view right; + long left_alloc; + long right_alloc; TestViewOperator_LeftAndRight() : left( "left" ) @@ -339,84 +320,78 @@ struct TestViewOperator_LeftAndRight< DataType , DeviceType , 6 > static void testit() { - TestViewOperator_LeftAndRight driver ; + TestViewOperator_LeftAndRight driver; - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce( 1, driver, error_flag ); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ( error_flag, 0 ); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const + void operator()( const size_type, value_type & update ) const { - long offset ; - - offset = -1 ; - for ( unsigned i5 = 0 ; i5 < unsigned(left.dimension_5()) ; ++i5 ) - for ( unsigned i4 = 0 ; i4 < unsigned(left.dimension_4()) ; ++i4 ) - for ( unsigned i3 = 0 ; i3 < unsigned(left.dimension_3()) ; ++i3 ) - for ( unsigned i2 = 0 ; i2 < unsigned(left.dimension_2()) ; ++i2 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.dimension_1()) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.dimension_0()) ; ++i0 ) + long offset = -1; + + for ( unsigned i5 = 0; i5 < unsigned( left.dimension_5() ); ++i5 ) + for ( unsigned i4 = 0; i4 < unsigned( left.dimension_4() ); ++i4 ) + for ( unsigned i3 = 0; i3 < unsigned( left.dimension_3() ); ++i3 ) + for ( unsigned i2 = 0; i2 < unsigned( left.dimension_2() ); ++i2 ) + for ( unsigned i1 = 0; i1 < unsigned( left.dimension_1() ); ++i1 ) + for ( unsigned i0 = 0; i0 < unsigned( left.dimension_0() ); ++i0 ) { const long j = & left( i0, i1, i2, i3, i4, i5 ) - & left( 0, 0, 0, 0, 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; + if ( j <= offset || left_alloc <= j ) { update |= 1; } + offset = j; } - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.dimension_0()) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.dimension_1()) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(right.dimension_2()) ; ++i2 ) - for ( unsigned i3 = 0 ; i3 < unsigned(right.dimension_3()) ; ++i3 ) - for ( unsigned i4 = 0 ; i4 < unsigned(right.dimension_4()) ; ++i4 ) - for ( unsigned i5 = 0 ; i5 < unsigned(right.dimension_5()) ; ++i5 ) + offset = -1; + + for ( unsigned i0 = 0; i0 < unsigned( right.dimension_0() ); ++i0 ) + for ( unsigned i1 = 0; i1 < unsigned( right.dimension_1() ); ++i1 ) + for ( unsigned i2 = 0; i2 < unsigned( right.dimension_2() ); ++i2 ) + for ( unsigned i3 = 0; i3 < unsigned( right.dimension_3() ); ++i3 ) + for ( unsigned i4 = 0; i4 < unsigned( right.dimension_4() ); ++i4 ) + for ( unsigned i5 = 0; i5 < unsigned( right.dimension_5() ); ++i5 ) { const long j = & right( i0, i1, i2, i3, i4, i5 ) - & right( 0, 0, 0, 0, 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; + if ( j <= offset || right_alloc <= j ) { update |= 2; } + offset = j; } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 5 > +template< class DataType, class DeviceType > +struct TestViewOperator_LeftAndRight< DataType, DeviceType, 5 > { - typedef typename DeviceType::execution_space execution_space ; - typedef typename DeviceType::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; + typedef typename DeviceType::execution_space execution_space; + typedef typename DeviceType::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , + static void join( volatile value_type & update, const volatile value_type & input ) - { update |= input ; } + { update |= input; } KOKKOS_INLINE_FUNCTION static void init( value_type & update ) - { update = 0 ; } - + { update = 0; } - typedef Kokkos:: - View< DataType, Kokkos::LayoutLeft, execution_space > left_view ; + typedef Kokkos::View< DataType, Kokkos::LayoutLeft, execution_space > left_view; + typedef Kokkos::View< DataType, Kokkos::LayoutRight, execution_space > right_view; + typedef Kokkos::View< DataType, Kokkos::LayoutStride, execution_space > stride_view; - typedef Kokkos:: - View< DataType, Kokkos::LayoutRight, execution_space > right_view ; - - typedef Kokkos:: - View< DataType, Kokkos::LayoutStride, execution_space > stride_view ; - - left_view left ; - right_view right ; - stride_view left_stride ; - stride_view right_stride ; - long left_alloc ; - long right_alloc ; + left_view left; + right_view right; + stride_view left_stride; + stride_view right_stride; + long left_alloc; + long right_alloc; TestViewOperator_LeftAndRight() : left( "left" ) @@ -429,83 +404,79 @@ struct TestViewOperator_LeftAndRight< DataType , DeviceType , 5 > static void testit() { - TestViewOperator_LeftAndRight driver ; + TestViewOperator_LeftAndRight driver; - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce( 1, driver, error_flag ); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ( error_flag, 0 ); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const + void operator()( const size_type, value_type & update ) const { - long offset ; - - offset = -1 ; - for ( unsigned i4 = 0 ; i4 < unsigned(left.dimension_4()) ; ++i4 ) - for ( unsigned i3 = 0 ; i3 < unsigned(left.dimension_3()) ; ++i3 ) - for ( unsigned i2 = 0 ; i2 < unsigned(left.dimension_2()) ; ++i2 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.dimension_1()) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.dimension_0()) ; ++i0 ) + long offset = -1; + + for ( unsigned i4 = 0; i4 < unsigned( left.dimension_4() ); ++i4 ) + for ( unsigned i3 = 0; i3 < unsigned( left.dimension_3() ); ++i3 ) + for ( unsigned i2 = 0; i2 < unsigned( left.dimension_2() ); ++i2 ) + for ( unsigned i1 = 0; i1 < unsigned( left.dimension_1() ); ++i1 ) + for ( unsigned i0 = 0; i0 < unsigned( left.dimension_0() ); ++i0 ) { const long j = & left( i0, i1, i2, i3, i4 ) - & left( 0, 0, 0, 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; + if ( j <= offset || left_alloc <= j ) { update |= 1; } + offset = j; if ( & left( i0, i1, i2, i3, i4 ) != - & left_stride( i0, i1, i2, i3, i4 ) ) { update |= 4 ; } + & left_stride( i0, i1, i2, i3, i4 ) ) { update |= 4; } } - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.dimension_0()) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.dimension_1()) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(right.dimension_2()) ; ++i2 ) - for ( unsigned i3 = 0 ; i3 < unsigned(right.dimension_3()) ; ++i3 ) - for ( unsigned i4 = 0 ; i4 < unsigned(right.dimension_4()) ; ++i4 ) + offset = -1; + + for ( unsigned i0 = 0; i0 < unsigned( right.dimension_0() ); ++i0 ) + for ( unsigned i1 = 0; i1 < unsigned( right.dimension_1() ); ++i1 ) + for ( unsigned i2 = 0; i2 < unsigned( right.dimension_2() ); ++i2 ) + for ( unsigned i3 = 0; i3 < unsigned( right.dimension_3() ); ++i3 ) + for ( unsigned i4 = 0; i4 < unsigned( right.dimension_4() ); ++i4 ) { const long j = & right( i0, i1, i2, i3, i4 ) - & right( 0, 0, 0, 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; + if ( j <= offset || right_alloc <= j ) { update |= 2; } + offset = j; if ( & right( i0, i1, i2, i3, i4 ) != - & right_stride( i0, i1, i2, i3, i4 ) ) { update |= 8 ; } + & right_stride( i0, i1, i2, i3, i4 ) ) { update |= 8; } } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 4 > +template< class DataType, class DeviceType > +struct TestViewOperator_LeftAndRight< DataType, DeviceType, 4 > { - typedef typename DeviceType::execution_space execution_space ; - typedef typename DeviceType::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; + typedef typename DeviceType::execution_space execution_space; + typedef typename DeviceType::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , + static void join( volatile value_type & update, const volatile value_type & input ) - { update |= input ; } + { update |= input; } KOKKOS_INLINE_FUNCTION static void init( value_type & update ) - { update = 0 ; } - + { update = 0; } - typedef Kokkos:: - View< DataType, Kokkos::LayoutLeft, execution_space > left_view ; + typedef Kokkos::View< DataType, Kokkos::LayoutLeft, execution_space > left_view; + typedef Kokkos::View< DataType, Kokkos::LayoutRight, execution_space > right_view; - typedef Kokkos:: - View< DataType, Kokkos::LayoutRight, execution_space > right_view ; - - left_view left ; - right_view right ; - long left_alloc ; - long right_alloc ; + left_view left; + right_view right; + long left_alloc; + long right_alloc; TestViewOperator_LeftAndRight() : left( "left" ) @@ -516,84 +487,78 @@ struct TestViewOperator_LeftAndRight< DataType , DeviceType , 4 > static void testit() { - TestViewOperator_LeftAndRight driver ; + TestViewOperator_LeftAndRight driver; - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce( 1, driver, error_flag ); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ( error_flag, 0 ); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const + void operator()( const size_type, value_type & update ) const { - long offset ; + long offset = -1; - offset = -1 ; - for ( unsigned i3 = 0 ; i3 < unsigned(left.dimension_3()) ; ++i3 ) - for ( unsigned i2 = 0 ; i2 < unsigned(left.dimension_2()) ; ++i2 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.dimension_1()) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.dimension_0()) ; ++i0 ) + for ( unsigned i3 = 0; i3 < unsigned( left.dimension_3() ); ++i3 ) + for ( unsigned i2 = 0; i2 < unsigned( left.dimension_2() ); ++i2 ) + for ( unsigned i1 = 0; i1 < unsigned( left.dimension_1() ); ++i1 ) + for ( unsigned i0 = 0; i0 < unsigned( left.dimension_0() ); ++i0 ) { const long j = & left( i0, i1, i2, i3 ) - & left( 0, 0, 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; + if ( j <= offset || left_alloc <= j ) { update |= 1; } + offset = j; } - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.dimension_0()) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.dimension_1()) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(right.dimension_2()) ; ++i2 ) - for ( unsigned i3 = 0 ; i3 < unsigned(right.dimension_3()) ; ++i3 ) + offset = -1; + + for ( unsigned i0 = 0; i0 < unsigned( right.dimension_0() ); ++i0 ) + for ( unsigned i1 = 0; i1 < unsigned( right.dimension_1() ); ++i1 ) + for ( unsigned i2 = 0; i2 < unsigned( right.dimension_2() ); ++i2 ) + for ( unsigned i3 = 0; i3 < unsigned( right.dimension_3() ); ++i3 ) { const long j = & right( i0, i1, i2, i3 ) - & right( 0, 0, 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; + if ( j <= offset || right_alloc <= j ) { update |= 2; } + offset = j; } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 3 > +template< class DataType, class DeviceType > +struct TestViewOperator_LeftAndRight< DataType, DeviceType, 3 > { - typedef typename DeviceType::execution_space execution_space ; - typedef typename DeviceType::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; + typedef typename DeviceType::execution_space execution_space; + typedef typename DeviceType::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , + static void join( volatile value_type & update, const volatile value_type & input ) - { update |= input ; } + { update |= input; } KOKKOS_INLINE_FUNCTION static void init( value_type & update ) - { update = 0 ; } - - - typedef Kokkos:: - View< DataType, Kokkos::LayoutLeft, execution_space > left_view ; - - typedef Kokkos:: - View< DataType, Kokkos::LayoutRight, execution_space > right_view ; + { update = 0; } - typedef Kokkos:: - View< DataType, Kokkos::LayoutStride, execution_space > stride_view ; + typedef Kokkos::View< DataType, Kokkos::LayoutLeft, execution_space > left_view; + typedef Kokkos::View< DataType, Kokkos::LayoutRight, execution_space > right_view; + typedef Kokkos::View< DataType, Kokkos::LayoutStride, execution_space > stride_view; - left_view left ; - right_view right ; - stride_view left_stride ; - stride_view right_stride ; - long left_alloc ; - long right_alloc ; + left_view left; + right_view right; + stride_view left_stride; + stride_view right_stride; + long left_alloc; + long right_alloc; TestViewOperator_LeftAndRight() - : left( std::string("left") ) - , right( std::string("right") ) + : left( std::string( "left" ) ) + , right( std::string( "right" ) ) , left_stride( left ) , right_stride( right ) , left_alloc( allocation_count( left ) ) @@ -602,85 +567,81 @@ struct TestViewOperator_LeftAndRight< DataType , DeviceType , 3 > static void testit() { - TestViewOperator_LeftAndRight driver ; + TestViewOperator_LeftAndRight driver; - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce( 1, driver, error_flag ); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ( error_flag, 0 ); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const + void operator()( const size_type, value_type & update ) const { - long offset ; + long offset = -1; - offset = -1 ; - for ( unsigned i2 = 0 ; i2 < unsigned(left.dimension_2()) ; ++i2 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.dimension_1()) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.dimension_0()) ; ++i0 ) + for ( unsigned i2 = 0; i2 < unsigned( left.dimension_2() ); ++i2 ) + for ( unsigned i1 = 0; i1 < unsigned( left.dimension_1() ); ++i1 ) + for ( unsigned i0 = 0; i0 < unsigned( left.dimension_0() ); ++i0 ) { const long j = & left( i0, i1, i2 ) - & left( 0, 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; + if ( j <= offset || left_alloc <= j ) { update |= 1; } + offset = j; - if ( & left(i0,i1,i2) != & left_stride(i0,i1,i2) ) { update |= 4 ; } + if ( & left( i0, i1, i2 ) != & left_stride( i0, i1, i2 ) ) { update |= 4; } } - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.dimension_0()) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.dimension_1()) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(right.dimension_2()) ; ++i2 ) + offset = -1; + + for ( unsigned i0 = 0; i0 < unsigned( right.dimension_0() ); ++i0 ) + for ( unsigned i1 = 0; i1 < unsigned( right.dimension_1() ); ++i1 ) + for ( unsigned i2 = 0; i2 < unsigned( right.dimension_2() ); ++i2 ) { const long j = & right( i0, i1, i2 ) - & right( 0, 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; + if ( j <= offset || right_alloc <= j ) { update |= 2; } + offset = j; - if ( & right(i0,i1,i2) != & right_stride(i0,i1,i2) ) { update |= 8 ; } + if ( & right( i0, i1, i2 ) != & right_stride( i0, i1, i2 ) ) { update |= 8; } } - for ( unsigned i0 = 0 ; i0 < unsigned(left.dimension_0()) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.dimension_1()) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(left.dimension_2()) ; ++i2 ) + for ( unsigned i0 = 0; i0 < unsigned( left.dimension_0() ); ++i0 ) + for ( unsigned i1 = 0; i1 < unsigned( left.dimension_1() ); ++i1 ) + for ( unsigned i2 = 0; i2 < unsigned( left.dimension_2() ); ++i2 ) { - if ( & left(i0,i1,i2) != & left(i0,i1,i2,0,0,0,0,0) ) { update |= 3 ; } - if ( & right(i0,i1,i2) != & right(i0,i1,i2,0,0,0,0,0) ) { update |= 3 ; } + if ( & left( i0, i1, i2 ) != & left( i0, i1, i2, 0, 0, 0, 0, 0 ) ) { update |= 3; } + if ( & right( i0, i1, i2 ) != & right( i0, i1, i2, 0, 0, 0, 0, 0 ) ) { update |= 3; } } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 2 > +template< class DataType, class DeviceType > +struct TestViewOperator_LeftAndRight< DataType, DeviceType, 2 > { - typedef typename DeviceType::execution_space execution_space ; - typedef typename DeviceType::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; + typedef typename DeviceType::execution_space execution_space; + typedef typename DeviceType::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , + static void join( volatile value_type & update, const volatile value_type & input ) - { update |= input ; } + { update |= input; } KOKKOS_INLINE_FUNCTION static void init( value_type & update ) - { update = 0 ; } - - - typedef Kokkos:: - View< DataType, Kokkos::LayoutLeft, execution_space > left_view ; + { update = 0; } - typedef Kokkos:: - View< DataType, Kokkos::LayoutRight, execution_space > right_view ; + typedef Kokkos::View< DataType, Kokkos::LayoutLeft, execution_space > left_view; + typedef Kokkos::View< DataType, Kokkos::LayoutRight, execution_space > right_view; - left_view left ; - right_view right ; - long left_alloc ; - long right_alloc ; + left_view left; + right_view right; + long left_alloc; + long right_alloc; TestViewOperator_LeftAndRight() : left( "left" ) @@ -691,83 +652,77 @@ struct TestViewOperator_LeftAndRight< DataType , DeviceType , 2 > static void testit() { - TestViewOperator_LeftAndRight driver ; + TestViewOperator_LeftAndRight driver; - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce( 1, driver, error_flag ); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ( error_flag, 0 ); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const + void operator()( const size_type, value_type & update ) const { - long offset ; + long offset = -1; - offset = -1 ; - for ( unsigned i1 = 0 ; i1 < unsigned(left.dimension_1()) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.dimension_0()) ; ++i0 ) + for ( unsigned i1 = 0; i1 < unsigned( left.dimension_1() ); ++i1 ) + for ( unsigned i0 = 0; i0 < unsigned( left.dimension_0() ); ++i0 ) { const long j = & left( i0, i1 ) - & left( 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; + if ( j <= offset || left_alloc <= j ) { update |= 1; } + offset = j; } - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.dimension_0()) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.dimension_1()) ; ++i1 ) + offset = -1; + + for ( unsigned i0 = 0; i0 < unsigned( right.dimension_0() ); ++i0 ) + for ( unsigned i1 = 0; i1 < unsigned( right.dimension_1() ); ++i1 ) { const long j = & right( i0, i1 ) - & right( 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; + if ( j <= offset || right_alloc <= j ) { update |= 2; } + offset = j; } - for ( unsigned i0 = 0 ; i0 < unsigned(left.dimension_0()) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.dimension_1()) ; ++i1 ) + for ( unsigned i0 = 0; i0 < unsigned( left.dimension_0() ); ++i0 ) + for ( unsigned i1 = 0; i1 < unsigned( left.dimension_1() ); ++i1 ) { - if ( & left(i0,i1) != & left(i0,i1,0,0,0,0,0,0) ) { update |= 3 ; } - if ( & right(i0,i1) != & right(i0,i1,0,0,0,0,0,0) ) { update |= 3 ; } + if ( & left( i0, i1 ) != & left( i0, i1, 0, 0, 0, 0, 0, 0 ) ) { update |= 3; } + if ( & right( i0, i1 ) != & right( i0, i1, 0, 0, 0, 0, 0, 0 ) ) { update |= 3; } } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 1 > +template< class DataType, class DeviceType > +struct TestViewOperator_LeftAndRight< DataType, DeviceType, 1 > { - typedef typename DeviceType::execution_space execution_space ; - typedef typename DeviceType::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; + typedef typename DeviceType::execution_space execution_space; + typedef typename DeviceType::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , + static void join( volatile value_type & update, const volatile value_type & input ) - { update |= input ; } + { update |= input; } KOKKOS_INLINE_FUNCTION static void init( value_type & update ) - { update = 0 ; } - + { update = 0; } - typedef Kokkos:: - View< DataType, Kokkos::LayoutLeft, execution_space > left_view ; + typedef Kokkos::View< DataType, Kokkos::LayoutLeft, execution_space > left_view; + typedef Kokkos::View< DataType, Kokkos::LayoutRight, execution_space > right_view; + typedef Kokkos::View< DataType, Kokkos::LayoutStride, execution_space > stride_view; - typedef Kokkos:: - View< DataType, Kokkos::LayoutRight, execution_space > right_view ; - - typedef Kokkos:: - View< DataType, Kokkos::LayoutStride, execution_space > stride_view ; - - left_view left ; - right_view right ; - stride_view left_stride ; - stride_view right_stride ; - long left_alloc ; - long right_alloc ; + left_view left; + right_view right; + stride_view left_stride; + stride_view right_stride; + long left_alloc; + long right_alloc; TestViewOperator_LeftAndRight() : left( "left" ) @@ -780,78 +735,75 @@ struct TestViewOperator_LeftAndRight< DataType , DeviceType , 1 > static void testit() { - TestViewOperator_LeftAndRight driver ; + TestViewOperator_LeftAndRight driver; - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce( 1, driver, error_flag ); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ( error_flag, 0 ); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const + void operator()( const size_type, value_type & update ) const { - for ( unsigned i0 = 0 ; i0 < unsigned(left.dimension_0()) ; ++i0 ) + for ( unsigned i0 = 0; i0 < unsigned( left.dimension_0() ); ++i0 ) { - if ( & left(i0) != & left(i0,0,0,0,0,0,0,0) ) { update |= 3 ; } - if ( & right(i0) != & right(i0,0,0,0,0,0,0,0) ) { update |= 3 ; } - if ( & left(i0) != & left_stride(i0) ) { update |= 4 ; } - if ( & right(i0) != & right_stride(i0) ) { update |= 8 ; } + if ( & left( i0 ) != & left( i0, 0, 0, 0, 0, 0, 0, 0 ) ) { update |= 3; } + if ( & right( i0 ) != & right( i0, 0, 0, 0, 0, 0, 0, 0 ) ) { update |= 3; } + if ( & left( i0 ) != & left_stride( i0 ) ) { update |= 4; } + if ( & right( i0 ) != & right_stride( i0 ) ) { update |= 8; } } } }; -template -struct TestViewMirror { - - template +template< class Layout, class DeviceType > +struct TestViewMirror +{ + template< class MemoryTraits > void static test_mirror() { - Kokkos::View a_org("A",1000); - Kokkos::View a_h = a_org; - auto a_h2 = Kokkos::create_mirror(Kokkos::HostSpace(),a_h); - auto a_d = Kokkos::create_mirror(DeviceType(),a_h); - - int equal_ptr_h_h2 = (a_h.data() ==a_h2.data())?1:0; - int equal_ptr_h_d = (a_h.data() ==a_d. data())?1:0; - int equal_ptr_h2_d = (a_h2.data()==a_d. data())?1:0; - - ASSERT_EQ(equal_ptr_h_h2,0); - ASSERT_EQ(equal_ptr_h_d ,0); - ASSERT_EQ(equal_ptr_h2_d,0); - - - ASSERT_EQ(a_h.dimension_0(),a_h2.dimension_0()); - ASSERT_EQ(a_h.dimension_0(),a_d .dimension_0()); - } + Kokkos::View< double*, Layout, Kokkos::HostSpace > a_org( "A", 1000 ); + Kokkos::View< double*, Layout, Kokkos::HostSpace, MemoryTraits > a_h = a_org; + auto a_h2 = Kokkos::create_mirror( Kokkos::HostSpace(), a_h ); + auto a_d = Kokkos::create_mirror( DeviceType(), a_h ); + int equal_ptr_h_h2 = ( a_h.data() == a_h2.data() ) ? 1 : 0; + int equal_ptr_h_d = ( a_h.data() == a_d.data() ) ? 1 : 0; + int equal_ptr_h2_d = ( a_h2.data() == a_d.data() ) ? 1 : 0; - template - void static test_mirror_view() { - Kokkos::View a_org("A",1000); - Kokkos::View a_h = a_org; - auto a_h2 = Kokkos::create_mirror_view(Kokkos::HostSpace(),a_h); - auto a_d = Kokkos::create_mirror_view(DeviceType(),a_h); - - int equal_ptr_h_h2 = a_h.data() ==a_h2.data()?1:0; - int equal_ptr_h_d = a_h.data() ==a_d. data()?1:0; - int equal_ptr_h2_d = a_h2.data()==a_d. data()?1:0; - - int is_same_memspace = std::is_same::value?1:0; - ASSERT_EQ(equal_ptr_h_h2,1); - ASSERT_EQ(equal_ptr_h_d ,is_same_memspace); - ASSERT_EQ(equal_ptr_h2_d ,is_same_memspace); + ASSERT_EQ( equal_ptr_h_h2, 0 ); + ASSERT_EQ( equal_ptr_h_d, 0 ); + ASSERT_EQ( equal_ptr_h2_d, 0 ); + ASSERT_EQ( a_h.dimension_0(), a_h2.dimension_0() ); + ASSERT_EQ( a_h.dimension_0(), a_d .dimension_0() ); + } - ASSERT_EQ(a_h.dimension_0(),a_h2.dimension_0()); - ASSERT_EQ(a_h.dimension_0(),a_d .dimension_0()); - } + template< class MemoryTraits > + void static test_mirror_view() { + Kokkos::View< double*, Layout, Kokkos::HostSpace > a_org( "A", 1000 ); + Kokkos::View< double*, Layout, Kokkos::HostSpace, MemoryTraits > a_h = a_org; + auto a_h2 = Kokkos::create_mirror_view( Kokkos::HostSpace(), a_h ); + auto a_d = Kokkos::create_mirror_view( DeviceType(), a_h ); + + int equal_ptr_h_h2 = a_h.data() == a_h2.data() ? 1 : 0; + int equal_ptr_h_d = a_h.data() == a_d.data() ? 1 : 0; + int equal_ptr_h2_d = a_h2.data() == a_d.data() ? 1 : 0; + + int is_same_memspace = std::is_same< Kokkos::HostSpace, typename DeviceType::memory_space >::value ? 1 : 0; + ASSERT_EQ( equal_ptr_h_h2, 1 ); + ASSERT_EQ( equal_ptr_h_d, is_same_memspace ); + ASSERT_EQ( equal_ptr_h2_d, is_same_memspace ); + + ASSERT_EQ( a_h.dimension_0(), a_h2.dimension_0() ); + ASSERT_EQ( a_h.dimension_0(), a_d .dimension_0() ); + } void static testit() { - test_mirror>(); - test_mirror>(); - test_mirror_view>(); - test_mirror_view>(); + test_mirror< Kokkos::MemoryTraits<0> >(); + test_mirror< Kokkos::MemoryTraits >(); + test_mirror_view< Kokkos::MemoryTraits<0> >(); + test_mirror_view< Kokkos::MemoryTraits >(); } }; @@ -861,23 +813,21 @@ template< typename T, class DeviceType > class TestViewAPI { public: - typedef DeviceType device ; + typedef DeviceType device; - enum { N0 = 1000 , - N1 = 3 , - N2 = 5 , + enum { N0 = 1000, + N1 = 3, + N2 = 5, N3 = 7 }; - typedef Kokkos::View< T , device > dView0 ; - typedef Kokkos::View< T* , device > dView1 ; - typedef Kokkos::View< T*[N1] , device > dView2 ; - typedef Kokkos::View< T*[N1][N2] , device > dView3 ; - typedef Kokkos::View< T*[N1][N2][N3] , device > dView4 ; - typedef Kokkos::View< const T*[N1][N2][N3] , device > const_dView4 ; - - typedef Kokkos::View< T****, device, Kokkos::MemoryUnmanaged > dView4_unmanaged ; - - typedef typename dView0::host_mirror_space host ; + typedef Kokkos::View< T, device > dView0; + typedef Kokkos::View< T*, device > dView1; + typedef Kokkos::View< T*[N1], device > dView2; + typedef Kokkos::View< T*[N1][N2], device > dView3; + typedef Kokkos::View< T*[N1][N2][N3], device > dView4; + typedef Kokkos::View< const T*[N1][N2][N3], device > const_dView4; + typedef Kokkos::View< T****, device, Kokkos::MemoryUnmanaged > dView4_unmanaged; + typedef typename dView0::host_mirror_space host; TestViewAPI() { @@ -889,41 +839,38 @@ public: run_test_subview_strided(); run_test_vector(); - TestViewOperator< T , device >::testit(); - TestViewOperator_LeftAndRight< int[2][3][4][2][3][4][2][3] , device >::testit(); - TestViewOperator_LeftAndRight< int[2][3][4][2][3][4][2] , device >::testit(); - TestViewOperator_LeftAndRight< int[2][3][4][2][3][4] , device >::testit(); - TestViewOperator_LeftAndRight< int[2][3][4][2][3] , device >::testit(); - TestViewOperator_LeftAndRight< int[2][3][4][2] , device >::testit(); - TestViewOperator_LeftAndRight< int[2][3][4] , device >::testit(); - TestViewOperator_LeftAndRight< int[2][3] , device >::testit(); - TestViewOperator_LeftAndRight< int[2] , device >::testit(); - TestViewMirror::testit(); - TestViewMirror::testit(); - + TestViewOperator< T, device >::testit(); + TestViewOperator_LeftAndRight< int[2][3][4][2][3][4][2][3], device >::testit(); + TestViewOperator_LeftAndRight< int[2][3][4][2][3][4][2], device >::testit(); + TestViewOperator_LeftAndRight< int[2][3][4][2][3][4], device >::testit(); + TestViewOperator_LeftAndRight< int[2][3][4][2][3], device >::testit(); + TestViewOperator_LeftAndRight< int[2][3][4][2], device >::testit(); + TestViewOperator_LeftAndRight< int[2][3][4], device >::testit(); + TestViewOperator_LeftAndRight< int[2][3], device >::testit(); + TestViewOperator_LeftAndRight< int[2], device >::testit(); + TestViewMirror< Kokkos::LayoutLeft, device >::testit(); + TestViewMirror< Kokkos::LayoutRight, device >::testit(); } static void run_test_mirror() { - typedef Kokkos::View< int , host > view_type ; - typedef typename view_type::HostMirror mirror_type ; + typedef Kokkos::View< int, host > view_type; + typedef typename view_type::HostMirror mirror_type; - static_assert( std::is_same< typename view_type::memory_space - , typename mirror_type::memory_space - >::value , "" ); + static_assert( std::is_same< typename view_type::memory_space, typename mirror_type::memory_space >::value, "" ); - view_type a("a"); - mirror_type am = Kokkos::create_mirror_view(a); - mirror_type ax = Kokkos::create_mirror(a); - ASSERT_EQ( & a() , & am() ); + view_type a( "a" ); + mirror_type am = Kokkos::create_mirror_view( a ); + mirror_type ax = Kokkos::create_mirror( a ); + ASSERT_EQ( & a(), & am() ); } static void run_test_scalar() { - typedef typename dView0::HostMirror hView0 ; + typedef typename dView0::HostMirror hView0; - dView0 dx , dy ; - hView0 hx , hy ; + dView0 dx, dy; + hView0 hx, hy; dx = dView0( "dx" ); dy = dView0( "dy" ); @@ -931,11 +878,11 @@ public: hx = Kokkos::create_mirror( dx ); hy = Kokkos::create_mirror( dy ); - hx() = 1 ; + hx() = 1; - Kokkos::deep_copy( dx , hx ); - Kokkos::deep_copy( dy , dx ); - Kokkos::deep_copy( hy , dy ); + Kokkos::deep_copy( dx, hx ); + Kokkos::deep_copy( dy, dx ); + Kokkos::deep_copy( hy, dy ); ASSERT_EQ( hx(), hy() ); } @@ -948,11 +895,11 @@ public: // usual "(void)" marker to avoid compiler warnings for unused // variables. - typedef typename dView0::HostMirror hView0 ; - typedef typename dView1::HostMirror hView1 ; - typedef typename dView2::HostMirror hView2 ; - typedef typename dView3::HostMirror hView3 ; - typedef typename dView4::HostMirror hView4 ; + typedef typename dView0::HostMirror hView0; + typedef typename dView1::HostMirror hView1; + typedef typename dView2::HostMirror hView2; + typedef typename dView3::HostMirror hView3; + typedef typename dView4::HostMirror hView4; { hView0 thing; @@ -975,8 +922,8 @@ public: (void) thing; } - dView4 dx , dy , dz ; - hView4 hx , hy , hz ; + dView4 dx, dy, dz; + hView4 hx, hy, hz; ASSERT_TRUE( dx.ptr_on_device() == 0 ); ASSERT_TRUE( dy.ptr_on_device() == 0 ); @@ -984,220 +931,239 @@ public: ASSERT_TRUE( hx.ptr_on_device() == 0 ); ASSERT_TRUE( hy.ptr_on_device() == 0 ); ASSERT_TRUE( hz.ptr_on_device() == 0 ); - ASSERT_EQ( dx.dimension_0() , 0u ); - ASSERT_EQ( dy.dimension_0() , 0u ); - ASSERT_EQ( dz.dimension_0() , 0u ); - ASSERT_EQ( hx.dimension_0() , 0u ); - ASSERT_EQ( hy.dimension_0() , 0u ); - ASSERT_EQ( hz.dimension_0() , 0u ); - ASSERT_EQ( dx.dimension_1() , unsigned(N1) ); - ASSERT_EQ( dy.dimension_1() , unsigned(N1) ); - ASSERT_EQ( dz.dimension_1() , unsigned(N1) ); - ASSERT_EQ( hx.dimension_1() , unsigned(N1) ); - ASSERT_EQ( hy.dimension_1() , unsigned(N1) ); - ASSERT_EQ( hz.dimension_1() , unsigned(N1) ); - - dx = dView4( "dx" , N0 ); - dy = dView4( "dy" , N0 ); - - ASSERT_EQ( dx.use_count() , size_t(1) ); + ASSERT_EQ( dx.dimension_0(), 0u ); + ASSERT_EQ( dy.dimension_0(), 0u ); + ASSERT_EQ( dz.dimension_0(), 0u ); + ASSERT_EQ( hx.dimension_0(), 0u ); + ASSERT_EQ( hy.dimension_0(), 0u ); + ASSERT_EQ( hz.dimension_0(), 0u ); + ASSERT_EQ( dx.dimension_1(), unsigned( N1 ) ); + ASSERT_EQ( dy.dimension_1(), unsigned( N1 ) ); + ASSERT_EQ( dz.dimension_1(), unsigned( N1 ) ); + ASSERT_EQ( hx.dimension_1(), unsigned( N1 ) ); + ASSERT_EQ( hy.dimension_1(), unsigned( N1 ) ); + ASSERT_EQ( hz.dimension_1(), unsigned( N1 ) ); + + dx = dView4( "dx", N0 ); + dy = dView4( "dy", N0 ); + + ASSERT_EQ( dx.use_count(), size_t( 1 ) ); dView4_unmanaged unmanaged_dx = dx; - ASSERT_EQ( dx.use_count() , size_t(1) ); + ASSERT_EQ( dx.use_count(), size_t( 1 ) ); - dView4_unmanaged unmanaged_from_ptr_dx = dView4_unmanaged(dx.ptr_on_device(), - dx.dimension_0(), - dx.dimension_1(), - dx.dimension_2(), - dx.dimension_3()); + dView4_unmanaged unmanaged_from_ptr_dx = dView4_unmanaged( dx.ptr_on_device(), + dx.dimension_0(), + dx.dimension_1(), + dx.dimension_2(), + dx.dimension_3() ); { - // Destruction of this view should be harmless - const_dView4 unmanaged_from_ptr_const_dx( dx.ptr_on_device() , - dx.dimension_0() , - dx.dimension_1() , - dx.dimension_2() , + // Destruction of this view should be harmless. + const_dView4 unmanaged_from_ptr_const_dx( dx.ptr_on_device(), + dx.dimension_0(), + dx.dimension_1(), + dx.dimension_2(), dx.dimension_3() ); } - const_dView4 const_dx = dx ; - ASSERT_EQ( dx.use_count() , size_t(2) ); + const_dView4 const_dx = dx; + ASSERT_EQ( dx.use_count(), size_t( 2 ) ); { const_dView4 const_dx2; const_dx2 = const_dx; - ASSERT_EQ( dx.use_count() , size_t(3) ); + ASSERT_EQ( dx.use_count(), size_t( 3 ) ); const_dx2 = dy; - ASSERT_EQ( dx.use_count() , size_t(2) ); + ASSERT_EQ( dx.use_count(), size_t( 2 ) ); - const_dView4 const_dx3(dx); - ASSERT_EQ( dx.use_count() , size_t(3) ); - - dView4_unmanaged dx4_unmanaged(dx); - ASSERT_EQ( dx.use_count() , size_t(3) ); - } + const_dView4 const_dx3( dx ); + ASSERT_EQ( dx.use_count(), size_t( 3 ) ); - ASSERT_EQ( dx.use_count() , size_t(2) ); + dView4_unmanaged dx4_unmanaged( dx ); + ASSERT_EQ( dx.use_count(), size_t( 3 ) ); + } + ASSERT_EQ( dx.use_count(), size_t( 2 ) ); ASSERT_FALSE( dx.ptr_on_device() == 0 ); ASSERT_FALSE( const_dx.ptr_on_device() == 0 ); ASSERT_FALSE( unmanaged_dx.ptr_on_device() == 0 ); ASSERT_FALSE( unmanaged_from_ptr_dx.ptr_on_device() == 0 ); ASSERT_FALSE( dy.ptr_on_device() == 0 ); - ASSERT_NE( dx , dy ); + ASSERT_NE( dx, dy ); - ASSERT_EQ( dx.dimension_0() , unsigned(N0) ); - ASSERT_EQ( dx.dimension_1() , unsigned(N1) ); - ASSERT_EQ( dx.dimension_2() , unsigned(N2) ); - ASSERT_EQ( dx.dimension_3() , unsigned(N3) ); + ASSERT_EQ( dx.dimension_0(), unsigned( N0 ) ); + ASSERT_EQ( dx.dimension_1(), unsigned( N1 ) ); + ASSERT_EQ( dx.dimension_2(), unsigned( N2 ) ); + ASSERT_EQ( dx.dimension_3(), unsigned( N3 ) ); - ASSERT_EQ( dy.dimension_0() , unsigned(N0) ); - ASSERT_EQ( dy.dimension_1() , unsigned(N1) ); - ASSERT_EQ( dy.dimension_2() , unsigned(N2) ); - ASSERT_EQ( dy.dimension_3() , unsigned(N3) ); + ASSERT_EQ( dy.dimension_0(), unsigned( N0 ) ); + ASSERT_EQ( dy.dimension_1(), unsigned( N1 ) ); + ASSERT_EQ( dy.dimension_2(), unsigned( N2 ) ); + ASSERT_EQ( dy.dimension_3(), unsigned( N3 ) ); - ASSERT_EQ( unmanaged_from_ptr_dx.capacity(),unsigned(N0)*unsigned(N1)*unsigned(N2)*unsigned(N3) ); + ASSERT_EQ( unmanaged_from_ptr_dx.capacity(), unsigned( N0 ) * unsigned( N1 ) * unsigned( N2 ) * unsigned( N3 ) ); hx = Kokkos::create_mirror( dx ); hy = Kokkos::create_mirror( dy ); - // T v1 = hx() ; // Generates compile error as intended - // T v2 = hx(0,0) ; // Generates compile error as intended - // hx(0,0) = v2 ; // Generates compile error as intended + // T v1 = hx(); // Generates compile error as intended. + // T v2 = hx( 0, 0 ); // Generates compile error as intended. + // hx( 0, 0 ) = v2; // Generates compile error as intended. // Testing with asynchronous deep copy with respect to device { - size_t count = 0 ; - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < hx.dimension_1() ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < hx.dimension_2() ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < hx.dimension_3() ; ++i3 ) { - hx(ip,i1,i2,i3) = ++count ; - }}}} - - - Kokkos::deep_copy(typename hView4::execution_space(), dx , hx ); - Kokkos::deep_copy(typename hView4::execution_space(), dy , dx ); - Kokkos::deep_copy(typename hView4::execution_space(), hy , dy ); - - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - { ASSERT_EQ( hx(ip,i1,i2,i3) , hy(ip,i1,i2,i3) ); } - }}}} - - Kokkos::deep_copy(typename hView4::execution_space(), dx , T(0) ); - Kokkos::deep_copy(typename hView4::execution_space(), hx , dx ); - - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - { ASSERT_EQ( hx(ip,i1,i2,i3) , T(0) ); } - }}}} + size_t count = 0; + + for ( size_t ip = 0; ip < N0; ++ip ) + for ( size_t i1 = 0; i1 < hx.dimension_1(); ++i1 ) + for ( size_t i2 = 0; i2 < hx.dimension_2(); ++i2 ) + for ( size_t i3 = 0; i3 < hx.dimension_3(); ++i3 ) + { + hx( ip, i1, i2, i3 ) = ++count; + } + + Kokkos::deep_copy( typename hView4::execution_space(), dx, hx ); + Kokkos::deep_copy( typename hView4::execution_space(), dy, dx ); + Kokkos::deep_copy( typename hView4::execution_space(), hy, dy ); + + for ( size_t ip = 0; ip < N0; ++ip ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i3 = 0; i3 < N3; ++i3 ) + { + ASSERT_EQ( hx( ip, i1, i2, i3 ), hy( ip, i1, i2, i3 ) ); + } + + Kokkos::deep_copy( typename hView4::execution_space(), dx, T( 0 ) ); + Kokkos::deep_copy( typename hView4::execution_space(), hx, dx ); + + for ( size_t ip = 0; ip < N0; ++ip ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i3 = 0; i3 < N3; ++i3 ) + { + ASSERT_EQ( hx( ip, i1, i2, i3 ), T( 0 ) ); + } } - // Testing with asynchronous deep copy with respect to host + // Testing with asynchronous deep copy with respect to host. { - size_t count = 0 ; - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < hx.dimension_1() ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < hx.dimension_2() ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < hx.dimension_3() ; ++i3 ) { - hx(ip,i1,i2,i3) = ++count ; - }}}} - - Kokkos::deep_copy(typename dView4::execution_space(), dx , hx ); - Kokkos::deep_copy(typename dView4::execution_space(), dy , dx ); - Kokkos::deep_copy(typename dView4::execution_space(), hy , dy ); - - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - { ASSERT_EQ( hx(ip,i1,i2,i3) , hy(ip,i1,i2,i3) ); } - }}}} - - Kokkos::deep_copy(typename dView4::execution_space(), dx , T(0) ); - Kokkos::deep_copy(typename dView4::execution_space(), hx , dx ); - - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - { ASSERT_EQ( hx(ip,i1,i2,i3) , T(0) ); } - }}}} + size_t count = 0; + + for ( size_t ip = 0; ip < N0; ++ip ) + for ( size_t i1 = 0; i1 < hx.dimension_1(); ++i1 ) + for ( size_t i2 = 0; i2 < hx.dimension_2(); ++i2 ) + for ( size_t i3 = 0; i3 < hx.dimension_3(); ++i3 ) + { + hx( ip, i1, i2, i3 ) = ++count; + } + + Kokkos::deep_copy( typename dView4::execution_space(), dx, hx ); + Kokkos::deep_copy( typename dView4::execution_space(), dy, dx ); + Kokkos::deep_copy( typename dView4::execution_space(), hy, dy ); + + for ( size_t ip = 0; ip < N0; ++ip ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i3 = 0; i3 < N3; ++i3 ) + { + ASSERT_EQ( hx( ip, i1, i2, i3 ), hy( ip, i1, i2, i3 ) ); + } + + Kokkos::deep_copy( typename dView4::execution_space(), dx, T( 0 ) ); + Kokkos::deep_copy( typename dView4::execution_space(), hx, dx ); + + for ( size_t ip = 0; ip < N0; ++ip ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i3 = 0; i3 < N3; ++i3 ) + { + ASSERT_EQ( hx( ip, i1, i2, i3 ), T( 0 ) ); + } } - // Testing with synchronous deep copy + // Testing with synchronous deep copy. { - size_t count = 0 ; - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < hx.dimension_1() ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < hx.dimension_2() ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < hx.dimension_3() ; ++i3 ) { - hx(ip,i1,i2,i3) = ++count ; - }}}} - - Kokkos::deep_copy( dx , hx ); - Kokkos::deep_copy( dy , dx ); - Kokkos::deep_copy( hy , dy ); - - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - { ASSERT_EQ( hx(ip,i1,i2,i3) , hy(ip,i1,i2,i3) ); } - }}}} - - Kokkos::deep_copy( dx , T(0) ); - Kokkos::deep_copy( hx , dx ); - - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - { ASSERT_EQ( hx(ip,i1,i2,i3) , T(0) ); } - }}}} + size_t count = 0; + + for ( size_t ip = 0; ip < N0; ++ip ) + for ( size_t i1 = 0; i1 < hx.dimension_1(); ++i1 ) + for ( size_t i2 = 0; i2 < hx.dimension_2(); ++i2 ) + for ( size_t i3 = 0; i3 < hx.dimension_3(); ++i3 ) + { + hx( ip, i1, i2, i3 ) = ++count; + } + + Kokkos::deep_copy( dx, hx ); + Kokkos::deep_copy( dy, dx ); + Kokkos::deep_copy( hy, dy ); + + for ( size_t ip = 0; ip < N0; ++ip ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i3 = 0; i3 < N3; ++i3 ) + { + ASSERT_EQ( hx( ip, i1, i2, i3 ), hy( ip, i1, i2, i3 ) ); + } + + Kokkos::deep_copy( dx, T( 0 ) ); + Kokkos::deep_copy( hx, dx ); + + for ( size_t ip = 0; ip < N0; ++ip ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i3 = 0; i3 < N3; ++i3 ) + { + ASSERT_EQ( hx( ip, i1, i2, i3 ), T( 0 ) ); + } } - dz = dx ; ASSERT_EQ( dx, dz); ASSERT_NE( dy, dz); - dz = dy ; ASSERT_EQ( dy, dz); ASSERT_NE( dx, dz); + + dz = dx; + ASSERT_EQ( dx, dz ); + ASSERT_NE( dy, dz ); + + dz = dy; + ASSERT_EQ( dy, dz ); + ASSERT_NE( dx, dz ); dx = dView4(); ASSERT_TRUE( dx.ptr_on_device() == 0 ); ASSERT_FALSE( dy.ptr_on_device() == 0 ); ASSERT_FALSE( dz.ptr_on_device() == 0 ); + dy = dView4(); ASSERT_TRUE( dx.ptr_on_device() == 0 ); ASSERT_TRUE( dy.ptr_on_device() == 0 ); ASSERT_FALSE( dz.ptr_on_device() == 0 ); + dz = dView4(); ASSERT_TRUE( dx.ptr_on_device() == 0 ); ASSERT_TRUE( dy.ptr_on_device() == 0 ); ASSERT_TRUE( dz.ptr_on_device() == 0 ); } - typedef T DataType[2] ; + typedef T DataType[2]; static void check_auto_conversion_to_const( - const Kokkos::View< const DataType , device > & arg_const , - const Kokkos::View< DataType , device > & arg ) + const Kokkos::View< const DataType, device > & arg_const, + const Kokkos::View< DataType, device > & arg ) { ASSERT_TRUE( arg_const == arg ); } static void run_test_const() { - typedef Kokkos::View< DataType , device > typeX ; - typedef Kokkos::View< const DataType , device > const_typeX ; - typedef Kokkos::View< const DataType , device , Kokkos::MemoryRandomAccess > const_typeR ; + typedef Kokkos::View< DataType, device > typeX; + typedef Kokkos::View< const DataType, device > const_typeX; + typedef Kokkos::View< const DataType, device, Kokkos::MemoryRandomAccess > const_typeR; + typeX x( "X" ); - const_typeX xc = x ; - const_typeR xr = x ; + const_typeX xc = x; + const_typeR xr = x; ASSERT_TRUE( xc == x ); ASSERT_TRUE( x == xc ); @@ -1206,144 +1172,142 @@ public: // an lvalue reference due to retrieving through texture cache // therefore not allowed to query the underlying pointer. #if defined( KOKKOS_ENABLE_CUDA ) - if ( ! std::is_same< typename device::execution_space , Kokkos::Cuda >::value ) + if ( !std::is_same< typename device::execution_space, Kokkos::Cuda >::value ) #endif { ASSERT_TRUE( x.ptr_on_device() == xr.ptr_on_device() ); } - // typeX xf = xc ; // setting non-const from const must not compile + // typeX xf = xc; // Setting non-const from const must not compile. - check_auto_conversion_to_const( x , x ); + check_auto_conversion_to_const( x, x ); } static void run_test_subview() { - typedef Kokkos::View< const T , device > sView ; + typedef Kokkos::View< const T, device > sView; dView0 d0( "d0" ); - dView1 d1( "d1" , N0 ); - dView2 d2( "d2" , N0 ); - dView3 d3( "d3" , N0 ); - dView4 d4( "d4" , N0 ); - - sView s0 = d0 ; - sView s1 = Kokkos::subview( d1 , 1 ); - sView s2 = Kokkos::subview( d2 , 1 , 1 ); - sView s3 = Kokkos::subview( d3 , 1 , 1 , 1 ); - sView s4 = Kokkos::subview( d4 , 1 , 1 , 1 , 1 ); + dView1 d1( "d1", N0 ); + dView2 d2( "d2", N0 ); + dView3 d3( "d3", N0 ); + dView4 d4( "d4", N0 ); + + sView s0 = d0; + sView s1 = Kokkos::subview( d1, 1 ); + sView s2 = Kokkos::subview( d2, 1, 1 ); + sView s3 = Kokkos::subview( d3, 1, 1, 1 ); + sView s4 = Kokkos::subview( d4, 1, 1, 1, 1 ); } static void run_test_subview_strided() { - typedef Kokkos::View< int **** , Kokkos::LayoutLeft , host > view_left_4 ; - typedef Kokkos::View< int **** , Kokkos::LayoutRight , host > view_right_4 ; - typedef Kokkos::View< int ** , Kokkos::LayoutLeft , host > view_left_2 ; - typedef Kokkos::View< int ** , Kokkos::LayoutRight , host > view_right_2 ; - - typedef Kokkos::View< int * , Kokkos::LayoutStride , host > view_stride_1 ; - typedef Kokkos::View< int ** , Kokkos::LayoutStride , host > view_stride_2 ; - - view_left_2 xl2("xl2", 100 , 200 ); - view_right_2 xr2("xr2", 100 , 200 ); - view_stride_1 yl1 = Kokkos::subview( xl2 , 0 , Kokkos::ALL() ); - view_stride_1 yl2 = Kokkos::subview( xl2 , 1 , Kokkos::ALL() ); - view_stride_1 yr1 = Kokkos::subview( xr2 , 0 , Kokkos::ALL() ); - view_stride_1 yr2 = Kokkos::subview( xr2 , 1 , Kokkos::ALL() ); - - ASSERT_EQ( yl1.dimension_0() , xl2.dimension_1() ); - ASSERT_EQ( yl2.dimension_0() , xl2.dimension_1() ); - ASSERT_EQ( yr1.dimension_0() , xr2.dimension_1() ); - ASSERT_EQ( yr2.dimension_0() , xr2.dimension_1() ); - - ASSERT_EQ( & yl1(0) - & xl2(0,0) , 0 ); - ASSERT_EQ( & yl2(0) - & xl2(1,0) , 0 ); - ASSERT_EQ( & yr1(0) - & xr2(0,0) , 0 ); - ASSERT_EQ( & yr2(0) - & xr2(1,0) , 0 ); - - view_left_4 xl4( "xl4" , 10 , 20 , 30 , 40 ); - view_right_4 xr4( "xr4" , 10 , 20 , 30 , 40 ); - - view_stride_2 yl4 = Kokkos::subview( xl4 , 1 , Kokkos::ALL() , 2 , Kokkos::ALL() ); - view_stride_2 yr4 = Kokkos::subview( xr4 , 1 , Kokkos::ALL() , 2 , Kokkos::ALL() ); - - ASSERT_EQ( yl4.dimension_0() , xl4.dimension_1() ); - ASSERT_EQ( yl4.dimension_1() , xl4.dimension_3() ); - ASSERT_EQ( yr4.dimension_0() , xr4.dimension_1() ); - ASSERT_EQ( yr4.dimension_1() , xr4.dimension_3() ); - - ASSERT_EQ( & yl4(4,4) - & xl4(1,4,2,4) , 0 ); - ASSERT_EQ( & yr4(4,4) - & xr4(1,4,2,4) , 0 ); + typedef Kokkos::View< int ****, Kokkos::LayoutLeft , host > view_left_4; + typedef Kokkos::View< int ****, Kokkos::LayoutRight, host > view_right_4; + typedef Kokkos::View< int ** , Kokkos::LayoutLeft , host > view_left_2; + typedef Kokkos::View< int ** , Kokkos::LayoutRight, host > view_right_2; + + typedef Kokkos::View< int * , Kokkos::LayoutStride, host > view_stride_1; + typedef Kokkos::View< int **, Kokkos::LayoutStride, host > view_stride_2; + + view_left_2 xl2( "xl2", 100, 200 ); + view_right_2 xr2( "xr2", 100, 200 ); + view_stride_1 yl1 = Kokkos::subview( xl2, 0, Kokkos::ALL() ); + view_stride_1 yl2 = Kokkos::subview( xl2, 1, Kokkos::ALL() ); + view_stride_1 yr1 = Kokkos::subview( xr2, 0, Kokkos::ALL() ); + view_stride_1 yr2 = Kokkos::subview( xr2, 1, Kokkos::ALL() ); + + ASSERT_EQ( yl1.dimension_0(), xl2.dimension_1() ); + ASSERT_EQ( yl2.dimension_0(), xl2.dimension_1() ); + ASSERT_EQ( yr1.dimension_0(), xr2.dimension_1() ); + ASSERT_EQ( yr2.dimension_0(), xr2.dimension_1() ); + + ASSERT_EQ( & yl1( 0 ) - & xl2( 0, 0 ), 0 ); + ASSERT_EQ( & yl2( 0 ) - & xl2( 1, 0 ), 0 ); + ASSERT_EQ( & yr1( 0 ) - & xr2( 0, 0 ), 0 ); + ASSERT_EQ( & yr2( 0 ) - & xr2( 1, 0 ), 0 ); + + view_left_4 xl4( "xl4", 10, 20, 30, 40 ); + view_right_4 xr4( "xr4", 10, 20, 30, 40 ); + + view_stride_2 yl4 = Kokkos::subview( xl4, 1, Kokkos::ALL(), 2, Kokkos::ALL() ); + view_stride_2 yr4 = Kokkos::subview( xr4, 1, Kokkos::ALL(), 2, Kokkos::ALL() ); + + ASSERT_EQ( yl4.dimension_0(), xl4.dimension_1() ); + ASSERT_EQ( yl4.dimension_1(), xl4.dimension_3() ); + ASSERT_EQ( yr4.dimension_0(), xr4.dimension_1() ); + ASSERT_EQ( yr4.dimension_1(), xr4.dimension_3() ); + + ASSERT_EQ( & yl4( 4, 4 ) - & xl4( 1, 4, 2, 4 ), 0 ); + ASSERT_EQ( & yr4( 4, 4 ) - & xr4( 1, 4, 2, 4 ), 0 ); } static void run_test_vector() { - static const unsigned Length = 1000 , Count = 8 ; + static const unsigned Length = 1000, Count = 8; - typedef Kokkos::View< T* , Kokkos::LayoutLeft , host > vector_type ; - typedef Kokkos::View< T** , Kokkos::LayoutLeft , host > multivector_type ; + typedef Kokkos::View< T*, Kokkos::LayoutLeft, host > vector_type; + typedef Kokkos::View< T**, Kokkos::LayoutLeft, host > multivector_type; - typedef Kokkos::View< T* , Kokkos::LayoutRight , host > vector_right_type ; - typedef Kokkos::View< T** , Kokkos::LayoutRight , host > multivector_right_type ; + typedef Kokkos::View< T*, Kokkos::LayoutRight, host > vector_right_type; + typedef Kokkos::View< T**, Kokkos::LayoutRight, host > multivector_right_type; - typedef Kokkos::View< const T* , Kokkos::LayoutRight, host > const_vector_right_type ; - typedef Kokkos::View< const T* , Kokkos::LayoutLeft , host > const_vector_type ; - typedef Kokkos::View< const T** , Kokkos::LayoutLeft , host > const_multivector_type ; + typedef Kokkos::View< const T*, Kokkos::LayoutRight, host > const_vector_right_type; + typedef Kokkos::View< const T*, Kokkos::LayoutLeft, host > const_vector_type; + typedef Kokkos::View< const T**, Kokkos::LayoutLeft, host > const_multivector_type; - multivector_type mv = multivector_type( "mv" , Length , Count ); - multivector_right_type mv_right = multivector_right_type( "mv" , Length , Count ); + multivector_type mv = multivector_type( "mv", Length, Count ); + multivector_right_type mv_right = multivector_right_type( "mv", Length, Count ); - vector_type v1 = Kokkos::subview( mv , Kokkos::ALL() , 0 ); - vector_type v2 = Kokkos::subview( mv , Kokkos::ALL() , 1 ); - vector_type v3 = Kokkos::subview( mv , Kokkos::ALL() , 2 ); + vector_type v1 = Kokkos::subview( mv, Kokkos::ALL(), 0 ); + vector_type v2 = Kokkos::subview( mv, Kokkos::ALL(), 1 ); + vector_type v3 = Kokkos::subview( mv, Kokkos::ALL(), 2 ); - vector_type rv1 = Kokkos::subview( mv_right , 0 , Kokkos::ALL() ); - vector_type rv2 = Kokkos::subview( mv_right , 1 , Kokkos::ALL() ); - vector_type rv3 = Kokkos::subview( mv_right , 2 , Kokkos::ALL() ); + vector_type rv1 = Kokkos::subview( mv_right, 0, Kokkos::ALL() ); + vector_type rv2 = Kokkos::subview( mv_right, 1, Kokkos::ALL() ); + vector_type rv3 = Kokkos::subview( mv_right, 2, Kokkos::ALL() ); - multivector_type mv1 = Kokkos::subview( mv , std::make_pair( 1 , 998 ) , - std::make_pair( 2 , 5 ) ); + multivector_type mv1 = Kokkos::subview( mv, std::make_pair( 1, 998 ), + std::make_pair( 2, 5 ) ); - multivector_right_type mvr1 = - Kokkos::subview( mv_right , - std::make_pair( 1 , 998 ) , - std::make_pair( 2 , 5 ) ); + multivector_right_type mvr1 = Kokkos::subview( mv_right, std::make_pair( 1, 998 ), + std::make_pair( 2, 5 ) ); - const_vector_type cv1 = Kokkos::subview( mv , Kokkos::ALL(), 0 ); - const_vector_type cv2 = Kokkos::subview( mv , Kokkos::ALL(), 1 ); - const_vector_type cv3 = Kokkos::subview( mv , Kokkos::ALL(), 2 ); + const_vector_type cv1 = Kokkos::subview( mv, Kokkos::ALL(), 0 ); + const_vector_type cv2 = Kokkos::subview( mv, Kokkos::ALL(), 1 ); + const_vector_type cv3 = Kokkos::subview( mv, Kokkos::ALL(), 2 ); - vector_right_type vr1 = Kokkos::subview( mv , Kokkos::ALL() , 0 ); - vector_right_type vr2 = Kokkos::subview( mv , Kokkos::ALL() , 1 ); - vector_right_type vr3 = Kokkos::subview( mv , Kokkos::ALL() , 2 ); + vector_right_type vr1 = Kokkos::subview( mv, Kokkos::ALL(), 0 ); + vector_right_type vr2 = Kokkos::subview( mv, Kokkos::ALL(), 1 ); + vector_right_type vr3 = Kokkos::subview( mv, Kokkos::ALL(), 2 ); - const_vector_right_type cvr1 = Kokkos::subview( mv , Kokkos::ALL() , 0 ); - const_vector_right_type cvr2 = Kokkos::subview( mv , Kokkos::ALL() , 1 ); - const_vector_right_type cvr3 = Kokkos::subview( mv , Kokkos::ALL() , 2 ); + const_vector_right_type cvr1 = Kokkos::subview( mv, Kokkos::ALL(), 0 ); + const_vector_right_type cvr2 = Kokkos::subview( mv, Kokkos::ALL(), 1 ); + const_vector_right_type cvr3 = Kokkos::subview( mv, Kokkos::ALL(), 2 ); - ASSERT_TRUE( & v1[0] == & v1(0) ); - ASSERT_TRUE( & v1[0] == & mv(0,0) ); - ASSERT_TRUE( & v2[0] == & mv(0,1) ); - ASSERT_TRUE( & v3[0] == & mv(0,2) ); + ASSERT_TRUE( & v1[0] == & v1( 0 ) ); + ASSERT_TRUE( & v1[0] == & mv( 0, 0 ) ); + ASSERT_TRUE( & v2[0] == & mv( 0, 1 ) ); + ASSERT_TRUE( & v3[0] == & mv( 0, 2 ) ); - ASSERT_TRUE( & cv1[0] == & mv(0,0) ); - ASSERT_TRUE( & cv2[0] == & mv(0,1) ); - ASSERT_TRUE( & cv3[0] == & mv(0,2) ); + ASSERT_TRUE( & cv1[0] == & mv( 0, 0 ) ); + ASSERT_TRUE( & cv2[0] == & mv( 0, 1 ) ); + ASSERT_TRUE( & cv3[0] == & mv( 0, 2 ) ); - ASSERT_TRUE( & vr1[0] == & mv(0,0) ); - ASSERT_TRUE( & vr2[0] == & mv(0,1) ); - ASSERT_TRUE( & vr3[0] == & mv(0,2) ); + ASSERT_TRUE( & vr1[0] == & mv( 0, 0 ) ); + ASSERT_TRUE( & vr2[0] == & mv( 0, 1 ) ); + ASSERT_TRUE( & vr3[0] == & mv( 0, 2 ) ); - ASSERT_TRUE( & cvr1[0] == & mv(0,0) ); - ASSERT_TRUE( & cvr2[0] == & mv(0,1) ); - ASSERT_TRUE( & cvr3[0] == & mv(0,2) ); + ASSERT_TRUE( & cvr1[0] == & mv( 0, 0 ) ); + ASSERT_TRUE( & cvr2[0] == & mv( 0, 1 ) ); + ASSERT_TRUE( & cvr3[0] == & mv( 0, 2 ) ); - ASSERT_TRUE( & mv1(0,0) == & mv( 1 , 2 ) ); - ASSERT_TRUE( & mv1(1,1) == & mv( 2 , 3 ) ); - ASSERT_TRUE( & mv1(3,2) == & mv( 4 , 4 ) ); - ASSERT_TRUE( & mvr1(0,0) == & mv_right( 1 , 2 ) ); - ASSERT_TRUE( & mvr1(1,1) == & mv_right( 2 , 3 ) ); - ASSERT_TRUE( & mvr1(3,2) == & mv_right( 4 , 4 ) ); + ASSERT_TRUE( & mv1( 0, 0 ) == & mv( 1, 2 ) ); + ASSERT_TRUE( & mv1( 1, 1 ) == & mv( 2, 3 ) ); + ASSERT_TRUE( & mv1( 3, 2 ) == & mv( 4, 4 ) ); + ASSERT_TRUE( & mvr1( 0, 0 ) == & mv_right( 1, 2 ) ); + ASSERT_TRUE( & mvr1( 1, 1 ) == & mv_right( 2, 3 ) ); + ASSERT_TRUE( & mvr1( 3, 2 ) == & mv_right( 4, 4 ) ); const_vector_type c_cv1( v1 ); typename vector_type::const_type c_cv2( v2 ); @@ -1356,6 +1320,3 @@ public: }; } // namespace Test - -/*--------------------------------------------------------------------------*/ - diff --git a/lib/kokkos/core/unit_test/TestViewMapping.hpp b/lib/kokkos/core/unit_test/TestViewMapping.hpp index 324f02e947..71604bed51 100644 --- a/lib/kokkos/core/unit_test/TestViewMapping.hpp +++ b/lib/kokkos/core/unit_test/TestViewMapping.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -49,1126 +49,1140 @@ #include -/*--------------------------------------------------------------------------*/ - namespace Test { template< class Space > void test_view_mapping() { - typedef typename Space::execution_space ExecSpace ; - - typedef Kokkos::Experimental::Impl::ViewDimension<> dim_0 ; - typedef Kokkos::Experimental::Impl::ViewDimension<2> dim_s2 ; - typedef Kokkos::Experimental::Impl::ViewDimension<2,3> dim_s2_s3 ; - typedef Kokkos::Experimental::Impl::ViewDimension<2,3,4> dim_s2_s3_s4 ; - - typedef Kokkos::Experimental::Impl::ViewDimension<0> dim_s0 ; - typedef Kokkos::Experimental::Impl::ViewDimension<0,3> dim_s0_s3 ; - typedef Kokkos::Experimental::Impl::ViewDimension<0,3,4> dim_s0_s3_s4 ; - - typedef Kokkos::Experimental::Impl::ViewDimension<0,0> dim_s0_s0 ; - typedef Kokkos::Experimental::Impl::ViewDimension<0,0,4> dim_s0_s0_s4 ; - - typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0> dim_s0_s0_s0 ; - typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0,0> dim_s0_s0_s0_s0 ; - typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0,0,0> dim_s0_s0_s0_s0_s0 ; - typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0,0,0,0> dim_s0_s0_s0_s0_s0_s0 ; - typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0,0,0,0,0> dim_s0_s0_s0_s0_s0_s0_s0 ; - typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0,0,0,0,0,0> dim_s0_s0_s0_s0_s0_s0_s0_s0 ; - - // Fully static dimensions should not be larger than an int - ASSERT_LE( sizeof(dim_0) , sizeof(int) ); - ASSERT_LE( sizeof(dim_s2) , sizeof(int) ); - ASSERT_LE( sizeof(dim_s2_s3) , sizeof(int) ); - ASSERT_LE( sizeof(dim_s2_s3_s4) , sizeof(int) ); - - // Rank 1 is size_t - ASSERT_EQ( sizeof(dim_s0) , sizeof(size_t) ); - ASSERT_EQ( sizeof(dim_s0_s3) , sizeof(size_t) ); - ASSERT_EQ( sizeof(dim_s0_s3_s4) , sizeof(size_t) ); - - // Allow for padding - ASSERT_LE( sizeof(dim_s0_s0) , 2 * sizeof(size_t) ); - ASSERT_LE( sizeof(dim_s0_s0_s4) , 2 * sizeof(size_t) ); - - ASSERT_LE( sizeof(dim_s0_s0_s0) , 4 * sizeof(size_t) ); - ASSERT_EQ( sizeof(dim_s0_s0_s0_s0) , 4 * sizeof(unsigned) ); - ASSERT_LE( sizeof(dim_s0_s0_s0_s0_s0) , 6 * sizeof(unsigned) ); - ASSERT_EQ( sizeof(dim_s0_s0_s0_s0_s0_s0) , 6 * sizeof(unsigned) ); - ASSERT_LE( sizeof(dim_s0_s0_s0_s0_s0_s0_s0) , 8 * sizeof(unsigned) ); - ASSERT_EQ( sizeof(dim_s0_s0_s0_s0_s0_s0_s0_s0) , 8 * sizeof(unsigned) ); - - static_assert( int(dim_0::rank) == int(0) , "" ); - static_assert( int(dim_0::rank_dynamic) == int(0) , "" ); - static_assert( int(dim_0::ArgN0) == 1 , "" ); - static_assert( int(dim_0::ArgN1) == 1 , "" ); - static_assert( int(dim_0::ArgN2) == 1 , "" ); - - static_assert( int(dim_s2::rank) == int(1) , "" ); - static_assert( int(dim_s2::rank_dynamic) == int(0) , "" ); - static_assert( int(dim_s2::ArgN0) == 2 , "" ); - static_assert( int(dim_s2::ArgN1) == 1 , "" ); - - static_assert( int(dim_s2_s3::rank) == int(2) , "" ); - static_assert( int(dim_s2_s3::rank_dynamic) == int(0) , "" ); - static_assert( int(dim_s2_s3::ArgN0) == 2 , "" ); - static_assert( int(dim_s2_s3::ArgN1) == 3 , "" ); - static_assert( int(dim_s2_s3::ArgN2) == 1 , "" ); - - static_assert( int(dim_s2_s3_s4::rank) == int(3) , "" ); - static_assert( int(dim_s2_s3_s4::rank_dynamic) == int(0) , "" ); - static_assert( int(dim_s2_s3_s4::ArgN0) == 2 , "" ); - static_assert( int(dim_s2_s3_s4::ArgN1) == 3 , "" ); - static_assert( int(dim_s2_s3_s4::ArgN2) == 4 , "" ); - static_assert( int(dim_s2_s3_s4::ArgN3) == 1 , "" ); - - static_assert( int(dim_s0::rank) == int(1) , "" ); - static_assert( int(dim_s0::rank_dynamic) == int(1) , "" ); - - static_assert( int(dim_s0_s3::rank) == int(2) , "" ); - static_assert( int(dim_s0_s3::rank_dynamic) == int(1) , "" ); - static_assert( int(dim_s0_s3::ArgN0) == 0 , "" ); - static_assert( int(dim_s0_s3::ArgN1) == 3 , "" ); - - static_assert( int(dim_s0_s3_s4::rank) == int(3) , "" ); - static_assert( int(dim_s0_s3_s4::rank_dynamic) == int(1) , "" ); - static_assert( int(dim_s0_s3_s4::ArgN0) == 0 , "" ); - static_assert( int(dim_s0_s3_s4::ArgN1) == 3 , "" ); - static_assert( int(dim_s0_s3_s4::ArgN2) == 4 , "" ); - - static_assert( int(dim_s0_s0_s4::rank) == int(3) , "" ); - static_assert( int(dim_s0_s0_s4::rank_dynamic) == int(2) , "" ); - static_assert( int(dim_s0_s0_s4::ArgN0) == 0 , "" ); - static_assert( int(dim_s0_s0_s4::ArgN1) == 0 , "" ); - static_assert( int(dim_s0_s0_s4::ArgN2) == 4 , "" ); - - static_assert( int(dim_s0_s0_s0::rank) == int(3) , "" ); - static_assert( int(dim_s0_s0_s0::rank_dynamic) == int(3) , "" ); - - static_assert( int(dim_s0_s0_s0_s0::rank) == int(4) , "" ); - static_assert( int(dim_s0_s0_s0_s0::rank_dynamic) == int(4) , "" ); - - static_assert( int(dim_s0_s0_s0_s0_s0::rank) == int(5) , "" ); - static_assert( int(dim_s0_s0_s0_s0_s0::rank_dynamic) == int(5) , "" ); - - static_assert( int(dim_s0_s0_s0_s0_s0_s0::rank) == int(6) , "" ); - static_assert( int(dim_s0_s0_s0_s0_s0_s0::rank_dynamic) == int(6) , "" ); - - static_assert( int(dim_s0_s0_s0_s0_s0_s0_s0::rank) == int(7) , "" ); - static_assert( int(dim_s0_s0_s0_s0_s0_s0_s0::rank_dynamic) == int(7) , "" ); - - static_assert( int(dim_s0_s0_s0_s0_s0_s0_s0_s0::rank) == int(8) , "" ); - static_assert( int(dim_s0_s0_s0_s0_s0_s0_s0_s0::rank_dynamic) == int(8) , "" ); - - dim_s0 d1( 2, 3, 4, 5, 6, 7, 8, 9 ); + typedef typename Space::execution_space ExecSpace; + + typedef Kokkos::Experimental::Impl::ViewDimension<> dim_0; + typedef Kokkos::Experimental::Impl::ViewDimension< 2 > dim_s2; + typedef Kokkos::Experimental::Impl::ViewDimension< 2, 3 > dim_s2_s3; + typedef Kokkos::Experimental::Impl::ViewDimension< 2, 3, 4 > dim_s2_s3_s4; + + typedef Kokkos::Experimental::Impl::ViewDimension< 0 > dim_s0; + typedef Kokkos::Experimental::Impl::ViewDimension< 0, 3 > dim_s0_s3; + typedef Kokkos::Experimental::Impl::ViewDimension< 0, 3, 4 > dim_s0_s3_s4; + + typedef Kokkos::Experimental::Impl::ViewDimension< 0, 0 > dim_s0_s0; + typedef Kokkos::Experimental::Impl::ViewDimension< 0, 0, 4 > dim_s0_s0_s4; + + typedef Kokkos::Experimental::Impl::ViewDimension< 0, 0, 0 > dim_s0_s0_s0; + typedef Kokkos::Experimental::Impl::ViewDimension< 0, 0, 0, 0 > dim_s0_s0_s0_s0; + typedef Kokkos::Experimental::Impl::ViewDimension< 0, 0, 0, 0, 0 > dim_s0_s0_s0_s0_s0; + typedef Kokkos::Experimental::Impl::ViewDimension< 0, 0, 0, 0, 0, 0 > dim_s0_s0_s0_s0_s0_s0; + typedef Kokkos::Experimental::Impl::ViewDimension< 0, 0, 0, 0, 0, 0, 0 > dim_s0_s0_s0_s0_s0_s0_s0; + typedef Kokkos::Experimental::Impl::ViewDimension< 0, 0, 0, 0, 0, 0, 0, 0 > dim_s0_s0_s0_s0_s0_s0_s0_s0; + + // Fully static dimensions should not be larger than an int. + ASSERT_LE( sizeof( dim_0 ), sizeof( int ) ); + ASSERT_LE( sizeof( dim_s2 ), sizeof( int ) ); + ASSERT_LE( sizeof( dim_s2_s3 ), sizeof( int ) ); + ASSERT_LE( sizeof( dim_s2_s3_s4 ), sizeof( int ) ); + + // Rank 1 is size_t. + ASSERT_EQ( sizeof( dim_s0 ), sizeof( size_t ) ); + ASSERT_EQ( sizeof( dim_s0_s3 ), sizeof( size_t ) ); + ASSERT_EQ( sizeof( dim_s0_s3_s4 ), sizeof( size_t ) ); + + // Allow for padding. + ASSERT_LE( sizeof( dim_s0_s0 ), 2 * sizeof( size_t ) ); + ASSERT_LE( sizeof( dim_s0_s0_s4 ), 2 * sizeof( size_t ) ); + + ASSERT_LE( sizeof( dim_s0_s0_s0 ), 4 * sizeof( size_t ) ); + ASSERT_EQ( sizeof( dim_s0_s0_s0_s0 ), 4 * sizeof( unsigned ) ); + ASSERT_LE( sizeof( dim_s0_s0_s0_s0_s0 ), 6 * sizeof( unsigned ) ); + ASSERT_EQ( sizeof( dim_s0_s0_s0_s0_s0_s0 ), 6 * sizeof( unsigned ) ); + ASSERT_LE( sizeof( dim_s0_s0_s0_s0_s0_s0_s0 ), 8 * sizeof( unsigned ) ); + ASSERT_EQ( sizeof( dim_s0_s0_s0_s0_s0_s0_s0_s0 ), 8 * sizeof( unsigned ) ); + + static_assert( int( dim_0::rank ) == int( 0 ), "" ); + static_assert( int( dim_0::rank_dynamic ) == int( 0 ), "" ); + static_assert( int( dim_0::ArgN0 ) == 1, "" ); + static_assert( int( dim_0::ArgN1 ) == 1, "" ); + static_assert( int( dim_0::ArgN2 ) == 1, "" ); + + static_assert( int( dim_s2::rank ) == int( 1 ), "" ); + static_assert( int( dim_s2::rank_dynamic ) == int( 0 ), "" ); + static_assert( int( dim_s2::ArgN0 ) == 2, "" ); + static_assert( int( dim_s2::ArgN1 ) == 1, "" ); + + static_assert( int( dim_s2_s3::rank ) == int( 2 ), "" ); + static_assert( int( dim_s2_s3::rank_dynamic ) == int( 0 ), "" ); + static_assert( int( dim_s2_s3::ArgN0 ) == 2, "" ); + static_assert( int( dim_s2_s3::ArgN1 ) == 3, "" ); + static_assert( int( dim_s2_s3::ArgN2 ) == 1, "" ); + + static_assert( int( dim_s2_s3_s4::rank ) == int( 3 ), "" ); + static_assert( int( dim_s2_s3_s4::rank_dynamic ) == int( 0 ), "" ); + static_assert( int( dim_s2_s3_s4::ArgN0 ) == 2, "" ); + static_assert( int( dim_s2_s3_s4::ArgN1 ) == 3, "" ); + static_assert( int( dim_s2_s3_s4::ArgN2 ) == 4, "" ); + static_assert( int( dim_s2_s3_s4::ArgN3 ) == 1, "" ); + + static_assert( int( dim_s0::rank ) == int( 1 ), "" ); + static_assert( int( dim_s0::rank_dynamic ) == int( 1 ), "" ); + + static_assert( int( dim_s0_s3::rank ) == int( 2 ), "" ); + static_assert( int( dim_s0_s3::rank_dynamic ) == int( 1 ), "" ); + static_assert( int( dim_s0_s3::ArgN0 ) == 0, "" ); + static_assert( int( dim_s0_s3::ArgN1 ) == 3, "" ); + + static_assert( int( dim_s0_s3_s4::rank ) == int( 3 ), "" ); + static_assert( int( dim_s0_s3_s4::rank_dynamic ) == int( 1 ), "" ); + static_assert( int( dim_s0_s3_s4::ArgN0 ) == 0, "" ); + static_assert( int( dim_s0_s3_s4::ArgN1 ) == 3, "" ); + static_assert( int( dim_s0_s3_s4::ArgN2 ) == 4, "" ); + + static_assert( int( dim_s0_s0_s4::rank ) == int( 3 ), "" ); + static_assert( int( dim_s0_s0_s4::rank_dynamic ) == int( 2 ), "" ); + static_assert( int( dim_s0_s0_s4::ArgN0 ) == 0, "" ); + static_assert( int( dim_s0_s0_s4::ArgN1 ) == 0, "" ); + static_assert( int( dim_s0_s0_s4::ArgN2 ) == 4, "" ); + + static_assert( int( dim_s0_s0_s0::rank ) == int( 3 ), "" ); + static_assert( int( dim_s0_s0_s0::rank_dynamic ) == int( 3 ), "" ); + + static_assert( int( dim_s0_s0_s0_s0::rank ) == int( 4 ), "" ); + static_assert( int( dim_s0_s0_s0_s0::rank_dynamic ) == int( 4 ), "" ); + + static_assert( int( dim_s0_s0_s0_s0_s0::rank ) == int( 5 ), "" ); + static_assert( int( dim_s0_s0_s0_s0_s0::rank_dynamic ) == int( 5 ), "" ); + + static_assert( int( dim_s0_s0_s0_s0_s0_s0::rank ) == int( 6 ), "" ); + static_assert( int( dim_s0_s0_s0_s0_s0_s0::rank_dynamic ) == int( 6 ), "" ); + + static_assert( int( dim_s0_s0_s0_s0_s0_s0_s0::rank ) == int( 7 ), "" ); + static_assert( int( dim_s0_s0_s0_s0_s0_s0_s0::rank_dynamic ) == int( 7 ), "" ); + + static_assert( int( dim_s0_s0_s0_s0_s0_s0_s0_s0::rank ) == int( 8 ), "" ); + static_assert( int( dim_s0_s0_s0_s0_s0_s0_s0_s0::rank_dynamic ) == int( 8 ), "" ); + + dim_s0 d1( 2, 3, 4, 5, 6, 7, 8, 9 ); dim_s0_s0 d2( 2, 3, 4, 5, 6, 7, 8, 9 ); dim_s0_s0_s0 d3( 2, 3, 4, 5, 6, 7, 8, 9 ); dim_s0_s0_s0_s0 d4( 2, 3, 4, 5, 6, 7, 8, 9 ); - ASSERT_EQ( d1.N0 , 2 ); - ASSERT_EQ( d2.N0 , 2 ); - ASSERT_EQ( d3.N0 , 2 ); - ASSERT_EQ( d4.N0 , 2 ); + ASSERT_EQ( d1.N0, 2 ); + ASSERT_EQ( d2.N0, 2 ); + ASSERT_EQ( d3.N0, 2 ); + ASSERT_EQ( d4.N0, 2 ); - ASSERT_EQ( d1.N1 , 1 ); - ASSERT_EQ( d2.N1 , 3 ); - ASSERT_EQ( d3.N1 , 3 ); - ASSERT_EQ( d4.N1 , 3 ); + ASSERT_EQ( d1.N1, 1 ); + ASSERT_EQ( d2.N1, 3 ); + ASSERT_EQ( d3.N1, 3 ); + ASSERT_EQ( d4.N1, 3 ); - ASSERT_EQ( d1.N2 , 1 ); - ASSERT_EQ( d2.N2 , 1 ); - ASSERT_EQ( d3.N2 , 4 ); - ASSERT_EQ( d4.N2 , 4 ); + ASSERT_EQ( d1.N2, 1 ); + ASSERT_EQ( d2.N2, 1 ); + ASSERT_EQ( d3.N2, 4 ); + ASSERT_EQ( d4.N2, 4 ); - ASSERT_EQ( d1.N3 , 1 ); - ASSERT_EQ( d2.N3 , 1 ); - ASSERT_EQ( d3.N3 , 1 ); - ASSERT_EQ( d4.N3 , 5 ); + ASSERT_EQ( d1.N3, 1 ); + ASSERT_EQ( d2.N3, 1 ); + ASSERT_EQ( d3.N3, 1 ); + ASSERT_EQ( d4.N3, 5 ); //---------------------------------------- - typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s0 , Kokkos::LayoutStride > stride_s0_s0_s0 ; + typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s0, Kokkos::LayoutStride > stride_s0_s0_s0; //---------------------------------------- - // Static dimension + // Static dimension. { - typedef Kokkos::Experimental::Impl::ViewOffset< dim_s2_s3_s4 , Kokkos::LayoutLeft > left_s2_s3_s4 ; + typedef Kokkos::Experimental::Impl::ViewOffset< dim_s2_s3_s4, Kokkos::LayoutLeft > left_s2_s3_s4; - ASSERT_EQ( sizeof(left_s2_s3_s4) , sizeof(dim_s2_s3_s4) ); + ASSERT_EQ( sizeof( left_s2_s3_s4 ), sizeof( dim_s2_s3_s4 ) ); - left_s2_s3_s4 off3 ; + left_s2_s3_s4 off3; - stride_s0_s0_s0 stride3( off3 ); + stride_s0_s0_s0 stride3( off3 ); - ASSERT_EQ( off3.stride_0() , 1 ); - ASSERT_EQ( off3.stride_1() , 2 ); - ASSERT_EQ( off3.stride_2() , 6 ); - ASSERT_EQ( off3.span() , 24 ); + ASSERT_EQ( off3.stride_0(), 1 ); + ASSERT_EQ( off3.stride_1(), 2 ); + ASSERT_EQ( off3.stride_2(), 6 ); + ASSERT_EQ( off3.span(), 24 ); - ASSERT_EQ( off3.stride_0() , stride3.stride_0() ); - ASSERT_EQ( off3.stride_1() , stride3.stride_1() ); - ASSERT_EQ( off3.stride_2() , stride3.stride_2() ); - ASSERT_EQ( off3.span() , stride3.span() ); + ASSERT_EQ( off3.stride_0(), stride3.stride_0() ); + ASSERT_EQ( off3.stride_1(), stride3.stride_1() ); + ASSERT_EQ( off3.stride_2(), stride3.stride_2() ); + ASSERT_EQ( off3.span(), stride3.span() ); - int offset = 0 ; + int offset = 0; - for ( int k = 0 ; k < 4 ; ++k ){ - for ( int j = 0 ; j < 3 ; ++j ){ - for ( int i = 0 ; i < 2 ; ++i , ++offset ){ - ASSERT_EQ( off3(i,j,k) , offset ); - ASSERT_EQ( stride3(i,j,k) , off3(i,j,k) ); - }}} + for ( int k = 0; k < 4; ++k ) + for ( int j = 0; j < 3; ++j ) + for ( int i = 0; i < 2; ++i, ++offset ) + { + ASSERT_EQ( off3( i, j, k ), offset ); + ASSERT_EQ( stride3( i, j, k ), off3( i, j, k ) ); + } } //---------------------------------------- - // Small dimension is unpadded + // Small dimension is unpadded. { - typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutLeft > left_s0_s0_s4 ; + typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4, Kokkos::LayoutLeft > left_s0_s0_s4; - left_s0_s0_s4 dyn_off3( std::integral_constant() + left_s0_s0_s4 dyn_off3( std::integral_constant< unsigned, sizeof( int ) >() , Kokkos::LayoutLeft( 2, 3, 0, 0, 0, 0, 0, 0 ) ); stride_s0_s0_s0 stride3( dyn_off3 ); - ASSERT_EQ( dyn_off3.m_dim.rank , 3 ); - ASSERT_EQ( dyn_off3.m_dim.N0 , 2 ); - ASSERT_EQ( dyn_off3.m_dim.N1 , 3 ); - ASSERT_EQ( dyn_off3.m_dim.N2 , 4 ); - ASSERT_EQ( dyn_off3.m_dim.N3 , 1 ); - ASSERT_EQ( dyn_off3.size() , 2 * 3 * 4 ); + ASSERT_EQ( dyn_off3.m_dim.rank, 3 ); + ASSERT_EQ( dyn_off3.m_dim.N0, 2 ); + ASSERT_EQ( dyn_off3.m_dim.N1, 3 ); + ASSERT_EQ( dyn_off3.m_dim.N2, 4 ); + ASSERT_EQ( dyn_off3.m_dim.N3, 1 ); + ASSERT_EQ( dyn_off3.size(), 2 * 3 * 4 ); const Kokkos::LayoutLeft layout = dyn_off3.layout(); - ASSERT_EQ( layout.dimension[0] , 2 ); - ASSERT_EQ( layout.dimension[1] , 3 ); - ASSERT_EQ( layout.dimension[2] , 4 ); - ASSERT_EQ( layout.dimension[3] , 1 ); - ASSERT_EQ( layout.dimension[4] , 1 ); - ASSERT_EQ( layout.dimension[5] , 1 ); - ASSERT_EQ( layout.dimension[6] , 1 ); - ASSERT_EQ( layout.dimension[7] , 1 ); - - ASSERT_EQ( stride3.m_dim.rank , 3 ); - ASSERT_EQ( stride3.m_dim.N0 , 2 ); - ASSERT_EQ( stride3.m_dim.N1 , 3 ); - ASSERT_EQ( stride3.m_dim.N2 , 4 ); - ASSERT_EQ( stride3.m_dim.N3 , 1 ); - ASSERT_EQ( stride3.size() , 2 * 3 * 4 ); - - int offset = 0 ; - - for ( int k = 0 ; k < 4 ; ++k ){ - for ( int j = 0 ; j < 3 ; ++j ){ - for ( int i = 0 ; i < 2 ; ++i , ++offset ){ - ASSERT_EQ( offset , dyn_off3(i,j,k) ); - ASSERT_EQ( stride3(i,j,k) , dyn_off3(i,j,k) ); - }}} - - ASSERT_EQ( dyn_off3.span() , offset ); - ASSERT_EQ( stride3.span() , dyn_off3.span() ); + ASSERT_EQ( layout.dimension[0], 2 ); + ASSERT_EQ( layout.dimension[1], 3 ); + ASSERT_EQ( layout.dimension[2], 4 ); + ASSERT_EQ( layout.dimension[3], 1 ); + ASSERT_EQ( layout.dimension[4], 1 ); + ASSERT_EQ( layout.dimension[5], 1 ); + ASSERT_EQ( layout.dimension[6], 1 ); + ASSERT_EQ( layout.dimension[7], 1 ); + + ASSERT_EQ( stride3.m_dim.rank, 3 ); + ASSERT_EQ( stride3.m_dim.N0, 2 ); + ASSERT_EQ( stride3.m_dim.N1, 3 ); + ASSERT_EQ( stride3.m_dim.N2, 4 ); + ASSERT_EQ( stride3.m_dim.N3, 1 ); + ASSERT_EQ( stride3.size(), 2 * 3 * 4 ); + + int offset = 0; + + for ( int k = 0; k < 4; ++k ) + for ( int j = 0; j < 3; ++j ) + for ( int i = 0; i < 2; ++i, ++offset ) + { + ASSERT_EQ( offset, dyn_off3( i, j, k ) ); + ASSERT_EQ( stride3( i, j, k ), dyn_off3( i, j, k ) ); + } + + ASSERT_EQ( dyn_off3.span(), offset ); + ASSERT_EQ( stride3.span(), dyn_off3.span() ); } - // Large dimension is likely padded + //---------------------------------------- + // Large dimension is likely padded. { - constexpr int N0 = 2000 ; - constexpr int N1 = 300 ; + constexpr int N0 = 2000; + constexpr int N1 = 300; - typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutLeft > left_s0_s0_s4 ; + typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4, Kokkos::LayoutLeft > left_s0_s0_s4; - left_s0_s0_s4 dyn_off3( std::integral_constant() + left_s0_s0_s4 dyn_off3( std::integral_constant< unsigned, sizeof( int ) >() , Kokkos::LayoutLeft( N0, N1, 0, 0, 0, 0, 0, 0 ) ); stride_s0_s0_s0 stride3( dyn_off3 ); - ASSERT_EQ( dyn_off3.m_dim.rank , 3 ); - ASSERT_EQ( dyn_off3.m_dim.N0 , N0 ); - ASSERT_EQ( dyn_off3.m_dim.N1 , N1 ); - ASSERT_EQ( dyn_off3.m_dim.N2 , 4 ); - ASSERT_EQ( dyn_off3.m_dim.N3 , 1 ); - ASSERT_EQ( dyn_off3.size() , N0 * N1 * 4 ); - - ASSERT_EQ( stride3.m_dim.rank , 3 ); - ASSERT_EQ( stride3.m_dim.N0 , N0 ); - ASSERT_EQ( stride3.m_dim.N1 , N1 ); - ASSERT_EQ( stride3.m_dim.N2 , 4 ); - ASSERT_EQ( stride3.m_dim.N3 , 1 ); - ASSERT_EQ( stride3.size() , N0 * N1 * 4 ); - ASSERT_EQ( stride3.span() , dyn_off3.span() ); - - int offset = 0 ; - - for ( int k = 0 ; k < 4 ; ++k ){ - for ( int j = 0 ; j < N1 ; ++j ){ - for ( int i = 0 ; i < N0 ; ++i ){ - ASSERT_LE( offset , dyn_off3(i,j,k) ); - ASSERT_EQ( stride3(i,j,k) , dyn_off3(i,j,k) ); - offset = dyn_off3(i,j,k) + 1 ; - }}} - - ASSERT_LE( offset , dyn_off3.span() ); + ASSERT_EQ( dyn_off3.m_dim.rank, 3 ); + ASSERT_EQ( dyn_off3.m_dim.N0, N0 ); + ASSERT_EQ( dyn_off3.m_dim.N1, N1 ); + ASSERT_EQ( dyn_off3.m_dim.N2, 4 ); + ASSERT_EQ( dyn_off3.m_dim.N3, 1 ); + ASSERT_EQ( dyn_off3.size(), N0 * N1 * 4 ); + + ASSERT_EQ( stride3.m_dim.rank, 3 ); + ASSERT_EQ( stride3.m_dim.N0, N0 ); + ASSERT_EQ( stride3.m_dim.N1, N1 ); + ASSERT_EQ( stride3.m_dim.N2, 4 ); + ASSERT_EQ( stride3.m_dim.N3, 1 ); + ASSERT_EQ( stride3.size(), N0 * N1 * 4 ); + ASSERT_EQ( stride3.span(), dyn_off3.span() ); + + int offset = 0; + + for ( int k = 0; k < 4; ++k ) + for ( int j = 0; j < N1; ++j ) + for ( int i = 0; i < N0; ++i ) + { + ASSERT_LE( offset, dyn_off3( i, j, k ) ); + ASSERT_EQ( stride3( i, j, k ), dyn_off3( i, j, k ) ); + offset = dyn_off3( i, j, k ) + 1; + } + + ASSERT_LE( offset, dyn_off3.span() ); } //---------------------------------------- - // Static dimension + // Static dimension. { - typedef Kokkos::Experimental::Impl::ViewOffset< dim_s2_s3_s4 , Kokkos::LayoutRight > right_s2_s3_s4 ; + typedef Kokkos::Experimental::Impl::ViewOffset< dim_s2_s3_s4, Kokkos::LayoutRight > right_s2_s3_s4; - ASSERT_EQ( sizeof(right_s2_s3_s4) , sizeof(dim_s2_s3_s4) ); + ASSERT_EQ( sizeof( right_s2_s3_s4 ), sizeof( dim_s2_s3_s4 ) ); - right_s2_s3_s4 off3 ; + right_s2_s3_s4 off3; stride_s0_s0_s0 stride3( off3 ); - ASSERT_EQ( off3.stride_0() , 12 ); - ASSERT_EQ( off3.stride_1() , 4 ); - ASSERT_EQ( off3.stride_2() , 1 ); + ASSERT_EQ( off3.stride_0(), 12 ); + ASSERT_EQ( off3.stride_1(), 4 ); + ASSERT_EQ( off3.stride_2(), 1 ); - ASSERT_EQ( off3.dimension_0() , stride3.dimension_0() ); - ASSERT_EQ( off3.dimension_1() , stride3.dimension_1() ); - ASSERT_EQ( off3.dimension_2() , stride3.dimension_2() ); - ASSERT_EQ( off3.stride_0() , stride3.stride_0() ); - ASSERT_EQ( off3.stride_1() , stride3.stride_1() ); - ASSERT_EQ( off3.stride_2() , stride3.stride_2() ); - ASSERT_EQ( off3.span() , stride3.span() ); + ASSERT_EQ( off3.dimension_0(), stride3.dimension_0() ); + ASSERT_EQ( off3.dimension_1(), stride3.dimension_1() ); + ASSERT_EQ( off3.dimension_2(), stride3.dimension_2() ); + ASSERT_EQ( off3.stride_0(), stride3.stride_0() ); + ASSERT_EQ( off3.stride_1(), stride3.stride_1() ); + ASSERT_EQ( off3.stride_2(), stride3.stride_2() ); + ASSERT_EQ( off3.span(), stride3.span() ); - int offset = 0 ; + int offset = 0; - for ( int i = 0 ; i < 2 ; ++i ){ - for ( int j = 0 ; j < 3 ; ++j ){ - for ( int k = 0 ; k < 4 ; ++k , ++offset ){ - ASSERT_EQ( off3(i,j,k) , offset ); - ASSERT_EQ( off3(i,j,k) , stride3(i,j,k) ); - }}} + for ( int i = 0; i < 2; ++i ) + for ( int j = 0; j < 3; ++j ) + for ( int k = 0; k < 4; ++k, ++offset ) + { + ASSERT_EQ( off3( i, j, k ), offset ); + ASSERT_EQ( off3( i, j, k ), stride3( i, j, k ) ); + } - ASSERT_EQ( off3.span() , offset ); + ASSERT_EQ( off3.span(), offset ); } //---------------------------------------- - // Small dimension is unpadded + // Small dimension is unpadded. { - typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutRight > right_s0_s0_s4 ; + typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4, Kokkos::LayoutRight > right_s0_s0_s4; - right_s0_s0_s4 dyn_off3( std::integral_constant() + right_s0_s0_s4 dyn_off3( std::integral_constant< unsigned, sizeof( int ) >() , Kokkos::LayoutRight( 2, 3, 0, 0, 0, 0, 0, 0 ) ); stride_s0_s0_s0 stride3( dyn_off3 ); - ASSERT_EQ( dyn_off3.m_dim.rank , 3 ); - ASSERT_EQ( dyn_off3.m_dim.N0 , 2 ); - ASSERT_EQ( dyn_off3.m_dim.N1 , 3 ); - ASSERT_EQ( dyn_off3.m_dim.N2 , 4 ); - ASSERT_EQ( dyn_off3.m_dim.N3 , 1 ); - ASSERT_EQ( dyn_off3.size() , 2 * 3 * 4 ); - - ASSERT_EQ( dyn_off3.dimension_0() , stride3.dimension_0() ); - ASSERT_EQ( dyn_off3.dimension_1() , stride3.dimension_1() ); - ASSERT_EQ( dyn_off3.dimension_2() , stride3.dimension_2() ); - ASSERT_EQ( dyn_off3.stride_0() , stride3.stride_0() ); - ASSERT_EQ( dyn_off3.stride_1() , stride3.stride_1() ); - ASSERT_EQ( dyn_off3.stride_2() , stride3.stride_2() ); - ASSERT_EQ( dyn_off3.span() , stride3.span() ); - - int offset = 0 ; - - for ( int i = 0 ; i < 2 ; ++i ){ - for ( int j = 0 ; j < 3 ; ++j ){ - for ( int k = 0 ; k < 4 ; ++k , ++offset ){ - ASSERT_EQ( offset , dyn_off3(i,j,k) ); - ASSERT_EQ( dyn_off3(i,j,k) , stride3(i,j,k) ); - }}} - - ASSERT_EQ( dyn_off3.span() , offset ); + ASSERT_EQ( dyn_off3.m_dim.rank, 3 ); + ASSERT_EQ( dyn_off3.m_dim.N0, 2 ); + ASSERT_EQ( dyn_off3.m_dim.N1, 3 ); + ASSERT_EQ( dyn_off3.m_dim.N2, 4 ); + ASSERT_EQ( dyn_off3.m_dim.N3, 1 ); + ASSERT_EQ( dyn_off3.size(), 2 * 3 * 4 ); + + ASSERT_EQ( dyn_off3.dimension_0(), stride3.dimension_0() ); + ASSERT_EQ( dyn_off3.dimension_1(), stride3.dimension_1() ); + ASSERT_EQ( dyn_off3.dimension_2(), stride3.dimension_2() ); + ASSERT_EQ( dyn_off3.stride_0(), stride3.stride_0() ); + ASSERT_EQ( dyn_off3.stride_1(), stride3.stride_1() ); + ASSERT_EQ( dyn_off3.stride_2(), stride3.stride_2() ); + ASSERT_EQ( dyn_off3.span(), stride3.span() ); + + int offset = 0; + + for ( int i = 0; i < 2; ++i ) + for ( int j = 0; j < 3; ++j ) + for ( int k = 0; k < 4; ++k, ++offset ) + { + ASSERT_EQ( offset, dyn_off3( i, j, k ) ); + ASSERT_EQ( dyn_off3( i, j, k ), stride3( i, j, k ) ); + } + + ASSERT_EQ( dyn_off3.span(), offset ); } - // Large dimension is likely padded + //---------------------------------------- + // Large dimension is likely padded. { - constexpr int N0 = 2000 ; - constexpr int N1 = 300 ; + constexpr int N0 = 2000; + constexpr int N1 = 300; - typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutRight > right_s0_s0_s4 ; + typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4, Kokkos::LayoutRight > right_s0_s0_s4; - right_s0_s0_s4 dyn_off3( std::integral_constant() + right_s0_s0_s4 dyn_off3( std::integral_constant< unsigned, sizeof( int ) >() , Kokkos::LayoutRight( N0, N1, 0, 0, 0, 0, 0, 0 ) ); stride_s0_s0_s0 stride3( dyn_off3 ); - ASSERT_EQ( dyn_off3.m_dim.rank , 3 ); - ASSERT_EQ( dyn_off3.m_dim.N0 , N0 ); - ASSERT_EQ( dyn_off3.m_dim.N1 , N1 ); - ASSERT_EQ( dyn_off3.m_dim.N2 , 4 ); - ASSERT_EQ( dyn_off3.m_dim.N3 , 1 ); - ASSERT_EQ( dyn_off3.size() , N0 * N1 * 4 ); - - ASSERT_EQ( dyn_off3.dimension_0() , stride3.dimension_0() ); - ASSERT_EQ( dyn_off3.dimension_1() , stride3.dimension_1() ); - ASSERT_EQ( dyn_off3.dimension_2() , stride3.dimension_2() ); - ASSERT_EQ( dyn_off3.stride_0() , stride3.stride_0() ); - ASSERT_EQ( dyn_off3.stride_1() , stride3.stride_1() ); - ASSERT_EQ( dyn_off3.stride_2() , stride3.stride_2() ); - ASSERT_EQ( dyn_off3.span() , stride3.span() ); - - int offset = 0 ; - - for ( int i = 0 ; i < N0 ; ++i ){ - for ( int j = 0 ; j < N1 ; ++j ){ - for ( int k = 0 ; k < 4 ; ++k ){ - ASSERT_LE( offset , dyn_off3(i,j,k) ); - ASSERT_EQ( dyn_off3(i,j,k) , stride3(i,j,k) ); - offset = dyn_off3(i,j,k) + 1 ; - }}} - - ASSERT_LE( offset , dyn_off3.span() ); + ASSERT_EQ( dyn_off3.m_dim.rank, 3 ); + ASSERT_EQ( dyn_off3.m_dim.N0, N0 ); + ASSERT_EQ( dyn_off3.m_dim.N1, N1 ); + ASSERT_EQ( dyn_off3.m_dim.N2, 4 ); + ASSERT_EQ( dyn_off3.m_dim.N3, 1 ); + ASSERT_EQ( dyn_off3.size(), N0 * N1 * 4 ); + + ASSERT_EQ( dyn_off3.dimension_0(), stride3.dimension_0() ); + ASSERT_EQ( dyn_off3.dimension_1(), stride3.dimension_1() ); + ASSERT_EQ( dyn_off3.dimension_2(), stride3.dimension_2() ); + ASSERT_EQ( dyn_off3.stride_0(), stride3.stride_0() ); + ASSERT_EQ( dyn_off3.stride_1(), stride3.stride_1() ); + ASSERT_EQ( dyn_off3.stride_2(), stride3.stride_2() ); + ASSERT_EQ( dyn_off3.span(), stride3.span() ); + + int offset = 0; + + for ( int i = 0; i < N0; ++i ) + for ( int j = 0; j < N1; ++j ) + for ( int k = 0; k < 4; ++k ) + { + ASSERT_LE( offset, dyn_off3( i, j, k ) ); + ASSERT_EQ( dyn_off3( i, j, k ), stride3( i, j, k ) ); + offset = dyn_off3( i, j, k ) + 1; + } + + ASSERT_LE( offset, dyn_off3.span() ); } //---------------------------------------- - // Subview + // Subview. { // Mapping rank 4 to rank 3 - typedef Kokkos::Experimental::Impl::SubviewExtents<4,3> SubviewExtents ; + typedef Kokkos::Experimental::Impl::SubviewExtents< 4, 3 > SubviewExtents; - constexpr int N0 = 1000 ; - constexpr int N1 = 2000 ; - constexpr int N2 = 3000 ; - constexpr int N3 = 4000 ; + constexpr int N0 = 1000; + constexpr int N1 = 2000; + constexpr int N2 = 3000; + constexpr int N3 = 4000; - Kokkos::Experimental::Impl::ViewDimension dim ; + Kokkos::Experimental::Impl::ViewDimension< N0, N1, N2, N3 > dim; SubviewExtents tmp( dim , N0 / 2 , Kokkos::Experimental::ALL - , std::pair( N2 / 4 , 10 + N2 / 4 ) - , Kokkos::pair( N3 / 4 , 20 + N3 / 4 ) + , std::pair< int, int >( N2 / 4, 10 + N2 / 4 ) + , Kokkos::pair< int, int >( N3 / 4, 20 + N3 / 4 ) ); - ASSERT_EQ( tmp.domain_offset(0) , N0 / 2 ); - ASSERT_EQ( tmp.domain_offset(1) , 0 ); - ASSERT_EQ( tmp.domain_offset(2) , N2 / 4 ); - ASSERT_EQ( tmp.domain_offset(3) , N3 / 4 ); + ASSERT_EQ( tmp.domain_offset( 0 ), N0 / 2 ); + ASSERT_EQ( tmp.domain_offset( 1 ), 0 ); + ASSERT_EQ( tmp.domain_offset( 2 ), N2 / 4 ); + ASSERT_EQ( tmp.domain_offset( 3 ), N3 / 4 ); - ASSERT_EQ( tmp.range_index(0) , 1 ); - ASSERT_EQ( tmp.range_index(1) , 2 ); - ASSERT_EQ( tmp.range_index(2) , 3 ); + ASSERT_EQ( tmp.range_index( 0 ), 1 ); + ASSERT_EQ( tmp.range_index( 1 ), 2 ); + ASSERT_EQ( tmp.range_index( 2 ), 3 ); - ASSERT_EQ( tmp.range_extent(0) , N1 ); - ASSERT_EQ( tmp.range_extent(1) , 10 ); - ASSERT_EQ( tmp.range_extent(2) , 20 ); + ASSERT_EQ( tmp.range_extent( 0 ), N1 ); + ASSERT_EQ( tmp.range_extent( 1 ), 10 ); + ASSERT_EQ( tmp.range_extent( 2 ), 20 ); } - //---------------------------------------- + { - constexpr int N0 = 2000 ; - constexpr int N1 = 300 ; + constexpr int N0 = 2000; + constexpr int N1 = 300; - constexpr int sub_N0 = 1000 ; - constexpr int sub_N1 = 200 ; - constexpr int sub_N2 = 4 ; + constexpr int sub_N0 = 1000; + constexpr int sub_N1 = 200; + constexpr int sub_N2 = 4; - typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutLeft > left_s0_s0_s4 ; + typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4, Kokkos::LayoutLeft > left_s0_s0_s4; - left_s0_s0_s4 dyn_off3( std::integral_constant() + left_s0_s0_s4 dyn_off3( std::integral_constant< unsigned, sizeof( int ) >() , Kokkos::LayoutLeft( N0, N1, 0, 0, 0, 0, 0, 0 ) ); - Kokkos::Experimental::Impl::SubviewExtents< 3 , 3 > + Kokkos::Experimental::Impl::SubviewExtents< 3, 3 > sub( dyn_off3.m_dim - , Kokkos::pair(0,sub_N0) - , Kokkos::pair(0,sub_N1) - , Kokkos::pair(0,sub_N2) + , Kokkos::pair< int, int >( 0, sub_N0 ) + , Kokkos::pair< int, int >( 0, sub_N1 ) + , Kokkos::pair< int, int >( 0, sub_N2 ) ); - stride_s0_s0_s0 stride3( dyn_off3 , sub ); + stride_s0_s0_s0 stride3( dyn_off3, sub ); - ASSERT_EQ( stride3.dimension_0() , sub_N0 ); - ASSERT_EQ( stride3.dimension_1() , sub_N1 ); - ASSERT_EQ( stride3.dimension_2() , sub_N2 ); - ASSERT_EQ( stride3.size() , sub_N0 * sub_N1 * sub_N2 ); + ASSERT_EQ( stride3.dimension_0(), sub_N0 ); + ASSERT_EQ( stride3.dimension_1(), sub_N1 ); + ASSERT_EQ( stride3.dimension_2(), sub_N2 ); + ASSERT_EQ( stride3.size(), sub_N0 * sub_N1 * sub_N2 ); - ASSERT_EQ( dyn_off3.stride_0() , stride3.stride_0() ); - ASSERT_EQ( dyn_off3.stride_1() , stride3.stride_1() ); - ASSERT_EQ( dyn_off3.stride_2() , stride3.stride_2() ); - ASSERT_GE( dyn_off3.span() , stride3.span() ); + ASSERT_EQ( dyn_off3.stride_0(), stride3.stride_0() ); + ASSERT_EQ( dyn_off3.stride_1(), stride3.stride_1() ); + ASSERT_EQ( dyn_off3.stride_2(), stride3.stride_2() ); + ASSERT_GE( dyn_off3.span() , stride3.span() ); - for ( int k = 0 ; k < sub_N2 ; ++k ){ - for ( int j = 0 ; j < sub_N1 ; ++j ){ - for ( int i = 0 ; i < sub_N0 ; ++i ){ - ASSERT_EQ( stride3(i,j,k) , dyn_off3(i,j,k) ); - }}} + for ( int k = 0; k < sub_N2; ++k ) + for ( int j = 0; j < sub_N1; ++j ) + for ( int i = 0; i < sub_N0; ++i ) + { + ASSERT_EQ( stride3( i, j, k ), dyn_off3( i, j, k ) ); + } } { - constexpr int N0 = 2000 ; - constexpr int N1 = 300 ; + constexpr int N0 = 2000; + constexpr int N1 = 300; - constexpr int sub_N0 = 1000 ; - constexpr int sub_N1 = 200 ; - constexpr int sub_N2 = 4 ; + constexpr int sub_N0 = 1000; + constexpr int sub_N1 = 200; + constexpr int sub_N2 = 4; - typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutRight > right_s0_s0_s4 ; + typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4, Kokkos::LayoutRight > right_s0_s0_s4; - right_s0_s0_s4 dyn_off3( std::integral_constant() + right_s0_s0_s4 dyn_off3( std::integral_constant< unsigned, sizeof( int ) >() , Kokkos::LayoutRight( N0, N1, 0, 0, 0, 0, 0, 0 ) ); - Kokkos::Experimental::Impl::SubviewExtents< 3 , 3 > + Kokkos::Experimental::Impl::SubviewExtents< 3, 3 > sub( dyn_off3.m_dim - , Kokkos::pair(0,sub_N0) - , Kokkos::pair(0,sub_N1) - , Kokkos::pair(0,sub_N2) + , Kokkos::pair< int, int >( 0, sub_N0 ) + , Kokkos::pair< int, int >( 0, sub_N1 ) + , Kokkos::pair< int, int >( 0, sub_N2 ) ); - stride_s0_s0_s0 stride3( dyn_off3 , sub ); + stride_s0_s0_s0 stride3( dyn_off3, sub ); - ASSERT_EQ( stride3.dimension_0() , sub_N0 ); - ASSERT_EQ( stride3.dimension_1() , sub_N1 ); - ASSERT_EQ( stride3.dimension_2() , sub_N2 ); - ASSERT_EQ( stride3.size() , sub_N0 * sub_N1 * sub_N2 ); + ASSERT_EQ( stride3.dimension_0(), sub_N0 ); + ASSERT_EQ( stride3.dimension_1(), sub_N1 ); + ASSERT_EQ( stride3.dimension_2(), sub_N2 ); + ASSERT_EQ( stride3.size(), sub_N0 * sub_N1 * sub_N2 ); - ASSERT_EQ( dyn_off3.stride_0() , stride3.stride_0() ); - ASSERT_EQ( dyn_off3.stride_1() , stride3.stride_1() ); - ASSERT_EQ( dyn_off3.stride_2() , stride3.stride_2() ); - ASSERT_GE( dyn_off3.span() , stride3.span() ); + ASSERT_EQ( dyn_off3.stride_0(), stride3.stride_0() ); + ASSERT_EQ( dyn_off3.stride_1(), stride3.stride_1() ); + ASSERT_EQ( dyn_off3.stride_2(), stride3.stride_2() ); + ASSERT_GE( dyn_off3.span() , stride3.span() ); - for ( int i = 0 ; i < sub_N0 ; ++i ){ - for ( int j = 0 ; j < sub_N1 ; ++j ){ - for ( int k = 0 ; k < sub_N2 ; ++k ){ - ASSERT_EQ( stride3(i,j,k) , dyn_off3(i,j,k) ); - }}} + for ( int i = 0; i < sub_N0; ++i ) + for ( int j = 0; j < sub_N1; ++j ) + for ( int k = 0; k < sub_N2; ++k ) + { + ASSERT_EQ( stride3( i, j, k ), dyn_off3( i, j, k ) ); + } } //---------------------------------------- - // view data analysis + // View data analysis. { - using namespace Kokkos::Experimental::Impl ; - static_assert( rank_dynamic<>::value == 0 , "" ); - static_assert( rank_dynamic<1>::value == 0 , "" ); - static_assert( rank_dynamic<0>::value == 1 , "" ); - static_assert( rank_dynamic<0,1>::value == 1 , "" ); - static_assert( rank_dynamic<0,0,1>::value == 2 , "" ); + using namespace Kokkos::Experimental::Impl; + + static_assert( rank_dynamic<>::value == 0, "" ); + static_assert( rank_dynamic< 1 >::value == 0, "" ); + static_assert( rank_dynamic< 0 >::value == 1, "" ); + static_assert( rank_dynamic< 0, 1 >::value == 1, "" ); + static_assert( rank_dynamic< 0, 0, 1 >::value == 2, "" ); } { - using namespace Kokkos::Experimental::Impl ; - - typedef ViewArrayAnalysis< int[] > a_int_r1 ; - typedef ViewArrayAnalysis< int**[4][5][6] > a_int_r5 ; - typedef ViewArrayAnalysis< const int[] > a_const_int_r1 ; - typedef ViewArrayAnalysis< const int**[4][5][6] > a_const_int_r5 ; - - static_assert( a_int_r1::dimension::rank == 1 , "" ); - static_assert( a_int_r1::dimension::rank_dynamic == 1 , "" ); - static_assert( a_int_r5::dimension::ArgN0 == 0 , "" ); - static_assert( a_int_r5::dimension::ArgN1 == 0 , "" ); - static_assert( a_int_r5::dimension::ArgN2 == 4 , "" ); - static_assert( a_int_r5::dimension::ArgN3 == 5 , "" ); - static_assert( a_int_r5::dimension::ArgN4 == 6 , "" ); - static_assert( a_int_r5::dimension::ArgN5 == 1 , "" ); - - static_assert( std::is_same< typename a_int_r1::dimension , ViewDimension<0> >::value , "" ); - static_assert( std::is_same< typename a_int_r1::non_const_value_type , int >::value , "" ); - - static_assert( a_const_int_r1::dimension::rank == 1 , "" ); - static_assert( a_const_int_r1::dimension::rank_dynamic == 1 , "" ); - static_assert( std::is_same< typename a_const_int_r1::dimension , ViewDimension<0> >::value , "" ); - static_assert( std::is_same< typename a_const_int_r1::non_const_value_type , int >::value , "" ); - - static_assert( a_const_int_r5::dimension::rank == 5 , "" ); - static_assert( a_const_int_r5::dimension::rank_dynamic == 2 , "" ); - - static_assert( a_const_int_r5::dimension::ArgN0 == 0 , "" ); - static_assert( a_const_int_r5::dimension::ArgN1 == 0 , "" ); - static_assert( a_const_int_r5::dimension::ArgN2 == 4 , "" ); - static_assert( a_const_int_r5::dimension::ArgN3 == 5 , "" ); - static_assert( a_const_int_r5::dimension::ArgN4 == 6 , "" ); - static_assert( a_const_int_r5::dimension::ArgN5 == 1 , "" ); - - static_assert( std::is_same< typename a_const_int_r5::dimension , ViewDimension<0,0,4,5,6> >::value , "" ); - static_assert( std::is_same< typename a_const_int_r5::non_const_value_type , int >::value , "" ); - - static_assert( a_int_r5::dimension::rank == 5 , "" ); - static_assert( a_int_r5::dimension::rank_dynamic == 2 , "" ); - static_assert( std::is_same< typename a_int_r5::dimension , ViewDimension<0,0,4,5,6> >::value , "" ); - static_assert( std::is_same< typename a_int_r5::non_const_value_type , int >::value , "" ); + using namespace Kokkos::Experimental::Impl; + + typedef ViewArrayAnalysis< int[] > a_int_r1; + typedef ViewArrayAnalysis< int**[4][5][6] > a_int_r5; + typedef ViewArrayAnalysis< const int[] > a_const_int_r1; + typedef ViewArrayAnalysis< const int**[4][5][6] > a_const_int_r5; + + static_assert( a_int_r1::dimension::rank == 1, "" ); + static_assert( a_int_r1::dimension::rank_dynamic == 1, "" ); + static_assert( a_int_r5::dimension::ArgN0 == 0, "" ); + static_assert( a_int_r5::dimension::ArgN1 == 0, "" ); + static_assert( a_int_r5::dimension::ArgN2 == 4, "" ); + static_assert( a_int_r5::dimension::ArgN3 == 5, "" ); + static_assert( a_int_r5::dimension::ArgN4 == 6, "" ); + static_assert( a_int_r5::dimension::ArgN5 == 1, "" ); + + static_assert( std::is_same< typename a_int_r1::dimension, ViewDimension<0> >::value, "" ); + static_assert( std::is_same< typename a_int_r1::non_const_value_type, int >::value, "" ); + + static_assert( a_const_int_r1::dimension::rank == 1, "" ); + static_assert( a_const_int_r1::dimension::rank_dynamic == 1, "" ); + static_assert( std::is_same< typename a_const_int_r1::dimension, ViewDimension<0> >::value, "" ); + static_assert( std::is_same< typename a_const_int_r1::non_const_value_type, int >::value, "" ); + + static_assert( a_const_int_r5::dimension::rank == 5, "" ); + static_assert( a_const_int_r5::dimension::rank_dynamic == 2, "" ); + + static_assert( a_const_int_r5::dimension::ArgN0 == 0, "" ); + static_assert( a_const_int_r5::dimension::ArgN1 == 0, "" ); + static_assert( a_const_int_r5::dimension::ArgN2 == 4, "" ); + static_assert( a_const_int_r5::dimension::ArgN3 == 5, "" ); + static_assert( a_const_int_r5::dimension::ArgN4 == 6, "" ); + static_assert( a_const_int_r5::dimension::ArgN5 == 1, "" ); + + static_assert( std::is_same< typename a_const_int_r5::dimension, ViewDimension<0, 0, 4, 5, 6> >::value, "" ); + static_assert( std::is_same< typename a_const_int_r5::non_const_value_type, int >::value, "" ); + + static_assert( a_int_r5::dimension::rank == 5, "" ); + static_assert( a_int_r5::dimension::rank_dynamic == 2, "" ); + static_assert( std::is_same< typename a_int_r5::dimension, ViewDimension<0, 0, 4, 5, 6> >::value, "" ); + static_assert( std::is_same< typename a_int_r5::non_const_value_type, int >::value, "" ); } { - using namespace Kokkos::Experimental::Impl ; + using namespace Kokkos::Experimental::Impl; - typedef int t_i4[4] ; + typedef int t_i4[4]; // Dimensions of t_i4 are appended to the multdimensional array. - typedef ViewArrayAnalysis< t_i4 ***[3] > a_int_r5 ; - - static_assert( a_int_r5::dimension::rank == 5 , "" ); - static_assert( a_int_r5::dimension::rank_dynamic == 3 , "" ); - static_assert( a_int_r5::dimension::ArgN0 == 0 , "" ); - static_assert( a_int_r5::dimension::ArgN1 == 0 , "" ); - static_assert( a_int_r5::dimension::ArgN2 == 0 , "" ); - static_assert( a_int_r5::dimension::ArgN3 == 3 , "" ); - static_assert( a_int_r5::dimension::ArgN4 == 4 , "" ); - static_assert( std::is_same< typename a_int_r5::non_const_value_type , int >::value , "" ); + typedef ViewArrayAnalysis< t_i4 ***[3] > a_int_r5; + + static_assert( a_int_r5::dimension::rank == 5, "" ); + static_assert( a_int_r5::dimension::rank_dynamic == 3, "" ); + static_assert( a_int_r5::dimension::ArgN0 == 0, "" ); + static_assert( a_int_r5::dimension::ArgN1 == 0, "" ); + static_assert( a_int_r5::dimension::ArgN2 == 0, "" ); + static_assert( a_int_r5::dimension::ArgN3 == 3, "" ); + static_assert( a_int_r5::dimension::ArgN4 == 4, "" ); + static_assert( std::is_same< typename a_int_r5::non_const_value_type, int >::value, "" ); } { - using namespace Kokkos::Experimental::Impl ; + using namespace Kokkos::Experimental::Impl; - typedef ViewDataAnalysis< const int[] , void > a_const_int_r1 ; + typedef ViewDataAnalysis< const int[], void > a_const_int_r1; - static_assert( std::is_same< typename a_const_int_r1::specialize , void >::value , "" ); - static_assert( std::is_same< typename a_const_int_r1::dimension , Kokkos::Experimental::Impl::ViewDimension<0> >::value , "" ); + static_assert( std::is_same< typename a_const_int_r1::specialize, void >::value, "" ); + static_assert( std::is_same< typename a_const_int_r1::dimension, Kokkos::Experimental::Impl::ViewDimension<0> >::value, "" ); - static_assert( std::is_same< typename a_const_int_r1::type , const int * >::value , "" ); - static_assert( std::is_same< typename a_const_int_r1::value_type , const int >::value , "" ); + static_assert( std::is_same< typename a_const_int_r1::type, const int * >::value, "" ); + static_assert( std::is_same< typename a_const_int_r1::value_type, const int >::value, "" ); - static_assert( std::is_same< typename a_const_int_r1::scalar_array_type , const int * >::value , "" ); - static_assert( std::is_same< typename a_const_int_r1::const_type , const int * >::value , "" ); - static_assert( std::is_same< typename a_const_int_r1::const_value_type , const int >::value , "" ); - static_assert( std::is_same< typename a_const_int_r1::const_scalar_array_type , const int * >::value , "" ); - static_assert( std::is_same< typename a_const_int_r1::non_const_type , int * >::value , "" ); - static_assert( std::is_same< typename a_const_int_r1::non_const_value_type , int >::value , "" ); + static_assert( std::is_same< typename a_const_int_r1::scalar_array_type, const int * >::value, "" ); + static_assert( std::is_same< typename a_const_int_r1::const_type, const int * >::value, "" ); + static_assert( std::is_same< typename a_const_int_r1::const_value_type, const int >::value, "" ); + static_assert( std::is_same< typename a_const_int_r1::const_scalar_array_type, const int * >::value, "" ); + static_assert( std::is_same< typename a_const_int_r1::non_const_type, int * >::value, "" ); + static_assert( std::is_same< typename a_const_int_r1::non_const_value_type, int >::value, "" ); - typedef ViewDataAnalysis< const int**[4] , void > a_const_int_r3 ; + typedef ViewDataAnalysis< const int**[4], void > a_const_int_r3; - static_assert( std::is_same< typename a_const_int_r3::specialize , void >::value , "" ); + static_assert( std::is_same< typename a_const_int_r3::specialize, void >::value, "" ); - static_assert( std::is_same< typename a_const_int_r3::dimension , Kokkos::Experimental::Impl::ViewDimension<0,0,4> >::value , "" ); + static_assert( std::is_same< typename a_const_int_r3::dimension, Kokkos::Experimental::Impl::ViewDimension<0, 0, 4> >::value, "" ); - static_assert( std::is_same< typename a_const_int_r3::type , const int**[4] >::value , "" ); - static_assert( std::is_same< typename a_const_int_r3::value_type , const int >::value , "" ); - static_assert( std::is_same< typename a_const_int_r3::scalar_array_type , const int**[4] >::value , "" ); - static_assert( std::is_same< typename a_const_int_r3::const_type , const int**[4] >::value , "" ); - static_assert( std::is_same< typename a_const_int_r3::const_value_type , const int >::value , "" ); - static_assert( std::is_same< typename a_const_int_r3::const_scalar_array_type , const int**[4] >::value , "" ); - static_assert( std::is_same< typename a_const_int_r3::non_const_type , int**[4] >::value , "" ); - static_assert( std::is_same< typename a_const_int_r3::non_const_value_type , int >::value , "" ); - static_assert( std::is_same< typename a_const_int_r3::non_const_scalar_array_type , int**[4] >::value , "" ); + static_assert( std::is_same< typename a_const_int_r3::type, const int**[4] >::value, "" ); + static_assert( std::is_same< typename a_const_int_r3::value_type, const int >::value, "" ); + static_assert( std::is_same< typename a_const_int_r3::scalar_array_type, const int**[4] >::value, "" ); + static_assert( std::is_same< typename a_const_int_r3::const_type, const int**[4] >::value, "" ); + static_assert( std::is_same< typename a_const_int_r3::const_value_type, const int >::value, "" ); + static_assert( std::is_same< typename a_const_int_r3::const_scalar_array_type, const int**[4] >::value, "" ); + static_assert( std::is_same< typename a_const_int_r3::non_const_type, int**[4] >::value, "" ); + static_assert( std::is_same< typename a_const_int_r3::non_const_value_type, int >::value, "" ); + static_assert( std::is_same< typename a_const_int_r3::non_const_scalar_array_type, int**[4] >::value, "" ); - - // std::cout << "typeid(const int**[4]).name() = " << typeid(const int**[4]).name() << std::endl ; + // std::cout << "typeid( const int**[4] ).name() = " << typeid( const int**[4] ).name() << std::endl; } //---------------------------------------- { - constexpr int N = 10 ; + constexpr int N = 10; - typedef Kokkos::View T ; - typedef Kokkos::View C ; + typedef Kokkos::View< int*, Space > T; + typedef Kokkos::View< const int*, Space > C; - int data[N] ; + int data[N]; - T vr1(data,N); // view of non-const - C cr1(vr1); // view of const from view of non-const - C cr2( (const int *) data , N ); + T vr1( data, N ); // View of non-const. + C cr1( vr1 ); // View of const from view of non-const. + C cr2( (const int *) data, N ); // Generate static_assert error: // T tmp( cr1 ); - ASSERT_EQ( vr1.span() , N ); - ASSERT_EQ( cr1.span() , N ); - ASSERT_EQ( vr1.data() , & data[0] ); - ASSERT_EQ( cr1.data() , & data[0] ); + ASSERT_EQ( vr1.span(), N ); + ASSERT_EQ( cr1.span(), N ); + ASSERT_EQ( vr1.data(), & data[0] ); + ASSERT_EQ( cr1.data(), & data[0] ); - ASSERT_TRUE( ( std::is_same< typename T::data_type , int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::const_data_type , const int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::non_const_data_type , int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::data_type , int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::const_data_type , const int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::non_const_data_type, int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::scalar_array_type , int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::const_scalar_array_type , const int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::non_const_scalar_array_type , int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::scalar_array_type , int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::const_scalar_array_type , const int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::non_const_scalar_array_type, int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::value_type , int >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::const_value_type , const int >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::non_const_value_type , int >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::value_type , int >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::const_value_type , const int >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::non_const_value_type, int >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::memory_space , typename Space::memory_space >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::reference_type , int & >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::memory_space, typename Space::memory_space >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::reference_type, int & >::value ) ); - ASSERT_EQ( T::Rank , 1 ); + ASSERT_EQ( T::Rank, 1 ); - ASSERT_TRUE( ( std::is_same< typename C::data_type , const int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename C::const_data_type , const int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename C::non_const_data_type , int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename C::data_type , const int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename C::const_data_type , const int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename C::non_const_data_type, int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename C::scalar_array_type , const int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename C::const_scalar_array_type , const int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename C::non_const_scalar_array_type , int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename C::scalar_array_type , const int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename C::const_scalar_array_type , const int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename C::non_const_scalar_array_type, int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename C::value_type , const int >::value ) ); - ASSERT_TRUE( ( std::is_same< typename C::const_value_type , const int >::value ) ); - ASSERT_TRUE( ( std::is_same< typename C::non_const_value_type , int >::value ) ); + ASSERT_TRUE( ( std::is_same< typename C::value_type , const int >::value ) ); + ASSERT_TRUE( ( std::is_same< typename C::const_value_type , const int >::value ) ); + ASSERT_TRUE( ( std::is_same< typename C::non_const_value_type, int >::value ) ); - ASSERT_TRUE( ( std::is_same< typename C::memory_space , typename Space::memory_space >::value ) ); - ASSERT_TRUE( ( std::is_same< typename C::reference_type , const int & >::value ) ); + ASSERT_TRUE( ( std::is_same< typename C::memory_space, typename Space::memory_space >::value ) ); + ASSERT_TRUE( ( std::is_same< typename C::reference_type, const int & >::value ) ); - ASSERT_EQ( C::Rank , 1 ); + ASSERT_EQ( C::Rank, 1 ); - ASSERT_EQ( vr1.dimension_0() , N ); + ASSERT_EQ( vr1.dimension_0(), N ); - if ( Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace , typename Space::memory_space >::accessible ) { - for ( int i = 0 ; i < N ; ++i ) data[i] = i + 1 ; - for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( vr1[i] , i + 1 ); - for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( cr1[i] , i + 1 ); + if ( Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace, typename Space::memory_space >::accessible ) { + for ( int i = 0; i < N; ++i ) data[i] = i + 1; + for ( int i = 0; i < N; ++i ) ASSERT_EQ( vr1[i], i + 1 ); + for ( int i = 0; i < N; ++i ) ASSERT_EQ( cr1[i], i + 1 ); { T tmp( vr1 ); - for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( tmp[i] , i + 1 ); - for ( int i = 0 ; i < N ; ++i ) vr1(i) = i + 2 ; - for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( tmp[i] , i + 2 ); + + for ( int i = 0; i < N; ++i ) ASSERT_EQ( tmp[i], i + 1 ); + for ( int i = 0; i < N; ++i ) vr1( i ) = i + 2; + for ( int i = 0; i < N; ++i ) ASSERT_EQ( tmp[i], i + 2 ); } - for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( vr1[i] , i + 2 ); + for ( int i = 0; i < N; ++i ) ASSERT_EQ( vr1[i], i + 2 ); } } - { - constexpr int N = 10 ; - typedef Kokkos::View T ; - typedef Kokkos::View C ; + constexpr int N = 10; + typedef Kokkos::View< int*, Space > T; + typedef Kokkos::View< const int*, Space > C; + + T vr1( "vr1", N ); + C cr1( vr1 ); - T vr1("vr1",N); - C cr1(vr1); + ASSERT_TRUE( ( std::is_same< typename T::data_type , int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::const_data_type , const int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::non_const_data_type, int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::data_type , int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::const_data_type , const int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::non_const_data_type , int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::scalar_array_type , int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::const_scalar_array_type , const int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::non_const_scalar_array_type, int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::scalar_array_type , int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::const_scalar_array_type , const int* >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::non_const_scalar_array_type , int* >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::value_type , int >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::const_value_type , const int >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::non_const_value_type, int >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::value_type , int >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::const_value_type , const int >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::non_const_value_type , int >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::memory_space, typename Space::memory_space >::value ) ); + ASSERT_TRUE( ( std::is_same< typename T::reference_type, int & >::value ) ); + ASSERT_EQ( T::Rank, 1 ); - ASSERT_TRUE( ( std::is_same< typename T::memory_space , typename Space::memory_space >::value ) ); - ASSERT_TRUE( ( std::is_same< typename T::reference_type , int & >::value ) ); - ASSERT_EQ( T::Rank , 1 ); - - ASSERT_EQ( vr1.dimension_0() , N ); + ASSERT_EQ( vr1.dimension_0(), N ); - if ( Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace , typename Space::memory_space >::accessible ) { - for ( int i = 0 ; i < N ; ++i ) vr1(i) = i + 1 ; - for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( vr1[i] , i + 1 ); - for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( cr1[i] , i + 1 ); + if ( Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace, typename Space::memory_space >::accessible ) { + for ( int i = 0; i < N; ++i ) vr1( i ) = i + 1; + for ( int i = 0; i < N; ++i ) ASSERT_EQ( vr1[i], i + 1 ); + for ( int i = 0; i < N; ++i ) ASSERT_EQ( cr1[i], i + 1 ); { T tmp( vr1 ); - for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( tmp[i] , i + 1 ); - for ( int i = 0 ; i < N ; ++i ) vr1(i) = i + 2 ; - for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( tmp[i] , i + 2 ); + for ( int i = 0; i < N; ++i ) ASSERT_EQ( tmp[i], i + 1 ); + for ( int i = 0; i < N; ++i ) vr1( i ) = i + 2; + for ( int i = 0; i < N; ++i ) ASSERT_EQ( tmp[i], i + 2 ); } - for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( vr1[i] , i + 2 ); + for ( int i = 0; i < N; ++i ) ASSERT_EQ( vr1[i], i + 2 ); } } - // Testing proper handling of zero-length allocations + // Testing proper handling of zero-length allocations. { - constexpr int N = 0 ; - typedef Kokkos::View T ; - typedef Kokkos::View C ; + constexpr int N = 0; + typedef Kokkos::View< int*, Space > T; + typedef Kokkos::View< const int*, Space > C; - T vr1("vr1",N); - C cr1(vr1); + T vr1( "vr1", N ); + C cr1( vr1 ); - ASSERT_EQ( vr1.dimension_0() , 0 ); - ASSERT_EQ( cr1.dimension_0() , 0 ); + ASSERT_EQ( vr1.dimension_0(), 0 ); + ASSERT_EQ( cr1.dimension_0(), 0 ); } - // Testing using space instance for allocation. - // The execution space of the memory space must be available for view data initialization - - if ( std::is_same< ExecSpace , typename ExecSpace::memory_space::execution_space >::value ) { - - using namespace Kokkos::Experimental ; - - typedef typename ExecSpace::memory_space memory_space ; - typedef View V ; - - constexpr int N = 10 ; - - memory_space mem_space ; - - V v( "v" , N ); - V va( view_alloc() , N ); - V vb( view_alloc( "vb" ) , N ); - V vc( view_alloc( "vc" , AllowPadding ) , N ); - V vd( view_alloc( "vd" , WithoutInitializing ) , N ); - V ve( view_alloc( "ve" , WithoutInitializing , AllowPadding ) , N ); - V vf( view_alloc( "vf" , mem_space , WithoutInitializing , AllowPadding ) , N ); - V vg( view_alloc( mem_space , "vg" , WithoutInitializing , AllowPadding ) , N ); - V vh( view_alloc( WithoutInitializing , AllowPadding ) , N ); - V vi( view_alloc( WithoutInitializing ) , N ); - V vj( view_alloc( std::string("vj") , AllowPadding ) , N ); - V vk( view_alloc( mem_space , std::string("vk") , AllowPadding ) , N ); + // The execution space of the memory space must be available for view data initialization. + if ( std::is_same< ExecSpace, typename ExecSpace::memory_space::execution_space >::value ) { + + using namespace Kokkos::Experimental; + + typedef typename ExecSpace::memory_space memory_space; + typedef View< int*, memory_space > V; + + constexpr int N = 10; + + memory_space mem_space; + + V v( "v", N ); + V va( view_alloc(), N ); + V vb( view_alloc( "vb" ), N ); + V vc( view_alloc( "vc", AllowPadding ), N ); + V vd( view_alloc( "vd", WithoutInitializing ), N ); + V ve( view_alloc( "ve", WithoutInitializing, AllowPadding ), N ); + V vf( view_alloc( "vf", mem_space, WithoutInitializing, AllowPadding ), N ); + V vg( view_alloc( mem_space, "vg", WithoutInitializing, AllowPadding ), N ); + V vh( view_alloc( WithoutInitializing, AllowPadding ), N ); + V vi( view_alloc( WithoutInitializing ), N ); + V vj( view_alloc( std::string( "vj" ), AllowPadding ), N ); + V vk( view_alloc( mem_space, std::string( "vk" ), AllowPadding ), N ); } { - typedef Kokkos::ViewTraits traits_t ; - typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0> dims_t ; - typedef Kokkos::Experimental::Impl::ViewOffset< dims_t , Kokkos::LayoutStride > offset_t ; + typedef Kokkos::ViewTraits< int***, Kokkos::LayoutStride, ExecSpace > traits_t; + typedef Kokkos::Experimental::Impl::ViewDimension< 0, 0, 0 > dims_t; + typedef Kokkos::Experimental::Impl::ViewOffset< dims_t, Kokkos::LayoutStride > offset_t; - Kokkos::LayoutStride stride ; + Kokkos::LayoutStride stride; - stride.dimension[0] = 3 ; - stride.dimension[1] = 4 ; - stride.dimension[2] = 5 ; - stride.stride[0] = 4 ; - stride.stride[1] = 1 ; - stride.stride[2] = 12 ; + stride.dimension[0] = 3; + stride.dimension[1] = 4; + stride.dimension[2] = 5; + stride.stride[0] = 4; + stride.stride[1] = 1; + stride.stride[2] = 12; - const offset_t offset( std::integral_constant() , stride ); + const offset_t offset( std::integral_constant< unsigned, 0 >(), stride ); - ASSERT_EQ( offset.dimension_0() , 3 ); - ASSERT_EQ( offset.dimension_1() , 4 ); - ASSERT_EQ( offset.dimension_2() , 5 ); + ASSERT_EQ( offset.dimension_0(), 3 ); + ASSERT_EQ( offset.dimension_1(), 4 ); + ASSERT_EQ( offset.dimension_2(), 5 ); - ASSERT_EQ( offset.stride_0() , 4 ); - ASSERT_EQ( offset.stride_1() , 1 ); - ASSERT_EQ( offset.stride_2() , 12 ); + ASSERT_EQ( offset.stride_0(), 4 ); + ASSERT_EQ( offset.stride_1(), 1 ); + ASSERT_EQ( offset.stride_2(), 12 ); - ASSERT_EQ( offset.span() , 60 ); + ASSERT_EQ( offset.span(), 60 ); ASSERT_TRUE( offset.span_is_contiguous() ); - Kokkos::Experimental::Impl::ViewMapping< traits_t , void > - v( Kokkos::Experimental::Impl::ViewCtorProp((int*)0), stride ); + Kokkos::Experimental::Impl::ViewMapping< traits_t, void > + v( Kokkos::Experimental::Impl::ViewCtorProp< int* >( (int*) 0 ), stride ); } { - typedef Kokkos::View V ; - typedef typename V::HostMirror M ; - typedef typename Kokkos::View::array_layout layout_type; + typedef Kokkos::View< int**, Space > V; + typedef typename V::HostMirror M; + typedef typename Kokkos::View< int**, Space >::array_layout layout_type; - constexpr int N0 = 10 ; - constexpr int N1 = 11 ; + constexpr int N0 = 10; + constexpr int N1 = 11; - V a("a",N0,N1); - M b = Kokkos::Experimental::create_mirror(a); - M c = Kokkos::Experimental::create_mirror_view(a); - M d ; + V a( "a", N0, N1 ); + M b = Kokkos::Experimental::create_mirror( a ); + M c = Kokkos::Experimental::create_mirror_view( a ); + M d; - for ( int i0 = 0 ; i0 < N0 ; ++i0 ) - for ( int i1 = 0 ; i1 < N1 ; ++i1 ) - b(i0,i1) = 1 + i0 + i1 * N0 ; + for ( int i0 = 0; i0 < N0; ++i0 ) + for ( int i1 = 0; i1 < N1; ++i1 ) + { + b( i0, i1 ) = 1 + i0 + i1 * N0; + } - Kokkos::Experimental::deep_copy( a , b ); - Kokkos::Experimental::deep_copy( c , a ); + Kokkos::Experimental::deep_copy( a, b ); + Kokkos::Experimental::deep_copy( c, a ); - for ( int i0 = 0 ; i0 < N0 ; ++i0 ) - for ( int i1 = 0 ; i1 < N1 ; ++i1 ) - ASSERT_EQ( b(i0,i1) , c(i0,i1) ); + for ( int i0 = 0; i0 < N0; ++i0 ) + for ( int i1 = 0; i1 < N1; ++i1 ) + { + ASSERT_EQ( b( i0, i1 ), c( i0, i1 ) ); + } - Kokkos::Experimental::resize( b , 5 , 6 ); + Kokkos::Experimental::resize( b, 5, 6 ); - for ( int i0 = 0 ; i0 < 5 ; ++i0 ) - for ( int i1 = 0 ; i1 < 6 ; ++i1 ) { + for ( int i0 = 0; i0 < 5; ++i0 ) + for ( int i1 = 0; i1 < 6; ++i1 ) + { int val = 1 + i0 + i1 * N0; - ASSERT_EQ( b(i0,i1) , c(i0,i1) ); - ASSERT_EQ( b(i0,i1) , val ); + ASSERT_EQ( b( i0, i1 ), c( i0, i1 ) ); + ASSERT_EQ( b( i0, i1 ), val ); } - Kokkos::Experimental::realloc( c , 5 , 6 ); - Kokkos::Experimental::realloc( d , 5 , 6 ); + Kokkos::Experimental::realloc( c, 5, 6 ); + Kokkos::Experimental::realloc( d, 5, 6 ); - ASSERT_EQ( b.dimension_0() , 5 ); - ASSERT_EQ( b.dimension_1() , 6 ); - ASSERT_EQ( c.dimension_0() , 5 ); - ASSERT_EQ( c.dimension_1() , 6 ); - ASSERT_EQ( d.dimension_0() , 5 ); - ASSERT_EQ( d.dimension_1() , 6 ); + ASSERT_EQ( b.dimension_0(), 5 ); + ASSERT_EQ( b.dimension_1(), 6 ); + ASSERT_EQ( c.dimension_0(), 5 ); + ASSERT_EQ( c.dimension_1(), 6 ); + ASSERT_EQ( d.dimension_0(), 5 ); + ASSERT_EQ( d.dimension_1(), 6 ); - layout_type layout(7,8); - Kokkos::Experimental::resize( b , layout ); - for ( int i0 = 0 ; i0 < 7 ; ++i0 ) - for ( int i1 = 6 ; i1 < 8 ; ++i1 ) - b(i0,i1) = 1 + i0 + i1 * N0 ; + layout_type layout( 7, 8 ); + Kokkos::Experimental::resize( b, layout ); + for ( int i0 = 0; i0 < 7; ++i0 ) + for ( int i1 = 6; i1 < 8; ++i1 ) + { + b( i0, i1 ) = 1 + i0 + i1 * N0; + } - for ( int i0 = 5 ; i0 < 7 ; ++i0 ) - for ( int i1 = 0 ; i1 < 8 ; ++i1 ) - b(i0,i1) = 1 + i0 + i1 * N0 ; + for ( int i0 = 5; i0 < 7; ++i0 ) + for ( int i1 = 0; i1 < 8; ++i1 ) + { + b( i0, i1 ) = 1 + i0 + i1 * N0; + } - for ( int i0 = 0 ; i0 < 7 ; ++i0 ) - for ( int i1 = 0 ; i1 < 8 ; ++i1 ) { + for ( int i0 = 0; i0 < 7; ++i0 ) + for ( int i1 = 0; i1 < 8; ++i1 ) + { int val = 1 + i0 + i1 * N0; - ASSERT_EQ( b(i0,i1) , val ); + ASSERT_EQ( b( i0, i1 ), val ); } - Kokkos::Experimental::realloc( c , layout ); - Kokkos::Experimental::realloc( d , layout ); - - ASSERT_EQ( b.dimension_0() , 7 ); - ASSERT_EQ( b.dimension_1() , 8 ); - ASSERT_EQ( c.dimension_0() , 7 ); - ASSERT_EQ( c.dimension_1() , 8 ); - ASSERT_EQ( d.dimension_0() , 7 ); - ASSERT_EQ( d.dimension_1() , 8 ); + Kokkos::Experimental::realloc( c, layout ); + Kokkos::Experimental::realloc( d, layout ); + ASSERT_EQ( b.dimension_0(), 7 ); + ASSERT_EQ( b.dimension_1(), 8 ); + ASSERT_EQ( c.dimension_0(), 7 ); + ASSERT_EQ( c.dimension_1(), 8 ); + ASSERT_EQ( d.dimension_0(), 7 ); + ASSERT_EQ( d.dimension_1(), 8 ); } { - typedef Kokkos::View V ; - typedef typename V::HostMirror M ; - typedef typename Kokkos::View::array_layout layout_type; + typedef Kokkos::View< int**, Kokkos::LayoutStride, Space > V; + typedef typename V::HostMirror M; + typedef typename Kokkos::View< int**, Kokkos::LayoutStride, Space >::array_layout layout_type; - constexpr int N0 = 10 ; - constexpr int N1 = 11 ; + constexpr int N0 = 10; + constexpr int N1 = 11; - const int dimensions[] = {N0,N1}; - const int order[] = {1,0}; + const int dimensions[] = { N0, N1 }; + const int order[] = { 1, 0 }; - V a("a",Kokkos::LayoutStride::order_dimensions(2,order,dimensions)); - M b = Kokkos::Experimental::create_mirror(a); - M c = Kokkos::Experimental::create_mirror_view(a); - M d ; + V a( "a", Kokkos::LayoutStride::order_dimensions( 2, order, dimensions ) ); + M b = Kokkos::Experimental::create_mirror( a ); + M c = Kokkos::Experimental::create_mirror_view( a ); + M d; - for ( int i0 = 0 ; i0 < N0 ; ++i0 ) - for ( int i1 = 0 ; i1 < N1 ; ++i1 ) - b(i0,i1) = 1 + i0 + i1 * N0 ; + for ( int i0 = 0; i0 < N0; ++i0 ) + for ( int i1 = 0; i1 < N1; ++i1 ) + { + b( i0, i1 ) = 1 + i0 + i1 * N0; + } - Kokkos::Experimental::deep_copy( a , b ); - Kokkos::Experimental::deep_copy( c , a ); + Kokkos::Experimental::deep_copy( a, b ); + Kokkos::Experimental::deep_copy( c, a ); - for ( int i0 = 0 ; i0 < N0 ; ++i0 ) - for ( int i1 = 0 ; i1 < N1 ; ++i1 ) - ASSERT_EQ( b(i0,i1) , c(i0,i1) ); + for ( int i0 = 0; i0 < N0; ++i0 ) + for ( int i1 = 0; i1 < N1; ++i1 ) + { + ASSERT_EQ( b( i0, i1 ), c( i0, i1 ) ); + } - const int dimensions2[] = {7,8}; - const int order2[] = {1,0}; - layout_type layout = layout_type::order_dimensions(2,order2,dimensions2); - Kokkos::Experimental::resize( b , layout ); + const int dimensions2[] = { 7, 8 }; + const int order2[] = { 1, 0 }; + layout_type layout = layout_type::order_dimensions( 2, order2, dimensions2 ); + Kokkos::Experimental::resize( b, layout ); - for ( int i0 = 0 ; i0 < 7 ; ++i0 ) - for ( int i1 = 0 ; i1 < 8 ; ++i1 ) { + for ( int i0 = 0; i0 < 7; ++i0 ) + for ( int i1 = 0; i1 < 8; ++i1 ) + { int val = 1 + i0 + i1 * N0; - ASSERT_EQ( b(i0,i1) , c(i0,i1) ); - ASSERT_EQ( b(i0,i1) , val ); + ASSERT_EQ( b( i0, i1 ), c( i0, i1 ) ); + ASSERT_EQ( b( i0, i1 ), val ); } - Kokkos::Experimental::realloc( c , layout ); - Kokkos::Experimental::realloc( d , layout ); + Kokkos::Experimental::realloc( c, layout ); + Kokkos::Experimental::realloc( d, layout ); - ASSERT_EQ( b.dimension_0() , 7 ); - ASSERT_EQ( b.dimension_1() , 8 ); - ASSERT_EQ( c.dimension_0() , 7 ); - ASSERT_EQ( c.dimension_1() , 8 ); - ASSERT_EQ( d.dimension_0() , 7 ); - ASSERT_EQ( d.dimension_1() , 8 ); + ASSERT_EQ( b.dimension_0(), 7 ); + ASSERT_EQ( b.dimension_1(), 8 ); + ASSERT_EQ( c.dimension_0(), 7 ); + ASSERT_EQ( c.dimension_1(), 8 ); + ASSERT_EQ( d.dimension_0(), 7 ); + ASSERT_EQ( d.dimension_1(), 8 ); } { - typedef Kokkos::View V ; - typedef Kokkos::View U ; + typedef Kokkos::View< int*, Space > V; + typedef Kokkos::View< int*, Space, Kokkos::MemoryUnmanaged > U; + V a( "a", 10 ); - V a("a",10); + ASSERT_EQ( a.use_count(), 1 ); - ASSERT_EQ( a.use_count() , 1 ); + V b = a; - V b = a ; - - ASSERT_EQ( a.use_count() , 2 ); - ASSERT_EQ( b.use_count() , 2 ); + ASSERT_EQ( a.use_count(), 2 ); + ASSERT_EQ( b.use_count(), 2 ); { - U c = b ; // 'c' is compile-time unmanaged + U c = b; // 'c' is compile-time unmanaged. - ASSERT_EQ( a.use_count() , 2 ); - ASSERT_EQ( b.use_count() , 2 ); - ASSERT_EQ( c.use_count() , 2 ); + ASSERT_EQ( a.use_count(), 2 ); + ASSERT_EQ( b.use_count(), 2 ); + ASSERT_EQ( c.use_count(), 2 ); - V d = c ; // 'd' is run-time unmanaged + V d = c; // 'd' is run-time unmanaged. - ASSERT_EQ( a.use_count() , 2 ); - ASSERT_EQ( b.use_count() , 2 ); - ASSERT_EQ( c.use_count() , 2 ); - ASSERT_EQ( d.use_count() , 2 ); + ASSERT_EQ( a.use_count(), 2 ); + ASSERT_EQ( b.use_count(), 2 ); + ASSERT_EQ( c.use_count(), 2 ); + ASSERT_EQ( d.use_count(), 2 ); } - ASSERT_EQ( a.use_count() , 2 ); - ASSERT_EQ( b.use_count() , 2 ); + ASSERT_EQ( a.use_count(), 2 ); + ASSERT_EQ( b.use_count(), 2 ); b = V(); - ASSERT_EQ( a.use_count() , 1 ); - ASSERT_EQ( b.use_count() , 0 ); - -#if ! defined ( KOKKOS_ENABLE_CUDA_LAMBDA ) - /* Cannot launch host lambda when CUDA lambda is enabled */ - - typedef typename Kokkos::Impl::HostMirror< Space >::Space::execution_space - host_exec_space ; - - Kokkos::parallel_for( - Kokkos::RangePolicy< host_exec_space >(0,10) , - KOKKOS_LAMBDA( int i ){ - // 'a' is captured by copy and the capture mechanism - // converts 'a' to an unmanaged copy. - // When the parallel dispatch accepts a move for the lambda - // this count should become 1 - ASSERT_EQ( a.use_count() , 2 ); - V x = a ; - ASSERT_EQ( a.use_count() , 2 ); - ASSERT_EQ( x.use_count() , 2 ); - }); -#endif /* #if ! defined ( KOKKOS_ENABLE_CUDA_LAMBDA ) */ + ASSERT_EQ( a.use_count(), 1 ); + ASSERT_EQ( b.use_count(), 0 ); + +#if !defined( KOKKOS_ENABLE_CUDA_LAMBDA ) + // Cannot launch host lambda when CUDA lambda is enabled. + + typedef typename Kokkos::Impl::HostMirror< Space >::Space::execution_space host_exec_space; + + Kokkos::parallel_for( Kokkos::RangePolicy< host_exec_space >( 0, 10 ), KOKKOS_LAMBDA ( int i ) { + // 'a' is captured by copy, and the capture mechanism converts 'a' to an + // unmanaged copy. When the parallel dispatch accepts a move for the + // lambda, this count should become 1. + ASSERT_EQ( a.use_count(), 2 ); + V x = a; + ASSERT_EQ( a.use_count(), 2 ); + ASSERT_EQ( x.use_count(), 2 ); + }); +#endif // #if !defined( KOKKOS_ENABLE_CUDA_LAMBDA ) } } template< class Space > struct TestViewMappingSubview { - typedef typename Space::execution_space ExecSpace ; - typedef typename Space::memory_space MemSpace ; + typedef typename Space::execution_space ExecSpace; + typedef typename Space::memory_space MemSpace; - typedef Kokkos::pair range ; + typedef Kokkos::pair< int, int > range; enum { AN = 10 }; - typedef Kokkos::View AT ; - typedef Kokkos::View ACT ; - typedef Kokkos::Subview< AT , range > AS ; + typedef Kokkos::View< int*, ExecSpace > AT; + typedef Kokkos::View< const int*, ExecSpace > ACT; + typedef Kokkos::Subview< AT, range > AS; - enum { BN0 = 10 , BN1 = 11 , BN2 = 12 }; - typedef Kokkos::View BT ; - typedef Kokkos::Subview< BT , range , range , range > BS ; + enum { BN0 = 10, BN1 = 11, BN2 = 12 }; + typedef Kokkos::View< int***, ExecSpace > BT; + typedef Kokkos::Subview< BT, range, range, range > BS; - enum { CN0 = 10 , CN1 = 11 , CN2 = 12 }; - typedef Kokkos::View CT ; - typedef Kokkos::Subview< CT , range , range , range , int , int > CS ; + enum { CN0 = 10, CN1 = 11, CN2 = 12 }; + typedef Kokkos::View< int***[13][14], ExecSpace > CT; + typedef Kokkos::Subview< CT, range, range, range, int, int > CS; - enum { DN0 = 10 , DN1 = 11 , DN2 = 12 , DN3 = 13 , DN4 = 14 }; - typedef Kokkos::View DT ; - typedef Kokkos::Subview< DT , int , range , range , range , int > DS ; + enum { DN0 = 10, DN1 = 11, DN2 = 12, DN3 = 13, DN4 = 14 }; + typedef Kokkos::View< int***[DN3][DN4], ExecSpace > DT; + typedef Kokkos::Subview< DT, int, range, range, range, int > DS; + typedef Kokkos::View< int***[13][14], Kokkos::LayoutLeft, ExecSpace > DLT; + typedef Kokkos::Subview< DLT, range, int, int, int, int > DLS1; - typedef Kokkos::View DLT ; - typedef Kokkos::Subview< DLT , range , int , int , int , int > DLS1 ; - - static_assert( DLS1::rank == 1 && std::is_same< typename DLS1::array_layout , Kokkos::LayoutLeft >::value + static_assert( DLS1::rank == 1 && std::is_same< typename DLS1::array_layout, Kokkos::LayoutLeft >::value , "Subview layout error for rank 1 subview of left-most range of LayoutLeft" ); - typedef Kokkos::View DRT ; - typedef Kokkos::Subview< DRT , int , int , int , int , range > DRS1 ; + typedef Kokkos::View< int***[13][14], Kokkos::LayoutRight, ExecSpace > DRT; + typedef Kokkos::Subview< DRT, int, int, int, int, range > DRS1; - static_assert( DRS1::rank == 1 && std::is_same< typename DRS1::array_layout , Kokkos::LayoutRight >::value + static_assert( DRS1::rank == 1 && std::is_same< typename DRS1::array_layout, Kokkos::LayoutRight >::value , "Subview layout error for rank 1 subview of right-most range of LayoutRight" ); - AT Aa ; - AS Ab ; - ACT Ac ; - BT Ba ; - BS Bb ; - CT Ca ; - CS Cb ; - DT Da ; - DS Db ; + AT Aa; + AS Ab; + ACT Ac; + BT Ba; + BS Bb; + CT Ca; + CS Cb; + DT Da; + DS Db; TestViewMappingSubview() - : Aa("Aa",AN) - , Ab( Kokkos::Experimental::subview( Aa , std::pair(1,AN-1) ) ) - , Ac( Aa , std::pair(1,AN-1) ) - , Ba("Ba",BN0,BN1,BN2) + : Aa( "Aa", AN ) + , Ab( Kokkos::Experimental::subview( Aa, std::pair< int, int >( 1, AN - 1 ) ) ) + , Ac( Aa, std::pair< int, int >( 1, AN - 1 ) ) + , Ba( "Ba", BN0, BN1, BN2 ) , Bb( Kokkos::Experimental::subview( Ba - , std::pair(1,BN0-1) - , std::pair(1,BN1-1) - , std::pair(1,BN2-1) + , std::pair< int, int >( 1, BN0 - 1 ) + , std::pair< int, int >( 1, BN1 - 1 ) + , std::pair< int, int >( 1, BN2 - 1 ) ) ) - , Ca("Ca",CN0,CN1,CN2) + , Ca( "Ca", CN0, CN1, CN2 ) , Cb( Kokkos::Experimental::subview( Ca - , std::pair(1,CN0-1) - , std::pair(1,CN1-1) - , std::pair(1,CN2-1) + , std::pair< int, int >( 1, CN0 - 1 ) + , std::pair< int, int >( 1, CN1 - 1 ) + , std::pair< int, int >( 1, CN2 - 1 ) , 1 , 2 ) ) - , Da("Da",DN0,DN1,DN2) + , Da( "Da", DN0, DN1, DN2 ) , Db( Kokkos::Experimental::subview( Da , 1 - , std::pair(1,DN1-1) - , std::pair(1,DN2-1) - , std::pair(1,DN3-1) + , std::pair< int, int >( 1, DN1 - 1 ) + , std::pair< int, int >( 1, DN2 - 1 ) + , std::pair< int, int >( 1, DN3 - 1 ) , 2 ) ) + {} + + KOKKOS_INLINE_FUNCTION + void operator()( const int, long & error_count ) const + { + auto Ad = Kokkos::Experimental::subview< Kokkos::MemoryUnmanaged >( Aa, Kokkos::pair< int, int >( 1, AN - 1 ) ); + + for ( int i = 1; i < AN - 1; ++i ) if( & Aa[i] != & Ab[i - 1] ) ++error_count; + for ( int i = 1; i < AN - 1; ++i ) if( & Aa[i] != & Ac[i - 1] ) ++error_count; + for ( int i = 1; i < AN - 1; ++i ) if( & Aa[i] != & Ad[i - 1] ) ++error_count; + + for ( int i2 = 1; i2 < BN2 - 1; ++i2 ) + for ( int i1 = 1; i1 < BN1 - 1; ++i1 ) + for ( int i0 = 1; i0 < BN0 - 1; ++i0 ) { + if ( & Ba( i0, i1, i2 ) != & Bb( i0 - 1, i1 - 1, i2 - 1 ) ) ++error_count; } + for ( int i2 = 1; i2 < CN2 - 1; ++i2 ) + for ( int i1 = 1; i1 < CN1 - 1; ++i1 ) + for ( int i0 = 1; i0 < CN0 - 1; ++i0 ) + { + if ( & Ca( i0, i1, i2, 1, 2 ) != & Cb( i0 - 1, i1 - 1, i2 - 1 ) ) ++error_count; + } - KOKKOS_INLINE_FUNCTION - void operator()( const int , long & error_count ) const + for ( int i2 = 1; i2 < DN3 - 1; ++i2 ) + for ( int i1 = 1; i1 < DN2 - 1; ++i1 ) + for ( int i0 = 1; i0 < DN1 - 1; ++i0 ) { - auto Ad = Kokkos::Experimental::subview< Kokkos::MemoryUnmanaged >( Aa , Kokkos::pair(1,AN-1) ); - - for ( int i = 1 ; i < AN-1 ; ++i ) if( & Aa[i] != & Ab[i-1] ) ++error_count ; - for ( int i = 1 ; i < AN-1 ; ++i ) if( & Aa[i] != & Ac[i-1] ) ++error_count ; - for ( int i = 1 ; i < AN-1 ; ++i ) if( & Aa[i] != & Ad[i-1] ) ++error_count ; - - for ( int i2 = 1 ; i2 < BN2-1 ; ++i2 ) { - for ( int i1 = 1 ; i1 < BN1-1 ; ++i1 ) { - for ( int i0 = 1 ; i0 < BN0-1 ; ++i0 ) { - if ( & Ba(i0,i1,i2) != & Bb(i0-1,i1-1,i2-1) ) ++error_count ; - }}} - - for ( int i2 = 1 ; i2 < CN2-1 ; ++i2 ) { - for ( int i1 = 1 ; i1 < CN1-1 ; ++i1 ) { - for ( int i0 = 1 ; i0 < CN0-1 ; ++i0 ) { - if ( & Ca(i0,i1,i2,1,2) != & Cb(i0-1,i1-1,i2-1) ) ++error_count ; - }}} - - for ( int i2 = 1 ; i2 < DN3-1 ; ++i2 ) { - for ( int i1 = 1 ; i1 < DN2-1 ; ++i1 ) { - for ( int i0 = 1 ; i0 < DN1-1 ; ++i0 ) { - if ( & Da(1,i0,i1,i2,2) != & Db(i0-1,i1-1,i2-1) ) ++error_count ; - }}} + if ( & Da( 1, i0, i1, i2, 2 ) != & Db( i0 - 1, i1 - 1, i2 - 1 ) ) ++error_count; } + } static void run() { - TestViewMappingSubview self ; - - ASSERT_EQ( self.Aa.dimension_0() , AN ); - ASSERT_EQ( self.Ab.dimension_0() , AN - 2 ); - ASSERT_EQ( self.Ac.dimension_0() , AN - 2 ); - ASSERT_EQ( self.Ba.dimension_0() , BN0 ); - ASSERT_EQ( self.Ba.dimension_1() , BN1 ); - ASSERT_EQ( self.Ba.dimension_2() , BN2 ); - ASSERT_EQ( self.Bb.dimension_0() , BN0 - 2 ); - ASSERT_EQ( self.Bb.dimension_1() , BN1 - 2 ); - ASSERT_EQ( self.Bb.dimension_2() , BN2 - 2 ); - - ASSERT_EQ( self.Ca.dimension_0() , CN0 ); - ASSERT_EQ( self.Ca.dimension_1() , CN1 ); - ASSERT_EQ( self.Ca.dimension_2() , CN2 ); - ASSERT_EQ( self.Ca.dimension_3() , 13 ); - ASSERT_EQ( self.Ca.dimension_4() , 14 ); - ASSERT_EQ( self.Cb.dimension_0() , CN0 - 2 ); - ASSERT_EQ( self.Cb.dimension_1() , CN1 - 2 ); - ASSERT_EQ( self.Cb.dimension_2() , CN2 - 2 ); - - ASSERT_EQ( self.Da.dimension_0() , DN0 ); - ASSERT_EQ( self.Da.dimension_1() , DN1 ); - ASSERT_EQ( self.Da.dimension_2() , DN2 ); - ASSERT_EQ( self.Da.dimension_3() , DN3 ); - ASSERT_EQ( self.Da.dimension_4() , DN4 ); - - ASSERT_EQ( self.Db.dimension_0() , DN1 - 2 ); - ASSERT_EQ( self.Db.dimension_1() , DN2 - 2 ); - ASSERT_EQ( self.Db.dimension_2() , DN3 - 2 ); - - ASSERT_EQ( self.Da.stride_1() , self.Db.stride_0() ); - ASSERT_EQ( self.Da.stride_2() , self.Db.stride_1() ); - ASSERT_EQ( self.Da.stride_3() , self.Db.stride_2() ); - - long error_count = -1 ; - Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >(0,1) , self , error_count ); - ASSERT_EQ( error_count , 0 ); + TestViewMappingSubview self; + + ASSERT_EQ( self.Aa.dimension_0(), AN ); + ASSERT_EQ( self.Ab.dimension_0(), AN - 2 ); + ASSERT_EQ( self.Ac.dimension_0(), AN - 2 ); + ASSERT_EQ( self.Ba.dimension_0(), BN0 ); + ASSERT_EQ( self.Ba.dimension_1(), BN1 ); + ASSERT_EQ( self.Ba.dimension_2(), BN2 ); + ASSERT_EQ( self.Bb.dimension_0(), BN0 - 2 ); + ASSERT_EQ( self.Bb.dimension_1(), BN1 - 2 ); + ASSERT_EQ( self.Bb.dimension_2(), BN2 - 2 ); + + ASSERT_EQ( self.Ca.dimension_0(), CN0 ); + ASSERT_EQ( self.Ca.dimension_1(), CN1 ); + ASSERT_EQ( self.Ca.dimension_2(), CN2 ); + ASSERT_EQ( self.Ca.dimension_3(), 13 ); + ASSERT_EQ( self.Ca.dimension_4(), 14 ); + ASSERT_EQ( self.Cb.dimension_0(), CN0 - 2 ); + ASSERT_EQ( self.Cb.dimension_1(), CN1 - 2 ); + ASSERT_EQ( self.Cb.dimension_2(), CN2 - 2 ); + + ASSERT_EQ( self.Da.dimension_0(), DN0 ); + ASSERT_EQ( self.Da.dimension_1(), DN1 ); + ASSERT_EQ( self.Da.dimension_2(), DN2 ); + ASSERT_EQ( self.Da.dimension_3(), DN3 ); + ASSERT_EQ( self.Da.dimension_4(), DN4 ); + + ASSERT_EQ( self.Db.dimension_0(), DN1 - 2 ); + ASSERT_EQ( self.Db.dimension_1(), DN2 - 2 ); + ASSERT_EQ( self.Db.dimension_2(), DN3 - 2 ); + + ASSERT_EQ( self.Da.stride_1(), self.Db.stride_0() ); + ASSERT_EQ( self.Da.stride_2(), self.Db.stride_1() ); + ASSERT_EQ( self.Da.stride_3(), self.Db.stride_2() ); + + long error_count = -1; + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, 1 ), self, error_count ); + ASSERT_EQ( error_count, 0 ); } - }; template< class Space > void test_view_mapping_subview() { - typedef typename Space::execution_space ExecSpace ; + typedef typename Space::execution_space ExecSpace; TestViewMappingSubview< ExecSpace >::run(); } @@ -1181,214 +1195,228 @@ struct TestViewMapOperator { static_assert( ViewType::reference_type_is_lvalue_reference , "Test only valid for lvalue reference type" ); - const ViewType v ; + const ViewType v; KOKKOS_INLINE_FUNCTION - void test_left( size_t i0 , long & error_count ) const + void test_left( size_t i0, long & error_count ) const + { + typename ViewType::value_type * const base_ptr = & v( 0, 0, 0, 0, 0, 0, 0, 0 ); + const size_t n1 = v.dimension_1(); + const size_t n2 = v.dimension_2(); + const size_t n3 = v.dimension_3(); + const size_t n4 = v.dimension_4(); + const size_t n5 = v.dimension_5(); + const size_t n6 = v.dimension_6(); + const size_t n7 = v.dimension_7(); + + long offset = 0; + + for ( size_t i7 = 0; i7 < n7; ++i7 ) + for ( size_t i6 = 0; i6 < n6; ++i6 ) + for ( size_t i5 = 0; i5 < n5; ++i5 ) + for ( size_t i4 = 0; i4 < n4; ++i4 ) + for ( size_t i3 = 0; i3 < n3; ++i3 ) + for ( size_t i2 = 0; i2 < n2; ++i2 ) + for ( size_t i1 = 0; i1 < n1; ++i1 ) { - typename ViewType::value_type * const base_ptr = & v(0,0,0,0,0,0,0,0); - const size_t n1 = v.dimension_1(); - const size_t n2 = v.dimension_2(); - const size_t n3 = v.dimension_3(); - const size_t n4 = v.dimension_4(); - const size_t n5 = v.dimension_5(); - const size_t n6 = v.dimension_6(); - const size_t n7 = v.dimension_7(); - - long offset = 0 ; - - for ( size_t i7 = 0 ; i7 < n7 ; ++i7 ) - for ( size_t i6 = 0 ; i6 < n6 ; ++i6 ) - for ( size_t i5 = 0 ; i5 < n5 ; ++i5 ) - for ( size_t i4 = 0 ; i4 < n4 ; ++i4 ) - for ( size_t i3 = 0 ; i3 < n3 ; ++i3 ) - for ( size_t i2 = 0 ; i2 < n2 ; ++i2 ) - for ( size_t i1 = 0 ; i1 < n1 ; ++i1 ) - { - const long d = & v(i0,i1,i2,i3,i4,i5,i6,i7) - base_ptr ; - if ( d < offset ) ++error_count ; - offset = d ; - } - - if ( v.span() <= size_t(offset) ) ++error_count ; + const long d = & v( i0, i1, i2, i3, i4, i5, i6, i7 ) - base_ptr; + if ( d < offset ) ++error_count; + offset = d; } + if ( v.span() <= size_t( offset ) ) ++error_count; + } + KOKKOS_INLINE_FUNCTION - void test_right( size_t i0 , long & error_count ) const + void test_right( size_t i0, long & error_count ) const + { + typename ViewType::value_type * const base_ptr = & v( 0, 0, 0, 0, 0, 0, 0, 0 ); + const size_t n1 = v.dimension_1(); + const size_t n2 = v.dimension_2(); + const size_t n3 = v.dimension_3(); + const size_t n4 = v.dimension_4(); + const size_t n5 = v.dimension_5(); + const size_t n6 = v.dimension_6(); + const size_t n7 = v.dimension_7(); + + long offset = 0; + + for ( size_t i1 = 0; i1 < n1; ++i1 ) + for ( size_t i2 = 0; i2 < n2; ++i2 ) + for ( size_t i3 = 0; i3 < n3; ++i3 ) + for ( size_t i4 = 0; i4 < n4; ++i4 ) + for ( size_t i5 = 0; i5 < n5; ++i5 ) + for ( size_t i6 = 0; i6 < n6; ++i6 ) + for ( size_t i7 = 0; i7 < n7; ++i7 ) { - typename ViewType::value_type * const base_ptr = & v(0,0,0,0,0,0,0,0); - const size_t n1 = v.dimension_1(); - const size_t n2 = v.dimension_2(); - const size_t n3 = v.dimension_3(); - const size_t n4 = v.dimension_4(); - const size_t n5 = v.dimension_5(); - const size_t n6 = v.dimension_6(); - const size_t n7 = v.dimension_7(); - - long offset = 0 ; - - for ( size_t i1 = 0 ; i1 < n1 ; ++i1 ) - for ( size_t i2 = 0 ; i2 < n2 ; ++i2 ) - for ( size_t i3 = 0 ; i3 < n3 ; ++i3 ) - for ( size_t i4 = 0 ; i4 < n4 ; ++i4 ) - for ( size_t i5 = 0 ; i5 < n5 ; ++i5 ) - for ( size_t i6 = 0 ; i6 < n6 ; ++i6 ) - for ( size_t i7 = 0 ; i7 < n7 ; ++i7 ) - { - const long d = & v(i0,i1,i2,i3,i4,i5,i6,i7) - base_ptr ; - if ( d < offset ) ++error_count ; - offset = d ; - } - - if ( v.span() <= size_t(offset) ) ++error_count ; + const long d = & v( i0, i1, i2, i3, i4, i5, i6, i7 ) - base_ptr; + if ( d < offset ) ++error_count; + offset = d; } + if ( v.span() <= size_t( offset ) ) ++error_count; + } + KOKKOS_INLINE_FUNCTION - void operator()( size_t i , long & error_count ) const - { - if ( std::is_same< typename ViewType::array_layout , Kokkos::LayoutLeft >::value ) - test_left(i,error_count); - else if ( std::is_same< typename ViewType::array_layout , Kokkos::LayoutRight >::value ) - test_right(i,error_count); + void operator()( size_t i, long & error_count ) const + { + if ( std::is_same< typename ViewType::array_layout, Kokkos::LayoutLeft >::value ) { + test_left( i, error_count ); } + else if ( std::is_same< typename ViewType::array_layout, Kokkos::LayoutRight >::value ) { + test_right( i, error_count ); + } + } - constexpr static size_t N0 = 10 ; - constexpr static size_t N1 = 9 ; - constexpr static size_t N2 = 8 ; - constexpr static size_t N3 = 7 ; - constexpr static size_t N4 = 6 ; - constexpr static size_t N5 = 5 ; - constexpr static size_t N6 = 4 ; - constexpr static size_t N7 = 3 ; + constexpr static size_t N0 = 10; + constexpr static size_t N1 = 9; + constexpr static size_t N2 = 8; + constexpr static size_t N3 = 7; + constexpr static size_t N4 = 6; + constexpr static size_t N5 = 5; + constexpr static size_t N6 = 4; + constexpr static size_t N7 = 3; - TestViewMapOperator() : v( "Test" , N0, N1, N2, N3, N4, N5, N6, N7 ) {} + TestViewMapOperator() : v( "Test", N0, N1, N2, N3, N4, N5, N6, N7 ) {} static void run() - { - TestViewMapOperator self ; - - ASSERT_EQ( self.v.dimension_0() , ( 0 < ViewType::rank ? N0 : 1 ) ); - ASSERT_EQ( self.v.dimension_1() , ( 1 < ViewType::rank ? N1 : 1 ) ); - ASSERT_EQ( self.v.dimension_2() , ( 2 < ViewType::rank ? N2 : 1 ) ); - ASSERT_EQ( self.v.dimension_3() , ( 3 < ViewType::rank ? N3 : 1 ) ); - ASSERT_EQ( self.v.dimension_4() , ( 4 < ViewType::rank ? N4 : 1 ) ); - ASSERT_EQ( self.v.dimension_5() , ( 5 < ViewType::rank ? N5 : 1 ) ); - ASSERT_EQ( self.v.dimension_6() , ( 6 < ViewType::rank ? N6 : 1 ) ); - ASSERT_EQ( self.v.dimension_7() , ( 7 < ViewType::rank ? N7 : 1 ) ); - - ASSERT_LE( self.v.dimension_0()* - self.v.dimension_1()* - self.v.dimension_2()* - self.v.dimension_3()* - self.v.dimension_4()* - self.v.dimension_5()* - self.v.dimension_6()* - self.v.dimension_7() - , self.v.span() ); - - long error_count ; - Kokkos::RangePolicy< typename ViewType::execution_space > range(0,self.v.dimension_0()); - Kokkos::parallel_reduce( range , self , error_count ); - ASSERT_EQ( 0 , error_count ); - } + { + TestViewMapOperator self; + + ASSERT_EQ( self.v.dimension_0(), ( 0 < ViewType::rank ? N0 : 1 ) ); + ASSERT_EQ( self.v.dimension_1(), ( 1 < ViewType::rank ? N1 : 1 ) ); + ASSERT_EQ( self.v.dimension_2(), ( 2 < ViewType::rank ? N2 : 1 ) ); + ASSERT_EQ( self.v.dimension_3(), ( 3 < ViewType::rank ? N3 : 1 ) ); + ASSERT_EQ( self.v.dimension_4(), ( 4 < ViewType::rank ? N4 : 1 ) ); + ASSERT_EQ( self.v.dimension_5(), ( 5 < ViewType::rank ? N5 : 1 ) ); + ASSERT_EQ( self.v.dimension_6(), ( 6 < ViewType::rank ? N6 : 1 ) ); + ASSERT_EQ( self.v.dimension_7(), ( 7 < ViewType::rank ? N7 : 1 ) ); + + ASSERT_LE( self.v.dimension_0() * + self.v.dimension_1() * + self.v.dimension_2() * + self.v.dimension_3() * + self.v.dimension_4() * + self.v.dimension_5() * + self.v.dimension_6() * + self.v.dimension_7() + , self.v.span() ); + + long error_count; + Kokkos::RangePolicy< typename ViewType::execution_space > range( 0, self.v.dimension_0() ); + Kokkos::parallel_reduce( range, self, error_count ); + ASSERT_EQ( 0, error_count ); + } }; - template< class Space > void test_view_mapping_operator() { - typedef typename Space::execution_space ExecSpace ; - - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); - TestViewMapOperator< Kokkos::View >::run(); + typedef typename Space::execution_space ExecSpace; + + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); + TestViewMapOperator< Kokkos::View >::run(); } /*--------------------------------------------------------------------------*/ template< class Space > struct TestViewMappingAtomic { - typedef typename Space::execution_space ExecSpace ; - typedef typename Space::memory_space MemSpace ; + typedef typename Space::execution_space ExecSpace; + typedef typename Space::memory_space MemSpace; - typedef Kokkos::MemoryTraits< Kokkos::Atomic > mem_trait ; + typedef Kokkos::MemoryTraits< Kokkos::Atomic > mem_trait; - typedef Kokkos::View< int * , ExecSpace > T ; - typedef Kokkos::View< int * , ExecSpace , mem_trait > T_atom ; + typedef Kokkos::View< int *, ExecSpace > T; + typedef Kokkos::View< int *, ExecSpace, mem_trait > T_atom; - T x ; - T_atom x_atom ; + T x; + T_atom x_atom; - constexpr static size_t N = 100000 ; + constexpr static size_t N = 100000; struct TagInit {}; struct TagUpdate {}; struct TagVerify {}; KOKKOS_INLINE_FUNCTION - void operator()( const TagInit & , const int i ) const - { x(i) = i ; } + void operator()( const TagInit &, const int i ) const + { x( i ) = i; } KOKKOS_INLINE_FUNCTION - void operator()( const TagUpdate & , const int i ) const - { x_atom(i%2) += 1 ; } + void operator()( const TagUpdate &, const int i ) const + { x_atom( i % 2 ) += 1; } KOKKOS_INLINE_FUNCTION - void operator()( const TagVerify & , const int i , long & error_count ) const - { - if ( i < 2 ) { if ( x(i) != int(i + N / 2) ) ++error_count ; } - else { if ( x(i) != int(i) ) ++error_count ; } - } + void operator()( const TagVerify &, const int i, long & error_count ) const + { + if ( i < 2 ) { if ( x( i ) != int( i + N / 2 ) ) ++error_count; } + else { if ( x( i ) != int( i ) ) ++error_count; } + } TestViewMappingAtomic() - : x("x",N) + : x( "x", N ) , x_atom( x ) {} static void run() + { + ASSERT_TRUE( T::reference_type_is_lvalue_reference ); + ASSERT_FALSE( T_atom::reference_type_is_lvalue_reference ); + + TestViewMappingAtomic self; + + Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace, TagInit >( 0, N ), self ); + Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace, TagUpdate >( 0, N ), self ); + + long error_count = -1; + + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace, TagVerify >( 0, N ), self, error_count ); + + ASSERT_EQ( 0, error_count ); + + typename TestViewMappingAtomic::T_atom::HostMirror x_host = Kokkos::create_mirror_view( self.x ); + Kokkos::deep_copy( x_host, self.x ); + + error_count = -1; + + Kokkos::parallel_reduce( Kokkos::RangePolicy< Kokkos::DefaultHostExecutionSpace, TagVerify >( 0, N ), + [=] ( const TagVerify &, const int i, long & tmp_error_count ) { - ASSERT_TRUE( T::reference_type_is_lvalue_reference ); - ASSERT_FALSE( T_atom::reference_type_is_lvalue_reference ); - - TestViewMappingAtomic self ; - Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace , TagInit >(0,N) , self ); - Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace , TagUpdate >(0,N) , self ); - long error_count = -1 ; - Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace , TagVerify >(0,N) , self , error_count ); - ASSERT_EQ( 0 , error_count ); - typename TestViewMappingAtomic::T_atom::HostMirror x_host = Kokkos::create_mirror_view(self.x); - Kokkos::deep_copy(x_host,self.x); - error_count = -1; - Kokkos::parallel_reduce( Kokkos::RangePolicy< Kokkos::DefaultHostExecutionSpace, TagVerify>(0,N), - [=] ( const TagVerify & , const int i , long & tmp_error_count ) { - if ( i < 2 ) { if ( x_host(i) != int(i + N / 2) ) ++tmp_error_count ; } - else { if ( x_host(i) != int(i) ) ++tmp_error_count ; } - }, error_count); - ASSERT_EQ( 0 , error_count ); - Kokkos::deep_copy(self.x,x_host); - } + if ( i < 2 ) { + if ( x_host( i ) != int( i + N / 2 ) ) ++tmp_error_count ; + } + else { + if ( x_host( i ) != int( i ) ) ++tmp_error_count ; + } + }, error_count); + + ASSERT_EQ( 0 , error_count ); + Kokkos::deep_copy( self.x, x_host ); + } }; /*--------------------------------------------------------------------------*/ template< class Space > struct TestViewMappingClassValue { - typedef typename Space::execution_space ExecSpace ; - typedef typename Space::memory_space MemSpace ; + typedef typename Space::execution_space ExecSpace; + typedef typename Space::memory_space MemSpace; struct ValueType { KOKKOS_INLINE_FUNCTION @@ -1396,11 +1424,11 @@ struct TestViewMappingClassValue { { #if 0 #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) - printf("TestViewMappingClassValue construct on Cuda\n"); + printf( "TestViewMappingClassValue construct on Cuda\n" ); #elif defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - printf("TestViewMappingClassValue construct on Host\n"); + printf( "TestViewMappingClassValue construct on Host\n" ); #else - printf("TestViewMappingClassValue construct unknown\n"); + printf( "TestViewMappingClassValue construct unknown\n" ); #endif #endif } @@ -1409,11 +1437,11 @@ struct TestViewMappingClassValue { { #if 0 #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) - printf("TestViewMappingClassValue destruct on Cuda\n"); + printf( "TestViewMappingClassValue destruct on Cuda\n" ); #elif defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - printf("TestViewMappingClassValue destruct on Host\n"); + printf( "TestViewMappingClassValue destruct on Host\n" ); #else - printf("TestViewMappingClassValue destruct unknown\n"); + printf( "TestViewMappingClassValue destruct unknown\n" ); #endif #endif } @@ -1421,17 +1449,15 @@ struct TestViewMappingClassValue { static void run() { - using namespace Kokkos::Experimental ; + using namespace Kokkos::Experimental; + ExecSpace::fence(); { - View< ValueType , ExecSpace > a("a"); + View< ValueType, ExecSpace > a( "a" ); ExecSpace::fence(); } ExecSpace::fence(); } }; -} /* namespace Test */ - -/*--------------------------------------------------------------------------*/ - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/TestViewOfClass.hpp b/lib/kokkos/core/unit_test/TestViewOfClass.hpp index 381b8786bc..d624c5dda2 100644 --- a/lib/kokkos/core/unit_test/TestViewOfClass.hpp +++ b/lib/kokkos/core/unit_test/TestViewOfClass.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -48,34 +48,29 @@ #include #include -/*--------------------------------------------------------------------------*/ - namespace Test { template< class Space > struct NestedView { - - Kokkos::View member ; + Kokkos::View< int*, Space > member; public: - KOKKOS_INLINE_FUNCTION - NestedView() : member() - {} + NestedView() : member() {} KOKKOS_INLINE_FUNCTION - NestedView & operator = ( const Kokkos::View & lhs ) - { - member = lhs ; - if ( member.dimension_0() ) Kokkos::atomic_add( & member(0) , 1 ); - return *this ; - } + NestedView & operator=( const Kokkos::View< int*, Space > & lhs ) + { + member = lhs; + if ( member.dimension_0() ) Kokkos::atomic_add( & member( 0 ), 1 ); + return *this; + } KOKKOS_INLINE_FUNCTION ~NestedView() - { + { if ( member.dimension_0() ) { - Kokkos::atomic_add( & member(0) , -1 ); + Kokkos::atomic_add( & member( 0 ), -1 ); } } }; @@ -83,49 +78,44 @@ public: template< class Space > struct NestedViewFunctor { - Kokkos::View< NestedView * , Space > nested ; - Kokkos::View array ; + Kokkos::View< NestedView *, Space > nested; + Kokkos::View< int*, Space > array; - NestedViewFunctor( - const Kokkos::View< NestedView * , Space > & arg_nested , - const Kokkos::View & arg_array ) + NestedViewFunctor( + const Kokkos::View< NestedView *, Space > & arg_nested, + const Kokkos::View< int*, Space > & arg_array ) : nested( arg_nested ) , array( arg_array ) {} KOKKOS_INLINE_FUNCTION - void operator()( int i ) const - { nested[i] = array ; } + void operator()( int i ) const { nested[i] = array; } }; - template< class Space > void view_nested_view() { - Kokkos::View tracking("tracking",1); + Kokkos::View< int*, Space > tracking( "tracking", 1 ); - typename Kokkos::View::HostMirror - host_tracking = Kokkos::create_mirror( tracking ); + typename Kokkos::View< int*, Space >::HostMirror host_tracking = Kokkos::create_mirror( tracking ); { - Kokkos::View< NestedView * , Space > a("a_nested_view",2); + Kokkos::View< NestedView *, Space > a( "a_nested_view", 2 ); - Kokkos::parallel_for( Kokkos::RangePolicy(0,2) , NestedViewFunctor( a , tracking ) ); - Kokkos::deep_copy( host_tracking , tracking ); - ASSERT_EQ( 2 , host_tracking(0) ); + Kokkos::parallel_for( Kokkos::RangePolicy< Space >( 0, 2 ), NestedViewFunctor< Space >( a, tracking ) ); + Kokkos::deep_copy( host_tracking, tracking ); + ASSERT_EQ( 2, host_tracking( 0 ) ); - Kokkos::View< NestedView * , Space > b("b_nested_view",2); - Kokkos::parallel_for( Kokkos::RangePolicy(0,2) , NestedViewFunctor( b , tracking ) ); - Kokkos::deep_copy( host_tracking , tracking ); - ASSERT_EQ( 4 , host_tracking(0) ); + Kokkos::View< NestedView *, Space > b( "b_nested_view", 2 ); + Kokkos::parallel_for( Kokkos::RangePolicy< Space >( 0, 2 ), NestedViewFunctor< Space >( b, tracking ) ); + Kokkos::deep_copy( host_tracking, tracking ); + ASSERT_EQ( 4, host_tracking( 0 ) ); } - Kokkos::deep_copy( host_tracking , tracking ); - ASSERT_EQ( 0 , host_tracking(0) ); -} + Kokkos::deep_copy( host_tracking, tracking ); + ASSERT_EQ( 0, host_tracking( 0 ) ); } -/*--------------------------------------------------------------------------*/ - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/TestViewSpaceAssign.hpp b/lib/kokkos/core/unit_test/TestViewSpaceAssign.hpp index 09141e582c..21ae92e93c 100644 --- a/lib/kokkos/core/unit_test/TestViewSpaceAssign.hpp +++ b/lib/kokkos/core/unit_test/TestViewSpaceAssign.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -48,35 +48,29 @@ #include #include -/*--------------------------------------------------------------------------*/ - namespace Test { -template< typename SpaceDst , typename SpaceSrc > +template< typename SpaceDst, typename SpaceSrc > void view_space_assign() { - Kokkos::View a = - Kokkos::View("a",1); + Kokkos::View< double*, SpaceDst > a = + Kokkos::View< double*, SpaceSrc >( "a", 1 ); - Kokkos::View b = - Kokkos::View("b",1); + Kokkos::View< double*, Kokkos::LayoutLeft, SpaceDst > b = + Kokkos::View< double*, Kokkos::LayoutLeft, SpaceSrc >( "b", 1 ); - Kokkos::View c = - Kokkos::View("c",1); + Kokkos::View< double*, Kokkos::LayoutRight, SpaceDst > c = + Kokkos::View< double*, Kokkos::LayoutRight, SpaceSrc >( "c", 1 ); - Kokkos::View d = - Kokkos::View("d",1); + Kokkos::View< double*, SpaceDst, Kokkos::MemoryRandomAccess > d = + Kokkos::View< double*, SpaceSrc >( "d", 1 ); - Kokkos::View e = - Kokkos::View("e",1); + Kokkos::View< double*, Kokkos::LayoutLeft, SpaceDst, Kokkos::MemoryRandomAccess > e = + Kokkos::View< double*, Kokkos::LayoutLeft, SpaceSrc >( "e", 1 ); // Rank-one layout can assign: - Kokkos::View f = - Kokkos::View("f",1); + Kokkos::View< double*, Kokkos::LayoutRight, SpaceDst > f = + Kokkos::View< double*, Kokkos::LayoutLeft, SpaceSrc >( "f", 1 ); } - } // namespace Test - -/*--------------------------------------------------------------------------*/ - diff --git a/lib/kokkos/core/unit_test/TestViewSubview.hpp b/lib/kokkos/core/unit_test/TestViewSubview.hpp index 1c2575b6f6..386301b45d 100644 --- a/lib/kokkos/core/unit_test/TestViewSubview.hpp +++ b/lib/kokkos/core/unit_test/TestViewSubview.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -48,64 +48,68 @@ #include #include -/*--------------------------------------------------------------------------*/ - namespace TestViewSubview { -template +template< class Layout, class Space > struct getView { static - Kokkos::View get(int n, int m) { - return Kokkos::View("G",n,m); + Kokkos::View< double**, Layout, Space > get( int n, int m ) { + return Kokkos::View< double**, Layout, Space >( "G", n, m ); } }; -template -struct getView { +template< class Space > +struct getView< Kokkos::LayoutStride, Space > { static - Kokkos::View get(int n, int m) { - const int rank = 2 ; + Kokkos::View< double**, Kokkos::LayoutStride, Space > get( int n, int m ) { + const int rank = 2; const int order[] = { 0, 1 }; - const unsigned dim[] = { unsigned(n), unsigned(m) }; - Kokkos::LayoutStride stride = Kokkos::LayoutStride::order_dimensions( rank , order , dim ); - return Kokkos::View("G",stride); + const unsigned dim[] = { unsigned( n ), unsigned( m ) }; + Kokkos::LayoutStride stride = Kokkos::LayoutStride::order_dimensions( rank, order, dim ); + + return Kokkos::View< double**, Kokkos::LayoutStride, Space >( "G", stride ); } }; -template +template< class ViewType, class Space > struct fill_1D { typedef typename Space::execution_space execution_space; typedef typename ViewType::size_type size_type; + ViewType a; double val; - fill_1D(ViewType a_, double val_):a(a_),val(val_) { - } + + fill_1D( ViewType a_, double val_ ) : a( a_ ), val( val_ ) {} + KOKKOS_INLINE_FUNCTION - void operator() (const int i) const { - a(i) = val; - } + void operator()( const int i ) const { a( i ) = val; } }; -template +template< class ViewType, class Space > struct fill_2D { typedef typename Space::execution_space execution_space; typedef typename ViewType::size_type size_type; + ViewType a; double val; - fill_2D(ViewType a_, double val_):a(a_),val(val_) { - } + + fill_2D( ViewType a_, double val_ ) : a( a_ ), val( val_ ) {} + KOKKOS_INLINE_FUNCTION - void operator() (const int i) const{ - for(int j = 0; j < static_cast(a.dimension_1()); j++) - a(i,j) = val; + void operator()( const int i ) const + { + for ( int j = 0; j < static_cast< int >( a.dimension_1() ); j++ ) { + a( i, j ) = val; + } } }; -template +template< class Layout, class Space > void test_auto_1d () { - typedef Kokkos::View mv_type; + typedef Kokkos::View< double**, Layout, Space > mv_type; typedef typename mv_type::size_type size_type; + const double ZERO = 0.0; const double ONE = 1.0; const double TWO = 2.0; @@ -113,359 +117,359 @@ void test_auto_1d () const size_type numRows = 10; const size_type numCols = 3; - mv_type X = getView::get(numRows, numCols); - typename mv_type::HostMirror X_h = Kokkos::create_mirror_view (X); + mv_type X = getView< Layout, Space >::get( numRows, numCols ); + typename mv_type::HostMirror X_h = Kokkos::create_mirror_view( X ); - fill_2D f1(X, ONE); - Kokkos::parallel_for(X.dimension_0(),f1); - Kokkos::deep_copy (X_h, X); - for (size_type j = 0; j < numCols; ++j) { - for (size_type i = 0; i < numRows; ++i) { - ASSERT_TRUE(X_h(i,j) == ONE); + fill_2D< mv_type, Space > f1( X, ONE ); + Kokkos::parallel_for( X.dimension_0(), f1 ); + Kokkos::deep_copy( X_h, X ); + for ( size_type j = 0; j < numCols; ++j ) { + for ( size_type i = 0; i < numRows; ++i ) { + ASSERT_TRUE( X_h( i, j ) == ONE ); } } - fill_2D f2(X, 0.0); - Kokkos::parallel_for(X.dimension_0(),f2); - Kokkos::deep_copy (X_h, X); - for (size_type j = 0; j < numCols; ++j) { - for (size_type i = 0; i < numRows; ++i) { - ASSERT_TRUE(X_h(i,j) == ZERO); + fill_2D< mv_type, Space > f2( X, 0.0 ); + Kokkos::parallel_for( X.dimension_0(), f2 ); + Kokkos::deep_copy( X_h, X ); + for ( size_type j = 0; j < numCols; ++j ) { + for ( size_type i = 0; i < numRows; ++i ) { + ASSERT_TRUE( X_h( i, j ) == ZERO ); } } - fill_2D f3(X, TWO); - Kokkos::parallel_for(X.dimension_0(),f3); - Kokkos::deep_copy (X_h, X); - for (size_type j = 0; j < numCols; ++j) { - for (size_type i = 0; i < numRows; ++i) { - ASSERT_TRUE(X_h(i,j) == TWO); + fill_2D< mv_type, Space > f3( X, TWO ); + Kokkos::parallel_for( X.dimension_0(), f3 ); + Kokkos::deep_copy( X_h, X ); + for ( size_type j = 0; j < numCols; ++j ) { + for ( size_type i = 0; i < numRows; ++i ) { + ASSERT_TRUE( X_h( i, j ) == TWO ); } } - for (size_type j = 0; j < numCols; ++j) { - auto X_j = Kokkos::subview (X, Kokkos::ALL, j); + for ( size_type j = 0; j < numCols; ++j ) { + auto X_j = Kokkos::subview( X, Kokkos::ALL, j ); - fill_1D f4(X_j, ZERO); - Kokkos::parallel_for(X_j.dimension_0(),f4); - Kokkos::deep_copy (X_h, X); - for (size_type i = 0; i < numRows; ++i) { - ASSERT_TRUE(X_h(i,j) == ZERO); + fill_1D< decltype( X_j ), Space > f4( X_j, ZERO ); + Kokkos::parallel_for( X_j.dimension_0(), f4 ); + Kokkos::deep_copy( X_h, X ); + for ( size_type i = 0; i < numRows; ++i ) { + ASSERT_TRUE( X_h( i, j ) == ZERO ); } - for (size_type jj = 0; jj < numCols; ++jj) { - auto X_jj = Kokkos::subview (X, Kokkos::ALL, jj); - fill_1D f5(X_jj, ONE); - Kokkos::parallel_for(X_jj.dimension_0(),f5); - Kokkos::deep_copy (X_h, X); - for (size_type i = 0; i < numRows; ++i) { - ASSERT_TRUE(X_h(i,jj) == ONE); + for ( size_type jj = 0; jj < numCols; ++jj ) { + auto X_jj = Kokkos::subview ( X, Kokkos::ALL, jj ); + fill_1D< decltype( X_jj ), Space > f5( X_jj, ONE ); + Kokkos::parallel_for( X_jj.dimension_0(), f5 ); + Kokkos::deep_copy( X_h, X ); + for ( size_type i = 0; i < numRows; ++i ) { + ASSERT_TRUE( X_h( i, jj ) == ONE ); } } } } -template -void test_1d_strided_assignment_impl(bool a, bool b, bool c, bool d, int n, int m) { - Kokkos::View l2d("l2d",n,m); +template< class LD, class LS, class Space > +void test_1d_strided_assignment_impl( bool a, bool b, bool c, bool d, int n, int m ) { + Kokkos::View< double**, LS, Space > l2d( "l2d", n, m ); - int col = n>2?2:0; - int row = m>2?2:0; + int col = n > 2 ? 2 : 0; + int row = m > 2 ? 2 : 0; - if(Kokkos::Impl::SpaceAccessibility::accessible) { - if(a) { - Kokkos::View l1da = Kokkos::subview(l2d,Kokkos::ALL,row); - ASSERT_TRUE( & l1da(0) == & l2d(0,row) ); - if(n>1) - ASSERT_TRUE( & l1da(1) == & l2d(1,row) ); - } - if(b && n>13) { - Kokkos::View l1db = Kokkos::subview(l2d,std::pair(2,13),row); - ASSERT_TRUE( & l1db(0) == & l2d(2,row) ); - ASSERT_TRUE( & l1db(1) == & l2d(3,row) ); - } - if(c) { - Kokkos::View l1dc = Kokkos::subview(l2d,col,Kokkos::ALL); - ASSERT_TRUE( & l1dc(0) == & l2d(col,0) ); - if(m>1) - ASSERT_TRUE( & l1dc(1) == & l2d(col,1) ); - } - if(d && m>13) { - Kokkos::View l1dd = Kokkos::subview(l2d,col,std::pair(2,13)); - ASSERT_TRUE( & l1dd(0) == & l2d(col,2) ); - ASSERT_TRUE( & l1dd(1) == & l2d(col,3) ); - } + if ( Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace, typename Space::memory_space >::accessible ) { + if ( a ) { + Kokkos::View< double*, LD, Space > l1da = Kokkos::subview( l2d, Kokkos::ALL, row ); + ASSERT_TRUE( & l1da( 0 ) == & l2d( 0, row ) ); + if ( n > 1 ) { + ASSERT_TRUE( & l1da( 1 ) == & l2d( 1, row ) ); + } + } + + if ( b && n > 13 ) { + Kokkos::View< double*, LD, Space > l1db = Kokkos::subview( l2d, std::pair< unsigned, unsigned >( 2, 13 ), row ); + ASSERT_TRUE( & l1db( 0 ) == & l2d( 2, row ) ); + ASSERT_TRUE( & l1db( 1 ) == & l2d( 3, row ) ); + } + + if ( c ) { + Kokkos::View< double*, LD, Space > l1dc = Kokkos::subview( l2d, col, Kokkos::ALL ); + ASSERT_TRUE( & l1dc( 0 ) == & l2d( col, 0 ) ); + if( m > 1 ) { + ASSERT_TRUE( & l1dc( 1 ) == & l2d( col, 1 ) ); + } + } + + if ( d && m > 13 ) { + Kokkos::View< double*, LD, Space > l1dd = Kokkos::subview( l2d, col, std::pair< unsigned, unsigned >( 2, 13 ) ); + ASSERT_TRUE( & l1dd( 0 ) == & l2d( col, 2 ) ); + ASSERT_TRUE( & l1dd( 1 ) == & l2d( col, 3 ) ); + } } } -template +template< class Space > void test_1d_strided_assignment() { - test_1d_strided_assignment_impl(true,true,true,true,17,3); - test_1d_strided_assignment_impl(true,true,true,true,17,3); - - test_1d_strided_assignment_impl(true,true,false,false,17,3); - test_1d_strided_assignment_impl(true,true,false,false,17,3); - test_1d_strided_assignment_impl(false,false,true,true,17,3); - test_1d_strided_assignment_impl(false,false,true,true,17,3); - - test_1d_strided_assignment_impl(true,true,false,false,17,1); - test_1d_strided_assignment_impl(true,true,true,true,1,17); - test_1d_strided_assignment_impl(true,true,true,true,1,17); - test_1d_strided_assignment_impl(true,true,false,false,17,1); - - test_1d_strided_assignment_impl(true,true,true,true,17,1); - test_1d_strided_assignment_impl(false,false,true,true,1,17); - test_1d_strided_assignment_impl(false,false,true,true,1,17); - test_1d_strided_assignment_impl(true,true,true,true,17,1); + test_1d_strided_assignment_impl< Kokkos::LayoutStride, Kokkos::LayoutLeft, Space >( true, true, true, true, 17, 3 ); + test_1d_strided_assignment_impl< Kokkos::LayoutStride, Kokkos::LayoutRight, Space >( true, true, true, true, 17, 3 ); + + test_1d_strided_assignment_impl< Kokkos::LayoutLeft, Kokkos::LayoutLeft, Space >( true, true, false, false, 17, 3 ); + test_1d_strided_assignment_impl< Kokkos::LayoutRight, Kokkos::LayoutLeft, Space >( true, true, false, false, 17, 3 ); + test_1d_strided_assignment_impl< Kokkos::LayoutLeft, Kokkos::LayoutRight, Space >( false, false, true, true, 17, 3 ); + test_1d_strided_assignment_impl< Kokkos::LayoutRight, Kokkos::LayoutRight, Space >( false, false, true, true, 17, 3 ); + + test_1d_strided_assignment_impl< Kokkos::LayoutLeft, Kokkos::LayoutLeft, Space >( true, true, false, false, 17, 1 ); + test_1d_strided_assignment_impl< Kokkos::LayoutLeft, Kokkos::LayoutLeft, Space >( true, true, true, true, 1, 17 ); + test_1d_strided_assignment_impl< Kokkos::LayoutRight, Kokkos::LayoutLeft, Space >( true, true, true, true, 1, 17 ); + test_1d_strided_assignment_impl< Kokkos::LayoutRight, Kokkos::LayoutLeft, Space >( true, true, false, false, 17, 1 ); + + test_1d_strided_assignment_impl< Kokkos::LayoutLeft, Kokkos::LayoutRight, Space >( true, true, true, true, 17, 1 ); + test_1d_strided_assignment_impl< Kokkos::LayoutLeft, Kokkos::LayoutRight, Space >( false, false, true, true, 1, 17 ); + test_1d_strided_assignment_impl< Kokkos::LayoutRight, Kokkos::LayoutRight, Space >( false, false, true, true, 1, 17 ); + test_1d_strided_assignment_impl< Kokkos::LayoutRight, Kokkos::LayoutRight, Space >( true, true, true, true, 17, 1 ); } template< class Space > void test_left_0() { - typedef Kokkos::View< int [2][3][4][5][2][3][4][5] , Kokkos::LayoutLeft , Space > - view_static_8_type ; - - if(Kokkos::Impl::SpaceAccessibility::accessible) { + typedef Kokkos::View< int [2][3][4][5][2][3][4][5], Kokkos::LayoutLeft, Space > view_static_8_type; - view_static_8_type x_static_8("x_static_left_8"); + if ( Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace, typename Space::memory_space >::accessible ) { + view_static_8_type x_static_8( "x_static_left_8" ); - ASSERT_TRUE( x_static_8.is_contiguous() ); + ASSERT_TRUE( x_static_8.is_contiguous() ); - Kokkos::View x0 = Kokkos::subview( x_static_8 , 0, 0, 0, 0, 0, 0, 0, 0 ); + Kokkos::View< int, Kokkos::LayoutLeft, Space > x0 = Kokkos::subview( x_static_8, 0, 0, 0, 0, 0, 0, 0, 0 ); - ASSERT_TRUE( x0.is_contiguous() ); - ASSERT_TRUE( & x0() == & x_static_8(0,0,0,0,0,0,0,0) ); + ASSERT_TRUE( x0.is_contiguous() ); + ASSERT_TRUE( & x0() == & x_static_8( 0, 0, 0, 0, 0, 0, 0, 0 ) ); - Kokkos::View x1 = - Kokkos::subview( x_static_8, Kokkos::pair(0,2), 1, 2, 3, 0, 1, 2, 3 ); + Kokkos::View< int*, Kokkos::LayoutLeft, Space > x1 = + Kokkos::subview( x_static_8, Kokkos::pair< int, int >( 0, 2 ), 1, 2, 3, 0, 1, 2, 3 ); - ASSERT_TRUE( x1.is_contiguous() ); - ASSERT_TRUE( & x1(0) == & x_static_8(0,1,2,3,0,1,2,3) ); - ASSERT_TRUE( & x1(1) == & x_static_8(1,1,2,3,0,1,2,3) ); + ASSERT_TRUE( x1.is_contiguous() ); + ASSERT_TRUE( & x1( 0 ) == & x_static_8( 0, 1, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & x1( 1 ) == & x_static_8( 1, 1, 2, 3, 0, 1, 2, 3 ) ); - Kokkos::View x2 = - Kokkos::subview( x_static_8, Kokkos::pair(0,2), 1, 2, 3 - , Kokkos::pair(0,2), 1, 2, 3 ); + Kokkos::View< int**, Kokkos::LayoutLeft, Space > x2 = + Kokkos::subview( x_static_8, Kokkos::pair< int, int >( 0, 2 ), 1, 2, 3 + , Kokkos::pair< int, int >( 0, 2 ), 1, 2, 3 ); - ASSERT_TRUE( ! x2.is_contiguous() ); - ASSERT_TRUE( & x2(0,0) == & x_static_8(0,1,2,3,0,1,2,3) ); - ASSERT_TRUE( & x2(1,0) == & x_static_8(1,1,2,3,0,1,2,3) ); - ASSERT_TRUE( & x2(0,1) == & x_static_8(0,1,2,3,1,1,2,3) ); - ASSERT_TRUE( & x2(1,1) == & x_static_8(1,1,2,3,1,1,2,3) ); + ASSERT_TRUE( ! x2.is_contiguous() ); + ASSERT_TRUE( & x2( 0, 0 ) == & x_static_8( 0, 1, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & x2( 1, 0 ) == & x_static_8( 1, 1, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & x2( 0, 1 ) == & x_static_8( 0, 1, 2, 3, 1, 1, 2, 3 ) ); + ASSERT_TRUE( & x2( 1, 1 ) == & x_static_8( 1, 1, 2, 3, 1, 1, 2, 3 ) ); - // Kokkos::View error_2 = - Kokkos::View sx2 = - Kokkos::subview( x_static_8, 1, Kokkos::pair(0,2), 2, 3 - , Kokkos::pair(0,2), 1, 2, 3 ); + // Kokkos::View< int**, Kokkos::LayoutLeft, Space > error_2 = + Kokkos::View< int**, Kokkos::LayoutStride, Space > sx2 = + Kokkos::subview( x_static_8, 1, Kokkos::pair< int, int >( 0, 2 ), 2, 3 + , Kokkos::pair< int, int >( 0, 2 ), 1, 2, 3 ); - ASSERT_TRUE( ! sx2.is_contiguous() ); - ASSERT_TRUE( & sx2(0,0) == & x_static_8(1,0,2,3,0,1,2,3) ); - ASSERT_TRUE( & sx2(1,0) == & x_static_8(1,1,2,3,0,1,2,3) ); - ASSERT_TRUE( & sx2(0,1) == & x_static_8(1,0,2,3,1,1,2,3) ); - ASSERT_TRUE( & sx2(1,1) == & x_static_8(1,1,2,3,1,1,2,3) ); + ASSERT_TRUE( ! sx2.is_contiguous() ); + ASSERT_TRUE( & sx2( 0, 0 ) == & x_static_8( 1, 0, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 1, 0 ) == & x_static_8( 1, 1, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 0, 1 ) == & x_static_8( 1, 0, 2, 3, 1, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 1, 1 ) == & x_static_8( 1, 1, 2, 3, 1, 1, 2, 3 ) ); - Kokkos::View sx4 = - Kokkos::subview( x_static_8, 0, Kokkos::pair(0,2) /* of [3] */ - , 1, Kokkos::pair(1,3) /* of [5] */ - , 1, Kokkos::pair(0,2) /* of [3] */ - , 2, Kokkos::pair(2,4) /* of [5] */ - ); + Kokkos::View< int****, Kokkos::LayoutStride, Space > sx4 = + Kokkos::subview( x_static_8, 0, Kokkos::pair< int, int >( 0, 2 ) /* of [3] */ + , 1, Kokkos::pair< int, int >( 1, 3 ) /* of [5] */ + , 1, Kokkos::pair< int, int >( 0, 2 ) /* of [3] */ + , 2, Kokkos::pair< int, int >( 2, 4 ) /* of [5] */ + ); - ASSERT_TRUE( ! sx4.is_contiguous() ); - - for ( int i0 = 0 ; i0 < (int) sx4.dimension_0() ; ++i0 ) - for ( int i1 = 0 ; i1 < (int) sx4.dimension_1() ; ++i1 ) - for ( int i2 = 0 ; i2 < (int) sx4.dimension_2() ; ++i2 ) - for ( int i3 = 0 ; i3 < (int) sx4.dimension_3() ; ++i3 ) { - ASSERT_TRUE( & sx4(i0,i1,i2,i3) == & x_static_8(0,0+i0, 1,1+i1, 1,0+i2, 2,2+i3) ); - } + ASSERT_TRUE( ! sx4.is_contiguous() ); + for ( int i0 = 0; i0 < (int) sx4.dimension_0(); ++i0 ) + for ( int i1 = 0; i1 < (int) sx4.dimension_1(); ++i1 ) + for ( int i2 = 0; i2 < (int) sx4.dimension_2(); ++i2 ) + for ( int i3 = 0; i3 < (int) sx4.dimension_3(); ++i3 ) + { + ASSERT_TRUE( & sx4( i0, i1, i2, i3 ) == & x_static_8( 0, 0 + i0, 1, 1 + i1, 1, 0 + i2, 2, 2 + i3 ) ); + } } } template< class Space > void test_left_1() { - typedef Kokkos::View< int ****[2][3][4][5] , Kokkos::LayoutLeft , Space > - view_type ; - - if(Kokkos::Impl::SpaceAccessibility::accessible) { + typedef Kokkos::View< int ****[2][3][4][5], Kokkos::LayoutLeft, Space > view_type; - view_type x8("x_left_8",2,3,4,5); + if ( Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace, typename Space::memory_space >::accessible ) { + view_type x8( "x_left_8", 2, 3, 4, 5 ); - ASSERT_TRUE( x8.is_contiguous() ); + ASSERT_TRUE( x8.is_contiguous() ); - Kokkos::View x0 = Kokkos::subview( x8 , 0, 0, 0, 0, 0, 0, 0, 0 ); + Kokkos::View< int, Kokkos::LayoutLeft, Space > x0 = Kokkos::subview( x8, 0, 0, 0, 0, 0, 0, 0, 0 ); - ASSERT_TRUE( x0.is_contiguous() ); - ASSERT_TRUE( & x0() == & x8(0,0,0,0,0,0,0,0) ); + ASSERT_TRUE( x0.is_contiguous() ); + ASSERT_TRUE( & x0() == & x8( 0, 0, 0, 0, 0, 0, 0, 0 ) ); - Kokkos::View x1 = - Kokkos::subview( x8, Kokkos::pair(0,2), 1, 2, 3, 0, 1, 2, 3 ); + Kokkos::View< int*, Kokkos::LayoutLeft, Space > x1 = + Kokkos::subview( x8, Kokkos::pair< int, int >( 0, 2 ), 1, 2, 3, 0, 1, 2, 3 ); - ASSERT_TRUE( x1.is_contiguous() ); - ASSERT_TRUE( & x1(0) == & x8(0,1,2,3,0,1,2,3) ); - ASSERT_TRUE( & x1(1) == & x8(1,1,2,3,0,1,2,3) ); + ASSERT_TRUE( x1.is_contiguous() ); + ASSERT_TRUE( & x1( 0 ) == & x8( 0, 1, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & x1( 1 ) == & x8( 1, 1, 2, 3, 0, 1, 2, 3 ) ); - Kokkos::View x2 = - Kokkos::subview( x8, Kokkos::pair(0,2), 1, 2, 3 - , Kokkos::pair(0,2), 1, 2, 3 ); + Kokkos::View< int**, Kokkos::LayoutLeft, Space > x2 = + Kokkos::subview( x8, Kokkos::pair< int, int >( 0, 2 ), 1, 2, 3 + , Kokkos::pair< int, int >( 0, 2 ), 1, 2, 3 ); - ASSERT_TRUE( ! x2.is_contiguous() ); - ASSERT_TRUE( & x2(0,0) == & x8(0,1,2,3,0,1,2,3) ); - ASSERT_TRUE( & x2(1,0) == & x8(1,1,2,3,0,1,2,3) ); - ASSERT_TRUE( & x2(0,1) == & x8(0,1,2,3,1,1,2,3) ); - ASSERT_TRUE( & x2(1,1) == & x8(1,1,2,3,1,1,2,3) ); + ASSERT_TRUE( ! x2.is_contiguous() ); + ASSERT_TRUE( & x2( 0, 0 ) == & x8( 0, 1, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & x2( 1, 0 ) == & x8( 1, 1, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & x2( 0, 1 ) == & x8( 0, 1, 2, 3, 1, 1, 2, 3 ) ); + ASSERT_TRUE( & x2( 1, 1 ) == & x8( 1, 1, 2, 3, 1, 1, 2, 3 ) ); - // Kokkos::View error_2 = - Kokkos::View sx2 = - Kokkos::subview( x8, 1, Kokkos::pair(0,2), 2, 3 - , Kokkos::pair(0,2), 1, 2, 3 ); + // Kokkos::View< int**, Kokkos::LayoutLeft, Space > error_2 = + Kokkos::View< int**, Kokkos::LayoutStride, Space > sx2 = + Kokkos::subview( x8, 1, Kokkos::pair< int, int >( 0, 2 ), 2, 3 + , Kokkos::pair< int, int >( 0, 2 ), 1, 2, 3 ); - ASSERT_TRUE( ! sx2.is_contiguous() ); - ASSERT_TRUE( & sx2(0,0) == & x8(1,0,2,3,0,1,2,3) ); - ASSERT_TRUE( & sx2(1,0) == & x8(1,1,2,3,0,1,2,3) ); - ASSERT_TRUE( & sx2(0,1) == & x8(1,0,2,3,1,1,2,3) ); - ASSERT_TRUE( & sx2(1,1) == & x8(1,1,2,3,1,1,2,3) ); + ASSERT_TRUE( ! sx2.is_contiguous() ); + ASSERT_TRUE( & sx2( 0, 0 ) == & x8( 1, 0, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 1, 0 ) == & x8( 1, 1, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 0, 1 ) == & x8( 1, 0, 2, 3, 1, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 1, 1 ) == & x8( 1, 1, 2, 3, 1, 1, 2, 3 ) ); - Kokkos::View sx4 = - Kokkos::subview( x8, 0, Kokkos::pair(0,2) /* of [3] */ - , 1, Kokkos::pair(1,3) /* of [5] */ - , 1, Kokkos::pair(0,2) /* of [3] */ - , 2, Kokkos::pair(2,4) /* of [5] */ - ); + Kokkos::View< int****, Kokkos::LayoutStride, Space > sx4 = + Kokkos::subview( x8, 0, Kokkos::pair< int, int >( 0, 2 ) /* of [3] */ + , 1, Kokkos::pair< int, int >( 1, 3 ) /* of [5] */ + , 1, Kokkos::pair< int, int >( 0, 2 ) /* of [3] */ + , 2, Kokkos::pair< int, int >( 2, 4 ) /* of [5] */ + ); - ASSERT_TRUE( ! sx4.is_contiguous() ); - - for ( int i0 = 0 ; i0 < (int) sx4.dimension_0() ; ++i0 ) - for ( int i1 = 0 ; i1 < (int) sx4.dimension_1() ; ++i1 ) - for ( int i2 = 0 ; i2 < (int) sx4.dimension_2() ; ++i2 ) - for ( int i3 = 0 ; i3 < (int) sx4.dimension_3() ; ++i3 ) { - ASSERT_TRUE( & sx4(i0,i1,i2,i3) == & x8(0,0+i0, 1,1+i1, 1,0+i2, 2,2+i3) ); - } + ASSERT_TRUE( ! sx4.is_contiguous() ); + for ( int i0 = 0; i0 < (int) sx4.dimension_0(); ++i0 ) + for ( int i1 = 0; i1 < (int) sx4.dimension_1(); ++i1 ) + for ( int i2 = 0; i2 < (int) sx4.dimension_2(); ++i2 ) + for ( int i3 = 0; i3 < (int) sx4.dimension_3(); ++i3 ) + { + ASSERT_TRUE( & sx4( i0, i1, i2, i3 ) == & x8( 0, 0 + i0, 1, 1 + i1, 1, 0 + i2, 2, 2 + i3 ) ); + } } } template< class Space > void test_left_2() { - typedef Kokkos::View< int **** , Kokkos::LayoutLeft , Space > view_type ; - - if(Kokkos::Impl::SpaceAccessibility::accessible) { - - view_type x4("x4",2,3,4,5); - - ASSERT_TRUE( x4.is_contiguous() ); - - Kokkos::View x0 = Kokkos::subview( x4 , 0, 0, 0, 0 ); - - ASSERT_TRUE( x0.is_contiguous() ); - ASSERT_TRUE( & x0() == & x4(0,0,0,0) ); - - Kokkos::View x1 = - Kokkos::subview( x4, Kokkos::pair(0,2), 1, 2, 3 ); - - ASSERT_TRUE( x1.is_contiguous() ); - ASSERT_TRUE( & x1(0) == & x4(0,1,2,3) ); - ASSERT_TRUE( & x1(1) == & x4(1,1,2,3) ); - - Kokkos::View x2 = - Kokkos::subview( x4, Kokkos::pair(0,2), 1, Kokkos::pair(1,3), 2 ); - - ASSERT_TRUE( ! x2.is_contiguous() ); - ASSERT_TRUE( & x2(0,0) == & x4(0,1,1,2) ); - ASSERT_TRUE( & x2(1,0) == & x4(1,1,1,2) ); - ASSERT_TRUE( & x2(0,1) == & x4(0,1,2,2) ); - ASSERT_TRUE( & x2(1,1) == & x4(1,1,2,2) ); - - // Kokkos::View error_2 = - Kokkos::View sx2 = - Kokkos::subview( x4, 1, Kokkos::pair(0,2) - , 2, Kokkos::pair(1,4) ); - - ASSERT_TRUE( ! sx2.is_contiguous() ); - ASSERT_TRUE( & sx2(0,0) == & x4(1,0,2,1) ); - ASSERT_TRUE( & sx2(1,0) == & x4(1,1,2,1) ); - ASSERT_TRUE( & sx2(0,1) == & x4(1,0,2,2) ); - ASSERT_TRUE( & sx2(1,1) == & x4(1,1,2,2) ); - ASSERT_TRUE( & sx2(0,2) == & x4(1,0,2,3) ); - ASSERT_TRUE( & sx2(1,2) == & x4(1,1,2,3) ); - - Kokkos::View sx4 = - Kokkos::subview( x4, Kokkos::pair(1,2) /* of [2] */ - , Kokkos::pair(1,3) /* of [3] */ - , Kokkos::pair(0,4) /* of [4] */ - , Kokkos::pair(2,4) /* of [5] */ - ); - - ASSERT_TRUE( ! sx4.is_contiguous() ); - - for ( int i0 = 0 ; i0 < (int) sx4.dimension_0() ; ++i0 ) - for ( int i1 = 0 ; i1 < (int) sx4.dimension_1() ; ++i1 ) - for ( int i2 = 0 ; i2 < (int) sx4.dimension_2() ; ++i2 ) - for ( int i3 = 0 ; i3 < (int) sx4.dimension_3() ; ++i3 ) { - ASSERT_TRUE( & sx4(i0,i1,i2,i3) == & x4( 1+i0, 1+i1, 0+i2, 2+i3 ) ); - } - + typedef Kokkos::View< int ****, Kokkos::LayoutLeft, Space > view_type; + + if ( Kokkos::Impl::SpaceAccessibility::accessible ) { + view_type x4( "x4", 2, 3, 4, 5 ); + + ASSERT_TRUE( x4.is_contiguous() ); + + Kokkos::View< int, Kokkos::LayoutLeft, Space > x0 = Kokkos::subview( x4, 0, 0, 0, 0 ); + + ASSERT_TRUE( x0.is_contiguous() ); + ASSERT_TRUE( & x0() == & x4( 0, 0, 0, 0 ) ); + + Kokkos::View< int*, Kokkos::LayoutLeft, Space > x1 = + Kokkos::subview( x4, Kokkos::pair< int, int >( 0, 2 ), 1, 2, 3 ); + + ASSERT_TRUE( x1.is_contiguous() ); + ASSERT_TRUE( & x1( 0 ) == & x4( 0, 1, 2, 3 ) ); + ASSERT_TRUE( & x1( 1 ) == & x4( 1, 1, 2, 3 ) ); + + Kokkos::View< int**, Kokkos::LayoutLeft, Space > x2 = + Kokkos::subview( x4, Kokkos::pair< int, int >( 0, 2 ), 1 + , Kokkos::pair< int, int >( 1, 3 ), 2 ); + + ASSERT_TRUE( ! x2.is_contiguous() ); + ASSERT_TRUE( & x2( 0, 0 ) == & x4( 0, 1, 1, 2 ) ); + ASSERT_TRUE( & x2( 1, 0 ) == & x4( 1, 1, 1, 2 ) ); + ASSERT_TRUE( & x2( 0, 1 ) == & x4( 0, 1, 2, 2 ) ); + ASSERT_TRUE( & x2( 1, 1 ) == & x4( 1, 1, 2, 2 ) ); + + // Kokkos::View< int**, Kokkos::LayoutLeft, Space > error_2 = + Kokkos::View< int**, Kokkos::LayoutStride, Space > sx2 = + Kokkos::subview( x4, 1, Kokkos::pair< int, int >( 0, 2 ) + , 2, Kokkos::pair< int, int >( 1, 4 ) ); + + ASSERT_TRUE( ! sx2.is_contiguous() ); + ASSERT_TRUE( & sx2( 0, 0 ) == & x4( 1, 0, 2, 1 ) ); + ASSERT_TRUE( & sx2( 1, 0 ) == & x4( 1, 1, 2, 1 ) ); + ASSERT_TRUE( & sx2( 0, 1 ) == & x4( 1, 0, 2, 2 ) ); + ASSERT_TRUE( & sx2( 1, 1 ) == & x4( 1, 1, 2, 2 ) ); + ASSERT_TRUE( & sx2( 0, 2 ) == & x4( 1, 0, 2, 3 ) ); + ASSERT_TRUE( & sx2( 1, 2 ) == & x4( 1, 1, 2, 3 ) ); + + Kokkos::View< int****, Kokkos::LayoutStride, Space > sx4 = + Kokkos::subview( x4, Kokkos::pair< int, int >( 1, 2 ) /* of [2] */ + , Kokkos::pair< int, int >( 1, 3 ) /* of [3] */ + , Kokkos::pair< int, int >( 0, 4 ) /* of [4] */ + , Kokkos::pair< int, int >( 2, 4 ) /* of [5] */ + ); + + ASSERT_TRUE( ! sx4.is_contiguous() ); + + for ( int i0 = 0; i0 < (int) sx4.dimension_0(); ++i0 ) + for ( int i1 = 0; i1 < (int) sx4.dimension_1(); ++i1 ) + for ( int i2 = 0; i2 < (int) sx4.dimension_2(); ++i2 ) + for ( int i3 = 0; i3 < (int) sx4.dimension_3(); ++i3 ) + { + ASSERT_TRUE( & sx4( i0, i1, i2, i3 ) == & x4( 1 + i0, 1 + i1, 0 + i2, 2 + i3 ) ); + } } } template< class Space > void test_left_3() { - typedef Kokkos::View< int ** , Kokkos::LayoutLeft , Space > view_type ; - - if(Kokkos::Impl::SpaceAccessibility::accessible) { + typedef Kokkos::View< int **, Kokkos::LayoutLeft, Space > view_type; - view_type xm("x4",10,5); + if ( Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace, typename Space::memory_space >::accessible ) { + view_type xm( "x4", 10, 5 ); - ASSERT_TRUE( xm.is_contiguous() ); + ASSERT_TRUE( xm.is_contiguous() ); - Kokkos::View x0 = Kokkos::subview( xm , 5, 3 ); + Kokkos::View< int, Kokkos::LayoutLeft, Space > x0 = Kokkos::subview( xm, 5, 3 ); - ASSERT_TRUE( x0.is_contiguous() ); - ASSERT_TRUE( & x0() == & xm(5,3) ); + ASSERT_TRUE( x0.is_contiguous() ); + ASSERT_TRUE( & x0() == & xm( 5, 3 ) ); - Kokkos::View x1 = - Kokkos::subview( xm, Kokkos::ALL, 3 ); + Kokkos::View< int*, Kokkos::LayoutLeft, Space > x1 = Kokkos::subview( xm, Kokkos::ALL, 3 ); - ASSERT_TRUE( x1.is_contiguous() ); - for ( int i = 0 ; i < int(xm.dimension_0()) ; ++i ) { - ASSERT_TRUE( & x1(i) == & xm(i,3) ); - } - - Kokkos::View x2 = - Kokkos::subview( xm, Kokkos::pair(1,9), Kokkos::ALL ); + ASSERT_TRUE( x1.is_contiguous() ); + for ( int i = 0; i < int( xm.dimension_0() ); ++i ) { + ASSERT_TRUE( & x1( i ) == & xm( i, 3 ) ); + } - ASSERT_TRUE( ! x2.is_contiguous() ); - for ( int j = 0 ; j < int(x2.dimension_1()) ; ++j ) - for ( int i = 0 ; i < int(x2.dimension_0()) ; ++i ) { - ASSERT_TRUE( & x2(i,j) == & xm(1+i,j) ); - } + Kokkos::View< int**, Kokkos::LayoutLeft, Space > x2 = + Kokkos::subview( xm, Kokkos::pair< int, int >( 1, 9 ), Kokkos::ALL ); - Kokkos::View x2c = - Kokkos::subview( xm, Kokkos::ALL, std::pair(2,4) ); + ASSERT_TRUE( ! x2.is_contiguous() ); + for ( int j = 0; j < int( x2.dimension_1() ); ++j ) + for ( int i = 0; i < int( x2.dimension_0() ); ++i ) + { + ASSERT_TRUE( & x2( i, j ) == & xm( 1 + i, j ) ); + } - ASSERT_TRUE( x2c.is_contiguous() ); - for ( int j = 0 ; j < int(x2c.dimension_1()) ; ++j ) - for ( int i = 0 ; i < int(x2c.dimension_0()) ; ++i ) { - ASSERT_TRUE( & x2c(i,j) == & xm(i,2+j) ); - } + Kokkos::View< int**, Kokkos::LayoutLeft, Space > x2c = + Kokkos::subview( xm, Kokkos::ALL, std::pair< int, int >( 2, 4 ) ); - Kokkos::View x2_n1 = - Kokkos::subview( xm , std::pair(1,1) , Kokkos::ALL ); + ASSERT_TRUE( x2c.is_contiguous() ); + for ( int j = 0; j < int( x2c.dimension_1() ); ++j ) + for ( int i = 0; i < int( x2c.dimension_0() ); ++i ) + { + ASSERT_TRUE( & x2c( i, j ) == & xm( i, 2 + j ) ); + } - ASSERT_TRUE( x2_n1.dimension_0() == 0 ); - ASSERT_TRUE( x2_n1.dimension_1() == xm.dimension_1() ); + Kokkos::View< int**, Kokkos::LayoutLeft, Space > x2_n1 = + Kokkos::subview( xm, std::pair< int, int >( 1, 1 ), Kokkos::ALL ); - Kokkos::View x2_n2 = - Kokkos::subview( xm , Kokkos::ALL , std::pair(1,1) ); + ASSERT_TRUE( x2_n1.dimension_0() == 0 ); + ASSERT_TRUE( x2_n1.dimension_1() == xm.dimension_1() ); - ASSERT_TRUE( x2_n2.dimension_0() == xm.dimension_0() ); - ASSERT_TRUE( x2_n2.dimension_1() == 0 ); + Kokkos::View< int**, Kokkos::LayoutLeft, Space > x2_n2 = + Kokkos::subview( xm, Kokkos::ALL, std::pair< int, int >( 1, 1 ) ); + ASSERT_TRUE( x2_n2.dimension_0() == xm.dimension_0() ); + ASSERT_TRUE( x2_n2.dimension_1() == 0 ); } } @@ -474,766 +478,814 @@ void test_left_3() template< class Space > void test_right_0() { - typedef Kokkos::View< int [2][3][4][5][2][3][4][5] , Kokkos::LayoutRight , Space > - view_static_8_type ; - - if(Kokkos::Impl::SpaceAccessibility::accessible) { - - view_static_8_type x_static_8("x_static_right_8"); - - Kokkos::View x0 = Kokkos::subview( x_static_8 , 0, 0, 0, 0, 0, 0, 0, 0 ); - - ASSERT_TRUE( & x0() == & x_static_8(0,0,0,0,0,0,0,0) ); - - Kokkos::View x1 = - Kokkos::subview( x_static_8, 0, 1, 2, 3, 0, 1, 2, Kokkos::pair(1,3) ); - - ASSERT_TRUE( x1.dimension_0() == 2 ); - ASSERT_TRUE( & x1(0) == & x_static_8(0,1,2,3,0,1,2,1) ); - ASSERT_TRUE( & x1(1) == & x_static_8(0,1,2,3,0,1,2,2) ); - - Kokkos::View x2 = - Kokkos::subview( x_static_8, 0, 1, 2, Kokkos::pair(1,3) - , 0, 1, 2, Kokkos::pair(1,3) ); - - ASSERT_TRUE( x2.dimension_0() == 2 ); - ASSERT_TRUE( x2.dimension_1() == 2 ); - ASSERT_TRUE( & x2(0,0) == & x_static_8(0,1,2,1,0,1,2,1) ); - ASSERT_TRUE( & x2(1,0) == & x_static_8(0,1,2,2,0,1,2,1) ); - ASSERT_TRUE( & x2(0,1) == & x_static_8(0,1,2,1,0,1,2,2) ); - ASSERT_TRUE( & x2(1,1) == & x_static_8(0,1,2,2,0,1,2,2) ); - - // Kokkos::View error_2 = - Kokkos::View sx2 = - Kokkos::subview( x_static_8, 1, Kokkos::pair(0,2), 2, 3 - , Kokkos::pair(0,2), 1, 2, 3 ); - - ASSERT_TRUE( sx2.dimension_0() == 2 ); - ASSERT_TRUE( sx2.dimension_1() == 2 ); - ASSERT_TRUE( & sx2(0,0) == & x_static_8(1,0,2,3,0,1,2,3) ); - ASSERT_TRUE( & sx2(1,0) == & x_static_8(1,1,2,3,0,1,2,3) ); - ASSERT_TRUE( & sx2(0,1) == & x_static_8(1,0,2,3,1,1,2,3) ); - ASSERT_TRUE( & sx2(1,1) == & x_static_8(1,1,2,3,1,1,2,3) ); - - Kokkos::View sx4 = - Kokkos::subview( x_static_8, 0, Kokkos::pair(0,2) /* of [3] */ - , 1, Kokkos::pair(1,3) /* of [5] */ - , 1, Kokkos::pair(0,2) /* of [3] */ - , 2, Kokkos::pair(2,4) /* of [5] */ - ); - - ASSERT_TRUE( sx4.dimension_0() == 2 ); - ASSERT_TRUE( sx4.dimension_1() == 2 ); - ASSERT_TRUE( sx4.dimension_2() == 2 ); - ASSERT_TRUE( sx4.dimension_3() == 2 ); - for ( int i0 = 0 ; i0 < (int) sx4.dimension_0() ; ++i0 ) - for ( int i1 = 0 ; i1 < (int) sx4.dimension_1() ; ++i1 ) - for ( int i2 = 0 ; i2 < (int) sx4.dimension_2() ; ++i2 ) - for ( int i3 = 0 ; i3 < (int) sx4.dimension_3() ; ++i3 ) { - ASSERT_TRUE( & sx4(i0,i1,i2,i3) == & x_static_8(0, 0+i0, 1, 1+i1, 1, 0+i2, 2, 2+i3) ); - } - + typedef Kokkos::View< int [2][3][4][5][2][3][4][5], Kokkos::LayoutRight, Space > view_static_8_type; + + if ( Kokkos::Impl::SpaceAccessibility::accessible ) { + view_static_8_type x_static_8( "x_static_right_8" ); + + Kokkos::View< int, Kokkos::LayoutRight, Space > x0 = Kokkos::subview( x_static_8, 0, 0, 0, 0, 0, 0, 0, 0 ); + + ASSERT_TRUE( & x0() == & x_static_8( 0, 0, 0, 0, 0, 0, 0, 0 ) ); + + Kokkos::View< int*, Kokkos::LayoutRight, Space > x1 = + Kokkos::subview( x_static_8, 0, 1, 2, 3, 0, 1, 2, Kokkos::pair< int, int >( 1, 3 ) ); + + ASSERT_TRUE( x1.dimension_0() == 2 ); + ASSERT_TRUE( & x1( 0 ) == & x_static_8( 0, 1, 2, 3, 0, 1, 2, 1 ) ); + ASSERT_TRUE( & x1( 1 ) == & x_static_8( 0, 1, 2, 3, 0, 1, 2, 2 ) ); + + Kokkos::View< int**, Kokkos::LayoutRight, Space > x2 = + Kokkos::subview( x_static_8, 0, 1, 2, Kokkos::pair< int, int >( 1, 3 ) + , 0, 1, 2, Kokkos::pair< int, int >( 1, 3 ) ); + + ASSERT_TRUE( x2.dimension_0() == 2 ); + ASSERT_TRUE( x2.dimension_1() == 2 ); + ASSERT_TRUE( & x2( 0, 0 ) == & x_static_8( 0, 1, 2, 1, 0, 1, 2, 1 ) ); + ASSERT_TRUE( & x2( 1, 0 ) == & x_static_8( 0, 1, 2, 2, 0, 1, 2, 1 ) ); + ASSERT_TRUE( & x2( 0, 1 ) == & x_static_8( 0, 1, 2, 1, 0, 1, 2, 2 ) ); + ASSERT_TRUE( & x2( 1, 1 ) == & x_static_8( 0, 1, 2, 2, 0, 1, 2, 2 ) ); + + // Kokkos::View< int**, Kokkos::LayoutRight, Space > error_2 = + Kokkos::View< int**, Kokkos::LayoutStride, Space > sx2 = + Kokkos::subview( x_static_8, 1, Kokkos::pair< int, int >( 0, 2 ), 2, 3 + , Kokkos::pair< int, int >( 0, 2 ), 1, 2, 3 ); + + ASSERT_TRUE( sx2.dimension_0() == 2 ); + ASSERT_TRUE( sx2.dimension_1() == 2 ); + ASSERT_TRUE( & sx2( 0, 0 ) == & x_static_8( 1, 0, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 1, 0 ) == & x_static_8( 1, 1, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 0, 1 ) == & x_static_8( 1, 0, 2, 3, 1, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 1, 1 ) == & x_static_8( 1, 1, 2, 3, 1, 1, 2, 3 ) ); + + Kokkos::View< int****, Kokkos::LayoutStride, Space > sx4 = + Kokkos::subview( x_static_8, 0, Kokkos::pair< int, int >( 0, 2 ) /* of [3] */ + , 1, Kokkos::pair< int, int >( 1, 3 ) /* of [5] */ + , 1, Kokkos::pair< int, int >( 0, 2 ) /* of [3] */ + , 2, Kokkos::pair< int, int >( 2, 4 ) /* of [5] */ + ); + + ASSERT_TRUE( sx4.dimension_0() == 2 ); + ASSERT_TRUE( sx4.dimension_1() == 2 ); + ASSERT_TRUE( sx4.dimension_2() == 2 ); + ASSERT_TRUE( sx4.dimension_3() == 2 ); + for ( int i0 = 0; i0 < (int) sx4.dimension_0(); ++i0 ) + for ( int i1 = 0; i1 < (int) sx4.dimension_1(); ++i1 ) + for ( int i2 = 0; i2 < (int) sx4.dimension_2(); ++i2 ) + for ( int i3 = 0; i3 < (int) sx4.dimension_3(); ++i3 ) + { + ASSERT_TRUE( & sx4( i0, i1, i2, i3 ) == & x_static_8( 0, 0 + i0, 1, 1 + i1, 1, 0 + i2, 2, 2 + i3 ) ); + } } } template< class Space > void test_right_1() { - typedef Kokkos::View< int ****[2][3][4][5] , Kokkos::LayoutRight , Space > - view_type ; - - if(Kokkos::Impl::SpaceAccessibility::accessible) { + typedef Kokkos::View< int ****[2][3][4][5], Kokkos::LayoutRight, Space > view_type; - view_type x8("x_right_8",2,3,4,5); + if ( Kokkos::Impl::SpaceAccessibility::accessible ) { + view_type x8( "x_right_8", 2, 3, 4, 5 ); - Kokkos::View x0 = Kokkos::subview( x8 , 0, 0, 0, 0, 0, 0, 0, 0 ); + Kokkos::View< int, Kokkos::LayoutRight, Space > x0 = Kokkos::subview( x8, 0, 0, 0, 0, 0, 0, 0, 0 ); - ASSERT_TRUE( & x0() == & x8(0,0,0,0,0,0,0,0) ); + ASSERT_TRUE( & x0() == & x8( 0, 0, 0, 0, 0, 0, 0, 0 ) ); - Kokkos::View x1 = - Kokkos::subview( x8, 0, 1, 2, 3, 0, 1, 2, Kokkos::pair(1,3) ); + Kokkos::View< int*, Kokkos::LayoutRight, Space > x1 = + Kokkos::subview( x8, 0, 1, 2, 3, 0, 1, 2, Kokkos::pair< int, int >( 1, 3 ) ); - ASSERT_TRUE( & x1(0) == & x8(0,1,2,3,0,1,2,1) ); - ASSERT_TRUE( & x1(1) == & x8(0,1,2,3,0,1,2,2) ); + ASSERT_TRUE( & x1( 0 ) == & x8( 0, 1, 2, 3, 0, 1, 2, 1 ) ); + ASSERT_TRUE( & x1( 1 ) == & x8( 0, 1, 2, 3, 0, 1, 2, 2 ) ); - Kokkos::View x2 = - Kokkos::subview( x8, 0, 1, 2, Kokkos::pair(1,3) - , 0, 1, 2, Kokkos::pair(1,3) ); + Kokkos::View< int**, Kokkos::LayoutRight, Space > x2 = + Kokkos::subview( x8, 0, 1, 2, Kokkos::pair< int, int >( 1, 3 ) + , 0, 1, 2, Kokkos::pair< int, int >( 1, 3 ) ); - ASSERT_TRUE( & x2(0,0) == & x8(0,1,2,1,0,1,2,1) ); - ASSERT_TRUE( & x2(1,0) == & x8(0,1,2,2,0,1,2,1) ); - ASSERT_TRUE( & x2(0,1) == & x8(0,1,2,1,0,1,2,2) ); - ASSERT_TRUE( & x2(1,1) == & x8(0,1,2,2,0,1,2,2) ); + ASSERT_TRUE( & x2( 0, 0 ) == & x8( 0, 1, 2, 1, 0, 1, 2, 1 ) ); + ASSERT_TRUE( & x2( 1, 0 ) == & x8( 0, 1, 2, 2, 0, 1, 2, 1 ) ); + ASSERT_TRUE( & x2( 0, 1 ) == & x8( 0, 1, 2, 1, 0, 1, 2, 2 ) ); + ASSERT_TRUE( & x2( 1, 1 ) == & x8( 0, 1, 2, 2, 0, 1, 2, 2 ) ); - // Kokkos::View error_2 = - Kokkos::View sx2 = - Kokkos::subview( x8, 1, Kokkos::pair(0,2), 2, 3 - , Kokkos::pair(0,2), 1, 2, 3 ); + // Kokkos::View< int**, Kokkos::LayoutRight, Space > error_2 = + Kokkos::View< int**, Kokkos::LayoutStride, Space > sx2 = + Kokkos::subview( x8, 1, Kokkos::pair< int, int >( 0, 2 ), 2, 3 + , Kokkos::pair< int, int >( 0, 2 ), 1, 2, 3 ); - ASSERT_TRUE( & sx2(0,0) == & x8(1,0,2,3,0,1,2,3) ); - ASSERT_TRUE( & sx2(1,0) == & x8(1,1,2,3,0,1,2,3) ); - ASSERT_TRUE( & sx2(0,1) == & x8(1,0,2,3,1,1,2,3) ); - ASSERT_TRUE( & sx2(1,1) == & x8(1,1,2,3,1,1,2,3) ); + ASSERT_TRUE( & sx2( 0, 0 ) == & x8( 1, 0, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 1, 0 ) == & x8( 1, 1, 2, 3, 0, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 0, 1 ) == & x8( 1, 0, 2, 3, 1, 1, 2, 3 ) ); + ASSERT_TRUE( & sx2( 1, 1 ) == & x8( 1, 1, 2, 3, 1, 1, 2, 3 ) ); - Kokkos::View sx4 = - Kokkos::subview( x8, 0, Kokkos::pair(0,2) /* of [3] */ - , 1, Kokkos::pair(1,3) /* of [5] */ - , 1, Kokkos::pair(0,2) /* of [3] */ - , 2, Kokkos::pair(2,4) /* of [5] */ - ); - - for ( int i0 = 0 ; i0 < (int) sx4.dimension_0() ; ++i0 ) - for ( int i1 = 0 ; i1 < (int) sx4.dimension_1() ; ++i1 ) - for ( int i2 = 0 ; i2 < (int) sx4.dimension_2() ; ++i2 ) - for ( int i3 = 0 ; i3 < (int) sx4.dimension_3() ; ++i3 ) { - ASSERT_TRUE( & sx4(i0,i1,i2,i3) == & x8(0,0+i0, 1,1+i1, 1,0+i2, 2,2+i3) ); - } + Kokkos::View< int****, Kokkos::LayoutStride, Space > sx4 = + Kokkos::subview( x8, 0, Kokkos::pair< int, int >( 0, 2 ) /* of [3] */ + , 1, Kokkos::pair< int, int >( 1, 3 ) /* of [5] */ + , 1, Kokkos::pair< int, int >( 0, 2 ) /* of [3] */ + , 2, Kokkos::pair< int, int >( 2, 4 ) /* of [5] */ + ); + for ( int i0 = 0; i0 < (int) sx4.dimension_0(); ++i0 ) + for ( int i1 = 0; i1 < (int) sx4.dimension_1(); ++i1 ) + for ( int i2 = 0; i2 < (int) sx4.dimension_2(); ++i2 ) + for ( int i3 = 0; i3 < (int) sx4.dimension_3(); ++i3 ) + { + ASSERT_TRUE( & sx4( i0, i1, i2, i3 ) == & x8( 0, 0 + i0, 1, 1 + i1, 1, 0 + i2, 2, 2 + i3 ) ); + } } } template< class Space > void test_right_3() { - typedef Kokkos::View< int ** , Kokkos::LayoutRight , Space > view_type ; - - if(Kokkos::Impl::SpaceAccessibility::accessible) { + typedef Kokkos::View< int **, Kokkos::LayoutRight, Space > view_type; - view_type xm("x4",10,5); + if ( Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace, typename Space::memory_space >::accessible ) { + view_type xm( "x4", 10, 5 ); - ASSERT_TRUE( xm.is_contiguous() ); + ASSERT_TRUE( xm.is_contiguous() ); - Kokkos::View x0 = Kokkos::subview( xm , 5, 3 ); + Kokkos::View< int, Kokkos::LayoutRight, Space > x0 = Kokkos::subview( xm, 5, 3 ); - ASSERT_TRUE( x0.is_contiguous() ); - ASSERT_TRUE( & x0() == & xm(5,3) ); + ASSERT_TRUE( x0.is_contiguous() ); + ASSERT_TRUE( & x0() == & xm( 5, 3 ) ); - Kokkos::View x1 = - Kokkos::subview( xm, 3, Kokkos::ALL ); - - ASSERT_TRUE( x1.is_contiguous() ); - for ( int i = 0 ; i < int(xm.dimension_1()) ; ++i ) { - ASSERT_TRUE( & x1(i) == & xm(3,i) ); - } + Kokkos::View< int*, Kokkos::LayoutRight, Space > x1 = Kokkos::subview( xm, 3, Kokkos::ALL ); - Kokkos::View x2c = - Kokkos::subview( xm, Kokkos::pair(1,9), Kokkos::ALL ); + ASSERT_TRUE( x1.is_contiguous() ); + for ( int i = 0; i < int( xm.dimension_1() ); ++i ) { + ASSERT_TRUE( & x1( i ) == & xm( 3, i ) ); + } - ASSERT_TRUE( x2c.is_contiguous() ); - for ( int j = 0 ; j < int(x2c.dimension_1()) ; ++j ) - for ( int i = 0 ; i < int(x2c.dimension_0()) ; ++i ) { - ASSERT_TRUE( & x2c(i,j) == & xm(1+i,j) ); - } + Kokkos::View< int**, Kokkos::LayoutRight, Space > x2c = + Kokkos::subview( xm, Kokkos::pair< int, int >( 1, 9 ), Kokkos::ALL ); - Kokkos::View x2 = - Kokkos::subview( xm, Kokkos::ALL, std::pair(2,4) ); + ASSERT_TRUE( x2c.is_contiguous() ); + for ( int j = 0; j < int( x2c.dimension_1() ); ++j ) + for ( int i = 0; i < int( x2c.dimension_0() ); ++i ) { + ASSERT_TRUE( & x2c( i, j ) == & xm( 1 + i, j ) ); + } - ASSERT_TRUE( ! x2.is_contiguous() ); - for ( int j = 0 ; j < int(x2.dimension_1()) ; ++j ) - for ( int i = 0 ; i < int(x2.dimension_0()) ; ++i ) { - ASSERT_TRUE( & x2(i,j) == & xm(i,2+j) ); - } + Kokkos::View< int**, Kokkos::LayoutRight, Space > x2 = + Kokkos::subview( xm, Kokkos::ALL, std::pair< int, int >( 2, 4 ) ); - Kokkos::View x2_n1 = - Kokkos::subview( xm , std::pair(1,1) , Kokkos::ALL ); + ASSERT_TRUE( ! x2.is_contiguous() ); + for ( int j = 0; j < int( x2.dimension_1() ); ++j ) + for ( int i = 0; i < int( x2.dimension_0() ); ++i ) + { + ASSERT_TRUE( & x2( i, j ) == & xm( i, 2 + j ) ); + } - ASSERT_TRUE( x2_n1.dimension_0() == 0 ); - ASSERT_TRUE( x2_n1.dimension_1() == xm.dimension_1() ); + Kokkos::View< int**, Kokkos::LayoutRight, Space > x2_n1 = + Kokkos::subview( xm, std::pair< int, int >( 1, 1 ), Kokkos::ALL ); - Kokkos::View x2_n2 = - Kokkos::subview( xm , Kokkos::ALL , std::pair(1,1) ); + ASSERT_TRUE( x2_n1.dimension_0() == 0 ); + ASSERT_TRUE( x2_n1.dimension_1() == xm.dimension_1() ); - ASSERT_TRUE( x2_n2.dimension_0() == xm.dimension_0() ); - ASSERT_TRUE( x2_n2.dimension_1() == 0 ); + Kokkos::View< int**, Kokkos::LayoutRight, Space > x2_n2 = + Kokkos::subview( xm, Kokkos::ALL, std::pair< int, int >( 1, 1 ) ); + ASSERT_TRUE( x2_n2.dimension_0() == xm.dimension_0() ); + ASSERT_TRUE( x2_n2.dimension_1() == 0 ); } } namespace Impl { -constexpr int N0=113; -constexpr int N1=11; -constexpr int N2=17; -constexpr int N3=5; -constexpr int N4=7; +constexpr int N0 = 113; +constexpr int N1 = 11; +constexpr int N2 = 17; +constexpr int N3 = 5; +constexpr int N4 = 7; -template -void test_Check1D(SubView a, View b, std::pair range) { +template< class SubView, class View > +void test_Check1D( SubView a, View b, std::pair< int, int > range ) { int errors = 0; - for(int i=0;i 0 ) { + std::cout << "Error Suviews test_Check1D: " << errors << std::endl; } - if(errors>0) - std::cout << "Error Suviews test_Check1D: " << errors < -void test_Check1D2D(SubView a, View b, int i0, std::pair range) { +template< class SubView, class View > +void test_Check1D2D( SubView a, View b, int i0, std::pair< int, int > range ) { int errors = 0; - for(int i1=0;i10) - std::cout << "Error Suviews test_Check1D2D: " << errors < 0 ) { + std::cout << "Error Suviews test_Check1D2D: " << errors << std::endl; + } + ASSERT_TRUE( errors == 0 ); } -template -void test_Check2D3D(SubView a, View b, int i0, std::pair range1, std::pair range2) { +template< class SubView, class View > +void test_Check2D3D( SubView a, View b, int i0, std::pair< int, int > range1 + , std::pair< int, int > range2 ) +{ int errors = 0; - for(int i1=0;i10) - std::cout << "Error Suviews test_Check2D3D: " << errors < 0 ) { + std::cout << "Error Suviews test_Check2D3D: " << errors << std::endl; + } + ASSERT_TRUE( errors == 0 ); } -template -void test_Check3D5D(SubView a, View b, int i0, int i1, std::pair range2, std::pair range3, std::pair range4) { +template +void test_Check3D5D( SubView a, View b, int i0, int i1, std::pair< int, int > range2 + , std::pair< int, int > range3, std::pair< int, int > range4 ) +{ int errors = 0; - for(int i2=0;i20) - std::cout << "Error Suviews test_Check3D5D: " << errors < 0 ) { + std::cout << "Error Suviews test_Check3D5D: " << errors << std::endl; + } + ASSERT_TRUE( errors == 0 ); } -template +template< class Space, class LayoutSub, class Layout, class LayoutOrg, class MemTraits > void test_1d_assign_impl() { - - { //Breaks - Kokkos::View a_org("A",N0); - Kokkos::View a(a_org); + { // Breaks. + Kokkos::View< int*, LayoutOrg, Space > a_org( "A", N0 ); + Kokkos::View< int*, LayoutOrg, Space, MemTraits > a( a_org ); Kokkos::fence(); - for(int i=0; i a1(a); + Kokkos::View< int[N0], Layout, Space, MemTraits > a1( a ); Kokkos::fence(); - test_Check1D(a1,a,std::pair(0,N0)); + test_Check1D( a1, a, std::pair< int, int >( 0, N0 ) ); - Kokkos::View a2(a1); + Kokkos::View< int[N0], LayoutSub, Space, MemTraits > a2( a1 ); Kokkos::fence(); - test_Check1D(a2,a,std::pair(0,N0)); + test_Check1D( a2, a, std::pair< int, int >( 0, N0 ) ); a1 = a; - test_Check1D(a1,a,std::pair(0,N0)); + test_Check1D( a1, a, std::pair< int, int >( 0, N0 ) ); - //Runtime Fail expected - //Kokkos::View afail1(a); + // Runtime Fail expected. + //Kokkos::View< int[N1] > afail1( a ); - //Compile Time Fail expected - //Kokkos::View afail2(a1); + // Compile Time Fail expected. + //Kokkos::View< int[N1] > afail2( a1 ); } - { // Works - Kokkos::View a("A"); - Kokkos::View a1(a); + { // Works. + Kokkos::View< int[N0], LayoutOrg, Space, MemTraits > a( "A" ); + Kokkos::View< int*, Layout, Space, MemTraits > a1( a ); Kokkos::fence(); - test_Check1D(a1,a,std::pair(0,N0)); + test_Check1D( a1, a, std::pair< int, int >( 0, N0 ) ); a1 = a; Kokkos::fence(); - test_Check1D(a1,a,std::pair(0,N0)); + test_Check1D( a1, a, std::pair< int, int >( 0, N0 ) ); } } -template +template< class Space, class Type, class TypeSub, class LayoutSub, class Layout, class LayoutOrg, class MemTraits > void test_2d_subview_3d_impl_type() { - Kokkos::View a_org("A",N0,N1,N2); - Kokkos::View a(a_org); - for(int i0=0; i0 a1; - a1 = Kokkos::subview(a,3,Kokkos::ALL,Kokkos::ALL); + Kokkos::View< int***, LayoutOrg, Space > a_org( "A", N0, N1, N2 ); + Kokkos::View< Type, Layout, Space, MemTraits > a( a_org ); + + for ( int i0 = 0; i0 < N0; i0++ ) + for ( int i1 = 0; i1 < N1; i1++ ) + for ( int i2 = 0; i2 < N2; i2++ ) + { + a_org( i0, i1, i2 ) = i0 * 1000000 + i1 * 1000 + i2; + } + + Kokkos::View< TypeSub, LayoutSub, Space, MemTraits > a1; + a1 = Kokkos::subview( a, 3, Kokkos::ALL, Kokkos::ALL ); Kokkos::fence(); - test_Check2D3D(a1,a,3,std::pair(0,N1),std::pair(0,N2)); + test_Check2D3D( a1, a, 3, std::pair< int, int >( 0, N1 ), std::pair< int, int >( 0, N2 ) ); - Kokkos::View a2(a,3,Kokkos::ALL,Kokkos::ALL); + Kokkos::View< TypeSub, LayoutSub, Space, MemTraits > a2( a, 3, Kokkos::ALL, Kokkos::ALL ); Kokkos::fence(); - test_Check2D3D(a2,a,3,std::pair(0,N1),std::pair(0,N2)); + test_Check2D3D( a2, a, 3, std::pair< int, int >( 0, N1 ), std::pair< int, int >( 0, N2 ) ); } -template +template< class Space, class LayoutSub, class Layout, class LayoutOrg, class MemTraits > void test_2d_subview_3d_impl_layout() { - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); + test_2d_subview_3d_impl_type< Space, int[N0][N1][N2], int[N1][N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, int[N0][N1][N2], int* [N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, int[N0][N1][N2], int** , LayoutSub, Layout, LayoutOrg, MemTraits >(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); + test_2d_subview_3d_impl_type< Space, int* [N1][N2], int[N1][N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, int* [N1][N2], int* [N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, int* [N1][N2], int** , LayoutSub, Layout, LayoutOrg, MemTraits >(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); + test_2d_subview_3d_impl_type< Space, int** [N2], int[N1][N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, int** [N2], int* [N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, int** [N2], int** , LayoutSub, Layout, LayoutOrg, MemTraits >(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); + test_2d_subview_3d_impl_type< Space, int*** , int[N1][N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, int*** , int* [N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, int*** , int** , LayoutSub, Layout, LayoutOrg, MemTraits >(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); + test_2d_subview_3d_impl_type< Space, const int[N0][N1][N2], const int[N1][N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, const int[N0][N1][N2], const int* [N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, const int[N0][N1][N2], const int** , LayoutSub, Layout, LayoutOrg, MemTraits >(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); + test_2d_subview_3d_impl_type< Space, const int* [N1][N2], const int[N1][N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, const int* [N1][N2], const int* [N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, const int* [N1][N2], const int** , LayoutSub, Layout, LayoutOrg, MemTraits >(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); + test_2d_subview_3d_impl_type< Space, const int** [N2], const int[N1][N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, const int** [N2], const int* [N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, const int** [N2], const int** , LayoutSub, Layout, LayoutOrg, MemTraits >(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); - test_2d_subview_3d_impl_type(); + test_2d_subview_3d_impl_type< Space, const int*** , const int[N1][N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, const int*** , const int* [N2], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_2d_subview_3d_impl_type< Space, const int*** , const int** , LayoutSub, Layout, LayoutOrg, MemTraits >(); } -template +template< class Space, class Type, class TypeSub, class LayoutSub, class Layout, class LayoutOrg, class MemTraits > void test_3d_subview_5d_impl_type() { - Kokkos::View a_org("A",N0,N1,N2,N3,N4); - Kokkos::View a(a_org); - for(int i0=0; i0 a1; - a1 = Kokkos::subview(a,3,5,Kokkos::ALL,Kokkos::ALL,Kokkos::ALL); + Kokkos::View< int*****, LayoutOrg, Space > a_org( "A", N0, N1, N2, N3, N4 ); + Kokkos::View< Type, Layout, Space, MemTraits > a( a_org ); + + for ( int i0 = 0; i0 < N0; i0++ ) + for ( int i1 = 0; i1 < N1; i1++ ) + for ( int i2 = 0; i2 < N2; i2++ ) + for ( int i3 = 0; i3 < N3; i3++ ) + for ( int i4 = 0; i4 < N4; i4++ ) + { + a_org( i0, i1, i2, i3, i4 ) = i0 * 1000000 + i1 * 10000 + i2 * 100 + i3 * 10 + i4; + } + + Kokkos::View< TypeSub, LayoutSub, Space, MemTraits > a1; + a1 = Kokkos::subview( a, 3, 5, Kokkos::ALL, Kokkos::ALL, Kokkos::ALL ); Kokkos::fence(); - test_Check3D5D(a1,a,3,5,std::pair(0,N2),std::pair(0,N3),std::pair(0,N4)); + test_Check3D5D( a1, a, 3, 5, std::pair< int, int >( 0, N2 ), std::pair< int, int >( 0, N3 ), std::pair< int, int >( 0, N4 ) ); - Kokkos::View a2(a,3,5,Kokkos::ALL,Kokkos::ALL,Kokkos::ALL); + Kokkos::View< TypeSub, LayoutSub, Space, MemTraits > a2( a, 3, 5, Kokkos::ALL, Kokkos::ALL, Kokkos::ALL ); Kokkos::fence(); - test_Check3D5D(a2,a,3,5,std::pair(0,N2),std::pair(0,N3),std::pair(0,N4)); + test_Check3D5D( a2, a, 3, 5, std::pair< int, int >( 0, N2 ), std::pair< int, int >( 0, N3 ), std::pair< int, int >( 0, N4 ) ); } -template +template< class Space, class LayoutSub, class Layout, class LayoutOrg, class MemTraits > void test_3d_subview_5d_impl_layout() { - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); - test_3d_subview_5d_impl_type(); + test_3d_subview_5d_impl_type< Space, int[N0][N1][N2][N3][N4], int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int[N0][N1][N2][N3][N4], int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int[N0][N1][N2][N3][N4], int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int[N0][N1][N2][N3][N4], int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); + + test_3d_subview_5d_impl_type< Space, int* [N1][N2][N3][N4], int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int* [N1][N2][N3][N4], int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int* [N1][N2][N3][N4], int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int* [N1][N2][N3][N4], int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); + + test_3d_subview_5d_impl_type< Space, int** [N2][N3][N4], int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int** [N2][N3][N4], int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int** [N2][N3][N4], int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int** [N2][N3][N4], int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); + + test_3d_subview_5d_impl_type< Space, int*** [N3][N4], int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int*** [N3][N4], int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int*** [N3][N4], int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int*** [N3][N4], int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); + + test_3d_subview_5d_impl_type< Space, int**** [N4], int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int**** [N4], int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int**** [N4], int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int**** [N4], int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); + + test_3d_subview_5d_impl_type< Space, int***** , int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int***** , int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int***** , int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, int***** , int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); + + test_3d_subview_5d_impl_type< Space, const int[N0][N1][N2][N3][N4], const int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int[N0][N1][N2][N3][N4], const int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int[N0][N1][N2][N3][N4], const int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int[N0][N1][N2][N3][N4], const int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); + + test_3d_subview_5d_impl_type< Space, const int* [N1][N2][N3][N4], const int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int* [N1][N2][N3][N4], const int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int* [N1][N2][N3][N4], const int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int* [N1][N2][N3][N4], const int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); + + test_3d_subview_5d_impl_type< Space, const int** [N2][N3][N4], const int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int** [N2][N3][N4], const int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int** [N2][N3][N4], const int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int** [N2][N3][N4], const int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); + + test_3d_subview_5d_impl_type< Space, const int*** [N3][N4], const int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int*** [N3][N4], const int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int*** [N3][N4], const int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int*** [N3][N4], const int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); + + test_3d_subview_5d_impl_type< Space, const int**** [N4], const int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int**** [N4], const int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int**** [N4], const int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int**** [N4], const int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); + + test_3d_subview_5d_impl_type< Space, const int***** , const int[N2][N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int***** , const int* [N3][N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int***** , const int** [N4], LayoutSub, Layout, LayoutOrg, MemTraits >(); + test_3d_subview_5d_impl_type< Space, const int***** , const int*** , LayoutSub, Layout, LayoutOrg, MemTraits >(); } inline void test_subview_legal_args_right() { - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::pair,int,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::Impl::ALL_t,int,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::pair,int,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::Impl::ALL_t,int,int>::value)); - - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::Impl::ALL_t,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::Impl::ALL_t,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::pair,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::Impl::ALL_t,Kokkos::pair,int>::value)); - - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,Kokkos::pair,int>::value)); - - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::Impl::ALL_t,int>::value)); - - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int,Kokkos::Impl::ALL_t>::value)); - - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime>::value)); - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::pair>::value)); - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::Impl::ALL_t>::value)); - - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime>::value)); - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::pair>::value)); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::pair, int, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::pair, int, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::Impl::ALL_t, int, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::pair, int, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, Kokkos::pair, Kokkos::pair, int, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, Kokkos::pair, Kokkos::Impl::ALL_t, int, int >::value ) ); + + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, int, Kokkos::pair, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, int, Kokkos::pair, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, int, Kokkos::Impl::ALL_t, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, int, Kokkos::pair, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, int, Kokkos::Impl::ALL_t, Kokkos::pair, int >::value ) ); + + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::pair, int, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::pair, int, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, Kokkos::Impl::ALL_t, int, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, Kokkos::pair, int, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, Kokkos::pair, Kokkos::Impl::ALL_t, int, Kokkos::pair, int >::value ) ); + + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::pair, Kokkos::pair, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::pair, Kokkos::pair, Kokkos::Impl::ALL_t, int >::value ) ); + + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::pair, int, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::pair, int, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::pair, Kokkos::Impl::ALL_t, int, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::pair, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::pair, Kokkos::pair, int, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, Kokkos::pair, Kokkos::pair, int, Kokkos::Impl::ALL_t >::value ) ); + + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::pair >::value ) ); + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, int, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, int, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, int, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::pair >::value ) ); + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, int, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, int, Kokkos::pair, Kokkos::pair, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 5, 0, int, int, Kokkos::pair, Kokkos::pair, Kokkos::Impl::ALL_t >::value ) ); + + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 3, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 3, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::pair >::value ) ); + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 3, 0, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 3, 0, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 3, 0, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 3, 0, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 3, 0, Kokkos::pair, Kokkos::pair, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutRight, Kokkos::LayoutRight, 3, 3, 0, Kokkos::pair, Kokkos::pair, Kokkos::pair >::value ) ); } inline void test_subview_legal_args_left() { - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,int>::value)); - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,int>::value)); - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::pair,int,int>::value)); - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::Impl::ALL_t,int,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::pair,int,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::Impl::ALL_t,int,int>::value)); - - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::Impl::ALL_t,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::Impl::ALL_t,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::pair,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::Impl::ALL_t,Kokkos::pair,int>::value)); - - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,Kokkos::pair,int>::value)); - - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::Impl::ALL_t,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::pair,int>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::Impl::ALL_t,int>::value)); - - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,int,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,int,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,int,Kokkos::Impl::ALL_t>::value)); - - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::Impl::ALL_t>::value)); - - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime>::value)); - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime::value)); - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::pair>::value)); - ASSERT_EQ(1,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::Impl::ALL_t>::value)); - ASSERT_EQ(0,(Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime,Kokkos::pair,Kokkos::pair>::value)); + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::pair, int, int >::value ) ); + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::pair, int, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::Impl::ALL_t, int, int >::value ) ); + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::pair, int, int >::value ) ); + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, Kokkos::pair, Kokkos::pair, int, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, Kokkos::pair, Kokkos::Impl::ALL_t, int, int >::value ) ); + + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, int, Kokkos::pair, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, int, Kokkos::pair, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, int, Kokkos::Impl::ALL_t, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, int, Kokkos::pair, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, int, Kokkos::Impl::ALL_t, Kokkos::pair, int >::value ) ); + + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::pair, int, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::Impl::ALL_t, Kokkos::pair, int, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, Kokkos::Impl::ALL_t, int, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, Kokkos::pair, int, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, Kokkos::pair, Kokkos::Impl::ALL_t, int, Kokkos::pair, int >::value ) ); + + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::pair, Kokkos::pair, Kokkos::pair, int >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::pair, Kokkos::pair, Kokkos::Impl::ALL_t, int >::value ) ); + + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::pair, int, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::Impl::ALL_t, Kokkos::pair, int, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::pair, Kokkos::Impl::ALL_t, int, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::pair, Kokkos::Impl::ALL_t, int, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::pair, Kokkos::pair, int, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, Kokkos::pair, Kokkos::pair, int, Kokkos::Impl::ALL_t >::value ) ); + + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, int, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, int, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, int, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, int, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, int, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, int, Kokkos::pair, Kokkos::pair, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 5, 0, int, int, Kokkos::pair, Kokkos::pair, Kokkos::Impl::ALL_t >::value ) ); + + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 3, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::pair >::value ) ); + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 3, 0, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 3, 0, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::pair >::value ) ); + ASSERT_EQ( 1, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 3, 0, Kokkos::pair, Kokkos::Impl::ALL_t, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 3, 0, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 3, 0, Kokkos::Impl::ALL_t, Kokkos::pair, Kokkos::pair >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 3, 0, Kokkos::pair, Kokkos::pair, Kokkos::Impl::ALL_t >::value ) ); + ASSERT_EQ( 0, ( Kokkos::Experimental::Impl::SubviewLegalArgsCompileTime< Kokkos::LayoutLeft, Kokkos::LayoutLeft, 3, 3, 0, Kokkos::pair, Kokkos::pair, Kokkos::pair >::value ) ); } -} +} // namespace Impl -template< class Space, class MemTraits = void> +template< class Space, class MemTraits = void > void test_1d_assign() { - Impl::test_1d_assign_impl(); - //Impl::test_1d_assign_impl(); - Impl::test_1d_assign_impl(); - //Impl::test_1d_assign_impl(); - Impl::test_1d_assign_impl(); - Impl::test_1d_assign_impl(); - //Impl::test_1d_assign_impl(); - //Impl::test_1d_assign_impl(); - Impl::test_1d_assign_impl(); + Impl::test_1d_assign_impl< Space, Kokkos::LayoutLeft, Kokkos::LayoutLeft, Kokkos::LayoutLeft, MemTraits >(); + //Impl::test_1d_assign_impl< Space, Kokkos::LayoutRight, Kokkos::LayoutLeft, Kokkos::LayoutLeft >(); + Impl::test_1d_assign_impl< Space, Kokkos::LayoutStride, Kokkos::LayoutLeft, Kokkos::LayoutLeft, MemTraits >(); + //Impl::test_1d_assign_impl< Space, Kokkos::LayoutLeft, Kokkos::LayoutRight, Kokkos::LayoutLeft >(); + Impl::test_1d_assign_impl< Space, Kokkos::LayoutRight, Kokkos::LayoutRight, Kokkos::LayoutRight, MemTraits >(); + Impl::test_1d_assign_impl< Space, Kokkos::LayoutStride, Kokkos::LayoutRight, Kokkos::LayoutRight, MemTraits >(); + //Impl::test_1d_assign_impl< Space, Kokkos::LayoutLeft, Kokkos::LayoutStride, Kokkos::LayoutLeft >(); + //Impl::test_1d_assign_impl< Space, Kokkos::LayoutRight, Kokkos::LayoutStride, Kokkos::LayoutLeft >(); + Impl::test_1d_assign_impl< Space, Kokkos::LayoutStride, Kokkos::LayoutStride, Kokkos::LayoutLeft, MemTraits >(); } -template +template< class Space, class MemTraits = void > void test_2d_subview_3d() { - Impl::test_2d_subview_3d_impl_layout(); - Impl::test_2d_subview_3d_impl_layout(); - Impl::test_2d_subview_3d_impl_layout(); - Impl::test_2d_subview_3d_impl_layout(); - Impl::test_2d_subview_3d_impl_layout(); + Impl::test_2d_subview_3d_impl_layout< Space, Kokkos::LayoutRight, Kokkos::LayoutRight, Kokkos::LayoutRight, MemTraits >(); + Impl::test_2d_subview_3d_impl_layout< Space, Kokkos::LayoutStride, Kokkos::LayoutRight, Kokkos::LayoutRight, MemTraits >(); + Impl::test_2d_subview_3d_impl_layout< Space, Kokkos::LayoutStride, Kokkos::LayoutStride, Kokkos::LayoutRight, MemTraits >(); + Impl::test_2d_subview_3d_impl_layout< Space, Kokkos::LayoutStride, Kokkos::LayoutLeft, Kokkos::LayoutLeft, MemTraits >(); + Impl::test_2d_subview_3d_impl_layout< Space, Kokkos::LayoutStride, Kokkos::LayoutStride, Kokkos::LayoutLeft, MemTraits >(); } -template +template< class Space, class MemTraits = void > void test_3d_subview_5d_right() { - Impl::test_3d_subview_5d_impl_layout(); - Impl::test_3d_subview_5d_impl_layout(); + Impl::test_3d_subview_5d_impl_layout< Space, Kokkos::LayoutStride, Kokkos::LayoutRight, Kokkos::LayoutRight, MemTraits >(); + Impl::test_3d_subview_5d_impl_layout< Space, Kokkos::LayoutStride, Kokkos::LayoutStride, Kokkos::LayoutRight, MemTraits >(); } -template +template< class Space, class MemTraits = void > void test_3d_subview_5d_left() { - Impl::test_3d_subview_5d_impl_layout(); - Impl::test_3d_subview_5d_impl_layout(); + Impl::test_3d_subview_5d_impl_layout< Space, Kokkos::LayoutStride, Kokkos::LayoutLeft, Kokkos::LayoutLeft, MemTraits >(); + Impl::test_3d_subview_5d_impl_layout< Space, Kokkos::LayoutStride, Kokkos::LayoutStride, Kokkos::LayoutLeft, MemTraits >(); } +namespace Impl { +template< class Layout, class Space > +struct FillView_3D { + Kokkos::View< int***, Layout, Space > a; -namespace Impl { + KOKKOS_INLINE_FUNCTION + void operator()( const int & ii ) const + { + const int i = std::is_same< Layout, Kokkos::LayoutLeft >::value + ? ii % a.dimension_0() + : ii / ( a.dimension_1() * a.dimension_2() ); + + const int j = std::is_same< Layout, Kokkos::LayoutLeft >::value + ? ( ii / a.dimension_0() ) % a.dimension_1() + : ( ii / a.dimension_2() ) % a.dimension_1(); + + const int k = std::is_same< Layout, Kokkos::LayoutRight >::value + ? ii / ( a.dimension_0() * a.dimension_1() ) + : ii % a.dimension_2(); - template - struct FillView_3D { - Kokkos::View a; - - KOKKOS_INLINE_FUNCTION - void operator() (const int& ii) const { - const int i = std::is_same::value ? - ii % a.dimension_0(): ii / (a.dimension_1()*a.dimension_2()); - const int j = std::is_same::value ? - (ii / a.dimension_0()) % a.dimension_1() : (ii / a.dimension_2()) % a.dimension_1(); - const int k = std::is_same::value ? - ii / (a.dimension_0() * a.dimension_1()) : ii % a.dimension_2(); - a(i,j,k) = 1000000 * i + 1000 * j + k; + a( i, j, k ) = 1000000 * i + 1000 * j + k; + } +}; + +template< class Layout, class Space > +struct FillView_4D { + Kokkos::View< int****, Layout, Space > a; + + KOKKOS_INLINE_FUNCTION + void operator()( const int & ii ) const { + const int i = std::is_same< Layout, Kokkos::LayoutLeft >::value + ? ii % a.dimension_0() + : ii / ( a.dimension_1() * a.dimension_2() * a.dimension_3() ); + + const int j = std::is_same< Layout, Kokkos::LayoutLeft >::value + ? ( ii / a.dimension_0() ) % a.dimension_1() + : ( ii / ( a.dimension_2() * a.dimension_3() ) % a.dimension_1() ); + + const int k = std::is_same< Layout, Kokkos::LayoutRight >::value + ? ( ii / ( a.dimension_0() * a.dimension_1() ) ) % a.dimension_2() + : ( ii / a.dimension_3() ) % a.dimension_2(); + + const int l = std::is_same< Layout, Kokkos::LayoutRight >::value + ? ii / ( a.dimension_0() * a.dimension_1() * a.dimension_2() ) + : ii % a.dimension_3(); + + a( i, j, k, l ) = 1000000 * i + 10000 * j + 100 * k + l; + } +}; + +template< class Layout, class Space, class MemTraits > +struct CheckSubviewCorrectness_3D_3D { + Kokkos::View< const int***, Layout, Space, MemTraits > a; + Kokkos::View< const int***, Layout, Space, MemTraits > b; + int offset_0, offset_2; + + KOKKOS_INLINE_FUNCTION + void operator()( const int & ii ) const + { + const int i = std::is_same< Layout, Kokkos::LayoutLeft >::value + ? ii % b.dimension_0() + : ii / ( b.dimension_1() * b.dimension_2() ); + + const int j = std::is_same< Layout, Kokkos::LayoutLeft >::value + ? ( ii / b.dimension_0() ) % b.dimension_1() + : ( ii / b.dimension_2() ) % b.dimension_1(); + + const int k = std::is_same< Layout, Kokkos::LayoutRight >::value + ? ii / ( b.dimension_0() * b.dimension_1() ) + : ii % b.dimension_2(); + + if ( a( i + offset_0, j, k + offset_2 ) != b( i, j, k ) ) { + Kokkos::abort( "Error: check_subview_correctness 3D-3D (LayoutLeft -> LayoutLeft or LayoutRight -> LayoutRight)" ); } - }; - - template - struct FillView_4D { - Kokkos::View a; - - KOKKOS_INLINE_FUNCTION - void operator() (const int& ii) const { - const int i = std::is_same::value ? - ii % a.dimension_0(): ii / (a.dimension_1()*a.dimension_2()*a.dimension_3()); - const int j = std::is_same::value ? - (ii / a.dimension_0()) % a.dimension_1() : (ii / (a.dimension_2()*a.dimension_3()) % a.dimension_1()); - const int k = std::is_same::value ? - (ii / (a.dimension_0() * a.dimension_1())) % a.dimension_2() : (ii / a.dimension_3()) % a.dimension_2(); - const int l = std::is_same::value ? - ii / (a.dimension_0() * a.dimension_1() * a.dimension_2()) : ii % a.dimension_3(); - a(i,j,k,l) = 1000000 * i + 10000 * j + 100 * k + l; + } +}; + +template< class Layout, class Space, class MemTraits > +struct CheckSubviewCorrectness_3D_4D { + Kokkos::View< const int****, Layout, Space, MemTraits > a; + Kokkos::View< const int***, Layout, Space, MemTraits > b; + int offset_0, offset_2, index; + + KOKKOS_INLINE_FUNCTION + void operator()( const int & ii ) const { + const int i = std::is_same< Layout, Kokkos::LayoutLeft >::value + ? ii % b.dimension_0() + : ii / ( b.dimension_1() * b.dimension_2() ); + + const int j = std::is_same< Layout, Kokkos::LayoutLeft >::value + ? ( ii / b.dimension_0() ) % b.dimension_1() + : ( ii / b.dimension_2() ) % b.dimension_1(); + + const int k = std::is_same< Layout, Kokkos::LayoutRight >::value + ? ii / ( b.dimension_0() * b.dimension_1() ) + : ii % b.dimension_2(); + + int i0, i1, i2, i3; + + if ( std::is_same< Layout, Kokkos::LayoutLeft >::value ) { + i0 = i + offset_0; + i1 = j; + i2 = k + offset_2; + i3 = index; } - }; - - template - struct CheckSubviewCorrectness_3D_3D { - Kokkos::View a; - Kokkos::View b; - int offset_0,offset_2; - - KOKKOS_INLINE_FUNCTION - void operator() (const int& ii) const { - const int i = std::is_same::value ? - ii % b.dimension_0(): ii / (b.dimension_1()*b.dimension_2()); - const int j = std::is_same::value ? - (ii / b.dimension_0()) % b.dimension_1() : (ii / b.dimension_2()) % b.dimension_1(); - const int k = std::is_same::value ? - ii / (b.dimension_0() * b.dimension_1()) : ii % b.dimension_2(); - if( a(i+offset_0,j,k+offset_2) != b(i,j,k)) - Kokkos::abort("Error: check_subview_correctness 3D-3D (LayoutLeft -> LayoutLeft or LayoutRight -> LayoutRight)"); + else { + i0 = index; + i1 = i + offset_0; + i2 = j; + i3 = k + offset_2; } - }; - - template - struct CheckSubviewCorrectness_3D_4D { - Kokkos::View a; - Kokkos::View b; - int offset_0,offset_2,index; - - KOKKOS_INLINE_FUNCTION - void operator() (const int& ii) const { - const int i = std::is_same::value ? - ii % b.dimension_0(): ii / (b.dimension_1()*b.dimension_2()); - const int j = std::is_same::value ? - (ii / b.dimension_0()) % b.dimension_1() : (ii / b.dimension_2()) % b.dimension_1(); - const int k = std::is_same::value ? - ii / (b.dimension_0() * b.dimension_1()) : ii % b.dimension_2(); - - int i0,i1,i2,i3; - if(std::is_same::value) { - i0 = i + offset_0; - i1 = j; - i2 = k + offset_2; - i3 = index; - } else { - i0 = index; - i1 = i + offset_0; - i2 = j; - i3 = k + offset_2; - } - if( a(i0,i1,i2,i3) != b(i,j,k)) - Kokkos::abort("Error: check_subview_correctness 3D-4D (LayoutLeft -> LayoutLeft or LayoutRight -> LayoutRight)"); + + if ( a( i0, i1, i2, i3 ) != b( i, j, k ) ) { + Kokkos::abort( "Error: check_subview_correctness 3D-4D (LayoutLeft -> LayoutLeft or LayoutRight -> LayoutRight)" ); } - }; -} + } +}; -template +} // namespace Impl + +template< class Space, class MemTraits = void > void test_layoutleft_to_layoutleft() { Impl::test_subview_legal_args_left(); { - Kokkos::View a("A",100,4,3); - Kokkos::View b(a,Kokkos::pair(16,32),Kokkos::ALL,Kokkos::ALL); + Kokkos::View< int***, Kokkos::LayoutLeft, Space > a( "A", 100, 4, 3 ); + Kokkos::View< int***, Kokkos::LayoutLeft, Space > b( a, Kokkos::pair< int, int >( 16, 32 ), Kokkos::ALL, Kokkos::ALL ); - Impl::FillView_3D fill; + Impl::FillView_3D< Kokkos::LayoutLeft, Space > fill; fill.a = a; - Kokkos::parallel_for(Kokkos::RangePolicy(0,a.extent(0)*a.extent(1)*a.extent(2)), fill); + Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, a.extent( 0 ) * a.extent( 1 ) * a.extent( 2 ) ), fill ); - Impl::CheckSubviewCorrectness_3D_3D check; + Impl::CheckSubviewCorrectness_3D_3D< Kokkos::LayoutLeft, Space, MemTraits > check; check.a = a; check.b = b; check.offset_0 = 16; check.offset_2 = 0; - Kokkos::parallel_for(Kokkos::RangePolicy(0,b.extent(0)*b.extent(1)*b.extent(2)), check); + Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, b.extent( 0 ) * b.extent( 1 ) * b.extent( 2 ) ), check ); } + { - Kokkos::View a("A",100,4,5); - Kokkos::View b(a,Kokkos::pair(16,32),Kokkos::ALL,Kokkos::pair(1,3)); + Kokkos::View< int***, Kokkos::LayoutLeft, Space > a( "A", 100, 4, 5 ); + Kokkos::View< int***, Kokkos::LayoutLeft, Space > b( a, Kokkos::pair< int, int >( 16, 32 ), Kokkos::ALL, Kokkos::pair< int, int >( 1, 3 ) ); - Impl::FillView_3D fill; + Impl::FillView_3D fill; fill.a = a; - Kokkos::parallel_for(Kokkos::RangePolicy(0,a.extent(0)*a.extent(1)*a.extent(2)), fill); + Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, a.extent( 0 ) * a.extent( 1 ) * a.extent( 2 ) ), fill ); - Impl::CheckSubviewCorrectness_3D_3D check; + Impl::CheckSubviewCorrectness_3D_3D< Kokkos::LayoutLeft, Space, MemTraits > check; check.a = a; check.b = b; check.offset_0 = 16; check.offset_2 = 1; - Kokkos::parallel_for(Kokkos::RangePolicy(0,b.extent(0)*b.extent(1)*b.extent(2)), check); + Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, b.extent( 0 ) * b.extent( 1 ) * b.extent( 2 ) ), check ); } + { - Kokkos::View a("A",100,4,5,3); - Kokkos::View b(a,Kokkos::pair(16,32),Kokkos::ALL,Kokkos::pair(1,3),1); + Kokkos::View< int****, Kokkos::LayoutLeft, Space > a( "A", 100, 4, 5, 3 ); + Kokkos::View< int***, Kokkos::LayoutLeft, Space > b( a, Kokkos::pair< int, int >( 16, 32 ), Kokkos::ALL, Kokkos::pair< int, int >( 1, 3 ), 1 ); - Impl::FillView_4D fill; + Impl::FillView_4D< Kokkos::LayoutLeft, Space > fill; fill.a = a; - Kokkos::parallel_for(Kokkos::RangePolicy(0,a.extent(0)*a.extent(1)*a.extent(2)*a.extent(3)), fill); + Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, a.extent( 0 ) * a.extent( 1 ) * a.extent( 2 ) * a.extent( 3 ) ), fill ); - Impl::CheckSubviewCorrectness_3D_4D check; + Impl::CheckSubviewCorrectness_3D_4D< Kokkos::LayoutLeft, Space, MemTraits > check; check.a = a; check.b = b; check.offset_0 = 16; check.offset_2 = 1; check.index = 1; - Kokkos::parallel_for(Kokkos::RangePolicy(0,b.extent(0)*b.extent(1)*b.extent(2)), check); + Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, b.extent( 0 ) * b.extent( 1 ) * b.extent( 2 ) ), check ); } } -template +template< class Space, class MemTraits = void > void test_layoutright_to_layoutright() { Impl::test_subview_legal_args_right(); { - Kokkos::View a("A",100,4,3); - Kokkos::View b(a,Kokkos::pair(16,32),Kokkos::ALL,Kokkos::ALL); + Kokkos::View< int***, Kokkos::LayoutRight, Space > a( "A", 100, 4, 3 ); + Kokkos::View< int***, Kokkos::LayoutRight, Space > b( a, Kokkos::pair< int, int >( 16, 32 ), Kokkos::ALL, Kokkos::ALL ); - Impl::FillView_3D fill; + Impl::FillView_3D fill; fill.a = a; - Kokkos::parallel_for(Kokkos::RangePolicy(0,a.extent(0)*a.extent(1)*a.extent(2)), fill); + Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, a.extent( 0 ) * a.extent( 1 ) * a.extent( 2 ) ), fill ); - Impl::CheckSubviewCorrectness_3D_3D check; + Impl::CheckSubviewCorrectness_3D_3D< Kokkos::LayoutRight, Space, MemTraits > check; check.a = a; check.b = b; check.offset_0 = 16; check.offset_2 = 0; - Kokkos::parallel_for(Kokkos::RangePolicy(0,b.extent(0)*b.extent(1)*b.extent(2)), check); + Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, b.extent( 0 ) * b.extent( 1 ) * b.extent( 2 ) ), check ); } - { - Kokkos::View a("A",3,4,5,100); - Kokkos::View b(a,1,Kokkos::pair(1,3),Kokkos::ALL,Kokkos::ALL); + { + Kokkos::View< int****, Kokkos::LayoutRight, Space > a( "A", 3, 4, 5, 100 ); + Kokkos::View< int***, Kokkos::LayoutRight, Space > b( a, 1, Kokkos::pair< int, int >( 1, 3 ), Kokkos::ALL, Kokkos::ALL ); - Impl::FillView_4D fill; + Impl::FillView_4D< Kokkos::LayoutRight, Space > fill; fill.a = a; - Kokkos::parallel_for(Kokkos::RangePolicy(0,a.extent(0)*a.extent(1)*a.extent(2)*a.extent(3)), fill); + Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, a.extent( 0 ) * a.extent( 1 ) * a.extent( 2 ) * a.extent( 3 ) ), fill ); - Impl::CheckSubviewCorrectness_3D_4D check; + Impl::CheckSubviewCorrectness_3D_4D< Kokkos::LayoutRight, Space, MemTraits > check; check.a = a; check.b = b; check.offset_0 = 1; check.offset_2 = 0; check.index = 1; - Kokkos::parallel_for(Kokkos::RangePolicy(0,b.extent(0)*b.extent(1)*b.extent(2)), check); + Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, b.extent( 0 ) * b.extent( 1 ) * b.extent( 2 ) ), check ); } } - -} -//---------------------------------------------------------------------------- - +} // namespace TestViewSubview diff --git a/lib/kokkos/core/unit_test/UnitTestMain.cpp b/lib/kokkos/core/unit_test/UnitTestMain.cpp index f952ab3db5..4f52fc9567 100644 --- a/lib/kokkos/core/unit_test/UnitTestMain.cpp +++ b/lib/kokkos/core/unit_test/UnitTestMain.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,15 +36,14 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ #include -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc,argv); +int main( int argc, char *argv[] ) { + ::testing::InitGoogleTest( &argc, argv ); return RUN_ALL_TESTS(); } - diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda.hpp b/lib/kokkos/core/unit_test/cuda/TestCuda.hpp index 36b9b0688b..768b039204 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda.hpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda.hpp @@ -40,31 +40,25 @@ // ************************************************************************ //@HEADER */ + #ifndef KOKKOS_TEST_CUDA_HPP #define KOKKOS_TEST_CUDA_HPP + #include #include - #include #include - -//---------------------------------------------------------------------------- - #include #include - - #include #include #include #include #include #include - #include - #include #include #include @@ -73,20 +67,16 @@ #include #include #include - - #include #include #include #include - #include - #include namespace Test { -// For Some Reason I can only have the definition of SetUp and TearDown in one cpp file ... +// For some reason I can only have the definition of SetUp and TearDown in one cpp file ... class cuda : public ::testing::Test { protected: static void SetUpTestCase(); @@ -95,17 +85,19 @@ protected: #ifdef TEST_CUDA_INSTANTIATE_SETUP_TEARDOWN void cuda::SetUpTestCase() - { - Kokkos::Cuda::print_configuration( std::cout ); - Kokkos::HostSpace::execution_space::initialize(); - Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice(0) ); - } +{ + Kokkos::print_configuration( std::cout ); + Kokkos::HostSpace::execution_space::initialize(); + Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice( 0 ) ); +} void cuda::TearDownTestCase() - { - Kokkos::Cuda::finalize(); - Kokkos::HostSpace::execution_space::finalize(); - } -#endif +{ + Kokkos::Cuda::finalize(); + Kokkos::HostSpace::execution_space::finalize(); } #endif + +} // namespace Test + +#endif diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_Atomics.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_Atomics.cpp index ff379dc805..7cf19b26d1 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_Atomics.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_Atomics.cpp @@ -40,164 +40,164 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda , atomics ) +TEST_F( cuda, atomics ) { - const int loop_count = 1e3 ; + const int loop_count = 1e3; - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Cuda >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Cuda >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Cuda >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Cuda >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Cuda >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Cuda >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Cuda >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Cuda >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Cuda >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Cuda >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Cuda >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Cuda >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Cuda >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Cuda >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Cuda >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Cuda >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Cuda >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Cuda >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Cuda >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Cuda >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Cuda >( 100, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Cuda>(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Cuda>(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Cuda>(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Cuda >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Cuda >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Cuda >( 100, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Cuda>(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Cuda>(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Cuda>(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Cuda >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Cuda >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Cuda >( 100, 3 ) ) ); } -TEST_F( cuda , atomic_operations ) +TEST_F( cuda, atomic_operations ) { - const int start = 1; //Avoid zero for division + const int start = 1; // Avoid zero for division. const int end = 11; - for (int i = start; i < end; ++i) + + for ( int i = start; i < end; ++i ) { - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 4 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Cuda >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Cuda >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Cuda >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Cuda >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Cuda >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Cuda >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Cuda >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Cuda >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Cuda >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Cuda >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Cuda >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Cuda >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Cuda >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Cuda >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Cuda >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Cuda >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Cuda >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Cuda >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Cuda >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Cuda >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Cuda >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Cuda >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Cuda >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Cuda >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Cuda >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Cuda >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Cuda >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Cuda >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Cuda >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Cuda >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Cuda >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Cuda >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Cuda >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Cuda >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Cuda >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Cuda >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Cuda >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Cuda >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Cuda >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Cuda >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Cuda >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Cuda >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Cuda >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Cuda >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Cuda >( start, end -i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Cuda >( start, end -i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Cuda >( start, end -i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Cuda >( start, end -i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Cuda >( start, end -i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Cuda >( start, end -i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Cuda >( start, end -i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Cuda >( start, end -i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Cuda >( start, end -i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Cuda >( start, end -i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Cuda >( start, end -i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Cuda >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Cuda >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Cuda >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Cuda >( start, end - i, 4 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Cuda >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Cuda >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Cuda >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Cuda >( start, end - i, 4 ) ) ); } } -TEST_F( cuda , atomic_views_integral ) +TEST_F( cuda, atomic_views_integral ) { const long length = 1000000; + { - //Integral Types - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 8 ) ) ); + // Integral Types. + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Cuda >( length, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Cuda >( length, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Cuda >( length, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Cuda >( length, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Cuda >( length, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Cuda >( length, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Cuda >( length, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Cuda >( length, 8 ) ) ); } } -TEST_F( cuda , atomic_views_nonintegral ) +TEST_F( cuda, atomic_views_nonintegral ) { const long length = 1000000; - { - //Non-Integral Types - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 4 ) ) ); + { + // Non-Integral Types. + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Cuda >( length, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Cuda >( length, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Cuda >( length, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Cuda >( length, 4 ) ) ); } } - -TEST_F( cuda , atomic_view_api ) +TEST_F( cuda, atomic_view_api ) { - TestAtomicViews::TestAtomicViewAPI(); + TestAtomicViews::TestAtomicViewAPI< int, Kokkos::Cuda >(); } - -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_Other.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_Other.cpp index aeaa2a0e81..e655193a51 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_Other.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_Other.cpp @@ -40,63 +40,68 @@ // ************************************************************************ //@HEADER */ + #define TEST_CUDA_INSTANTIATE_SETUP_TEARDOWN + #include namespace Test { -TEST_F( cuda , init ) { +TEST_F( cuda, init ) +{ ; } -TEST_F( cuda , md_range ) { - TestMDRange_2D< Kokkos::Cuda >::test_for2(100,100); - - TestMDRange_3D< Kokkos::Cuda >::test_for3(100,100,100); +TEST_F( cuda , mdrange_for ) { + TestMDRange_2D< Kokkos::Cuda >::test_for2( 100, 100 ); + TestMDRange_3D< Kokkos::Cuda >::test_for3( 100, 100, 100 ); + TestMDRange_4D< Kokkos::Cuda >::test_for4( 100, 10, 100, 10 ); + TestMDRange_5D< Kokkos::Cuda >::test_for5( 100, 10, 10, 10, 5 ); + TestMDRange_6D< Kokkos::Cuda >::test_for6( 100, 10, 5, 2, 10, 5 ); } -TEST_F( cuda, policy_construction) { +TEST_F( cuda, policy_construction ) +{ TestRangePolicyConstruction< Kokkos::Cuda >(); TestTeamPolicyConstruction< Kokkos::Cuda >(); } -TEST_F( cuda , range_tag ) +TEST_F( cuda, range_tag ) { - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_for(0); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(0); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_scan(0); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_for(0); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(0); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_scan(0); - - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_for(2); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(2); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_scan(2); - - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_for(3); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(3); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_scan(3); - - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_for(1000); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(1000); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_scan(1000); - - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_for(1001); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(1001); - TestRange< Kokkos::Cuda , Kokkos::Schedule >::test_scan(1001); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_for( 0 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 0 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_scan( 0 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_for( 0 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 0 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_scan( 0 ); + + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_for( 2 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 2 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_scan( 2 ); + + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_for( 3 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 3 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_scan( 3 ); + + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_for( 1000 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 1000 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_scan( 1000 ); + + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_for( 1001 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 1001 ); + TestRange< Kokkos::Cuda, Kokkos::Schedule >::test_scan( 1001 ); } - //---------------------------------------------------------------------------- -TEST_F( cuda , compiler_macros ) +TEST_F( cuda, compiler_macros ) { ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::Cuda >() ) ); } //---------------------------------------------------------------------------- -TEST_F( cuda , memory_pool ) +TEST_F( cuda, memory_pool ) { bool val = TestMemoryPool::test_mempool< Kokkos::Cuda >( 128, 128000000 ); ASSERT_TRUE( val ); @@ -110,24 +115,24 @@ TEST_F( cuda , memory_pool ) #if defined( KOKKOS_ENABLE_TASKDAG ) -TEST_F( cuda , task_fib ) +TEST_F( cuda, task_fib ) { - for ( int i = 0 ; i < 25 ; ++i ) { - TestTaskScheduler::TestFib< Kokkos::Cuda >::run(i, (i+1)*(i+1)*10000 ); + for ( int i = 0; i < 25; ++i ) { + TestTaskScheduler::TestFib< Kokkos::Cuda >::run( i, ( i + 1 ) * ( i + 1 ) * 10000 ); } } -TEST_F( cuda , task_depend ) +TEST_F( cuda, task_depend ) { - for ( int i = 0 ; i < 25 ; ++i ) { - TestTaskScheduler::TestTaskDependence< Kokkos::Cuda >::run(i); + for ( int i = 0; i < 25; ++i ) { + TestTaskScheduler::TestTaskDependence< Kokkos::Cuda >::run( i ); } } -TEST_F( cuda , task_team ) +TEST_F( cuda, task_team ) { - TestTaskScheduler::TestTaskTeam< Kokkos::Cuda >::run(1000); - //TestTaskScheduler::TestTaskTeamValue< Kokkos::Cuda >::run(1000); //put back after testing + TestTaskScheduler::TestTaskTeam< Kokkos::Cuda >::run( 1000 ); + //TestTaskScheduler::TestTaskTeamValue< Kokkos::Cuda >::run( 1000 ); // Put back after testing. } #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ @@ -135,55 +140,55 @@ TEST_F( cuda , task_team ) //---------------------------------------------------------------------------- #if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA ) -TEST_F( cuda , cxx11 ) +TEST_F( cuda, cxx11 ) { - if ( std::is_same< Kokkos::DefaultExecutionSpace , Kokkos::Cuda >::value ) { - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Cuda >(1) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Cuda >(2) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Cuda >(3) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Cuda >(4) ) ); + if ( std::is_same< Kokkos::DefaultExecutionSpace, Kokkos::Cuda >::value ) { + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Cuda >( 1 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Cuda >( 2 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Cuda >( 3 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Cuda >( 4 ) ) ); } } #endif TEST_F( cuda, tile_layout ) { - TestTile::test< Kokkos::Cuda , 1 , 1 >( 1 , 1 ); - TestTile::test< Kokkos::Cuda , 1 , 1 >( 2 , 3 ); - TestTile::test< Kokkos::Cuda , 1 , 1 >( 9 , 10 ); - - TestTile::test< Kokkos::Cuda , 2 , 2 >( 1 , 1 ); - TestTile::test< Kokkos::Cuda , 2 , 2 >( 2 , 3 ); - TestTile::test< Kokkos::Cuda , 2 , 2 >( 4 , 4 ); - TestTile::test< Kokkos::Cuda , 2 , 2 >( 9 , 9 ); - - TestTile::test< Kokkos::Cuda , 2 , 4 >( 9 , 9 ); - TestTile::test< Kokkos::Cuda , 4 , 2 >( 9 , 9 ); - - TestTile::test< Kokkos::Cuda , 4 , 4 >( 1 , 1 ); - TestTile::test< Kokkos::Cuda , 4 , 4 >( 4 , 4 ); - TestTile::test< Kokkos::Cuda , 4 , 4 >( 9 , 9 ); - TestTile::test< Kokkos::Cuda , 4 , 4 >( 9 , 11 ); - - TestTile::test< Kokkos::Cuda , 8 , 8 >( 1 , 1 ); - TestTile::test< Kokkos::Cuda , 8 , 8 >( 4 , 4 ); - TestTile::test< Kokkos::Cuda , 8 , 8 >( 9 , 9 ); - TestTile::test< Kokkos::Cuda , 8 , 8 >( 9 , 11 ); + TestTile::test< Kokkos::Cuda, 1, 1 >( 1, 1 ); + TestTile::test< Kokkos::Cuda, 1, 1 >( 2, 3 ); + TestTile::test< Kokkos::Cuda, 1, 1 >( 9, 10 ); + + TestTile::test< Kokkos::Cuda, 2, 2 >( 1, 1 ); + TestTile::test< Kokkos::Cuda, 2, 2 >( 2, 3 ); + TestTile::test< Kokkos::Cuda, 2, 2 >( 4, 4 ); + TestTile::test< Kokkos::Cuda, 2, 2 >( 9, 9 ); + + TestTile::test< Kokkos::Cuda, 2, 4 >( 9, 9 ); + TestTile::test< Kokkos::Cuda, 4, 2 >( 9, 9 ); + + TestTile::test< Kokkos::Cuda, 4, 4 >( 1, 1 ); + TestTile::test< Kokkos::Cuda, 4, 4 >( 4, 4 ); + TestTile::test< Kokkos::Cuda, 4, 4 >( 9, 9 ); + TestTile::test< Kokkos::Cuda, 4, 4 >( 9, 11 ); + + TestTile::test< Kokkos::Cuda, 8, 8 >( 1, 1 ); + TestTile::test< Kokkos::Cuda, 8, 8 >( 4, 4 ); + TestTile::test< Kokkos::Cuda, 8, 8 >( 9, 9 ); + TestTile::test< Kokkos::Cuda, 8, 8 >( 9, 11 ); } -#if defined (KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) -#if defined (KOKKOS_COMPILER_CLANG) -TEST_F( cuda , dispatch ) +#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) +#if defined( KOKKOS_COMPILER_CLANG ) +TEST_F( cuda, dispatch ) { - const int repeat = 100 ; - for ( int i = 0 ; i < repeat ; ++i ) { - for ( int j = 0 ; j < repeat ; ++j ) { - Kokkos::parallel_for( Kokkos::RangePolicy< Kokkos::Cuda >(0,j) - , KOKKOS_LAMBDA( int ) {} ); - }} + const int repeat = 100; + for ( int i = 0; i < repeat; ++i ) { + for ( int j = 0; j < repeat; ++j ) { + Kokkos::parallel_for( Kokkos::RangePolicy< Kokkos::Cuda >( 0, j ) + , KOKKOS_LAMBDA( int ) {} ); + } + } } #endif #endif -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_Reductions_a.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_Reductions_a.cpp index b9ab9fe72d..01eed4e023 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_Reductions_a.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_Reductions_a.cpp @@ -40,17 +40,17 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda , reducers ) +TEST_F( cuda, reducers ) { - TestReducers::execute_integer(); - TestReducers::execute_integer(); - TestReducers::execute_float(); - TestReducers, Kokkos::Cuda>::execute_basic(); + TestReducers< int, Kokkos::Cuda >::execute_integer(); + TestReducers< size_t, Kokkos::Cuda >::execute_integer(); + TestReducers< double, Kokkos::Cuda >::execute_float(); + TestReducers< Kokkos::complex, Kokkos::Cuda >::execute_basic(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_Reductions_b.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_Reductions_b.cpp index c588d752dd..7f4e0973e7 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_Reductions_b.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_Reductions_b.cpp @@ -40,38 +40,44 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, long_reduce) { - TestReduce< long , Kokkos::Cuda >( 0 ); - TestReduce< long , Kokkos::Cuda >( 1000000 ); +TEST_F( cuda, long_reduce ) +{ + TestReduce< long, Kokkos::Cuda >( 0 ); + TestReduce< long, Kokkos::Cuda >( 1000000 ); } -TEST_F( cuda, double_reduce) { - TestReduce< double , Kokkos::Cuda >( 0 ); - TestReduce< double , Kokkos::Cuda >( 1000000 ); +TEST_F( cuda, double_reduce ) +{ + TestReduce< double, Kokkos::Cuda >( 0 ); + TestReduce< double, Kokkos::Cuda >( 1000000 ); } -TEST_F( cuda, long_reduce_dynamic ) { - TestReduceDynamic< long , Kokkos::Cuda >( 0 ); - TestReduceDynamic< long , Kokkos::Cuda >( 1000000 ); +TEST_F( cuda, long_reduce_dynamic ) +{ + TestReduceDynamic< long, Kokkos::Cuda >( 0 ); + TestReduceDynamic< long, Kokkos::Cuda >( 1000000 ); } -TEST_F( cuda, double_reduce_dynamic ) { - TestReduceDynamic< double , Kokkos::Cuda >( 0 ); - TestReduceDynamic< double , Kokkos::Cuda >( 1000000 ); +TEST_F( cuda, double_reduce_dynamic ) +{ + TestReduceDynamic< double, Kokkos::Cuda >( 0 ); + TestReduceDynamic< double, Kokkos::Cuda >( 1000000 ); } -TEST_F( cuda, long_reduce_dynamic_view ) { - TestReduceDynamicView< long , Kokkos::Cuda >( 0 ); - TestReduceDynamicView< long , Kokkos::Cuda >( 1000000 ); +TEST_F( cuda, long_reduce_dynamic_view ) +{ + TestReduceDynamicView< long, Kokkos::Cuda >( 0 ); + TestReduceDynamicView< long, Kokkos::Cuda >( 1000000 ); } -TEST_F( cuda , scan ) +TEST_F( cuda, scan ) { - TestScan< Kokkos::Cuda >::test_range( 1 , 1000 ); + TestScan< Kokkos::Cuda >::test_range( 1, 1000 ); TestScan< Kokkos::Cuda >( 0 ); TestScan< Kokkos::Cuda >( 100000 ); TestScan< Kokkos::Cuda >( 10000000 ); @@ -79,10 +85,11 @@ TEST_F( cuda , scan ) } #if 0 -TEST_F( cuda , scan_small ) +TEST_F( cuda, scan_small ) { - typedef TestScan< Kokkos::Cuda , Kokkos::Impl::CudaExecUseScanSmall > TestScanFunctor ; - for ( int i = 0 ; i < 1000 ; ++i ) { + typedef TestScan< Kokkos::Cuda, Kokkos::Impl::CudaExecUseScanSmall > TestScanFunctor; + + for ( int i = 0; i < 1000; ++i ) { TestScanFunctor( 10 ); TestScanFunctor( 10000 ); } @@ -93,38 +100,39 @@ TEST_F( cuda , scan_small ) } #endif -TEST_F( cuda , team_scan ) +TEST_F( cuda, team_scan ) { - TestScanTeam< Kokkos::Cuda , Kokkos::Schedule >( 0 ); - TestScanTeam< Kokkos::Cuda , Kokkos::Schedule >( 0 ); - TestScanTeam< Kokkos::Cuda , Kokkos::Schedule >( 10 ); - TestScanTeam< Kokkos::Cuda , Kokkos::Schedule >( 10 ); - TestScanTeam< Kokkos::Cuda , Kokkos::Schedule >( 10000 ); - TestScanTeam< Kokkos::Cuda , Kokkos::Schedule >( 10000 ); + TestScanTeam< Kokkos::Cuda, Kokkos::Schedule >( 0 ); + TestScanTeam< Kokkos::Cuda, Kokkos::Schedule >( 0 ); + TestScanTeam< Kokkos::Cuda, Kokkos::Schedule >( 10 ); + TestScanTeam< Kokkos::Cuda, Kokkos::Schedule >( 10 ); + TestScanTeam< Kokkos::Cuda, Kokkos::Schedule >( 10000 ); + TestScanTeam< Kokkos::Cuda, Kokkos::Schedule >( 10000 ); } -TEST_F( cuda , team_long_reduce) { - TestReduceTeam< long , Kokkos::Cuda , Kokkos::Schedule >( 0 ); - TestReduceTeam< long , Kokkos::Cuda , Kokkos::Schedule >( 0 ); - TestReduceTeam< long , Kokkos::Cuda , Kokkos::Schedule >( 3 ); - TestReduceTeam< long , Kokkos::Cuda , Kokkos::Schedule >( 3 ); - TestReduceTeam< long , Kokkos::Cuda , Kokkos::Schedule >( 100000 ); - TestReduceTeam< long , Kokkos::Cuda , Kokkos::Schedule >( 100000 ); +TEST_F( cuda, team_long_reduce ) +{ + TestReduceTeam< long, Kokkos::Cuda, Kokkos::Schedule >( 0 ); + TestReduceTeam< long, Kokkos::Cuda, Kokkos::Schedule >( 0 ); + TestReduceTeam< long, Kokkos::Cuda, Kokkos::Schedule >( 3 ); + TestReduceTeam< long, Kokkos::Cuda, Kokkos::Schedule >( 3 ); + TestReduceTeam< long, Kokkos::Cuda, Kokkos::Schedule >( 100000 ); + TestReduceTeam< long, Kokkos::Cuda, Kokkos::Schedule >( 100000 ); } -TEST_F( cuda , team_double_reduce) { - TestReduceTeam< double , Kokkos::Cuda , Kokkos::Schedule >( 0 ); - TestReduceTeam< double , Kokkos::Cuda , Kokkos::Schedule >( 0 ); - TestReduceTeam< double , Kokkos::Cuda , Kokkos::Schedule >( 3 ); - TestReduceTeam< double , Kokkos::Cuda , Kokkos::Schedule >( 3 ); - TestReduceTeam< double , Kokkos::Cuda , Kokkos::Schedule >( 100000 ); - TestReduceTeam< double , Kokkos::Cuda , Kokkos::Schedule >( 100000 ); +TEST_F( cuda, team_double_reduce ) +{ + TestReduceTeam< double, Kokkos::Cuda, Kokkos::Schedule >( 0 ); + TestReduceTeam< double, Kokkos::Cuda, Kokkos::Schedule >( 0 ); + TestReduceTeam< double, Kokkos::Cuda, Kokkos::Schedule >( 3 ); + TestReduceTeam< double, Kokkos::Cuda, Kokkos::Schedule >( 3 ); + TestReduceTeam< double, Kokkos::Cuda, Kokkos::Schedule >( 100000 ); + TestReduceTeam< double, Kokkos::Cuda, Kokkos::Schedule >( 100000 ); } -TEST_F( cuda , reduction_deduction ) +TEST_F( cuda, reduction_deduction ) { TestCXX11::test_reduction_deduction< Kokkos::Cuda >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_Spaces.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_Spaces.cpp index f3cbc3b889..5bed7640da 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_Spaces.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_Spaces.cpp @@ -40,6 +40,7 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { @@ -47,353 +48,338 @@ namespace Test { __global__ void test_abort() { - Kokkos::abort("test_abort"); + Kokkos::abort( "test_abort" ); } __global__ void test_cuda_spaces_int_value( int * ptr ) { - if ( *ptr == 42 ) { *ptr = 2 * 42 ; } + if ( *ptr == 42 ) { *ptr = 2 * 42; } } -TEST_F( cuda , space_access ) +TEST_F( cuda, space_access ) { - //-------------------------------------- - static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace , Kokkos::HostSpace >::assignable , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace, Kokkos::HostSpace >::assignable, "" ); static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace , Kokkos::CudaHostPinnedSpace >::assignable , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace, Kokkos::CudaHostPinnedSpace >::assignable, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace , Kokkos::CudaSpace >::assignable , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace, Kokkos::CudaSpace >::assignable, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace , Kokkos::CudaSpace >::accessible , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace, Kokkos::CudaSpace >::accessible, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace , Kokkos::CudaUVMSpace >::assignable , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace, Kokkos::CudaUVMSpace >::assignable, "" ); static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace , Kokkos::CudaUVMSpace >::accessible , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace, Kokkos::CudaUVMSpace >::accessible, "" ); //-------------------------------------- static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace , Kokkos::CudaSpace >::assignable , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace, Kokkos::CudaSpace >::assignable, "" ); static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace , Kokkos::CudaUVMSpace >::assignable , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace, Kokkos::CudaUVMSpace >::assignable, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace , Kokkos::CudaHostPinnedSpace >::assignable , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace, Kokkos::CudaHostPinnedSpace >::assignable, "" ); static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace , Kokkos::CudaHostPinnedSpace >::accessible , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace, Kokkos::CudaHostPinnedSpace >::accessible, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace , Kokkos::HostSpace >::assignable , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace, Kokkos::HostSpace >::assignable, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace , Kokkos::HostSpace >::accessible , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace, Kokkos::HostSpace >::accessible, "" ); //-------------------------------------- static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace , Kokkos::CudaUVMSpace >::assignable , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace, Kokkos::CudaUVMSpace >::assignable, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace , Kokkos::CudaSpace >::assignable , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace, Kokkos::CudaSpace >::assignable, "" ); static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace , Kokkos::CudaSpace >::accessible , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace, Kokkos::CudaSpace >::accessible, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace , Kokkos::HostSpace >::assignable , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace, Kokkos::HostSpace >::assignable, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace , Kokkos::HostSpace >::accessible , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace, Kokkos::HostSpace >::accessible, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace , Kokkos::CudaHostPinnedSpace >::assignable , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace, Kokkos::CudaHostPinnedSpace >::assignable, "" ); static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace , Kokkos::CudaHostPinnedSpace >::accessible , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace, Kokkos::CudaHostPinnedSpace >::accessible, "" ); //-------------------------------------- static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::CudaHostPinnedSpace >::assignable , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace, Kokkos::CudaHostPinnedSpace >::assignable, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::HostSpace >::assignable , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace, Kokkos::HostSpace >::assignable, "" ); static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::HostSpace >::accessible , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace, Kokkos::HostSpace >::accessible, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::CudaSpace >::assignable , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace, Kokkos::CudaSpace >::assignable, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::CudaSpace >::accessible , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace, Kokkos::CudaSpace >::accessible, "" ); static_assert( - ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::CudaUVMSpace >::assignable , "" ); + ! Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace, Kokkos::CudaUVMSpace >::assignable, "" ); static_assert( - Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::CudaUVMSpace >::accessible , "" ); + Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace, Kokkos::CudaUVMSpace >::accessible, "" ); //-------------------------------------- static_assert( - ! Kokkos::Impl::SpaceAccessibility< Kokkos::Cuda , Kokkos::HostSpace >::accessible , "" ); + ! Kokkos::Impl::SpaceAccessibility< Kokkos::Cuda, Kokkos::HostSpace >::accessible, "" ); static_assert( - Kokkos::Impl::SpaceAccessibility< Kokkos::Cuda , Kokkos::CudaSpace >::accessible , "" ); + Kokkos::Impl::SpaceAccessibility< Kokkos::Cuda, Kokkos::CudaSpace >::accessible, "" ); static_assert( - Kokkos::Impl::SpaceAccessibility< Kokkos::Cuda , Kokkos::CudaUVMSpace >::accessible , "" ); + Kokkos::Impl::SpaceAccessibility< Kokkos::Cuda, Kokkos::CudaUVMSpace >::accessible, "" ); static_assert( - Kokkos::Impl::SpaceAccessibility< Kokkos::Cuda , Kokkos::CudaHostPinnedSpace >::accessible , "" ); + Kokkos::Impl::SpaceAccessibility< Kokkos::Cuda, Kokkos::CudaHostPinnedSpace >::accessible, "" ); static_assert( - ! Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace , Kokkos::CudaSpace >::accessible , "" ); + ! Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace, Kokkos::CudaSpace >::accessible, "" ); static_assert( - Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace , Kokkos::CudaUVMSpace >::accessible , "" ); + Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace, Kokkos::CudaUVMSpace >::accessible, "" ); static_assert( - Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace , Kokkos::CudaHostPinnedSpace >::accessible , "" ); - + Kokkos::Impl::SpaceAccessibility< Kokkos::HostSpace, Kokkos::CudaHostPinnedSpace >::accessible, "" ); static_assert( std::is_same< Kokkos::Impl::HostMirror< Kokkos::CudaSpace >::Space - , Kokkos::HostSpace >::value , "" ); + , Kokkos::HostSpace >::value, "" ); static_assert( std::is_same< Kokkos::Impl::HostMirror< Kokkos::CudaUVMSpace >::Space , Kokkos::Device< Kokkos::HostSpace::execution_space - , Kokkos::CudaUVMSpace > >::value , "" ); + , Kokkos::CudaUVMSpace > >::value, "" ); static_assert( std::is_same< Kokkos::Impl::HostMirror< Kokkos::CudaHostPinnedSpace >::Space - , Kokkos::CudaHostPinnedSpace >::value , "" ); + , Kokkos::CudaHostPinnedSpace >::value, "" ); static_assert( std::is_same< Kokkos::Device< Kokkos::HostSpace::execution_space , Kokkos::CudaUVMSpace > , Kokkos::Device< Kokkos::HostSpace::execution_space - , Kokkos::CudaUVMSpace > >::value , "" ); + , Kokkos::CudaUVMSpace > >::value, "" ); static_assert( Kokkos::Impl::SpaceAccessibility < Kokkos::Impl::HostMirror< Kokkos::Cuda >::Space , Kokkos::HostSpace - >::accessible , "" ); + >::accessible, "" ); static_assert( Kokkos::Impl::SpaceAccessibility < Kokkos::Impl::HostMirror< Kokkos::CudaSpace >::Space , Kokkos::HostSpace - >::accessible , "" ); + >::accessible, "" ); static_assert( Kokkos::Impl::SpaceAccessibility < Kokkos::Impl::HostMirror< Kokkos::CudaUVMSpace >::Space , Kokkos::HostSpace - >::accessible , "" ); + >::accessible, "" ); static_assert( Kokkos::Impl::SpaceAccessibility < Kokkos::Impl::HostMirror< Kokkos::CudaHostPinnedSpace >::Space , Kokkos::HostSpace - >::accessible , "" ); + >::accessible, "" ); } TEST_F( cuda, uvm ) { if ( Kokkos::CudaUVMSpace::available() ) { + int * uvm_ptr = (int*) Kokkos::kokkos_malloc< Kokkos::CudaUVMSpace >( "uvm_ptr", sizeof( int ) ); - int * uvm_ptr = (int*) Kokkos::kokkos_malloc< Kokkos::CudaUVMSpace >("uvm_ptr",sizeof(int)); - - *uvm_ptr = 42 ; + *uvm_ptr = 42; Kokkos::Cuda::fence(); - test_cuda_spaces_int_value<<<1,1>>>(uvm_ptr); + test_cuda_spaces_int_value<<< 1, 1 >>>( uvm_ptr ); Kokkos::Cuda::fence(); - EXPECT_EQ( *uvm_ptr, int(2*42) ); - - Kokkos::kokkos_free< Kokkos::CudaUVMSpace >(uvm_ptr ); + EXPECT_EQ( *uvm_ptr, int( 2 * 42 ) ); + Kokkos::kokkos_free< Kokkos::CudaUVMSpace >( uvm_ptr ); } } TEST_F( cuda, uvm_num_allocs ) { - // The max number of uvm allocations allowed is 65536 + // The max number of UVM allocations allowed is 65536. #define MAX_NUM_ALLOCS 65536 if ( Kokkos::CudaUVMSpace::available() ) { - struct TestMaxUVMAllocs { - using view_type = Kokkos::View< double* , Kokkos::CudaUVMSpace >; - using view_of_view_type = Kokkos::View< view_type[ MAX_NUM_ALLOCS ] + using view_type = Kokkos::View< double*, Kokkos::CudaUVMSpace >; + using view_of_view_type = Kokkos::View< view_type[ MAX_NUM_ALLOCS ] , Kokkos::CudaUVMSpace >; - TestMaxUVMAllocs() - : view_allocs_test("view_allocs_test") + TestMaxUVMAllocs() : view_allocs_test( "view_allocs_test" ) { + for ( auto i = 0; i < MAX_NUM_ALLOCS; ++i ) { - for ( auto i = 0; i < MAX_NUM_ALLOCS ; ++i ) { - - // Kokkos will throw a runtime exception if an attempt is made to - // allocate more than the maximum number of uvm allocations + // Kokkos will throw a runtime exception if an attempt is made to + // allocate more than the maximum number of uvm allocations. // In this test, the max num of allocs occurs when i = MAX_NUM_ALLOCS - 1 // since the 'outer' view counts as one UVM allocation, leaving - // 65535 possible UVM allocations, that is 'i in [0 , 65535)' + // 65535 possible UVM allocations, that is 'i in [0, 65535)'. - // The test will catch the exception thrown in this case and continue + // The test will catch the exception thrown in this case and continue. - if ( i == ( MAX_NUM_ALLOCS - 1) ) { - EXPECT_ANY_THROW( { view_allocs_test(i) = view_type("inner_view",1); } ) ; + if ( i == ( MAX_NUM_ALLOCS - 1 ) ) { + EXPECT_ANY_THROW( { view_allocs_test( i ) = view_type( "inner_view", 1 ); } ); } else { - if(i +template< class MemSpace, class ExecSpace > struct TestViewCudaAccessible { - enum { N = 1000 }; - using V = Kokkos::View ; + using V = Kokkos::View< double*, MemSpace >; - V m_base ; + V m_base; struct TagInit {}; struct TagTest {}; KOKKOS_INLINE_FUNCTION - void operator()( const TagInit & , const int i ) const { m_base[i] = i + 1 ; } + void operator()( const TagInit &, const int i ) const { m_base[i] = i + 1; } KOKKOS_INLINE_FUNCTION - void operator()( const TagTest & , const int i , long & error_count ) const - { if ( m_base[i] != i + 1 ) ++error_count ; } + void operator()( const TagTest &, const int i, long & error_count ) const + { if ( m_base[i] != i + 1 ) ++error_count; } TestViewCudaAccessible() - : m_base("base",N) + : m_base( "base", N ) {} static void run() - { - TestViewCudaAccessible self ; - Kokkos::parallel_for( Kokkos::RangePolicy< typename MemSpace::execution_space , TagInit >(0,N) , self ); - MemSpace::execution_space::fence(); - // Next access is a different execution space, must complete prior kernel. - long error_count = -1 ; - Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace , TagTest >(0,N) , self , error_count ); - EXPECT_EQ( error_count , 0 ); - } + { + TestViewCudaAccessible self; + Kokkos::parallel_for( Kokkos::RangePolicy< typename MemSpace::execution_space, TagInit >( 0, N ), self ); + MemSpace::execution_space::fence(); + + // Next access is a different execution space, must complete prior kernel. + long error_count = -1; + Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace, TagTest >( 0, N ), self, error_count ); + EXPECT_EQ( error_count, 0 ); + } }; -TEST_F( cuda , impl_view_accessible ) +TEST_F( cuda, impl_view_accessible ) { - TestViewCudaAccessible< Kokkos::CudaSpace , Kokkos::Cuda >::run(); + TestViewCudaAccessible< Kokkos::CudaSpace, Kokkos::Cuda >::run(); - TestViewCudaAccessible< Kokkos::CudaUVMSpace , Kokkos::Cuda >::run(); - TestViewCudaAccessible< Kokkos::CudaUVMSpace , Kokkos::HostSpace::execution_space >::run(); + TestViewCudaAccessible< Kokkos::CudaUVMSpace, Kokkos::Cuda >::run(); + TestViewCudaAccessible< Kokkos::CudaUVMSpace, Kokkos::HostSpace::execution_space >::run(); - TestViewCudaAccessible< Kokkos::CudaHostPinnedSpace , Kokkos::Cuda >::run(); - TestViewCudaAccessible< Kokkos::CudaHostPinnedSpace , Kokkos::HostSpace::execution_space >::run(); + TestViewCudaAccessible< Kokkos::CudaHostPinnedSpace, Kokkos::Cuda >::run(); + TestViewCudaAccessible< Kokkos::CudaHostPinnedSpace, Kokkos::HostSpace::execution_space >::run(); } template< class MemSpace > struct TestViewCudaTexture { - enum { N = 1000 }; - using V = Kokkos::View ; - using T = Kokkos::View ; + using V = Kokkos::View< double*, MemSpace >; + using T = Kokkos::View< const double*, MemSpace, Kokkos::MemoryRandomAccess >; - V m_base ; - T m_tex ; + V m_base; + T m_tex; struct TagInit {}; struct TagTest {}; KOKKOS_INLINE_FUNCTION - void operator()( const TagInit & , const int i ) const { m_base[i] = i + 1 ; } + void operator()( const TagInit &, const int i ) const { m_base[i] = i + 1; } KOKKOS_INLINE_FUNCTION - void operator()( const TagTest & , const int i , long & error_count ) const - { if ( m_tex[i] != i + 1 ) ++error_count ; } + void operator()( const TagTest &, const int i, long & error_count ) const + { if ( m_tex[i] != i + 1 ) ++error_count; } TestViewCudaTexture() - : m_base("base",N) + : m_base( "base", N ) , m_tex( m_base ) {} static void run() - { - EXPECT_TRUE( ( std::is_same< typename V::reference_type - , double & - >::value ) ); - - EXPECT_TRUE( ( std::is_same< typename T::reference_type - , const double - >::value ) ); - - EXPECT_TRUE( V::reference_type_is_lvalue_reference ); // An ordinary view - EXPECT_FALSE( T::reference_type_is_lvalue_reference ); // Texture fetch returns by value - - TestViewCudaTexture self ; - Kokkos::parallel_for( Kokkos::RangePolicy< Kokkos::Cuda , TagInit >(0,N) , self ); - long error_count = -1 ; - Kokkos::parallel_reduce( Kokkos::RangePolicy< Kokkos::Cuda , TagTest >(0,N) , self , error_count ); - EXPECT_EQ( error_count , 0 ); - } -}; + { + EXPECT_TRUE( ( std::is_same< typename V::reference_type, double & >::value ) ); + EXPECT_TRUE( ( std::is_same< typename T::reference_type, const double >::value ) ); + + EXPECT_TRUE( V::reference_type_is_lvalue_reference ); // An ordinary view. + EXPECT_FALSE( T::reference_type_is_lvalue_reference ); // Texture fetch returns by value. + TestViewCudaTexture self; + Kokkos::parallel_for( Kokkos::RangePolicy< Kokkos::Cuda, TagInit >( 0, N ), self ); -TEST_F( cuda , impl_view_texture ) + long error_count = -1; + Kokkos::parallel_reduce( Kokkos::RangePolicy< Kokkos::Cuda, TagTest >( 0, N ), self, error_count ); + EXPECT_EQ( error_count, 0 ); + } +}; + +TEST_F( cuda, impl_view_texture ) { TestViewCudaTexture< Kokkos::CudaSpace >::run(); TestViewCudaTexture< Kokkos::CudaUVMSpace >::run(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_a.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_a.cpp index fd8a647ef3..0aea35db51 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_a.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_a.cpp @@ -40,53 +40,64 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_auto_1d_left ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutLeft,Kokkos::Cuda >(); +TEST_F( cuda, view_subview_auto_1d_left ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutLeft, Kokkos::Cuda >(); } -TEST_F( cuda, view_subview_auto_1d_right ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutRight,Kokkos::Cuda >(); +TEST_F( cuda, view_subview_auto_1d_right ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutRight, Kokkos::Cuda >(); } -TEST_F( cuda, view_subview_auto_1d_stride ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutStride,Kokkos::Cuda >(); +TEST_F( cuda, view_subview_auto_1d_stride ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutStride, Kokkos::Cuda >(); } -TEST_F( cuda, view_subview_assign_strided ) { +TEST_F( cuda, view_subview_assign_strided ) +{ TestViewSubview::test_1d_strided_assignment< Kokkos::Cuda >(); } -TEST_F( cuda, view_subview_left_0 ) { +TEST_F( cuda, view_subview_left_0 ) +{ TestViewSubview::test_left_0< Kokkos::CudaUVMSpace >(); } -TEST_F( cuda, view_subview_left_1 ) { +TEST_F( cuda, view_subview_left_1 ) +{ TestViewSubview::test_left_1< Kokkos::CudaUVMSpace >(); } -TEST_F( cuda, view_subview_left_2 ) { +TEST_F( cuda, view_subview_left_2 ) +{ TestViewSubview::test_left_2< Kokkos::CudaUVMSpace >(); } -TEST_F( cuda, view_subview_left_3 ) { +TEST_F( cuda, view_subview_left_3 ) +{ TestViewSubview::test_left_3< Kokkos::CudaUVMSpace >(); } -TEST_F( cuda, view_subview_right_0 ) { +TEST_F( cuda, view_subview_right_0 ) +{ TestViewSubview::test_right_0< Kokkos::CudaUVMSpace >(); } -TEST_F( cuda, view_subview_right_1 ) { +TEST_F( cuda, view_subview_right_1 ) +{ TestViewSubview::test_right_1< Kokkos::CudaUVMSpace >(); } -TEST_F( cuda, view_subview_right_3 ) { +TEST_F( cuda, view_subview_right_3 ) +{ TestViewSubview::test_right_3< Kokkos::CudaUVMSpace >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_b.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_b.cpp index 053fcfc209..f31f4cbe62 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_b.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_b.cpp @@ -40,21 +40,23 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_layoutleft_to_layoutleft) { +TEST_F( cuda, view_subview_layoutleft_to_layoutleft ) +{ TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Cuda >(); - TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Cuda , Kokkos::MemoryTraits >(); - TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Cuda , Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Cuda, Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Cuda, Kokkos::MemoryTraits >(); } -TEST_F( cuda, view_subview_layoutright_to_layoutright) { +TEST_F( cuda, view_subview_layoutright_to_layoutright ) +{ TestViewSubview::test_layoutright_to_layoutright< Kokkos::Cuda >(); - TestViewSubview::test_layoutright_to_layoutright< Kokkos::Cuda , Kokkos::MemoryTraits >(); - TestViewSubview::test_layoutright_to_layoutright< Kokkos::Cuda , Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutright_to_layoutright< Kokkos::Cuda, Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutright_to_layoutright< Kokkos::Cuda, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c01.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c01.cpp index 4c5f2ef72f..0213a196e8 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c01.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c01.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_1d_assign ) { +TEST_F( cuda, view_subview_1d_assign ) +{ TestViewSubview::test_1d_assign< Kokkos::CudaUVMSpace >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c02.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c02.cpp index aee6f1730d..181e1bab2c 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c02.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c02.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_1d_assign_atomic ) { - TestViewSubview::test_1d_assign< Kokkos::CudaUVMSpace , Kokkos::MemoryTraits >(); +TEST_F( cuda, view_subview_1d_assign_atomic ) +{ + TestViewSubview::test_1d_assign< Kokkos::CudaUVMSpace, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c03.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c03.cpp index 2ef48c686e..708cc1f5ba 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c03.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c03.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_1d_assign_randomaccess ) { - TestViewSubview::test_1d_assign< Kokkos::CudaUVMSpace , Kokkos::MemoryTraits >(); +TEST_F( cuda, view_subview_1d_assign_randomaccess ) +{ + TestViewSubview::test_1d_assign< Kokkos::CudaUVMSpace, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c04.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c04.cpp index aec123ac23..a3db996f8d 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c04.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c04.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_2d_from_3d ) { +TEST_F( cuda, view_subview_2d_from_3d ) +{ TestViewSubview::test_2d_subview_3d< Kokkos::CudaUVMSpace >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c05.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c05.cpp index e8ad231996..2f7cffa75d 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c05.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c05.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_2d_from_3d_atomic ) { - TestViewSubview::test_2d_subview_3d< Kokkos::CudaUVMSpace , Kokkos::MemoryTraits >(); +TEST_F( cuda, view_subview_2d_from_3d_atomic ) +{ + TestViewSubview::test_2d_subview_3d< Kokkos::CudaUVMSpace, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c06.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c06.cpp index e86b4513fd..949c6f3e0b 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c06.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c06.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_2d_from_3d_randomaccess ) { - TestViewSubview::test_2d_subview_3d< Kokkos::CudaUVMSpace , Kokkos::MemoryTraits >(); +TEST_F( cuda, view_subview_2d_from_3d_randomaccess ) +{ + TestViewSubview::test_2d_subview_3d< Kokkos::CudaUVMSpace, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c07.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c07.cpp index ad9dcc0fd1..3e68277a9e 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c07.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c07.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_3d_from_5d_left ) { +TEST_F( cuda, view_subview_3d_from_5d_left ) +{ TestViewSubview::test_3d_subview_5d_left< Kokkos::CudaUVMSpace >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c08.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c08.cpp index f97d97e59c..0cd91b7795 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c08.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c08.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_3d_from_5d_left_atomic ) { - TestViewSubview::test_3d_subview_5d_left< Kokkos::CudaUVMSpace , Kokkos::MemoryTraits >(); +TEST_F( cuda, view_subview_3d_from_5d_left_atomic ) +{ + TestViewSubview::test_3d_subview_5d_left< Kokkos::CudaUVMSpace, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c09.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c09.cpp index 2a07f28f83..cd1c13f7d0 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c09.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c09.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_3d_from_5d_left_randomaccess ) { - TestViewSubview::test_3d_subview_5d_left< Kokkos::CudaUVMSpace , Kokkos::MemoryTraits >(); +TEST_F( cuda, view_subview_3d_from_5d_left_randomaccess ) +{ + TestViewSubview::test_3d_subview_5d_left< Kokkos::CudaUVMSpace, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c10.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c10.cpp index 3c51d94201..22d2753543 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c10.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c10.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_3d_from_5d_right ) { +TEST_F( cuda, view_subview_3d_from_5d_right ) +{ TestViewSubview::test_3d_subview_5d_right< Kokkos::CudaUVMSpace >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c11.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c11.cpp index 835caa7b87..5dc5f87b4e 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c11.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c11.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_3d_from_5d_right_atomic ) { - TestViewSubview::test_3d_subview_5d_right< Kokkos::CudaUVMSpace , Kokkos::MemoryTraits >(); +TEST_F( cuda, view_subview_3d_from_5d_right_atomic ) +{ + TestViewSubview::test_3d_subview_5d_right< Kokkos::CudaUVMSpace, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c12.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c12.cpp index 53bd5eee20..318d8edbbb 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c12.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c12.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_subview_3d_from_5d_right_randomaccess ) { - TestViewSubview::test_3d_subview_5d_right< Kokkos::CudaUVMSpace , Kokkos::MemoryTraits >(); +TEST_F( cuda, view_subview_3d_from_5d_right_randomaccess ) +{ + TestViewSubview::test_3d_subview_5d_right< Kokkos::CudaUVMSpace, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c_all.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c_all.cpp index e4348319f6..a2158f06c7 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c_all.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_SubView_c_all.cpp @@ -1,12 +1,12 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_Team.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_Team.cpp index 13834d09ad..8d9b9328ba 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_Team.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_Team.cpp @@ -40,81 +40,87 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda , team_tag ) +TEST_F( cuda, team_tag ) { - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_for(0); - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(0); - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_for(0); - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(0); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_for( 0 ); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 0 ); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_for( 0 ); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 0 ); - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_for(2); - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(2); - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_for(2); - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(2); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_for( 2 ); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 2 ); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_for( 2 ); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 2 ); - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_for(1000); - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(1000); - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_for(1000); - TestTeamPolicy< Kokkos::Cuda , Kokkos::Schedule >::test_reduce(1000); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_for( 1000 ); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 1000 ); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_for( 1000 ); + TestTeamPolicy< Kokkos::Cuda, Kokkos::Schedule >::test_reduce( 1000 ); } -TEST_F( cuda , team_shared_request) { - TestSharedTeam< Kokkos::Cuda , Kokkos::Schedule >(); - TestSharedTeam< Kokkos::Cuda , Kokkos::Schedule >(); +TEST_F( cuda, team_shared_request ) +{ + TestSharedTeam< Kokkos::Cuda, Kokkos::Schedule >(); + TestSharedTeam< Kokkos::Cuda, Kokkos::Schedule >(); } -//THis Tests request to much L0 scratch -//TEST_F( cuda, team_scratch_request) { -// TestScratchTeam< Kokkos::Cuda , Kokkos::Schedule >(); -// TestScratchTeam< Kokkos::Cuda , Kokkos::Schedule >(); +// This tests request to much L0 scratch. +//TEST_F( cuda, team_scratch_request ) +//{ +// TestScratchTeam< Kokkos::Cuda, Kokkos::Schedule >(); +// TestScratchTeam< Kokkos::Cuda, Kokkos::Schedule >(); //} -#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) -TEST_F( cuda , team_lambda_shared_request) { +#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) +TEST_F( cuda, team_lambda_shared_request ) +{ TestLambdaSharedTeam< Kokkos::CudaSpace, Kokkos::Cuda, Kokkos::Schedule >(); TestLambdaSharedTeam< Kokkos::CudaUVMSpace, Kokkos::Cuda, Kokkos::Schedule >(); - TestLambdaSharedTeam< Kokkos::CudaHostPinnedSpace, Kokkos::Cuda , Kokkos::Schedule >(); + TestLambdaSharedTeam< Kokkos::CudaHostPinnedSpace, Kokkos::Cuda, Kokkos::Schedule >(); TestLambdaSharedTeam< Kokkos::CudaSpace, Kokkos::Cuda, Kokkos::Schedule >(); TestLambdaSharedTeam< Kokkos::CudaUVMSpace, Kokkos::Cuda, Kokkos::Schedule >(); - TestLambdaSharedTeam< Kokkos::CudaHostPinnedSpace, Kokkos::Cuda , Kokkos::Schedule >(); + TestLambdaSharedTeam< Kokkos::CudaHostPinnedSpace, Kokkos::Cuda, Kokkos::Schedule >(); } #endif -TEST_F( cuda, shmem_size) { +TEST_F( cuda, shmem_size ) +{ TestShmemSize< Kokkos::Cuda >(); } -TEST_F( cuda, multi_level_scratch) { - TestMultiLevelScratchTeam< Kokkos::Cuda , Kokkos::Schedule >(); - TestMultiLevelScratchTeam< Kokkos::Cuda , Kokkos::Schedule >(); +TEST_F( cuda, multi_level_scratch ) +{ + TestMultiLevelScratchTeam< Kokkos::Cuda, Kokkos::Schedule >(); + TestMultiLevelScratchTeam< Kokkos::Cuda, Kokkos::Schedule >(); } -TEST_F( cuda , team_vector ) +#if !defined(KOKKOS_CUDA_CLANG_WORKAROUND) && !defined(KOKKOS_ARCH_PASCAL) +TEST_F( cuda, team_vector ) { - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(0) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(1) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(2) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(3) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(4) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(5) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(6) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(7) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(8) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(9) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(10) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >( 0 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >( 1 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >( 2 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >( 3 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >( 4 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >( 5 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >( 6 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >( 7 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >( 8 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >( 9 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >( 10 ) ) ); } +#endif TEST_F( cuda, triple_nested_parallelism ) { - TestTripleNestedReduce< double, Kokkos::Cuda >( 8192, 2048 , 32 , 32 ); - TestTripleNestedReduce< double, Kokkos::Cuda >( 8192, 2048 , 32 , 16 ); - TestTripleNestedReduce< double, Kokkos::Cuda >( 8192, 2048 , 16 , 16 ); + TestTripleNestedReduce< double, Kokkos::Cuda >( 8192, 2048, 32, 32 ); + TestTripleNestedReduce< double, Kokkos::Cuda >( 8192, 2048, 32, 16 ); + TestTripleNestedReduce< double, Kokkos::Cuda >( 8192, 2048, 16, 16 ); } - -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_a.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_a.cpp index c01ca1c146..be0c4c5715 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_a.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_a.cpp @@ -40,20 +40,21 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda , impl_view_mapping_a ) { +TEST_F( cuda, impl_view_mapping_a ) +{ test_view_mapping< Kokkos::CudaSpace >(); test_view_mapping_operator< Kokkos::CudaSpace >(); } -TEST_F( cuda , view_of_class ) +TEST_F( cuda, view_of_class ) { TestViewMappingClassValue< Kokkos::CudaSpace >::run(); TestViewMappingClassValue< Kokkos::CudaUVMSpace >::run(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_b.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_b.cpp index 8e821ada00..b4d8e5d953 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_b.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_b.cpp @@ -40,14 +40,15 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda , impl_view_mapping_d ) { +TEST_F( cuda, impl_view_mapping_d ) +{ test_view_mapping< Kokkos::CudaHostPinnedSpace >(); test_view_mapping_operator< Kokkos::CudaHostPinnedSpace >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_c.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_c.cpp index cf29a68e96..e4e6894c53 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_c.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_c.cpp @@ -40,14 +40,15 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda , impl_view_mapping_c ) { +TEST_F( cuda, impl_view_mapping_c ) +{ test_view_mapping< Kokkos::CudaUVMSpace >(); test_view_mapping_operator< Kokkos::CudaUVMSpace >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_d.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_d.cpp index db14b5158f..82a3dd83e8 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_d.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_d.cpp @@ -40,73 +40,77 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda , view_nested_view ) +TEST_F( cuda, view_nested_view ) { ::Test::view_nested_view< Kokkos::Cuda >(); } - - -TEST_F( cuda , view_remap ) +TEST_F( cuda, view_remap ) { - enum { N0 = 3 , N1 = 2 , N2 = 8 , N3 = 9 }; + enum { N0 = 3, N1 = 2, N2 = 8, N3 = 9 }; - typedef Kokkos::View< double*[N1][N2][N3] , - Kokkos::LayoutRight , - Kokkos::CudaUVMSpace > output_type ; + typedef Kokkos::View< double*[N1][N2][N3], + Kokkos::LayoutRight, + Kokkos::CudaUVMSpace > output_type; - typedef Kokkos::View< int**[N2][N3] , - Kokkos::LayoutLeft , - Kokkos::CudaUVMSpace > input_type ; + typedef Kokkos::View< int**[N2][N3], + Kokkos::LayoutLeft, + Kokkos::CudaUVMSpace > input_type; - typedef Kokkos::View< int*[N0][N2][N3] , - Kokkos::LayoutLeft , - Kokkos::CudaUVMSpace > diff_type ; + typedef Kokkos::View< int*[N0][N2][N3], + Kokkos::LayoutLeft, + Kokkos::CudaUVMSpace > diff_type; - output_type output( "output" , N0 ); - input_type input ( "input" , N0 , N1 ); - diff_type diff ( "diff" , N0 ); + output_type output( "output", N0 ); + input_type input ( "input", N0, N1 ); + diff_type diff ( "diff", N0 ); Kokkos::fence(); - int value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - input(i0,i1,i2,i3) = ++value ; - }}}} + + int value = 0; + + for ( size_t i3 = 0; i3 < N3; ++i3 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i0 = 0; i0 < N0; ++i0 ) + { + input( i0, i1, i2, i3 ) = ++value; + } + Kokkos::fence(); - // Kokkos::deep_copy( diff , input ); // throw with incompatible shape - Kokkos::deep_copy( output , input ); - + // Kokkos::deep_copy( diff, input ); // Throw with incompatible shape. + Kokkos::deep_copy( output, input ); + Kokkos::fence(); - value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - ++value ; - ASSERT_EQ( value , ((int) output(i0,i1,i2,i3) ) ); - }}}} + + value = 0; + + for ( size_t i3 = 0; i3 < N3; ++i3 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i0 = 0; i0 < N0; ++i0 ) + { + ++value; + ASSERT_EQ( value, ( (int) output( i0, i1, i2, i3 ) ) ); + } + Kokkos::fence(); } -//---------------------------------------------------------------------------- - -TEST_F( cuda , view_aggregate ) +TEST_F( cuda, view_aggregate ) { TestViewAggregate< Kokkos::Cuda >(); } -TEST_F( cuda , template_meta_functions ) +TEST_F( cuda, template_meta_functions ) { - TestTemplateMetaFunctions(); + TestTemplateMetaFunctions< int, Kokkos::Cuda >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_e.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_e.cpp index 07d4256473..27450fa6ff 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_e.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_e.cpp @@ -40,17 +40,20 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda , impl_shared_alloc ) { - test_shared_alloc< Kokkos::CudaSpace , Kokkos::HostSpace::execution_space >(); - test_shared_alloc< Kokkos::CudaUVMSpace , Kokkos::HostSpace::execution_space >(); - test_shared_alloc< Kokkos::CudaHostPinnedSpace , Kokkos::HostSpace::execution_space >(); +TEST_F( cuda, impl_shared_alloc ) +{ + test_shared_alloc< Kokkos::CudaSpace, Kokkos::HostSpace::execution_space >(); + test_shared_alloc< Kokkos::CudaUVMSpace, Kokkos::HostSpace::execution_space >(); + test_shared_alloc< Kokkos::CudaHostPinnedSpace, Kokkos::HostSpace::execution_space >(); } -TEST_F( cuda , impl_view_mapping_b ) { +TEST_F( cuda, impl_view_mapping_b ) +{ test_view_mapping_subview< Kokkos::CudaSpace >(); test_view_mapping_subview< Kokkos::CudaUVMSpace >(); test_view_mapping_subview< Kokkos::CudaHostPinnedSpace >(); @@ -59,5 +62,4 @@ TEST_F( cuda , impl_view_mapping_b ) { TestViewMappingAtomic< Kokkos::CudaHostPinnedSpace >::run(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_f.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_f.cpp index 34721f02dc..56524111ae 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_f.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_f.cpp @@ -40,16 +40,17 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_api_a) { - typedef Kokkos::View< const int * , Kokkos::Cuda , Kokkos::MemoryTraits< Kokkos::RandomAccess > > view_texture_managed ; - typedef Kokkos::View< const int * , Kokkos::Cuda , Kokkos::MemoryTraits< Kokkos::RandomAccess | Kokkos::Unmanaged > > view_texture_unmanaged ; +TEST_F( cuda, view_api_a ) +{ + typedef Kokkos::View< const int *, Kokkos::Cuda, Kokkos::MemoryTraits > view_texture_managed; + typedef Kokkos::View< const int *, Kokkos::Cuda, Kokkos::MemoryTraits > view_texture_unmanaged; - TestViewAPI< double , Kokkos::Cuda >(); + TestViewAPI< double, Kokkos::Cuda >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_g.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_g.cpp index abbcf3bf8b..d5fd24456d 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_g.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_g.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_api_b) { - TestViewAPI< double , Kokkos::CudaUVMSpace >(); +TEST_F( cuda, view_api_b ) +{ + TestViewAPI< double, Kokkos::CudaUVMSpace >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_h.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_h.cpp index 9899642035..649023e4af 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_h.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_h.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda, view_api_c) { - TestViewAPI< double , Kokkos::CudaHostPinnedSpace >(); +TEST_F( cuda, view_api_c ) +{ + TestViewAPI< double, Kokkos::CudaHostPinnedSpace >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_s.cpp b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_s.cpp index 9bc09ba893..b46b1e5f81 100644 --- a/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_s.cpp +++ b/lib/kokkos/core/unit_test/cuda/TestCuda_ViewAPI_s.cpp @@ -40,14 +40,15 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( cuda , view_space_assign ) { - view_space_assign< Kokkos::HostSpace , Kokkos::CudaHostPinnedSpace >(); - view_space_assign< Kokkos::CudaSpace , Kokkos::CudaUVMSpace >(); +TEST_F( cuda, view_space_assign ) +{ + view_space_assign< Kokkos::HostSpace, Kokkos::CudaHostPinnedSpace >(); + view_space_assign< Kokkos::CudaSpace, Kokkos::CudaUVMSpace >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP.hpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP.hpp index 28ae5b41b0..ed9bb68cd6 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP.hpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP.hpp @@ -40,11 +40,14 @@ // ************************************************************************ //@HEADER */ + #ifndef KOKKOS_TEST_OPENMP_HPP #define KOKKOS_TEST_OPENMP_HPP + #include #include + #ifdef KOKKOS_LAMBDA #undef KOKKOS_LAMBDA #endif @@ -53,13 +56,8 @@ #include #include - -//---------------------------------------------------------------------------- - #include #include - - #include #include #include @@ -74,15 +72,11 @@ #include #include #include - - #include #include #include #include - #include - #include namespace Test { @@ -95,23 +89,24 @@ protected: const unsigned cores_per_numa = Kokkos::hwloc::get_available_cores_per_numa(); const unsigned threads_per_core = Kokkos::hwloc::get_available_threads_per_core(); - const unsigned threads_count = std::max( 1u , numa_count ) * - std::max( 2u , ( cores_per_numa * threads_per_core ) / 2 ); + const unsigned threads_count = std::max( 1u, numa_count ) * + std::max( 2u, ( cores_per_numa * threads_per_core ) / 2 ); Kokkos::OpenMP::initialize( threads_count ); - Kokkos::OpenMP::print_configuration( std::cout , true ); - srand(10231); + Kokkos::print_configuration( std::cout, true ); + srand( 10231 ); } static void TearDownTestCase() { Kokkos::OpenMP::finalize(); - omp_set_num_threads(1); + omp_set_num_threads( 1 ); - ASSERT_EQ( 1 , omp_get_max_threads() ); + ASSERT_EQ( 1, omp_get_max_threads() ); } }; -} +} // namespace Test + #endif diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_Atomics.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_Atomics.cpp index ed6c9f8d16..2585c01973 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_Atomics.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_Atomics.cpp @@ -40,165 +40,162 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp , atomics ) +TEST_F( openmp, atomics ) { - const int loop_count = 1e4 ; + const int loop_count = 1e4; - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::OpenMP >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::OpenMP >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::OpenMP >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::OpenMP >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::OpenMP >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::OpenMP >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::OpenMP >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::OpenMP >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::OpenMP >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::OpenMP >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::OpenMP >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::OpenMP >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::OpenMP >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::OpenMP >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::OpenMP >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::OpenMP >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::OpenMP >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::OpenMP >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::OpenMP >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::OpenMP >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::OpenMP >( 100, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::OpenMP>(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::OpenMP>(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::OpenMP>(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::OpenMP >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::OpenMP >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::OpenMP >( 100, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::OpenMP>(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::OpenMP>(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::OpenMP>(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::OpenMP >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::OpenMP >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::OpenMP >( 100, 3 ) ) ); } -TEST_F( openmp , atomic_operations ) +TEST_F( openmp, atomic_operations ) { - const int start = 1; //Avoid zero for division + const int start = 1; // Avoid zero for division. const int end = 11; - for (int i = start; i < end; ++i) + + for ( int i = start; i < end; ++i ) { - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 4 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::OpenMP >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::OpenMP >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::OpenMP >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::OpenMP >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::OpenMP >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::OpenMP >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::OpenMP >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::OpenMP >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::OpenMP >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::OpenMP >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::OpenMP >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::OpenMP >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::OpenMP >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::OpenMP >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::OpenMP >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::OpenMP >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::OpenMP >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::OpenMP >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::OpenMP >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::OpenMP >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::OpenMP >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::OpenMP >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::OpenMP >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::OpenMP >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::OpenMP >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::OpenMP >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::OpenMP >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::OpenMP >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::OpenMP >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::OpenMP >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::OpenMP >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::OpenMP >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::OpenMP >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::OpenMP >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::OpenMP >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::OpenMP >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::OpenMP >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::OpenMP >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::OpenMP >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::OpenMP >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::OpenMP >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::OpenMP >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::OpenMP >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::OpenMP >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::OpenMP >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::OpenMP >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::OpenMP >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::OpenMP >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::OpenMP >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::OpenMP >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::OpenMP >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::OpenMP >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::OpenMP >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::OpenMP >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::OpenMP >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::OpenMP >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::OpenMP >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::OpenMP >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::OpenMP >( start, end - i, 4 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::OpenMP >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::OpenMP >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::OpenMP >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::OpenMP >( start, end - i, 4 ) ) ); } - } - -TEST_F( openmp , atomic_views_integral ) +TEST_F( openmp, atomic_views_integral ) { const long length = 1000000; { - //Integral Types - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 8 ) ) ); - + // Integral Types. + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::OpenMP >( length, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::OpenMP >( length, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::OpenMP >( length, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::OpenMP >( length, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::OpenMP >( length, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::OpenMP >( length, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::OpenMP >( length, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::OpenMP >( length, 8 ) ) ); } } -TEST_F( openmp , atomic_views_nonintegral ) +TEST_F( openmp, atomic_views_nonintegral ) { const long length = 1000000; { - //Non-Integral Types - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 4 ) ) ); - + // Non-Integral Types. + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::OpenMP >( length, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::OpenMP >( length, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::OpenMP >( length, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::OpenMP >( length, 4 ) ) ); } } -TEST_F( openmp , atomic_view_api ) +TEST_F( openmp, atomic_view_api ) { - TestAtomicViews::TestAtomicViewAPI(); + TestAtomicViews::TestAtomicViewAPI(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_Other.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_Other.cpp index 126d730f0f..b4f32dac70 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_Other.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_Other.cpp @@ -40,65 +40,90 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp , init ) { +TEST_F( openmp, init ) +{ ; } -TEST_F( openmp , md_range ) { - TestMDRange_2D< Kokkos::OpenMP >::test_for2(100,100); +TEST_F( openmp, mdrange_for ) +{ + Kokkos::Timer timer; + TestMDRange_2D< Kokkos::OpenMP >::test_for2( 10000, 1000 ); + std::cout << " 2D: " << timer.seconds() << std::endl; + + timer.reset(); + TestMDRange_3D< Kokkos::OpenMP >::test_for3( 100, 100, 1000 ); + std::cout << " 3D: " << timer.seconds() << std::endl; - TestMDRange_3D< Kokkos::OpenMP >::test_for3(100,100,100); + timer.reset(); + TestMDRange_4D< Kokkos::OpenMP >::test_for4( 100, 10, 100, 100 ); + std::cout << " 4D: " << timer.seconds() << std::endl; + + timer.reset(); + TestMDRange_5D< Kokkos::OpenMP >::test_for5( 100, 10, 10, 100, 50 ); + std::cout << " 5D: " << timer.seconds() << std::endl; + + timer.reset(); + TestMDRange_6D< Kokkos::OpenMP >::test_for6( 10, 10, 10, 10, 50, 50 ); + std::cout << " 6D: " << timer.seconds() << std::endl; } -TEST_F( openmp, policy_construction) { +TEST_F( openmp, mdrange_reduce ) +{ + TestMDRange_2D< Kokkos::OpenMP >::test_reduce2( 100, 100 ); + TestMDRange_3D< Kokkos::OpenMP >::test_reduce3( 100, 10, 100 ); +} + +TEST_F( openmp, policy_construction ) +{ TestRangePolicyConstruction< Kokkos::OpenMP >(); TestTeamPolicyConstruction< Kokkos::OpenMP >(); } -TEST_F( openmp , range_tag ) +TEST_F( openmp, range_tag ) { - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_for(0); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(0); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_scan(0); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_for(0); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(0); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_scan(0); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_dynamic_policy(0); - - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_for(2); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(2); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_scan(2); - - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_for(3); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(3); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_scan(3); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_dynamic_policy(3); - - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_for(1000); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(1000); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_scan(1000); - - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_for(1001); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(1001); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_scan(1001); - TestRange< Kokkos::OpenMP , Kokkos::Schedule >::test_dynamic_policy(1000); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 0 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 0 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_scan( 0 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 0 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 0 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_scan( 0 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_dynamic_policy( 0 ); + + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 2 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 2 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_scan( 2 ); + + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 3 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 3 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_scan( 3 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_dynamic_policy( 3 ); + + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 1000 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 1000 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_scan( 1000 ); + + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 1001 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 1001 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_scan( 1001 ); + TestRange< Kokkos::OpenMP, Kokkos::Schedule >::test_dynamic_policy( 1000 ); } - //---------------------------------------------------------------------------- -TEST_F( openmp , compiler_macros ) +TEST_F( openmp, compiler_macros ) { ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::OpenMP >() ) ); } //---------------------------------------------------------------------------- -TEST_F( openmp , memory_pool ) +TEST_F( openmp, memory_pool ) { bool val = TestMemoryPool::test_mempool< Kokkos::OpenMP >( 128, 128000000 ); ASSERT_TRUE( val ); @@ -112,24 +137,24 @@ TEST_F( openmp , memory_pool ) #if defined( KOKKOS_ENABLE_TASKDAG ) -TEST_F( openmp , task_fib ) +TEST_F( openmp, task_fib ) { - for ( int i = 0 ; i < 25 ; ++i ) { - TestTaskScheduler::TestFib< Kokkos::OpenMP >::run(i, (i+1)*(i+1)*10000 ); + for ( int i = 0; i < 25; ++i ) { + TestTaskScheduler::TestFib< Kokkos::OpenMP >::run( i, ( i + 1 ) * ( i + 1 ) * 10000 ); } } -TEST_F( openmp , task_depend ) +TEST_F( openmp, task_depend ) { - for ( int i = 0 ; i < 25 ; ++i ) { - TestTaskScheduler::TestTaskDependence< Kokkos::OpenMP >::run(i); + for ( int i = 0; i < 25; ++i ) { + TestTaskScheduler::TestTaskDependence< Kokkos::OpenMP >::run( i ); } } -TEST_F( openmp , task_team ) +TEST_F( openmp, task_team ) { - TestTaskScheduler::TestTaskTeam< Kokkos::OpenMP >::run(1000); - //TestTaskScheduler::TestTaskTeamValue< Kokkos::OpenMP >::run(1000); //put back after testing + TestTaskScheduler::TestTaskTeam< Kokkos::OpenMP >::run( 1000 ); + //TestTaskScheduler::TestTaskTeamValue< Kokkos::OpenMP >::run( 1000 ); // Put back after testing. } #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ @@ -137,53 +162,51 @@ TEST_F( openmp , task_team ) //---------------------------------------------------------------------------- #if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) -TEST_F( openmp , cxx11 ) +TEST_F( openmp, cxx11 ) { - if ( std::is_same< Kokkos::DefaultExecutionSpace , Kokkos::OpenMP >::value ) { - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >(1) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >(2) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >(3) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >(4) ) ); + if ( std::is_same< Kokkos::DefaultExecutionSpace, Kokkos::OpenMP >::value ) { + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >( 1 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >( 2 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >( 3 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >( 4 ) ) ); } } #endif TEST_F( openmp, tile_layout ) { - TestTile::test< Kokkos::OpenMP , 1 , 1 >( 1 , 1 ); - TestTile::test< Kokkos::OpenMP , 1 , 1 >( 2 , 3 ); - TestTile::test< Kokkos::OpenMP , 1 , 1 >( 9 , 10 ); - - TestTile::test< Kokkos::OpenMP , 2 , 2 >( 1 , 1 ); - TestTile::test< Kokkos::OpenMP , 2 , 2 >( 2 , 3 ); - TestTile::test< Kokkos::OpenMP , 2 , 2 >( 4 , 4 ); - TestTile::test< Kokkos::OpenMP , 2 , 2 >( 9 , 9 ); - - TestTile::test< Kokkos::OpenMP , 2 , 4 >( 9 , 9 ); - TestTile::test< Kokkos::OpenMP , 4 , 2 >( 9 , 9 ); - - TestTile::test< Kokkos::OpenMP , 4 , 4 >( 1 , 1 ); - TestTile::test< Kokkos::OpenMP , 4 , 4 >( 4 , 4 ); - TestTile::test< Kokkos::OpenMP , 4 , 4 >( 9 , 9 ); - TestTile::test< Kokkos::OpenMP , 4 , 4 >( 9 , 11 ); - - TestTile::test< Kokkos::OpenMP , 8 , 8 >( 1 , 1 ); - TestTile::test< Kokkos::OpenMP , 8 , 8 >( 4 , 4 ); - TestTile::test< Kokkos::OpenMP , 8 , 8 >( 9 , 9 ); - TestTile::test< Kokkos::OpenMP , 8 , 8 >( 9 , 11 ); + TestTile::test< Kokkos::OpenMP, 1, 1 >( 1, 1 ); + TestTile::test< Kokkos::OpenMP, 1, 1 >( 2, 3 ); + TestTile::test< Kokkos::OpenMP, 1, 1 >( 9, 10 ); + + TestTile::test< Kokkos::OpenMP, 2, 2 >( 1, 1 ); + TestTile::test< Kokkos::OpenMP, 2, 2 >( 2, 3 ); + TestTile::test< Kokkos::OpenMP, 2, 2 >( 4, 4 ); + TestTile::test< Kokkos::OpenMP, 2, 2 >( 9, 9 ); + + TestTile::test< Kokkos::OpenMP, 2, 4 >( 9, 9 ); + TestTile::test< Kokkos::OpenMP, 4, 2 >( 9, 9 ); + + TestTile::test< Kokkos::OpenMP, 4, 4 >( 1, 1 ); + TestTile::test< Kokkos::OpenMP, 4, 4 >( 4, 4 ); + TestTile::test< Kokkos::OpenMP, 4, 4 >( 9, 9 ); + TestTile::test< Kokkos::OpenMP, 4, 4 >( 9, 11 ); + + TestTile::test< Kokkos::OpenMP, 8, 8 >( 1, 1 ); + TestTile::test< Kokkos::OpenMP, 8, 8 >( 4, 4 ); + TestTile::test< Kokkos::OpenMP, 8, 8 >( 9, 9 ); + TestTile::test< Kokkos::OpenMP, 8, 8 >( 9, 11 ); } - -TEST_F( openmp , dispatch ) +TEST_F( openmp, dispatch ) { - const int repeat = 100 ; - for ( int i = 0 ; i < repeat ; ++i ) { - for ( int j = 0 ; j < repeat ; ++j ) { - Kokkos::parallel_for( Kokkos::RangePolicy< Kokkos::OpenMP >(0,j) - , KOKKOS_LAMBDA( int ) {} ); - }} + const int repeat = 100; + for ( int i = 0; i < repeat; ++i ) { + for ( int j = 0; j < repeat; ++j ) { + Kokkos::parallel_for( Kokkos::RangePolicy< Kokkos::OpenMP >( 0, j ) + , KOKKOS_LAMBDA( int ) {} ); + } + } } - -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_Reductions.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_Reductions.cpp index d41e1493ee..22c29308a6 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_Reductions.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_Reductions.cpp @@ -40,46 +40,52 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, long_reduce) { - TestReduce< long , Kokkos::OpenMP >( 0 ); - TestReduce< long , Kokkos::OpenMP >( 1000000 ); +TEST_F( openmp, long_reduce ) +{ + TestReduce< long, Kokkos::OpenMP >( 0 ); + TestReduce< long, Kokkos::OpenMP >( 1000000 ); } -TEST_F( openmp, double_reduce) { - TestReduce< double , Kokkos::OpenMP >( 0 ); - TestReduce< double , Kokkos::OpenMP >( 1000000 ); +TEST_F( openmp, double_reduce ) +{ + TestReduce< double, Kokkos::OpenMP >( 0 ); + TestReduce< double, Kokkos::OpenMP >( 1000000 ); } -TEST_F( openmp , reducers ) +TEST_F( openmp, reducers ) { - TestReducers::execute_integer(); - TestReducers::execute_integer(); - TestReducers::execute_float(); - TestReducers, Kokkos::OpenMP>::execute_basic(); + TestReducers< int, Kokkos::OpenMP >::execute_integer(); + TestReducers< size_t, Kokkos::OpenMP >::execute_integer(); + TestReducers< double, Kokkos::OpenMP >::execute_float(); + TestReducers< Kokkos::complex, Kokkos::OpenMP >::execute_basic(); } -TEST_F( openmp, long_reduce_dynamic ) { - TestReduceDynamic< long , Kokkos::OpenMP >( 0 ); - TestReduceDynamic< long , Kokkos::OpenMP >( 1000000 ); +TEST_F( openmp, long_reduce_dynamic ) +{ + TestReduceDynamic< long, Kokkos::OpenMP >( 0 ); + TestReduceDynamic< long, Kokkos::OpenMP >( 1000000 ); } -TEST_F( openmp, double_reduce_dynamic ) { - TestReduceDynamic< double , Kokkos::OpenMP >( 0 ); - TestReduceDynamic< double , Kokkos::OpenMP >( 1000000 ); +TEST_F( openmp, double_reduce_dynamic ) +{ + TestReduceDynamic< double, Kokkos::OpenMP >( 0 ); + TestReduceDynamic< double, Kokkos::OpenMP >( 1000000 ); } -TEST_F( openmp, long_reduce_dynamic_view ) { - TestReduceDynamicView< long , Kokkos::OpenMP >( 0 ); - TestReduceDynamicView< long , Kokkos::OpenMP >( 1000000 ); +TEST_F( openmp, long_reduce_dynamic_view ) +{ + TestReduceDynamicView< long, Kokkos::OpenMP >( 0 ); + TestReduceDynamicView< long, Kokkos::OpenMP >( 1000000 ); } -TEST_F( openmp , scan ) +TEST_F( openmp, scan ) { - TestScan< Kokkos::OpenMP >::test_range( 1 , 1000 ); + TestScan< Kokkos::OpenMP >::test_range( 1, 1000 ); TestScan< Kokkos::OpenMP >( 0 ); TestScan< Kokkos::OpenMP >( 100000 ); TestScan< Kokkos::OpenMP >( 10000000 ); @@ -87,10 +93,11 @@ TEST_F( openmp , scan ) } #if 0 -TEST_F( openmp , scan_small ) +TEST_F( openmp, scan_small ) { - typedef TestScan< Kokkos::OpenMP , Kokkos::Impl::OpenMPExecUseScanSmall > TestScanFunctor ; - for ( int i = 0 ; i < 1000 ; ++i ) { + typedef TestScan< Kokkos::OpenMP, Kokkos::Impl::OpenMPExecUseScanSmall > TestScanFunctor; + + for ( int i = 0; i < 1000; ++i ) { TestScanFunctor( 10 ); TestScanFunctor( 10000 ); } @@ -101,38 +108,39 @@ TEST_F( openmp , scan_small ) } #endif -TEST_F( openmp , team_scan ) +TEST_F( openmp, team_scan ) { - TestScanTeam< Kokkos::OpenMP , Kokkos::Schedule >( 0 ); - TestScanTeam< Kokkos::OpenMP , Kokkos::Schedule >( 0 ); - TestScanTeam< Kokkos::OpenMP , Kokkos::Schedule >( 10 ); - TestScanTeam< Kokkos::OpenMP , Kokkos::Schedule >( 10 ); - TestScanTeam< Kokkos::OpenMP , Kokkos::Schedule >( 10000 ); - TestScanTeam< Kokkos::OpenMP , Kokkos::Schedule >( 10000 ); + TestScanTeam< Kokkos::OpenMP, Kokkos::Schedule >( 0 ); + TestScanTeam< Kokkos::OpenMP, Kokkos::Schedule >( 0 ); + TestScanTeam< Kokkos::OpenMP, Kokkos::Schedule >( 10 ); + TestScanTeam< Kokkos::OpenMP, Kokkos::Schedule >( 10 ); + TestScanTeam< Kokkos::OpenMP, Kokkos::Schedule >( 10000 ); + TestScanTeam< Kokkos::OpenMP, Kokkos::Schedule >( 10000 ); } -TEST_F( openmp , team_long_reduce) { - TestReduceTeam< long , Kokkos::OpenMP , Kokkos::Schedule >( 0 ); - TestReduceTeam< long , Kokkos::OpenMP , Kokkos::Schedule >( 0 ); - TestReduceTeam< long , Kokkos::OpenMP , Kokkos::Schedule >( 3 ); - TestReduceTeam< long , Kokkos::OpenMP , Kokkos::Schedule >( 3 ); - TestReduceTeam< long , Kokkos::OpenMP , Kokkos::Schedule >( 100000 ); - TestReduceTeam< long , Kokkos::OpenMP , Kokkos::Schedule >( 100000 ); +TEST_F( openmp, team_long_reduce ) +{ + TestReduceTeam< long, Kokkos::OpenMP, Kokkos::Schedule >( 0 ); + TestReduceTeam< long, Kokkos::OpenMP, Kokkos::Schedule >( 0 ); + TestReduceTeam< long, Kokkos::OpenMP, Kokkos::Schedule >( 3 ); + TestReduceTeam< long, Kokkos::OpenMP, Kokkos::Schedule >( 3 ); + TestReduceTeam< long, Kokkos::OpenMP, Kokkos::Schedule >( 100000 ); + TestReduceTeam< long, Kokkos::OpenMP, Kokkos::Schedule >( 100000 ); } -TEST_F( openmp , team_double_reduce) { - TestReduceTeam< double , Kokkos::OpenMP , Kokkos::Schedule >( 0 ); - TestReduceTeam< double , Kokkos::OpenMP , Kokkos::Schedule >( 0 ); - TestReduceTeam< double , Kokkos::OpenMP , Kokkos::Schedule >( 3 ); - TestReduceTeam< double , Kokkos::OpenMP , Kokkos::Schedule >( 3 ); - TestReduceTeam< double , Kokkos::OpenMP , Kokkos::Schedule >( 100000 ); - TestReduceTeam< double , Kokkos::OpenMP , Kokkos::Schedule >( 100000 ); +TEST_F( openmp, team_double_reduce ) +{ + TestReduceTeam< double, Kokkos::OpenMP, Kokkos::Schedule >( 0 ); + TestReduceTeam< double, Kokkos::OpenMP, Kokkos::Schedule >( 0 ); + TestReduceTeam< double, Kokkos::OpenMP, Kokkos::Schedule >( 3 ); + TestReduceTeam< double, Kokkos::OpenMP, Kokkos::Schedule >( 3 ); + TestReduceTeam< double, Kokkos::OpenMP, Kokkos::Schedule >( 100000 ); + TestReduceTeam< double, Kokkos::OpenMP, Kokkos::Schedule >( 100000 ); } -TEST_F( openmp , reduction_deduction ) +TEST_F( openmp, reduction_deduction ) { TestCXX11::test_reduction_deduction< Kokkos::OpenMP >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_a.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_a.cpp index 9854417e42..fefae07322 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_a.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_a.cpp @@ -40,53 +40,64 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_auto_1d_left ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutLeft,Kokkos::OpenMP >(); +TEST_F( openmp, view_subview_auto_1d_left ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutLeft, Kokkos::OpenMP >(); } -TEST_F( openmp, view_subview_auto_1d_right ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutRight,Kokkos::OpenMP >(); +TEST_F( openmp, view_subview_auto_1d_right ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutRight, Kokkos::OpenMP >(); } -TEST_F( openmp, view_subview_auto_1d_stride ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutStride,Kokkos::OpenMP >(); +TEST_F( openmp, view_subview_auto_1d_stride ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutStride, Kokkos::OpenMP >(); } -TEST_F( openmp, view_subview_assign_strided ) { +TEST_F( openmp, view_subview_assign_strided ) +{ TestViewSubview::test_1d_strided_assignment< Kokkos::OpenMP >(); } -TEST_F( openmp, view_subview_left_0 ) { +TEST_F( openmp, view_subview_left_0 ) +{ TestViewSubview::test_left_0< Kokkos::OpenMP >(); } -TEST_F( openmp, view_subview_left_1 ) { +TEST_F( openmp, view_subview_left_1 ) +{ TestViewSubview::test_left_1< Kokkos::OpenMP >(); } -TEST_F( openmp, view_subview_left_2 ) { +TEST_F( openmp, view_subview_left_2 ) +{ TestViewSubview::test_left_2< Kokkos::OpenMP >(); } -TEST_F( openmp, view_subview_left_3 ) { +TEST_F( openmp, view_subview_left_3 ) +{ TestViewSubview::test_left_3< Kokkos::OpenMP >(); } -TEST_F( openmp, view_subview_right_0 ) { +TEST_F( openmp, view_subview_right_0 ) +{ TestViewSubview::test_right_0< Kokkos::OpenMP >(); } -TEST_F( openmp, view_subview_right_1 ) { +TEST_F( openmp, view_subview_right_1 ) +{ TestViewSubview::test_right_1< Kokkos::OpenMP >(); } -TEST_F( openmp, view_subview_right_3 ) { +TEST_F( openmp, view_subview_right_3 ) +{ TestViewSubview::test_right_3< Kokkos::OpenMP >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_b.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_b.cpp index 2aa1fc5c63..7de7ca91bd 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_b.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_b.cpp @@ -40,21 +40,23 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_layoutleft_to_layoutleft) { +TEST_F( openmp, view_subview_layoutleft_to_layoutleft ) +{ TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::OpenMP >(); - TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::OpenMP , Kokkos::MemoryTraits >(); - TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::OpenMP , Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::OpenMP, Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::OpenMP, Kokkos::MemoryTraits >(); } -TEST_F( openmp, view_subview_layoutright_to_layoutright) { +TEST_F( openmp, view_subview_layoutright_to_layoutright ) +{ TestViewSubview::test_layoutright_to_layoutright< Kokkos::OpenMP >(); - TestViewSubview::test_layoutright_to_layoutright< Kokkos::OpenMP , Kokkos::MemoryTraits >(); - TestViewSubview::test_layoutright_to_layoutright< Kokkos::OpenMP , Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutright_to_layoutright< Kokkos::OpenMP, Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutright_to_layoutright< Kokkos::OpenMP, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c01.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c01.cpp index 1a6871cfca..d727ec0ee5 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c01.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c01.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_1d_assign ) { +TEST_F( openmp, view_subview_1d_assign ) +{ TestViewSubview::test_1d_assign< Kokkos::OpenMP >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c02.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c02.cpp index b04edbb997..df43f555d3 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c02.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c02.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_1d_assign_atomic ) { - TestViewSubview::test_1d_assign< Kokkos::OpenMP , Kokkos::MemoryTraits >(); +TEST_F( openmp, view_subview_1d_assign_atomic ) +{ + TestViewSubview::test_1d_assign< Kokkos::OpenMP, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c03.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c03.cpp index 765e235830..38f241ebf7 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c03.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c03.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_1d_assign_randomaccess ) { - TestViewSubview::test_1d_assign< Kokkos::OpenMP , Kokkos::MemoryTraits >(); +TEST_F( openmp, view_subview_1d_assign_randomaccess ) +{ + TestViewSubview::test_1d_assign< Kokkos::OpenMP, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c04.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c04.cpp index 9d8b62708a..11a4ea8ac2 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c04.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c04.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_2d_from_3d ) { +TEST_F( openmp, view_subview_2d_from_3d ) +{ TestViewSubview::test_2d_subview_3d< Kokkos::OpenMP >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c05.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c05.cpp index 9c19cf0e57..a91baa34df 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c05.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c05.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_2d_from_3d_atomic ) { - TestViewSubview::test_2d_subview_3d< Kokkos::OpenMP , Kokkos::MemoryTraits >(); +TEST_F( openmp, view_subview_2d_from_3d_atomic ) +{ + TestViewSubview::test_2d_subview_3d< Kokkos::OpenMP, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c06.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c06.cpp index c1bdf72351..20d4d9bd64 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c06.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c06.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_2d_from_3d_randomaccess ) { - TestViewSubview::test_2d_subview_3d< Kokkos::OpenMP , Kokkos::MemoryTraits >(); +TEST_F( openmp, view_subview_2d_from_3d_randomaccess ) +{ + TestViewSubview::test_2d_subview_3d< Kokkos::OpenMP, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c07.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c07.cpp index 08a3b5a54a..528df1c070 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c07.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c07.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_3d_from_5d_left ) { +TEST_F( openmp, view_subview_3d_from_5d_left ) +{ TestViewSubview::test_3d_subview_5d_left< Kokkos::OpenMP >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c08.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c08.cpp index 0864ebbdaa..d9eea8dba9 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c08.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c08.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_3d_from_5d_left_atomic ) { - TestViewSubview::test_3d_subview_5d_left< Kokkos::OpenMP , Kokkos::MemoryTraits >(); +TEST_F( openmp, view_subview_3d_from_5d_left_atomic ) +{ + TestViewSubview::test_3d_subview_5d_left< Kokkos::OpenMP, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c09.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c09.cpp index e38dfecbf6..f909dc33c0 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c09.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c09.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_3d_from_5d_left_randomaccess ) { - TestViewSubview::test_3d_subview_5d_left< Kokkos::OpenMP , Kokkos::MemoryTraits >(); +TEST_F( openmp, view_subview_3d_from_5d_left_randomaccess ) +{ + TestViewSubview::test_3d_subview_5d_left< Kokkos::OpenMP, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c10.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c10.cpp index b7e4683d23..59996d5e33 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c10.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c10.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_3d_from_5d_right ) { +TEST_F( openmp, view_subview_3d_from_5d_right ) +{ TestViewSubview::test_3d_subview_5d_right< Kokkos::OpenMP >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c11.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c11.cpp index fc3e66fd48..3f9c215d9b 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c11.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c11.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_3d_from_5d_right_atomic ) { - TestViewSubview::test_3d_subview_5d_right< Kokkos::OpenMP , Kokkos::MemoryTraits >(); +TEST_F( openmp, view_subview_3d_from_5d_right_atomic ) +{ + TestViewSubview::test_3d_subview_5d_right< Kokkos::OpenMP, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c12.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c12.cpp index e21a13ee57..d3a73483a0 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c12.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c12.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp, view_subview_3d_from_5d_right_randomaccess ) { - TestViewSubview::test_3d_subview_5d_right< Kokkos::OpenMP , Kokkos::MemoryTraits >(); +TEST_F( openmp, view_subview_3d_from_5d_right_randomaccess ) +{ + TestViewSubview::test_3d_subview_5d_right< Kokkos::OpenMP, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c_all.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c_all.cpp index 9da159ab57..399c6e92e4 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c_all.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_SubView_c_all.cpp @@ -1,12 +1,12 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_Team.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_Team.cpp index 38cf0a0f40..216789e8bf 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_Team.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_Team.cpp @@ -40,67 +40,73 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp , team_tag ) +TEST_F( openmp, team_tag ) { - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_for(0); - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(0); - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_for(0); - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(0); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 0 ); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 0 ); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 0 ); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 0 ); - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_for(2); - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(2); - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_for(2); - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(2); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 2 ); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 2 ); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 2 ); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 2 ); - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_for(1000); - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(1000); - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_for(1000); - TestTeamPolicy< Kokkos::OpenMP , Kokkos::Schedule >::test_reduce(1000); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 1000 ); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 1000 ); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_for( 1000 ); + TestTeamPolicy< Kokkos::OpenMP, Kokkos::Schedule >::test_reduce( 1000 ); } -TEST_F( openmp , team_shared_request) { - TestSharedTeam< Kokkos::OpenMP , Kokkos::Schedule >(); - TestSharedTeam< Kokkos::OpenMP , Kokkos::Schedule >(); +TEST_F( openmp, team_shared_request ) +{ + TestSharedTeam< Kokkos::OpenMP, Kokkos::Schedule >(); + TestSharedTeam< Kokkos::OpenMP, Kokkos::Schedule >(); } -TEST_F( openmp, team_scratch_request) { - TestScratchTeam< Kokkos::OpenMP , Kokkos::Schedule >(); - TestScratchTeam< Kokkos::OpenMP , Kokkos::Schedule >(); +TEST_F( openmp, team_scratch_request ) +{ + TestScratchTeam< Kokkos::OpenMP, Kokkos::Schedule >(); + TestScratchTeam< Kokkos::OpenMP, Kokkos::Schedule >(); } -#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) -TEST_F( openmp , team_lambda_shared_request) { - TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::OpenMP , Kokkos::Schedule >(); - TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::OpenMP , Kokkos::Schedule >(); +#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) +TEST_F( openmp, team_lambda_shared_request ) +{ + TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::OpenMP, Kokkos::Schedule >(); + TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::OpenMP, Kokkos::Schedule >(); } #endif -TEST_F( openmp, shmem_size) { +TEST_F( openmp, shmem_size ) +{ TestShmemSize< Kokkos::OpenMP >(); } -TEST_F( openmp, multi_level_scratch) { - TestMultiLevelScratchTeam< Kokkos::OpenMP , Kokkos::Schedule >(); - TestMultiLevelScratchTeam< Kokkos::OpenMP , Kokkos::Schedule >(); +TEST_F( openmp, multi_level_scratch ) +{ + TestMultiLevelScratchTeam< Kokkos::OpenMP, Kokkos::Schedule >(); + TestMultiLevelScratchTeam< Kokkos::OpenMP, Kokkos::Schedule >(); } -TEST_F( openmp , team_vector ) +TEST_F( openmp, team_vector ) { - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(0) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(1) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(2) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(3) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(4) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(5) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(6) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(7) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(8) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(9) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(10) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >( 0 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >( 1 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >( 2 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >( 3 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >( 4 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >( 5 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >( 6 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >( 7 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >( 8 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >( 9 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >( 10 ) ) ); } #ifdef KOKKOS_COMPILER_GNU @@ -112,11 +118,10 @@ TEST_F( openmp , team_vector ) #ifndef SKIP_TEST TEST_F( openmp, triple_nested_parallelism ) { - TestTripleNestedReduce< double, Kokkos::OpenMP >( 8192, 2048 , 32 , 32 ); - TestTripleNestedReduce< double, Kokkos::OpenMP >( 8192, 2048 , 32 , 16 ); - TestTripleNestedReduce< double, Kokkos::OpenMP >( 8192, 2048 , 16 , 16 ); + TestTripleNestedReduce< double, Kokkos::OpenMP >( 8192, 2048, 32, 32 ); + TestTripleNestedReduce< double, Kokkos::OpenMP >( 8192, 2048, 32, 16 ); + TestTripleNestedReduce< double, Kokkos::OpenMP >( 8192, 2048, 16, 16 ); } #endif -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewAPI_a.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewAPI_a.cpp index 82cbf3ea18..aead381a11 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewAPI_a.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewAPI_a.cpp @@ -40,14 +40,15 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp , impl_view_mapping_a ) { +TEST_F( openmp, impl_view_mapping_a ) +{ test_view_mapping< Kokkos::OpenMP >(); test_view_mapping_operator< Kokkos::OpenMP >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewAPI_b.cpp b/lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewAPI_b.cpp index b2d4f87fdd..c802fb79ca 100644 --- a/lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewAPI_b.cpp +++ b/lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewAPI_b.cpp @@ -40,82 +40,85 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( openmp , impl_shared_alloc ) { - test_shared_alloc< Kokkos::HostSpace , Kokkos::OpenMP >(); +TEST_F( openmp, impl_shared_alloc ) +{ + test_shared_alloc< Kokkos::HostSpace, Kokkos::OpenMP >(); } -TEST_F( openmp , impl_view_mapping_b ) { +TEST_F( openmp, impl_view_mapping_b ) +{ test_view_mapping_subview< Kokkos::OpenMP >(); TestViewMappingAtomic< Kokkos::OpenMP >::run(); } -TEST_F( openmp, view_api) { - TestViewAPI< double , Kokkos::OpenMP >(); +TEST_F( openmp, view_api ) +{ + TestViewAPI< double, Kokkos::OpenMP >(); } -TEST_F( openmp , view_nested_view ) +TEST_F( openmp, view_nested_view ) { ::Test::view_nested_view< Kokkos::OpenMP >(); } - - -TEST_F( openmp , view_remap ) +TEST_F( openmp, view_remap ) { - enum { N0 = 3 , N1 = 2 , N2 = 8 , N3 = 9 }; - - typedef Kokkos::View< double*[N1][N2][N3] , - Kokkos::LayoutRight , - Kokkos::OpenMP > output_type ; - - typedef Kokkos::View< int**[N2][N3] , - Kokkos::LayoutLeft , - Kokkos::OpenMP > input_type ; - - typedef Kokkos::View< int*[N0][N2][N3] , - Kokkos::LayoutLeft , - Kokkos::OpenMP > diff_type ; - - output_type output( "output" , N0 ); - input_type input ( "input" , N0 , N1 ); - diff_type diff ( "diff" , N0 ); - - int value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - input(i0,i1,i2,i3) = ++value ; - }}}} - - // Kokkos::deep_copy( diff , input ); // throw with incompatible shape - Kokkos::deep_copy( output , input ); - - value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - ++value ; - ASSERT_EQ( value , ((int) output(i0,i1,i2,i3) ) ); - }}}} + enum { N0 = 3, N1 = 2, N2 = 8, N3 = 9 }; + + typedef Kokkos::View< double*[N1][N2][N3], + Kokkos::LayoutRight, + Kokkos::OpenMP > output_type; + + typedef Kokkos::View< int**[N2][N3], + Kokkos::LayoutLeft, + Kokkos::OpenMP > input_type; + + typedef Kokkos::View< int*[N0][N2][N3], + Kokkos::LayoutLeft, + Kokkos::OpenMP > diff_type; + + output_type output( "output", N0 ); + input_type input ( "input", N0, N1 ); + diff_type diff ( "diff", N0 ); + + int value = 0; + + for ( size_t i3 = 0; i3 < N3; ++i3 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i0 = 0; i0 < N0; ++i0 ) + { + input( i0, i1, i2, i3 ) = ++value; + } + + // Kokkos::deep_copy( diff, input ); // Throw with incompatible shape. + Kokkos::deep_copy( output, input ); + + value = 0; + + for ( size_t i3 = 0; i3 < N3; ++i3 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i0 = 0; i0 < N0; ++i0 ) + { + ++value; + ASSERT_EQ( value, ( (int) output( i0, i1, i2, i3 ) ) ); + } } -//---------------------------------------------------------------------------- - -TEST_F( openmp , view_aggregate ) +TEST_F( openmp, view_aggregate ) { TestViewAggregate< Kokkos::OpenMP >(); } -TEST_F( openmp , template_meta_functions ) +TEST_F( openmp, template_meta_functions ) { - TestTemplateMetaFunctions(); + TestTemplateMetaFunctions< int, Kokkos::OpenMP >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads.hpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads.hpp new file mode 100644 index 0000000000..907fe23ea5 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads.hpp @@ -0,0 +1,109 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef KOKKOS_TEST_QTHREADS_HPP +#define KOKKOS_TEST_QTHREADS_HPP + +#include + +#include + +#ifdef KOKKOS_LAMBDA +#undef KOKKOS_LAMBDA +#endif +#define KOKKOS_LAMBDA [=] + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Test { + +class qthreads : public ::testing::Test { +protected: + static void SetUpTestCase() + { + const unsigned numa_count = Kokkos::hwloc::get_available_numa_count(); + const unsigned cores_per_numa = Kokkos::hwloc::get_available_cores_per_numa(); + const unsigned threads_per_core = Kokkos::hwloc::get_available_threads_per_core(); + + const unsigned threads_count = std::max( 1u, numa_count ) * + std::max( 2u, ( cores_per_numa * threads_per_core ) / 2 ); + + Kokkos::Qthreads::initialize( threads_count ); + Kokkos::print_configuration( std::cout, true ); + + srand( 10231 ); + } + + static void TearDownTestCase() + { + Kokkos::Qthreads::finalize(); + } +}; + +} // namespace Test + +#endif diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_Atomics.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_Atomics.cpp new file mode 100644 index 0000000000..e64c3305db --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_Atomics.cpp @@ -0,0 +1,213 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, atomics ) +{ +#if 0 + const int loop_count = 1e4; + + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Qthreads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Qthreads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Qthreads >( loop_count, 3 ) ) ); + + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Qthreads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Qthreads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Qthreads >( loop_count, 3 ) ) ); + + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Qthreads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Qthreads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Qthreads >( loop_count, 3 ) ) ); + + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Qthreads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Qthreads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Qthreads >( loop_count, 3 ) ) ); + + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Qthreads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Qthreads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Qthreads >( loop_count, 3 ) ) ); + + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Qthreads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Qthreads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Qthreads >( loop_count, 3 ) ) ); + + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Qthreads >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Qthreads >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Qthreads >( 100, 3 ) ) ); + + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Qthreads >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Qthreads >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Qthreads >( 100, 3 ) ) ); + + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Qthreads >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Qthreads >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Qthreads >( 100, 3 ) ) ); +#endif +} + +TEST_F( qthreads, atomic_operations ) +{ +#if 0 + const int start = 1; // Avoid zero for division. + const int end = 11; + + for ( int i = start; i < end; ++i ) + { + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Qthreads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Qthreads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Qthreads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Qthreads >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Qthreads >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Qthreads >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Qthreads >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Qthreads >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Qthreads >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Qthreads >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Qthreads >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Qthreads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Qthreads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Qthreads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Qthreads >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Qthreads >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Qthreads >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Qthreads >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Qthreads >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Qthreads >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Qthreads >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Qthreads >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Qthreads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Qthreads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Qthreads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Qthreads >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Qthreads >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Qthreads >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Qthreads >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Qthreads >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Qthreads >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Qthreads >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Qthreads >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Qthreads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Qthreads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Qthreads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Qthreads >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Qthreads >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Qthreads >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Qthreads >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Qthreads >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Qthreads >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Qthreads >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Qthreads >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Qthreads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Qthreads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Qthreads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Qthreads >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Qthreads >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Qthreads >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Qthreads >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Qthreads >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Qthreads >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Qthreads >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Qthreads >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Qthreads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Qthreads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Qthreads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Qthreads >( start, end - i, 4 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Qthreads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Qthreads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Qthreads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Qthreads >( start, end - i, 4 ) ) ); + } +#endif +} + +TEST_F( qthreads, atomic_views_integral ) +{ +#if 0 + const long length = 1000000; + + { + // Integral Types. + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Qthreads >( length, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Qthreads >( length, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Qthreads >( length, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Qthreads >( length, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Qthreads >( length, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Qthreads >( length, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Qthreads >( length, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Qthreads >( length, 8 ) ) ); + } +#endif +} + +TEST_F( qthreads, atomic_views_nonintegral ) +{ +#if 0 + const long length = 1000000; + + { + // Non-Integral Types. + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Qthreads >( length, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Qthreads >( length, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Qthreads >( length, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Qthreads >( length, 4 ) ) ); + } +#endif +} + +TEST_F( qthreads, atomic_view_api ) +{ +#if 0 + TestAtomicViews::TestAtomicViewAPI< int, Kokkos::Qthreads >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_Other.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_Other.cpp new file mode 100644 index 0000000000..0faec84056 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_Other.cpp @@ -0,0 +1,213 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, init ) +{ + ; +} + +TEST_F( qthreads, md_range ) +{ +#if 0 + TestMDRange_2D< Kokkos::Qthreads >::test_for2( 100, 100 ); + TestMDRange_3D< Kokkos::Qthreads >::test_for3( 100, 100, 100 ); +#endif +} + +TEST_F( qthreads, policy_construction ) +{ +#if 0 + TestRangePolicyConstruction< Kokkos::Qthreads >(); + TestTeamPolicyConstruction< Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, range_tag ) +{ +#if 0 + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 0 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 0 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_scan( 0 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 0 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 0 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_scan( 0 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_dynamic_policy( 0 ); + + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 2 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 2 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_scan( 2 ); + + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 3 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 3 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_scan( 3 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_dynamic_policy( 3 ); + + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 1000 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 1000 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_scan( 1000 ); + + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 1001 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 1001 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_scan( 1001 ); + TestRange< Kokkos::Qthreads, Kokkos::Schedule >::test_dynamic_policy( 1000 ); +#endif +} + +//---------------------------------------------------------------------------- + +TEST_F( qthreads, compiler_macros ) +{ +#if 0 + ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::Qthreads >() ) ); +#endif +} + +//---------------------------------------------------------------------------- + +TEST_F( qthreads, memory_pool ) +{ +#if 0 + bool val = TestMemoryPool::test_mempool< Kokkos::Qthreads >( 128, 128000000 ); + ASSERT_TRUE( val ); + + TestMemoryPool::test_mempool2< Kokkos::Qthreads >( 64, 4, 1000000, 2000000 ); + + TestMemoryPool::test_memory_exhaustion< Kokkos::Qthreads >(); +#endif +} + +//---------------------------------------------------------------------------- + +#if defined( KOKKOS_ENABLE_TASKDAG ) + +TEST_F( qthreads, task_fib ) +{ +#if 0 + for ( int i = 0; i < 25; ++i ) { + TestTaskScheduler::TestFib< Kokkos::Qthreads >::run( i, ( i + 1 ) * ( i + 1 ) * 10000 ); + } +#endif +} + +TEST_F( qthreads, task_depend ) +{ +#if 0 + for ( int i = 0; i < 25; ++i ) { + TestTaskScheduler::TestTaskDependence< Kokkos::Qthreads >::run( i ); + } +#endif +} + +TEST_F( qthreads, task_team ) +{ +#if 0 + TestTaskScheduler::TestTaskTeam< Kokkos::Qthreads >::run( 1000 ); + //TestTaskScheduler::TestTaskTeamValue< Kokkos::Qthreads >::run( 1000 ); // Put back after testing. +#endif +} + +#endif // #if defined( KOKKOS_ENABLE_TASKDAG ) + +//---------------------------------------------------------------------------- + +#if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) + +TEST_F( qthreads, cxx11 ) +{ +#if 0 + if ( std::is_same< Kokkos::DefaultExecutionSpace, Kokkos::Qthreads >::value ) { + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Qthreads >( 1 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Qthreads >( 2 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Qthreads >( 3 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Qthreads >( 4 ) ) ); + } +#endif +} + +#endif + +TEST_F( qthreads, tile_layout ) +{ +#if 0 + TestTile::test< Kokkos::Qthreads, 1, 1 >( 1, 1 ); + TestTile::test< Kokkos::Qthreads, 1, 1 >( 2, 3 ); + TestTile::test< Kokkos::Qthreads, 1, 1 >( 9, 10 ); + + TestTile::test< Kokkos::Qthreads, 2, 2 >( 1, 1 ); + TestTile::test< Kokkos::Qthreads, 2, 2 >( 2, 3 ); + TestTile::test< Kokkos::Qthreads, 2, 2 >( 4, 4 ); + TestTile::test< Kokkos::Qthreads, 2, 2 >( 9, 9 ); + + TestTile::test< Kokkos::Qthreads, 2, 4 >( 9, 9 ); + TestTile::test< Kokkos::Qthreads, 4, 2 >( 9, 9 ); + + TestTile::test< Kokkos::Qthreads, 4, 4 >( 1, 1 ); + TestTile::test< Kokkos::Qthreads, 4, 4 >( 4, 4 ); + TestTile::test< Kokkos::Qthreads, 4, 4 >( 9, 9 ); + TestTile::test< Kokkos::Qthreads, 4, 4 >( 9, 11 ); + + TestTile::test< Kokkos::Qthreads, 8, 8 >( 1, 1 ); + TestTile::test< Kokkos::Qthreads, 8, 8 >( 4, 4 ); + TestTile::test< Kokkos::Qthreads, 8, 8 >( 9, 9 ); + TestTile::test< Kokkos::Qthreads, 8, 8 >( 9, 11 ); +#endif +} + +TEST_F( qthreads, dispatch ) +{ +#if 0 + const int repeat = 100; + for ( int i = 0; i < repeat; ++i ) { + for ( int j = 0; j < repeat; ++j ) { + Kokkos::parallel_for( Kokkos::RangePolicy< Kokkos::Qthreads >( 0, j ) + , KOKKOS_LAMBDA( int ) {} ); + } + } +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_Reductions.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_Reductions.cpp new file mode 100644 index 0000000000..a2470ac15c --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_Reductions.cpp @@ -0,0 +1,168 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, long_reduce ) +{ +#if 0 + TestReduce< long, Kokkos::Qthreads >( 0 ); + TestReduce< long, Kokkos::Qthreads >( 1000000 ); +#endif +} + +TEST_F( qthreads, double_reduce ) +{ +#if 0 + TestReduce< double, Kokkos::Qthreads >( 0 ); + TestReduce< double, Kokkos::Qthreads >( 1000000 ); +#endif +} + +TEST_F( qthreads, reducers ) +{ +#if 0 + TestReducers< int, Kokkos::Qthreads >::execute_integer(); + TestReducers< size_t, Kokkos::Qthreads >::execute_integer(); + TestReducers< double, Kokkos::Qthreads >::execute_float(); + TestReducers< Kokkos::complex, Kokkos::Qthreads>::execute_basic(); +#endif +} + +TEST_F( qthreads, long_reduce_dynamic ) +{ +#if 0 + TestReduceDynamic< long, Kokkos::Qthreads >( 0 ); + TestReduceDynamic< long, Kokkos::Qthreads >( 1000000 ); +#endif +} + +TEST_F( qthreads, double_reduce_dynamic ) +{ +#if 0 + TestReduceDynamic< double, Kokkos::Qthreads >( 0 ); + TestReduceDynamic< double, Kokkos::Qthreads >( 1000000 ); +#endif +} + +TEST_F( qthreads, long_reduce_dynamic_view ) +{ +#if 0 + TestReduceDynamicView< long, Kokkos::Qthreads >( 0 ); + TestReduceDynamicView< long, Kokkos::Qthreads >( 1000000 ); +#endif +} + +TEST_F( qthreads, scan ) +{ +#if 0 + TestScan< Kokkos::Qthreads >::test_range( 1, 1000 ); + TestScan< Kokkos::Qthreads >( 0 ); + TestScan< Kokkos::Qthreads >( 100000 ); + TestScan< Kokkos::Qthreads >( 10000000 ); + Kokkos::Qthreads::fence(); +#endif +} + +TEST_F( qthreads, scan_small ) +{ +#if 0 + typedef TestScan< Kokkos::Qthreads, Kokkos::Impl::QthreadsExecUseScanSmall > TestScanFunctor; + + for ( int i = 0; i < 1000; ++i ) { + TestScanFunctor( 10 ); + TestScanFunctor( 10000 ); + } + TestScanFunctor( 1000000 ); + TestScanFunctor( 10000000 ); + + Kokkos::Qthreads::fence(); +#endif +} + +TEST_F( qthreads, team_scan ) +{ +#if 0 + TestScanTeam< Kokkos::Qthreads, Kokkos::Schedule >( 0 ); + TestScanTeam< Kokkos::Qthreads, Kokkos::Schedule >( 0 ); + TestScanTeam< Kokkos::Qthreads, Kokkos::Schedule >( 10 ); + TestScanTeam< Kokkos::Qthreads, Kokkos::Schedule >( 10 ); + TestScanTeam< Kokkos::Qthreads, Kokkos::Schedule >( 10000 ); + TestScanTeam< Kokkos::Qthreads, Kokkos::Schedule >( 10000 ); +#endif +} + +TEST_F( qthreads, team_long_reduce ) +{ +#if 0 + TestReduceTeam< long, Kokkos::Qthreads, Kokkos::Schedule >( 0 ); + TestReduceTeam< long, Kokkos::Qthreads, Kokkos::Schedule >( 0 ); + TestReduceTeam< long, Kokkos::Qthreads, Kokkos::Schedule >( 3 ); + TestReduceTeam< long, Kokkos::Qthreads, Kokkos::Schedule >( 3 ); + TestReduceTeam< long, Kokkos::Qthreads, Kokkos::Schedule >( 100000 ); + TestReduceTeam< long, Kokkos::Qthreads, Kokkos::Schedule >( 100000 ); +#endif +} + +TEST_F( qthreads, team_double_reduce ) +{ +#if 0 + TestReduceTeam< double, Kokkos::Qthreads, Kokkos::Schedule >( 0 ); + TestReduceTeam< double, Kokkos::Qthreads, Kokkos::Schedule >( 0 ); + TestReduceTeam< double, Kokkos::Qthreads, Kokkos::Schedule >( 3 ); + TestReduceTeam< double, Kokkos::Qthreads, Kokkos::Schedule >( 3 ); + TestReduceTeam< double, Kokkos::Qthreads, Kokkos::Schedule >( 100000 ); + TestReduceTeam< double, Kokkos::Qthreads, Kokkos::Schedule >( 100000 ); +#endif +} + +TEST_F( qthreads, reduction_deduction ) +{ +#if 0 + TestCXX11::test_reduction_deduction< Kokkos::Qthreads >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_a.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_a.cpp new file mode 100644 index 0000000000..ab873359a7 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_a.cpp @@ -0,0 +1,125 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_auto_1d_left ) +{ +#if 0 + TestViewSubview::test_auto_1d< Kokkos::LayoutLeft, Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_subview_auto_1d_right ) +{ +#if 0 + TestViewSubview::test_auto_1d< Kokkos::LayoutRight, Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_subview_auto_1d_stride ) +{ +#if 0 + TestViewSubview::test_auto_1d< Kokkos::LayoutStride, Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_subview_assign_strided ) +{ +#if 0 + TestViewSubview::test_1d_strided_assignment< Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_subview_left_0 ) +{ +#if 0 + TestViewSubview::test_left_0< Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_subview_left_1 ) +{ +#if 0 + TestViewSubview::test_left_1< Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_subview_left_2 ) +{ +#if 0 + TestViewSubview::test_left_2< Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_subview_left_3 ) +{ +#if 0 + TestViewSubview::test_left_3< Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_subview_right_0 ) +{ +#if 0 + TestViewSubview::test_right_0< Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_subview_right_1 ) +{ +#if 0 + TestViewSubview::test_right_1< Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_subview_right_3 ) +{ +#if 0 + TestViewSubview::test_right_3< Kokkos::Qthreads >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_b.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_b.cpp new file mode 100644 index 0000000000..199c5c7955 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_b.cpp @@ -0,0 +1,66 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_layoutleft_to_layoutleft ) +{ +#if 0 + TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Qthreads >(); + TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Qthreads, Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Qthreads, Kokkos::MemoryTraits >(); +#endif +} + +TEST_F( qthreads, view_subview_layoutright_to_layoutright ) +{ +#if 0 + TestViewSubview::test_layoutright_to_layoutright< Kokkos::Qthreads >(); + TestViewSubview::test_layoutright_to_layoutright< Kokkos::Qthreads, Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutright_to_layoutright< Kokkos::Qthreads, Kokkos::MemoryTraits >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c01.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c01.cpp new file mode 100644 index 0000000000..f44909f3da --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c01.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_1d_assign ) +{ +#if 0 + TestViewSubview::test_1d_assign< Kokkos::Qthreads >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c02.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c02.cpp new file mode 100644 index 0000000000..7bb936f8dd --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c02.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_1d_assign_atomic ) +{ +#if 0 + TestViewSubview::test_1d_assign< Kokkos::Qthreads, Kokkos::MemoryTraits >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c03.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c03.cpp new file mode 100644 index 0000000000..27073dfa81 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c03.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_1d_assign_randomaccess ) +{ +#if 0 + TestViewSubview::test_1d_assign< Kokkos::Qthreads, Kokkos::MemoryTraits >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c04.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c04.cpp new file mode 100644 index 0000000000..1b3cf48852 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c04.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_2d_from_3d ) +{ +#if 0 + TestViewSubview::test_2d_subview_3d< Kokkos::Qthreads >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c05.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c05.cpp new file mode 100644 index 0000000000..34dda63e64 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c05.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_2d_from_3d_atomic ) +{ +#if 0 + TestViewSubview::test_2d_subview_3d< Kokkos::Qthreads, Kokkos::MemoryTraits >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c06.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c06.cpp new file mode 100644 index 0000000000..5a4ee50fb2 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c06.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_2d_from_3d_randomaccess ) +{ +#if 0 + TestViewSubview::test_2d_subview_3d< Kokkos::Qthreads, Kokkos::MemoryTraits >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c07.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c07.cpp new file mode 100644 index 0000000000..fe386e34a8 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c07.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_3d_from_5d_left ) +{ +#if 0 + TestViewSubview::test_3d_subview_5d_left< Kokkos::Qthreads >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c08.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c08.cpp new file mode 100644 index 0000000000..a3e0ab2529 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c08.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_3d_from_5d_left_atomic ) +{ +#if 0 + TestViewSubview::test_3d_subview_5d_left< Kokkos::Qthreads, Kokkos::MemoryTraits >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c09.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c09.cpp new file mode 100644 index 0000000000..df1f570e9d --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c09.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_3d_from_5d_left_randomaccess ) +{ +#if 0 + TestViewSubview::test_3d_subview_5d_left< Kokkos::Qthreads, Kokkos::MemoryTraits >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c10.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c10.cpp new file mode 100644 index 0000000000..cc3c80d10d --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c10.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_3d_from_5d_right ) +{ +#if 0 + TestViewSubview::test_3d_subview_5d_right< Kokkos::Qthreads >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c11.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c11.cpp new file mode 100644 index 0000000000..14b331a458 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c11.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_3d_from_5d_right_atomic ) +{ +#if 0 + TestViewSubview::test_3d_subview_5d_right< Kokkos::Qthreads, Kokkos::MemoryTraits >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c12.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c12.cpp new file mode 100644 index 0000000000..571382e66f --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c12.cpp @@ -0,0 +1,55 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, view_subview_3d_from_5d_right_randomaccess ) +{ +#if 0 + TestViewSubview::test_3d_subview_5d_right< Kokkos::Qthreads, Kokkos::MemoryTraits >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c_all.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c_all.cpp new file mode 100644 index 0000000000..ab984c5f30 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_SubView_c_all.cpp @@ -0,0 +1,12 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_Team.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_Team.cpp new file mode 100644 index 0000000000..e7b81283fb --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_Team.cpp @@ -0,0 +1,143 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, team_tag ) +{ +#if 0 + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 0 ); + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 0 ); + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 0 ); + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 0 ); + + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 2 ); + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 2 ); + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 2 ); + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 2 ); + + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 1000 ); + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 1000 ); + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_for( 1000 ); + TestTeamPolicy< Kokkos::Qthreads, Kokkos::Schedule >::test_reduce( 1000 ); +#endif +} + +TEST_F( qthreads, team_shared_request ) +{ +#if 0 + TestSharedTeam< Kokkos::Qthreads, Kokkos::Schedule >(); + TestSharedTeam< Kokkos::Qthreads, Kokkos::Schedule >(); +#endif +} + +TEST_F( qthreads, team_scratch_request ) +{ +#if 0 + TestScratchTeam< Kokkos::Qthreads, Kokkos::Schedule >(); + TestScratchTeam< Kokkos::Qthreads, Kokkos::Schedule >(); +#endif +} + +#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) +TEST_F( qthreads, team_lambda_shared_request ) +{ +#if 0 + TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::Qthreads, Kokkos::Schedule >(); + TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::Qthreads, Kokkos::Schedule >(); +#endif +} +#endif + +TEST_F( qthreads, shmem_size ) +{ +#if 0 + TestShmemSize< Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, multi_level_scratch ) +{ +#if 0 + TestMultiLevelScratchTeam< Kokkos::Qthreads, Kokkos::Schedule >(); + TestMultiLevelScratchTeam< Kokkos::Qthreads, Kokkos::Schedule >(); +#endif +} + +TEST_F( qthreads, team_vector ) +{ +#if 0 + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthreads >( 0 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthreads >( 1 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthreads >( 2 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthreads >( 3 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthreads >( 4 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthreads >( 5 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthreads >( 6 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthreads >( 7 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthreads >( 8 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthreads >( 9 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthreads >( 10 ) ) ); +#endif +} + +#ifdef KOKKOS_COMPILER_GNU +#if ( KOKKOS_COMPILER_GNU == 472 ) +#define SKIP_TEST +#endif +#endif + +#ifndef SKIP_TEST +TEST_F( qthreads, triple_nested_parallelism ) +{ +#if 0 + TestTripleNestedReduce< double, Kokkos::Qthreads >( 8192, 2048, 32, 32 ); + TestTripleNestedReduce< double, Kokkos::Qthreads >( 8192, 2048, 32, 16 ); + TestTripleNestedReduce< double, Kokkos::Qthreads >( 8192, 2048, 16, 16 ); +#endif +} +#endif + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_ViewAPI_a.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_ViewAPI_a.cpp new file mode 100644 index 0000000000..cd876a36bf --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_ViewAPI_a.cpp @@ -0,0 +1,56 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, impl_view_mapping_a ) +{ +#if 0 + test_view_mapping< Kokkos::Qthreads >(); + test_view_mapping_operator< Kokkos::Qthreads >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/qthreads/TestQthreads_ViewAPI_b.cpp b/lib/kokkos/core/unit_test/qthreads/TestQthreads_ViewAPI_b.cpp new file mode 100644 index 0000000000..adf048b613 --- /dev/null +++ b/lib/kokkos/core/unit_test/qthreads/TestQthreads_ViewAPI_b.cpp @@ -0,0 +1,138 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2014) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#include + +namespace Test { + +TEST_F( qthreads, impl_shared_alloc ) +{ +#if 0 + test_shared_alloc< Kokkos::HostSpace, Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, impl_view_mapping_b ) +{ +#if 0 + test_view_mapping_subview< Kokkos::Qthreads >(); + TestViewMappingAtomic< Kokkos::Qthreads >::run(); +#endif +} + +TEST_F( qthreads, view_api ) +{ +#if 0 + TestViewAPI< double, Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_nested_view ) +{ +#if 0 + ::Test::view_nested_view< Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, view_remap ) +{ +#if 0 + enum { N0 = 3, N1 = 2, N2 = 8, N3 = 9 }; + + typedef Kokkos::View< double*[N1][N2][N3], + Kokkos::LayoutRight, + Kokkos::Qthreads > output_type; + + typedef Kokkos::View< int**[N2][N3], + Kokkos::LayoutLeft, + Kokkos::Qthreads > input_type; + + typedef Kokkos::View< int*[N0][N2][N3], + Kokkos::LayoutLeft, + Kokkos::Qthreads > diff_type; + + output_type output( "output", N0 ); + input_type input ( "input", N0, N1 ); + diff_type diff ( "diff", N0 ); + + int value = 0; + + for ( size_t i3 = 0; i3 < N3; ++i3 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i0 = 0; i0 < N0; ++i0 ) + { + input( i0, i1, i2, i3 ) = ++value; + } + + // Kokkos::deep_copy( diff, input ); // Throw with incompatible shape. + Kokkos::deep_copy( output, input ); + + value = 0; + + for ( size_t i3 = 0; i3 < N3; ++i3 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i0 = 0; i0 < N0; ++i0 ) + { + ++value; + ASSERT_EQ( value, ( (int) output( i0, i1, i2, i3 ) ) ); + } +#endif +} + +TEST_F( qthreads, view_aggregate ) +{ +#if 0 + TestViewAggregate< Kokkos::Qthreads >(); +#endif +} + +TEST_F( qthreads, template_meta_functions ) +{ +#if 0 + TestTemplateMetaFunctions< int, Kokkos::Qthreads >(); +#endif +} + +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial.hpp b/lib/kokkos/core/unit_test/serial/TestSerial.hpp index c0ffa6afb1..03da07e065 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial.hpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial.hpp @@ -40,11 +40,14 @@ // ************************************************************************ //@HEADER */ + #ifndef KOKKOS_TEST_SERIAL_HPP #define KOKKOS_TEST_SERIAL_HPP + #include #include + #ifdef KOKKOS_LAMBDA #undef KOKKOS_LAMBDA #endif @@ -53,21 +56,14 @@ #include #include - -//---------------------------------------------------------------------------- - #include #include - - #include #include #include #include #include - #include - #include #include #include @@ -76,15 +72,11 @@ #include #include #include - - #include #include #include #include - #include - #include namespace Test { @@ -92,14 +84,16 @@ namespace Test { class serial : public ::testing::Test { protected: static void SetUpTestCase() - { - Kokkos::HostSpace::execution_space::initialize(); - } + { + Kokkos::HostSpace::execution_space::initialize(); + } + static void TearDownTestCase() - { - Kokkos::HostSpace::execution_space::finalize(); - } + { + Kokkos::HostSpace::execution_space::finalize(); + } }; -} +} // namespace Test + #endif diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_Atomics.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_Atomics.cpp index 729a76556d..81ba532a3d 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_Atomics.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_Atomics.cpp @@ -40,165 +40,165 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial , atomics ) +TEST_F( serial, atomics ) { - const int loop_count = 1e6 ; + const int loop_count = 1e6; - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Serial >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Serial >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Serial >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Serial >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Serial >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Serial >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Serial >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Serial >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Serial >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Serial >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Serial >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Serial >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Serial >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Serial >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Serial >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Serial >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Serial >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Serial >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Serial >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Serial >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Serial >( 100, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Serial>(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Serial>(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Serial>(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Serial >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Serial >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Serial >( 100, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Serial>(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Serial>(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Serial>(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Serial >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Serial >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Serial >( 100, 3 ) ) ); } -TEST_F( serial , atomic_operations ) +TEST_F( serial, atomic_operations ) { - const int start = 1; //Avoid zero for division + const int start = 1; // Avoid zero for division. const int end = 11; - for (int i = start; i < end; ++i) + + for ( int i = start; i < end; ++i ) { - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 4 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Serial >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Serial >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Serial >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Serial >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Serial >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Serial >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Serial >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Serial >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Serial >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Serial >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Serial >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Serial >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Serial >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Serial >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Serial >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Serial >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Serial >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Serial >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Serial >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Serial >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Serial >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Serial >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Serial >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Serial >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Serial >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Serial >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Serial >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Serial >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Serial >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Serial >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Serial >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Serial >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Serial >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Serial >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Serial >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Serial >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Serial >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Serial >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Serial >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Serial >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Serial >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Serial >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Serial >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Serial >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Serial >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Serial >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Serial >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Serial >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Serial >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Serial >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Serial >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Serial >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Serial >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Serial >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Serial >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Serial >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Serial >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Serial >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Serial >( start, end - i, 4 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Serial >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Serial >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Serial >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Serial >( start, end - i, 4 ) ) ); } - } -TEST_F( serial , atomic_views_integral ) +TEST_F( serial, atomic_views_integral ) { const long length = 1000000; - { - //Integral Types - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 8 ) ) ); + { + // Integral Types. + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Serial >( length, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Serial >( length, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Serial >( length, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Serial >( length, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Serial >( length, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Serial >( length, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Serial >( length, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Serial >( length, 8 ) ) ); } } -TEST_F( serial , atomic_views_nonintegral ) +TEST_F( serial, atomic_views_nonintegral ) { const long length = 1000000; - { - //Non-Integral Types - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 4 ) ) ); + { + // Non-Integral Types. + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Serial >( length, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Serial >( length, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Serial >( length, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Serial >( length, 4 ) ) ); } } -TEST_F( serial , atomic_view_api ) +TEST_F( serial, atomic_view_api ) { - TestAtomicViews::TestAtomicViewAPI(); + TestAtomicViews::TestAtomicViewAPI< int, Kokkos::Serial >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_Other.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_Other.cpp index 43fc4c3587..b40ed3f4af 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_Other.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_Other.cpp @@ -40,50 +40,61 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial , md_range ) { - TestMDRange_2D< Kokkos::Serial >::test_for2(100,100); +TEST_F( serial , mdrange_for ) +{ + TestMDRange_2D< Kokkos::Serial >::test_for2( 100, 100 ); + TestMDRange_3D< Kokkos::Serial >::test_for3( 100, 10, 100 ); + TestMDRange_4D< Kokkos::Serial >::test_for4( 100, 10, 10, 10 ); + TestMDRange_5D< Kokkos::Serial >::test_for5( 100, 10, 10, 10, 5 ); + TestMDRange_6D< Kokkos::Serial >::test_for6( 10, 10, 10, 10, 5, 5 ); +} - TestMDRange_3D< Kokkos::Serial >::test_for3(100,100,100); +TEST_F( serial , mdrange_reduce ) +{ + TestMDRange_2D< Kokkos::Serial >::test_reduce2( 100, 100 ); + TestMDRange_3D< Kokkos::Serial >::test_reduce3( 100, 10, 100 ); } -TEST_F( serial, policy_construction) { +TEST_F( serial, policy_construction ) +{ TestRangePolicyConstruction< Kokkos::Serial >(); TestTeamPolicyConstruction< Kokkos::Serial >(); } -TEST_F( serial , range_tag ) +TEST_F( serial, range_tag ) { - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_for(0); - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_reduce(0); - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_scan(0); - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_for(0); - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_reduce(0); - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_scan(0); - - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_for(1000); - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_reduce(1000); - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_scan(1000); - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_for(1001); - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_reduce(1001); - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_scan(1001); - TestRange< Kokkos::Serial , Kokkos::Schedule >::test_dynamic_policy(1000); + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_for( 0 ); + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_reduce( 0 ); + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_scan( 0 ); + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_for( 0 ); + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_reduce( 0 ); + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_scan( 0 ); + + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_for( 1000 ); + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_reduce( 1000 ); + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_scan( 1000 ); + + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_for( 1001 ); + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_reduce( 1001 ); + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_scan( 1001 ); + TestRange< Kokkos::Serial, Kokkos::Schedule >::test_dynamic_policy( 1000 ); } - //---------------------------------------------------------------------------- -TEST_F( serial , compiler_macros ) +TEST_F( serial, compiler_macros ) { ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::Serial >() ) ); } //---------------------------------------------------------------------------- -TEST_F( serial , memory_pool ) +TEST_F( serial, memory_pool ) { bool val = TestMemoryPool::test_mempool< Kokkos::Serial >( 128, 128000000 ); ASSERT_TRUE( val ); @@ -97,24 +108,24 @@ TEST_F( serial , memory_pool ) #if defined( KOKKOS_ENABLE_TASKDAG ) -TEST_F( serial , task_fib ) +TEST_F( serial, task_fib ) { - for ( int i = 0 ; i < 25 ; ++i ) { - TestTaskScheduler::TestFib< Kokkos::Serial >::run(i); + for ( int i = 0; i < 25; ++i ) { + TestTaskScheduler::TestFib< Kokkos::Serial >::run( i ); } } -TEST_F( serial , task_depend ) +TEST_F( serial, task_depend ) { - for ( int i = 0 ; i < 25 ; ++i ) { - TestTaskScheduler::TestTaskDependence< Kokkos::Serial >::run(i); + for ( int i = 0; i < 25; ++i ) { + TestTaskScheduler::TestTaskDependence< Kokkos::Serial >::run( i ); } } -TEST_F( serial , task_team ) +TEST_F( serial, task_team ) { - TestTaskScheduler::TestTaskTeam< Kokkos::Serial >::run(1000); - //TestTaskScheduler::TestTaskTeamValue< Kokkos::Serial >::run(1000); //put back after testing + TestTaskScheduler::TestTaskTeam< Kokkos::Serial >::run( 1000 ); + //TestTaskScheduler::TestTaskTeamValue< Kokkos::Serial >::run( 1000 ); // Put back after testing. } #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ @@ -122,44 +133,40 @@ TEST_F( serial , task_team ) //---------------------------------------------------------------------------- #if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) -TEST_F( serial , cxx11 ) +TEST_F( serial, cxx11 ) { - if ( std::is_same< Kokkos::DefaultExecutionSpace , Kokkos::Serial >::value ) { - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >(1) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >(2) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >(3) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >(4) ) ); + if ( std::is_same< Kokkos::DefaultExecutionSpace, Kokkos::Serial >::value ) { + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >( 1 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >( 2 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >( 3 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >( 4 ) ) ); } } #endif TEST_F( serial, tile_layout ) { - TestTile::test< Kokkos::Serial , 1 , 1 >( 1 , 1 ); - TestTile::test< Kokkos::Serial , 1 , 1 >( 2 , 3 ); - TestTile::test< Kokkos::Serial , 1 , 1 >( 9 , 10 ); - - TestTile::test< Kokkos::Serial , 2 , 2 >( 1 , 1 ); - TestTile::test< Kokkos::Serial , 2 , 2 >( 2 , 3 ); - TestTile::test< Kokkos::Serial , 2 , 2 >( 4 , 4 ); - TestTile::test< Kokkos::Serial , 2 , 2 >( 9 , 9 ); - - TestTile::test< Kokkos::Serial , 2 , 4 >( 9 , 9 ); - TestTile::test< Kokkos::Serial , 4 , 2 >( 9 , 9 ); - - TestTile::test< Kokkos::Serial , 4 , 4 >( 1 , 1 ); - TestTile::test< Kokkos::Serial , 4 , 4 >( 4 , 4 ); - TestTile::test< Kokkos::Serial , 4 , 4 >( 9 , 9 ); - TestTile::test< Kokkos::Serial , 4 , 4 >( 9 , 11 ); - - TestTile::test< Kokkos::Serial , 8 , 8 >( 1 , 1 ); - TestTile::test< Kokkos::Serial , 8 , 8 >( 4 , 4 ); - TestTile::test< Kokkos::Serial , 8 , 8 >( 9 , 9 ); - TestTile::test< Kokkos::Serial , 8 , 8 >( 9 , 11 ); + TestTile::test< Kokkos::Serial, 1, 1 >( 1, 1 ); + TestTile::test< Kokkos::Serial, 1, 1 >( 2, 3 ); + TestTile::test< Kokkos::Serial, 1, 1 >( 9, 10 ); + + TestTile::test< Kokkos::Serial, 2, 2 >( 1, 1 ); + TestTile::test< Kokkos::Serial, 2, 2 >( 2, 3 ); + TestTile::test< Kokkos::Serial, 2, 2 >( 4, 4 ); + TestTile::test< Kokkos::Serial, 2, 2 >( 9, 9 ); + + TestTile::test< Kokkos::Serial, 2, 4 >( 9, 9 ); + TestTile::test< Kokkos::Serial, 4, 2 >( 9, 9 ); + + TestTile::test< Kokkos::Serial, 4, 4 >( 1, 1 ); + TestTile::test< Kokkos::Serial, 4, 4 >( 4, 4 ); + TestTile::test< Kokkos::Serial, 4, 4 >( 9, 9 ); + TestTile::test< Kokkos::Serial, 4, 4 >( 9, 11 ); + + TestTile::test< Kokkos::Serial, 8, 8 >( 1, 1 ); + TestTile::test< Kokkos::Serial, 8, 8 >( 4, 4 ); + TestTile::test< Kokkos::Serial, 8, 8 >( 9, 9 ); + TestTile::test< Kokkos::Serial, 8, 8 >( 9, 11 ); } - - - -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_Reductions.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_Reductions.cpp index 25b5ac6d16..8a3d518cfb 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_Reductions.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_Reductions.cpp @@ -40,83 +40,90 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, long_reduce) { - TestReduce< long , Kokkos::Serial >( 0 ); - TestReduce< long , Kokkos::Serial >( 1000000 ); +TEST_F( serial, long_reduce ) +{ + TestReduce< long, Kokkos::Serial >( 0 ); + TestReduce< long, Kokkos::Serial >( 1000000 ); } -TEST_F( serial, double_reduce) { - TestReduce< double , Kokkos::Serial >( 0 ); - TestReduce< double , Kokkos::Serial >( 1000000 ); +TEST_F( serial, double_reduce ) +{ + TestReduce< double, Kokkos::Serial >( 0 ); + TestReduce< double, Kokkos::Serial >( 1000000 ); } -TEST_F( serial , reducers ) +TEST_F( serial, reducers ) { - TestReducers::execute_integer(); - TestReducers::execute_integer(); - TestReducers::execute_float(); - TestReducers, Kokkos::Serial>::execute_basic(); + TestReducers< int, Kokkos::Serial >::execute_integer(); + TestReducers< size_t, Kokkos::Serial >::execute_integer(); + TestReducers< double, Kokkos::Serial >::execute_float(); + TestReducers< Kokkos::complex, Kokkos::Serial>::execute_basic(); } -TEST_F( serial, long_reduce_dynamic ) { - TestReduceDynamic< long , Kokkos::Serial >( 0 ); - TestReduceDynamic< long , Kokkos::Serial >( 1000000 ); +TEST_F( serial, long_reduce_dynamic ) +{ + TestReduceDynamic< long, Kokkos::Serial >( 0 ); + TestReduceDynamic< long, Kokkos::Serial >( 1000000 ); } -TEST_F( serial, double_reduce_dynamic ) { - TestReduceDynamic< double , Kokkos::Serial >( 0 ); - TestReduceDynamic< double , Kokkos::Serial >( 1000000 ); +TEST_F( serial, double_reduce_dynamic ) +{ + TestReduceDynamic< double, Kokkos::Serial >( 0 ); + TestReduceDynamic< double, Kokkos::Serial >( 1000000 ); } -TEST_F( serial, long_reduce_dynamic_view ) { - TestReduceDynamicView< long , Kokkos::Serial >( 0 ); - TestReduceDynamicView< long , Kokkos::Serial >( 1000000 ); +TEST_F( serial, long_reduce_dynamic_view ) +{ + TestReduceDynamicView< long, Kokkos::Serial >( 0 ); + TestReduceDynamicView< long, Kokkos::Serial >( 1000000 ); } -TEST_F( serial , scan ) +TEST_F( serial, scan ) { - TestScan< Kokkos::Serial >::test_range( 1 , 1000 ); + TestScan< Kokkos::Serial >::test_range( 1, 1000 ); TestScan< Kokkos::Serial >( 0 ); TestScan< Kokkos::Serial >( 10 ); TestScan< Kokkos::Serial >( 10000 ); } -TEST_F( serial , team_scan ) +TEST_F( serial, team_scan ) { - TestScanTeam< Kokkos::Serial , Kokkos::Schedule >( 0 ); - TestScanTeam< Kokkos::Serial , Kokkos::Schedule >( 0 ); - TestScanTeam< Kokkos::Serial , Kokkos::Schedule >( 10 ); - TestScanTeam< Kokkos::Serial , Kokkos::Schedule >( 10 ); - TestScanTeam< Kokkos::Serial , Kokkos::Schedule >( 10000 ); - TestScanTeam< Kokkos::Serial , Kokkos::Schedule >( 10000 ); + TestScanTeam< Kokkos::Serial, Kokkos::Schedule >( 0 ); + TestScanTeam< Kokkos::Serial, Kokkos::Schedule >( 0 ); + TestScanTeam< Kokkos::Serial, Kokkos::Schedule >( 10 ); + TestScanTeam< Kokkos::Serial, Kokkos::Schedule >( 10 ); + TestScanTeam< Kokkos::Serial, Kokkos::Schedule >( 10000 ); + TestScanTeam< Kokkos::Serial, Kokkos::Schedule >( 10000 ); } -TEST_F( serial , team_long_reduce) { - TestReduceTeam< long , Kokkos::Serial , Kokkos::Schedule >( 0 ); - TestReduceTeam< long , Kokkos::Serial , Kokkos::Schedule >( 0 ); - TestReduceTeam< long , Kokkos::Serial , Kokkos::Schedule >( 3 ); - TestReduceTeam< long , Kokkos::Serial , Kokkos::Schedule >( 3 ); - TestReduceTeam< long , Kokkos::Serial , Kokkos::Schedule >( 100000 ); - TestReduceTeam< long , Kokkos::Serial , Kokkos::Schedule >( 100000 ); +TEST_F( serial, team_long_reduce ) +{ + TestReduceTeam< long, Kokkos::Serial, Kokkos::Schedule >( 0 ); + TestReduceTeam< long, Kokkos::Serial, Kokkos::Schedule >( 0 ); + TestReduceTeam< long, Kokkos::Serial, Kokkos::Schedule >( 3 ); + TestReduceTeam< long, Kokkos::Serial, Kokkos::Schedule >( 3 ); + TestReduceTeam< long, Kokkos::Serial, Kokkos::Schedule >( 100000 ); + TestReduceTeam< long, Kokkos::Serial, Kokkos::Schedule >( 100000 ); } -TEST_F( serial , team_double_reduce) { - TestReduceTeam< double , Kokkos::Serial , Kokkos::Schedule >( 0 ); - TestReduceTeam< double , Kokkos::Serial , Kokkos::Schedule >( 0 ); - TestReduceTeam< double , Kokkos::Serial , Kokkos::Schedule >( 3 ); - TestReduceTeam< double , Kokkos::Serial , Kokkos::Schedule >( 3 ); - TestReduceTeam< double , Kokkos::Serial , Kokkos::Schedule >( 100000 ); - TestReduceTeam< double , Kokkos::Serial , Kokkos::Schedule >( 100000 ); +TEST_F( serial, team_double_reduce ) +{ + TestReduceTeam< double, Kokkos::Serial, Kokkos::Schedule >( 0 ); + TestReduceTeam< double, Kokkos::Serial, Kokkos::Schedule >( 0 ); + TestReduceTeam< double, Kokkos::Serial, Kokkos::Schedule >( 3 ); + TestReduceTeam< double, Kokkos::Serial, Kokkos::Schedule >( 3 ); + TestReduceTeam< double, Kokkos::Serial, Kokkos::Schedule >( 100000 ); + TestReduceTeam< double, Kokkos::Serial, Kokkos::Schedule >( 100000 ); } -TEST_F( serial , reduction_deduction ) +TEST_F( serial, reduction_deduction ) { TestCXX11::test_reduction_deduction< Kokkos::Serial >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_a.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_a.cpp index bc838ccde4..3dc3e2019d 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_a.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_a.cpp @@ -40,53 +40,64 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_auto_1d_left ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutLeft,Kokkos::Serial >(); +TEST_F( serial, view_subview_auto_1d_left ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutLeft, Kokkos::Serial >(); } -TEST_F( serial, view_subview_auto_1d_right ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutRight,Kokkos::Serial >(); +TEST_F( serial, view_subview_auto_1d_right ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutRight, Kokkos::Serial >(); } -TEST_F( serial, view_subview_auto_1d_stride ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutStride,Kokkos::Serial >(); +TEST_F( serial, view_subview_auto_1d_stride ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutStride, Kokkos::Serial >(); } -TEST_F( serial, view_subview_assign_strided ) { +TEST_F( serial, view_subview_assign_strided ) +{ TestViewSubview::test_1d_strided_assignment< Kokkos::Serial >(); } -TEST_F( serial, view_subview_left_0 ) { +TEST_F( serial, view_subview_left_0 ) +{ TestViewSubview::test_left_0< Kokkos::Serial >(); } -TEST_F( serial, view_subview_left_1 ) { +TEST_F( serial, view_subview_left_1 ) +{ TestViewSubview::test_left_1< Kokkos::Serial >(); } -TEST_F( serial, view_subview_left_2 ) { +TEST_F( serial, view_subview_left_2 ) +{ TestViewSubview::test_left_2< Kokkos::Serial >(); } -TEST_F( serial, view_subview_left_3 ) { +TEST_F( serial, view_subview_left_3 ) +{ TestViewSubview::test_left_3< Kokkos::Serial >(); } -TEST_F( serial, view_subview_right_0 ) { +TEST_F( serial, view_subview_right_0 ) +{ TestViewSubview::test_right_0< Kokkos::Serial >(); } -TEST_F( serial, view_subview_right_1 ) { +TEST_F( serial, view_subview_right_1 ) +{ TestViewSubview::test_right_1< Kokkos::Serial >(); } -TEST_F( serial, view_subview_right_3 ) { +TEST_F( serial, view_subview_right_3 ) +{ TestViewSubview::test_right_3< Kokkos::Serial >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_b.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_b.cpp index e6a5b56d3e..536c3bf197 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_b.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_b.cpp @@ -40,21 +40,23 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_layoutleft_to_layoutleft) { +TEST_F( serial, view_subview_layoutleft_to_layoutleft ) +{ TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Serial >(); - TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Serial , Kokkos::MemoryTraits >(); - TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Serial , Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Serial, Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Serial, Kokkos::MemoryTraits >(); } -TEST_F( serial, view_subview_layoutright_to_layoutright) { +TEST_F( serial, view_subview_layoutright_to_layoutright ) +{ TestViewSubview::test_layoutright_to_layoutright< Kokkos::Serial >(); - TestViewSubview::test_layoutright_to_layoutright< Kokkos::Serial , Kokkos::MemoryTraits >(); - TestViewSubview::test_layoutright_to_layoutright< Kokkos::Serial , Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutright_to_layoutright< Kokkos::Serial, Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutright_to_layoutright< Kokkos::Serial, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c01.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c01.cpp index 0b7a0d3bfa..579a12bf78 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c01.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c01.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_1d_assign ) { +TEST_F( serial, view_subview_1d_assign ) +{ TestViewSubview::test_1d_assign< Kokkos::Serial >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c02.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c02.cpp index 8ca7285c1f..ff009fef27 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c02.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c02.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_1d_assign_atomic ) { - TestViewSubview::test_1d_assign< Kokkos::Serial , Kokkos::MemoryTraits >(); +TEST_F( serial, view_subview_1d_assign_atomic ) +{ + TestViewSubview::test_1d_assign< Kokkos::Serial, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c03.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c03.cpp index 1d156c7415..a20478433c 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c03.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c03.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_1d_assign_randomaccess ) { - TestViewSubview::test_1d_assign< Kokkos::Serial , Kokkos::MemoryTraits >(); +TEST_F( serial, view_subview_1d_assign_randomaccess ) +{ + TestViewSubview::test_1d_assign< Kokkos::Serial, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c04.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c04.cpp index ebf0e5c991..a34b26d9f7 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c04.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c04.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_2d_from_3d ) { +TEST_F( serial, view_subview_2d_from_3d ) +{ TestViewSubview::test_2d_subview_3d< Kokkos::Serial >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c05.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c05.cpp index 74acb92f1b..6d1882cf04 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c05.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c05.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_2d_from_3d_atomic ) { - TestViewSubview::test_2d_subview_3d< Kokkos::Serial , Kokkos::MemoryTraits >(); +TEST_F( serial, view_subview_2d_from_3d_atomic ) +{ + TestViewSubview::test_2d_subview_3d< Kokkos::Serial, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c06.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c06.cpp index 8075d46e0f..12fb883b63 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c06.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c06.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_2d_from_3d_randomaccess ) { - TestViewSubview::test_2d_subview_3d< Kokkos::Serial , Kokkos::MemoryTraits >(); +TEST_F( serial, view_subview_2d_from_3d_randomaccess ) +{ + TestViewSubview::test_2d_subview_3d< Kokkos::Serial, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c07.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c07.cpp index 9ce8222643..8aae20c023 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c07.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c07.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_3d_from_5d_left ) { +TEST_F( serial, view_subview_3d_from_5d_left ) +{ TestViewSubview::test_3d_subview_5d_left< Kokkos::Serial >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c08.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c08.cpp index c8a5c8f33f..e75db8d52d 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c08.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c08.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_3d_from_5d_left_atomic ) { - TestViewSubview::test_3d_subview_5d_left< Kokkos::Serial , Kokkos::MemoryTraits >(); +TEST_F( serial, view_subview_3d_from_5d_left_atomic ) +{ + TestViewSubview::test_3d_subview_5d_left< Kokkos::Serial, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c09.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c09.cpp index b66f15f17d..b9cea2ce89 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c09.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c09.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_3d_from_5d_left_randomaccess ) { - TestViewSubview::test_3d_subview_5d_left< Kokkos::Serial , Kokkos::MemoryTraits >(); +TEST_F( serial, view_subview_3d_from_5d_left_randomaccess ) +{ + TestViewSubview::test_3d_subview_5d_left< Kokkos::Serial, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c10.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c10.cpp index 5e5e3cf3d1..e5dbcead37 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c10.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c10.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_3d_from_5d_right ) { +TEST_F( serial, view_subview_3d_from_5d_right ) +{ TestViewSubview::test_3d_subview_5d_right< Kokkos::Serial >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c11.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c11.cpp index 55a353bcaf..3005030f93 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c11.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c11.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_3d_from_5d_right_atomic ) { - TestViewSubview::test_3d_subview_5d_right< Kokkos::Serial , Kokkos::MemoryTraits >(); +TEST_F( serial, view_subview_3d_from_5d_right_atomic ) +{ + TestViewSubview::test_3d_subview_5d_right< Kokkos::Serial, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c12.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c12.cpp index a168e1e232..fee8cb7af2 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c12.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c12.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial, view_subview_3d_from_5d_right_randomaccess ) { - TestViewSubview::test_3d_subview_5d_right< Kokkos::Serial , Kokkos::MemoryTraits >(); +TEST_F( serial, view_subview_3d_from_5d_right_randomaccess ) +{ + TestViewSubview::test_3d_subview_5d_right< Kokkos::Serial, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c_all.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c_all.cpp index a489b0fcb5..24dc6b5061 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c_all.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_SubView_c_all.cpp @@ -1,12 +1,12 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_Team.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_Team.cpp index df400b4cb5..f13b2ce1b4 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_Team.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_Team.cpp @@ -40,62 +40,68 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial , team_tag ) +TEST_F( serial, team_tag ) { - TestTeamPolicy< Kokkos::Serial , Kokkos::Schedule >::test_for(0); - TestTeamPolicy< Kokkos::Serial , Kokkos::Schedule >::test_reduce(0); - TestTeamPolicy< Kokkos::Serial , Kokkos::Schedule >::test_for(0); - TestTeamPolicy< Kokkos::Serial , Kokkos::Schedule >::test_reduce(0); + TestTeamPolicy< Kokkos::Serial, Kokkos::Schedule >::test_for( 0 ); + TestTeamPolicy< Kokkos::Serial, Kokkos::Schedule >::test_reduce( 0 ); + TestTeamPolicy< Kokkos::Serial, Kokkos::Schedule >::test_for( 0 ); + TestTeamPolicy< Kokkos::Serial, Kokkos::Schedule >::test_reduce( 0 ); - TestTeamPolicy< Kokkos::Serial , Kokkos::Schedule >::test_for(1000); - TestTeamPolicy< Kokkos::Serial , Kokkos::Schedule >::test_reduce(1000); - TestTeamPolicy< Kokkos::Serial , Kokkos::Schedule >::test_for(1000); - TestTeamPolicy< Kokkos::Serial , Kokkos::Schedule >::test_reduce(1000); + TestTeamPolicy< Kokkos::Serial, Kokkos::Schedule >::test_for( 1000 ); + TestTeamPolicy< Kokkos::Serial, Kokkos::Schedule >::test_reduce( 1000 ); + TestTeamPolicy< Kokkos::Serial, Kokkos::Schedule >::test_for( 1000 ); + TestTeamPolicy< Kokkos::Serial, Kokkos::Schedule >::test_reduce( 1000 ); } -TEST_F( serial , team_shared_request) { - TestSharedTeam< Kokkos::Serial , Kokkos::Schedule >(); - TestSharedTeam< Kokkos::Serial , Kokkos::Schedule >(); +TEST_F( serial, team_shared_request ) +{ + TestSharedTeam< Kokkos::Serial, Kokkos::Schedule >(); + TestSharedTeam< Kokkos::Serial, Kokkos::Schedule >(); } -TEST_F( serial, team_scratch_request) { - TestScratchTeam< Kokkos::Serial , Kokkos::Schedule >(); - TestScratchTeam< Kokkos::Serial , Kokkos::Schedule >(); +TEST_F( serial, team_scratch_request ) +{ + TestScratchTeam< Kokkos::Serial, Kokkos::Schedule >(); + TestScratchTeam< Kokkos::Serial, Kokkos::Schedule >(); } -#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) -TEST_F( serial , team_lambda_shared_request) { - TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::Serial , Kokkos::Schedule >(); - TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::Serial , Kokkos::Schedule >(); +#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) +TEST_F( serial, team_lambda_shared_request ) +{ + TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::Serial, Kokkos::Schedule >(); + TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::Serial, Kokkos::Schedule >(); } #endif -TEST_F( serial, shmem_size) { +TEST_F( serial, shmem_size ) +{ TestShmemSize< Kokkos::Serial >(); } -TEST_F( serial, multi_level_scratch) { - TestMultiLevelScratchTeam< Kokkos::Serial , Kokkos::Schedule >(); - TestMultiLevelScratchTeam< Kokkos::Serial , Kokkos::Schedule >(); +TEST_F( serial, multi_level_scratch ) +{ + TestMultiLevelScratchTeam< Kokkos::Serial, Kokkos::Schedule >(); + TestMultiLevelScratchTeam< Kokkos::Serial, Kokkos::Schedule >(); } -TEST_F( serial , team_vector ) +TEST_F( serial, team_vector ) { - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(0) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(1) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(2) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(3) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(4) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(5) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(6) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(7) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(8) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(9) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(10) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >( 0 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >( 1 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >( 2 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >( 3 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >( 4 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >( 5 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >( 6 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >( 7 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >( 8 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >( 9 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >( 10 ) ) ); } #ifdef KOKKOS_COMPILER_GNU @@ -107,11 +113,10 @@ TEST_F( serial , team_vector ) #ifndef SKIP_TEST TEST_F( serial, triple_nested_parallelism ) { - TestTripleNestedReduce< double, Kokkos::Serial >( 8192, 2048 , 32 , 32 ); - TestTripleNestedReduce< double, Kokkos::Serial >( 8192, 2048 , 32 , 16 ); - TestTripleNestedReduce< double, Kokkos::Serial >( 8192, 2048 , 16 , 16 ); + TestTripleNestedReduce< double, Kokkos::Serial >( 8192, 2048, 32, 32 ); + TestTripleNestedReduce< double, Kokkos::Serial >( 8192, 2048, 32, 16 ); + TestTripleNestedReduce< double, Kokkos::Serial >( 8192, 2048, 16, 16 ); } #endif -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_ViewAPI_a.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_ViewAPI_a.cpp index 4c655fe770..2192159b84 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_ViewAPI_a.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_ViewAPI_a.cpp @@ -40,14 +40,15 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial , impl_view_mapping_a ) { +TEST_F( serial, impl_view_mapping_a ) +{ test_view_mapping< Kokkos::Serial >(); test_view_mapping_operator< Kokkos::Serial >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/serial/TestSerial_ViewAPI_b.cpp b/lib/kokkos/core/unit_test/serial/TestSerial_ViewAPI_b.cpp index 4947f2eaae..8c48ad2ced 100644 --- a/lib/kokkos/core/unit_test/serial/TestSerial_ViewAPI_b.cpp +++ b/lib/kokkos/core/unit_test/serial/TestSerial_ViewAPI_b.cpp @@ -40,82 +40,85 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( serial , impl_shared_alloc ) { - test_shared_alloc< Kokkos::HostSpace , Kokkos::Serial >(); +TEST_F( serial, impl_shared_alloc ) +{ + test_shared_alloc< Kokkos::HostSpace, Kokkos::Serial >(); } -TEST_F( serial , impl_view_mapping_b ) { +TEST_F( serial, impl_view_mapping_b ) +{ test_view_mapping_subview< Kokkos::Serial >(); TestViewMappingAtomic< Kokkos::Serial >::run(); } -TEST_F( serial, view_api) { - TestViewAPI< double , Kokkos::Serial >(); +TEST_F( serial, view_api ) +{ + TestViewAPI< double, Kokkos::Serial >(); } -TEST_F( serial , view_nested_view ) +TEST_F( serial, view_nested_view ) { ::Test::view_nested_view< Kokkos::Serial >(); } - - -TEST_F( serial , view_remap ) +TEST_F( serial, view_remap ) { - enum { N0 = 3 , N1 = 2 , N2 = 8 , N3 = 9 }; - - typedef Kokkos::View< double*[N1][N2][N3] , - Kokkos::LayoutRight , - Kokkos::Serial > output_type ; - - typedef Kokkos::View< int**[N2][N3] , - Kokkos::LayoutLeft , - Kokkos::Serial > input_type ; - - typedef Kokkos::View< int*[N0][N2][N3] , - Kokkos::LayoutLeft , - Kokkos::Serial > diff_type ; - - output_type output( "output" , N0 ); - input_type input ( "input" , N0 , N1 ); - diff_type diff ( "diff" , N0 ); - - int value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - input(i0,i1,i2,i3) = ++value ; - }}}} - - // Kokkos::deep_copy( diff , input ); // throw with incompatible shape - Kokkos::deep_copy( output , input ); - - value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - ++value ; - ASSERT_EQ( value , ((int) output(i0,i1,i2,i3) ) ); - }}}} + enum { N0 = 3, N1 = 2, N2 = 8, N3 = 9 }; + + typedef Kokkos::View< double*[N1][N2][N3], + Kokkos::LayoutRight, + Kokkos::Serial > output_type; + + typedef Kokkos::View< int**[N2][N3], + Kokkos::LayoutLeft, + Kokkos::Serial > input_type; + + typedef Kokkos::View< int*[N0][N2][N3], + Kokkos::LayoutLeft, + Kokkos::Serial > diff_type; + + output_type output( "output", N0 ); + input_type input ( "input", N0, N1 ); + diff_type diff ( "diff", N0 ); + + int value = 0; + + for ( size_t i3 = 0; i3 < N3; ++i3 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i0 = 0; i0 < N0; ++i0 ) + { + input( i0, i1, i2, i3 ) = ++value; + } + + // Kokkos::deep_copy( diff, input ); // Throw with incompatible shape. + Kokkos::deep_copy( output, input ); + + value = 0; + + for ( size_t i3 = 0; i3 < N3; ++i3 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i0 = 0; i0 < N0; ++i0 ) + { + ++value; + ASSERT_EQ( value, ( (int) output( i0, i1, i2, i3 ) ) ); + } } -//---------------------------------------------------------------------------- - -TEST_F( serial , view_aggregate ) +TEST_F( serial, view_aggregate ) { TestViewAggregate< Kokkos::Serial >(); } -TEST_F( serial , template_meta_functions ) +TEST_F( serial, template_meta_functions ) { - TestTemplateMetaFunctions(); + TestTemplateMetaFunctions< int, Kokkos::Serial >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads.hpp b/lib/kokkos/core/unit_test/threads/TestThreads.hpp index 4f611cf99c..0afd6772fe 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads.hpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads.hpp @@ -40,11 +40,14 @@ // ************************************************************************ //@HEADER */ + #ifndef KOKKOS_TEST_THREADS_HPP #define KOKKOS_TEST_THREADS_HPP + #include #include + #ifdef KOKKOS_LAMBDA #undef KOKKOS_LAMBDA #endif @@ -53,13 +56,8 @@ #include #include - -//---------------------------------------------------------------------------- - #include #include - - #include #include #include @@ -74,15 +72,11 @@ #include #include #include - - #include #include #include #include - #include - #include namespace Test { @@ -95,13 +89,13 @@ protected: const unsigned cores_per_numa = Kokkos::hwloc::get_available_cores_per_numa(); const unsigned threads_per_core = Kokkos::hwloc::get_available_threads_per_core(); - unsigned threads_count = 0 ; + unsigned threads_count = 0; - threads_count = std::max( 1u , numa_count ) - * std::max( 2u , cores_per_numa * threads_per_core ); + threads_count = std::max( 1u, numa_count ) + * std::max( 2u, cores_per_numa * threads_per_core ); Kokkos::Threads::initialize( threads_count ); - Kokkos::Threads::print_configuration( std::cout , true /* detailed */ ); + Kokkos::print_configuration( std::cout, true /* detailed */ ); } static void TearDownTestCase() @@ -110,6 +104,6 @@ protected: } }; +} // namespace Test -} #endif diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_Atomics.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_Atomics.cpp index 6e24c4973e..d2a5ea5d63 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_Atomics.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_Atomics.cpp @@ -40,165 +40,161 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads , atomics ) +TEST_F( threads, atomics ) { - const int loop_count = 1e4 ; + const int loop_count = 1e4; - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Threads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Threads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< int, Kokkos::Threads >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Threads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Threads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned int, Kokkos::Threads >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Threads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Threads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long int, Kokkos::Threads >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Threads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Threads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< unsigned long int, Kokkos::Threads >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Threads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Threads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< long long int, Kokkos::Threads >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(loop_count,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Threads >( loop_count, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Threads >( loop_count, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< double, Kokkos::Threads >( loop_count, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Threads >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Threads >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< float, Kokkos::Threads >( 100, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Threads>(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Threads>(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Threads>(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Threads >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Threads >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< Kokkos::complex, Kokkos::Threads >( 100, 3 ) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Threads>(100,1) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Threads>(100,2) ) ); - ASSERT_TRUE( ( TestAtomic::Loop ,Kokkos::Threads>(100,3) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Threads >( 100, 1 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Threads >( 100, 2 ) ) ); + ASSERT_TRUE( ( TestAtomic::Loop< TestAtomic::SuperScalar<4>, Kokkos::Threads >( 100, 3 ) ) ); } -TEST_F( threads , atomic_operations ) +TEST_F( threads, atomic_operations ) { - const int start = 1; //Avoid zero for division + const int start = 1; // Avoid zero for division. const int end = 11; - for (int i = start; i < end; ++i) + for ( int i = start; i < end; ++i ) { - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 8 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 9 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 11 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType(start, end-i, 12 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 4 ) ) ); - - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType(start, end-i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Threads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Threads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Threads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Threads >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Threads >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Threads >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Threads >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Threads >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Threads >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Threads >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< int, Kokkos::Threads >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Threads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Threads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Threads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Threads >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Threads >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Threads >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Threads >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Threads >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Threads >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Threads >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned int, Kokkos::Threads >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Threads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Threads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Threads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Threads >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Threads >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Threads >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Threads >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Threads >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Threads >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Threads >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long int, Kokkos::Threads >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Threads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Threads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Threads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Threads >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Threads >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Threads >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Threads >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Threads >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Threads >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Threads >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< unsigned long int, Kokkos::Threads >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Threads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Threads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Threads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Threads >( start, end - i, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Threads >( start, end - i, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Threads >( start, end - i, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Threads >( start, end - i, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Threads >( start, end - i, 8 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Threads >( start, end - i, 9 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Threads >( start, end - i, 11 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestIntegralType< long long int, Kokkos::Threads >( start, end - i, 12 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Threads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Threads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Threads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< double, Kokkos::Threads >( start, end - i, 4 ) ) ); + + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Threads >( start, end - i, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Threads >( start, end - i, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Threads >( start, end - i, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicOperations::AtomicOperationsTestNonIntegralType< float, Kokkos::Threads >( start, end - i, 4 ) ) ); } - } - -TEST_F( threads , atomic_views_integral ) +TEST_F( threads, atomic_views_integral ) { const long length = 1000000; { - //Integral Types - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 4 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 5 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 6 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 7 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType(length, 8 ) ) ); - + // Integral Types. + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Threads >( length, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Threads >( length, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Threads >( length, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Threads >( length, 4 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Threads >( length, 5 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Threads >( length, 6 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Threads >( length, 7 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestIntegralType< long, Kokkos::Threads >( length, 8 ) ) ); } } -TEST_F( threads , atomic_views_nonintegral ) +TEST_F( threads, atomic_views_nonintegral ) { const long length = 1000000; { - //Non-Integral Types - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 1 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 2 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 3 ) ) ); - ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType(length, 4 ) ) ); - + // Non-Integral Types. + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Threads >( length, 1 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Threads >( length, 2 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Threads >( length, 3 ) ) ); + ASSERT_TRUE( ( TestAtomicViews::AtomicViewsTestNonIntegralType< double, Kokkos::Threads >( length, 4 ) ) ); } } -TEST_F( threads , atomic_view_api ) +TEST_F( threads, atomic_view_api ) { - TestAtomicViews::TestAtomicViewAPI(); + TestAtomicViews::TestAtomicViewAPI< int, Kokkos::Threads >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_Other.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_Other.cpp index ac0356eeb4..7d268c1454 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_Other.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_Other.cpp @@ -40,65 +40,74 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads , init ) { +TEST_F( threads, init ) +{ ; } -TEST_F( threads , md_range ) { - TestMDRange_2D< Kokkos::Threads >::test_for2(100,100); +TEST_F( threads , mdrange_for ) { + TestMDRange_2D< Kokkos::Threads >::test_for2( 100, 100 ); + TestMDRange_3D< Kokkos::Threads >::test_for3( 100, 10, 100 ); + TestMDRange_4D< Kokkos::Threads >::test_for4( 100, 10, 10, 10 ); + TestMDRange_5D< Kokkos::Threads >::test_for5( 100, 10, 10, 10, 5 ); + TestMDRange_6D< Kokkos::Threads >::test_for6( 10, 10, 10, 10, 5, 5 ); +} - TestMDRange_3D< Kokkos::Threads >::test_for3(100,100,100); +TEST_F( threads , mdrange_reduce ) { + TestMDRange_2D< Kokkos::Threads >::test_reduce2( 100, 100 ); + TestMDRange_3D< Kokkos::Threads >::test_reduce3( 100, 10, 100 ); } -TEST_F( threads, policy_construction) { +TEST_F( threads, policy_construction ) +{ TestRangePolicyConstruction< Kokkos::Threads >(); TestTeamPolicyConstruction< Kokkos::Threads >(); } -TEST_F( threads , range_tag ) +TEST_F( threads, range_tag ) { - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_for(0); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_reduce(0); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_scan(0); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_for(0); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_reduce(0); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_scan(0); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_dynamic_policy(0); - - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_for(2); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_reduce(2); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_scan(2); - - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_for(3); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_reduce(3); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_scan(3); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_dynamic_policy(3); - - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_for(1000); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_reduce(1000); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_scan(1000); - - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_for(1001); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_reduce(1001); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_scan(1001); - TestRange< Kokkos::Threads , Kokkos::Schedule >::test_dynamic_policy(1000); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_for( 0 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 0 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_scan( 0 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_for( 0 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 0 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_scan( 0 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_dynamic_policy( 0 ); + + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_for( 2 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 2 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_scan( 2 ); + + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_for( 3 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 3 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_scan( 3 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_dynamic_policy( 3 ); + + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_for( 1000 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 1000 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_scan( 1000 ); + + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_for( 1001 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 1001 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_scan( 1001 ); + TestRange< Kokkos::Threads, Kokkos::Schedule >::test_dynamic_policy( 1000 ); } - //---------------------------------------------------------------------------- -TEST_F( threads , compiler_macros ) +TEST_F( threads, compiler_macros ) { ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::Threads >() ) ); } //---------------------------------------------------------------------------- -TEST_F( threads , memory_pool ) +TEST_F( threads, memory_pool ) { bool val = TestMemoryPool::test_mempool< Kokkos::Threads >( 128, 128000000 ); ASSERT_TRUE( val ); @@ -112,24 +121,24 @@ TEST_F( threads , memory_pool ) #if defined( KOKKOS_ENABLE_TASKDAG ) /* -TEST_F( threads , task_fib ) +TEST_F( threads, task_fib ) { - for ( int i = 0 ; i < 25 ; ++i ) { - TestTaskScheduler::TestFib< Kokkos::Threads >::run(i); + for ( int i = 0; i < 25; ++i ) { + TestTaskScheduler::TestFib< Kokkos::Threads >::run( i ); } } -TEST_F( threads , task_depend ) +TEST_F( threads, task_depend ) { - for ( int i = 0 ; i < 25 ; ++i ) { - TestTaskScheduler::TestTaskDependence< Kokkos::Threads >::run(i); + for ( int i = 0; i < 25; ++i ) { + TestTaskScheduler::TestTaskDependence< Kokkos::Threads >::run( i ); } } -TEST_F( threads , task_team ) +TEST_F( threads, task_team ) { - TestTaskScheduler::TestTaskTeam< Kokkos::Threads >::run(1000); - //TestTaskScheduler::TestTaskTeamValue< Kokkos::Threads >::run(1000); //put back after testing + TestTaskScheduler::TestTaskTeam< Kokkos::Threads >::run( 1000 ); + //TestTaskScheduler::TestTaskTeamValue< Kokkos::Threads >::run( 1000 ); // Put back after testing. } */ #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ @@ -137,53 +146,51 @@ TEST_F( threads , task_team ) //---------------------------------------------------------------------------- #if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) -TEST_F( threads , cxx11 ) +TEST_F( threads, cxx11 ) { - if ( std::is_same< Kokkos::DefaultExecutionSpace , Kokkos::Threads >::value ) { - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >(1) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >(2) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >(3) ) ); - ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >(4) ) ); + if ( std::is_same< Kokkos::DefaultExecutionSpace, Kokkos::Threads >::value ) { + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >( 1 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >( 2 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >( 3 ) ) ); + ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >( 4 ) ) ); } } #endif TEST_F( threads, tile_layout ) { - TestTile::test< Kokkos::Threads , 1 , 1 >( 1 , 1 ); - TestTile::test< Kokkos::Threads , 1 , 1 >( 2 , 3 ); - TestTile::test< Kokkos::Threads , 1 , 1 >( 9 , 10 ); - - TestTile::test< Kokkos::Threads , 2 , 2 >( 1 , 1 ); - TestTile::test< Kokkos::Threads , 2 , 2 >( 2 , 3 ); - TestTile::test< Kokkos::Threads , 2 , 2 >( 4 , 4 ); - TestTile::test< Kokkos::Threads , 2 , 2 >( 9 , 9 ); - - TestTile::test< Kokkos::Threads , 2 , 4 >( 9 , 9 ); - TestTile::test< Kokkos::Threads , 4 , 2 >( 9 , 9 ); - - TestTile::test< Kokkos::Threads , 4 , 4 >( 1 , 1 ); - TestTile::test< Kokkos::Threads , 4 , 4 >( 4 , 4 ); - TestTile::test< Kokkos::Threads , 4 , 4 >( 9 , 9 ); - TestTile::test< Kokkos::Threads , 4 , 4 >( 9 , 11 ); - - TestTile::test< Kokkos::Threads , 8 , 8 >( 1 , 1 ); - TestTile::test< Kokkos::Threads , 8 , 8 >( 4 , 4 ); - TestTile::test< Kokkos::Threads , 8 , 8 >( 9 , 9 ); - TestTile::test< Kokkos::Threads , 8 , 8 >( 9 , 11 ); + TestTile::test< Kokkos::Threads, 1, 1 >( 1, 1 ); + TestTile::test< Kokkos::Threads, 1, 1 >( 2, 3 ); + TestTile::test< Kokkos::Threads, 1, 1 >( 9, 10 ); + + TestTile::test< Kokkos::Threads, 2, 2 >( 1, 1 ); + TestTile::test< Kokkos::Threads, 2, 2 >( 2, 3 ); + TestTile::test< Kokkos::Threads, 2, 2 >( 4, 4 ); + TestTile::test< Kokkos::Threads, 2, 2 >( 9, 9 ); + + TestTile::test< Kokkos::Threads, 2, 4 >( 9, 9 ); + TestTile::test< Kokkos::Threads, 4, 2 >( 9, 9 ); + + TestTile::test< Kokkos::Threads, 4, 4 >( 1, 1 ); + TestTile::test< Kokkos::Threads, 4, 4 >( 4, 4 ); + TestTile::test< Kokkos::Threads, 4, 4 >( 9, 9 ); + TestTile::test< Kokkos::Threads, 4, 4 >( 9, 11 ); + + TestTile::test< Kokkos::Threads, 8, 8 >( 1, 1 ); + TestTile::test< Kokkos::Threads, 8, 8 >( 4, 4 ); + TestTile::test< Kokkos::Threads, 8, 8 >( 9, 9 ); + TestTile::test< Kokkos::Threads, 8, 8 >( 9, 11 ); } - -TEST_F( threads , dispatch ) +TEST_F( threads, dispatch ) { - const int repeat = 100 ; - for ( int i = 0 ; i < repeat ; ++i ) { - for ( int j = 0 ; j < repeat ; ++j ) { - Kokkos::parallel_for( Kokkos::RangePolicy< Kokkos::Threads >(0,j) - , KOKKOS_LAMBDA( int ) {} ); - }} + const int repeat = 100; + for ( int i = 0; i < repeat; ++i ) { + for ( int j = 0; j < repeat; ++j ) { + Kokkos::parallel_for( Kokkos::RangePolicy< Kokkos::Threads >( 0, j ) + , KOKKOS_LAMBDA( int ) {} ); + } + } } - -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_Reductions.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_Reductions.cpp index a637d1e3ab..d2b75ca892 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_Reductions.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_Reductions.cpp @@ -40,46 +40,52 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, long_reduce) { - TestReduce< long , Kokkos::Threads >( 0 ); - TestReduce< long , Kokkos::Threads >( 1000000 ); +TEST_F( threads, long_reduce ) +{ + TestReduce< long, Kokkos::Threads >( 0 ); + TestReduce< long, Kokkos::Threads >( 1000000 ); } -TEST_F( threads, double_reduce) { - TestReduce< double , Kokkos::Threads >( 0 ); - TestReduce< double , Kokkos::Threads >( 1000000 ); +TEST_F( threads, double_reduce ) +{ + TestReduce< double, Kokkos::Threads >( 0 ); + TestReduce< double, Kokkos::Threads >( 1000000 ); } -TEST_F( threads , reducers ) +TEST_F( threads, reducers ) { - TestReducers::execute_integer(); - TestReducers::execute_integer(); - TestReducers::execute_float(); - TestReducers, Kokkos::Threads>::execute_basic(); + TestReducers< int, Kokkos::Threads >::execute_integer(); + TestReducers< size_t, Kokkos::Threads >::execute_integer(); + TestReducers< double, Kokkos::Threads >::execute_float(); + TestReducers< Kokkos::complex, Kokkos::Threads >::execute_basic(); } -TEST_F( threads, long_reduce_dynamic ) { - TestReduceDynamic< long , Kokkos::Threads >( 0 ); - TestReduceDynamic< long , Kokkos::Threads >( 1000000 ); +TEST_F( threads, long_reduce_dynamic ) +{ + TestReduceDynamic< long, Kokkos::Threads >( 0 ); + TestReduceDynamic< long, Kokkos::Threads >( 1000000 ); } -TEST_F( threads, double_reduce_dynamic ) { - TestReduceDynamic< double , Kokkos::Threads >( 0 ); - TestReduceDynamic< double , Kokkos::Threads >( 1000000 ); +TEST_F( threads, double_reduce_dynamic ) +{ + TestReduceDynamic< double, Kokkos::Threads >( 0 ); + TestReduceDynamic< double, Kokkos::Threads >( 1000000 ); } -TEST_F( threads, long_reduce_dynamic_view ) { - TestReduceDynamicView< long , Kokkos::Threads >( 0 ); - TestReduceDynamicView< long , Kokkos::Threads >( 1000000 ); +TEST_F( threads, long_reduce_dynamic_view ) +{ + TestReduceDynamicView< long, Kokkos::Threads >( 0 ); + TestReduceDynamicView< long, Kokkos::Threads >( 1000000 ); } -TEST_F( threads , scan ) +TEST_F( threads, scan ) { - TestScan< Kokkos::Threads >::test_range( 1 , 1000 ); + TestScan< Kokkos::Threads >::test_range( 1, 1000 ); TestScan< Kokkos::Threads >( 0 ); TestScan< Kokkos::Threads >( 100000 ); TestScan< Kokkos::Threads >( 10000000 ); @@ -87,10 +93,11 @@ TEST_F( threads , scan ) } #if 0 -TEST_F( threads , scan_small ) +TEST_F( threads, scan_small ) { - typedef TestScan< Kokkos::Threads , Kokkos::Impl::ThreadsExecUseScanSmall > TestScanFunctor ; - for ( int i = 0 ; i < 1000 ; ++i ) { + typedef TestScan< Kokkos::Threads, Kokkos::Impl::ThreadsExecUseScanSmall > TestScanFunctor; + + for ( int i = 0; i < 1000; ++i ) { TestScanFunctor( 10 ); TestScanFunctor( 10000 ); } @@ -101,38 +108,39 @@ TEST_F( threads , scan_small ) } #endif -TEST_F( threads , team_scan ) +TEST_F( threads, team_scan ) { - TestScanTeam< Kokkos::Threads , Kokkos::Schedule >( 0 ); - TestScanTeam< Kokkos::Threads , Kokkos::Schedule >( 0 ); - TestScanTeam< Kokkos::Threads , Kokkos::Schedule >( 10 ); - TestScanTeam< Kokkos::Threads , Kokkos::Schedule >( 10 ); - TestScanTeam< Kokkos::Threads , Kokkos::Schedule >( 10000 ); - TestScanTeam< Kokkos::Threads , Kokkos::Schedule >( 10000 ); + TestScanTeam< Kokkos::Threads, Kokkos::Schedule >( 0 ); + TestScanTeam< Kokkos::Threads, Kokkos::Schedule >( 0 ); + TestScanTeam< Kokkos::Threads, Kokkos::Schedule >( 10 ); + TestScanTeam< Kokkos::Threads, Kokkos::Schedule >( 10 ); + TestScanTeam< Kokkos::Threads, Kokkos::Schedule >( 10000 ); + TestScanTeam< Kokkos::Threads, Kokkos::Schedule >( 10000 ); } -TEST_F( threads , team_long_reduce) { - TestReduceTeam< long , Kokkos::Threads , Kokkos::Schedule >( 0 ); - TestReduceTeam< long , Kokkos::Threads , Kokkos::Schedule >( 0 ); - TestReduceTeam< long , Kokkos::Threads , Kokkos::Schedule >( 3 ); - TestReduceTeam< long , Kokkos::Threads , Kokkos::Schedule >( 3 ); - TestReduceTeam< long , Kokkos::Threads , Kokkos::Schedule >( 100000 ); - TestReduceTeam< long , Kokkos::Threads , Kokkos::Schedule >( 100000 ); +TEST_F( threads, team_long_reduce ) +{ + TestReduceTeam< long, Kokkos::Threads, Kokkos::Schedule >( 0 ); + TestReduceTeam< long, Kokkos::Threads, Kokkos::Schedule >( 0 ); + TestReduceTeam< long, Kokkos::Threads, Kokkos::Schedule >( 3 ); + TestReduceTeam< long, Kokkos::Threads, Kokkos::Schedule >( 3 ); + TestReduceTeam< long, Kokkos::Threads, Kokkos::Schedule >( 100000 ); + TestReduceTeam< long, Kokkos::Threads, Kokkos::Schedule >( 100000 ); } -TEST_F( threads , team_double_reduce) { - TestReduceTeam< double , Kokkos::Threads , Kokkos::Schedule >( 0 ); - TestReduceTeam< double , Kokkos::Threads , Kokkos::Schedule >( 0 ); - TestReduceTeam< double , Kokkos::Threads , Kokkos::Schedule >( 3 ); - TestReduceTeam< double , Kokkos::Threads , Kokkos::Schedule >( 3 ); - TestReduceTeam< double , Kokkos::Threads , Kokkos::Schedule >( 100000 ); - TestReduceTeam< double , Kokkos::Threads , Kokkos::Schedule >( 100000 ); +TEST_F( threads, team_double_reduce ) +{ + TestReduceTeam< double, Kokkos::Threads, Kokkos::Schedule >( 0 ); + TestReduceTeam< double, Kokkos::Threads, Kokkos::Schedule >( 0 ); + TestReduceTeam< double, Kokkos::Threads, Kokkos::Schedule >( 3 ); + TestReduceTeam< double, Kokkos::Threads, Kokkos::Schedule >( 3 ); + TestReduceTeam< double, Kokkos::Threads, Kokkos::Schedule >( 100000 ); + TestReduceTeam< double, Kokkos::Threads, Kokkos::Schedule >( 100000 ); } -TEST_F( threads , reduction_deduction ) +TEST_F( threads, reduction_deduction ) { TestCXX11::test_reduction_deduction< Kokkos::Threads >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_a.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_a.cpp index 2df9e19deb..68a9da6aed 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_a.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_a.cpp @@ -40,53 +40,64 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_auto_1d_left ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutLeft,Kokkos::Threads >(); +TEST_F( threads, view_subview_auto_1d_left ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutLeft, Kokkos::Threads >(); } -TEST_F( threads, view_subview_auto_1d_right ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutRight,Kokkos::Threads >(); +TEST_F( threads, view_subview_auto_1d_right ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutRight, Kokkos::Threads >(); } -TEST_F( threads, view_subview_auto_1d_stride ) { - TestViewSubview::test_auto_1d< Kokkos::LayoutStride,Kokkos::Threads >(); +TEST_F( threads, view_subview_auto_1d_stride ) +{ + TestViewSubview::test_auto_1d< Kokkos::LayoutStride, Kokkos::Threads >(); } -TEST_F( threads, view_subview_assign_strided ) { +TEST_F( threads, view_subview_assign_strided ) +{ TestViewSubview::test_1d_strided_assignment< Kokkos::Threads >(); } -TEST_F( threads, view_subview_left_0 ) { +TEST_F( threads, view_subview_left_0 ) +{ TestViewSubview::test_left_0< Kokkos::Threads >(); } -TEST_F( threads, view_subview_left_1 ) { +TEST_F( threads, view_subview_left_1 ) +{ TestViewSubview::test_left_1< Kokkos::Threads >(); } -TEST_F( threads, view_subview_left_2 ) { +TEST_F( threads, view_subview_left_2 ) +{ TestViewSubview::test_left_2< Kokkos::Threads >(); } -TEST_F( threads, view_subview_left_3 ) { +TEST_F( threads, view_subview_left_3 ) +{ TestViewSubview::test_left_3< Kokkos::Threads >(); } -TEST_F( threads, view_subview_right_0 ) { +TEST_F( threads, view_subview_right_0 ) +{ TestViewSubview::test_right_0< Kokkos::Threads >(); } -TEST_F( threads, view_subview_right_1 ) { +TEST_F( threads, view_subview_right_1 ) +{ TestViewSubview::test_right_1< Kokkos::Threads >(); } -TEST_F( threads, view_subview_right_3 ) { +TEST_F( threads, view_subview_right_3 ) +{ TestViewSubview::test_right_3< Kokkos::Threads >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_b.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_b.cpp index d57dbe97c0..c5cf061e82 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_b.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_b.cpp @@ -40,21 +40,23 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_layoutleft_to_layoutleft) { +TEST_F( threads, view_subview_layoutleft_to_layoutleft ) +{ TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Threads >(); - TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Threads , Kokkos::MemoryTraits >(); - TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Threads , Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Threads, Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutleft_to_layoutleft< Kokkos::Threads, Kokkos::MemoryTraits >(); } -TEST_F( threads, view_subview_layoutright_to_layoutright) { +TEST_F( threads, view_subview_layoutright_to_layoutright ) +{ TestViewSubview::test_layoutright_to_layoutright< Kokkos::Threads >(); - TestViewSubview::test_layoutright_to_layoutright< Kokkos::Threads , Kokkos::MemoryTraits >(); - TestViewSubview::test_layoutright_to_layoutright< Kokkos::Threads , Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutright_to_layoutright< Kokkos::Threads, Kokkos::MemoryTraits >(); + TestViewSubview::test_layoutright_to_layoutright< Kokkos::Threads, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c01.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c01.cpp index 67d998c0e8..9018c1f4f7 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c01.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c01.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_1d_assign ) { +TEST_F( threads, view_subview_1d_assign ) +{ TestViewSubview::test_1d_assign< Kokkos::Threads >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c02.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c02.cpp index e340240c48..9483abd9cc 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c02.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c02.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_1d_assign_atomic ) { - TestViewSubview::test_1d_assign< Kokkos::Threads , Kokkos::MemoryTraits >(); +TEST_F( threads, view_subview_1d_assign_atomic ) +{ + TestViewSubview::test_1d_assign< Kokkos::Threads, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c03.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c03.cpp index ad27fa0fa6..e252a26565 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c03.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c03.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_1d_assign_randomaccess ) { - TestViewSubview::test_1d_assign< Kokkos::Threads , Kokkos::MemoryTraits >(); +TEST_F( threads, view_subview_1d_assign_randomaccess ) +{ + TestViewSubview::test_1d_assign< Kokkos::Threads, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c04.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c04.cpp index 6fca47cc4c..3e211b1a58 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c04.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c04.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_2d_from_3d ) { +TEST_F( threads, view_subview_2d_from_3d ) +{ TestViewSubview::test_2d_subview_3d< Kokkos::Threads >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c05.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c05.cpp index c7dfca9415..865d50b1a1 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c05.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c05.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_2d_from_3d_atomic ) { - TestViewSubview::test_2d_subview_3d< Kokkos::Threads , Kokkos::MemoryTraits >(); +TEST_F( threads, view_subview_2d_from_3d_atomic ) +{ + TestViewSubview::test_2d_subview_3d< Kokkos::Threads, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c06.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c06.cpp index 38e8394918..c5840073b6 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c06.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c06.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_2d_from_3d_randomaccess ) { - TestViewSubview::test_2d_subview_3d< Kokkos::Threads , Kokkos::MemoryTraits >(); +TEST_F( threads, view_subview_2d_from_3d_randomaccess ) +{ + TestViewSubview::test_2d_subview_3d< Kokkos::Threads, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c07.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c07.cpp index 1f01fe6b5e..7b8825ef62 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c07.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c07.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_3d_from_5d_left ) { +TEST_F( threads, view_subview_3d_from_5d_left ) +{ TestViewSubview::test_3d_subview_5d_left< Kokkos::Threads >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c08.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c08.cpp index e9a1ccbe30..7bc16a5827 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c08.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c08.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_3d_from_5d_left_atomic ) { - TestViewSubview::test_3d_subview_5d_left< Kokkos::Threads , Kokkos::MemoryTraits >(); +TEST_F( threads, view_subview_3d_from_5d_left_atomic ) +{ + TestViewSubview::test_3d_subview_5d_left< Kokkos::Threads, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c09.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c09.cpp index c8b6c8743d..57b87b6098 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c09.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c09.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_3d_from_5d_left_randomaccess ) { - TestViewSubview::test_3d_subview_5d_left< Kokkos::Threads , Kokkos::MemoryTraits >(); +TEST_F( threads, view_subview_3d_from_5d_left_randomaccess ) +{ + TestViewSubview::test_3d_subview_5d_left< Kokkos::Threads, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c10.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c10.cpp index 7cef6fa07b..1875a883d4 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c10.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c10.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_3d_from_5d_right ) { +TEST_F( threads, view_subview_3d_from_5d_right ) +{ TestViewSubview::test_3d_subview_5d_right< Kokkos::Threads >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c11.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c11.cpp index d67bf3157e..cf6428b18e 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c11.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c11.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_3d_from_5d_right_atomic ) { - TestViewSubview::test_3d_subview_5d_right< Kokkos::Threads , Kokkos::MemoryTraits >(); +TEST_F( threads, view_subview_3d_from_5d_right_atomic ) +{ + TestViewSubview::test_3d_subview_5d_right< Kokkos::Threads, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c12.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c12.cpp index e8a2c825cf..7060fdb273 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c12.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_SubView_c12.cpp @@ -40,13 +40,14 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads, view_subview_3d_from_5d_right_randomaccess ) { - TestViewSubview::test_3d_subview_5d_right< Kokkos::Threads , Kokkos::MemoryTraits >(); +TEST_F( threads, view_subview_3d_from_5d_right_randomaccess ) +{ + TestViewSubview::test_3d_subview_5d_right< Kokkos::Threads, Kokkos::MemoryTraits >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_Team.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_Team.cpp index 4690be4d3a..d802d65830 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_Team.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_Team.cpp @@ -40,67 +40,73 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads , team_tag ) +TEST_F( threads, team_tag ) { - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_for(0); - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_reduce(0); - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_for(0); - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_reduce(0); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_for( 0 ); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 0 ); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_for( 0 ); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 0 ); - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_for(2); - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_reduce(2); - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_for(2); - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_reduce(2); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_for( 2 ); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 2 ); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_for( 2 ); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 2 ); - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_for(1000); - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_reduce(1000); - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_for(1000); - TestTeamPolicy< Kokkos::Threads , Kokkos::Schedule >::test_reduce(1000); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_for( 1000 ); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 1000 ); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_for( 1000 ); + TestTeamPolicy< Kokkos::Threads, Kokkos::Schedule >::test_reduce( 1000 ); } -TEST_F( threads , team_shared_request) { - TestSharedTeam< Kokkos::Threads , Kokkos::Schedule >(); - TestSharedTeam< Kokkos::Threads , Kokkos::Schedule >(); +TEST_F( threads, team_shared_request ) +{ + TestSharedTeam< Kokkos::Threads, Kokkos::Schedule >(); + TestSharedTeam< Kokkos::Threads, Kokkos::Schedule >(); } -TEST_F( threads, team_scratch_request) { - TestScratchTeam< Kokkos::Threads , Kokkos::Schedule >(); - TestScratchTeam< Kokkos::Threads , Kokkos::Schedule >(); +TEST_F( threads, team_scratch_request ) +{ + TestScratchTeam< Kokkos::Threads, Kokkos::Schedule >(); + TestScratchTeam< Kokkos::Threads, Kokkos::Schedule >(); } -#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) -TEST_F( threads , team_lambda_shared_request) { - TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::Threads , Kokkos::Schedule >(); - TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::Threads , Kokkos::Schedule >(); +#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) +TEST_F( threads, team_lambda_shared_request ) +{ + TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::Threads, Kokkos::Schedule >(); + TestLambdaSharedTeam< Kokkos::HostSpace, Kokkos::Threads, Kokkos::Schedule >(); } #endif -TEST_F( threads, shmem_size) { +TEST_F( threads, shmem_size ) +{ TestShmemSize< Kokkos::Threads >(); } -TEST_F( threads, multi_level_scratch) { - TestMultiLevelScratchTeam< Kokkos::Threads , Kokkos::Schedule >(); - TestMultiLevelScratchTeam< Kokkos::Threads , Kokkos::Schedule >(); +TEST_F( threads, multi_level_scratch ) +{ + TestMultiLevelScratchTeam< Kokkos::Threads, Kokkos::Schedule >(); + TestMultiLevelScratchTeam< Kokkos::Threads, Kokkos::Schedule >(); } -TEST_F( threads , team_vector ) +TEST_F( threads, team_vector ) { - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(0) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(1) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(2) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(3) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(4) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(5) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(6) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(7) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(8) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(9) ) ); - ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(10) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >( 0 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >( 1 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >( 2 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >( 3 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >( 4 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >( 5 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >( 6 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >( 7 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >( 8 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >( 9 ) ) ); + ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >( 10 ) ) ); } #ifdef KOKKOS_COMPILER_GNU @@ -112,11 +118,10 @@ TEST_F( threads , team_vector ) #ifndef SKIP_TEST TEST_F( threads, triple_nested_parallelism ) { - TestTripleNestedReduce< double, Kokkos::Threads >( 8192, 2048 , 32 , 32 ); - TestTripleNestedReduce< double, Kokkos::Threads >( 8192, 2048 , 32 , 16 ); - TestTripleNestedReduce< double, Kokkos::Threads >( 8192, 2048 , 16 , 16 ); + TestTripleNestedReduce< double, Kokkos::Threads >( 8192, 2048, 32, 32 ); + TestTripleNestedReduce< double, Kokkos::Threads >( 8192, 2048, 32, 16 ); + TestTripleNestedReduce< double, Kokkos::Threads >( 8192, 2048, 16, 16 ); } #endif -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_ViewAPI_a.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_ViewAPI_a.cpp index 46a576b027..36eae28793 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_ViewAPI_a.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_ViewAPI_a.cpp @@ -40,14 +40,15 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads , impl_view_mapping_a ) { +TEST_F( threads, impl_view_mapping_a ) +{ test_view_mapping< Kokkos::Threads >(); test_view_mapping_operator< Kokkos::Threads >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/core/unit_test/threads/TestThreads_ViewAPI_b.cpp b/lib/kokkos/core/unit_test/threads/TestThreads_ViewAPI_b.cpp index b5d6ac843d..8c78d09443 100644 --- a/lib/kokkos/core/unit_test/threads/TestThreads_ViewAPI_b.cpp +++ b/lib/kokkos/core/unit_test/threads/TestThreads_ViewAPI_b.cpp @@ -40,82 +40,85 @@ // ************************************************************************ //@HEADER */ + #include namespace Test { -TEST_F( threads , impl_shared_alloc ) { - test_shared_alloc< Kokkos::HostSpace , Kokkos::Threads >(); +TEST_F( threads, impl_shared_alloc ) +{ + test_shared_alloc< Kokkos::HostSpace, Kokkos::Threads >(); } -TEST_F( threads , impl_view_mapping_b ) { +TEST_F( threads, impl_view_mapping_b ) +{ test_view_mapping_subview< Kokkos::Threads >(); TestViewMappingAtomic< Kokkos::Threads >::run(); } -TEST_F( threads, view_api) { - TestViewAPI< double , Kokkos::Threads >(); +TEST_F( threads, view_api ) +{ + TestViewAPI< double, Kokkos::Threads >(); } -TEST_F( threads , view_nested_view ) +TEST_F( threads, view_nested_view ) { ::Test::view_nested_view< Kokkos::Threads >(); } - - -TEST_F( threads , view_remap ) +TEST_F( threads, view_remap ) { - enum { N0 = 3 , N1 = 2 , N2 = 8 , N3 = 9 }; - - typedef Kokkos::View< double*[N1][N2][N3] , - Kokkos::LayoutRight , - Kokkos::Threads > output_type ; - - typedef Kokkos::View< int**[N2][N3] , - Kokkos::LayoutLeft , - Kokkos::Threads > input_type ; - - typedef Kokkos::View< int*[N0][N2][N3] , - Kokkos::LayoutLeft , - Kokkos::Threads > diff_type ; - - output_type output( "output" , N0 ); - input_type input ( "input" , N0 , N1 ); - diff_type diff ( "diff" , N0 ); - - int value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - input(i0,i1,i2,i3) = ++value ; - }}}} - - // Kokkos::deep_copy( diff , input ); // throw with incompatible shape - Kokkos::deep_copy( output , input ); - - value = 0 ; - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) { - ++value ; - ASSERT_EQ( value , ((int) output(i0,i1,i2,i3) ) ); - }}}} + enum { N0 = 3, N1 = 2, N2 = 8, N3 = 9 }; + + typedef Kokkos::View< double*[N1][N2][N3], + Kokkos::LayoutRight, + Kokkos::Threads > output_type; + + typedef Kokkos::View< int**[N2][N3], + Kokkos::LayoutLeft, + Kokkos::Threads > input_type; + + typedef Kokkos::View< int*[N0][N2][N3], + Kokkos::LayoutLeft, + Kokkos::Threads > diff_type; + + output_type output( "output", N0 ); + input_type input ( "input", N0, N1 ); + diff_type diff ( "diff", N0 ); + + int value = 0; + + for ( size_t i3 = 0; i3 < N3; ++i3 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i0 = 0; i0 < N0; ++i0 ) + { + input( i0, i1, i2, i3 ) = ++value; + } + + // Kokkos::deep_copy( diff, input ); // Throw with incompatible shape. + Kokkos::deep_copy( output, input ); + + value = 0; + + for ( size_t i3 = 0; i3 < N3; ++i3 ) + for ( size_t i2 = 0; i2 < N2; ++i2 ) + for ( size_t i1 = 0; i1 < N1; ++i1 ) + for ( size_t i0 = 0; i0 < N0; ++i0 ) + { + ++value; + ASSERT_EQ( value, ( (int) output( i0, i1, i2, i3 ) ) ); + } } -//---------------------------------------------------------------------------- - -TEST_F( threads , view_aggregate ) +TEST_F( threads, view_aggregate ) { TestViewAggregate< Kokkos::Threads >(); } -TEST_F( threads , template_meta_functions ) +TEST_F( threads, template_meta_functions ) { - TestTemplateMetaFunctions(); + TestTemplateMetaFunctions< int, Kokkos::Threads >(); } -} // namespace test - +} // namespace Test diff --git a/lib/kokkos/doc/design_notes_space_instances.md b/lib/kokkos/doc/design_notes_space_instances.md index 487fa25bcb..0124dfbc87 100644 --- a/lib/kokkos/doc/design_notes_space_instances.md +++ b/lib/kokkos/doc/design_notes_space_instances.md @@ -1,35 +1,41 @@ # Design Notes for Execution and Memory Space Instances +## Objective -## Execution Spaces + * Enable Kokkos interoperability with coarse-grain tasking models + +## Requirements - * Work is *dispatched* to an execution space instance + * Backwards compatable with existing Kokkos API + * Support existing Host execution spaces (Serial, Threads, OpenMP, maybe Qthreads) + * Support DARMA threading model (may require a new Host execution space) + * Support Uintah threading model, i.e. indepentant worker threadpools working of of shared task queues + + +## Execution Space + * Parallel work is *dispatched* on an execution space instance + + * Execution space instances are conceptually disjoint/independant from each other + - -## Host Associated Execution Space Instances - -Vocabulary and examples assuming C++11 Threads Support Library +## Host Execution Space Instances * A host-side *control* thread dispatches work to an instance - * `this_thread` is the control thread - * `main` is the initial control thread - * An execution space instance is a pool of threads + * A host execution space instance is an organized thread pool - * All instances are disjoint thread pools + * All instances are disjoint, i.e. hardware resources are not shared between instances * Exactly one control thread is associated with an instance and only that control thread may dispatch work to to that instance - * A control thread may be a member of an instance, - if so then it is also the control thread associated - with that instance + * The control thread is a member of the instance - * The pool of threads associated with an instances is not mutatable + * The pool of threads associated with an instances is not mutatable during that instance existance * The pool of threads associated with an instance may be masked @@ -37,130 +43,89 @@ Vocabulary and examples assuming C++11 Threads Support Library - Example: only one hyperthread per core of the instance - - When a mask is applied to an instance that mask - remains until cleared or another mask is applied - - - Masking is portable by defining it as using a fraction - of the available resources (threads) - - * Instances are shared (referenced counted) objects, - just like `Kokkos::View` - -``` -struct StdThread { - void mask( float fraction ); - void unmask() { mask( 1.0 ); } -}; -``` - - - -### Requesting an Execution Space Instance - - * `Space::request(` *who* `,` *what* `,` *control-opt* `)` - - * *who* is an identifier for subsquent queries regarding - who requested each instance - - * *what* is the number of threads and how they should be placed - - - Placement within locality-topology hierarchy; e.g., HWLOC - - - Compact within a level of hierarchy, or striped across that level; - e.g., socket or NUMA region - - - Granularity of request is core - - * *control-opt* optionally specifies whether the instance - has a new control thread - - - *control-opt* includes a control function / closure - - - The new control thread is a member of the instance - - - The control function is called by the new control thread - and is passed a `const` instance - - - The instance is **not** returned to the creating control thread - - * `std::thread` that is not a member of an instance is - *hard blocked* on a `std::mutex` - - - One global mutex or one mutex per thread? - - * `std::thread` that is a member of an instance is - *spinning* waiting for work, or are working - -``` -struct StdThread { - - struct Resource ; - - static StdThread request(); // default + - A mask can be applied during the policy creation of a parallel algorithm + + - Masking is portable by defining it as ceiling of fraction between [0.0, 1.0] + of the available resources - static StdThread request( const std::string & , const Resource & ); - - // If the instance can be reserved then - // allocate a copy of ControlClosure and invoke - // ControlClosure::operator()( const StdThread intance ) const - template< class ControlClosure > - static bool request( const std::string & , const Resource & - , const ControlClosure & ); -}; ``` - -### Relinquishing an Execution Space Instance - - * De-referencing the last reference-counted instance - relinquishes the pool of threads - - * If a control thread was created for the instance then - it is relinquished when that control thread returns - from the control function - - - Requires the reference count to be zero, an error if not - - * No *forced* relinquish - - - -## CUDA Associated Execution Space Instances - - * Only a signle CUDA architecture - - * An instance is a device + stream - - * A stream is exclusive to an instance - - * Only a host-side control thread can dispatch work to an instance - - * Finite number of streams per device - - * ISSUE: How to use CUDA `const` memory with multiple streams? - - * Masking can be mapped to restricting the number of CUDA blocks - to the fraction of available resources; e.g., maximum resident blocks - - -### Requesting an Execution Space Instance - - * `Space::request(` *who* `,` *what* `)` - - * *who* is an identifier for subsquent queries regarding - who requested each instance - - * *what* is which device, the stream is a requested/relinquished resource - +class ExecutionSpace { +public: + using execution_space = ExecutionSpace; + using memory_space = ...; + using device_type = Kokkos::Device; + using array_layout = ...; + using size_type = ...; + using scratch_memory_space = ...; + + + class Instance + { + int thread_pool_size( int depth = 0 ); + ... + }; + + class InstanceRequest + { + public: + using Control = std::function< void( Instance * )>; + + InstanceRequest( Control control + , unsigned thread_count + , unsigned use_numa_count = 0 + , unsigned use_cores_per_numa = 0 + ); + + }; + + static bool in_parallel(); + + static bool sleep(); + static bool wake(); + + static void fence(); + + static void print_configuration( std::ostream &, const bool detailed = false ); + + static void initialize( unsigned thread_count = 0 + , unsigned use_numa_count = 0 + , unsigned use_cores_per_numa = 0 + ); + + // Partition the current instance into the requested instances + // and run the given functions on the cooresponding instances + // will block until all the partitioned instances complete and + // the original instance will be restored + // + // Requires that the space has already been initialized + // Requires that the request can be statisfied by the current instance + // i.e. the sum of number of requested threads must be less than the + // max_hardware_threads + // + // Each control functor will accept a handle to its new default instance + // Each instance must be independant of all other instances + // i.e. no assumption on scheduling between instances + // The user is responible for checking the return code for errors + static int run_instances( std::vector< InstanceRequest> const& requests ); + + static void finalize(); + + static int is_initialized(); + + static int concurrency(); + + static int thread_pool_size( int depth = 0 ); + + static int thread_pool_rank(); + + static int max_hardware_threads(); + + static int hardware_thread_id(); + + }; ``` -struct Cuda { + - struct Resource ; - - static Cuda request(); - - static Cuda request( const std::string & , const Resource & ); -}; -``` diff --git a/lib/kokkos/example/md_skeleton/types.h b/lib/kokkos/example/md_skeleton/types.h index 7f92b7cd0f..c9689188a1 100644 --- a/lib/kokkos/example/md_skeleton/types.h +++ b/lib/kokkos/example/md_skeleton/types.h @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -50,7 +50,7 @@ typedef Kokkos::DefaultExecutionSpace execution_space ; -#if ! defined( KOKKOS_HAVE_CUDA ) +#if ! defined( KOKKOS_ENABLE_CUDA ) struct double2 { double x, y; KOKKOS_INLINE_FUNCTION diff --git a/lib/kokkos/example/tutorial/01_hello_world_lambda/hello_world_lambda.cpp b/lib/kokkos/example/tutorial/01_hello_world_lambda/hello_world_lambda.cpp index 326d064105..249d44ab55 100644 --- a/lib/kokkos/example/tutorial/01_hello_world_lambda/hello_world_lambda.cpp +++ b/lib/kokkos/example/tutorial/01_hello_world_lambda/hello_world_lambda.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -100,7 +100,7 @@ int main (int argc, char* argv[]) { // order. Parallel for loops may execute in any order. // We also need to protect the usage of a lambda against compiling // with a backend which doesn't support it (i.e. Cuda 6.5/7.0). -#if (KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) +#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) Kokkos::parallel_for (15, KOKKOS_LAMBDA (const int i) { // printf works in a CUDA parallel kernel; std::ostream does not. printf ("Hello from i = %i\n", i); diff --git a/lib/kokkos/example/tutorial/02_simple_reduce_lambda/simple_reduce_lambda.cpp b/lib/kokkos/example/tutorial/02_simple_reduce_lambda/simple_reduce_lambda.cpp index 70eea43240..f7f467ad2d 100644 --- a/lib/kokkos/example/tutorial/02_simple_reduce_lambda/simple_reduce_lambda.cpp +++ b/lib/kokkos/example/tutorial/02_simple_reduce_lambda/simple_reduce_lambda.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -69,7 +69,7 @@ int main (int argc, char* argv[]) { // It also handles any other syntax needed for CUDA. // We also need to protect the usage of a lambda against compiling // with a backend which doesn't support it (i.e. Cuda 6.5/7.0). - #if (KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) + #if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) Kokkos::parallel_reduce (n, KOKKOS_LAMBDA (const int i, int& lsum) { lsum += i*i; }, sum); @@ -85,7 +85,7 @@ int main (int argc, char* argv[]) { printf ("Sum of squares of integers from 0 to %i, " "computed sequentially, is %i\n", n - 1, seqSum); Kokkos::finalize (); -#if (KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) +#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) return (sum == seqSum) ? 0 : -1; #else return 0; diff --git a/lib/kokkos/example/tutorial/03_simple_view_lambda/simple_view_lambda.cpp b/lib/kokkos/example/tutorial/03_simple_view_lambda/simple_view_lambda.cpp index dd0641be54..3450ad1bb4 100644 --- a/lib/kokkos/example/tutorial/03_simple_view_lambda/simple_view_lambda.cpp +++ b/lib/kokkos/example/tutorial/03_simple_view_lambda/simple_view_lambda.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -99,7 +99,7 @@ int main (int argc, char* argv[]) { // ask for one. // We also need to protect the usage of a lambda against compiling // with a backend which doesn't support it (i.e. Cuda 6.5/7.0). - #if (KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) + #if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) Kokkos::parallel_for (10, KOKKOS_LAMBDA (const int i) { // Acesss the View just like a Fortran array. The layout depends // on the View's memory space, so don't rely on the View's diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams_lambda/thread_teams_lambda.cpp b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams_lambda/thread_teams_lambda.cpp index 216db7f125..9ea5e8b707 100644 --- a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams_lambda/thread_teams_lambda.cpp +++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams_lambda/thread_teams_lambda.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -79,7 +79,7 @@ int main (int narg, char* args[]) { int sum = 0; // We also need to protect the usage of a lambda against compiling // with a backend which doesn't support it (i.e. Cuda 6.5/7.0). - #if (KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) + #if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) parallel_reduce (policy, KOKKOS_LAMBDA (const team_member& thread, int& lsum) { lsum += 1; // TeamPolicy<>::member_type provides functions to query the diff --git a/lib/kokkos/generate_makefile.bash b/lib/kokkos/generate_makefile.bash index e7bd9da36b..e671293ff1 100755 --- a/lib/kokkos/generate_makefile.bash +++ b/lib/kokkos/generate_makefile.bash @@ -5,153 +5,166 @@ MAKE_J_OPTION="32" while [[ $# > 0 ]] do -key="$1" + key="$1" -case $key in + case $key in --kokkos-path*) - KOKKOS_PATH="${key#*=}" - ;; + KOKKOS_PATH="${key#*=}" + ;; + --qthreads-path*) + QTHREADS_PATH="${key#*=}" + ;; --prefix*) - PREFIX="${key#*=}" - ;; + PREFIX="${key#*=}" + ;; --with-cuda) - KOKKOS_DEVICES="${KOKKOS_DEVICES},Cuda" - CUDA_PATH_NVCC=`which nvcc` - CUDA_PATH=${CUDA_PATH_NVCC%/bin/nvcc} - ;; + KOKKOS_DEVICES="${KOKKOS_DEVICES},Cuda" + CUDA_PATH_NVCC=`which nvcc` + CUDA_PATH=${CUDA_PATH_NVCC%/bin/nvcc} + ;; # Catch this before '--with-cuda*' --with-cuda-options*) - KOKKOS_CUDA_OPT="${key#*=}" - ;; + KOKKOS_CUDA_OPT="${key#*=}" + ;; --with-cuda*) - KOKKOS_DEVICES="${KOKKOS_DEVICES},Cuda" - CUDA_PATH="${key#*=}" - ;; + KOKKOS_DEVICES="${KOKKOS_DEVICES},Cuda" + CUDA_PATH="${key#*=}" + ;; --with-openmp) - KOKKOS_DEVICES="${KOKKOS_DEVICES},OpenMP" - ;; + KOKKOS_DEVICES="${KOKKOS_DEVICES},OpenMP" + ;; --with-pthread) - KOKKOS_DEVICES="${KOKKOS_DEVICES},Pthread" - ;; + KOKKOS_DEVICES="${KOKKOS_DEVICES},Pthread" + ;; --with-serial) - KOKKOS_DEVICES="${KOKKOS_DEVICES},Serial" - ;; - --with-qthread*) - KOKKOS_DEVICES="${KOKKOS_DEVICES},Qthread" - QTHREAD_PATH="${key#*=}" - ;; + KOKKOS_DEVICES="${KOKKOS_DEVICES},Serial" + ;; + --with-qthreads*) + KOKKOS_DEVICES="${KOKKOS_DEVICES},Qthreads" + if [ -z "$QTHREADS_PATH" ]; then + QTHREADS_PATH="${key#*=}" + fi + ;; --with-devices*) - DEVICES="${key#*=}" - KOKKOS_DEVICES="${KOKKOS_DEVICES},${DEVICES}" - ;; + DEVICES="${key#*=}" + KOKKOS_DEVICES="${KOKKOS_DEVICES},${DEVICES}" + ;; --with-gtest*) - GTEST_PATH="${key#*=}" - ;; + GTEST_PATH="${key#*=}" + ;; --with-hwloc*) - HWLOC_PATH="${key#*=}" - ;; + HWLOC_PATH="${key#*=}" + ;; --arch*) - KOKKOS_ARCH="${key#*=}" - ;; + KOKKOS_ARCH="${key#*=}" + ;; --cxxflags*) - CXXFLAGS="${key#*=}" - ;; + CXXFLAGS="${key#*=}" + ;; --ldflags*) - LDFLAGS="${key#*=}" - ;; + LDFLAGS="${key#*=}" + ;; --debug|-dbg) - KOKKOS_DEBUG=yes - ;; + KOKKOS_DEBUG=yes + ;; --make-j*) - MAKE_J_OPTION="${key#*=}" - ;; + MAKE_J_OPTION="${key#*=}" + ;; --compiler*) - COMPILER="${key#*=}" - CNUM=`which ${COMPILER} 2>&1 >/dev/null | grep "no ${COMPILER}" | wc -l` - if [ ${CNUM} -gt 0 ]; then - echo "Invalid compiler by --compiler command: '${COMPILER}'" - exit - fi - if [[ ! -n ${COMPILER} ]]; then - echo "Empty compiler specified by --compiler command." - exit - fi - CNUM=`which ${COMPILER} | grep ${COMPILER} | wc -l` - if [ ${CNUM} -eq 0 ]; then - echo "Invalid compiler by --compiler command: '${COMPILER}'" - exit - fi - ;; - --with-options*) - KOKKOS_OPT="${key#*=}" - ;; + COMPILER="${key#*=}" + CNUM=`which ${COMPILER} 2>&1 >/dev/null | grep "no ${COMPILER}" | wc -l` + if [ ${CNUM} -gt 0 ]; then + echo "Invalid compiler by --compiler command: '${COMPILER}'" + exit + fi + if [[ ! -n ${COMPILER} ]]; then + echo "Empty compiler specified by --compiler command." + exit + fi + CNUM=`which ${COMPILER} | grep ${COMPILER} | wc -l` + if [ ${CNUM} -eq 0 ]; then + echo "Invalid compiler by --compiler command: '${COMPILER}'" + exit + fi + ;; + --with-options*) + KOKKOS_OPT="${key#*=}" + ;; --help) - echo "Kokkos configure options:" - echo "--kokkos-path=/Path/To/Kokkos: Path to the Kokkos root directory" - echo "--prefix=/Install/Path: Path to where the Kokkos library should be installed" - echo "" - echo "--with-cuda[=/Path/To/Cuda]: enable Cuda and set path to Cuda Toolkit" - echo "--with-openmp: enable OpenMP backend" - echo "--with-pthread: enable Pthreads backend" - echo "--with-serial: enable Serial backend" - echo "--with-qthread=/Path/To/Qthread: enable Qthread backend" - echo "--with-devices: explicitly add a set of backends" - echo "" - echo "--arch=[OPTIONS]: set target architectures. Options are:" - echo " ARMv80 = ARMv8.0 Compatible CPU" - echo " ARMv81 = ARMv8.1 Compatible CPU" - echo " ARMv8-ThunderX = ARMv8 Cavium ThunderX CPU" - echo " SNB = Intel Sandy/Ivy Bridge CPUs" - echo " HSW = Intel Haswell CPUs" - echo " BDW = Intel Broadwell Xeon E-class CPUs" - echo " SKX = Intel Sky Lake Xeon E-class HPC CPUs (AVX512)" - echo " KNC = Intel Knights Corner Xeon Phi" - echo " KNL = Intel Knights Landing Xeon Phi" - echo " Kepler30 = NVIDIA Kepler generation CC 3.0" - echo " Kepler35 = NVIDIA Kepler generation CC 3.5" - echo " Kepler37 = NVIDIA Kepler generation CC 3.7" - echo " Pascal60 = NVIDIA Pascal generation CC 6.0" - echo " Pascal61 = NVIDIA Pascal generation CC 6.1" - echo " Maxwell50 = NVIDIA Maxwell generation CC 5.0" - echo " Power8 = IBM POWER8 CPUs" - echo " Power9 = IBM POWER9 CPUs" - echo "" - echo "--compiler=/Path/To/Compiler set the compiler" - echo "--debug,-dbg: enable Debugging" - echo "--cxxflags=[FLAGS] overwrite CXXFLAGS for library build and test build" - echo " This will still set certain required flags via" - echo " KOKKOS_CXXFLAGS (such as -fopenmp, --std=c++11, etc.)" - echo "--ldflags=[FLAGS] overwrite LDFLAGS for library build and test build" - echo " This will still set certain required flags via" - echo " KOKKOS_LDFLAGS (such as -fopenmp, -lpthread, etc.)" - echo "--with-gtest=/Path/To/Gtest: set path to gtest (used in unit and performance tests" - echo "--with-hwloc=/Path/To/Hwloc: set path to hwloc" - echo "--with-options=[OPTIONS]: additional options to Kokkos:" - echo " aggressive_vectorization = add ivdep on loops" - echo "--with-cuda-options=[OPT]: additional options to CUDA:" - echo " force_uvm, use_ldg, enable_lambda, rdc" - echo "--make-j=[NUM]: set -j flag used during build." - exit 0 - ;; + echo "Kokkos configure options:" + echo "--kokkos-path=/Path/To/Kokkos: Path to the Kokkos root directory." + echo "--qthreads-path=/Path/To/Qthreads: Path to Qthreads install directory." + echo " Overrides path given by --with-qthreads." + echo "--prefix=/Install/Path: Path to install the Kokkos library." + echo "" + echo "--with-cuda[=/Path/To/Cuda]: Enable Cuda and set path to Cuda Toolkit." + echo "--with-openmp: Enable OpenMP backend." + echo "--with-pthread: Enable Pthreads backend." + echo "--with-serial: Enable Serial backend." + echo "--with-qthreads[=/Path/To/Qthreads]: Enable Qthreads backend." + echo "--with-devices: Explicitly add a set of backends." + echo "" + echo "--arch=[OPT]: Set target architectures. Options are:" + echo " ARMv80 = ARMv8.0 Compatible CPU" + echo " ARMv81 = ARMv8.1 Compatible CPU" + echo " ARMv8-ThunderX = ARMv8 Cavium ThunderX CPU" + echo " SNB = Intel Sandy/Ivy Bridge CPUs" + echo " HSW = Intel Haswell CPUs" + echo " BDW = Intel Broadwell Xeon E-class CPUs" + echo " SKX = Intel Sky Lake Xeon E-class HPC CPUs (AVX512)" + echo " KNC = Intel Knights Corner Xeon Phi" + echo " KNL = Intel Knights Landing Xeon Phi" + echo " Kepler30 = NVIDIA Kepler generation CC 3.0" + echo " Kepler35 = NVIDIA Kepler generation CC 3.5" + echo " Kepler37 = NVIDIA Kepler generation CC 3.7" + echo " Pascal60 = NVIDIA Pascal generation CC 6.0" + echo " Pascal61 = NVIDIA Pascal generation CC 6.1" + echo " Maxwell50 = NVIDIA Maxwell generation CC 5.0" + echo " Power8 = IBM POWER8 CPUs" + echo " Power9 = IBM POWER9 CPUs" + echo "" + echo "--compiler=/Path/To/Compiler Set the compiler." + echo "--debug,-dbg: Enable Debugging." + echo "--cxxflags=[FLAGS] Overwrite CXXFLAGS for library build and test" + echo " build. This will still set certain required" + echo " flags via KOKKOS_CXXFLAGS (such as -fopenmp," + echo " --std=c++11, etc.)." + echo "--ldflags=[FLAGS] Overwrite LDFLAGS for library build and test" + echo " build. This will still set certain required" + echo " flags via KOKKOS_LDFLAGS (such as -fopenmp," + echo " -lpthread, etc.)." + echo "--with-gtest=/Path/To/Gtest: Set path to gtest. (Used in unit and performance" + echo " tests.)" + echo "--with-hwloc=/Path/To/Hwloc: Set path to hwloc." + echo "--with-options=[OPT]: Additional options to Kokkos:" + echo " aggressive_vectorization = add ivdep on loops" + echo "--with-cuda-options=[OPT]: Additional options to CUDA:" + echo " force_uvm, use_ldg, enable_lambda, rdc" + echo "--make-j=[NUM]: Set -j flag used during build." + exit 0 + ;; *) - echo "warning: ignoring unknown option $key" - ;; -esac -shift + echo "warning: ignoring unknown option $key" + ;; + esac + + shift done -# If KOKKOS_PATH undefined, assume parent dir of this -# script is the KOKKOS_PATH +# Remove leading ',' from KOKKOS_DEVICES. +KOKKOS_DEVICES=$(echo $KOKKOS_DEVICES | sed 's/^,//') + +# If KOKKOS_PATH undefined, assume parent dir of this script is the KOKKOS_PATH. if [ -z "$KOKKOS_PATH" ]; then - KOKKOS_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) + KOKKOS_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) else - # Ensure KOKKOS_PATH is abs path - KOKKOS_PATH=$( cd $KOKKOS_PATH && pwd ) + # Ensure KOKKOS_PATH is abs path + KOKKOS_PATH=$( cd $KOKKOS_PATH && pwd ) fi if [ "${KOKKOS_PATH}" = "${PWD}" ] || [ "${KOKKOS_PATH}" = "${PWD}/" ]; then -echo "Running generate_makefile.sh in the Kokkos root directory is not allowed" -exit + echo "Running generate_makefile.sh in the Kokkos root directory is not allowed" + exit fi KOKKOS_SRC_PATH=${KOKKOS_PATH} @@ -160,52 +173,63 @@ KOKKOS_SETTINGS="KOKKOS_SRC_PATH=${KOKKOS_SRC_PATH}" #KOKKOS_SETTINGS="KOKKOS_PATH=${KOKKOS_PATH}" if [ ${#COMPILER} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} CXX=${COMPILER}" + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} CXX=${COMPILER}" fi + if [ ${#KOKKOS_DEVICES} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_DEVICES=${KOKKOS_DEVICES}" + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_DEVICES=${KOKKOS_DEVICES}" fi + if [ ${#KOKKOS_ARCH} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_ARCH=${KOKKOS_ARCH}" + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_ARCH=${KOKKOS_ARCH}" fi + if [ ${#KOKKOS_DEBUG} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_DEBUG=${KOKKOS_DEBUG}" + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_DEBUG=${KOKKOS_DEBUG}" fi + if [ ${#CUDA_PATH} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} CUDA_PATH=${CUDA_PATH}" + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} CUDA_PATH=${CUDA_PATH}" fi + if [ ${#CXXFLAGS} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} CXXFLAGS=\"${CXXFLAGS}\"" + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} CXXFLAGS=\"${CXXFLAGS}\"" fi + if [ ${#LDFLAGS} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} LDFLAGS=\"${LDFLAGS}\"" + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} LDFLAGS=\"${LDFLAGS}\"" fi + if [ ${#GTEST_PATH} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} GTEST_PATH=${GTEST_PATH}" + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} GTEST_PATH=${GTEST_PATH}" else -GTEST_PATH=${KOKKOS_PATH}/tpls/gtest -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} GTEST_PATH=${GTEST_PATH}" + GTEST_PATH=${KOKKOS_PATH}/tpls/gtest + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} GTEST_PATH=${GTEST_PATH}" fi + if [ ${#HWLOC_PATH} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} HWLOC_PATH=${HWLOC_PATH} KOKKOS_USE_TPLS=hwloc" + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} HWLOC_PATH=${HWLOC_PATH} KOKKOS_USE_TPLS=hwloc" fi -if [ ${#QTHREAD_PATH} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} QTHREAD_PATH=${QTHREAD_PATH}" + +if [ ${#QTHREADS_PATH} -gt 0 ]; then + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} QTHREADS_PATH=${QTHREADS_PATH}" fi + if [ ${#KOKKOS_OPT} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_OPTIONS=${KOKKOS_OPT}" + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_OPTIONS=${KOKKOS_OPT}" fi + if [ ${#KOKKOS_CUDA_OPT} -gt 0 ]; then -KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_CUDA_OPTIONS=${KOKKOS_CUDA_OPT}" + KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_CUDA_OPTIONS=${KOKKOS_CUDA_OPT}" fi KOKKOS_SETTINGS_NO_KOKKOS_PATH="${KOKKOS_SETTINGS}" KOKKOS_TEST_INSTALL_PATH="${PWD}/install" if [ ${#PREFIX} -gt 0 ]; then -KOKKOS_INSTALL_PATH="${PREFIX}" + KOKKOS_INSTALL_PATH="${PREFIX}" else -KOKKOS_INSTALL_PATH=${KOKKOS_TEST_INSTALL_PATH} + KOKKOS_INSTALL_PATH=${KOKKOS_TEST_INSTALL_PATH} fi @@ -229,7 +253,7 @@ mkdir example/fenl mkdir example/tutorial if [ ${#KOKKOS_ENABLE_EXAMPLE_ICHOL} -gt 0 ]; then -mkdir example/ichol + mkdir example/ichol fi KOKKOS_SETTINGS="${KOKKOS_SETTINGS_NO_KOKKOS_PATH} KOKKOS_PATH=${KOKKOS_PATH}" -- GitLab From d73d70fa1fdd46bcd30e67b5df1fd2a8c161255f Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 26 Apr 2017 08:15:42 -0600 Subject: [PATCH 054/593] Adding ubuf union to Kokkos atom_vec styles --- src/KOKKOS/atom_vec_angle_kokkos.cpp | 122 +++++++-------- src/KOKKOS/atom_vec_atomic_kokkos.cpp | 34 ++-- src/KOKKOS/atom_vec_bond_kokkos.cpp | 72 ++++----- src/KOKKOS/atom_vec_charge_kokkos.cpp | 36 ++--- src/KOKKOS/atom_vec_full_kokkos.cpp | 190 +++++++++-------------- src/KOKKOS/atom_vec_kokkos.h | 11 ++ src/KOKKOS/atom_vec_molecular_kokkos.cpp | 146 ++++++++--------- 7 files changed, 288 insertions(+), 323 deletions(-) diff --git a/src/KOKKOS/atom_vec_angle_kokkos.cpp b/src/KOKKOS/atom_vec_angle_kokkos.cpp index 48fc3a352c..34b868aadc 100644 --- a/src/KOKKOS/atom_vec_angle_kokkos.cpp +++ b/src/KOKKOS/atom_vec_angle_kokkos.cpp @@ -80,22 +80,22 @@ void AtomVecAngleKokkos::grow(int n) memory->grow_kokkos(atomKK->k_molecule,atomKK->molecule,nmax,"atom:molecule"); memory->grow_kokkos(atomKK->k_nspecial,atomKK->nspecial,nmax,3,"atom:nspecial"); memory->grow_kokkos(atomKK->k_special,atomKK->special,nmax,atomKK->maxspecial, - "atom:special"); + "atom:special"); memory->grow_kokkos(atomKK->k_num_bond,atomKK->num_bond,nmax,"atom:num_bond"); memory->grow_kokkos(atomKK->k_bond_type,atomKK->bond_type,nmax,atomKK->bond_per_atom, - "atom:bond_type"); + "atom:bond_type"); memory->grow_kokkos(atomKK->k_bond_atom,atomKK->bond_atom,nmax,atomKK->bond_per_atom, - "atom:bond_atom"); + "atom:bond_atom"); memory->grow_kokkos(atomKK->k_num_angle,atomKK->num_angle,nmax,"atom:num_angle"); memory->grow_kokkos(atomKK->k_angle_type,atomKK->angle_type,nmax,atomKK->angle_per_atom, - "atom:angle_type"); + "atom:angle_type"); memory->grow_kokkos(atomKK->k_angle_atom1,atomKK->angle_atom1,nmax,atomKK->angle_per_atom, - "atom:angle_atom1"); + "atom:angle_atom1"); memory->grow_kokkos(atomKK->k_angle_atom2,atomKK->angle_atom2,nmax,atomKK->angle_per_atom, - "atom:angle_atom2"); + "atom:angle_atom2"); memory->grow_kokkos(atomKK->k_angle_atom3,atomKK->angle_atom3,nmax,atomKK->angle_per_atom, - "atom:angle_atom3"); + "atom:angle_atom3"); grow_reset(); sync(Host,ALL_MASK); @@ -241,7 +241,7 @@ struct AtomVecAngleKokkos_PackComm { _xprd(xprd),_yprd(yprd),_zprd(zprd), _xy(xy),_xz(xz),_yz(yz) { const size_t maxsend = (buf.view().dimension_0() - *buf.view().dimension_1())/3; + *buf.view().dimension_1())/3; const size_t elements = 3; buffer_view(_buf,buf,maxsend,elements); _pbc[0] = pbc[0]; _pbc[1] = pbc[1]; _pbc[2] = pbc[2]; @@ -272,11 +272,11 @@ struct AtomVecAngleKokkos_PackComm { /* ---------------------------------------------------------------------- */ int AtomVecAngleKokkos::pack_comm_kokkos(const int &n, - const DAT::tdual_int_2d &list, - const int & iswap, - const DAT::tdual_xfloat_2d &buf, - const int &pbc_flag, - const int* const pbc) + const DAT::tdual_int_2d &list, + const int & iswap, + const DAT::tdual_xfloat_2d &buf, + const int &pbc_flag, + const int* const pbc) { // Check whether to always run forward communication on the host // Choose correct forward PackComm kernel @@ -339,7 +339,7 @@ int AtomVecAngleKokkos::pack_comm_kokkos(const int &n, LMPDeviceType::fence(); } - return n*size_forward; + return n*size_forward; } /* ---------------------------------------------------------------------- */ @@ -714,18 +714,18 @@ struct AtomVecAngleKokkos_PackBorder { _buf(i,0) = _x(j,0); _buf(i,1) = _x(j,1); _buf(i,2) = _x(j,2); - _buf(i,3) = _tag(j); - _buf(i,4) = _type(j); - _buf(i,5) = _mask(j); - _buf(i,6) = _molecule(j); + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; + _buf(i,6) = d_ubuf(_molecule(j)).d; } else { _buf(i,0) = _x(j,0) + _dx; _buf(i,1) = _x(j,1) + _dy; _buf(i,2) = _x(j,2) + _dz; - _buf(i,3) = _tag(j); - _buf(i,4) = _type(j); - _buf(i,5) = _mask(j); - _buf(i,6) = _molecule(j); + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; + _buf(i,6) = d_ubuf(_molecule(j)).d; } } }; @@ -957,10 +957,10 @@ struct AtomVecAngleKokkos_UnpackBorder { _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); - _type(i+_first) = static_cast (_buf(i,4)); - _mask(i+_first) = static_cast (_buf(i,5)); - _molecule(i+_first) = static_cast (_buf(i,6)); + _tag(i+_first) = (tagint) d_ubuf(_buf(i,3)).i; + _type(i+_first) = (int) d_ubuf(_buf(i,4)).i; + _mask(i+_first) = (int) d_ubuf(_buf(i,5)).i; + _molecule(i+_first) = (tagint) d_ubuf(_buf(i,6)).i; } }; @@ -1165,28 +1165,28 @@ struct AtomVecAngleKokkos_PackExchangeFunctor { _buf(mysend,m++) = _v(i,0); _buf(mysend,m++) = _v(i,1); _buf(mysend,m++) = _v(i,2); - _buf(mysend,m++) = _tag(i); - _buf(mysend,m++) = _type(i); - _buf(mysend,m++) = _mask(i); - _buf(mysend,m++) = _image(i); - _buf(mysend,m++) = _molecule(i); - _buf(mysend,m++) = _num_bond(i); + _buf(mysend,m++) = d_ubuf(_tag(i)).d; + _buf(mysend,m++) = d_ubuf(_type(i)).d; + _buf(mysend,m++) = d_ubuf(_mask(i)).d; + _buf(mysend,m++) = d_ubuf(_image(i)).d; + _buf(mysend,m++) = d_ubuf(_molecule(i)).d; + _buf(mysend,m++) = d_ubuf(_num_bond(i)).d; for (k = 0; k < _num_bond(i); k++) { - _buf(mysend,m++) = _bond_type(i,k); - _buf(mysend,m++) = _bond_atom(i,k); + _buf(mysend,m++) = d_ubuf(_bond_type(i,k)).d; + _buf(mysend,m++) = d_ubuf(_bond_atom(i,k)).d; } - _buf(mysend,m++) = _num_angle(i); + _buf(mysend,m++) = d_ubuf(_num_angle(i)).d; for (k = 0; k < _num_angle(i); k++) { - _buf(mysend,m++) = _angle_type(i,k); - _buf(mysend,m++) = _angle_atom1(i,k); - _buf(mysend,m++) = _angle_atom2(i,k); - _buf(mysend,m++) = _angle_atom3(i,k); + _buf(mysend,m++) = d_ubuf(_angle_type(i,k)).d; + _buf(mysend,m++) = d_ubuf(_angle_atom1(i,k)).d; + _buf(mysend,m++) = d_ubuf(_angle_atom2(i,k)).d; + _buf(mysend,m++) = d_ubuf(_angle_atom3(i,k)).d; } - _buf(mysend,m++) = _nspecial(i,0); - _buf(mysend,m++) = _nspecial(i,1); - _buf(mysend,m++) = _nspecial(i,2); + _buf(mysend,m++) = d_ubuf(_nspecial(i,0)).d; + _buf(mysend,m++) = d_ubuf(_nspecial(i,1)).d; + _buf(mysend,m++) = d_ubuf(_nspecial(i,2)).d; for (k = 0; k < _nspecial(i,2); k++) - _buf(mysend,m++) = _special(i,k); + _buf(mysend,m++) = d_ubuf(_special(i,k)).d; const int j = _copylist(mysend); @@ -1350,7 +1350,7 @@ struct AtomVecAngleKokkos_UnpackExchangeFunctor { _lo(lo),_hi(hi){ elements =17+atom->maxspecial+2*atom->bond_per_atom+4*atom->angle_per_atom; const int maxsendlist = (buf.template view().dimension_0()* - buf.template view().dimension_1())/elements; + buf.template view().dimension_1())/elements; buffer_view(_buf,buf,maxsendlist,elements); } @@ -1366,30 +1366,30 @@ struct AtomVecAngleKokkos_UnpackExchangeFunctor { _v(i,0) = _buf(myrecv,m++); _v(i,1) = _buf(myrecv,m++); _v(i,2) = _buf(myrecv,m++); - _tag(i) = _buf(myrecv,m++); - _type(i) = _buf(myrecv,m++); - _mask(i) = _buf(myrecv,m++); - _image(i) = _buf(myrecv,m++); + _tag(i) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _type(i) = (int) d_ubuf(_buf(myrecv,m++)).i; + _mask(i) = (int) d_ubuf(_buf(myrecv,m++)).i; + _image(i) = (imageint) d_ubuf(_buf(myrecv,m++)).i; - _molecule(i) = _buf(myrecv,m++); - _num_bond(i) = _buf(myrecv,m++); + _molecule(i) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _num_bond(i) = (int) d_ubuf(_buf(myrecv,m++)).i; int k; for (k = 0; k < _num_bond(i); k++) { - _bond_type(i,k) = _buf(myrecv,m++); - _bond_atom(i,k) = _buf(myrecv,m++); + _bond_type(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _bond_atom(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } - _num_angle(i) = _buf(myrecv,m++); + _num_angle(i) = (int) d_ubuf(_buf(myrecv,m++)).i; for (k = 0; k < _num_angle(i); k++) { - _angle_type(i,k) = _buf(myrecv,m++); - _angle_atom1(i,k) = _buf(myrecv,m++); - _angle_atom2(i,k) = _buf(myrecv,m++); - _angle_atom3(i,k) = _buf(myrecv,m++); + _angle_type(i,k) = (int) d_ubuf(_buf(myrecv,m++)).i; + _angle_atom1(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _angle_atom2(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _angle_atom3(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } - _nspecial(i,0) = _buf(myrecv,m++); - _nspecial(i,1) = _buf(myrecv,m++); - _nspecial(i,2) = _buf(myrecv,m++); + _nspecial(i,0) = (int) d_ubuf(_buf(myrecv,m++)).i; + _nspecial(i,1) = (int) d_ubuf(_buf(myrecv,m++)).i; + _nspecial(i,2) = (int) d_ubuf(_buf(myrecv,m++)).i; for (k = 0; k < _nspecial(i,2); k++) - _special(i,k) = _buf(myrecv,m++); + _special(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } } }; diff --git a/src/KOKKOS/atom_vec_atomic_kokkos.cpp b/src/KOKKOS/atom_vec_atomic_kokkos.cpp index dc254e6a7e..d040bd3553 100644 --- a/src/KOKKOS/atom_vec_atomic_kokkos.cpp +++ b/src/KOKKOS/atom_vec_atomic_kokkos.cpp @@ -619,16 +619,16 @@ struct AtomVecAtomicKokkos_PackBorder { _buf(i,0) = _x(j,0); _buf(i,1) = _x(j,1); _buf(i,2) = _x(j,2); - _buf(i,3) = _tag(j); - _buf(i,4) = _type(j); - _buf(i,5) = _mask(j); + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; } else { _buf(i,0) = _x(j,0) + _dx; _buf(i,1) = _x(j,1) + _dy; _buf(i,2) = _x(j,2) + _dz; - _buf(i,3) = _tag(j); - _buf(i,4) = _type(j); - _buf(i,5) = _mask(j); + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; } } }; @@ -836,9 +836,9 @@ struct AtomVecAtomicKokkos_UnpackBorder { _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); - _type(i+_first) = static_cast (_buf(i,4)); - _mask(i+_first) = static_cast (_buf(i,5)); + _tag(i+_first) = (tagint) d_ubuf(_buf(i,3)).i; + _type(i+_first) = (int) d_ubuf(_buf(i,4)).i; + _mask(i+_first) = (int) d_ubuf(_buf(i,5)).i; // printf("%i %i %lf %lf %lf %i BORDER\n",_tag(i+_first),i+_first,_x(i+_first,0),_x(i+_first,1),_x(i+_first,2),_type(i+_first)); } }; @@ -977,10 +977,10 @@ struct AtomVecAtomicKokkos_PackExchangeFunctor { _buf(mysend,4) = _v(i,0); _buf(mysend,5) = _v(i,1); _buf(mysend,6) = _v(i,2); - _buf(mysend,7) = _tag[i]; - _buf(mysend,8) = _type[i]; - _buf(mysend,9) = _mask[i]; - _buf(mysend,10) = _image[i]; + _buf(mysend,7) = d_ubuf(_tag[i]).d; + _buf(mysend,8) = d_ubuf(_type[i]).d; + _buf(mysend,9) = d_ubuf(_mask[i]).d; + _buf(mysend,10) = d_ubuf(_image[i]).d; const int j = _copylist(mysend); if(j>-1) { @@ -1091,10 +1091,10 @@ struct AtomVecAtomicKokkos_UnpackExchangeFunctor { _v(i,0) = _buf(myrecv,4); _v(i,1) = _buf(myrecv,5); _v(i,2) = _buf(myrecv,6); - _tag[i] = _buf(myrecv,7); - _type[i] = _buf(myrecv,8); - _mask[i] = _buf(myrecv,9); - _image[i] = _buf(myrecv,10); + _tag[i] = (tagint) d_ubuf(_buf(myrecv,7)).i; + _type[i] = (int) d_ubuf(_buf(myrecv,8)).i; + _mask[i] = (int) d_ubuf(_buf(myrecv,9)).i; + _image[i] = (imageint) d_ubuf(_buf(myrecv,10)).i; } } }; diff --git a/src/KOKKOS/atom_vec_bond_kokkos.cpp b/src/KOKKOS/atom_vec_bond_kokkos.cpp index f10decac28..c46c49cb29 100644 --- a/src/KOKKOS/atom_vec_bond_kokkos.cpp +++ b/src/KOKKOS/atom_vec_bond_kokkos.cpp @@ -662,18 +662,18 @@ struct AtomVecBondKokkos_PackBorder { _buf(i,0) = _x(j,0); _buf(i,1) = _x(j,1); _buf(i,2) = _x(j,2); - _buf(i,3) = _tag(j); - _buf(i,4) = _type(j); - _buf(i,5) = _mask(j); - _buf(i,6) = _molecule(j); + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; + _buf(i,6) = d_ubuf(_molecule(j)).d; } else { _buf(i,0) = _x(j,0) + _dx; _buf(i,1) = _x(j,1) + _dy; _buf(i,2) = _x(j,2) + _dz; - _buf(i,3) = _tag(j); - _buf(i,4) = _type(j); - _buf(i,5) = _mask(j); - _buf(i,6) = _molecule(j); + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; + _buf(i,6) = d_ubuf(_molecule(j)).d; } } }; @@ -905,10 +905,10 @@ struct AtomVecBondKokkos_UnpackBorder { _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); - _type(i+_first) = static_cast (_buf(i,4)); - _mask(i+_first) = static_cast (_buf(i,5)); - _molecule(i+_first) = static_cast (_buf(i,6)); + _tag(i+_first) = (tagint) d_ubuf(_buf(i,3)).i; + _type(i+_first) = (int) d_ubuf(_buf(i,4)).i; + _mask(i+_first) = (int) d_ubuf(_buf(i,5)).i; + _molecule(i+_first) = (tagint) d_ubuf(_buf(i,6)).i; } }; @@ -1095,21 +1095,21 @@ struct AtomVecBondKokkos_PackExchangeFunctor { _buf(mysend,m++) = _v(i,0); _buf(mysend,m++) = _v(i,1); _buf(mysend,m++) = _v(i,2); - _buf(mysend,m++) = _tag(i); - _buf(mysend,m++) = _type(i); - _buf(mysend,m++) = _mask(i); - _buf(mysend,m++) = _image(i); - _buf(mysend,m++) = _molecule(i); - _buf(mysend,m++) = _num_bond(i); + _buf(mysend,m++) = d_ubuf(_tag(i)).d; + _buf(mysend,m++) = d_ubuf(_type(i)).d; + _buf(mysend,m++) = d_ubuf(_mask(i)).d; + _buf(mysend,m++) = d_ubuf(_image(i)).d; + _buf(mysend,m++) = d_ubuf(_molecule(i)).d; + _buf(mysend,m++) = d_ubuf(_num_bond(i)).d; for (k = 0; k < _num_bond(i); k++) { - _buf(mysend,m++) = _bond_type(i,k); - _buf(mysend,m++) = _bond_atom(i,k); + _buf(mysend,m++) = d_ubuf(_bond_type(i,k)).d; + _buf(mysend,m++) = d_ubuf(_bond_atom(i,k)).d; } - _buf(mysend,m++) = _nspecial(i,0); - _buf(mysend,m++) = _nspecial(i,1); - _buf(mysend,m++) = _nspecial(i,2); + _buf(mysend,m++) = d_ubuf(_nspecial(i,0)).d; + _buf(mysend,m++) = d_ubuf(_nspecial(i,1)).d; + _buf(mysend,m++) = d_ubuf(_nspecial(i,2)).d; for (k = 0; k < _nspecial(i,2); k++) - _buf(mysend,m++) = _special(i,k); + _buf(mysend,m++) = d_ubuf(_special(i,k)).d; const int j = _copylist(mysend); @@ -1267,23 +1267,23 @@ struct AtomVecBondKokkos_UnpackExchangeFunctor { _v(i,0) = _buf(myrecv,m++); _v(i,1) = _buf(myrecv,m++); _v(i,2) = _buf(myrecv,m++); - _tag(i) = _buf(myrecv,m++); - _type(i) = _buf(myrecv,m++); - _mask(i) = _buf(myrecv,m++); - _image(i) = _buf(myrecv,m++); + _tag(i) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _type(i) = (int) d_ubuf(_buf(myrecv,m++)).i; + _mask(i) = (int) d_ubuf(_buf(myrecv,m++)).i; + _image(i) = (imageint) d_ubuf(_buf(myrecv,m++)).i; - _molecule(i) = _buf(myrecv,m++); - _num_bond(i) = _buf(myrecv,m++); + _molecule(i) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _num_bond(i) = (int) d_ubuf(_buf(myrecv,m++)).i; int k; for (k = 0; k < _num_bond(i); k++) { - _bond_type(i,k) = _buf(myrecv,m++); - _bond_atom(i,k) = _buf(myrecv,m++); + _bond_type(i,k) = (int) d_ubuf(_buf(myrecv,m++)).i; + _bond_atom(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } - _nspecial(i,0) = _buf(myrecv,m++); - _nspecial(i,1) = _buf(myrecv,m++); - _nspecial(i,2) = _buf(myrecv,m++); + _nspecial(i,0) = (int) d_ubuf(_buf(myrecv,m++)).i; + _nspecial(i,1) = (int) d_ubuf(_buf(myrecv,m++)).i; + _nspecial(i,2) = (int) d_ubuf(_buf(myrecv,m++)).i; for (k = 0; k < _nspecial(i,2); k++) - _special(i,k) = _buf(myrecv,m++); + _special(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } } }; diff --git a/src/KOKKOS/atom_vec_charge_kokkos.cpp b/src/KOKKOS/atom_vec_charge_kokkos.cpp index f6952f127c..856660d1e9 100644 --- a/src/KOKKOS/atom_vec_charge_kokkos.cpp +++ b/src/KOKKOS/atom_vec_charge_kokkos.cpp @@ -323,7 +323,7 @@ struct AtomVecChargeKokkos_PackCommSelf { /* ---------------------------------------------------------------------- */ int AtomVecChargeKokkos::pack_comm_self(const int &n, const DAT::tdual_int_2d &list, const int & iswap, - const int nfirst, const int &pbc_flag, const int* const pbc) { + const int nfirst, const int &pbc_flag, const int* const pbc) { if(commKK->forward_comm_on_host) { sync(Host,X_MASK); modified(Host,X_MASK); @@ -631,17 +631,17 @@ struct AtomVecChargeKokkos_PackBorder { _buf(i,0) = _x(j,0); _buf(i,1) = _x(j,1); _buf(i,2) = _x(j,2); - _buf(i,3) = _tag(j); - _buf(i,4) = _type(j); - _buf(i,5) = _mask(j); + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; _buf(i,6) = _q(j); } else { _buf(i,0) = _x(j,0) + _dx; _buf(i,1) = _x(j,1) + _dy; _buf(i,2) = _x(j,2) + _dz; - _buf(i,3) = _tag(j); - _buf(i,4) = _type(j); - _buf(i,5) = _mask(j); + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; _buf(i,6) = _q(j); } } @@ -872,9 +872,9 @@ struct AtomVecChargeKokkos_UnpackBorder { _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); - _type(i+_first) = static_cast (_buf(i,4)); - _mask(i+_first) = static_cast (_buf(i,5)); + _tag(i+_first) = (tagint) d_ubuf(_buf(i,3)).i; + _type(i+_first) = (int) d_ubuf(_buf(i,4)).i; + _mask(i+_first) = (int) d_ubuf(_buf(i,5)).i; _q(i+_first) = _buf(i,6); } }; @@ -1039,10 +1039,10 @@ struct AtomVecChargeKokkos_PackExchangeFunctor { _buf(mysend,4) = _v(i,0); _buf(mysend,5) = _v(i,1); _buf(mysend,6) = _v(i,2); - _buf(mysend,7) = _tag[i]; - _buf(mysend,8) = _type[i]; - _buf(mysend,9) = _mask[i]; - _buf(mysend,10) = _image[i]; + _buf(mysend,7) = d_ubuf(_tag[i]).d; + _buf(mysend,8) = d_ubuf(_type[i]).d; + _buf(mysend,9) = d_ubuf(_mask[i]).d; + _buf(mysend,10) = d_ubuf(_image[i]).d; _buf(mysend,11) = _q[i]; const int j = _copylist(mysend); @@ -1163,10 +1163,10 @@ struct AtomVecChargeKokkos_UnpackExchangeFunctor { _v(i,0) = _buf(myrecv,4); _v(i,1) = _buf(myrecv,5); _v(i,2) = _buf(myrecv,6); - _tag[i] = _buf(myrecv,7); - _type[i] = _buf(myrecv,8); - _mask[i] = _buf(myrecv,9); - _image[i] = _buf(myrecv,10); + _tag[i] = (tagint) d_ubuf(_buf(myrecv,7)).i; + _type[i] = (int) d_ubuf(_buf(myrecv,8)).i; + _mask[i] = (int) d_ubuf(_buf(myrecv,9)).i; + _image[i] = (imageint) d_ubuf(_buf(myrecv,10)).i; _q[i] = _buf(myrecv,11); } } diff --git a/src/KOKKOS/atom_vec_full_kokkos.cpp b/src/KOKKOS/atom_vec_full_kokkos.cpp index 731168b6ea..fa4cf18ae3 100644 --- a/src/KOKKOS/atom_vec_full_kokkos.cpp +++ b/src/KOKKOS/atom_vec_full_kokkos.cpp @@ -761,17 +761,6 @@ void AtomVecFullKokkos::unpack_reverse(int n, int *list, double *buf) template struct AtomVecFullKokkos_PackBorder { - union ubuf { - double d; - int64_t i; - KOKKOS_INLINE_FUNCTION - ubuf(double arg) : d(arg) {} - KOKKOS_INLINE_FUNCTION - ubuf(int64_t arg) : i(arg) {} - KOKKOS_INLINE_FUNCTION - ubuf(int arg) : i(arg) {} - }; - typedef DeviceType device_type; typedef ArrayTypes AT; @@ -808,20 +797,20 @@ struct AtomVecFullKokkos_PackBorder { _buf(i,0) = _x(j,0); _buf(i,1) = _x(j,1); _buf(i,2) = _x(j,2); - _buf(i,3) = ubuf(_tag(j)).d; - _buf(i,4) = ubuf(_type(j)).d; - _buf(i,5) = ubuf(_mask(j)).d; + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; _buf(i,6) = _q(j); - _buf(i,7) = ubuf(_molecule(j)).d; + _buf(i,7) = d_ubuf(_molecule(j)).d; } else { _buf(i,0) = _x(j,0) + _dx; _buf(i,1) = _x(j,1) + _dy; _buf(i,2) = _x(j,2) + _dz; - _buf(i,3) = ubuf(_tag(j)).d; - _buf(i,4) = ubuf(_type(j)).d; - _buf(i,5) = ubuf(_mask(j)).d; + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; _buf(i,6) = _q(j); - _buf(i,7) = ubuf(_molecule(j)).d; + _buf(i,7) = d_ubuf(_molecule(j)).d; } } }; @@ -1030,17 +1019,6 @@ int AtomVecFullKokkos::pack_border_hybrid(int n, int *list, double *buf) template struct AtomVecFullKokkos_UnpackBorder { - union ubuf { - double d; - int64_t i; - KOKKOS_INLINE_FUNCTION - ubuf(double arg) : d(arg) {} - KOKKOS_INLINE_FUNCTION - ubuf(int64_t arg) : i(arg) {} - KOKKOS_INLINE_FUNCTION - ubuf(int arg) : i(arg) {} - }; - typedef DeviceType device_type; typedef ArrayTypes AT; @@ -1072,11 +1050,11 @@ struct AtomVecFullKokkos_UnpackBorder { _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = (tagint) ubuf(_buf(i,3)).i; - _type(i+_first) = (int) ubuf(_buf(i,4)).i; - _mask(i+_first) = (int) ubuf(_buf(i,5)).i; + _tag(i+_first) = (tagint) d_ubuf(_buf(i,3)).i; + _type(i+_first) = (int) d_ubuf(_buf(i,4)).i; + _mask(i+_first) = (int) d_ubuf(_buf(i,5)).i; _q(i+_first) = _buf(i,6); - _molecule(i+_first) = (tagint) ubuf(_buf(i,7)).i; + _molecule(i+_first) = (tagint) d_ubuf(_buf(i,7)).i; } }; @@ -1178,18 +1156,6 @@ int AtomVecFullKokkos::unpack_border_hybrid(int n, int first, double *buf) template struct AtomVecFullKokkos_PackExchangeFunctor { - - union ubuf { - double d; - int64_t i; - KOKKOS_INLINE_FUNCTION - ubuf(double arg) : d(arg) {} - KOKKOS_INLINE_FUNCTION - ubuf(int64_t arg) : i(arg) {} - KOKKOS_INLINE_FUNCTION - ubuf(int arg) : i(arg) {} - }; - typedef DeviceType device_type; typedef ArrayTypes AT; typename AT::t_x_array_randomread _x; @@ -1328,7 +1294,7 @@ struct AtomVecFullKokkos_PackExchangeFunctor { elements = 20+atom->maxspecial+2*atom->bond_per_atom+4*atom->angle_per_atom+ 5*atom->dihedral_per_atom + 5*atom->improper_per_atom; const int maxsendlist = (buf.template view().dimension_0()* - buf.template view().dimension_1())/elements; + buf.template view().dimension_1())/elements; buffer_view(_buf,buf,maxsendlist,elements); } @@ -1344,46 +1310,46 @@ struct AtomVecFullKokkos_PackExchangeFunctor { _buf(mysend,m++) = _v(i,0); _buf(mysend,m++) = _v(i,1); _buf(mysend,m++) = _v(i,2); - _buf(mysend,m++) = ubuf(_tag(i)).d; - _buf(mysend,m++) = ubuf(_type(i)).d; - _buf(mysend,m++) = ubuf(_mask(i)).d; - _buf(mysend,m++) = ubuf(_image(i)).d; + _buf(mysend,m++) = d_ubuf(_tag(i)).d; + _buf(mysend,m++) = d_ubuf(_type(i)).d; + _buf(mysend,m++) = d_ubuf(_mask(i)).d; + _buf(mysend,m++) = d_ubuf(_image(i)).d; _buf(mysend,m++) = _q(i); - _buf(mysend,m++) = ubuf(_molecule(i)).d; - _buf(mysend,m++) = ubuf(_num_bond(i)).d; + _buf(mysend,m++) = d_ubuf(_molecule(i)).d; + _buf(mysend,m++) = d_ubuf(_num_bond(i)).d; for (k = 0; k < _num_bond(i); k++) { - _buf(mysend,m++) = ubuf(_bond_type(i,k)).d; - _buf(mysend,m++) = ubuf(_bond_atom(i,k)).d; + _buf(mysend,m++) = d_ubuf(_bond_type(i,k)).d; + _buf(mysend,m++) = d_ubuf(_bond_atom(i,k)).d; } - _buf(mysend,m++) = ubuf(_num_angle(i)).d; + _buf(mysend,m++) = d_ubuf(_num_angle(i)).d; for (k = 0; k < _num_angle(i); k++) { - _buf(mysend,m++) = ubuf(_angle_type(i,k)).d; - _buf(mysend,m++) = ubuf(_angle_atom1(i,k)).d; - _buf(mysend,m++) = ubuf(_angle_atom2(i,k)).d; - _buf(mysend,m++) = ubuf(_angle_atom3(i,k)).d; + _buf(mysend,m++) = d_ubuf(_angle_type(i,k)).d; + _buf(mysend,m++) = d_ubuf(_angle_atom1(i,k)).d; + _buf(mysend,m++) = d_ubuf(_angle_atom2(i,k)).d; + _buf(mysend,m++) = d_ubuf(_angle_atom3(i,k)).d; } - _buf(mysend,m++) = ubuf(_num_dihedral(i)).d; + _buf(mysend,m++) = d_ubuf(_num_dihedral(i)).d; for (k = 0; k < _num_dihedral(i); k++) { - _buf(mysend,m++) = ubuf(_dihedral_type(i,k)).d; - _buf(mysend,m++) = ubuf(_dihedral_atom1(i,k)).d; - _buf(mysend,m++) = ubuf(_dihedral_atom2(i,k)).d; - _buf(mysend,m++) = ubuf(_dihedral_atom3(i,k)).d; - _buf(mysend,m++) = ubuf(_dihedral_atom4(i,k)).d; + _buf(mysend,m++) = d_ubuf(_dihedral_type(i,k)).d; + _buf(mysend,m++) = d_ubuf(_dihedral_atom1(i,k)).d; + _buf(mysend,m++) = d_ubuf(_dihedral_atom2(i,k)).d; + _buf(mysend,m++) = d_ubuf(_dihedral_atom3(i,k)).d; + _buf(mysend,m++) = d_ubuf(_dihedral_atom4(i,k)).d; } - _buf(mysend,m++) = ubuf(_num_improper(i)).d; + _buf(mysend,m++) = d_ubuf(_num_improper(i)).d; for (k = 0; k < _num_improper(i); k++) { - _buf(mysend,m++) = ubuf(_improper_type(i,k)).d; - _buf(mysend,m++) = ubuf(_improper_atom1(i,k)).d; - _buf(mysend,m++) = ubuf(_improper_atom2(i,k)).d; - _buf(mysend,m++) = ubuf(_improper_atom3(i,k)).d; - _buf(mysend,m++) = ubuf(_improper_atom4(i,k)).d; + _buf(mysend,m++) = d_ubuf(_improper_type(i,k)).d; + _buf(mysend,m++) = d_ubuf(_improper_atom1(i,k)).d; + _buf(mysend,m++) = d_ubuf(_improper_atom2(i,k)).d; + _buf(mysend,m++) = d_ubuf(_improper_atom3(i,k)).d; + _buf(mysend,m++) = d_ubuf(_improper_atom4(i,k)).d; } - _buf(mysend,m++) = ubuf(_nspecial(i,0)).d; - _buf(mysend,m++) = ubuf(_nspecial(i,1)).d; - _buf(mysend,m++) = ubuf(_nspecial(i,2)).d; + _buf(mysend,m++) = d_ubuf(_nspecial(i,0)).d; + _buf(mysend,m++) = d_ubuf(_nspecial(i,1)).d; + _buf(mysend,m++) = d_ubuf(_nspecial(i,2)).d; for (k = 0; k < _nspecial(i,2); k++) - _buf(mysend,m++) = ubuf(_special(i,k)).d; + _buf(mysend,m++) = d_ubuf(_special(i,k)).d; const int j = _copylist(mysend); @@ -1531,18 +1497,6 @@ int AtomVecFullKokkos::pack_exchange(int i, double *buf) template struct AtomVecFullKokkos_UnpackExchangeFunctor { - - union ubuf { - double d; - int64_t i; - KOKKOS_INLINE_FUNCTION - ubuf(double arg) : d(arg) {} - KOKKOS_INLINE_FUNCTION - ubuf(int64_t arg) : i(arg) {} - KOKKOS_INLINE_FUNCTION - ubuf(int arg) : i(arg) {} - }; - typedef DeviceType device_type; typedef ArrayTypes AT; typename AT::t_x_array _x; @@ -1617,7 +1571,7 @@ struct AtomVecFullKokkos_UnpackExchangeFunctor { elements = 20+atom->maxspecial+2*atom->bond_per_atom+4*atom->angle_per_atom+ 5*atom->dihedral_per_atom + 5*atom->improper_per_atom; const int maxsendlist = (buf.template view().dimension_0()* - buf.template view().dimension_1())/elements; + buf.template view().dimension_1())/elements; buffer_view(_buf,buf,maxsendlist,elements); } @@ -1633,46 +1587,46 @@ struct AtomVecFullKokkos_UnpackExchangeFunctor { _v(i,0) = _buf(myrecv,m++); _v(i,1) = _buf(myrecv,m++); _v(i,2) = _buf(myrecv,m++); - _tag(i) = (tagint) ubuf(_buf(myrecv,m++)).i; - _type(i) = (int) ubuf(_buf(myrecv,m++)).i; - _mask(i) = (int) ubuf(_buf(myrecv,m++)).i; - _image(i) = (imageint) ubuf(_buf(myrecv,m++)).i; + _tag(i) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _type(i) = (int) d_ubuf(_buf(myrecv,m++)).i; + _mask(i) = (int) d_ubuf(_buf(myrecv,m++)).i; + _image(i) = (imageint) d_ubuf(_buf(myrecv,m++)).i; _q(i) = _buf(myrecv,m++); - _molecule(i) = (tagint) ubuf(_buf(myrecv,m++)).i; - _num_bond(i) = (int) ubuf(_buf(myrecv,m++)).i; + _molecule(i) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _num_bond(i) = (int) d_ubuf(_buf(myrecv,m++)).i; int k; for (k = 0; k < _num_bond(i); k++) { - _bond_type(i,k) = (int) ubuf(_buf(myrecv,m++)).i; - _bond_atom(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; + _bond_type(i,k) = (int) d_ubuf(_buf(myrecv,m++)).i; + _bond_atom(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } - _num_angle(i) = (int) ubuf(_buf(myrecv,m++)).i; + _num_angle(i) = (int) d_ubuf(_buf(myrecv,m++)).i; for (k = 0; k < _num_angle(i); k++) { - _angle_type(i,k) = (int) ubuf(_buf(myrecv,m++)).i; - _angle_atom1(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; - _angle_atom2(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; - _angle_atom3(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; + _angle_type(i,k) = (int) d_ubuf(_buf(myrecv,m++)).i; + _angle_atom1(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _angle_atom2(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _angle_atom3(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } - _num_dihedral(i) = (int) ubuf(_buf(myrecv,m++)).i; + _num_dihedral(i) = (int) d_ubuf(_buf(myrecv,m++)).i; for (k = 0; k < _num_dihedral(i); k++) { - _dihedral_type(i,k) = (int) ubuf(_buf(myrecv,m++)).i; - _dihedral_atom1(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; - _dihedral_atom2(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; - _dihedral_atom3(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; - _dihedral_atom4(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; + _dihedral_type(i,k) = (int) d_ubuf(_buf(myrecv,m++)).i; + _dihedral_atom1(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _dihedral_atom2(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _dihedral_atom3(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _dihedral_atom4(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } - _num_improper(i) = (int) ubuf(_buf(myrecv,m++)).i; + _num_improper(i) = (int) d_ubuf(_buf(myrecv,m++)).i; for (k = 0; k < _num_improper(i); k++) { - _improper_type(i,k) = (int) ubuf(_buf(myrecv,m++)).i; - _improper_atom1(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; - _improper_atom2(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; - _improper_atom3(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; - _improper_atom4(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; + _improper_type(i,k) = (int) d_ubuf(_buf(myrecv,m++)).i; + _improper_atom1(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _improper_atom2(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _improper_atom3(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _improper_atom4(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } - _nspecial(i,0) = (int) ubuf(_buf(myrecv,m++)).i; - _nspecial(i,1) = (int) ubuf(_buf(myrecv,m++)).i; - _nspecial(i,2) = (int) ubuf(_buf(myrecv,m++)).i; + _nspecial(i,0) = (int) d_ubuf(_buf(myrecv,m++)).i; + _nspecial(i,1) = (int) d_ubuf(_buf(myrecv,m++)).i; + _nspecial(i,2) = (int) d_ubuf(_buf(myrecv,m++)).i; for (k = 0; k < _nspecial(i,2); k++) - _special(i,k) = (tagint) ubuf(_buf(myrecv,m++)).i; + _special(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } } }; diff --git a/src/KOKKOS/atom_vec_kokkos.h b/src/KOKKOS/atom_vec_kokkos.h index 7ac66f1626..7f593f235f 100644 --- a/src/KOKKOS/atom_vec_kokkos.h +++ b/src/KOKKOS/atom_vec_kokkos.h @@ -20,6 +20,17 @@ namespace LAMMPS_NS { +union d_ubuf { + double d; + int64_t i; + KOKKOS_INLINE_FUNCTION + d_ubuf(double arg) : d(arg) {} + KOKKOS_INLINE_FUNCTION + d_ubuf(int64_t arg) : i(arg) {} + KOKKOS_INLINE_FUNCTION + d_ubuf(int arg) : i(arg) {} +}; + class AtomVecKokkos : public AtomVec { public: AtomVecKokkos(class LAMMPS *); diff --git a/src/KOKKOS/atom_vec_molecular_kokkos.cpp b/src/KOKKOS/atom_vec_molecular_kokkos.cpp index 4fd8114376..5c16ac1513 100644 --- a/src/KOKKOS/atom_vec_molecular_kokkos.cpp +++ b/src/KOKKOS/atom_vec_molecular_kokkos.cpp @@ -786,18 +786,18 @@ struct AtomVecMolecularKokkos_PackBorder { _buf(i,0) = _x(j,0); _buf(i,1) = _x(j,1); _buf(i,2) = _x(j,2); - _buf(i,3) = _tag(j); - _buf(i,4) = _type(j); - _buf(i,5) = _mask(j); - _buf(i,6) = _molecule(j); + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; + _buf(i,6) = d_ubuf(_molecule(j)).d; } else { _buf(i,0) = _x(j,0) + _dx; _buf(i,1) = _x(j,1) + _dy; _buf(i,2) = _x(j,2) + _dz; - _buf(i,3) = _tag(j); - _buf(i,4) = _type(j); - _buf(i,5) = _mask(j); - _buf(i,6) = _molecule(j); + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; + _buf(i,6) = d_ubuf(_molecule(j)).d; } } }; @@ -1029,10 +1029,10 @@ struct AtomVecMolecularKokkos_UnpackBorder { _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); - _type(i+_first) = static_cast (_buf(i,4)); - _mask(i+_first) = static_cast (_buf(i,5)); - _molecule(i+_first) = static_cast (_buf(i,6)); + _tag(i+_first) = (tagint) d_ubuf(_buf(i,3)).i; + _type(i+_first) = (int) d_ubuf(_buf(i,4)).i; + _mask(i+_first) = (int) d_ubuf(_buf(i,5)).i; + _molecule(i+_first) = (tagint) d_ubuf(_buf(i,6)).i; } }; @@ -1263,7 +1263,7 @@ struct AtomVecMolecularKokkos_PackExchangeFunctor { elements = 19+atom->maxspecial+2*atom->bond_per_atom+4*atom->angle_per_atom+ 5*atom->dihedral_per_atom + 5*atom->improper_per_atom; const int maxsendlist = (buf.template view().dimension_0()* - buf.template view().dimension_1())/elements; + buf.template view().dimension_1())/elements; buffer_view(_buf,buf,maxsendlist,elements); } @@ -1279,45 +1279,45 @@ struct AtomVecMolecularKokkos_PackExchangeFunctor { _buf(mysend,m++) = _v(i,0); _buf(mysend,m++) = _v(i,1); _buf(mysend,m++) = _v(i,2); - _buf(mysend,m++) = _tag(i); - _buf(mysend,m++) = _type(i); - _buf(mysend,m++) = _mask(i); - _buf(mysend,m++) = _image(i); - _buf(mysend,m++) = _molecule(i); - _buf(mysend,m++) = _num_bond(i); + _buf(mysend,m++) = d_ubuf(_tag(i)).d; + _buf(mysend,m++) = d_ubuf(_type(i)).d; + _buf(mysend,m++) = d_ubuf(_mask(i)).d; + _buf(mysend,m++) = d_ubuf(_image(i)).d; + _buf(mysend,m++) = d_ubuf(_molecule(i)).d; + _buf(mysend,m++) = d_ubuf(_num_bond(i)).d; for (k = 0; k < _num_bond(i); k++) { - _buf(mysend,m++) = _bond_type(i,k); - _buf(mysend,m++) = _bond_atom(i,k); + _buf(mysend,m++) = d_ubuf(_bond_type(i,k)).d; + _buf(mysend,m++) = d_ubuf(_bond_atom(i,k)).d; } - _buf(mysend,m++) = _num_angle(i); + _buf(mysend,m++) = d_ubuf(_num_angle(i)).d; for (k = 0; k < _num_angle(i); k++) { - _buf(mysend,m++) = _angle_type(i,k); - _buf(mysend,m++) = _angle_atom1(i,k); - _buf(mysend,m++) = _angle_atom2(i,k); - _buf(mysend,m++) = _angle_atom3(i,k); + _buf(mysend,m++) = d_ubuf(_angle_type(i,k)).d; + _buf(mysend,m++) = d_ubuf(_angle_atom1(i,k)).d; + _buf(mysend,m++) = d_ubuf(_angle_atom2(i,k)).d; + _buf(mysend,m++) = d_ubuf(_angle_atom3(i,k)).d; } - _buf(mysend,m++) = _num_dihedral(i); + _buf(mysend,m++) = d_ubuf(_num_dihedral(i)).d; for (k = 0; k < _num_dihedral(i); k++) { - _buf(mysend,m++) = _dihedral_type(i,k); - _buf(mysend,m++) = _dihedral_atom1(i,k); - _buf(mysend,m++) = _dihedral_atom2(i,k); - _buf(mysend,m++) = _dihedral_atom3(i,k); - _buf(mysend,m++) = _dihedral_atom4(i,k); + _buf(mysend,m++) = d_ubuf(_dihedral_type(i,k)).d; + _buf(mysend,m++) = d_ubuf(_dihedral_atom1(i,k)).d; + _buf(mysend,m++) = d_ubuf(_dihedral_atom2(i,k)).d; + _buf(mysend,m++) = d_ubuf(_dihedral_atom3(i,k)).d; + _buf(mysend,m++) = d_ubuf(_dihedral_atom4(i,k)).d; } - _buf(mysend,m++) = _num_improper(i); + _buf(mysend,m++) = d_ubuf(_num_improper(i)).d; for (k = 0; k < _num_improper(i); k++) { - _buf(mysend,m++) = _improper_type(i,k); - _buf(mysend,m++) = _improper_atom1(i,k); - _buf(mysend,m++) = _improper_atom2(i,k); - _buf(mysend,m++) = _improper_atom3(i,k); - _buf(mysend,m++) = _improper_atom4(i,k); + _buf(mysend,m++) = d_ubuf(_improper_type(i,k)).d; + _buf(mysend,m++) = d_ubuf(_improper_atom1(i,k)).d; + _buf(mysend,m++) = d_ubuf(_improper_atom2(i,k)).d; + _buf(mysend,m++) = d_ubuf(_improper_atom3(i,k)).d; + _buf(mysend,m++) = d_ubuf(_improper_atom4(i,k)).d; } - _buf(mysend,m++) = _nspecial(i,0); - _buf(mysend,m++) = _nspecial(i,1); - _buf(mysend,m++) = _nspecial(i,2); + _buf(mysend,m++) = d_ubuf(_nspecial(i,0)).d; + _buf(mysend,m++) = d_ubuf(_nspecial(i,1)).d; + _buf(mysend,m++) = d_ubuf(_nspecial(i,2)).d; for (k = 0; k < _nspecial(i,2); k++) - _buf(mysend,m++) = _special(i,k); + _buf(mysend,m++) = d_ubuf(_special(i,k)).d; const int j = _copylist(mysend); @@ -1536,7 +1536,7 @@ struct AtomVecMolecularKokkos_UnpackExchangeFunctor { elements = 19+atom->maxspecial+2*atom->bond_per_atom+4*atom->angle_per_atom+ 5*atom->dihedral_per_atom + 5*atom->improper_per_atom; const int maxsendlist = (buf.template view().dimension_0()* - buf.template view().dimension_1())/elements; + buf.template view().dimension_1())/elements; buffer_view(_buf,buf,maxsendlist,elements); } @@ -1552,46 +1552,46 @@ struct AtomVecMolecularKokkos_UnpackExchangeFunctor { _v(i,0) = _buf(myrecv,m++); _v(i,1) = _buf(myrecv,m++); _v(i,2) = _buf(myrecv,m++); - _tag(i) = _buf(myrecv,m++); - _type(i) = _buf(myrecv,m++); - _mask(i) = _buf(myrecv,m++); - _image(i) = _buf(myrecv,m++); + _tag(i) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _type(i) = (int) d_ubuf(_buf(myrecv,m++)).i; + _mask(i) = (int) d_ubuf(_buf(myrecv,m++)).i; + _image(i) = (imageint) d_ubuf(_buf(myrecv,m++)).i; - _molecule(i) = _buf(myrecv,m++); - _num_bond(i) = _buf(myrecv,m++); + _molecule(i) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _num_bond(i) = (int) d_ubuf(_buf(myrecv,m++)).i; int k; for (k = 0; k < _num_bond(i); k++) { - _bond_type(i,k) = _buf(myrecv,m++); - _bond_atom(i,k) = _buf(myrecv,m++); + _bond_type(i,k) = (int) d_ubuf(_buf(myrecv,m++)).i; + _bond_atom(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } - _num_angle(i) = _buf(myrecv,m++); + _num_angle(i) = (int) d_ubuf(_buf(myrecv,m++)).i; for (k = 0; k < _num_angle(i); k++) { - _angle_type(i,k) = _buf(myrecv,m++); - _angle_atom1(i,k) = _buf(myrecv,m++); - _angle_atom2(i,k) = _buf(myrecv,m++); - _angle_atom3(i,k) = _buf(myrecv,m++); + _angle_type(i,k) = (int) d_ubuf(_buf(myrecv,m++)).i; + _angle_atom1(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _angle_atom2(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _angle_atom3(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } - _num_dihedral(i) = _buf(myrecv,m++); + _num_dihedral(i) = d_ubuf(_buf(myrecv,m++)).i; for (k = 0; k < _num_dihedral(i); k++) { - _dihedral_type(i,k) = _buf(myrecv,m++); - _dihedral_atom1(i,k) = _buf(myrecv,m++); - _dihedral_atom2(i,k) = _buf(myrecv,m++); - _dihedral_atom3(i,k) = _buf(myrecv,m++); - _dihedral_atom4(i,k) = _buf(myrecv,m++); + _dihedral_type(i,k) = (int) d_ubuf(_buf(myrecv,m++)).i; + _dihedral_atom1(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _dihedral_atom2(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _dihedral_atom3(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _dihedral_atom4(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } - _num_improper(i) = _buf(myrecv,m++); - for (k = 0; k < _num_improper(i); k++) { - _improper_type(i,k) = _buf(myrecv,m++); - _improper_atom1(i,k) = _buf(myrecv,m++); - _improper_atom2(i,k) = _buf(myrecv,m++); - _improper_atom3(i,k) = _buf(myrecv,m++); - _improper_atom4(i,k) = _buf(myrecv,m++); + _num_improper(i) = (int) d_ubuf(_buf(myrecv,m++)).i; + for (k = 0; k < (int) _num_improper(i); k++) { + _improper_type(i,k) = (int) d_ubuf(_buf(myrecv,m++)).i; + _improper_atom1(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _improper_atom2(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _improper_atom3(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; + _improper_atom4(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } - _nspecial(i,0) = _buf(myrecv,m++); - _nspecial(i,1) = _buf(myrecv,m++); - _nspecial(i,2) = _buf(myrecv,m++); + _nspecial(i,0) = (int) d_ubuf(_buf(myrecv,m++)).i; + _nspecial(i,1) = (int) d_ubuf(_buf(myrecv,m++)).i; + _nspecial(i,2) = (int) d_ubuf(_buf(myrecv,m++)).i; for (k = 0; k < _nspecial(i,2); k++) - _special(i,k) = _buf(myrecv,m++); + _special(i,k) = (tagint) d_ubuf(_buf(myrecv,m++)).i; } } }; -- GitLab From 0565b1df5f02f4cb5a4074ccb56badb5d86e3f7c Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 26 Apr 2017 10:49:20 -0600 Subject: [PATCH 055/593] Fixing auto_sync logic bug in modify_kokkos --- src/KOKKOS/modify_kokkos.cpp | 120 +++++++++++++++++++++++------------ 1 file changed, 80 insertions(+), 40 deletions(-) diff --git a/src/KOKKOS/modify_kokkos.cpp b/src/KOKKOS/modify_kokkos.cpp index b4a89c8e39..c9242f2116 100644 --- a/src/KOKKOS/modify_kokkos.cpp +++ b/src/KOKKOS/modify_kokkos.cpp @@ -44,17 +44,19 @@ void ModifyKokkos::setup(int vflag) if (update->whichflag == 1) for (int i = 0; i < nfix; i++) { atomKK->sync(fix[i]->execution_space,fix[i]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[i]->kokkosable) lmp->kokkos->auto_sync = 1; fix[i]->setup(vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[i]->execution_space,fix[i]->datamask_modify); } else if (update->whichflag == 2) for (int i = 0; i < nfix; i++) { atomKK->sync(fix[i]->execution_space,fix[i]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[i]->kokkosable) lmp->kokkos->auto_sync = 1; fix[i]->min_setup(vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[i]->execution_space,fix[i]->datamask_modify); } } @@ -70,9 +72,10 @@ void ModifyKokkos::setup_pre_exchange() for (int i = 0; i < n_pre_exchange; i++) { atomKK->sync(fix[list_pre_exchange[i]]->execution_space, fix[list_pre_exchange[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_pre_exchange[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_pre_exchange[i]]->setup_pre_exchange(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_pre_exchange[i]]->execution_space, fix[list_pre_exchange[i]]->datamask_modify); } @@ -80,9 +83,10 @@ void ModifyKokkos::setup_pre_exchange() for (int i = 0; i < n_min_pre_exchange; i++) { atomKK->sync(fix[list_min_pre_exchange[i]]->execution_space, fix[list_min_pre_exchange[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_pre_exchange[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_pre_exchange[i]]->setup_pre_exchange(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_pre_exchange[i]]->execution_space, fix[list_min_pre_exchange[i]]->datamask_modify); } @@ -99,9 +103,10 @@ void ModifyKokkos::setup_pre_neighbor() for (int i = 0; i < n_pre_neighbor; i++) { atomKK->sync(fix[list_pre_neighbor[i]]->execution_space, fix[list_pre_neighbor[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_pre_neighbor[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_pre_neighbor[i]]->setup_pre_neighbor(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_pre_neighbor[i]]->execution_space, fix[list_pre_neighbor[i]]->datamask_modify); } @@ -109,9 +114,10 @@ void ModifyKokkos::setup_pre_neighbor() for (int i = 0; i < n_min_pre_neighbor; i++) { atomKK->sync(fix[list_min_pre_neighbor[i]]->execution_space, fix[list_min_pre_neighbor[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_pre_neighbor[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_pre_neighbor[i]]->setup_pre_neighbor(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_pre_neighbor[i]]->execution_space, fix[list_min_pre_neighbor[i]]->datamask_modify); } @@ -128,9 +134,10 @@ void ModifyKokkos::setup_pre_force(int vflag) for (int i = 0; i < n_pre_force; i++) { atomKK->sync(fix[list_pre_force[i]]->execution_space, fix[list_pre_force[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_pre_force[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_pre_force[i]]->setup_pre_force(vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_pre_force[i]]->execution_space, fix[list_pre_force[i]]->datamask_modify); } @@ -138,9 +145,10 @@ void ModifyKokkos::setup_pre_force(int vflag) for (int i = 0; i < n_min_pre_force; i++) { atomKK->sync(fix[list_min_pre_force[i]]->execution_space, fix[list_min_pre_force[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_pre_force[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_pre_force[i]]->setup_pre_force(vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_pre_force[i]]->execution_space, fix[list_min_pre_force[i]]->datamask_modify); } @@ -157,9 +165,10 @@ void ModifyKokkos::setup_pre_reverse(int eflag, int vflag) for (int i = 0; i < n_pre_reverse; i++) { atomKK->sync(fix[list_pre_reverse[i]]->execution_space, fix[list_pre_reverse[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_pre_reverse[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_pre_reverse[i]]->setup_pre_reverse(eflag,vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_pre_reverse[i]]->execution_space, fix[list_pre_reverse[i]]->datamask_modify); } @@ -167,9 +176,10 @@ void ModifyKokkos::setup_pre_reverse(int eflag, int vflag) for (int i = 0; i < n_min_pre_reverse; i++) { atomKK->sync(fix[list_min_pre_reverse[i]]->execution_space, fix[list_min_pre_reverse[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_pre_reverse[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_pre_reverse[i]]->setup_pre_reverse(eflag,vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_pre_reverse[i]]->execution_space, fix[list_min_pre_reverse[i]]->datamask_modify); } @@ -184,9 +194,10 @@ void ModifyKokkos::initial_integrate(int vflag) for (int i = 0; i < n_initial_integrate; i++) { atomKK->sync(fix[list_initial_integrate[i]]->execution_space, fix[list_initial_integrate[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_initial_integrate[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_initial_integrate[i]]->initial_integrate(vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_initial_integrate[i]]->execution_space, fix[list_initial_integrate[i]]->datamask_modify); } @@ -201,9 +212,10 @@ void ModifyKokkos::post_integrate() for (int i = 0; i < n_post_integrate; i++) { atomKK->sync(fix[list_post_integrate[i]]->execution_space, fix[list_post_integrate[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_post_integrate[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_post_integrate[i]]->post_integrate(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_post_integrate[i]]->execution_space, fix[list_post_integrate[i]]->datamask_modify); } @@ -218,9 +230,10 @@ void ModifyKokkos::pre_exchange() for (int i = 0; i < n_pre_exchange; i++) { atomKK->sync(fix[list_pre_exchange[i]]->execution_space, fix[list_pre_exchange[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_pre_exchange[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_pre_exchange[i]]->pre_exchange(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_pre_exchange[i]]->execution_space, fix[list_pre_exchange[i]]->datamask_modify); } @@ -235,9 +248,10 @@ void ModifyKokkos::pre_neighbor() for (int i = 0; i < n_pre_neighbor; i++) { atomKK->sync(fix[list_pre_neighbor[i]]->execution_space, fix[list_pre_neighbor[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_pre_neighbor[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_pre_neighbor[i]]->pre_neighbor(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_pre_neighbor[i]]->execution_space, fix[list_pre_neighbor[i]]->datamask_modify); } @@ -252,9 +266,10 @@ void ModifyKokkos::pre_force(int vflag) for (int i = 0; i < n_pre_force; i++) { atomKK->sync(fix[list_pre_force[i]]->execution_space, fix[list_pre_force[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_pre_force[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_pre_force[i]]->pre_force(vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_pre_force[i]]->execution_space, fix[list_pre_force[i]]->datamask_modify); } @@ -269,9 +284,10 @@ void ModifyKokkos::pre_reverse(int eflag, int vflag) for (int i = 0; i < n_pre_reverse; i++) { atomKK->sync(fix[list_pre_reverse[i]]->execution_space, fix[list_pre_reverse[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_pre_reverse[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_pre_reverse[i]]->pre_reverse(eflag,vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_pre_reverse[i]]->execution_space, fix[list_pre_reverse[i]]->datamask_modify); } @@ -286,9 +302,10 @@ void ModifyKokkos::post_force(int vflag) for (int i = 0; i < n_post_force; i++) { atomKK->sync(fix[list_post_force[i]]->execution_space, fix[list_post_force[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_post_force[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_post_force[i]]->post_force(vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_post_force[i]]->execution_space, fix[list_post_force[i]]->datamask_modify); } @@ -303,9 +320,10 @@ void ModifyKokkos::final_integrate() for (int i = 0; i < n_final_integrate; i++) { atomKK->sync(fix[list_final_integrate[i]]->execution_space, fix[list_final_integrate[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_final_integrate[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_final_integrate[i]]->final_integrate(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_final_integrate[i]]->execution_space, fix[list_final_integrate[i]]->datamask_modify); } @@ -322,9 +340,10 @@ void ModifyKokkos::end_of_step() if (update->ntimestep % end_of_step_every[i] == 0) { atomKK->sync(fix[list_end_of_step[i]]->execution_space, fix[list_end_of_step[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_end_of_step[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_end_of_step[i]]->end_of_step(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_end_of_step[i]]->execution_space, fix[list_end_of_step[i]]->datamask_modify); } @@ -342,9 +361,10 @@ double ModifyKokkos::thermo_energy() for (int i = 0; i < n_thermo_energy; i++) { atomKK->sync(fix[list_thermo_energy[i]]->execution_space, fix[list_thermo_energy[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_thermo_energy[i]]->kokkosable) lmp->kokkos->auto_sync = 1; energy += fix[list_thermo_energy[i]]->compute_scalar(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_thermo_energy[i]]->execution_space, fix[list_thermo_energy[i]]->datamask_modify); } @@ -375,9 +395,10 @@ void ModifyKokkos::setup_pre_force_respa(int vflag, int ilevel) for (int i = 0; i < n_pre_force; i++) { atomKK->sync(fix[list_pre_force[i]]->execution_space, fix[list_pre_force[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_pre_force[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_pre_force[i]]->setup_pre_force_respa(vflag,ilevel); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_pre_force[i]]->execution_space, fix[list_pre_force[i]]->datamask_modify); } @@ -392,10 +413,11 @@ void ModifyKokkos::initial_integrate_respa(int vflag, int ilevel, int iloop) for (int i = 0; i < n_initial_integrate_respa; i++) { atomKK->sync(fix[list_initial_integrate_respa[i]]->execution_space, fix[list_initial_integrate_respa[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_initial_integrate_respa[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_initial_integrate_respa[i]]-> initial_integrate_respa(vflag,ilevel,iloop); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_initial_integrate_respa[i]]->execution_space, fix[list_initial_integrate_respa[i]]->datamask_modify); } @@ -410,9 +432,10 @@ void ModifyKokkos::post_integrate_respa(int ilevel, int iloop) for (int i = 0; i < n_post_integrate_respa; i++) { atomKK->sync(fix[list_post_integrate_respa[i]]->execution_space, fix[list_post_integrate_respa[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_post_integrate_respa[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_post_integrate_respa[i]]->post_integrate_respa(ilevel,iloop); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_post_integrate_respa[i]]->execution_space, fix[list_post_integrate_respa[i]]->datamask_modify); } @@ -427,9 +450,10 @@ void ModifyKokkos::pre_force_respa(int vflag, int ilevel, int iloop) for (int i = 0; i < n_pre_force_respa; i++) { atomKK->sync(fix[list_pre_force_respa[i]]->execution_space, fix[list_pre_force_respa[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_pre_force_respa[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_pre_force_respa[i]]->pre_force_respa(vflag,ilevel,iloop); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_pre_force_respa[i]]->execution_space, fix[list_pre_force_respa[i]]->datamask_modify); } @@ -444,9 +468,10 @@ void ModifyKokkos::post_force_respa(int vflag, int ilevel, int iloop) for (int i = 0; i < n_post_force_respa; i++) { atomKK->sync(fix[list_post_force_respa[i]]->execution_space, fix[list_post_force_respa[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_post_force_respa[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_post_force_respa[i]]->post_force_respa(vflag,ilevel,iloop); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_post_force_respa[i]]->execution_space, fix[list_post_force_respa[i]]->datamask_modify); } @@ -461,9 +486,10 @@ void ModifyKokkos::final_integrate_respa(int ilevel, int iloop) for (int i = 0; i < n_final_integrate_respa; i++) { atomKK->sync(fix[list_final_integrate_respa[i]]->execution_space, fix[list_final_integrate_respa[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_final_integrate_respa[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_final_integrate_respa[i]]->final_integrate_respa(ilevel,iloop); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_final_integrate_respa[i]]->execution_space, fix[list_final_integrate_respa[i]]->datamask_modify); } @@ -478,9 +504,10 @@ void ModifyKokkos::min_pre_exchange() for (int i = 0; i < n_min_pre_exchange; i++) { atomKK->sync(fix[list_min_pre_exchange[i]]->execution_space, fix[list_min_pre_exchange[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_pre_exchange[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_pre_exchange[i]]->min_pre_exchange(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_pre_exchange[i]]->execution_space, fix[list_min_pre_exchange[i]]->datamask_modify); } @@ -495,9 +522,10 @@ void ModifyKokkos::min_pre_neighbor() for (int i = 0; i < n_min_pre_neighbor; i++) { atomKK->sync(fix[list_min_pre_neighbor[i]]->execution_space, fix[list_min_pre_neighbor[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_pre_neighbor[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_pre_neighbor[i]]->min_pre_neighbor(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_pre_neighbor[i]]->execution_space, fix[list_min_pre_neighbor[i]]->datamask_modify); } @@ -512,9 +540,10 @@ void ModifyKokkos::min_pre_force(int vflag) for (int i = 0; i < n_min_pre_force; i++) { atomKK->sync(fix[list_min_pre_force[i]]->execution_space, fix[list_min_pre_force[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_pre_force[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_pre_force[i]]->min_pre_force(vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_pre_force[i]]->execution_space, fix[list_min_pre_force[i]]->datamask_modify); } @@ -529,9 +558,10 @@ void ModifyKokkos::min_pre_reverse(int eflag, int vflag) for (int i = 0; i < n_min_pre_reverse; i++) { atomKK->sync(fix[list_min_pre_reverse[i]]->execution_space, fix[list_min_pre_reverse[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_pre_reverse[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_pre_reverse[i]]->min_pre_reverse(eflag,vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_pre_reverse[i]]->execution_space, fix[list_min_pre_reverse[i]]->datamask_modify); } @@ -546,9 +576,10 @@ void ModifyKokkos::min_post_force(int vflag) for (int i = 0; i < n_min_post_force; i++) { atomKK->sync(fix[list_min_post_force[i]]->execution_space, fix[list_min_post_force[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_post_force[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_post_force[i]]->min_post_force(vflag); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_post_force[i]]->execution_space, fix[list_min_post_force[i]]->datamask_modify); } @@ -568,10 +599,11 @@ double ModifyKokkos::min_energy(double *fextra) for (int i = 0; i < n_min_energy; i++) { ifix = list_min_energy[i]; atomKK->sync(fix[ifix]->execution_space,fix[ifix]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[ifix]->kokkosable) lmp->kokkos->auto_sync = 1; eng += fix[ifix]->min_energy(&fextra[index]); index += fix[ifix]->min_dof(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[ifix]->execution_space,fix[ifix]->datamask_modify); } return eng; @@ -586,9 +618,10 @@ void ModifyKokkos::min_store() for (int i = 0; i < n_min_energy; i++) { atomKK->sync(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_energy[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_energy[i]]->min_store(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_modify); } @@ -603,9 +636,10 @@ void ModifyKokkos::min_clearstore() for (int i = 0; i < n_min_energy; i++) { atomKK->sync(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_energy[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_energy[i]]->min_clearstore(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_modify); } @@ -616,9 +650,10 @@ void ModifyKokkos::min_pushstore() for (int i = 0; i < n_min_energy; i++) { atomKK->sync(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_energy[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_energy[i]]->min_pushstore(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_modify); } @@ -629,9 +664,10 @@ void ModifyKokkos::min_popstore() for (int i = 0; i < n_min_energy; i++) { atomKK->sync(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_energy[i]]->kokkosable) lmp->kokkos->auto_sync = 1; fix[list_min_energy[i]]->min_popstore(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_modify); } @@ -649,10 +685,11 @@ void ModifyKokkos::min_step(double alpha, double *hextra) for (int i = 0; i < n_min_energy; i++) { ifix = list_min_energy[i]; atomKK->sync(fix[ifix]->execution_space,fix[ifix]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[ifix]->kokkosable) lmp->kokkos->auto_sync = 1; fix[ifix]->min_step(alpha,&hextra[index]); index += fix[ifix]->min_dof(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[ifix]->execution_space,fix[ifix]->datamask_modify); } } @@ -670,11 +707,12 @@ double ModifyKokkos::max_alpha(double *hextra) for (int i = 0; i < n_min_energy; i++) { ifix = list_min_energy[i]; atomKK->sync(fix[ifix]->execution_space,fix[ifix]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[ifix]->kokkosable) lmp->kokkos->auto_sync = 1; double alpha_one = fix[ifix]->max_alpha(&hextra[index]); alpha = MIN(alpha,alpha_one); index += fix[ifix]->min_dof(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[ifix]->execution_space,fix[ifix]->datamask_modify); } return alpha; @@ -690,9 +728,10 @@ int ModifyKokkos::min_dof() for (int i = 0; i < n_min_energy; i++) { atomKK->sync(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_energy[i]]->kokkosable) lmp->kokkos->auto_sync = 1; ndof += fix[list_min_energy[i]]->min_dof(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_modify); } @@ -710,9 +749,10 @@ int ModifyKokkos::min_reset_ref() for (int i = 0; i < n_min_energy; i++) { atomKK->sync(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_read); + int prev_auto_sync = lmp->kokkos->auto_sync; if (!fix[list_min_energy[i]]->kokkosable) lmp->kokkos->auto_sync = 1; itmp = fix[list_min_energy[i]]->min_reset_ref(); - lmp->kokkos->auto_sync = 0; + lmp->kokkos->auto_sync = prev_auto_sync; if (itmp) itmpall = 1; atomKK->modified(fix[list_min_energy[i]]->execution_space, fix[list_min_energy[i]]->datamask_modify); -- GitLab From 67fced37c826f32ea571dd5c5b24b16016c27953 Mon Sep 17 00:00:00 2001 From: Anders Hafreager Date: Wed, 26 Apr 2017 20:10:18 +0200 Subject: [PATCH 056/593] Setting molecule COM to 0 after moving atoms --- src/MC/fix_gcmc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 73758e3628..a83a7aaf63 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -595,6 +595,9 @@ void FixGCMC::init() onemols[imol]->x[i][1] -= onemols[imol]->com[1]; onemols[imol]->x[i][2] -= onemols[imol]->com[2]; } + onemols[imol]->com[0] = 0; + onemols[imol]->com[1] = 0; + onemols[imol]->com[2] = 0; } else gas_mass = atom->mass[ngcmc_type]; -- GitLab From 8f9cb3590a32dce602a7365bb5e2221b74db0597 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Apr 2017 15:34:12 -0400 Subject: [PATCH 057/593] correct units for some improper force constants in docs --- doc/src/improper_cossq.txt | 5 +---- doc/src/improper_ring.txt | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/doc/src/improper_cossq.txt b/doc/src/improper_cossq.txt index 513f0b3151..e238063a8f 100644 --- a/doc/src/improper_cossq.txt +++ b/doc/src/improper_cossq.txt @@ -45,12 +45,9 @@ above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: -K (energy/radian^2) +K (energy) X0 (degrees) :ul -X0 is specified in degrees, but LAMMPS converts it to radians -internally; hence the units of K are in energy/radian^2. - :line Styles with a {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are diff --git a/doc/src/improper_ring.txt b/doc/src/improper_ring.txt index 705b1cf742..cba59399e7 100644 --- a/doc/src/improper_ring.txt +++ b/doc/src/improper_ring.txt @@ -49,12 +49,9 @@ above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: -K (energy/radian^2) +K (energy) theta0 (degrees) :ul -theta0 is specified in degrees, but LAMMPS converts it to radians -internally; hence the units of K are in energy/radian^2. - :line Styles with a {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are -- GitLab From 3e60f79f1d6256a1bfd346b52bbd59095e751ec3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Apr 2017 17:24:25 -0400 Subject: [PATCH 058/593] remove cg/cmm style name aliases --- src/GPU/pair_lj_sdk_coul_long_gpu.h | 1 - src/GPU/pair_lj_sdk_gpu.h | 1 - src/USER-CG-CMM/angle_sdk.h | 1 - src/USER-CG-CMM/pair_lj_sdk.h | 1 - src/USER-CG-CMM/pair_lj_sdk_coul_long.h | 1 - src/USER-CG-CMM/pair_lj_sdk_coul_msm.h | 1 - src/USER-OMP/angle_sdk_omp.h | 1 - src/USER-OMP/pair_lj_sdk_coul_long_omp.h | 1 - src/USER-OMP/pair_lj_sdk_coul_msm_omp.h | 3 +-- src/USER-OMP/pair_lj_sdk_omp.h | 1 - 10 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/GPU/pair_lj_sdk_coul_long_gpu.h b/src/GPU/pair_lj_sdk_coul_long_gpu.h index 61de272979..3248e94977 100644 --- a/src/GPU/pair_lj_sdk_coul_long_gpu.h +++ b/src/GPU/pair_lj_sdk_coul_long_gpu.h @@ -14,7 +14,6 @@ #ifdef PAIR_CLASS PairStyle(lj/sdk/coul/long/gpu,PairLJSDKCoulLongGPU) -PairStyle(cg/cmm/coul/long/gpu,PairLJSDKCoulLongGPU) #else diff --git a/src/GPU/pair_lj_sdk_gpu.h b/src/GPU/pair_lj_sdk_gpu.h index 610fb8b0e4..3865b34046 100644 --- a/src/GPU/pair_lj_sdk_gpu.h +++ b/src/GPU/pair_lj_sdk_gpu.h @@ -14,7 +14,6 @@ #ifdef PAIR_CLASS PairStyle(lj/sdk/gpu,PairLJSDKGPU) -PairStyle(cg/cmm/gpu,PairLJSDKGPU) #else diff --git a/src/USER-CG-CMM/angle_sdk.h b/src/USER-CG-CMM/angle_sdk.h index fbd5461187..a5d917e57c 100644 --- a/src/USER-CG-CMM/angle_sdk.h +++ b/src/USER-CG-CMM/angle_sdk.h @@ -14,7 +14,6 @@ #ifdef ANGLE_CLASS AngleStyle(sdk,AngleSDK) -AngleStyle(cg/cmm,AngleSDK) #else diff --git a/src/USER-CG-CMM/pair_lj_sdk.h b/src/USER-CG-CMM/pair_lj_sdk.h index de27485c14..ef0263c06b 100644 --- a/src/USER-CG-CMM/pair_lj_sdk.h +++ b/src/USER-CG-CMM/pair_lj_sdk.h @@ -18,7 +18,6 @@ #ifdef PAIR_CLASS PairStyle(lj/sdk,PairLJSDK) -PairStyle(cg/cmm,PairLJSDK) #else diff --git a/src/USER-CG-CMM/pair_lj_sdk_coul_long.h b/src/USER-CG-CMM/pair_lj_sdk_coul_long.h index 508ffe5e6d..57779cc0b9 100644 --- a/src/USER-CG-CMM/pair_lj_sdk_coul_long.h +++ b/src/USER-CG-CMM/pair_lj_sdk_coul_long.h @@ -18,7 +18,6 @@ #ifdef PAIR_CLASS PairStyle(lj/sdk/coul/long,PairLJSDKCoulLong) -PairStyle(cg/cmm/coul/long,PairLJSDKCoulLong) #else diff --git a/src/USER-CG-CMM/pair_lj_sdk_coul_msm.h b/src/USER-CG-CMM/pair_lj_sdk_coul_msm.h index be56c0cec3..8438ced66b 100644 --- a/src/USER-CG-CMM/pair_lj_sdk_coul_msm.h +++ b/src/USER-CG-CMM/pair_lj_sdk_coul_msm.h @@ -18,7 +18,6 @@ #ifdef PAIR_CLASS PairStyle(lj/sdk/coul/msm,PairLJSDKCoulMSM) -PairStyle(cg/cmm/coul/msm,PairLJSDKCoulMSM) #else diff --git a/src/USER-OMP/angle_sdk_omp.h b/src/USER-OMP/angle_sdk_omp.h index 9ab75904ce..c041c2ecc2 100644 --- a/src/USER-OMP/angle_sdk_omp.h +++ b/src/USER-OMP/angle_sdk_omp.h @@ -18,7 +18,6 @@ #ifdef ANGLE_CLASS AngleStyle(sdk/omp,AngleSDKOMP) -AngleStyle(cg/cmm/omp,AngleSDKOMP) #else diff --git a/src/USER-OMP/pair_lj_sdk_coul_long_omp.h b/src/USER-OMP/pair_lj_sdk_coul_long_omp.h index a615efb507..1886d2c7b5 100644 --- a/src/USER-OMP/pair_lj_sdk_coul_long_omp.h +++ b/src/USER-OMP/pair_lj_sdk_coul_long_omp.h @@ -18,7 +18,6 @@ #ifdef PAIR_CLASS PairStyle(lj/sdk/coul/long/omp,PairLJSDKCoulLongOMP) -PairStyle(cg/cmm/coul/long/omp,PairLJSDKCoulLongOMP) #else diff --git a/src/USER-OMP/pair_lj_sdk_coul_msm_omp.h b/src/USER-OMP/pair_lj_sdk_coul_msm_omp.h index 9e4a922c39..9841408b8a 100644 --- a/src/USER-OMP/pair_lj_sdk_coul_msm_omp.h +++ b/src/USER-OMP/pair_lj_sdk_coul_msm_omp.h @@ -18,7 +18,6 @@ #ifdef PAIR_CLASS PairStyle(lj/sdk/coul/msm/omp,PairLJSDKCoulMSMOMP) -PairStyle(cg/cmm/coul/msm/omp,PairLJSDKCoulMSMOMP) #else @@ -54,4 +53,4 @@ E: Must use 'kspace_modify pressure/scalar no' with OMP MSM Pair styles The kspace scalar pressure option is not (yet) compatible with OMP MSM Pair styles. -*/ \ No newline at end of file +*/ diff --git a/src/USER-OMP/pair_lj_sdk_omp.h b/src/USER-OMP/pair_lj_sdk_omp.h index c3837fb683..36c913252a 100644 --- a/src/USER-OMP/pair_lj_sdk_omp.h +++ b/src/USER-OMP/pair_lj_sdk_omp.h @@ -18,7 +18,6 @@ #ifdef PAIR_CLASS PairStyle(lj/sdk/omp,PairLJSDKOMP) -PairStyle(cg/cmm/omp,PairLJSDKOMP) #else -- GitLab From 949d61e01edad9a8ea056ccbc21c5fe21a87bafc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Apr 2017 19:26:27 -0400 Subject: [PATCH 059/593] rename examples folder for USER-CGSDK package --- examples/USER/{cg-cmm => cgsdk}/README | 2 +- .../{cg-cmm => cgsdk}/peg-verlet/data.pegc12e8.gz | Bin .../USER/{cg-cmm => cgsdk}/peg-verlet/in.pegc12e8 | 0 .../{cg-cmm => cgsdk}/peg-verlet/in.pegc12e8-angle | 0 .../USER/{cg-cmm => cgsdk}/peg-verlet/log.pegc12e8 | 0 .../{cg-cmm => cgsdk}/peg-verlet/log.pegc12e8-angle | 0 .../{cg-cmm => cgsdk}/sds-monolayer/data.sds.gz | Bin .../{cg-cmm => cgsdk}/sds-monolayer/in.sds-hybrid | 0 .../{cg-cmm => cgsdk}/sds-monolayer/in.sds-regular | 0 .../{cg-cmm => cgsdk}/sds-monolayer/log.sds-hybrid | 0 .../{cg-cmm => cgsdk}/sds-monolayer/log.sds-regular | 0 11 files changed, 1 insertion(+), 1 deletion(-) rename examples/USER/{cg-cmm => cgsdk}/README (95%) rename examples/USER/{cg-cmm => cgsdk}/peg-verlet/data.pegc12e8.gz (100%) rename examples/USER/{cg-cmm => cgsdk}/peg-verlet/in.pegc12e8 (100%) rename examples/USER/{cg-cmm => cgsdk}/peg-verlet/in.pegc12e8-angle (100%) rename examples/USER/{cg-cmm => cgsdk}/peg-verlet/log.pegc12e8 (100%) rename examples/USER/{cg-cmm => cgsdk}/peg-verlet/log.pegc12e8-angle (100%) rename examples/USER/{cg-cmm => cgsdk}/sds-monolayer/data.sds.gz (100%) rename examples/USER/{cg-cmm => cgsdk}/sds-monolayer/in.sds-hybrid (100%) rename examples/USER/{cg-cmm => cgsdk}/sds-monolayer/in.sds-regular (100%) rename examples/USER/{cg-cmm => cgsdk}/sds-monolayer/log.sds-hybrid (100%) rename examples/USER/{cg-cmm => cgsdk}/sds-monolayer/log.sds-regular (100%) diff --git a/examples/USER/cg-cmm/README b/examples/USER/cgsdk/README similarity index 95% rename from examples/USER/cg-cmm/README rename to examples/USER/cgsdk/README index 6a283114ba..5d3a493779 100644 --- a/examples/USER/cg-cmm/README +++ b/examples/USER/cgsdk/README @@ -1,4 +1,4 @@ -LAMMPS USER-CMM-CG example problems +LAMMPS USER-CGSDK example problems Each of these sub-directories contains a sample problem for the SDK coarse grained MD potentials that you can run with LAMMPS. diff --git a/examples/USER/cg-cmm/peg-verlet/data.pegc12e8.gz b/examples/USER/cgsdk/peg-verlet/data.pegc12e8.gz similarity index 100% rename from examples/USER/cg-cmm/peg-verlet/data.pegc12e8.gz rename to examples/USER/cgsdk/peg-verlet/data.pegc12e8.gz diff --git a/examples/USER/cg-cmm/peg-verlet/in.pegc12e8 b/examples/USER/cgsdk/peg-verlet/in.pegc12e8 similarity index 100% rename from examples/USER/cg-cmm/peg-verlet/in.pegc12e8 rename to examples/USER/cgsdk/peg-verlet/in.pegc12e8 diff --git a/examples/USER/cg-cmm/peg-verlet/in.pegc12e8-angle b/examples/USER/cgsdk/peg-verlet/in.pegc12e8-angle similarity index 100% rename from examples/USER/cg-cmm/peg-verlet/in.pegc12e8-angle rename to examples/USER/cgsdk/peg-verlet/in.pegc12e8-angle diff --git a/examples/USER/cg-cmm/peg-verlet/log.pegc12e8 b/examples/USER/cgsdk/peg-verlet/log.pegc12e8 similarity index 100% rename from examples/USER/cg-cmm/peg-verlet/log.pegc12e8 rename to examples/USER/cgsdk/peg-verlet/log.pegc12e8 diff --git a/examples/USER/cg-cmm/peg-verlet/log.pegc12e8-angle b/examples/USER/cgsdk/peg-verlet/log.pegc12e8-angle similarity index 100% rename from examples/USER/cg-cmm/peg-verlet/log.pegc12e8-angle rename to examples/USER/cgsdk/peg-verlet/log.pegc12e8-angle diff --git a/examples/USER/cg-cmm/sds-monolayer/data.sds.gz b/examples/USER/cgsdk/sds-monolayer/data.sds.gz similarity index 100% rename from examples/USER/cg-cmm/sds-monolayer/data.sds.gz rename to examples/USER/cgsdk/sds-monolayer/data.sds.gz diff --git a/examples/USER/cg-cmm/sds-monolayer/in.sds-hybrid b/examples/USER/cgsdk/sds-monolayer/in.sds-hybrid similarity index 100% rename from examples/USER/cg-cmm/sds-monolayer/in.sds-hybrid rename to examples/USER/cgsdk/sds-monolayer/in.sds-hybrid diff --git a/examples/USER/cg-cmm/sds-monolayer/in.sds-regular b/examples/USER/cgsdk/sds-monolayer/in.sds-regular similarity index 100% rename from examples/USER/cg-cmm/sds-monolayer/in.sds-regular rename to examples/USER/cgsdk/sds-monolayer/in.sds-regular diff --git a/examples/USER/cg-cmm/sds-monolayer/log.sds-hybrid b/examples/USER/cgsdk/sds-monolayer/log.sds-hybrid similarity index 100% rename from examples/USER/cg-cmm/sds-monolayer/log.sds-hybrid rename to examples/USER/cgsdk/sds-monolayer/log.sds-hybrid diff --git a/examples/USER/cg-cmm/sds-monolayer/log.sds-regular b/examples/USER/cgsdk/sds-monolayer/log.sds-regular similarity index 100% rename from examples/USER/cg-cmm/sds-monolayer/log.sds-regular rename to examples/USER/cgsdk/sds-monolayer/log.sds-regular -- GitLab From af748745162c73b51153a399a63e2811e55da536 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Apr 2017 19:27:13 -0400 Subject: [PATCH 060/593] rename references to USER-CG-CMM to USER-CGSDK --- doc/src/Section_intro.txt | 2 +- doc/src/Section_packages.txt | 32 +++++++++++++++++--------------- doc/src/angle_sdk.txt | 2 +- doc/src/pair_sdk.txt | 2 +- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/doc/src/Section_intro.txt b/doc/src/Section_intro.txt index 33c3cf395f..0c438c6ce0 100644 --- a/doc/src/Section_intro.txt +++ b/doc/src/Section_intro.txt @@ -515,7 +515,7 @@ the packages they have written are somewhat unique to LAMMPS and the code would not be as general-purpose as it is without their expertise and efforts. -Axel Kohlmeyer (Temple U), akohlmey at gmail.com, SVN and Git repositories, indefatigable mail list responder, USER-CG-CMM and USER-OMP packages +Axel Kohlmeyer (Temple U), akohlmey at gmail.com, SVN and Git repositories, indefatigable mail list responder, USER-CGSDK and USER-OMP packages Roy Pollock (LLNL), Ewald and PPPM solvers Mike Brown (ORNL), brownw at ornl.gov, GPU package Greg Wagner (Sandia), gjwagne at sandia.gov, MEAM package for MEAM potential diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index b327b7b1ce..bd81361fa9 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -1139,8 +1139,8 @@ The current list of user-contributed packages is as follows: Package, Description, Author(s), Doc page, Example, Pic/movie, Library "USER-ATC"_#USER-ATC, atom-to-continuum coupling, Jones & Templeton & Zimmerman (1), "fix atc"_fix_atc.html, USER/atc, "atc"_atc, lib/atc "USER-AWPMD"_#USER-AWPMD, wave-packet MD, Ilya Valuev (JIHT), "pair_style awpmd/cut"_pair_awpmd.html, USER/awpmd, -, lib/awpmd -"USER-CG-CMM"_#USER-CG-CMM, coarse-graining model, Axel Kohlmeyer (Temple U), "pair_style lj/sdk"_pair_sdk.html, USER/cg-cmm, "cg"_cg, - "USER-CGDNA"_#USER-CGDNA, coarse-grained DNA force fields, Oliver Henrich (U Strathclyde Glasgow), src/USER-CGDNA/README, USER/cgdna, -, - +"USER-CGSDK"_#USER-CGSDK, SDK coarse-graining model, Axel Kohlmeyer (Temple U), "pair_style lj/sdk"_pair_sdk.html, USER/cgsdk, "cgsdk"_cgsdk, - "USER-COLVARS"_#USER-COLVARS, collective variables, Fiorin & Henin & Kohlmeyer (2), "fix colvars"_fix_colvars.html, USER/colvars, "colvars"_colvars, lib/colvars "USER-DIFFRACTION"_#USER-DIFFRACTION, virutal x-ray and electron diffraction, Shawn Coleman (ARL),"compute xrd"_compute_xrd.html, USER/diffraction, -, - "USER-DPD"_#USER-DPD, reactive dissipative particle dynamics (DPD), Larentzos & Mattox & Brennan (5), src/USER-DPD/README, USER/dpd, -, - @@ -1169,7 +1169,7 @@ Package, Description, Author(s), Doc page, Example, Pic/movie, Library :tb(ea=c) :link(atc,http://lammps.sandia.gov/pictures.html#atc) -:link(cg,http://lammps.sandia.gov/pictures.html#cg) +:link(cgsdk,http://lammps.sandia.gov/pictures.html#cg) :link(eff,http://lammps.sandia.gov/movies.html#eff) :link(manifold,http://lammps.sandia.gov/movies.html#manifold) :link(sph,http://lammps.sandia.gov/movies.html#sph) @@ -1267,18 +1267,18 @@ physik.hu-berlin.de). Contact him directly if you have questions. :line -USER-CG-CMM package :link(USER-CG-CMM),h5 +USER-CGSDK package :link(USER-CGSDK),h5 -Contents: CG-CMM stands for coarse-grained ??. This package -implements several pair styles and an angle style using the coarse -grained parametrization of Shinoda, DeVane, Klein, Mol Sim, 33, 27 -(2007) (SDK), with extensions to simulate ionic liquids, electrolytes, -lipids and charged amino acids. See src/USER-CG-CMM/README for more -details. +Contents: CGSDK stands for Shinoda-DeVane-Klein (SDK) coarse-grained +molecular dynamics force field. This package implements several pair +styles and an angle style using the coarse grained parametrization of +Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007) (SDK), with extensions +to simulate ionic liquids, electrolytes, lipids and charged amino acids. +See src/USER-CGSDK/README for more details. -Supporting info: src/USER-CG-CMM/README, "pair lj/sdk"_pair_sdk.html, +Supporting info: src/USER-CGSDK/README, "pair lj/sdk"_pair_sdk.html, "pair lj/sdk/coul/long"_pair_sdk.html, "angle sdk"_angle_sdk.html, -examples/USER/cg-cmm +examples/USER/cgsdk Author: Axel Kohlmeyer at Temple U (akohlmey at gmail.com). Contact him directly if you have questions. @@ -1329,10 +1329,12 @@ src/USER-COLVARS/README, lib/colvars/README, "fix colvars"_fix_colvars.html, examples/USER/colvars Authors: Axel Kohlmeyer at Temple U (akohlmey at gmail.com) wrote the -fix. The COLVARS library itself is written and maintained by Giacomo -Fiorin (ICMS, Temple University, Philadelphia, PA, USA) and Jerome -Henin (LISM, CNRS, Marseille, France). Contact them directly if you -have questions. +interface that integrates colvars into LAMMPS. The COLVARS library +itself is written and maintained by Giacomo Fiorin (ICMS, Temple +University, Philadelphia, PA, USA) and Jerome Henin (LISM, CNRS, +Marseille, France). For more info, and to communicate with the COLVARS +developers, please go to COLVARS home page at +"http://colvars.github.io"_http://colvars.github.io/. :line diff --git a/doc/src/angle_sdk.txt b/doc/src/angle_sdk.txt index 785585f840..0cc535e543 100644 --- a/doc/src/angle_sdk.txt +++ b/doc/src/angle_sdk.txt @@ -46,7 +46,7 @@ from the pair_style. [Restrictions:] This angle style can only be used if LAMMPS was built with the -USER-CG-CMM package. See the "Making +USER-CGSDK package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info on packages. [Related commands:] diff --git a/doc/src/pair_sdk.txt b/doc/src/pair_sdk.txt index 212760e03d..1c348eaaf7 100644 --- a/doc/src/pair_sdk.txt +++ b/doc/src/pair_sdk.txt @@ -134,7 +134,7 @@ respa"_run_style.html command. [Restrictions:] -All of the lj/sdk pair styles are part of the USER-CG-CMM package. +All of the lj/sdk pair styles are part of the USER-CGSDK package. The {lj/sdk/coul/long} style also requires the KSPACE package to be built (which is enabled by default). They are only enabled if LAMMPS was built with that package. See the "Making -- GitLab From 5c7a63198832e6864288e7087376e035f3c18244 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Apr 2017 19:29:39 -0400 Subject: [PATCH 061/593] rename USER-CG-CMM folder to USER-CGSDK --- src/Depend.sh | 2 +- src/Makefile | 2 +- src/{USER-CG-CMM => USER-CGSDK}/Install.sh | 0 src/{USER-CG-CMM => USER-CGSDK}/README | 0 src/{USER-CG-CMM => USER-CGSDK}/angle_sdk.cpp | 0 src/{USER-CG-CMM => USER-CGSDK}/angle_sdk.h | 0 src/{USER-CG-CMM => USER-CGSDK}/lj_sdk_common.h | 0 src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk.cpp | 0 src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk.h | 0 src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk_coul_long.cpp | 0 src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk_coul_long.h | 0 src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk_coul_msm.cpp | 0 src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk_coul_msm.h | 0 13 files changed, 2 insertions(+), 2 deletions(-) rename src/{USER-CG-CMM => USER-CGSDK}/Install.sh (100%) rename src/{USER-CG-CMM => USER-CGSDK}/README (100%) rename src/{USER-CG-CMM => USER-CGSDK}/angle_sdk.cpp (100%) rename src/{USER-CG-CMM => USER-CGSDK}/angle_sdk.h (100%) rename src/{USER-CG-CMM => USER-CGSDK}/lj_sdk_common.h (100%) rename src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk.cpp (100%) rename src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk.h (100%) rename src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk_coul_long.cpp (100%) rename src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk_coul_long.h (100%) rename src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk_coul_msm.cpp (100%) rename src/{USER-CG-CMM => USER-CGSDK}/pair_lj_sdk_coul_msm.h (100%) diff --git a/src/Depend.sh b/src/Depend.sh index 5a48a7c163..520d9ae2bf 100644 --- a/src/Depend.sh +++ b/src/Depend.sh @@ -109,7 +109,7 @@ if (test $1 = "RIGID") then depend USER-OMP fi -if (test $1 = "USER-CG-CMM") then +if (test $1 = "USER-CGSDK") then depend GPU depend KOKKOS depend USER-OMP diff --git a/src/Makefile b/src/Makefile index e6821646d1..527e197964 100644 --- a/src/Makefile +++ b/src/Makefile @@ -57,7 +57,7 @@ PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ mpiio mscg opt peri poems \ python qeq reax replica rigid shock snap srd voronoi -PACKUSER = user-atc user-awpmd user-cg-cmm user-cgdna user-colvars \ +PACKUSER = user-atc user-awpmd user-cgsdk user-cgdna user-colvars \ user-diffraction user-dpd user-drude user-eff user-fep user-h5md \ user-intel user-lb user-manifold user-mgpt user-misc user-molfile \ user-nc-dump user-omp user-phonon user-qmmm user-qtb \ diff --git a/src/USER-CG-CMM/Install.sh b/src/USER-CGSDK/Install.sh similarity index 100% rename from src/USER-CG-CMM/Install.sh rename to src/USER-CGSDK/Install.sh diff --git a/src/USER-CG-CMM/README b/src/USER-CGSDK/README similarity index 100% rename from src/USER-CG-CMM/README rename to src/USER-CGSDK/README diff --git a/src/USER-CG-CMM/angle_sdk.cpp b/src/USER-CGSDK/angle_sdk.cpp similarity index 100% rename from src/USER-CG-CMM/angle_sdk.cpp rename to src/USER-CGSDK/angle_sdk.cpp diff --git a/src/USER-CG-CMM/angle_sdk.h b/src/USER-CGSDK/angle_sdk.h similarity index 100% rename from src/USER-CG-CMM/angle_sdk.h rename to src/USER-CGSDK/angle_sdk.h diff --git a/src/USER-CG-CMM/lj_sdk_common.h b/src/USER-CGSDK/lj_sdk_common.h similarity index 100% rename from src/USER-CG-CMM/lj_sdk_common.h rename to src/USER-CGSDK/lj_sdk_common.h diff --git a/src/USER-CG-CMM/pair_lj_sdk.cpp b/src/USER-CGSDK/pair_lj_sdk.cpp similarity index 100% rename from src/USER-CG-CMM/pair_lj_sdk.cpp rename to src/USER-CGSDK/pair_lj_sdk.cpp diff --git a/src/USER-CG-CMM/pair_lj_sdk.h b/src/USER-CGSDK/pair_lj_sdk.h similarity index 100% rename from src/USER-CG-CMM/pair_lj_sdk.h rename to src/USER-CGSDK/pair_lj_sdk.h diff --git a/src/USER-CG-CMM/pair_lj_sdk_coul_long.cpp b/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp similarity index 100% rename from src/USER-CG-CMM/pair_lj_sdk_coul_long.cpp rename to src/USER-CGSDK/pair_lj_sdk_coul_long.cpp diff --git a/src/USER-CG-CMM/pair_lj_sdk_coul_long.h b/src/USER-CGSDK/pair_lj_sdk_coul_long.h similarity index 100% rename from src/USER-CG-CMM/pair_lj_sdk_coul_long.h rename to src/USER-CGSDK/pair_lj_sdk_coul_long.h diff --git a/src/USER-CG-CMM/pair_lj_sdk_coul_msm.cpp b/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp similarity index 100% rename from src/USER-CG-CMM/pair_lj_sdk_coul_msm.cpp rename to src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp diff --git a/src/USER-CG-CMM/pair_lj_sdk_coul_msm.h b/src/USER-CGSDK/pair_lj_sdk_coul_msm.h similarity index 100% rename from src/USER-CG-CMM/pair_lj_sdk_coul_msm.h rename to src/USER-CGSDK/pair_lj_sdk_coul_msm.h -- GitLab From 548c589f82d3af95b1865eddb804d6ff00c4ef6a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Apr 2017 19:35:54 -0400 Subject: [PATCH 062/593] update the README for USER-CGSDK --- src/USER-CGSDK/README | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/USER-CGSDK/README b/src/USER-CGSDK/README index b37fbd3760..535bd43ac1 100644 --- a/src/USER-CGSDK/README +++ b/src/USER-CGSDK/README @@ -13,23 +13,15 @@ lipids and charged amino acids. See the doc pages for these commands for details. There are example scripts for using this package in -examples/USER/cg-cmm. +examples/USER/cgsdk This is the second generation implementation reducing the the clutter of the previous version. For many systems with long range electrostatics, it will be faster to use pair_style hybrid/overlay with lj/sdk and coul/long instead of the combined lj/sdk/coul/long -style, since the number of charged atom types is usually small. To -exploit this property, the use of the kspace_style pppm/cg is -recommended over regular pppm. For all new styles, input file backward -compatibility is provided. The old implementation is still available -through appending the /old suffix. These will be discontinued and -removed after the new implementation has been fully validated. - -The current version of this package should be considered beta -quality. The CG potentials work correctly for "normal" situations, but -have not been testing with all kinds of potential parameters and -simuation systems. +style, since the number of charged atom types is usually small. +To exploit this property, the use of the kspace_style pppm/cg is +recommended over regular pppm. The person who created this package is Axel Kohlmeyer at Temple U (akohlmey at gmail.com). Contact him directly if you have questions. @@ -38,9 +30,9 @@ The person who created this package is Axel Kohlmeyer at Temple U Thanks for contributions, support and testing goes to -Wataru Shinoda (AIST, Tsukuba) +Wataru Shinoda (Nagoya University) Russell DeVane (Procter & Gamble) -Michael L. Klein (CMM / U Penn, Philadelphia) +Michael L. Klein (Temple University, Philadelphia) Balasubramanian Sundaram (JNCASR, Bangalore) -version: 0.99 / 2011-11-29 +version: 1.0 / 2017-04-26 -- GitLab From cd435c0c58fe8e89ee1d60266791efbaa3fcba1f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Apr 2017 19:44:25 -0400 Subject: [PATCH 063/593] change references from cg_cmm to lj_sdk and from cmm to sdk --- lib/gpu/Nvidia.makefile | 40 +++++++++++++-------------- lib/gpu/Opencl.makefile | 32 ++++++++++----------- lib/gpu/lal_cg_cmm.cpp | 34 +++++++++++------------ lib/gpu/lal_cg_cmm.cu | 6 ++-- lib/gpu/lal_cg_cmm.h | 4 +-- lib/gpu/lal_cg_cmm_ext.cpp | 14 +++++----- lib/gpu/lal_cg_cmm_long.cpp | 12 ++++---- lib/gpu/lal_cg_cmm_long.cu | 6 ++-- lib/gpu/lal_cg_cmm_long.h | 2 +- lib/gpu/lal_cg_cmm_long_ext.cpp | 14 +++++----- src/GPU/pair_lj_sdk_coul_long_gpu.cpp | 20 +++++++------- src/GPU/pair_lj_sdk_gpu.cpp | 20 +++++++------- 12 files changed, 102 insertions(+), 102 deletions(-) diff --git a/lib/gpu/Nvidia.makefile b/lib/gpu/Nvidia.makefile index e02849cfed..660544cfaa 100644 --- a/lib/gpu/Nvidia.makefile +++ b/lib/gpu/Nvidia.makefile @@ -43,8 +43,8 @@ OBJS = $(OBJ_DIR)/lal_atom.o $(OBJ_DIR)/lal_ans.o \ $(OBJ_DIR)/lal_coul_long.o $(OBJ_DIR)/lal_coul_long_ext.o \ $(OBJ_DIR)/lal_morse.o $(OBJ_DIR)/lal_morse_ext.o \ $(OBJ_DIR)/lal_charmm_long.o $(OBJ_DIR)/lal_charmm_long_ext.o \ - $(OBJ_DIR)/lal_cg_cmm.o $(OBJ_DIR)/lal_cg_cmm_ext.o \ - $(OBJ_DIR)/lal_cg_cmm_long.o $(OBJ_DIR)/lal_cg_cmm_long_ext.o \ + $(OBJ_DIR)/lal_lj_sdk.o $(OBJ_DIR)/lal_lj_sdk_ext.o \ + $(OBJ_DIR)/lal_lj_sdk_long.o $(OBJ_DIR)/lal_lj_sdk_long_ext.o \ $(OBJ_DIR)/lal_eam.o $(OBJ_DIR)/lal_eam_ext.o \ $(OBJ_DIR)/lal_eam_fs_ext.o $(OBJ_DIR)/lal_eam_alloy_ext.o \ $(OBJ_DIR)/lal_buck.o $(OBJ_DIR)/lal_buck_ext.o \ @@ -98,8 +98,8 @@ CBNS = $(OBJ_DIR)/device.cubin $(OBJ_DIR)/device_cubin.h \ $(OBJ_DIR)/coul_long.cubin $(OBJ_DIR)/coul_long_cubin.h \ $(OBJ_DIR)/morse.cubin $(OBJ_DIR)/morse_cubin.h \ $(OBJ_DIR)/charmm_long.cubin $(OBJ_DIR)/charmm_long_cubin.h \ - $(OBJ_DIR)/cg_cmm.cubin $(OBJ_DIR)/cg_cmm_cubin.h \ - $(OBJ_DIR)/cg_cmm_long.cubin $(OBJ_DIR)/cg_cmm_long_cubin.h \ + $(OBJ_DIR)/lj_sdk.cubin $(OBJ_DIR)/lj_sdk_cubin.h \ + $(OBJ_DIR)/lj_sdk_long.cubin $(OBJ_DIR)/lj_sdk_long_cubin.h \ $(OBJ_DIR)/eam.cubin $(OBJ_DIR)/eam_cubin.h \ $(OBJ_DIR)/buck.cubin $(OBJ_DIR)/buck_cubin.h \ $(OBJ_DIR)/buck_coul_long.cubin $(OBJ_DIR)/buck_coul_long_cubin.h \ @@ -391,29 +391,29 @@ $(OBJ_DIR)/lal_lj_expand.o: $(ALL_H) lal_lj_expand.h lal_lj_expand.cpp $(OBJ_DIR $(OBJ_DIR)/lal_lj_expand_ext.o: $(ALL_H) lal_lj_expand.h lal_lj_expand_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_lj_expand_ext.cpp -I$(OBJ_DIR) -$(OBJ_DIR)/cg_cmm.cubin: lal_cg_cmm.cu lal_precision.h lal_preprocessor.h - $(CUDA) --cubin -DNV_KERNEL -o $@ lal_cg_cmm.cu +$(OBJ_DIR)/lj_sdk.cubin: lal_lj_sdk.cu lal_precision.h lal_preprocessor.h + $(CUDA) --cubin -DNV_KERNEL -o $@ lal_lj_sdk.cu -$(OBJ_DIR)/cg_cmm_cubin.h: $(OBJ_DIR)/cg_cmm.cubin $(OBJ_DIR)/cg_cmm.cubin - $(BIN2C) -c -n cg_cmm $(OBJ_DIR)/cg_cmm.cubin > $(OBJ_DIR)/cg_cmm_cubin.h +$(OBJ_DIR)/lj_sdk_cubin.h: $(OBJ_DIR)/lj_sdk.cubin $(OBJ_DIR)/lj_sdk.cubin + $(BIN2C) -c -n lj_sdk $(OBJ_DIR)/lj_sdk.cubin > $(OBJ_DIR)/lj_sdk_cubin.h -$(OBJ_DIR)/lal_cg_cmm.o: $(ALL_H) lal_cg_cmm.h lal_cg_cmm.cpp $(OBJ_DIR)/cg_cmm_cubin.h $(OBJ_DIR)/lal_base_atomic.o - $(CUDR) -o $@ -c lal_cg_cmm.cpp -I$(OBJ_DIR) +$(OBJ_DIR)/lal_lj_sdk.o: $(ALL_H) lal_lj_sdk.h lal_lj_sdk.cpp $(OBJ_DIR)/lj_sdk_cubin.h $(OBJ_DIR)/lal_base_atomic.o + $(CUDR) -o $@ -c lal_lj_sdk.cpp -I$(OBJ_DIR) -$(OBJ_DIR)/lal_cg_cmm_ext.o: $(ALL_H) lal_cg_cmm.h lal_cg_cmm_ext.cpp lal_base_atomic.h - $(CUDR) -o $@ -c lal_cg_cmm_ext.cpp -I$(OBJ_DIR) +$(OBJ_DIR)/lal_lj_sdk_ext.o: $(ALL_H) lal_lj_sdk.h lal_lj_sdk_ext.cpp lal_base_atomic.h + $(CUDR) -o $@ -c lal_lj_sdk_ext.cpp -I$(OBJ_DIR) -$(OBJ_DIR)/cg_cmm_long.cubin: lal_cg_cmm_long.cu lal_precision.h lal_preprocessor.h - $(CUDA) --cubin -DNV_KERNEL -o $@ lal_cg_cmm_long.cu +$(OBJ_DIR)/lj_sdk_long.cubin: lal_lj_sdk_long.cu lal_precision.h lal_preprocessor.h + $(CUDA) --cubin -DNV_KERNEL -o $@ lal_lj_sdk_long.cu -$(OBJ_DIR)/cg_cmm_long_cubin.h: $(OBJ_DIR)/cg_cmm_long.cubin $(OBJ_DIR)/cg_cmm_long.cubin - $(BIN2C) -c -n cg_cmm_long $(OBJ_DIR)/cg_cmm_long.cubin > $(OBJ_DIR)/cg_cmm_long_cubin.h +$(OBJ_DIR)/lj_sdk_long_cubin.h: $(OBJ_DIR)/lj_sdk_long.cubin $(OBJ_DIR)/lj_sdk_long.cubin + $(BIN2C) -c -n lj_sdk_long $(OBJ_DIR)/lj_sdk_long.cubin > $(OBJ_DIR)/lj_sdk_long_cubin.h -$(OBJ_DIR)/lal_cg_cmm_long.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long.cpp $(OBJ_DIR)/cg_cmm_long_cubin.h $(OBJ_DIR)/lal_base_atomic.o - $(CUDR) -o $@ -c lal_cg_cmm_long.cpp -I$(OBJ_DIR) +$(OBJ_DIR)/lal_lj_sdk_long.o: $(ALL_H) lal_lj_sdk_long.h lal_lj_sdk_long.cpp $(OBJ_DIR)/lj_sdk_long_cubin.h $(OBJ_DIR)/lal_base_atomic.o + $(CUDR) -o $@ -c lal_lj_sdk_long.cpp -I$(OBJ_DIR) -$(OBJ_DIR)/lal_cg_cmm_long_ext.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long_ext.cpp lal_base_charge.h - $(CUDR) -o $@ -c lal_cg_cmm_long_ext.cpp -I$(OBJ_DIR) +$(OBJ_DIR)/lal_lj_sdk_long_ext.o: $(ALL_H) lal_lj_sdk_long.h lal_lj_sdk_long_ext.cpp lal_base_charge.h + $(CUDR) -o $@ -c lal_lj_sdk_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/eam.cubin: lal_eam.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_eam.cu diff --git a/lib/gpu/Opencl.makefile b/lib/gpu/Opencl.makefile index 7ef1dfba0c..4a59595313 100644 --- a/lib/gpu/Opencl.makefile +++ b/lib/gpu/Opencl.makefile @@ -32,8 +32,8 @@ OBJS = $(OBJ_DIR)/lal_atom.o $(OBJ_DIR)/lal_answer.o \ $(OBJ_DIR)/lal_coul_long.o $(OBJ_DIR)/lal_coul_long_ext.o \ $(OBJ_DIR)/lal_morse.o $(OBJ_DIR)/lal_morse_ext.o \ $(OBJ_DIR)/lal_charmm_long.o $(OBJ_DIR)/lal_charmm_long_ext.o \ - $(OBJ_DIR)/lal_cg_cmm.o $(OBJ_DIR)/lal_cg_cmm_ext.o \ - $(OBJ_DIR)/lal_cg_cmm_long.o $(OBJ_DIR)/lal_cg_cmm_long_ext.o \ + $(OBJ_DIR)/lal_lj_sdk.o $(OBJ_DIR)/lal_lj_sdk_ext.o \ + $(OBJ_DIR)/lal_lj_sdk_long.o $(OBJ_DIR)/lal_lj_sdk_long_ext.o \ $(OBJ_DIR)/lal_eam.o $(OBJ_DIR)/lal_eam_ext.o \ $(OBJ_DIR)/lal_eam_fs_ext.o $(OBJ_DIR)/lal_eam_alloy_ext.o \ $(OBJ_DIR)/lal_buck.o $(OBJ_DIR)/lal_buck_ext.o \ @@ -75,8 +75,8 @@ KERS = $(OBJ_DIR)/device_cl.h $(OBJ_DIR)/atom_cl.h \ $(OBJ_DIR)/lj_coul_long_cl.h $(OBJ_DIR)/lj_dsf_cl.h \ $(OBJ_DIR)/lj_class2_long_cl.h \ $(OBJ_DIR)/coul_long_cl.h $(OBJ_DIR)/morse_cl.h \ - $(OBJ_DIR)/charmm_long_cl.h $(OBJ_DIR)/cg_cmm_cl.h \ - $(OBJ_DIR)/cg_cmm_long_cl.h $(OBJ_DIR)/neighbor_gpu_cl.h \ + $(OBJ_DIR)/charmm_long_cl.h $(OBJ_DIR)/lj_sdk_cl.h \ + $(OBJ_DIR)/lj_sdk_long_cl.h $(OBJ_DIR)/neighbor_gpu_cl.h \ $(OBJ_DIR)/eam_cl.h $(OBJ_DIR)/buck_cl.h \ $(OBJ_DIR)/buck_coul_cl.h $(OBJ_DIR)/buck_coul_long_cl.h \ $(OBJ_DIR)/table_cl.h $(OBJ_DIR)/yukawa_cl.h \ @@ -273,23 +273,23 @@ $(OBJ_DIR)/lal_lj_expand.o: $(ALL_H) lal_lj_expand.h lal_lj_expand.cpp $(OBJ_DI $(OBJ_DIR)/lal_lj_expand_ext.o: $(ALL_H) lal_lj_expand.h lal_lj_expand_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_lj_expand_ext.cpp -I$(OBJ_DIR) -$(OBJ_DIR)/cg_cmm_cl.h: lal_cg_cmm.cu $(PRE1_H) - $(BSH) ./geryon/file_to_cstr.sh cg_cmm $(PRE1_H) lal_cg_cmm.cu $(OBJ_DIR)/cg_cmm_cl.h; +$(OBJ_DIR)/lj_sdk_cl.h: lal_lj_sdk.cu $(PRE1_H) + $(BSH) ./geryon/file_to_cstr.sh lj_sdk $(PRE1_H) lal_lj_sdk.cu $(OBJ_DIR)/lj_sdk_cl.h; -$(OBJ_DIR)/lal_cg_cmm.o: $(ALL_H) lal_cg_cmm.h lal_cg_cmm.cpp $(OBJ_DIR)/cg_cmm_cl.h $(OBJ_DIR)/cg_cmm_cl.h $(OBJ_DIR)/lal_base_atomic.o - $(OCL) -o $@ -c lal_cg_cmm.cpp -I$(OBJ_DIR) +$(OBJ_DIR)/lal_lj_sdk.o: $(ALL_H) lal_lj_sdk.h lal_lj_sdk.cpp $(OBJ_DIR)/lj_sdk_cl.h $(OBJ_DIR)/lj_sdk_cl.h $(OBJ_DIR)/lal_base_atomic.o + $(OCL) -o $@ -c lal_lj_sdk.cpp -I$(OBJ_DIR) -$(OBJ_DIR)/lal_cg_cmm_ext.o: $(ALL_H) lal_cg_cmm.h lal_cg_cmm_ext.cpp lal_base_atomic.h - $(OCL) -o $@ -c lal_cg_cmm_ext.cpp -I$(OBJ_DIR) +$(OBJ_DIR)/lal_lj_sdk_ext.o: $(ALL_H) lal_lj_sdk.h lal_lj_sdk_ext.cpp lal_base_atomic.h + $(OCL) -o $@ -c lal_lj_sdk_ext.cpp -I$(OBJ_DIR) -$(OBJ_DIR)/cg_cmm_long_cl.h: lal_cg_cmm_long.cu $(PRE1_H) - $(BSH) ./geryon/file_to_cstr.sh cg_cmm_long $(PRE1_H) lal_cg_cmm_long.cu $(OBJ_DIR)/cg_cmm_long_cl.h; +$(OBJ_DIR)/lj_sdk_long_cl.h: lal_lj_sdk_long.cu $(PRE1_H) + $(BSH) ./geryon/file_to_cstr.sh lj_sdk_long $(PRE1_H) lal_lj_sdk_long.cu $(OBJ_DIR)/lj_sdk_long_cl.h; -$(OBJ_DIR)/lal_cg_cmm_long.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long.cpp $(OBJ_DIR)/cg_cmm_long_cl.h $(OBJ_DIR)/cg_cmm_long_cl.h $(OBJ_DIR)/lal_base_atomic.o - $(OCL) -o $@ -c lal_cg_cmm_long.cpp -I$(OBJ_DIR) +$(OBJ_DIR)/lal_lj_sdk_long.o: $(ALL_H) lal_lj_sdk_long.h lal_lj_sdk_long.cpp $(OBJ_DIR)/lj_sdk_long_cl.h $(OBJ_DIR)/lj_sdk_long_cl.h $(OBJ_DIR)/lal_base_atomic.o + $(OCL) -o $@ -c lal_lj_sdk_long.cpp -I$(OBJ_DIR) -$(OBJ_DIR)/lal_cg_cmm_long_ext.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long_ext.cpp lal_base_charge.h - $(OCL) -o $@ -c lal_cg_cmm_long_ext.cpp -I$(OBJ_DIR) +$(OBJ_DIR)/lal_lj_sdk_long_ext.o: $(ALL_H) lal_lj_sdk_long.h lal_lj_sdk_long_ext.cpp lal_base_charge.h + $(OCL) -o $@ -c lal_lj_sdk_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/eam_cl.h: lal_eam.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh eam $(PRE1_H) lal_eam.cu $(OBJ_DIR)/eam_cl.h; diff --git a/lib/gpu/lal_cg_cmm.cpp b/lib/gpu/lal_cg_cmm.cpp index d361e32b09..618555e38a 100644 --- a/lib/gpu/lal_cg_cmm.cpp +++ b/lib/gpu/lal_cg_cmm.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - cg_cmm.cpp + lj_sdk.cpp ------------------- W. Michael Brown (ORNL) @@ -14,14 +14,14 @@ ***************************************************************************/ #if defined(USE_OPENCL) -#include "cg_cmm_cl.h" +#include "lj_sdk_cl.h" #elif defined(USE_CUDART) -const char *cg_cmm=0; +const char *lj_sdk=0; #else -#include "cg_cmm_cubin.h" +#include "lj_sdk_cubin.h" #endif -#include "lal_cg_cmm.h" +#include "lal_lj_sdk.h" #include using namespace LAMMPS_AL; #define CGCMMT CGCMM @@ -53,33 +53,33 @@ int CGCMMT::init(const int ntypes, double **host_cutsq, const double gpu_split, FILE *_screen) { int success; success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,gpu_split, - _screen,cg_cmm,"k_cg_cmm"); + _screen,lj_sdk,"k_lj_sdk"); if (success!=0) return success; // If atom type constants fit in shared memory use fast kernel - int cmm_types=ntypes; + int sdk_types=ntypes; shared_types=false; int max_shared_types=this->device->max_shared_types(); - if (cmm_types<=max_shared_types && this->_block_size>=max_shared_types) { - cmm_types=max_shared_types; + if (sdk_types<=max_shared_types && this->_block_size>=max_shared_types) { + sdk_types=max_shared_types; shared_types=true; } - _cmm_types=cmm_types; + _sdk_types=sdk_types; // Allocate a host write buffer for data initialization - UCL_H_Vec host_write(cmm_types*cmm_types*32,*(this->ucl_device), + UCL_H_Vec host_write(sdk_types*sdk_types*32,*(this->ucl_device), UCL_WRITE_ONLY); - for (int i=0; iucl_device),UCL_READ_ONLY); - this->atom->type_pack4(ntypes,cmm_types,lj1,host_write,host_cutsq, + lj1.alloc(sdk_types*sdk_types,*(this->ucl_device),UCL_READ_ONLY); + this->atom->type_pack4(ntypes,sdk_types,lj1,host_write,host_cutsq, host_cg_type,host_lj1,host_lj2); - lj3.alloc(cmm_types*cmm_types,*(this->ucl_device),UCL_READ_ONLY); - this->atom->type_pack4(ntypes,cmm_types,lj3,host_write,host_lj3,host_lj4, + lj3.alloc(sdk_types*sdk_types,*(this->ucl_device),UCL_READ_ONLY); + this->atom->type_pack4(ntypes,sdk_types,lj3,host_write,host_lj3,host_lj4, host_offset); UCL_H_Vec dview; @@ -143,7 +143,7 @@ void CGCMMT::loop(const bool _eflag, const bool _vflag) { } else { this->k_pair.set_size(GX,BX); this->k_pair.run(&this->atom->x, &lj1, &lj3, - &_cmm_types, &sp_lj, &this->nbor->dev_nbor, + &_sdk_types, &sp_lj, &this->nbor->dev_nbor, &this->_nbor_data->begin(), &this->ans->force, &this->ans->engv, &eflag, &vflag, &ainum, &nbor_pitch, &this->_threads_per_atom); diff --git a/lib/gpu/lal_cg_cmm.cu b/lib/gpu/lal_cg_cmm.cu index 70d2ab6092..01b2cdd18d 100644 --- a/lib/gpu/lal_cg_cmm.cu +++ b/lib/gpu/lal_cg_cmm.cu @@ -1,5 +1,5 @@ // ************************************************************************** -// cg_cmm.cu +// lj_sdk.cu // ------------------- // W. Michael Brown (ORNL) // @@ -24,7 +24,7 @@ texture pos_tex; #define pos_tex x_ #endif -__kernel void k_cg_cmm(const __global numtyp4 *restrict x_, +__kernel void k_lj_sdk(const __global numtyp4 *restrict x_, const __global numtyp4 *restrict lj1, const __global numtyp4 *restrict lj3, const int lj_types, @@ -116,7 +116,7 @@ __kernel void k_cg_cmm(const __global numtyp4 *restrict x_, } // if ii } -__kernel void k_cg_cmm_fast(const __global numtyp4 *restrict x_, +__kernel void k_lj_sdk_fast(const __global numtyp4 *restrict x_, const __global numtyp4 *restrict lj1_in, const __global numtyp4 *restrict lj3_in, const __global numtyp *restrict sp_lj_in, diff --git a/lib/gpu/lal_cg_cmm.h b/lib/gpu/lal_cg_cmm.h index b7895b5898..ac2b9aafe3 100644 --- a/lib/gpu/lal_cg_cmm.h +++ b/lib/gpu/lal_cg_cmm.h @@ -1,5 +1,5 @@ /*************************************************************************** - cg_cmm.h + lj_sdk.h ------------------- W. Michael Brown (ORNL) @@ -67,7 +67,7 @@ class CGCMM : public BaseAtomic { bool shared_types; /// Number of atom types - int _cmm_types; + int _sdk_types; private: bool _allocated; diff --git a/lib/gpu/lal_cg_cmm_ext.cpp b/lib/gpu/lal_cg_cmm_ext.cpp index b6fc110b15..386106161e 100644 --- a/lib/gpu/lal_cg_cmm_ext.cpp +++ b/lib/gpu/lal_cg_cmm_ext.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - cg_cmm.h + lj_sdk.h ------------------- W. Michael Brown (ORNL) @@ -17,7 +17,7 @@ #include #include -#include "lal_cg_cmm.h" +#include "lal_lj_sdk.h" using namespace std; using namespace LAMMPS_AL; @@ -27,7 +27,7 @@ static CGCMM CMMMF; // --------------------------------------------------------------------------- // Allocate memory on host and device and copy constants to device // --------------------------------------------------------------------------- -int cmm_gpu_init(const int ntypes, double **cutsq, int **cg_types, +int sdk_gpu_init(const int ntypes, double **cutsq, int **cg_types, double **host_lj1, double **host_lj2, double **host_lj3, double **host_lj4, double **offset, double *special_lj, const int inum, const int nall, const int max_nbors, @@ -89,11 +89,11 @@ int cmm_gpu_init(const int ntypes, double **cutsq, int **cg_types, return init_ok; } -void cmm_gpu_clear() { +void sdk_gpu_clear() { CMMMF.clear(); } -int** cmm_gpu_compute_n(const int ago, const int inum_full, +int** sdk_gpu_compute_n(const int ago, const int inum_full, const int nall, double **host_x, int *host_type, double *sublo, double *subhi, tagint *tag, int **nspecial, tagint **special, const bool eflag, const bool vflag, @@ -105,7 +105,7 @@ int** cmm_gpu_compute_n(const int ago, const int inum_full, vatom, host_start, ilist, jnum, cpu_time, success); } -void cmm_gpu_compute(const int ago, const int inum_full, const int nall, +void sdk_gpu_compute(const int ago, const int inum_full, const int nall, double **host_x, int *host_type, int *ilist, int *numj, int **firstneigh, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, @@ -114,7 +114,7 @@ void cmm_gpu_compute(const int ago, const int inum_full, const int nall, firstneigh,eflag,vflag,eatom,vatom,host_start,cpu_time,success); } -double cmm_gpu_bytes() { +double sdk_gpu_bytes() { return CMMMF.host_memory_usage(); } diff --git a/lib/gpu/lal_cg_cmm_long.cpp b/lib/gpu/lal_cg_cmm_long.cpp index 14b5b7622c..46caf6bd36 100644 --- a/lib/gpu/lal_cg_cmm_long.cpp +++ b/lib/gpu/lal_cg_cmm_long.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - cg_cmm_long.cpp + lj_sdk_long.cpp ------------------- W. Michael Brown (ORNL) @@ -14,14 +14,14 @@ ***************************************************************************/ #if defined(USE_OPENCL) -#include "cg_cmm_long_cl.h" +#include "lj_sdk_long_cl.h" #elif defined(USE_CUDART) -const char *cg_cmm_long=0; +const char *lj_sdk_long=0; #else -#include "cg_cmm_long_cubin.h" +#include "lj_sdk_long_cubin.h" #endif -#include "lal_cg_cmm_long.h" +#include "lal_lj_sdk_long.h" #include using namespace LAMMPS_AL; #define CGCMMLongT CGCMMLong @@ -58,7 +58,7 @@ int CGCMMLongT::init(const int ntypes, double **host_cutsq, const double g_ewald) { int success; success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,gpu_split, - _screen,cg_cmm_long,"k_cg_cmm_long"); + _screen,lj_sdk_long,"k_lj_sdk_long"); if (success!=0) return success; diff --git a/lib/gpu/lal_cg_cmm_long.cu b/lib/gpu/lal_cg_cmm_long.cu index f6942d1809..5ff64b2254 100644 --- a/lib/gpu/lal_cg_cmm_long.cu +++ b/lib/gpu/lal_cg_cmm_long.cu @@ -1,5 +1,5 @@ // ************************************************************************** -// cg_cmm_long.cu +// lj_sdk_long.cu // ------------------- // W. Michael Brown (ORNL) // @@ -29,7 +29,7 @@ texture q_tex; #define q_tex q_ #endif -__kernel void k_cg_cmm_long(const __global numtyp4 *restrict x_, +__kernel void k_lj_sdk_long(const __global numtyp4 *restrict x_, const __global numtyp4 *restrict lj1, const __global numtyp4 *restrict lj3, const int lj_types, @@ -154,7 +154,7 @@ __kernel void k_cg_cmm_long(const __global numtyp4 *restrict x_, } // if ii } -__kernel void k_cg_cmm_long_fast(const __global numtyp4 *restrict x_, +__kernel void k_lj_sdk_long_fast(const __global numtyp4 *restrict x_, const __global numtyp4 *restrict lj1_in, const __global numtyp4 *restrict lj3_in, const __global numtyp *restrict sp_lj_in, diff --git a/lib/gpu/lal_cg_cmm_long.h b/lib/gpu/lal_cg_cmm_long.h index aa0cbfbaf0..f56687cd7d 100644 --- a/lib/gpu/lal_cg_cmm_long.h +++ b/lib/gpu/lal_cg_cmm_long.h @@ -1,5 +1,5 @@ /*************************************************************************** - cg_cmm_long.h + lj_sdk_long.h ------------------- W. Michael Brown (ORNL) diff --git a/lib/gpu/lal_cg_cmm_long_ext.cpp b/lib/gpu/lal_cg_cmm_long_ext.cpp index ee0a0269e5..08390d3eeb 100644 --- a/lib/gpu/lal_cg_cmm_long_ext.cpp +++ b/lib/gpu/lal_cg_cmm_long_ext.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - cg_cmm_long.h + lj_sdk_long.h ------------------- W. Michael Brown (ORNL) @@ -17,7 +17,7 @@ #include #include -#include "lal_cg_cmm_long.h" +#include "lal_lj_sdk_long.h" using namespace std; using namespace LAMMPS_AL; @@ -27,7 +27,7 @@ static CGCMMLong CMMLMF; // --------------------------------------------------------------------------- // Allocate memory on host and device and copy constants to device // --------------------------------------------------------------------------- -int cmml_gpu_init(const int ntypes, double **cutsq, int **cg_type, +int sdkl_gpu_init(const int ntypes, double **cutsq, int **cg_type, double **host_lj1, double **host_lj2, double **host_lj3, double **host_lj4, double **offset, double *special_lj, const int inum, const int nall, const int max_nbors, @@ -93,11 +93,11 @@ int cmml_gpu_init(const int ntypes, double **cutsq, int **cg_type, return init_ok; } -void cmml_gpu_clear() { +void sdkl_gpu_clear() { CMMLMF.clear(); } -int** cmml_gpu_compute_n(const int ago, const int inum_full, +int** sdkl_gpu_compute_n(const int ago, const int inum_full, const int nall, double **host_x, int *host_type, double *sublo, double *subhi, tagint *tag, int **nspecial, tagint **special, const bool eflag, const bool vflag, @@ -111,7 +111,7 @@ int** cmml_gpu_compute_n(const int ago, const int inum_full, host_q,boxlo,prd); } -void cmml_gpu_compute(const int ago, const int inum_full, const int nall, +void sdkl_gpu_compute(const int ago, const int inum_full, const int nall, double **host_x, int *host_type, int *ilist, int *numj, int **firstneigh, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, @@ -122,7 +122,7 @@ void cmml_gpu_compute(const int ago, const int inum_full, const int nall, host_q,nlocal,boxlo,prd); } -double cmml_gpu_bytes() { +double sdkl_gpu_bytes() { return CMMLMF.host_memory_usage(); } diff --git a/src/GPU/pair_lj_sdk_coul_long_gpu.cpp b/src/GPU/pair_lj_sdk_coul_long_gpu.cpp index 0b8d0f3b31..77c0dc0660 100644 --- a/src/GPU/pair_lj_sdk_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_sdk_coul_long_gpu.cpp @@ -48,7 +48,7 @@ using namespace LAMMPS_NS; // External functions from cuda library for atom decomposition -int cmml_gpu_init(const int ntypes, double **cutsq, int **lj_type, +int sdkl_gpu_init(const int ntypes, double **cutsq, int **lj_type, double **host_lj1, double **host_lj2, double **host_lj3, double **host_lj4, double **offset, double *special_lj, const int nlocal, const int nall, const int max_nbors, @@ -56,8 +56,8 @@ int cmml_gpu_init(const int ntypes, double **cutsq, int **lj_type, FILE *screen, double **host_cut_ljsq, double host_cut_coulsq, double *host_special_coul, const double qqrd2e, const double g_ewald); -void cmml_gpu_clear(); -int ** cmml_gpu_compute_n(const int ago, const int inum, const int nall, +void sdkl_gpu_clear(); +int ** sdkl_gpu_compute_n(const int ago, const int inum, const int nall, double **host_x, int *host_type, double *sublo, double *subhi, tagint *tag, int **nspecial, tagint **special, const bool eflag, const bool vflag, @@ -65,13 +65,13 @@ int ** cmml_gpu_compute_n(const int ago, const int inum, const int nall, int **ilist, int **jnum, const double cpu_time, bool &success, double *host_q, double *boxlo, double *prd); -void cmml_gpu_compute(const int ago, const int inum, const int nall, +void sdkl_gpu_compute(const int ago, const int inum, const int nall, double **host_x, int *host_type, int *ilist, int *numj, int **firstneigh, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, const double cpu_time, bool &success, double *host_q, const int nlocal, double *boxlo, double *prd); -double cmml_gpu_bytes(); +double sdkl_gpu_bytes(); #include "lj_sdk_common.h" @@ -95,7 +95,7 @@ PairLJSDKCoulLongGPU::PairLJSDKCoulLongGPU(LAMMPS *lmp) : PairLJSDKCoulLongGPU::~PairLJSDKCoulLongGPU() { - cmml_gpu_clear(); + sdkl_gpu_clear(); } /* ---------------------------------------------------------------------- */ @@ -112,7 +112,7 @@ void PairLJSDKCoulLongGPU::compute(int eflag, int vflag) int *ilist, *numneigh, **firstneigh; if (gpu_mode != GPU_FORCE) { inum = atom->nlocal; - firstneigh = cmml_gpu_compute_n(neighbor->ago, inum, nall, atom->x, + firstneigh = sdkl_gpu_compute_n(neighbor->ago, inum, nall, atom->x, atom->type, domain->sublo, domain->subhi, atom->tag, atom->nspecial, atom->special, eflag, vflag, eflag_atom, vflag_atom, @@ -124,7 +124,7 @@ void PairLJSDKCoulLongGPU::compute(int eflag, int vflag) ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; - cmml_gpu_compute(neighbor->ago, inum, nall, atom->x, atom->type, + sdkl_gpu_compute(neighbor->ago, inum, nall, atom->x, atom->type, ilist, numneigh, firstneigh, eflag, vflag, eflag_atom, vflag_atom, host_start, cpu_time, success, atom->q, atom->nlocal, domain->boxlo, domain->prd); @@ -185,7 +185,7 @@ void PairLJSDKCoulLongGPU::init_style() int maxspecial=0; if (atom->molecular) maxspecial=atom->maxspecial; - int success = cmml_gpu_init(atom->ntypes+1, cutsq, lj_type, lj1, lj2, lj3, + int success = sdkl_gpu_init(atom->ntypes+1, cutsq, lj_type, lj1, lj2, lj3, lj4, offset, force->special_lj, atom->nlocal, atom->nlocal+atom->nghost, 300, maxspecial, cell_size, gpu_mode, screen, cut_ljsq, @@ -205,7 +205,7 @@ void PairLJSDKCoulLongGPU::init_style() double PairLJSDKCoulLongGPU::memory_usage() { double bytes = Pair::memory_usage(); - return bytes + cmml_gpu_bytes(); + return bytes + sdkl_gpu_bytes(); } /* ---------------------------------------------------------------------- */ diff --git a/src/GPU/pair_lj_sdk_gpu.cpp b/src/GPU/pair_lj_sdk_gpu.cpp index e7e9b690f3..67103181d5 100644 --- a/src/GPU/pair_lj_sdk_gpu.cpp +++ b/src/GPU/pair_lj_sdk_gpu.cpp @@ -39,26 +39,26 @@ using namespace LAMMPS_NS; // External functions from cuda library for atom decomposition -int cmm_gpu_init(const int ntypes, double **cutsq, int **cg_types, +int sdk_gpu_init(const int ntypes, double **cutsq, int **cg_types, double **host_lj1, double **host_lj2, double **host_lj3, double **host_lj4, double **offset, double *special_lj, const int nlocal, const int nall, const int max_nbors, const int maxspecial, const double cell_size, int &gpu_mode, FILE *screen); -void cmm_gpu_clear(); -int ** cmm_gpu_compute_n(const int ago, const int inum, const int nall, +void sdk_gpu_clear(); +int ** sdk_gpu_compute_n(const int ago, const int inum, const int nall, double **host_x, int *host_type, double *sublo, double *subhi, tagint *tag, int **nspecial, tagint **special, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, int **ilist, int **jnum, const double cpu_time, bool &success); -void cmm_gpu_compute(const int ago, const int inum, const int nall, +void sdk_gpu_compute(const int ago, const int inum, const int nall, double **host_x, int *host_type, int *ilist, int *numj, int **firstneigh, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, const double cpu_time, bool &success); -double cmm_gpu_bytes(); +double sdk_gpu_bytes(); #include "lj_sdk_common.h" @@ -80,7 +80,7 @@ PairLJSDKGPU::PairLJSDKGPU(LAMMPS *lmp) : PairLJSDK(lmp), gpu_mode(GPU_FORCE) PairLJSDKGPU::~PairLJSDKGPU() { - cmm_gpu_clear(); + sdk_gpu_clear(); } /* ---------------------------------------------------------------------- */ @@ -97,7 +97,7 @@ void PairLJSDKGPU::compute(int eflag, int vflag) int *ilist, *numneigh, **firstneigh; if (gpu_mode != GPU_FORCE) { inum = atom->nlocal; - firstneigh = cmm_gpu_compute_n(neighbor->ago, inum, nall, atom->x, + firstneigh = sdk_gpu_compute_n(neighbor->ago, inum, nall, atom->x, atom->type, domain->sublo, domain->subhi, atom->tag, atom->nspecial, atom->special, eflag, vflag, eflag_atom, vflag_atom, @@ -108,7 +108,7 @@ void PairLJSDKGPU::compute(int eflag, int vflag) ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; - cmm_gpu_compute(neighbor->ago, inum, nall, atom->x, atom->type, + sdk_gpu_compute(neighbor->ago, inum, nall, atom->x, atom->type, ilist, numneigh, firstneigh, eflag, vflag, eflag_atom, vflag_atom, host_start, cpu_time, success); } @@ -154,7 +154,7 @@ void PairLJSDKGPU::init_style() int maxspecial=0; if (atom->molecular) maxspecial=atom->maxspecial; - int success = cmm_gpu_init(atom->ntypes+1,cutsq,lj_type,lj1,lj2,lj3,lj4, + int success = sdk_gpu_init(atom->ntypes+1,cutsq,lj_type,lj1,lj2,lj3,lj4, offset, force->special_lj, atom->nlocal, atom->nlocal+atom->nghost, 300, maxspecial, cell_size, gpu_mode, screen); @@ -172,7 +172,7 @@ void PairLJSDKGPU::init_style() double PairLJSDKGPU::memory_usage() { double bytes = Pair::memory_usage(); - return bytes + cmm_gpu_bytes(); + return bytes + sdk_gpu_bytes(); } /* ---------------------------------------------------------------------- */ -- GitLab From b8cb80b219b802d9713e69ea13699c8771be25e0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Apr 2017 19:46:10 -0400 Subject: [PATCH 064/593] rename files in GPU library from cg_cmm to lj_sdk --- lib/gpu/{lal_cg_cmm.cpp => lal_lj_sdk.cpp} | 0 lib/gpu/{lal_cg_cmm.cu => lal_lj_sdk.cu} | 0 lib/gpu/{lal_cg_cmm.h => lal_lj_sdk.h} | 0 lib/gpu/{lal_cg_cmm_ext.cpp => lal_lj_sdk_ext.cpp} | 0 lib/gpu/{lal_cg_cmm_long.cpp => lal_lj_sdk_long.cpp} | 0 lib/gpu/{lal_cg_cmm_long.cu => lal_lj_sdk_long.cu} | 0 lib/gpu/{lal_cg_cmm_long.h => lal_lj_sdk_long.h} | 0 lib/gpu/{lal_cg_cmm_long_ext.cpp => lal_lj_sdk_long_ext.cpp} | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename lib/gpu/{lal_cg_cmm.cpp => lal_lj_sdk.cpp} (100%) rename lib/gpu/{lal_cg_cmm.cu => lal_lj_sdk.cu} (100%) rename lib/gpu/{lal_cg_cmm.h => lal_lj_sdk.h} (100%) rename lib/gpu/{lal_cg_cmm_ext.cpp => lal_lj_sdk_ext.cpp} (100%) rename lib/gpu/{lal_cg_cmm_long.cpp => lal_lj_sdk_long.cpp} (100%) rename lib/gpu/{lal_cg_cmm_long.cu => lal_lj_sdk_long.cu} (100%) rename lib/gpu/{lal_cg_cmm_long.h => lal_lj_sdk_long.h} (100%) rename lib/gpu/{lal_cg_cmm_long_ext.cpp => lal_lj_sdk_long_ext.cpp} (100%) diff --git a/lib/gpu/lal_cg_cmm.cpp b/lib/gpu/lal_lj_sdk.cpp similarity index 100% rename from lib/gpu/lal_cg_cmm.cpp rename to lib/gpu/lal_lj_sdk.cpp diff --git a/lib/gpu/lal_cg_cmm.cu b/lib/gpu/lal_lj_sdk.cu similarity index 100% rename from lib/gpu/lal_cg_cmm.cu rename to lib/gpu/lal_lj_sdk.cu diff --git a/lib/gpu/lal_cg_cmm.h b/lib/gpu/lal_lj_sdk.h similarity index 100% rename from lib/gpu/lal_cg_cmm.h rename to lib/gpu/lal_lj_sdk.h diff --git a/lib/gpu/lal_cg_cmm_ext.cpp b/lib/gpu/lal_lj_sdk_ext.cpp similarity index 100% rename from lib/gpu/lal_cg_cmm_ext.cpp rename to lib/gpu/lal_lj_sdk_ext.cpp diff --git a/lib/gpu/lal_cg_cmm_long.cpp b/lib/gpu/lal_lj_sdk_long.cpp similarity index 100% rename from lib/gpu/lal_cg_cmm_long.cpp rename to lib/gpu/lal_lj_sdk_long.cpp diff --git a/lib/gpu/lal_cg_cmm_long.cu b/lib/gpu/lal_lj_sdk_long.cu similarity index 100% rename from lib/gpu/lal_cg_cmm_long.cu rename to lib/gpu/lal_lj_sdk_long.cu diff --git a/lib/gpu/lal_cg_cmm_long.h b/lib/gpu/lal_lj_sdk_long.h similarity index 100% rename from lib/gpu/lal_cg_cmm_long.h rename to lib/gpu/lal_lj_sdk_long.h diff --git a/lib/gpu/lal_cg_cmm_long_ext.cpp b/lib/gpu/lal_lj_sdk_long_ext.cpp similarity index 100% rename from lib/gpu/lal_cg_cmm_long_ext.cpp rename to lib/gpu/lal_lj_sdk_long_ext.cpp -- GitLab From 7d9670bc6c4865d96431e256a0287fc797c971ae Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Fri, 28 Apr 2017 14:48:34 -0500 Subject: [PATCH 065/593] Addition of potential, code modifications to incorporate multicomponent spline MEAM in pair_meam_spline. Backwards compatible with previous version of pair_meam_spline. --- potentials/TiO.meam.spline | 130 +++++++ src/USER-MISC/pair_meam_spline.cpp | 601 +++++++++++++++++++---------- src/USER-MISC/pair_meam_spline.h | 50 ++- 3 files changed, 568 insertions(+), 213 deletions(-) create mode 100644 potentials/TiO.meam.spline diff --git a/potentials/TiO.meam.spline b/potentials/TiO.meam.spline new file mode 100644 index 0000000000..ed2a67a962 --- /dev/null +++ b/potentials/TiO.meam.spline @@ -0,0 +1,130 @@ +# Ti-O cubic spline potential where O is in the dilute limit. DATE: 2016-06-05 CONTRIBUTOR: Pinchao Zhang, Dallas R. Trinkle +meam/spline 2 Ti O +spline3eq +13 +-20 0 +1.742692837 3.744277175966 99.4865081627958 +2.05580176725 0.910839730906 10.8702523265355 +2.3689106975 0.388045896634 -1.55322418749562 +2.68201962775 -0.018840906533 2.43630041329215 +2.995128558 -0.248098929639 2.67912713976835 +3.30823748825 -0.264489550297 -0.125056384603077 +3.6213464185 -0.227196189283 1.10662555360438 +3.93445534875 -0.129293090176 -0.592053676745914 +4.247564279 -0.059685366933 -0.470123414607672 +4.56067320925 -0.031100025561 -0.0380739973059663 +4.8737821395 -0.013847363202 -0.0711547960695406 +5.18689106975 -0.003203412728 -0.081768292420175 +5.5 0 -0.0571422964883619 +spline3eq +5 +0.155001355787331 0 +1.9 0.533321679606674 0 +2.8 0.456402081843862 -1.60311717015859 +3.7 -0.324281383502201 1.19940299483249 +4.6 -0.474029826906675 1.47909794595154 +5.5 0 -2.49521499855605 +spline3eq +13 +0 0 +1.742692837 0 0 +2.05580176725 0 0 +2.3689106975 0 0 +2.68201962775 0 0 +2.995128558 0 0 +3.30823748825 0 0 +3.6213464185 0 0 +3.93445534875 0 0 +4.247564279 0 0 +4.56067320925 0 0 +4.8737821395 0 0 +5.18689106975 0 0 +5.5 0 0 +spline3eq +11 +-1 0 +2.055801767 1.7475279661 -525.869786904802 +2.2912215903 -5.8677963945 252.796316927755 +2.5266414136 -8.3376288737 71.7318388721015 +2.7620612369 -5.8398712842 -1.93587742753693 +2.9974810602 -3.1140648231 -39.2999192667503 +3.2329008835 -1.7257245065 14.3424136002004 +3.4683207068 -0.4428977017 -29.4925534559498 +3.7037405301 -0.1466643003 -3.18010534572236 +3.9391603534 -0.2095507945 3.33490838803603 +4.1745801767 -0.1442384563 3.71918691359508 +4.41 0 -9.66717019857564 +spline3eq +5 +-61.9827585211652 0 +1.9 11.2293641315584 0 +2.8 -27.9976343076148 122.648031332411 +3.7 -8.32979773113248 -54.3340881766381 +4.6 -1.00863195297399 3.23150064581724 +5.5 0 -5.3514242228123 +spline3eq +4 +0.00776934946045395 0.105197706160344 +-55.14233165 -0.29745568008 0.00152870603877451 +-44.7409899033333 -0.15449458722 0.00038933722543571 +-34.3396481566667 0.05098657168 0.00038124926922248 +-23.93830641 0.57342694704 0.0156639264890892 +spline3eq +5 +-0.00676745157022662 -0.0159520381982146 +-23.9928 0.297607384684645 0 +-15.9241175 0.216691597077105 -0.0024248755353942 +-7.855435 0.0637598673719069 0.00306245895013358 +0.213247499999998 -0.00183450621970427 -0.00177588407633909 +8.28193 -0.111277018874367 0 +spline3eq +10 +2.77327511656661 0 +2.055801767 -0.1485215264 72.2010867146919 +2.31737934844444 1.6845304918 -47.2744689053404 +2.57895692988889 2.0113365977 -15.1859578405326 +2.84053451133333 1.1444092747 3.33978204841873 +3.10211209277778 0.2861606803 2.587867603808 +3.36368967422222 -0.3459281126 6.14070694084556 +3.62526725566667 -0.6257480601 3.7397696717154 +3.88684483711111 -0.6119510826 4.64749084871402 +4.14842241855556 -0.3112059651 2.83275746415936 +4.41 0 -15.0612086827734 +spline3eq +5 +12.3315547862781 0 +1.9 2.62105440156724 0 +2.8 10.2850803058354 -25.439802988016 +3.7 3.23933763743897 -7.20203673434025 +4.6 -5.79049355858613 39.5509978688682 +5.5 0 -41.221771373642 +spline3eq +8 +8.33642274810572 -60.4024574736564 +-1 0.07651409193 -110.652321293778 +-0.724509054371429 0.14155824541 44.8853405500508 +-0.449018108742857 0.75788697341 -25.3065115342002 +-0.173527163114286 0.63011570378 -2.48510144915082 +0.101963782514286 0.09049597305 2.68769386908235 +0.377454728142857 -0.35741586657 -1.01558570129633 +0.652945673771428 -0.65293217647 13.4224786001212 +0.9284366194 -6.00912190653 -452.752542694929 +spline3eq +5 +0.137191606537625 -1.55094230968985 +-1 0.0513843442016519 0 +-0.5 0.0179024412245673 -2.44986494990154 +0 -0.260650876879273 3.91774583656401 +0.5 -0.190163791764901 -4.84414871911743 +1 -0.763795416646599 0 +spline3eq +8 +0 0 +-1 0 0 +-0.724509054371429 0 0 +-0.449018108742857 0 0 +-0.173527163114286 0 0 +0.101963782514286 0 0 +0.377454728142857 0 0 +0.652945673771428 0 0 +0.9284366194 0 0 diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 614661ad55..4ee5989473 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -13,6 +13,8 @@ /* ---------------------------------------------------------------------- Contributing author: Alexander Stukowski (LLNL), alex@stukowski.com + Will Tipton (Cornell), wwt26@cornell.edu + Dallas R. Trinkle (UIUC), dtrinkle@illinois.edu / Pinchao Zhang (UIUC) see LLNL copyright notice at bottom of file ------------------------------------------------------------------------- */ @@ -23,12 +25,14 @@ * 25-Mar-11 - AS: Fixed calculation of per-atom virial stress. * 11-Apr-11 - AS: Adapted code to new memory management of LAMMPS. * 24-Sep-11 - AS: Adapted code to new interface of Error::one() function. + * 20-Jun-13 - WT: Added support for multiple species types + * 25-Apr-17 - DRT/PZ: Modified format of multiple species type to conform with pairing ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include "math.h" +#include "stdio.h" +#include "stdlib.h" +#include "string.h" #include "pair_meam_spline.h" #include "atom.h" #include "force.h" @@ -39,6 +43,9 @@ #include "neigh_request.h" #include "memory.h" #include "error.h" +#include + +using namespace std; using namespace LAMMPS_NS; @@ -49,7 +56,6 @@ PairMEAMSpline::PairMEAMSpline(LAMMPS *lmp) : Pair(lmp) single_enable = 0; restartinfo = 0; one_coeff = 1; - manybody_flag = 1; nelements = 0; elements = NULL; @@ -77,6 +83,15 @@ PairMEAMSpline::~PairMEAMSpline() if(allocated) { memory->destroy(setflag); memory->destroy(cutsq); + + delete[] phis; + delete[] Us; + delete[] rhos; + delete[] fs; + delete[] gs; + + delete[] zero_atom_energies; + delete [] map; } } @@ -85,11 +100,12 @@ PairMEAMSpline::~PairMEAMSpline() void PairMEAMSpline::compute(int eflag, int vflag) { - if (eflag || vflag) ev_setup(eflag, vflag); - else evflag = vflag_fdotr = - eflag_global = vflag_global = eflag_atom = vflag_atom = 0; - - double cutforcesq = cutoff*cutoff; + if (eflag || vflag) { + ev_setup(eflag, vflag); + } else { + evflag = vflag_fdotr = eflag_global = 0; + vflag_global = eflag_atom = vflag_atom = 0; + } // Grow per-atom array if necessary @@ -99,22 +115,13 @@ void PairMEAMSpline::compute(int eflag, int vflag) memory->create(Uprime_values,nmax,"pair:Uprime"); } - double** const x = atom->x; - double** forces = atom->f; - int nlocal = atom->nlocal; - bool newton_pair = force->newton_pair; - - int inum_full = listfull->inum; - int* ilist_full = listfull->ilist; - int* numneigh_full = listfull->numneigh; - int** firstneigh_full = listfull->firstneigh; - // Determine the maximum number of neighbors a single atom has int newMaxNeighbors = 0; - for(int ii = 0; ii < inum_full; ii++) { - int jnum = numneigh_full[ilist_full[ii]]; - if(jnum > newMaxNeighbors) newMaxNeighbors = jnum; + for(int ii = 0; ii < listfull->inum; ii++) { + int jnum = listfull->numneigh[listfull->ilist[ii]]; + if(jnum > newMaxNeighbors) + newMaxNeighbors = jnum; } // Allocate array for temporary bond info @@ -126,35 +133,129 @@ void PairMEAMSpline::compute(int eflag, int vflag) } // Sum three-body contributions to charge density and - // compute embedding energies - - for(int ii = 0; ii < inum_full; ii++) { - int i = ilist_full[ii]; - double xtmp = x[i][0]; - double ytmp = x[i][1]; - double ztmp = x[i][2]; - int* jlist = firstneigh_full[i]; - int jnum = numneigh_full[i]; - double rho_value = 0; + // the embedding energy + + for(int ii = 0; ii < listfull->inum; ii++) { + int i = listfull->ilist[ii]; int numBonds = 0; + + // compute charge density and numBonds + + double rho_value = compute_three_body_contrib_to_charge_density(i, numBonds); + //cout<<"i "<forward_comm_pair(this); + + // Compute two-body pair interactions + compute_two_body_pair_interactions(); + + if(vflag_fdotr) + virial_fdotr_compute(); +} + + +double PairMEAMSpline::pair_density(int i) +{ + double rho_value = 0; + MEAM2Body* nextTwoBodyInfo = twoBodyInfo; + + for(int jj = 0; jj < listfull->numneigh[i]; jj++) { + int j = listfull->firstneigh[i][jj]; + j &= NEIGHMASK; + + double jdelx = atom->x[j][0] - atom->x[i][0]; + double jdely = atom->x[j][1] - atom->x[i][1]; + double jdelz = atom->x[j][2] - atom->x[i][2]; + double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; + double rij = sqrt(rij_sq); + + if(rij_sq < cutoff*cutoff) { + double rij = sqrt(rij_sq); + rho_value += rhos[i_to_potl(j)].eval(rij); + } + } + + return rho_value; +} + + + +double PairMEAMSpline::three_body_density(int i) +{ + double rho_value = 0; + int numBonds=0; + + MEAM2Body* nextTwoBodyInfo = twoBodyInfo; + + for(int jj = 0; jj < listfull->numneigh[i]; jj++) { + int j = listfull->firstneigh[i][jj]; + j &= NEIGHMASK; + + double jdelx = atom->x[j][0] - atom->x[i][0]; + double jdely = atom->x[j][1] - atom->x[i][1]; + double jdelz = atom->x[j][2] - atom->x[i][2]; + double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; + + if(rij_sq < cutoff*cutoff) { + double rij = sqrt(rij_sq); + double partial_sum = 0; + + nextTwoBodyInfo->tag = j; + nextTwoBodyInfo->r = rij; + nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); + nextTwoBodyInfo->del[0] = jdelx / rij; + nextTwoBodyInfo->del[1] = jdely / rij; + nextTwoBodyInfo->del[2] = jdelz / rij; + + for(int kk = 0; kk < numBonds; kk++) { + const MEAM2Body& bondk = twoBodyInfo[kk]; + double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + + nextTwoBodyInfo->del[1]*bondk.del[1] + + nextTwoBodyInfo->del[2]*bondk.del[2]); + partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); + } + + rho_value += nextTwoBodyInfo->f * partial_sum; + numBonds++; + nextTwoBodyInfo++; + } + } + + return rho_value; +} + +double PairMEAMSpline::compute_three_body_contrib_to_charge_density(int i, int& numBonds) { + double rho_value = 0; MEAM2Body* nextTwoBodyInfo = twoBodyInfo; - for(int jj = 0; jj < jnum; jj++) { - int j = jlist[jj]; + for(int jj = 0; jj < listfull->numneigh[i]; jj++) { + int j = listfull->firstneigh[i][jj]; j &= NEIGHMASK; - double jdelx = x[j][0] - xtmp; - double jdely = x[j][1] - ytmp; - double jdelz = x[j][2] - ztmp; + double jdelx = atom->x[j][0] - atom->x[i][0]; + double jdely = atom->x[j][1] - atom->x[i][1]; + double jdelz = atom->x[j][2] - atom->x[i][2]; double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; - if(rij_sq < cutforcesq) { + if(rij_sq < cutoff*cutoff) { double rij = sqrt(rij_sq); double partial_sum = 0; nextTwoBodyInfo->tag = j; nextTwoBodyInfo->r = rij; - nextTwoBodyInfo->f = f.eval(rij, nextTwoBodyInfo->fprime); + nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); nextTwoBodyInfo->del[0] = jdelx / rij; nextTwoBodyInfo->del[1] = jdely / rij; nextTwoBodyInfo->del[2] = jdelz / rij; @@ -164,31 +265,41 @@ void PairMEAMSpline::compute(int eflag, int vflag) double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + nextTwoBodyInfo->del[1]*bondk.del[1] + nextTwoBodyInfo->del[2]*bondk.del[2]); - partial_sum += bondk.f * g.eval(cos_theta); + partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); } rho_value += nextTwoBodyInfo->f * partial_sum; - rho_value += rho.eval(rij); + rho_value += rhos[i_to_potl(j)].eval(rij); numBonds++; nextTwoBodyInfo++; } } - // Compute embedding energy and its derivative + return rho_value; +} +double PairMEAMSpline::compute_embedding_energy_and_deriv(int eflag, int i, double rho_value) { double Uprime_i; - double embeddingEnergy = U.eval(rho_value, Uprime_i) - zero_atom_energy; + double embeddingEnergy = Us[i_to_potl(i)].eval(rho_value, Uprime_i) + - zero_atom_energies[i_to_potl(i)]; + //cout<<"Density "<del[1] + bondj.del[2]*bondk->del[2]); double g_prime; - double g_value = g.eval(cos_theta, g_prime); + double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); double f_rik_prime = bondk->fprime; double f_rik = bondk->f; @@ -237,9 +348,9 @@ void PairMEAMSpline::compute(int eflag, int vflag) forces_i[2] -= fk[2]; int k = bondk->tag; - forces[k][0] += fk[0]; - forces[k][1] += fk[1]; - forces[k][2] += fk[2]; + atom->f[k][0] += fk[0]; + atom->f[k][1] += fk[1]; + atom->f[k][2] += fk[2]; if(evflag) { double delta_ij[3]; @@ -254,76 +365,91 @@ void PairMEAMSpline::compute(int eflag, int vflag) } } - forces[i][0] -= forces_j[0]; - forces[i][1] -= forces_j[1]; - forces[i][2] -= forces_j[2]; - forces[j][0] += forces_j[0]; - forces[j][1] += forces_j[1]; - forces[j][2] += forces_j[2]; + atom->f[i][0] -= forces_j[0]; + atom->f[i][1] -= forces_j[1]; + atom->f[i][2] -= forces_j[2]; + atom->f[j][0] += forces_j[0]; + atom->f[j][1] += forces_j[1]; + atom->f[j][2] += forces_j[2]; } - forces[i][0] += forces_i[0]; - forces[i][1] += forces_i[1]; - forces[i][2] += forces_i[2]; - } - - // Communicate U'(rho) values - - comm->forward_comm_pair(this); - - int inum_half = listhalf->inum; - int* ilist_half = listhalf->ilist; - int* numneigh_half = listhalf->numneigh; - int** firstneigh_half = listhalf->firstneigh; - - // Compute two-body pair interactions + atom->f[i][0] += forces_i[0]; + atom->f[i][1] += forces_i[1]; + atom->f[i][2] += forces_i[2]; +} - for(int ii = 0; ii < inum_half; ii++) { - int i = ilist_half[ii]; - double xtmp = x[i][0]; - double ytmp = x[i][1]; - double ztmp = x[i][2]; - int* jlist = firstneigh_half[i]; - int jnum = numneigh_half[i]; +void PairMEAMSpline::compute_two_body_pair_interactions() { + for(int ii = 0; ii < listhalf->inum; ii++) { + int i = listhalf->ilist[ii]; - for(int jj = 0; jj < jnum; jj++) { - int j = jlist[jj]; + for(int jj = 0; jj < listhalf->numneigh[i]; jj++) { + int j = listhalf->firstneigh[i][jj]; j &= NEIGHMASK; double jdel[3]; - jdel[0] = x[j][0] - xtmp; - jdel[1] = x[j][1] - ytmp; - jdel[2] = x[j][2] - ztmp; + jdel[0] = atom->x[j][0] - atom->x[i][0]; + jdel[1] = atom->x[j][1] - atom->x[i][1]; + jdel[2] = atom->x[j][2] - atom->x[i][2]; double rij_sq = jdel[0]*jdel[0] + jdel[1]*jdel[1] + jdel[2]*jdel[2]; - if(rij_sq < cutforcesq) { + if(rij_sq < cutoff*cutoff) { double rij = sqrt(rij_sq); - double rho_prime; - rho.eval(rij, rho_prime); - double fpair = rho_prime * (Uprime_values[i] + Uprime_values[j]); - +// double rho_prime; +// rhos[i_to_potl(j)].eval(rij, rho_prime); +// cout<<"rho_prime "<f[i][0] += jdel[0]*fpair; + //cout<f[i][0]<f[i][1] += jdel[1]*fpair; + //cout<f[i][1]<f[i][2] += jdel[2]*fpair; + //cout<f[i][2]<f[j][0] -= jdel[0]*fpair; + //cout<f[j][0]<f[j][1] -= jdel[1]*fpair; + //cout<f[j][1]<f[j][2] -= jdel[2]*fpair; + ////cout<f[j][2]<nlocal, force->newton_pair, pair_pot, 0.0, -fpair, jdel[0], jdel[1], jdel[2]); } } } +} - if(vflag_fdotr) virial_fdotr_compute(); +/* ---------------------------------------------------------------------- + helper functions to map atom types to potential array indices +------------------------------------------------------------------------- */ + +int PairMEAMSpline::ij_to_potl(int i, int j) { + int n = atom->ntypes; + int itype = atom->type[i]; + int jtype = atom->type[j]; + + // printf("%d %d %d\n",n,itype,jtype); + return jtype - 1 + (itype-1)*n - (itype-1)*itype/2; +} + +int PairMEAMSpline::i_to_potl(int i) { + int itype = atom->type[i]; + return itype - 1; } /* ---------------------------------------------------------------------- */ @@ -331,11 +457,23 @@ void PairMEAMSpline::compute(int eflag, int vflag) void PairMEAMSpline::allocate() { allocated = 1; - int n = atom->ntypes; + int n = nelements; memory->create(setflag,n+1,n+1,"pair:setflag"); memory->create(cutsq,n+1,n+1,"pair:cutsq"); + int nmultichoose2 = n*(n+1)/2; + //Change the functional form + //f_ij->f_i + //g_i(cos\theta_ijk)->g_jk(cos\theta_ijk) + phis = new SplineFunction[nmultichoose2]; + Us = new SplineFunction[n]; + rhos = new SplineFunction[n]; + fs = new SplineFunction[n]; + gs = new SplineFunction[nmultichoose2]; + + zero_atom_energies = new double[n]; + map = new int[n+1]; } @@ -356,7 +494,8 @@ void PairMEAMSpline::coeff(int narg, char **arg) { int i,j,n; - if (!allocated) allocate(); + if (!allocated) + allocate(); if (narg != 3 + atom->ntypes) error->all(FLERR,"Incorrect args for pair coefficients"); @@ -366,45 +505,34 @@ void PairMEAMSpline::coeff(int narg, char **arg) if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) error->all(FLERR,"Incorrect args for pair coefficients"); + // read potential file: also sets the number of elements. + read_file(arg[2]); + // read args that map atom types to elements in potential file // map[i] = which element the Ith atom type is, -1 if NULL // nelements = # of unique elements // elements = list of element names - if (elements) { - for (i = 0; i < nelements; i++) delete [] elements[i]; - delete [] elements; - } - elements = new char*[atom->ntypes]; - for (i = 0; i < atom->ntypes; i++) elements[i] = NULL; - - nelements = 0; - for (i = 3; i < narg; i++) { - if (strcmp(arg[i],"NULL") == 0) { - map[i-2] = -1; - continue; - } - for (j = 0; j < nelements; j++) - if (strcmp(arg[i],elements[j]) == 0) break; - map[i-2] = j; - if (j == nelements) { - n = strlen(arg[i]) + 1; - elements[j] = new char[n]; - strcpy(elements[j],arg[i]); - nelements++; + if ((nelements == 1) && (strlen(elements[0]) == 0)) { + // old style: we only have one species, so we're either "NULL" or we match. + for (i = 3; i < narg; i++) + if (strcmp(arg[i],"NULL") == 0) + map[i-2] = -1; + else + map[i-2] = 0; + } else { + for (i = 3; i < narg; i++) { + if (strcmp(arg[i],"NULL") == 0) { + map[i-2] = -1; + continue; + } + for (j = 0; j < nelements; j++) + if (strcmp(arg[i],elements[j]) == 0) + break; + if (j < nelements) map[i-2] = j; + else error->all(FLERR,"No matching element in EAM potential file"); + } } - } - - // for now, only allow single element - - if (nelements > 1) - error->all(FLERR, - "Pair meam/spline only supports single element potentials"); - - // read potential file - - read_file(arg[2]); - // clear setflag since coeff() called once with I,J = * * n = atom->ntypes; @@ -425,65 +553,134 @@ void PairMEAMSpline::coeff(int narg, char **arg) if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); } -/* ---------------------------------------------------------------------- - set coeffs for one or more type pairs -------------------------------------------------------------------------- */ - #define MAXLINE 1024 void PairMEAMSpline::read_file(const char* filename) { - if(comm->me == 0) { - FILE *fp = force->open_potential(filename); - if(fp == NULL) { - char str[1024]; - sprintf(str,"Cannot open spline MEAM potential file %s", filename); - error->one(FLERR,str); - } - - // Skip first line of file. - char line[MAXLINE]; - fgets(line, MAXLINE, fp); - - // Parse spline functions. - phi.parse(fp, error); - rho.parse(fp, error); - U.parse(fp, error); - f.parse(fp, error); - g.parse(fp, error); - - fclose(fp); - } - - // Transfer spline functions from master processor to all other processors. - phi.communicate(world, comm->me); - rho.communicate(world, comm->me); - f.communicate(world, comm->me); - U.communicate(world, comm->me); - g.communicate(world, comm->me); - - // Calculate 'zero-point energy' of single atom in vacuum. - zero_atom_energy = U.eval(0.0); - - // Determine maximum cutoff radius of all relevant spline functions. - cutoff = 0.0; - if(phi.cutoff() > cutoff) cutoff = phi.cutoff(); - if(rho.cutoff() > cutoff) cutoff = rho.cutoff(); - if(f.cutoff() > cutoff) cutoff = f.cutoff(); - - // Set LAMMPS pair interaction flags. - for(int i = 1; i <= atom->ntypes; i++) { - for(int j = 1; j <= atom->ntypes; j++) { - setflag[i][j] = 1; - cutsq[i][j] = cutoff; - } - } + int nmultichoose2; // = (n+1)*n/2; + + if(comm->me == 0) { + FILE *fp = fopen(filename, "r"); + if(fp == NULL) { + char str[1024]; + sprintf(str,"Cannot open spline MEAM potential file %s", filename); + error->one(FLERR,str); + } + + // Skip first line of file. It's a comment. + char line[MAXLINE]; + fgets(line, MAXLINE, fp); + + // Second line holds potential type (currently just "meam/spline") in new potential format. + bool isNewFormat; + long loc = ftell(fp); + fgets(line, MAXLINE, fp); + if (strncmp(line, "meam/spline", 11) == 0) { + isNewFormat = true; + // parse the rest of the line! + char *linep = line+12, *word; + const char *sep = " ,;:-\t\n"; // overkill, but safe + word = strsep(&linep, sep); + if (! *word) + error->one(FLERR, "Need to include number of atomic species on meam/spline line in potential file"); + int n = atoi(word); + if (n<1) + error->one(FLERR, "Invalid number of atomic species on meam/spline line in potential file"); + nelements = n; + elements = new char*[n]; + for (int i=0; ione(FLERR, "Not enough atomic species in meam/spline\n"); + elements[i] = new char[strlen(word)+1]; + strcpy(elements[i], word); + } + } else { + isNewFormat = false; + nelements = 1; // old format only handles one species anyway; this is for backwards compatibility + elements = new char*[1]; + elements[0] = new char[1]; + strcpy(elements[0], ""); + fseek(fp, loc, SEEK_SET); + } + + nmultichoose2 = ((nelements+1)*nelements)/2; + // allocate!! + allocate(); + + // Parse spline functions. + + for (int i = 0; i < nmultichoose2; i++) + phis[i].parse(fp, error, isNewFormat); + for (int i = 0; i < nelements; i++) + rhos[i].parse(fp, error, isNewFormat); + for (int i = 0; i < nelements; i++) + Us[i].parse(fp, error, isNewFormat); + for (int i = 0; i < nelements; i++) + fs[i].parse(fp, error, isNewFormat); + for (int i = 0; i < nmultichoose2; i++) + gs[i].parse(fp, error, isNewFormat); + + fclose(fp); + } - //phi.writeGnuplot("phi.gp", "Phi(r)"); - //rho.writeGnuplot("rho.gp", "Rho(r)"); - //f.writeGnuplot("f.gp", "f(r)"); - //U.writeGnuplot("U.gp", "U(rho)"); - //g.writeGnuplot("g.gp", "g(x)"); + // Transfer spline functions from master processor to all other processors. + MPI_Bcast(&nelements, 1, MPI_INT, 0, world); + MPI_Bcast(&nmultichoose2, 1, MPI_INT, 0, world); + // allocate!! + if (!allocated) { + allocate(); + elements = new char*[nelements]; + } + for (int i = 0; i < nelements; ++i) { + int n; + if (comm->me == 0) + n = strlen(elements[i]); + MPI_Bcast(&n, 1, MPI_INT, 0, world); + if (comm->me != 0) + elements[i] = new char[n]; + MPI_Bcast(elements[i], n, MPI_CHAR, 0, world); + } + for (int i = 0; i < nmultichoose2; i++) + phis[i].communicate(world, comm->me); + for (int i = 0; i < nelements; i++) + rhos[i].communicate(world, comm->me); + for (int i = 0; i < nelements; i++) + fs[i].communicate(world, comm->me); + for (int i = 0; i < nelements; i++) + Us[i].communicate(world, comm->me); + for (int i = 0; i < nmultichoose2; i++) + gs[i].communicate(world, comm->me); + + // Calculate 'zero-point energy' of single atom in vacuum. + for (int i = 0; i < nelements; i++) + zero_atom_energies[i] = Us[i].eval(0.0); + + // Determine maximum cutoff radius of all relevant spline functions. + cutoff = 0.0; + for (int i = 0; i < nmultichoose2; i++) + if(phis[i].cutoff() > cutoff) + cutoff = phis[i].cutoff(); + for (int i = 0; i < nelements; i++) + if(rhos[i].cutoff() > cutoff) + cutoff = rhos[i].cutoff(); + for (int i = 0; i < nelements; i++) + if(fs[i].cutoff() > cutoff) + cutoff = fs[i].cutoff(); + + // Set LAMMPS pair interaction flags. + for(int i = 1; i <= atom->ntypes; i++) { + for(int j = 1; j <= atom->ntypes; j++) { + // setflag[i][j] = 1; + cutsq[i][j] = cutoff; // should this be squared? + } + } + + //phi.writeGnuplot("phi.gp", "Phi(r)"); + //rho.writeGnuplot("rho.gp", "Rho(r)"); + //f.writeGnuplot("f.gp", "f(r)"); + //U.writeGnuplot("U.gp", "U(rho)"); + //g.writeGnuplot("g.gp", "g(x)"); } /* ---------------------------------------------------------------------- @@ -495,12 +692,15 @@ void PairMEAMSpline::init_style() error->all(FLERR,"Pair style meam/spline requires newton pair on"); // Need both full and half neighbor list. - int irequest_full = neighbor->request(this,instance_me); + int irequest_full = neighbor->request(this); neighbor->requests[irequest_full]->id = 1; neighbor->requests[irequest_full]->half = 0; neighbor->requests[irequest_full]->full = 1; - int irequest_half = neighbor->request(this,instance_me); + int irequest_half = neighbor->request(this); neighbor->requests[irequest_half]->id = 2; + // neighbor->requests[irequest_half]->half = 0; + // neighbor->requests[irequest_half]->half_from_full = 1; + // neighbor->requests[irequest_half]->otherlist = irequest_full; } /* ---------------------------------------------------------------------- @@ -523,14 +723,13 @@ double PairMEAMSpline::init_one(int i, int j) /* ---------------------------------------------------------------------- */ -int PairMEAMSpline::pack_forward_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) +int PairMEAMSpline::pack_forward_comm(int n, int *list, double *buf, int pbc_flag, int *pbc) { int* list_iter = list; int* list_iter_end = list + n; while(list_iter != list_iter_end) *buf++ = Uprime_values[*list_iter++]; - return n; + return 1; } /* ---------------------------------------------------------------------- */ @@ -563,10 +762,14 @@ double PairMEAMSpline::memory_usage() /// Parses the spline knots from a text file. -void PairMEAMSpline::SplineFunction::parse(FILE* fp, Error* error) +void PairMEAMSpline::SplineFunction::parse(FILE* fp, Error* error, bool isNewFormat) { char line[MAXLINE]; + // If new format, read the spline format. Should always be "spline3eq" for now. + if (isNewFormat) + fgets(line, MAXLINE, fp); + // Parse number of spline knots. fgets(line, MAXLINE, fp); int n = atoi(line); @@ -578,9 +781,11 @@ void PairMEAMSpline::SplineFunction::parse(FILE* fp, Error* error) double d0 = atof(strtok(line, " \t\n\r\f")); double dN = atof(strtok(NULL, " \t\n\r\f")); init(n, d0, dN); +//printf("%s\n",line); - // Skip line. - fgets(line, MAXLINE, fp); + // Skip line in old format + if (!isNewFormat) + fgets(line, MAXLINE, fp); // Parse knot coordinates. for(int i=0; i Date: Fri, 28 Apr 2017 14:53:25 -0500 Subject: [PATCH 066/593] Cleanup on pair_meam_spline.cpp --- src/USER-MISC/pair_meam_spline.cpp | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 4ee5989473..896c7d3405 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -142,12 +142,10 @@ void PairMEAMSpline::compute(int eflag, int vflag) // compute charge density and numBonds double rho_value = compute_three_body_contrib_to_charge_density(i, numBonds); - //cout<<"i "<f[i][0] += jdel[0]*fpair; - //cout<f[i][0]<f[i][1] += jdel[1]*fpair; - //cout<f[i][1]<f[i][2] += jdel[2]*fpair; - //cout<f[i][2]<f[j][0] -= jdel[0]*fpair; - //cout<f[j][0]<f[j][1] -= jdel[1]*fpair; - //cout<f[j][1]<f[j][2] -= jdel[2]*fpair; - ////cout<f[j][2]<nlocal, force->newton_pair, pair_pot, 0.0, -fpair, jdel[0], jdel[1], jdel[2]); } @@ -443,7 +425,6 @@ int PairMEAMSpline::ij_to_potl(int i, int j) { int itype = atom->type[i]; int jtype = atom->type[j]; - // printf("%d %d %d\n",n,itype,jtype); return jtype - 1 + (itype-1)*n - (itype-1)*itype/2; } @@ -672,15 +653,10 @@ void PairMEAMSpline::read_file(const char* filename) for(int i = 1; i <= atom->ntypes; i++) { for(int j = 1; j <= atom->ntypes; j++) { // setflag[i][j] = 1; - cutsq[i][j] = cutoff; // should this be squared? + cutsq[i][j] = cutoff; } } - //phi.writeGnuplot("phi.gp", "Phi(r)"); - //rho.writeGnuplot("rho.gp", "Rho(r)"); - //f.writeGnuplot("f.gp", "f(r)"); - //U.writeGnuplot("U.gp", "U(rho)"); - //g.writeGnuplot("g.gp", "g(x)"); } /* ---------------------------------------------------------------------- @@ -781,7 +757,6 @@ void PairMEAMSpline::SplineFunction::parse(FILE* fp, Error* error, bool isNewFor double d0 = atof(strtok(line, " \t\n\r\f")); double dN = atof(strtok(NULL, " \t\n\r\f")); init(n, d0, dN); -//printf("%s\n",line); // Skip line in old format if (!isNewFormat) -- GitLab From a0b61d17b56a0ebbbce5ac33dd6c7ea970d5ab83 Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Fri, 28 Apr 2017 15:08:59 -0500 Subject: [PATCH 067/593] Updates to documentation: equation. --- doc/src/Eqs/pair_meam_spline_multicomponent.tex | 13 +++++++++++++ doc/src/pair_meam_spline.txt | 12 +++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 doc/src/Eqs/pair_meam_spline_multicomponent.tex diff --git a/doc/src/Eqs/pair_meam_spline_multicomponent.tex b/doc/src/Eqs/pair_meam_spline_multicomponent.tex new file mode 100644 index 0000000000..80296266d9 --- /dev/null +++ b/doc/src/Eqs/pair_meam_spline_multicomponent.tex @@ -0,0 +1,13 @@ +\documentclass[12pt]{article} + +\begin{document} + +$$ + E=\sum_{i Date: Fri, 28 Apr 2017 15:15:21 -0500 Subject: [PATCH 068/593] Updates to pair/meam/spline documentation. --- doc/src/Eqs/pair_meam_spline.tex | 4 ++-- doc/src/pair_meam_spline.txt | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/doc/src/Eqs/pair_meam_spline.tex b/doc/src/Eqs/pair_meam_spline.tex index 55d42f801c..d23c6cbfeb 100644 --- a/doc/src/Eqs/pair_meam_spline.tex +++ b/doc/src/Eqs/pair_meam_spline.tex @@ -3,11 +3,11 @@ \begin{document} $$ - E=\sum_{ij}\phi(r_{ij})+\sum_{i}U(\rho_{i}), + E=\sum_{i Date: Fri, 28 Apr 2017 15:31:49 -0500 Subject: [PATCH 069/593] Cleanup on equations; JPG to be constructed. --- doc/src/Eqs/pair_meam_spline.tex | 2 +- doc/src/Eqs/pair_meam_spline_multicomponent.tex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/Eqs/pair_meam_spline.tex b/doc/src/Eqs/pair_meam_spline.tex index d23c6cbfeb..ebdb084ce9 100644 --- a/doc/src/Eqs/pair_meam_spline.tex +++ b/doc/src/Eqs/pair_meam_spline.tex @@ -7,7 +7,7 @@ $$ $$ $$ - n_{i}=\sum_{j}\rho(r_{ij})+\sum_{j Date: Fri, 28 Apr 2017 20:22:22 -0500 Subject: [PATCH 070/593] Updated version of equations, documentation. --- doc/src/Eqs/pair_meam_spline.jpg | Bin 10530 -> 21186 bytes doc/src/Eqs/pair_meam_spline.tex | 1 + .../Eqs/pair_meam_spline_multicomponent.jpg | Bin 0 -> 22975 bytes .../Eqs/pair_meam_spline_multicomponent.tex | 1 + doc/src/pair_meam_spline.txt | 17 +++++++++++++---- 5 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 doc/src/Eqs/pair_meam_spline_multicomponent.jpg diff --git a/doc/src/Eqs/pair_meam_spline.jpg b/doc/src/Eqs/pair_meam_spline.jpg index 29f1c7254365939cc3e496ac40767b5a4a54a6a6..fd396d75bc1f0f6558f3538127a6861c696cea91 100644 GIT binary patch literal 21186 zcmex=Bm<7<_#hv=|r|I2c$Ng&3F_7#J8C z7#SECr5ISjYz77|Mrk-Zh*1NohKYfpJ(Gb2swRp70z9C62+g#B38sSa$^vE>n_&w` z@&C6B76BRgCHch}`2`BbdIk&@PM*FjAQKrFAZ%5TItGC&vOPEZ88)%JY~Y;n=7&?= z|3`uqp3ctk0YUz5o<6Q%PYGru78K+#F)%RX=9Lt=2RTMYL`EsF-(lcj5NF_L&|~0F zOfD{P3<&T6nVFZLmkOd$@waOrpEEFA)&-e`Do2pVnvz7#Nr{l8c=| zsYru?fq79zswXI(R2Ue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4R7! zXH++=Yh{G7(}=VE7{X3Obbl4FRZWI9-M$QUCuY0LVV@b^rhX diff --git a/doc/src/Eqs/pair_meam_spline.tex b/doc/src/Eqs/pair_meam_spline.tex index ebdb084ce9..b4f58381a4 100644 --- a/doc/src/Eqs/pair_meam_spline.tex +++ b/doc/src/Eqs/pair_meam_spline.tex @@ -1,4 +1,5 @@ \documentclass[12pt]{article} +\usepackage{amsmath} \begin{document} diff --git a/doc/src/Eqs/pair_meam_spline_multicomponent.jpg b/doc/src/Eqs/pair_meam_spline_multicomponent.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3323284005f2889801c547af712788bbd2fb49b6 GIT binary patch literal 22975 zcmex=Bm<7<_#hv=|r|I2c$Ng&3F_7#J8C z7#SECr5ISjYz77|Mrk-Zh*1NohKYfpJ(Gb2swRp70z9C62+g#B38sRHVF5FY&9DWe z`2Sl5i-3&$lKkR~`~n4IJp%>{Cr@7%kckWo5Vk5v9fQCX*`AyI44YV9HgL{(^TVm` z|0BT)PiN=&fFOT2PajvXrvx(+3kq_W7#J9G^Gb@`gB&9xBBK=8?=WyMh%@jr=rQmo zCKnet1_bzk%*@NrO9j!W_}ev*&lwml>w?Tel_SVwO-U_IW?*1Az`(#znNpmb%fP^B z!@$7)BDtWbgn@xmg@J)VxxAzR#0G_qNOnk&GXn!>3^88^S;Sck zSd3W=SgcumSZrAgz_t}JBr;So=z_&MyN>GYH z4rv_*qvJJuBp4K~^&B|Kps+?@=LxVa;LyIxvLog)&+(eHya`eT1#!!2ey0{7WI^$e z+V1zwkD*D&V1vOMgCz!Q3_cs&L#QygZt&LNs=-2oB?hmVCo^wl-pjm`c^C5;1_kEH z%)6KmGVcVl)-dm3-ov~Rt`9YZgM0}~Ylu)(U`Pi0y9(^b5@?!A0f#Ik9FbE1D7--C zfIna_}qollF;l+Tfm zkx!9NklNC>BBa8*C~=Bts57 zCFFrimqdmla5c0pl%^`-cEZ9HoI+4?RwzRr zLncExxO^%G=k`1XkUr$x2P%m{r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`%FV5ThqE|%x3ERKhJG=e&1}z&ez2xovDI6-VHvYc& z+vtb)u_*huPd`pR8uh%{^tQC*!^zmtJ1tU&^(kbE&I>&x*6pw9G=Rlphyq%5q4EB%l`a$fbTg aX!Qq%*WiA{%FzCgu?QZkI%GlZ|2F}s50gXy literal 0 HcmV?d00001 diff --git a/doc/src/Eqs/pair_meam_spline_multicomponent.tex b/doc/src/Eqs/pair_meam_spline_multicomponent.tex index 93c0ac8bde..31de1eee25 100644 --- a/doc/src/Eqs/pair_meam_spline_multicomponent.tex +++ b/doc/src/Eqs/pair_meam_spline_multicomponent.tex @@ -1,4 +1,5 @@ \documentclass[12pt]{article} +\usepackage{amsmath} \begin{document} diff --git a/doc/src/pair_meam_spline.txt b/doc/src/pair_meam_spline.txt index db446a7b80..e4d86521c9 100644 --- a/doc/src/pair_meam_spline.txt +++ b/doc/src/pair_meam_spline.txt @@ -74,7 +74,7 @@ N element names = mapping of spline-based MEAM elements to atom types :ul See the "pair_coeff"_pair_coeff.html doc page for alternate ways to specify the path for the potential file. -As an example, imagine the Ti.meam.spline file has values for Ti. If +As an example, imagine the Ti.meam.spline file has values for Ti (old style). If your LAMMPS simulation has 3 atoms types and they are all to be treated with this potentials, you would use the following pair_coeff command: @@ -87,10 +87,19 @@ in the potential file. If a mapping value is specified as NULL, the mapping is not performed. This can be used when a {meam/spline} potential is used as part of the {hybrid} pair style. The NULL values are placeholders for atom types that will be used with other -potentials. +potentials. The old-style potential maps any non-NULL species named +on the command line to that single type. -NOTE: The {meam/spline} style currently supports only single-element -MEAM potentials. It may be extended for alloy systems in the future. +An example with a two component spline (new style) is TiO.meam.spline, where +the command + +pair_coeff * * TiO.meam.spline Ti O :pre + +will map the 1st atom type to Ti and the second atom type to O. Note +in this case that the species names need to match exactly with the +names of the elements in the TiO.meam.spline file; otherwise an +error will be raised. This behavior is different than the old style +MEAM files. :line -- GitLab From 914848433a9ec47e63193373c77889ee39180788 Mon Sep 17 00:00:00 2001 From: Anders Hafreager Date: Mon, 1 May 2017 00:02:57 +0200 Subject: [PATCH 071/593] Using correct value for atom->nlocal --- src/MC/fix_gcmc.cpp | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 73758e3628..3122da4f85 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -1023,10 +1023,9 @@ void FixGCMC::attempt_molecule_translation() com_displace[1] = displace*ry; com_displace[2] = displace*rz; - int nlocal = atom->nlocal; if (regionflag) { int *mask = atom->mask; - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (atom->molecule[i] == translation_molecule) { mask[i] |= molecule_group_bit; } else { @@ -1057,7 +1056,7 @@ void FixGCMC::attempt_molecule_translation() } double energy_after = 0.0; - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (atom->molecule[i] == translation_molecule) { coord[0] = x[i][0] + com_displace[0]; coord[1] = x[i][1] + com_displace[1]; @@ -1074,7 +1073,7 @@ void FixGCMC::attempt_molecule_translation() if (energy_after_sum < MAXENERGYTEST && random_equal->uniform() < exp(beta*(energy_before_sum - energy_after_sum))) { - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (atom->molecule[i] == translation_molecule) { x[i][0] += com_displace[0]; x[i][1] += com_displace[1]; @@ -1109,9 +1108,8 @@ void FixGCMC::attempt_molecule_rotation() error->warning(FLERR,"Energy of old configuration in " "fix gcmc is > MAXENERGYTEST."); - int nlocal = atom->nlocal; int *mask = atom->mask; - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (atom->molecule[i] == rotation_molecule) { mask[i] |= molecule_group_bit; } else { @@ -1144,7 +1142,7 @@ void FixGCMC::attempt_molecule_rotation() imageint *image = atom->image; double energy_after = 0.0; int n = 0; - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (mask[i] & molecule_group_bit) { double xtmp[3]; domain->unmap(x[i],image[i],xtmp); @@ -1173,7 +1171,7 @@ void FixGCMC::attempt_molecule_rotation() random_equal->uniform() < exp(beta*(energy_before_sum - energy_after_sum))) { int n = 0; - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (mask[i] & molecule_group_bit) { image[i] = imagezero; x[i][0] = atom_coord[n][0]; @@ -1689,10 +1687,9 @@ void FixGCMC::attempt_molecule_translation_full() com_displace[1] = displace*ry; com_displace[2] = displace*rz; - int nlocal = atom->nlocal; if (regionflag) { int *mask = atom->mask; - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (atom->molecule[i] == translation_molecule) { mask[i] |= molecule_group_bit; } else { @@ -1722,7 +1719,7 @@ void FixGCMC::attempt_molecule_translation_full() com_displace[2] = displace*rz; } - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (atom->molecule[i] == translation_molecule) { x[i][0] += com_displace[0]; x[i][1] += com_displace[1]; @@ -1741,7 +1738,7 @@ void FixGCMC::attempt_molecule_translation_full() energy_stored = energy_after; } else { energy_stored = energy_before; - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (atom->molecule[i] == translation_molecule) { x[i][0] -= com_displace[0]; x[i][1] -= com_displace[1]; @@ -1766,9 +1763,8 @@ void FixGCMC::attempt_molecule_rotation_full() double energy_before = energy_stored; - int nlocal = atom->nlocal; int *mask = atom->mask; - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (atom->molecule[i] == rotation_molecule) { mask[i] |= molecule_group_bit; } else { @@ -1801,7 +1797,7 @@ void FixGCMC::attempt_molecule_rotation_full() imageint *image = atom->image; imageint image_orig[natoms_per_molecule]; int n = 0; - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (mask[i] & molecule_group_bit) { atom_coord[n][0] = x[i][0]; atom_coord[n][1] = x[i][1]; @@ -1834,7 +1830,7 @@ void FixGCMC::attempt_molecule_rotation_full() } else { energy_stored = energy_before; int n = 0; - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < atom->nlocal; i++) { if (mask[i] & molecule_group_bit) { x[i][0] = atom_coord[n][0]; x[i][1] = atom_coord[n][1]; -- GitLab From fb08dc09f3b372386ecf0e367d71452e9b526722 Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Mon, 1 May 2017 13:38:37 -0500 Subject: [PATCH 072/593] Small error in elements allocation causing seg. fault for parallel runs; fixed. --- src/USER-MISC/pair_meam_spline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 896c7d3405..5941a9f600 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -619,7 +619,7 @@ void PairMEAMSpline::read_file(const char* filename) n = strlen(elements[i]); MPI_Bcast(&n, 1, MPI_INT, 0, world); if (comm->me != 0) - elements[i] = new char[n]; + elements[i] = new char[n+1]; MPI_Bcast(elements[i], n, MPI_CHAR, 0, world); } for (int i = 0; i < nmultichoose2; i++) -- GitLab From c76d27373ecd7be40cbc1ccb163178681dfa49bc Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Mon, 1 May 2017 20:33:07 -0500 Subject: [PATCH 073/593] Another fix for seg fault in parallel allocation. --- src/USER-MISC/pair_meam_spline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 5941a9f600..92a56d12e5 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -609,7 +609,7 @@ void PairMEAMSpline::read_file(const char* filename) MPI_Bcast(&nelements, 1, MPI_INT, 0, world); MPI_Bcast(&nmultichoose2, 1, MPI_INT, 0, world); // allocate!! - if (!allocated) { + if (comm->me != 0) { allocate(); elements = new char*[nelements]; } -- GitLab From 408cc198854ca379e65e29e9997a814cb712daa3 Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Mon, 1 May 2017 20:36:09 -0500 Subject: [PATCH 074/593] Fix for seg fault. --- src/USER-MISC/pair_meam_spline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 92a56d12e5..fae39c366d 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -620,7 +620,7 @@ void PairMEAMSpline::read_file(const char* filename) MPI_Bcast(&n, 1, MPI_INT, 0, world); if (comm->me != 0) elements[i] = new char[n+1]; - MPI_Bcast(elements[i], n, MPI_CHAR, 0, world); + MPI_Bcast(elements[i], n+1, MPI_CHAR, 0, world); } for (int i = 0; i < nmultichoose2; i++) phis[i].communicate(world, comm->me); -- GitLab From f58fc9488f89dd612aa261682ec3e8ccdc756226 Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Mon, 1 May 2017 21:56:19 -0500 Subject: [PATCH 075/593] Fixed neighbor list building that caused error in parallel runs with pair_meam_spline. --- src/USER-MISC/pair_meam_spline.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index fae39c366d..ad32eb0dba 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -674,9 +674,9 @@ void PairMEAMSpline::init_style() neighbor->requests[irequest_full]->full = 1; int irequest_half = neighbor->request(this); neighbor->requests[irequest_half]->id = 2; - // neighbor->requests[irequest_half]->half = 0; - // neighbor->requests[irequest_half]->half_from_full = 1; - // neighbor->requests[irequest_half]->otherlist = irequest_full; + neighbor->requests[irequest_half]->half = 0; + neighbor->requests[irequest_half]->halffull = 1; + neighbor->requests[irequest_half]->halffulllist = irequest_full; } /* ---------------------------------------------------------------------- -- GitLab From 50c7234f269022a1191814864b9fa7977c6b0c94 Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Tue, 2 May 2017 09:43:57 -0500 Subject: [PATCH 076/593] Fix to communication for mpi. Tested, and now working correctly with MPI. --- src/USER-MISC/pair_meam_spline.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index ad32eb0dba..f3ac8905ed 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -668,15 +668,15 @@ void PairMEAMSpline::init_style() error->all(FLERR,"Pair style meam/spline requires newton pair on"); // Need both full and half neighbor list. - int irequest_full = neighbor->request(this); + int irequest_full = neighbor->request(this,instance_me); neighbor->requests[irequest_full]->id = 1; neighbor->requests[irequest_full]->half = 0; neighbor->requests[irequest_full]->full = 1; - int irequest_half = neighbor->request(this); + int irequest_half = neighbor->request(this,instance_me); neighbor->requests[irequest_half]->id = 2; - neighbor->requests[irequest_half]->half = 0; - neighbor->requests[irequest_half]->halffull = 1; - neighbor->requests[irequest_half]->halffulllist = irequest_full; + // neighbor->requests[irequest_half]->half = 1; + // neighbor->requests[irequest_half]->halffull = 1; + // neighbor->requests[irequest_half]->halffulllist = irequest_full; } /* ---------------------------------------------------------------------- @@ -705,7 +705,7 @@ int PairMEAMSpline::pack_forward_comm(int n, int *list, double *buf, int pbc_fla int* list_iter_end = list + n; while(list_iter != list_iter_end) *buf++ = Uprime_values[*list_iter++]; - return 1; + return n; } /* ---------------------------------------------------------------------- */ -- GitLab From 7adc7f02e0ac9234dc4e70b968f88eb318ea29e3 Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Wed, 3 May 2017 11:21:18 -0400 Subject: [PATCH 077/593] Stopped working on gaussian bump. --- src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp | 7 + src/USER-MANIFOLD/manifold_factory.cpp | 4 +- src/USER-MANIFOLD/manifold_gaussian_bump.cpp | 138 ++++++++++++++++++ src/USER-MANIFOLD/manifold_gaussian_bump.h | 79 ++++++++++ 4 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 src/USER-MANIFOLD/manifold_gaussian_bump.cpp create mode 100644 src/USER-MANIFOLD/manifold_gaussian_bump.h diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp index 4f6b62590d..67f298d8df 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp @@ -115,6 +115,13 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg, error->all(FLERR, "Error creating manifold arg arrays"); } + // Check if you have enough args: + if( 6 + nvars > narg ){ + char msg[2048]; + sprintf(msg, "Not enough args for manifold %s, %d expected but got %d\n", + ptr_m->id(), nvars, narg - 6); + error->all(FLERR, msg); + } // Loop over manifold args: for( int i = 0; i < nvars; ++i ){ int len = 0, offset = 0; diff --git a/src/USER-MANIFOLD/manifold_factory.cpp b/src/USER-MANIFOLD/manifold_factory.cpp index 57c6e8305f..f98180ddb6 100644 --- a/src/USER-MANIFOLD/manifold_factory.cpp +++ b/src/USER-MANIFOLD/manifold_factory.cpp @@ -37,6 +37,7 @@ #include "manifold_cylinder_dent.h" #include "manifold_dumbbell.h" #include "manifold_ellipsoid.h" +#include "manifold_gaussian_bump.h" #include "manifold_plane.h" #include "manifold_plane_wiggle.h" #include "manifold_sphere.h" @@ -58,12 +59,13 @@ manifold* LAMMPS_NS::user_manifold::create_manifold(const char *mname, make_manifold_if ( &man, mname, lmp, narg, arg ); make_manifold_if ( &man, mname, lmp, narg, arg ); make_manifold_if ( &man, mname, lmp, narg, arg ); + make_manifold_if ( &man, mname, lmp, narg, arg ); make_manifold_if ( &man, mname, lmp, narg, arg ); make_manifold_if ( &man, mname, lmp, narg, arg ); make_manifold_if ( &man, mname, lmp, narg, arg ); make_manifold_if ( &man, mname, lmp, narg, arg ); make_manifold_if ( &man, mname, lmp, narg, arg ); - make_manifold_if ( &man, mname, lmp, narg, arg ); + make_manifold_if ( &man, mname, lmp, narg, arg ); make_manifold_if ( &man, mname, lmp, narg, arg ); make_manifold_if ( &man, mname, lmp, narg, arg ); diff --git a/src/USER-MANIFOLD/manifold_gaussian_bump.cpp b/src/USER-MANIFOLD/manifold_gaussian_bump.cpp new file mode 100644 index 0000000000..200edd2fb0 --- /dev/null +++ b/src/USER-MANIFOLD/manifold_gaussian_bump.cpp @@ -0,0 +1,138 @@ +#include "manifold_gaussian_bump.h" + +using namespace LAMMPS_NS; +using namespace user_manifold; + +// The constraint is z = f(r = sqrt( x^2 + y^2) ) +// f(x) = A*exp( -x^2 / 2 l^2 ) if x < rc1 +// = a + b*x + c*x**2 + d*x**3 if rc1 <= x < rc2 +// = 0 if x >= rc2 +// +double manifold_gaussian_bump::g( const double *x ) +{ + double xf[3]; + xf[0] = x[0]; + xf[1] = x[1]; + xf[2] = 0.0; + + double x2 = dot(xf,xf); + if( x2 < rc12 ){ + return x[2] - gaussian_bump_x2( x2 ); + }else if( x2 < rc22 ){ + double rr = sqrt(x2); + double xi = rr - rc1; + xi *= inv_dr; + double xi2 = x2 * inv_dr*inv_dr; + double xi3 = xi*xi2; + return x[2] - ( aa + bb*xi + cc*xi2 + dd*xi3 ); + + }else{ + return x[2]; + } +} + +void manifold_gaussian_bump::n( const double *x, double *nn ) +{ + double xf[3]; + xf[0] = x[0]; + xf[1] = x[1]; + xf[2] = 0.0; + nn[2] = 1.0; + + double x2 = dot(xf,xf); + + if( x2 < rc12 ){ + double factor = gaussian_bump_x2(x2); + factor /= (ll*ll); + nn[0] = factor * x[0]; + nn[1] = factor * x[1]; + }else if( x2 < rc22 ){ + double rr = sqrt(x2); + double xi = rr - rc1; + xi *= inv_dr; + double xi2 = x2 * inv_dr*inv_dr; + double der = bb + 2*cc*xi + 3*dd*xi2; + + nn[0] = -der * x[0] / rr; + nn[1] = -der * x[1] / rr; + }else{ + nn[0] = nn[1] = 0.0; + } +} + +double manifold_gaussian_bump::g_and_n( const double *x, double *nn ) +{ + double xf[3]; + xf[0] = x[0]; + xf[1] = x[1]; + xf[2] = 0.0; + nn[2] = 1.0; + + double x2 = dot(xf,xf); + if( x2 < rc12 ){ + double gb = gaussian_bump_x2(x2); + double factor = gb / (ll*ll); + nn[0] = factor * x[0]; + nn[1] = factor * x[1]; + + return x[2] - gb; + }else if( x2 < rc22 ){ + + double rr = sqrt(x2); + double xi = rr - rc1; + xi *= inv_dr; + double xi2 = x2 * inv_dr*inv_dr; + double xi3 = xi*xi2; + + double der = bb + 2*cc*xi + 3*dd*xi2; + + nn[0] = -der * x[0] / rr; + nn[1] = -der * x[1] / rr; + + + return x[2] - ( aa + bb*xi + cc*xi2 + dd*xi3 ); + + }else{ + nn[0] = nn[1] = 0.0; + return x[2]; + } + +} + + +void manifold_gaussian_bump::post_param_init() +{ + // Read in the params: + AA = params[0]; + ll = params[1]; + rc1 = params[2]; + rc2 = params[3]; + + ll2 = 2.0*ll*ll; + + f_at_rc = gaussian_bump_x2 ( rc12 ); + fp_at_rc = gaussian_bump_der( rc12 ); + + rc12 = rc1*rc1; + rc22 = rc2*rc2; + dr = rc2 - rc1; + inv_dr = 1.0 / dr; +} + + +double manifold_gaussian_bump::gaussian_bump( double x ) +{ + double x2 = x*x; + return gaussian_bump_x2( x2 ); +} + +double manifold_gaussian_bump::gaussian_bump_x2( double x2 ) +{ + return AA*exp( -x2 / ll2 ); +} + +double manifold_gaussian_bump::gaussian_bump_der( double x ) +{ + double x2 = x*x; + return gaussian_bump_x2( x2 )*( -x/(ll*ll) ); +} diff --git a/src/USER-MANIFOLD/manifold_gaussian_bump.h b/src/USER-MANIFOLD/manifold_gaussian_bump.h new file mode 100644 index 0000000000..43f69fba18 --- /dev/null +++ b/src/USER-MANIFOLD/manifold_gaussian_bump.h @@ -0,0 +1,79 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. + ----------------------------------------------------------------------- + + This file is a part of the USER-MANIFOLD package. + + This package allows LAMMPS to perform MD simulations of particles + constrained on a manifold (i.e., a 2D subspace of the 3D simulation + box). It achieves this using the RATTLE constraint algorithm applied + to single-particle constraint functions g(xi,yi,zi) = 0 and their + derivative (i.e. the normal of the manifold) n = grad(g). + + It is very easy to add your own manifolds to the current zoo + (we now have sphere, a dendritic spine approximation, a 2D plane (for + testing purposes) and a wave-y plane. + See the README file for more info. + + Stefan Paquay, s.paquay@tue.nl + Applied Physics/Theory of Polymers and Soft Matter, + Eindhoven University of Technology (TU/e), The Netherlands + + Thanks to Remy Kusters at TU/e for testing. + + This software is distributed under the GNU General Public License. + +------------------------------------------------------------------------- */ + +#ifndef LMP_MANIFOLD_GAUSSIAN_BUMP_H +#define LMP_MANIFOLD_GAUSSIAN_BUMP_H + +#include "manifold.h" + +namespace LAMMPS_NS { + +namespace user_manifold { + + // A Gaussian bump with a smoothed decay to flat 2D. + class manifold_gaussian_bump : public manifold { + public: + enum { NPARAMS = 4 }; + manifold_gaussian_bump(class LAMMPS*, int, char **) : manifold(lmp) {} + virtual ~manifold_gaussian_bump(){} + + virtual double g( const double * ); + virtual void n( const double *, double * ); + + // Variant of g that computes n at the same time. + virtual double g_and_n( const double *x, double *nn ); + + static const char* type(){ return "gaussian_bump"; } + virtual const char *id() { return type(); } + + virtual int nparams(){ return NPARAMS; } + virtual void post_param_init(); + private: + // Some private constants: + double aa, bb, cc, dd, AA, ll, ll2, f_at_rc, fp_at_rc; + double rc1, rc2, rc12, rc22, dr, inv_dr; + + double gaussian_bump ( double ); + double gaussian_bump_x2 ( double ); + double gaussian_bump_der( double ); + + }; +} + +} + + +#endif // LMP_MANIFOLD_GAUSSIAN_BUMP_H -- GitLab From 7f49ee8fd7473fe97219c369b837af9b3a38087f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 3 May 2017 15:33:22 -0400 Subject: [PATCH 078/593] print warning about minimization energy with fix box/relax --- doc/src/Section_errors.txt | 6 ++++++ src/min.cpp | 9 ++++++++- src/min.h | 6 ++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/src/Section_errors.txt b/doc/src/Section_errors.txt index 832c5718ab..5e0574b390 100644 --- a/doc/src/Section_errors.txt +++ b/doc/src/Section_errors.txt @@ -11171,6 +11171,12 @@ Self-explanatory. :dd If the fix changes the timestep, the dump dcd file will not reflect the change. :dd +{Energy due to X extra global DOFs will be included in minimizer energies} :dt + +When using fixes like box/relax, the potential energy used by the minimizer +is augmented by an additional energy provided by the fix. Thus the printed +converged energy may be different from the total potential energy. :dd + {Energy tally does not account for 'zero yes'} :dt The energy removed by using the 'zero yes' flag is not accounted diff --git a/src/min.cpp b/src/min.cpp index 79d7d6a8bd..d308efb848 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -187,6 +187,8 @@ void Min::setup(int flag) update->minimize_style); if (flag) { fprintf(screen," Unit style : %s\n", update->unit_style); + fprintf(screen," Current step : " BIGINT_FORMAT "\n", + update->ntimestep); timer->print_timeout(screen); } } @@ -196,7 +198,12 @@ void Min::setup(int flag) // cannot be done in init() b/c update init() is before modify init() nextra_global = modify->min_dof(); - if (nextra_global) fextra = new double[nextra_global]; + if (nextra_global) { + fextra = new double[nextra_global]; + if (comm->me == 0 && screen) + fprintf(screen,"WARNING: Energy due to %d extra global DOFs will" + " be included in minimizer energies\n",nextra_global); + } // compute for potential energy diff --git a/src/min.h b/src/min.h index 464018e825..021198bc09 100644 --- a/src/min.h +++ b/src/min.h @@ -123,6 +123,12 @@ Minimization requires that neigh_modify settings be delay = 0, every = changed them and will restore them to their original values after the minimization. +W: Energy due to X extra global DOFs will be included in minimizer energies + +When using fixes like box/relax, the potential energy used by the minimizer +is augmented by an additional energy provided by the fix. Thus the printed +converged energy may be different from the total potential energy. + E: Minimization could not find thermo_pe compute This compute is created by the thermo command. It must have been -- GitLab From 11cb0212b7fa97b4a7955130e93690bc8eb4a7bc Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Wed, 3 May 2017 16:49:43 -0500 Subject: [PATCH 079/593] Cleanup: two space indent + no trailing spaces on lines. --- src/USER-MISC/pair_meam_spline.cpp | 714 +++++++++++++++-------------- src/USER-MISC/pair_meam_spline.h | 391 ++++++++-------- 2 files changed, 552 insertions(+), 553 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index f3ac8905ed..59fcd2c889 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -14,7 +14,8 @@ /* ---------------------------------------------------------------------- Contributing author: Alexander Stukowski (LLNL), alex@stukowski.com Will Tipton (Cornell), wwt26@cornell.edu - Dallas R. Trinkle (UIUC), dtrinkle@illinois.edu / Pinchao Zhang (UIUC) + Dallas R. Trinkle (UIUC), dtrinkle@illinois.edu + Pinchao Zhang (UIUC) see LLNL copyright notice at bottom of file ------------------------------------------------------------------------- */ @@ -26,7 +27,8 @@ * 11-Apr-11 - AS: Adapted code to new memory management of LAMMPS. * 24-Sep-11 - AS: Adapted code to new interface of Error::one() function. * 20-Jun-13 - WT: Added support for multiple species types - * 25-Apr-17 - DRT/PZ: Modified format of multiple species type to conform with pairing + * 25-Apr-17 - DRT/PZ: Modified format of multiple species type to + conform with pairing ------------------------------------------------------------------------- */ #include "math.h" @@ -166,227 +168,227 @@ void PairMEAMSpline::compute(int eflag, int vflag) double PairMEAMSpline::pair_density(int i) { - double rho_value = 0; - MEAM2Body* nextTwoBodyInfo = twoBodyInfo; + double rho_value = 0; + MEAM2Body* nextTwoBodyInfo = twoBodyInfo; - for(int jj = 0; jj < listfull->numneigh[i]; jj++) { - int j = listfull->firstneigh[i][jj]; - j &= NEIGHMASK; - - double jdelx = atom->x[j][0] - atom->x[i][0]; - double jdely = atom->x[j][1] - atom->x[i][1]; - double jdelz = atom->x[j][2] - atom->x[i][2]; - double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; - double rij = sqrt(rij_sq); - - if(rij_sq < cutoff*cutoff) { - double rij = sqrt(rij_sq); - rho_value += rhos[i_to_potl(j)].eval(rij); - } - } + for(int jj = 0; jj < listfull->numneigh[i]; jj++) { + int j = listfull->firstneigh[i][jj]; + j &= NEIGHMASK; + + double jdelx = atom->x[j][0] - atom->x[i][0]; + double jdely = atom->x[j][1] - atom->x[i][1]; + double jdelz = atom->x[j][2] - atom->x[i][2]; + double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; + double rij = sqrt(rij_sq); - return rho_value; + if(rij_sq < cutoff*cutoff) { + double rij = sqrt(rij_sq); + rho_value += rhos[i_to_potl(j)].eval(rij); + } + } + + return rho_value; } double PairMEAMSpline::three_body_density(int i) { - double rho_value = 0; - int numBonds=0; - - MEAM2Body* nextTwoBodyInfo = twoBodyInfo; + double rho_value = 0; + int numBonds=0; + + MEAM2Body* nextTwoBodyInfo = twoBodyInfo; + + for(int jj = 0; jj < listfull->numneigh[i]; jj++) { + int j = listfull->firstneigh[i][jj]; + j &= NEIGHMASK; - for(int jj = 0; jj < listfull->numneigh[i]; jj++) { - int j = listfull->firstneigh[i][jj]; - j &= NEIGHMASK; - - double jdelx = atom->x[j][0] - atom->x[i][0]; - double jdely = atom->x[j][1] - atom->x[i][1]; - double jdelz = atom->x[j][2] - atom->x[i][2]; - double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; - - if(rij_sq < cutoff*cutoff) { - double rij = sqrt(rij_sq); - double partial_sum = 0; - - nextTwoBodyInfo->tag = j; - nextTwoBodyInfo->r = rij; - nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); - nextTwoBodyInfo->del[0] = jdelx / rij; - nextTwoBodyInfo->del[1] = jdely / rij; - nextTwoBodyInfo->del[2] = jdelz / rij; - - for(int kk = 0; kk < numBonds; kk++) { - const MEAM2Body& bondk = twoBodyInfo[kk]; - double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + - nextTwoBodyInfo->del[1]*bondk.del[1] + - nextTwoBodyInfo->del[2]*bondk.del[2]); - partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); - } - - rho_value += nextTwoBodyInfo->f * partial_sum; - numBonds++; - nextTwoBodyInfo++; - } - } + double jdelx = atom->x[j][0] - atom->x[i][0]; + double jdely = atom->x[j][1] - atom->x[i][1]; + double jdelz = atom->x[j][2] - atom->x[i][2]; + double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; - return rho_value; + if(rij_sq < cutoff*cutoff) { + double rij = sqrt(rij_sq); + double partial_sum = 0; + + nextTwoBodyInfo->tag = j; + nextTwoBodyInfo->r = rij; + nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); + nextTwoBodyInfo->del[0] = jdelx / rij; + nextTwoBodyInfo->del[1] = jdely / rij; + nextTwoBodyInfo->del[2] = jdelz / rij; + + for(int kk = 0; kk < numBonds; kk++) { + const MEAM2Body& bondk = twoBodyInfo[kk]; + double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + + nextTwoBodyInfo->del[1]*bondk.del[1] + + nextTwoBodyInfo->del[2]*bondk.del[2]); + partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); + } + + rho_value += nextTwoBodyInfo->f * partial_sum; + numBonds++; + nextTwoBodyInfo++; + } + } + + return rho_value; } double PairMEAMSpline::compute_three_body_contrib_to_charge_density(int i, int& numBonds) { - double rho_value = 0; - MEAM2Body* nextTwoBodyInfo = twoBodyInfo; - - for(int jj = 0; jj < listfull->numneigh[i]; jj++) { - int j = listfull->firstneigh[i][jj]; - j &= NEIGHMASK; - - double jdelx = atom->x[j][0] - atom->x[i][0]; - double jdely = atom->x[j][1] - atom->x[i][1]; - double jdelz = atom->x[j][2] - atom->x[i][2]; - double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; - - if(rij_sq < cutoff*cutoff) { - double rij = sqrt(rij_sq); - double partial_sum = 0; - - nextTwoBodyInfo->tag = j; - nextTwoBodyInfo->r = rij; - nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); - nextTwoBodyInfo->del[0] = jdelx / rij; - nextTwoBodyInfo->del[1] = jdely / rij; - nextTwoBodyInfo->del[2] = jdelz / rij; - - for(int kk = 0; kk < numBonds; kk++) { - const MEAM2Body& bondk = twoBodyInfo[kk]; - double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + - nextTwoBodyInfo->del[1]*bondk.del[1] + - nextTwoBodyInfo->del[2]*bondk.del[2]); - partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); - } - - rho_value += nextTwoBodyInfo->f * partial_sum; - rho_value += rhos[i_to_potl(j)].eval(rij); - - numBonds++; - nextTwoBodyInfo++; + double rho_value = 0; + MEAM2Body* nextTwoBodyInfo = twoBodyInfo; + + for(int jj = 0; jj < listfull->numneigh[i]; jj++) { + int j = listfull->firstneigh[i][jj]; + j &= NEIGHMASK; + + double jdelx = atom->x[j][0] - atom->x[i][0]; + double jdely = atom->x[j][1] - atom->x[i][1]; + double jdelz = atom->x[j][2] - atom->x[i][2]; + double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; + + if(rij_sq < cutoff*cutoff) { + double rij = sqrt(rij_sq); + double partial_sum = 0; + + nextTwoBodyInfo->tag = j; + nextTwoBodyInfo->r = rij; + nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); + nextTwoBodyInfo->del[0] = jdelx / rij; + nextTwoBodyInfo->del[1] = jdely / rij; + nextTwoBodyInfo->del[2] = jdelz / rij; + + for(int kk = 0; kk < numBonds; kk++) { + const MEAM2Body& bondk = twoBodyInfo[kk]; + double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + + nextTwoBodyInfo->del[1]*bondk.del[1] + + nextTwoBodyInfo->del[2]*bondk.del[2]); + partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); } + + rho_value += nextTwoBodyInfo->f * partial_sum; + rho_value += rhos[i_to_potl(j)].eval(rij); + + numBonds++; + nextTwoBodyInfo++; } - - return rho_value; + } + + return rho_value; } double PairMEAMSpline::compute_embedding_energy_and_deriv(int eflag, int i, double rho_value) { - double Uprime_i; - double embeddingEnergy = Us[i_to_potl(i)].eval(rho_value, Uprime_i) - - zero_atom_energies[i_to_potl(i)]; - - Uprime_values[i] = Uprime_i; - if(eflag) { - if(eflag_global) - eng_vdwl += embeddingEnergy; - if(eflag_atom) - eatom[i] += embeddingEnergy; - } - return Uprime_i; -} + double Uprime_i; + double embeddingEnergy = Us[i_to_potl(i)].eval(rho_value, Uprime_i) + - zero_atom_energies[i_to_potl(i)]; + + Uprime_values[i] = Uprime_i; + if(eflag) { + if(eflag_global) + eng_vdwl += embeddingEnergy; + if(eflag_atom) + eatom[i] += embeddingEnergy; + } + return Uprime_i; +} void PairMEAMSpline::compute_three_body_contrib_to_forces(int i, int numBonds, double Uprime_i) { - double forces_i[3] = {0, 0, 0}; - - for(int jj = 0; jj < numBonds; jj++) { - const MEAM2Body bondj = twoBodyInfo[jj]; - double rij = bondj.r; - int j = bondj.tag; - - double f_rij_prime = bondj.fprime; - double f_rij = bondj.f; - - double forces_j[3] = {0, 0, 0}; - - MEAM2Body const* bondk = twoBodyInfo; - for(int kk = 0; kk < jj; kk++, ++bondk) { - double rik = bondk->r; - - double cos_theta = (bondj.del[0]*bondk->del[0] + - bondj.del[1]*bondk->del[1] + - bondj.del[2]*bondk->del[2]); - double g_prime; - double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); - double f_rik_prime = bondk->fprime; - double f_rik = bondk->f; - - double fij = -Uprime_i * g_value * f_rik * f_rij_prime; - double fik = -Uprime_i * g_value * f_rij * f_rik_prime; - - double prefactor = Uprime_i * f_rij * f_rik * g_prime; - double prefactor_ij = prefactor / rij; - double prefactor_ik = prefactor / rik; - fij += prefactor_ij * cos_theta; - fik += prefactor_ik * cos_theta; - - double fj[3], fk[3]; - - fj[0] = bondj.del[0] * fij - bondk->del[0] * prefactor_ij; - fj[1] = bondj.del[1] * fij - bondk->del[1] * prefactor_ij; - fj[2] = bondj.del[2] * fij - bondk->del[2] * prefactor_ij; - forces_j[0] += fj[0]; - forces_j[1] += fj[1]; - forces_j[2] += fj[2]; - - fk[0] = bondk->del[0] * fik - bondj.del[0] * prefactor_ik; - fk[1] = bondk->del[1] * fik - bondj.del[1] * prefactor_ik; - fk[2] = bondk->del[2] * fik - bondj.del[2] * prefactor_ik; - forces_i[0] -= fk[0]; - forces_i[1] -= fk[1]; - forces_i[2] -= fk[2]; - - int k = bondk->tag; - atom->f[k][0] += fk[0]; - atom->f[k][1] += fk[1]; - atom->f[k][2] += fk[2]; - - if(evflag) { - double delta_ij[3]; - double delta_ik[3]; - delta_ij[0] = bondj.del[0] * rij; - delta_ij[1] = bondj.del[1] * rij; - delta_ij[2] = bondj.del[2] * rij; - delta_ik[0] = bondk->del[0] * rik; - delta_ik[1] = bondk->del[1] * rik; - delta_ik[2] = bondk->del[2] * rik; - ev_tally3(i, j, k, 0.0, 0.0, fj, fk, delta_ij, delta_ik); - } + double forces_i[3] = {0, 0, 0}; + + for(int jj = 0; jj < numBonds; jj++) { + const MEAM2Body bondj = twoBodyInfo[jj]; + double rij = bondj.r; + int j = bondj.tag; + + double f_rij_prime = bondj.fprime; + double f_rij = bondj.f; + + double forces_j[3] = {0, 0, 0}; + + MEAM2Body const* bondk = twoBodyInfo; + for(int kk = 0; kk < jj; kk++, ++bondk) { + double rik = bondk->r; + + double cos_theta = (bondj.del[0]*bondk->del[0] + + bondj.del[1]*bondk->del[1] + + bondj.del[2]*bondk->del[2]); + double g_prime; + double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); + double f_rik_prime = bondk->fprime; + double f_rik = bondk->f; + + double fij = -Uprime_i * g_value * f_rik * f_rij_prime; + double fik = -Uprime_i * g_value * f_rij * f_rik_prime; + + double prefactor = Uprime_i * f_rij * f_rik * g_prime; + double prefactor_ij = prefactor / rij; + double prefactor_ik = prefactor / rik; + fij += prefactor_ij * cos_theta; + fik += prefactor_ik * cos_theta; + + double fj[3], fk[3]; + + fj[0] = bondj.del[0] * fij - bondk->del[0] * prefactor_ij; + fj[1] = bondj.del[1] * fij - bondk->del[1] * prefactor_ij; + fj[2] = bondj.del[2] * fij - bondk->del[2] * prefactor_ij; + forces_j[0] += fj[0]; + forces_j[1] += fj[1]; + forces_j[2] += fj[2]; + + fk[0] = bondk->del[0] * fik - bondj.del[0] * prefactor_ik; + fk[1] = bondk->del[1] * fik - bondj.del[1] * prefactor_ik; + fk[2] = bondk->del[2] * fik - bondj.del[2] * prefactor_ik; + forces_i[0] -= fk[0]; + forces_i[1] -= fk[1]; + forces_i[2] -= fk[2]; + + int k = bondk->tag; + atom->f[k][0] += fk[0]; + atom->f[k][1] += fk[1]; + atom->f[k][2] += fk[2]; + + if(evflag) { + double delta_ij[3]; + double delta_ik[3]; + delta_ij[0] = bondj.del[0] * rij; + delta_ij[1] = bondj.del[1] * rij; + delta_ij[2] = bondj.del[2] * rij; + delta_ik[0] = bondk->del[0] * rik; + delta_ik[1] = bondk->del[1] * rik; + delta_ik[2] = bondk->del[2] * rik; + ev_tally3(i, j, k, 0.0, 0.0, fj, fk, delta_ij, delta_ik); } - - atom->f[i][0] -= forces_j[0]; - atom->f[i][1] -= forces_j[1]; - atom->f[i][2] -= forces_j[2]; - atom->f[j][0] += forces_j[0]; - atom->f[j][1] += forces_j[1]; - atom->f[j][2] += forces_j[2]; } - - atom->f[i][0] += forces_i[0]; - atom->f[i][1] += forces_i[1]; - atom->f[i][2] += forces_i[2]; + + atom->f[i][0] -= forces_j[0]; + atom->f[i][1] -= forces_j[1]; + atom->f[i][2] -= forces_j[2]; + atom->f[j][0] += forces_j[0]; + atom->f[j][1] += forces_j[1]; + atom->f[j][2] += forces_j[2]; + } + + atom->f[i][0] += forces_i[0]; + atom->f[i][1] += forces_i[1]; + atom->f[i][2] += forces_i[2]; } void PairMEAMSpline::compute_two_body_pair_interactions() { for(int ii = 0; ii < listhalf->inum; ii++) { int i = listhalf->ilist[ii]; - + for(int jj = 0; jj < listhalf->numneigh[i]; jj++) { int j = listhalf->firstneigh[i][jj]; j &= NEIGHMASK; - + double jdel[3]; jdel[0] = atom->x[j][0] - atom->x[i][0]; - jdel[1] = atom->x[j][1] - atom->x[i][1]; + jdel[1] = atom->x[j][1] - atom->x[i][1]; jdel[2] = atom->x[j][2] - atom->x[i][2]; double rij_sq = jdel[0]*jdel[0] + jdel[1]*jdel[1] + jdel[2]*jdel[2]; - + if(rij_sq < cutoff*cutoff) { double rij = sqrt(rij_sq); @@ -421,16 +423,16 @@ void PairMEAMSpline::compute_two_body_pair_interactions() { ------------------------------------------------------------------------- */ int PairMEAMSpline::ij_to_potl(int i, int j) { - int n = atom->ntypes; - int itype = atom->type[i]; - int jtype = atom->type[j]; - - return jtype - 1 + (itype-1)*n - (itype-1)*itype/2; + int n = atom->ntypes; + int itype = atom->type[i]; + int jtype = atom->type[j]; + + return jtype - 1 + (itype-1)*n - (itype-1)*itype/2; } int PairMEAMSpline::i_to_potl(int i) { - int itype = atom->type[i]; - return itype - 1; + int itype = atom->type[i]; + return itype - 1; } /* ---------------------------------------------------------------------- */ @@ -475,7 +477,7 @@ void PairMEAMSpline::coeff(int narg, char **arg) { int i,j,n; - if (!allocated) + if (!allocated) allocate(); if (narg != 3 + atom->ntypes) @@ -495,32 +497,32 @@ void PairMEAMSpline::coeff(int narg, char **arg) // elements = list of element names if ((nelements == 1) && (strlen(elements[0]) == 0)) { - // old style: we only have one species, so we're either "NULL" or we match. - for (i = 3; i < narg; i++) - if (strcmp(arg[i],"NULL") == 0) - map[i-2] = -1; - else - map[i-2] = 0; - } else { - for (i = 3; i < narg; i++) { - if (strcmp(arg[i],"NULL") == 0) { - map[i-2] = -1; - continue; - } - for (j = 0; j < nelements; j++) - if (strcmp(arg[i],elements[j]) == 0) - break; - if (j < nelements) map[i-2] = j; - else error->all(FLERR,"No matching element in EAM potential file"); + // old style: we only have one species, so we're either "NULL" or we match. + for (i = 3; i < narg; i++) + if (strcmp(arg[i],"NULL") == 0) + map[i-2] = -1; + else + map[i-2] = 0; + } else { + for (i = 3; i < narg; i++) { + if (strcmp(arg[i],"NULL") == 0) { + map[i-2] = -1; + continue; } + for (j = 0; j < nelements; j++) + if (strcmp(arg[i],elements[j]) == 0) + break; + if (j < nelements) map[i-2] = j; + else error->all(FLERR,"No matching element in EAM potential file"); } + } // clear setflag since coeff() called once with I,J = * * - + n = atom->ntypes; for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) setflag[i][j] = 0; - + // set setflag i,j for type pairs where both are mapped to elements int count = 0; @@ -591,11 +593,11 @@ void PairMEAMSpline::read_file(const char* filename) // Parse spline functions. - for (int i = 0; i < nmultichoose2; i++) + for (int i = 0; i < nmultichoose2; i++) phis[i].parse(fp, error, isNewFormat); - for (int i = 0; i < nelements; i++) + for (int i = 0; i < nelements; i++) rhos[i].parse(fp, error, isNewFormat); - for (int i = 0; i < nelements; i++) + for (int i = 0; i < nelements; i++) Us[i].parse(fp, error, isNewFormat); for (int i = 0; i < nelements; i++) fs[i].parse(fp, error, isNewFormat); @@ -640,10 +642,10 @@ void PairMEAMSpline::read_file(const char* filename) // Determine maximum cutoff radius of all relevant spline functions. cutoff = 0.0; for (int i = 0; i < nmultichoose2; i++) - if(phis[i].cutoff() > cutoff) + if(phis[i].cutoff() > cutoff) cutoff = phis[i].cutoff(); for (int i = 0; i < nelements; i++) - if(rhos[i].cutoff() > cutoff) + if(rhos[i].cutoff() > cutoff) cutoff = rhos[i].cutoff(); for (int i = 0; i < nelements; i++) if(fs[i].cutoff() > cutoff) @@ -664,19 +666,19 @@ void PairMEAMSpline::read_file(const char* filename) ------------------------------------------------------------------------- */ void PairMEAMSpline::init_style() { - if(force->newton_pair == 0) - error->all(FLERR,"Pair style meam/spline requires newton pair on"); - - // Need both full and half neighbor list. - int irequest_full = neighbor->request(this,instance_me); - neighbor->requests[irequest_full]->id = 1; - neighbor->requests[irequest_full]->half = 0; - neighbor->requests[irequest_full]->full = 1; - int irequest_half = neighbor->request(this,instance_me); - neighbor->requests[irequest_half]->id = 2; - // neighbor->requests[irequest_half]->half = 1; - // neighbor->requests[irequest_half]->halffull = 1; - // neighbor->requests[irequest_half]->halffulllist = irequest_full; + if(force->newton_pair == 0) + error->all(FLERR,"Pair style meam/spline requires newton pair on"); + + // Need both full and half neighbor list. + int irequest_full = neighbor->request(this,instance_me); + neighbor->requests[irequest_full]->id = 1; + neighbor->requests[irequest_full]->half = 0; + neighbor->requests[irequest_full]->full = 1; + int irequest_half = neighbor->request(this,instance_me); + neighbor->requests[irequest_half]->id = 2; + // neighbor->requests[irequest_half]->half = 1; + // neighbor->requests[irequest_half]->halffull = 1; + // neighbor->requests[irequest_half]->halffulllist = irequest_full; } /* ---------------------------------------------------------------------- @@ -685,8 +687,8 @@ void PairMEAMSpline::init_style() ------------------------------------------------------------------------- */ void PairMEAMSpline::init_list(int id, NeighList *ptr) { - if(id == 1) listfull = ptr; - else if(id == 2) listhalf = ptr; + if(id == 1) listfull = ptr; + else if(id == 2) listhalf = ptr; } /* ---------------------------------------------------------------------- @@ -694,32 +696,32 @@ void PairMEAMSpline::init_list(int id, NeighList *ptr) ------------------------------------------------------------------------- */ double PairMEAMSpline::init_one(int i, int j) { - return cutoff; + return cutoff; } /* ---------------------------------------------------------------------- */ int PairMEAMSpline::pack_forward_comm(int n, int *list, double *buf, int pbc_flag, int *pbc) { - int* list_iter = list; - int* list_iter_end = list + n; - while(list_iter != list_iter_end) - *buf++ = Uprime_values[*list_iter++]; - return n; + int* list_iter = list; + int* list_iter_end = list + n; + while(list_iter != list_iter_end) + *buf++ = Uprime_values[*list_iter++]; + return n; } /* ---------------------------------------------------------------------- */ void PairMEAMSpline::unpack_forward_comm(int n, int first, double *buf) { - memcpy(&Uprime_values[first], buf, n * sizeof(buf[0])); + memcpy(&Uprime_values[first], buf, n * sizeof(buf[0])); } /* ---------------------------------------------------------------------- */ int PairMEAMSpline::pack_reverse_comm(int n, int first, double *buf) { - return 0; + return 0; } /* ---------------------------------------------------------------------- */ @@ -733,121 +735,121 @@ void PairMEAMSpline::unpack_reverse_comm(int n, int *list, double *buf) ------------------------------------------------------------------------- */ double PairMEAMSpline::memory_usage() { - return nmax * sizeof(double); // The Uprime_values array. + return nmax * sizeof(double); // The Uprime_values array. } /// Parses the spline knots from a text file. void PairMEAMSpline::SplineFunction::parse(FILE* fp, Error* error, bool isNewFormat) { - char line[MAXLINE]; - - // If new format, read the spline format. Should always be "spline3eq" for now. - if (isNewFormat) - fgets(line, MAXLINE, fp); - - // Parse number of spline knots. - fgets(line, MAXLINE, fp); - int n = atoi(line); - if(n < 2) - error->one(FLERR,"Invalid number of spline knots in MEAM potential file"); - - // Parse first derivatives at beginning and end of spline. - fgets(line, MAXLINE, fp); - double d0 = atof(strtok(line, " \t\n\r\f")); - double dN = atof(strtok(NULL, " \t\n\r\f")); - init(n, d0, dN); - - // Skip line in old format - if (!isNewFormat) - fgets(line, MAXLINE, fp); - - // Parse knot coordinates. - for(int i=0; ione(FLERR,"Invalid knot line in MEAM potential file"); - } - setKnot(i, x, y); - } - - prepareSpline(error); + char line[MAXLINE]; + + // If new format, read the spline format. Should always be "spline3eq" for now. + if (isNewFormat) + fgets(line, MAXLINE, fp); + + // Parse number of spline knots. + fgets(line, MAXLINE, fp); + int n = atoi(line); + if(n < 2) + error->one(FLERR,"Invalid number of spline knots in MEAM potential file"); + + // Parse first derivatives at beginning and end of spline. + fgets(line, MAXLINE, fp); + double d0 = atof(strtok(line, " \t\n\r\f")); + double dN = atof(strtok(NULL, " \t\n\r\f")); + init(n, d0, dN); + + // Skip line in old format + if (!isNewFormat) + fgets(line, MAXLINE, fp); + + // Parse knot coordinates. + for(int i=0; ione(FLERR,"Invalid knot line in MEAM potential file"); + } + setKnot(i, x, y); + } + + prepareSpline(error); } /// Calculates the second derivatives at the knots of the cubic spline. void PairMEAMSpline::SplineFunction::prepareSpline(Error* error) { - xmin = X[0]; - xmax = X[N-1]; - - isGridSpline = true; - h = (xmax-xmin)/(N-1); - hsq = h*h; - - double* u = new double[N]; - Y2[0] = -0.5; - u[0] = (3.0/(X[1]-X[0])) * ((Y[1]-Y[0])/(X[1]-X[0]) - deriv0); - for(int i = 1; i <= N-2; i++) { - double sig = (X[i]-X[i-1]) / (X[i+1]-X[i-1]); - double p = sig * Y2[i-1] + 2.0; - Y2[i] = (sig - 1.0) / p; - u[i] = (Y[i+1]-Y[i]) / (X[i+1]-X[i]) - (Y[i]-Y[i-1])/(X[i]-X[i-1]); - u[i] = (6.0 * u[i]/(X[i+1]-X[i-1]) - sig*u[i-1])/p; - - if(fabs(h*i+xmin - X[i]) > 1e-8) - isGridSpline = false; - } - - double qn = 0.5; - double un = (3.0/(X[N-1]-X[N-2])) * (derivN - (Y[N-1]-Y[N-2])/(X[N-1]-X[N-2])); - Y2[N-1] = (un - qn*u[N-2]) / (qn * Y2[N-2] + 1.0); - for(int k = N-2; k >= 0; k--) { - Y2[k] = Y2[k] * Y2[k+1] + u[k]; - } - - delete[] u; - + xmin = X[0]; + xmax = X[N-1]; + + isGridSpline = true; + h = (xmax-xmin)/(N-1); + hsq = h*h; + + double* u = new double[N]; + Y2[0] = -0.5; + u[0] = (3.0/(X[1]-X[0])) * ((Y[1]-Y[0])/(X[1]-X[0]) - deriv0); + for(int i = 1; i <= N-2; i++) { + double sig = (X[i]-X[i-1]) / (X[i+1]-X[i-1]); + double p = sig * Y2[i-1] + 2.0; + Y2[i] = (sig - 1.0) / p; + u[i] = (Y[i+1]-Y[i]) / (X[i+1]-X[i]) - (Y[i]-Y[i-1])/(X[i]-X[i-1]); + u[i] = (6.0 * u[i]/(X[i+1]-X[i-1]) - sig*u[i-1])/p; + + if(fabs(h*i+xmin - X[i]) > 1e-8) + isGridSpline = false; + } + + double qn = 0.5; + double un = (3.0/(X[N-1]-X[N-2])) * (derivN - (Y[N-1]-Y[N-2])/(X[N-1]-X[N-2])); + Y2[N-1] = (un - qn*u[N-2]) / (qn * Y2[N-2] + 1.0); + for(int k = N-2; k >= 0; k--) { + Y2[k] = Y2[k] * Y2[k+1] + u[k]; + } + + delete[] u; + #if !SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES - if(!isGridSpline) - error->one(FLERR,"Support for MEAM potentials with non-uniform cubic splines has not been enabled in the MEAM potential code. Set SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES in pair_spline_meam.h to 1 to enable it"); + if(!isGridSpline) + error->one(FLERR,"Support for MEAM potentials with non-uniform cubic splines has not been enabled in the MEAM potential code. Set SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES in pair_spline_meam.h to 1 to enable it"); #endif - // Shift the spline to X=0 to speed up interpolation. - for(int i = 0; i < N; i++) { - Xs[i] = X[i] - xmin; + // Shift the spline to X=0 to speed up interpolation. + for(int i = 0; i < N; i++) { + Xs[i] = X[i] - xmin; #if !SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES - if(i < N-1) Ydelta[i] = (Y[i+1]-Y[i])/h; - Y2[i] /= h*6.0; + if(i < N-1) Ydelta[i] = (Y[i+1]-Y[i])/h; + Y2[i] /= h*6.0; #endif - } - xmax_shifted = xmax - xmin; + } + xmax_shifted = xmax - xmin; } /// Broadcasts the spline function parameters to all processors. void PairMEAMSpline::SplineFunction::communicate(MPI_Comm& world, int me) { - MPI_Bcast(&N, 1, MPI_INT, 0, world); - MPI_Bcast(&deriv0, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&derivN, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&xmin, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&xmax, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&xmax_shifted, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&isGridSpline, 1, MPI_INT, 0, world); - MPI_Bcast(&h, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&hsq, 1, MPI_DOUBLE, 0, world); - if(me != 0) { - X = new double[N]; - Xs = new double[N]; - Y = new double[N]; - Y2 = new double[N]; - Ydelta = new double[N]; - } - MPI_Bcast(X, N, MPI_DOUBLE, 0, world); - MPI_Bcast(Xs, N, MPI_DOUBLE, 0, world); - MPI_Bcast(Y, N, MPI_DOUBLE, 0, world); - MPI_Bcast(Y2, N, MPI_DOUBLE, 0, world); - MPI_Bcast(Ydelta, N, MPI_DOUBLE, 0, world); + MPI_Bcast(&N, 1, MPI_INT, 0, world); + MPI_Bcast(&deriv0, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&derivN, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&xmin, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&xmax, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&xmax_shifted, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&isGridSpline, 1, MPI_INT, 0, world); + MPI_Bcast(&h, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&hsq, 1, MPI_DOUBLE, 0, world); + if(me != 0) { + X = new double[N]; + Xs = new double[N]; + Y = new double[N]; + Y2 = new double[N]; + Ydelta = new double[N]; + } + MPI_Bcast(X, N, MPI_DOUBLE, 0, world); + MPI_Bcast(Xs, N, MPI_DOUBLE, 0, world); + MPI_Bcast(Y, N, MPI_DOUBLE, 0, world); + MPI_Bcast(Y2, N, MPI_DOUBLE, 0, world); + MPI_Bcast(Ydelta, N, MPI_DOUBLE, 0, world); } /// Writes a Gnuplot script that plots the spline function. @@ -855,24 +857,24 @@ void PairMEAMSpline::SplineFunction::communicate(MPI_Comm& world, int me) /// This function is for debugging only! void PairMEAMSpline::SplineFunction::writeGnuplot(const char* filename, const char* title) const { - FILE* fp = fopen(filename, "w"); - fprintf(fp, "#!/usr/bin/env gnuplot\n"); - if(title) fprintf(fp, "set title \"%s\"\n", title); - double tmin = X[0] - (X[N-1] - X[0]) * 0.05; - double tmax = X[N-1] + (X[N-1] - X[0]) * 0.05; - double delta = (tmax - tmin) / (N*200); - fprintf(fp, "set xrange [%f:%f]\n", tmin, tmax); - fprintf(fp, "plot '-' with lines notitle, '-' with points notitle pt 3 lc 3\n"); - for(double x = tmin; x <= tmax+1e-8; x += delta) { - double y = eval(x); - fprintf(fp, "%f %f\n", x, y); - } - fprintf(fp, "e\n"); - for(int i = 0; i < N; i++) { - fprintf(fp, "%f %f\n", X[i], Y[i]); - } - fprintf(fp, "e\n"); - fclose(fp); + FILE* fp = fopen(filename, "w"); + fprintf(fp, "#!/usr/bin/env gnuplot\n"); + if(title) fprintf(fp, "set title \"%s\"\n", title); + double tmin = X[0] - (X[N-1] - X[0]) * 0.05; + double tmax = X[N-1] + (X[N-1] - X[0]) * 0.05; + double delta = (tmax - tmin) / (N*200); + fprintf(fp, "set xrange [%f:%f]\n", tmin, tmax); + fprintf(fp, "plot '-' with lines notitle, '-' with points notitle pt 3 lc 3\n"); + for(double x = tmin; x <= tmax+1e-8; x += delta) { + double y = eval(x); + fprintf(fp, "%f %f\n", x, y); + } + fprintf(fp, "e\n"); + for(int i = 0; i < N; i++) { + fprintf(fp, "%f %f\n", X[i], Y[i]); + } + fprintf(fp, "e\n"); + fclose(fp); } /* ---------------------------------------------------------------------- diff --git a/src/USER-MISC/pair_meam_spline.h b/src/USER-MISC/pair_meam_spline.h index 3d09cce23b..7e4f421909 100644 --- a/src/USER-MISC/pair_meam_spline.h +++ b/src/USER-MISC/pair_meam_spline.h @@ -38,217 +38,214 @@ namespace LAMMPS_NS { class PairMEAMSpline : public Pair { public: - PairMEAMSpline(class LAMMPS *); - virtual ~PairMEAMSpline(); - virtual void compute(int, int); - void settings(int, char **); - void coeff(int, char **); - void get_coeff(double *, double *); - double pair_density(int ); - double three_body_density(int ); - void init_style(); - void init_list(int, class NeighList *); - double init_one(int, int); - - // helper functions for compute() - - double compute_three_body_contrib_to_charge_density(int i, int& numBonds); // returns rho_value and returns numBonds by reference - double compute_embedding_energy_and_deriv(int eflag, int i, double rho_value); // returns the derivative of the embedding energy Uprime_i - void compute_three_body_contrib_to_forces(int i, int numBonds, double Uprime_i); - void compute_two_body_pair_interactions(); - - int ij_to_potl(int i, int j); - int i_to_potl(int i); - - - int pack_forward_comm(int, int *, double *, int, int *); - void unpack_forward_comm(int, int, double *); - int pack_reverse_comm(int, int, double *); - void unpack_reverse_comm(int, int *, double *); - double memory_usage(); - + PairMEAMSpline(class LAMMPS *); + virtual ~PairMEAMSpline(); + virtual void compute(int, int); + void settings(int, char **); + void coeff(int, char **); + void get_coeff(double *, double *); + double pair_density(int ); + double three_body_density(int ); + void init_style(); + void init_list(int, class NeighList *); + double init_one(int, int); + + // helper functions for compute() + + double compute_three_body_contrib_to_charge_density(int i, int& numBonds); // returns rho_value and returns numBonds by reference + double compute_embedding_energy_and_deriv(int eflag, int i, double rho_value); // returns the derivative of the embedding energy Uprime_i + void compute_three_body_contrib_to_forces(int i, int numBonds, double Uprime_i); + void compute_two_body_pair_interactions(); + + int ij_to_potl(int i, int j); + int i_to_potl(int i); + + int pack_forward_comm(int, int *, double *, int, int *); + void unpack_forward_comm(int, int, double *); + int pack_reverse_comm(int, int, double *); + void unpack_reverse_comm(int, int *, double *); + double memory_usage(); + protected: char **elements; // names of unique elements int *map; // mapping from atom types to elements int nelements; // # of unique elements - class SplineFunction { - public: - - /// Default constructor. - SplineFunction() : X(NULL), Xs(NULL), Y(NULL), Y2(NULL), Ydelta(NULL), N(0) {} - - /// Destructor. - ~SplineFunction() { - delete[] X; - delete[] Xs; - delete[] Y; - delete[] Y2; - delete[] Ydelta; - } - - /// Initialization of spline function. - void init(int _N, double _deriv0, double _derivN) { - N = _N; - deriv0 = _deriv0; - derivN = _derivN; - // if (X) delete[] X; - // if (Xs) delete[] Xs; - // if (Y) delete[] Y; - // if (Y2) delete[] Y2; - // if (Ydelta) delete[] Ydelta; - X = new double[N]; - Xs = new double[N]; - Y = new double[N]; - Y2 = new double[N]; - Ydelta = new double[N]; - } - - /// Adds a knot to the spline. - void setKnot(int n, double x, double y) { X[n] = x; Y[n] = y; } - - /// Returns the number of knots. - int numKnots() const { return N; } - - /// Parses the spline knots from a text file. - void parse(FILE* fp, Error* error, bool isNewFormat); - - /// Calculates the second derivatives of the cubic spline. - void prepareSpline(Error* error); - - /// Evaluates the spline function at position x. - inline double eval(double x) const - { - x -= xmin; - if(x <= 0.0) { // Left extrapolation. - return Y[0] + deriv0 * x; - } - else if(x >= xmax_shifted) { // Right extrapolation. - return Y[N-1] + derivN * (x - xmax_shifted); - } - else { + class SplineFunction { + public: + /// Default constructor. + SplineFunction() : X(NULL), Xs(NULL), Y(NULL), Y2(NULL), Ydelta(NULL), N(0) {} + + /// Destructor. + ~SplineFunction() { + delete[] X; + delete[] Xs; + delete[] Y; + delete[] Y2; + delete[] Ydelta; + } + + /// Initialization of spline function. + void init(int _N, double _deriv0, double _derivN) { + N = _N; + deriv0 = _deriv0; + derivN = _derivN; + // if (X) delete[] X; + // if (Xs) delete[] Xs; + // if (Y) delete[] Y; + // if (Y2) delete[] Y2; + // if (Ydelta) delete[] Ydelta; + X = new double[N]; + Xs = new double[N]; + Y = new double[N]; + Y2 = new double[N]; + Ydelta = new double[N]; + } + + /// Adds a knot to the spline. + void setKnot(int n, double x, double y) { X[n] = x; Y[n] = y; } + + /// Returns the number of knots. + int numKnots() const { return N; } + + /// Parses the spline knots from a text file. + void parse(FILE* fp, Error* error, bool isNewFormat); + + /// Calculates the second derivatives of the cubic spline. + void prepareSpline(Error* error); + + /// Evaluates the spline function at position x. + inline double eval(double x) const + { + x -= xmin; + if(x <= 0.0) { // Left extrapolation. + return Y[0] + deriv0 * x; + } + else if(x >= xmax_shifted) { // Right extrapolation. + return Y[N-1] + derivN * (x - xmax_shifted); + } + else { #if SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES - // Do interval search. - int klo = 0; - int khi = N-1; - while(khi - klo > 1) { - int k = (khi + klo) / 2; - if(Xs[k] > x) khi = k; - else klo = k; - } - double h = Xs[khi] - Xs[klo]; - // Do spline interpolation. - double a = (Xs[khi] - x)/h; - double b = 1.0 - a; // = (x - X[klo])/h - return a * Y[klo] + b * Y[khi] + ((a*a*a - a) * Y2[klo] + (b*b*b - b) * Y2[khi])*(h*h)/6.0; + // Do interval search. + int klo = 0; + int khi = N-1; + while(khi - klo > 1) { + int k = (khi + klo) / 2; + if(Xs[k] > x) khi = k; + else klo = k; + } + double h = Xs[khi] - Xs[klo]; + // Do spline interpolation. + double a = (Xs[khi] - x)/h; + double b = 1.0 - a; // = (x - X[klo])/h + return a * Y[klo] + b * Y[khi] + ((a*a*a - a) * Y2[klo] + (b*b*b - b) * Y2[khi])*(h*h)/6.0; #else - // For a spline with grid points, we can directly calculate the interval X is in. - int klo = (int)(x / h); - int khi = klo + 1; - double a = Xs[khi] - x; - double b = h - a; - return Y[khi] - a * Ydelta[klo] + ((a*a - hsq) * a * Y2[klo] + (b*b - hsq) * b * Y2[khi]); + // For a spline with grid points, we can directly calculate the interval X is in. + int klo = (int)(x / h); + int khi = klo + 1; + double a = Xs[khi] - x; + double b = h - a; + return Y[khi] - a * Ydelta[klo] + ((a*a - hsq) * a * Y2[klo] + (b*b - hsq) * b * Y2[khi]); #endif - } - } - - /// Evaluates the spline function and its first derivative at position x. - inline double eval(double x, double& deriv) const - { - x -= xmin; - if(x <= 0.0) { // Left extrapolation. - deriv = deriv0; - return Y[0] + deriv0 * x; - } - else if(x >= xmax_shifted) { // Right extrapolation. - deriv = derivN; - return Y[N-1] + derivN * (x - xmax_shifted); - } - else { + } + } + + /// Evaluates the spline function and its first derivative at position x. + inline double eval(double x, double& deriv) const + { + x -= xmin; + if(x <= 0.0) { // Left extrapolation. + deriv = deriv0; + return Y[0] + deriv0 * x; + } + else if(x >= xmax_shifted) { // Right extrapolation. + deriv = derivN; + return Y[N-1] + derivN * (x - xmax_shifted); + } + else { #if SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES - // Do interval search. - int klo = 0; - int khi = N-1; - while(khi - klo > 1) { - int k = (khi + klo) / 2; - if(Xs[k] > x) khi = k; - else klo = k; - } - double h = Xs[khi] - Xs[klo]; - // Do spline interpolation. - double a = (Xs[khi] - x)/h; - double b = 1.0 - a; // = (x - X[klo])/h - deriv = (Y[khi] - Y[klo]) / h + ((3.0*b*b - 1.0) * Y2[khi] - (3.0*a*a - 1.0) * Y2[klo]) * h / 6.0; - return a * Y[klo] + b * Y[khi] + ((a*a*a - a) * Y2[klo] + (b*b*b - b) * Y2[khi]) * (h*h) / 6.0; + // Do interval search. + int klo = 0; + int khi = N-1; + while(khi - klo > 1) { + int k = (khi + klo) / 2; + if(Xs[k] > x) khi = k; + else klo = k; + } + double h = Xs[khi] - Xs[klo]; + // Do spline interpolation. + double a = (Xs[khi] - x)/h; + double b = 1.0 - a; // = (x - X[klo])/h + deriv = (Y[khi] - Y[klo]) / h + ((3.0*b*b - 1.0) * Y2[khi] - (3.0*a*a - 1.0) * Y2[klo]) * h / 6.0; + return a * Y[klo] + b * Y[khi] + ((a*a*a - a) * Y2[klo] + (b*b*b - b) * Y2[khi]) * (h*h) / 6.0; #else - // For a spline with grid points, we can directly calculate the interval X is in. - int klo = (int)(x / h); - int khi = klo + 1; - double a = Xs[khi] - x; - double b = h - a; - deriv = Ydelta[klo] + ((3.0*b*b - hsq) * Y2[khi] - (3.0*a*a - hsq) * Y2[klo]); - return Y[khi] - a * Ydelta[klo] + ((a*a - hsq) * a * Y2[klo] + (b*b - hsq) * b * Y2[khi]); + // For a spline with grid points, we can directly calculate the interval X is in. + int klo = (int)(x / h); + int khi = klo + 1; + double a = Xs[khi] - x; + double b = h - a; + deriv = Ydelta[klo] + ((3.0*b*b - hsq) * Y2[khi] - (3.0*a*a - hsq) * Y2[klo]); + return Y[khi] - a * Ydelta[klo] + ((a*a - hsq) * a * Y2[klo] + (b*b - hsq) * b * Y2[khi]); #endif - } - } - - /// Returns the number of bytes used by this function object. - double memory_usage() const { return sizeof(*this) + sizeof(X[0]) * N * 3; } - - /// Returns the cutoff radius of this function. - double cutoff() const { return X[N-1]; } - - /// Writes a Gnuplot script that plots the spline function. - void writeGnuplot(const char* filename, const char* title = NULL) const; - - /// Broadcasts the spline function parameters to all processors. - void communicate(MPI_Comm& world, int me); - - private: - double* X; // Positions of spline knots - double* Xs; // Shifted positions of spline knots - double* Y; // Function values at spline knots - double* Y2; // Second derivatives at spline knots - double* Ydelta; // If this is a grid spline, Ydelta[i] = (Y[i+1]-Y[i])/h - int N; // Number of spline knots - double deriv0; // First derivative at knot 0 - double derivN; // First derivative at knot (N-1) - double xmin; // The beginning of the interval on which the spline function is defined. - double xmax; // The end of the interval on which the spline function is defined. - int isGridSpline; // Indicates that all spline knots are on a regular grid. - double h; // The distance between knots if this is a grid spline with equidistant knots. - double hsq; // The squared distance between knots if this is a grid spline with equidistant knots. - double xmax_shifted; // The end of the spline interval after it has been shifted to begin at X=0. - }; - - /// Helper data structure for potential routine. - struct MEAM2Body { - int tag; // holds the index of the second atom (j) - double r; - double f, fprime; - double del[3]; - }; - - SplineFunction* phis; // Phi_i(r_ij) - SplineFunction* rhos; // Rho_ij(r_ij) - SplineFunction* fs; // f_i(r_ij) - SplineFunction* Us; // U_i(rho) - SplineFunction* gs; // g_ij(cos_theta) - double* zero_atom_energies; // Shift embedding energy by this value to make it zero for a single atom in vacuum. - - double cutoff; // The cutoff radius - - double* Uprime_values; // Used for temporary storage of U'(rho) values - int nmax; // Size of temporary array. - int maxNeighbors; // The last maximum number of neighbors a single atoms has. - MEAM2Body* twoBodyInfo; // Temporary array. - - void read_file(const char* filename); - void allocate(); + } + } + + /// Returns the number of bytes used by this function object. + double memory_usage() const { return sizeof(*this) + sizeof(X[0]) * N * 3; } + /// Returns the cutoff radius of this function. + double cutoff() const { return X[N-1]; } + /// Writes a Gnuplot script that plots the spline function. + void writeGnuplot(const char* filename, const char* title = NULL) const; + + /// Broadcasts the spline function parameters to all processors. + void communicate(MPI_Comm& world, int me); + + private: + double* X; // Positions of spline knots + double* Xs; // Shifted positions of spline knots + double* Y; // Function values at spline knots + double* Y2; // Second derivatives at spline knots + double* Ydelta; // If this is a grid spline, Ydelta[i] = (Y[i+1]-Y[i])/h + int N; // Number of spline knots + double deriv0; // First derivative at knot 0 + double derivN; // First derivative at knot (N-1) + double xmin; // The beginning of the interval on which the spline function is defined. + double xmax; // The end of the interval on which the spline function is defined. + int isGridSpline; // Indicates that all spline knots are on a regular grid. + double h; // The distance between knots if this is a grid spline with equidistant knots. + double hsq; // The squared distance between knots if this is a grid spline with equidistant knots. + double xmax_shifted; // The end of the spline interval after it has been shifted to begin at X=0. + }; + + /// Helper data structure for potential routine. + struct MEAM2Body { + int tag; // holds the index of the second atom (j) + double r; + double f, fprime; + double del[3]; + }; + + SplineFunction* phis; // Phi_i(r_ij) + SplineFunction* rhos; // Rho_ij(r_ij) + SplineFunction* fs; // f_i(r_ij) + SplineFunction* Us; // U_i(rho) + SplineFunction* gs; // g_ij(cos_theta) + double* zero_atom_energies; // Shift embedding energy by this value to make it zero for a single atom in vacuum. + + double cutoff; // The cutoff radius + + double* Uprime_values; // Used for temporary storage of U'(rho) values + int nmax; // Size of temporary array. + int maxNeighbors; // The last maximum number of neighbors a single atoms has. + MEAM2Body* twoBodyInfo; // Temporary array. + + void read_file(const char* filename); + void allocate(); + }; - + } #endif -- GitLab From 7409c6d781325bcf334d8490d66f9a964ea52e1f Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Wed, 3 May 2017 16:56:07 -0500 Subject: [PATCH 080/593] Cleaned up atom->x and atom->f deferences. --- src/USER-MISC/pair_meam_spline.cpp | 71 ++++++++++++++++-------------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 59fcd2c889..17d893a502 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -170,14 +170,15 @@ double PairMEAMSpline::pair_density(int i) { double rho_value = 0; MEAM2Body* nextTwoBodyInfo = twoBodyInfo; - + double** const x = atom->x; + for(int jj = 0; jj < listfull->numneigh[i]; jj++) { int j = listfull->firstneigh[i][jj]; j &= NEIGHMASK; - double jdelx = atom->x[j][0] - atom->x[i][0]; - double jdely = atom->x[j][1] - atom->x[i][1]; - double jdelz = atom->x[j][2] - atom->x[i][2]; + double jdelx = x[j][0] - x[i][0]; + double jdely = x[j][1] - x[i][1]; + double jdelz = x[j][2] - x[i][2]; double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; double rij = sqrt(rij_sq); @@ -196,6 +197,7 @@ double PairMEAMSpline::three_body_density(int i) { double rho_value = 0; int numBonds=0; + double** const x = atom->x; MEAM2Body* nextTwoBodyInfo = twoBodyInfo; @@ -203,9 +205,9 @@ double PairMEAMSpline::three_body_density(int i) int j = listfull->firstneigh[i][jj]; j &= NEIGHMASK; - double jdelx = atom->x[j][0] - atom->x[i][0]; - double jdely = atom->x[j][1] - atom->x[i][1]; - double jdelz = atom->x[j][2] - atom->x[i][2]; + double jdelx = x[j][0] - x[i][0]; + double jdely = x[j][1] - x[i][1]; + double jdelz = x[j][2] - x[i][2]; double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; if(rij_sq < cutoff*cutoff) { @@ -239,14 +241,15 @@ double PairMEAMSpline::three_body_density(int i) double PairMEAMSpline::compute_three_body_contrib_to_charge_density(int i, int& numBonds) { double rho_value = 0; MEAM2Body* nextTwoBodyInfo = twoBodyInfo; - + double** const x = atom->x; + for(int jj = 0; jj < listfull->numneigh[i]; jj++) { int j = listfull->firstneigh[i][jj]; j &= NEIGHMASK; - double jdelx = atom->x[j][0] - atom->x[i][0]; - double jdely = atom->x[j][1] - atom->x[i][1]; - double jdelz = atom->x[j][2] - atom->x[i][2]; + double jdelx = x[j][0] - x[i][0]; + double jdely = x[j][1] - x[i][1]; + double jdelz = x[j][2] - x[i][2]; double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; if(rij_sq < cutoff*cutoff) { @@ -296,6 +299,7 @@ double PairMEAMSpline::compute_embedding_energy_and_deriv(int eflag, int i, doub void PairMEAMSpline::compute_three_body_contrib_to_forces(int i, int numBonds, double Uprime_i) { double forces_i[3] = {0, 0, 0}; + double** forces = atom->f; for(int jj = 0; jj < numBonds; jj++) { const MEAM2Body bondj = twoBodyInfo[jj]; @@ -345,9 +349,9 @@ void PairMEAMSpline::compute_three_body_contrib_to_forces(int i, int numBonds, d forces_i[2] -= fk[2]; int k = bondk->tag; - atom->f[k][0] += fk[0]; - atom->f[k][1] += fk[1]; - atom->f[k][2] += fk[2]; + forces[k][0] += fk[0]; + forces[k][1] += fk[1]; + forces[k][2] += fk[2]; if(evflag) { double delta_ij[3]; @@ -362,20 +366,23 @@ void PairMEAMSpline::compute_three_body_contrib_to_forces(int i, int numBonds, d } } - atom->f[i][0] -= forces_j[0]; - atom->f[i][1] -= forces_j[1]; - atom->f[i][2] -= forces_j[2]; - atom->f[j][0] += forces_j[0]; - atom->f[j][1] += forces_j[1]; - atom->f[j][2] += forces_j[2]; + forces[i][0] -= forces_j[0]; + forces[i][1] -= forces_j[1]; + forces[i][2] -= forces_j[2]; + forces[j][0] += forces_j[0]; + forces[j][1] += forces_j[1]; + forces[j][2] += forces_j[2]; } - atom->f[i][0] += forces_i[0]; - atom->f[i][1] += forces_i[1]; - atom->f[i][2] += forces_i[2]; + forces[i][0] += forces_i[0]; + forces[i][1] += forces_i[1]; + forces[i][2] += forces_i[2]; } void PairMEAMSpline::compute_two_body_pair_interactions() { + double** const x = atom->x; + double** forces = atom->f; + for(int ii = 0; ii < listhalf->inum; ii++) { int i = listhalf->ilist[ii]; @@ -384,9 +391,9 @@ void PairMEAMSpline::compute_two_body_pair_interactions() { j &= NEIGHMASK; double jdel[3]; - jdel[0] = atom->x[j][0] - atom->x[i][0]; - jdel[1] = atom->x[j][1] - atom->x[i][1]; - jdel[2] = atom->x[j][2] - atom->x[i][2]; + jdel[0] = x[j][0] - x[i][0]; + jdel[1] = x[j][1] - x[i][1]; + jdel[2] = x[j][2] - x[i][2]; double rij_sq = jdel[0]*jdel[0] + jdel[1]*jdel[1] + jdel[2]*jdel[2]; if(rij_sq < cutoff*cutoff) { @@ -405,12 +412,12 @@ void PairMEAMSpline::compute_two_body_pair_interactions() { fpair /= rij; - atom->f[i][0] += jdel[0]*fpair; - atom->f[i][1] += jdel[1]*fpair; - atom->f[i][2] += jdel[2]*fpair; - atom->f[j][0] -= jdel[0]*fpair; - atom->f[j][1] -= jdel[1]*fpair; - atom->f[j][2] -= jdel[2]*fpair; + forces[i][0] += jdel[0]*fpair; + forces[i][1] += jdel[1]*fpair; + forces[i][2] += jdel[2]*fpair; + forces[j][0] -= jdel[0]*fpair; + forces[j][1] -= jdel[1]*fpair; + forces[j][2] -= jdel[2]*fpair; if (evflag) ev_tally(i, j, atom->nlocal, force->newton_pair, pair_pot, 0.0, -fpair, jdel[0], jdel[1], jdel[2]); } -- GitLab From 45187a0fc77e483f807f518825e657f29ef34cd2 Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Thu, 4 May 2017 11:05:50 -0500 Subject: [PATCH 081/593] Fix system header #include style. --- src/USER-MISC/pair_meam_spline.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 17d893a502..1ad732609a 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -31,10 +31,10 @@ conform with pairing ------------------------------------------------------------------------- */ -#include "math.h" -#include "stdio.h" -#include "stdlib.h" -#include "string.h" +#include +#include +#include +#include #include "pair_meam_spline.h" #include "atom.h" #include "force.h" -- GitLab From 480727815a895a54c6f2ade5cb3d04f98fab007e Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Thu, 4 May 2017 11:27:55 -0500 Subject: [PATCH 082/593] Starting to refactor in preparation to contruct OMP version. --- src/USER-MISC/pair_meam_spline.cpp | 180 ++++++++++++++++++++++++++++- 1 file changed, 174 insertions(+), 6 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 1ad732609a..704e76ee61 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -28,7 +28,7 @@ * 24-Sep-11 - AS: Adapted code to new interface of Error::one() function. * 20-Jun-13 - WT: Added support for multiple species types * 25-Apr-17 - DRT/PZ: Modified format of multiple species type to - conform with pairing + conform with pairing, updated to LAMMPS style ------------------------------------------------------------------------- */ #include @@ -102,6 +102,9 @@ PairMEAMSpline::~PairMEAMSpline() void PairMEAMSpline::compute(int eflag, int vflag) { + double** const x = atom->x; + double** forces = atom->f; + if (eflag || vflag) { ev_setup(eflag, vflag); } else { @@ -143,15 +146,140 @@ void PairMEAMSpline::compute(int eflag, int vflag) // compute charge density and numBonds - double rho_value = compute_three_body_contrib_to_charge_density(i, numBonds); + // double rho_value = compute_three_body_contrib_to_charge_density(i, numBonds); + MEAM2Body* nextTwoBodyInfo = twoBodyInfo; + double rho_value = 0; + for(int jj = 0; jj < listfull->numneigh[i]; jj++) { + int j = listfull->firstneigh[i][jj]; + j &= NEIGHMASK; + + double jdelx = x[j][0] - x[i][0]; + double jdely = x[j][1] - x[i][1]; + double jdelz = x[j][2] - x[i][2]; + double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; + + if(rij_sq < cutoff*cutoff) { + double rij = sqrt(rij_sq); + double partial_sum = 0; + + nextTwoBodyInfo->tag = j; + nextTwoBodyInfo->r = rij; + nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); + nextTwoBodyInfo->del[0] = jdelx / rij; + nextTwoBodyInfo->del[1] = jdely / rij; + nextTwoBodyInfo->del[2] = jdelz / rij; + + for(int kk = 0; kk < numBonds; kk++) { + const MEAM2Body& bondk = twoBodyInfo[kk]; + double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + + nextTwoBodyInfo->del[1]*bondk.del[1] + + nextTwoBodyInfo->del[2]*bondk.del[2]); + partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); + } + + rho_value += nextTwoBodyInfo->f * partial_sum; + rho_value += rhos[i_to_potl(j)].eval(rij); + + numBonds++; + nextTwoBodyInfo++; + } + } // Compute embedding energy and its derivative - double Uprime_i = compute_embedding_energy_and_deriv(eflag, i, rho_value); - // Compute three-body contributions to force + // double Uprime_i = compute_embedding_energy_and_deriv(eflag, i, rho_value); + double Uprime_i; + double embeddingEnergy = Us[i_to_potl(i)].eval(rho_value, Uprime_i) + - zero_atom_energies[i_to_potl(i)]; + + Uprime_values[i] = Uprime_i; + if(eflag) { + if(eflag_global) + eng_vdwl += embeddingEnergy; + if(eflag_atom) + eatom[i] += embeddingEnergy; + } - compute_three_body_contrib_to_forces(i, numBonds, Uprime_i); + // Compute three-body contributions to force + // compute_three_body_contrib_to_forces(i, numBonds, Uprime_i); + double forces_i[3] = {0, 0, 0}; + for(int jj = 0; jj < numBonds; jj++) { + const MEAM2Body bondj = twoBodyInfo[jj]; + double rij = bondj.r; + int j = bondj.tag; + + double f_rij_prime = bondj.fprime; + double f_rij = bondj.f; + + double forces_j[3] = {0, 0, 0}; + + MEAM2Body const* bondk = twoBodyInfo; + for(int kk = 0; kk < jj; kk++, ++bondk) { + double rik = bondk->r; + + double cos_theta = (bondj.del[0]*bondk->del[0] + + bondj.del[1]*bondk->del[1] + + bondj.del[2]*bondk->del[2]); + double g_prime; + double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); + double f_rik_prime = bondk->fprime; + double f_rik = bondk->f; + + double fij = -Uprime_i * g_value * f_rik * f_rij_prime; + double fik = -Uprime_i * g_value * f_rij * f_rik_prime; + + double prefactor = Uprime_i * f_rij * f_rik * g_prime; + double prefactor_ij = prefactor / rij; + double prefactor_ik = prefactor / rik; + fij += prefactor_ij * cos_theta; + fik += prefactor_ik * cos_theta; + + double fj[3], fk[3]; + + fj[0] = bondj.del[0] * fij - bondk->del[0] * prefactor_ij; + fj[1] = bondj.del[1] * fij - bondk->del[1] * prefactor_ij; + fj[2] = bondj.del[2] * fij - bondk->del[2] * prefactor_ij; + forces_j[0] += fj[0]; + forces_j[1] += fj[1]; + forces_j[2] += fj[2]; + + fk[0] = bondk->del[0] * fik - bondj.del[0] * prefactor_ik; + fk[1] = bondk->del[1] * fik - bondj.del[1] * prefactor_ik; + fk[2] = bondk->del[2] * fik - bondj.del[2] * prefactor_ik; + forces_i[0] -= fk[0]; + forces_i[1] -= fk[1]; + forces_i[2] -= fk[2]; + + int k = bondk->tag; + forces[k][0] += fk[0]; + forces[k][1] += fk[1]; + forces[k][2] += fk[2]; + + if(evflag) { + double delta_ij[3]; + double delta_ik[3]; + delta_ij[0] = bondj.del[0] * rij; + delta_ij[1] = bondj.del[1] * rij; + delta_ij[2] = bondj.del[2] * rij; + delta_ik[0] = bondk->del[0] * rik; + delta_ik[1] = bondk->del[1] * rik; + delta_ik[2] = bondk->del[2] * rik; + ev_tally3(i, j, k, 0.0, 0.0, fj, fk, delta_ij, delta_ik); + } + } + + forces[i][0] -= forces_j[0]; + forces[i][1] -= forces_j[1]; + forces[i][2] -= forces_j[2]; + forces[j][0] += forces_j[0]; + forces[j][1] += forces_j[1]; + forces[j][2] += forces_j[2]; + } + + forces[i][0] += forces_i[0]; + forces[i][1] += forces_i[1]; + forces[i][2] += forces_i[2]; } // Communicate U'(rho) values @@ -159,7 +287,47 @@ void PairMEAMSpline::compute(int eflag, int vflag) comm->forward_comm_pair(this); // Compute two-body pair interactions - compute_two_body_pair_interactions(); + // compute_two_body_pair_interactions(); + for(int ii = 0; ii < listhalf->inum; ii++) { + int i = listhalf->ilist[ii]; + + for(int jj = 0; jj < listhalf->numneigh[i]; jj++) { + int j = listhalf->firstneigh[i][jj]; + j &= NEIGHMASK; + + double jdel[3]; + jdel[0] = x[j][0] - x[i][0]; + jdel[1] = x[j][1] - x[i][1]; + jdel[2] = x[j][2] - x[i][2]; + double rij_sq = jdel[0]*jdel[0] + jdel[1]*jdel[1] + jdel[2]*jdel[2]; + + if(rij_sq < cutoff*cutoff) { + double rij = sqrt(rij_sq); + + double rho_prime_i,rho_prime_j; + rhos[i_to_potl(i)].eval(rij,rho_prime_i); + rhos[i_to_potl(j)].eval(rij,rho_prime_j); + double fpair = rho_prime_j * Uprime_values[i] + rho_prime_i*Uprime_values[j]; + double pair_pot_deriv; + double pair_pot = phis[ij_to_potl(i,j)].eval(rij, pair_pot_deriv); + + fpair += pair_pot_deriv; + + // Divide by r_ij to get forces from gradient + + fpair /= rij; + + forces[i][0] += jdel[0]*fpair; + forces[i][1] += jdel[1]*fpair; + forces[i][2] += jdel[2]*fpair; + forces[j][0] -= jdel[0]*fpair; + forces[j][1] -= jdel[1]*fpair; + forces[j][2] -= jdel[2]*fpair; + if (evflag) ev_tally(i, j, atom->nlocal, force->newton_pair, + pair_pot, 0.0, -fpair, jdel[0], jdel[1], jdel[2]); + } + } + } if(vflag_fdotr) virial_fdotr_compute(); -- GitLab From addd87c0f7a47fd54c3ccfb7edc11a166e2bc2e3 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 4 May 2017 11:22:20 -0600 Subject: [PATCH 083/593] new Section package and start doc pages and build scripts --- doc/src/Manual.txt | 11 +- doc/src/Section_commands.txt | 2 +- doc/src/Section_intro.txt | 8 +- doc/src/Section_packages.txt | 3137 ++++++++++------- doc/src/Section_start.txt | 568 ++- doc/src/compute_sna_atom.txt | 34 +- doc/src/dump.txt | 52 +- doc/src/dump_custom_vtk.txt | 347 -- doc/src/dump_h5md.txt | 18 +- doc/src/dump_nc.txt | 66 - doc/src/dump_netcdf.txt | 82 + doc/src/dump_vtk.txt | 179 + doc/src/fix_cmap.txt | 7 +- doc/src/fix_gcmc.txt | 2 +- doc/src/fix_qeq.txt | 4 +- doc/src/fix_qeq_reax.txt | 6 +- doc/src/fix_reax_bonds.txt | 6 +- doc/src/fix_reaxc_species.txt | 10 +- doc/src/lammps.book | 2 +- doc/src/pair_hybrid.txt | 2 +- doc/src/pair_reax.txt | 6 +- doc/src/{pair_reax_c.txt => pair_reaxc.txt} | 10 +- doc/src/pairs.txt | 2 +- examples/USER/{ => misc}/flow_gauss/README | 0 examples/USER/{ => misc}/flow_gauss/in.GD | 0 examples/mscg/log.31Mar17.g++.1 | 145 + lib/Install.py | 82 + lib/README | 6 +- lib/atc/Install.py | 82 + lib/atc/README | 25 +- lib/awpmd/Install.py | 82 + lib/awpmd/README | 25 +- lib/colvars/Install.py | 82 + lib/colvars/README | 5 + lib/gpu/Install.py | 146 + lib/gpu/README | 11 +- lib/h5md/Install.py | 82 + lib/h5md/{Makefile => Makefile.h5cc} | 2 +- lib/h5md/README | 15 +- lib/linalg/Install.py | 52 + lib/linalg/README | 18 +- lib/meam/Install.py | 82 + lib/meam/README | 5 + lib/mscg/Install.py | 122 + lib/mscg/Makefile.lammps | 4 +- lib/mscg/README | 28 +- lib/netcdf/README | 5 +- lib/poems/Install.py | 82 + lib/poems/README | 5 + lib/qmmm/Install.py | 82 + lib/qmmm/README | 9 + lib/reax/Install.py | 82 + lib/reax/README | 5 + lib/smd/Install.py | 103 + lib/smd/README | 9 +- lib/voronoi/Install.py | 78 +- lib/voronoi/README | 10 +- lib/vtk/Makefile.lammps | 5 +- lib/vtk/README | 34 +- src/KOKKOS/pair_reax_c_kokkos.cpp | 8 +- src/KSPACE/pair_lj_charmmfsw_coul_long.cpp | 8 +- .../pair_lj_charmmfsw_coul_charmmfsh.cpp | 10 +- src/Makefile | 34 +- src/RIGID/fix_shake.cpp | 27 +- src/SNAP/compute_sna_atom.cpp | 21 +- src/SNAP/compute_sna_atom.h | 2 +- src/SNAP/compute_snad_atom.cpp | 78 +- src/SNAP/compute_snad_atom.h | 5 +- src/SNAP/compute_snav_atom.cpp | 98 +- src/SNAP/compute_snav_atom.h | 7 +- src/SNAP/pair_snap.cpp | 3 +- src/{USER-NC-DUMP => USER-NETCDF}/Install.sh | 0 src/{USER-NC-DUMP => USER-NETCDF}/README | 4 +- .../dump_netcdf.cpp} | 49 +- .../dump_nc.h => USER-NETCDF/dump_netcdf.h} | 15 +- .../dump_netcdf_mpiio.cpp} | 47 +- .../dump_netcdf_mpiio.h} | 13 +- src/USER-REAXC/compute_spec_atom.cpp | 4 +- src/USER-REAXC/fix_qeq_reax.cpp | 2 +- .../{fix_reax_c.cpp => fix_reaxc.cpp} | 2 +- src/USER-REAXC/{fix_reax_c.h => fix_reaxc.h} | 0 src/USER-REAXC/fix_reaxc_bonds.cpp | 2 +- src/USER-REAXC/fix_reaxc_species.cpp | 2 +- src/USER-REAXC/fix_reaxc_species.h | 2 +- .../{pair_reax_c.cpp => pair_reaxc.cpp} | 15 +- .../{pair_reax_c.h => pair_reaxc.h} | 0 src/USER-REAXC/reaxc_allocate.cpp | 2 +- src/USER-REAXC/reaxc_bond_orders.cpp | 2 +- src/USER-REAXC/reaxc_bonds.cpp | 2 +- src/USER-REAXC/reaxc_control.cpp | 2 +- src/USER-REAXC/reaxc_defs.h | 4 +- src/USER-REAXC/reaxc_ffield.cpp | 2 +- src/USER-REAXC/reaxc_forces.cpp | 2 +- src/USER-REAXC/reaxc_hydrogen_bonds.cpp | 2 +- src/USER-REAXC/reaxc_init_md.cpp | 2 +- src/USER-REAXC/reaxc_io_tools.cpp | 2 +- src/USER-REAXC/reaxc_list.cpp | 2 +- src/USER-REAXC/reaxc_lookup.cpp | 2 +- src/USER-REAXC/reaxc_multi_body.cpp | 15 +- src/USER-REAXC/reaxc_nonbonded.cpp | 2 +- src/USER-REAXC/reaxc_reset_tools.cpp | 2 +- src/USER-REAXC/reaxc_system_props.cpp | 2 +- src/USER-REAXC/reaxc_tool_box.cpp | 2 +- src/USER-REAXC/reaxc_torsion_angles.cpp | 2 +- src/USER-REAXC/reaxc_traj.cpp | 2 +- src/USER-REAXC/reaxc_types.h | 26 +- src/USER-REAXC/reaxc_valence_angles.cpp | 2 +- src/USER-REAXC/reaxc_vector.cpp | 2 +- src/USER-VTK/README | 20 +- .../{dump_custom_vtk.cpp => dump_vtk.cpp} | 238 +- .../{dump_custom_vtk.h => dump_vtk.h} | 21 +- src/compute_dipole_chunk.cpp | 6 +- src/domain.cpp | 72 + src/domain.h | 1 + src/neighbor.cpp | 6 +- 115 files changed, 4562 insertions(+), 2514 deletions(-) delete mode 100644 doc/src/dump_custom_vtk.txt delete mode 100644 doc/src/dump_nc.txt create mode 100644 doc/src/dump_netcdf.txt create mode 100644 doc/src/dump_vtk.txt rename doc/src/{pair_reax_c.txt => pair_reaxc.txt} (96%) rename examples/USER/{ => misc}/flow_gauss/README (100%) rename examples/USER/{ => misc}/flow_gauss/in.GD (100%) create mode 100644 examples/mscg/log.31Mar17.g++.1 create mode 100644 lib/Install.py create mode 100644 lib/atc/Install.py create mode 100644 lib/awpmd/Install.py create mode 100644 lib/colvars/Install.py create mode 100644 lib/gpu/Install.py create mode 100644 lib/h5md/Install.py rename lib/h5md/{Makefile => Makefile.h5cc} (95%) create mode 100644 lib/linalg/Install.py create mode 100644 lib/meam/Install.py create mode 100644 lib/mscg/Install.py create mode 100644 lib/poems/Install.py create mode 100644 lib/qmmm/Install.py create mode 100644 lib/reax/Install.py create mode 100644 lib/smd/Install.py rename src/{USER-NC-DUMP => USER-NETCDF}/Install.sh (100%) rename src/{USER-NC-DUMP => USER-NETCDF}/README (95%) rename src/{USER-NC-DUMP/dump_nc.cpp => USER-NETCDF/dump_netcdf.cpp} (97%) rename src/{USER-NC-DUMP/dump_nc.h => USER-NETCDF/dump_netcdf.h} (94%) rename src/{USER-NC-DUMP/dump_nc_mpiio.cpp => USER-NETCDF/dump_netcdf_mpiio.cpp} (96%) rename src/{USER-NC-DUMP/dump_nc_mpiio.h => USER-NETCDF/dump_netcdf_mpiio.h} (95%) rename src/USER-REAXC/{fix_reax_c.cpp => fix_reaxc.cpp} (99%) rename src/USER-REAXC/{fix_reax_c.h => fix_reaxc.h} (100%) rename src/USER-REAXC/{pair_reax_c.cpp => pair_reaxc.cpp} (97%) rename src/USER-REAXC/{pair_reax_c.h => pair_reaxc.h} (100%) rename src/USER-VTK/{dump_custom_vtk.cpp => dump_vtk.cpp} (91%) rename src/USER-VTK/{dump_custom_vtk.h => dump_vtk.h} (95%) diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index a6bc459530..755bbe5e7e 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -158,12 +158,11 @@ END_RST --> 2.1 "What's in the LAMMPS distribution"_start_1 :ulb,b 2.2 "Making LAMMPS"_start_2 :b 2.3 "Making LAMMPS with optional packages"_start_3 :b - 2.4 "Building LAMMPS via the Make.py script"_start_4 :b - 2.5 "Building LAMMPS as a library"_start_5 :b - 2.6 "Running LAMMPS"_start_6 :b - 2.7 "Command-line options"_start_7 :b - 2.8 "Screen output"_start_8 :b - 2.9 "Tips for users of previous versions"_start_9 :ule,b + 2.4 "Building LAMMPS as a library"_start_4 :b + 2.5 "Running LAMMPS"_start_5 :b + 2.6 "Command-line options"_start_6 :b + 2.7 "Screen output"_start_7 :b + 2.8 "Tips for users of previous versions"_start_8 :ule,b "Commands"_Section_commands.html :l 3.1 "LAMMPS input script"_cmd_1 :ulb,b 3.2 "Parsing rules"_cmd_2 :b diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index 3f1d6ff203..c71acfe06f 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -1052,7 +1052,7 @@ package"_Section_start.html#start_3. "oxdna2/excv"_pair_oxdna2.html, "oxdna2/stk"_pair_oxdna2.html, "quip"_pair_quip.html, -"reax/c (k)"_pair_reax_c.html, +"reax/c (k)"_pair_reaxc.html, "smd/hertz"_pair_smd_hertz.html, "smd/tlsph"_pair_smd_tlsph.html, "smd/triangulated/surface"_pair_smd_triangulated_surface.html, diff --git a/doc/src/Section_intro.txt b/doc/src/Section_intro.txt index 0c438c6ce0..bfb6ef3901 100644 --- a/doc/src/Section_intro.txt +++ b/doc/src/Section_intro.txt @@ -249,8 +249,12 @@ Pizza.py WWW site"_pizza. :l Specialized features :h5 -These are LAMMPS capabilities which you may not think of as typical -molecular dynamics options: +LAMMPS can be built with optional packages which implement a variety +of additional capabilities. An overview of all the packages is "given +here"_Section_packages.html. + +These are some LAMMPS capabilities which you may not think of as +typical classical molecular dynamics options: "static"_balance.html and "dynamic load-balancing"_fix_balance.html "generalized aspherical particles"_body.html diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index bd81361fa9..2a0a8386e8 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -10,1897 +10,2592 @@ Section"_Section_accelerate.html :c 4. Packages :h3 -This section gives an overview of the add-on optional packages that -extend LAMMPS functionality. Packages are groups of files that enable -a specific set of features. For example, force fields for molecular -systems or granular systems are in packages. You can see the list of -all packages by typing "make package" from within the src directory of -the LAMMPS distribution. - -Here are links for two tables below, which list standard and user -packages. - -4.1 "Standard packages"_#pkg_1 -4.2 "User packages"_#pkg_2 :all(b) - -"Section 2.3"_Section_start.html#start_3 of the manual describes -the difference between standard packages and user packages. It also -has general details on how to include/exclude specific packages as -part of the LAMMPS build process, and on how to build auxiliary -libraries or modify a machine Makefile if a package requires it. - -Following the two tables below, is a sub-section for each package. It -has a summary of what the package contains. It has specific -instructions on how to install it, build or obtain any auxiliary -library it requires, and any Makefile.machine changes it requires. It -also lists pointers to examples of its use or documentation provided -in the LAMMPS distribution. If you want to know the complete list of -commands that a package adds to LAMMPS, simply list the files in its -directory, e.g. "ls src/GRANULAR". Source files with names that start -with compute, fix, pair, bond, etc correspond to command styles with -the same names. - -NOTE: The USER package sub-sections below are still being filled in, -as of March 2016. - -Unless otherwise noted below, every package is independent of all the -others. I.e. any package can be included or excluded in a LAMMPS -build, independent of all other packages. However, note that some -packages include commands derived from commands in other packages. If -the other package is not installed, the derived command from the new -package will also not be installed when you include the new one. -E.g. the pair lj/cut/coul/long/omp command from the USER-OMP package -will not be installed as part of the USER-OMP package if the KSPACE -package is not also installed, since it contains the pair -lj/cut/coul/long command. If you later install the KSPACE package and -the USER-OMP package is already installed, both the pair -lj/cut/coul/long and lj/cut/coul/long/omp commands will be installed. - -:line - -4.1 Standard packages :h4,link(pkg_1) - -The current list of standard packages is as follows. Each package -name links to a sub-section below with more details. - -Package, Description, Author(s), Doc page, Example, Library -"ASPHERE"_#ASPHERE, aspherical particles, -, "Section 6.6.14"_Section_howto.html#howto_14, ellipse, - -"BODY"_#BODY, body-style particles, -, "body"_body.html, body, - -"CLASS2"_#CLASS2, class 2 force fields, -, "pair_style lj/class2"_pair_class2.html, -, - -"COLLOID"_#COLLOID, colloidal particles, Kumar (1), "atom_style colloid"_atom_style.html, colloid, - -"COMPRESS"_#COMPRESS, I/O compression, Axel Kohlmeyer (Temple U), "dump */gz"_dump.html, -, - -"CORESHELL"_#CORESHELL, adiabatic core/shell model, Hendrik Heenen (Technical U of Munich), "Section 6.6.25"_Section_howto.html#howto_25, coreshell, - -"DIPOLE"_#DIPOLE, point dipole particles, -, "pair_style dipole/cut"_pair_dipole.html, dipole, - -"GPU"_#GPU, GPU-enabled styles, Mike Brown (ORNL), "Section 5.3.1"_accelerate_gpu.html, gpu, lib/gpu -"GRANULAR"_#GRANULAR, granular systems, -, "Section 6.6.6"_Section_howto.html#howto_6, pour, - -"KIM"_#KIM, openKIM potentials, Smirichinski & Elliot & Tadmor (3), "pair_style kim"_pair_kim.html, kim, KIM -"KOKKOS"_#KOKKOS, Kokkos-enabled styles, Trott & Moore (4), "Section 5.3.3"_accelerate_kokkos.html, kokkos, lib/kokkos -"KSPACE"_#KSPACE, long-range Coulombic solvers, -, "kspace_style"_kspace_style.html, peptide, - -"MANYBODY"_#MANYBODY, many-body potentials, -, "pair_style tersoff"_pair_tersoff.html, shear, - -"MEAM"_#MEAM, modified EAM potential, Greg Wagner (Sandia), "pair_style meam"_pair_meam.html, meam, lib/meam -"MC"_#MC, Monte Carlo options, -, "fix gcmc"_fix_gcmc.html, -, - -"MOLECULE"_#MOLECULE, molecular system force fields, -, "Section 6.6.3"_Section_howto.html#howto_3, peptide, - -"OPT"_#OPT, optimized pair styles, Fischer & Richie & Natoli (2), "Section 5.3.5"_accelerate_opt.html, -, - -"PERI"_#PERI, Peridynamics models, Mike Parks (Sandia), "pair_style peri"_pair_peri.html, peri, - -"POEMS"_#POEMS, coupled rigid body motion, Rudra Mukherjee (JPL), "fix poems"_fix_poems.html, rigid, lib/poems -"PYTHON"_#PYTHON, embed Python code in an input script, -, "python"_python.html, python, lib/python -"REAX"_#REAX, ReaxFF potential, Aidan Thompson (Sandia), "pair_style reax"_pair_reax.html, reax, lib/reax -"REPLICA"_#REPLICA, multi-replica methods, -, "Section 6.6.5"_Section_howto.html#howto_5, tad, - -"RIGID"_#RIGID, rigid bodies, -, "fix rigid"_fix_rigid.html, rigid, - -"SHOCK"_#SHOCK, shock loading methods, -, "fix msst"_fix_msst.html, -, - -"SNAP"_#SNAP, quantum-fit potential, Aidan Thompson (Sandia), "pair snap"_pair_snap.html, snap, - -"SRD"_#SRD, stochastic rotation dynamics, -, "fix srd"_fix_srd.html, srd, - -"VORONOI"_#VORONOI, Voronoi tesselations, Daniel Schwen (LANL), "compute voronoi/atom"_compute_voronoi_atom.html, -, Voro++ -:tb(ea=c) - -The "Authors" column lists a name(s) if a specific person is -responsible for creating and maintaining the package. - -(1) The COLLOID package includes Fast Lubrication Dynamics pair styles -which were created by Amit Kumar and Michael Bybee from Jonathan -Higdon's group at UIUC. - -(2) The OPT package was created by James Fischer (High Performance -Technologies), David Richie, and Vincent Natoli (Stone Ridge -Technolgy). - -(3) The KIM package was created by Valeriu Smirichinski, Ryan Elliott, -and Ellad Tadmor (U Minn). - -(4) The KOKKOS package was created primarily by Christian Trott and -Stan Moore (Sandia). It uses the Kokkos library which was developed -by Carter Edwards, Christian Trott, and others at Sandia. +This section gives an overview of the optional packages that extend +LAMMPS functionality with instructions on how to build LAMMPS with +each of them. Packages are groups of files that enable a specific set +of features. For example, force fields for molecular systems or +granular systems are in packages. You can see the list of all +packages and "make" commands to manage them by typing "make package" +from within the src directory of the LAMMPS distribution. "Section +2.3"_Section_start.html#start_3 gives general info on how to install +and un-install packages as part of the LAMMPS build process. + +There are two kinds of packages in LAMMPS, standard and user packages: + +"Table of standard packages"_#table_standard +"Table of user packages"_#table_user :ul + +Standard packages are supported by the LAMMPS developers and are +written in a syntax and style consistent with the rest of LAMMPS. +This means the developers will answer questions about them, debug and +fix them if necessary, and keep them compatible with future changes to +LAMMPS. + +User packages have been contributed by users, and begin with the +"user" prefix. If they are a single command (single file), they are +typically in the user-misc package. User packages don't necessarily +meet the requirements of the standard packages. If you have problems +using a feature provided in a user package, you may need to contact +the contributor directly to get help. Information on how to submit +additions you make to LAMMPS as single files or as a standard or user +package are given in "this section"_Section_modify.html#mod_15 of the +manual. + +Following the next two tables is a sub-section for each package. It +lists authors (if applicable) and summarizes the package contents. It +has specific instructions on how to install the package, including (if +necessary) downloading or building any extra library it requires. It +also gives links to documentation, example scripts, and +pictures/movies (if available) that illustrate use of the package. + +NOTE: To see the complete list of commands a package adds to LAMMPS, +just look at the files in its src directory, e.g. "ls src/GRANULAR". +Files with names that start with fix, compute, atom, pair, bond, +angle, etc correspond to commands with the same style names. + +In these two tables, the "Example" column is a sub-directory in the +examples directory of the distribution which has an input script that +uses the package. E.g. "peptide" refers to the examples/peptide +directory; USER/atc refers to the examples/USER/atc directory. The +"Library" column indicates whether an extra library is needed to build +and use the package: + +dash = no library +sys = system library: you likely have it on your machine +int = internal library: provided with LAMMPS, but you may need to build it +ext = external library: you will need to download and install it on your machine :ul -The "Doc page" column links to either a sub-section of the -"Section 6"_Section_howto.html of the manual, or an input script -command implemented as part of the package, or to additional -documentation provided within the package. - -The "Example" column is a sub-directory in the examples directory of -the distribution which has an input script that uses the package. -E.g. "peptide" refers to the examples/peptide directory. +:line +:line -The "Library" column lists an external library which must be built -first and which LAMMPS links to when it is built. If it is listed as -lib/package, then the code for the library is under the lib directory -of the LAMMPS distribution. See the lib/package/README file for info -on how to build the library. If it is not listed as lib/package, then -it is a third-party library not included in the LAMMPS distribution. -See details on all of this below for individual packages. +[Standard packages] :link(table_standard),p + +Package, Description, Doc page, Example, Library +"ASPHERE"_#ASPHERE, aspherical particle models, "Section 6.6.14"_Section_howto.html#howto_14, ellipse, - +"BODY"_#BODY, body-style particles, "body"_body.html, body, - +"CLASS2"_#CLASS2, class 2 force fields, "pair_style lj/class2"_pair_class2.html, -, - +"COLLOID"_#COLLOID, colloidal particles, "atom_style colloid"_atom_style.html, colloid, - +"COMPRESS"_#COMPRESS, I/O compression, "dump */gz"_dump.html, -, sys +"CORESHELL"_#CORESHELL, adiabatic core/shell model, "Section 6.6.25"_Section_howto.html#howto_25, coreshell, - +"DIPOLE"_#DIPOLE, point dipole particles, "pair_style dipole/cut"_pair_dipole.html, dipole, - +"GPU"_#GPU, GPU-enabled styles, "Section 5.3.1"_accelerate_gpu.html, WWW bench, int +"GRANULAR"_#GRANULAR, granular systems, "Section 6.6.6"_Section_howto.html#howto_6, pour, - +"KIM"_#KIM, openKIM wrapper, "pair_style kim"_pair_kim.html, kim, ext +"KOKKOS"_#KOKKOS, Kokkos-enabled styles, "Section 5.3.3"_accelerate_kokkos.html, WWW bench, - +"KSPACE"_#KSPACE, long-range Coulombic solvers, "kspace_style"_kspace_style.html, peptide, - +"MANYBODY"_#MANYBODY, many-body potentials, "pair_style tersoff"_pair_tersoff.html, shear, - +"MC"_#MC, Monte Carlo options, "fix gcmc"_fix_gcmc.html, -, - +"MEAM"_#MEAM, modified EAM potential, "pair_style meam"_pair_meam.html, meam, int +"MISC"_#MISC, miscellanous single-file commands, -, -, - +"MOLECULE"_#MOLECULE, molecular system force fields, "Section 6.6.3"_Section_howto.html#howto_3, peptide, - +"MPIIO"_#MPIIO, MPI parallel I/O dump and restart, "dump"_dump.html, -, - +"MSCG"_#MSCG, multi-scale coarse-graining wrapper, "fix mscg"_fix_mscg.html, mscg, ext +"OPT"_#OPT, optimized pair styles, "Section 5.3.5"_accelerate_opt.html, WWW bench, - +"PERI"_#PERI, Peridynamics models, "pair_style peri"_pair_peri.html, peri, - +"POEMS"_#POEMS, coupled rigid body motion, "fix poems"_fix_poems.html, rigid, int +"PYTHON"_#PYTHON, embed Python code in an input script, "python"_python.html, python, sys +"QEQ"_#QEQ, QEq charge equilibration, "fix qeq"_fix_qeq.html, qeq, - +"REAX"_#REAX, ReaxFF potential (Fortran), "pair_style reax"_pair_reax.html, reax, int +"REPLICA"_#REPLICA, multi-replica methods, "Section 6.6.5"_Section_howto.html#howto_5, tad, - +"RIGID"_#RIGID, rigid bodies and constraints, "fix rigid"_fix_rigid.html, rigid, - +"SHOCK"_#SHOCK, shock loading methods, "fix msst"_fix_msst.html, -, - +"SNAP"_#SNAP, quantum-fitted potential, "pair snap"_pair_snap.html, snap, - +"SRD"_#SRD, stochastic rotation dynamics, "fix srd"_fix_srd.html, srd, - +"VORONOI"_#VORONOI, Voronoi tesselation, "compute voronoi/atom"_compute_voronoi_atom.html, -, ext +:tb(ea=c,ca1=l) + +[USER packages] :link(table_user),p + +Package, Description, Doc page, Example, Library +"USER-ATC"_#USER-ATC, atom-to-continuum coupling, "fix atc"_fix_atc.html, USER/atc, int +"USER-AWPMD"_#USER-AWPMD, wave-packet MD, "pair_style awpmd/cut"_pair_awpmd.html, USER/awpmd, int +"USER-CGDNA"_#USER-CGDNA, coarse-grained DNA force fields, src/USER-CGDNA/README, USER/cgdna, - +"USER-CGSDK"_#USER-CGSDK, SDK coarse-graining model, "pair_style lj/sdk"_pair_sdk.html, USER/cgsdk, - +"USER-COLVARS"_#USER-COLVARS, collective variables library, "fix colvars"_fix_colvars.html, USER/colvars, int +"USER-DIFFRACTION"_#USER-DIFFRACTION, virtual x-ray and electron diffraction,"compute xrd"_compute_xrd.html, USER/diffraction, - +"USER-DPD"_#USER-DPD, reactive dissipative particle dynamics, src/USER-DPD/README, USER/dpd, - +"USER-DRUDE"_#USER-DRUDE, Drude oscillators, "tutorial"_tutorial_drude.html, USER/drude, - +"USER-EFF"_#USER-EFF, electron force field,"pair_style eff/cut"_pair_eff.html, USER/eff, - +"USER-FEP"_#USER-FEP, free energy perturbation,"compute fep"_compute_fep.html, USER/fep, - +"USER-H5MD"_#USER-H5MD, dump output via HDF5,"dump h5md"_dump_h5md.html, -, ext +"USER-INTEL"_#USER-INTEL, optimized Intel CPU and KNL styles,"Section 5.3.2"_accelerate_intel.html, WWW bench, - +"USER-LB"_#USER-LB, Lattice Boltzmann fluid,"fix lb/fluid"_fix_lb_fluid.html, USER/lb, - +"USER-MANIFOLD"_#USER-MANIFOLD, motion on 2d surfaces,"fix manifoldforce"_fix_manifoldforce.html, USER/manifold, - +"USER-MGPT"_#USER-MGPT, fast MGPT multi-ion potentials, "pair_style mgpt"_pair_mgpt.html, USER/mgpt, - +"USER-MISC"_#USER-MISC, single-file contributions, USER-MISC/README, USER/misc, - +"USER-MOLFILE"_#USER-MOLFILE, "VMD"_VMD molfile plug-ins,"dump molfile"_dump_molfile.html, -, ext +"USER-NETCDF"_#USER-NETCDF, dump output via NetCDF,"dump netcdf"_dump_netcdf.html, -, ext +"USER-OMP"_#USER-OMP, OpenMP-enabled styles,"Section 5.3.4"_accelerate_omp.html, WWW bench, - +"USER-PHONON"_#USER-PHONON, phonon dynamical matrix,"fix phonon"_fix_phonon.html, USER/phonon, - +"USER-QMMM"_#USER-QMMM, QM/MM coupling,"fix qmmm"_fix_qmmm.html, USER/qmmm, ext +"USER-QTB"_#USER-QTB, quantum nuclear effects,"fix qtb"_fix_qtb.html "fix qbmsst"_fix_qbmsst.html, qtb, - +"USER-QUIP"_#USER-QUIP, QUIP/libatoms interface,"pair_style quip"_pair_quip.html, USER/quip, ext +"USER-REAXC"_#USER-REAXC, ReaxFF potential (C/C++) ,"pair_style reaxc"_pair_reaxc.html, reax, - +"USER-SMD"_#USER-SMD, smoothed Mach dynamics,"SMD User Guide"_PDF/SMD_LAMMPS_userguide.pdf, USER/smd, ext +"USER-SMTBQ"_#USER-SMTBQ, second moment tight binding QEq potential,"pair_style smtbq"_pair_smtbq.html, USER/smtbq, - +"USER-SPH"_#USER-SPH, smoothed particle hydrodynamics,"SPH User Guide"_PDF/SPH_LAMMPS_userguide.pdf, USER/sph, - +"USER-TALLY"_#USER-TALLY, pairwise tally computes,"compute XXX/tally"_compute_tally.html, USER/tally, - +"USER-VTK"_#USER-VTK, dump output via VTK, "compute custom/vtk"_dump_custom_vtk.html, -, ext +:tb(ea=c,ca1=l) :line +:line + +ASPHERE package :link(ASPHERE),h4 -ASPHERE package :link(ASPHERE),h5 +[Contents:] -Contents: Several computes, time-integration fixes, and pair styles -for aspherical particle models: ellipsoids, 2d lines, 3d triangles. +Computes, time-integration fixes, and pair styles for aspherical +particle models including ellipsoids, 2d lines, and 3d triangles. -To install via make or Make.py: +[Install or un-install:] make yes-asphere make machine :pre -Make.py -p asphere -a machine :pre - -To un-install via make or Make.py: - make no-asphere make machine :pre -Make.py -p ^asphere -a machine :pre +[Supporting info:] -Supporting info: "Section 6.14"_Section_howto.html#howto_14, -"pair_style gayberne"_pair_gayberne.html, "pair_style -resquared"_pair_resquared.html, -"doc/PDF/pair_gayberne_extra.pdf"_PDF/pair_gayberne_extra.pdf, -"doc/PDF/pair_resquared_extra.pdf"_PDF/pair_resquared_extra.pdf, -examples/ASPHERE, examples/ellipse +src/ASPHERE: filenames -> commands +"Section 6.14"_Section_howto.html#howto_14 +"pair_style gayberne"_pair_gayberne.html +"pair_style resquared"_pair_resquared.html +"doc/PDF/pair_gayberne_extra.pdf"_PDF/pair_gayberne_extra.pdf +"doc/PDF/pair_resquared_extra.pdf"_PDF/pair_resquared_extra.pdf +examples/ASPHERE +examples/ellipse +http://lammps.sandia.gov/movies.html#line +http://lammps.sandia.gov/movies.html#tri :ul :line -BODY package :link(BODY),h5 +BODY package :link(BODY),h4 + +[Contents:] -Contents: Support for body-style particles. Computes, +Body-style particles with internal structure. Computes, time-integration fixes, pair styles, as well as the body styles themselves. See the "body"_body.html doc page for an overview. -To install via make or Make.py: +[Install or un-install:] make yes-body make machine :pre -Make.py -p body -a machine :pre - -To un-install via make or Make.py: - make no-body make machine :pre -Make.py -p ^body -a machine :pre +[Supporting info:] -Supporting info: "atom_style body"_atom_style.html, "body"_body.html, -"pair_style body"_pair_body.html, examples/body +src/BODY filenames -> commands +"body"_body.html +"atom_style body"_atom_style.html +"fix nve/body"_fix_nve_body.html +"pair_style body"_pair_body.html +examples/body :ul :line -CLASS2 package :link(CLASS2),h5 +CLASS2 package :link(CLASS2),h4 -Contents: Bond, angle, dihedral, improper, and pair styles for the -COMPASS CLASS2 molecular force field. +[Contents:] -To install via make or Make.py: +Bond, angle, dihedral, improper, and pair styles for the COMPASS +CLASS2 molecular force field. + +[Install or un-install:] make yes-class2 make machine :pre -Make.py -p class2 -a machine :pre - -To un-install via make or Make.py: - make no-class2 make machine :pre -Make.py -p ^class2 -a machine :pre +[Supporting info:] -Supporting info: "bond_style class2"_bond_class2.html, "angle_style -class2"_angle_class2.html, "dihedral_style -class2"_dihedral_class2.html, "improper_style -class2"_improper_class2.html, "pair_style lj/class2"_pair_class2.html +src/CLASS2: filenames -> commands +"bond_style class2"_bond_class2.html +"angle_style class2"_angle_class2.html +"dihedral_style class2"_dihedral_class2.html +"improper_style class2"_improper_class2.html +"pair_style lj/class2"_pair_class2.html :ul :line -COLLOID package :link(COLLOID),h5 +COLLOID package :link(COLLOID),h4 -Contents: Support for coarse-grained colloidal particles. Wall fix -and pair styles that implement colloidal interaction models for -finite-size particles. This includes the Fast Lubrication Dynamics -method for hydrodynamic interactions, which is a simplified -approximation to Stokesian dynamics. +[Contents:] -To install via make or Make.py: +Coarse-grained finite-size colloidal particles. Pair stayle and fix +wall styles for colloidal interactions. Includes the Fast Lubrication +Dynamics (FLD) method for hydrodynamic interactions, which is a +simplified approximation to Stokesian dynamics. -make yes-colloid -make machine :pre +[Authors:] This package includes Fast Lubrication Dynamics pair styles +which were created by Amit Kumar and Michael Bybee from Jonathan +Higdon's group at UIUC. -Make.py -p colloid -a machine :pre +[Install or un-install:] -To un-install via make or Make.py: +make yes-colloid +make machine :pre make no-colloid make machine :pre -Make.py -p ^colloid -a machine :pre +[Supporting info:] -Supporting info: "fix wall/colloid"_fix_wall.html, "pair_style -colloid"_pair_colloid.html, "pair_style -yukawa/colloid"_pair_yukawa_colloid.html, "pair_style -brownian"_pair_brownian.html, "pair_style -lubricate"_pair_lubricate.html, "pair_style -lubricateU"_pair_lubricateU.html, examples/colloid, examples/srd +src/COLLOID: filenames -> commands +"fix wall/colloid"_fix_wall.html +"pair_style colloid"_pair_colloid.html +"pair_style yukawa/colloid"_pair_yukawa_colloid.html +"pair_style brownian"_pair_brownian.html +"pair_style lubricate"_pair_lubricate.html +"pair_style lubricateU"_pair_lubricateU.html +examples/colloid +examples/srd :ul :line -COMPRESS package :link(COMPRESS),h5 +COMPRESS package :link(COMPRESS),h4 -Contents: Support for compressed output of dump files via the zlib -compression library, using dump styles with a "gz" in their style -name. +[Contents:] -Building with the COMPRESS package assumes you have the zlib -compression library available on your system. The build uses the -lib/compress/Makefile.lammps file in the compile/link process. You -should only need to edit this file if the LAMMPS build cannot find the -zlib info it specifies. +Compressed output of dump files via the zlib compression library, +using dump styles with a "gz" in their style name. -To install via make or Make.py: +To use this package you must have the zlib compression library +available on your system. -make yes-compress -make machine :pre +[Author:] Axel Kohlmeyer (Temple U). -Make.py -p compress -a machine :pre +[Install or un-install:] -To un-install via make or Make.py: +Note that building with this package assumes you have the zlib +compression library available on your system. The LAMMPS build uses +the settings in the lib/compress/Makefile.lammps file in the +compile/link process. You should only need to edit this file if the +LAMMPS build fails on your system. + +make yes-compress +make machine :pre make no-compress make machine :pre -Make.py -p ^compress -a machine :pre +[Supporting info:] -Supporting info: src/COMPRESS/README, lib/compress/README, "dump -atom/gz"_dump.html, "dump cfg/gz"_dump.html, "dump -custom/gz"_dump.html, "dump xyz/gz"_dump.html +src/COMPRESS: filenames -> commands +src/COMPRESS/README +lib/compress/README +"dump atom/gz"_dump.html +"dump cfg/gz"_dump.html +"dump custom/gz"_dump.html +"dump xyz/gz"_dump.html :ul :line -CORESHELL package :link(CORESHELL),h5 +CORESHELL package :link(CORESHELL),h4 -Contents: Compute and pair styles that implement the adiabatic -core/shell model for polarizability. The compute temp/cs command -measures the temperature of a system with core/shell particles. The -pair styles augment Born, Buckingham, and Lennard-Jones styles with -core/shell capabilities. See "Section 6.26"_Section_howto.html#howto_26 -for an overview of how to use the package. +[Contents:] -To install via make or Make.py: +Compute and pair styles that implement the adiabatic core/shell model +for polarizability. The pair styles augment Born, Buckingham, and +Lennard-Jones styles with core/shell capabilities. The "compute +temp/cs"_compute_temp_cs.html command calculates the temperature of a +system with core/shell particles. See "Section +6.26"_Section_howto.html#howto_26 for an overview of how to use this +package. -make yes-coreshell -make machine :pre +[Author:] Hendrik Heenen (Technical U of Munich). -Make.py -p coreshell -a machine :pre +[Install or un-install:] -To un-install via make or Make.py: +make yes-coreshell +make machine :pre make no-coreshell make machine :pre -Make.py -p ^coreshell -a machine :pre +[Supporting info:] -Supporting info: "Section 6.26"_Section_howto.html#howto_26, -"compute temp/cs"_compute_temp_cs.html, -"pair_style born/coul/long/cs"_pair_cs.html, "pair_style -buck/coul/long/cs"_pair_cs.html, pair_style -lj/cut/coul/long/cs"_pair_lj.html, examples/coreshell +src/CORESHELL: filenames -> commands +"Section 6.26"_Section_howto.html#howto_26 +"Section 6.25"_Section_howto.html#howto_25 +"compute temp/cs"_compute_temp_cs.html +"pair_style born/coul/long/cs"_pair_cs.html +"pair_style buck/coul/long/cs"_pair_cs.html +"pair_style lj/cut/coul/long/cs"_pair_lj.html +examples/coreshell :ul :line -DIPOLE package :link(DIPOLE),h5 +DIPOLE package :link(DIPOLE),h4 -Contents: An atom style and several pair styles to support point -dipole models with short-range or long-range interactions. +[Contents:] -To install via make or Make.py: +An atom style and several pair styles for point dipole models with +short-range or long-range interactions. + +[Install or un-install:] make yes-dipole make machine :pre -Make.py -p dipole -a machine :pre - -To un-install via make or Make.py: - make no-dipole make machine :pre -Make.py -p ^dipole -a machine :pre +[Supporting info:] -Supporting info: "atom_style dipole"_atom_style.html, "pair_style -lj/cut/dipole/cut"_pair_dipole.html, "pair_style -lj/cut/dipole/long"_pair_dipole.html, "pair_style -lj/long/dipole/long"_pair_dipole.html, examples/dipole +src/DIPOLE: filenames -> commands +"atom_style dipole"_atom_style.html +"pair_style lj/cut/dipole/cut"_pair_dipole.html +"pair_style lj/cut/dipole/long"_pair_dipole.html +"pair_style lj/long/dipole/long"_pair_dipole.html +examples/dipole :ul :line -GPU package :link(GPU),h5 +GPU package :link(GPU),h4 + +[Contents:] -Contents: Dozens of pair styles and a version of the PPPM long-range -Coulombic solver for NVIDIA GPUs. All of them have a "gpu" in their -style name. "Section 5.3.1"_accelerate_gpu.html gives +Dozens of pair styles and a version of the PPPM long-range Coulombic +solver optimized for NVIDIA GPUs. All such styles have a "gpu" as a +suffix in their style name. "Section 5.3.1"_accelerate_gpu.html gives details of what hardware and Cuda software is required on your system, -and how to build and use this package. See the KOKKOS package, which -also has GPU-enabled styles. - -Building LAMMPS with the GPU package requires first building the GPU -library itself, which is a set of C and Cuda files in lib/gpu. -Details of how to do this are in lib/gpu/README. As illustrated -below, perform a "make" using one of the Makefile.machine files in -lib/gpu which should create a lib/reax/libgpu.a file. -Makefile.linux.* and Makefile.xk7 are examples for different -platforms. There are 3 important settings in the Makefile.machine you -use: +and details on how to build and use this package. Its styles can be +invoked at run time via the "-sf gpu" or "-suffix gpu" "command-line +switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS +package, which has GPU-enabled styles. + +[Authors:] Mike Brown (Intel) while at Sandia and ORNL and Trung Nguyen +(Northwestern U) while at ORNL. + +[Install or un-install:] + +Before building LAMMPS with this package, you must first build the GPU +library in lib/gpu from a set of provided C and Cuda files. You can +do this manually if you prefer; follow the instructions in +lib/gpu/README. You can also do it in one step from the lammps/src +dir, using a command like these, which simply invoke the +lib/gpu/Install.py script with the specified args: + +make lib-gpu # print help message +make lib-gpu args="-m" # build GPU library with default Makefile.linux +make lib-gpu args="-i xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision +make lib-gpu args="-i xk7 -p single -o xk7.single -m" # ditto, also build GPU library + +Note that this procedure starts with one of the existing +Makefile.machine files in lib/gpu. It allows you to alter 4 important +settings in that Makefile, via the -h, -a, -p, -e switches, +and save the new Makefile, if desired: CUDA_HOME = where NVIDIA Cuda software is installed on your system -CUDA_ARCH = appropriate to your GPU hardware -CUDA_PREC = precision (double, mixed, single) you desire :ul - -See example Makefile.machine files in lib/gpu for the syntax of these -settings. See lib/gpu/Makefile.linux.double for ARCH settings for -various NVIDIA GPUs. The "make" also creates a -lib/gpu/Makefile.lammps file. This file has settings that enable -LAMMPS to link with Cuda libraries. If the settings in -Makefile.lammps for your machine are not correct, the LAMMPS link will -fail. Note that the Make.py script has a "-gpu" option to allow the -GPU library (with several of its options) and LAMMPS to be built in -one step, with Type "python src/Make.py -h -gpu" to see the details. - -To install via make or Make.py: - -cd ~/lammps/lib/gpu -make -f Makefile.linux.mixed # for example -cd ~/lammps/src -make yes-gpu -make machine :pre +CUDA_ARCH = what GPU hardware you have (see help message for details) +CUDA_PRECISION = precision (double, mixed, single) +EXTRAMAKE = which Makefile.lammps.* file to copy to Makefile.lammps :ul + +If the library build is successful, 2 files should be created: +lib/gpu/libgpu.a and lib/gpu/Makefile.lammps. The latter has settings +that enable LAMMPS to link with Cuda libraries. If the settings in +Makefile.lammps for your machine are not correct, the LAMMPS build +will fail. -Make.py -p gpu -gpu mode=mixed arch=35 -a machine :pre +You can then install/un-install the package and build LAMMPS in the +usual manner: -To un-install via make or Make.py: +make yes-gpu +make machine :pre make no-gpu make machine :pre -Make.py -p ^gpu -a machine :pre +NOTE: If you re-build the GPU library in lib/gpu, you should always +un-install the GPU package, then re-install it and re-build LAMMPS. +This is because the compilation of files in the GPU package use the +library settings from the lib/gpu/Makefile.machine used to build the +GPU library. -Supporting info: src/GPU/README, lib/gpu/README, -"Section 5.3"_Section_accelerate.html#acc_3, -"Section 5.3.1"_accelerate_gpu.html, -Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 -for any pair style listed with a (g), -"kspace_style"_kspace_style.html, "package gpu"_package.html, -examples/accelerate, bench/FERMI, bench/KEPLER +[Supporting info:] + +src/GPU: filenames -> commands +src/GPU/README +lib/gpu/README +"Section 5.3"_Section_accelerate.html#acc_3 +"Section 5.3.1"_accelerate_gpu.html +"Section 2.7 -sf gpu"_Section_start.html#start_7 +"Section 2.7 -pk gpu"_Section_start.html#start_7 +"package gpu"_package.html +Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (g) +"Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line -GRANULAR package :link(GRANULAR),h5 +GRANULAR package :link(GRANULAR),h4 -Contents: Fixes and pair styles that support models of finite-size -granular particles, which interact with each other and boundaries via -frictional and dissipative potentials. +[Contents:] -To install via make or Make.py: +Pair styles and fixes for finite-size granular particles, which +interact with each other and boundaries via frictional and dissipative +potentials. + +[Install or un-install:] make yes-granular make machine :pre -Make.py -p granular -a machine :pre - -To un-install via make or Make.py: - make no-granular make machine :pre -Make.py -p ^granular -a machine :pre - -Supporting info: "Section 6.6"_Section_howto.html#howto_6, "fix -pour"_fix_pour.html, "fix wall/gran"_fix_wall_gran.html, "pair_style -gran/hooke"_pair_gran.html, "pair_style -gran/hertz/history"_pair_gran.html, examples/pour, bench/in.chute +[Supporting info:] + +src/GRANULAR: filenames -> commands +"Section 6.6"_Section_howto.html#howto_6, +"fix pour"_fix_pour.html +"fix wall/gran"_fix_wall_gran.html +"pair_style gran/hooke"_pair_gran.html +"pair_style gran/hertz/history"_pair_gran.html +examples/granregion +examples/pour +bench/in.chute +http://lammps.sandia.gov/pictures.html#jamming +http://lammps.sandia.gov/movies.html#hopper +http://lammps.sandia.gov/movies.html#dem +http://lammps.sandia.gov/movies.html#brazil +http://lammps.sandia.gov/movies.html#granregion :ul :line -KIM package :link(KIM),h5 +KIM package :link(KIM),h4 -Contents: A pair style that interfaces to the Knowledge Base for -Interatomic Models (KIM) repository of interatomic potentials, so that -KIM potentials can be used in a LAMMPS simulation. +[Contents:] -To build LAMMPS with the KIM package you must have previously -installed the KIM API (library) on your system. The lib/kim/README -file explains how to download and install KIM. Building with the KIM -package also uses the lib/kim/Makefile.lammps file in the compile/link -process. You should not need to edit this file. +A "pair_style kim"_pair_kim.html command which is a wrapper on the +Knowledge Base for Interatomic Models (KIM) repository of interatomic +potentials, enabling any of them to be used in LAMMPS simulations. -To install via make or Make.py: +To use this package you must have the KIM library available on your +system. -make yes-kim -make machine :pre +Information about the KIM project can be found at its website: +https://openkim.org. The KIM project is led by Ellad Tadmor and Ryan +Elliott (U Minnesota) and James Sethna (Cornell U). + +[Authors:] Ryan Elliott (U Minnesota) is the main developer for the KIM +API which the "pair_style kim"_pair_kim.html command uses. He +developed the pair style in collaboration with Valeriu Smirichinski (U +Minnesota). + +[Install or un-install:] -Make.py -p kim -a machine :pre +Using this package requires the KIM library and its models +(interatomic potentials) to be downloaded and installed on your +system. The library can be downloaded and built in lib/kim or +elsewhere on your system. Details of the download, build, and install +process for KIM are given in the lib/kim/README file. -To un-install via make or Make.py: +Once that process is complete, you can then install/un-install the +package and build LAMMPS in the usual manner: + +make yes-kim +make machine :pre make no-kim make machine :pre -Make.py -p ^kim -a machine :pre +[Supporting info:] -Supporting info: src/KIM/README, lib/kim/README, "pair_style -kim"_pair_kim.html, examples/kim +src/KIM: filenames -> commands +src/KIM/README +lib/kim/README +"pair_style kim"_pair_kim.html +examples/kim :ul :line -KOKKOS package :link(KOKKOS),h5 +KOKKOS package :link(KOKKOS),h4 -Contents: Dozens of atom, pair, bond, angle, dihedral, improper styles -which run with the Kokkos library to provide optimization for -multicore CPUs (via OpenMP), NVIDIA GPUs, or the Intel Xeon Phi (in -native mode). All of them have a "kk" in their style name. "Section -5.3.3"_accelerate_kokkos.html gives details of what -hardware and software is required on your system, and how to build and -use this package. See the GPU, OPT, USER-INTEL, USER-OMP packages, -which also provide optimizations for the same range of hardware. +[Contents:] -Building with the KOKKOS package requires choosing which of 3 hardware -options you are optimizing for: CPU acceleration via OpenMP, GPU -acceleration, or Intel Xeon Phi. (You can build multiple times to -create LAMMPS executables for different hardware.) It also requires a -C++11 compatible compiler. For GPUs, the NVIDIA "nvcc" compiler is -used, and an appropriate KOKKOS_ARCH setting should be made in your -Makefile.machine for your GPU hardware and NVIDIA software. +Dozens of atom, pair, bond, angle, dihedral, improper, fix, compute +styles adapted to compile using the Kokkos library which can convert +them to OpenMP or Cuda code so that they run efficiently on multicore +CPUs, KNLs, or GPUs. All the styles have a "kk" as a suffix in their +style name. "Section 5.3.3"_accelerate_kokkos.html gives details of +what hardware and software is required on your system, and how to +build and use this package. Its styles can be invoked at run time via +the "-sf kk" or "-suffix kk" "command-line +switches"_Section_start.html#start_7. Also see the "GPU"_#GPU, +"OPT"_#OPT, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER_OMP +packages, which have styles optimized for CPUs, KNLs, and GPUs. -The simplest way to do this is to use Makefile.kokkos_cuda or -Makefile.kokkos_omp or Makefile.kokkos_phi in src/MAKE/OPTIONS, via -"make kokkos_cuda" or "make kokkos_omp" or "make kokkos_phi". (Check -the KOKKOS_ARCH setting in Makefile.kokkos_cuda), Or, as illustrated -below, you can use the Make.py script with its "-kokkos" option to -choose which hardware to build for. Type "python src/Make.py -h --kokkos" to see the details. If these methods do not work on your -system, you will need to read the "Section 5.3.3"_accelerate_kokkos.html -doc page for details of what Makefile.machine settings are needed. +You must have a C++11 compatible compiler to use this package. -To install via make or Make.py for each of 3 hardware options: +[Authors:] The KOKKOS package was created primarily by Christian Trott +and Stan Moore (Sandia), with contributions from other folks as well. +It uses the open-source "Kokkos library"_https://github.com/kokkos +which was developed by Carter Edwards, Christian Trott, and others at +Sandia, and which is included in the LAMMPS distribution in +lib/kokkos. -make yes-kokkos -make kokkos_omp # for CPUs with OpenMP -make kokkos_cuda # for GPUs, check the KOKKOS_ARCH setting in Makefile.kokkos_cuda -make kokkos_phi # for Xeon Phis :pre +[Install or un-install:] + +For the KOKKOS package, you have 3 choices when building. You can +build with either CPU or KNL or GPU support. Each choice requires +additional settings in your Makefile.machine for the KOKKOS_DEVICES +and KOKKOS_ARCH settings. See the src/MAKE/OPTIONS/Makefile.kokkos* +files for examples. + +For multicore CPUs using OpenMP: + +KOKKOS_DEVICES = OpenMP +KOKKOS_ARCH = HSW # HSW = Haswell, SNB = SandyBridge, BDW = Broadwell, etc + +For Intel KNLs using OpenMP: + +KOKKOS_DEVICES = OpenMP +KOKKOS_ARCH = KNL + +For NVIDIA GPUs using Cuda: + +KOKKOS_DEVICES = Cuda +KOKKOS_ARCH = Pascal60,Power8 # P100 hosted by an IBM Power8, etc +KOKKOS_ARCH = Kepler37,Power8 # K80 hosted by an IBM Power8, etc + +For GPUs, you also need these 2 lines in your Makefile.machine before +the CC line is defined, in this case for use with OpenMPI mpicxx. The +2 lines define a nvcc wrapper compiler, which will use nvcc for +compiling Cuda files or use a C++ compiler for non-Kokkos, non-Cuda +files. -Make.py -p kokkos -kokkos omp -a machine # for CPUs with OpenMP -Make.py -p kokkos -kokkos cuda arch=35 -a machine # for GPUs of style arch -Make.py -p kokkos -kokkos phi -a machine # for Xeon Phis +KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd) +export OMPI_CXX = $(KOKKOS_ABSOLUTE_PATH)/config/nvcc_wrapper +CC = mpicxx -To un-install via make or Make.py: +Once you have an appropriate Makefile.machine, you can +install/un-install the package and build LAMMPS in the usual manner. +Note that you cannot build one executable to run on multiple hardware +targets (CPU or KNL or GPU). You need to build LAMMPS once for each +hardware target, to produce a separate executable. Also note that we +do not recommend building with other acceleration packages installed +(GPU, OPT, USER-INTEL, USER-OMP) when also building with KOKKOS. +make yes-kokkos +make machine :pre + make no-kokkos make machine :pre -Make.py -p ^kokkos -a machine :pre +[Supporting info:] -Supporting info: src/KOKKOS/README, lib/kokkos/README, -"Section 5.3"_Section_accelerate.html#acc_3, -"Section 5.3.3"_accelerate_kokkos.html, -Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 -for any pair style listed with a (k), "package kokkos"_package.html, -examples/accelerate, bench/FERMI, bench/KEPLER +src/KOKKOS: filenames -> commands +src/KOKKOS/README +lib/kokkos/README +"Section 5.3"_Section_accelerate.html#acc_3 +"Section 5.3.3"_accelerate_kokkos.html +"Section 2.7 -k on ..."_Section_start.html#start_7 +"Section 2.7 -sf kk"_Section_start.html#start_7 +"Section 2.7 -pk kokkos"_Section_start.html#start_7 +"package kokkos"_package.html +Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (k) +"Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line -KSPACE package :link(KSPACE),h5 +KSPACE package :link(KSPACE),h4 -Contents: A variety of long-range Coulombic solvers, and pair styles -which compute the corresponding short-range portion of the pairwise -Coulombic interactions. These include Ewald, particle-particle -particle-mesh (PPPM), and multilevel summation method (MSM) solvers. +[Contents:] -Building with the KSPACE package requires a 1d FFT library be present -on your system for use by the PPPM solvers. This can be the KISS FFT -library provided with LAMMPS, or 3rd party libraries like FFTW or a -vendor-supplied FFT library. See step 6 of "Section -2.2.2"_Section_start.html#start_2_2 of the manual for details of how -to select different FFT options in your machine Makefile. The Make.py -tool has an "-fft" option which can insert these settings into your -machine Makefile automatically. Type "python src/Make.py -h -fft" to -see the details. +A variety of long-range Coulombic solvers, as well as pair styles +which compute the corresponding short-range pairwise Coulombic +interactions. These include Ewald, particle-particle particle-mesh +(PPPM), and multilevel summation method (MSM) solvers. -To install via make or Make.py: +[Install or un-install:] + +Building with this package requires a 1d FFT library be present on +your system for use by the PPPM solvers. This can be the KISS FFT +library provided with LAMMPS, 3rd party libraries like FFTW, or a +vendor-supplied FFT library. See step 6 of "Section +2.2.2"_Section_start.html#start_2_2 of the manual for details on how +to select different FFT options in your machine Makefile. make yes-kspace make machine :pre -Make.py -p kspace -a machine :pre - -To un-install via make or Make.py: - make no-kspace make machine :pre -Make.py -p ^kspace -a machine :pre +[Supporting info:] -Supporting info: "kspace_style"_kspace_style.html, -"doc/PDF/kspace.pdf"_PDF/kspace.pdf, -"Section 6.7"_Section_howto.html#howto_7, -"Section 6.8"_Section_howto.html#howto_8, -"Section 6.9"_Section_howto.html#howto_9, -"pair_style coul"_pair_coul.html, other pair style command doc pages -which have "long" or "msm" in their style name, -examples/peptide, bench/in.rhodo +src/KSPACE: filenames -> commands +"kspace_style"_kspace_style.html +"doc/PDF/kspace.pdf"_PDF/kspace.pdf +"Section 6.7"_Section_howto.html#howto_7 +"Section 6.8"_Section_howto.html#howto_8 +"Section 6.9"_Section_howto.html#howto_9 +"pair_style coul"_pair_coul.html +Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 with "long" or "msm" in pair style name +examples/peptide +bench/in.rhodo :ul :line -MANYBODY package :link(MANYBODY),h5 +MANYBODY package :link(MANYBODY),h4 + +[Contents:] -Contents: A variety of many-body and bond-order potentials. These -include (AI)REBO, EAM, EIM, BOP, Stillinger-Weber, and Tersoff -potentials. Do a directory listing, "ls src/MANYBODY", to see -the full list. +A variety of manybody and bond-order potentials. These include +(AI)REBO, BOP, EAM, EIM, Stillinger-Weber, and Tersoff potentials. -To install via make or Make.py: +[Install or un-install:] make yes-manybody make machine :pre -Make.py -p manybody -a machine :pre - -To un-install via make or Make.py: - make no-manybody make machine :pre -Make.py -p ^manybody -a machine :pre - -Supporting info: +[Supporting info:] -Examples: Pair Styles section of "Section -3.5"_Section_commands.html#cmd_5, examples/comb, examples/eim, -examples/nb3d, examples/vashishta +src/MANYBODY: filenames -> commands +Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 +examples/comb +examples/eim +examples/nb3d +examples/shear +examples/streitz +examples/vashishta +bench/in.eam :ul :line -MC package :link(MC),h5 +MC package :link(MC),h4 + +[Contents:] -Contents: Several fixes and a pair style that have Monte Carlo (MC) or -MC-like attributes. These include fixes for creating, breaking, and -swapping bonds, and for performing atomic swaps and grand-canonical MC -in conjuction with dynamics. +Several fixes and a pair style that have Monte Carlo (MC) or MC-like +attributes. These include fixes for creating, breaking, and swapping +bonds, for performing atomic swaps, and performing grand-canonical MC +(GCMC) in conjuction with dynamics. -To install via make or Make.py: +[Install or un-install:] make yes-mc make machine :pre -Make.py -p mc -a machine :pre - -To un-install via make or Make.py: - make no-mc make machine :pre -Make.py -p ^mc -a machine :pre +[Supporting info:] -Supporting info: "fix atom/swap"_fix_atom_swap.html, "fix -bond/break"_fix_bond_break.html, "fix -bond/create"_fix_bond_create.html, "fix bond/swap"_fix_bond_swap.html, -"fix gcmc"_fix_gcmc.html, "pair_style dsmc"_pair_dsmc.html +src/MC: filenames -> commands +"fix atom/swap"_fix_atom_swap.html +"fix bond/break"_fix_bond_break.html +"fix bond/create"_fix_bond_create.html +"fix bond/swap"_fix_bond_swap.html +"fix gcmc"_fix_gcmc.html +"pair_style dsmc"_pair_dsmc.html +http://lammps.sandia.gov/movies.html#gcmc :ul :line -MEAM package :link(MEAM),h5 +MEAM package :link(MEAM),h4 -Contents: A pair style for the modified embedded atom (MEAM) -potential. +[Contents:] -Building LAMMPS with the MEAM package requires first building the MEAM -library itself, which is a set of Fortran 95 files in lib/meam. -Details of how to do this are in lib/meam/README. As illustrated -below, perform a "make" using one of the Makefile.machine files in -lib/meam which should create a lib/meam/libmeam.a file. -Makefile.gfortran and Makefile.ifort are examples for the GNU Fortran -and Intel Fortran compilers. The "make" also copies a -lib/meam/Makefile.lammps.machine file to lib/meam/Makefile.lammps. -This file has settings that enable the C++ compiler used to build -LAMMPS to link with a Fortran library (typically the 2 compilers to be -consistent e.g. both Intel compilers, or both GNU compilers). If the -settings in Makefile.lammps for your compilers and machine are not -correct, the LAMMPS link will fail. Note that the Make.py script has -a "-meam" option to allow the MEAM library and LAMMPS to be built in -one step. Type "python src/Make.py -h -meam" to see the details. +A pair style for the modified embedded atom (MEAM) potential. -NOTE: The MEAM potential can run dramatically faster if built with the -Intel Fortran compiler, rather than the GNU Fortran compiler. +[Author:] Greg Wagner (Northwestern U) while at Sandia. -To install via make or Make.py: +[Install or un-install:] -cd ~/lammps/lib/meam -make -f Makefile.gfortran # for example -cd ~/lammps/src -make yes-meam -make machine :pre +Before building LAMMPS with this package, you must first build the +MEAM library in lib/meam. You can do this manually if you prefer; +follow the instructions in lib/meam/README. You can also do it in one +step from the lammps/src dir, using a command like these, which simply +invoke the lib/meam/Install.py script with the specified args: + +make lib-meam # print help message +make lib-meam args="-m gfortran" # build with GNU Fortran compiler +make lib-meam args="-m ifort" # build with Intel ifort compiler :pre -Make.py -p meam -meam make=gfortran -a machine :pre +The build should produce two files: lib/meam/libmeam.a and +lib/meam/Makefile.lammps. The latter is copied from an existing +Makefile.lammps.* and has settings needed to link C++ (LAMMPS) with +Fortran (MEAM library). Typically the two compilers used for LAMMPS +and the MEAM library need to be consistent (e.g. both Intel or both +GNU compilers). If necessary, you can edit/create a new +lib/meam/Makefile.machine file for your system, which should define an +EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine +file. -To un-install via make or Make.py: +You can then install/un-install the package and build LAMMPS in the +usual manner: + +make yes-meam +make machine :pre make no-meam make machine :pre -Make.py -p ^meam -a machine :pre +NOTE: You should test building the MEAM library with both the Intel +and GNU compilers to see if a simulation runs faster with one versus +the other on your system. + +[Supporting info:] -Supporting info: lib/meam/README, "pair_style meam"_pair_meam.html, -examples/meam +src/MEAM: filenames -> commands +src/meam/README +lib/meam/README +"pair_style meam"_pair_meam.html +examples/meam :ul :line -MISC package :link(MISC),h5 +MISC package :link(MISC),h4 -Contents: A variety of computes, fixes, and pair styles that are not -commonly used, but don't align with other packages. Do a directory +[Contents:] + +A variety of compute, fix, pair, dump styles with specialized +capabilities that don't align with other packages. Do a directory listing, "ls src/MISC", to see the list of commands. -To install via make or Make.py: +[Install or un-install:] make yes-misc make machine :pre -Make.py -p misc -a machine :pre - -To un-install via make or Make.py: - make no-misc make machine :pre -Make.py -p ^misc -a machine :pre +[Supporting info:] -Supporting info: "compute ti"_compute_ti.html, "fix -evaporate"_fix_evaporate.html, "fix tmm"_fix_ttm.html, "fix -viscosity"_fix_viscosity.html, examples/misc +src/MISC: filenames -> commands +"compute ti"_compute_ti.html +"fix evaporate"_fix_evaporate.html +"fix orient/fcc"_fix_orient.html +"fix ttm"_fix_ttm.html +"fix thermal/conductivity"_fix_thermal_conductivity.html +"fix viscosity"_fix_viscosity.html +examples/KAPPA +examples/VISCOSITY +http://lammps.sandia.gov/pictures.html#ttm +http://lammps.sandia.gov/movies.html#evaporation :ul :line -MOLECULE package :link(MOLECULE),h5 +MOLECULE package :link(MOLECULE),h4 -Contents: A large number of atom, pair, bond, angle, dihedral, -improper styles that are used to model molecular systems with fixed -covalent bonds. The pair styles include terms for the Dreiding -(hydrogen-bonding) and CHARMM force fields, and TIP4P water model. +[Contents:] -To install via make or Make.py: +A large number of atom, pair, bond, angle, dihedral, improper styles +that are used to model molecular systems with fixed covalent bonds. +The pair styles include the Dreiding (hydrogen-bonding) and CHARMM +force fields, and a TIP4P water model. + +[Install or un-install:] make yes-molecule make machine :pre -Make.py -p molecule -a machine :pre - -To un-install via make or Make.py: - make no-molecule make machine :pre -Make.py -p ^molecule -a machine :pre - -Supporting info:"atom_style"_atom_style.html, -"bond_style"_bond_style.html, "angle_style"_angle_style.html, -"dihedral_style"_dihedral_style.html, -"improper_style"_improper_style.html, "pair_style -hbond/dreiding/lj"_pair_hbond_dreiding.html, "pair_style -lj/charmm/coul/charmm"_pair_charmm.html, -"Section 6.3"_Section_howto.html#howto_3, -examples/micelle, examples/peptide, bench/in.chain, bench/in.rhodo +[Supporting info:] + +src/MOLECULE: filenames -> commands +"atom_style"_atom_style.html +"bond_style"_bond_style.html +"angle_style"_angle_style.html +"dihedral_style"_dihedral_style.html +"improper_style"_improper_style.html +"pair_style hbond/dreiding/lj"_pair_hbond_dreiding.html +"pair_style lj/charmm/coul/charmm"_pair_charmm.html +"Section 6.3"_Section_howto.html#howto_3 +examples/cmap +examples/dreiding +examples/micelle, +examples/peptide +bench/in.chain +bench/in.rhodo :ul :line -MPIIO package :link(MPIIO),h5 +MPIIO package :link(MPIIO),h4 + +[Contents:] -Contents: Support for parallel output/input of dump and restart files -via the MPIIO library, which is part of the standard message-passing -interface (MPI) library. It adds "dump styles"_dump.html with a -"mpiio" in their style name. Restart files with an ".mpiio" suffix -are also written and read in parallel. +Support for parallel output/input of dump and restart files via the +MPIIO library. It adds "dump styles"_dump.html with a "mpiio" in +their style name. Restart files with an ".mpiio" suffix are also +written and read in parallel. -To install via make or Make.py: +[Install or un-install:] +Note that MPIIO is part of the standard message-passing interface +(MPI) library, so you should not need any additional compiler or link +settings, beyond what LAMMPS normally uses for MPI on your system. + make yes-mpiio make machine :pre + +make no-mpiio +make machine :pre + +[Supporting info:] -Make.py -p mpiio -a machine :pre +src/MPIIO: filenames -> commands +"dump"_dump.html +"restart"_restart.html +"write_restart"_write_restart.html +"read_restart"_read_restart.html :ul -To un-install via make or Make.py: +:line + +MSCG package :link(MSCG),h4 -make no-mpiio +[Contents:] + +A "fix mscg"_fix_mscg.html command which can parameterize a +Mulit-Scale Coarse-Graining (MSCG) model using the open-source "MS-CG +library"_mscg. + +:link(mscg,https://github.com/uchicago-voth/MSCG-release) + +To use this package you must have the MS-CG library available on your +system. + +[Authors:] The fix was written by Lauren Abbott (Sandia). The MS-CG +library was developed by Jacob Wagner in Greg Voth's group at the +University of Chicago. + +[Install or un-install:] + +Before building LAMMPS with this package, you must first download and +build the MS-CG library. Building the MS-CG library and using it from +LAMMPS requires a C++11 compatible compiler, and that LAPACK and GSL +(GNU Scientific Library) libraries be installed on your machine. See +the lib/mscg/README and MSCG/Install files for more details. + +Assuming these libraries are in place, you can do the download and +build of MS-CG manually if you prefer; follow the instructions in +lib/mscg/README. You can also do it in one step from the lammps/src +dir, using a command like these, which simply invoke the +lib/mscg/Install.py script with the specified args: + +make lib-mscg # print help message +make lib-mscg args="-g -b -l" # download and build in default lib/mscg/MSCG-release-master +make lib-mscg args="-h . MSCG -g -b -l" # download and build in lib/mscg/MSCG +make lib-mscg args="-h ~ MSCG -g -b -l" # download and build in ~/mscg :pre + +Note that the final -l switch is to create 2 symbolic (soft) links, +"includelink" and "liblink", in lib/mscg to point to the MS-CG src +dir. When LAMMPS builds it will use these links. You should not need +to edit the lib/mscg/Makefile.lammps file. + +You can then install/un-install the package and build LAMMPS in the +usual manner: + +make yes-mscg +make machine :pre + +make no-mscg make machine :pre -Make.py -p ^mpiio -a machine :pre +[Supporting info:] -Supporting info: "dump"_dump.html, "restart"_restart.html, -"write_restart"_write_restart.html, "read_restart"_read_restart.html +src/MSCG: filenames -> commands +src/MSCG/README +lib/mscg/README +examples/mscg :ul :line + +OPT package :link(OPT),h4 -OPT package :link(OPT),h5 +[Contents:] -Contents: A handful of pair styles with an "opt" in their style name -which are optimized for improved CPU performance on single or multiple -cores. These include EAM, LJ, CHARMM, and Morse potentials. "Section -5.3.5"_accelerate_opt.html gives details of how to build and -use this package. See the KOKKOS, USER-INTEL, and USER-OMP packages, -which also have styles optimized for CPU performance. +A handful of pair styles which are optimized for improved CPU +performance on single or multiple cores. These include EAM, LJ, +CHARMM, and Morse potentials. The styles have an "opt" suffix in +their style name. "Section 5.3.5"_accelerate_opt.html gives details +of how to build and use this package. Its styles can be invoked at +run time via the "-sf opt" or "-suffix opt" "command-line +switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS, +"USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which +have styles optimized for CPU performance. -Some C++ compilers, like the Intel compiler, require the compile flag -"-restrict" to build LAMMPS with the OPT package. It should be added -to the CCFLAGS line of your Makefile.machine. Or use Makefile.opt in -src/MAKE/OPTIONS, via "make opt". For compilers that use the flag, -the Make.py command adds it automatically to the Makefile.auto file it -creates and uses. +[Authors:] James Fischer (High Performance Technologies), David Richie, +and Vincent Natoli (Stone Ridge Technolgy). -To install via make or Make.py: +[Install or un-install:] make yes-opt make machine :pre -Make.py -p opt -a machine :pre - -To un-install via make or Make.py: - make no-opt make machine :pre -Make.py -p ^opt -a machine :pre +NOTE: The compile flag "-restrict" must be used to build LAMMPS with +the OPT package. It should be added to the CCFLAGS line of your +Makefile.machine. See Makefile.opt in src/MAKE/OPTIONS for an +example. + +CCFLAGS: add -restrict :ul -Supporting info: "Section 5.3"_Section_accelerate.html#acc_3, -"Section 5.3.5"_accelerate_opt.html, Pair Styles section of -"Section 3.5"_Section_commands.html#cmd_5 for any pair style -listed with an (t), examples/accelerate, bench/KEPLER +[Supporting info:] + +src/OPT: filenames -> commands +"Section 5.3"_Section_accelerate.html#acc_3 +"Section 5.3.5"_accelerate_opt.html +"Section 2.7 -sf opt"_Section_start.html#start_7 +Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (t) +"Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line -PERI package :link(PERI),h5 +PERI package :link(PERI),h4 -Contents: Support for the Peridynamics method, a particle-based -meshless continuum model. The package includes an atom style, several -computes which calculate diagnostics, and several Peridynamic pair -styles which implement different materials models. +[Contents:] -To install via make or Make.py: +An atom style, several pair styles which implement different +Peridynamics materials models, and several computes which calculate +diagnostics. Peridynamics is a a particle-based meshless continuum +model. -make yes-peri -make machine :pre +[Authors:] The original package was created by Mike Parks (Sandia). +Additional Peridynamics models were added by Rezwanur Rahman and John +Foster (UTSA). -Make.py -p peri -a machine :pre +[Install or un-install:] -To un-install via make or Make.py: +make yes-peri +make machine :pre make no-peri make machine :pre -Make.py -p ^peri -a machine :pre +[Supporting info:] -Supporting info: -"doc/PDF/PDLammps_overview.pdf"_PDF/PDLammps_overview.pdf, -"doc/PDF/PDLammps_EPS.pdf"_PDF/PDLammps_EPS.pdf, -"doc/PDF/PDLammps_VES.pdf"_PDF/PDLammps_VES.pdf, "atom_style -peri"_atom_style.html, "compute damage/atom"_compute_damage_atom.html, -"pair_style peri/pmb"_pair_peri.html, examples/peri +src/PERI: filenames -> commands +"doc/PDF/PDLammps_overview.pdf"_PDF/PDLammps_overview.pdf +"doc/PDF/PDLammps_EPS.pdf"_PDF/PDLammps_EPS.pdf +"doc/PDF/PDLammps_VES.pdf"_PDF/PDLammps_VES.pdf +"atom_style peri"_atom_style.html +"pair_style peri/*"_pair_peri.html +"compute damage/atom"_compute_damage_atom.html +"compute plasticity/atom"_compute_plasticity_atom.html +examples/peri +http://lammps.sandia.gov/movies.html#peri :ul :line -POEMS package :link(POEMS),h5 +POEMS package :link(POEMS),h4 -Contents: A fix that wraps the Parallelizable Open source Efficient -Multibody Software (POEMS) librar, which is able to simulate the -dynamics of articulated body systems. These are systems with multiple -rigid bodies (collections of atoms or particles) whose motion is -coupled by connections at hinge points. +[Contents:] -Building LAMMPS with the POEMS package requires first building the -POEMS library itself, which is a set of C++ files in lib/poems. -Details of how to do this are in lib/poems/README. As illustrated -below, perform a "make" using one of the Makefile.machine files in -lib/poems which should create a lib/meam/libpoems.a file. -Makefile.g++ and Makefile.icc are examples for the GNU and Intel C++ -compilers. The "make" also creates a lib/poems/Makefile.lammps file -which you should not need to change. Note the Make.py script has a -"-poems" option to allow the POEMS library and LAMMPS to be built in -one step. Type "python src/Make.py -h -poems" to see the details. +A fix that wraps the Parallelizable Open source Efficient Multibody +Software (POEMS) library, which is able to simulate the dynamics of +articulated body systems. These are systems with multiple rigid +bodies (collections of particles) whose motion is coupled by +connections at hinge points. -To install via make or Make.py: +[Author:] Rudra Mukherjee (JPL) while at RPI. -cd ~/lammps/lib/poems -make -f Makefile.g++ # for example -cd ~/lammps/src -make yes-poems -make machine :pre +[Install or un-install:] + +Before building LAMMPS with this package, you must first build the +POEMS library in lib/poems. You can do this manually if you prefer; +follow the instructions in lib/poems/README. You can also do it in +one step from the lammps/src dir, using a command like these, which +simply invoke the lib/poems/Install.py script with the specified args: + +make lib-poems # print help message +make lib-poems args="-m g++" # build with GNU g++ compiler +make lib-poems args="-m icc" # build with Intel icc compiler :pre -Make.py -p poems -poems make=g++ -a machine :pre +The build should produce two files: lib/poems/libpoems.a and +lib/poems/Makefile.lammps. The latter is copied from an existing +Makefile.lammps.* and has settings needed to build LAMMPS with the +POEMS library (though typically the settings are just blank). If +necessary, you can edit/create a new lib/poems/Makefile.machine file +for your system, which should define an EXTRAMAKE variable to specify +a corresponding Makefile.lammps.machine file. -To un-install via make or Make.py: +You can then install/un-install the package and build LAMMPS in the +usual manner: + +make yes-poems +make machine :pre make no-meam make machine :pre -Make.py -p ^meam -a machine :pre +[Supporting info:] -Supporting info: src/POEMS/README, lib/poems/README, -"fix poems"_fix_poems.html, examples/rigid +src/POEMS: filenames -> commands +src/POEMS/README +lib/poems/README +"fix poems"_fix_poems.html +examples/rigid :ul :line -PYTHON package :link(PYTHON),h5 +PYTHON package :link(PYTHON),h4 -Contents: A "python"_python.html command which allow you to execute -Python code from a LAMMPS input script. The code can be in a separate -file or embedded in the input script itself. See "Section -11.2"_Section_python.html#py_2 for an overview of using Python from -LAMMPS and for other ways to use LAMMPS and Python together. +[Contents:] -Building with the PYTHON package assumes you have a Python shared -library available on your system, which needs to be a Python 2 -version, 2.6 or later. Python 3 is not yet supported. The build uses -the contents of the lib/python/Makefile.lammps file to find all the Python -files required in the build/link process. See the lib/python/README -file if the settings in that file do not work on your system. Note -that the Make.py script has a "-python" option to allow an alternate -lib/python/Makefile.lammps file to be specified and LAMMPS to be built -in one step. Type "python src/Make.py -h -python" to see the details. +A "python"_python.html command which allow you to execute Python code +from a LAMMPS input script. The code can be in a separate file or +embedded in the input script itself. See "Section +11.2"_Section_python.html#py_2 for an overview of using Python from +LAMMPS in this manner and the entire section for other ways to use +LAMMPS and Python together. -To install via make or Make.py: +[Install or un-install:] make yes-python make machine :pre -Make.py -p python -a machine :pre - -To un-install via make or Make.py: - make no-python make machine :pre -Make.py -p ^python -a machine :pre +NOTE: Building with the PYTHON package assumes you have a Python +shared library available on your system, which needs to be a Python 2 +version, 2.6 or later. Python 3 is not yet supported. See the +lib/python/README for more details. Note that the build uses the +lib/python/Makefile.lammps file in the compile/link process. You +should only need to create a new Makefile.lammps.* file (and copy it +to Makefile.lammps) if the LAMMPS build fails. -Supporting info: examples/python +[Supporting info:] + +src/PYTHON: filenames -> commands +"Section 11"_Section_python.html +lib/python/README +examples/python :ul :line -QEQ package :link(QEQ),h5 +QEQ package :link(QEQ),h4 + +[Contents:] -Contents: Several fixes for performing charge equilibration (QEq) via -severeal different algorithms. These can be used with pair styles -that use QEq as part of their formulation. +Several fixes for performing charge equilibration (QEq) via different +algorithms. These can be used with pair styles that perform QEq as +part of their formulation. -To install via make or Make.py: +[Install or un-install:] make yes-qeq make machine :pre -Make.py -p qeq -a machine :pre - -To un-install via make or Make.py: - make no-qeq make machine :pre -Make.py -p ^qeq -a machine :pre +[Supporting info:] -Supporting info: "fix qeq/*"_fix_qeq.html, examples/qeq +src/QEQ: filenames -> commands +"fix qeq/*"_fix_qeq.html +examples/qeq +examples/streitz :ul :line -REAX package :link(REAX),h5 +REAX package :link(REAX),h4 -Contents: A pair style for the ReaxFF potential, a universal reactive -force field, as well as a "fix reax/bonds"_fix_reax_bonds.html command -for monitoring molecules as bonds are created and destroyed. +[Contents:] -Building LAMMPS with the REAX package requires first building the REAX -library itself, which is a set of Fortran 95 files in lib/reax. -Details of how to do this are in lib/reax/README. As illustrated -below, perform a "make" using one of the Makefile.machine files in -lib/reax which should create a lib/reax/libreax.a file. -Makefile.gfortran and Makefile.ifort are examples for the GNU Fortran -and Intel Fortran compilers. The "make" also copies a -lib/reax/Makefile.lammps.machine file to lib/reax/Makefile.lammps. -This file has settings that enable the C++ compiler used to build -LAMMPS to link with a Fortran library (typically the 2 compilers to be -consistent e.g. both Intel compilers, or both GNU compilers). If the -settings in Makefile.lammps for your compilers and machine are not -correct, the LAMMPS link will fail. Note that the Make.py script has -a "-reax" option to allow the REAX library and LAMMPS to be built in -one step. Type "python src/Make.py -h -reax" to see the details. - -To install via make or Make.py: - -cd ~/lammps/lib/reax -make -f Makefile.gfortran # for example -cd ~/lammps/src -make yes-reax -make machine :pre +A pair style which wraps a Fortran library which implements the ReaxFF +potential, which is a universal reactive force field. See the +"USER-REAXC package"_#USER-REAXC for an alternate implementation in +C/C++. Also a "fix reax/bonds"_fix_reax_bonds.html command for +monitoring molecules as bonds are created and destroyed. + +[Author:] Aidan Thompson (Sandia). + +[Install or un-install:] + +Before building LAMMPS with this package, you must first build the +REAX library in lib/reax. You can do this manually if you prefer; +follow the instructions in lib/reax/README. You can also do it in one +step from the lammps/src dir, using a command like these, which simply +invoke the lib/reax/Install.py script with the specified args: -Make.py -p reax -reax make=gfortran -a machine :pre +make lib-reax # print help message +make lib-reax args="-m gfortran" # build with GNU Fortran compiler +make lib-reax args="-m ifort" # build with Intel ifort compiler :pre -To un-install via make or Make.py: +The build should produce two files: lib/reax/libreax.a and +lib/reax/Makefile.lammps. The latter is copied from an existing +Makefile.lammps.* and has settings needed to link C++ (LAMMPS) with +Fortran (REAX library). Typically the two compilers used for LAMMPS +and the REAX library need to be consistent (e.g. both Intel or both +GNU compilers). If necessary, you can edit/create a new +lib/reax/Makefile.machine file for your system, which should define an +EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine +file. + +You can then install/un-install the package and build LAMMPS in the +usual manner: + +make yes-reax +make machine :pre make no-reax make machine :pre -Make.py -p ^reax -a machine :pre +[Supporting info:] -Supporting info: lib/reax/README, "pair_style reax"_pair_reax.html, -"fix reax/bonds"_fix_reax_bonds.html, examples/reax +src/REAX: filenames -> commands +lib/reax/README +"pair_style reax"_pair_reax.html +"fix reax/bonds"_fix_reax_bonds.html +examples/reax :ul :line -REPLICA package :link(REPLICA),h5 +REPLICA package :link(REPLICA),h4 -Contents: A collection of multi-replica methods that are used by -invoking multiple instances (replicas) of LAMMPS -simulations. Communication between individual replicas is performed in -different ways by the different methods. See "Section +[Contents:] + +A collection of multi-replica methods which can be used when running +multiple LAMMPS simulations (replicas). See "Section 6.5"_Section_howto.html#howto_5 for an overview of how to run -multi-replica simulations in LAMMPS. Multi-replica methods included -in the package are nudged elastic band (NEB), parallel replica -dynamics (PRD), temperature accelerated dynamics (TAD), parallel -tempering, and a verlet/split algorithm for performing long-range -Coulombics on one set of processors, and the remainder of the force -field calculation on another set. +multi-replica simulations in LAMMPS. Methods in the package include +nudged elastic band (NEB), parallel replica dynamics (PRD), +temperature accelerated dynamics (TAD), parallel tempering, and a +verlet/split algorithm for performing long-range Coulombics on one set +of processors, and the remainder of the force field calcalation on +another set. -To install via make or Make.py: +[Install or un-install:] make yes-replica make machine :pre -Make.py -p replica -a machine :pre - -To un-install via make or Make.py: - make no-replica make machine :pre -Make.py -p ^replica -a machine :pre +[Supporting info:] -Supporting info: "Section 6.5"_Section_howto.html#howto_5, -"neb"_neb.html, "prd"_prd.html, "tad"_tad.html, "temper"_temper.html, -"run_style verlet/split"_run_style.html, examples/neb, examples/prd, -examples/tad +src/REPLICA: filenames -> commands +"Section 6.5"_Section_howto.html#howto_5 +"neb"_neb.html +"prd"_prd.html +"tad"_tad.html +"temper"_temper.html, +"run_style verlet/split"_run_style.html +examples/neb +examples/prd +examples/tad :ul :line -RIGID package :link(RIGID),h5 +RIGID package :link(RIGID),h4 -Contents: A collection of computes and fixes which enforce rigid -constraints on collections of atoms or particles. This includes SHAKE -and RATTLE, as well as variants of rigid-body time integrators for a -few large bodies or many small bodies. +[Contents:] -To install via make or Make.py: +Fixes which enforce rigid constraints on collections of atoms or +particles. This includes SHAKE and RATTLE, as well as varous +rigid-body integrators for a few large bodies or many small bodies. +Also several computes which calculate properties of rigid bodies. + +To install/build: make yes-rigid make machine :pre -Make.py -p rigid -a machine :pre - -To un-install via make or Make.py: +To un-install/re-build: make no-rigid make machine :pre -Make.py -p ^rigid -a machine :pre +[Supporting info:] -Supporting info: "compute erotate/rigid"_compute_erotate_rigid.html, -"fix shake"_fix_shake.html, "fix rattle"_fix_shake.html, "fix -rigid/*"_fix_rigid.html, examples/ASPHERE, examples/rigid +src/RIGID: filenames -> commands +"compute erotate/rigid"_compute_erotate_rigid.html +fix shake"_fix_shake.html +"fix rattle"_fix_shake.html +"fix rigid/*"_fix_rigid.html +examples/ASPHERE +examples/rigid +bench/in.rhodo +http://lammps.sandia.gov/movies.html#box +http://lammps.sandia.gov/movies.html#star :ul :line -SHOCK package :link(SHOCK),h5 +SHOCK package :link(SHOCK),h4 -Contents: A small number of fixes useful for running impact -simulations where a shock-wave passes through a material. +[Contents:] -To install via make or Make.py: +Fixes for running impact simulations where a shock-wave passes through +a material. + +[Install or un-install:] make yes-shock make machine :pre -Make.py -p shock -a machine :pre - -To un-install via make or Make.py: - make no-shock make machine :pre -Make.py -p ^shock -a machine :pre +[Supporting info:] -Supporting info: "fix append/atoms"_fix_append_atoms.html, "fix -msst"_fix_msst.html, "fix nphug"_fix_nphug.html, "fix -wall/piston"_fix_wall_piston.html, examples/hugoniostat, examples/msst +src/SHOCK: filenames -> commands +"fix append/atoms"_fix_append_atoms.html +"fix msst"_fix_msst.html +"fix nphug"_fix_nphug.html +"fix wall/piston"_fix_wall_piston.html +examples/hugoniostat +examples/msst :ul :line -SNAP package :link(SNAP),h5 +SNAP package :link(SNAP),h4 -Contents: A pair style for the spectral neighbor analysis potential -(SNAP), which is an empirical potential which can be quantum accurate -when fit to an archive of DFT data. Computes useful for analyzing -properties of the potential are also included. +[Contents:] -To install via make or Make.py: +A pair style for the spectral neighbor analysis potential (SNAP). +SNAP is methodology for deriving a highly accurate classical potential +fit to a large archive of quantum mechanical (DFT) data. Also several +computes which analyze attributes of the potential. -make yes-snap -make machine :pre +[Author:] Aidan Thompson (Sandia). -Make.py -p snap -a machine :pre +[Install or un-install:] -To un-install via make or Make.py: +make yes-snap +make machine :pre make no-snap make machine :pre -Make.py -p ^snap -a machine :pre +[Supporting info:] -Supporting info: "pair snap"_pair_snap.html, "compute -sna/atom"_compute_sna_atom.html, "compute snad/atom"_compute_sna_atom.html, -"compute snav/atom"_compute_sna_atom.html, examples/snap +src/SNAP: filenames -> commands +"pair snap"_pair_snap.html +"compute sna/atom"_compute_sna_atom.html +"compute snad/atom"_compute_sna_atom.html +"compute snav/atom"_compute_sna_atom.html +examples/snap :ul :line -SRD package :link(SRD),h5 +SRD package :link(SRD),h4 + +[Contents:] -Contents: Two fixes which implement the Stochastic Rotation Dynamics -(SRD) method for coarse-graining of a solvent, typically around large -colloidal-scale particles. +A pair of fixes which implement the Stochastic Rotation Dynamics (SRD) +method for coarse-graining of a solvent, typically around large +colloidal particles. -To install via make or Make.py: +To install/build: make yes-srd make machine :pre -Make.py -p srd -a machine :pre - -To un-install via make or Make.py: +To un-install/re-build: make no-srd make machine :pre -Make.py -p ^srd -a machine :pre +[Supporting info:] -Supporting info: "fix srd"_fix_srd.html, "fix -wall/srd"_fix_wall_srd.html, examples/srd, examples/ASPHERE +src/SRD: filenames -> commands +"fix srd"_fix_srd.html +"fix wall/srd"_fix_wall_srd.html +examples/srd +examples/ASPHERE +http://lammps.sandia.gov/movies.html#tri +http://lammps.sandia.gov/movies.html#line +http://lammps.sandia.gov/movies.html#poly :ul :line -VORONOI package :link(VORONOI),h5 +VORONOI package :link(VORONOI),h4 -Contents: A "compute voronoi/atom"_compute_voronoi_atom.html command -which computes the Voronoi tesselation of a collection of atoms or -particles by wrapping the Voro++ lib +[Contents:] -To build LAMMPS with the KIM package you must have previously -installed the KIM API (library) on your system. The lib/kim/README -file explains how to download and install KIM. Building with the KIM -package also uses the lib/kim/Makefile.lammps file in the compile/link -process. You should not need to edit this file. +A compute command which calculates the Voronoi tesselation of a +collection of atoms by wrapping the "Voro++ library"_voronoi. This +can be used to calculate the local volume or each atoms or its near +neighbors. +:link(voronoi,http://math.lbl.gov/voro++) -To build LAMMPS with the VORONOI package you must have previously -installed the Voro++ library on your system. The lib/voronoi/README -file explains how to download and install Voro++. There is a -lib/voronoi/install.py script which automates the process. Type -"python install.py" to see instructions. The final step is to create -soft links in the lib/voronoi directory for "includelink" and -"liblink" which point to installed Voro++ directories. Building with -the VORONOI package uses the contents of the -lib/voronoi/Makefile.lammps file in the compile/link process. You -should not need to edit this file. Note that the Make.py script has a -"-voronoi" option to allow the Voro++ library to be downloaded and/or -installed and LAMMPS to be built in one step. Type "python -src/Make.py -h -voronoi" to see the details. +To use this package you must have the Voro++ library available on your +system. -To install via make or Make.py: +[Author:] Daniel Schwen (INL) while at LANL. The open-source Voro++ +library was written by Chris Rycroft (Harvard U) while at UC Berkeley +and LBNL. -cd ~/lammps/lib/voronoi -python install.py -g -b -l # download Voro++, build in lib/voronoi, create links -cd ~/lammps/src -make yes-voronoi -make machine :pre +[Install or un-install:] + +Before building LAMMPS with this package, you must first download and +build the Voro++ library. You can do this manually if you prefer; +follow the instructions in lib/voronoi/README. You can also do it in +one step from the lammps/src dir, using a command like these, which +simply invoke the lib/voronoi/Install.py script with the specified +args: + +make lib-voronoi # print help message +make lib-voronoi args="-g -b -l" # download and build in default lib/voronoi/voro++-0.4.6 +make lib-voronoi args="-h . voro++ -g -b -l" # download and build in lib/voronoi/voro++ +make lib-voronoi args="-h ~ voro++ -g -b -l" # download and build in ~/voro++ :pre -Make.py -p voronoi -voronoi install="-g -b -l" -a machine :pre +Note that the final -l switch is to create 2 symbolic (soft) links, +"includelink" and "liblink", in lib/voronoi to point to the Voro++ src +dir. When LAMMPS builds it will use these links. You should not need +to edit the lib/voronoi/Makefile.lammps file. -To un-install via make or Make.py: +You can then install/un-install the package and build LAMMPS in the +usual manner: + +make yes-voronoi +make machine :pre make no-voronoi make machine :pre -Make.py -p ^voronoi -a machine :pre - -Supporting info: src/VORONOI/README, lib/voronoi/README, "compute -voronoi/atom"_compute_voronoi_atom.html, examples/voronoi +[Supporting info:] + +src/VORONOI: filenames -> commands +src/VORONOI/README +lib/voronoi/README +"compute voronoi/atom"_compute_voronoi_atom.html +examples/voronoi :ul +:line :line -4.2 User packages :h4,link(pkg_2) +USER-ATC package :link(USER-ATC),h4 -The current list of user-contributed packages is as follows: +[Contents:] -Package, Description, Author(s), Doc page, Example, Pic/movie, Library -"USER-ATC"_#USER-ATC, atom-to-continuum coupling, Jones & Templeton & Zimmerman (1), "fix atc"_fix_atc.html, USER/atc, "atc"_atc, lib/atc -"USER-AWPMD"_#USER-AWPMD, wave-packet MD, Ilya Valuev (JIHT), "pair_style awpmd/cut"_pair_awpmd.html, USER/awpmd, -, lib/awpmd -"USER-CGDNA"_#USER-CGDNA, coarse-grained DNA force fields, Oliver Henrich (U Strathclyde Glasgow), src/USER-CGDNA/README, USER/cgdna, -, - -"USER-CGSDK"_#USER-CGSDK, SDK coarse-graining model, Axel Kohlmeyer (Temple U), "pair_style lj/sdk"_pair_sdk.html, USER/cgsdk, "cgsdk"_cgsdk, - -"USER-COLVARS"_#USER-COLVARS, collective variables, Fiorin & Henin & Kohlmeyer (2), "fix colvars"_fix_colvars.html, USER/colvars, "colvars"_colvars, lib/colvars -"USER-DIFFRACTION"_#USER-DIFFRACTION, virutal x-ray and electron diffraction, Shawn Coleman (ARL),"compute xrd"_compute_xrd.html, USER/diffraction, -, - -"USER-DPD"_#USER-DPD, reactive dissipative particle dynamics (DPD), Larentzos & Mattox & Brennan (5), src/USER-DPD/README, USER/dpd, -, - -"USER-DRUDE"_#USER-DRUDE, Drude oscillators, Dequidt & Devemy & Padua (3), "tutorial"_tutorial_drude.html, USER/drude, -, - -"USER-EFF"_#USER-EFF, electron force field, Andres Jaramillo-Botero (Caltech), "pair_style eff/cut"_pair_eff.html, USER/eff, "eff"_eff, - -"USER-FEP"_#USER-FEP, free energy perturbation, Agilio Padua (U Blaise Pascal Clermont-Ferrand), "compute fep"_compute_fep.html, USER/fep, -, - -"USER-H5MD"_#USER-H5MD, dump output via HDF5, Pierre de Buyl (KU Leuven), "dump h5md"_dump_h5md.html, -, -, lib/h5md -"USER-INTEL"_#USER-INTEL, Vectorized CPU and Intel(R) coprocessor styles, W. Michael Brown (Intel), "Section 5.3.2"_accelerate_intel.html, examples/intel, -, - -"USER-LB"_#USER-LB, Lattice Boltzmann fluid, Colin Denniston (U Western Ontario), "fix lb/fluid"_fix_lb_fluid.html, USER/lb, -, - -"USER-MGPT"_#USER-MGPT, fast MGPT multi-ion potentials, Tomas Oppelstrup & John Moriarty (LLNL), "pair_style mgpt"_pair_mgpt.html, USER/mgpt, -, - -"USER-MISC"_#USER-MISC, single-file contributions, USER-MISC/README, USER-MISC/README, -, -, - -"USER-MANIFOLD"_#USER-MANIFOLD, motion on 2d surface, Stefan Paquay (Eindhoven U of Technology), "fix manifoldforce"_fix_manifoldforce.html, USER/manifold, "manifold"_manifold, - -"USER-MOLFILE"_#USER-MOLFILE, "VMD"_VMD molfile plug-ins, Axel Kohlmeyer (Temple U), "dump molfile"_dump_molfile.html, -, -, VMD-MOLFILE -"USER-NC-DUMP"_#USER-NC-DUMP, dump output via NetCDF, Lars Pastewka (Karlsruhe Institute of Technology, KIT), "dump nc / dump nc/mpiio"_dump_nc.html, -, -, lib/netcdf -"USER-OMP"_#USER-OMP, OpenMP threaded styles, Axel Kohlmeyer (Temple U), "Section 5.3.4"_accelerate_omp.html, -, -, - -"USER-PHONON"_#USER-PHONON, phonon dynamical matrix, Ling-Ti Kong (Shanghai Jiao Tong U), "fix phonon"_fix_phonon.html, USER/phonon, -, - -"USER-QMMM"_#USER-QMMM, QM/MM coupling, Axel Kohlmeyer (Temple U), "fix qmmm"_fix_qmmm.html, USER/qmmm, -, lib/qmmm -"USER-QTB"_#USER-QTB, quantum nuclear effects, Yuan Shen (Stanford), "fix qtb"_fix_qtb.html "fix qbmsst"_fix_qbmsst.html, qtb, -, - -"USER-QUIP"_#USER-QUIP, QUIP/libatoms interface, Albert Bartok-Partay (U Cambridge), "pair_style quip"_pair_quip.html, USER/quip, -, lib/quip -"USER-REAXC"_#USER-REAXC, C version of ReaxFF, Metin Aktulga (LBNL), "pair_style reaxc"_pair_reax_c.html, reax, -, - -"USER-SMD"_#USER-SMD, smoothed Mach dynamics, Georg Ganzenmuller (EMI), "SMD User Guide"_PDF/SMD_LAMMPS_userguide.pdf, USER/smd, -, - -"USER-SMTBQ"_#USER-SMTBQ, Second Moment Tight Binding - QEq potential, Salles & Maras & Politano & Tetot (4), "pair_style smtbq"_pair_smtbq.html, USER/smtbq, -, - -"USER-SPH"_#USER-SPH, smoothed particle hydrodynamics, Georg Ganzenmuller (EMI), "SPH User Guide"_PDF/SPH_LAMMPS_userguide.pdf, USER/sph, "sph"_sph, - -"USER-TALLY"_#USER-TALLY, Pairwise tallied computes, Axel Kohlmeyer (Temple U), "compute XXX/tally"_compute_tally.html, USER/tally, -, - -"USER-VTK"_#USER-VTK, VTK-style dumps, Berger and Queteschiner (6), "compute custom/vtk"_dump_custom_vtk.html, -, -, lib/vtk -:tb(ea=c) +ATC stands for atoms-to-continuum. This package implements a "fix +atc"_fix_atc.html command to either couple molecular dynamics with +continuum finite element equations or perform on-the-fly conversion of +atomic information to continuum fields. -:link(atc,http://lammps.sandia.gov/pictures.html#atc) -:link(cgsdk,http://lammps.sandia.gov/pictures.html#cg) -:link(eff,http://lammps.sandia.gov/movies.html#eff) -:link(manifold,http://lammps.sandia.gov/movies.html#manifold) -:link(sph,http://lammps.sandia.gov/movies.html#sph) -:link(VMD,http://www.ks.uiuc.edu/Research/vmd) +[Authors:] Reese Jones, Jeremy Templeton, Jon Zimmerman (Sandia). -The "Authors" column lists a name(s) if a specific person is -responsible for creating and maintaining the package. +[Install or un-install:] + +Before building LAMMPS with this package, you must first build the ATC +library in lib/atc. You can do this manually if you prefer; follow +the instructions in lib/atc/README. You can also do it in one step +from the lammps/src dir, using a command like these, which simply +invoke the lib/atc/Install.py script with the specified args: -(1) The ATC package was created by Reese Jones, Jeremy Templeton, and -Jon Zimmerman (Sandia). +make lib-atc # print help message +make lib-atc args="-m g++" # build with GNU g++ compiler +make lib-atc args="-m icc" # build with Intel icc compiler :pre + +The build should produce two files: lib/atc/libatc.a and +lib/atc/Makefile.lammps. The latter is copied from an existing +Makefile.lammps.* and has settings needed to build LAMMPS with the ATC +library. If necessary, you can edit/create a new +lib/atc/Makefile.machine file for your system, which should define an +EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine +file. -(2) The COLVARS package was created by Axel Kohlmeyer (Temple U) using -the colvars module library written by Giacomo Fiorin (Temple U) and -Jerome Henin (LISM, Marseille, France). +Note that the Makefile.lammps file has settings for the BLAS and +LAPACK linear algebra libraries. As explained in lib/atc/README these +can either exist on your system, or you can use the files provided in +lib/linalg. In the latter case you also need to build the library +in lib/linalg with a command like these: -(3) The DRUDE package was created by Alain Dequidt (U Blaise Pascal -Clermont-Ferrand) and co-authors Julien Devemy (CNRS) and Agilio Padua -(U Blaise Pascal). +make lib-linalg # print help message +make lib-atc args="-m gfortran" # build with GNU Fortran compiler -(4) The SMTBQ package was created by Nicolas Salles, Emile Maras, -Olivier Politano, and Robert Tetot (LAAS-CNRS, France). +You can then install/un-install the package and build LAMMPS in the +usual manner: -(5) The USER-DPD package was created by James Larentzos (ARL), Timothy -Mattox (Engility), and John Brennan (ARL). +make yes-user-atc +make machine :pre + +make no-user-atc +make machine :pre + +[Supporting info:] -(6) The USER-VTK package was created by Richard Berger (JKU) and -Daniel Queteschiner (DCS Computing). +src/USER-ATC: filenames -> commands +src/USER-ATC/README +"fix atc"_fix_atc.html +examples/USER/atc +http://lammps.sandia.gov/pictures.html#atc :ul -The "Doc page" column links to either a sub-section of the -"Section 6"_Section_howto.html of the manual, or an input script -command implemented as part of the package, or to additional -documentation provided within the package. +:line -The "Example" column is a sub-directory in the examples directory of -the distribution which has an input script that uses the package. -E.g. "peptide" refers to the examples/peptide directory. +USER-AWPMD package :link(USER-AWPMD),h4 -The "Library" column lists an external library which must be built -first and which LAMMPS links to when it is built. If it is listed as -lib/package, then the code for the library is under the lib directory -of the LAMMPS distribution. See the lib/package/README file for info -on how to build the library. If it is not listed as lib/package, then -it is a third-party library not included in the LAMMPS distribution. -See details on all of this below for individual packages. +[Contents:] -:line +AWPMD stands for Antisymmetrized Wave Packet Molecular Dynamics. This +package implements an atom, pair, and fix style which allows electrons +to be treated as explicit particles in a classical molecular dynamics +model. -USER-ATC package :link(USER-ATC),h5 +[Author:] Ilya Valuev (JIHT, Russia). -Contents: ATC stands for atoms-to-continuum. This package implements -a "fix atc"_fix_atc.html command to either couple MD with continuum -finite element equations or perform on-the-fly post-processing of -atomic information to continuum fields. See src/USER-ATC/README for -more details. - -To build LAMMPS with this package ... - -To install via make or Make.py: +[Install or un-install:] + +Before building LAMMPS with this package, you must first build the +AWPMD library in lib/awpmd. You can do this manually if you prefer; +follow the instructions in lib/awpmd/README. You can also do it in +one step from the lammps/src dir, using a command like these, which +simply invoke the lib/awpmd/Install.py script with the specified args: -make yes-user-atc -make machine :pre +make lib-awpmd # print help message +make lib-awpmd args="-m g++" # build with GNU g++ compiler +make lib-awpmd args="-m icc" # build with Intel icc compiler :pre -Make.py -p atc -a machine :pre +The build should produce two files: lib/awpmd/libawpmd.a and +lib/awpmd/Makefile.lammps. The latter is copied from an existing +Makefile.lammps.* and has settings needed to build LAMMPS with the +AWPMD library. If necessary, you can edit/create a new +lib/awpmd/Makefile.machine file for your system, which should define +an EXTRAMAKE variable to specify a corresponding +Makefile.lammps.machine file. -To un-install via make or Make.py: +Note that the Makefile.lammps file has settings for the BLAS and +LAPACK linear algebra libraries. As explained in lib/awpmd/README +these can either exist on your system, or you can use the files +provided in lib/linalg. In the latter case you also need to build the +library in lib/linalg with a command like these: -make no-user-atc -make machine :pre +make lib-linalg # print help message +make lib-atc args="-m gfortran" # build with GNU Fortran compiler -Make.py -p ^atc -a machine :pre +You can then install/un-install the package and build LAMMPS in the +usual manner: -Supporting info:src/USER-ATC/README, "fix atc"_fix_atc.html, -examples/USER/atc +make yes-user-awpmd +make machine :pre + +make no-user-awpmd +make machine :pre + +[Supporting info:] -Authors: Reese Jones (rjones at sandia.gov), Jeremy Templeton (jatempl -at sandia.gov) and Jon Zimmerman (jzimmer at sandia.gov) at Sandia. -Contact them directly if you have questions. +src/USER-AWPMD: filenames -> commands +src/USER-AWPMD/README +"pair awpmd/cut"_pair_awpmd.html +"fix nve/awpmd"_fix_nve_awpmd.html +examples/USER/awpmd :ul :line -USER-AWPMD package :link(USER-AWPMD),h5 +USER-CGDNA package :link(USER-CGDNA),h4 -Contents: AWPMD stands for Antisymmetrized Wave Packet Molecular -Dynamics. This package implements an atom, pair, and fix style which -allows electrons to be treated as explicit particles in an MD -calculation. See src/USER-AWPMD/README for more details. +[Contents:] -To build LAMMPS with this package ... +Several pair styles, a bond style, and integration fixes for +coarse-grained models of single- and double-stranded DNA based on the +oxDNA model of Doye, Louis and Ouldridge at the University of Oxford. +This includes Langevin-type rigid-body integrators with improved +stability. -Supporting info: src/USER-AWPMD/README, "fix -awpmd/cut"_pair_awpmd.html, examples/USER/awpmd +[Author:] Oliver Henrich (University of Edinburgh). -Author: Ilya Valuev at the JIHT in Russia (valuev at -physik.hu-berlin.de). Contact him directly if you have questions. +[Install or un-install:] + +make yes-user-cgdna +make machine :pre + +make no-user-cgdna +make machine :pre + +[Supporting info:] + +src/USER-CGDNA: filenames -> commands +/src/USER-CGDNA/README +"pair_style oxdna/*"_pair_oxdna.html +"pair_style oxdna2/*"_pair_oxdna2.html +"bond_style oxdna/*"_bond_oxdna.html +"bond_style oxdna2/*"_bond_oxdna2.html +"fix nve/dotc/langevin"_fix_nve_dotc_langevin.html :ul :line -USER-CGSDK package :link(USER-CGSDK),h5 - -Contents: CGSDK stands for Shinoda-DeVane-Klein (SDK) coarse-grained -molecular dynamics force field. This package implements several pair -styles and an angle style using the coarse grained parametrization of -Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007) (SDK), with extensions -to simulate ionic liquids, electrolytes, lipids and charged amino acids. -See src/USER-CGSDK/README for more details. - -Supporting info: src/USER-CGSDK/README, "pair lj/sdk"_pair_sdk.html, -"pair lj/sdk/coul/long"_pair_sdk.html, "angle sdk"_angle_sdk.html, -examples/USER/cgsdk +USER-CGSDK package :link(USER-CGSDK),h4 -Author: Axel Kohlmeyer at Temple U (akohlmey at gmail.com). Contact -him directly if you have questions. +[Contents:] -:line +Several pair styles and an angle style which implement the +coarse-grained SDK model of Shinoda, DeVane, and Klein which enables +simulation of ionic liquids, electrolytes, lipids and charged amino +acids. -USER-CGDNA package :link(USER-CGDNA),h5 +[Author:] Axel Kohlmeyer (Temple U). -Contents: The CGDNA package implements coarse-grained force fields for -single- and double-stranded DNA. These are at the moment mainly the -oxDNA and oxDNA2 models, developed by Doye, Louis and Ouldridge at the University -of Oxford. The package also contains Langevin-type rigid-body -integrators with improved stability. +[Install or un-install:] + +make yes-user-cgsdk +make machine :pre + +make no-user-cgsdk +make machine :pre + +[Supporting info:] -See these doc pages to get started: +src/USER-CGSDK: filenames -> commands +src/USER-CGSDK/README +"pair_style lj/sdk/*"_pair_sdk.html +"angle_style sdk"_angle_sdk.html +examples/USER/cgsdk +http://lammps.sandia.gov/pictures.html#cg :ul -"bond_style oxdna/fene"_bond_oxdna.html -"bond_style oxdna2/fene"_bond_oxdna.html -"pair_style oxdna/..."_pair_oxdna.html -"pair_style oxdna2/..."_pair_oxdna2.html -"fix nve/dotc/langevin"_fix_nve_dotc_langevin.html :ul +:line -Supporting info: /src/USER-CGDNA/README, "bond_style -oxdna/fene"_bond_oxdna.html, "bond_style -oxdna2/fene"_bond_oxdna.html, "pair_style -oxdna/..."_pair_oxdna.html, "pair_style -oxdna2/..."_pair_oxdna2.html, "fix -nve/dotc/langevin"_fix_nve_dotc_langevin.html +USER-COLVARS package :link(USER-COLVARS),h4 + +[Contents:] + +COLVARS stands for collective variables, which can be used to +implement various enhanced sampling methods, including Adaptive +Biasing Force, Metadynamics, Steered MD, Umbrella Sampling and +Restraints. A "fix colvars"_fix_colvars.html command is implemented +which wraps a COLVARS library, which implements these methods. +simulations. + +[Authors:] Axel Kohlmeyer (Temple U). The COLVARS library was written +by Giacomo Fiorin (ICMS, Temple University, Philadelphia, PA, USA) and +Jerome Henin (LISM, CNRS, Marseille, France). + +[Install or un-install:] + +Before building LAMMPS with this package, you must first build the +COLVARS library in lib/colvars. You can do this manually if you +prefer; follow the instructions in lib/colvars/README. You can also +do it in one step from the lammps/src dir, using a command like these, +which simply invoke the lib/colvars/Install.py script with the +specified args: + +make lib-colvars # print help message +make lib-colvars args="-m g++" # build with GNU g++ compiler :pre + +The build should produce two files: lib/colvars/libcolvars.a and +lib/colvars/Makefile.lammps. The latter is copied from an existing +Makefile.lammps.* and has settings needed to build LAMMPS with the +COLVARS library (though typically the settings are just blank). If +necessary, you can edit/create a new lib/colvars/Makefile.machine file +for your system, which should define an EXTRAMAKE variable to specify +a corresponding Makefile.lammps.machine file. + +You can then install/un-install the package and build LAMMPS in the +usual manner: + +make yes-user-colvars +make machine :pre + +make no-user-colvars +make machine :pre + +[Supporting info:] -Author: Oliver Henrich at the University of Strathclyde, Glasgow -(oliver.henrich at strath.ac.uk, also ohenrich at ph.ed.ac.uk). -Contact him directly if you have any questions. +src/USER-COLVARS: filenames -> commands +"doc/PDF/colvars-refman-lammps.pdf"_PDF/colvars-refman-lammps.pdf +src/USER-COLVARS/README +lib/colvars/README +"fix colvars"_fix_colvars.html +examples/USER/colvars :ul :line -USER-COLVARS package :link(USER-COLVARS),h5 +USER-DIFFRACTION package :link(USER-DIFFRACTION),h4 -Contents: COLVARS stands for collective variables which can be used to -implement Adaptive Biasing Force, Metadynamics, Steered MD, Umbrella -Sampling and Restraints. This package implements a "fix -colvars"_fix_colvars.html command which wraps a COLVARS library which -can perform those kinds of simulations. See src/USER-COLVARS/README -for more details. +[Contents:] -Supporting info: -"doc/PDF/colvars-refman-lammps.pdf"_PDF/colvars-refman-lammps.pdf, -src/USER-COLVARS/README, lib/colvars/README, "fix -colvars"_fix_colvars.html, examples/USER/colvars +Two computes and a fix for calculating x-ray and electron diffraction +intensities based on kinematic diffraction theory. -Authors: Axel Kohlmeyer at Temple U (akohlmey at gmail.com) wrote the -interface that integrates colvars into LAMMPS. The COLVARS library -itself is written and maintained by Giacomo Fiorin (ICMS, Temple -University, Philadelphia, PA, USA) and Jerome Henin (LISM, CNRS, -Marseille, France). For more info, and to communicate with the COLVARS -developers, please go to COLVARS home page at -"http://colvars.github.io"_http://colvars.github.io/. +[Author:] Shawn Coleman while at the U Arkansas. -:line +[Install or un-install:] + +make yes-user-diffraction +make machine :pre + +make no-user-diffraction +make machine :pre + +[Supporting info:] -USER-DIFFRACTION package :link(USER-DIFFRACTION),h5 +src/USER-DIFFRACTION: filenames -> commands +"compute saed"_compute_saed.html +"compute xrd"_compute_xrd.html +"fix saed/vtk"_fix_saed_vtk.html +examples/USER/diffraction :ul -Contents: This packages implements two computes and a fix for -calculating x-ray and electron diffraction intensities based on -kinematic diffraction theory. See src/USER-DIFFRACTION/README for -more details. +:line -Supporting info: "compute saed"_compute_saed.html, "compute -xrd"_compute_xrd.html, "fix saed/vtk"_fix_saed_vtk.html, -examples/USER/diffraction +USER-DPD package :link(USER-DPD),h4 -Author: Shawn P. Coleman (shawn.p.coleman8.ctr at mail.mil) while at -the University of Arkansas. Contact him directly if you have -questions. +[Contents:] -:line +DPD stands for dissipative particle dynamics. This package implements +coarse-grained DPD-based models for energetic, reactive molecular +crystalline materials. It includes many pair styles specific to these +systems, including for reactive DPD, where each particle has internal +state for multiple species and a coupled set of chemical reaction ODEs +are integrated each timestep. Highly accurate time intergrators for +isothermal, isoenergetic, isobaric and isenthalpic conditions are +included. These enable long timesteps via the Shardlow splitting +algorithm. -USER-DPD package :link(USER-DPD),h5 +[Authors:] Jim Larentzos (ARL), Tim Mattox (Engility Corp), and and John +Brennan (ARL). -Contents: DPD stands for dissipative particle dynamics, This package -implements DPD for isothermal, isoenergetic, isobaric and isenthalpic -conditions. It also has extensions for performing reactive DPD, where -each particle has internal state for multiple species and a coupled -set of chemical reaction ODEs are integrated each timestep. The DPD -equations of motion are integrated efficiently through the Shardlow -splitting algorithm. See src/USER-DPD/README for more details. +[Install or un-install:] + +make yes-user-dpd +make machine :pre + +make no-user-dpd +make machine :pre + +[Supporting info:] -Supporting info: /src/USER-DPD/README, "compute dpd"_compute_dpd.html +src/USER-DPD: filenames -> commands +/src/USER-DPD/README +"compute dpd"_compute_dpd.html "compute dpd/atom"_compute_dpd_atom.html -"fix eos/cv"_fix_eos_table.html "fix eos/table"_fix_eos_table.html -"fix eos/table/rx"_fix_eos_table_rx.html "fix shardlow"_fix_shardlow.html -"fix rx"_fix_rx.html "pair table/rx"_pair_table_rx.html -"pair dpd/fdt"_pair_dpd_fdt.html "pair dpd/fdt/energy"_pair_dpd_fdt.html -"pair exp6/rx"_pair_exp6_rx.html "pair multi/lucy"_pair_multi_lucy.html -"pair multi/lucy/rx"_pair_multi_lucy_rx.html, examples/USER/dpd - -Authors: James Larentzos (ARL) (james.p.larentzos.civ at mail.mil), -Timothy Mattox (Engility Corp) (Timothy.Mattox at engilitycorp.com) -and John Brennan (ARL) (john.k.brennan.civ at mail.mil). Contact them -directly if you have questions. +"fix eos/cv"_fix_eos_table.html +"fix eos/table"_fix_eos_table.html +"fix eos/table/rx"_fix_eos_table_rx.html +"fix shardlow"_fix_shardlow.html +"fix rx"_fix_rx.html +"pair table/rx"_pair_table_rx.html +"pair dpd/fdt"_pair_dpd_fdt.html +"pair dpd/fdt/energy"_pair_dpd_fdt.html +"pair exp6/rx"_pair_exp6_rx.html +"pair multi/lucy"_pair_multi_lucy.html +"pair multi/lucy/rx"_pair_multi_lucy_rx.html +examples/USER/dpd :ul :line -USER-DRUDE package :link(USER-DRUDE),h5 +USER-DRUDE package :link(USER-DRUDE),h4 + +[Contents:] -Contents: This package contains methods for simulating polarizable -systems using thermalized Drude oscillators. It has computes, fixes, -and pair styles for this purpose. See "Section +Fixes, pair styles, and a compute to simulate thermalized Drude +oscillators as a model of polarization. See "Section 6.27"_Section_howto.html#howto_27 for an overview of how to use the -package. See src/USER-DRUDE/README for additional details. There are -auxiliary tools for using this package in tools/drude. +package. There are auxiliary tools for using this package in +tools/drude. -Supporting info: "Section 6.27"_Section_howto.html#howto_27, -src/USER-DRUDE/README, "fix drude"_fix_drude.html, "fix -drude/transform/*"_fix_drude_transform.html, "compute -temp/drude"_compute_temp_drude.html, "pair thole"_pair_thole.html, -"pair lj/cut/thole/long"_pair_thole.html, examples/USER/drude, -tools/drude +[Authors:] Alain Dequidt (U Blaise Pascal Clermont-Ferrand), Julien +Devemy (CNRS), and Agilio Padua (U Blaise Pascal). -Authors: Alain Dequidt at Universite Blaise Pascal Clermont-Ferrand -(alain.dequidt at univ-bpclermont.fr); co-authors: Julien Devemy, -Agilio Padua. Contact them directly if you have questions. +[Install or un-install:] + +make yes-user-drude +make machine :pre + +make no-user-drude +make machine :pre + +[Supporting info:] + +src/USER-DRUDE: filenames -> commands +"Section 6.27"_Section_howto.html#howto_27 +"Section 6.25"_Section_howto.html#howto_25 +src/USER-DRUDE/README +"fix drude"_fix_drude.html +"fix drude/transform/*"_fix_drude_transform.html +"compute temp/drude"_compute_temp_drude.html +"pair thole"_pair_thole.html +"pair lj/cut/thole/long"_pair_thole.html +examples/USER/drude +tools/drude :ul :line -USER-EFF package :link(USER-EFF),h5 +USER-EFF package :link(USER-EFF),h4 + +[Contents:] -Contents: EFF stands for electron force field. This package contains -atom, pair, fix and compute styles which implement the eFF as +EFF stands for electron force field which allows a classical MD code +to model electrons as particles of variable radius. This package +contains atom, pair, fix and compute styles which implement the eFF as described in A. Jaramillo-Botero, J. Su, Q. An, and W.A. Goddard III, -JCC, 2010. The eFF potential was first introduced by Su and Goddard, -in 2007. See src/USER-EFF/README for more details. There are -auxiliary tools for using this package in tools/eff; see its README -file. +JCC, 2010. The eFF potential was first introduced by Su and Goddard, +in 2007. There are auxiliary tools for using this package in +tools/eff; see its README file. -Supporting info: +[Author:] Andres Jaramillo-Botero (CalTech). -Author: Andres Jaramillo-Botero at CalTech (ajaramil at -wag.caltech.edu). Contact him directly if you have questions. +[Install or un-install:] + +make yes-user-eff +make machine :pre + +make no-user-eff +make machine :pre + +[Supporting info:] + +src/USER-EFF: filenames -> commands +src/USER-EFF/README +"atom_style electron"_atom_style.html +"fix nve/eff"_fix_nve_eff.html +"fix nvt/eff"_fix_nvt_eff.html +"fix npt/eff"_fix_npt_eff.html +"fix langevin/eff"_fix_langevin_eff.html +"compute temp/eff"_compute_temp_eff.html +"pair eff/cut"_pair_eff.html +"pair eff/inline"_pair_eff.html +examples/USER/eff +tools/eff/README +tools/eff +http://lammps.sandia.gov/movies.html#eff :ul :line -USER-FEP package :link(USER-FEP),h5 +USER-FEP package :link(USER-FEP),h4 -Contents: FEP stands for free energy perturbation. This package -provides methods for performing FEP simulations by using a "fix +[Contents:] + +FEP stands for free energy perturbation. This package provides +methods for performing FEP simulations by using a "fix adapt/fep"_fix_adapt_fep.html command with soft-core pair potentials, -which have a "soft" in their style name. See src/USER-FEP/README for -more details. There are auxiliary tools for using this package in -tools/fep; see its README file. +which have a "soft" in their style name. There are auxiliary tools +for using this package in tools/fep; see its README file. -Supporting info: src/USER-FEP/README, "fix -adapt/fep"_fix_adapt_fep.html, "compute fep"_compute_fep.html, -"pair_style */soft"_pair_lj_soft.html, examples/USER/fep +[Author:] Agilio Padua (Universite Blaise Pascal Clermont-Ferrand) -Author: Agilio Padua at Universite Blaise Pascal Clermont-Ferrand -(agilio.padua at univ-bpclermont.fr). Contact him directly if you have -questions. +[Install or un-install:] + +make yes-user-fep +make machine :pre + +make no-user-fep +make machine :pre + +[Supporting info:] + +src/USER-FEP: filenames -> commands +src/USER-FEP/README +"fix adapt/fep"_fix_adapt_fep.html +"compute fep"_compute_fep.html +"pair_style */soft"_pair_lj_soft.html +examples/USER/fep +tools/fep/README +tools/fep :ul :line -USER-H5MD package :link(USER-H5MD),h5 - -Contents: H5MD stands for HDF5 for MD. "HDF5"_HDF5 is a binary, -portable, self-describing file format, used by many scientific -simulations. H5MD is a format for molecular simulations, built on top -of HDF5. This package implements a "dump h5md"_dump_h5md.html command -to output LAMMPS snapshots in this format. See src/USER-H5MD/README -for more details. +USER-H5MD package :link(USER-H5MD),h4 -:link(HDF5,http://www.hdfgroup.org/HDF5/) +[Contents:] -Supporting info: src/USER-H5MD/README, lib/h5md/README, "dump -h5md"_dump_h5md.html +H5MD stands for HDF5 for MD. "HDF5"_HDF5 is a portable, binary, +self-describing file format, used by many scientific simulations. +H5MD is a format for molecular simulations, built on top of HDF5. +This package implements a "dump h5md"_dump_h5md.html command to output +LAMMPS snapshots in this format. -Author: Pierre de Buyl at KU Leuven (see http://pdebuyl.be) created -this package as well as the H5MD format and library. Contact him -directly if you have questions. +:link(HDF5,http://www.hdfgroup.org/HDF5) -:line +To use this package you must have the HDF5 library available on your +system. -USER-INTEL package :link(USER-INTEL),h5 +[Author:] Pierre de Buyl (KU Leuven) created both the package and the +H5MD format. -Contents: Dozens of pair, bond, angle, dihedral, and improper styles -that are optimized for Intel CPUs and the Intel Xeon Phi (in offload -mode). All of them have an "intel" in their style name. "Section -5.3.2"_accelerate_intel.html gives details of what hardware -and compilers are required on your system, and how to build and use -this package. Also see src/USER-INTEL/README for more details. See -the KOKKOS, OPT, and USER-OMP packages, which also have CPU and -Phi-enabled styles. +[Install or un-install:] -Supporting info: examples/accelerate, src/USER-INTEL/TEST - -"Section 5.3"_Section_accelerate.html#acc_3 +Note that to follow these steps to compile and link to the CH5MD +library, you need the standard HDF5 software package installed on your +system, which should include the h5cc compiler and the HDF5 library. -Author: Mike Brown at Intel (michael.w.brown at intel.com). Contact -him directly if you have questions. +Before building LAMMPS with this package, you must first build the +CH5MD library in lib/h5md. You can do this manually if you prefer; +follow the instructions in lib/h5md/README. You can also do it in one +step from the lammps/src dir, using a command like these, which simply +invoke the lib/h5md/Install.py script with the specified args: -For the USER-INTEL package, you have 2 choices when building. You can -build with CPU or Phi support. The latter uses Xeon Phi chips in -"offload" mode. Each of these modes requires additional settings in -your Makefile.machine for CCFLAGS and LINKFLAGS. +make lib-h5md # print help message +make lib-hm5d args="-m h5cc" # build with h5cc compiler :pre -For CPU mode (if using an Intel compiler): +The build should produce two files: lib/h5md/libch5md.a and +lib/h5md/Makefile.lammps. The latter is copied from an existing +Makefile.lammps.* and has settings needed to build LAMMPS with the +system HDF5 library. If necessary, you can edit/create a new +lib/h5md/Makefile.machine file for your system, which should define an +EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine +file. -CCFLAGS: add -fopenmp, -DLAMMPS_MEMALIGN=64, -restrict, -xHost, -fno-alias, -ansi-alias, -override-limits -LINKFLAGS: add -fopenmp :ul +You can then install/un-install the package and build LAMMPS in the +usual manner: + +make yes-user-h5md +make machine :pre + +make no-user-h5md +make machine :pre + +[Supporting info:] -For Phi mode add the following in addition to the CPU mode flags: +src/USER-H5MD: filenames -> commands +src/USER-H5MD/README +lib/h5md/README +"dump h5md"_dump_h5md.html :ul -CCFLAGS: add -DLMP_INTEL_OFFLOAD and -LINKFLAGS: add -offload :ul +:line -And also add this to CCFLAGS: +USER-INTEL package :link(USER-INTEL),h4 --offload-option,mic,compiler,"-fp-model fast=2 -mGLOB_default_function_attrs=\"gather_scatter_loop_unroll=4\"" :pre +[Contents:] -Examples: +Dozens of pair, fix, bond, angle, dihedral, improper, and kspace +styles which are optimized for Intel CPUs and KNLs (Knights Landing). +All of them have an "intel" in their style name. "Section +5.3.2"_accelerate_intel.html gives details of what hardware and +compilers are required on your system, and how to build and use this +package. Its styles can be invoked at run time via the "-sf intel" or +"-suffix intel" "command-line switches"_Section_start.html#start_7. +Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-OMP"_#USER-OMP +packages, which have styles optimized for CPUs and KNLs. -:line +You need to have an Intel compiler, version 14 or higher to take full +advantage of this package. -USER-LB package :link(USER-LB),h5 +[Author:] Mike Brown (Intel). -Supporting info: +[Install or un-install:] -This package contains a LAMMPS implementation of a background -Lattice-Boltzmann fluid, which can be used to model MD particles -influenced by hydrodynamic forces. +For the USER-INTEL package, you have 2 choices when building. You can +build with either CPU or KNL support. Each choice requires additional +settings in your Makefile.machine for CCFLAGS and LINKFLAGS and +optimized malloc libraries. See the +src/MAKE/OPTIONS/Makefile.intel_cpu and src/MAKE/OPTIONS/Makefile.knl +files for examples. + +For CPUs: + +OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits +CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload \ + -fno-alias -ansi-alias -restrict $(OPTFLAGS) +LINKFLAGS = -g -qopenmp $(OPTFLAGS) +LIB = -ltbbmalloc -ltbbmalloc_proxy + +For KNLs: + +OPTFLAGS = -xMIC-AVX512 -O2 -fp-model fast=2 -no-prec-div -qoverride-limits +CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload \ + -fno-alias -ansi-alias -restrict $(OPTFLAGS) +LINKFLAGS = -g -qopenmp $(OPTFLAGS) +LIB = -ltbbmalloc + +Once you have an appropriate Makefile.machine, you can +install/un-install the package and build LAMMPS in the usual manner. +Note that you cannot build one executable to run on multiple hardware +targets (Intel CPUs or KNL). You need to build LAMMPS once for each +hardware target, to produce a separate executable. + +You should also typically install the USER-OMP package, as it can be +used in tandem with the USER-INTEL package to good effect, as +explained in "Section 5.3.2"_accelerate_intel.html. + +make yes-user-intel yes-user-omp +make machine :pre + +make no-user-intel no-user-omp +make machine :pre -See this doc page and its related commands to get started: +[Supporting info:] -"fix lb/fluid"_fix_lb_fluid.html +src/USER-INTEL: filenames -> commands +src/USER-INTEL/README +"Section 5.3"_Section_accelerate.html#acc_3 +"Section 5.3.2"_accelerate_gpu.html +"Section 2.7 -sf intel"_Section_start.html#start_7 +"Section 2.7 -pk intel"_Section_start.html#start_7 +"package intel"_package.html +Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (i) +src/USER-INTEL/TEST +"Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul -The people who created this package are Frances Mackay (fmackay at -uwo.ca) and Colin (cdennist at uwo.ca) Denniston, University of -Western Ontario. Contact them directly if you have questions. +:line -Examples: examples/USER/lb +USER-LB package :link(USER-LB),h4 -:line +[Contents:] -USER-MGPT package :link(USER-MGPT),h5 +Fixes which implement a background Lattice-Boltzmann (LB) fluid, which +can be used to model MD particles influenced by hydrodynamic forces. -Supporting info: +[Authors:] Frances Mackay and Colin Denniston (University of Western +Ontario). -This package contains a fast implementation for LAMMPS of -quantum-based MGPT multi-ion potentials. The MGPT or model GPT method -derives from first-principles DFT-based generalized pseudopotential -theory (GPT) through a series of systematic approximations valid for -mid-period transition metals with nearly half-filled d bands. The -MGPT method was originally developed by John Moriarty at Lawrence -Livermore National Lab (LLNL). +[Install or un-install:] + +make yes-user-lb +make machine :pre + +make no-user-lb +make machine :pre + +[Supporting info:] -In the general matrix representation of MGPT, which can also be -applied to f-band actinide metals, the multi-ion potentials are -evaluated on the fly during a simulation through d- or f-state matrix -multiplication, and the forces that move the ions are determined -analytically. The {mgpt} pair style in this package calculates forces -and energies using an optimized matrix-MGPT algorithm due to Tomas -Oppelstrup at LLNL. +src/USER-LB: filenames -> commands +src/USER-LB/README +"fix lb/fluid"_fix_lb_fluid.html +"fix lb/momentum"_fix_lb_momentum.html +"fix lb/viscous"_fix_lb_viscous.html +examples/USER/lb :ul -See this doc page to get started: +:line -"pair_style mgpt"_pair_mgpt.html +USER-MGPT package :link(USER-MGPT),h4 -The persons who created the USER-MGPT package are Tomas Oppelstrup -(oppelstrup2@llnl.gov) and John Moriarty (moriarty2@llnl.gov) -Contact them directly if you have any questions. +[Contents:] -Examples: examples/USER/mgpt +A pair style which provides a fast implementation of the quantum-based +MGPT multi-ion potentials. The MGPT or model GPT method derives from +first-principles DFT-based generalized pseudopotential theory (GPT) +through a series of systematic approximations valid for mid-period +transition metals with nearly half-filled d bands. The MGPT method +was originally developed by John Moriarty at LLNL. The pair style in +this package calculates forces and energies using an optimized +matrix-MGPT algorithm due to Tomas Oppelstrup at LLNL. -:line +[Authors:] Tomas Oppelstrup and John Moriarty (LLNL). -USER-MISC package :link(USER-MISC),h5 +[Install or un-install:] + +make yes-user-mgpt +make machine :pre + +make no-user-mgpt +make machine :pre + +[Supporting info:] -Supporting info: +src/USER-MGPT: filenames -> commands +src/USER-MGPT/README +"pair_style mgpt"_pair_mgpt.html +examples/USER/mgpt :ul -The files in this package are a potpourri of (mostly) unrelated -features contributed to LAMMPS by users. Each feature is a single -pair of files (*.cpp and *.h). +:line -More information about each feature can be found by reading its doc -page in the LAMMPS doc directory. The doc page which lists all LAMMPS -input script commands is as follows: +USER-MISC package :link(USER-MISC),h4 -"Section 3.5"_Section_commands.html#cmd_5 +[Contents:] -User-contributed features are listed at the bottom of the fix, -compute, pair, etc sections. +A potpourri of (mostly) unrelated features contributed to LAMMPS by +users. Each feature is a single fix, compute, pair, bond, angle, +dihedral, improper, or command style. -The list of features and author of each is given in the +[Authors:] The author for each style in the package is listed in the src/USER-MISC/README file. -You should contact the author directly if you have specific questions -about the feature or its coding. +[Install or un-install:] + +make yes-user-misc +make machine :pre + +make no-user-misc +make machine :pre + +[Supporting info:] -Examples: examples/USER/misc +src/USER-MISC: filenames -> commands +src/USER-MISC/README +one doc page per individual command listed in src/USER-MISC/README +examples/USER/misc :ul :line -USER-MANIFOLD package :link(USER-MANIFOLD),h5 +USER-MANIFOLD package :link(USER-MANIFOLD),h4 -Supporting info: +[Contents:] -This package contains a dump molfile command which uses molfile -plugins that are bundled with the -"VMD"_http://www.ks.uiuc.edu/Research/vmd molecular visualization and -analysis program, to enable LAMMPS to dump its information in formats -compatible with various molecular simulation tools. +Several fixes and a "manifold" class which enable simulations of +particles constrained to a manifold (a 2D surface within the 3D +simulation box). This is done by applying the RATTLE constraint +algorithm to formulate single-particle constraint functions +g(xi,yi,zi) = 0 and their derivative (i.e. the normal of the manifold) +n = grad(g). -This package allows LAMMPS to perform MD simulations of particles -constrained on a manifold (i.e., a 2D subspace of the 3D simulation -box). It achieves this using the RATTLE constraint algorithm applied -to single-particle constraint functions g(xi,yi,zi) = 0 and their -derivative (i.e. the normal of the manifold) n = grad(g). +[Author:] Stefan Paquay (Eindhoven University of Technology (TU/e), The +Netherlands) -See this doc page to get started: +[Install or un-install:] + +make yes-user-manifold +make machine :pre + +make no-user-manifold +make machine :pre + +[Supporting info:] +src/USER-MANIFOLD: filenames -> commands +src/USER-MANIFOLD/README +"doc/manifolds"_manifolds.html "fix manifoldforce"_fix_manifoldforce.html - -The person who created this package is Stefan Paquay, at the Eindhoven -University of Technology (TU/e), The Netherlands (s.paquay at tue.nl). -Contact him directly if you have questions. +"fix nve/manifold/rattle"_fix_nve_manifold/rattle.html +"fix nvt/manifold/rattle"_fix_nvt_manifold/rattle.html +examples/USER/manifold +http://lammps.sandia.gov/movies.html#manifold :ul :line -USER-MOLFILE package :link(USER-MOLFILE),h5 +USER-MOLFILE package :link(USER-MOLFILE),h4 + +[Contents:] + +A "dump molfile"_dump_molfile.html command which uses molfile plugins +that are bundled with the "VMD"_http://www.ks.uiuc.edu/Research/vmd +molecular visualization and analysis program, to enable LAMMPS to dump +snapshots in formats compatible with various molecular simulation +tools. + +To use this package you must have the desired VMD plugins available on +your system. + +Note that this package only provides the interface code, not the +plugins themselves, which will be accessed when requesting a specific +plugin via the "dump molfile"_dump_molfile.html command. Plugins can +be obtained from a VMD installation which has to match the platform +that you are using to compile LAMMPS for. By adding plugins to VMD, +support for new file formats can be added to LAMMPS (or VMD or other +programs that use them) without having to recompile the application +itself. More information about the VMD molfile plugins can be found +at +"http://www.ks.uiuc.edu/Research/vmd/plugins/molfile"_http://www.ks.uiuc.edu/Research/vmd/plugins/molfile. + +[Author:] Axel Kohlmeyer (Temple U). + +[Install or un-install:] + +Note that the lib/molfile/Makefile.lammps file has a setting for a +dynamic loading library libdl.a that should is typically present on +all systems, which is required for LAMMPS to link with this package. +If the setting is not valid for your system, you will need to edit the +Makefile.lammps file. See lib/molfile/README and +lib/molfile/Makefile.lammps for details. + +make yes-user-molfile +make machine :pre + +make no-user-molfile +make machine :pre + +[Supporting info:] + +src/USER-MOLFILE: filenames -> commands +src/USER-MOLFILE/README +lib/molfile/README +"dump molfile"_dump_molfile.html :ul -Supporting info: +:line -This package contains a dump molfile command which uses molfile -plugins that are bundled with the -"VMD"_http://www.ks.uiuc.edu/Research/vmd molecular visualization and -analysis program, to enable LAMMPS to dump its information in formats -compatible with various molecular simulation tools. +USER-NETCDF package :link(USER-NETCDF),h4 -The package only provides the interface code, not the plugins. These -can be obtained from a VMD installation which has to match the -platform that you are using to compile LAMMPS for. By adding plugins -to VMD, support for new file formats can be added to LAMMPS (or VMD or -other programs that use them) without having to recompile the -application itself. +[Contents:] -See this doc page to get started: +Dump styles for writing NetCDF formatted dump files. NetCDF is a +portable, binary, self-describing file format developed on top of +HDF5. The file contents follow the AMBER NetCDF trajectory conventions +(http://ambermd.org/netcdf/nctraj.xhtml), but include extensions. -"dump molfile"_dump_molfile.html +To use this package you must have the NetCDF library available on your +system. -The person who created this package is Axel Kohlmeyer at Temple U -(akohlmey at gmail.com). Contact him directly if you have questions. +Note that NetCDF files can be directly visualized with the following +tools: -:line +"Ovito"_ovito (Ovito supports the AMBER convention and the extensions mentioned above) +"VMD"_vmd +"AtomEye"_atomeye (the libAtoms version of AtomEye contains a NetCDF reader not present in the standard distribution) :ul + +:link(ovito,http://www.ovito.org) +:link(atomeye,http://www.libatoms.org) -USER-NC-DUMP package :link(USER-NC-DUMP),h5 +[Author:] Lars Pastewka (Karlsruhe Institute of Technology). -Contents: Dump styles for writing NetCDF format files. NetCDF is a binary, -portable, self-describing file format on top of HDF5. The file format -contents follow the AMBER NetCDF trajectory conventions -(http://ambermd.org/netcdf/nctraj.xhtml), but include extensions to this -convention. This package implements a "dump nc"_dump_nc.html command -and a "dump nc/mpiio"_dump_nc.html command to output LAMMPS snapshots -in this format. See src/USER-NC-DUMP/README for more details. +[Install or un-install:] + +Note that to follow these steps, you need the standard NetCDF software +package installed on your system. The lib/netcdf/Makefile.lammps file +has settings for NetCDF include and library files that LAMMPS needs to +compile and linkk with this package. If the settings are not valid +for your system, you will need to edit the Makefile.lammps file. See +lib/netcdf/README for details. -NetCDF files can be directly visualized with the following tools: +make yes-user-netcdf +make machine :pre + +make no-user-netcdf +make machine :pre -Ovito (http://www.ovito.org/). Ovito supports the AMBER convention -and all of the above extensions. :ulb,l -VMD (http://www.ks.uiuc.edu/Research/vmd/) :l -AtomEye (http://www.libatoms.org/). The libAtoms version of AtomEye contains -a NetCDF reader that is not present in the standard distribution of AtomEye :l,ule +[Supporting info:] -The person who created these files is Lars Pastewka at -Karlsruhe Institute of Technology (lars.pastewka at kit.edu). -Contact him directly if you have questions. +src/USER-NETCDF: filenames -> commands +src/USER-NETCDF/README +lib/netcdf/README +"dump netcdf"_dump_netcdf.html :ul :line -USER-OMP package :link(USER-OMP),h5 +USER-OMP package :link(USER-OMP),h4 -Supporting info: +[Contents:] -This package provides OpenMP multi-threading support and -other optimizations of various LAMMPS pair styles, dihedral -styles, and fix styles. +Hundreds of pair, fix, compute, bond, angle, dihedral, improper, and +kspace styles which are altered to enable threading on many-core CPUs +via OpenMP directives. All of them have an "omp" in their style name. +"Section 5.3.4"_accelerate_omp.html gives details of what hardware and +compilers are required on your system, and how to build and use this +package. Its styles can be invoked at run time via the "-sf omp" or +"-suffix omp" "command-line switches"_Section_start.html#start_7. +Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and +"USER-INTEL"_#USER-INTEL packages, which have styles optimized for +CPUs. -See this section of the manual to get started: +[Author:] Axel Kohlmeyer (Temple U). -"Section 5.3"_Section_accelerate.html#acc_3 +NOTE: The compile flags "-restrict" and "-fopenmp" must be used to +build LAMMPS with the USER-OMP package, as well as the link flag +"-fopenmp". They should be added to the CCFLAGS and LINKFLAGS lines +of your Makefile.machine. See src/MAKE/OPTIONS/Makefile.omp for an +example. -The person who created this package is Axel Kohlmeyer at Temple U -(akohlmey at gmail.com). Contact him directly if you have questions. +Once you have an appropriate Makefile.machine, you can +install/un-install the package and build LAMMPS in the usual manner: -For the USER-OMP package, your Makefile.machine needs additional -settings for CCFLAGS and LINKFLAGS. +[Install or un-install:] + +make yes-user-omp +make machine :pre + +make no-user-omp +make machine :pre CCFLAGS: add -fopenmp and -restrict LINKFLAGS: add -fopenmp :ul -Examples: examples/accelerate, bench/KEPLER +[Supporting info:] + +src/USER-OMP: filenames -> commands +src/USER-OMP/README +"Section 5.3"_Section_accelerate.html#acc_3 +"Section 5.3.4"_accelerate_omp.html +"Section 2.7 -sf omp"_Section_start.html#start_7 +"Section 2.7 -pk omp"_Section_start.html#start_7 +"package omp"_package.html +Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (o) +"Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line -USER-PHONON package :link(USER-PHONON),h5 +USER-PHONON package :link(USER-PHONON),h4 + +[Contents:] -This package contains a fix phonon command that calculates dynamical +A "fix phonon"_fix_phonon.html command that calculates dynamical matrices, which can then be used to compute phonon dispersion relations, directly from molecular dynamics simulations. -See this doc page to get started: - -"fix phonon"_fix_phonon.html +[Author:] Ling-Ti Kong (Shanghai Jiao Tong University). -The person who created this package is Ling-Ti Kong (konglt at -sjtu.edu.cn) at Shanghai Jiao Tong University. Contact him directly -if you have questions. +[Install or un-install:] + +make yes-user-phonon +make machine :pre + +make no-user-phonon +make machine :pre + +[Supporting info:] -Examples: examples/USER/phonon +src/USER-PHONON: filenames -> commands +src/USER-PHONON/README +"fix phonon"_fix_phonon.html +examples/USER/phonon :ul :line -USER-QMMM package :link(USER-QMMM),h5 +USER-QMMM package :link(USER-QMMM),h4 -Supporting info: +[Contents:] -This package provides a fix qmmm command which allows LAMMPS to be -used in a QM/MM simulation, currently only in combination with pw.x -code from the "Quantum ESPRESSO"_espresso package. +A "fix qmmm"_fix_qmmm.html command which allows LAMMPS to be used in a +QM/MM simulation, currently only in combination with the "Quantum +ESPRESSO"_espresso package. :link(espresso,http://www.quantum-espresso.org) +To use this package you must have Quantum ESPRESSO available on your +system. + The current implementation only supports an ONIOM style mechanical coupling to the Quantum ESPRESSO plane wave DFT package. Electrostatic coupling is in preparation and the interface has been written in a manner that coupling to other QM codes should be possible without changes to LAMMPS itself. -See this doc page to get started: +[Author:] Axel Kohlmeyer (Temple U). + +[Install or un-install:] -"fix qmmm"_fix_qmmm.html +Before building LAMMPS with this package, you must first build the +QMMM library in lib/qmmm. You can do this manually if you prefer; +follow the first two steps explained in lib/colvars/README. You can +also do it in one step from the lammps/src dir, using a command like +these, which simply invoke the lib/colvars/Install.py script with the +specified args: -as well as the lib/qmmm/README file. +make lib-qmmm # print help message +make lib-qmmm args="-m gfortran" # build with GNU Fortran compiler :pre -The person who created this package is Axel Kohlmeyer at Temple U -(akohlmey at gmail.com). Contact him directly if you have questions. +The build should produce two files: lib/qmmm/libqmmm.a and +lib/qmmm/Makefile.lammps. The latter is copied from an existing +Makefile.lammps.* and has settings needed to build LAMMPS with the +QMMM library (though typically the settings are just blank). If +necessary, you can edit/create a new lib/qmmm/Makefile.machine file +for your system, which should define an EXTRAMAKE variable to specify +a corresponding Makefile.lammps.machine file. + +You can then install/un-install the package and build LAMMPS in the +usual manner: + +make yes-user-qmmm +make machine :pre + +make no-user-qmmm +make machine :pre + +NOTE: The LAMMPS executable these steps produce is not yet functional +for a QM/MM simulation. You must also build Quantum ESPRESSO and +create a new executable which links LAMMPS and Quanutm ESPRESSO +together. These are steps 3 and 4 described in the lib/qmmm/README +file. + +[Supporting info:] + +src/USER-QMMM: filenames -> commands +src/USER-QMMM/README +lib/qmmm/README +"fix phonon"_fix_phonon.html +lib/qmmm/example-ec/README +lib/qmmm/example-mc/README :ul :line -USER-QTB package :link(USER-QTB),h5 +USER-QTB package :link(USER-QTB),h4 -Supporting info: +[Contents:] -This package provides a self-consistent quantum treatment of the +Two fixes which provide a self-consistent quantum treatment of vibrational modes in a classical molecular dynamics simulation. By coupling the MD simulation to a colored thermostat, it introduces zero -point energy into the system, alter the energy power spectrum and the -heat capacity towards their quantum nature. This package could be of -interest if one wants to model systems at temperatures lower than -their classical limits or when temperatures ramp up across the -classical limits in the simulation. +point energy into the system, altering the energy power spectrum and +the heat capacity to account for their quantum nature. This is useful +when modeling systems at temperatures lower than their classical +limits or when temperatures ramp across the classical limits in a +simulation. -See these two doc pages to get started: +[Author:] Yuan Shen (Stanford U). + +[Install or un-install:] + +make yes-user-qtb +make machine :pre + +make no-user-qtb +make machine :pre + +[Supporting info:] -"fix qtb"_fix_qtb.html provides quantum nulcear correction through a -colored thermostat and can be used with other time integration schemes -like "fix nve"_fix_nve.html or "fix nph"_fix_nh.html. +src/USER-QTB: filenames -> commands +src/USER-QTB/README +"fix qtb"_fix_qtb.html +"fix qbmsst"_fix_qbmsst.html +examples/USER/qtb :ul -"fix qbmsst"_fix_qbmsst.html enables quantum nuclear correction of a -multi-scale shock technique simulation by coupling the quantum thermal -bath with the shocked system. +:line -The person who created this package is Yuan Shen (sy0302 at -stanford.edu) at Stanford University. Contact him directly if you -have questions. +USER-QUIP package :link(USER-QUIP),h4 -Examples: examples/USER/qtb +[Contents:] -:line +A "pair_style quip"_pair_quip.html command which wraps the "QUIP +libAtoms library"_quip, which includes a variety of interatomic +potentials, including Gaussian Approximation Potential (GAP) models +developed by the Cambridge University group. -USER-QUIP package :link(USER-QUIP),h5 +:link(quip,https://github.com/libAtoms/QUIP) -Supporting info: +To use this package you must have the QUIP libAatoms library available +on your system. -Examples: examples/USER/quip +[Author:] Albert Bartok (Cambridge University) -:line +[Install or un-install:] -USER-REAXC package :link(USER-REAXC),h5 +Note that to follow these steps to compile and link to the QUIP +library, you must first download and build QUIP on your systems. It +can be obtained from GitHub. See step 1 and step 1.1 in the +lib/quip/README file for details on how to do this. Note that it +requires setting two environment variables, QUIP_ROOT and QUIP_ARCH, +which will be accessed by the lib/quip/Makefile.lammps file which is +used when you compile and link LAMMPS with this package. You should +only need to edit this file if the LAMMPS build can not use its +settings to successfully build on your system. -Supporting info: +You can then install/un-install the package and build LAMMPS in the +usual manner: -This package contains a implementation for LAMMPS of the ReaxFF force -field. ReaxFF uses distance-dependent bond-order functions to -represent the contributions of chemical bonding to the potential -energy. It was originally developed by Adri van Duin and the Goddard -group at CalTech. +make yes-user-quip +make machine :pre + +make no-user-quip +make machine :pre + +[Supporting info:] -The USER-REAXC version of ReaxFF (pair_style reax/c), implemented in -C, should give identical or very similar results to pair_style reax, -which is a ReaxFF implementation on top of a Fortran library, a -version of which library was originally authored by Adri van Duin. +src/USER-QUIP: filenames -> commands +src/USER-QUIP/README +"pair_style quip"_pair_quip.html +examples/USER/quip :ul -The reax/c version should be somewhat faster and more scalable, -particularly with respect to the charge equilibration calculation. It -should also be easier to build and use since there are no complicating -issues with Fortran memory allocation or linking to a Fortran library. +:line -For technical details about this implementation of ReaxFF, see -this paper: +USER-REAXC package :link(USER-REAXC),h4 -Parallel and Scalable Reactive Molecular Dynamics: Numerical Methods -and Algorithmic Techniques, H. M. Aktulga, J. C. Fogarty, -S. A. Pandit, A. Y. Grama, Parallel Computing, in press (2011). +[Contents:] -See the doc page for the pair_style reax/c command for details -of how to use it in LAMMPS. +A pair style which implements the ReaxFF potential in C/C++ (in +contrast to the "REAX package"_#REAX and its Fortran library). ReaxFF +is universal reactive force field. See the src/USER-REAXC/README file +for more info on differences between the two packages. Also two fixes +for monitoring molecules as bonds are created and destroyed. -The person who created this package is Hasan Metin Aktulga (hmaktulga -at lbl.gov), while at Purdue University. Contact him directly, or -Aidan Thompson at Sandia (athomps at sandia.gov), if you have -questions. +[Author:] Hasan Metin Aktulga (MSU) while at Purdue University. -Examples: examples/reax +[Install or un-install:] + +make yes-user-reaxc +make machine :pre + +make no-user-reaxc +make machine :pre + +[Supporting info:] + +src/USER-REAXC: filenames -> commands +src/USER-REAXC/README +"pair_style reax/c"_pair_reaxc.html +"fix reax/c/bonds"_fix_reax_bonds.html +"fix reax/c/species"_fix_reaxc_species.html +examples/reax :ul :line -USER-SMD package :link(USER-SMD),h5 +USER-SMD package :link(USER-SMD),h4 -Supporting info: +[Contents:] -This package implements smoothed Mach dynamics (SMD) in -LAMMPS. Currently, the package has the following features: +An atom style, fixes, computes, and several pair styles which +implements smoothed Mach dynamics (SMD) for solids, which is a model +related to smoothed particle hydrodynamics (SPH) for liquids (see the +"USER-SPH package"_#USER-SPH). -* Does liquids via traditional Smooth Particle Hydrodynamics (SPH) +This package solves solids mechanics problems via a state of the art +stabilized meshless method with hourglass control. It can specify +hydrostatic interactions independently from material strength models, +i.e. pressure and deviatoric stresses are separated. It provides many +material models (Johnson-Cook, plasticity with hardening, +Mie-Grueneisen, Polynomial EOS) and allows new material models to be +added. It implements rigid boundary conditions (walls) which can be +specified as surface geometries from *.STL files. -* Also solves solids mechanics problems via a state of the art - stabilized meshless method with hourglass control. +[Author:] Georg Ganzenmuller (Fraunhofer-Institute for High-Speed +Dynamics, Ernst Mach Institute, Germany). -* Can specify hydrostatic interactions independently from material - strength models, i.e. pressure and deviatoric stresses are separated. +[Install or un-install:] -* Many material models available (Johnson-Cook, plasticity with - hardening, Mie-Grueneisen, Polynomial EOS). Easy to add new - material models. +Before building LAMMPS with this package, you must first download the +Eigen library. Eigen is a template library, so you do not need to +build it, just download it. You can do this manually if you prefer; +follow the instructions in lib/smd/README. You can also do it in one +step from the lammps/src dir, using a command like these, which simply +invoke the lib/smd/Install.py script with the specified args: -* Rigid boundary conditions (walls) can be loaded as surface geometries - from *.STL files. +make lib-smd # print help message +make lib-smd args="-g -l" # download in default lib/smd/eigen-eigen-* +make lib-smd args="-h . eigen -g -l" # download in lib/smd/eigen +make lib-smd args="-h ~ eigen -g -l" # download and build in ~/eigen :pre -See the file doc/PDF/SMD_LAMMPS_userguide.pdf to get started. +Note that the final -l switch is to create a symbolic (soft) link +named "includelink" in lib/smd to point to the Eigen dir. When LAMMPS +builds it will use this link. You should not need to edit the +lib/smd/Makefile.lammps file. -There are example scripts for using this package in examples/USER/smd. +You can then install/un-install the package and build LAMMPS in the +usual manner: -The person who created this package is Georg Ganzenmuller at the -Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute in -Germany (georg.ganzenmueller at emi.fhg.de). Contact him directly if -you have questions. +make yes-user-smd +make machine :pre + +make no-user-smd +make machine :pre + +[Supporting info:] -Examples: examples/USER/smd +src/USER-SMD: filenames -> commands +src/USER-SMD/README +doc/PDF/SMD_LAMMPS_userguide.pdf +examples/USER/smd +http://lammps.sandia.gov/movies.html#smd :ul :line -USER-SMTBQ package :link(USER-SMTBQ),h5 +USER-SMTBQ package :link(USER-SMTBQ),h4 -Supporting info: +[Contents:] -This package implements the Second Moment Tight Binding - QEq (SMTB-Q) -potential for the description of ionocovalent bonds in oxides. +A pair style which implements a Second Moment Tight Binding model with +QEq charge equilibration (SMTBQ) potential for the description of +ionocovalent bonds in oxides. -There are example scripts for using this package in -examples/USER/smtbq. +[Authors:] Nicolas Salles, Emile Maras, Olivier Politano, and Robert +Tetot (LAAS-CNRS, France). -See this doc page to get started: +[Install or un-install:] + +make yes-user-smtbq +make machine :pre + +make no-user-smtbq +make machine :pre + +[Supporting info:] +src/USER-SMTBQ: filenames -> commands +src/USER-SMTBQ/README "pair_style smtbq"_pair_smtbq.html +examples/USER/smtbq :ul -The persons who created the USER-SMTBQ package are Nicolas Salles, -Emile Maras, Olivier Politano, Robert Tetot, who can be contacted at -these email addresses: lammps@u-bourgogne.fr, nsalles@laas.fr. Contact -them directly if you have any questions. +:line -Examples: examples/USER/smtbq +USER-SPH package :link(USER-SPH),h4 -:line +[Contents:] -USER-SPH package :link(USER-SPH),h5 +An atom style, fixes, computes, and several pair styles which +implements smoothed particle hydrodynamics (SPH) for liquids. See the +related "USER-SMD package"_#USER-SMD package for smooth Mach dynamics +(SMD) for solids. -Supporting info: +This package contains ideal gas, Lennard-Jones equation of states, +Tait, and full support for complete (i.e. internal-energy dependent) +equations of state. It allows for plain or Monaghans XSPH integration +of the equations of motion. It has options for density continuity or +density summation to propagate the density field. It has +"set"_set.html command options to set the internal energy and density +of particles from the input script and allows the same quantities to +be output with thermodynamic output or to dump files via the "compute +property/atom"_compute_property_atom.html command. -This package implements smoothed particle hydrodynamics (SPH) in -LAMMPS. Currently, the package has the following features: +[Author:] Georg Ganzenmuller (Fraunhofer-Institute for High-Speed +Dynamics, Ernst Mach Institute, Germany). -* Tait, ideal gas, Lennard-Jones equation of states, full support for - complete (i.e. internal-energy dependent) equations of state +[Install or un-install:] + +make yes-user-sph +make machine :pre + +make no-user-sph +make machine :pre + +[Supporting info:] -* Plain or Monaghans XSPH integration of the equations of motion +src/USER-SPH: filenames -> commands +src/USER-SPH/README +doc/PDF/SPH_LAMMPS_userguide.pdf +examples/USER/sph +http://lammps.sandia.gov/movies.html#sph :ul -* Density continuity or density summation to propagate the density field +:line -* Commands to set internal energy and density of particles from the - input script +USER-TALLY package :link(USER-TALLY),h4 -* Output commands to access internal energy and density for dumping and - thermo output +[Contents:] -See the file doc/PDF/SPH_LAMMPS_userguide.pdf to get started. +Several compute styles that can be called when pairwise interactions +are calculated to tally information (forces, heat flux, energy, +stress, etc) about individual interactions. -There are example scripts for using this package in examples/USER/sph. +[Author:] Axel Kohlmeyer (Temple U). -The person who created this package is Georg Ganzenmuller at the -Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute in -Germany (georg.ganzenmueller at emi.fhg.de). Contact him directly if -you have questions. +[Install or un-install:] + +make yes-user-tally +make machine :pre + +make no-user-tally +make machine :pre + +[Supporting info:] -Examples: examples/USER/sph +src/USER-TALLY: filenames -> commands +src/USER-TALLY/README +"compute */tally"_compute_tally.html +examples/USER/tally :ul :line -USER-TALLY package :link(USER-TALLY),h5 +USER-VTK package :link(USER-VTK),h4 -Supporting info: +[Contents:] -Examples: examples/USER/tally +A "dump custom/vtk"_dump_custom_vtk.html command which outputs +snapshot info in the "VTK format"_vtk, enabling visualization by +"Paraview"_paraview or other visuzlization packages. -:line +:link(vtk,http://www.vtk.org) +:link(paraview,http://www.paraview.org) + +To use this package you must have VTK library available on your +system. + +[Authors:] Richard Berger (JKU) and Daniel Queteschiner (DCS Computing). -USER-VTK package :link(USER-VTK),h5 +[Install or un-install:] + +The lib/vtk/Makefile.lammps file has settings for accessing VTK files +and its library, which are required for LAMMPS to build and link with +this package. If the settings are not valid for your system, check if +one of the other lib/vtk/Makefile.lammps.* files is compatible and +copy it to Makefile.lammps. If none of the provided files work, you +will need to edit the Makefile.lammps file. + +You can then install/un-install the package and build LAMMPS in the +usual manner: + +make yes-user-vtk +make machine :pre + +make no-user-vtk +make machine :pre + +[Supporting info:] +src/USER-VTK: filenames -> commands +src/USER-VTK/README +lib/vtk/README +"dump custom/vtk"_dump_custom_vtk.html :ul diff --git a/doc/src/Section_start.txt b/doc/src/Section_start.txt index 5a5de9ac9b..0a7209765e 100644 --- a/doc/src/Section_start.txt +++ b/doc/src/Section_start.txt @@ -14,12 +14,11 @@ experienced users. 2.1 "What's in the LAMMPS distribution"_#start_1 2.2 "Making LAMMPS"_#start_2 2.3 "Making LAMMPS with optional packages"_#start_3 -2.4 "Building LAMMPS via the Make.py script"_#start_4 -2.5 "Building LAMMPS as a library"_#start_5 -2.6 "Running LAMMPS"_#start_6 -2.7 "Command-line options"_#start_7 -2.8 "Screen output"_#start_8 -2.9 "Tips for users of previous versions"_#start_9 :all(b) +2.5 "Building LAMMPS as a library"_#start_4 +2.6 "Running LAMMPS"_#start_5 +2.7 "Command-line options"_#start_6 +2.8 "Screen output"_#start_7 +2.9 "Tips for users of previous versions"_#start_8 :all(b) :line @@ -80,7 +79,7 @@ This section has the following sub-sections: Read this first :h5,link(start_2_1) -If you want to avoid building LAMMPS yourself, read the preceding +If you want to avoid building LAMMPS yourself, read the preceeding section about options available for downloading and installing executables. Details are discussed on the "download"_download page. @@ -96,7 +95,7 @@ make serial :pre Note that on a facility supercomputer, there are often "modules" loaded in your environment that provide the compilers and MPI you should use. In this case, the "mpicxx" compile/link command in -Makefile.mpi should just work by accessing those modules. +Makefile.mpi should simply work by accessing those modules. It may be the case that one of the other Makefile.machine files in the src/MAKE sub-directories is a better match to your system (type "make" @@ -107,33 +106,35 @@ make stampede :pre If any of these builds (with an existing Makefile.machine) works on your system, then you're done! +If you need to install an optional package with a LAMMPS command you +want to use, and the package does not depend on an extra library, you +can simply type + +make name :pre + +before invoking (or re-invoking) the above steps. "Name" is the +lower-case name of the package, e.g. replica or user-misc. + If you want to do one of the following: -use optional LAMMPS features that require additional libraries -use optional packages that require additional libraries -use optional accelerator packages that require special compiler/linker settings -run on a specialized platform that has its own compilers, settings, or other libs to use :ul +use a LAMMPS command that requires an extra library (e.g. "dump image"_dump_image.html) +build with a package that requires an extra library +build with an accelerator package that requires special compiler/linker settings +run on a machine that has its own compilers, settings, or libraries :ul then building LAMMPS is more complicated. You may need to find where -auxiliary libraries exist on your machine or install them if they -don't. You may need to build additional libraries that are part of -the LAMMPS package, before building LAMMPS. You may need to edit a +extra libraries exist on your machine or install them if they don't. +You may need to build extra libraries that are included in the LAMMPS +distribution, before building LAMMPS itself. You may need to edit a Makefile.machine file to make it compatible with your system. -Note that there is a Make.py tool in the src directory that automates -several of these steps, but you still have to know what you are doing. -"Section 2.4"_#start_4 below describes the tool. It is a convenient -way to work with installing/un-installing various packages, the -Makefile.machine changes required by some packages, and the auxiliary -libraries some of them use. - Please read the following sections carefully. If you are not comfortable with makefiles, or building codes on a Unix platform, or running an MPI job on your machine, please find a local expert to help -you. Many compilation, linking, and run problems that users have are -often not really LAMMPS issues - they are peculiar to the user's -system, compilers, libraries, etc. Such questions are better answered -by a local expert. +you. Many compilation, linking, and run problems users experience are +often not LAMMPS issues - they are peculiar to the user's system, +compilers, libraries, etc. Such questions are better answered by a +local expert. If you have a build problem that you are convinced is a LAMMPS issue (e.g. the compiler complains about a line of LAMMPS source code), then @@ -251,7 +252,7 @@ re-compile, after typing "make clean" (which will describe different clean options). The LMP_INC variable is used to include options that turn on ifdefs -within the LAMMPS code. The options that are currently recognized are: +within the LAMMPS code. The options that are currently recogized are: -DLAMMPS_GZIP -DLAMMPS_JPEG @@ -362,7 +363,7 @@ installed on your platform. If MPI is installed on your system in the usual place (under /usr/local), you also may not need to specify these 3 variables, assuming /usr/local is in your path. On some large parallel machines which use "modules" for their compile/link -environments, you may simply need to include the correct module in +environements, you may simply need to include the correct module in your build environment, before building LAMMPS. Or the parallel machine may have a vendor-provided MPI which the compiler has no trouble finding. @@ -430,7 +431,7 @@ use the KISS library described above. You may also need to set the FFT_INC, FFT_PATH, and FFT_LIB variables, so the compiler and linker can find the needed FFT header and library files. Note that on some large parallel machines which use "modules" -for their compile/link environments, you may simply need to include +for their compile/link environements, you may simply need to include the correct module in your build environment. Or the parallel machine may have a vendor-provided FFT library which the compiler has no trouble finding. @@ -450,12 +451,13 @@ you must also manually specify the correct library, namely -lsfftw or The FFT_INC variable also allows for a -DFFT_SINGLE setting that will use single-precision FFTs with PPPM, which can speed-up long-range -calculations, particularly in parallel or on GPUs. Fourier transform +calulations, particularly in parallel or on GPUs. Fourier transform and related PPPM operations are somewhat insensitive to floating point truncation errors and thus do not always need to be performed in double precision. Using the -DFFT_SINGLE setting trades off a little accuracy for reduced memory use and parallel communication costs for -transposing 3d FFT data. +transposing 3d FFT data. Note that single precision FFTs have only +been tested with the FFTW3, FFTW2, MKL, and KISS FFT options. Step 7 :h6 @@ -507,13 +509,13 @@ You should get the executable lmp_foo when the build is complete. Errors that can occur when making LAMMPS: h5 :link(start_2_3) -NOTE: If an error occurs when building LAMMPS, the compiler or linker -will state very explicitly what the problem is. The error message -should give you a hint as to which of the steps above has failed, and -what you need to do in order to fix it. Building a code with a -Makefile is a very logical process. The compiler and linker need to -find the appropriate files and those files need to be compatible with -LAMMPS source files. When a make fails, there is usually a very +If an error occurs when building LAMMPS, the compiler or linker will +state very explicitly what the problem is. The error message should +give you a hint as to which of the steps above has failed, and what +you need to do in order to fix it. Building a code with a Makefile is +a very logical process. The compiler and linker need to find the +appropriate files and those files need to be compatible with LAMMPS +settings and source files. When a make fails, there is usually a very simple reason, which you or a local expert will need to fix. Here are two non-obvious errors that can occur: @@ -556,7 +558,8 @@ Typing "make clean-all" or "make clean-machine" will delete *.o object files created when LAMMPS is built, for either all builds or for a particular machine. -Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or -DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL :h6 +Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or +-DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL :h6 As explained above, any of these 3 settings can be specified on the LMP_INC line in your low-level src/MAKE/Makefile.foo. @@ -655,11 +658,6 @@ This section has the following sub-sections: 2.3.3 "Packages that require extra libraries"_#start_3_3 2.3.4 "Packages that require Makefile.machine settings"_#start_3_4 :all(b) -Note that the following "Section 2.4"_#start_4 describes the Make.py -tool which can be used to install/un-install packages and build the -auxiliary libraries which some of them use. It can also auto-edit a -Makefile.machine to add settings needed by some packages. - :line Package basics: :h5,link(start_3_1) @@ -669,235 +667,221 @@ are always included, plus optional packages. Packages are groups of files that enable a specific set of features. For example, force fields for molecular systems or granular systems are in packages. -"Section 4"_Section_packages.html in the manual has details -about all the packages, including specific instructions for building -LAMMPS with each package, which are covered in a more general manner +"Section 4"_Section_packages.html in the manual has details about all +the packages, which come in two flavors: [standard] and [user] +packages. It also has specific instructions for building LAMMPS with +any package which requires an extra library. General instructions are below. You can see the list of all packages by typing "make package" from -within the src directory of the LAMMPS distribution. This also lists -various make commands that can be used to manipulate packages. +within the src directory of the LAMMPS distribution. It will also +list various make commands that can be used to manage packages. If you use a command in a LAMMPS input script that is part of a package, you must have built LAMMPS with that package, else you will get an error that the style is invalid or the command is unknown. -Every command's doc page specifies if it is part of a package. You can -also type +Every command's doc page specfies if it is part of a package. You can +type lmp_machine -h :pre to run your executable with the optional "-h command-line -switch"_#start_7 for "help", which will simply list the styles and -commands known to your executable, and immediately exit. - -There are two kinds of packages in LAMMPS, standard and user packages. -More information about the contents of standard and user packages is -given in "Section 4"_Section_packages.html of the manual. The -difference between standard and user packages is as follows: - -Standard packages, such as molecule or kspace, are supported by the -LAMMPS developers and are written in a syntax and style consistent -with the rest of LAMMPS. This means we will answer questions about -them, debug and fix them if necessary, and keep them compatible with -future changes to LAMMPS. - -User packages, such as user-atc or user-omp, have been contributed by -users, and always begin with the user prefix. If they are a single -command (single file), they are typically in the user-misc package. -Otherwise, they are a set of files grouped together which add a -specific functionality to the code. - -User packages don't necessarily meet the requirements of the standard -packages. If you have problems using a feature provided in a user -package, you may need to contact the contributor directly to get help. -Information on how to submit additions you make to LAMMPS as single -files or either a standard or user-contributed package are given in -"this section"_Section_modify.html#mod_15 of the documentation. +switch"_#start_7 for "help", which will list the styles and commands +known to your executable, and immediately exit. :line Including/excluding packages :h5,link(start_3_2) -To use (or not use) a package you must include it (or exclude it) -before building LAMMPS. From the src directory, this is typically as -simple as: +To use (or not use) a package you must install it (or un-install it) +before building LAMMPS. From the src directory, this is as simple as: make yes-colloid make mpi :pre or -make no-manybody +make no-user-omp make mpi :pre -NOTE: You should NOT include/exclude packages and build LAMMPS in a +NOTE: You should NOT install/un-install packages and build LAMMPS in a single make command using multiple targets, e.g. make yes-colloid mpi. This is because the make procedure creates a list of source files that will be out-of-date for the build if the package configuration changes within the same command. -Some packages have individual files that depend on other packages -being included. LAMMPS checks for this and does the right thing. -I.e. individual files are only included if their dependencies are -already included. Likewise, if a package is excluded, other files +Any package can be installed or not in a LAMMPS build, independent of +all other packages. However, some packages include files derived from +files in other packages. LAMMPS checks for this and does the right +thing. I.e. individual files are only included if their dependencies +are already included. Likewise, if a package is excluded, other files dependent on that package are also excluded. +NOTE: The one exception is that we do not recommend building with both +the KOKKOS package installed and any of the other acceleration +packages (GPU, OPT, USER-INTEL, USER-OMP) also installed. This is +because of how Kokkos sometimes builds using a wrapper compiler which +can make it difficult to invoke all the compile/link flags correctly +for both Kokkos and non-Kokkos files. + If you will never run simulations that use the features in a particular packages, there is no reason to include it in your build. -For some packages, this will keep you from having to build auxiliary -libraries (see below), and will also produce a smaller executable -which may run a bit faster. - -When you download a LAMMPS tarball, these packages are pre-installed -in the src directory: KSPACE, MANYBODY,MOLECULE, because they are so -commonly used. When you download LAMMPS source files from the SVN or -Git repositories, no packages are pre-installed. - -Packages are included or excluded by typing "make yes-name" or "make -no-name", where "name" is the name of the package in lower-case, e.g. -name = kspace for the KSPACE package or name = user-atc for the -USER-ATC package. You can also type "make yes-standard", "make -no-standard", "make yes-std", "make no-std", "make yes-user", "make -no-user", "make yes-lib", "make no-lib", "make yes-all", or "make -no-all" to include/exclude various sets of packages. Type "make -package" to see all of the package-related make options. - -NOTE: Inclusion/exclusion of a package works by simply moving files -back and forth between the main src directory and sub-directories with -the package name (e.g. src/KSPACE, src/USER-ATC), so that the files -are seen or not seen when LAMMPS is built. After you have included or -excluded a package, you must re-build LAMMPS. - -Additional package-related make options exist to help manage LAMMPS -files that exist in both the src directory and in package -sub-directories. You do not normally need to use these commands -unless you are editing LAMMPS files or have downloaded a patch from -the LAMMPS WWW site. - -Typing "make package-update" or "make pu" will overwrite src files -with files from the package sub-directories if the package has been -included. It should be used after a patch is installed, since patches -only update the files in the package sub-directory, but not the src -files. Typing "make package-overwrite" will overwrite files in the -package sub-directories with src files. +For some packages, this will keep you from having to build extra +libraries, and will also produce a smaller executable which may run a +bit faster. + +When you download a LAMMPS tarball, three packages are pre-installed +in the src directory -- KSPACE, MANYBODY, MOLECULE -- because they are +so commonly used. When you download LAMMPS source files from the SVN +or Git repositories, no packages are pre-installed. + +Packages are installed or un-installed by typing + +make yes-name +make no-name :pre + +where "name" is the name of the package in lower-case, e.g. name = +kspace for the KSPACE package or name = user-atc for the USER-ATC +package. You can also type any of these commands: + +make yes-all | install all packages +make no-all | un-install all packages +make yes-standard or make yes-std | install standard packages +make no-standard or make no-std| un-install standard packages +make yes-user | install user packages +make no-user | un-install user packages +make yes-lib | install packages that require extra libraries +make no-lib | un-install packages that require extra libraries +make yes-ext | install packages that require external libraries +make no-ext | un-install packages that require external libraries :tb(s=|) + +which install/un-install various sets of packages. Typing "make +package" will list all the these commands. + +NOTE: Installing or un-installing a package works by simply moving +files back and forth between the main src directory and +sub-directories with the package name (e.g. src/KSPACE, src/USER-ATC), +so that the files are included or excluded when LAMMPS is built. +After you have installed or un-installed a package, you must re-build +LAMMPS for the action to take effect. + +The following make commands help manage files that exist in both the +src directory and in package sub-directories. You do not normally +need to use these commands unless you are editing LAMMPS files or have +downloaded a patch from the LAMMPS web site. Typing "make package-status" or "make ps" will show which packages are -currently included. For those that are included, it will list any +currently installed. For those that are installed, it will list any files that are different in the src directory and package -sub-directory. Typing "make package-diff" lists all differences -between these files. Again, type "make package" to see all of the -package-related make options. +sub-directory. -:line +Typing "make package-update" or "make pu" will overwrite src files +with files from the package sub-directories if the package is +installed. It should be used after a patch has been applied, since +patches only update the files in the package sub-directory, but not +the src files. -Packages that require extra libraries :h5,link(start_3_3) +Typing "make package-overwrite" will overwrite files in the package +sub-directories with src files. -A few of the standard and user packages require additional auxiliary -libraries. Many of them are provided with LAMMPS, in which case they -must be compiled first, before LAMMPS is built, if you wish to include -that package. If you get a LAMMPS build error about a missing -library, this is likely the reason. See the -"Section 4"_Section_packages.html doc page for a list of -packages that have these kinds of auxiliary libraries. - -The lib directory in the distribution has sub-directories with package -names that correspond to the needed auxiliary libs, e.g. lib/gpu. -Each sub-directory has a README file that gives more details. Code -for most of the auxiliary libraries is included in that directory. -Examples are the USER-ATC and MEAM packages. - -A few of the lib sub-directories do not include code, but do include -instructions (and sometimes scripts) that automate the process of -downloading the auxiliary library and installing it so LAMMPS can link -to it. Examples are the KIM, VORONOI, USER-MOLFILE, and USER-SMD -packages. - -The lib/python directory (for the PYTHON package) contains only a -choice of Makefile.lammps.* files. This is because no auxiliary code -or libraries are needed, only the Python library and other system libs -that should already available on your system. However, the -Makefile.lammps file is needed to tell LAMMPS which libs to use and -where to find them. - -For libraries with provided code, the sub-directory README file -(e.g. lib/atc/README) has instructions on how to build that library. -This information is also summarized in "Section -4"_Section_packages.html. Typically this is done by typing -something like: +Typing "make package-diff" lists all differences between these files. -make -f Makefile.g++ :pre - -If one of the provided Makefiles is not appropriate for your system -you will need to edit or add one. Note that all the Makefiles have a -setting for EXTRAMAKE at the top that specifies a Makefile.lammps.* -file. - -If the library build is successful, it will produce 2 files in the lib -directory: - -libpackage.a -Makefile.lammps :pre - -The Makefile.lammps file will typically be a copy of one of the -Makefile.lammps.* files in the library directory. - -Note that you must insure that the settings in Makefile.lammps are -appropriate for your system. If they are not, the LAMMPS build may -fail. To fix this, you can edit or create a new Makefile.lammps.* -file for your system, and copy it to Makefile.lammps. - -As explained in the lib/package/README files, the settings in -Makefile.lammps are used to specify additional system libraries and -their locations so that LAMMPS can build with the auxiliary library. -For example, if the MEAM package is used, the auxiliary library -consists of F90 code, built with a Fortran complier. To link that -library with LAMMPS (a C++ code) via whatever C++ compiler LAMMPS is -built with, typically requires additional Fortran-to-C libraries be -included in the link. Another example are the BLAS and LAPACK -libraries needed to use the USER-ATC or USER-AWPMD packages. - -For libraries without provided code, the sub-directory README file has -information on where to download the library and how to build it, -e.g. lib/voronoi/README and lib/smd/README. The README files also -describe how you must either (a) create soft links, via the "ln" -command, in those directories to point to where you built or installed -the packages, or (b) check or edit the Makefile.lammps file in the -same directory to provide that information. - -Some of the sub-directories, e.g. lib/voronoi, also have an install.py -script which can be used to automate the process of -downloading/building/installing the auxiliary library, and setting the -needed soft links. Type "python install.py" for further instructions. - -As with the sub-directories containing library code, if the soft links -or settings in the lib/package/Makefile.lammps files are not correct, -the LAMMPS build will typically fail. +Again, just type "make package" to see all of the package-related make +options. :line -Packages that require Makefile.machine settings :h5,link(start_3_4) - -A few packages require specific settings in Makefile.machine, to -either build or use the package effectively. These are the -USER-INTEL, KOKKOS, USER-OMP, and OPT packages, used for accelerating -code performance on CPUs or other hardware, as discussed in "Section -5.3"_Section_accelerate.html#acc_3. +Packages that require extra libraries :h5,link(start_3_3) -A summary of what Makefile.machine changes are needed for each of -these packages is given in "Section 4"_Section_packages.html. -The details are given on the doc pages that describe each of these -accelerator packages in detail: +A few of the standard and user packages require extra libraries. See +"Section 4"_Section_packages.html for two tables of packages which +indicate which ones require libraries. For each such package, the +Section 4 doc page gives details on how to build the extra library, +including how to download it if necessary. The basic ideas are +summarized here. + +[System libraries:] + +Packages in the tables "Section 4"_Section_packages.html with a "sys" +in the last column link to system libraries that typically already +exist on your machine. E.g. the python package links to a system +Python library. If your machine does not have the required library, +you will have to download and install it on your machine, in either +the system or user space. + +[Internal libraries:] + +Packages in the tables "Section 4"_Section_packages.html with an "int" +in the last column link to internal libraries whose source code is +included with LAMMPS, in the lib/name directory where name is the +package name. You must first build the library in that directory +before building LAMMPS with that package installed. E.g. the gpu +package links to a library you build in the lib/gpu dir. You can +often do the build in one step by typing "make lib-name args=..." +from the src dir, with appropriate arguments. You can leave off the +args to see a help message. See "Section 4"_Section_packages.html for +details for each package. + +[External libraries:] + +Packages in the tables "Section 4"_Section_packages.html with an "ext" +in the last column link to exernal libraries whose source code is not +included with LAMMPS. You must first download and install the library +before building LAMMPS with that package installed. E.g. the voronoi +package links to the freely available "Voro++ library"_voronoi. You +can often do the download/build in one step by typing "make lib-name +args=..." from the src dir, with appropriate arguments. You can leave +off the args to see a help message. See "Section +4"_Section_packages.html for details for each package. + +:link(voronoi,http://math.lbl.gov/voro++) + +[Possible errors:] + +There are various common errors which can occur when building extra +libraries or when building LAMMPS with packages that require the extra +libraries. + +If you cannot build the extra library itself successfully, you may +need to edit or create an appropriate Makefile for your machine, e.g. +with appropriate compiler or system settings. Provided makefiles are +typically in the lib/name directory. E.g. see the Makefile.* files in +lib/gpu. + +The LAMMPS build often uses settings in a lib/name/Makefile.lammps +file which either exists in the LAMMPS distribution or is created or +copied from a lib/name/Makefile.lammps.* file when the library is +built. If those settings are not correct for your machine you will +need to edit or create an appropriate Makefile.lammps file. + +Package-specific details for these steps are given in "Section +4"_Section_packages.html an in README files in the lib/name +directories. + +[Compiler options needed for accelerator packages:] + +Several packages contain code that is optimized for specific hardware, +e.g. CPU, KNL, or GPU. These are the OPT, GPU, KOKKOS, USER-INTEL, +and USER-OMP packages. Compiling and linking the source files in +these accelerator packages for optimal performance requires specific +settings in the Makefile.machine file you use. + +A summary of the Makefile.machine settings needed for each of these +packages is given in "Section 4"_Section_packages.html. More info is +given on the doc pages that describe each package in detail: 5.3.1 "USER-INTEL package"_accelerate_intel.html +5.3.2 "GPU package"_accelerate_intel.html 5.3.3 "KOKKOS package"_accelerate_kokkos.html 5.3.4 "USER-OMP package"_accelerate_omp.html 5.3.5 "OPT package"_accelerate_opt.html :all(b) -You can also look at the following machine Makefiles in -src/MAKE/OPTIONS, which include the changes. Note that the USER-INTEL -and KOKKOS packages allow for settings that build LAMMPS for different -hardware. The USER-INTEL package builds for CPU and the Xeon Phi, the -KOKKOS package builds for OpenMP, GPUs (Cuda), and the Xeon Phi. +You can also use or examine the following machine Makefiles in +src/MAKE/OPTIONS, which include the settings. Note that the +USER-INTEL and KOKKOS packages can use settings that build LAMMPS for +different hardware. The USER-INTEL package can be compiled for Intel +CPUs and KNLs; the KOKKOS package builds for CPUs (OpenMP), GPUs +(Cuda), and Intel KNLs. Makefile.intel_cpu Makefile.intel_phi @@ -907,127 +891,9 @@ Makefile.kokkos_phi Makefile.omp Makefile.opt :ul -Also note that the Make.py tool, described in the next "Section -2.4"_#start_4 can automatically add the needed info to an existing -machine Makefile, using simple command-line arguments. - -:line - -2.4 Building LAMMPS via the Make.py tool :h4,link(start_4) - -The src directory includes a Make.py script, written in Python, which -can be used to automate various steps of the build process. It is -particularly useful for working with the accelerator packages, as well -as other packages which require auxiliary libraries to be built. - -The goal of the Make.py tool is to allow any complex multi-step LAMMPS -build to be performed as a single Make.py command. And you can -archive the commands, so they can be re-invoked later via the -r -(redo) switch. If you find some LAMMPS build procedure that can't be -done in a single Make.py command, let the developers know, and we'll -see if we can augment the tool. - -You can run Make.py from the src directory by typing either: - -Make.py -h -python Make.py -h :pre - -which will give you help info about the tool. For the former to work, -you may need to edit the first line of Make.py to point to your local -Python. And you may need to insure the script is executable: - -chmod +x Make.py :pre - -Here are examples of build tasks you can perform with Make.py: - -Install/uninstall packages: Make.py -p no-lib kokkos omp intel -Build specific auxiliary libs: Make.py -a lib-atc lib-meam -Build libs for all installed packages: Make.py -p cuda gpu -gpu mode=double arch=31 -a lib-all -Create a Makefile from scratch with compiler and MPI settings: Make.py -m none -cc g++ -mpi mpich -a file -Augment Makefile.serial with settings for installed packages: Make.py -p intel -intel cpu -m serial -a file -Add JPG and FFTW support to Makefile.mpi: Make.py -m mpi -jpg -fft fftw -a file -Build LAMMPS with a parallel make using Makefile.mpi: Make.py -j 16 -m mpi -a exe -Build LAMMPS and libs it needs using Makefile.serial with accelerator settings: Make.py -p gpu intel -intel cpu -a lib-all file serial :tb(s=:) - -The bench and examples directories give Make.py commands that can be -used to build LAMMPS with the various packages and options needed to -run all the benchmark and example input scripts. See these files for -more details: - -bench/README -bench/FERMI/README -bench/KEPLER/README -bench/PHI/README -examples/README -examples/accelerate/README -examples/accelerate/make.list :ul - -All of the Make.py options and syntax help can be accessed by using -the "-h" switch. - -E.g. typing "Make.py -h" gives - -Syntax: Make.py switch args ... - switches can be listed in any order - help switch: - -h prints help and syntax for all other specified switches - switch for actions: - -a lib-all, lib-dir, clean, file, exe or machine - list one or more actions, in any order - machine is a Makefile.machine suffix, must be last if used - one-letter switches: - -d (dir), -j (jmake), -m (makefile), -o (output), - -p (packages), -r (redo), -s (settings), -v (verbose) - switches for libs: - -atc, -awpmd, -colvars, -cuda - -gpu, -meam, -poems, -qmmm, -reax - switches for build and makefile options: - -intel, -kokkos, -cc, -mpi, -fft, -jpg, -png :pre - -Using the "-h" switch with other switches and actions gives additional -info on all the other specified switches or actions. The "-h" can be -anywhere in the command-line and the other switches do not need their -arguments. E.g. type "Make.py -h -d -atc -intel" will print: - --d dir - dir = LAMMPS home dir - if -d not specified, working dir must be lammps/src :pre - --atc make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = g++) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) :pre - --intel mode - mode = cpu or phi (def = cpu) - build Intel package for CPU or Xeon Phi :pre - -Note that Make.py never overwrites an existing Makefile.machine. -Instead, it creates src/MAKE/MINE/Makefile.auto, which you can save or -rename if desired. Likewise it creates an executable named -src/lmp_auto, which you can rename using the -o switch if desired. - -The most recently executed Make.py command is saved in -src/Make.py.last. You can use the "-r" switch (for redo) to re-invoke -the last command, or you can save a sequence of one or more Make.py -commands to a file and invoke the file of commands using "-r". You -can also label the commands in the file and invoke one or more of them -by name. - -A typical use of Make.py is to start with a valid Makefile.machine for -your system, that works for a vanilla LAMMPS build, i.e. when optional -packages are not installed. You can then use Make.py to add various -settings (FFT, JPG, PNG) to the Makefile.machine as well as change its -compiler and MPI options. You can also add additional packages to the -build, as well as build the needed supporting libraries. - -You can also use Make.py to create a new Makefile.machine from -scratch, using the "-m none" switch, if you also specify what compiler -and MPI options to use, via the "-cc" and "-mpi" switches. - :line -2.5 Building LAMMPS as a library :h4,link(start_5) +2.4 Building LAMMPS as a library :h4,link(start_4) LAMMPS can be built as either a static or shared library, which can then be called from another application or a scripting language. See @@ -1063,7 +929,7 @@ src/MAKE/Makefile.foo and perform the build in the directory Obj_shared_foo. This is so that each file can be compiled with the -fPIC flag which is required for inclusion in a shared library. The build will create the file liblammps_foo.so which another application -can link to dynamically. It will also create a soft link liblammps.so, +can link to dyamically. It will also create a soft link liblammps.so, which will point to the most recently built shared library. This is the file the Python wrapper loads by default. @@ -1149,7 +1015,7 @@ interface and how to extend it for your needs. :line -2.6 Running LAMMPS :h4,link(start_6) +2.5 Running LAMMPS :h4,link(start_5) By default, LAMMPS runs by reading commands from standard input. Thus if you run the LAMMPS executable by itself, e.g. @@ -1281,7 +1147,7 @@ more processors or setup a smaller problem. :line -2.7 Command-line options :h4,link(start_7) +2.6 Command-line options :h4,link(start_6) At run time, LAMMPS recognizes several optional command-line switches which may be used in any order. Either the full word or a one-or-two @@ -1415,8 +1281,8 @@ LAMMPS is compiled with CUDA=yes. numa Nm :pre This option is only relevant when using pthreads with hwloc support. -In this case Nm defines the number of NUMA regions (typically sockets) -on a node which will be utilized by a single MPI rank. By default Nm +In this case Nm defines the number of NUMA regions (typicaly sockets) +on a node which will be utilizied by a single MPI rank. By default Nm = 1. If this option is used the total number of worker-threads per MPI rank is threads*numa. Currently it is always almost better to assign at least one MPI rank per NUMA region, and leave numa set to @@ -1480,7 +1346,7 @@ replica runs on on one or a few processors. Note that with MPI installed on a machine (e.g. your desktop), you can run on more (virtual) processors than you have physical processors. -To run multiple independent simulations from one input script, using +To run multiple independent simulatoins from one input script, using multiple partitions, see "Section 6.4"_Section_howto.html#howto_4 of the manual. World- and universe-style "variables"_variable.html are useful in this context. @@ -1711,7 +1577,7 @@ negative numeric value. It is OK if the first value1 starts with a :line -2.8 LAMMPS screen output :h4,link(start_8) +2.7 LAMMPS screen output :h4,link(start_7) As LAMMPS reads an input script, it prints information to both the screen and a log file about significant actions it takes to setup a @@ -1759,7 +1625,7 @@ The first section provides a global loop timing summary. The {loop time} is the total wall time for the section. The {Performance} line is provided for convenience to help predicting the number of loop continuations required and for comparing performance with other, -similar MD codes. The {CPU use} line provides the CPU utilization per +similar MD codes. The {CPU use} line provides the CPU utilzation per MPI task; it should be close to 100% times the number of OpenMP threads (or 1 of no OpenMP). Lower numbers correspond to delays due to file I/O or insufficient thread utilization. @@ -1867,7 +1733,7 @@ communication, roughly 75% in the example above. :line -2.9 Tips for users of previous LAMMPS versions :h4,link(start_9) +2.8 Tips for users of previous LAMMPS versions :h4,link(start_8) The current C++ began with a complete rewrite of LAMMPS 2001, which was written in F90. Features of earlier versions of LAMMPS are listed diff --git a/doc/src/compute_sna_atom.txt b/doc/src/compute_sna_atom.txt index e2df706473..f82df0d816 100644 --- a/doc/src/compute_sna_atom.txt +++ b/doc/src/compute_sna_atom.txt @@ -24,7 +24,7 @@ twojmax = band limit for bispectrum components (non-negative integer) :l R_1, R_2,... = list of cutoff radii, one for each type (distance units) :l w_1, w_2,... = list of neighbor weights, one for each type :l zero or more keyword/value pairs may be appended :l -keyword = {diagonal} or {rmin0} or {switchflag} or {bzeroflag} :l +keyword = {diagonal} or {rmin0} or {switchflag} or {bzeroflag} or {quadraticflag}:l {diagonal} value = {0} or {1} or {2} or {3} {0} = all j1, j2, j <= twojmax, j2 <= j1 {1} = subset satisfying j1 == j2 @@ -36,7 +36,10 @@ keyword = {diagonal} or {rmin0} or {switchflag} or {bzeroflag} :l {1} = use switching function {bzeroflag} value = {0} or {1} {0} = do not subtract B0 - {1} = subtract B0 :pre + {1} = subtract B0 + {quadraticflag} value = {0} or {1} + {0} = do not generate quadratic terms + {1} = generate quadratic terms :pre :ule [Examples:] @@ -151,7 +154,7 @@ linear mapping from radial distance to polar angle {theta0} on the The argument {twojmax} and the keyword {diagonal} define which bispectrum components are generated. See section below on output for a detailed explanation of the number of bispectrum components and the -ordered in which they are listed +ordered in which they are listed. The keyword {switchflag} can be used to turn off the switching function. @@ -162,6 +165,14 @@ the calculated bispectrum components. This optional keyword is only available for compute {sna/atom}, as {snad/atom} and {snav/atom} are unaffected by the removal of constant terms. +The keyword {quadraticflag} determines whether or not the +quadratic analogs to the bispectrum quantities are generated. +These are formed by taking the outer product of the vector +of bispectrum components with itself. +See section below on output for a +detailed explanation of the number of quadratic terms and the +ordered in which they are listed. + NOTE: If you have a bonded system, then the settings of "special_bonds"_special_bonds.html command can remove pairwise interactions between atoms in the same bond, angle, or dihedral. This @@ -180,7 +191,7 @@ command that includes all pairs in the neighbor list. Compute {sna/atom} calculates a per-atom array, each column corresponding to a particular bispectrum component. The total number -of columns and the identities of the bispectrum component contained in +of columns and the identity of the bispectrum component contained in each column depend on the values of {twojmax} and {diagonal}, as described by the following piece of python code: @@ -213,6 +224,19 @@ block contains six sub-blocks corresponding to the {xx}, {yy}, {zz}, notation. Each of these sub-blocks contains one column for each bispectrum component, the same as for compute {sna/atom} +For example, if {K}=30 and ntypes=1, the number of columns in the per-atom +arrays generated by {sna/atom}, {snad/atom}, and {snav/atom} +are 30, 90, and 180, respectively. With {quadratic} value=1, +the numbers of columns are 930, 2790, and 5580, respectively. + +If the {quadratic} keyword value is set to 1, then additional +columns are appended to each per-atom array, corresponding to +a matrix of quantities that are products of two bispectrum components. If the +number of bispectrum components is {K}, then the number of matrix elements +is {K}^2. These are output in subblocks of {K}^2 columns, using the same +ordering of columns and sub-blocks as was used for the bispectrum +components. + These values can be accessed by any command that uses per-atom values from a compute as input. See "Section 6.15"_Section_howto.html#howto_15 for an overview of LAMMPS output @@ -231,7 +255,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. [Default:] The optional keyword defaults are {diagonal} = 0, {rmin0} = 0, -{switchflag} = 1, {bzeroflag} = 0. +{switchflag} = 1, {bzeroflag} = 1, {quadraticflag} = 0, :line diff --git a/doc/src/dump.txt b/doc/src/dump.txt index cb9a5ba741..69a00eb473 100644 --- a/doc/src/dump.txt +++ b/doc/src/dump.txt @@ -7,12 +7,12 @@ :line dump command :h3 -"dump custom/vtk"_dump_custom_vtk.html command :h3 +"dump vtk"_dump_vtk.html command :h3 "dump h5md"_dump_h5md.html command :h3 +"dump molfile"_dump_molfile.html command :h3 +"dump netcdf"_dump_netcdf.html command :h3 "dump image"_dump_image.html command :h3 "dump movie"_dump_image.html command :h3 -"dump molfile"_dump_molfile.html command :h3 -"dump nc"_dump_nc.html command :h3 [Syntax:] @@ -20,7 +20,7 @@ dump ID group-ID style N file args :pre ID = user-assigned name for the dump :ulb,l group-ID = ID of the group of atoms to be dumped :l -style = {atom} or {atom/gz} or {atom/mpiio} or {cfg} or {cfg/gz} or {cfg/mpiio} or {dcd} or {xtc} or {xyz} or {xyz/gz} or {xyz/mpiio} or {h5md} or {image} or {movie} or {molfile} or {local} or {custom} or {custom/gz} or {custom/mpiio} :l +style = {atom} or {atom/gz} or {atom/mpiio} or {cfg} or {cfg/gz} or {cfg/mpiio} or {custom} or {custom/gz} or {custom/mpiio} or {dcd} or {h5md} or {image} or or {local} or {molfile} or {movie} or {netcdf} or {netcdf/mpiio} or {vtk} or {xtc} or {xyz} or {xyz/gz} or {xyz/mpiio} :l N = dump every this many timesteps :l file = name of file to write dump info to :l args = list of arguments for a particular style :l @@ -30,33 +30,22 @@ args = list of arguments for a particular style :l {cfg} args = same as {custom} args, see below {cfg/gz} args = same as {custom} args, see below {cfg/mpiio} args = same as {custom} args, see below + {custom}, {custom/gz}, {custom/mpiio} args = see below {dcd} args = none + {h5md} args = discussed on "dump h5md"_dump_h5md.html doc page + {image} args = discussed on "dump image"_dump_image.html doc page + {local} args = see below + {molfile} args = discussed on "dump molfile"_dump_molfile.html doc page + {movie} args = discussed on "dump image"_dump_image.html doc page + {netcdf} args = discussed on "dump netcdf"_dump_netcdf.html doc page + {netcdf/mpiio} args = discussed on "dump netcdf"_dump_netcdf.html doc page + {vtk} args = same as {custom} args, see below, also "dump vtk"_dump_vtk.html doc page {xtc} args = none - {xyz} args = none :pre - {xyz/gz} args = none :pre + {xyz} args = none + {xyz/gz} args = none {xyz/mpiio} args = none :pre - {custom/vtk} args = similar to custom args below, discussed on "dump custom/vtk"_dump_custom_vtk.html doc page :pre - - {h5md} args = discussed on "dump h5md"_dump_h5md.html doc page :pre - - {image} args = discussed on "dump image"_dump_image.html doc page :pre - - {movie} args = discussed on "dump image"_dump_image.html doc page :pre - - {molfile} args = discussed on "dump molfile"_dump_molfile.html doc page - - {nc} args = discussed on "dump nc"_dump_nc.html doc page :pre - - {local} args = list of local attributes - possible attributes = index, c_ID, c_ID\[I\], f_ID, f_ID\[I\] - index = enumeration of local values - c_ID = local vector calculated by a compute with ID - c_ID\[I\] = Ith column of local array calculated by a compute with ID, I can include wildcard (see below) - f_ID = local vector calculated by a fix with ID - f_ID\[I\] = Ith column of local array calculated by a fix with ID, I can include wildcard (see below) :pre - - {custom} or {custom/gz} or {custom/mpiio} args = list of atom attributes +{custom} or {custom/gz} or {custom/mpiio} args = list of atom attributes :l possible attributes = id, mol, proc, procp1, type, element, mass, x, y, z, xs, ys, zs, xu, yu, zu, xsu, ysu, zsu, ix, iy, iz, @@ -94,6 +83,15 @@ args = list of arguments for a particular style :l v_name = per-atom vector calculated by an atom-style variable with name d_name = per-atom floating point vector with name, managed by fix property/atom i_name = per-atom integer vector with name, managed by fix property/atom :pre + +{local} args = list of local attributes :l + possible attributes = index, c_ID, c_ID\[I\], f_ID, f_ID\[I\] + index = enumeration of local values + c_ID = local vector calculated by a compute with ID + c_ID\[I\] = Ith column of local array calculated by a compute with ID, I can include wildcard (see below) + f_ID = local vector calculated by a fix with ID + f_ID\[I\] = Ith column of local array calculated by a fix with ID, I can include wildcard (see below) :pre + :ule [Examples:] diff --git a/doc/src/dump_custom_vtk.txt b/doc/src/dump_custom_vtk.txt deleted file mode 100644 index d4c16193d8..0000000000 --- a/doc/src/dump_custom_vtk.txt +++ /dev/null @@ -1,347 +0,0 @@ - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -dump custom/vtk command :h3 - -[Syntax:] - -dump ID group-ID style N file args :pre - -ID = user-assigned name for the dump :ulb,l -group-ID = ID of the group of atoms to be dumped :l -style = {custom/vtk} :l -N = dump every this many timesteps :l -file = name of file to write dump info to :l -args = list of arguments for a particular style :l - {custom/vtk} args = list of atom attributes - possible attributes = id, mol, proc, procp1, type, element, mass, - x, y, z, xs, ys, zs, xu, yu, zu, - xsu, ysu, zsu, ix, iy, iz, - vx, vy, vz, fx, fy, fz, - q, mux, muy, muz, mu, - radius, diameter, omegax, omegay, omegaz, - angmomx, angmomy, angmomz, tqx, tqy, tqz, - c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :pre - - id = atom ID - mol = molecule ID - proc = ID of processor that owns atom - procp1 = ID+1 of processor that owns atom - type = atom type - element = name of atom element, as defined by "dump_modify"_dump_modify.html command - mass = atom mass - x,y,z = unscaled atom coordinates - xs,ys,zs = scaled atom coordinates - xu,yu,zu = unwrapped atom coordinates - xsu,ysu,zsu = scaled unwrapped atom coordinates - ix,iy,iz = box image that the atom is in - vx,vy,vz = atom velocities - fx,fy,fz = forces on atoms - q = atom charge - mux,muy,muz = orientation of dipole moment of atom - mu = magnitude of dipole moment of atom - radius,diameter = radius,diameter of spherical particle - omegax,omegay,omegaz = angular velocity of spherical particle - angmomx,angmomy,angmomz = angular momentum of aspherical particle - tqx,tqy,tqz = torque on finite-size particles - c_ID = per-atom vector calculated by a compute with ID - c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below) - f_ID = per-atom vector calculated by a fix with ID - f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID, I can include wildcard (see below) - v_name = per-atom vector calculated by an atom-style variable with name - d_name = per-atom floating point vector with name, managed by fix property/atom - i_name = per-atom integer vector with name, managed by fix property/atom :pre -:ule - -[Examples:] - -dump dmpvtk all custom/vtk 100 dump*.myforce.vtk id type vx fx -dump dmpvtp flow custom/vtk 100 dump*.%.displace.vtp id type c_myD\[1\] c_myD\[2\] c_myD\[3\] v_ke :pre - -The style {custom/vtk} is similar to the "custom"_dump.html style but -uses the VTK library to write data to VTK simple legacy or XML format -depending on the filename extension specified. This can be either -{*.vtk} for the legacy format or {*.vtp} and {*.vtu}, respectively, -for the XML format; see the "VTK -homepage"_http://www.vtk.org/VTK/img/file-formats.pdf for a detailed -description of these formats. Since this naming convention conflicts -with the way binary output is usually specified (see below), -"dump_modify binary"_dump_modify.html allows to set the binary -flag for this dump style explicitly. - -[Description:] - -Dump a snapshot of atom quantities to one or more files every N -timesteps in a format readable by the "VTK visualization -toolkit"_http://www.vtk.org or other visualization tools that use it, -e.g. "ParaView"_http://www.paraview.org. The timesteps on which dump -output is written can also be controlled by a variable; see the -"dump_modify every"_dump_modify.html command for details. - -Only information for atoms in the specified group is dumped. The -"dump_modify thresh and region"_dump_modify.html commands can also -alter what atoms are included; see details below. - -As described below, special characters ("*", "%") in the filename -determine the kind of output. - -IMPORTANT NOTE: Because periodic boundary conditions are enforced only -on timesteps when neighbor lists are rebuilt, the coordinates of an -atom written to a dump file may be slightly outside the simulation -box. - -IMPORTANT NOTE: Unless the "dump_modify sort"_dump_modify.html -option is invoked, the lines of atom information written to dump files -will be in an indeterminate order for each snapshot. This is even -true when running on a single processor, if the "atom_modify -sort"_atom_modify.html option is on, which it is by default. In this -case atoms are re-ordered periodically during a simulation, due to -spatial sorting. It is also true when running in parallel, because -data for a single snapshot is collected from multiple processors, each -of which owns a subset of the atoms. - -For the {custom/vtk} style, sorting is off by default. See the -"dump_modify"_dump_modify.html doc page for details. - -:line - -The dimensions of the simulation box are written to a separate file -for each snapshot (either in legacy VTK or XML format depending on -the format of the main dump file) with the suffix {_boundingBox} -appended to the given dump filename. - -For an orthogonal simulation box this information is saved as a -rectilinear grid (legacy .vtk or .vtr XML format). - -Triclinic simulation boxes (non-orthogonal) are saved as -hexahedrons in either legacy .vtk or .vtu XML format. - -Style {custom/vtk} allows you to specify a list of atom attributes -to be written to the dump file for each atom. Possible attributes -are listed above. In contrast to the {custom} style, the attributes -are rearranged to ensure correct ordering of vector components -(except for computes and fixes - these have to be given in the right -order) and duplicate entries are removed. - -You cannot specify a quantity that is not defined for a particular -simulation - such as {q} for atom style {bond}, since that atom style -doesn't assign charges. Dumps occur at the very end of a timestep, -so atom attributes will include effects due to fixes that are applied -during the timestep. An explanation of the possible dump custom/vtk attributes -is given below. Since position data is required to write VTK files "x y z" -do not have to be specified explicitly. - -The VTK format uses a single snapshot of the system per file, thus -a wildcard "*" must be included in the filename, as discussed below. -Otherwise the dump files will get overwritten with the new snapshot -each time. - -:line - -Dumps are performed on timesteps that are a multiple of N (including -timestep 0) and on the last timestep of a minimization if the -minimization converges. Note that this means a dump will not be -performed on the initial timestep after the dump command is invoked, -if the current timestep is not a multiple of N. This behavior can be -changed via the "dump_modify first"_dump_modify.html command, which -can also be useful if the dump command is invoked after a minimization -ended on an arbitrary timestep. N can be changed between runs by -using the "dump_modify every"_dump_modify.html command. -The "dump_modify every"_dump_modify.html command -also allows a variable to be used to determine the sequence of -timesteps on which dump files are written. In this mode a dump on the -first timestep of a run will also not be written unless the -"dump_modify first"_dump_modify.html command is used. - -Dump filenames can contain two wildcard characters. If a "*" -character appears in the filename, then one file per snapshot is -written and the "*" character is replaced with the timestep value. -For example, tmp.dump*.vtk becomes tmp.dump0.vtk, tmp.dump10000.vtk, -tmp.dump20000.vtk, etc. Note that the "dump_modify pad"_dump_modify.html -command can be used to insure all timestep numbers are the same length -(e.g. 00010), which can make it easier to read a series of dump files -in order with some post-processing tools. - -If a "%" character appears in the filename, then each of P processors -writes a portion of the dump file, and the "%" character is replaced -with the processor ID from 0 to P-1 preceded by an underscore character. -For example, tmp.dump%.vtp becomes tmp.dump_0.vtp, tmp.dump_1.vtp, ... -tmp.dump_P-1.vtp, etc. This creates smaller files and can be a fast -mode of output on parallel machines that support parallel I/O for output. - -By default, P = the number of processors meaning one file per -processor, but P can be set to a smaller value via the {nfile} or -{fileper} keywords of the "dump_modify"_dump_modify.html command. -These options can be the most efficient way of writing out dump files -when running on large numbers of processors. - -For the legacy VTK format "%" is ignored and P = 1, i.e., only -processor 0 does write files. - -Note that using the "*" and "%" characters together can produce a -large number of small dump files! - -If {dump_modify binary} is used, the dump file (or files, if "*" or -"%" is also used) is written in binary format. A binary dump file -will be about the same size as a text version, but will typically -write out much faster. - -:line - -This section explains the atom attributes that can be specified as -part of the {custom/vtk} style. - -The {id}, {mol}, {proc}, {procp1}, {type}, {element}, {mass}, {vx}, -{vy}, {vz}, {fx}, {fy}, {fz}, {q} attributes are self-explanatory. - -{Id} is the atom ID. {Mol} is the molecule ID, included in the data -file for molecular systems. {Proc} is the ID of the processor (0 to -Nprocs-1) that currently owns the atom. {Procp1} is the proc ID+1, -which can be convenient in place of a {type} attribute (1 to Ntypes) -for coloring atoms in a visualization program. {Type} is the atom -type (1 to Ntypes). {Element} is typically the chemical name of an -element, which you must assign to each type via the "dump_modify -element"_dump_modify.html command. More generally, it can be any -string you wish to associated with an atom type. {Mass} is the atom -mass. {Vx}, {vy}, {vz}, {fx}, {fy}, {fz}, and {q} are components of -atom velocity and force and atomic charge. - -There are several options for outputting atom coordinates. The {x}, -{y}, {z} attributes write atom coordinates "unscaled", in the -appropriate distance "units"_units.html (Angstroms, sigma, etc). Use -{xs}, {ys}, {zs} if you want the coordinates "scaled" to the box size, -so that each value is 0.0 to 1.0. If the simulation box is triclinic -(tilted), then all atom coords will still be between 0.0 and 1.0. -I.e. actual unscaled (x,y,z) = xs*A + ys*B + zs*C, where (A,B,C) are -the non-orthogonal vectors of the simulation box edges, as discussed -in "Section 6.12"_Section_howto.html#howto_12. - -Use {xu}, {yu}, {zu} if you want the coordinates "unwrapped" by the -image flags for each atom. Unwrapped means that if the atom has -passed thru a periodic boundary one or more times, the value is -printed for what the coordinate would be if it had not been wrapped -back into the periodic box. Note that using {xu}, {yu}, {zu} means -that the coordinate values may be far outside the box bounds printed -with the snapshot. Using {xsu}, {ysu}, {zsu} is similar to using -{xu}, {yu}, {zu}, except that the unwrapped coordinates are scaled by -the box size. Atoms that have passed through a periodic boundary will -have the corresponding coordinate increased or decreased by 1.0. - -The image flags can be printed directly using the {ix}, {iy}, {iz} -attributes. For periodic dimensions, they specify which image of the -simulation box the atom is considered to be in. An image of 0 means -it is inside the box as defined. A value of 2 means add 2 box lengths -to get the true value. A value of -1 means subtract 1 box length to -get the true value. LAMMPS updates these flags as atoms cross -periodic boundaries during the simulation. - -The {mux}, {muy}, {muz} attributes are specific to dipolar systems -defined with an atom style of {dipole}. They give the orientation of -the atom's point dipole moment. The {mu} attribute gives the -magnitude of the atom's dipole moment. - -The {radius} and {diameter} attributes are specific to spherical -particles that have a finite size, such as those defined with an atom -style of {sphere}. - -The {omegax}, {omegay}, and {omegaz} attributes are specific to -finite-size spherical particles that have an angular velocity. Only -certain atom styles, such as {sphere} define this quantity. - -The {angmomx}, {angmomy}, and {angmomz} attributes are specific to -finite-size aspherical particles that have an angular momentum. Only -the {ellipsoid} atom style defines this quantity. - -The {tqx}, {tqy}, {tqz} attributes are for finite-size particles that -can sustain a rotational torque due to interactions with other -particles. - -The {c_ID} and {c_ID\[I\]} attributes allow per-atom vectors or arrays -calculated by a "compute"_compute.html to be output. The ID in the -attribute should be replaced by the actual ID of the compute that has -been defined previously in the input script. See the -"compute"_compute.html command for details. There are computes for -calculating the per-atom energy, stress, centro-symmetry parameter, -and coordination number of individual atoms. - -Note that computes which calculate global or local quantities, as -opposed to per-atom quantities, cannot be output in a dump custom/vtk -command. Instead, global quantities can be output by the -"thermo_style custom"_thermo_style.html command, and local quantities -can be output by the dump local command. - -If {c_ID} is used as a attribute, then the per-atom vector calculated -by the compute is printed. If {c_ID\[I\]} is used, then I must be in -the range from 1-M, which will print the Ith column of the per-atom -array with M columns calculated by the compute. See the discussion -above for how I can be specified with a wildcard asterisk to -effectively specify multiple values. - -The {f_ID} and {f_ID\[I\]} attributes allow vector or array per-atom -quantities calculated by a "fix"_fix.html to be output. The ID in the -attribute should be replaced by the actual ID of the fix that has been -defined previously in the input script. The "fix -ave/atom"_fix_ave_atom.html command is one that calculates per-atom -quantities. Since it can time-average per-atom quantities produced by -any "compute"_compute.html, "fix"_fix.html, or atom-style -"variable"_variable.html, this allows those time-averaged results to -be written to a dump file. - -If {f_ID} is used as a attribute, then the per-atom vector calculated -by the fix is printed. If {f_ID\[I\]} is used, then I must be in the -range from 1-M, which will print the Ith column of the per-atom array -with M columns calculated by the fix. See the discussion above for -how I can be specified with a wildcard asterisk to effectively specify -multiple values. - -The {v_name} attribute allows per-atom vectors calculated by a -"variable"_variable.html to be output. The name in the attribute -should be replaced by the actual name of the variable that has been -defined previously in the input script. Only an atom-style variable -can be referenced, since it is the only style that generates per-atom -values. Variables of style {atom} can reference individual atom -attributes, per-atom atom attributes, thermodynamic keywords, or -invoke other computes, fixes, or variables when they are evaluated, so -this is a very general means of creating quantities to output to a -dump file. - -The {d_name} and {i_name} attributes allow to output custom per atom -floating point or integer properties that are managed by -"fix property/atom"_fix_property_atom.html. - -See "Section 10"_Section_modify.html of the manual for information -on how to add new compute and fix styles to LAMMPS to calculate -per-atom quantities which could then be output into dump files. - -:line - -[Restrictions:] - -The {custom/vtk} style does not support writing of gzipped dump files. - -The {custom/vtk} dump style is part of the USER-VTK package. It is -only enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#start_3 section for more info. - -To use this dump style, you also must link to the VTK library. See -the info in lib/vtk/README and insure the Makefile.lammps file in that -directory is appropriate for your machine. - -The {custom/vtk} dump style neither supports buffering nor custom -format strings. - -[Related commands:] - -"dump"_dump.html, "dump image"_dump_image.html, -"dump_modify"_dump_modify.html, "undump"_undump.html - -[Default:] - -By default, files are written in ASCII format. If the file extension -is not one of .vtk, .vtp or .vtu, the legacy VTK file format is used. - diff --git a/doc/src/dump_h5md.txt b/doc/src/dump_h5md.txt index d797e633e6..93c87d85b7 100644 --- a/doc/src/dump_h5md.txt +++ b/doc/src/dump_h5md.txt @@ -17,9 +17,7 @@ group-ID = ID of the group of atoms to be imaged :l h5md = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) :l N = dump every this many timesteps :l file.h5 = name of file to write to :l -args = list of data elements to dump, with their dump "subintervals". -At least one element must be given and image may only be present if -position is specified first. :l +args = list of data elements to dump, with their dump "subintervals" position options image velocity options @@ -29,15 +27,17 @@ position is specified first. :l box value = {yes} or {no} create_group value = {yes} or {no} author value = quoted string :pre +:ule -For the elements {position}, {velocity}, {force} and {species}, one -may specify a sub-interval to write the data only every N_element -iterations of the dump (i.e. every N*N_element time steps). This is -specified by the option +Note that at least one element must be specified and image may only be +present if position is specified first. - every N_element :pre +For the elements {position}, {velocity}, {force} and {species}, a +sub-interval may be specified to write the data only every N_element +iterations of the dump (i.e. every N*N_element time steps). This is +specified by this option directly following the element declaration: -that follows directly the element declaration. +every N_element :pre :ule diff --git a/doc/src/dump_nc.txt b/doc/src/dump_nc.txt deleted file mode 100644 index 0b81ee6a32..0000000000 --- a/doc/src/dump_nc.txt +++ /dev/null @@ -1,66 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -dump nc command :h3 -dump nc/mpiio command :h3 - -[Syntax:] - -dump ID group-ID nc N file.nc args -dump ID group-ID nc/mpiio N file.nc args :pre - -ID = user-assigned name for the dump :ulb,l -group-ID = ID of the group of atoms to be imaged :l -{nc} or {nc/mpiio} = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) :l -N = dump every this many timesteps :l -file.nc = name of file to write to :l -args = list of per atom data elements to dump, same as for the 'custom' dump style. :l,ule - -[Examples:] - -dump 1 all nc 100 traj.nc type x y z vx vy vz -dump_modify 1 append yes at -1 global c_thermo_pe c_thermo_temp c_thermo_press :pre - -dump 1 all nc/mpiio 1000 traj.nc id type x y z :pre - -[Description:] - -Dump a snapshot of atom coordinates every N timesteps in Amber-style -NetCDF file format. NetCDF files are binary, portable and -self-describing. This dump style will write only one file on the root -node. The dump style {nc} uses the "standard NetCDF -library"_netcdf-home all data is collected on one processor and then -written to the dump file. Dump style {nc/mpiio} used the "parallel -NetCDF library"_pnetcdf-home and MPI-IO; it has better performance on -a larger number of processors. Note that 'nc' outputs all atoms sorted -by atom tag while 'nc/mpiio' outputs in order of the MPI rank. - -In addition to per-atom data, also global (i.e. not per atom, but per -frame) quantities can be included in the dump file. This can be -variables, output from computes or fixes data prefixed with v_, c_ and -f_, respectively. These properties are included via -"dump_modify"_dump_modify.html {global}. - -:link(netcdf-home,http://www.unidata.ucar.edu/software/netcdf/) -:link(pnetcdf-home,http://trac.mcs.anl.gov/projects/parallel-netcdf/) - -:line - -[Restrictions:] - -The {nc} and {nc/mpiio} dump styles are part of the USER-NC-DUMP -package. It is only enabled if LAMMPS was built with that -package. See the "Making LAMMPS"_Section_start.html#start_3 section -for more info. - -:line - -[Related commands:] - -"dump"_dump.html, "dump_modify"_dump_modify.html, "undump"_undump.html - diff --git a/doc/src/dump_netcdf.txt b/doc/src/dump_netcdf.txt new file mode 100644 index 0000000000..4e82656698 --- /dev/null +++ b/doc/src/dump_netcdf.txt @@ -0,0 +1,82 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +dump netcdf command :h3 +dump netcdf/mpiio command :h3 + +[Syntax:] + +dump ID group-ID netcdf N file args +dump ID group-ID netcdf/mpiio N file args :pre + +ID = user-assigned name for the dump :ulb,l +group-ID = ID of the group of atoms to be imaged :l +{netcdf} or {netcdf/mpiio} = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) :l +N = dump every this many timesteps :l +file = name of file to write dump info to :l +args = list of atom attributes, same as for "dump_style custom"_dump.html :l,ule + +[Examples:] + +dump 1 all netcdf 100 traj.nc type x y z vx vy vz +dump_modify 1 append yes at -1 global c_thermo_pe c_thermo_temp c_thermo_press +dump 1 all netcdf/mpiio 1000 traj.nc id type x y z :pre + +[Description:] + +Dump a snapshot of atom coordinates every N timesteps in Amber-style +NetCDF file format. NetCDF files are binary, portable and +self-describing. This dump style will write only one file on the root +node. The dump style {netcdf} uses the "standard NetCDF +library"_netcdf-home. All data is collected on one processor and then +written to the dump file. Dump style {netcdf/mpiio} uses the +"parallel NetCDF library"_pnetcdf-home and MPI-IO to write to the dump +file in parallel; it has better performance on a larger number of +processors. Note that style {netcdf} outputs all atoms sorted by atom +tag while style {netcdf/mpiio} outputs atoms in order of their MPI +rank. + +NetCDF files can be directly visualized via the following tools: + +Ovito (http://www.ovito.org/). Ovito supports the AMBER convention and +all of the above extensions. :ule,b + +VMD (http://www.ks.uiuc.edu/Research/vmd/). :l + +AtomEye (http://www.libatoms.org/). The libAtoms version of AtomEye +contains a NetCDF reader that is not present in the standard +distribution of AtomEye. :l,ule + +In addition to per-atom data, global data can be included in the dump +file, which are the kinds of values output by the +"thermo_style"_thermo_style.html command . See "Section howto +6.15"_Section_howto.html#howto_15 for an explanation of per-atom +versus global data. The global output written into the dump file can +be from computes, fixes, or variables, by prefixing the compute/fix ID +or variable name with "c_" or "f_" or "v_" respectively, as in the +example above. These global values are specified via the "dump_modify +global"_dump_modify.html command. + +:link(netcdf-home,http://www.unidata.ucar.edu/software/netcdf/) +:link(pnetcdf-home,http://trac.mcs.anl.gov/projects/parallel-netcdf/) + +:line + +[Restrictions:] + +The {netcdf} and {netcdf/mpiio} dump styles are part of the +USER-NETCDF package. They are only enabled if LAMMPS was built with +that package. See the "Making LAMMPS"_Section_start.html#start_3 +section for more info. + +:line + +[Related commands:] + +"dump"_dump.html, "dump_modify"_dump_modify.html, "undump"_undump.html + diff --git a/doc/src/dump_vtk.txt b/doc/src/dump_vtk.txt new file mode 100644 index 0000000000..21502e7f49 --- /dev/null +++ b/doc/src/dump_vtk.txt @@ -0,0 +1,179 @@ + "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +dump vtk command :h3 + +[Syntax:] + +dump ID group-ID vtk N file args :pre + +ID = user-assigned name for the dump +group-ID = ID of the group of atoms to be dumped +vtk = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) +N = dump every this many timesteps +file = name of file to write dump info to +args = same as arguments for "dump_style custom"_dump.html :ul + +[Examples:] + +dump dmpvtk all vtk 100 dump*.myforce.vtk id type vx fx +dump dmpvtp flow vtk 100 dump*.%.displace.vtp id type c_myD\[1\] c_myD\[2\] c_myD\[3\] v_ke :pre + +[Description:] + +Dump a snapshot of atom quantities to one or more files every N +timesteps in a format readable by the "VTK visualization +toolkit"_http://www.vtk.org or other visualization tools that use it, +e.g. "ParaView"_http://www.paraview.org. The timesteps on which dump +output is written can also be controlled by a variable; see the +"dump_modify every"_dump_modify.html command for details. + +This dump style is similar to "dump_style custom"_dump.html but uses +the VTK library to write data to VTK simple legacy or XML format +depending on the filename extension specified for the dump file. This +can be either {*.vtk} for the legacy format or {*.vtp} and {*.vtu}, +respectively, for XML format; see the "VTK +homepage"_http://www.vtk.org/VTK/img/file-formats.pdf for a detailed +description of these formats. Since this naming convention conflicts +with the way binary output is usually specified (see below), the +"dump_modify binary"_dump_modify.html command allows setting of a +binary option for this dump style explicitly. + +Only information for atoms in the specified group is dumped. The +"dump_modify thresh and region"_dump_modify.html commands can also +alter what atoms are included; see details below. + +As described below, special characters ("*", "%") in the filename +determine the kind of output. + +IMPORTANT NOTE: Because periodic boundary conditions are enforced only +on timesteps when neighbor lists are rebuilt, the coordinates of an +atom written to a dump file may be slightly outside the simulation +box. + +IMPORTANT NOTE: Unless the "dump_modify sort"_dump_modify.html option +is invoked, the lines of atom information written to dump files will +be in an indeterminate order for each snapshot. This is even true +when running on a single processor, if the "atom_modify +sort"_atom_modify.html option is on, which it is by default. In this +case atoms are re-ordered periodically during a simulation, due to +spatial sorting. It is also true when running in parallel, because +data for a single snapshot is collected from multiple processors, each +of which owns a subset of the atoms. + +For the {vtk} style, sorting is off by default. See the +"dump_modify"_dump_modify.html doc page for details. + +:line + +The dimensions of the simulation box are written to a separate file +for each snapshot (either in legacy VTK or XML format depending on the +format of the main dump file) with the suffix {_boundingBox} appended +to the given dump filename. + +For an orthogonal simulation box this information is saved as a +rectilinear grid (legacy .vtk or .vtr XML format). + +Triclinic simulation boxes (non-orthogonal) are saved as +hexahedrons in either legacy .vtk or .vtu XML format. + +Style {vtk} allows you to specify a list of atom attributes to be +written to the dump file for each atom. The list of possible attributes +is the same as for the "dump_style custom"_dump.html command; see +its doc page for a listing and an explanation of each attribute. + +NOTE: Since position data is required to write VTK files the atom +attributes "x y z" do not have to be specified explicitly; they will +be included in the dump file regardless. Also, in contrast to the +{custom} style, the specified {vtk} attributes are rearranged to +ensure correct ordering of vector components (except for computes and +fixes - these have to be given in the right order) and duplicate +entries are removed. + +The VTK format uses a single snapshot of the system per file, thus +a wildcard "*" must be included in the filename, as discussed below. +Otherwise the dump files will get overwritten with the new snapshot +each time. + +:line + +Dumps are performed on timesteps that are a multiple of N (including +timestep 0) and on the last timestep of a minimization if the +minimization converges. Note that this means a dump will not be +performed on the initial timestep after the dump command is invoked, +if the current timestep is not a multiple of N. This behavior can be +changed via the "dump_modify first"_dump_modify.html command, which +can also be useful if the dump command is invoked after a minimization +ended on an arbitrary timestep. N can be changed between runs by +using the "dump_modify every"_dump_modify.html command. +The "dump_modify every"_dump_modify.html command +also allows a variable to be used to determine the sequence of +timesteps on which dump files are written. In this mode a dump on the +first timestep of a run will also not be written unless the +"dump_modify first"_dump_modify.html command is used. + +Dump filenames can contain two wildcard characters. If a "*" +character appears in the filename, then one file per snapshot is +written and the "*" character is replaced with the timestep value. +For example, tmp.dump*.vtk becomes tmp.dump0.vtk, tmp.dump10000.vtk, +tmp.dump20000.vtk, etc. Note that the "dump_modify pad"_dump_modify.html +command can be used to insure all timestep numbers are the same length +(e.g. 00010), which can make it easier to read a series of dump files +in order with some post-processing tools. + +If a "%" character appears in the filename, then each of P processors +writes a portion of the dump file, and the "%" character is replaced +with the processor ID from 0 to P-1 preceded by an underscore character. +For example, tmp.dump%.vtp becomes tmp.dump_0.vtp, tmp.dump_1.vtp, ... +tmp.dump_P-1.vtp, etc. This creates smaller files and can be a fast +mode of output on parallel machines that support parallel I/O for output. + +By default, P = the number of processors meaning one file per +processor, but P can be set to a smaller value via the {nfile} or +{fileper} keywords of the "dump_modify"_dump_modify.html command. +These options can be the most efficient way of writing out dump files +when running on large numbers of processors. + +For the legacy VTK format "%" is ignored and P = 1, i.e., only +processor 0 does write files. + +Note that using the "*" and "%" characters together can produce a +large number of small dump files! + +If {dump_modify binary} is used, the dump file (or files, if "*" or +"%" is also used) is written in binary format. A binary dump file +will be about the same size as a text version, but will typically +write out much faster. + +:line + +[Restrictions:] + +The {vtk} style does not support writing of gzipped dump files. + +The {vtk} dump style is part of the USER-VTK package. It is +only enabled if LAMMPS was built with that package. See the "Making +LAMMPS"_Section_start.html#start_3 section for more info. + +To use this dump style, you also must link to the VTK library. See +the info in lib/vtk/README and insure the Makefile.lammps file in that +directory is appropriate for your machine. + +The {vtk} dump style supports neither buffering or custom format +strings. + +[Related commands:] + +"dump"_dump.html, "dump image"_dump_image.html, +"dump_modify"_dump_modify.html, "undump"_undump.html + +[Default:] + +By default, files are written in ASCII format. If the file extension +is not one of .vtk, .vtp or .vtu, the legacy VTK file format is used. + diff --git a/doc/src/fix_cmap.txt b/doc/src/fix_cmap.txt index 5fcac589be..2b14a20c1d 100644 --- a/doc/src/fix_cmap.txt +++ b/doc/src/fix_cmap.txt @@ -87,8 +87,11 @@ the note below about how to include the CMAP energy when performing an [Restart, fix_modify, output, run start/stop, minimize info:] -No information about this fix is written to "binary restart -files"_restart.html. +This fix writes the list of CMAP crossterms to "binary restart +files"_restart.html. See the "read_restart"_read_restart.html command +for info on how to re-specify a fix in an input script that reads a +restart file, so that the operation of the fix continues in an +uninterrupted fashion. The "fix_modify"_fix_modify.html {energy} option is supported by this fix to add the potential "energy" of the CMAP interactions system's diff --git a/doc/src/fix_gcmc.txt b/doc/src/fix_gcmc.txt index 53973cdfb8..7ac607a2f1 100644 --- a/doc/src/fix_gcmc.txt +++ b/doc/src/fix_gcmc.txt @@ -317,7 +317,7 @@ solution is to start a new simulation after the equilibrium density has been reached. With some pair_styles, such as "Buckingham"_pair_buck.html, -"Born-Mayer-Huggins"_pair_born.html and "ReaxFF"_pair_reax_c.html, two +"Born-Mayer-Huggins"_pair_born.html and "ReaxFF"_pair_reaxc.html, two atoms placed close to each other may have an arbitrary large, negative potential energy due to the functional form of the potential. While these unphysical configurations are inaccessible to typical dynamical diff --git a/doc/src/fix_qeq.txt b/doc/src/fix_qeq.txt index f9c8ecde63..22f4766896 100644 --- a/doc/src/fix_qeq.txt +++ b/doc/src/fix_qeq.txt @@ -74,7 +74,7 @@ NOTE: The "fix qeq/comb"_fix_qeq_comb.html command must still be used to perform charge equilibration with the "COMB potential"_pair_comb.html. The "fix qeq/reax"_fix_qeq_reax.html command can be used to perform charge equilibration with the "ReaxFF -force field"_pair_reax_c.html, although fix qeq/shielded yields the +force field"_pair_reaxc.html, although fix qeq/shielded yields the same results as fix qeq/reax if {Nevery}, {cutoff}, and {tolerance} are the same. Eventually the fix qeq/reax command will be deprecated. @@ -116,7 +116,7 @@ the shielded Coulomb is given by equation (13) of the "ReaxFF force field"_#vanDuin paper. The shielding accounts for charge overlap between charged particles at small separation. This style is the same as "fix qeq/reax"_fix_qeq_reax.html, and can be used with "pair_style -reax/c"_pair_reax_c.html. Only the {chi}, {eta}, and {gamma} +reax/c"_pair_reaxc.html. Only the {chi}, {eta}, and {gamma} parameters from the {qfile} file are used. This style solves partial charges on atoms via the matrix inversion method. A tolerance of 1.0e-6 is usually a good number. diff --git a/doc/src/fix_qeq_reax.txt b/doc/src/fix_qeq_reax.txt index 76c95e1117..aed043f6c0 100644 --- a/doc/src/fix_qeq_reax.txt +++ b/doc/src/fix_qeq_reax.txt @@ -30,7 +30,7 @@ fix 1 all qeq/reax 1 0.0 10.0 1.0e-6 param.qeq :pre Perform the charge equilibration (QEq) method as described in "(Rappe and Goddard)"_#Rappe2 and formulated in "(Nakano)"_#Nakano2. It is typically used in conjunction with the ReaxFF force field model as -implemented in the "pair_style reax/c"_pair_reax_c.html command, but +implemented in the "pair_style reax/c"_pair_reaxc.html command, but it can be used with any potential in LAMMPS, so long as it defines and uses charges on each atom. The "fix qeq/comb"_fix_qeq_comb.html command should be used to perform charge equilibration with the "COMB @@ -42,7 +42,7 @@ The QEq method minimizes the electrostatic energy of the system by adjusting the partial charge on individual atoms based on interactions with their neighbors. It requires some parameters for each atom type. If the {params} setting above is the word "reax/c", then these are -extracted from the "pair_style reax/c"_pair_reax_c.html command and +extracted from the "pair_style reax/c"_pair_reaxc.html command and the ReaxFF force field file it reads in. If a file name is specified for {params}, then the parameters are taken from the specified file and the file must contain one line for each atom type. The latter @@ -106,7 +106,7 @@ be used for periodic cell dimensions less than 10 angstroms. [Related commands:] -"pair_style reax/c"_pair_reax_c.html +"pair_style reax/c"_pair_reaxc.html [Default:] none diff --git a/doc/src/fix_reax_bonds.txt b/doc/src/fix_reax_bonds.txt index 1fd1b3ca5a..d3f1087094 100644 --- a/doc/src/fix_reax_bonds.txt +++ b/doc/src/fix_reax_bonds.txt @@ -28,7 +28,7 @@ fix 1 all reax/c/bonds 100 bonds.reaxc :pre Write out the bond information computed by the ReaxFF potential specified by "pair_style reax"_pair_reax.html or "pair_style -reax/c"_pair_reax_c.html in the exact same format as the original +reax/c"_pair_reaxc.html in the exact same format as the original stand-alone ReaxFF code of Adri van Duin. The bond information is written to {filename} on timesteps that are multiples of {Nevery}, including timestep 0. For time-averaged chemical species analysis, @@ -80,7 +80,7 @@ reax"_pair_reax.html be invoked. This fix is part of the REAX package. It is only enabled if LAMMPS was built with that package, which also requires the REAX library be built and linked with LAMMPS. The fix reax/c/bonds command requires that the "pair_style -reax/c"_pair_reax_c.html be invoked. This fix is part of the +reax/c"_pair_reaxc.html be invoked. This fix is part of the USER-REAXC package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. @@ -88,6 +88,6 @@ for more info. [Related commands:] "pair_style reax"_pair_reax.html, "pair_style -reax/c"_pair_reax_c.html, "fix reax/c/species"_fix_reaxc_species.html +reax/c"_pair_reaxc.html, "fix reax/c/species"_fix_reaxc_species.html [Default:] none diff --git a/doc/src/fix_reaxc_species.txt b/doc/src/fix_reaxc_species.txt index 00db91900e..d43a338a66 100644 --- a/doc/src/fix_reaxc_species.txt +++ b/doc/src/fix_reaxc_species.txt @@ -41,7 +41,7 @@ fix 1 all reax/c/species 1 100 100 species.out element Au O H position 1000 AuOH [Description:] Write out the chemical species information computed by the ReaxFF -potential specified by "pair_style reax/c"_pair_reax_c.html. +potential specified by "pair_style reax/c"_pair_reaxc.html. Bond-order values (either averaged or instantaneous, depending on value of {Nrepeat}) are used to determine chemical bonds. Every {Nfreq} timesteps, chemical species information is written to @@ -65,7 +65,7 @@ symbol printed for each LAMMPS atom type. The number of symbols must match the number of LAMMPS atom types and each symbol must consist of 1 or 2 alphanumeric characters. Normally, these symbols should be chosen to match the chemical identity of each LAMMPS atom type, as -specified using the "reax/c pair_coeff"_pair_reax_c.html command and +specified using the "reax/c pair_coeff"_pair_reaxc.html command and the ReaxFF force field file. The optional keyword {position} writes center-of-mass positions of @@ -158,8 +158,8 @@ more instructions on how to use the accelerated styles effectively. [Restrictions:] The fix species currently only works with -"pair_style reax/c"_pair_reax_c.html and it requires that the "pair_style -reax/c"_pair_reax_c.html be invoked. This fix is part of the +"pair_style reax/c"_pair_reaxc.html and it requires that the "pair_style +reax/c"_pair_reaxc.html be invoked. This fix is part of the USER-REAXC package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. @@ -170,7 +170,7 @@ It should be possible to extend it to other reactive pair_styles (such as [Related commands:] -"pair_style reax/c"_pair_reax_c.html, "fix +"pair_style reax/c"_pair_reaxc.html, "fix reax/bonds"_fix_reax_bonds.html [Default:] diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 6c68955bc9..b2b42aa7e6 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -469,7 +469,7 @@ pair_peri.html pair_polymorphic.html pair_quip.html pair_reax.html -pair_reax_c.html +pair_reaxc.html pair_resquared.html pair_sdk.html pair_smd_hertz.html diff --git a/doc/src/pair_hybrid.txt b/doc/src/pair_hybrid.txt index 7ef54e7f07..afef0c4c5f 100644 --- a/doc/src/pair_hybrid.txt +++ b/doc/src/pair_hybrid.txt @@ -73,7 +73,7 @@ pair_coeff command to assign parameters for the different type pairs. NOTE: There are two exceptions to this option to list an individual pair style multiple times. The first is for pair styles implemented as Fortran libraries: "pair_style meam"_pair_meam.html and "pair_style -reax"_pair_reax.html ("pair_style reax/c"_pair_reax_c.html is OK). +reax"_pair_reax.html ("pair_style reax/c"_pair_reaxc.html is OK). This is because unlike a C++ class, they can not be instantiated multiple times, due to the manner in which they were coded in Fortran. The second is for GPU-enabled pair styles in the GPU package. This is diff --git a/doc/src/pair_reax.txt b/doc/src/pair_reax.txt index 7215c12cee..1d13f93706 100644 --- a/doc/src/pair_reax.txt +++ b/doc/src/pair_reax.txt @@ -36,7 +36,7 @@ supplemental information of the following paper: the most up-to-date version of ReaxFF as of summer 2010. WARNING: pair style reax is now deprecated and will soon be retired. Users -should switch to "pair_style reax/c"_pair_reax_c.html. The {reax} style +should switch to "pair_style reax/c"_pair_reaxc.html. The {reax} style differs from the {reax/c} style in the lo-level implementation details. The {reax} style is a Fortran library, linked to LAMMPS. The {reax/c} style was initially @@ -82,7 +82,7 @@ be specified. Two examples using {pair_style reax} are provided in the examples/reax sub-directory, along with corresponding examples for -"pair_style reax/c"_pair_reax_c.html. Note that while the energy and force +"pair_style reax/c"_pair_reaxc.html. Note that while the energy and force calculated by both of these pair styles match very closely, the contributions due to the valence angles differ slightly due to the fact that with {pair_style reax/c} the default value of {thb_cutoff_sq} @@ -201,7 +201,7 @@ appropriate units if your simulation doesn't use "real" units. [Related commands:] -"pair_coeff"_pair_coeff.html, "pair_style reax/c"_pair_reax_c.html, +"pair_coeff"_pair_coeff.html, "pair_style reax/c"_pair_reaxc.html, "fix_reax_bonds"_fix_reax_bonds.html [Default:] diff --git a/doc/src/pair_reax_c.txt b/doc/src/pair_reaxc.txt similarity index 96% rename from doc/src/pair_reax_c.txt rename to doc/src/pair_reaxc.txt index c1d719d22e..76a8e6fd5c 100644 --- a/doc/src/pair_reax_c.txt +++ b/doc/src/pair_reaxc.txt @@ -17,6 +17,7 @@ cfile = NULL or name of a control file :ulb,l zero or more keyword/value pairs may be appended :l keyword = {checkqeq} or {lgvdw} or {safezone} or {mincap} {checkqeq} value = {yes} or {no} = whether or not to require qeq/reax fix + {enobonds} value = {yes} or {no} = whether or not to tally energy of atoms with no bonds {lgvdw} value = {yes} or {no} = whether or not to use a low gradient vdW correction {safezone} = factor used for array allocation {mincap} = minimum size for array allocation :pre @@ -127,6 +128,13 @@ recommended value for parameter {thb} is 0.01, which can be set in the control file. Note: Force field files are different for the original or lg corrected pair styles, using wrong ffield file generates an error message. +Using the optional keyword {enobonds} with the value {yes}, the energy +of atoms with no bonds (i.e. isolated atoms) is included in the total +potential energy and the per-atom energy of that atom. If the value +{no} is specified then the energy of atoms with no bonds is set to zero. +The latter behavior is usual not desired, as it causes discontinuities +in the potential energy when the bonding of an atom drops to zero. + Optional keywords {safezone} and {mincap} are used for allocating reax/c arrays. Increasing these values can avoid memory problems, such as segmentation faults and bondchk failed errors, that could occur under @@ -331,7 +339,7 @@ reax"_pair_reax.html [Default:] -The keyword defaults are checkqeq = yes, lgvdw = no, safezone = 1.2, +The keyword defaults are checkqeq = yes, enobonds = yes, lgvdw = no, safezone = 1.2, mincap = 50. :line diff --git a/doc/src/pairs.txt b/doc/src/pairs.txt index 8694747dad..0898906e7c 100644 --- a/doc/src/pairs.txt +++ b/doc/src/pairs.txt @@ -73,7 +73,7 @@ Pair Styles :h1 pair_polymorphic pair_quip pair_reax - pair_reax_c + pair_reaxc pair_resquared pair_sdk pair_smd_hertz diff --git a/examples/USER/flow_gauss/README b/examples/USER/misc/flow_gauss/README similarity index 100% rename from examples/USER/flow_gauss/README rename to examples/USER/misc/flow_gauss/README diff --git a/examples/USER/flow_gauss/in.GD b/examples/USER/misc/flow_gauss/in.GD similarity index 100% rename from examples/USER/flow_gauss/in.GD rename to examples/USER/misc/flow_gauss/in.GD diff --git a/examples/mscg/log.31Mar17.g++.1 b/examples/mscg/log.31Mar17.g++.1 new file mode 100644 index 0000000000..c67bc483db --- /dev/null +++ b/examples/mscg/log.31Mar17.g++.1 @@ -0,0 +1,145 @@ +LAMMPS (13 Apr 2017) +units real +atom_style full +pair_style zero 10.0 + +read_data data.meoh + orthogonal box = (-20.6917 -20.6917 -20.6917) to (20.6917 20.6917 20.6917) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 1000 atoms + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors +pair_coeff * * + +thermo 1 +thermo_style custom step + +# Test 1a: range finder functionality +fix 1 all mscg 1 range on +rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.794 | 5.794 | 5.794 Mbytes +Step + 0 + 250 + 500 + 750 + 1000 + 1250 + 1500 + 1750 + 2000 + 2250 + 2500 + 2750 + 3000 + 3250 + 3500 + 3750 + 4000 + 4250 + 4500 +Loop time of 0.581537 on 1 procs for 19 steps with 1000 atoms + +Performance: 2.823 ns/day, 8.502 hours/ns, 32.672 timesteps/s +99.2% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 0.5815 | | |100.00 + +Nlocal: 1000 ave 1000 max 1000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 2934 ave 2934 max 2934 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 50654 ave 50654 max 50654 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 50654 +Ave neighs/atom = 50.654 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 +print "TEST_1a mscg range finder" +TEST_1a mscg range finder +unfix 1 + +# Test 1b: force matching functionality +fix 1 all mscg 1 +rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz +Per MPI rank memory allocation (min/avg/max) = 5.794 | 5.794 | 5.794 Mbytes +Step + 0 + 250 + 500 + 750 + 1000 + 1250 + 1500 + 1750 + 2000 + 2250 + 2500 + 2750 + 3000 + 3250 + 3500 + 3750 + 4000 + 4250 + 4500 +Loop time of 0.841917 on 1 procs for 19 steps with 1000 atoms + +Performance: 1.950 ns/day, 12.309 hours/ns, 22.568 timesteps/s +99.8% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 0.8419 | | |100.00 + +Nlocal: 1000 ave 1000 max 1000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 2934 ave 2934 max 2934 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 50654 ave 50654 max 50654 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 50654 +Ave neighs/atom = 50.654 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 +print "TEST_1b mscg force matching" +TEST_1b mscg force matching + +print TEST_DONE +TEST_DONE +Total wall time: 0:00:01 diff --git a/lib/Install.py b/lib/Install.py new file mode 100644 index 0000000000..18b426f928 --- /dev/null +++ b/lib/Install.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +# install.py tool to do a generic build of a library +# soft linked to by many of the lib/Install.py files +# used to automate the steps described in the corresponding lib/README + +import sys,commands,os + +# help message + +help = """ +Syntax: python Install.py -m machine -e suffix + specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" + machine = suffix of a lib/Makefile.* file + -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix + does not alter existing Makefile.machine +""" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +machine = None +extraflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-m": + if iarg+2 > nargs: error() + machine = args[iarg+1] + iarg += 2 + elif args[iarg] == "-e": + if iarg+2 > nargs: error() + extraflag = 1 + suffix = args[iarg+1] + iarg += 2 + else: error() + +# set lib from working dir + +cwd = os.getcwd() +lib = os.path.basename(cwd) + +# create Makefile.auto as copy of Makefile.machine +# reset EXTRAMAKE if requested + +if not os.path.exists("Makefile.%s" % machine): + error("lib/%s/Makefile.%s does not exist" % (lib,machine)) + +lines = open("Makefile.%s" % machine,'r').readlines() +fp = open("Makefile.auto",'w') + +for line in lines: + words = line.split() + if len(words) == 3 and extraflag and \ + words[0] == "EXTRAMAKE" and words[1] == '=': + line = line.replace(words[2],"Makefile.lammps.%s" % suffix) + print >>fp,line, + +fp.close() + +# make the library via Makefile.auto + +print "Building lib%s.a ..." % lib +cmd = "make -f Makefile.auto clean; make -f Makefile.auto" +txt = commands.getoutput(cmd) +print txt + +if os.path.exists("lib%s.a" % lib): print "Build was successful" +else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) +if not os.path.exists("Makefile.lammps"): + print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/README b/lib/README index 72ebb0a5f7..3c8f46dd0a 100644 --- a/lib/README +++ b/lib/README @@ -33,14 +33,16 @@ kokkos Kokkos package for GPU and many-core acceleration from Kokkos development team (Sandia) linalg set of BLAS and LAPACK routines needed by USER-ATC package from Axel Kohlmeyer (Temple U) -poems POEMS rigid-body integration package, POEMS package - from Rudranarayan Mukherjee (RPI) meam modified embedded atom method (MEAM) potential, MEAM package from Greg Wagner (Sandia) molfile hooks to VMD molfile plugins, used by the USER-MOLFILE package from Axel Kohlmeyer (Temple U) and the VMD development team mscg hooks to the MSCG library, used by fix_mscg command from Jacob Wagner and Greg Voth group (U Chicago) +netcdf hooks to a NetCDF library installed on your system + from Lars Pastewka (Karlsruhe Institute of Technology) +poems POEMS rigid-body integration package, POEMS package + from Rudranarayan Mukherjee (RPI) python hooks to the system Python library, used by the PYTHON package from the LAMMPS development team qmmm quantum mechanics/molecular mechanics coupling interface diff --git a/lib/atc/Install.py b/lib/atc/Install.py new file mode 100644 index 0000000000..18b426f928 --- /dev/null +++ b/lib/atc/Install.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +# install.py tool to do a generic build of a library +# soft linked to by many of the lib/Install.py files +# used to automate the steps described in the corresponding lib/README + +import sys,commands,os + +# help message + +help = """ +Syntax: python Install.py -m machine -e suffix + specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" + machine = suffix of a lib/Makefile.* file + -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix + does not alter existing Makefile.machine +""" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +machine = None +extraflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-m": + if iarg+2 > nargs: error() + machine = args[iarg+1] + iarg += 2 + elif args[iarg] == "-e": + if iarg+2 > nargs: error() + extraflag = 1 + suffix = args[iarg+1] + iarg += 2 + else: error() + +# set lib from working dir + +cwd = os.getcwd() +lib = os.path.basename(cwd) + +# create Makefile.auto as copy of Makefile.machine +# reset EXTRAMAKE if requested + +if not os.path.exists("Makefile.%s" % machine): + error("lib/%s/Makefile.%s does not exist" % (lib,machine)) + +lines = open("Makefile.%s" % machine,'r').readlines() +fp = open("Makefile.auto",'w') + +for line in lines: + words = line.split() + if len(words) == 3 and extraflag and \ + words[0] == "EXTRAMAKE" and words[1] == '=': + line = line.replace(words[2],"Makefile.lammps.%s" % suffix) + print >>fp,line, + +fp.close() + +# make the library via Makefile.auto + +print "Building lib%s.a ..." % lib +cmd = "make -f Makefile.auto clean; make -f Makefile.auto" +txt = commands.getoutput(cmd) +print txt + +if os.path.exists("lib%s.a" % lib): print "Build was successful" +else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) +if not os.path.exists("Makefile.lammps"): + print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/atc/README b/lib/atc/README index 106c303dd1..d3adfdafe4 100644 --- a/lib/atc/README +++ b/lib/atc/README @@ -15,6 +15,11 @@ links against when using the USER-ATC package. This library must be built with a C++ compiler, before LAMMPS is built, so LAMMPS can link against it. +You can type "make lib-atc" from the src directory to see help on how +to build this library via make commands, or you can do the same thing +by typing "python Install.py" from within this directory, or you can +do it manually by following the instructions below. + Build the library using one of the provided Makefile.* files or create your own, specific to your compiler and system. For example: @@ -44,16 +49,16 @@ user-atc_SYSINC = leave blank for this package user-atc_SYSLIB = BLAS and LAPACK libraries needed by this package user-atc_SYSPATH = path(s) to where those libraries are -You have several choices for these settings: +You have 3 choices for these settings: -If the 2 libraries are already installed on your system, the settings -in Makefile.lammps.installed should work. +a) If the 2 libraries are already installed on your system, the +settings in Makefile.lammps.installed should work. -If they are not, you can install them yourself, and speficy the -appropriate settings accordingly. +b) If they are not, you can install them yourself, and specify the +appropriate settings accordingly in a Makefile.lammps.* file +and set the EXTRAMAKE setting in Makefile.* to that file. -If you want to use the minimalist version of these libraries provided -with LAMMPS in lib/linalg, then the settings in Makefile.lammps.linalg -should work. Note that in this case you also need to build the -linear-algebra in lib/linalg; see the lib/linalg/README for more -details. +c) Use the minimalist version of these libraries provided with LAMMPS +in lib/linalg, by using Makefile.lammps.linalg. In this case you also +need to build the library in lib/linalg; see the lib/linalg/README +file for more details. diff --git a/lib/awpmd/Install.py b/lib/awpmd/Install.py new file mode 100644 index 0000000000..18b426f928 --- /dev/null +++ b/lib/awpmd/Install.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +# install.py tool to do a generic build of a library +# soft linked to by many of the lib/Install.py files +# used to automate the steps described in the corresponding lib/README + +import sys,commands,os + +# help message + +help = """ +Syntax: python Install.py -m machine -e suffix + specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" + machine = suffix of a lib/Makefile.* file + -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix + does not alter existing Makefile.machine +""" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +machine = None +extraflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-m": + if iarg+2 > nargs: error() + machine = args[iarg+1] + iarg += 2 + elif args[iarg] == "-e": + if iarg+2 > nargs: error() + extraflag = 1 + suffix = args[iarg+1] + iarg += 2 + else: error() + +# set lib from working dir + +cwd = os.getcwd() +lib = os.path.basename(cwd) + +# create Makefile.auto as copy of Makefile.machine +# reset EXTRAMAKE if requested + +if not os.path.exists("Makefile.%s" % machine): + error("lib/%s/Makefile.%s does not exist" % (lib,machine)) + +lines = open("Makefile.%s" % machine,'r').readlines() +fp = open("Makefile.auto",'w') + +for line in lines: + words = line.split() + if len(words) == 3 and extraflag and \ + words[0] == "EXTRAMAKE" and words[1] == '=': + line = line.replace(words[2],"Makefile.lammps.%s" % suffix) + print >>fp,line, + +fp.close() + +# make the library via Makefile.auto + +print "Building lib%s.a ..." % lib +cmd = "make -f Makefile.auto clean; make -f Makefile.auto" +txt = commands.getoutput(cmd) +print txt + +if os.path.exists("lib%s.a" % lib): print "Build was successful" +else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) +if not os.path.exists("Makefile.lammps"): + print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/awpmd/README b/lib/awpmd/README index 3c02480419..20e142f74c 100644 --- a/lib/awpmd/README +++ b/lib/awpmd/README @@ -19,6 +19,11 @@ links against when using the USER-AWPMD package. This library must be built with a C++ compiler, before LAMMPS is built, so LAMMPS can link against it. +You can type "make lib-awpmd" from the src directory to see help on +how to build this library via make commands, or you can do the same +thing by typing "python Install.py" from within this directory, or you +can do it manually by following the instructions below. + Build the library using one of the provided Makefile.* files or create your own, specific to your compiler and system. For example: @@ -47,16 +52,16 @@ user-awpmd_SYSINC = leave blank for this package user-awpmd_SYSLIB = BLAS and LAPACK libraries needed by this package user-awpmd_SYSPATH = path(s) to where those libraries are -You have several choices for these settings: +You have 3 choices for these settings: -If the 2 libraries are already installed on your system, the settings -in Makefile.lammps.installed should work. +a) If the 2 libraries are already installed on your system, the +settings in Makefile.lammps.installed should work. -If they are not, you can install them yourself, and speficy the -appropriate settings accordingly. +b) If they are not, you can install them yourself, and specify the +appropriate settings accordingly in a Makefile.lammps.* file +and set the EXTRAMAKE setting in Makefile.* to that file. -If you want to use the minimalist version of these libraries provided -with LAMMPS in lib/linalg, then the settings in Makefile.lammps.linalg -should work. Note that in this case you also need to build the -linear-algebra in lib/linalg; see the lib/linalg/README for more -details. +c) Use the minimalist version of these libraries provided with LAMMPS +in lib/linalg, by using Makefile.lammps.linalg. In this case you also +need to build the library in lib/linalg; see the lib/linalg/README +file for more details. diff --git a/lib/colvars/Install.py b/lib/colvars/Install.py new file mode 100644 index 0000000000..18b426f928 --- /dev/null +++ b/lib/colvars/Install.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +# install.py tool to do a generic build of a library +# soft linked to by many of the lib/Install.py files +# used to automate the steps described in the corresponding lib/README + +import sys,commands,os + +# help message + +help = """ +Syntax: python Install.py -m machine -e suffix + specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" + machine = suffix of a lib/Makefile.* file + -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix + does not alter existing Makefile.machine +""" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +machine = None +extraflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-m": + if iarg+2 > nargs: error() + machine = args[iarg+1] + iarg += 2 + elif args[iarg] == "-e": + if iarg+2 > nargs: error() + extraflag = 1 + suffix = args[iarg+1] + iarg += 2 + else: error() + +# set lib from working dir + +cwd = os.getcwd() +lib = os.path.basename(cwd) + +# create Makefile.auto as copy of Makefile.machine +# reset EXTRAMAKE if requested + +if not os.path.exists("Makefile.%s" % machine): + error("lib/%s/Makefile.%s does not exist" % (lib,machine)) + +lines = open("Makefile.%s" % machine,'r').readlines() +fp = open("Makefile.auto",'w') + +for line in lines: + words = line.split() + if len(words) == 3 and extraflag and \ + words[0] == "EXTRAMAKE" and words[1] == '=': + line = line.replace(words[2],"Makefile.lammps.%s" % suffix) + print >>fp,line, + +fp.close() + +# make the library via Makefile.auto + +print "Building lib%s.a ..." % lib +cmd = "make -f Makefile.auto clean; make -f Makefile.auto" +txt = commands.getoutput(cmd) +print txt + +if os.path.exists("lib%s.a" % lib): print "Build was successful" +else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) +if not os.path.exists("Makefile.lammps"): + print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/colvars/README b/lib/colvars/README index d6efc333a5..a5e5938b20 100644 --- a/lib/colvars/README +++ b/lib/colvars/README @@ -35,6 +35,11 @@ links against when using the USER-COLVARS package. This library must be built with a C++ compiler, before LAMMPS is built, so LAMMPS can link against it. +You can type "make lib-colvars" from the src directory to see help on +how to build this library via make commands, or you can do the same +thing by typing "python Install.py" from within this directory, or you +can do it manually by following the instructions below. + Build the library using one of the provided Makefile.* files or create your own, specific to your compiler and system. For example: diff --git a/lib/gpu/Install.py b/lib/gpu/Install.py new file mode 100644 index 0000000000..d396be5e1a --- /dev/null +++ b/lib/gpu/Install.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python + +# Install.py tool to build the GPU library +# used to automate the steps described in the README file in this dir + +import sys,os,re,commands + +# help message + +help = """ +Syntax: python Install.py -i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix + specify one or more options, order does not matter + copies an existing Makefile.isuffix in lib/gpu to Makefile.auto + optionally edits these variables in Makefile.auto: + CUDA_HOME, CUDA_ARCH, CUDA_PRECISION, EXTRAMAKE + optionally uses Makefile.auto to build the GPU library -> libgpu.a + and to copy a Makefile.lammps.esuffix -> Makefile.lammps + optionally copies Makefile.auto to a new Makefile.osuffix + + -i = use Makefile.isuffix as starting point, copy to Makefile.auto + default isuffix = linux + -h = set CUDA_HOME variable in Makefile.auto to hdir + hdir = path to NVIDIA Cuda software, e.g. /usr/local/cuda + -a = set CUDA_ARCH variable in Makefile.auto to arch + use arch = ?? for K40 (Tesla) + use arch = 37 for dual K80 (Tesla) + use arch = 60 for P100 (Pascal) + -p = set CUDA_PRECISION variable in Makefile.auto to precision + use precision = double or mixed or single + -e = set EXTRAMAKE variable in Makefile.auto to Makefile.lammps.esuffix + -m = make the GPU library using Makefile.auto + first performs a "make clean" + produces libgpu.a if successful + also copies EXTRAMAKE file -> Makefile.lammps + -e can set which Makefile.lammps.esuffix file is copied + -o = copy final Makefile.auto to Makefile.osuffix +""" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +isuffix = "linux" +hflag = aflag = pflag = eflag = 0 +makeflag = 0 +outflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-i": + if iarg+2 > nargs: error() + isuffix = args[iarg+1] + iarg += 2 + elif args[iarg] == "-h": + if iarg+2 > nargs: error() + hflag = 1 + hdir = args[iarg+1] + iarg += 2 + elif args[iarg] == "-a": + if iarg+2 > nargs: error() + aflag = 1 + arch = args[iarg+1] + iarg += 2 + elif args[iarg] == "-p": + if iarg+2 > nargs: error() + pflag = 1 + precision = args[iarg+1] + iarg += 2 + elif args[iarg] == "-e": + if iarg+2 > nargs: error() + eflag = 1 + lmpsuffix = args[iarg+1] + iarg += 2 + elif args[iarg] == "-m": + makeflag = 1 + iarg += 1 + elif args[iarg] == "-o": + if iarg+2 > nargs: error() + outflag = 1 + osuffix = args[iarg+1] + iarg += 2 + else: error() + +if pflag: + if precision == "double": precstr = "-D_DOUBLE_DOUBLE" + elif precision == "mixed": precstr = "-D_SINGLE_DOUBLE" + elif precision == "single": precstr = "-D_SINGLE_SINGLE" + else: error("Invalid precision setting") + +# create Makefile.auto +# reset EXTRAMAKE, CUDA_HOME, CUDA_ARCH, CUDA_PRECISION if requested + +if not os.path.exists("Makefile.%s" % isuffix): + error("lib/gpu/Makefile.%s does not exist" % isuffix) + +lines = open("Makefile.%s" % isuffix,'r').readlines() +fp = open("Makefile.auto",'w') + +for line in lines: + words = line.split() + if len(words) != 3: + print >>fp,line, + continue + + if hflag and words[0] == "CUDA_HOME" and words[1] == '=': + line = line.replace(words[2],hdir) + if aflag and words[0] == "CUDA_ARCH" and words[1] == '=': + line = line.replace(words[2],"-arch=sm_%s" % arch) + if pflag and words[0] == "CUDA_PRECISION" and words[1] == '=': + line = line.replace(words[2],precstr) + if eflag and words[0] == "EXTRAMAKE" and words[1] == '=': + line = line.replace(words[2],"Makefile.lammps.%s" % lmpsuffix) + + print >>fp,line, + +fp.close() + +# perform make +# make operations copies EXTRAMAKE file to Makefile.lammps + +if makeflag: + print "Building libgpu.a ..." + cmd = "rm -f libgpu.a" + commands.getoutput(cmd) + cmd = "make -f Makefile.auto clean; make -f Makefile.auto" + commands.getoutput(cmd) + if not os.path.exists("libgpu.a"): + error("Build of lib/gpu/libgpu.a was NOT successful") + if not os.path.exists("Makefile.lammps"): + error("lib/gpu/Makefile.lammps was NOT created") + +# copy new Makefile.auto to Makefile.osuffix + +if outflag: + print "Creating new Makefile.%s" % osuffix + cmd = "cp Makefile.auto Makefile.%s" % osuffix + commands.getoutput(cmd) diff --git a/lib/gpu/README b/lib/gpu/README index 45c8ce49ba..b26897e885 100644 --- a/lib/gpu/README +++ b/lib/gpu/README @@ -17,6 +17,11 @@ links against when using the GPU package. This library must be built with a C++ compiler, before LAMMPS is built, so LAMMPS can link against it. +You can type "make lib-gpu" from the src directory to see help on how +to build this library via make commands, or you can do the same thing +by typing "python Install.py" from within this directory, or you can +do it manually by following the instructions below. + Build the library using one of the provided Makefile.* files or create your own, specific to your compiler and system. For example: @@ -164,9 +169,9 @@ this directory). The gpu library supports 3 precision modes as determined by the CUDA_PRECISION variable: - CUDA_PREC = -D_SINGLE_SINGLE # Single precision for all calculations - CUDA_PREC = -D_DOUBLE_DOUBLE # Double precision for all calculations - CUDA_PREC = -D_SINGLE_DOUBLE # Accumulation of forces, etc. in double + CUDA_PRECISION = -D_SINGLE_SINGLE # Single precision for all calculations + CUDA_PRECISION = -D_DOUBLE_DOUBLE # Double precision for all calculations + CUDA_PRECISION = -D_SINGLE_DOUBLE # Accumulation of forces, etc. in double NOTE: PPPM acceleration can only be run on GPUs with compute capability>=1.1. You will get the error "GPU library not compiled for this accelerator." diff --git a/lib/h5md/Install.py b/lib/h5md/Install.py new file mode 100644 index 0000000000..18b426f928 --- /dev/null +++ b/lib/h5md/Install.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +# install.py tool to do a generic build of a library +# soft linked to by many of the lib/Install.py files +# used to automate the steps described in the corresponding lib/README + +import sys,commands,os + +# help message + +help = """ +Syntax: python Install.py -m machine -e suffix + specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" + machine = suffix of a lib/Makefile.* file + -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix + does not alter existing Makefile.machine +""" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +machine = None +extraflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-m": + if iarg+2 > nargs: error() + machine = args[iarg+1] + iarg += 2 + elif args[iarg] == "-e": + if iarg+2 > nargs: error() + extraflag = 1 + suffix = args[iarg+1] + iarg += 2 + else: error() + +# set lib from working dir + +cwd = os.getcwd() +lib = os.path.basename(cwd) + +# create Makefile.auto as copy of Makefile.machine +# reset EXTRAMAKE if requested + +if not os.path.exists("Makefile.%s" % machine): + error("lib/%s/Makefile.%s does not exist" % (lib,machine)) + +lines = open("Makefile.%s" % machine,'r').readlines() +fp = open("Makefile.auto",'w') + +for line in lines: + words = line.split() + if len(words) == 3 and extraflag and \ + words[0] == "EXTRAMAKE" and words[1] == '=': + line = line.replace(words[2],"Makefile.lammps.%s" % suffix) + print >>fp,line, + +fp.close() + +# make the library via Makefile.auto + +print "Building lib%s.a ..." % lib +cmd = "make -f Makefile.auto clean; make -f Makefile.auto" +txt = commands.getoutput(cmd) +print txt + +if os.path.exists("lib%s.a" % lib): print "Build was successful" +else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) +if not os.path.exists("Makefile.lammps"): + print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/h5md/Makefile b/lib/h5md/Makefile.h5cc similarity index 95% rename from lib/h5md/Makefile rename to lib/h5md/Makefile.h5cc index 085d21ff69..bd3e8a9784 100644 --- a/lib/h5md/Makefile +++ b/lib/h5md/Makefile.h5cc @@ -19,7 +19,7 @@ build/ch5md.o: src/ch5md.c | build $(CC) $(INC) $(CFLAGS) -c $< -o $@ Makefile.lammps: - cp Makefile.lammps.empty $@ + cp $(EXTRAMAKE) $@ .PHONY: all lib clean diff --git a/lib/h5md/README b/lib/h5md/README index 62a4979cba..fb7d82bfcc 100644 --- a/lib/h5md/README +++ b/lib/h5md/README @@ -3,6 +3,11 @@ LAMMPS under its own BSD license; see below. This library is used when the USER-H5MD package is included in a LAMMPS build and the dump h5md command is invoked in a LAMMPS input script. +You can type "make lib-h5md" from the src directory to see help on how +to build this library via make commands, or you can do the same thing +by typing "python Install.py" from within this directory, or you can +do it manually by following the instructions below. + --------------------- ch5md : Read and write H5MD files in C @@ -17,8 +22,14 @@ molecular data, whose development is found at . ch5md is developped by Pierre de Buyl and is released under the 3-clause BSD license that can be found in the file LICENSE. -To use the h5md dump style in lammps, execute make in this directory then 'make -yes-user-h5md' in the src directory of lammps. Rebuild lammps. +To use the h5md dump style in lammps, execute +make -f Makefile.h5cc +in this directory then +make yes-user-h5md +in the src directory of LAMMPS to rebuild LAMMPS. + +Note that you must have the h5cc compiler installed to use +Makefile.h5cc. It should be part If HDF5 is not in a standard system location, edit Makefile.lammps accordingly. diff --git a/lib/linalg/Install.py b/lib/linalg/Install.py new file mode 100644 index 0000000000..c7076ca52f --- /dev/null +++ b/lib/linalg/Install.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python + +# install.py tool to do build of the linear algebra library +# used to automate the steps described in the README file in this dir + +import sys,commands,os + +# help message + +help = """ +Syntax: python Install.py -m machine + -m = peform a clean followed by "make -f Makefile.machine" + machine = suffix of a lib/Makefile.* file +""" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +machine = None + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-m": + if iarg+2 > nargs: error() + machine = args[iarg+1] + iarg += 2 + else: error() + +# set lib from working dir + +cwd = os.getcwd() +lib = os.path.basename(cwd) + +# make the library + +print "Building lib%s.a ..." % lib +cmd = "make -f Makefile.%s clean; make -f Makefile.%s" % (machine,machine) +txt = commands.getoutput(cmd) +print txt + +if os.path.exists("lib%s.a" % lib): print "Build was successful" +else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) diff --git a/lib/linalg/README b/lib/linalg/README index 20f3ff094d..725df86c4c 100644 --- a/lib/linalg/README +++ b/lib/linalg/README @@ -3,11 +3,16 @@ USER-AWPMD packages, and possibly by other packages in the future. Note that this is an *incomplete* subset of full BLAS/LAPACK. -You should only need to build and use the resulting library in this -directory if you want to build LAMMPS with the USER-ATC and/or -USER-AWPMD packages AND you do not have any other suitable BLAS and -LAPACK libraries installed on your system. E.g. ATLAS, GOTO-BLAS, -OpenBLAS, ACML, or MKL. +You should only need to build and use the library in this directory if +you want to build LAMMPS with the USER-ATC and/or USER-AWPMD packages +AND you do not have any other suitable BLAS and LAPACK libraries +installed on your system. E.g. ATLAS, GOTO-BLAS, OpenBLAS, ACML, or +MKL. + +You can type "make lib-linalg" from the src directory to see help on +how to build this library via make commands, or you can do the same +thing by typing "python Install.py" from within this directory, or you +can do it manually by following the instructions below. Build the library using one of the provided Makefile.* files or create your own, specific to your compiler and system. For example: @@ -20,4 +25,5 @@ directory: liblinalg.a the library LAMMPS will link against You can then include this library and its path in the Makefile.lammps -file of any packages that need it, e.g. in lib/atc/Makefile.lammps. +file of any packages that need it. As an example, see the +lib/atc/Makefile.lammps.linalg file. diff --git a/lib/meam/Install.py b/lib/meam/Install.py new file mode 100644 index 0000000000..18b426f928 --- /dev/null +++ b/lib/meam/Install.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +# install.py tool to do a generic build of a library +# soft linked to by many of the lib/Install.py files +# used to automate the steps described in the corresponding lib/README + +import sys,commands,os + +# help message + +help = """ +Syntax: python Install.py -m machine -e suffix + specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" + machine = suffix of a lib/Makefile.* file + -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix + does not alter existing Makefile.machine +""" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +machine = None +extraflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-m": + if iarg+2 > nargs: error() + machine = args[iarg+1] + iarg += 2 + elif args[iarg] == "-e": + if iarg+2 > nargs: error() + extraflag = 1 + suffix = args[iarg+1] + iarg += 2 + else: error() + +# set lib from working dir + +cwd = os.getcwd() +lib = os.path.basename(cwd) + +# create Makefile.auto as copy of Makefile.machine +# reset EXTRAMAKE if requested + +if not os.path.exists("Makefile.%s" % machine): + error("lib/%s/Makefile.%s does not exist" % (lib,machine)) + +lines = open("Makefile.%s" % machine,'r').readlines() +fp = open("Makefile.auto",'w') + +for line in lines: + words = line.split() + if len(words) == 3 and extraflag and \ + words[0] == "EXTRAMAKE" and words[1] == '=': + line = line.replace(words[2],"Makefile.lammps.%s" % suffix) + print >>fp,line, + +fp.close() + +# make the library via Makefile.auto + +print "Building lib%s.a ..." % lib +cmd = "make -f Makefile.auto clean; make -f Makefile.auto" +txt = commands.getoutput(cmd) +print txt + +if os.path.exists("lib%s.a" % lib): print "Build was successful" +else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) +if not os.path.exists("Makefile.lammps"): + print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/meam/README b/lib/meam/README index 436259ee81..b3111c1317 100644 --- a/lib/meam/README +++ b/lib/meam/README @@ -15,6 +15,11 @@ links against when using the MEAM package. This library must be built with a F90 compiler, before LAMMPS is built, so LAMMPS can link against it. +You can type "make lib-meam" from the src directory to see help on how +to build this library via make commands, or you can do the same thing +by typing "python Install.py" from within this directory, or you can +do it manually by following the instructions below. + Build the library using one of the provided Makefile.* files or create your own, specific to your compiler and system. For example: diff --git a/lib/mscg/Install.py b/lib/mscg/Install.py new file mode 100644 index 0000000000..e547232614 --- /dev/null +++ b/lib/mscg/Install.py @@ -0,0 +1,122 @@ +#!/usr/bin/env python + +# Install.py tool to download, unpack, build, and link to the MS-CG library +# used to automate the steps described in the README file in this dir + +import sys,os,re,commands + +# help message + +help = """ +Syntax: python Install.py -h hpath hdir -g -b [suffix] -l + specify one or more options, order does not matter + -h = set home dir of MS-CG to be hpath/hdir + hpath can be full path, contain '~' or '.' chars + default hpath = . = lib/mscg + default hdir = MSCG-release-master = what GitHub zipfile unpacks to + -g = grab (download) zipfile from MS-CG GitHub website + unpack it to hpath/hdir + hpath must already exist + if hdir already exists, it will be deleted before unpack + -b = build MS-CG library in its src dir + optional suffix specifies which src/Make/Makefile.suffix to use + default suffix = g++_simple + -l = create 2 softlinks (includelink,liblink) in lib/mscg to MS-CG src dir +""" + +# settings + +url = "https://github.com/uchicago-voth/MSCG-release/archive/master.zip" +zipfile = "MS-CG-master.zip" +zipdir = "MSCG-release-master" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# expand to full path name +# process leading '~' or relative path + +def fullpath(path): + return os.path.abspath(os.path.expanduser(path)) + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +homepath = "." +homedir = zipdir + +grabflag = 0 +buildflag = 0 +msuffix = "g++_simple" +linkflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-h": + if iarg+3 > nargs: error() + homepath = args[iarg+1] + homedir = args[iarg+2] + iarg += 3 + elif args[iarg] == "-g": + grabflag = 1 + iarg += 1 + elif args[iarg] == "-b": + buildflag = 1 + if iarg+1 < nargs and args[iarg+1][0] != '-': + msuffix = args[iarg+1] + iarg += 1 + iarg += 1 + elif args[iarg] == "-l": + linkflag = 1 + iarg += 1 + else: error() + +homepath = fullpath(homepath) +if not os.path.isdir(homepath): error("MS-CG path does not exist") +homedir = "%s/%s" % (homepath,homedir) + +# download and unpack MS-CG zipfile + +if grabflag: + print "Downloading MS-CG ..." + cmd = "curl -L %s > %s/%s" % (url,homepath,zipfile) + print cmd + print commands.getoutput(cmd) + + print "Unpacking MS-CG zipfile ..." + if os.path.exists("%s/%s" % (homepath,zipdir)): + commands.getoutput("rm -rf %s/%s" % (homepath,zipdir)) + cmd = "cd %s; unzip %s" % (homepath,zipfile) + commands.getoutput(cmd) + if os.path.basename(homedir) != zipdir: + if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir) + os.rename("%s/%s" % (homepath,zipdir),homedir) + +# build MS-CG + +if buildflag: + print "Building MS-CG ..." + cmd = "cd %s/src; cp Make/Makefile.%s .; make -f Makefile.%s" % \ + (homedir,msuffix,msuffix) + txt = commands.getoutput(cmd) + print txt + +# create 2 links in lib/mscg to MS-CG src dir + +if linkflag: + print "Creating links to MS-CG include and lib files" + if os.path.isfile("includelink") or os.path.islink("includelink"): + os.remove("includelink") + if os.path.isfile("liblink") or os.path.islink("liblink"): + os.remove("liblink") + cmd = "ln -s %s/src includelink" % homedir + commands.getoutput(cmd) + cmd = "ln -s %s/src liblink" % homedir + commands.getoutput(cmd) diff --git a/lib/mscg/Makefile.lammps b/lib/mscg/Makefile.lammps index 0aa55b087d..f0d9a9b8a0 100644 --- a/lib/mscg/Makefile.lammps +++ b/lib/mscg/Makefile.lammps @@ -1,5 +1,5 @@ # Settings that the LAMMPS build will import when this package library is used -mscg_SYSINC = -mscg_SYSLIB = -lm -lgsl -llapack -lcblas +mscg_SYSINC = -std=c++11 +mscg_SYSLIB = -lm -lgsl -llapack -lgslcblas mscg_SYSPATH = diff --git a/lib/mscg/README b/lib/mscg/README index cc4fc9a667..b73c8563cd 100755 --- a/lib/mscg/README +++ b/lib/mscg/README @@ -6,6 +6,15 @@ The MS-CG library is available at https://github.com/uchicago-voth/MSCG-release and was developed by Jacob Wagner in Greg Voth's group at the University of Chicago. +This library requires a compiler with C++11 support (e.g., g++ v4.9+), +LAPACK, and the GNU scientific library (GSL v 2.1+). + +You can type "make lib-mscg" from the src directory to see help on how +to download and build this library via make commands, or you can do +the same thing by typing "python Install.py" from within this +directory, or you can do it manually by following the instructions +below. + ----------------- You must perform the following steps yourself. @@ -14,16 +23,21 @@ You must perform the following steps yourself. either as a tarball or via SVN, and unpack the tarball either in this /lib/mscg directory or somewhere else on your system. -2. Compile MS-CG from within its home directory using your makefile choice: +2. Ensure that you have LAPACK and GSL (or Intel MKL) as well as a compiler + with support for C++11. + +3. Compile MS-CG from within its home directory using your makefile of choice: % make -f Makefile."name" libmscg.a + It is recommended that you start with Makefile.g++_simple + for most machines -3. There is no need to install MS-CG if you only wish +4. There is no need to install MS-CG if you only wish to use it from LAMMPS. -4. Create two soft links in this dir (lib/mscg) to the MS-CG src +5. Create two soft links in this dir (lib/mscg) to the MS-CG src directory. E.g if you built MS-CG in this dir: - % ln -s mscgfm-master/src includelink - % ln -s mscgfm-master/src liblink + % ln -s src includelink + % ln -s src liblink These links could instead be set to the include and lib directories created by a MS-CG install, e.g. % ln -s /usr/local/include includelink @@ -46,8 +60,8 @@ somewhere else, you will also need to repeat steps 1,2,3. The Makefile.lammps file in this directory is there for compatibility with the way other libraries under the lib dir are linked with by -LAMMPS. MS-CG requires the GSL, LAPACK, and BLAS libraries as listed -in Makefile.lammps. If they are not in default locations where your +LAMMPS. MS-CG requires the GSL and LAPACK libraries as listed in +Makefile.lammps. If they are not in default locations where your LD_LIBRARY_PATH environment settings can find them, then you should add the approrpriate -L paths to the mscg_SYSPATH variable in Makefile.lammps. diff --git a/lib/netcdf/README b/lib/netcdf/README index 00db8df001..b18ea1d276 100644 --- a/lib/netcdf/README +++ b/lib/netcdf/README @@ -1,6 +1,9 @@ The Makefile.lammps file in this directory is used when building LAMMPS with packages that make use of the NetCDF library or its -parallel version. The file has several settings needed to compile +parallel version. For example, the USER-NETCDF package which adds +dump netcdf and dump netcdf/mpiio commands. + +The file has several settings needed to compile and link LAMMPS with the NetCDF and parallel NetCDF support. For any regular NetCDF installation, all required flags should be autodetected. Please note that parallel NetCDF support is diff --git a/lib/poems/Install.py b/lib/poems/Install.py new file mode 100644 index 0000000000..18b426f928 --- /dev/null +++ b/lib/poems/Install.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +# install.py tool to do a generic build of a library +# soft linked to by many of the lib/Install.py files +# used to automate the steps described in the corresponding lib/README + +import sys,commands,os + +# help message + +help = """ +Syntax: python Install.py -m machine -e suffix + specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" + machine = suffix of a lib/Makefile.* file + -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix + does not alter existing Makefile.machine +""" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +machine = None +extraflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-m": + if iarg+2 > nargs: error() + machine = args[iarg+1] + iarg += 2 + elif args[iarg] == "-e": + if iarg+2 > nargs: error() + extraflag = 1 + suffix = args[iarg+1] + iarg += 2 + else: error() + +# set lib from working dir + +cwd = os.getcwd() +lib = os.path.basename(cwd) + +# create Makefile.auto as copy of Makefile.machine +# reset EXTRAMAKE if requested + +if not os.path.exists("Makefile.%s" % machine): + error("lib/%s/Makefile.%s does not exist" % (lib,machine)) + +lines = open("Makefile.%s" % machine,'r').readlines() +fp = open("Makefile.auto",'w') + +for line in lines: + words = line.split() + if len(words) == 3 and extraflag and \ + words[0] == "EXTRAMAKE" and words[1] == '=': + line = line.replace(words[2],"Makefile.lammps.%s" % suffix) + print >>fp,line, + +fp.close() + +# make the library via Makefile.auto + +print "Building lib%s.a ..." % lib +cmd = "make -f Makefile.auto clean; make -f Makefile.auto" +txt = commands.getoutput(cmd) +print txt + +if os.path.exists("lib%s.a" % lib): print "Build was successful" +else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) +if not os.path.exists("Makefile.lammps"): + print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/poems/README b/lib/poems/README index 836595bdd1..e0ded85e46 100644 --- a/lib/poems/README +++ b/lib/poems/README @@ -40,6 +40,11 @@ links against when using the POEMA package. This library must be built with a C++ compiler, before LAMMPS is built, so LAMMPS can link against it. +You can type "make lib-poems" from the src directory to see help on +how to build this library via make commands, or you can do the same +thing by typing "python Install.py" from within this directory, or you +can do it manually by following the instructions below. + Build the library using one of the provided Makefile.* files or create your own, specific to your compiler and system. For example: diff --git a/lib/qmmm/Install.py b/lib/qmmm/Install.py new file mode 100644 index 0000000000..18b426f928 --- /dev/null +++ b/lib/qmmm/Install.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +# install.py tool to do a generic build of a library +# soft linked to by many of the lib/Install.py files +# used to automate the steps described in the corresponding lib/README + +import sys,commands,os + +# help message + +help = """ +Syntax: python Install.py -m machine -e suffix + specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" + machine = suffix of a lib/Makefile.* file + -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix + does not alter existing Makefile.machine +""" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +machine = None +extraflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-m": + if iarg+2 > nargs: error() + machine = args[iarg+1] + iarg += 2 + elif args[iarg] == "-e": + if iarg+2 > nargs: error() + extraflag = 1 + suffix = args[iarg+1] + iarg += 2 + else: error() + +# set lib from working dir + +cwd = os.getcwd() +lib = os.path.basename(cwd) + +# create Makefile.auto as copy of Makefile.machine +# reset EXTRAMAKE if requested + +if not os.path.exists("Makefile.%s" % machine): + error("lib/%s/Makefile.%s does not exist" % (lib,machine)) + +lines = open("Makefile.%s" % machine,'r').readlines() +fp = open("Makefile.auto",'w') + +for line in lines: + words = line.split() + if len(words) == 3 and extraflag and \ + words[0] == "EXTRAMAKE" and words[1] == '=': + line = line.replace(words[2],"Makefile.lammps.%s" % suffix) + print >>fp,line, + +fp.close() + +# make the library via Makefile.auto + +print "Building lib%s.a ..." % lib +cmd = "make -f Makefile.auto clean; make -f Makefile.auto" +txt = commands.getoutput(cmd) +print txt + +if os.path.exists("lib%s.a" % lib): print "Build was successful" +else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) +if not os.path.exists("Makefile.lammps"): + print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/qmmm/README b/lib/qmmm/README index b50f25ed69..2746c9e86e 100644 --- a/lib/qmmm/README +++ b/lib/qmmm/README @@ -18,6 +18,15 @@ the only option. Adding support for a different QM code will require to write a new version of the top-level wrapper code, pwqmmm.c, and also an interface layer into the QM code similar to the one in QE. +You can type "make lib-qmmm" from the src directory to see help on how +to build this library (steps 1 and 2 below) via make commands, or you +can do the same thing by typing "python Install.py" from within this +directory, or you can do it manually by following the instructions +below. + +However you perform steps 1 and 2, you will need to perform steps 3 +and 4 manually, as outlined below. + ------------------------------------------------- WARNING: This is experimental code under developement and is provided diff --git a/lib/reax/Install.py b/lib/reax/Install.py new file mode 100644 index 0000000000..18b426f928 --- /dev/null +++ b/lib/reax/Install.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +# install.py tool to do a generic build of a library +# soft linked to by many of the lib/Install.py files +# used to automate the steps described in the corresponding lib/README + +import sys,commands,os + +# help message + +help = """ +Syntax: python Install.py -m machine -e suffix + specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" + machine = suffix of a lib/Makefile.* file + -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix + does not alter existing Makefile.machine +""" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +machine = None +extraflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-m": + if iarg+2 > nargs: error() + machine = args[iarg+1] + iarg += 2 + elif args[iarg] == "-e": + if iarg+2 > nargs: error() + extraflag = 1 + suffix = args[iarg+1] + iarg += 2 + else: error() + +# set lib from working dir + +cwd = os.getcwd() +lib = os.path.basename(cwd) + +# create Makefile.auto as copy of Makefile.machine +# reset EXTRAMAKE if requested + +if not os.path.exists("Makefile.%s" % machine): + error("lib/%s/Makefile.%s does not exist" % (lib,machine)) + +lines = open("Makefile.%s" % machine,'r').readlines() +fp = open("Makefile.auto",'w') + +for line in lines: + words = line.split() + if len(words) == 3 and extraflag and \ + words[0] == "EXTRAMAKE" and words[1] == '=': + line = line.replace(words[2],"Makefile.lammps.%s" % suffix) + print >>fp,line, + +fp.close() + +# make the library via Makefile.auto + +print "Building lib%s.a ..." % lib +cmd = "make -f Makefile.auto clean; make -f Makefile.auto" +txt = commands.getoutput(cmd) +print txt + +if os.path.exists("lib%s.a" % lib): print "Build was successful" +else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) +if not os.path.exists("Makefile.lammps"): + print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/reax/README b/lib/reax/README index 2840a242a5..f21a470618 100644 --- a/lib/reax/README +++ b/lib/reax/README @@ -17,6 +17,11 @@ links against when using the REAX package. This library must be built with a F90 compiler, before LAMMPS is built, so LAMMPS can link against it. +You can type "make lib-reax" from the src directory to see help on how +to build this library via make commands, or you can do the same thing +by typing "python Install.py" from within this directory, or you can +do it manually by following the instructions below. + Build the library using one of the provided Makefile.* files or create your own, specific to your compiler and system. For example: diff --git a/lib/smd/Install.py b/lib/smd/Install.py new file mode 100644 index 0000000000..dc0a3187ce --- /dev/null +++ b/lib/smd/Install.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python + +# Install.py tool to download, unpack, and point to the Eigen library +# used to automate the steps described in the README file in this dir + +import sys,os,re,glob,commands + +# help message + +help = """ +Syntax: python Install.py -h hpath hdir -g -l + specify one or more options, order does not matter + -h = set home dir of Eigen to be hpath/hdir + hpath can be full path, contain '~' or '.' chars + default hpath = . = lib/smd + default hdir = "ee" = what tarball unpacks to (eigen-eigen-*) + -g = grab (download) tarball from http://eigen.tuxfamily.org website + unpack it to hpath/hdir + hpath must already exist + if hdir already exists, it will be deleted before unpack + -l = create softlink (includelink) in lib/smd to Eigen src dir +""" + +# settings + +url = "http://bitbucket.org/eigen/eigen/get/3.3.3.tar.gz" +tarball = "eigen.tar.gz" + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# expand to full path name +# process leading '~' or relative path + +def fullpath(path): + return os.path.abspath(os.path.expanduser(path)) + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +homepath = "." +homedir = "ee" + +grabflag = 0 +linkflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-h": + if iarg+3 > nargs: error() + homepath = args[iarg+1] + homedir = args[iarg+2] + iarg += 3 + elif args[iarg] == "-g": + grabflag = 1 + iarg += 1 + elif args[iarg] == "-l": + linkflag = 1 + iarg += 1 + else: error() + +homepath = fullpath(homepath) +if not os.path.isdir(homepath): error("Eigen path does not exist") + +# download and unpack Eigen tarball +# glob to find name of dir it unpacks to + +if grabflag: + print "Downloading Eigen ..." + cmd = "curl -L %s > %s/%s" % (url,homepath,tarball) + print cmd + print commands.getoutput(cmd) + + print "Unpacking Eigen tarball ..." + edir = glob.glob("%s/eigen-eigen-*" % homepath) + for one in edir: + if os.path.isdir(one): commands.getoutput("rm -rf %s" % one) + cmd = "cd %s; tar zxvf %s" % (homepath,tarball) + commands.getoutput(cmd) + if homedir != "ee": + if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir) + edir = glob.glob("%s/eigen-eigen-*" % homepath) + os.rename(edir[0],"%s/%s" % (homepath,homedir)) + +# create link in lib/smd to Eigen src dir + +if linkflag: + print "Creating link to Eigen files" + if os.path.isfile("includelink") or os.path.islink("includelink"): + os.remove("includelink") + if homedir == "ee": + edir = glob.glob("%s/eigen-eigen-*" % homepath) + linkdir = edir[0] + else: linkdir = "%s/%s" % (homepath,homedir) + cmd = "ln -s %s includelink" % linkdir + commands.getoutput(cmd) diff --git a/lib/smd/README b/lib/smd/README index 846c440dae..1bd5902a1f 100644 --- a/lib/smd/README +++ b/lib/smd/README @@ -4,9 +4,12 @@ to use the USER-SMD package in a LAMMPS input script. The Eigen library is available at http://eigen.tuxfamily.org. It's a general C++ template library for linear algebra. -You must perform the following steps yourself, or you can use the -install.py Python script to automate any or all steps of the process. -Type "python install.py" for instructions. +You can type "make lib-smd" from the src directory to see help on how +to download build this library via make commands, or you can do the +same thing by typing "python Install.py" from within this directory, +or you can do it manually by following the instructions below. + +Instructions: 1. Download the Eigen tarball at http://eigen.tuxfamily.org and unpack the tarball either in this /lib/smd directory or somewhere diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py index 8ae08917e5..7d847183b3 100644 --- a/lib/voronoi/Install.py +++ b/lib/voronoi/Install.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# install.py tool to download, unpack, build, and link to the Voro++ library +# Install.py tool to download, unpack, build, and link to the Voro++ library # used to automate the steps described in the README file in this dir import sys,os,re,urllib,commands @@ -8,19 +8,20 @@ import sys,os,re,urllib,commands # help message help = """ -Syntax: install.py -v version -g gdir [gname] -b bdir -l ldir +Syntax: python Install.py -v version -h hpath hdir -g -b -l specify one or more options, order does not matter - gdir,bdir,ldir can be paths relative to lib/latte, full paths, or contain ~ -v = version of Voro++ to download and build - default = voro++-0.4.6 (current as of Jan 2015) - -g = grab (download) from math.lbl.gov/voro++ website - unpack tarfile in gdir to produce version dir (e.g. voro++-0.4.6) - if optional gname specified, rename version dir to gname within gdir - -b = build Voro++, bdir = Voro++ home directory - note that bdir must include the version suffix unless renamed - -l = create 2 softlinks (includelink,liblink) - in lib/voronoi to src dir of ldir = Voro++ home directory - note that ldir must include the version suffix unless renamed + default version = voro++-0.4.6 (current as of Jan 2015) + -h = set home dir of Voro++ to be hpath/hdir + hpath can be full path, contain '~' or '.' chars + default hpath = . = lib/voronoi + default hdir = voro++-0.4.6 = what tarball unpacks to + -g = grab (download) tarball from math.lbl.gov/voro++ website + unpack it to hpath/hdir + hpath must already exist + if hdir already exists, it will be deleted before unpack + -b = build Voro++ library in its src dir + -l = create 2 softlinks (includelink,liblink) in lib/voronoi to Voro++ src dir """ # settings @@ -47,6 +48,9 @@ args = sys.argv[1:] nargs = len(args) if nargs == 0: error() +homepath = "." +homedir = version + grabflag = 0 buildflag = 0 linkflag = 0 @@ -56,49 +60,47 @@ while iarg < nargs: if args[iarg] == "-v": if iarg+2 > nargs: error() version = args[iarg+1] - iarg += 2 + iarg += 2 + elif args[iarg] == "-h": + if iarg+3 > nargs: error() + homepath = args[iarg+1] + homedir = args[iarg+2] + iarg += 3 elif args[iarg] == "-g": - if iarg+2 > nargs: error() grabflag = 1 - grabdir = args[iarg+1] - grabname = None - if iarg+2 < nargs and args[iarg+2][0] != '-': - grabname = args[iarg+2] - iarg += 1 - iarg += 2 + iarg += 1 elif args[iarg] == "-b": - if iarg+2 > nargs: error() buildflag = 1 - builddir = args[iarg+1] - iarg += 2 + iarg += 1 elif args[iarg] == "-l": - if iarg+2 > nargs: error() linkflag = 1 - linkdir = args[iarg+1] - iarg += 2 + iarg += 1 else: error() +homepath = fullpath(homepath) +if not os.path.isdir(homepath): error("Voro++ path does not exist") +homedir = "%s/%s" % (homepath,homedir) + # download and unpack Voro++ tarball if grabflag: print "Downloading Voro++ ..." - grabdir = fullpath(grabdir) - if not os.path.isdir(grabdir): error("Grab directory does not exist") - urllib.urlretrieve(url,"%s/%s.tar.gz" % (grabdir,version)) + urllib.urlretrieve(url,"%s/%s.tar.gz" % (homepath,version)) print "Unpacking Voro++ tarball ..." - tardir = "%s/%s" % (grabdir,version) - if os.path.exists(tardir): commands.getoutput("rm -rf %s" % tardir) - cmd = "cd %s; tar zxvf %s.tar.gz" % (grabdir,version) - txt = commands.getoutput(cmd) - print tardir,grabdir,grabname - if grabname: os.rename(tardir,"%s/%s" % (grabdir,grabname)) + if os.path.exists("%s/%s" % (homepath,version)): + commands.getoutput("rm -rf %s/%s" % (homepath,version)) + cmd = "cd %s; tar zxvf %s.tar.gz" % (homepath,version) + commands.getoutput(cmd) + if os.path.basename(homedir) != version: + if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir) + os.rename("%s/%s" % (homepath,version),homedir) # build Voro++ if buildflag: print "Building Voro++ ..." - cmd = "cd %s; make" % builddir + cmd = "cd %s; make" % homedir txt = commands.getoutput(cmd) print txt @@ -110,7 +112,7 @@ if linkflag: os.remove("includelink") if os.path.isfile("liblink") or os.path.islink("liblink"): os.remove("liblink") - cmd = "ln -s %s/src includelink" % linkdir + cmd = "ln -s %s/src includelink" % homedir commands.getoutput(cmd) - cmd = "ln -s %s/src liblink" % linkdir + cmd = "ln -s %s/src liblink" % homedir commands.getoutput(cmd) diff --git a/lib/voronoi/README b/lib/voronoi/README index 2507a9bae4..9863632be0 100644 --- a/lib/voronoi/README +++ b/lib/voronoi/README @@ -6,11 +6,15 @@ The Voro++ library is available at http://math.lbl.gov/voro++ and was developed by Chris H. Rycroft while at UC Berkeley / Lawrence Berkeley Laboratory. +You can type "make lib-voronoi" from the src directory to see help on +how to download and build this library via make commands, or you can +do the same thing by typing "python Install.py" from within this +directory, or you can do it manually by following the instructions +below. + ----------------- -You must perform the following steps yourself, or you can use the -Install.py Python script to automate any or all steps of the process. -Type "python Install.py" for instructions. +Instructions: 1. Download Voro++ at http://math.lbl.gov/voro++/download either as a tarball or via SVN, and unpack the diff --git a/lib/vtk/Makefile.lammps b/lib/vtk/Makefile.lammps index e3b28ed928..b86856a9c6 100644 --- a/lib/vtk/Makefile.lammps +++ b/lib/vtk/Makefile.lammps @@ -1,13 +1,12 @@ # Settings that the LAMMPS build will import when this package library is used -# + # settings for VTK-5.8.0 on RHEL/CentOS 6.x vtk_SYSINC = -I/usr/include/vtk vtk_SYSLIB = -lvtkCommon -lvtkIO vtk_SYSPATH = -L/usr/lib64/vtk -# + # settings for VTK 6.2.0 on Fedora 23 #vtk_SYSINC = -I/usr/include/vtk #vtk_SYSLIB = -lvtkCommonCore -lvtkIOCore -lvtkCommonDataModel -lvtkIOXML -lvtkIOLegacy -lvtkIOParallelXML #vtk_SYSPATH = -L/usr/lib64/vtk -# diff --git a/lib/vtk/README b/lib/vtk/README index 11add94f52..61e2a40c23 100644 --- a/lib/vtk/README +++ b/lib/vtk/README @@ -1,14 +1,15 @@ -The Makefile.lammps file in this directory is used when building LAMMPS with -its USER-VTK package installed. The file has several settings needed to -compile and link LAMMPS with the VTK library. You should choose a -Makefile.lammps.* file compatible with your system and your version of VTK, and -copy it to Makefile.lammps before building LAMMPS itself. You may need to edit -one of the provided files to match your system. +The Makefile.lammps file in this directory is used when building +LAMMPS with its USER-VTK package installed. The file has several +settings needed to compile and link LAMMPS with the VTK library. You +should choose a Makefile.lammps.* file compatible with your system and +your version of VTK, and copy it to Makefile.lammps before building +LAMMPS itself. You may need to edit one of the provided files to +match your system. -If you create a new Makefile.lammps file suitable for some version of VTK on -some system, that is not a match to one of the provided Makefile.lammps.* -files, you can send it to the developers, and we can include it in the -distribution for others to use. +If you create a new Makefile.lammps file suitable for some version of +VTK on some system, that is not a match to one of the provided +Makefile.lammps.* files, you can send it to the developers, and we can +include it in the distribution for others to use. To illustrate, these are example settings from the Makefile.lammps.ubuntu14.04_vtk6 file: @@ -19,10 +20,11 @@ vtk_SYSPATH = vtk_SYSINC refers to the include directory of the installed VTK library -vtk_SYSLIB refers to the libraries needed to link to from an application -(LAMMPS in this case) to "embed" VTK in the application. VTK consists of -multiple shared libraries which are needed when using the USER-VTK package. +vtk_SYSLIB refers to the libraries needed to link to from an +application (LAMMPS in this case) to "embed" VTK in the +application. VTK consists of multiple shared libraries which are +needed when using the USER-VTK package. -vtk_SYSPATH = refers to the path (e.g. -L/usr/local/lib) where the VTK library -can be found. You may not need this setting if the path is already included in -your LD_LIBRARY_PATH environment variable. +vtk_SYSPATH = refers to the path (e.g. -L/usr/local/lib) where the VTK +library can be found. You may not need this setting if the path is +already included in your LD_LIBRARY_PATH environment variable. diff --git a/src/KOKKOS/pair_reax_c_kokkos.cpp b/src/KOKKOS/pair_reax_c_kokkos.cpp index acf9c754cd..a1f388b4f9 100644 --- a/src/KOKKOS/pair_reax_c_kokkos.cpp +++ b/src/KOKKOS/pair_reax_c_kokkos.cpp @@ -2294,12 +2294,12 @@ void PairReaxCKokkos::operator()(PairReaxComputeMulti2 0) + if (numbonds > 0 || control->enobondsflag) e_lp = p_lp2 * d_Delta_lp[i] * inv_expvd2; const F_FLOAT dElp = p_lp2 * inv_expvd2 + 75.0 * p_lp2 * d_Delta_lp[i] * expvd2 * inv_expvd2*inv_expvd2; const F_FLOAT CElp = dElp * d_dDelta_lp[i]; - if (numbonds > 0) + if (numbonds > 0 || control->enobondsflag) a_CdDelta[i] += CElp; if (eflag) ev.ereax[0] += e_lp; @@ -2336,7 +2336,7 @@ void PairReaxCKokkos::operator()(PairReaxComputeMulti2 0) + if (numbonds > 0 || control->enobondsflag) e_un = -p_ovun5 * (1.0 - exp_ovun6) * inv_exp_ovun2n * inv_exp_ovun8; if (eflag) ev.ereax[2] += e_un; @@ -2356,7 +2356,7 @@ void PairReaxCKokkos::operator()(PairReaxComputeMulti2 0) + if (numbonds > 0 || control->enobondsflag) a_CdDelta[i] += CEunder3; const int j_start = d_bo_first[i]; diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index 11c7a147e7..6e17a9bbd7 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -57,6 +57,10 @@ PairLJCharmmfswCoulLong::PairLJCharmmfswCoulLong(LAMMPS *lmp) : Pair(lmp) implicit = 0; mix_flag = ARITHMETIC; writedata = 1; + + // short-range/long-range flag accessed by DihedralCharmmfsw + + dihedflag = 1; } /* ---------------------------------------------------------------------- */ @@ -669,10 +673,6 @@ void PairLJCharmmfswCoulLong::settings(int narg, char **arg) cut_lj = force->numeric(FLERR,arg[1]); if (narg == 2) cut_coul = cut_lj; else cut_coul = force->numeric(FLERR,arg[2]); - - // indicates pair_style being used for dihedral_charmm - - dihedflag = 1; } /* ---------------------------------------------------------------------- diff --git a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp index c75da63cae..af19f3eb3b 100644 --- a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp +++ b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp @@ -42,6 +42,10 @@ PairLJCharmmfswCoulCharmmfsh::PairLJCharmmfswCoulCharmmfsh(LAMMPS *lmp) : implicit = 0; mix_flag = ARITHMETIC; writedata = 1; + + // short-range/long-range flag accessed by DihedralCharmmfsw + + dihedflag = 0; } /* ---------------------------------------------------------------------- */ @@ -235,10 +239,6 @@ void PairLJCharmmfswCoulCharmmfsh::settings(int narg, char **arg) } else { cut_coul = force->numeric(FLERR,arg[2]); } - - // indicates pair_style being used for dihedral_charmm - - dihedflag = 0; } /* ---------------------------------------------------------------------- @@ -535,7 +535,7 @@ void *PairLJCharmmfswCoulCharmmfsh::extract(const char *str, int &dim) dim = 0; if (strcmp(str,"implicit") == 0) return (void *) &implicit; - // info extracted by dihedral_charmmf + // info extracted by dihedral_charmmfsw if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul; if (strcmp(str,"cut_lj_inner") == 0) return (void *) &cut_lj_inner; diff --git a/src/Makefile b/src/Makefile index 527e197964..60c939bab2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -46,39 +46,37 @@ endif # PACKAGE = standard packages # PACKUSER = user packagse # PACKLIB = all packages that require an additional lib +# should be PACKSYS + PACKINT + PACKEXT # PACKSYS = subset that reqiure a common system library +# include MPIIO and LB b/c require full MPI, not just STUBS # PACKINT = subset that require an internal (provided) library # PACKEXT = subset that require an external (downloaded) library -# PACKLIB = PACKSYS + PACKING + PACKEXT -# PACKSCRIPT = libs under lammps/lib that have an Install.py script PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ granular kim kokkos kspace manybody mc meam misc molecule \ mpiio mscg opt peri poems \ python qeq reax replica rigid shock snap srd voronoi -PACKUSER = user-atc user-awpmd user-cgsdk user-cgdna user-colvars \ +PACKUSER = user-atc user-awpmd user-cgdna user-cgsdk user-colvars \ user-diffraction user-dpd user-drude user-eff user-fep user-h5md \ user-intel user-lb user-manifold user-mgpt user-misc user-molfile \ - user-nc-dump user-omp user-phonon user-qmmm user-qtb \ + user-netcdf user-omp user-phonon user-qmmm user-qtb \ user-quip user-reaxc user-smd user-smtbq user-sph user-tally \ user-vtk PACKLIB = compress gpu kim kokkos meam mpiio mscg poems \ python reax voronoi \ - user-atc user-awpmd user-colvars user-h5md user-molfile \ - user-nc-dump user-qmmm user-quip user-smd user-vtk + user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \ + user-netcdf user-qmmm user-quip user-smd user-vtk -PACKSYS = compress mpiio python +PACKSYS = compress mpiio python user-lb PACKINT = gpu kokkos meam poems reax user-atc user-awpmd user-colvars PACKEXT = kim mscg voronoi \ - user-h5md user-molfile user-nc-dump user-qmmm user-quip \ + user-h5md user-molfile user-netcdf user-qmmm user-quip \ user-smd user-vtk -PACKSCRIPT = voronoi - PACKALL = $(PACKAGE) $(PACKUSER) PACKAGEUC = $(shell echo $(PACKAGE) | tr a-z A-Z) @@ -87,6 +85,7 @@ PACKUSERUC = $(shell echo $(PACKUSER) | tr a-z A-Z) YESDIR = $(shell echo $(@:yes-%=%) | tr a-z A-Z) NODIR = $(shell echo $(@:no-%=%) | tr a-z A-Z) LIBDIR = $(shell echo $(@:lib-%=%)) +LIBUSERDIR = $(shell echo $(@:lib-user-%=%)) # List of all targets @@ -108,7 +107,7 @@ help: @echo 'make no-standard (no-std) remove all standard pkgs' @echo 'make yes-user install all user pkgs' @echo 'make no-user remove all user pkgs' - @echo 'make yes-lib install all pkgs with libs (incldued or ext)' + @echo 'make yes-lib install all pkgs with libs (included or ext)' @echo 'make no-lib remove all pkgs with libs (included or ext)' @echo 'make yes-ext install all pkgs with external libs' @echo 'make no-ext remove all pkgs with external libs' @@ -273,7 +272,7 @@ package: @echo 'make package-overwrite replace package files with src files' @echo 'make package-diff (pd) diff src files against package file' @echo '' - @echo 'make lib-package download/build/install a package library' + @echo 'make lib-package build and/or download a package library' yes-all: @for p in $(PACKALL); do $(MAKE) yes-$$p; done @@ -338,11 +337,14 @@ no-%: # download/build/install a package library lib-%: - @if [ ! -e ../lib/$(LIBDIR)/Install.py ]; then \ - echo "Install script for lib $(@:lib-%=%) does not exist"; \ - else \ - echo "Installing lib for package $(@:lib-%=%)"; \ + @if [ -e ../lib/$(LIBDIR)/Install.py ]; then \ + echo "Installing lib $(@:lib-%=%)"; \ cd ../lib/$(LIBDIR); python Install.py $(args); \ + elif [ -e ../lib/$(LIBUSERDIR)/Install.py ]; then \ + echo "Installing lib $(@:lib-user-%=%)"; \ + cd ../lib/$(LIBUSERDIR); python Install.py $(args); \ + else \ + echo "Install script for lib $(@:lib-%=%) does not exist"; \ fi; # status = list src files that differ from package files diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 1fe704efb0..5c993ee859 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -1419,12 +1419,14 @@ void FixShake::shake(int m) domain->minimum_image(r01); // s01 = distance vec after unconstrained update, with PBC + // use Domain::minimum_image_once(), not minimum_image() + // b/c xshake values might be huge, due to e.g. fix gcmc double s01[3]; s01[0] = xshake[i0][0] - xshake[i1][0]; s01[1] = xshake[i0][1] - xshake[i1][1]; s01[2] = xshake[i0][2] - xshake[i1][2]; - domain->minimum_image(s01); + domain->minimum_image_once(s01); // scalar distances between atoms @@ -1526,18 +1528,20 @@ void FixShake::shake3(int m) domain->minimum_image(r02); // s01,s02 = distance vec after unconstrained update, with PBC + // use Domain::minimum_image_once(), not minimum_image() + // b/c xshake values might be huge, due to e.g. fix gcmc double s01[3]; s01[0] = xshake[i0][0] - xshake[i1][0]; s01[1] = xshake[i0][1] - xshake[i1][1]; s01[2] = xshake[i0][2] - xshake[i1][2]; - domain->minimum_image(s01); + domain->minimum_image_once(s01); double s02[3]; s02[0] = xshake[i0][0] - xshake[i2][0]; s02[1] = xshake[i0][1] - xshake[i2][1]; s02[2] = xshake[i0][2] - xshake[i2][2]; - domain->minimum_image(s02); + domain->minimum_image_once(s02); // scalar distances between atoms @@ -1699,24 +1703,26 @@ void FixShake::shake4(int m) domain->minimum_image(r03); // s01,s02,s03 = distance vec after unconstrained update, with PBC + // use Domain::minimum_image_once(), not minimum_image() + // b/c xshake values might be huge, due to e.g. fix gcmc double s01[3]; s01[0] = xshake[i0][0] - xshake[i1][0]; s01[1] = xshake[i0][1] - xshake[i1][1]; s01[2] = xshake[i0][2] - xshake[i1][2]; - domain->minimum_image(s01); + domain->minimum_image_once(s01); double s02[3]; s02[0] = xshake[i0][0] - xshake[i2][0]; s02[1] = xshake[i0][1] - xshake[i2][1]; s02[2] = xshake[i0][2] - xshake[i2][2]; - domain->minimum_image(s02); + domain->minimum_image_once(s02); double s03[3]; s03[0] = xshake[i0][0] - xshake[i3][0]; s03[1] = xshake[i0][1] - xshake[i3][1]; s03[2] = xshake[i0][2] - xshake[i3][2]; - domain->minimum_image(s03); + domain->minimum_image_once(s03); // scalar distances between atoms @@ -1941,24 +1947,26 @@ void FixShake::shake3angle(int m) domain->minimum_image(r12); // s01,s02,s12 = distance vec after unconstrained update, with PBC + // use Domain::minimum_image_once(), not minimum_image() + // b/c xshake values might be huge, due to e.g. fix gcmc double s01[3]; s01[0] = xshake[i0][0] - xshake[i1][0]; s01[1] = xshake[i0][1] - xshake[i1][1]; s01[2] = xshake[i0][2] - xshake[i1][2]; - domain->minimum_image(s01); + domain->minimum_image_once(s01); double s02[3]; s02[0] = xshake[i0][0] - xshake[i2][0]; s02[1] = xshake[i0][1] - xshake[i2][1]; s02[2] = xshake[i0][2] - xshake[i2][2]; - domain->minimum_image(s02); + domain->minimum_image_once(s02); double s12[3]; s12[0] = xshake[i1][0] - xshake[i2][0]; s12[1] = xshake[i1][1] - xshake[i2][1]; s12[2] = xshake[i1][2] - xshake[i2][2]; - domain->minimum_image(s12); + domain->minimum_image_once(s12); // scalar distances between atoms @@ -2055,6 +2063,7 @@ void FixShake::shake3angle(int m) double quad1,quad2,quad3,b1,b2,b3,lamda01_new,lamda02_new,lamda12_new; while (!done && niter < max_iter) { + quad1 = quad1_0101 * lamda01*lamda01 + quad1_0202 * lamda02*lamda02 + quad1_1212 * lamda12*lamda12 + diff --git a/src/SNAP/compute_sna_atom.cpp b/src/SNAP/compute_sna_atom.cpp index ad934535ab..cba6fae9b7 100644 --- a/src/SNAP/compute_sna_atom.cpp +++ b/src/SNAP/compute_sna_atom.cpp @@ -48,7 +48,8 @@ ComputeSNAAtom::ComputeSNAAtom(LAMMPS *lmp, int narg, char **arg) : diagonalstyle = 0; rmin0 = 0.0; switchflag = 1; - bzeroflag = 0; + bzeroflag = 1; + quadraticflag = 0; // offset by 1 to match up with types @@ -106,6 +107,11 @@ ComputeSNAAtom::ComputeSNAAtom(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Illegal compute sna/atom command"); bzeroflag = atoi(arg[iarg+1]); iarg += 2; + } else if (strcmp(arg[iarg],"quadraticflag") == 0) { + if (iarg+2 > narg) + error->all(FLERR,"Illegal compute sna/atom command"); + quadraticflag = atoi(arg[iarg+1]); + iarg += 2; } else error->all(FLERR,"Illegal compute sna/atom command"); } @@ -122,8 +128,9 @@ ComputeSNAAtom::ComputeSNAAtom(LAMMPS *lmp, int narg, char **arg) : } ncoeff = snaptr[0]->ncoeff; - peratom_flag = 1; size_peratom_cols = ncoeff; + if (quadraticflag) size_peratom_cols += ncoeff*ncoeff; + peratom_flag = 1; nmax = 0; njmax = 0; @@ -264,8 +271,16 @@ void ComputeSNAAtom::compute_peratom() snaptr[tid]->copy_bi2bvec(); for (int icoeff = 0; icoeff < ncoeff; icoeff++) sna[i][icoeff] = snaptr[tid]->bvec[icoeff]; + if (quadraticflag) { + int ncount = ncoeff; + for (int icoeff = 0; icoeff < ncoeff; icoeff++) { + double bi = snaptr[tid]->bvec[icoeff]; + for (int jcoeff = 0; jcoeff < ncoeff; jcoeff++) + sna[i][ncount++] = bi*snaptr[tid]->bvec[jcoeff]; + } + } } else { - for (int icoeff = 0; icoeff < ncoeff; icoeff++) + for (int icoeff = 0; icoeff < size_peratom_cols; icoeff++) sna[i][icoeff] = 0.0; } } diff --git a/src/SNAP/compute_sna_atom.h b/src/SNAP/compute_sna_atom.h index af62d7cf3b..b22eea71b5 100644 --- a/src/SNAP/compute_sna_atom.h +++ b/src/SNAP/compute_sna_atom.h @@ -44,7 +44,7 @@ class ComputeSNAAtom : public Compute { double *wjelem; class SNA** snaptr; double cutmax; - + int quadraticflag; }; } diff --git a/src/SNAP/compute_snad_atom.cpp b/src/SNAP/compute_snad_atom.cpp index 73452427bd..39f34dd8cd 100644 --- a/src/SNAP/compute_snad_atom.cpp +++ b/src/SNAP/compute_snad_atom.cpp @@ -48,9 +48,11 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : diagonalstyle = 0; rmin0 = 0.0; switchflag = 1; - bzeroflag = 0; + bzeroflag = 1; + quadraticflag = 0; // process required arguments + memory->create(radelem,ntypes+1,"sna/atom:radelem"); // offset by 1 to match up with types memory->create(wjelem,ntypes+1,"sna/atom:wjelem"); rcutfac = atof(arg[3]); @@ -60,11 +62,15 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : radelem[i+1] = atof(arg[6+i]); for(int i = 0; i < ntypes; i++) wjelem[i+1] = atof(arg[6+ntypes+i]); + // construct cutsq + double cut; + cutmax = 0.0; memory->create(cutsq,ntypes+1,ntypes+1,"sna/atom:cutsq"); for(int i = 1; i <= ntypes; i++) { cut = 2.0*radelem[i]*rcutfac; + if (cut > cutmax) cutmax = cut; cutsq[i][i] = cut*cut; for(int j = i+1; j <= ntypes; j++) { cut = (radelem[i]+radelem[j])*rcutfac; @@ -94,6 +100,11 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Illegal compute snad/atom command"); switchflag = atoi(arg[iarg+1]); iarg += 2; + } else if (strcmp(arg[iarg],"quadraticflag") == 0) { + if (iarg+2 > narg) + error->all(FLERR,"Illegal compute snad/atom command"); + quadraticflag = atoi(arg[iarg+1]); + iarg += 2; } else error->all(FLERR,"Illegal compute snad/atom command"); } @@ -110,9 +121,19 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : } ncoeff = snaptr[0]->ncoeff; - peratom_flag = 1; - size_peratom_cols = 3*ncoeff*atom->ntypes; + twoncoeff = 2*ncoeff; + threencoeff = 3*ncoeff; + size_peratom_cols = threencoeff*atom->ntypes; + if (quadraticflag) { + ncoeffsq = ncoeff*ncoeff; + twoncoeffsq = 2*ncoeffsq; + threencoeffsq = 3*ncoeffsq; + size_peratom_cols += + threencoeffsq*atom->ntypes; + } comm_reverse = size_peratom_cols; + peratom_flag = 1; + nmax = 0; njmax = 0; snad = NULL; @@ -136,10 +157,9 @@ void ComputeSNADAtom::init() { if (force->pair == NULL) error->all(FLERR,"Compute snad/atom requires a pair style be defined"); - // TODO: Not sure what to do with this error check since cutoff radius is not - // a single number - //if (sqrt(cutsq) > force->pair->cutforce) - //error->all(FLERR,"Compute snad/atom cutoff is longer than pairwise cutoff"); + + if (cutmax > force->pair->cutforce) + error->all(FLERR,"Compute sna/atom cutoff is longer than pairwise cutoff"); // need an occasional full neighbor list @@ -228,7 +248,9 @@ void ComputeSNADAtom::compute_peratom() const int* const jlist = firstneigh[i]; const int jnum = numneigh[i]; - const int typeoffset = 3*ncoeff*(atom->type[i]-1); + const int typeoffset = threencoeff*(atom->type[i]-1); + const int quadraticoffset = threencoeff*atom->ntypes + + threencoeffsq*(atom->type[i]-1); // insure rij, inside, and typej are of size jnum @@ -262,7 +284,11 @@ void ComputeSNADAtom::compute_peratom() snaptr[tid]->compute_ui(ninside); snaptr[tid]->compute_zi(); - + if (quadraticflag) { + snaptr[tid]->compute_bi(); + snaptr[tid]->copy_bi2bvec(); + } + for (int jj = 0; jj < ninside; jj++) { const int j = snaptr[tid]->inside[jj]; snaptr[tid]->compute_duidrj(snaptr[tid]->rij[jj], @@ -279,11 +305,38 @@ void ComputeSNADAtom::compute_peratom() for (int icoeff = 0; icoeff < ncoeff; icoeff++) { snadi[icoeff] += snaptr[tid]->dbvec[icoeff][0]; snadi[icoeff+ncoeff] += snaptr[tid]->dbvec[icoeff][1]; - snadi[icoeff+2*ncoeff] += snaptr[tid]->dbvec[icoeff][2]; + snadi[icoeff+twoncoeff] += snaptr[tid]->dbvec[icoeff][2]; snadj[icoeff] -= snaptr[tid]->dbvec[icoeff][0]; snadj[icoeff+ncoeff] -= snaptr[tid]->dbvec[icoeff][1]; - snadj[icoeff+2*ncoeff] -= snaptr[tid]->dbvec[icoeff][2]; + snadj[icoeff+twoncoeff] -= snaptr[tid]->dbvec[icoeff][2]; } + + if (quadraticflag) { + double *snadi = snad[i]+quadraticoffset; + double *snadj = snad[j]+quadraticoffset; + int ncount = 0; + for (int icoeff = 0; icoeff < ncoeff; icoeff++) { + double bi = snaptr[tid]->bvec[icoeff]; + double bix = snaptr[tid]->dbvec[icoeff][0]; + double biy = snaptr[tid]->dbvec[icoeff][1]; + double biz = snaptr[tid]->dbvec[icoeff][2]; + for (int jcoeff = 0; jcoeff < ncoeff; jcoeff++) { + double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0] + + bix*snaptr[tid]->bvec[jcoeff]; + double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1] + + biy*snaptr[tid]->bvec[jcoeff]; + double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2] + + biz*snaptr[tid]->bvec[jcoeff]; + snadi[ncount] += dbxtmp; + snadi[ncount+ncoeffsq] += dbytmp; + snadi[ncount+twoncoeffsq] += dbztmp; + snadj[ncount] -= dbxtmp; + snadj[ncount+ncoeffsq] -= dbytmp; + snadj[ncount+twoncoeffsq] -= dbztmp; + ncount++; + } + } + } } } } @@ -331,7 +384,8 @@ double ComputeSNADAtom::memory_usage() double bytes = nmax*size_peratom_cols * sizeof(double); bytes += 3*njmax*sizeof(double); bytes += njmax*sizeof(int); - bytes += ncoeff*3; + bytes += threencoeff*atom->ntypes; + if (quadraticflag) bytes += threencoeffsq*atom->ntypes; bytes += snaptr[0]->memory_usage()*comm->nthreads; return bytes; } diff --git a/src/SNAP/compute_snad_atom.h b/src/SNAP/compute_snad_atom.h index 31f5bf252d..0d5a369ab6 100644 --- a/src/SNAP/compute_snad_atom.h +++ b/src/SNAP/compute_snad_atom.h @@ -37,7 +37,7 @@ class ComputeSNADAtom : public Compute { private: int nmax, njmax, diagonalstyle; - int ncoeff; + int ncoeff, twoncoeff, threencoeff, ncoeffsq, twoncoeffsq, threencoeffsq; double **cutsq; class NeighList *list; double **snad; @@ -45,7 +45,8 @@ class ComputeSNADAtom : public Compute { double *radelem; double *wjelem; class SNA** snaptr; - + double cutmax; + int quadraticflag; }; } diff --git a/src/SNAP/compute_snav_atom.cpp b/src/SNAP/compute_snav_atom.cpp index f75b02fba7..0d21d16561 100644 --- a/src/SNAP/compute_snav_atom.cpp +++ b/src/SNAP/compute_snav_atom.cpp @@ -38,8 +38,6 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : radelem = NULL; wjelem = NULL; - nvirial = 6; - int ntypes = atom->ntypes; int nargmin = 6+2*ntypes; @@ -50,9 +48,11 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : diagonalstyle = 0; rmin0 = 0.0; switchflag = 1; - bzeroflag = 0; + bzeroflag = 1; + quadraticflag = 0; // process required arguments + memory->create(radelem,ntypes+1,"sna/atom:radelem"); // offset by 1 to match up with types memory->create(wjelem,ntypes+1,"sna/atom:wjelem"); rcutfac = atof(arg[3]); @@ -96,6 +96,11 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Illegal compute snav/atom command"); switchflag = atoi(arg[iarg+1]); iarg += 2; + } else if (strcmp(arg[iarg],"quadraticflag") == 0) { + if (iarg+2 > narg) + error->all(FLERR,"Illegal compute snav/atom command"); + quadraticflag = atoi(arg[iarg+1]); + iarg += 2; } else error->all(FLERR,"Illegal compute snav/atom command"); } @@ -112,9 +117,24 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : } ncoeff = snaptr[0]->ncoeff; - peratom_flag = 1; - size_peratom_cols = nvirial*ncoeff*atom->ntypes; + twoncoeff = 2*ncoeff; + threencoeff = 3*ncoeff; + fourncoeff = 4*ncoeff; + fivencoeff = 5*ncoeff; + sixncoeff = 6*ncoeff; + size_peratom_cols = sixncoeff*atom->ntypes; + if (quadraticflag) { + ncoeffsq = ncoeff*ncoeff; + twoncoeffsq = 2*ncoeffsq; + threencoeffsq = 3*ncoeffsq; + fourncoeffsq = 4*ncoeffsq; + fivencoeffsq = 5*ncoeffsq; + sixncoeffsq = 6*ncoeffsq; + size_peratom_cols += + sixncoeffsq*atom->ntypes; + } comm_reverse = size_peratom_cols; + peratom_flag = 1; nmax = 0; njmax = 0; @@ -231,7 +251,9 @@ void ComputeSNAVAtom::compute_peratom() const int* const jlist = firstneigh[i]; const int jnum = numneigh[i]; - const int typeoffset = nvirial*ncoeff*(atom->type[i]-1); + const int typeoffset = sixncoeff*(atom->type[i]-1); + const int quadraticoffset = sixncoeff*atom->ntypes + + sixncoeffsq*(atom->type[i]-1); // insure rij, inside, and typej are of size jnum @@ -265,6 +287,10 @@ void ComputeSNAVAtom::compute_peratom() snaptr[tid]->compute_ui(ninside); snaptr[tid]->compute_zi(); + if (quadraticflag) { + snaptr[tid]->compute_bi(); + snaptr[tid]->copy_bi2bvec(); + } for (int jj = 0; jj < ninside; jj++) { const int j = snaptr[tid]->inside[jj]; @@ -281,19 +307,52 @@ void ComputeSNAVAtom::compute_peratom() double *snavj = snav[j]+typeoffset; for (int icoeff = 0; icoeff < ncoeff; icoeff++) { - snavi[icoeff] += snaptr[tid]->dbvec[icoeff][0]*xtmp; - snavi[icoeff+ncoeff] += snaptr[tid]->dbvec[icoeff][1]*ytmp; - snavi[icoeff+2*ncoeff] += snaptr[tid]->dbvec[icoeff][2]*ztmp; - snavi[icoeff+3*ncoeff] += snaptr[tid]->dbvec[icoeff][1]*ztmp; - snavi[icoeff+4*ncoeff] += snaptr[tid]->dbvec[icoeff][0]*ztmp; - snavi[icoeff+5*ncoeff] += snaptr[tid]->dbvec[icoeff][0]*ytmp; - snavj[icoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][0]; - snavj[icoeff+ncoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][1]; - snavj[icoeff+2*ncoeff] -= snaptr[tid]->dbvec[icoeff][2]*x[j][2]; - snavj[icoeff+3*ncoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][2]; - snavj[icoeff+4*ncoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][2]; - snavj[icoeff+5*ncoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][1]; + snavi[icoeff] += snaptr[tid]->dbvec[icoeff][0]*xtmp; + snavi[icoeff+ncoeff] += snaptr[tid]->dbvec[icoeff][1]*ytmp; + snavi[icoeff+twoncoeff] += snaptr[tid]->dbvec[icoeff][2]*ztmp; + snavi[icoeff+threencoeff] += snaptr[tid]->dbvec[icoeff][1]*ztmp; + snavi[icoeff+fourncoeff] += snaptr[tid]->dbvec[icoeff][0]*ztmp; + snavi[icoeff+fivencoeff] += snaptr[tid]->dbvec[icoeff][0]*ytmp; + snavj[icoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][0]; + snavj[icoeff+ncoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][1]; + snavj[icoeff+twoncoeff] -= snaptr[tid]->dbvec[icoeff][2]*x[j][2]; + snavj[icoeff+threencoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][2]; + snavj[icoeff+fourncoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][2]; + snavj[icoeff+fivencoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][1]; } + + if (quadraticflag) { + double *snavi = snav[i]+quadraticoffset; + double *snavj = snav[j]+quadraticoffset; + int ncount = 0; + for (int icoeff = 0; icoeff < ncoeff; icoeff++) { + double bi = snaptr[tid]->bvec[icoeff]; + double bix = snaptr[tid]->dbvec[icoeff][0]; + double biy = snaptr[tid]->dbvec[icoeff][1]; + double biz = snaptr[tid]->dbvec[icoeff][2]; + for (int jcoeff = 0; jcoeff < ncoeff; jcoeff++) { + double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0] + + bix*snaptr[tid]->bvec[jcoeff]; + double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1] + + biy*snaptr[tid]->bvec[jcoeff]; + double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2] + + biz*snaptr[tid]->bvec[jcoeff]; + snavi[ncount] += dbxtmp*xtmp; + snavi[ncount+ncoeffsq] += dbytmp*ytmp; + snavi[ncount+twoncoeffsq] += dbztmp*ztmp; + snavi[ncount+threencoeffsq] += dbytmp*ztmp; + snavi[ncount+fourncoeffsq] += dbxtmp*ztmp; + snavi[ncount+fivencoeffsq] += dbxtmp*ytmp; + snavj[ncount] -= dbxtmp*x[j][0]; + snavj[ncount+ncoeffsq] -= dbytmp*x[j][1]; + snavj[ncount+twoncoeffsq] -= dbztmp*x[j][2]; + snavj[ncount+threencoeffsq] -= dbytmp*x[j][2]; + snavj[ncount+fourncoeffsq] -= dbxtmp*x[j][2]; + snavj[ncount+fivencoeffsq] -= dbxtmp*x[j][1]; + ncount++; + } + } + } } } } @@ -341,7 +400,8 @@ double ComputeSNAVAtom::memory_usage() double bytes = nmax*size_peratom_cols * sizeof(double); bytes += 3*njmax*sizeof(double); bytes += njmax*sizeof(int); - bytes += ncoeff*nvirial; + bytes += sixncoeff*atom->ntypes; + if (quadraticflag) bytes += sixncoeffsq*atom->ntypes; bytes += snaptr[0]->memory_usage()*comm->nthreads; return bytes; } diff --git a/src/SNAP/compute_snav_atom.h b/src/SNAP/compute_snav_atom.h index 0252be7059..33ae4f9217 100644 --- a/src/SNAP/compute_snav_atom.h +++ b/src/SNAP/compute_snav_atom.h @@ -37,16 +37,17 @@ class ComputeSNAVAtom : public Compute { private: int nmax, njmax, diagonalstyle; - int ncoeff,nvirial; + int ncoeff, twoncoeff, threencoeff, fourncoeff, fivencoeff, sixncoeff; + int ncoeffsq, twoncoeffsq, threencoeffsq, fourncoeffsq, fivencoeffsq, sixncoeffsq; double **cutsq; class NeighList *list; double **snav; double rcutfac; double *radelem; double *wjelem; - class SNA** snaptr; - + double cutmax; + int quadraticflag; }; } diff --git a/src/SNAP/pair_snap.cpp b/src/SNAP/pair_snap.cpp index 06c2e48488..e4ed57b933 100644 --- a/src/SNAP/pair_snap.cpp +++ b/src/SNAP/pair_snap.cpp @@ -1635,7 +1635,8 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) rmin0 = 0.0; diagonalstyle = 3; switchflag = 1; - bzeroflag = 0; + bzeroflag = 1; + // open SNAP parameter file on proc 0 FILE *fpparam; diff --git a/src/USER-NC-DUMP/Install.sh b/src/USER-NETCDF/Install.sh similarity index 100% rename from src/USER-NC-DUMP/Install.sh rename to src/USER-NETCDF/Install.sh diff --git a/src/USER-NC-DUMP/README b/src/USER-NETCDF/README similarity index 95% rename from src/USER-NC-DUMP/README rename to src/USER-NETCDF/README index c02e879c61..57dec5e4c8 100644 --- a/src/USER-NC-DUMP/README +++ b/src/USER-NETCDF/README @@ -1,7 +1,7 @@ -USER-NC-DUMP +USER-NETCDF ============ -This package provides the nc and (optionally) the nc/mpiio dump styles. +This package provides the netcf and netcdf/mpiio dump styles. See the doc page for dump nc or dump nc/mpiio command for how to use them. Compiling these dump styles requires having the netCDF library installed on your system. See lib/netcdf/README for additional details. diff --git a/src/USER-NC-DUMP/dump_nc.cpp b/src/USER-NETCDF/dump_netcdf.cpp similarity index 97% rename from src/USER-NC-DUMP/dump_nc.cpp rename to src/USER-NETCDF/dump_netcdf.cpp index 7a66eb0224..bad90bdef3 100644 --- a/src/USER-NC-DUMP/dump_nc.cpp +++ b/src/USER-NETCDF/dump_netcdf.cpp @@ -32,14 +32,14 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ + #if defined(LMP_HAS_NETCDF) #include #include #include - #include - +#include "dump_netcdf.h" #include "atom.h" #include "comm.h" #include "compute.h" @@ -56,8 +56,6 @@ #include "variable.h" #include "force.h" -#include "dump_nc.h" - using namespace LAMMPS_NS; using namespace MathConst; @@ -91,7 +89,7 @@ const int THIS_IS_A_BIGINT = -4; /* ---------------------------------------------------------------------- */ -DumpNC::DumpNC(LAMMPS *lmp, int narg, char **arg) : +DumpNetCDF::DumpNetCDF(LAMMPS *lmp, int narg, char **arg) : DumpCustom(lmp, narg, arg) { // arrays for data rearrangement @@ -224,7 +222,7 @@ DumpNC::DumpNC(LAMMPS *lmp, int narg, char **arg) : /* ---------------------------------------------------------------------- */ -DumpNC::~DumpNC() +DumpNetCDF::~DumpNetCDF() { closefile(); @@ -238,7 +236,7 @@ DumpNC::~DumpNC() /* ---------------------------------------------------------------------- */ -void DumpNC::openfile() +void DumpNetCDF::openfile() { // now the computes and fixes have been initialized, so we can query // for the size of vector quantities @@ -594,12 +592,12 @@ void DumpNC::openfile() /* ---------------------------------------------------------------------- */ -void DumpNC::closefile() +void DumpNetCDF::closefile() { if (filewriter && singlefile_opened) { NCERR( nc_close(ncid) ); singlefile_opened = 0; - // append next time DumpNC::openfile is called + // append next time DumpNetCDF::openfile is called append_flag = 1; // write to next frame upon next open framei++; @@ -608,7 +606,7 @@ void DumpNC::closefile() /* ---------------------------------------------------------------------- */ -void DumpNC::write() +void DumpNetCDF::write() { // open file @@ -678,7 +676,7 @@ void DumpNC::write() /* ---------------------------------------------------------------------- */ -void DumpNC::write_header(bigint n) +void DumpNetCDF::write_header(bigint n) { size_t start[2]; @@ -753,7 +751,7 @@ void DumpNC::write_header(bigint n) write head of block (mass & element name) only if has atoms of the type ------------------------------------------------------------------------- */ -void DumpNC::write_data(int n, double *mybuf) +void DumpNetCDF::write_data(int n, double *mybuf) { size_t start[NC_MAX_VAR_DIMS], count[NC_MAX_VAR_DIMS]; ptrdiff_t stride[NC_MAX_VAR_DIMS]; @@ -761,18 +759,17 @@ void DumpNC::write_data(int n, double *mybuf) if (!int_buffer) { n_buffer = n; int_buffer = (int *) - memory->smalloc(n*sizeof(int), "DumpNC::int_buffer"); + memory->smalloc(n*sizeof(int),"dump::int_buffer"); double_buffer = (double *) - memory->smalloc(n*sizeof(double), "DumpNC::double_buffer"); + memory->smalloc(n*sizeof(double),"dump::double_buffer"); } if (n > n_buffer) { n_buffer = n; int_buffer = (int *) - memory->srealloc(int_buffer, n*sizeof(int), "DumpNC::int_buffer"); + memory->srealloc(int_buffer, n*sizeof(int),"dump::int_buffer"); double_buffer = (double *) - memory->srealloc(double_buffer, n*sizeof(double), - "DumpNC::double_buffer"); + memory->srealloc(double_buffer, n*sizeof(double),"dump::double_buffer"); } start[0] = framei-1; @@ -887,7 +884,7 @@ void DumpNC::write_data(int n, double *mybuf) /* ---------------------------------------------------------------------- */ -int DumpNC::modify_param(int narg, char **arg) +int DumpNetCDF::modify_param(int narg, char **arg) { int iarg = 0; if (strcmp(arg[iarg],"double") == 0) { @@ -925,17 +922,17 @@ int DumpNC::modify_param(int narg, char **arg) if (!strcmp(arg[iarg],"step")) { perframe[i].type = THIS_IS_A_BIGINT; - perframe[i].compute = &DumpNC::compute_step; + perframe[i].compute = &DumpNetCDF::compute_step; strcpy(perframe[i].name, arg[iarg]); } else if (!strcmp(arg[iarg],"elapsed")) { perframe[i].type = THIS_IS_A_BIGINT; - perframe[i].compute = &DumpNC::compute_elapsed; + perframe[i].compute = &DumpNetCDF::compute_elapsed; strcpy(perframe[i].name, arg[iarg]); } else if (!strcmp(arg[iarg],"elaplong")) { perframe[i].type = THIS_IS_A_BIGINT; - perframe[i].compute = &DumpNC::compute_elapsed_long; + perframe[i].compute = &DumpNetCDF::compute_elapsed_long; strcpy(perframe[i].name, arg[iarg]); } else { @@ -1036,7 +1033,7 @@ int DumpNC::modify_param(int narg, char **arg) /* ---------------------------------------------------------------------- */ -void DumpNC::write_prmtop() +void DumpNetCDF::write_prmtop() { char fn[1024]; char tmp[81]; @@ -1098,7 +1095,7 @@ void DumpNC::write_prmtop() /* ---------------------------------------------------------------------- */ -void DumpNC::ncerr(int err, const char *descr, int line) +void DumpNetCDF::ncerr(int err, const char *descr, int line) { if (err != NC_NOERR) { char errstr[1024]; @@ -1122,21 +1119,21 @@ void DumpNC::ncerr(int err, const char *descr, int line) customize a new keyword by adding a method ------------------------------------------------------------------------- */ -void DumpNC::compute_step(void *r) +void DumpNetCDF::compute_step(void *r) { *((bigint *) r) = update->ntimestep; } /* ---------------------------------------------------------------------- */ -void DumpNC::compute_elapsed(void *r) +void DumpNetCDF::compute_elapsed(void *r) { *((bigint *) r) = update->ntimestep - update->firststep; } /* ---------------------------------------------------------------------- */ -void DumpNC::compute_elapsed_long(void *r) +void DumpNetCDF::compute_elapsed_long(void *r) { *((bigint *) r) = update->ntimestep - update->beginstep; } diff --git a/src/USER-NC-DUMP/dump_nc.h b/src/USER-NETCDF/dump_netcdf.h similarity index 94% rename from src/USER-NC-DUMP/dump_nc.h rename to src/USER-NETCDF/dump_netcdf.h index 788a9368f9..daf4e9d0de 100644 --- a/src/USER-NC-DUMP/dump_nc.h +++ b/src/USER-NETCDF/dump_netcdf.h @@ -32,16 +32,17 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ + #if defined(LMP_HAS_NETCDF) #ifdef DUMP_CLASS -DumpStyle(nc,DumpNC) +DumpStyle(netcdf,DumpNetCDF) #else -#ifndef LMP_DUMP_NC_H -#define LMP_DUMP_NC_H +#ifndef LMP_DUMP_NETCDF_H +#define LMP_DUMP_NETCDFC_H #include "dump_custom.h" @@ -50,10 +51,10 @@ namespace LAMMPS_NS { const int NC_FIELD_NAME_MAX = 100; const int DUMP_NC_MAX_DIMS = 100; -class DumpNC : public DumpCustom { +class DumpNetCDF : public DumpCustom { public: - DumpNC(class LAMMPS *, int, char **); - virtual ~DumpNC(); + DumpNetCDF(class LAMMPS *, int, char **); + virtual ~DumpNetCDF(); virtual void write(); private: @@ -68,7 +69,7 @@ class DumpNC : public DumpCustom { int ndumped; // number of enties written for this prop. }; - typedef void (DumpNC::*funcptr_t)(void *); + typedef void (DumpNetCDF::*funcptr_t)(void *); // per-frame quantities (variables, fixes or computes) struct nc_perframe_t { diff --git a/src/USER-NC-DUMP/dump_nc_mpiio.cpp b/src/USER-NETCDF/dump_netcdf_mpiio.cpp similarity index 96% rename from src/USER-NC-DUMP/dump_nc_mpiio.cpp rename to src/USER-NETCDF/dump_netcdf_mpiio.cpp index 6b26014030..2e9ec274a5 100644 --- a/src/USER-NC-DUMP/dump_nc_mpiio.cpp +++ b/src/USER-NETCDF/dump_netcdf_mpiio.cpp @@ -32,14 +32,14 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ + #if defined(LMP_HAS_PNETCDF) #include #include #include - #include - +#include "dump_netcdf_mpiio.h" #include "atom.h" #include "comm.h" #include "compute.h" @@ -56,8 +56,6 @@ #include "variable.h" #include "force.h" -#include "dump_nc_mpiio.h" - using namespace LAMMPS_NS; using namespace MathConst; @@ -91,7 +89,7 @@ const int THIS_IS_A_BIGINT = -4; /* ---------------------------------------------------------------------- */ -DumpNCMPIIO::DumpNCMPIIO(LAMMPS *lmp, int narg, char **arg) : +DumpNetCDFMPIIO::DumpNetCDFMPIIO(LAMMPS *lmp, int narg, char **arg) : DumpCustom(lmp, narg, arg) { // arrays for data rearrangement @@ -217,7 +215,7 @@ DumpNCMPIIO::DumpNCMPIIO(LAMMPS *lmp, int narg, char **arg) : /* ---------------------------------------------------------------------- */ -DumpNCMPIIO::~DumpNCMPIIO() +DumpNetCDFMPIIO::~DumpNetCDFMPIIO() { closefile(); @@ -231,7 +229,7 @@ DumpNCMPIIO::~DumpNCMPIIO() /* ---------------------------------------------------------------------- */ -void DumpNCMPIIO::openfile() +void DumpNetCDFMPIIO::openfile() { // now the computes and fixes have been initialized, so we can query // for the size of vector quantities @@ -570,12 +568,12 @@ void DumpNCMPIIO::openfile() /* ---------------------------------------------------------------------- */ -void DumpNCMPIIO::closefile() +void DumpNetCDFMPIIO::closefile() { if (singlefile_opened) { NCERR( ncmpi_close(ncid) ); singlefile_opened = 0; - // append next time DumpNCMPIIO::openfile is called + // append next time DumpNetCDFMPIIO::openfile is called append_flag = 1; // write to next frame upon next open framei++; @@ -584,7 +582,7 @@ void DumpNCMPIIO::closefile() /* ---------------------------------------------------------------------- */ -void DumpNCMPIIO::write() +void DumpNetCDFMPIIO::write() { // open file @@ -687,7 +685,7 @@ void DumpNCMPIIO::write() /* ---------------------------------------------------------------------- */ -void DumpNCMPIIO::write_time_and_cell() +void DumpNetCDFMPIIO::write_time_and_cell() { MPI_Offset start[2]; @@ -759,7 +757,7 @@ void DumpNCMPIIO::write_time_and_cell() write head of block (mass & element name) only if has atoms of the type ------------------------------------------------------------------------- */ -void DumpNCMPIIO::write_data(int n, double *mybuf) +void DumpNetCDFMPIIO::write_data(int n, double *mybuf) { MPI_Offset start[NC_MAX_VAR_DIMS], count[NC_MAX_VAR_DIMS]; MPI_Offset stride[NC_MAX_VAR_DIMS]; @@ -767,19 +765,18 @@ void DumpNCMPIIO::write_data(int n, double *mybuf) if (!int_buffer) { n_buffer = std::max(1, n); int_buffer = (int *) - memory->smalloc(n_buffer*sizeof(int), "DumpNCMPIIO::int_buffer"); + memory->smalloc(n_buffer*sizeof(int),"dump::int_buffer"); double_buffer = (double *) - memory->smalloc(n_buffer*sizeof(double), "DumpNCMPIIO::double_buffer"); + memory->smalloc(n_buffer*sizeof(double),"dump::double_buffer"); } if (n > n_buffer) { n_buffer = std::max(1, n); int_buffer = (int *) - memory->srealloc(int_buffer, n_buffer*sizeof(int), - "DumpNCMPIIO::int_buffer"); + memory->srealloc(int_buffer, n_buffer*sizeof(int),"dump::int_buffer"); double_buffer = (double *) memory->srealloc(double_buffer, n_buffer*sizeof(double), - "DumpNCMPIIO::double_buffer"); + "dump::double_buffer"); } start[0] = framei-1; @@ -882,7 +879,7 @@ void DumpNCMPIIO::write_data(int n, double *mybuf) /* ---------------------------------------------------------------------- */ -int DumpNCMPIIO::modify_param(int narg, char **arg) +int DumpNetCDFMPIIO::modify_param(int narg, char **arg) { int iarg = 0; if (strcmp(arg[iarg],"double") == 0) { @@ -920,17 +917,17 @@ int DumpNCMPIIO::modify_param(int narg, char **arg) if (!strcmp(arg[iarg],"step")) { perframe[i].type = THIS_IS_A_BIGINT; - perframe[i].compute = &DumpNCMPIIO::compute_step; + perframe[i].compute = &DumpNetCDFMPIIO::compute_step; strcpy(perframe[i].name, arg[iarg]); } else if (!strcmp(arg[iarg],"elapsed")) { perframe[i].type = THIS_IS_A_BIGINT; - perframe[i].compute = &DumpNCMPIIO::compute_elapsed; + perframe[i].compute = &DumpNetCDFMPIIO::compute_elapsed; strcpy(perframe[i].name, arg[iarg]); } else if (!strcmp(arg[iarg],"elaplong")) { perframe[i].type = THIS_IS_A_BIGINT; - perframe[i].compute = &DumpNCMPIIO::compute_elapsed_long; + perframe[i].compute = &DumpNetCDFMPIIO::compute_elapsed_long; strcpy(perframe[i].name, arg[iarg]); } else { @@ -1031,7 +1028,7 @@ int DumpNCMPIIO::modify_param(int narg, char **arg) /* ---------------------------------------------------------------------- */ -void DumpNCMPIIO::ncerr(int err, const char *descr, int line) +void DumpNetCDFMPIIO::ncerr(int err, const char *descr, int line) { if (err != NC_NOERR) { char errstr[1024]; @@ -1055,21 +1052,21 @@ void DumpNCMPIIO::ncerr(int err, const char *descr, int line) customize a new keyword by adding a method ------------------------------------------------------------------------- */ -void DumpNCMPIIO::compute_step(void *r) +void DumpNetCDFMPIIO::compute_step(void *r) { *((bigint *) r) = update->ntimestep; } /* ---------------------------------------------------------------------- */ -void DumpNCMPIIO::compute_elapsed(void *r) +void DumpNetCDFMPIIO::compute_elapsed(void *r) { *((bigint *) r) = update->ntimestep - update->firststep; } /* ---------------------------------------------------------------------- */ -void DumpNCMPIIO::compute_elapsed_long(void *r) +void DumpNetCDFMPIIO::compute_elapsed_long(void *r) { *((bigint *) r) = update->ntimestep - update->beginstep; } diff --git a/src/USER-NC-DUMP/dump_nc_mpiio.h b/src/USER-NETCDF/dump_netcdf_mpiio.h similarity index 95% rename from src/USER-NC-DUMP/dump_nc_mpiio.h rename to src/USER-NETCDF/dump_netcdf_mpiio.h index 5e36335e64..6f5b00b033 100644 --- a/src/USER-NC-DUMP/dump_nc_mpiio.h +++ b/src/USER-NETCDF/dump_netcdf_mpiio.h @@ -32,16 +32,17 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ + #if defined(LMP_HAS_PNETCDF) #ifdef DUMP_CLASS -DumpStyle(nc/mpiio,DumpNCMPIIO) +DumpStyle(netcdf/mpiio,DumpNetCDFMPIIO) #else -#ifndef LMP_DUMP_NC_MPIIO_H -#define LMP_DUMP_NC_MPIIO_H +#ifndef LMP_DUMP_NETCDF_MPIIO_H +#define LMP_DUMP_NETCDF_MPIIO_H #include "dump_custom.h" @@ -50,10 +51,10 @@ namespace LAMMPS_NS { const int NC_MPIIO_FIELD_NAME_MAX = 100; const int DUMP_NC_MPIIO_MAX_DIMS = 100; -class DumpNCMPIIO : public DumpCustom { +class DumpNetCDFMPIIO : public DumpCustom { public: - DumpNCMPIIO(class LAMMPS *, int, char **); - virtual ~DumpNCMPIIO(); + DumpNetCDFMPIIO(class LAMMPS *, int, char **); + virtual ~DumpNetCDFMPIIO(); virtual void write(); private: diff --git a/src/USER-REAXC/compute_spec_atom.cpp b/src/USER-REAXC/compute_spec_atom.cpp index 4af8efcae7..164ce87205 100644 --- a/src/USER-REAXC/compute_spec_atom.cpp +++ b/src/USER-REAXC/compute_spec_atom.cpp @@ -24,7 +24,7 @@ #include "reaxc_defs.h" #include "reaxc_types.h" -#include "pair_reax_c.h" +#include "pair_reaxc.h" using namespace LAMMPS_NS; @@ -71,7 +71,7 @@ ComputeSpecAtom::ComputeSpecAtom(LAMMPS *lmp, int narg, char **arg) : } else if (strcmp(arg[iarg],"vz") == 0) { pack_choice[i] = &ComputeSpecAtom::pack_vz; - // from pair_reax_c + // from pair_reaxc } else if (strcmp(arg[iarg],"abo01") == 0) { pack_choice[i] = &ComputeSpecAtom::pack_abo01; } else if (strcmp(arg[iarg],"abo02") == 0) { diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index 26cf03f60a..ed057dfe7a 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -23,7 +23,7 @@ #include #include #include "fix_qeq_reax.h" -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/USER-REAXC/fix_reax_c.cpp b/src/USER-REAXC/fix_reaxc.cpp similarity index 99% rename from src/USER-REAXC/fix_reax_c.cpp rename to src/USER-REAXC/fix_reaxc.cpp index e1cc4e340e..df06217993 100644 --- a/src/USER-REAXC/fix_reax_c.cpp +++ b/src/USER-REAXC/fix_reaxc.cpp @@ -21,7 +21,7 @@ Algorithmic Techniques", Parallel Computing, in press. ------------------------------------------------------------------------- */ -#include "fix_reax_c.h" +#include "fix_reaxc.h" #include "atom.h" #include "pair.h" #include "comm.h" diff --git a/src/USER-REAXC/fix_reax_c.h b/src/USER-REAXC/fix_reaxc.h similarity index 100% rename from src/USER-REAXC/fix_reax_c.h rename to src/USER-REAXC/fix_reaxc.h diff --git a/src/USER-REAXC/fix_reaxc_bonds.cpp b/src/USER-REAXC/fix_reaxc_bonds.cpp index 543669de76..cf9e4789c1 100644 --- a/src/USER-REAXC/fix_reaxc_bonds.cpp +++ b/src/USER-REAXC/fix_reaxc_bonds.cpp @@ -21,7 +21,7 @@ #include "fix_reaxc_bonds.h" #include "atom.h" #include "update.h" -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "modify.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-REAXC/fix_reaxc_species.cpp b/src/USER-REAXC/fix_reaxc_species.cpp index ead73f02a1..d291903fa8 100644 --- a/src/USER-REAXC/fix_reaxc_species.cpp +++ b/src/USER-REAXC/fix_reaxc_species.cpp @@ -24,7 +24,7 @@ #include "fix_reaxc_species.h" #include "domain.h" #include "update.h" -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "modify.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-REAXC/fix_reaxc_species.h b/src/USER-REAXC/fix_reaxc_species.h index 872ea2528f..563a10f39d 100644 --- a/src/USER-REAXC/fix_reaxc_species.h +++ b/src/USER-REAXC/fix_reaxc_species.h @@ -23,7 +23,7 @@ FixStyle(reax/c/species,FixReaxCSpecies) #include "fix.h" #include "pointers.h" -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_types.h" #include "reaxc_defs.h" diff --git a/src/USER-REAXC/pair_reax_c.cpp b/src/USER-REAXC/pair_reaxc.cpp similarity index 97% rename from src/USER-REAXC/pair_reax_c.cpp rename to src/USER-REAXC/pair_reaxc.cpp index 4933c90f01..d51b0fc2f8 100644 --- a/src/USER-REAXC/pair_reax_c.cpp +++ b/src/USER-REAXC/pair_reaxc.cpp @@ -20,7 +20,7 @@ Hybrid and hybrid/overlay compatibility added by Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "atom.h" #include "update.h" #include "force.h" @@ -30,7 +30,7 @@ #include "neigh_request.h" #include "modify.h" #include "fix.h" -#include "fix_reax_c.h" +#include "fix_reaxc.h" #include "citeme.h" #include "memory.h" #include "error.h" @@ -223,10 +223,11 @@ void PairReaxC::settings(int narg, char **arg) qeqflag = 1; control->lgflag = 0; + control->enobondsflag = 1; system->mincap = MIN_CAP; system->safezone = SAFE_ZONE; system->saferzone = SAFER_ZONE; - + // process optional keywords int iarg = 1; @@ -238,7 +239,13 @@ void PairReaxC::settings(int narg, char **arg) else if (strcmp(arg[iarg+1],"no") == 0) qeqflag = 0; else error->all(FLERR,"Illegal pair_style reax/c command"); iarg += 2; - } else if (strcmp(arg[iarg],"lgvdw") == 0) { + } else if (strcmp(arg[iarg],"enobonds") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal pair_style reax/c command"); + if (strcmp(arg[iarg+1],"yes") == 0) control->enobondsflag = 1; + else if (strcmp(arg[iarg+1],"no") == 0) control->enobondsflag = 0; + else error->all(FLERR,"Illegal pair_style reax/c command"); + iarg += 2; + } else if (strcmp(arg[iarg],"lgvdw") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal pair_style reax/c command"); if (strcmp(arg[iarg+1],"yes") == 0) control->lgflag = 1; else if (strcmp(arg[iarg+1],"no") == 0) control->lgflag = 0; diff --git a/src/USER-REAXC/pair_reax_c.h b/src/USER-REAXC/pair_reaxc.h similarity index 100% rename from src/USER-REAXC/pair_reax_c.h rename to src/USER-REAXC/pair_reaxc.h diff --git a/src/USER-REAXC/reaxc_allocate.cpp b/src/USER-REAXC/reaxc_allocate.cpp index dc8545e006..969912e082 100644 --- a/src/USER-REAXC/reaxc_allocate.cpp +++ b/src/USER-REAXC/reaxc_allocate.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_allocate.h" #include "reaxc_list.h" #include "reaxc_reset_tools.h" diff --git a/src/USER-REAXC/reaxc_bond_orders.cpp b/src/USER-REAXC/reaxc_bond_orders.cpp index 0b4ca21adf..04cedf18a8 100644 --- a/src/USER-REAXC/reaxc_bond_orders.cpp +++ b/src/USER-REAXC/reaxc_bond_orders.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_types.h" #include "reaxc_bond_orders.h" #include "reaxc_list.h" diff --git a/src/USER-REAXC/reaxc_bonds.cpp b/src/USER-REAXC/reaxc_bonds.cpp index e0ef38ba0f..a8a1298166 100644 --- a/src/USER-REAXC/reaxc_bonds.cpp +++ b/src/USER-REAXC/reaxc_bonds.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_bonds.h" #include "reaxc_bond_orders.h" #include "reaxc_list.h" diff --git a/src/USER-REAXC/reaxc_control.cpp b/src/USER-REAXC/reaxc_control.cpp index 3753360c68..4def41bc8c 100644 --- a/src/USER-REAXC/reaxc_control.cpp +++ b/src/USER-REAXC/reaxc_control.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_control.h" #include "reaxc_tool_box.h" diff --git a/src/USER-REAXC/reaxc_defs.h b/src/USER-REAXC/reaxc_defs.h index d0a75d431b..101b554fb2 100644 --- a/src/USER-REAXC/reaxc_defs.h +++ b/src/USER-REAXC/reaxc_defs.h @@ -116,8 +116,8 @@ #define MAX_BOND 20 -#define MAXREAXBOND 24 /* used in fix_reaxc_bonds.cpp and pair_reax_c.cpp */ -#define MAXSPECBOND 24 /* used in fix_reaxc_species.cpp and pair_reax_c.cpp */ +#define MAXREAXBOND 24 /* used in fix_reaxc_bonds.cpp and pair_reaxc.cpp */ +#define MAXSPECBOND 24 /* used in fix_reaxc_species.cpp and pair_reaxc.cpp */ /******************* ENUMERATIONS *************************/ enum geo_formats { CUSTOM, PDB, ASCII_RESTART, BINARY_RESTART, GF_N }; diff --git a/src/USER-REAXC/reaxc_ffield.cpp b/src/USER-REAXC/reaxc_ffield.cpp index fda2841403..58a347ebf7 100644 --- a/src/USER-REAXC/reaxc_ffield.cpp +++ b/src/USER-REAXC/reaxc_ffield.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "error.h" #include "reaxc_ffield.h" #include "reaxc_tool_box.h" diff --git a/src/USER-REAXC/reaxc_forces.cpp b/src/USER-REAXC/reaxc_forces.cpp index 7f11f5565f..215ded6e5d 100644 --- a/src/USER-REAXC/reaxc_forces.cpp +++ b/src/USER-REAXC/reaxc_forces.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_forces.h" #include "reaxc_bond_orders.h" #include "reaxc_bonds.h" diff --git a/src/USER-REAXC/reaxc_hydrogen_bonds.cpp b/src/USER-REAXC/reaxc_hydrogen_bonds.cpp index 8d7b3b3819..ff771ad65b 100644 --- a/src/USER-REAXC/reaxc_hydrogen_bonds.cpp +++ b/src/USER-REAXC/reaxc_hydrogen_bonds.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_hydrogen_bonds.h" #include "reaxc_bond_orders.h" #include "reaxc_list.h" diff --git a/src/USER-REAXC/reaxc_init_md.cpp b/src/USER-REAXC/reaxc_init_md.cpp index f912c95ea5..b11cdd2fbc 100644 --- a/src/USER-REAXC/reaxc_init_md.cpp +++ b/src/USER-REAXC/reaxc_init_md.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_init_md.h" #include "reaxc_allocate.h" #include "reaxc_forces.h" diff --git a/src/USER-REAXC/reaxc_io_tools.cpp b/src/USER-REAXC/reaxc_io_tools.cpp index 0c14dad5d4..4d58f7514d 100644 --- a/src/USER-REAXC/reaxc_io_tools.cpp +++ b/src/USER-REAXC/reaxc_io_tools.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "update.h" #include "reaxc_io_tools.h" #include "reaxc_list.h" diff --git a/src/USER-REAXC/reaxc_list.cpp b/src/USER-REAXC/reaxc_list.cpp index d22ac4ca7f..2755d5506e 100644 --- a/src/USER-REAXC/reaxc_list.cpp +++ b/src/USER-REAXC/reaxc_list.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_list.h" #include "reaxc_tool_box.h" diff --git a/src/USER-REAXC/reaxc_lookup.cpp b/src/USER-REAXC/reaxc_lookup.cpp index 903e54962d..9db8b7b9f6 100644 --- a/src/USER-REAXC/reaxc_lookup.cpp +++ b/src/USER-REAXC/reaxc_lookup.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_lookup.h" #include "reaxc_nonbonded.h" #include "reaxc_tool_box.h" diff --git a/src/USER-REAXC/reaxc_multi_body.cpp b/src/USER-REAXC/reaxc_multi_body.cpp index 1923668e89..ecfd3ad04d 100644 --- a/src/USER-REAXC/reaxc_multi_body.cpp +++ b/src/USER-REAXC/reaxc_multi_body.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_multi_body.h" #include "reaxc_bond_orders.h" #include "reaxc_list.h" @@ -79,7 +79,7 @@ void Atom_Energy( reax_system *system, control_params *control, numbonds ++; /* calculate the energy */ - if (numbonds > 0) + if (numbonds > 0 || control->enobondsflag) data->my_en.e_lp += e_lp = p_lp2 * workspace->Delta_lp[i] * inv_expvd2; @@ -87,7 +87,8 @@ void Atom_Energy( reax_system *system, control_params *control, 75 * p_lp2 * workspace->Delta_lp[i] * expvd2 * SQR(inv_expvd2); CElp = dElp * workspace->dDelta_lp[i]; - if (numbonds > 0) workspace->CdDelta[i] += CElp; // lp - 1st term + if (numbonds > 0 || control->enobondsflag) + workspace->CdDelta[i] += CElp; // lp - 1st term /* tally into per-atom energy */ if( system->pair_ptr->evflag) @@ -187,7 +188,7 @@ void Atom_Energy( reax_system *system, control_params *control, for( pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj ) numbonds ++; - if (numbonds > 0) + if (numbonds > 0 || control->enobondsflag) data->my_en.e_un += e_un = -p_ovun5 * (1.0 - exp_ovun6) * inv_exp_ovun2n * inv_exp_ovun8; @@ -202,13 +203,15 @@ void Atom_Energy( reax_system *system, control_params *control, /* tally into per-atom energy */ if( system->pair_ptr->evflag) { eng_tmp = e_ov; - if (numbonds > 0) eng_tmp += e_un; + if (numbonds > 0 || control->enobondsflag) + eng_tmp += e_un; system->pair_ptr->ev_tally(i,i,system->n,1,eng_tmp,0.0,0.0,0.0,0.0,0.0); } /* forces */ workspace->CdDelta[i] += CEover3; // OvCoor - 2nd term - if (numbonds > 0) workspace->CdDelta[i] += CEunder3; // UnCoor - 1st term + if (numbonds > 0 || control->enobondsflag) + workspace->CdDelta[i] += CEunder3; // UnCoor - 1st term for( pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj ) { pbond = &(bonds->select.bond_list[pj]); diff --git a/src/USER-REAXC/reaxc_nonbonded.cpp b/src/USER-REAXC/reaxc_nonbonded.cpp index cb24e2dc37..9c223428a6 100644 --- a/src/USER-REAXC/reaxc_nonbonded.cpp +++ b/src/USER-REAXC/reaxc_nonbonded.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_types.h" #include "reaxc_nonbonded.h" #include "reaxc_bond_orders.h" diff --git a/src/USER-REAXC/reaxc_reset_tools.cpp b/src/USER-REAXC/reaxc_reset_tools.cpp index 1e6aeab475..4ec744e7b1 100644 --- a/src/USER-REAXC/reaxc_reset_tools.cpp +++ b/src/USER-REAXC/reaxc_reset_tools.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_reset_tools.h" #include "reaxc_list.h" #include "reaxc_tool_box.h" diff --git a/src/USER-REAXC/reaxc_system_props.cpp b/src/USER-REAXC/reaxc_system_props.cpp index 6b4551a03f..54eeb6da1e 100644 --- a/src/USER-REAXC/reaxc_system_props.cpp +++ b/src/USER-REAXC/reaxc_system_props.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_system_props.h" #include "reaxc_tool_box.h" #include "reaxc_vector.h" diff --git a/src/USER-REAXC/reaxc_tool_box.cpp b/src/USER-REAXC/reaxc_tool_box.cpp index 22576e9f3b..4fc6796efe 100644 --- a/src/USER-REAXC/reaxc_tool_box.cpp +++ b/src/USER-REAXC/reaxc_tool_box.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_tool_box.h" struct timeval tim; diff --git a/src/USER-REAXC/reaxc_torsion_angles.cpp b/src/USER-REAXC/reaxc_torsion_angles.cpp index 2cfe329765..74d5b04f20 100644 --- a/src/USER-REAXC/reaxc_torsion_angles.cpp +++ b/src/USER-REAXC/reaxc_torsion_angles.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_torsion_angles.h" #include "reaxc_bond_orders.h" #include "reaxc_list.h" diff --git a/src/USER-REAXC/reaxc_traj.cpp b/src/USER-REAXC/reaxc_traj.cpp index 9d4fa73524..ae2bba2150 100644 --- a/src/USER-REAXC/reaxc_traj.cpp +++ b/src/USER-REAXC/reaxc_traj.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_traj.h" #include "reaxc_list.h" #include "reaxc_tool_box.h" diff --git a/src/USER-REAXC/reaxc_types.h b/src/USER-REAXC/reaxc_types.h index db4cf04178..b3e2f40f02 100644 --- a/src/USER-REAXC/reaxc_types.h +++ b/src/USER-REAXC/reaxc_types.h @@ -61,13 +61,12 @@ #define MAX_BOND 20 // same as reaxc_defs.h /********************** TYPE DEFINITIONS ********************/ -typedef int ivec[3]; +typedef int ivec[3]; typedef double rvec[3]; typedef double rtensor[3][3]; typedef double rvec2[2]; typedef double rvec4[4]; - // import LAMMPS' definition of tagint and bigint typedef LAMMPS_NS::tagint rc_tagint; typedef LAMMPS_NS::bigint rc_bigint; @@ -79,7 +78,6 @@ typedef struct void *out_atoms; } mpi_out_data; - typedef struct { MPI_Comm world; @@ -107,7 +105,6 @@ typedef struct void *in2_buffer; } mpi_datatypes; - typedef struct { int n_global; @@ -115,8 +112,6 @@ typedef struct int vdw_type; } global_parameters; - - typedef struct { /* Line one in field file */ @@ -163,8 +158,6 @@ typedef struct } single_body_parameters; - - /* Two Body Parameters */ typedef struct { /* Bond Order parameters */ @@ -193,8 +186,6 @@ typedef struct { double v13cor, ovc; } two_body_parameters; - - /* 3-body parameters */ typedef struct { /* valence angle */ @@ -214,15 +205,11 @@ typedef struct{ three_body_parameters prm[REAX_MAX_3BODY_PARAM]; } three_body_header; - - /* hydrogen-bond parameters */ typedef struct{ double r0_hb, p_hb1, p_hb2, p_hb3; } hbond_parameters; - - /* 4-body parameters */ typedef struct { double V1, V2, V3; @@ -234,14 +221,12 @@ typedef struct { double p_cot1; } four_body_parameters; - typedef struct { int cnt; four_body_parameters prm[REAX_MAX_4BODY_PARAM]; } four_body_header; - typedef struct { int num_atom_types; @@ -253,8 +238,6 @@ typedef struct four_body_header ****fbp; } reax_interaction; - - struct _reax_atom { rc_tagint orig_id; @@ -283,8 +266,6 @@ struct _reax_atom }; typedef _reax_atom reax_atom; - - typedef struct { double V; @@ -295,8 +276,6 @@ typedef struct rtensor g; } simulation_box; - - struct grid_cell { double cutoff; @@ -471,7 +450,8 @@ typedef struct int restrict_type; int lgflag; - + int enobondsflag; + } control_params; diff --git a/src/USER-REAXC/reaxc_valence_angles.cpp b/src/USER-REAXC/reaxc_valence_angles.cpp index c2b3287be5..c92996e56b 100644 --- a/src/USER-REAXC/reaxc_valence_angles.cpp +++ b/src/USER-REAXC/reaxc_valence_angles.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_valence_angles.h" #include "reaxc_bond_orders.h" #include "reaxc_list.h" diff --git a/src/USER-REAXC/reaxc_vector.cpp b/src/USER-REAXC/reaxc_vector.cpp index ee63e94280..977b17a6dc 100644 --- a/src/USER-REAXC/reaxc_vector.cpp +++ b/src/USER-REAXC/reaxc_vector.cpp @@ -24,7 +24,7 @@ . ----------------------------------------------------------------------*/ -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "reaxc_vector.h" diff --git a/src/USER-VTK/README b/src/USER-VTK/README index 86ef56a740..3429c96b72 100644 --- a/src/USER-VTK/README +++ b/src/USER-VTK/README @@ -1,17 +1,17 @@ -This package implements the "dump custom/vtk" command which can be used in a +This package implements the "dump vtk" command which can be used in a LAMMPS input script. -This dump allows to output atom data similar to dump custom, but directly into -VTK files. +This dump allows output of atom data similar to the dump custom +command, but in VTK format. -This package uses the VTK library (www.vtk.org) which must be installed on your -system. See the lib/vtk/README file and the LAMMPS manual for information on -building LAMMPS with external libraries. The settings in the Makefile.lammps -file in that directory must be correct for LAMMPS to build correctly with this -package installed. +This package uses the VTK library (www.vtk.org) which must be +installed on your system. See the lib/vtk/README file and the LAMMPS +manual for information on building LAMMPS with external libraries. +The settings in the Makefile.lammps file in that directory must be +correct for LAMMPS to build correctly with this package installed. -This code was initially developed for LIGGGHTS by Daniel Queteschiner at DCS -Computing. This is an effort to integrate it back to LAMMPS. +This code was initially developed for LIGGGHTS by Daniel Queteschiner +at DCS Computing. This is an effort to integrate it back to LAMMPS. The person who created this package is Richard Berger at JKU (richard.berger@jku.at). Contact him directly if you have questions. diff --git a/src/USER-VTK/dump_custom_vtk.cpp b/src/USER-VTK/dump_vtk.cpp similarity index 91% rename from src/USER-VTK/dump_custom_vtk.cpp rename to src/USER-VTK/dump_vtk.cpp index 0e4bc45976..0aa749e73b 100644 --- a/src/USER-VTK/dump_custom_vtk.cpp +++ b/src/USER-VTK/dump_vtk.cpp @@ -25,7 +25,7 @@ #include #include #include -#include "dump_custom_vtk.h" +#include "dump_vtk.h" #include "atom.h" #include "force.h" #include "domain.h" @@ -39,12 +39,15 @@ #include "fix.h" #include "memory.h" #include "error.h" + #include #include #include + #ifndef VTK_MAJOR_VERSION #include #endif + #include #include #include @@ -93,10 +96,10 @@ enum{VTK,VTP,VTU,PVTP,PVTU}; // file formats /* ---------------------------------------------------------------------- */ -DumpCustomVTK::DumpCustomVTK(LAMMPS *lmp, int narg, char **arg) : +DumpVTK::DumpVTK(LAMMPS *lmp, int narg, char **arg) : DumpCustom(lmp, narg, arg) { - if (narg == 5) error->all(FLERR,"No dump custom/vtk arguments specified"); + if (narg == 5) error->all(FLERR,"No dump vtk arguments specified"); pack_choice.clear(); vtype.clear(); @@ -113,7 +116,7 @@ DumpCustomVTK::DumpCustomVTK(LAMMPS *lmp, int narg, char **arg) : if (ioptional < narg && strcmp(style,"image") != 0 && strcmp(style,"movie") != 0) - error->all(FLERR,"Invalid attribute in dump custom command"); + error->all(FLERR,"Invalid attribute in dump vtk command"); size_one = pack_choice.size(); current_pack_choice_key = -1; @@ -162,7 +165,7 @@ DumpCustomVTK::DumpCustomVTK(LAMMPS *lmp, int narg, char **arg) : /* ---------------------------------------------------------------------- */ -DumpCustomVTK::~DumpCustomVTK() +DumpVTK::~DumpVTK() { delete [] filecurrent; delete [] domainfilecurrent; @@ -173,7 +176,7 @@ DumpCustomVTK::~DumpCustomVTK() /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::init_style() +void DumpVTK::init_style() { // default for element names = C @@ -191,14 +194,14 @@ void DumpCustomVTK::init_style() // setup function ptrs - header_choice = &DumpCustomVTK::header_vtk; + header_choice = &DumpVTK::header_vtk; if (vtk_file_format == VTP || vtk_file_format == PVTP) - write_choice = &DumpCustomVTK::write_vtp; + write_choice = &DumpVTK::write_vtp; else if (vtk_file_format == VTU || vtk_file_format == PVTU) - write_choice = &DumpCustomVTK::write_vtu; + write_choice = &DumpVTK::write_vtu; else - write_choice = &DumpCustomVTK::write_vtk; + write_choice = &DumpVTK::write_vtk; // find current ptr for each compute,fix,variable // check that fix frequency is acceptable @@ -206,24 +209,24 @@ void DumpCustomVTK::init_style() int icompute; for (int i = 0; i < ncompute; i++) { icompute = modify->find_compute(id_compute[i]); - if (icompute < 0) error->all(FLERR,"Could not find dump custom/vtk compute ID"); + if (icompute < 0) error->all(FLERR,"Could not find dump vtk compute ID"); compute[i] = modify->compute[icompute]; } int ifix; for (int i = 0; i < nfix; i++) { ifix = modify->find_fix(id_fix[i]); - if (ifix < 0) error->all(FLERR,"Could not find dump custom/vtk fix ID"); + if (ifix < 0) error->all(FLERR,"Could not find dump vtk fix ID"); fix[i] = modify->fix[ifix]; if (nevery % modify->fix[ifix]->peratom_freq) - error->all(FLERR,"Dump custom/vtk and fix not computed at compatible times"); + error->all(FLERR,"Dump vtk and fix not computed at compatible times"); } int ivariable; for (int i = 0; i < nvariable; i++) { ivariable = input->variable->find(id_variable[i]); if (ivariable < 0) - error->all(FLERR,"Could not find dump custom/vtk variable name"); + error->all(FLERR,"Could not find dump vtk variable name"); variable[i] = ivariable; } @@ -239,25 +242,25 @@ void DumpCustomVTK::init_style() if (iregion >= 0) { iregion = domain->find_region(idregion); if (iregion == -1) - error->all(FLERR,"Region ID for dump custom/vtk does not exist"); + error->all(FLERR,"Region ID for dump vtk does not exist"); } } /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::write_header(bigint) +void DumpVTK::write_header(bigint) { } /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::header_vtk(bigint) +void DumpVTK::header_vtk(bigint) { } /* ---------------------------------------------------------------------- */ -int DumpCustomVTK::count() +int DumpVTK::count() { n_calls_ = 0; @@ -807,7 +810,7 @@ int DumpCustomVTK::count() /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::write() +void DumpVTK::write() { // simulation box bounds @@ -905,7 +908,7 @@ void DumpCustomVTK::write() /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::pack(tagint *ids) +void DumpVTK::pack(tagint *ids) { int n = 0; for (std::map::iterator it=pack_choice.begin(); it!=pack_choice.end(); ++it, ++n) { @@ -922,14 +925,14 @@ void DumpCustomVTK::pack(tagint *ids) /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::write_data(int n, double *mybuf) +void DumpVTK::write_data(int n, double *mybuf) { (this->*write_choice)(n,mybuf); } /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::setFileCurrent() { +void DumpVTK::setFileCurrent() { delete [] filecurrent; filecurrent = NULL; @@ -1064,7 +1067,7 @@ void DumpCustomVTK::setFileCurrent() { /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::buf2arrays(int n, double *mybuf) +void DumpVTK::buf2arrays(int n, double *mybuf) { for (int iatom=0; iatom < n; ++iatom) { vtkIdType pid[1]; @@ -1123,7 +1126,7 @@ void DumpCustomVTK::buf2arrays(int n, double *mybuf) /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::prepare_domain_data(vtkRectilinearGrid *rgrid) +void DumpVTK::prepare_domain_data(vtkRectilinearGrid *rgrid) { vtkSmartPointer xCoords = vtkSmartPointer::New(); xCoords->InsertNextValue(boxxlo); @@ -1143,7 +1146,7 @@ void DumpCustomVTK::prepare_domain_data(vtkRectilinearGrid *rgrid) /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::prepare_domain_data_triclinic(vtkUnstructuredGrid *hexahedronGrid) +void DumpVTK::prepare_domain_data_triclinic(vtkUnstructuredGrid *hexahedronGrid) { vtkSmartPointer hexahedronPoints = vtkSmartPointer::New(); hexahedronPoints->SetNumberOfPoints(8); @@ -1173,7 +1176,7 @@ void DumpCustomVTK::prepare_domain_data_triclinic(vtkUnstructuredGrid *hexahedro /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::write_domain_vtk() +void DumpVTK::write_domain_vtk() { vtkSmartPointer rgrid = vtkSmartPointer::New(); prepare_domain_data(rgrid.GetPointer()); @@ -1197,7 +1200,7 @@ void DumpCustomVTK::write_domain_vtk() /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::write_domain_vtk_triclinic() +void DumpVTK::write_domain_vtk_triclinic() { vtkSmartPointer hexahedronGrid = vtkSmartPointer::New(); prepare_domain_data_triclinic(hexahedronGrid.GetPointer()); @@ -1221,7 +1224,7 @@ void DumpCustomVTK::write_domain_vtk_triclinic() /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::write_domain_vtr() +void DumpVTK::write_domain_vtr() { vtkSmartPointer rgrid = vtkSmartPointer::New(); prepare_domain_data(rgrid.GetPointer()); @@ -1242,7 +1245,7 @@ void DumpCustomVTK::write_domain_vtr() /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::write_domain_vtu_triclinic() +void DumpVTK::write_domain_vtu_triclinic() { vtkSmartPointer hexahedronGrid = vtkSmartPointer::New(); prepare_domain_data_triclinic(hexahedronGrid.GetPointer()); @@ -1263,7 +1266,7 @@ void DumpCustomVTK::write_domain_vtu_triclinic() /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::write_vtk(int n, double *mybuf) +void DumpVTK::write_vtk(int n, double *mybuf) { ++n_calls_; @@ -1330,7 +1333,7 @@ void DumpCustomVTK::write_vtk(int n, double *mybuf) /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::write_vtp(int n, double *mybuf) +void DumpVTK::write_vtp(int n, double *mybuf) { ++n_calls_; @@ -1394,7 +1397,7 @@ void DumpCustomVTK::write_vtp(int n, double *mybuf) /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::write_vtu(int n, double *mybuf) +void DumpVTK::write_vtu(int n, double *mybuf) { ++n_calls_; @@ -1457,7 +1460,7 @@ void DumpCustomVTK::write_vtu(int n, double *mybuf) /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::reset_vtk_data_containers() +void DumpVTK::reset_vtk_data_containers() { points = vtkSmartPointer::New(); pointsCells = vtkSmartPointer::New(); @@ -1489,16 +1492,16 @@ void DumpCustomVTK::reset_vtk_data_containers() /* ---------------------------------------------------------------------- */ -int DumpCustomVTK::parse_fields(int narg, char **arg) +int DumpVTK::parse_fields(int narg, char **arg) { - pack_choice[X] = &DumpCustomVTK::pack_x; + pack_choice[X] = &DumpVTK::pack_x; vtype[X] = DOUBLE; name[X] = "x"; - pack_choice[Y] = &DumpCustomVTK::pack_y; + pack_choice[Y] = &DumpVTK::pack_y; vtype[Y] = DOUBLE; name[Y] = "y"; - pack_choice[Z] = &DumpCustomVTK::pack_z; + pack_choice[Z] = &DumpVTK::pack_z; vtype[Z] = DOUBLE; name[Z] = "z"; @@ -1508,33 +1511,33 @@ int DumpCustomVTK::parse_fields(int narg, char **arg) i = iarg-5; if (strcmp(arg[iarg],"id") == 0) { - pack_choice[ID] = &DumpCustomVTK::pack_id; + pack_choice[ID] = &DumpVTK::pack_id; vtype[ID] = INT; name[ID] = arg[iarg]; } else if (strcmp(arg[iarg],"mol") == 0) { if (!atom->molecule_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[MOL] = &DumpCustomVTK::pack_molecule; + pack_choice[MOL] = &DumpVTK::pack_molecule; vtype[MOL] = INT; name[MOL] = arg[iarg]; } else if (strcmp(arg[iarg],"proc") == 0) { - pack_choice[PROC] = &DumpCustomVTK::pack_proc; + pack_choice[PROC] = &DumpVTK::pack_proc; vtype[PROC] = INT; name[PROC] = arg[iarg]; } else if (strcmp(arg[iarg],"procp1") == 0) { - pack_choice[PROCP1] = &DumpCustomVTK::pack_procp1; + pack_choice[PROCP1] = &DumpVTK::pack_procp1; vtype[PROCP1] = INT; name[PROCP1] = arg[iarg]; } else if (strcmp(arg[iarg],"type") == 0) { - pack_choice[TYPE] = &DumpCustomVTK::pack_type; + pack_choice[TYPE] = &DumpVTK::pack_type; vtype[TYPE] = INT; name[TYPE] =arg[iarg]; } else if (strcmp(arg[iarg],"element") == 0) { - pack_choice[ELEMENT] = &DumpCustomVTK::pack_type; + pack_choice[ELEMENT] = &DumpVTK::pack_type; vtype[ELEMENT] = STRING; name[ELEMENT] = arg[iarg]; } else if (strcmp(arg[iarg],"mass") == 0) { - pack_choice[MASS] = &DumpCustomVTK::pack_mass; + pack_choice[MASS] = &DumpVTK::pack_mass; vtype[MASS] = DOUBLE; name[MASS] = arg[iarg]; @@ -1545,182 +1548,182 @@ int DumpCustomVTK::parse_fields(int narg, char **arg) } else if (strcmp(arg[iarg],"z") == 0) { // required property } else if (strcmp(arg[iarg],"xs") == 0) { - if (domain->triclinic) pack_choice[XS] = &DumpCustomVTK::pack_xs_triclinic; - else pack_choice[XS] = &DumpCustomVTK::pack_xs; + if (domain->triclinic) pack_choice[XS] = &DumpVTK::pack_xs_triclinic; + else pack_choice[XS] = &DumpVTK::pack_xs; vtype[XS] = DOUBLE; name[XS] = arg[iarg]; } else if (strcmp(arg[iarg],"ys") == 0) { - if (domain->triclinic) pack_choice[YS] = &DumpCustomVTK::pack_ys_triclinic; - else pack_choice[YS] = &DumpCustomVTK::pack_ys; + if (domain->triclinic) pack_choice[YS] = &DumpVTK::pack_ys_triclinic; + else pack_choice[YS] = &DumpVTK::pack_ys; vtype[YS] = DOUBLE; name[YS] = arg[iarg]; } else if (strcmp(arg[iarg],"zs") == 0) { - if (domain->triclinic) pack_choice[ZS] = &DumpCustomVTK::pack_zs_triclinic; - else pack_choice[ZS] = &DumpCustomVTK::pack_zs; + if (domain->triclinic) pack_choice[ZS] = &DumpVTK::pack_zs_triclinic; + else pack_choice[ZS] = &DumpVTK::pack_zs; vtype[ZS] = DOUBLE; name[ZS] = arg[iarg]; } else if (strcmp(arg[iarg],"xu") == 0) { - if (domain->triclinic) pack_choice[XU] = &DumpCustomVTK::pack_xu_triclinic; - else pack_choice[XU] = &DumpCustomVTK::pack_xu; + if (domain->triclinic) pack_choice[XU] = &DumpVTK::pack_xu_triclinic; + else pack_choice[XU] = &DumpVTK::pack_xu; vtype[XU] = DOUBLE; name[XU] = arg[iarg]; } else if (strcmp(arg[iarg],"yu") == 0) { - if (domain->triclinic) pack_choice[YU] = &DumpCustomVTK::pack_yu_triclinic; - else pack_choice[YU] = &DumpCustomVTK::pack_yu; + if (domain->triclinic) pack_choice[YU] = &DumpVTK::pack_yu_triclinic; + else pack_choice[YU] = &DumpVTK::pack_yu; vtype[YU] = DOUBLE; name[YU] = arg[iarg]; } else if (strcmp(arg[iarg],"zu") == 0) { - if (domain->triclinic) pack_choice[ZU] = &DumpCustomVTK::pack_zu_triclinic; - else pack_choice[ZU] = &DumpCustomVTK::pack_zu; + if (domain->triclinic) pack_choice[ZU] = &DumpVTK::pack_zu_triclinic; + else pack_choice[ZU] = &DumpVTK::pack_zu; vtype[ZU] = DOUBLE; name[ZU] = arg[iarg]; } else if (strcmp(arg[iarg],"xsu") == 0) { - if (domain->triclinic) pack_choice[XSU] = &DumpCustomVTK::pack_xsu_triclinic; - else pack_choice[XSU] = &DumpCustomVTK::pack_xsu; + if (domain->triclinic) pack_choice[XSU] = &DumpVTK::pack_xsu_triclinic; + else pack_choice[XSU] = &DumpVTK::pack_xsu; vtype[XSU] = DOUBLE; name[XSU] = arg[iarg]; } else if (strcmp(arg[iarg],"ysu") == 0) { - if (domain->triclinic) pack_choice[YSU] = &DumpCustomVTK::pack_ysu_triclinic; - else pack_choice[YSU] = &DumpCustomVTK::pack_ysu; + if (domain->triclinic) pack_choice[YSU] = &DumpVTK::pack_ysu_triclinic; + else pack_choice[YSU] = &DumpVTK::pack_ysu; vtype[YSU] = DOUBLE; name[YSU] = arg[iarg]; } else if (strcmp(arg[iarg],"zsu") == 0) { - if (domain->triclinic) pack_choice[ZSU] = &DumpCustomVTK::pack_zsu_triclinic; - else pack_choice[ZSU] = &DumpCustomVTK::pack_zsu; + if (domain->triclinic) pack_choice[ZSU] = &DumpVTK::pack_zsu_triclinic; + else pack_choice[ZSU] = &DumpVTK::pack_zsu; vtype[ZSU] = DOUBLE; name[ZSU] = arg[iarg]; } else if (strcmp(arg[iarg],"ix") == 0) { - pack_choice[IX] = &DumpCustomVTK::pack_ix; + pack_choice[IX] = &DumpVTK::pack_ix; vtype[IX] = INT; name[IX] = arg[iarg]; } else if (strcmp(arg[iarg],"iy") == 0) { - pack_choice[IY] = &DumpCustomVTK::pack_iy; + pack_choice[IY] = &DumpVTK::pack_iy; vtype[IY] = INT; name[IY] = arg[iarg]; } else if (strcmp(arg[iarg],"iz") == 0) { - pack_choice[IZ] = &DumpCustomVTK::pack_iz; + pack_choice[IZ] = &DumpVTK::pack_iz; vtype[IZ] = INT; name[IZ] = arg[iarg]; } else if (strcmp(arg[iarg],"vx") == 0) { - pack_choice[VX] = &DumpCustomVTK::pack_vx; + pack_choice[VX] = &DumpVTK::pack_vx; vtype[VX] = DOUBLE; name[VX] = arg[iarg]; } else if (strcmp(arg[iarg],"vy") == 0) { - pack_choice[VY] = &DumpCustomVTK::pack_vy; + pack_choice[VY] = &DumpVTK::pack_vy; vtype[VY] = DOUBLE; name[VY] = arg[iarg]; } else if (strcmp(arg[iarg],"vz") == 0) { - pack_choice[VZ] = &DumpCustomVTK::pack_vz; + pack_choice[VZ] = &DumpVTK::pack_vz; vtype[VZ] = DOUBLE; name[VZ] = arg[iarg]; } else if (strcmp(arg[iarg],"fx") == 0) { - pack_choice[FX] = &DumpCustomVTK::pack_fx; + pack_choice[FX] = &DumpVTK::pack_fx; vtype[FX] = DOUBLE; name[FX] = arg[iarg]; } else if (strcmp(arg[iarg],"fy") == 0) { - pack_choice[FY] = &DumpCustomVTK::pack_fy; + pack_choice[FY] = &DumpVTK::pack_fy; vtype[FY] = DOUBLE; name[FY] = arg[iarg]; } else if (strcmp(arg[iarg],"fz") == 0) { - pack_choice[FZ] = &DumpCustomVTK::pack_fz; + pack_choice[FZ] = &DumpVTK::pack_fz; vtype[FZ] = DOUBLE; name[FZ] = arg[iarg]; } else if (strcmp(arg[iarg],"q") == 0) { if (!atom->q_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[Q] = &DumpCustomVTK::pack_q; + pack_choice[Q] = &DumpVTK::pack_q; vtype[Q] = DOUBLE; name[Q] = arg[iarg]; } else if (strcmp(arg[iarg],"mux") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[MUX] = &DumpCustomVTK::pack_mux; + pack_choice[MUX] = &DumpVTK::pack_mux; vtype[MUX] = DOUBLE; name[MUX] = arg[iarg]; } else if (strcmp(arg[iarg],"muy") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[MUY] = &DumpCustomVTK::pack_muy; + pack_choice[MUY] = &DumpVTK::pack_muy; vtype[MUY] = DOUBLE; name[MUY] = arg[iarg]; } else if (strcmp(arg[iarg],"muz") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[MUZ] = &DumpCustomVTK::pack_muz; + pack_choice[MUZ] = &DumpVTK::pack_muz; vtype[MUZ] = DOUBLE; name[MUZ] = arg[iarg]; } else if (strcmp(arg[iarg],"mu") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[MU] = &DumpCustomVTK::pack_mu; + pack_choice[MU] = &DumpVTK::pack_mu; vtype[MU] = DOUBLE; name[MU] = arg[iarg]; } else if (strcmp(arg[iarg],"radius") == 0) { if (!atom->radius_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[RADIUS] = &DumpCustomVTK::pack_radius; + pack_choice[RADIUS] = &DumpVTK::pack_radius; vtype[RADIUS] = DOUBLE; name[RADIUS] = arg[iarg]; } else if (strcmp(arg[iarg],"diameter") == 0) { if (!atom->radius_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[DIAMETER] = &DumpCustomVTK::pack_diameter; + pack_choice[DIAMETER] = &DumpVTK::pack_diameter; vtype[DIAMETER] = DOUBLE; name[DIAMETER] = arg[iarg]; } else if (strcmp(arg[iarg],"omegax") == 0) { if (!atom->omega_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[OMEGAX] = &DumpCustomVTK::pack_omegax; + pack_choice[OMEGAX] = &DumpVTK::pack_omegax; vtype[OMEGAX] = DOUBLE; name[OMEGAX] = arg[iarg]; } else if (strcmp(arg[iarg],"omegay") == 0) { if (!atom->omega_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[OMEGAY] = &DumpCustomVTK::pack_omegay; + pack_choice[OMEGAY] = &DumpVTK::pack_omegay; vtype[OMEGAY] = DOUBLE; name[OMEGAY] = arg[iarg]; } else if (strcmp(arg[iarg],"omegaz") == 0) { if (!atom->omega_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[OMEGAZ] = &DumpCustomVTK::pack_omegaz; + pack_choice[OMEGAZ] = &DumpVTK::pack_omegaz; vtype[OMEGAZ] = DOUBLE; name[OMEGAZ] = arg[iarg]; } else if (strcmp(arg[iarg],"angmomx") == 0) { if (!atom->angmom_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[ANGMOMX] = &DumpCustomVTK::pack_angmomx; + pack_choice[ANGMOMX] = &DumpVTK::pack_angmomx; vtype[ANGMOMX] = DOUBLE; name[ANGMOMX] = arg[iarg]; } else if (strcmp(arg[iarg],"angmomy") == 0) { if (!atom->angmom_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[ANGMOMY] = &DumpCustomVTK::pack_angmomy; + pack_choice[ANGMOMY] = &DumpVTK::pack_angmomy; vtype[ANGMOMY] = DOUBLE; name[ANGMOMY] = arg[iarg]; } else if (strcmp(arg[iarg],"angmomz") == 0) { if (!atom->angmom_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[ANGMOMZ] = &DumpCustomVTK::pack_angmomz; + pack_choice[ANGMOMZ] = &DumpVTK::pack_angmomz; vtype[ANGMOMZ] = DOUBLE; name[ANGMOMZ] = arg[iarg]; } else if (strcmp(arg[iarg],"tqx") == 0) { if (!atom->torque_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[TQX] = &DumpCustomVTK::pack_tqx; + pack_choice[TQX] = &DumpVTK::pack_tqx; vtype[TQX] = DOUBLE; name[TQX] = arg[iarg]; } else if (strcmp(arg[iarg],"tqy") == 0) { if (!atom->torque_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[TQY] = &DumpCustomVTK::pack_tqy; + pack_choice[TQY] = &DumpVTK::pack_tqy; vtype[TQY] = DOUBLE; name[TQY] = arg[iarg]; } else if (strcmp(arg[iarg],"tqz") == 0) { if (!atom->torque_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[TQZ] = &DumpCustomVTK::pack_tqz; + pack_choice[TQZ] = &DumpVTK::pack_tqz; vtype[TQZ] = DOUBLE; name[TQZ] = arg[iarg]; @@ -1728,7 +1731,7 @@ int DumpCustomVTK::parse_fields(int narg, char **arg) // if no trailing [], then arg is set to 0, else arg is int between [] } else if (strncmp(arg[iarg],"c_",2) == 0) { - pack_choice[ATTRIBUTES+i] = &DumpCustomVTK::pack_compute; + pack_choice[ATTRIBUTES+i] = &DumpVTK::pack_compute; vtype[ATTRIBUTES+i] = DOUBLE; int n = strlen(arg[iarg]); @@ -1738,24 +1741,24 @@ int DumpCustomVTK::parse_fields(int narg, char **arg) char *ptr = strchr(suffix,'['); if (ptr) { if (suffix[strlen(suffix)-1] != ']') - error->all(FLERR,"Invalid attribute in dump custom/vtk command"); + error->all(FLERR,"Invalid attribute in dump vtk command"); argindex[ATTRIBUTES+i] = atoi(ptr+1); *ptr = '\0'; } else argindex[ATTRIBUTES+i] = 0; n = modify->find_compute(suffix); - if (n < 0) error->all(FLERR,"Could not find dump custom/vtk compute ID"); + if (n < 0) error->all(FLERR,"Could not find dump vtk compute ID"); if (modify->compute[n]->peratom_flag == 0) - error->all(FLERR,"Dump custom/vtk compute does not compute per-atom info"); + error->all(FLERR,"Dump vtk compute does not compute per-atom info"); if (argindex[ATTRIBUTES+i] == 0 && modify->compute[n]->size_peratom_cols > 0) error->all(FLERR, - "Dump custom/vtk compute does not calculate per-atom vector"); + "Dump vtk compute does not calculate per-atom vector"); if (argindex[ATTRIBUTES+i] > 0 && modify->compute[n]->size_peratom_cols == 0) error->all(FLERR,\ - "Dump custom/vtk compute does not calculate per-atom array"); + "Dump vtk compute does not calculate per-atom array"); if (argindex[ATTRIBUTES+i] > 0 && argindex[ATTRIBUTES+i] > modify->compute[n]->size_peratom_cols) - error->all(FLERR,"Dump custom/vtk compute vector is accessed out-of-range"); + error->all(FLERR,"Dump vtk compute vector is accessed out-of-range"); field2index[ATTRIBUTES+i] = add_compute(suffix); name[ATTRIBUTES+i] = arg[iarg]; @@ -1765,7 +1768,7 @@ int DumpCustomVTK::parse_fields(int narg, char **arg) // if no trailing [], then arg is set to 0, else arg is between [] } else if (strncmp(arg[iarg],"f_",2) == 0) { - pack_choice[ATTRIBUTES+i] = &DumpCustomVTK::pack_fix; + pack_choice[ATTRIBUTES+i] = &DumpVTK::pack_fix; vtype[ATTRIBUTES+i] = DOUBLE; int n = strlen(arg[iarg]); @@ -1775,22 +1778,22 @@ int DumpCustomVTK::parse_fields(int narg, char **arg) char *ptr = strchr(suffix,'['); if (ptr) { if (suffix[strlen(suffix)-1] != ']') - error->all(FLERR,"Invalid attribute in dump custom/vtk command"); + error->all(FLERR,"Invalid attribute in dump vtk command"); argindex[ATTRIBUTES+i] = atoi(ptr+1); *ptr = '\0'; } else argindex[ATTRIBUTES+i] = 0; n = modify->find_fix(suffix); - if (n < 0) error->all(FLERR,"Could not find dump custom/vtk fix ID"); + if (n < 0) error->all(FLERR,"Could not find dump vtk fix ID"); if (modify->fix[n]->peratom_flag == 0) - error->all(FLERR,"Dump custom/vtk fix does not compute per-atom info"); + error->all(FLERR,"Dump vtk fix does not compute per-atom info"); if (argindex[ATTRIBUTES+i] == 0 && modify->fix[n]->size_peratom_cols > 0) - error->all(FLERR,"Dump custom/vtk fix does not compute per-atom vector"); + error->all(FLERR,"Dump vtk fix does not compute per-atom vector"); if (argindex[ATTRIBUTES+i] > 0 && modify->fix[n]->size_peratom_cols == 0) - error->all(FLERR,"Dump custom/vtk fix does not compute per-atom array"); + error->all(FLERR,"Dump vtk fix does not compute per-atom array"); if (argindex[ATTRIBUTES+i] > 0 && argindex[ATTRIBUTES+i] > modify->fix[n]->size_peratom_cols) - error->all(FLERR,"Dump custom/vtk fix vector is accessed out-of-range"); + error->all(FLERR,"Dump vtk fix vector is accessed out-of-range"); field2index[ATTRIBUTES+i] = add_fix(suffix); name[ATTRIBUTES+i] = arg[iarg]; @@ -1799,7 +1802,7 @@ int DumpCustomVTK::parse_fields(int narg, char **arg) // variable value = v_name } else if (strncmp(arg[iarg],"v_",2) == 0) { - pack_choice[ATTRIBUTES+i] = &DumpCustomVTK::pack_variable; + pack_choice[ATTRIBUTES+i] = &DumpVTK::pack_variable; vtype[ATTRIBUTES+i] = DOUBLE; int n = strlen(arg[iarg]); @@ -1809,9 +1812,9 @@ int DumpCustomVTK::parse_fields(int narg, char **arg) argindex[ATTRIBUTES+i] = 0; n = input->variable->find(suffix); - if (n < 0) error->all(FLERR,"Could not find dump custom/vtk variable name"); + if (n < 0) error->all(FLERR,"Could not find dump vtk variable name"); if (input->variable->atomstyle(n) == 0) - error->all(FLERR,"Dump custom/vtk variable is not atom-style variable"); + error->all(FLERR,"Dump vtk variable is not atom-style variable"); field2index[ATTRIBUTES+i] = add_variable(suffix); name[ATTRIBUTES+i] = suffix; @@ -1820,7 +1823,7 @@ int DumpCustomVTK::parse_fields(int narg, char **arg) // custom per-atom floating point value = d_ID } else if (strncmp(arg[iarg],"d_",2) == 0) { - pack_choice[ATTRIBUTES+i] = &DumpCustomVTK::pack_custom; + pack_choice[ATTRIBUTES+i] = &DumpVTK::pack_custom; vtype[ATTRIBUTES+i] = DOUBLE; int n = strlen(arg[iarg]); @@ -1843,7 +1846,7 @@ int DumpCustomVTK::parse_fields(int narg, char **arg) // custom per-atom integer value = i_ID } else if (strncmp(arg[iarg],"i_",2) == 0) { - pack_choice[ATTRIBUTES+i] = &DumpCustomVTK::pack_custom; + pack_choice[ATTRIBUTES+i] = &DumpVTK::pack_custom; vtype[ATTRIBUTES+i] = INT; int n = strlen(arg[iarg]); @@ -1873,7 +1876,7 @@ int DumpCustomVTK::parse_fields(int narg, char **arg) /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::identify_vectors() +void DumpVTK::identify_vectors() { // detect vectors vector_set.insert(X); // required @@ -1923,7 +1926,7 @@ void DumpCustomVTK::identify_vectors() if already in list, do not add, just return index, else add to list ------------------------------------------------------------------------- */ -int DumpCustomVTK::add_compute(char *id) +int DumpVTK::add_compute(char *id) { int icompute; for (icompute = 0; icompute < ncompute; icompute++) @@ -1948,7 +1951,7 @@ int DumpCustomVTK::add_compute(char *id) if already in list, do not add, just return index, else add to list ------------------------------------------------------------------------- */ -int DumpCustomVTK::add_fix(char *id) +int DumpVTK::add_fix(char *id) { int ifix; for (ifix = 0; ifix < nfix; ifix++) @@ -1973,7 +1976,7 @@ int DumpCustomVTK::add_fix(char *id) if already in list, do not add, just return index, else add to list ------------------------------------------------------------------------- */ -int DumpCustomVTK::add_variable(char *id) +int DumpVTK::add_variable(char *id) { int ivariable; for (ivariable = 0; ivariable < nvariable; ivariable++) @@ -2002,7 +2005,7 @@ int DumpCustomVTK::add_variable(char *id) if already in list, do not add, just return index, else add to list ------------------------------------------------------------------------- */ -int DumpCustomVTK::add_custom(char *id, int flag) +int DumpVTK::add_custom(char *id, int flag) { int icustom; for (icustom = 0; icustom < ncustom; icustom++) @@ -2026,7 +2029,7 @@ int DumpCustomVTK::add_custom(char *id, int flag) /* ---------------------------------------------------------------------- */ -int DumpCustomVTK::modify_param(int narg, char **arg) +int DumpVTK::modify_param(int narg, char **arg) { if (strcmp(arg[0],"region") == 0) { if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); @@ -2301,7 +2304,7 @@ int DumpCustomVTK::modify_param(int narg, char **arg) return # of bytes of allocated memory in buf, choose, variable arrays ------------------------------------------------------------------------- */ -bigint DumpCustomVTK::memory_usage() +bigint DumpVTK::memory_usage() { bigint bytes = Dump::memory_usage(); bytes += memory->usage(choose,maxlocal); @@ -2315,7 +2318,7 @@ bigint DumpCustomVTK::memory_usage() extraction of Compute, Fix, Variable results ------------------------------------------------------------------------- */ -void DumpCustomVTK::pack_compute(int n) +void DumpVTK::pack_compute(int n) { double *vector = compute[field2index[current_pack_choice_key]]->vector_atom; double **array = compute[field2index[current_pack_choice_key]]->array_atom; @@ -2337,7 +2340,7 @@ void DumpCustomVTK::pack_compute(int n) /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::pack_fix(int n) +void DumpVTK::pack_fix(int n) { double *vector = fix[field2index[current_pack_choice_key]]->vector_atom; double **array = fix[field2index[current_pack_choice_key]]->array_atom; @@ -2359,7 +2362,7 @@ void DumpCustomVTK::pack_fix(int n) /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::pack_variable(int n) +void DumpVTK::pack_variable(int n) { double *vector = vbuf[field2index[current_pack_choice_key]]; @@ -2371,9 +2374,8 @@ void DumpCustomVTK::pack_variable(int n) /* ---------------------------------------------------------------------- */ -void DumpCustomVTK::pack_custom(int n) +void DumpVTK::pack_custom(int n) { - int index = field2index[n]; if (flag_custom[index] == 0) { // integer diff --git a/src/USER-VTK/dump_custom_vtk.h b/src/USER-VTK/dump_vtk.h similarity index 95% rename from src/USER-VTK/dump_custom_vtk.h rename to src/USER-VTK/dump_vtk.h index f3b4a8b63e..603ca114ba 100644 --- a/src/USER-VTK/dump_custom_vtk.h +++ b/src/USER-VTK/dump_vtk.h @@ -17,12 +17,12 @@ #ifdef DUMP_CLASS -DumpStyle(custom/vtk,DumpCustomVTK) +DumpStyle(vtk,DumpVTK) #else -#ifndef LMP_DUMP_CUSTOM_VTK_H -#define LMP_DUMP_CUSTOM_VTK_H +#ifndef LMP_DUMP_VTK_H +#define LMP_DUMP_VTK_H #include "dump_custom.h" #include @@ -40,7 +40,7 @@ class vtkUnstructuredGrid; namespace LAMMPS_NS { /** - * @brief DumpCustomVTK class + * @brief DumpVTK class * write atom data to vtk files. * * Similar to the DumpCustom class but uses the vtk library to write data to vtk simple @@ -54,10 +54,11 @@ namespace LAMMPS_NS { * This dump command does not support compressed files, buffering or custom format strings, * multiproc is only supported by the xml formats, multifile option has to be used. */ -class DumpCustomVTK : public DumpCustom { + +class DumpVTK : public DumpCustom { public: - DumpCustomVTK(class LAMMPS *, int, char **); - virtual ~DumpCustomVTK(); + DumpVTK(class LAMMPS *, int, char **); + virtual ~DumpVTK(); virtual void write(); protected: @@ -86,11 +87,11 @@ class DumpCustomVTK : public DumpCustom { int add_custom(char *, int); virtual int modify_param(int, char **); - typedef void (DumpCustomVTK::*FnPtrHeader)(bigint); + typedef void (DumpVTK::*FnPtrHeader)(bigint); FnPtrHeader header_choice; // ptr to write header functions void header_vtk(bigint); - typedef void (DumpCustomVTK::*FnPtrWrite)(int, double *); + typedef void (DumpVTK::*FnPtrWrite)(int, double *); FnPtrWrite write_choice; // ptr to write data functions void write_vtk(int, double *); void write_vtp(int, double *); @@ -103,7 +104,7 @@ class DumpCustomVTK : public DumpCustom { void write_domain_vtr(); void write_domain_vtu_triclinic(); - typedef void (DumpCustomVTK::*FnPtrPack)(int); + typedef void (DumpVTK::*FnPtrPack)(int); std::map pack_choice; // ptrs to pack functions std::map vtype; // data type std::map name; // attribute labels diff --git a/src/compute_dipole_chunk.cpp b/src/compute_dipole_chunk.cpp index 74d66e7c1b..45389ee614 100644 --- a/src/compute_dipole_chunk.cpp +++ b/src/compute_dipole_chunk.cpp @@ -31,10 +31,12 @@ enum { MASSCENTER, GEOMCENTER }; ComputeDipoleChunk::ComputeDipoleChunk(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), - idchunk(NULL), massproc(NULL), masstotal(NULL), chrgproc(NULL), chrgtotal(NULL), com(NULL), + idchunk(NULL), massproc(NULL), masstotal(NULL), chrgproc(NULL), + chrgtotal(NULL), com(NULL), comall(NULL), dipole(NULL), dipoleall(NULL) { - if ((narg != 4) && (narg != 5)) error->all(FLERR,"Illegal compute dipole/chunk command"); + if ((narg != 4) && (narg != 5)) + error->all(FLERR,"Illegal compute dipole/chunk command"); array_flag = 1; size_array_cols = 4; diff --git a/src/domain.cpp b/src/domain.cpp index 31fb3b8559..8ead12cd4e 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -944,6 +944,10 @@ void Domain::subbox_too_small_check(double thresh) changed "if" to "while" to enable distance to far-away ghost atom returned by atom->map() to be wrapped back into box could be problem for looking up atom IDs when cutoff > boxsize + this should not be used if atom has moved infinitely far outside box + b/c while could iterate forever + e.g. fix shake prediction of new position with highly overlapped atoms + use minimum_image_once() instead ------------------------------------------------------------------------- */ void Domain::minimum_image(double &dx, double &dy, double &dz) @@ -1009,6 +1013,10 @@ void Domain::minimum_image(double &dx, double &dy, double &dz) changed "if" to "while" to enable distance to far-away ghost atom returned by atom->map() to be wrapped back into box could be problem for looking up atom IDs when cutoff > boxsize + this should not be used if atom has moved infinitely far outside box + b/c while could iterate forever + e.g. fix shake prediction of new position with highly overlapped atoms + use minimum_image_once() instead ------------------------------------------------------------------------- */ void Domain::minimum_image(double *delta) @@ -1067,6 +1075,70 @@ void Domain::minimum_image(double *delta) } } +/* ---------------------------------------------------------------------- + minimum image convention in periodic dimensions + use 1/2 of box size as test + for triclinic, also add/subtract tilt factors in other dims as needed + only shift by one box length in each direction + this should not be used if multiple box shifts are required +------------------------------------------------------------------------- */ + +void Domain::minimum_image_once(double *delta) +{ + if (triclinic == 0) { + if (xperiodic) { + if (fabs(delta[0]) > xprd_half) { + if (delta[0] < 0.0) delta[0] += xprd; + else delta[0] -= xprd; + } + } + if (yperiodic) { + if (fabs(delta[1]) > yprd_half) { + if (delta[1] < 0.0) delta[1] += yprd; + else delta[1] -= yprd; + } + } + if (zperiodic) { + if (fabs(delta[2]) > zprd_half) { + if (delta[2] < 0.0) delta[2] += zprd; + else delta[2] -= zprd; + } + } + + } else { + if (zperiodic) { + if (fabs(delta[2]) > zprd_half) { + if (delta[2] < 0.0) { + delta[2] += zprd; + delta[1] += yz; + delta[0] += xz; + } else { + delta[2] -= zprd; + delta[1] -= yz; + delta[0] -= xz; + } + } + } + if (yperiodic) { + if (fabs(delta[1]) > yprd_half) { + if (delta[1] < 0.0) { + delta[1] += yprd; + delta[0] += xy; + } else { + delta[1] -= yprd; + delta[0] -= xy; + } + } + } + if (xperiodic) { + if (fabs(delta[0]) > xprd_half) { + if (delta[0] < 0.0) delta[0] += xprd; + else delta[0] -= xprd; + } + } + } +} + /* ---------------------------------------------------------------------- return local index of atom J or any of its images that is closest to atom I if J is not a valid index like -1, just return it diff --git a/src/domain.h b/src/domain.h index 22e3191231..0f47a3c2ca 100644 --- a/src/domain.h +++ b/src/domain.h @@ -112,6 +112,7 @@ class Domain : protected Pointers { void subbox_too_small_check(double); void minimum_image(double &, double &, double &); void minimum_image(double *); + void minimum_image_once(double *); int closest_image(int, int); int closest_image(double *, int); void closest_image(const double * const, const double * const, diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 4cd99b41d7..1d12ef578e 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -667,7 +667,7 @@ int Neighbor::init_pair() // create new lists, one per request including added requests // wait to allocate initial pages until copy lists are detected - // NOTE: can I allocation now, instead of down below? + // NOTE: can I allocate now, instead of down below? nlist = nrequest; @@ -1216,7 +1216,7 @@ void Neighbor::morph_copy() // check all other lists - for (j = 0; j < i; j++) { + for (j = 0; j < nrequest; j++) { if (i == j) continue; jrq = requests[j]; @@ -1279,7 +1279,7 @@ void Neighbor::morph_copy() // turn list I into a copy of list J // do not copy a list from another copy list, but from its parent list - if (j < i) { + if (j < nrequest) { irq->copy = 1; if (jrq->copy) irq->copylist = jrq->copylist; else irq->copylist = j; -- GitLab From 51c6d502687b4a4afeabeb4a5b3fcd418e6efb1d Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 4 May 2017 11:46:58 -0600 Subject: [PATCH 084/593] patch 4May17 --- doc/src/Manual.txt | 4 ++-- src/version.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index 755bbe5e7e..bceb174017 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -1,7 +1,7 @@ LAMMPS Users Manual - + @@ -21,7 +21,7 @@

    LAMMPS Documentation :c,h3 -13 Apr 2017 version :c,h4 +4 May 2017 version :c,h4 Version info: :h4 diff --git a/src/version.h b/src/version.h index 2068d64573..7ae7ec4872 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "13 Apr 2017" +#define LAMMPS_VERSION "4 May 2017" -- GitLab From 2f71245d827769f7d11afc0bae78b49890d6bac3 Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Thu, 4 May 2017 13:00:06 -0500 Subject: [PATCH 085/593] Removed extra "helper" functions. --- src/USER-MISC/pair_meam_spline.cpp | 187 ----------------------------- src/USER-MISC/pair_meam_spline.h | 5 - 2 files changed, 192 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 704e76ee61..5a96d1f9c6 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -406,193 +406,6 @@ double PairMEAMSpline::three_body_density(int i) return rho_value; } -double PairMEAMSpline::compute_three_body_contrib_to_charge_density(int i, int& numBonds) { - double rho_value = 0; - MEAM2Body* nextTwoBodyInfo = twoBodyInfo; - double** const x = atom->x; - - for(int jj = 0; jj < listfull->numneigh[i]; jj++) { - int j = listfull->firstneigh[i][jj]; - j &= NEIGHMASK; - - double jdelx = x[j][0] - x[i][0]; - double jdely = x[j][1] - x[i][1]; - double jdelz = x[j][2] - x[i][2]; - double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; - - if(rij_sq < cutoff*cutoff) { - double rij = sqrt(rij_sq); - double partial_sum = 0; - - nextTwoBodyInfo->tag = j; - nextTwoBodyInfo->r = rij; - nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); - nextTwoBodyInfo->del[0] = jdelx / rij; - nextTwoBodyInfo->del[1] = jdely / rij; - nextTwoBodyInfo->del[2] = jdelz / rij; - - for(int kk = 0; kk < numBonds; kk++) { - const MEAM2Body& bondk = twoBodyInfo[kk]; - double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + - nextTwoBodyInfo->del[1]*bondk.del[1] + - nextTwoBodyInfo->del[2]*bondk.del[2]); - partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); - } - - rho_value += nextTwoBodyInfo->f * partial_sum; - rho_value += rhos[i_to_potl(j)].eval(rij); - - numBonds++; - nextTwoBodyInfo++; - } - } - - return rho_value; -} - -double PairMEAMSpline::compute_embedding_energy_and_deriv(int eflag, int i, double rho_value) { - double Uprime_i; - double embeddingEnergy = Us[i_to_potl(i)].eval(rho_value, Uprime_i) - - zero_atom_energies[i_to_potl(i)]; - - Uprime_values[i] = Uprime_i; - if(eflag) { - if(eflag_global) - eng_vdwl += embeddingEnergy; - if(eflag_atom) - eatom[i] += embeddingEnergy; - } - return Uprime_i; -} - -void PairMEAMSpline::compute_three_body_contrib_to_forces(int i, int numBonds, double Uprime_i) { - double forces_i[3] = {0, 0, 0}; - double** forces = atom->f; - - for(int jj = 0; jj < numBonds; jj++) { - const MEAM2Body bondj = twoBodyInfo[jj]; - double rij = bondj.r; - int j = bondj.tag; - - double f_rij_prime = bondj.fprime; - double f_rij = bondj.f; - - double forces_j[3] = {0, 0, 0}; - - MEAM2Body const* bondk = twoBodyInfo; - for(int kk = 0; kk < jj; kk++, ++bondk) { - double rik = bondk->r; - - double cos_theta = (bondj.del[0]*bondk->del[0] + - bondj.del[1]*bondk->del[1] + - bondj.del[2]*bondk->del[2]); - double g_prime; - double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); - double f_rik_prime = bondk->fprime; - double f_rik = bondk->f; - - double fij = -Uprime_i * g_value * f_rik * f_rij_prime; - double fik = -Uprime_i * g_value * f_rij * f_rik_prime; - - double prefactor = Uprime_i * f_rij * f_rik * g_prime; - double prefactor_ij = prefactor / rij; - double prefactor_ik = prefactor / rik; - fij += prefactor_ij * cos_theta; - fik += prefactor_ik * cos_theta; - - double fj[3], fk[3]; - - fj[0] = bondj.del[0] * fij - bondk->del[0] * prefactor_ij; - fj[1] = bondj.del[1] * fij - bondk->del[1] * prefactor_ij; - fj[2] = bondj.del[2] * fij - bondk->del[2] * prefactor_ij; - forces_j[0] += fj[0]; - forces_j[1] += fj[1]; - forces_j[2] += fj[2]; - - fk[0] = bondk->del[0] * fik - bondj.del[0] * prefactor_ik; - fk[1] = bondk->del[1] * fik - bondj.del[1] * prefactor_ik; - fk[2] = bondk->del[2] * fik - bondj.del[2] * prefactor_ik; - forces_i[0] -= fk[0]; - forces_i[1] -= fk[1]; - forces_i[2] -= fk[2]; - - int k = bondk->tag; - forces[k][0] += fk[0]; - forces[k][1] += fk[1]; - forces[k][2] += fk[2]; - - if(evflag) { - double delta_ij[3]; - double delta_ik[3]; - delta_ij[0] = bondj.del[0] * rij; - delta_ij[1] = bondj.del[1] * rij; - delta_ij[2] = bondj.del[2] * rij; - delta_ik[0] = bondk->del[0] * rik; - delta_ik[1] = bondk->del[1] * rik; - delta_ik[2] = bondk->del[2] * rik; - ev_tally3(i, j, k, 0.0, 0.0, fj, fk, delta_ij, delta_ik); - } - } - - forces[i][0] -= forces_j[0]; - forces[i][1] -= forces_j[1]; - forces[i][2] -= forces_j[2]; - forces[j][0] += forces_j[0]; - forces[j][1] += forces_j[1]; - forces[j][2] += forces_j[2]; - } - - forces[i][0] += forces_i[0]; - forces[i][1] += forces_i[1]; - forces[i][2] += forces_i[2]; -} - -void PairMEAMSpline::compute_two_body_pair_interactions() { - double** const x = atom->x; - double** forces = atom->f; - - for(int ii = 0; ii < listhalf->inum; ii++) { - int i = listhalf->ilist[ii]; - - for(int jj = 0; jj < listhalf->numneigh[i]; jj++) { - int j = listhalf->firstneigh[i][jj]; - j &= NEIGHMASK; - - double jdel[3]; - jdel[0] = x[j][0] - x[i][0]; - jdel[1] = x[j][1] - x[i][1]; - jdel[2] = x[j][2] - x[i][2]; - double rij_sq = jdel[0]*jdel[0] + jdel[1]*jdel[1] + jdel[2]*jdel[2]; - - if(rij_sq < cutoff*cutoff) { - double rij = sqrt(rij_sq); - - double rho_prime_i,rho_prime_j; - rhos[i_to_potl(i)].eval(rij,rho_prime_i); - rhos[i_to_potl(j)].eval(rij,rho_prime_j); - double fpair = rho_prime_j * Uprime_values[i] + rho_prime_i*Uprime_values[j]; - double pair_pot_deriv; - double pair_pot = phis[ij_to_potl(i,j)].eval(rij, pair_pot_deriv); - - fpair += pair_pot_deriv; - - // Divide by r_ij to get forces from gradient - - fpair /= rij; - - forces[i][0] += jdel[0]*fpair; - forces[i][1] += jdel[1]*fpair; - forces[i][2] += jdel[2]*fpair; - forces[j][0] -= jdel[0]*fpair; - forces[j][1] -= jdel[1]*fpair; - forces[j][2] -= jdel[2]*fpair; - if (evflag) ev_tally(i, j, atom->nlocal, force->newton_pair, - pair_pot, 0.0, -fpair, jdel[0], jdel[1], jdel[2]); - } - } - } -} - /* ---------------------------------------------------------------------- helper functions to map atom types to potential array indices ------------------------------------------------------------------------- */ diff --git a/src/USER-MISC/pair_meam_spline.h b/src/USER-MISC/pair_meam_spline.h index 7e4f421909..4be8f81ede 100644 --- a/src/USER-MISC/pair_meam_spline.h +++ b/src/USER-MISC/pair_meam_spline.h @@ -52,11 +52,6 @@ public: // helper functions for compute() - double compute_three_body_contrib_to_charge_density(int i, int& numBonds); // returns rho_value and returns numBonds by reference - double compute_embedding_energy_and_deriv(int eflag, int i, double rho_value); // returns the derivative of the embedding energy Uprime_i - void compute_three_body_contrib_to_forces(int i, int numBonds, double Uprime_i); - void compute_two_body_pair_interactions(); - int ij_to_potl(int i, int j); int i_to_potl(int i); -- GitLab From 349c1443a1c023cca4e4885b53318ee2674ff044 Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Thu, 4 May 2017 13:01:45 -0500 Subject: [PATCH 086/593] Cleanup. --- src/USER-MISC/pair_meam_spline.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 5a96d1f9c6..9fcb6fed9c 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -186,8 +186,6 @@ void PairMEAMSpline::compute(int eflag, int vflag) } // Compute embedding energy and its derivative - - // double Uprime_i = compute_embedding_energy_and_deriv(eflag, i, rho_value); double Uprime_i; double embeddingEnergy = Us[i_to_potl(i)].eval(rho_value, Uprime_i) - zero_atom_energies[i_to_potl(i)]; @@ -201,8 +199,6 @@ void PairMEAMSpline::compute(int eflag, int vflag) } // Compute three-body contributions to force - - // compute_three_body_contrib_to_forces(i, numBonds, Uprime_i); double forces_i[3] = {0, 0, 0}; for(int jj = 0; jj < numBonds; jj++) { const MEAM2Body bondj = twoBodyInfo[jj]; @@ -287,7 +283,6 @@ void PairMEAMSpline::compute(int eflag, int vflag) comm->forward_comm_pair(this); // Compute two-body pair interactions - // compute_two_body_pair_interactions(); for(int ii = 0; ii < listhalf->inum; ii++) { int i = listhalf->ilist[ii]; -- GitLab From 5accce976a13d7e104c270d8a9fad414a563106a Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Thu, 4 May 2017 13:02:09 -0500 Subject: [PATCH 087/593] Cleanup. --- src/USER-MISC/pair_meam_spline.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 9fcb6fed9c..d86549912a 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -145,8 +145,6 @@ void PairMEAMSpline::compute(int eflag, int vflag) int numBonds = 0; // compute charge density and numBonds - - // double rho_value = compute_three_body_contrib_to_charge_density(i, numBonds); MEAM2Body* nextTwoBodyInfo = twoBodyInfo; double rho_value = 0; for(int jj = 0; jj < listfull->numneigh[i]; jj++) { -- GitLab From ffdc8b556d004fa4ee9b962aaf06e6627e7e73d8 Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Thu, 4 May 2017 13:03:09 -0500 Subject: [PATCH 088/593] Cleanup. --- src/USER-MISC/pair_meam_spline.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index d86549912a..d714652d61 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -458,9 +458,6 @@ void PairMEAMSpline::coeff(int narg, char **arg) { int i,j,n; - if (!allocated) - allocate(); - if (narg != 3 + atom->ntypes) error->all(FLERR,"Incorrect args for pair coefficients"); -- GitLab From 754b40cb310068fb2f391b8a535fb0a55bf8ec77 Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Thu, 4 May 2017 13:16:46 -0500 Subject: [PATCH 089/593] Removed unused functions. --- src/USER-MISC/pair_meam_spline.cpp | 72 ------------------------------ 1 file changed, 72 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index d714652d61..ff9cb80e4a 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -327,78 +327,6 @@ void PairMEAMSpline::compute(int eflag, int vflag) } -double PairMEAMSpline::pair_density(int i) -{ - double rho_value = 0; - MEAM2Body* nextTwoBodyInfo = twoBodyInfo; - double** const x = atom->x; - - for(int jj = 0; jj < listfull->numneigh[i]; jj++) { - int j = listfull->firstneigh[i][jj]; - j &= NEIGHMASK; - - double jdelx = x[j][0] - x[i][0]; - double jdely = x[j][1] - x[i][1]; - double jdelz = x[j][2] - x[i][2]; - double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; - double rij = sqrt(rij_sq); - - if(rij_sq < cutoff*cutoff) { - double rij = sqrt(rij_sq); - rho_value += rhos[i_to_potl(j)].eval(rij); - } - } - - return rho_value; -} - - - -double PairMEAMSpline::three_body_density(int i) -{ - double rho_value = 0; - int numBonds=0; - double** const x = atom->x; - - MEAM2Body* nextTwoBodyInfo = twoBodyInfo; - - for(int jj = 0; jj < listfull->numneigh[i]; jj++) { - int j = listfull->firstneigh[i][jj]; - j &= NEIGHMASK; - - double jdelx = x[j][0] - x[i][0]; - double jdely = x[j][1] - x[i][1]; - double jdelz = x[j][2] - x[i][2]; - double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; - - if(rij_sq < cutoff*cutoff) { - double rij = sqrt(rij_sq); - double partial_sum = 0; - - nextTwoBodyInfo->tag = j; - nextTwoBodyInfo->r = rij; - nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); - nextTwoBodyInfo->del[0] = jdelx / rij; - nextTwoBodyInfo->del[1] = jdely / rij; - nextTwoBodyInfo->del[2] = jdelz / rij; - - for(int kk = 0; kk < numBonds; kk++) { - const MEAM2Body& bondk = twoBodyInfo[kk]; - double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + - nextTwoBodyInfo->del[1]*bondk.del[1] + - nextTwoBodyInfo->del[2]*bondk.del[2]); - partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); - } - - rho_value += nextTwoBodyInfo->f * partial_sum; - numBonds++; - nextTwoBodyInfo++; - } - } - - return rho_value; -} - /* ---------------------------------------------------------------------- helper functions to map atom types to potential array indices ------------------------------------------------------------------------- */ -- GitLab From f7230006fef49bd57724f86b9b846fb3521b80d5 Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Thu, 4 May 2017 15:08:04 -0500 Subject: [PATCH 090/593] OpenMP version added. --- src/USER-MISC/pair_meam_spline.cpp | 2 +- src/USER-OMP/pair_meam_spline_omp.cpp | 40 +++++++++++++++++++-------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index ff9cb80e4a..7417e2ce64 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -304,7 +304,7 @@ void PairMEAMSpline::compute(int eflag, int vflag) double pair_pot_deriv; double pair_pot = phis[ij_to_potl(i,j)].eval(rij, pair_pot_deriv); - fpair += pair_pot_deriv; + fpair += pair_pot_deriv; // Divide by r_ij to get forces from gradient diff --git a/src/USER-OMP/pair_meam_spline_omp.cpp b/src/USER-OMP/pair_meam_spline_omp.cpp index 98e1541319..b4e0c48acc 100644 --- a/src/USER-OMP/pair_meam_spline_omp.cpp +++ b/src/USER-OMP/pair_meam_spline_omp.cpp @@ -140,19 +140,25 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) nextTwoBodyInfo->tag = j; nextTwoBodyInfo->r = rij; - nextTwoBodyInfo->f = f.eval(rij, nextTwoBodyInfo->fprime); + // nextTwoBodyInfo->f = f.eval(rij, nextTwoBodyInfo->fprime); + nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); nextTwoBodyInfo->del[0] = jdelx / rij; nextTwoBodyInfo->del[1] = jdely / rij; nextTwoBodyInfo->del[2] = jdelz / rij; for(int kk = 0; kk < numBonds; kk++) { const MEAM2Body& bondk = myTwoBodyInfo[kk]; - double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + nextTwoBodyInfo->del[1]*bondk.del[1] + nextTwoBodyInfo->del[2]*bondk.del[2]); - partial_sum += bondk.f * g.eval(cos_theta); + double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + + nextTwoBodyInfo->del[1]*bondk.del[1] + + nextTwoBodyInfo->del[2]*bondk.del[2]); + partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); + // double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + nextTwoBodyInfo->del[1]*bondk.del[1] + nextTwoBodyInfo->del[2]*bondk.del[2]); + // partial_sum += bondk.f * g.eval(cos_theta); } rho_value += nextTwoBodyInfo->f * partial_sum; - rho_value += rho.eval(rij); + // rho_value += rho.eval(rij); + rho_value += rhos[i_to_potl(j)].eval(rij); numBonds++; nextTwoBodyInfo++; @@ -161,7 +167,9 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) // Compute embedding energy and its derivative. double Uprime_i; - double embeddingEnergy = U.eval(rho_value, Uprime_i) - zero_atom_energy; + // double embeddingEnergy = U.eval(rho_value, Uprime_i) - zero_atom_energy; + double embeddingEnergy = Us[i_to_potl(i)].eval(rho_value, Uprime_i) + - zero_atom_energies[i_to_potl(i)]; Uprime_thr[i] = Uprime_i; if (EFLAG) e_tally_thr(this,i,i,nlocal,1/*newton_pair*/,embeddingEnergy,0.0,thr); @@ -187,7 +195,8 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) + bondj.del[1]*bondk->del[1] + bondj.del[2]*bondk->del[2]); double g_prime; - double g_value = g.eval(cos_theta, g_prime); + // double g_value = g.eval(cos_theta, g_prime); + double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); const double f_rik_prime = bondk->fprime; const double f_rik = bondk->f; @@ -292,13 +301,20 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) if(rij_sq < cutforcesq) { double rij = sqrt(rij_sq); - double rho_prime; - rho.eval(rij, rho_prime); - double fpair = rho_prime * (Uprime_values[i] + Uprime_values[j]); - + // double rho_prime; + // rho.eval(rij, rho_prime); + // double fpair = rho_prime * (Uprime_values[i] + Uprime_values[j]); + double rho_prime_i,rho_prime_j; + rhos[i_to_potl(i)].eval(rij,rho_prime_i); + rhos[i_to_potl(j)].eval(rij,rho_prime_j); + double fpair = rho_prime_j * Uprime_values[i] + rho_prime_i*Uprime_values[j]; + + // double pair_pot_deriv; + // double pair_pot = phi.eval(rij, pair_pot_deriv); double pair_pot_deriv; - double pair_pot = phi.eval(rij, pair_pot_deriv); - fpair += pair_pot_deriv; + double pair_pot = phis[ij_to_potl(i,j)].eval(rij, pair_pot_deriv); + + fpair += pair_pot_deriv; // Divide by r_ij to get forces from gradient. fpair /= rij; -- GitLab From 42531389df270656829674afc53c51f4732f90eb Mon Sep 17 00:00:00 2001 From: DallasTrinkle Date: Thu, 4 May 2017 15:28:11 -0500 Subject: [PATCH 091/593] Cleanup of style (removing all tabs, shortened long lines). --- src/USER-MISC/pair_meam_spline.cpp | 197 +++++++++++++------------- src/USER-MISC/pair_meam_spline.h | 160 +++++++++++---------- src/USER-OMP/pair_meam_spline_omp.cpp | 29 ++-- 3 files changed, 194 insertions(+), 192 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 7417e2ce64..6fbff31753 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -14,8 +14,8 @@ /* ---------------------------------------------------------------------- Contributing author: Alexander Stukowski (LLNL), alex@stukowski.com Will Tipton (Cornell), wwt26@cornell.edu - Dallas R. Trinkle (UIUC), dtrinkle@illinois.edu - Pinchao Zhang (UIUC) + Dallas R. Trinkle (UIUC), dtrinkle@illinois.edu + Pinchao Zhang (UIUC) see LLNL copyright notice at bottom of file ------------------------------------------------------------------------- */ @@ -157,29 +157,29 @@ void PairMEAMSpline::compute(int eflag, int vflag) double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; if(rij_sq < cutoff*cutoff) { - double rij = sqrt(rij_sq); - double partial_sum = 0; - - nextTwoBodyInfo->tag = j; - nextTwoBodyInfo->r = rij; - nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); - nextTwoBodyInfo->del[0] = jdelx / rij; - nextTwoBodyInfo->del[1] = jdely / rij; - nextTwoBodyInfo->del[2] = jdelz / rij; - - for(int kk = 0; kk < numBonds; kk++) { - const MEAM2Body& bondk = twoBodyInfo[kk]; - double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + - nextTwoBodyInfo->del[1]*bondk.del[1] + - nextTwoBodyInfo->del[2]*bondk.del[2]); - partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); - } - - rho_value += nextTwoBodyInfo->f * partial_sum; - rho_value += rhos[i_to_potl(j)].eval(rij); - - numBonds++; - nextTwoBodyInfo++; + double rij = sqrt(rij_sq); + double partial_sum = 0; + + nextTwoBodyInfo->tag = j; + nextTwoBodyInfo->r = rij; + nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); + nextTwoBodyInfo->del[0] = jdelx / rij; + nextTwoBodyInfo->del[1] = jdely / rij; + nextTwoBodyInfo->del[2] = jdelz / rij; + + for(int kk = 0; kk < numBonds; kk++) { + const MEAM2Body& bondk = twoBodyInfo[kk]; + double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + + nextTwoBodyInfo->del[1]*bondk.del[1] + + nextTwoBodyInfo->del[2]*bondk.del[2]); + partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); + } + + rho_value += nextTwoBodyInfo->f * partial_sum; + rho_value += rhos[i_to_potl(j)].eval(rij); + + numBonds++; + nextTwoBodyInfo++; } } @@ -191,9 +191,9 @@ void PairMEAMSpline::compute(int eflag, int vflag) Uprime_values[i] = Uprime_i; if(eflag) { if(eflag_global) - eng_vdwl += embeddingEnergy; + eng_vdwl += embeddingEnergy; if(eflag_atom) - eatom[i] += embeddingEnergy; + eatom[i] += embeddingEnergy; } // Compute three-body contributions to force @@ -210,57 +210,57 @@ void PairMEAMSpline::compute(int eflag, int vflag) MEAM2Body const* bondk = twoBodyInfo; for(int kk = 0; kk < jj; kk++, ++bondk) { - double rik = bondk->r; - - double cos_theta = (bondj.del[0]*bondk->del[0] + - bondj.del[1]*bondk->del[1] + - bondj.del[2]*bondk->del[2]); - double g_prime; - double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); - double f_rik_prime = bondk->fprime; - double f_rik = bondk->f; - - double fij = -Uprime_i * g_value * f_rik * f_rij_prime; - double fik = -Uprime_i * g_value * f_rij * f_rik_prime; - - double prefactor = Uprime_i * f_rij * f_rik * g_prime; - double prefactor_ij = prefactor / rij; - double prefactor_ik = prefactor / rik; - fij += prefactor_ij * cos_theta; - fik += prefactor_ik * cos_theta; - - double fj[3], fk[3]; - - fj[0] = bondj.del[0] * fij - bondk->del[0] * prefactor_ij; - fj[1] = bondj.del[1] * fij - bondk->del[1] * prefactor_ij; - fj[2] = bondj.del[2] * fij - bondk->del[2] * prefactor_ij; - forces_j[0] += fj[0]; - forces_j[1] += fj[1]; - forces_j[2] += fj[2]; - - fk[0] = bondk->del[0] * fik - bondj.del[0] * prefactor_ik; - fk[1] = bondk->del[1] * fik - bondj.del[1] * prefactor_ik; - fk[2] = bondk->del[2] * fik - bondj.del[2] * prefactor_ik; - forces_i[0] -= fk[0]; - forces_i[1] -= fk[1]; - forces_i[2] -= fk[2]; - - int k = bondk->tag; - forces[k][0] += fk[0]; - forces[k][1] += fk[1]; - forces[k][2] += fk[2]; - - if(evflag) { - double delta_ij[3]; - double delta_ik[3]; - delta_ij[0] = bondj.del[0] * rij; - delta_ij[1] = bondj.del[1] * rij; - delta_ij[2] = bondj.del[2] * rij; - delta_ik[0] = bondk->del[0] * rik; - delta_ik[1] = bondk->del[1] * rik; - delta_ik[2] = bondk->del[2] * rik; - ev_tally3(i, j, k, 0.0, 0.0, fj, fk, delta_ij, delta_ik); - } + double rik = bondk->r; + + double cos_theta = (bondj.del[0]*bondk->del[0] + + bondj.del[1]*bondk->del[1] + + bondj.del[2]*bondk->del[2]); + double g_prime; + double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); + double f_rik_prime = bondk->fprime; + double f_rik = bondk->f; + + double fij = -Uprime_i * g_value * f_rik * f_rij_prime; + double fik = -Uprime_i * g_value * f_rij * f_rik_prime; + + double prefactor = Uprime_i * f_rij * f_rik * g_prime; + double prefactor_ij = prefactor / rij; + double prefactor_ik = prefactor / rik; + fij += prefactor_ij * cos_theta; + fik += prefactor_ik * cos_theta; + + double fj[3], fk[3]; + + fj[0] = bondj.del[0] * fij - bondk->del[0] * prefactor_ij; + fj[1] = bondj.del[1] * fij - bondk->del[1] * prefactor_ij; + fj[2] = bondj.del[2] * fij - bondk->del[2] * prefactor_ij; + forces_j[0] += fj[0]; + forces_j[1] += fj[1]; + forces_j[2] += fj[2]; + + fk[0] = bondk->del[0] * fik - bondj.del[0] * prefactor_ik; + fk[1] = bondk->del[1] * fik - bondj.del[1] * prefactor_ik; + fk[2] = bondk->del[2] * fik - bondj.del[2] * prefactor_ik; + forces_i[0] -= fk[0]; + forces_i[1] -= fk[1]; + forces_i[2] -= fk[2]; + + int k = bondk->tag; + forces[k][0] += fk[0]; + forces[k][1] += fk[1]; + forces[k][2] += fk[2]; + + if(evflag) { + double delta_ij[3]; + double delta_ik[3]; + delta_ij[0] = bondj.del[0] * rij; + delta_ij[1] = bondj.del[1] * rij; + delta_ij[2] = bondj.del[2] * rij; + delta_ik[0] = bondk->del[0] * rik; + delta_ik[1] = bondk->del[1] * rik; + delta_ik[2] = bondk->del[2] * rik; + ev_tally3(i, j, k, 0.0, 0.0, fj, fk, delta_ij, delta_ik); + } } forces[i][0] -= forces_j[0]; @@ -304,7 +304,7 @@ void PairMEAMSpline::compute(int eflag, int vflag) double pair_pot_deriv; double pair_pot = phis[ij_to_potl(i,j)].eval(rij, pair_pot_deriv); - fpair += pair_pot_deriv; + fpair += pair_pot_deriv; // Divide by r_ij to get forces from gradient @@ -406,18 +406,18 @@ void PairMEAMSpline::coeff(int narg, char **arg) // old style: we only have one species, so we're either "NULL" or we match. for (i = 3; i < narg; i++) if (strcmp(arg[i],"NULL") == 0) - map[i-2] = -1; + map[i-2] = -1; else - map[i-2] = 0; + map[i-2] = 0; } else { for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { - map[i-2] = -1; - continue; + map[i-2] = -1; + continue; } for (j = 0; j < nelements; j++) - if (strcmp(arg[i],elements[j]) == 0) - break; + if (strcmp(arg[i],elements[j]) == 0) + break; if (j < nelements) map[i-2] = j; else error->all(FLERR,"No matching element in EAM potential file"); } @@ -460,7 +460,7 @@ void PairMEAMSpline::read_file(const char* filename) char line[MAXLINE]; fgets(line, MAXLINE, fp); - // Second line holds potential type (currently just "meam/spline") in new potential format. + // Second line holds potential type ("meam/spline") in new potential format. bool isNewFormat; long loc = ftell(fp); fgets(line, MAXLINE, fp); @@ -471,22 +471,22 @@ void PairMEAMSpline::read_file(const char* filename) const char *sep = " ,;:-\t\n"; // overkill, but safe word = strsep(&linep, sep); if (! *word) - error->one(FLERR, "Need to include number of atomic species on meam/spline line in potential file"); + error->one(FLERR, "Need to include number of atomic species on meam/spline line in potential file"); int n = atoi(word); if (n<1) - error->one(FLERR, "Invalid number of atomic species on meam/spline line in potential file"); + error->one(FLERR, "Invalid number of atomic species on meam/spline line in potential file"); nelements = n; elements = new char*[n]; for (int i=0; ione(FLERR, "Not enough atomic species in meam/spline\n"); - elements[i] = new char[strlen(word)+1]; - strcpy(elements[i], word); + word = strsep(&linep, sep); + if (! *word) + error->one(FLERR, "Not enough atomic species in meam/spline\n"); + elements[i] = new char[strlen(word)+1]; + strcpy(elements[i], word); } } else { isNewFormat = false; - nelements = 1; // old format only handles one species anyway; this is for backwards compatibility + nelements = 1; // old format only handles one species; (backwards compatibility) elements = new char*[1]; elements[0] = new char[1]; strcpy(elements[0], ""); @@ -607,7 +607,8 @@ double PairMEAMSpline::init_one(int i, int j) /* ---------------------------------------------------------------------- */ -int PairMEAMSpline::pack_forward_comm(int n, int *list, double *buf, int pbc_flag, int *pbc) +int PairMEAMSpline::pack_forward_comm(int n, int *list, double *buf, + int pbc_flag, int *pbc) { int* list_iter = list; int* list_iter_end = list + n; @@ -646,7 +647,8 @@ double PairMEAMSpline::memory_usage() /// Parses the spline knots from a text file. -void PairMEAMSpline::SplineFunction::parse(FILE* fp, Error* error, bool isNewFormat) +void PairMEAMSpline::SplineFunction::parse(FILE* fp, Error* error, + bool isNewFormat) { char line[MAXLINE]; @@ -761,7 +763,8 @@ void PairMEAMSpline::SplineFunction::communicate(MPI_Comm& world, int me) /// Writes a Gnuplot script that plots the spline function. /// /// This function is for debugging only! -void PairMEAMSpline::SplineFunction::writeGnuplot(const char* filename, const char* title) const +void PairMEAMSpline::SplineFunction::writeGnuplot(const char* filename, + const char* title) const { FILE* fp = fopen(filename, "w"); fprintf(fp, "#!/usr/bin/env gnuplot\n"); diff --git a/src/USER-MISC/pair_meam_spline.h b/src/USER-MISC/pair_meam_spline.h index 4be8f81ede..31f64cc3e5 100644 --- a/src/USER-MISC/pair_meam_spline.h +++ b/src/USER-MISC/pair_meam_spline.h @@ -28,10 +28,12 @@ PairStyle(meam/spline,PairMEAMSpline) namespace LAMMPS_NS { -/// Set this to 1 if you intend to use MEAM potentials with non-uniform spline knots. -/// Set this to 0 if you intend to use only MEAM potentials with spline knots on a uniform grid. -/// -/// With SUPPORT_NON_GRID_SPLINES == 0, the code runs about 50% faster. +// Set this to 1 if you intend to use MEAM potentials with +// non-uniform spline knots. +// Set this to 0 if you intend to use only MEAM potentials with +// spline knots on a uniform grid. +// +// With SUPPORT_NON_GRID_SPLINES == 0, the code runs about 50% faster. #define SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES 0 @@ -114,33 +116,35 @@ protected: { x -= xmin; if(x <= 0.0) { // Left extrapolation. - return Y[0] + deriv0 * x; + return Y[0] + deriv0 * x; } else if(x >= xmax_shifted) { // Right extrapolation. - return Y[N-1] + derivN * (x - xmax_shifted); + return Y[N-1] + derivN * (x - xmax_shifted); } else { #if SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES - // Do interval search. - int klo = 0; - int khi = N-1; - while(khi - klo > 1) { - int k = (khi + klo) / 2; - if(Xs[k] > x) khi = k; - else klo = k; - } - double h = Xs[khi] - Xs[klo]; - // Do spline interpolation. - double a = (Xs[khi] - x)/h; - double b = 1.0 - a; // = (x - X[klo])/h - return a * Y[klo] + b * Y[khi] + ((a*a*a - a) * Y2[klo] + (b*b*b - b) * Y2[khi])*(h*h)/6.0; + // Do interval search. + int klo = 0; + int khi = N-1; + while(khi - klo > 1) { + int k = (khi + klo) / 2; + if(Xs[k] > x) khi = k; + else klo = k; + } + double h = Xs[khi] - Xs[klo]; + // Do spline interpolation. + double a = (Xs[khi] - x)/h; + double b = 1.0 - a; // = (x - X[klo])/h + return a * Y[klo] + b * Y[khi] + + ((a*a*a - a) * Y2[klo] + (b*b*b - b) * Y2[khi])*(h*h)/6.0; #else - // For a spline with grid points, we can directly calculate the interval X is in. - int klo = (int)(x / h); - int khi = klo + 1; - double a = Xs[khi] - x; - double b = h - a; - return Y[khi] - a * Ydelta[klo] + ((a*a - hsq) * a * Y2[klo] + (b*b - hsq) * b * Y2[khi]); + // For a spline with regular grid, we directly calculate the interval X is in. + int klo = (int)(x / h); + int khi = klo + 1; + double a = Xs[khi] - x; + double b = h - a; + return Y[khi] - a * Ydelta[klo] + + ((a*a - hsq) * a * Y2[klo] + (b*b - hsq) * b * Y2[khi]); #endif } } @@ -150,37 +154,43 @@ protected: { x -= xmin; if(x <= 0.0) { // Left extrapolation. - deriv = deriv0; - return Y[0] + deriv0 * x; + deriv = deriv0; + return Y[0] + deriv0 * x; } else if(x >= xmax_shifted) { // Right extrapolation. - deriv = derivN; - return Y[N-1] + derivN * (x - xmax_shifted); + deriv = derivN; + return Y[N-1] + derivN * (x - xmax_shifted); } else { #if SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES - // Do interval search. - int klo = 0; - int khi = N-1; - while(khi - klo > 1) { - int k = (khi + klo) / 2; - if(Xs[k] > x) khi = k; - else klo = k; - } - double h = Xs[khi] - Xs[klo]; - // Do spline interpolation. - double a = (Xs[khi] - x)/h; - double b = 1.0 - a; // = (x - X[klo])/h - deriv = (Y[khi] - Y[klo]) / h + ((3.0*b*b - 1.0) * Y2[khi] - (3.0*a*a - 1.0) * Y2[klo]) * h / 6.0; - return a * Y[klo] + b * Y[khi] + ((a*a*a - a) * Y2[klo] + (b*b*b - b) * Y2[khi]) * (h*h) / 6.0; + // Do interval search. + int klo = 0; + int khi = N-1; + while(khi - klo > 1) { + int k = (khi + klo) / 2; + if(Xs[k] > x) khi = k; + else klo = k; + } + double h = Xs[khi] - Xs[klo]; + // Do spline interpolation. + double a = (Xs[khi] - x)/h; + double b = 1.0 - a; // = (x - X[klo])/h + deriv = (Y[khi] - Y[klo]) / h + + ((3.0*b*b - 1.0) * Y2[khi] - + (3.0*a*a - 1.0) * Y2[klo]) * h / 6.0; + return a * Y[klo] + b * Y[khi] + + ((a*a*a - a) * Y2[klo] + + (b*b*b - b) * Y2[khi]) * (h*h) / 6.0; #else - // For a spline with grid points, we can directly calculate the interval X is in. - int klo = (int)(x / h); - int khi = klo + 1; - double a = Xs[khi] - x; - double b = h - a; - deriv = Ydelta[klo] + ((3.0*b*b - hsq) * Y2[khi] - (3.0*a*a - hsq) * Y2[klo]); - return Y[khi] - a * Ydelta[klo] + ((a*a - hsq) * a * Y2[klo] + (b*b - hsq) * b * Y2[khi]); + // For a spline with regular grid, we directly calculate the interval X is in. + int klo = (int)(x / h); + int khi = klo + 1; + double a = Xs[khi] - x; + double b = h - a; + deriv = Ydelta[klo] + ((3.0*b*b - hsq) * Y2[khi] + - (3.0*a*a - hsq) * Y2[klo]); + return Y[khi] - a * Ydelta[klo] + + ((a*a - hsq) * a * Y2[klo] + (b*b - hsq) * b * Y2[khi]); #endif } } @@ -198,20 +208,20 @@ protected: void communicate(MPI_Comm& world, int me); private: - double* X; // Positions of spline knots - double* Xs; // Shifted positions of spline knots - double* Y; // Function values at spline knots - double* Y2; // Second derivatives at spline knots - double* Ydelta; // If this is a grid spline, Ydelta[i] = (Y[i+1]-Y[i])/h - int N; // Number of spline knots - double deriv0; // First derivative at knot 0 - double derivN; // First derivative at knot (N-1) - double xmin; // The beginning of the interval on which the spline function is defined. - double xmax; // The end of the interval on which the spline function is defined. - int isGridSpline; // Indicates that all spline knots are on a regular grid. - double h; // The distance between knots if this is a grid spline with equidistant knots. - double hsq; // The squared distance between knots if this is a grid spline with equidistant knots. - double xmax_shifted; // The end of the spline interval after it has been shifted to begin at X=0. + double* X; // Positions of spline knots + double* Xs; // Shifted positions of spline knots + double* Y; // Function values at spline knots + double* Y2; // Second derivatives at spline knots + double* Ydelta; // If this is a grid spline, Ydelta[i] = (Y[i+1]-Y[i])/h + int N; // Number of spline knots + double deriv0; // First derivative at knot 0 + double derivN; // First derivative at knot (N-1) + double xmin; // The beginning of the interval on which the spline function is defined. + double xmax; // The end of the interval on which the spline function is defined. + int isGridSpline;// Indicates that all spline knots are on a regular grid. + double h; // The distance between knots if this is a grid spline with equidistant knots. + double hsq; // The squared distance between knots if this is a grid spline with equidistant knots. + double xmax_shifted; // The end of the spline interval after it has been shifted to begin at X=0. }; /// Helper data structure for potential routine. @@ -222,19 +232,19 @@ protected: double del[3]; }; - SplineFunction* phis; // Phi_i(r_ij) - SplineFunction* rhos; // Rho_ij(r_ij) - SplineFunction* fs; // f_i(r_ij) - SplineFunction* Us; // U_i(rho) - SplineFunction* gs; // g_ij(cos_theta) - double* zero_atom_energies; // Shift embedding energy by this value to make it zero for a single atom in vacuum. + SplineFunction* phis; // Phi_i(r_ij) + SplineFunction* rhos; // Rho_ij(r_ij) + SplineFunction* fs; // f_i(r_ij) + SplineFunction* Us; // U_i(rho) + SplineFunction* gs; // g_ij(cos_theta) + double* zero_atom_energies; // Shift embedding energy by this value to make it zero for a single atom in vacuum. - double cutoff; // The cutoff radius + double cutoff; // The cutoff radius - double* Uprime_values; // Used for temporary storage of U'(rho) values - int nmax; // Size of temporary array. - int maxNeighbors; // The last maximum number of neighbors a single atoms has. - MEAM2Body* twoBodyInfo; // Temporary array. + double* Uprime_values; // Used for temporary storage of U'(rho) values + int nmax; // Size of temporary array. + int maxNeighbors; // The last maximum number of neighbors a single atoms has. + MEAM2Body* twoBodyInfo; // Temporary array. void read_file(const char* filename); void allocate(); diff --git a/src/USER-OMP/pair_meam_spline_omp.cpp b/src/USER-OMP/pair_meam_spline_omp.cpp index b4e0c48acc..6e90dac66f 100644 --- a/src/USER-OMP/pair_meam_spline_omp.cpp +++ b/src/USER-OMP/pair_meam_spline_omp.cpp @@ -140,25 +140,21 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) nextTwoBodyInfo->tag = j; nextTwoBodyInfo->r = rij; - // nextTwoBodyInfo->f = f.eval(rij, nextTwoBodyInfo->fprime); - nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); + nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); nextTwoBodyInfo->del[0] = jdelx / rij; nextTwoBodyInfo->del[1] = jdely / rij; nextTwoBodyInfo->del[2] = jdelz / rij; for(int kk = 0; kk < numBonds; kk++) { const MEAM2Body& bondk = myTwoBodyInfo[kk]; - double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + - nextTwoBodyInfo->del[1]*bondk.del[1] + - nextTwoBodyInfo->del[2]*bondk.del[2]); - partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); - // double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + nextTwoBodyInfo->del[1]*bondk.del[1] + nextTwoBodyInfo->del[2]*bondk.del[2]); - // partial_sum += bondk.f * g.eval(cos_theta); + double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + + nextTwoBodyInfo->del[1]*bondk.del[1] + + nextTwoBodyInfo->del[2]*bondk.del[2]); + partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); } rho_value += nextTwoBodyInfo->f * partial_sum; - // rho_value += rho.eval(rij); - rho_value += rhos[i_to_potl(j)].eval(rij); + rho_value += rhos[i_to_potl(j)].eval(rij); numBonds++; nextTwoBodyInfo++; @@ -167,7 +163,6 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) // Compute embedding energy and its derivative. double Uprime_i; - // double embeddingEnergy = U.eval(rho_value, Uprime_i) - zero_atom_energy; double embeddingEnergy = Us[i_to_potl(i)].eval(rho_value, Uprime_i) - zero_atom_energies[i_to_potl(i)]; Uprime_thr[i] = Uprime_i; @@ -195,8 +190,7 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) + bondj.del[1]*bondk->del[1] + bondj.del[2]*bondk->del[2]); double g_prime; - // double g_value = g.eval(cos_theta, g_prime); - double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); + double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); const double f_rik_prime = bondk->fprime; const double f_rik = bondk->f; @@ -301,20 +295,15 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) if(rij_sq < cutforcesq) { double rij = sqrt(rij_sq); - // double rho_prime; - // rho.eval(rij, rho_prime); - // double fpair = rho_prime * (Uprime_values[i] + Uprime_values[j]); double rho_prime_i,rho_prime_j; rhos[i_to_potl(i)].eval(rij,rho_prime_i); rhos[i_to_potl(j)].eval(rij,rho_prime_j); double fpair = rho_prime_j * Uprime_values[i] + rho_prime_i*Uprime_values[j]; - - // double pair_pot_deriv; - // double pair_pot = phi.eval(rij, pair_pot_deriv); + double pair_pot_deriv; double pair_pot = phis[ij_to_potl(i,j)].eval(rij, pair_pot_deriv); - fpair += pair_pot_deriv; + fpair += pair_pot_deriv; // Divide by r_ij to get forces from gradient. fpair /= rij; -- GitLab From d7dbff0f54415ac55deb9f61467360e2d683fc87 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 4 May 2017 14:46:59 -0600 Subject: [PATCH 092/593] jive Kokkos/reaxc file names with new user-reaxc file names --- src/KOKKOS/Install.sh | 4 ++-- src/KOKKOS/fix_qeq_reax_kokkos.cpp | 5 +++-- src/KOKKOS/fix_reaxc_bonds_kokkos.cpp | 2 +- src/KOKKOS/fix_reaxc_species_kokkos.cpp | 4 ++-- src/KOKKOS/{pair_reax_c_kokkos.cpp => pair_reaxc_kokkos.cpp} | 2 +- src/KOKKOS/{pair_reax_c_kokkos.h => pair_reaxc_kokkos.h} | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) rename src/KOKKOS/{pair_reax_c_kokkos.cpp => pair_reaxc_kokkos.cpp} (99%) rename src/KOKKOS/{pair_reax_c_kokkos.h => pair_reaxc_kokkos.h} (99%) diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index bbebc36c12..790b9224c2 100644 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -183,8 +183,8 @@ action pair_lj_sdk_kokkos.cpp pair_lj_sdk.cpp action pair_lj_sdk_kokkos.h pair_lj_sdk.h action pair_morse_kokkos.cpp action pair_morse_kokkos.h -action pair_reax_c_kokkos.cpp pair_reax_c.cpp -action pair_reax_c_kokkos.h pair_reax_c.h +action pair_reaxc_kokkos.cpp pair_reaxc.cpp +action pair_reaxc_kokkos.h pair_reaxc.h action pair_sw_kokkos.cpp pair_sw.cpp action pair_sw_kokkos.h pair_sw.h action pair_vashishta_kokkos.cpp pair_vashishta.cpp diff --git a/src/KOKKOS/fix_qeq_reax_kokkos.cpp b/src/KOKKOS/fix_qeq_reax_kokkos.cpp index 3b8d5a85ea..2e46b85fd2 100644 --- a/src/KOKKOS/fix_qeq_reax_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reax_kokkos.cpp @@ -37,7 +37,7 @@ #include "math_const.h" #include "memory.h" #include "error.h" -#include "pair_reax_c_kokkos.h" +#include "pair_reaxc_kokkos.h" using namespace LAMMPS_NS; using namespace FixConst; @@ -50,7 +50,8 @@ using namespace FixConst; /* ---------------------------------------------------------------------- */ template -FixQEqReaxKokkos::FixQEqReaxKokkos(LAMMPS *lmp, int narg, char **arg) : +FixQEqReaxKokkos:: +FixQEqReaxKokkos(LAMMPS *lmp, int narg, char **arg) : FixQEqReax(lmp, narg, arg) { kokkosable = 1; diff --git a/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp b/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp index 7688d6745a..e4fb9385a5 100644 --- a/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp +++ b/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp @@ -21,7 +21,7 @@ #include "fix_reaxc_bonds_kokkos.h" #include "atom.h" #include "update.h" -#include "pair_reax_c_kokkos.h" +#include "pair_reaxc_kokkos.h" #include "modify.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/KOKKOS/fix_reaxc_species_kokkos.cpp b/src/KOKKOS/fix_reaxc_species_kokkos.cpp index 17b42174c6..ce84de30cb 100644 --- a/src/KOKKOS/fix_reaxc_species_kokkos.cpp +++ b/src/KOKKOS/fix_reaxc_species_kokkos.cpp @@ -23,7 +23,7 @@ #include "fix_reaxc_species_kokkos.h" #include "domain.h" #include "update.h" -#include "pair_reax_c_kokkos.h" +#include "pair_reaxc_kokkos.h" #include "modify.h" #include "neighbor.h" #include "neigh_list.h" @@ -156,4 +156,4 @@ void FixReaxCSpeciesKokkos::FindMolecule() if (looptot >= 400*nprocs) break; } -} \ No newline at end of file +} diff --git a/src/KOKKOS/pair_reax_c_kokkos.cpp b/src/KOKKOS/pair_reaxc_kokkos.cpp similarity index 99% rename from src/KOKKOS/pair_reax_c_kokkos.cpp rename to src/KOKKOS/pair_reaxc_kokkos.cpp index a1f388b4f9..59369b5e08 100644 --- a/src/KOKKOS/pair_reax_c_kokkos.cpp +++ b/src/KOKKOS/pair_reaxc_kokkos.cpp @@ -19,7 +19,7 @@ #include #include #include -#include "pair_reax_c_kokkos.h" +#include "pair_reaxc_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_reax_c_kokkos.h b/src/KOKKOS/pair_reaxc_kokkos.h similarity index 99% rename from src/KOKKOS/pair_reax_c_kokkos.h rename to src/KOKKOS/pair_reaxc_kokkos.h index 8a0c08b660..59c4d196d5 100644 --- a/src/KOKKOS/pair_reax_c_kokkos.h +++ b/src/KOKKOS/pair_reaxc_kokkos.h @@ -25,7 +25,7 @@ PairStyle(reax/c/kk/host,PairReaxCKokkos) #include #include "pair_kokkos.h" -#include "pair_reax_c.h" +#include "pair_reaxc.h" #include "neigh_list_kokkos.h" #include "reaxc_types.h" -- GitLab From a73402ad93114e52e02652a60f64f080ed4885bc Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 4 May 2017 14:53:08 -0600 Subject: [PATCH 093/593] update src/Purge.list with renamed reaxc src files --- src/Purge.list | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Purge.list b/src/Purge.list index 9b09dd5382..6326dbadf0 100644 --- a/src/Purge.list +++ b/src/Purge.list @@ -16,6 +16,19 @@ style_region.h style_neigh_bin.h style_neigh_pair.h style_neigh_stencil.h +# deleted on 4 May 2017 +pair_reax_c.cpp +pair_reax_c.h +fix_reax_c_bonds.cpp +fix_reax_c_bonds.h +fix_reax_c_species.cpp +fix_reax_c_species.h +pair_reax_c_kokkos.cpp +pair_reax_c_kokkos.h +fix_reax_c_bonds_kokkos.cpp +fix_reax_c_bonds_kokkos.h +fix_reax_c_species_kokkos.cpp +fix_reax_c_species_kokkos.h # deleted on 19 April 2017 vmdplugin.h molfile_plugin.h -- GitLab From 08ec55743e476d56a4c9e5a8fda66ac6da4f797f Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 9 May 2017 08:55:18 -0600 Subject: [PATCH 094/593] neighbor list bugfix to prevent cycle in copy lists --- doc/src/accelerate_intel.txt | 5 +++-- doc/src/fix_box_relax.txt | 28 +++++++++++++--------------- src/Makefile | 4 +++- src/neighbor.cpp | 7 +++++-- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/doc/src/accelerate_intel.txt b/doc/src/accelerate_intel.txt index 581c440bc3..d629828f12 100644 --- a/doc/src/accelerate_intel.txt +++ b/doc/src/accelerate_intel.txt @@ -69,8 +69,9 @@ not {hardware thread}. For Intel Xeon CPUs: Edit src/MAKE/OPTIONS/Makefile.intel_cpu_intelmpi as necessary. :ulb,l -If using {kspace_style pppm} in the input script, add "neigh_modify binsize 3" and "kspace_modify diff ad" to the input script for better -performance. :l +If using {kspace_style pppm} in the input script, add "neigh_modify binsize cutoff" and "kspace_modify diff ad" to the input script for better +performance. Cutoff should be roughly the neighbor list cutoff. By +default the binsize is half the neighbor list cutoff. :l "-pk intel 0 omp 2 -sf intel" added to LAMMPS command-line :l :ule diff --git a/doc/src/fix_box_relax.txt b/doc/src/fix_box_relax.txt index 83e5a82652..54decd6282 100644 --- a/doc/src/fix_box_relax.txt +++ b/doc/src/fix_box_relax.txt @@ -245,8 +245,8 @@ appear the system is converging to your specified pressure. The solution for this is to either (a) zero the velocities of all atoms before performing the minimization, or (b) make sure you are monitoring the pressure without its kinetic component. The latter can -be done by outputting the pressure from the fix this command creates -(see below) or a pressure fix you define yourself. +be done by outputting the pressure from the pressure compute this +command creates (see below) or a pressure compute you define yourself. NOTE: Because pressure is often a very sensitive function of volume, it can be difficult for the minimizer to equilibrate the system the @@ -308,7 +308,7 @@ thermo_modify command (or in two separate commands), then the order in which the keywords are specified is important. Note that a "pressure compute"_compute_pressure.html defines its own temperature compute as an argument when it is specified. The {temp} keyword will override -this (for the pressure compute being used by fix npt), but only if the +this (for the pressure compute being used by fix box/relax), but only if the {temp} keyword comes after the {press} keyword. If the {temp} keyword comes before the {press} keyword, then the new pressure compute specified by the {press} keyword will be unaffected by the {temp} @@ -316,18 +316,16 @@ setting. This fix computes a global scalar which can be accessed by various "output commands"_Section_howto.html#howto_15. The scalar is the -pressure-volume energy, plus the strain energy, if it exists. - -This fix computes a global scalar which can be accessed by various -"output commands"_Section_howto.html#howto_15. The scalar is given -by the energy expression shown above. The energy values reported -at the end of a minimization run under "Minimization stats" include -this energy, and so differ from what LAMMPS normally reports as -potential energy. This fix does not support the -"fix_modify"_fix_modify.html {energy} option, -because that would result in double-counting of the fix energy in the -minimization energy. Instead, the fix energy can be explicitly -added to the potential energy using one of these two variants: +pressure-volume energy, plus the strain energy, if it exists, +as described above. +The energy values reported at the +end of a minimization run under "Minimization stats" include this +energy, and so differ from what LAMMPS normally reports as potential +energy. This fix does not support the "fix_modify"_fix_modify.html +{energy} option, because that would result in double-counting of the +fix energy in the minimization energy. Instead, the fix energy can be +explicitly added to the potential energy using one of these two +variants: variable emin equal pe+f_1 :pre diff --git a/src/Makefile b/src/Makefile index 32f9c3787c..92a430a747 100644 --- a/src/Makefile +++ b/src/Makefile @@ -223,7 +223,9 @@ mpi-stubs: @cd STUBS; $(MAKE) clean; $(MAKE) # install LAMMPS shared lib and Python wrapper for Python usage -# include python package settings to automatically adapt name of python interpreter +# include python package settings to +# automatically adapt name of python interpreter + sinclude ../lib/python/Makefile.lammps install-python: @$(PYTHON) ../python/install.py diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 1d12ef578e..545c8cf027 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -1224,10 +1224,13 @@ void Neighbor::morph_copy() if (jrq->copy && jrq->copylist == i) continue; - // parent list must be perpetual - // copied list can be perpetual or occasional + // other list (jrq) to copy from must be perpetual + // list that becomes a copy list (irq) can be perpetual or occasional + // if both lists are perpetual, require j < i + // to prevent circular dependence with 3 or more copies of a list if (jrq->occasional) continue; + if (!irq->occasional && j > i) continue; // both lists must be half, or both full -- GitLab From 9cd994f57c701c7e28cc82c38c20edfd0a5cedc2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 9 May 2017 15:35:48 -0400 Subject: [PATCH 095/593] fix issues with potential file parser - use Force::open_potential() - replace ftell()/fseek() with rewind()/fgets() which is safer on windows and other platforms with automatic CR/LF to LF conversion on text files - make parser use properly NULL terminated strings through using strtok() --- src/USER-MISC/pair_meam_spline.cpp | 52 ++++++++++++++++-------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 6fbff31753..e2f9209685 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -45,9 +45,6 @@ #include "neigh_request.h" #include "memory.h" #include "error.h" -#include - -using namespace std; using namespace LAMMPS_NS; @@ -449,7 +446,7 @@ void PairMEAMSpline::read_file(const char* filename) int nmultichoose2; // = (n+1)*n/2; if(comm->me == 0) { - FILE *fp = fopen(filename, "r"); + FILE *fp = force->open_potential(filename); if(fp == NULL) { char str[1024]; sprintf(str,"Cannot open spline MEAM potential file %s", filename); @@ -458,31 +455,35 @@ void PairMEAMSpline::read_file(const char* filename) // Skip first line of file. It's a comment. char line[MAXLINE]; + char *ptr; fgets(line, MAXLINE, fp); - // Second line holds potential type ("meam/spline") in new potential format. - bool isNewFormat; - long loc = ftell(fp); + // Second line holds potential type ("meam/spline") + // in new potential format. + + bool isNewFormat = false; fgets(line, MAXLINE, fp); - if (strncmp(line, "meam/spline", 11) == 0) { + ptr = strtok(line, " \t\n\r\f"); + + if (strcmp(ptr, "meam/spline") == 0) { isNewFormat = true; // parse the rest of the line! - char *linep = line+12, *word; - const char *sep = " ,;:-\t\n"; // overkill, but safe - word = strsep(&linep, sep); - if (! *word) - error->one(FLERR, "Need to include number of atomic species on meam/spline line in potential file"); - int n = atoi(word); - if (n<1) - error->one(FLERR, "Invalid number of atomic species on meam/spline line in potential file"); - nelements = n; - elements = new char*[n]; - for (int i=0; ione(FLERR, "Not enough atomic species in meam/spline\n"); - elements[i] = new char[strlen(word)+1]; - strcpy(elements[i], word); + ptr = strtok(NULL," \t\n\r\f"); + if (ptr == NULL) + error->one(FLERR,"Need to include number of atomic species on" + " meam/spline line in multi-element potential file"); + nelements = atoi(ptr); + if (nelements < 1) + error->one(FLERR, "Invalid number of atomic species on" + " meam/spline line in potential file"); + elements = new char*[nelements]; + for (int i=0; ione(FLERR, "Not enough atomic species in meam/spline" + " line of multi-element potential file"); + elements[i] = new char[strlen(ptr)+1]; + strcpy(elements[i], ptr); } } else { isNewFormat = false; @@ -490,7 +491,8 @@ void PairMEAMSpline::read_file(const char* filename) elements = new char*[1]; elements[0] = new char[1]; strcpy(elements[0], ""); - fseek(fp, loc, SEEK_SET); + rewind(fp); + fgets(line, MAXLINE, fp); } nmultichoose2 = ((nelements+1)*nelements)/2; -- GitLab From 6c5edf6c709ef1fc9c914ec8049fa41a7fb3a49a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 9 May 2017 15:38:10 -0400 Subject: [PATCH 096/593] performance improvement through avoiding function call and dereference overhead - make i_to_potl() and ij_to_potl() functions inline and const - don't dereference inside the functions, but cache, if possible in external variables => up to 15% speedup. --- src/USER-MISC/pair_meam_spline.cpp | 48 +++++++++++---------------- src/USER-MISC/pair_meam_spline.h | 7 ++-- src/USER-OMP/pair_meam_spline_omp.cpp | 24 +++++++++----- 3 files changed, 39 insertions(+), 40 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index e2f9209685..5c13b67d0a 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -99,8 +99,9 @@ PairMEAMSpline::~PairMEAMSpline() void PairMEAMSpline::compute(int eflag, int vflag) { - double** const x = atom->x; - double** forces = atom->f; + const double* const * const x = atom->x; + double* const * const forces = atom->f; + const int ntypes = atom->ntypes; if (eflag || vflag) { ev_setup(eflag, vflag); @@ -144,6 +145,9 @@ void PairMEAMSpline::compute(int eflag, int vflag) // compute charge density and numBonds MEAM2Body* nextTwoBodyInfo = twoBodyInfo; double rho_value = 0; + const int ntypes = atom->ntypes; + const int itype = atom->type[i]; + for(int jj = 0; jj < listfull->numneigh[i]; jj++) { int j = listfull->firstneigh[i][jj]; j &= NEIGHMASK; @@ -156,10 +160,11 @@ void PairMEAMSpline::compute(int eflag, int vflag) if(rij_sq < cutoff*cutoff) { double rij = sqrt(rij_sq); double partial_sum = 0; + const int jtype = atom->type[j]; nextTwoBodyInfo->tag = j; nextTwoBodyInfo->r = rij; - nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); + nextTwoBodyInfo->f = fs[i_to_potl(jtype)].eval(rij, nextTwoBodyInfo->fprime); nextTwoBodyInfo->del[0] = jdelx / rij; nextTwoBodyInfo->del[1] = jdely / rij; nextTwoBodyInfo->del[2] = jdelz / rij; @@ -169,11 +174,11 @@ void PairMEAMSpline::compute(int eflag, int vflag) double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + nextTwoBodyInfo->del[1]*bondk.del[1] + nextTwoBodyInfo->del[2]*bondk.del[2]); - partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); + partial_sum += bondk.f * gs[ij_to_potl(jtype,atom->type[bondk.tag],ntypes)].eval(cos_theta); } rho_value += nextTwoBodyInfo->f * partial_sum; - rho_value += rhos[i_to_potl(j)].eval(rij); + rho_value += rhos[i_to_potl(jtype)].eval(rij); numBonds++; nextTwoBodyInfo++; @@ -182,8 +187,8 @@ void PairMEAMSpline::compute(int eflag, int vflag) // Compute embedding energy and its derivative double Uprime_i; - double embeddingEnergy = Us[i_to_potl(i)].eval(rho_value, Uprime_i) - - zero_atom_energies[i_to_potl(i)]; + double embeddingEnergy = Us[i_to_potl(itype)].eval(rho_value, Uprime_i) + - zero_atom_energies[i_to_potl(itype)]; Uprime_values[i] = Uprime_i; if(eflag) { @@ -204,6 +209,7 @@ void PairMEAMSpline::compute(int eflag, int vflag) double f_rij = bondj.f; double forces_j[3] = {0, 0, 0}; + const int jtype = atom->type[j]; MEAM2Body const* bondk = twoBodyInfo; for(int kk = 0; kk < jj; kk++, ++bondk) { @@ -213,7 +219,7 @@ void PairMEAMSpline::compute(int eflag, int vflag) bondj.del[1]*bondk->del[1] + bondj.del[2]*bondk->del[2]); double g_prime; - double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); + double g_value = gs[ij_to_potl(jtype,atom->type[bondk->tag],ntypes)].eval(cos_theta, g_prime); double f_rik_prime = bondk->fprime; double f_rik = bondk->f; @@ -280,6 +286,7 @@ void PairMEAMSpline::compute(int eflag, int vflag) // Compute two-body pair interactions for(int ii = 0; ii < listhalf->inum; ii++) { int i = listhalf->ilist[ii]; + const int itype = atom->type[i]; for(int jj = 0; jj < listhalf->numneigh[i]; jj++) { int j = listhalf->firstneigh[i][jj]; @@ -293,13 +300,14 @@ void PairMEAMSpline::compute(int eflag, int vflag) if(rij_sq < cutoff*cutoff) { double rij = sqrt(rij_sq); + const int jtype = atom->type[j]; double rho_prime_i,rho_prime_j; - rhos[i_to_potl(i)].eval(rij,rho_prime_i); - rhos[i_to_potl(j)].eval(rij,rho_prime_j); + rhos[i_to_potl(itype)].eval(rij,rho_prime_i); + rhos[i_to_potl(jtype)].eval(rij,rho_prime_j); double fpair = rho_prime_j * Uprime_values[i] + rho_prime_i*Uprime_values[j]; double pair_pot_deriv; - double pair_pot = phis[ij_to_potl(i,j)].eval(rij, pair_pot_deriv); + double pair_pot = phis[ij_to_potl(itype,jtype,ntypes)].eval(rij, pair_pot_deriv); fpair += pair_pot_deriv; @@ -323,24 +331,6 @@ void PairMEAMSpline::compute(int eflag, int vflag) virial_fdotr_compute(); } - -/* ---------------------------------------------------------------------- - helper functions to map atom types to potential array indices -------------------------------------------------------------------------- */ - -int PairMEAMSpline::ij_to_potl(int i, int j) { - int n = atom->ntypes; - int itype = atom->type[i]; - int jtype = atom->type[j]; - - return jtype - 1 + (itype-1)*n - (itype-1)*itype/2; -} - -int PairMEAMSpline::i_to_potl(int i) { - int itype = atom->type[i]; - return itype - 1; -} - /* ---------------------------------------------------------------------- */ void PairMEAMSpline::allocate() diff --git a/src/USER-MISC/pair_meam_spline.h b/src/USER-MISC/pair_meam_spline.h index 31f64cc3e5..bbce38c211 100644 --- a/src/USER-MISC/pair_meam_spline.h +++ b/src/USER-MISC/pair_meam_spline.h @@ -54,8 +54,11 @@ public: // helper functions for compute() - int ij_to_potl(int i, int j); - int i_to_potl(int i); + int ij_to_potl(const int itype, const int jtype, const int ntypes) const { + return jtype - 1 + (itype-1)*ntypes - (itype-1)*itype/2; + } + int i_to_potl(const int itype) const { return itype-1; } + int pack_forward_comm(int, int *, double *, int, int *); void unpack_forward_comm(int, int, double *); diff --git a/src/USER-OMP/pair_meam_spline_omp.cpp b/src/USER-OMP/pair_meam_spline_omp.cpp index 6e90dac66f..96d602845d 100644 --- a/src/USER-OMP/pair_meam_spline_omp.cpp +++ b/src/USER-OMP/pair_meam_spline_omp.cpp @@ -110,6 +110,7 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) const int nthreads = comm->nthreads; const int nlocal = atom->nlocal; const int nall = nlocal + atom->nghost; + const int ntypes = atom->ntypes; const double cutforcesq = cutoff*cutoff; @@ -135,12 +136,13 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) const double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; if (rij_sq < cutforcesq) { + const int jtype = atom->type[j]; const double rij = sqrt(rij_sq); double partial_sum = 0; nextTwoBodyInfo->tag = j; nextTwoBodyInfo->r = rij; - nextTwoBodyInfo->f = fs[i_to_potl(j)].eval(rij, nextTwoBodyInfo->fprime); + nextTwoBodyInfo->f = fs[i_to_potl(jtype)].eval(rij, nextTwoBodyInfo->fprime); nextTwoBodyInfo->del[0] = jdelx / rij; nextTwoBodyInfo->del[1] = jdely / rij; nextTwoBodyInfo->del[2] = jdelz / rij; @@ -150,21 +152,22 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + nextTwoBodyInfo->del[1]*bondk.del[1] + nextTwoBodyInfo->del[2]*bondk.del[2]); - partial_sum += bondk.f * gs[ij_to_potl(j,bondk.tag)].eval(cos_theta); + partial_sum += bondk.f * gs[ij_to_potl(jtype,atom->type[bondk.tag],ntypes)].eval(cos_theta); } rho_value += nextTwoBodyInfo->f * partial_sum; - rho_value += rhos[i_to_potl(j)].eval(rij); + rho_value += rhos[i_to_potl(jtype)].eval(rij); numBonds++; nextTwoBodyInfo++; } } + const int itype = atom->type[i]; // Compute embedding energy and its derivative. double Uprime_i; - double embeddingEnergy = Us[i_to_potl(i)].eval(rho_value, Uprime_i) - - zero_atom_energies[i_to_potl(i)]; + double embeddingEnergy = Us[i_to_potl(itype)].eval(rho_value, Uprime_i) + - zero_atom_energies[i_to_potl(itype)]; Uprime_thr[i] = Uprime_i; if (EFLAG) e_tally_thr(this,i,i,nlocal,1/*newton_pair*/,embeddingEnergy,0.0,thr); @@ -176,6 +179,7 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) const MEAM2Body bondj = myTwoBodyInfo[jj]; const double rij = bondj.r; const int j = bondj.tag; + const int jtype = atom->type[j]; const double f_rij_prime = bondj.fprime; const double f_rij = bondj.f; @@ -190,7 +194,7 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) + bondj.del[1]*bondk->del[1] + bondj.del[2]*bondk->del[2]); double g_prime; - double g_value = gs[ij_to_potl(j,bondk->tag)].eval(cos_theta, g_prime); + double g_value = gs[ij_to_potl(jtype,atom->type[bondk->tag],ntypes)].eval(cos_theta, g_prime); const double f_rik_prime = bondk->fprime; const double f_rik = bondk->f; @@ -282,6 +286,7 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) const double ztmp = x[i][2]; const int* const jlist = firstneigh_half[i]; const int jnum = numneigh_half[i]; + const int itype = atom->type[i]; for(int jj = 0; jj < jnum; jj++) { const int j = jlist[jj] & NEIGHMASK; @@ -294,14 +299,15 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) if(rij_sq < cutforcesq) { double rij = sqrt(rij_sq); + const int jtype = atom->type[j]; double rho_prime_i,rho_prime_j; - rhos[i_to_potl(i)].eval(rij,rho_prime_i); - rhos[i_to_potl(j)].eval(rij,rho_prime_j); + rhos[i_to_potl(itype)].eval(rij,rho_prime_i); + rhos[i_to_potl(jtype)].eval(rij,rho_prime_j); double fpair = rho_prime_j * Uprime_values[i] + rho_prime_i*Uprime_values[j]; double pair_pot_deriv; - double pair_pot = phis[ij_to_potl(i,j)].eval(rij, pair_pot_deriv); + double pair_pot = phis[ij_to_potl(itype,jtype,ntypes)].eval(rij, pair_pot_deriv); fpair += pair_pot_deriv; -- GitLab From 390ceb1475a73636bf86e6de7e8493fa75c79e5a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 9 May 2017 15:49:37 -0400 Subject: [PATCH 097/593] whitespace cleanup --- src/USER-MISC/pair_meam_spline.cpp | 102 +++++++++++++------------- src/USER-MISC/pair_meam_spline.h | 46 ++++++------ src/USER-OMP/pair_meam_spline_omp.cpp | 2 +- 3 files changed, 75 insertions(+), 75 deletions(-) diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 5c13b67d0a..0148ed51cb 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -102,7 +102,7 @@ void PairMEAMSpline::compute(int eflag, int vflag) const double* const * const x = atom->x; double* const * const forces = atom->f; const int ntypes = atom->ntypes; - + if (eflag || vflag) { ev_setup(eflag, vflag); } else { @@ -123,7 +123,7 @@ void PairMEAMSpline::compute(int eflag, int vflag) int newMaxNeighbors = 0; for(int ii = 0; ii < listfull->inum; ii++) { int jnum = listfull->numneigh[listfull->ilist[ii]]; - if(jnum > newMaxNeighbors) + if(jnum > newMaxNeighbors) newMaxNeighbors = jnum; } @@ -151,24 +151,24 @@ void PairMEAMSpline::compute(int eflag, int vflag) for(int jj = 0; jj < listfull->numneigh[i]; jj++) { int j = listfull->firstneigh[i][jj]; j &= NEIGHMASK; - + double jdelx = x[j][0] - x[i][0]; double jdely = x[j][1] - x[i][1]; double jdelz = x[j][2] - x[i][2]; double rij_sq = jdelx*jdelx + jdely*jdely + jdelz*jdelz; - + if(rij_sq < cutoff*cutoff) { double rij = sqrt(rij_sq); double partial_sum = 0; const int jtype = atom->type[j]; - + nextTwoBodyInfo->tag = j; nextTwoBodyInfo->r = rij; nextTwoBodyInfo->f = fs[i_to_potl(jtype)].eval(rij, nextTwoBodyInfo->fprime); nextTwoBodyInfo->del[0] = jdelx / rij; nextTwoBodyInfo->del[1] = jdely / rij; nextTwoBodyInfo->del[2] = jdelz / rij; - + for(int kk = 0; kk < numBonds; kk++) { const MEAM2Body& bondk = twoBodyInfo[kk]; double cos_theta = (nextTwoBodyInfo->del[0]*bondk.del[0] + @@ -176,10 +176,10 @@ void PairMEAMSpline::compute(int eflag, int vflag) nextTwoBodyInfo->del[2]*bondk.del[2]); partial_sum += bondk.f * gs[ij_to_potl(jtype,atom->type[bondk.tag],ntypes)].eval(cos_theta); } - + rho_value += nextTwoBodyInfo->f * partial_sum; rho_value += rhos[i_to_potl(jtype)].eval(rij); - + numBonds++; nextTwoBodyInfo++; } @@ -189,7 +189,7 @@ void PairMEAMSpline::compute(int eflag, int vflag) double Uprime_i; double embeddingEnergy = Us[i_to_potl(itype)].eval(rho_value, Uprime_i) - zero_atom_energies[i_to_potl(itype)]; - + Uprime_values[i] = Uprime_i; if(eflag) { if(eflag_global) @@ -204,17 +204,17 @@ void PairMEAMSpline::compute(int eflag, int vflag) const MEAM2Body bondj = twoBodyInfo[jj]; double rij = bondj.r; int j = bondj.tag; - + double f_rij_prime = bondj.fprime; double f_rij = bondj.f; - + double forces_j[3] = {0, 0, 0}; const int jtype = atom->type[j]; - + MEAM2Body const* bondk = twoBodyInfo; for(int kk = 0; kk < jj; kk++, ++bondk) { double rik = bondk->r; - + double cos_theta = (bondj.del[0]*bondk->del[0] + bondj.del[1]*bondk->del[1] + bondj.del[2]*bondk->del[2]); @@ -222,37 +222,37 @@ void PairMEAMSpline::compute(int eflag, int vflag) double g_value = gs[ij_to_potl(jtype,atom->type[bondk->tag],ntypes)].eval(cos_theta, g_prime); double f_rik_prime = bondk->fprime; double f_rik = bondk->f; - + double fij = -Uprime_i * g_value * f_rik * f_rij_prime; double fik = -Uprime_i * g_value * f_rij * f_rik_prime; - + double prefactor = Uprime_i * f_rij * f_rik * g_prime; double prefactor_ij = prefactor / rij; double prefactor_ik = prefactor / rik; fij += prefactor_ij * cos_theta; fik += prefactor_ik * cos_theta; - + double fj[3], fk[3]; - + fj[0] = bondj.del[0] * fij - bondk->del[0] * prefactor_ij; fj[1] = bondj.del[1] * fij - bondk->del[1] * prefactor_ij; fj[2] = bondj.del[2] * fij - bondk->del[2] * prefactor_ij; forces_j[0] += fj[0]; forces_j[1] += fj[1]; forces_j[2] += fj[2]; - + fk[0] = bondk->del[0] * fik - bondj.del[0] * prefactor_ik; fk[1] = bondk->del[1] * fik - bondj.del[1] * prefactor_ik; fk[2] = bondk->del[2] * fik - bondj.del[2] * prefactor_ik; forces_i[0] -= fk[0]; forces_i[1] -= fk[1]; forces_i[2] -= fk[2]; - + int k = bondk->tag; forces[k][0] += fk[0]; forces[k][1] += fk[1]; forces[k][2] += fk[2]; - + if(evflag) { double delta_ij[3]; double delta_ik[3]; @@ -265,7 +265,7 @@ void PairMEAMSpline::compute(int eflag, int vflag) ev_tally3(i, j, k, 0.0, 0.0, fj, fk, delta_ij, delta_ik); } } - + forces[i][0] -= forces_j[0]; forces[i][1] -= forces_j[1]; forces[i][2] -= forces_j[2]; @@ -273,7 +273,7 @@ void PairMEAMSpline::compute(int eflag, int vflag) forces[j][1] += forces_j[1]; forces[j][2] += forces_j[2]; } - + forces[i][0] += forces_i[0]; forces[i][1] += forces_i[1]; forces[i][2] += forces_i[2]; @@ -287,17 +287,17 @@ void PairMEAMSpline::compute(int eflag, int vflag) for(int ii = 0; ii < listhalf->inum; ii++) { int i = listhalf->ilist[ii]; const int itype = atom->type[i]; - + for(int jj = 0; jj < listhalf->numneigh[i]; jj++) { int j = listhalf->firstneigh[i][jj]; j &= NEIGHMASK; - + double jdel[3]; jdel[0] = x[j][0] - x[i][0]; jdel[1] = x[j][1] - x[i][1]; jdel[2] = x[j][2] - x[i][2]; double rij_sq = jdel[0]*jdel[0] + jdel[1]*jdel[1] + jdel[2]*jdel[2]; - + if(rij_sq < cutoff*cutoff) { double rij = sqrt(rij_sq); const int jtype = atom->type[j]; @@ -327,7 +327,7 @@ void PairMEAMSpline::compute(int eflag, int vflag) } } - if(vflag_fdotr) + if(vflag_fdotr) virial_fdotr_compute(); } @@ -410,12 +410,12 @@ void PairMEAMSpline::coeff(int narg, char **arg) } } // clear setflag since coeff() called once with I,J = * * - + n = atom->ntypes; for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) setflag[i][j] = 0; - + // set setflag i,j for type pairs where both are mapped to elements int count = 0; @@ -442,19 +442,19 @@ void PairMEAMSpline::read_file(const char* filename) sprintf(str,"Cannot open spline MEAM potential file %s", filename); error->one(FLERR,str); } - + // Skip first line of file. It's a comment. char line[MAXLINE]; char *ptr; fgets(line, MAXLINE, fp); - + // Second line holds potential type ("meam/spline") // in new potential format. bool isNewFormat = false; fgets(line, MAXLINE, fp); ptr = strtok(line, " \t\n\r\f"); - + if (strcmp(ptr, "meam/spline") == 0) { isNewFormat = true; // parse the rest of the line! @@ -484,13 +484,13 @@ void PairMEAMSpline::read_file(const char* filename) rewind(fp); fgets(line, MAXLINE, fp); } - + nmultichoose2 = ((nelements+1)*nelements)/2; // allocate!! allocate(); - + // Parse spline functions. - + for (int i = 0; i < nmultichoose2; i++) phis[i].parse(fp, error, isNewFormat); for (int i = 0; i < nelements; i++) @@ -501,7 +501,7 @@ void PairMEAMSpline::read_file(const char* filename) fs[i].parse(fp, error, isNewFormat); for (int i = 0; i < nmultichoose2; i++) gs[i].parse(fp, error, isNewFormat); - + fclose(fp); } @@ -532,11 +532,11 @@ void PairMEAMSpline::read_file(const char* filename) Us[i].communicate(world, comm->me); for (int i = 0; i < nmultichoose2; i++) gs[i].communicate(world, comm->me); - + // Calculate 'zero-point energy' of single atom in vacuum. for (int i = 0; i < nelements; i++) zero_atom_energies[i] = Us[i].eval(0.0); - + // Determine maximum cutoff radius of all relevant spline functions. cutoff = 0.0; for (int i = 0; i < nmultichoose2; i++) @@ -548,7 +548,7 @@ void PairMEAMSpline::read_file(const char* filename) for (int i = 0; i < nelements; i++) if(fs[i].cutoff() > cutoff) cutoff = fs[i].cutoff(); - + // Set LAMMPS pair interaction flags. for(int i = 1; i <= atom->ntypes; i++) { for(int j = 1; j <= atom->ntypes; j++) { @@ -556,7 +556,7 @@ void PairMEAMSpline::read_file(const char* filename) cutsq[i][j] = cutoff; } } - + } /* ---------------------------------------------------------------------- @@ -643,27 +643,27 @@ void PairMEAMSpline::SplineFunction::parse(FILE* fp, Error* error, bool isNewFormat) { char line[MAXLINE]; - + // If new format, read the spline format. Should always be "spline3eq" for now. if (isNewFormat) fgets(line, MAXLINE, fp); - + // Parse number of spline knots. fgets(line, MAXLINE, fp); int n = atoi(line); if(n < 2) error->one(FLERR,"Invalid number of spline knots in MEAM potential file"); - + // Parse first derivatives at beginning and end of spline. fgets(line, MAXLINE, fp); double d0 = atof(strtok(line, " \t\n\r\f")); double dN = atof(strtok(NULL, " \t\n\r\f")); init(n, d0, dN); - + // Skip line in old format if (!isNewFormat) fgets(line, MAXLINE, fp); - + // Parse knot coordinates. for(int i=0; i 1e-8) isGridSpline = false; } - + double qn = 0.5; double un = (3.0/(X[N-1]-X[N-2])) * (derivN - (Y[N-1]-Y[N-2])/(X[N-1]-X[N-2])); Y2[N-1] = (un - qn*u[N-2]) / (qn * Y2[N-2] + 1.0); for(int k = N-2; k >= 0; k--) { Y2[k] = Y2[k] * Y2[k+1] + u[k]; } - + delete[] u; - + #if !SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES if(!isGridSpline) error->one(FLERR,"Support for MEAM potentials with non-uniform cubic splines has not been enabled in the MEAM potential code. Set SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES in pair_spline_meam.h to 1 to enable it"); diff --git a/src/USER-MISC/pair_meam_spline.h b/src/USER-MISC/pair_meam_spline.h index bbce38c211..6200254674 100644 --- a/src/USER-MISC/pair_meam_spline.h +++ b/src/USER-MISC/pair_meam_spline.h @@ -51,21 +51,21 @@ public: void init_style(); void init_list(int, class NeighList *); double init_one(int, int); - + // helper functions for compute() - + int ij_to_potl(const int itype, const int jtype, const int ntypes) const { return jtype - 1 + (itype-1)*ntypes - (itype-1)*itype/2; } int i_to_potl(const int itype) const { return itype-1; } - - + + int pack_forward_comm(int, int *, double *, int, int *); void unpack_forward_comm(int, int, double *); int pack_reverse_comm(int, int, double *); void unpack_reverse_comm(int, int *, double *); double memory_usage(); - + protected: char **elements; // names of unique elements int *map; // mapping from atom types to elements @@ -75,7 +75,7 @@ protected: public: /// Default constructor. SplineFunction() : X(NULL), Xs(NULL), Y(NULL), Y2(NULL), Ydelta(NULL), N(0) {} - + /// Destructor. ~SplineFunction() { delete[] X; @@ -84,7 +84,7 @@ protected: delete[] Y2; delete[] Ydelta; } - + /// Initialization of spline function. void init(int _N, double _deriv0, double _derivN) { N = _N; @@ -101,19 +101,19 @@ protected: Y2 = new double[N]; Ydelta = new double[N]; } - + /// Adds a knot to the spline. void setKnot(int n, double x, double y) { X[n] = x; Y[n] = y; } - + /// Returns the number of knots. int numKnots() const { return N; } - + /// Parses the spline knots from a text file. void parse(FILE* fp, Error* error, bool isNewFormat); - + /// Calculates the second derivatives of the cubic spline. void prepareSpline(Error* error); - + /// Evaluates the spline function at position x. inline double eval(double x) const { @@ -151,7 +151,7 @@ protected: #endif } } - + /// Evaluates the spline function and its first derivative at position x. inline double eval(double x, double& deriv) const { @@ -197,16 +197,16 @@ protected: #endif } } - + /// Returns the number of bytes used by this function object. double memory_usage() const { return sizeof(*this) + sizeof(X[0]) * N * 3; } /// Returns the cutoff radius of this function. double cutoff() const { return X[N-1]; } - + /// Writes a Gnuplot script that plots the spline function. void writeGnuplot(const char* filename, const char* title = NULL) const; - + /// Broadcasts the spline function parameters to all processors. void communicate(MPI_Comm& world, int me); @@ -226,7 +226,7 @@ protected: double hsq; // The squared distance between knots if this is a grid spline with equidistant knots. double xmax_shifted; // The end of the spline interval after it has been shifted to begin at X=0. }; - + /// Helper data structure for potential routine. struct MEAM2Body { int tag; // holds the index of the second atom (j) @@ -234,26 +234,26 @@ protected: double f, fprime; double del[3]; }; - + SplineFunction* phis; // Phi_i(r_ij) SplineFunction* rhos; // Rho_ij(r_ij) SplineFunction* fs; // f_i(r_ij) SplineFunction* Us; // U_i(rho) SplineFunction* gs; // g_ij(cos_theta) double* zero_atom_energies; // Shift embedding energy by this value to make it zero for a single atom in vacuum. - + double cutoff; // The cutoff radius - + double* Uprime_values; // Used for temporary storage of U'(rho) values int nmax; // Size of temporary array. int maxNeighbors; // The last maximum number of neighbors a single atoms has. MEAM2Body* twoBodyInfo; // Temporary array. - + void read_file(const char* filename); void allocate(); - + }; - + } #endif diff --git a/src/USER-OMP/pair_meam_spline_omp.cpp b/src/USER-OMP/pair_meam_spline_omp.cpp index 96d602845d..4333d3b2a9 100644 --- a/src/USER-OMP/pair_meam_spline_omp.cpp +++ b/src/USER-OMP/pair_meam_spline_omp.cpp @@ -305,7 +305,7 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) rhos[i_to_potl(itype)].eval(rij,rho_prime_i); rhos[i_to_potl(jtype)].eval(rij,rho_prime_j); double fpair = rho_prime_j * Uprime_values[i] + rho_prime_i*Uprime_values[j]; - + double pair_pot_deriv; double pair_pot = phis[ij_to_potl(itype,jtype,ntypes)].eval(rij, pair_pot_deriv); -- GitLab From d0da0639f02b65746a6bbb2ee69145c35f2ae12e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 9 May 2017 15:51:59 -0400 Subject: [PATCH 098/593] add a couple of simple example single/multi-elment inputs for meam/spline pair styles --- .../USER/misc/meam_spline/Si_1.meam.spline | 63 +++++ .../USER/misc/meam_spline/TiO.meam.spline | 130 +++++++++ .../USER/misc/meam_spline/in.meam-spline.Si | 22 ++ .../USER/misc/meam_spline/in.meam-spline.TiO2 | 92 +++++++ .../log.4May2017.meam-spline.Si.g++.1 | 88 +++++++ .../log.4May2017.meam-spline.Si.g++.4 | 88 +++++++ .../log.4May2017.meam-spline.TiO2.g++.1 | 248 ++++++++++++++++++ .../log.4May2017.meam-spline.TiO2.g++.4 | 248 ++++++++++++++++++ 8 files changed, 979 insertions(+) create mode 100644 examples/USER/misc/meam_spline/Si_1.meam.spline create mode 100644 examples/USER/misc/meam_spline/TiO.meam.spline create mode 100644 examples/USER/misc/meam_spline/in.meam-spline.Si create mode 100644 examples/USER/misc/meam_spline/in.meam-spline.TiO2 create mode 100644 examples/USER/misc/meam_spline/log.4May2017.meam-spline.Si.g++.1 create mode 100644 examples/USER/misc/meam_spline/log.4May2017.meam-spline.Si.g++.4 create mode 100644 examples/USER/misc/meam_spline/log.4May2017.meam-spline.TiO2.g++.1 create mode 100644 examples/USER/misc/meam_spline/log.4May2017.meam-spline.TiO2.g++.4 diff --git a/examples/USER/misc/meam_spline/Si_1.meam.spline b/examples/USER/misc/meam_spline/Si_1.meam.spline new file mode 100644 index 0000000000..1ebd09cf84 --- /dev/null +++ b/examples/USER/misc/meam_spline/Si_1.meam.spline @@ -0,0 +1,63 @@ +DATE: 2012-02-01 CONTRIBUTOR: Alexander Stukowski, stukowski@mm.tu-darmstadt.de CITATION: Lenosky, Sadigh, Alonso, Bulatov, de la Rubia, Kim, Voter and Kress, Modell Simul Mater Sci Eng, 8, 825 (2000) COMMENT: Spline-based MEAM potential for Si. Reference: T. J. Lenosky, B. Sadigh, E. Alonso, V. V. Bulatov, T. D. de la Rubia, J. Kim, A. F. Voter, and J. D. Kress, Modell. Simul. Mater. Sci. Eng. 8, 825 (2000) +10 +-4.266966781858503300e+01 0.000000000000000000e+00 +1 0 1 0 +1.500000000000000000e+00 6.929943430771341000e+00 1.653321602557917600e+02 +1.833333333333333300e+00 -4.399503747408950400e-01 3.941543472528634600e+01 +2.166666666666666500e+00 -1.701233725061446700e+00 6.871065423413908100e+00 +2.500000000000000000e+00 -1.624732919215791800e+00 5.340648014033163800e+00 +2.833333333333333000e+00 -9.969641728342462100e-01 1.534811309391571000e+00 +3.166666666666667000e+00 -2.739141845072665100e-01 -6.334706186546093900e+00 +3.500000000000000000e+00 -2.499156963774082700e-02 -1.798864729909626500e+00 +3.833333333333333500e+00 -1.784331481529976400e-02 4.743496636420091500e-01 +4.166666666666666100e+00 -9.612303290166881000e-03 -4.006506271304824400e-02 +4.500000000000000000e+00 0.000000000000000000e+00 -2.394996574779807200e-01 +11 +-1.000000000000000000e+00 0.000000000000000000e+00 +1 0 0 0 +1.500000000000000000e+00 1.374674212682983900e-01 -3.227795813279568500e+00 +1.700000000000000000e+00 -1.483141815327918000e-01 -6.411648793604404900e+00 +1.899999999999999900e+00 -5.597204896096039700e-01 1.003068519633888300e+01 +2.100000000000000100e+00 -7.310964379372824100e-01 2.293461970618954700e+00 +2.299999999999999800e+00 -7.628287071954063000e-01 1.742018781618444500e+00 +2.500000000000000000e+00 -7.291769685066557000e-01 5.460640949384478700e-01 +2.700000000000000200e+00 -6.662022220044453400e-01 4.721760106467195500e-01 +2.899999999999999900e+00 -5.732830582550895200e-01 2.056894449546524200e+00 +3.100000000000000100e+00 -4.069014309729406300e-01 2.319615721086100800e+00 +3.299999999999999800e+00 -1.666155295956388300e-01 -2.497162196179187900e-01 +3.500000000000000000e+00 0.000000000000000000e+00 -1.237130660986393100e+01 +8 +7.351364478015182100e-01 6.165217237728655200e-01 +1 1 1 1 +-1.770934559908718700e+00 -1.074925682941420000e+00 -1.482768170233858500e-01 +-3.881557649503457600e-01 -2.004503493658201000e-01 -1.492100354067345500e-01 +9.946230300080272100e-01 4.142241371345077300e-01 -7.012475119623896900e-02 +2.377401824966400000e+00 8.793892953828742500e-01 -3.944355024164965900e-02 +3.760180619924772900e+00 1.266888024536562100e+00 -1.581431192239436000e-02 +5.142959414883146800e+00 1.629979548834614900e+00 2.611224310900800400e-02 +6.525738209841518900e+00 1.977379549636293600e+00 -1.378738550324104500e-01 +7.908517004799891800e+00 2.396177220616657200e+00 7.494253977092666400e-01 +10 +-3.618936018538757300e+00 0.000000000000000000e+00 +1 0 1 0 +1.500000000000000000e+00 1.250311510312851300e+00 2.790400588857243500e+01 +1.722222222222222300e+00 8.682060369372680600e-01 -4.522554291731776900e+00 +1.944444444444444400e+00 6.084604017544847900e-01 5.052931618779816800e+00 +2.166666666666666500e+00 4.875624808097850400e-01 1.180825096539679600e+00 +2.388888888888888800e+00 4.416345603457190700e-01 -6.673769465415171400e-01 +2.611111111111111200e+00 3.760976313325982700e-01 -8.938118490837722000e-01 +2.833333333333333000e+00 2.714524157414608400e-01 -5.090324763524399800e-01 +3.055555555555555400e+00 1.481440300150710900e-01 6.623665830603995300e-01 +3.277777777777777700e+00 4.854596610856590900e-02 7.403702452268122700e-01 +3.500000000000000000e+00 0.000000000000000000e+00 2.578982318481970500e+00 +8 +-1.395041572145673000e+01 1.134616739799360700e+00 +1 1 1 1 +-1.000000000000000900e+00 5.254163992149617700e+00 1.582685381253900500e+01 +-7.428367052748285900e-01 2.359149452448745100e+00 3.117611233789983400e+01 +-4.856734105496561800e-01 1.195946960915646100e+00 1.658962813584905800e+01 +-2.285101158244838800e-01 1.229952028074150000e+00 1.108360928564026400e+01 +2.865317890068852500e-02 2.035650777568434500e+00 9.088861456447702400e+00 +2.858164736258610400e-01 3.424741418405580000e+00 5.489943377538379500e+00 +5.429797683510331200e-01 4.948585892304984100e+00 -1.882291580187675700e+01 +8.001430630762056400e-01 5.617988713941801200e+00 -7.718625571850646200e+00 diff --git a/examples/USER/misc/meam_spline/TiO.meam.spline b/examples/USER/misc/meam_spline/TiO.meam.spline new file mode 100644 index 0000000000..ed2a67a962 --- /dev/null +++ b/examples/USER/misc/meam_spline/TiO.meam.spline @@ -0,0 +1,130 @@ +# Ti-O cubic spline potential where O is in the dilute limit. DATE: 2016-06-05 CONTRIBUTOR: Pinchao Zhang, Dallas R. Trinkle +meam/spline 2 Ti O +spline3eq +13 +-20 0 +1.742692837 3.744277175966 99.4865081627958 +2.05580176725 0.910839730906 10.8702523265355 +2.3689106975 0.388045896634 -1.55322418749562 +2.68201962775 -0.018840906533 2.43630041329215 +2.995128558 -0.248098929639 2.67912713976835 +3.30823748825 -0.264489550297 -0.125056384603077 +3.6213464185 -0.227196189283 1.10662555360438 +3.93445534875 -0.129293090176 -0.592053676745914 +4.247564279 -0.059685366933 -0.470123414607672 +4.56067320925 -0.031100025561 -0.0380739973059663 +4.8737821395 -0.013847363202 -0.0711547960695406 +5.18689106975 -0.003203412728 -0.081768292420175 +5.5 0 -0.0571422964883619 +spline3eq +5 +0.155001355787331 0 +1.9 0.533321679606674 0 +2.8 0.456402081843862 -1.60311717015859 +3.7 -0.324281383502201 1.19940299483249 +4.6 -0.474029826906675 1.47909794595154 +5.5 0 -2.49521499855605 +spline3eq +13 +0 0 +1.742692837 0 0 +2.05580176725 0 0 +2.3689106975 0 0 +2.68201962775 0 0 +2.995128558 0 0 +3.30823748825 0 0 +3.6213464185 0 0 +3.93445534875 0 0 +4.247564279 0 0 +4.56067320925 0 0 +4.8737821395 0 0 +5.18689106975 0 0 +5.5 0 0 +spline3eq +11 +-1 0 +2.055801767 1.7475279661 -525.869786904802 +2.2912215903 -5.8677963945 252.796316927755 +2.5266414136 -8.3376288737 71.7318388721015 +2.7620612369 -5.8398712842 -1.93587742753693 +2.9974810602 -3.1140648231 -39.2999192667503 +3.2329008835 -1.7257245065 14.3424136002004 +3.4683207068 -0.4428977017 -29.4925534559498 +3.7037405301 -0.1466643003 -3.18010534572236 +3.9391603534 -0.2095507945 3.33490838803603 +4.1745801767 -0.1442384563 3.71918691359508 +4.41 0 -9.66717019857564 +spline3eq +5 +-61.9827585211652 0 +1.9 11.2293641315584 0 +2.8 -27.9976343076148 122.648031332411 +3.7 -8.32979773113248 -54.3340881766381 +4.6 -1.00863195297399 3.23150064581724 +5.5 0 -5.3514242228123 +spline3eq +4 +0.00776934946045395 0.105197706160344 +-55.14233165 -0.29745568008 0.00152870603877451 +-44.7409899033333 -0.15449458722 0.00038933722543571 +-34.3396481566667 0.05098657168 0.00038124926922248 +-23.93830641 0.57342694704 0.0156639264890892 +spline3eq +5 +-0.00676745157022662 -0.0159520381982146 +-23.9928 0.297607384684645 0 +-15.9241175 0.216691597077105 -0.0024248755353942 +-7.855435 0.0637598673719069 0.00306245895013358 +0.213247499999998 -0.00183450621970427 -0.00177588407633909 +8.28193 -0.111277018874367 0 +spline3eq +10 +2.77327511656661 0 +2.055801767 -0.1485215264 72.2010867146919 +2.31737934844444 1.6845304918 -47.2744689053404 +2.57895692988889 2.0113365977 -15.1859578405326 +2.84053451133333 1.1444092747 3.33978204841873 +3.10211209277778 0.2861606803 2.587867603808 +3.36368967422222 -0.3459281126 6.14070694084556 +3.62526725566667 -0.6257480601 3.7397696717154 +3.88684483711111 -0.6119510826 4.64749084871402 +4.14842241855556 -0.3112059651 2.83275746415936 +4.41 0 -15.0612086827734 +spline3eq +5 +12.3315547862781 0 +1.9 2.62105440156724 0 +2.8 10.2850803058354 -25.439802988016 +3.7 3.23933763743897 -7.20203673434025 +4.6 -5.79049355858613 39.5509978688682 +5.5 0 -41.221771373642 +spline3eq +8 +8.33642274810572 -60.4024574736564 +-1 0.07651409193 -110.652321293778 +-0.724509054371429 0.14155824541 44.8853405500508 +-0.449018108742857 0.75788697341 -25.3065115342002 +-0.173527163114286 0.63011570378 -2.48510144915082 +0.101963782514286 0.09049597305 2.68769386908235 +0.377454728142857 -0.35741586657 -1.01558570129633 +0.652945673771428 -0.65293217647 13.4224786001212 +0.9284366194 -6.00912190653 -452.752542694929 +spline3eq +5 +0.137191606537625 -1.55094230968985 +-1 0.0513843442016519 0 +-0.5 0.0179024412245673 -2.44986494990154 +0 -0.260650876879273 3.91774583656401 +0.5 -0.190163791764901 -4.84414871911743 +1 -0.763795416646599 0 +spline3eq +8 +0 0 +-1 0 0 +-0.724509054371429 0 0 +-0.449018108742857 0 0 +-0.173527163114286 0 0 +0.101963782514286 0 0 +0.377454728142857 0 0 +0.652945673771428 0 0 +0.9284366194 0 0 diff --git a/examples/USER/misc/meam_spline/in.meam-spline.Si b/examples/USER/misc/meam_spline/in.meam-spline.Si new file mode 100644 index 0000000000..7f270ccecd --- /dev/null +++ b/examples/USER/misc/meam_spline/in.meam-spline.Si @@ -0,0 +1,22 @@ +# Si fcc phase + +units metal +boundary p p p + +atom_style atomic +lattice fcc 3.98 +region box block 0 5 0 5 0 5 +create_box 1 box +create_atoms 1 box + +pair_style meam/spline +pair_coeff * * Si_1.meam.spline Si +mass * 28.085 + +velocity all create 500.0 44226611 + +fix 1 all nvt temp 500.0 500.0 1.0 + +thermo 50 +run 500 + diff --git a/examples/USER/misc/meam_spline/in.meam-spline.TiO2 b/examples/USER/misc/meam_spline/in.meam-spline.TiO2 new file mode 100644 index 0000000000..06c8b7f8cd --- /dev/null +++ b/examples/USER/misc/meam_spline/in.meam-spline.TiO2 @@ -0,0 +1,92 @@ +# + +variable T_depart equal 300 + +variable dt equal 0.0002 + +variable a equal 4.5937 +variable c equal 2.9587 +variable ca equal ${c}/${a} + +variable nx equal 6 +variable ny equal 6 +variable nz equal 11 + +variable bx equal ${a}*${nx} +variable by equal ${a}*${ny} +variable bz equal ${c}*${nz} +# ======================================================================= + +units metal +atom_style atomic +dimension 3 +boundary p p p + + +lattice sc 1.0 +region box_vide prism 0 ${bx} 0 ${by} 0 ${bz} 0.0 0.0 0.0 +create_box 2 box_vide + +#lattice sc 1.0 +#region box_TiO2 block 0 ${bx} 0 ${by} 0 ${bz} + +# titanium atoms +lattice custom ${a} origin 0.0 0.0 0.0 & + orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 & + a1 1.0 0.0 0.0 & + a2 0.0 1.0 0.0 & + a3 0.0 0.0 ${ca} & + basis 0.0 0.0 0.0 & + basis 0.5 0.5 0.5 + +create_atoms 2 region box_vide + +# Oxygen atoms +lattice custom ${a} origin 0.0 0.0 0.0 & + orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 & + a1 1.0 0.0 0.0 & + a2 0.0 1.0 0.0 & + a3 0.0 0.0 ${ca} & + basis 0.30478 0.30478 0.0 & + basis 0.69522 0.69522 0.0 & + basis 0.19522 0.80478 0.5 & + basis 0.80478 0.19522 0.5 + +create_atoms 1 region box_vide + + +mass 1 16.00 +group Oxy type 1 + +mass 2 47.867 +group Ti type 2 + +velocity all create ${T_depart} 277387 + +pair_style meam/spline +pair_coeff * * TiO.meam.spline O Ti + +neighbor 0.5 bin +neigh_modify every 2 delay 0 check yes + +timestep ${dt} + +thermo_style custom step temp press pe ke etotal lx ly lz vol +thermo 10 + + +#dump 5 all custom 500 boxAlpha_alumina.lammpstrj id type q x y z + +fix 3 all nve +run 100 + +unfix 3 +fix 1 all box/relax tri 0.0 vmax 0.001 +minimize 1.0e-3 1.0e-5 1000 10000 + +unfix 1 +reset_timestep 0 +thermo 50 +fix 3 all npt temp 300 300 0.1 aniso 1.0 1.0 1.0 +run 500 + diff --git a/examples/USER/misc/meam_spline/log.4May2017.meam-spline.Si.g++.1 b/examples/USER/misc/meam_spline/log.4May2017.meam-spline.Si.g++.1 new file mode 100644 index 0000000000..ebf0855029 --- /dev/null +++ b/examples/USER/misc/meam_spline/log.4May2017.meam-spline.Si.g++.1 @@ -0,0 +1,88 @@ +LAMMPS (13 Apr 2017) + using 1 OpenMP thread(s) per MPI task +# Si fcc phase + +units metal +boundary p p p + +atom_style atomic +lattice fcc 3.98 +Lattice spacing in x,y,z = 3.98 3.98 3.98 +region box block 0 5 0 5 0 5 +create_box 1 box +Created orthogonal box = (0 0 0) to (19.9 19.9 19.9) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 500 atoms + +pair_style meam/spline +pair_coeff * * Si_1.meam.spline Si +Reading potential file Si_1.meam.spline with DATE: 2012-02-01 +mass * 28.085 + +velocity all create 500.0 44226611 + +fix 1 all nvt temp 500.0 500.0 1.0 + +thermo 50 +run 500 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6.5 + ghost atom cutoff = 6.5 + binsize = 3.25, bins = 7 7 7 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/spline, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/spline, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 3.892 | 3.892 | 3.892 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 500 -1847.729 0 -1815.4786 1813162.7 + 50 1934.0932 -1940.8016 0 -1816.051 -48657.676 + 100 2570.1286 -1984.8725 0 -1819.0971 8002.4248 + 150 2566.7917 -1990.2724 0 -1824.7123 16819.447 + 200 2555.1319 -1995.2233 0 -1830.4152 5891.5313 + 250 2487.2881 -1995.8302 0 -1835.3981 -4339.7172 + 300 2381.4836 -1994.2492 0 -1840.6415 16508.04 + 350 2330.8663 -1996.6588 0 -1846.3161 24194.447 + 400 2212.6035 -1994.9278 0 -1852.2131 -9856.3709 + 450 2257.7531 -2003.8187 0 -1858.1918 -8029.6019 + 500 2211.4385 -2006.9846 0 -1864.345 4152.4867 +Loop time of 5.13837 on 1 procs for 500 steps with 500 atoms + +Performance: 8.407 ns/day, 2.855 hours/ns, 97.307 timesteps/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 5.0952 | 5.0952 | 5.0952 | 0.0 | 99.16 +Neigh | 0.026447 | 0.026447 | 0.026447 | 0.0 | 0.51 +Comm | 0.0063307 | 0.0063307 | 0.0063307 | 0.0 | 0.12 +Output | 0.0001905 | 0.0001905 | 0.0001905 | 0.0 | 0.00 +Modify | 0.0082877 | 0.0082877 | 0.0082877 | 0.0 | 0.16 +Other | | 0.00187 | | | 0.04 + +Nlocal: 500 ave 500 max 500 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1767 ave 1767 max 1767 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 18059 ave 18059 max 18059 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 36118 ave 36118 max 36118 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 36118 +Ave neighs/atom = 72.236 +Neighbor list builds = 14 +Dangerous builds = 0 + +Total wall time: 0:00:05 diff --git a/examples/USER/misc/meam_spline/log.4May2017.meam-spline.Si.g++.4 b/examples/USER/misc/meam_spline/log.4May2017.meam-spline.Si.g++.4 new file mode 100644 index 0000000000..3f059d7cee --- /dev/null +++ b/examples/USER/misc/meam_spline/log.4May2017.meam-spline.Si.g++.4 @@ -0,0 +1,88 @@ +LAMMPS (13 Apr 2017) + using 1 OpenMP thread(s) per MPI task +# Si fcc phase + +units metal +boundary p p p + +atom_style atomic +lattice fcc 3.98 +Lattice spacing in x,y,z = 3.98 3.98 3.98 +region box block 0 5 0 5 0 5 +create_box 1 box +Created orthogonal box = (0 0 0) to (19.9 19.9 19.9) + 1 by 2 by 2 MPI processor grid +create_atoms 1 box +Created 500 atoms + +pair_style meam/spline +pair_coeff * * Si_1.meam.spline Si +Reading potential file Si_1.meam.spline with DATE: 2012-02-01 +mass * 28.085 + +velocity all create 500.0 44226611 + +fix 1 all nvt temp 500.0 500.0 1.0 + +thermo 50 +run 500 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6.5 + ghost atom cutoff = 6.5 + binsize = 3.25, bins = 7 7 7 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/spline, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/spline, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 3.861 | 3.861 | 3.861 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 500 -1847.729 0 -1815.4786 1813162.7 + 50 1923.4262 -1940.0936 0 -1816.0311 -38700.835 + 100 2535.2542 -1982.6249 0 -1819.0989 10216.821 + 150 2592.8247 -1992.1569 0 -1824.9176 4839.3385 + 200 2484.7391 -1990.8452 0 -1830.5775 14040.141 + 250 2597.4401 -2003.1619 0 -1835.625 1261.5199 + 300 2513.0793 -2002.942 0 -1840.8463 6690.9815 + 350 2390.933 -2001.0761 0 -1846.859 -4880.1146 + 400 2269.0782 -1999.3441 0 -1852.9867 -4921.4391 + 450 2287.5096 -2006.8236 0 -1859.2774 -7313.6151 + 500 2303.0918 -2014.0693 0 -1865.518 -9995.1789 +Loop time of 1.46588 on 4 procs for 500 steps with 500 atoms + +Performance: 29.470 ns/day, 0.814 hours/ns, 341.093 timesteps/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.4273 | 1.4292 | 1.432 | 0.1 | 97.50 +Neigh | 0.0068567 | 0.0070301 | 0.0073655 | 0.2 | 0.48 +Comm | 0.019111 | 0.022127 | 0.024148 | 1.2 | 1.51 +Output | 0.00023174 | 0.00024784 | 0.00029206 | 0.0 | 0.02 +Modify | 0.005043 | 0.0052016 | 0.0054417 | 0.2 | 0.35 +Other | | 0.002066 | | | 0.14 + +Nlocal: 125 ave 131 max 118 min +Histogram: 1 0 0 1 0 0 0 0 1 1 +Nghost: 979.25 ave 986 max 975 min +Histogram: 1 1 0 1 0 0 0 0 0 1 +Neighs: 4541.75 ave 4712 max 4362 min +Histogram: 1 1 0 0 0 0 0 0 0 2 +FullNghs: 9083.5 ave 9485 max 8601 min +Histogram: 1 0 0 1 0 0 0 0 1 1 + +Total # of neighbors = 36334 +Ave neighs/atom = 72.668 +Neighbor list builds = 14 +Dangerous builds = 0 + +Total wall time: 0:00:01 diff --git a/examples/USER/misc/meam_spline/log.4May2017.meam-spline.TiO2.g++.1 b/examples/USER/misc/meam_spline/log.4May2017.meam-spline.TiO2.g++.1 new file mode 100644 index 0000000000..aaeadec668 --- /dev/null +++ b/examples/USER/misc/meam_spline/log.4May2017.meam-spline.TiO2.g++.1 @@ -0,0 +1,248 @@ +LAMMPS (13 Apr 2017) + using 1 OpenMP thread(s) per MPI task +# + +variable T_depart equal 300 + +variable dt equal 0.0002 + +variable a equal 4.5937 +variable c equal 2.9587 +variable ca equal ${c}/${a} +variable ca equal 2.9587/${a} +variable ca equal 2.9587/4.5937 + +variable nx equal 6 +variable ny equal 6 +variable nz equal 11 + +variable bx equal ${a}*${nx} +variable bx equal 4.5937*${nx} +variable bx equal 4.5937*6 +variable by equal ${a}*${ny} +variable by equal 4.5937*${ny} +variable by equal 4.5937*6 +variable bz equal ${c}*${nz} +variable bz equal 2.9587*${nz} +variable bz equal 2.9587*11 +# ======================================================================= + +units metal +atom_style atomic +dimension 3 +boundary p p p + + +lattice sc 1.0 +Lattice spacing in x,y,z = 1 1 1 +region box_vide prism 0 ${bx} 0 ${by} 0 ${bz} 0.0 0.0 0.0 +region box_vide prism 0 27.5622 0 ${by} 0 ${bz} 0.0 0.0 0.0 +region box_vide prism 0 27.5622 0 27.5622 0 ${bz} 0.0 0.0 0.0 +region box_vide prism 0 27.5622 0 27.5622 0 32.5457 0.0 0.0 0.0 +create_box 2 box_vide +Created triclinic box = (0 0 0) to (27.5622 27.5622 32.5457) with tilt (0 0 0) + 1 by 1 by 1 MPI processor grid + +#lattice sc 1.0 +#region box_TiO2 block 0 ${bx} 0 ${by} 0 ${bz} + +# titanium atoms +lattice custom ${a} origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 ${ca} basis 0.0 0.0 0.0 basis 0.5 0.5 0.5 +lattice custom 4.5937 origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 ${ca} basis 0.0 0.0 0.0 basis 0.5 0.5 0.5 +lattice custom 4.5937 origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 0.644077758669482 basis 0.0 0.0 0.0 basis 0.5 0.5 0.5 +Lattice spacing in x,y,z = 4.5937 4.5937 2.9587 + +create_atoms 2 region box_vide +Created 792 atoms + +# Oxygen atoms +lattice custom ${a} origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 ${ca} basis 0.30478 0.30478 0.0 basis 0.69522 0.69522 0.0 basis 0.19522 0.80478 0.5 basis 0.80478 0.19522 0.5 +lattice custom 4.5937 origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 ${ca} basis 0.30478 0.30478 0.0 basis 0.69522 0.69522 0.0 basis 0.19522 0.80478 0.5 basis 0.80478 0.19522 0.5 +lattice custom 4.5937 origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 0.644077758669482 basis 0.30478 0.30478 0.0 basis 0.69522 0.69522 0.0 basis 0.19522 0.80478 0.5 basis 0.80478 0.19522 0.5 +Lattice spacing in x,y,z = 4.5937 4.5937 2.9587 + +create_atoms 1 region box_vide +Created 1584 atoms + + +mass 1 16.00 +group Oxy type 1 +1584 atoms in group Oxy + +mass 2 47.867 +group Ti type 2 +792 atoms in group Ti + +velocity all create ${T_depart} 277387 +velocity all create 300 277387 + +pair_style meam/spline +pair_coeff * * TiO.meam.spline O Ti +Reading potential file TiO.meam.spline with DATE: 2016-06-05 + +neighbor 0.5 bin +neigh_modify every 2 delay 0 check yes + +timestep ${dt} +timestep 0.0002 + +thermo_style custom step temp press pe ke etotal lx ly lz vol +thermo 10 + + +#dump 5 all custom 500 boxAlpha_alumina.lammpstrj id type q x y z + +fix 3 all nve +run 100 +Neighbor list info ... + update every 2 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 10 10 11 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/spline, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/spline, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 5.146 | 5.146 | 5.146 Mbytes +Step Temp Press PotEng KinEng TotEng Lx Ly Lz Volume + 0 300 22403.656 -14374.073 92.097853 -14281.975 27.5622 27.5622 32.5457 24724.15 + 10 301.41345 23612.297 -14374.507 92.531772 -14281.975 27.5622 27.5622 32.5457 24724.15 + 20 305.11674 25127.832 -14375.643 93.668657 -14281.974 27.5622 27.5622 32.5457 24724.15 + 30 313.28903 26655.89 -14378.151 96.17749 -14281.974 27.5622 27.5622 32.5457 24724.15 + 40 328.94567 26999.049 -14382.957 100.98397 -14281.974 27.5622 27.5622 32.5457 24724.15 + 50 354.05827 23023.294 -14390.667 108.69336 -14281.974 27.5622 27.5622 32.5457 24724.15 + 60 390.48404 13594.655 -14401.849 119.87581 -14281.973 27.5622 27.5622 32.5457 24724.15 + 70 442.69928 151.15709 -14417.877 135.90551 -14281.972 27.5622 27.5622 32.5457 24724.15 + 80 516.89551 -14984.124 -14440.654 158.68322 -14281.971 27.5622 27.5622 32.5457 24724.15 + 90 618.22135 -29948.066 -14471.76 189.78953 -14281.971 27.5622 27.5622 32.5457 24724.15 + 100 747.6193 -41964.291 -14511.487 229.51378 -14281.973 27.5622 27.5622 32.5457 24724.15 +Loop time of 38.7948 on 1 procs for 100 steps with 2376 atoms + +Performance: 0.045 ns/day, 538.817 hours/ns, 2.578 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 38.774 | 38.774 | 38.774 | 0.0 | 99.95 +Neigh | 0.010751 | 0.010751 | 0.010751 | 0.0 | 0.03 +Comm | 0.0039313 | 0.0039313 | 0.0039313 | 0.0 | 0.01 +Output | 0.00048804 | 0.00048804 | 0.00048804 | 0.0 | 0.00 +Modify | 0.0039241 | 0.0039241 | 0.0039241 | 0.0 | 0.01 +Other | | 0.001809 | | | 0.00 + +Nlocal: 2376 ave 2376 max 2376 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 4479 ave 4479 max 4479 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 106396 ave 106396 max 106396 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 212792 ave 212792 max 212792 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 212792 +Ave neighs/atom = 89.5589 +Neighbor list builds = 1 +Dangerous builds = 0 + +unfix 3 +fix 1 all box/relax tri 0.0 vmax 0.001 +minimize 1.0e-3 1.0e-5 1000 10000 +WARNING: Resetting reneighboring criteria during minimization (../min.cpp:168) +Per MPI rank memory allocation (min/avg/max) = 6.271 | 6.271 | 6.271 Mbytes +Step Temp Press PotEng KinEng TotEng Lx Ly Lz Volume + 100 747.6193 -41964.291 -14511.487 229.51378 -14281.973 27.5622 27.5622 32.5457 24724.15 + 101 747.6193 -39284.65 -14517.424 229.51378 -14287.91 27.569615 27.569695 32.513154 24712.789 +Loop time of 0.814693 on 1 procs for 1 steps with 2376 atoms + +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +Minimization stats: + Stopping criterion = energy tolerance + Energy initial, next-to-last, final = + -14511.4866189 -14511.4866189 -14517.4235162 + Force two-norm initial, final = 5602.25 5486.97 + Force max component initial, final = 5232.05 5109.43 + Final line search alpha, max atom move = 1.9113e-07 0.000976563 + Iterations, force evaluations = 1 1 + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.81429 | 0.81429 | 0.81429 | 0.0 | 99.95 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 6.485e-05 | 6.485e-05 | 6.485e-05 | 0.0 | 0.01 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 0.0003347 | | | 0.04 + +Nlocal: 2376 ave 2376 max 2376 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 4449 ave 4449 max 4449 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 105639 ave 105639 max 105639 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 211278 ave 211278 max 211278 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 211278 +Ave neighs/atom = 88.9217 +Neighbor list builds = 0 +Dangerous builds = 0 + +unfix 1 +reset_timestep 0 +thermo 50 +fix 3 all npt temp 300 300 0.1 aniso 1.0 1.0 1.0 +run 500 +Per MPI rank memory allocation (min/avg/max) = 5.162 | 5.162 | 5.162 Mbytes +Step Temp Press PotEng KinEng TotEng Lx Ly Lz Volume + 0 747.6193 -39284.65 -14517.424 229.51378 -14287.91 27.569615 27.569695 32.513154 24712.789 + 50 1155.2849 30650.319 -14678.807 354.6642 -14324.143 27.608688 27.60914 32.375311 24678.15 + 100 790.03926 99869.991 -14678.858 242.5364 -14436.322 27.777994 27.77799 32.017001 24704.857 + 150 938.86463 -21488.442 -14803.782 288.22472 -14515.557 27.996584 27.995139 31.67008 24822.003 + 200 420.11331 -790.80799 -14671.687 128.97178 -14542.715 28.126911 28.125909 31.431033 24864.93 + 250 352.18149 -3244.2491 -14665.007 108.1172 -14556.889 28.222686 28.223673 31.238649 24883.078 + 300 622.91245 3657.7097 -14758.201 191.22967 -14566.972 28.301771 28.30503 31.07216 24891.363 + 350 888.25374 26274.358 -14852.568 272.68754 -14579.881 28.370312 28.375107 30.937051 24904.656 + 400 735.44163 63109.066 -14823.872 225.77532 -14598.097 28.446905 28.45227 30.838015 24959.642 + 450 804.81905 6221.0364 -14861.113 247.07369 -14614.039 28.543942 28.548719 30.775793 25078.977 + 500 628.19106 -33912.026 -14814.726 192.85016 -14621.876 28.611997 28.615169 30.74081 25168.642 +Loop time of 176.167 on 1 procs for 500 steps with 2376 atoms + +Performance: 0.049 ns/day, 489.353 hours/ns, 2.838 timesteps/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 175.9 | 175.9 | 175.9 | 0.0 | 99.85 +Neigh | 0.17043 | 0.17043 | 0.17043 | 0.0 | 0.10 +Comm | 0.018243 | 0.018243 | 0.018243 | 0.0 | 0.01 +Output | 0.00040984 | 0.00040984 | 0.00040984 | 0.0 | 0.00 +Modify | 0.067142 | 0.067142 | 0.067142 | 0.0 | 0.04 +Other | | 0.00828 | | | 0.00 + +Nlocal: 2376 ave 2376 max 2376 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 4358 ave 4358 max 4358 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 102634 ave 102634 max 102634 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 205268 ave 205268 max 205268 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 205268 +Ave neighs/atom = 86.3923 +Neighbor list builds = 16 +Dangerous builds = 0 + +Total wall time: 0:03:37 diff --git a/examples/USER/misc/meam_spline/log.4May2017.meam-spline.TiO2.g++.4 b/examples/USER/misc/meam_spline/log.4May2017.meam-spline.TiO2.g++.4 new file mode 100644 index 0000000000..6c2c949acb --- /dev/null +++ b/examples/USER/misc/meam_spline/log.4May2017.meam-spline.TiO2.g++.4 @@ -0,0 +1,248 @@ +LAMMPS (13 Apr 2017) + using 1 OpenMP thread(s) per MPI task +# + +variable T_depart equal 300 + +variable dt equal 0.0002 + +variable a equal 4.5937 +variable c equal 2.9587 +variable ca equal ${c}/${a} +variable ca equal 2.9587/${a} +variable ca equal 2.9587/4.5937 + +variable nx equal 6 +variable ny equal 6 +variable nz equal 11 + +variable bx equal ${a}*${nx} +variable bx equal 4.5937*${nx} +variable bx equal 4.5937*6 +variable by equal ${a}*${ny} +variable by equal 4.5937*${ny} +variable by equal 4.5937*6 +variable bz equal ${c}*${nz} +variable bz equal 2.9587*${nz} +variable bz equal 2.9587*11 +# ======================================================================= + +units metal +atom_style atomic +dimension 3 +boundary p p p + + +lattice sc 1.0 +Lattice spacing in x,y,z = 1 1 1 +region box_vide prism 0 ${bx} 0 ${by} 0 ${bz} 0.0 0.0 0.0 +region box_vide prism 0 27.5622 0 ${by} 0 ${bz} 0.0 0.0 0.0 +region box_vide prism 0 27.5622 0 27.5622 0 ${bz} 0.0 0.0 0.0 +region box_vide prism 0 27.5622 0 27.5622 0 32.5457 0.0 0.0 0.0 +create_box 2 box_vide +Created triclinic box = (0 0 0) to (27.5622 27.5622 32.5457) with tilt (0 0 0) + 1 by 2 by 2 MPI processor grid + +#lattice sc 1.0 +#region box_TiO2 block 0 ${bx} 0 ${by} 0 ${bz} + +# titanium atoms +lattice custom ${a} origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 ${ca} basis 0.0 0.0 0.0 basis 0.5 0.5 0.5 +lattice custom 4.5937 origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 ${ca} basis 0.0 0.0 0.0 basis 0.5 0.5 0.5 +lattice custom 4.5937 origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 0.644077758669482 basis 0.0 0.0 0.0 basis 0.5 0.5 0.5 +Lattice spacing in x,y,z = 4.5937 4.5937 2.9587 + +create_atoms 2 region box_vide +Created 792 atoms + +# Oxygen atoms +lattice custom ${a} origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 ${ca} basis 0.30478 0.30478 0.0 basis 0.69522 0.69522 0.0 basis 0.19522 0.80478 0.5 basis 0.80478 0.19522 0.5 +lattice custom 4.5937 origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 ${ca} basis 0.30478 0.30478 0.0 basis 0.69522 0.69522 0.0 basis 0.19522 0.80478 0.5 basis 0.80478 0.19522 0.5 +lattice custom 4.5937 origin 0.0 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 0.644077758669482 basis 0.30478 0.30478 0.0 basis 0.69522 0.69522 0.0 basis 0.19522 0.80478 0.5 basis 0.80478 0.19522 0.5 +Lattice spacing in x,y,z = 4.5937 4.5937 2.9587 + +create_atoms 1 region box_vide +Created 1584 atoms + + +mass 1 16.00 +group Oxy type 1 +1584 atoms in group Oxy + +mass 2 47.867 +group Ti type 2 +792 atoms in group Ti + +velocity all create ${T_depart} 277387 +velocity all create 300 277387 + +pair_style meam/spline +pair_coeff * * TiO.meam.spline O Ti +Reading potential file TiO.meam.spline with DATE: 2016-06-05 + +neighbor 0.5 bin +neigh_modify every 2 delay 0 check yes + +timestep ${dt} +timestep 0.0002 + +thermo_style custom step temp press pe ke etotal lx ly lz vol +thermo 10 + + +#dump 5 all custom 500 boxAlpha_alumina.lammpstrj id type q x y z + +fix 3 all nve +run 100 +Neighbor list info ... + update every 2 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 10 10 11 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/spline, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/spline, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 3.922 | 3.922 | 3.922 Mbytes +Step Temp Press PotEng KinEng TotEng Lx Ly Lz Volume + 0 300 22403.656 -14374.073 92.097853 -14281.975 27.5622 27.5622 32.5457 24724.15 + 10 301.16725 23582.084 -14374.431 92.456192 -14281.975 27.5622 27.5622 32.5457 24724.15 + 20 304.58237 25059.749 -14375.479 93.504609 -14281.974 27.5622 27.5622 32.5457 24724.15 + 30 312.41477 26504.358 -14377.883 95.9091 -14281.974 27.5622 27.5622 32.5457 24724.15 + 40 327.67099 26687.057 -14382.566 100.59265 -14281.974 27.5622 27.5622 32.5457 24724.15 + 50 352.32125 22677.292 -14390.134 108.1601 -14281.974 27.5622 27.5622 32.5457 24724.15 + 60 388.40592 12472.705 -14401.211 119.23784 -14281.973 27.5622 27.5622 32.5457 24724.15 + 70 439.97199 -1520.4694 -14417.04 135.06825 -14281.972 27.5622 27.5622 32.5457 24724.15 + 80 513.34361 -16733.316 -14439.564 157.59282 -14281.971 27.5622 27.5622 32.5457 24724.15 + 90 613.3542 -31099.591 -14470.267 188.29535 -14281.971 27.5622 27.5622 32.5457 24724.15 + 100 741.02836 -42358.226 -14509.464 227.4904 -14281.973 27.5622 27.5622 32.5457 24724.15 +Loop time of 8.92317 on 4 procs for 100 steps with 2376 atoms + +Performance: 0.194 ns/day, 123.933 hours/ns, 11.207 timesteps/s +99.5% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 8.8912 | 8.9 | 8.9064 | 0.2 | 99.74 +Neigh | 0.0027034 | 0.0028808 | 0.0032032 | 0.4 | 0.03 +Comm | 0.010964 | 0.017648 | 0.026568 | 5.0 | 0.20 +Output | 0.00037575 | 0.00047809 | 0.00053835 | 0.0 | 0.01 +Modify | 0.00099134 | 0.001001 | 0.0010085 | 0.0 | 0.01 +Other | | 0.001162 | | | 0.01 + +Nlocal: 594 ave 599 max 589 min +Histogram: 1 0 0 0 0 2 0 0 0 1 +Nghost: 2290.25 ave 2296 max 2282 min +Histogram: 1 0 0 0 1 0 0 0 1 1 +Neighs: 26671.5 ave 26934 max 26495 min +Histogram: 1 0 0 2 0 0 0 0 0 1 +FullNghs: 53343 ave 53828 max 52922 min +Histogram: 1 0 0 0 2 0 0 0 0 1 + +Total # of neighbors = 213372 +Ave neighs/atom = 89.803 +Neighbor list builds = 1 +Dangerous builds = 0 + +unfix 3 +fix 1 all box/relax tri 0.0 vmax 0.001 +minimize 1.0e-3 1.0e-5 1000 10000 +WARNING: Resetting reneighboring criteria during minimization (../min.cpp:168) +Per MPI rank memory allocation (min/avg/max) = 5.047 | 5.047 | 5.047 Mbytes +Step Temp Press PotEng KinEng TotEng Lx Ly Lz Volume + 100 741.02836 -42358.226 -14509.464 227.4904 -14281.973 27.5622 27.5622 32.5457 24724.15 + 101 741.02836 -39686.588 -14515.398 227.4904 -14287.907 27.569587 27.569656 32.513154 24712.729 +Loop time of 0.193516 on 4 procs for 1 steps with 2376 atoms + +99.5% CPU use with 4 MPI tasks x 1 OpenMP threads + +Minimization stats: + Stopping criterion = energy tolerance + Energy initial, next-to-last, final = + -14509.46351 -14509.46351 -14515.3978891 + Force two-norm initial, final = 5602.69 5487.77 + Force max component initial, final = 5235.27 5113.06 + Final line search alpha, max atom move = 1.91012e-07 0.000976657 + Iterations, force evaluations = 1 1 + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.19287 | 0.19299 | 0.19318 | 0.0 | 99.73 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.00014043 | 0.00033247 | 0.00045896 | 0.0 | 0.17 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 0.0001886 | | | 0.10 + +Nlocal: 594 ave 601 max 586 min +Histogram: 1 0 0 0 0 1 1 0 0 1 +Nghost: 2263.25 ave 2271 max 2251 min +Histogram: 1 0 0 0 0 0 1 0 1 1 +Neighs: 26425.8 ave 26807 max 26121 min +Histogram: 1 0 0 1 1 0 0 0 0 1 +FullNghs: 52851.5 ave 53580 max 52175 min +Histogram: 1 0 0 0 2 0 0 0 0 1 + +Total # of neighbors = 211406 +Ave neighs/atom = 88.9756 +Neighbor list builds = 0 +Dangerous builds = 0 + +unfix 1 +reset_timestep 0 +thermo 50 +fix 3 all npt temp 300 300 0.1 aniso 1.0 1.0 1.0 +run 500 +Per MPI rank memory allocation (min/avg/max) = 3.937 | 3.937 | 3.937 Mbytes +Step Temp Press PotEng KinEng TotEng Lx Ly Lz Volume + 0 741.02836 -39686.588 -14515.398 227.4904 -14287.907 27.569587 27.569656 32.513154 24712.729 + 50 1157.347 29332.549 -14679.321 355.29725 -14324.024 27.60903 27.609325 32.375509 24678.772 + 100 777.55858 101883.12 -14674.854 238.70492 -14436.149 27.778518 27.777373 32.017262 24704.976 + 150 945.49014 -18305.383 -14806.687 290.25871 -14516.428 27.998313 27.99535 31.670225 24823.838 + 200 427.46608 -4045.0095 -14674.887 131.22903 -14543.658 28.130283 28.127147 31.431578 24869.438 + 250 362.82166 -7283.1332 -14669.07 111.38365 -14557.687 28.225232 28.222707 31.238451 24884.314 + 300 626.2858 7228.0309 -14760.128 192.26526 -14567.862 28.302384 28.299949 31.070038 24885.734 + 350 859.84293 30084.735 -14845.064 263.96563 -14581.099 28.372349 28.369334 30.934424 24899.261 + 400 755.26136 54745.408 -14830.701 231.85983 -14598.842 28.450301 28.448361 30.836159 24957.691 + 450 802.52344 5690.2863 -14860.193 246.36895 -14613.824 28.542311 28.541672 30.773339 25069.354 + 500 631.84734 -31473.795 -14816.101 193.97261 -14622.128 28.605857 28.605891 30.737955 25152.746 +Loop time of 39.7881 on 4 procs for 500 steps with 2376 atoms + +Performance: 0.217 ns/day, 110.522 hours/ns, 12.567 timesteps/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 39.617 | 39.633 | 39.653 | 0.2 | 99.61 +Neigh | 0.043624 | 0.046792 | 0.051708 | 1.4 | 0.12 +Comm | 0.05215 | 0.072616 | 0.092142 | 5.6 | 0.18 +Output | 0.00042915 | 0.00045079 | 0.00051546 | 0.0 | 0.00 +Modify | 0.029836 | 0.030341 | 0.03094 | 0.2 | 0.08 +Other | | 0.004489 | | | 0.01 + +Nlocal: 594 ave 606 max 582 min +Histogram: 1 0 0 0 1 1 0 0 0 1 +Nghost: 2226 ave 2238 max 2214 min +Histogram: 1 0 0 0 1 1 0 0 0 1 +Neighs: 25652.8 ave 26129 max 25153 min +Histogram: 1 0 0 0 1 1 0 0 0 1 +FullNghs: 51305.5 ave 52398 max 50251 min +Histogram: 1 0 0 0 1 1 0 0 0 1 + +Total # of neighbors = 205222 +Ave neighs/atom = 86.3729 +Neighbor list builds = 16 +Dangerous builds = 0 + +Total wall time: 0:00:49 -- GitLab From 3f4aee1046ab784ef779007f43f3b28ef96d7d92 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 9 May 2017 15:57:35 -0400 Subject: [PATCH 099/593] implement overlooked changes from 4may2017 patch --- src/.gitignore | 12 ++++++------ src/Purge.list | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index 1327704e47..1335dc18db 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -281,14 +281,14 @@ /dump_custom_gz.h /dump_custom_mpiio.cpp /dump_custom_mpiio.h -/dump_custom_vtk.cpp -/dump_custom_vtk.h /dump_h5md.cpp /dump_h5md.h -/dump_nc.cpp -/dump_nc.h -/dump_nc_mpiio.cpp -/dump_nc_mpiio.h +/dump_netcdf.cpp +/dump_netcdf.h +/dump_netcdf_mpiio.cpp +/dump_netcdf_mpiio.h +/dump_vtk.cpp +/dump_vtk.h /dump_xtc.cpp /dump_xtc.h /dump_xyz_mpiio.cpp diff --git a/src/Purge.list b/src/Purge.list index 6326dbadf0..40366d71ae 100644 --- a/src/Purge.list +++ b/src/Purge.list @@ -17,6 +17,12 @@ style_neigh_bin.h style_neigh_pair.h style_neigh_stencil.h # deleted on 4 May 2017 +dump_custom_vtk.cpp +dump_custom_vtk.h +dump_nc.cpp +dump_nc.h +dump_nc_mpiio.cpp +dump_nc_mpiio.h pair_reax_c.cpp pair_reax_c.h fix_reax_c_bonds.cpp -- GitLab From 29ae8d4ca3b9c32e41c3ac81095ab9beb11d6ccc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 9 May 2017 17:15:07 -0400 Subject: [PATCH 100/593] correct broken links and references in documentation --- doc/src/Section_commands.txt | 6 +++--- doc/src/Section_packages.txt | 37 ++++++++++++++++++----------------- doc/src/Section_start.txt | 7 +++---- doc/src/accelerate_kokkos.txt | 10 +++++----- doc/src/commands.txt | 4 ++-- doc/src/lammps.book | 4 ++-- 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index c71acfe06f..771e830841 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -527,9 +527,9 @@ These are additional commands in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. -"dump custom/vtk"_dump_custom_vtk.html, -"dump nc"_dump_nc.html, -"dump nc/mpiio"_dump_nc.html, +"dump netcdf"_dump_netcdf.html, +"dump netcdf/mpiio"_dump_netcdf.html, +"dump vtk"_dump_vtk.html, "group2ndx"_group2ndx.html, "ndx2group"_group2ndx.html, "temper/grem"_temper_grem.html :tb(c=3,ea=c) diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index 2a0a8386e8..cc44c05906 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -123,7 +123,7 @@ Package, Description, Doc page, Example, Library "USER-MANIFOLD"_#USER-MANIFOLD, motion on 2d surfaces,"fix manifoldforce"_fix_manifoldforce.html, USER/manifold, - "USER-MGPT"_#USER-MGPT, fast MGPT multi-ion potentials, "pair_style mgpt"_pair_mgpt.html, USER/mgpt, - "USER-MISC"_#USER-MISC, single-file contributions, USER-MISC/README, USER/misc, - -"USER-MOLFILE"_#USER-MOLFILE, "VMD"_VMD molfile plug-ins,"dump molfile"_dump_molfile.html, -, ext +"USER-MOLFILE"_#USER-MOLFILE, "VMD"_vmd_home molfile plug-ins,"dump molfile"_dump_molfile.html, -, ext "USER-NETCDF"_#USER-NETCDF, dump output via NetCDF,"dump netcdf"_dump_netcdf.html, -, ext "USER-OMP"_#USER-OMP, OpenMP-enabled styles,"Section 5.3.4"_accelerate_omp.html, WWW bench, - "USER-PHONON"_#USER-PHONON, phonon dynamical matrix,"fix phonon"_fix_phonon.html, USER/phonon, - @@ -135,7 +135,7 @@ Package, Description, Doc page, Example, Library "USER-SMTBQ"_#USER-SMTBQ, second moment tight binding QEq potential,"pair_style smtbq"_pair_smtbq.html, USER/smtbq, - "USER-SPH"_#USER-SPH, smoothed particle hydrodynamics,"SPH User Guide"_PDF/SPH_LAMMPS_userguide.pdf, USER/sph, - "USER-TALLY"_#USER-TALLY, pairwise tally computes,"compute XXX/tally"_compute_tally.html, USER/tally, - -"USER-VTK"_#USER-VTK, dump output via VTK, "compute custom/vtk"_dump_custom_vtk.html, -, ext +"USER-VTK"_#USER-VTK, dump output via VTK, "compute vtk"_dump_vtk.html, -, ext :tb(ea=c,ca1=l) :line @@ -529,7 +529,7 @@ what hardware and software is required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf kk" or "-suffix kk" "command-line switches"_Section_start.html#start_7. Also see the "GPU"_#GPU, -"OPT"_#OPT, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER_OMP +"OPT"_#OPT, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPUs, KNLs, and GPUs. You must have a C++11 compatible compiler to use this package. @@ -856,15 +856,15 @@ src/MPIIO: filenames -> commands :line -MSCG package :link(MSCG),h4 +MSCG package :link(mscg),h4 [Contents:] A "fix mscg"_fix_mscg.html command which can parameterize a Mulit-Scale Coarse-Graining (MSCG) model using the open-source "MS-CG -library"_mscg. +library"_mscg_home. -:link(mscg,https://github.com/uchicago-voth/MSCG-release) +:link(mscg_home,https://github.com/uchicago-voth/MSCG-release) To use this package you must have the MS-CG library available on your system. @@ -1323,11 +1323,11 @@ VORONOI package :link(VORONOI),h4 [Contents:] A compute command which calculates the Voronoi tesselation of a -collection of atoms by wrapping the "Voro++ library"_voronoi. This +collection of atoms by wrapping the "Voro++ library"_voro_home. This can be used to calculate the local volume or each atoms or its near neighbors. -:link(voronoi,http://math.lbl.gov/voro++) +:link(voro_home,http://math.lbl.gov/voro++) To use this package you must have the Voro++ library available on your system. @@ -1488,7 +1488,6 @@ make machine :pre src/USER-AWPMD: filenames -> commands src/USER-AWPMD/README "pair awpmd/cut"_pair_awpmd.html -"fix nve/awpmd"_fix_nve_awpmd.html examples/USER/awpmd :ul :line @@ -1520,7 +1519,7 @@ src/USER-CGDNA: filenames -> commands "pair_style oxdna/*"_pair_oxdna.html "pair_style oxdna2/*"_pair_oxdna2.html "bond_style oxdna/*"_bond_oxdna.html -"bond_style oxdna2/*"_bond_oxdna2.html +"bond_style oxdna2/*"_bond_oxdna.html "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html :ul :line @@ -1748,8 +1747,8 @@ src/USER-EFF: filenames -> commands src/USER-EFF/README "atom_style electron"_atom_style.html "fix nve/eff"_fix_nve_eff.html -"fix nvt/eff"_fix_nvt_eff.html -"fix npt/eff"_fix_npt_eff.html +"fix nvt/eff"_fix_nh_eff.html +"fix npt/eff"_fix_nh_eff.html "fix langevin/eff"_fix_langevin_eff.html "compute temp/eff"_compute_temp_eff.html "pair eff/cut"_pair_eff.html @@ -2045,8 +2044,8 @@ src/USER-MANIFOLD: filenames -> commands src/USER-MANIFOLD/README "doc/manifolds"_manifolds.html "fix manifoldforce"_fix_manifoldforce.html -"fix nve/manifold/rattle"_fix_nve_manifold/rattle.html -"fix nvt/manifold/rattle"_fix_nvt_manifold/rattle.html +"fix nve/manifold/rattle"_fix_nve_manifold_rattle.html +"fix nvt/manifold/rattle"_fix_nvt_manifold_rattle.html examples/USER/manifold http://lammps.sandia.gov/movies.html#manifold :ul @@ -2057,11 +2056,13 @@ USER-MOLFILE package :link(USER-MOLFILE),h4 [Contents:] A "dump molfile"_dump_molfile.html command which uses molfile plugins -that are bundled with the "VMD"_http://www.ks.uiuc.edu/Research/vmd +that are bundled with the "VMD"_vmd_home molecular visualization and analysis program, to enable LAMMPS to dump snapshots in formats compatible with various molecular simulation tools. +:link(vmd_home,http://www.ks.uiuc.edu/Research/vmd) + To use this package you must have the desired VMD plugins available on your system. @@ -2118,7 +2119,7 @@ Note that NetCDF files can be directly visualized with the following tools: "Ovito"_ovito (Ovito supports the AMBER convention and the extensions mentioned above) -"VMD"_vmd +"VMD"_vmd_home "AtomEye"_atomeye (the libAtoms version of AtomEye contains a NetCDF reader not present in the standard distribution) :ul :link(ovito,http://www.ovito.org) @@ -2563,7 +2564,7 @@ USER-VTK package :link(USER-VTK),h4 [Contents:] -A "dump custom/vtk"_dump_custom_vtk.html command which outputs +A "dump vtk"_dump_vtk.html command which outputs snapshot info in the "VTK format"_vtk, enabling visualization by "Paraview"_paraview or other visuzlization packages. @@ -2598,4 +2599,4 @@ make machine :pre src/USER-VTK: filenames -> commands src/USER-VTK/README lib/vtk/README -"dump custom/vtk"_dump_custom_vtk.html :ul +"dump vtk"_dump_vtk.html :ul diff --git a/doc/src/Section_start.txt b/doc/src/Section_start.txt index 0a7209765e..dcd320655f 100644 --- a/doc/src/Section_start.txt +++ b/doc/src/Section_start.txt @@ -655,8 +655,7 @@ This section has the following sub-sections: 2.3.1 "Package basics"_#start_3_1 2.3.2 "Including/excluding packages"_#start_3_2 -2.3.3 "Packages that require extra libraries"_#start_3_3 -2.3.4 "Packages that require Makefile.machine settings"_#start_3_4 :all(b) +2.3.3 "Packages that require extra libraries"_#start_3_3 :all(b) :line @@ -828,13 +827,13 @@ Packages in the tables "Section 4"_Section_packages.html with an "ext" in the last column link to exernal libraries whose source code is not included with LAMMPS. You must first download and install the library before building LAMMPS with that package installed. E.g. the voronoi -package links to the freely available "Voro++ library"_voronoi. You +package links to the freely available "Voro++ library"_voro_home2. You can often do the download/build in one step by typing "make lib-name args=..." from the src dir, with appropriate arguments. You can leave off the args to see a help message. See "Section 4"_Section_packages.html for details for each package. -:link(voronoi,http://math.lbl.gov/voro++) +:link(voro_home2,http://math.lbl.gov/voro++) [Possible errors:] diff --git a/doc/src/accelerate_kokkos.txt b/doc/src/accelerate_kokkos.txt index 3bfd4bf379..602c3191f6 100644 --- a/doc/src/accelerate_kokkos.txt +++ b/doc/src/accelerate_kokkos.txt @@ -415,15 +415,15 @@ For binding threads with the KOKKOS OMP option, use thread affinity environment variables to force binding. With OpenMP 3.1 (gcc 4.7 or later, intel 12 or later) setting the environment variable OMP_PROC_BIND=true should be sufficient. For binding threads with the -KOKKOS pthreads option, compile LAMMPS the KOKKOS HWLOC=yes option, as -discussed in "Section 2.3.4"_Sections_start.html#start_3_4 of the -manual. +KOKKOS pthreads option, compile LAMMPS the KOKKOS HWLOC=yes option +(see "this section"_Section_packages.html#KOKKOS of the manual for +details). [Running on GPUs:] Insure the -arch setting in the machine makefile you are using, -e.g. src/MAKE/Makefile.cuda, is correct for your GPU hardware/software -(see "this section"_Section_start.html#start_3_4 of the manual for +e.g. src/MAKE/Makefile.cuda, is correct for your GPU hardware/software. +(see "this section"_Section_packages.html#KOKKOS of the manual for details). The -np setting of the mpirun command should set the number of MPI diff --git a/doc/src/commands.txt b/doc/src/commands.txt index 2fdb69ea4d..7889ea5e7a 100644 --- a/doc/src/commands.txt +++ b/doc/src/commands.txt @@ -32,12 +32,12 @@ Commands :h1 dimension displace_atoms dump - dump_custom_vtk dump_h5md dump_image dump_modify dump_molfile - dump_nc + dump_netcdf + dump_vtk echo fix fix_modify diff --git a/doc/src/lammps.book b/doc/src/lammps.book index b2b42aa7e6..6b3ca8aa07 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -55,12 +55,12 @@ dihedral_style.html dimension.html displace_atoms.html dump.html -dump_custom_vtk.html dump_h5md.html dump_image.html dump_modify.html dump_molfile.html -dump_nc.html +dump_netcdf.html +dump_vtk.html echo.html fix.html fix_modify.html -- GitLab From 9f7ce39f9fcb6bd692ddd9d765458baec696d5ad Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 9 May 2017 18:14:34 -0400 Subject: [PATCH 101/593] correct some more omitted updates --- src/.gitignore | 8 ++++---- src/Purge.list | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index 1335dc18db..620c6965d0 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -461,8 +461,8 @@ /fix_qmmm.h /fix_reax_bonds.cpp /fix_reax_bonds.h -/fix_reax_c.cpp -/fix_reax_c.h +/fix_reaxc.cpp +/fix_reaxc.h /fix_reaxc_bonds.cpp /fix_reaxc_bonds.h /fix_reaxc_species.cpp @@ -784,8 +784,8 @@ /pair_reax.cpp /pair_reax.h /pair_reax_fortran.h -/pair_reax_c.cpp -/pair_reax_c.h +/pair_reaxc.cpp +/pair_reaxc.h /pair_rebo.cpp /pair_rebo.h /pair_resquared.cpp diff --git a/src/Purge.list b/src/Purge.list index 40366d71ae..3bdfed3ed0 100644 --- a/src/Purge.list +++ b/src/Purge.list @@ -25,6 +25,8 @@ dump_nc_mpiio.cpp dump_nc_mpiio.h pair_reax_c.cpp pair_reax_c.h +fix_reax_c.cpp +fix_reax_c.h fix_reax_c_bonds.cpp fix_reax_c_bonds.h fix_reax_c_species.cpp -- GitLab From abeb1e096ab61620849b1e5c7e6a73239063d5f3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 10 May 2017 11:19:18 -0400 Subject: [PATCH 102/593] add support for gzip compressed output to fix reax/bonds, reax/c/bonds and reax/c/species --- doc/src/fix_reax_bonds.txt | 7 +++++++ doc/src/fix_reaxc_species.txt | 7 +++++++ src/REAX/fix_reax_bonds.cpp | 16 +++++++++++++++- src/USER-REAXC/fix_reaxc_bonds.cpp | 16 +++++++++++++++- src/USER-REAXC/fix_reaxc_species.cpp | 16 +++++++++++++++- 5 files changed, 59 insertions(+), 3 deletions(-) diff --git a/doc/src/fix_reax_bonds.txt b/doc/src/fix_reax_bonds.txt index d3f1087094..a874fa3d16 100644 --- a/doc/src/fix_reax_bonds.txt +++ b/doc/src/fix_reax_bonds.txt @@ -36,6 +36,10 @@ please see the "fix reaxc/c/species"_fix_reaxc_species.html command. The format of the output file should be self-explanatory. +If the filename ends with ".gz", the output file is written in gzipped +format. A gzipped dump file will be about 3x smaller than the text +version, but will also take longer to write. + :line [Restart, fix_modify, output, run start/stop, minimize info:] @@ -85,6 +89,9 @@ USER-REAXC package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. +To write gzipped bond files, you must compile LAMMPS with the +-DLAMMPS_GZIP option. + [Related commands:] "pair_style reax"_pair_reax.html, "pair_style diff --git a/doc/src/fix_reaxc_species.txt b/doc/src/fix_reaxc_species.txt index d43a338a66..9a588356e0 100644 --- a/doc/src/fix_reaxc_species.txt +++ b/doc/src/fix_reaxc_species.txt @@ -52,6 +52,10 @@ number of molecules of each species. In this context, "species" means a unique molecule. The chemical formula of each species is given in the first line. +If the filename ends with ".gz", the output file is written in gzipped +format. A gzipped dump file will be about 3x smaller than the text version, +but will also take longer to write. + Optional keyword {cutoff} can be assigned to change the minimum bond-order values used in identifying chemical bonds between pairs of atoms. Bond-order cutoffs should be carefully chosen, as bond-order @@ -164,6 +168,9 @@ USER-REAXC package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. +To write gzipped species files, you must compile LAMMPS with the +-DLAMMPS_GZIP option. + It should be possible to extend it to other reactive pair_styles (such as "rebo"_pair_airebo.html, "airebo"_pair_airebo.html, "comb"_pair_comb.html, and "bop"_pair_bop.html), but this has not yet been done. diff --git a/src/REAX/fix_reax_bonds.cpp b/src/REAX/fix_reax_bonds.cpp index 2574d991ae..00cfb0937b 100644 --- a/src/REAX/fix_reax_bonds.cpp +++ b/src/REAX/fix_reax_bonds.cpp @@ -49,7 +49,21 @@ FixReaxBonds::FixReaxBonds(LAMMPS *lmp, int narg, char **arg) : if (nevery < 1) error->all(FLERR,"Illegal fix reax/bonds command"); if (me == 0) { - fp = fopen(arg[4],"w"); + char *suffix = strrchr(arg[4],'.'); + if (suffix && strcmp(suffix,".gz") == 0) { +#ifdef LAMMPS_GZIP + char gzip[128]; + sprintf(gzip,"gzip -6 > %s",arg[4]); +#ifdef _WIN32 + fp = _popen(gzip,"wb"); +#else + fp = popen(gzip,"w"); +#endif +#else + error->one(FLERR,"Cannot open gzipped file"); +#endif + } else fp = fopen(arg[4],"w"); + if (fp == NULL) { char str[128]; sprintf(str,"Cannot open fix reax/bonds file %s",arg[4]); diff --git a/src/USER-REAXC/fix_reaxc_bonds.cpp b/src/USER-REAXC/fix_reaxc_bonds.cpp index cf9e4789c1..fe830b508e 100644 --- a/src/USER-REAXC/fix_reaxc_bonds.cpp +++ b/src/USER-REAXC/fix_reaxc_bonds.cpp @@ -58,7 +58,21 @@ FixReaxCBonds::FixReaxCBonds(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Illegal fix reax/c/bonds command"); if (me == 0) { - fp = fopen(arg[4],"w"); + char *suffix = strrchr(arg[4],'.'); + if (suffix && strcmp(suffix,".gz") == 0) { +#ifdef LAMMPS_GZIP + char gzip[128]; + sprintf(gzip,"gzip -6 > %s",arg[4]); +#ifdef _WIN32 + fp = _popen(gzip,"wb"); +#else + fp = popen(gzip,"w"); +#endif +#else + error->one(FLERR,"Cannot open gzipped file"); +#endif + } else fp = fopen(arg[4],"w"); + if (fp == NULL) { char str[128]; sprintf(str,"Cannot open fix reax/c/bonds file %s",arg[4]); diff --git a/src/USER-REAXC/fix_reaxc_species.cpp b/src/USER-REAXC/fix_reaxc_species.cpp index d291903fa8..672b1e6a56 100644 --- a/src/USER-REAXC/fix_reaxc_species.cpp +++ b/src/USER-REAXC/fix_reaxc_species.cpp @@ -110,7 +110,21 @@ FixReaxCSpecies::FixReaxCSpecies(LAMMPS *lmp, int narg, char **arg) : strcpy(tmparg[2],arg[5]); if (me == 0) { - fp = fopen(arg[6],"w"); + char *suffix = strrchr(arg[6],'.'); + if (suffix && strcmp(suffix,".gz") == 0) { +#ifdef LAMMPS_GZIP + char gzip[128]; + sprintf(gzip,"gzip -6 > %s",arg[6]); +#ifdef _WIN32 + fp = _popen(gzip,"wb"); +#else + fp = popen(gzip,"w"); +#endif +#else + error->one(FLERR,"Cannot open gzipped file"); +#endif + } else fp = fopen(arg[6],"w"); + if (fp == NULL) { char str[128]; sprintf(str,"Cannot open fix reax/c/species file %s",arg[6]); -- GitLab From cac1bf83ef42d9f908354f02c5153714bb89ae6c Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 10 May 2017 19:41:48 -0400 Subject: [PATCH 103/593] Work around VTK 7 API change --- src/USER-VTK/dump_vtk.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/USER-VTK/dump_vtk.cpp b/src/USER-VTK/dump_vtk.cpp index 0aa749e73b..4a0c1618a6 100644 --- a/src/USER-VTK/dump_vtk.cpp +++ b/src/USER-VTK/dump_vtk.cpp @@ -94,6 +94,12 @@ enum{VTK,VTP,VTU,PVTP,PVTU}; // file formats #define ONEFIELD 32 #define DELTA 1048576 +#if VTK_MAJOR_VERSION == 7 +#define InsertNextTupleValue InsertNextTypedTuple +#elif VTK_MAJOR_VERSION > 7 +#error This code has only been tested with VTK 5, 6, and 7 +#endif + /* ---------------------------------------------------------------------- */ DumpVTK::DumpVTK(LAMMPS *lmp, int narg, char **arg) : -- GitLab From c4ac5773cb0ae0a46742cab6f9730472158ede26 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 10 May 2017 19:44:00 -0400 Subject: [PATCH 104/593] Fix segmentation fault in dump vtk --- src/USER-VTK/dump_vtk.cpp | 7 +++++++ src/dump_custom.cpp | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/USER-VTK/dump_vtk.cpp b/src/USER-VTK/dump_vtk.cpp index 4a0c1618a6..78be5668cf 100644 --- a/src/USER-VTK/dump_vtk.cpp +++ b/src/USER-VTK/dump_vtk.cpp @@ -167,6 +167,13 @@ DumpVTK::DumpVTK(LAMMPS *lmp, int narg, char **arg) : header_choice = NULL; write_choice = NULL; boxcorners = NULL; + + // unsupported feature by dump vtk + delete [] vformat; + vformat = NULL; + + delete [] format_column_user; + format_column_user = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 44842619fe..9df0264e55 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -244,11 +244,15 @@ DumpCustom::~DumpCustom() for (int i = 1; i <= ntypes; i++) delete [] typenames[i]; delete [] typenames; - for (int i = 0; i < size_one; i++) delete [] vformat[i]; - delete [] vformat; + if(vformat) { + for (int i = 0; i < size_one; i++) delete [] vformat[i]; + delete [] vformat; + } - for (int i = 0; i < size_one; i++) delete [] format_column_user[i]; - delete [] format_column_user; + if(format_column_user) { + for (int i = 0; i < size_one; i++) delete [] format_column_user[i]; + delete [] format_column_user; + } delete [] columns; } -- GitLab From 4ecf876a645390313f88632340d23efa217e5f32 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 10 May 2017 19:48:54 -0400 Subject: [PATCH 105/593] Added two examples of using the VTK dump style --- examples/USER/vtk/.gitignore | 1 + examples/USER/vtk/in.vtk | 35 +++++++++++++++++++++++++++++++++++ examples/USER/vtk/in.vtp | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 examples/USER/vtk/.gitignore create mode 100644 examples/USER/vtk/in.vtk create mode 100644 examples/USER/vtk/in.vtp diff --git a/examples/USER/vtk/.gitignore b/examples/USER/vtk/.gitignore new file mode 100644 index 0000000000..995bba6cb2 --- /dev/null +++ b/examples/USER/vtk/.gitignore @@ -0,0 +1 @@ +dump diff --git a/examples/USER/vtk/in.vtk b/examples/USER/vtk/in.vtk new file mode 100644 index 0000000000..6c294d2332 --- /dev/null +++ b/examples/USER/vtk/in.vtk @@ -0,0 +1,35 @@ +# 3d Lennard-Jones melt + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 10 0 10 0 10 +create_box 1 box +create_atoms 1 box +mass 1 1.0 + +velocity all create 3.0 87287 + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 2.5 + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +shell mkdir dump + +dump dmpvtk all vtk 50 dump/dump*.vtk id type vx vy vz fx fy fz + +#dump 2 all image 25 image.*.jpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 3 + +#dump 3 all movie 25 movie.mpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 3 + +thermo 50 +run 250 diff --git a/examples/USER/vtk/in.vtp b/examples/USER/vtk/in.vtp new file mode 100644 index 0000000000..ff5ab8d9ab --- /dev/null +++ b/examples/USER/vtk/in.vtp @@ -0,0 +1,35 @@ +# 3d Lennard-Jones melt + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 10 0 10 0 10 +create_box 1 box +create_atoms 1 box +mass 1 1.0 + +velocity all create 3.0 87287 + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 2.5 + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +shell mkdir dump + +dump dmpvtk all vtk 50 dump/dump*.vtp id type vx vy vz fx fy fz + +#dump 2 all image 25 image.*.jpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 3 + +#dump 3 all movie 25 movie.mpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 3 + +thermo 50 +run 250 -- GitLab From 328ef873d83862920224ce6728cf484246078223 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 10 May 2017 22:41:41 -0400 Subject: [PATCH 106/593] fix mixed memory alloc bug in dump custom. this closes #475 --- src/dump_custom.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 44842619fe..af5c046c46 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -82,8 +82,8 @@ DumpCustom::DumpCustom(LAMMPS *lmp, int narg, char **arg) : pack_choice = new FnPtrPack[nfield]; vtype = new int[nfield]; - field2index = new int[nfield]; - argindex = new int[nfield]; + memory->create(field2index,nfield,"dump:field2index"); + memory->create(argindex,nfield,"dump:argindex"); buffer_allow = 1; buffer_flag = 1; @@ -200,8 +200,8 @@ DumpCustom::~DumpCustom() delete [] pack_choice; delete [] vtype; - delete [] field2index; - delete [] argindex; + memory->destroy(field2index); + memory->destroy(argindex); delete [] idregion; memory->destroy(thresh_array); -- GitLab From 7c3b8e014c7b6838fad830e7d1e7690181624372 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 11 May 2017 10:15:28 -0600 Subject: [PATCH 107/593] rename some USER/misc dirs --- examples/USER/misc/{filter-corotate => filter_corotate}/data.bpti | 0 .../USER/misc/{filter-corotate => filter_corotate}/data.peptide | 0 examples/USER/misc/{filter-corotate => filter_corotate}/in.bpti | 0 .../USER/misc/{filter-corotate => filter_corotate}/in.peptide | 0 .../{filter-corotate => filter_corotate}/log.10Mar2017.bpti.g++.1 | 0 .../{filter-corotate => filter_corotate}/log.10Mar2017.bpti.g++.4 | 0 .../log.10Mar2017.peptide.g++.1 | 0 .../log.10Mar2017.peptide.g++.4 | 0 examples/USER/misc/{gauss-diel => gauss_diel}/data.gauss-diel | 0 examples/USER/misc/{gauss-diel => gauss_diel}/in.gauss-diel | 0 examples/USER/misc/{gauss-diel => gauss_diel}/in.gauss-diel-cg | 0 examples/USER/misc/{gauss-diel => gauss_diel}/in.gauss-diel-split | 0 examples/USER/misc/{gauss-diel => gauss_diel}/log.gauss-diel | 0 examples/USER/misc/{gauss-diel => gauss_diel}/log.gauss-diel-cg | 0 .../USER/misc/{gauss-diel => gauss_diel}/log.gauss-diel-split | 0 examples/USER/misc/{i-pi => ipi}/C.opt.tersoff | 0 examples/USER/misc/{i-pi => ipi}/README | 0 examples/USER/misc/{i-pi => ipi}/data.graphene | 0 examples/USER/misc/{i-pi => ipi}/i-pi_input.xml | 0 examples/USER/misc/{i-pi => ipi}/i-pi_positions.xyz | 0 examples/USER/misc/{i-pi => ipi}/in.graphene | 0 .../data.bilayer-graphene | 0 .../data.graphene-adsorbant | 0 .../{kolmogorov-crespi => kolmogorov_crespi}/in.atom-diffusion | 0 .../{kolmogorov-crespi => kolmogorov_crespi}/in.bilayer-graphene | 0 .../{kolmogorov-crespi => kolmogorov_crespi}/log.atom-diffusion | 0 .../{kolmogorov-crespi => kolmogorov_crespi}/log.bilayer-graphene | 0 27 files changed, 0 insertions(+), 0 deletions(-) rename examples/USER/misc/{filter-corotate => filter_corotate}/data.bpti (100%) rename examples/USER/misc/{filter-corotate => filter_corotate}/data.peptide (100%) rename examples/USER/misc/{filter-corotate => filter_corotate}/in.bpti (100%) rename examples/USER/misc/{filter-corotate => filter_corotate}/in.peptide (100%) rename examples/USER/misc/{filter-corotate => filter_corotate}/log.10Mar2017.bpti.g++.1 (100%) rename examples/USER/misc/{filter-corotate => filter_corotate}/log.10Mar2017.bpti.g++.4 (100%) rename examples/USER/misc/{filter-corotate => filter_corotate}/log.10Mar2017.peptide.g++.1 (100%) rename examples/USER/misc/{filter-corotate => filter_corotate}/log.10Mar2017.peptide.g++.4 (100%) rename examples/USER/misc/{gauss-diel => gauss_diel}/data.gauss-diel (100%) rename examples/USER/misc/{gauss-diel => gauss_diel}/in.gauss-diel (100%) rename examples/USER/misc/{gauss-diel => gauss_diel}/in.gauss-diel-cg (100%) rename examples/USER/misc/{gauss-diel => gauss_diel}/in.gauss-diel-split (100%) rename examples/USER/misc/{gauss-diel => gauss_diel}/log.gauss-diel (100%) rename examples/USER/misc/{gauss-diel => gauss_diel}/log.gauss-diel-cg (100%) rename examples/USER/misc/{gauss-diel => gauss_diel}/log.gauss-diel-split (100%) rename examples/USER/misc/{i-pi => ipi}/C.opt.tersoff (100%) rename examples/USER/misc/{i-pi => ipi}/README (100%) rename examples/USER/misc/{i-pi => ipi}/data.graphene (100%) rename examples/USER/misc/{i-pi => ipi}/i-pi_input.xml (100%) rename examples/USER/misc/{i-pi => ipi}/i-pi_positions.xyz (100%) rename examples/USER/misc/{i-pi => ipi}/in.graphene (100%) rename examples/USER/misc/{kolmogorov-crespi => kolmogorov_crespi}/data.bilayer-graphene (100%) rename examples/USER/misc/{kolmogorov-crespi => kolmogorov_crespi}/data.graphene-adsorbant (100%) rename examples/USER/misc/{kolmogorov-crespi => kolmogorov_crespi}/in.atom-diffusion (100%) rename examples/USER/misc/{kolmogorov-crespi => kolmogorov_crespi}/in.bilayer-graphene (100%) rename examples/USER/misc/{kolmogorov-crespi => kolmogorov_crespi}/log.atom-diffusion (100%) rename examples/USER/misc/{kolmogorov-crespi => kolmogorov_crespi}/log.bilayer-graphene (100%) diff --git a/examples/USER/misc/filter-corotate/data.bpti b/examples/USER/misc/filter_corotate/data.bpti similarity index 100% rename from examples/USER/misc/filter-corotate/data.bpti rename to examples/USER/misc/filter_corotate/data.bpti diff --git a/examples/USER/misc/filter-corotate/data.peptide b/examples/USER/misc/filter_corotate/data.peptide similarity index 100% rename from examples/USER/misc/filter-corotate/data.peptide rename to examples/USER/misc/filter_corotate/data.peptide diff --git a/examples/USER/misc/filter-corotate/in.bpti b/examples/USER/misc/filter_corotate/in.bpti similarity index 100% rename from examples/USER/misc/filter-corotate/in.bpti rename to examples/USER/misc/filter_corotate/in.bpti diff --git a/examples/USER/misc/filter-corotate/in.peptide b/examples/USER/misc/filter_corotate/in.peptide similarity index 100% rename from examples/USER/misc/filter-corotate/in.peptide rename to examples/USER/misc/filter_corotate/in.peptide diff --git a/examples/USER/misc/filter-corotate/log.10Mar2017.bpti.g++.1 b/examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.1 similarity index 100% rename from examples/USER/misc/filter-corotate/log.10Mar2017.bpti.g++.1 rename to examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.1 diff --git a/examples/USER/misc/filter-corotate/log.10Mar2017.bpti.g++.4 b/examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.4 similarity index 100% rename from examples/USER/misc/filter-corotate/log.10Mar2017.bpti.g++.4 rename to examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.4 diff --git a/examples/USER/misc/filter-corotate/log.10Mar2017.peptide.g++.1 b/examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.1 similarity index 100% rename from examples/USER/misc/filter-corotate/log.10Mar2017.peptide.g++.1 rename to examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.1 diff --git a/examples/USER/misc/filter-corotate/log.10Mar2017.peptide.g++.4 b/examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.4 similarity index 100% rename from examples/USER/misc/filter-corotate/log.10Mar2017.peptide.g++.4 rename to examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.4 diff --git a/examples/USER/misc/gauss-diel/data.gauss-diel b/examples/USER/misc/gauss_diel/data.gauss-diel similarity index 100% rename from examples/USER/misc/gauss-diel/data.gauss-diel rename to examples/USER/misc/gauss_diel/data.gauss-diel diff --git a/examples/USER/misc/gauss-diel/in.gauss-diel b/examples/USER/misc/gauss_diel/in.gauss-diel similarity index 100% rename from examples/USER/misc/gauss-diel/in.gauss-diel rename to examples/USER/misc/gauss_diel/in.gauss-diel diff --git a/examples/USER/misc/gauss-diel/in.gauss-diel-cg b/examples/USER/misc/gauss_diel/in.gauss-diel-cg similarity index 100% rename from examples/USER/misc/gauss-diel/in.gauss-diel-cg rename to examples/USER/misc/gauss_diel/in.gauss-diel-cg diff --git a/examples/USER/misc/gauss-diel/in.gauss-diel-split b/examples/USER/misc/gauss_diel/in.gauss-diel-split similarity index 100% rename from examples/USER/misc/gauss-diel/in.gauss-diel-split rename to examples/USER/misc/gauss_diel/in.gauss-diel-split diff --git a/examples/USER/misc/gauss-diel/log.gauss-diel b/examples/USER/misc/gauss_diel/log.gauss-diel similarity index 100% rename from examples/USER/misc/gauss-diel/log.gauss-diel rename to examples/USER/misc/gauss_diel/log.gauss-diel diff --git a/examples/USER/misc/gauss-diel/log.gauss-diel-cg b/examples/USER/misc/gauss_diel/log.gauss-diel-cg similarity index 100% rename from examples/USER/misc/gauss-diel/log.gauss-diel-cg rename to examples/USER/misc/gauss_diel/log.gauss-diel-cg diff --git a/examples/USER/misc/gauss-diel/log.gauss-diel-split b/examples/USER/misc/gauss_diel/log.gauss-diel-split similarity index 100% rename from examples/USER/misc/gauss-diel/log.gauss-diel-split rename to examples/USER/misc/gauss_diel/log.gauss-diel-split diff --git a/examples/USER/misc/i-pi/C.opt.tersoff b/examples/USER/misc/ipi/C.opt.tersoff similarity index 100% rename from examples/USER/misc/i-pi/C.opt.tersoff rename to examples/USER/misc/ipi/C.opt.tersoff diff --git a/examples/USER/misc/i-pi/README b/examples/USER/misc/ipi/README similarity index 100% rename from examples/USER/misc/i-pi/README rename to examples/USER/misc/ipi/README diff --git a/examples/USER/misc/i-pi/data.graphene b/examples/USER/misc/ipi/data.graphene similarity index 100% rename from examples/USER/misc/i-pi/data.graphene rename to examples/USER/misc/ipi/data.graphene diff --git a/examples/USER/misc/i-pi/i-pi_input.xml b/examples/USER/misc/ipi/i-pi_input.xml similarity index 100% rename from examples/USER/misc/i-pi/i-pi_input.xml rename to examples/USER/misc/ipi/i-pi_input.xml diff --git a/examples/USER/misc/i-pi/i-pi_positions.xyz b/examples/USER/misc/ipi/i-pi_positions.xyz similarity index 100% rename from examples/USER/misc/i-pi/i-pi_positions.xyz rename to examples/USER/misc/ipi/i-pi_positions.xyz diff --git a/examples/USER/misc/i-pi/in.graphene b/examples/USER/misc/ipi/in.graphene similarity index 100% rename from examples/USER/misc/i-pi/in.graphene rename to examples/USER/misc/ipi/in.graphene diff --git a/examples/USER/misc/kolmogorov-crespi/data.bilayer-graphene b/examples/USER/misc/kolmogorov_crespi/data.bilayer-graphene similarity index 100% rename from examples/USER/misc/kolmogorov-crespi/data.bilayer-graphene rename to examples/USER/misc/kolmogorov_crespi/data.bilayer-graphene diff --git a/examples/USER/misc/kolmogorov-crespi/data.graphene-adsorbant b/examples/USER/misc/kolmogorov_crespi/data.graphene-adsorbant similarity index 100% rename from examples/USER/misc/kolmogorov-crespi/data.graphene-adsorbant rename to examples/USER/misc/kolmogorov_crespi/data.graphene-adsorbant diff --git a/examples/USER/misc/kolmogorov-crespi/in.atom-diffusion b/examples/USER/misc/kolmogorov_crespi/in.atom-diffusion similarity index 100% rename from examples/USER/misc/kolmogorov-crespi/in.atom-diffusion rename to examples/USER/misc/kolmogorov_crespi/in.atom-diffusion diff --git a/examples/USER/misc/kolmogorov-crespi/in.bilayer-graphene b/examples/USER/misc/kolmogorov_crespi/in.bilayer-graphene similarity index 100% rename from examples/USER/misc/kolmogorov-crespi/in.bilayer-graphene rename to examples/USER/misc/kolmogorov_crespi/in.bilayer-graphene diff --git a/examples/USER/misc/kolmogorov-crespi/log.atom-diffusion b/examples/USER/misc/kolmogorov_crespi/log.atom-diffusion similarity index 100% rename from examples/USER/misc/kolmogorov-crespi/log.atom-diffusion rename to examples/USER/misc/kolmogorov_crespi/log.atom-diffusion diff --git a/examples/USER/misc/kolmogorov-crespi/log.bilayer-graphene b/examples/USER/misc/kolmogorov_crespi/log.bilayer-graphene similarity index 100% rename from examples/USER/misc/kolmogorov-crespi/log.bilayer-graphene rename to examples/USER/misc/kolmogorov_crespi/log.bilayer-graphene -- GitLab From 27a6371f9b52ecc296a3dad467455a9796204b9d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 May 2017 19:18:09 -0400 Subject: [PATCH 108/593] implement a `python source` command as suggested in issue #454 --- doc/src/python.txt | 22 ++++++++++++++++++---- src/PYTHON/python_impl.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/doc/src/python.txt b/doc/src/python.txt index e8a76c0e3e..748d01c2ae 100644 --- a/doc/src/python.txt +++ b/doc/src/python.txt @@ -14,7 +14,7 @@ python func keyword args ... :pre func = name of Python function :ulb,l one or more keyword/args pairs must be appended :l -keyword = {invoke} or {input} or {return} or {format} or {length} or {file} or {here} or {exists} +keyword = {invoke} or {input} or {return} or {format} or {length} or {file} or {here} or {exists} or {source} {invoke} arg = none = invoke the previously defined Python function {input} args = N i1 i2 ... iN N = # of inputs to function @@ -36,7 +36,12 @@ keyword = {invoke} or {input} or {return} or {format} or {length} or {file} or { {here} arg = inline inline = one or more lines of Python code which defines func must be a single argument, typically enclosed between triple quotes - {exists} arg = none = Python code has been loaded by previous python command :pre + {exists} arg = none = Python code has been loaded by previous python command + {source} arg = {filename} or {inline} + filename = file of Python code which will be executed immediately + inline = one or more lines of Python code which will be executed immediately + must be a single argument, typically enclosed between triple quotes +:pre :ule [Examples:] @@ -67,7 +72,8 @@ def loop(lmpptr,N,cut0): [Description:] -Define a Python function or execute a previously defined function. +Define a Python function or execute a previously defined function or +execute some arbitrary python code. Arguments, including LAMMPS variables, can be passed to the function from the LAMMPS input script and a value returned by the Python function to a LAMMPS variable. The Python code for the function can @@ -102,7 +108,8 @@ command. The {func} setting specifies the name of the Python function. The code for the function is defined using the {file} or {here} keywords -as explained below. +as explained below. In case of the {source} keyword, the name of +the function is ignored. If the {invoke} keyword is used, no other keywords can be used, and a previous python command must have defined the Python function @@ -111,6 +118,13 @@ previously defined arguments and return value processed as explained below. You can invoke the function as many times as you wish in your input script. +If the {source} keyword is used, no other keywords can be used. +The argument can be a filename or a string with python commands, +either on a single line enclosed in quotes, or as multiple lines +enclosed in triple quotes. These python commands will be passed +to the python interpreter and executed immediately without registering +a python function for future execution. + The {input} keyword defines how many arguments {N} the Python function expects. If it takes no arguments, then the {input} keyword should not be used. Each argument can be specified directly as a value, diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index 8c59ef1915..c492c6ab39 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -119,6 +119,32 @@ void PythonImpl::command(int narg, char **arg) return; } + // if source is only keyword, execute the python code + + if (narg == 3 && strcmp(arg[1],"source") == 0) { + + PyGILState_STATE gstate = PyGILState_Ensure(); + + // if argument string is file, open it + // otherwise process string as python code + + int err = 0; + FILE *fp = fopen(arg[2],"r"); + + if (fp == NULL) + err = PyRun_SimpleString(arg[2]); + else + err = PyRun_SimpleFile(fp,arg[2]); + + if (err) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not process Python source command"); + } + if (fp) fclose(fp); + PyGILState_Release(gstate); + return; + } + // parse optional args, invoke is not allowed in this mode ninput = noutput = 0; -- GitLab From d84f8898b7b0aa9728d992e1f9eb8b4265280452 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 May 2017 22:39:08 -0400 Subject: [PATCH 109/593] implement functions to execute arbitrary python code from strings or files and recast the python source keyword through using them. --- src/PYTHON/python_impl.cpp | 45 ++++++++++++++++++++++++++------------ src/PYTHON/python_impl.h | 2 ++ src/python.cpp | 16 ++++++++++++++ src/python.h | 4 ++++ 4 files changed, 53 insertions(+), 14 deletions(-) diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index c492c6ab39..1b9eef9ea6 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -122,26 +122,17 @@ void PythonImpl::command(int narg, char **arg) // if source is only keyword, execute the python code if (narg == 3 && strcmp(arg[1],"source") == 0) { + int err; - PyGILState_STATE gstate = PyGILState_Ensure(); - - // if argument string is file, open it - // otherwise process string as python code - - int err = 0; FILE *fp = fopen(arg[2],"r"); - if (fp == NULL) - err = PyRun_SimpleString(arg[2]); + err = execute_string(arg[2]); else - err = PyRun_SimpleFile(fp,arg[2]); + err = execute_file(arg[2]); - if (err) { - PyGILState_Release(gstate); - error->all(FLERR,"Could not process Python source command"); - } if (fp) fclose(fp); - PyGILState_Release(gstate); + if (err) error->all(FLERR,"Could not process Python source command"); + return; } @@ -503,6 +494,32 @@ int PythonImpl::create_entry(char *name) return ifunc; } +/* ---------------------------------------------------------------------- */ + +int PythonImpl::execute_string(char *cmd) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + int err = PyRun_SimpleString(cmd); + PyGILState_Release(gstate); + + return err; +} + +/* ---------------------------------------------------------------------- */ + +int PythonImpl::execute_file(char *fname) +{ + FILE *fp = fopen(fname,"r"); + if (fp == NULL) return -1; + + PyGILState_STATE gstate = PyGILState_Ensure(); + int err = PyRun_SimpleFile(fp,fname); + PyGILState_Release(gstate); + + if (fp) fclose(fp); + return err; +} + /* ------------------------------------------------------------------ */ void PythonImpl::deallocate(int i) diff --git a/src/PYTHON/python_impl.h b/src/PYTHON/python_impl.h index 07975b3fdf..efe43edbd8 100644 --- a/src/PYTHON/python_impl.h +++ b/src/PYTHON/python_impl.h @@ -29,6 +29,8 @@ class PythonImpl : protected Pointers, public PythonInterface { int find(char *); int variable_match(char *, char *, int); char *long_string(int); + int execute_string(char *); + int execute_file(char *); private: int ninput,noutput,length_longstr; diff --git a/src/python.cpp b/src/python.cpp index fa1639b075..e32e2a161c 100644 --- a/src/python.cpp +++ b/src/python.cpp @@ -97,3 +97,19 @@ char * Python::long_string(int ifunc) init(); return impl->long_string(ifunc); } + +/* ------------------------------------------------------------------ */ + +int Python::execute_string(char *cmd) +{ + init(); + return impl->execute_string(cmd); +} + +/* ------------------------------------------------------------------ */ + +int Python::execute_file(char *fname) +{ + init(); + return impl->execute_file(fname); +} diff --git a/src/python.h b/src/python.h index 73f6354609..190fd6ddb6 100644 --- a/src/python.h +++ b/src/python.h @@ -26,6 +26,8 @@ public: virtual int find(char *) = 0; virtual int variable_match(char *, char *, int) = 0; virtual char * long_string(int ifunc) = 0; + virtual int execute_string(char *) = 0; + virtual int execute_file(char *) = 0; }; class Python : protected Pointers { @@ -38,6 +40,8 @@ public: int find(char *); int variable_match(char *, char *, int); char * long_string(int ifunc); + int execute_string(char *); + int execute_file(char *); bool is_enabled() const; void init(); -- GitLab From 110bb79b14cc4ec70342d302d82a7b5b360c5620 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 11 May 2017 22:49:24 -0400 Subject: [PATCH 110/593] Implement fix python mentioned in issue #454 Allows to call a python function at defined points in the integration loop --- examples/python/in.fix_python | 50 ++++++++++++++++ src/.gitignore | 2 + src/PYTHON/fix_python.cpp | 106 ++++++++++++++++++++++++++++++++++ src/PYTHON/fix_python.h | 54 +++++++++++++++++ 4 files changed, 212 insertions(+) create mode 100644 examples/python/in.fix_python create mode 100644 src/PYTHON/fix_python.cpp create mode 100644 src/PYTHON/fix_python.h diff --git a/examples/python/in.fix_python b/examples/python/in.fix_python new file mode 100644 index 0000000000..426b456688 --- /dev/null +++ b/examples/python/in.fix_python @@ -0,0 +1,50 @@ +# 3d Lennard-Jones melt + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 10 0 10 0 10 +create_box 1 box +create_atoms 1 box +mass 1 1.0 + +velocity all create 3.0 87287 + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 2.5 + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +python end_of_step_callback here """ +from __future__ import print_function +from lammps import lammps + +def end_of_step_callback(lmp): + L = lammps(ptr=lmp) + t = L.extract_global("ntimestep", 0) + print("### END OF STEP ###", t) + +def post_force_callback(lmp, v): + L = lammps(ptr=lmp) + t = L.extract_global("ntimestep", 0) + print("### POST_FORCE ###", t) +""" + +fix 1 all nve +fix 2 all python end_of_step end_of_step_callback +fix 3 all python post_force post_force_callback + +#dump id all atom 50 dump.melt + +#dump 2 all image 25 image.*.jpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 3 + +#dump 3 all movie 25 movie.mpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 3 + +thermo 50 +run 250 diff --git a/src/.gitignore b/src/.gitignore index 620c6965d0..df5cea6eb3 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -850,6 +850,8 @@ /prd.h /python_impl.cpp /python_impl.h +/fix_python.cpp +/fix_python.h /reader_molfile.cpp /reader_molfile.h /reaxc_allocate.cpp diff --git a/src/PYTHON/fix_python.cpp b/src/PYTHON/fix_python.cpp new file mode 100644 index 0000000000..08beb511cb --- /dev/null +++ b/src/PYTHON/fix_python.cpp @@ -0,0 +1,106 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include +#include +#include "fix_python.h" +#include "atom.h" +#include "force.h" +#include "update.h" +#include "respa.h" +#include "error.h" +#include "python.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +// Wrap API changes between Python 2 and 3 using macros +#if PY_MAJOR_VERSION == 2 +#define PY_VOID_POINTER(X) PyCObject_FromVoidPtr((void *) X, NULL) +#elif PY_MAJOR_VERSION == 3 +#define PY_VOID_POINTER(X) PyCapsule_New((void *) X, NULL, NULL) +#endif + +/* ---------------------------------------------------------------------- */ + +FixPython::FixPython(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg) +{ + if (narg != 5) error->all(FLERR,"Illegal fix python command"); + + // ensure Python interpreter is initialized + python->init(); + + if (strcmp(arg[3],"post_force") == 0) { + selected_callback = POST_FORCE; + } else if (strcmp(arg[3],"end_of_step") == 0) { + selected_callback = END_OF_STEP; + } + + // get Python function + PyGILState_STATE gstate = PyGILState_Ensure(); + + PyObject * pyMain = PyImport_AddModule("__main__"); + + if (!pyMain) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not initialize embedded Python"); + } + + char * fname = arg[4]; + pFunc = PyObject_GetAttrString(pyMain, fname); + + if (!pFunc) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not find Python function"); + } + + PyGILState_Release(gstate); +} + +/* ---------------------------------------------------------------------- */ + +int FixPython::setmask() +{ + return selected_callback; +} + +/* ---------------------------------------------------------------------- */ + +void FixPython::end_of_step() +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + + PyObject * ptr = PY_VOID_POINTER(lmp); + PyObject * arglist = Py_BuildValue("(O)", ptr); + + PyObject * result = PyEval_CallObject(pFunc, arglist); + Py_DECREF(arglist); + + PyGILState_Release(gstate); +} + +/* ---------------------------------------------------------------------- */ + +void FixPython::post_force(int vflag) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + + PyObject * ptr = PY_VOID_POINTER(lmp); + PyObject * arglist = Py_BuildValue("(Oi)", ptr, vflag); + + PyObject * result = PyEval_CallObject(pFunc, arglist); + Py_DECREF(arglist); + + PyGILState_Release(gstate); +} diff --git a/src/PYTHON/fix_python.h b/src/PYTHON/fix_python.h new file mode 100644 index 0000000000..534cd74cfb --- /dev/null +++ b/src/PYTHON/fix_python.h @@ -0,0 +1,54 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(python,FixPython) + +#else + +#ifndef LMP_FIX_PYTHON_H +#define LMP_FIX_PYTHON_H + +#include "fix.h" +#include + +namespace LAMMPS_NS { + +class FixPython : public Fix { + public: + FixPython(class LAMMPS *, int, char **); + virtual ~FixPython() {} + int setmask(); + virtual void end_of_step(); + virtual void post_force(int); + + private: + PyObject * pFunc; + int selected_callback; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +*/ -- GitLab From 93f6033061261b7165151d66e54d8a83e220ba1a Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 11 May 2017 23:45:49 -0400 Subject: [PATCH 111/593] Add documentation about fix python --- doc/src/Section_python.txt | 3 +- doc/src/fix_python.txt | 75 ++++++++++++++++++++++++++++++++++++++ doc/src/fixes.txt | 1 + doc/src/python.txt | 5 ++- 4 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 doc/src/fix_python.txt diff --git a/doc/src/Section_python.txt b/doc/src/Section_python.txt index 8bdd101b3d..5d366f6b6c 100644 --- a/doc/src/Section_python.txt +++ b/doc/src/Section_python.txt @@ -155,7 +155,8 @@ commands. See the "python"_python.html doc page and the "variable"_variable.html doc page for its python-style variables for more info, including examples of Python code you can write for both pure Python operations -and callbacks to LAMMPS. +and callbacks to LAMMPS. See "fix python"_fix_python.html to learn about +possibilities to execute Python code during each time step. To run pure Python code from LAMMPS, you only need to build LAMMPS with the PYTHON package installed: diff --git a/doc/src/fix_python.txt b/doc/src/fix_python.txt new file mode 100644 index 0000000000..f69ff41bfa --- /dev/null +++ b/doc/src/fix_python.txt @@ -0,0 +1,75 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +fix python command :h3 + +[Syntax:] + +fix ID group-ID python callback function_name :pre + +ID, group-ID are ignored by this fix :ulb,l +python = style name of this fix command :l +callback = {post_force} or {end_of_step} :l + {post_force} = callback after force computations on atoms + {end_of_step} = callback after each time step :pre +:ule + +[Examples:] + +python post_force_callback here """ +from lammps import lammps :pre + +def post_force_callback(lammps_ptr, vflag): + lmp = lammps(ptr=lammps_ptr) + # access LAMMPS state using Python interface +""" :pre + +python end_of_step_callback here """ +def end_of_step_callback(lammps_ptr): + lmp = lammps(ptr=lammps_ptr) + # access LAMMPS state using Python interface +""" :pre + +fix pf all python post_force post_force_callback +fix eos all python end_of_step end_of_step_callback :pre + +[Description:] + +This fix allows you to call a Python function during a simulation run. +The callback is either executed after forces have been applied to atoms +or at the end of each time step. + +Callback functions must be declared in the global scope of the +active Python interpreter. This can either be done by defining it +inline using the python command or by importing functions from other +Python modules. If LAMMPS is driven using the library interface from +Python, functions defined in the driving Python interpreter can also +be executed. + +Each callback is given a pointer object as first argument. This can be +used to initialize an instance of the lammps Python interface, which +gives access to the LAMMPS state from Python. + +IMPORTANT NOTE: While you can access the state of LAMMPS via library functions +from these callbacks, trying to execute input script commands will in the best +case not work or in the worst case result in undefined behavior. + +[Restrictions:] + +This fix is part of the PYTHON package. It is only enabled if +LAMMPS was built with that package. See the "Making +LAMMPS"_Section_start.html#start_3 section for more info. + +Building LAMMPS with the PYTHON package will link LAMMPS with the +Python library on your system. Settings to enable this are in the +lib/python/Makefile.lammps file. See the lib/python/README file for +information on those settings. + +[Related commands:] + +"python command"_python.html diff --git a/doc/src/fixes.txt b/doc/src/fixes.txt index e8777d4113..ce73ed99e3 100644 --- a/doc/src/fixes.txt +++ b/doc/src/fixes.txt @@ -111,6 +111,7 @@ Fixes :h1 fix_press_berendsen fix_print fix_property_atom + fix_python fix_qbmsst fix_qeq fix_qeq_comb diff --git a/doc/src/python.txt b/doc/src/python.txt index 748d01c2ae..e00b90234c 100644 --- a/doc/src/python.txt +++ b/doc/src/python.txt @@ -405,6 +405,9 @@ or other variables may have hidden side effects as well. In these cases, LAMMPS has no simple way to check that something illogical is being attempted. +The same applies to Python functions called during a simulation run at +each time step using "fix python"_fix_python.html. + :line If you run Python code directly on your workstation, either @@ -490,6 +493,6 @@ different source files, problems may occur. [Related commands:] -"shell"_shell.html, "variable"_variable.html +"shell"_shell.html, "variable"_variable.html, "fix python"_fix_python.html [Default:] none -- GitLab From c4d0f07093310ac0d3e8cf6ee9c3c35b5a640099 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Fri, 12 May 2017 00:29:58 -0400 Subject: [PATCH 112/593] Allow fix python to only execute every N steps --- doc/src/fix_python.txt | 13 +++++++------ examples/python/in.fix_python | 4 ++-- src/PYTHON/fix_python.cpp | 13 +++++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/doc/src/fix_python.txt b/doc/src/fix_python.txt index f69ff41bfa..8b921bc999 100644 --- a/doc/src/fix_python.txt +++ b/doc/src/fix_python.txt @@ -10,13 +10,14 @@ fix python command :h3 [Syntax:] -fix ID group-ID python callback function_name :pre +fix ID group-ID python N callback function_name :pre ID, group-ID are ignored by this fix :ulb,l python = style name of this fix command :l +N = execute every N steps :l callback = {post_force} or {end_of_step} :l - {post_force} = callback after force computations on atoms - {end_of_step} = callback after each time step :pre + {post_force} = callback after force computations on atoms every N time steps + {end_of_step} = callback after each N time steps :pre :ule [Examples:] @@ -35,14 +36,14 @@ def end_of_step_callback(lammps_ptr): # access LAMMPS state using Python interface """ :pre -fix pf all python post_force post_force_callback -fix eos all python end_of_step end_of_step_callback :pre +fix pf all python 50 post_force post_force_callback +fix eos all python 50 end_of_step end_of_step_callback :pre [Description:] This fix allows you to call a Python function during a simulation run. The callback is either executed after forces have been applied to atoms -or at the end of each time step. +or at the end of every N time steps. Callback functions must be declared in the global scope of the active Python interpreter. This can either be done by defining it diff --git a/examples/python/in.fix_python b/examples/python/in.fix_python index 426b456688..c98029a63b 100644 --- a/examples/python/in.fix_python +++ b/examples/python/in.fix_python @@ -33,8 +33,8 @@ def post_force_callback(lmp, v): """ fix 1 all nve -fix 2 all python end_of_step end_of_step_callback -fix 3 all python post_force post_force_callback +fix 2 all python 50 end_of_step end_of_step_callback +fix 3 all python 50 post_force post_force_callback #dump id all atom 50 dump.melt diff --git a/src/PYTHON/fix_python.cpp b/src/PYTHON/fix_python.cpp index 08beb511cb..4f437b7488 100644 --- a/src/PYTHON/fix_python.cpp +++ b/src/PYTHON/fix_python.cpp @@ -36,14 +36,17 @@ using namespace FixConst; FixPython::FixPython(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { - if (narg != 5) error->all(FLERR,"Illegal fix python command"); + if (narg != 6) error->all(FLERR,"Illegal fix python command"); + + nevery = force->inumeric(FLERR,arg[3]); + if (nevery <= 0) error->all(FLERR,"Illegal fix python command"); // ensure Python interpreter is initialized python->init(); - if (strcmp(arg[3],"post_force") == 0) { + if (strcmp(arg[4],"post_force") == 0) { selected_callback = POST_FORCE; - } else if (strcmp(arg[3],"end_of_step") == 0) { + } else if (strcmp(arg[4],"end_of_step") == 0) { selected_callback = END_OF_STEP; } @@ -57,7 +60,7 @@ FixPython::FixPython(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Could not initialize embedded Python"); } - char * fname = arg[4]; + char * fname = arg[5]; pFunc = PyObject_GetAttrString(pyMain, fname); if (!pFunc) { @@ -94,6 +97,8 @@ void FixPython::end_of_step() void FixPython::post_force(int vflag) { + if (update->ntimestep % nevery != 0) return; + PyGILState_STATE gstate = PyGILState_Ensure(); PyObject * ptr = PY_VOID_POINTER(lmp); -- GitLab From b6a70ec6fd748e4e1a44b3dde31e212a31cd5a34 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Fri, 12 May 2017 00:34:47 -0400 Subject: [PATCH 113/593] fixup docs after last change --- doc/src/fix_python.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/fix_python.txt b/doc/src/fix_python.txt index 8b921bc999..c6e1ad9dac 100644 --- a/doc/src/fix_python.txt +++ b/doc/src/fix_python.txt @@ -17,7 +17,7 @@ python = style name of this fix command :l N = execute every N steps :l callback = {post_force} or {end_of_step} :l {post_force} = callback after force computations on atoms every N time steps - {end_of_step} = callback after each N time steps :pre + {end_of_step} = callback after every N time steps :pre :ule [Examples:] -- GitLab From c5db3ff401260e0277c190329df6c7cfb1caabf5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 May 2017 23:27:58 -0400 Subject: [PATCH 114/593] two small doc corrections from Andrew Jewett for pair style gauss and dihedral style spherical --- doc/src/dihedral_spherical.txt | 17 +++++++++-------- doc/src/pair_gauss.txt | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/src/dihedral_spherical.txt b/doc/src/dihedral_spherical.txt index 3f888db01b..c71a319912 100644 --- a/doc/src/dihedral_spherical.txt +++ b/doc/src/dihedral_spherical.txt @@ -14,10 +14,10 @@ dihedral_style spherical :pre [Examples:] -dihedral_coeff 1 1 286.1 1 124 1 1 90.0 0 1 90.0 0 -dihedral_coeff 1 3 286.1 1 114 1 1 90 0 1 90.0 0 & - 17.3 0 0.0 0 1 158 1 0 0.0 0 & - 15.1 0 0.0 0 0 0.0 0 1 167.3 1 :pre +dihedral_coeff 1 1 286.1 1 124 1 1 90.0 0 1 90.0 0 +dihedral_coeff 1 3 69.3 1 93.9 1 1 90 0 1 90 0 & + 49.1 0 0.00 0 1 74.4 1 0 0.00 0 & + 25.2 0 0.00 0 0 0.00 0 1 48.1 1 [Description:] @@ -35,13 +35,14 @@ the dihedral interaction even if it requires adding additional terms to the expansion (as was done in the second example). A careful choice of parameters can prevent singularities that occur with traditional force-fields whenever theta1 or theta2 approach 0 or 180 degrees. + The last example above corresponds to an interaction with a single energy -minima located at phi=114, theta1=158, theta2=167.3 degrees, and it remains +minima located near phi=93.9, theta1=74.4, theta2=48.1 degrees, and it remains numerically stable at all angles (phi, theta1, theta2). In this example, -the coefficients 17.3, and 15.1 can be physically interpreted as the +the coefficients 49.1, and 25.2 can be physically interpreted as the harmonic spring constants for theta1 and theta2 around their minima. -The coefficient 286.1 is the harmonic spring constant for phi after -division by sin(158)*sin(167.3) (the minima positions for theta1 and theta2). +The coefficient 69.3 is the harmonic spring constant for phi after +division by sin(74.4)*sin(48.1) (the minima positions for theta1 and theta2). The following coefficients must be defined for each dihedral type via the "dihedral_coeff"_dihedral_coeff.html command as in the example above, or in diff --git a/doc/src/pair_gauss.txt b/doc/src/pair_gauss.txt index 92d8b51d8b..f6f46a2de8 100644 --- a/doc/src/pair_gauss.txt +++ b/doc/src/pair_gauss.txt @@ -128,7 +128,7 @@ The B parameter is converted to a distance (sigma), before mixing afterwards (using B=sigma^2). Negative A values are converted to positive A values (using abs(A)) before mixing, and converted back after mixing -(by multiplying by sign(Ai)*sign(Aj)). +(by multiplying by min(sign(Ai),sign(Aj))). This way, if either particle is repulsive (if Ai<0 or Aj<0), then the default interaction between both particles will be repulsive. -- GitLab From 6aa0250bc58f4bd15fccc8dcea6b70da340b0eb5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 May 2017 23:40:24 -0400 Subject: [PATCH 115/593] corrections to pair style morse/smooth/linear contributed by David R. Heine --- src/USER-MISC/pair_morse_smooth_linear.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/USER-MISC/pair_morse_smooth_linear.cpp b/src/USER-MISC/pair_morse_smooth_linear.cpp index ea33510b58..3857ad47e7 100644 --- a/src/USER-MISC/pair_morse_smooth_linear.cpp +++ b/src/USER-MISC/pair_morse_smooth_linear.cpp @@ -104,7 +104,7 @@ void PairMorseSmoothLinear::compute(int eflag, int vflag) dexp = exp(-alpha[itype][jtype] * dr); fpartial = morse1[itype][jtype] * (dexp*dexp - dexp) / r; - fpair = factor_lj * ( fpartial - der_at_cutoff[itype][jtype] / r); + fpair = factor_lj * ( fpartial + der_at_cutoff[itype][jtype] / r); f[i][0] += delx*fpair; f[i][1] += dely*fpair; @@ -118,7 +118,7 @@ void PairMorseSmoothLinear::compute(int eflag, int vflag) if (eflag) { evdwl = d0[itype][jtype] * (dexp*dexp - 2.0*dexp) - offset[itype][jtype]; - evdwl += ( r - cut[itype][jtype] ) * der_at_cutoff[itype][jtype]; + evdwl -= ( r - cut[itype][jtype] ) * der_at_cutoff[itype][jtype]; evdwl *= factor_lj; } @@ -349,10 +349,11 @@ double PairMorseSmoothLinear::single(int i, int j, int itype, int jtype, double r = sqrt(rsq); dr = r - r0[itype][jtype]; dexp = exp(-alpha[itype][jtype] * dr); - fforce = factor_lj * morse1[itype][jtype] * (dexp*dexp - dexp) / r; + fforce = factor_lj * (morse1[itype][jtype] * (dexp*dexp - dexp) + + der_at_cutoff[itype][jtype]) / r; phi = d0[itype][jtype] * (dexp*dexp - 2.0*dexp) - offset[itype][jtype]; - dr = cut[itype][jtype] - r0[itype][jtype]; + dr = cut[itype][jtype] - r; phi += dr * der_at_cutoff[itype][jtype]; return factor_lj*phi; -- GitLab From 34cc3946b8d94c7c1a38782fab0b6f141fea7b65 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 May 2017 18:29:06 -0400 Subject: [PATCH 116/593] first few pieces of pair style python --- examples/python/in.pair_python_hybrid | 60 +++++++ examples/python/in.pair_python_melt | 57 +++++++ examples/python/lj-melt-potential.py | 28 ++++ src/PYTHON/pair_python.cpp | 220 ++++++++++++++++++++++++++ src/PYTHON/pair_python.h | 74 +++++++++ src/PYTHON/python_impl.cpp | 3 +- 6 files changed, 440 insertions(+), 2 deletions(-) create mode 100644 examples/python/in.pair_python_hybrid create mode 100644 examples/python/in.pair_python_melt create mode 100644 examples/python/lj-melt-potential.py create mode 100644 src/PYTHON/pair_python.cpp create mode 100644 src/PYTHON/pair_python.h diff --git a/examples/python/in.pair_python_hybrid b/examples/python/in.pair_python_hybrid new file mode 100644 index 0000000000..e4ea3eb99e --- /dev/null +++ b/examples/python/in.pair_python_hybrid @@ -0,0 +1,60 @@ +# 3d Lennard-Jones hybrid + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 10 0 10 0 10 +create_box 2 box +create_atoms 1 box +mass * 1.0 + +velocity all create 3.0 87287 + +pair_style hybrid lj/cut 2.5 python 2.5 +pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * 2 lj/cut 1.0 1.0 + +neighbor 0.3 bin +neigh_modify every 10 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 + +write_data hybrid.data +write_restart hybrid.restart + +clear + +read_restart hybrid.restart + +pair_style hybrid lj/cut 2.5 python 2.5 +pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * 2 lj/cut 1.0 1.0 + +fix 1 all nve + +thermo 50 +run 250 + +clear + +units lj +atom_style atomic + +read_data hybrid.data + +pair_style hybrid lj/cut 2.5 python 2.5 +pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * 2 lj/cut 1.0 1.0 + +neighbor 0.3 bin +neigh_modify every 10 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 + diff --git a/examples/python/in.pair_python_melt b/examples/python/in.pair_python_melt new file mode 100644 index 0000000000..ad6a84c494 --- /dev/null +++ b/examples/python/in.pair_python_melt @@ -0,0 +1,57 @@ +# 3d Lennard-Jones melt + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 10 0 10 0 10 +create_box 1 box +create_atoms 1 box +mass 1 1.0 + +velocity all create 3.0 87287 + +pair_style python 2.5 +pair_coeff * * lj-melt-potential.py lj + +neighbor 0.3 bin +neigh_modify every 10 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 + +write_data melt.data +write_restart melt.restart + +clear + +read_restart melt.restart + +pair_style python 2.5 +pair_coeff * * lj-melt-potential.py lj + +fix 1 all nve + +thermo 50 +run 250 + +clear + +units lj +atom_style atomic + +read_data melt.data + +pair_style python 2.5 +pair_coeff * * lj-melt-potential.py lj + +neighbor 0.3 bin +neigh_modify every 10 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 + diff --git a/examples/python/lj-melt-potential.py b/examples/python/lj-melt-potential.py new file mode 100644 index 0000000000..b1360e0ded --- /dev/null +++ b/examples/python/lj-melt-potential.py @@ -0,0 +1,28 @@ +from __future__ import print_function + +class LAMMPSLJCutPotential(object): + + def __init__(self): + self.pmap=dict() + # coefficients: epsilon, sigma + self.coeff = {'lj' : {'lj' : (1.0,1.0), + 'NULL': (0.0,1.0)}, + 'NULL': {'lj' : (0.0,1.0), + 'NULL': (0.0,1.0)}} + + def map_coeff(self,type,name): + if self.coeff.has_key(name): + print("map type %d to name %s" % (type,name)) + self.pmap[type] = name + else: + print("cannot match atom type",name) + + def compute_force(self,r,itype,jtype,factor_lj): + return 0.0 + + def compute_energy(self,r,itype,jtype,factor_lj): + return 0.0 + +lammps_pair_style = LAMMPSLJCutPotential() +print ("lj-melt potential file loaded") + diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp new file mode 100644 index 0000000000..d951a11d77 --- /dev/null +++ b/src/PYTHON/pair_python.cpp @@ -0,0 +1,220 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Axel Kohlmeyer and Richard Berger (Temple U) +------------------------------------------------------------------------- */ + +#include +#include +#include +#include +#include "pair_python.h" +#include "atom.h" +#include "comm.h" +#include "force.h" +#include "memory.h" +#include "neigh_list.h" +#include "python.h" +#include "error.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) { + respa_enable = 0; + single_enable = 0; + writedata = 0; + restartinfo = 0; + one_coeff = 1; + reinitflag = 0; + + python->init(); +} + +/* ---------------------------------------------------------------------- */ + +PairPython::~PairPython() +{ + if (allocated) { + memory->destroy(setflag); + memory->destroy(cutsq); + } +} + +/* ---------------------------------------------------------------------- */ + +void PairPython::compute(int eflag, int vflag) +{ + int i,j,ii,jj,inum,jnum,itype,jtype; + double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; + double rsq,factor_lj; + int *ilist,*jlist,*numneigh,**firstneigh; + + evdwl = 0.0; + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = vflag_fdotr = 0; + + double **x = atom->x; + double **f = atom->f; + int *type = atom->type; + int nlocal = atom->nlocal; + double *special_lj = force->special_lj; + int newton_pair = force->newton_pair; + + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; + + // loop over neighbors of my atoms + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + itype = type[i]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + factor_lj = special_lj[sbmask(j)]; + j &= NEIGHMASK; + + delx = xtmp - x[j][0]; + dely = ytmp - x[j][1]; + delz = ztmp - x[j][2]; + rsq = delx*delx + dely*dely + delz*delz; + jtype = type[j]; + + if (rsq < cutsq[itype][jtype]) { + const double r = sqrt(rsq); + printf("compute f at r=%g for types %d,%d with factor %g\n", + r,itype,jtype,factor_lj); + fpair = 0.0; + fpair *= factor_lj; + + f[i][0] += delx*fpair; + f[i][1] += dely*fpair; + f[i][2] += delz*fpair; + if (newton_pair || j < nlocal) { + f[j][0] -= delx*fpair; + f[j][1] -= dely*fpair; + f[j][2] -= delz*fpair; + } + + if (eflag) { + printf("compute e at r=%g for types %d,%d with factor %g\n", + r,itype,jtype,factor_lj); + evdwl = 0.0; + evdwl *= factor_lj; + } + + if (evflag) ev_tally(i,j,nlocal,newton_pair, + evdwl,0.0,fpair,delx,dely,delz); + } + } + } +} + +/* ---------------------------------------------------------------------- + allocate all arrays +------------------------------------------------------------------------- */ + +void PairPython::allocate() +{ + allocated = 1; + int n = atom->ntypes; + + memory->create(setflag,n+1,n+1,"pair:setflag"); + for (int i = 1; i <= n; i++) + for (int j = i; j <= n; j++) + setflag[i][j] = 0; + + memory->create(cutsq,n+1,n+1,"pair:cutsq"); +} + +/* ---------------------------------------------------------------------- + global settings +------------------------------------------------------------------------- */ + +void PairPython::settings(int narg, char **arg) +{ + if (narg != 1) + error->all(FLERR,"Illegal pair_style command"); + + cut_global = force->numeric(FLERR,arg[0]); +} + +/* ---------------------------------------------------------------------- + set coeffs for all type pairs +------------------------------------------------------------------------- */ + +void PairPython::coeff(int narg, char **arg) +{ + const int ntypes = atom->ntypes; + + if (narg != 3+ntypes) + error->all(FLERR,"Incorrect args for pair coefficients"); + + if (!allocated) allocate(); + + // make sure I,J args are * * + + if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) + error->all(FLERR,"Incorrect args for pair coefficients"); + + // check if potential python file exists + + FILE *fp = fopen(arg[2],"r"); + if (fp == NULL) + error->all(FLERR,"Cannot open python pair potential class file"); + + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *pModule = PyImport_AddModule("__main__"); + if (!pModule) error->all(FLERR,"Could not initialize embedded Python"); + + int err = PyRun_SimpleFile(fp,arg[2]); + if (err) error->all(FLERR,"Loading python pair style class failure"); + fclose(fp); + + PyObject *py_pair_instance = + PyObject_GetAttrString(pModule,"lammps_pair_style"); + + if (!py_pair_instance) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not find 'lammps_pair_style instance'"); + } + + + for (int i = 1; i <= ntypes ; i++) { + for (int j = i; j <= ntypes ; j++) { + if (strcmp(arg[2+i],"NULL") != 0) { + setflag[i][j] = 1; + cutsq[i][j] = cut_global*cut_global; + } + } + } + PyGILState_Release(gstate); +} + +/* ---------------------------------------------------------------------- */ + +double PairPython::init_one(int, int) +{ + return cut_global; +} + diff --git a/src/PYTHON/pair_python.h b/src/PYTHON/pair_python.h new file mode 100644 index 0000000000..acb96de5e3 --- /dev/null +++ b/src/PYTHON/pair_python.h @@ -0,0 +1,74 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. + + Pair zero is a dummy pair interaction useful for requiring a + force cutoff distance in the absense of pair-interactions or + with hybrid/overlay if a larger force cutoff distance is required. + + This can be used in conjunction with bond/create to create bonds + that are longer than the cutoff of a given force field, or to + calculate radial distribution functions for models without + pair interactions. + +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS + +PairStyle(python,PairPython) + +#else + +#ifndef LMP_PAIR_PYTHON_H +#define LMP_PAIR_PYTHON_H + +#include "pair.h" + +namespace LAMMPS_NS { + +class PairPython : public Pair { + public: + PairPython(class LAMMPS *); + virtual ~PairPython(); + virtual void compute(int, int); + void settings(int, char **); + void coeff(int, char **); + double init_one(int, int); + + protected: + double cut_global; + + virtual void allocate(); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +E: Incorrect args for pair coefficients + +Self-explanatory. Check the input script or data file. + +E: Pair cutoff < Respa interior cutoff + +One or more pairwise cutoffs are too short to use with the specified +rRESPA cutoffs. + +*/ diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index 1b9eef9ea6..c66e003228 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -51,7 +51,7 @@ PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp) pfuncs = NULL; // one-time initialization of Python interpreter - // pymain stores pointer to main module + // pyMain stores pointer to main module external_interpreter = Py_IsInitialized(); Py_Initialize(); @@ -63,7 +63,6 @@ PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp) if (!pModule) error->all(FLERR,"Could not initialize embedded Python"); pyMain = (void *) pModule; - PyGILState_Release(gstate); } -- GitLab From 86283c6309adb79f881bf9c86390c619a6d54148 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 00:13:32 -0400 Subject: [PATCH 117/593] make melt input consistent with melt example again --- examples/python/in.pair_python_melt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/python/in.pair_python_melt b/examples/python/in.pair_python_melt index ad6a84c494..b3205c0534 100644 --- a/examples/python/in.pair_python_melt +++ b/examples/python/in.pair_python_melt @@ -7,7 +7,7 @@ lattice fcc 0.8442 region box block 0 10 0 10 0 10 create_box 1 box create_atoms 1 box -mass 1 1.0 +mass * 1.0 velocity all create 3.0 87287 @@ -15,7 +15,7 @@ pair_style python 2.5 pair_coeff * * lj-melt-potential.py lj neighbor 0.3 bin -neigh_modify every 10 delay 0 check no +neigh_modify every 20 delay 0 check no fix 1 all nve @@ -48,7 +48,7 @@ pair_style python 2.5 pair_coeff * * lj-melt-potential.py lj neighbor 0.3 bin -neigh_modify every 10 delay 0 check no +neigh_modify every 20 delay 0 check no fix 1 all nve -- GitLab From f484ab6dfb9c5376d91e92af2e7eac5bd9788604 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 00:14:36 -0400 Subject: [PATCH 118/593] completed lj parameter set and compute functions for melt example --- examples/python/lj-melt-potential.py | 33 +++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/examples/python/lj-melt-potential.py b/examples/python/lj-melt-potential.py index b1360e0ded..fb544f90b8 100644 --- a/examples/python/lj-melt-potential.py +++ b/examples/python/lj-melt-potential.py @@ -4,25 +4,32 @@ class LAMMPSLJCutPotential(object): def __init__(self): self.pmap=dict() - # coefficients: epsilon, sigma - self.coeff = {'lj' : {'lj' : (1.0,1.0), - 'NULL': (0.0,1.0)}, - 'NULL': {'lj' : (0.0,1.0), - 'NULL': (0.0,1.0)}} + # set coeffs: eps, sig, 48*eps*sig**12, 24*eps*sig**6, + # 4*eps*sig**12, 4*eps*sig**6 + self.coeff = {'lj' : {'lj' : (1.0,1.0,48.0,24.0,4.0,4.0), + 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}, + 'NULL': {'lj' : (0.0,1.0, 0.0, 0.0,0.0,0.0), + 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}} - def map_coeff(self,type,name): + def map_coeff(self,name,type): if self.coeff.has_key(name): - print("map type %d to name %s" % (type,name)) self.pmap[type] = name else: - print("cannot match atom type",name) + raise Exception("cannot match atom type %s" % name) - def compute_force(self,r,itype,jtype,factor_lj): - return 0.0 + def compute_force(self,rsq,itype,jtype): + r2inv = 1.0/rsq + r6inv = r2inv*r2inv*r2inv + lj1 = self.coeff[self.pmap[itype]][self.pmap[jtype]][2] + lj2 = self.coeff[self.pmap[itype]][self.pmap[jtype]][3] + return (r6inv * (lj1*r6inv - lj2)) - def compute_energy(self,r,itype,jtype,factor_lj): - return 0.0 + def compute_energy(self,rsq,itype,jtype): + r2inv = 1.0/rsq + r6inv = r2inv*r2inv*r2inv + lj3 = self.coeff[self.pmap[itype]][self.pmap[jtype]][4] + lj4 = self.coeff[self.pmap[itype]][self.pmap[jtype]][5] + return (r6inv * (lj3*r6inv - lj4)) lammps_pair_style = LAMMPSLJCutPotential() -print ("lj-melt potential file loaded") -- GitLab From 6e113c1eaf5975292f8170eb9e3daf2bb34cf44c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 00:15:41 -0400 Subject: [PATCH 119/593] basic feature complete version of lj melt example with python interaction function --- src/PYTHON/pair_python.cpp | 146 +++++++++++++++++++++++++++++++++---- src/PYTHON/pair_python.h | 1 + 2 files changed, 131 insertions(+), 16 deletions(-) diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index d951a11d77..292fa4be78 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -30,6 +30,22 @@ using namespace LAMMPS_NS; +// Wrap API changes between Python 2 and 3 using macros +#if PY_MAJOR_VERSION == 2 +#define PY_INT_FROM_LONG(X) PyInt_FromLong(X) +#define PY_INT_AS_LONG(X) PyInt_AsLong(X) +#define PY_STRING_FROM_STRING(X) PyString_FromString(X) +#define PY_VOID_POINTER(X) PyCObject_FromVoidPtr((void *) X, NULL) +#define PY_STRING_AS_STRING(X) PyString_AsString(X) + +#elif PY_MAJOR_VERSION == 3 +#define PY_INT_FROM_LONG(X) PyLong_FromLong(X) +#define PY_INT_AS_LONG(X) PyLong_AsLong(X) +#define PY_STRING_FROM_STRING(X) PyUnicode_FromString(X) +#define PY_VOID_POINTER(X) PyCapsule_New((void *) X, NULL, NULL) +#define PY_STRING_AS_STRING(X) PyUnicode_AsUTF8(X) +#endif + /* ---------------------------------------------------------------------- */ PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) { @@ -78,6 +94,48 @@ void PairPython::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; + // prepare access to compute_force and compute_energy functions + + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *py_pair_instance = (PyObject *) py_potential; + PyObject *py_compute_force = PyObject_GetAttrString(py_pair_instance,"compute_force"); + if (!py_compute_force) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not find 'compute_force' method'"); + } + if (!PyCallable_Check(py_compute_force)) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Python 'compute_force' is not callable"); + } + + PyObject *py_compute_energy = PyObject_GetAttrString(py_pair_instance,"compute_energy"); + if (!py_compute_energy) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not find 'compute_energy' method'"); + } + if (!PyCallable_Check(py_compute_energy)) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Python 'compute_energy' is not callable"); + } + + PyObject *py_compute_args = PyTuple_New(3); + if (!py_compute_args) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not create tuple for 'compute' function arguments"); + } + + PyObject *py_rsq, *py_itype, *py_jtype, *py_value; + // loop over neighbors of my atoms for (ii = 0; ii < inum; ii++) { @@ -89,6 +147,9 @@ void PairPython::compute(int eflag, int vflag) jlist = firstneigh[i]; jnum = numneigh[i]; + py_itype = PY_INT_FROM_LONG(itype); + PyTuple_SetItem(py_compute_args,1,py_itype); + for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; factor_lj = special_lj[sbmask(j)]; @@ -100,12 +161,20 @@ void PairPython::compute(int eflag, int vflag) rsq = delx*delx + dely*dely + delz*delz; jtype = type[j]; + py_jtype = PY_INT_FROM_LONG(jtype); + PyTuple_SetItem(py_compute_args,2,py_jtype); + if (rsq < cutsq[itype][jtype]) { - const double r = sqrt(rsq); - printf("compute f at r=%g for types %d,%d with factor %g\n", - r,itype,jtype,factor_lj); - fpair = 0.0; - fpair *= factor_lj; + py_rsq = PyFloat_FromDouble(rsq); + PyTuple_SetItem(py_compute_args,0,py_rsq); + py_value = PyObject_CallObject(py_compute_force,py_compute_args); + if (!py_value) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Calling 'compute_force' function failed"); + } + fpair = factor_lj*PyFloat_AsDouble(py_value)/rsq; f[i][0] += delx*fpair; f[i][1] += dely*fpair; @@ -117,17 +186,19 @@ void PairPython::compute(int eflag, int vflag) } if (eflag) { - printf("compute e at r=%g for types %d,%d with factor %g\n", - r,itype,jtype,factor_lj); - evdwl = 0.0; - evdwl *= factor_lj; - } + py_value = PyObject_CallObject(py_compute_energy,py_compute_args); + evdwl = factor_lj*PyFloat_AsDouble(py_value); + } else evdwl = 0.0; if (evflag) ev_tally(i,j,nlocal,newton_pair, evdwl,0.0,fpair,delx,dely,delz); } } } + Py_DECREF(py_compute_args); + PyGILState_Release(gstate); + + if (vflag_fdotr) virial_fdotr_compute(); } /* ---------------------------------------------------------------------- @@ -177,30 +248,72 @@ void PairPython::coeff(int narg, char **arg) if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) error->all(FLERR,"Incorrect args for pair coefficients"); - // check if potential python file exists + // check if python potential file exists and source it FILE *fp = fopen(arg[2],"r"); if (fp == NULL) error->all(FLERR,"Cannot open python pair potential class file"); PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *pModule = PyImport_AddModule("__main__"); - if (!pModule) error->all(FLERR,"Could not initialize embedded Python"); int err = PyRun_SimpleFile(fp,arg[2]); - if (err) error->all(FLERR,"Loading python pair style class failure"); + if (err) { + PyGILState_Release(gstate); + error->all(FLERR,"Loading python pair style class failure"); + } fclose(fp); - PyObject *py_pair_instance = - PyObject_GetAttrString(pModule,"lammps_pair_style"); + // create LAMMPS atom type to potential file type mapping in python class + // by calling 'lammps_pair_style.map_coeff(name,type)' + + PyObject *pModule = PyImport_AddModule("__main__"); + if (!pModule) error->all(FLERR,"Could not initialize embedded Python"); + PyObject *py_pair_instance = PyObject_GetAttrString(pModule,"lammps_pair_style"); if (!py_pair_instance) { + PyErr_Print(); + PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Could not find 'lammps_pair_style instance'"); } + py_potential = (void *) py_pair_instance; // XXX do we need to increment reference counter? + PyObject *py_map_coeff = PyObject_GetAttrString(py_pair_instance,"map_coeff"); + if (!py_map_coeff) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not find 'map_coeff' method'"); + } + if (!PyCallable_Check(py_map_coeff)) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Python 'map_coeff' is not callable"); + } + PyObject *py_map_args = PyTuple_New(2); + if (!py_map_args) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not create tuple for 'map_coeff' function arguments"); + } + + PyObject *py_type, *py_name, *py_value; for (int i = 1; i <= ntypes ; i++) { + py_type = PY_INT_FROM_LONG(i); + py_name = PY_STRING_FROM_STRING(arg[2+i]); + PyTuple_SetItem(py_map_args,0,py_name); + PyTuple_SetItem(py_map_args,1,py_type); + py_value = PyObject_CallObject(py_map_coeff,py_map_args); + if (!py_value) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Calling 'map_coeff' function failed"); + } + for (int j = i; j <= ntypes ; j++) { if (strcmp(arg[2+i],"NULL") != 0) { setflag[i][j] = 1; @@ -208,6 +321,7 @@ void PairPython::coeff(int narg, char **arg) } } } + Py_DECREF(py_map_args); PyGILState_Release(gstate); } diff --git a/src/PYTHON/pair_python.h b/src/PYTHON/pair_python.h index acb96de5e3..e038d9b25e 100644 --- a/src/PYTHON/pair_python.h +++ b/src/PYTHON/pair_python.h @@ -45,6 +45,7 @@ class PairPython : public Pair { protected: double cut_global; + void * py_potential; virtual void allocate(); }; -- GitLab From df55a90ef666551a8d1d55986702908b328cb529 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 00:22:03 -0400 Subject: [PATCH 120/593] some example input file tweaks --- examples/python/in.pair_python_hybrid | 5 +++-- examples/python/in.pair_python_melt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/python/in.pair_python_hybrid b/examples/python/in.pair_python_hybrid index e4ea3eb99e..914b840e86 100644 --- a/examples/python/in.pair_python_hybrid +++ b/examples/python/in.pair_python_hybrid @@ -16,7 +16,7 @@ pair_coeff * * python lj-melt-potential.py lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin -neigh_modify every 10 delay 0 check no +neigh_modify every 20 delay 0 check no fix 1 all nve @@ -51,10 +51,11 @@ pair_coeff * * python lj-melt-potential.py lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin -neigh_modify every 10 delay 0 check no +neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 +shell rm hybrid.data hybrid.restart diff --git a/examples/python/in.pair_python_melt b/examples/python/in.pair_python_melt index b3205c0534..ae37aafa77 100644 --- a/examples/python/in.pair_python_melt +++ b/examples/python/in.pair_python_melt @@ -55,3 +55,4 @@ fix 1 all nve thermo 50 run 250 +shell rm melt.data melt.restart -- GitLab From d662f5d42969f6ef230ee7520adbcd41125690fa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 00:22:22 -0400 Subject: [PATCH 121/593] whitspace cleanup and gitignore update --- src/.gitignore | 2 ++ src/PYTHON/pair_python.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index df5cea6eb3..6171b29af9 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -852,6 +852,8 @@ /python_impl.h /fix_python.cpp /fix_python.h +/pair_python.cpp +/pair_python.h /reader_molfile.cpp /reader_molfile.h /reaxc_allocate.cpp diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 292fa4be78..1d37a9fd06 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -133,7 +133,7 @@ void PairPython::compute(int eflag, int vflag) PyGILState_Release(gstate); error->all(FLERR,"Could not create tuple for 'compute' function arguments"); } - + PyObject *py_rsq, *py_itype, *py_jtype, *py_value; // loop over neighbors of my atoms @@ -299,7 +299,7 @@ void PairPython::coeff(int narg, char **arg) PyGILState_Release(gstate); error->all(FLERR,"Could not create tuple for 'map_coeff' function arguments"); } - + PyObject *py_type, *py_name, *py_value; for (int i = 1; i <= ntypes ; i++) { py_type = PY_INT_FROM_LONG(i); @@ -321,7 +321,7 @@ void PairPython::coeff(int narg, char **arg) } } } - Py_DECREF(py_map_args); + Py_DECREF(py_map_args); PyGILState_Release(gstate); } -- GitLab From 6a1f7e61f2af22341abbcee16392808cbe14f05d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 00:25:11 -0400 Subject: [PATCH 122/593] provide reference output for python pair style inputs --- .../log.4May2017.pair_python_hybrid.g++.1 | 250 ++++++++++++++++++ .../log.4May2017.pair_python_hybrid.g++.4 | 250 ++++++++++++++++++ .../log.4May2017.pair_python_melt.g++.1 | 217 +++++++++++++++ .../log.4May2017.pair_python_melt.g++.4 | 217 +++++++++++++++ 4 files changed, 934 insertions(+) create mode 100644 examples/python/log.4May2017.pair_python_hybrid.g++.1 create mode 100644 examples/python/log.4May2017.pair_python_hybrid.g++.4 create mode 100644 examples/python/log.4May2017.pair_python_melt.g++.1 create mode 100644 examples/python/log.4May2017.pair_python_melt.g++.4 diff --git a/examples/python/log.4May2017.pair_python_hybrid.g++.1 b/examples/python/log.4May2017.pair_python_hybrid.g++.1 new file mode 100644 index 0000000000..b7520754f9 --- /dev/null +++ b/examples/python/log.4May2017.pair_python_hybrid.g++.1 @@ -0,0 +1,250 @@ +LAMMPS (4 May 2017) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# 3d Lennard-Jones hybrid + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 +region box block 0 10 0 10 0 10 +create_box 2 box +Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 4000 atoms +mass * 1.0 + +velocity all create 3.0 87287 + +pair_style hybrid lj/cut 2.5 python 2.5 +pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * 2 lj/cut 1.0 1.0 + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 3 neighbor lists, perpetual/occasional/extra = 3 0 0 + (1) pair lj/cut, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (2) pair python, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (3) neighbor class addition, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.828 | 4.828 | 4.828 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 3 -6.7733681 0 -2.2744931 -3.7033504 + 50 1.6758903 -4.7955425 0 -2.2823355 5.670064 + 100 1.6458363 -4.7492704 0 -2.2811332 5.8691042 + 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 + 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 + 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 +Loop time of 41.3888 on 1 procs for 250 steps with 4000 atoms + +Performance: 2609.399 tau/day, 6.040 timesteps/s +48.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 41.135 | 41.135 | 41.135 | 0.0 | 99.39 +Neigh | 0.17089 | 0.17089 | 0.17089 | 0.0 | 0.41 +Comm | 0.032175 | 0.032175 | 0.032175 | 0.0 | 0.08 +Output | 0.000513 | 0.000513 | 0.000513 | 0.0 | 0.00 +Modify | 0.046448 | 0.046448 | 0.046448 | 0.0 | 0.11 +Other | | 0.003913 | | | 0.01 + +Nlocal: 4000 ave 4000 max 4000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 5499 ave 5499 max 5499 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 12 +Dangerous builds not checked + +write_data hybrid.data +write_restart hybrid.restart + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task + +read_restart hybrid.restart + orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 1 by 1 MPI processor grid + 4000 atoms + +pair_style hybrid lj/cut 2.5 python 2.5 +pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * 2 lj/cut 1.0 1.0 + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 3 neighbor lists, perpetual/occasional/extra = 3 0 0 + (1) pair lj/cut, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (2) pair python, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (3) neighbor class addition, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.626 | 4.626 | 4.626 Mbytes +Step Temp E_pair E_mol TotEng Press + 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 + 300 1.645592 -4.7496711 0 -2.2819002 5.8734193 + 350 1.6514972 -4.7580756 0 -2.2814491 5.810167 + 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 + 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 + 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 +Loop time of 41.5677 on 1 procs for 250 steps with 4000 atoms + +Performance: 2598.172 tau/day, 6.014 timesteps/s +48.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 41.124 | 41.124 | 41.124 | 0.0 | 98.93 +Neigh | 0.35605 | 0.35605 | 0.35605 | 0.0 | 0.86 +Comm | 0.034799 | 0.034799 | 0.034799 | 0.0 | 0.08 +Output | 0.000473 | 0.000473 | 0.000473 | 0.0 | 0.00 +Modify | 0.046841 | 0.046841 | 0.046841 | 0.0 | 0.11 +Other | | 0.005854 | | | 0.01 + +Nlocal: 4000 ave 4000 max 4000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 5472 ave 5472 max 5472 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 25 +Dangerous builds = 25 + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task + +units lj +atom_style atomic + +read_data hybrid.data + orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 4000 atoms + reading velocities ... + 4000 velocities + +pair_style hybrid lj/cut 2.5 python 2.5 +pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * 2 lj/cut 1.0 1.0 + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 3 neighbor lists, perpetual/occasional/extra = 3 0 0 + (1) pair lj/cut, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (2) pair python, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (3) neighbor class addition, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.126 | 4.126 | 4.126 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 1.6275257 -4.7224992 0 -2.281821 5.9567365 + 50 1.6454666 -4.7497515 0 -2.2821686 5.8729175 + 100 1.6512008 -4.7582693 0 -2.2820874 5.8090548 + 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 + 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 + 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 +Loop time of 41.7098 on 1 procs for 250 steps with 4000 atoms + +Performance: 2589.318 tau/day, 5.994 timesteps/s +48.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 41.458 | 41.458 | 41.458 | 0.0 | 99.40 +Neigh | 0.16992 | 0.16992 | 0.16992 | 0.0 | 0.41 +Comm | 0.031355 | 0.031355 | 0.031355 | 0.0 | 0.08 +Output | 0.000537 | 0.000537 | 0.000537 | 0.0 | 0.00 +Modify | 0.046569 | 0.046569 | 0.046569 | 0.0 | 0.11 +Other | | 0.003735 | | | 0.01 + +Nlocal: 4000 ave 4000 max 4000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 5487 ave 5487 max 5487 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 12 +Dangerous builds not checked + +shell rm hybrid.data hybrid.restart +Total wall time: 0:02:07 diff --git a/examples/python/log.4May2017.pair_python_hybrid.g++.4 b/examples/python/log.4May2017.pair_python_hybrid.g++.4 new file mode 100644 index 0000000000..7e7868c659 --- /dev/null +++ b/examples/python/log.4May2017.pair_python_hybrid.g++.4 @@ -0,0 +1,250 @@ +LAMMPS (4 May 2017) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# 3d Lennard-Jones hybrid + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 +region box block 0 10 0 10 0 10 +create_box 2 box +Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 1 by 2 MPI processor grid +create_atoms 1 box +Created 4000 atoms +mass * 1.0 + +velocity all create 3.0 87287 + +pair_style hybrid lj/cut 2.5 python 2.5 +pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * 2 lj/cut 1.0 1.0 + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 3 neighbor lists, perpetual/occasional/extra = 3 0 0 + (1) pair lj/cut, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (2) pair python, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (3) neighbor class addition, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.044 | 4.044 | 4.044 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 3 -6.7733681 0 -2.2744931 -3.7033504 + 50 1.6758903 -4.7955425 0 -2.2823355 5.670064 + 100 1.6458363 -4.7492704 0 -2.2811332 5.8691042 + 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 + 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 + 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 +Loop time of 33.3499 on 2 procs for 250 steps with 4000 atoms + +Performance: 3238.386 tau/day, 7.496 timesteps/s +31.8% CPU use with 2 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 31.739 | 32.45 | 33.16 | 12.5 | 97.30 +Neigh | 0.12882 | 0.1292 | 0.12959 | 0.1 | 0.39 +Comm | 0.04094 | 0.75173 | 1.4625 | 82.0 | 2.25 +Output | 0.000352 | 0.0004115 | 0.000471 | 0.0 | 0.00 +Modify | 0.014923 | 0.01509 | 0.015257 | 0.1 | 0.05 +Other | | 0.003902 | | | 0.01 + +Nlocal: 2000 ave 2006 max 1994 min +Histogram: 1 0 0 0 0 0 0 0 0 1 +Nghost: 3942 ave 3967 max 3917 min +Histogram: 1 0 0 0 0 0 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 2 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 12 +Dangerous builds not checked + +write_data hybrid.data +write_restart hybrid.restart + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task + +read_restart hybrid.restart + orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 1 by 2 MPI processor grid + 4000 atoms + +pair_style hybrid lj/cut 2.5 python 2.5 +pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * 2 lj/cut 1.0 1.0 + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 3 neighbor lists, perpetual/occasional/extra = 3 0 0 + (1) pair lj/cut, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (2) pair python, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (3) neighbor class addition, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.747 | 3.747 | 3.747 Mbytes +Step Temp E_pair E_mol TotEng Press + 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 + 300 1.645592 -4.7496711 0 -2.2819002 5.8734193 + 350 1.6514972 -4.7580756 0 -2.2814491 5.810167 + 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 + 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 + 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 +Loop time of 33.4436 on 2 procs for 250 steps with 4000 atoms + +Performance: 3229.315 tau/day, 7.475 timesteps/s +31.8% CPU use with 2 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 31.79 | 32.446 | 33.101 | 11.5 | 97.02 +Neigh | 0.26891 | 0.26902 | 0.26912 | 0.0 | 0.80 +Comm | 0.051997 | 0.70764 | 1.3633 | 77.9 | 2.12 +Output | 0.000332 | 0.000396 | 0.00046 | 0.0 | 0.00 +Modify | 0.01539 | 0.015553 | 0.015717 | 0.1 | 0.05 +Other | | 0.005483 | | | 0.02 + +Nlocal: 2000 ave 2000 max 2000 min +Histogram: 2 0 0 0 0 0 0 0 0 0 +Nghost: 3912 ave 3920 max 3904 min +Histogram: 1 0 0 0 0 0 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 2 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 25 +Dangerous builds = 25 + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task + +units lj +atom_style atomic + +read_data hybrid.data + orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 1 by 2 MPI processor grid + reading atoms ... + 4000 atoms + reading velocities ... + 4000 velocities + +pair_style hybrid lj/cut 2.5 python 2.5 +pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * 2 lj/cut 1.0 1.0 + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 3 neighbor lists, perpetual/occasional/extra = 3 0 0 + (1) pair lj/cut, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (2) pair python, perpetual, skip from (3) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (3) neighbor class addition, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.247 | 3.247 | 3.247 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 1.6275257 -4.7224992 0 -2.281821 5.9567365 + 50 1.6454666 -4.7497515 0 -2.2821686 5.8729175 + 100 1.6512008 -4.7582693 0 -2.2820874 5.8090548 + 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 + 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 + 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 +Loop time of 33.0043 on 2 procs for 250 steps with 4000 atoms + +Performance: 3272.302 tau/day, 7.575 timesteps/s +31.8% CPU use with 2 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 31.676 | 32.248 | 32.819 | 10.1 | 97.71 +Neigh | 0.12725 | 0.12751 | 0.12778 | 0.1 | 0.39 +Comm | 0.038764 | 0.60973 | 1.1807 | 73.1 | 1.85 +Output | 0.000359 | 0.000424 | 0.000489 | 0.0 | 0.00 +Modify | 0.015441 | 0.01555 | 0.01566 | 0.1 | 0.05 +Other | | 0.003519 | | | 0.01 + +Nlocal: 2000 ave 2004 max 1996 min +Histogram: 1 0 0 0 0 0 0 0 0 1 +Nghost: 3923.5 ave 3927 max 3920 min +Histogram: 1 0 0 0 0 0 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 2 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 12 +Dangerous builds not checked + +shell rm hybrid.data hybrid.restart +Total wall time: 0:01:42 diff --git a/examples/python/log.4May2017.pair_python_melt.g++.1 b/examples/python/log.4May2017.pair_python_melt.g++.1 new file mode 100644 index 0000000000..afcf5cad9c --- /dev/null +++ b/examples/python/log.4May2017.pair_python_melt.g++.1 @@ -0,0 +1,217 @@ +LAMMPS (4 May 2017) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# 3d Lennard-Jones melt + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 +region box block 0 10 0 10 0 10 +create_box 1 box +Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 4000 atoms +mass * 1.0 + +velocity all create 3.0 87287 + +pair_style python 2.5 +pair_coeff * * lj-melt-potential.py lj + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair python, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.184 | 3.184 | 3.184 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 3 -6.7733681 0 -2.2744931 -3.7033504 + 50 1.6758903 -4.7955425 0 -2.2823355 5.670064 + 100 1.6458363 -4.7492704 0 -2.2811332 5.8691042 + 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 + 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 + 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 +Loop time of 62.2396 on 1 procs for 250 steps with 4000 atoms + +Performance: 1735.231 tau/day, 4.017 timesteps/s +31.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 61.865 | 61.865 | 61.865 | 0.0 | 99.40 +Neigh | 0.24651 | 0.24651 | 0.24651 | 0.0 | 0.40 +Comm | 0.049505 | 0.049505 | 0.049505 | 0.0 | 0.08 +Output | 0.000738 | 0.000738 | 0.000738 | 0.0 | 0.00 +Modify | 0.071444 | 0.071444 | 0.071444 | 0.0 | 0.11 +Other | | 0.005964 | | | 0.01 + +Nlocal: 4000 ave 4000 max 4000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 5499 ave 5499 max 5499 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 151513 ave 151513 max 151513 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 151513 +Ave neighs/atom = 37.8783 +Neighbor list builds = 12 +Dangerous builds not checked + +write_data melt.data +write_restart melt.restart + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task + +read_restart melt.restart + orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 1 by 1 MPI processor grid + 4000 atoms + +pair_style python 2.5 +pair_coeff * * lj-melt-potential.py lj + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair python, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.36 | 3.36 | 3.36 Mbytes +Step Temp E_pair E_mol TotEng Press + 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 + 300 1.645592 -4.7496711 0 -2.2819002 5.8734193 + 350 1.6514972 -4.7580756 0 -2.2814491 5.810167 + 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 + 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 + 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 +Loop time of 62.6472 on 1 procs for 250 steps with 4000 atoms + +Performance: 1723.939 tau/day, 3.991 timesteps/s +31.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 61.994 | 61.994 | 61.994 | 0.0 | 98.96 +Neigh | 0.519 | 0.519 | 0.519 | 0.0 | 0.83 +Comm | 0.052574 | 0.052574 | 0.052574 | 0.0 | 0.08 +Output | 0.000804 | 0.000804 | 0.000804 | 0.0 | 0.00 +Modify | 0.071878 | 0.071878 | 0.071878 | 0.0 | 0.11 +Other | | 0.009016 | | | 0.01 + +Nlocal: 4000 ave 4000 max 4000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 5472 ave 5472 max 5472 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 151513 ave 151513 max 151513 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 151513 +Ave neighs/atom = 37.8783 +Neighbor list builds = 25 +Dangerous builds = 25 + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task + +units lj +atom_style atomic + +read_data melt.data + orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 4000 atoms + reading velocities ... + 4000 velocities + +pair_style python 2.5 +pair_coeff * * lj-melt-potential.py lj + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair python, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.86 | 2.86 | 2.86 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 1.6275257 -4.7224992 0 -2.281821 5.9567365 + 50 1.6454666 -4.7497515 0 -2.2821686 5.8729175 + 100 1.6512008 -4.7582693 0 -2.2820874 5.8090548 + 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 + 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 + 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 +Loop time of 62.6778 on 1 procs for 250 steps with 4000 atoms + +Performance: 1723.098 tau/day, 3.989 timesteps/s +31.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 62.298 | 62.298 | 62.298 | 0.0 | 99.39 +Neigh | 0.25251 | 0.25251 | 0.25251 | 0.0 | 0.40 +Comm | 0.04911 | 0.04911 | 0.04911 | 0.0 | 0.08 +Output | 0.000797 | 0.000797 | 0.000797 | 0.0 | 0.00 +Modify | 0.071729 | 0.071729 | 0.071729 | 0.0 | 0.11 +Other | | 0.005419 | | | 0.01 + +Nlocal: 4000 ave 4000 max 4000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 5487 ave 5487 max 5487 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 151490 ave 151490 max 151490 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 151490 +Ave neighs/atom = 37.8725 +Neighbor list builds = 12 +Dangerous builds not checked + +shell rm melt.data melt.restart +Total wall time: 0:03:12 diff --git a/examples/python/log.4May2017.pair_python_melt.g++.4 b/examples/python/log.4May2017.pair_python_melt.g++.4 new file mode 100644 index 0000000000..e7c6ffa8eb --- /dev/null +++ b/examples/python/log.4May2017.pair_python_melt.g++.4 @@ -0,0 +1,217 @@ +LAMMPS (4 May 2017) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# 3d Lennard-Jones melt + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 +region box block 0 10 0 10 0 10 +create_box 1 box +Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 2 by 2 MPI processor grid +create_atoms 1 box +Created 4000 atoms +mass * 1.0 + +velocity all create 3.0 87287 + +pair_style python 2.5 +pair_coeff * * lj-melt-potential.py lj + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair python, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.69 | 2.69 | 2.69 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 3 -6.7733681 0 -2.2744931 -3.7033504 + 50 1.6754119 -4.7947589 0 -2.2822693 5.6615925 + 100 1.6503357 -4.756014 0 -2.2811293 5.8050524 + 150 1.6596605 -4.7699432 0 -2.2810749 5.7830138 + 200 1.6371874 -4.7365462 0 -2.2813789 5.9246674 + 250 1.6323462 -4.7292021 0 -2.2812949 5.9762238 +Loop time of 18.0035 on 4 procs for 250 steps with 4000 atoms + +Performance: 5998.838 tau/day, 13.886 timesteps/s +31.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 16.784 | 17.18 | 17.611 | 8.9 | 95.43 +Neigh | 0.066257 | 0.066613 | 0.066967 | 0.1 | 0.37 +Comm | 0.31192 | 0.74265 | 1.1386 | 42.7 | 4.13 +Output | 0.000344 | 0.00076 | 0.001983 | 0.0 | 0.00 +Modify | 0.010618 | 0.010763 | 0.010947 | 0.1 | 0.06 +Other | | 0.00278 | | | 0.02 + +Nlocal: 1000 ave 1010 max 982 min +Histogram: 1 0 0 0 0 0 1 0 0 2 +Nghost: 2703.75 ave 2713 max 2689 min +Histogram: 1 0 0 0 0 0 0 2 0 1 +Neighs: 37915.5 ave 39239 max 36193 min +Histogram: 1 0 0 0 0 1 1 0 0 1 + +Total # of neighbors = 151662 +Ave neighs/atom = 37.9155 +Neighbor list builds = 12 +Dangerous builds not checked + +write_data melt.data +write_restart melt.restart + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task + +read_restart melt.restart + orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 2 by 2 MPI processor grid + 4000 atoms + +pair_style python 2.5 +pair_coeff * * lj-melt-potential.py lj + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair python, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.815 | 2.816 | 2.816 Mbytes +Step Temp E_pair E_mol TotEng Press + 250 1.6323462 -4.7292062 0 -2.2812991 5.9762168 + 300 1.6451788 -4.7488091 0 -2.2816578 5.8375485 + 350 1.6171909 -4.7064928 0 -2.2813129 6.0094235 + 400 1.6388136 -4.7387093 0 -2.2811035 5.9331084 + 450 1.6431295 -4.7452215 0 -2.2811435 5.8929898 + 500 1.643316 -4.7454222 0 -2.2810644 5.8454817 +Loop time of 17.8516 on 4 procs for 250 steps with 4000 atoms + +Performance: 6049.891 tau/day, 14.004 timesteps/s +31.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 16.549 | 17.138 | 17.615 | 9.3 | 96.00 +Neigh | 0.1326 | 0.13573 | 0.13709 | 0.5 | 0.76 +Comm | 0.083467 | 0.56179 | 1.1533 | 51.4 | 3.15 +Output | 0.000353 | 0.000703 | 0.00173 | 0.0 | 0.00 +Modify | 0.011229 | 0.011437 | 0.011847 | 0.2 | 0.06 +Other | | 0.004124 | | | 0.02 + +Nlocal: 1000 ave 1012 max 983 min +Histogram: 1 0 0 0 0 0 2 0 0 1 +Nghost: 2699 ave 2706 max 2693 min +Histogram: 1 1 0 0 0 0 1 0 0 1 +Neighs: 37930.8 ave 39292 max 36264 min +Histogram: 1 0 0 0 1 0 0 1 0 1 + +Total # of neighbors = 151723 +Ave neighs/atom = 37.9308 +Neighbor list builds = 25 +Dangerous builds = 25 + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task + +units lj +atom_style atomic + +read_data melt.data + orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 4000 atoms + reading velocities ... + 4000 velocities + +pair_style python 2.5 +pair_coeff * * lj-melt-potential.py lj + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair python, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.315 | 2.316 | 2.316 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 1.6323462 -4.7292062 0 -2.2812991 5.9762168 + 50 1.6450626 -4.7488948 0 -2.2819177 5.8370409 + 100 1.6169004 -4.7066969 0 -2.2819526 6.0082546 + 150 1.6384234 -4.7389689 0 -2.2819482 5.9315273 + 200 1.6428814 -4.7460743 0 -2.2823683 5.8888228 + 250 1.6432631 -4.7466603 0 -2.2823818 5.8398819 +Loop time of 17.5277 on 4 procs for 250 steps with 4000 atoms + +Performance: 6161.664 tau/day, 14.263 timesteps/s +31.7% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 16.46 | 17.032 | 17.348 | 8.3 | 97.17 +Neigh | 0.063784 | 0.06495 | 0.065515 | 0.3 | 0.37 +Comm | 0.10004 | 0.41613 | 0.98807 | 53.0 | 2.37 +Output | 0.000331 | 0.00081525 | 0.002223 | 0.0 | 0.00 +Modify | 0.010998 | 0.011169 | 0.011264 | 0.1 | 0.06 +Other | | 0.002774 | | | 0.02 + +Nlocal: 1000 ave 1013 max 989 min +Histogram: 1 0 0 1 0 1 0 0 0 1 +Nghost: 2695.5 ave 2706 max 2682 min +Histogram: 1 0 0 0 0 0 2 0 0 1 +Neighs: 37927.2 ave 39002 max 36400 min +Histogram: 1 0 0 0 1 0 0 0 0 2 + +Total # of neighbors = 151709 +Ave neighs/atom = 37.9273 +Neighbor list builds = 12 +Dangerous builds not checked + +shell rm melt.data melt.restart +Total wall time: 0:00:55 -- GitLab From 64cf52d3b557e846326951e7d8daecc475232f4f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 15:55:15 -0400 Subject: [PATCH 123/593] address spline out-of-bounds bug reported in issue #59 and refactor high-level spline code for consistency and efficiency --- src/MANYBODY/pair_airebo.cpp | 291 ++++++++++++++--------------------- 1 file changed, 117 insertions(+), 174 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index abf75c85c5..95af9d9c4b 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -3094,72 +3094,54 @@ double PairAIREBO::gSpline(double costh, double Nij, int typei, double PairAIREBO::PijSpline(double NijC, double NijH, int typei, int typej, double dN2[2]) { - int x,y,i,done; - double Pij,coeffs[16]; - - for (i = 0; i < 16; i++) coeffs[i]=0.0; + int x,y; + double Pij; x = 0; y = 0; dN2[0] = 0.0; dN2[1] = 0.0; - done = 0; - - // if inputs are out of bounds set them back to a point in bounds + Pij = 0.0; - if (typei == 0 && typej == 0) { - if (NijC < pCCdom[0][0]) NijC=pCCdom[0][0]; - if (NijC > pCCdom[0][1]) NijC=pCCdom[0][1]; - if (NijH < pCCdom[1][0]) NijH=pCCdom[1][0]; - if (NijH > pCCdom[1][1]) NijH=pCCdom[1][1]; + if (typei == 1) return Pij; - if (fabs(NijC-floor(NijC)) < TOL && fabs(NijH-floor(NijH)) < TOL) { - Pij = PCCf[(int) NijC][(int) NijH]; - dN2[0] = PCCdfdx[(int) NijC][(int) NijH]; - dN2[1] = PCCdfdy[(int) NijC][(int) NijH]; - done = 1; - } - if (done == 0) { - x = (int) (floor(NijC)); - y = (int) (floor(NijH)); - for (i = 0; i<16; i++) coeffs[i] = pCC[x][y][i]; - Pij = Spbicubic(NijC,NijH,coeffs,dN2); - } - } + if (typej == 0) { - // if inputs are out of bounds set them back to a point in bounds + // if inputs are out of bounds set them back to a point in bounds - if (typei == 0 && typej == 1){ - if (NijC < pCHdom[0][0]) NijC=pCHdom[0][0]; - if (NijC > pCHdom[0][1]) NijC=pCHdom[0][1]; - if (NijH < pCHdom[1][0]) NijH=pCHdom[1][0]; - if (NijH > pCHdom[1][1]) NijH=pCHdom[1][1]; + if (NijC < pCCdom[0][0]) NijC=pCCdom[0][0]; + if (NijC >= pCCdom[0][1]) NijC=pCCdom[0][1]-TOL; + if (NijH < pCCdom[1][0]) NijH=pCCdom[1][0]; + if (NijH >= pCCdom[1][1]) NijH=pCCdom[1][1]-TOL; + x = (int) floor(NijC); + y = (int) floor(NijH); if (fabs(NijC-floor(NijC)) < TOL && fabs(NijH-floor(NijH)) < TOL) { - Pij = PCHf[(int) NijC][(int) NijH]; - dN2[0] = PCHdfdx[(int) NijC][(int) NijH]; - dN2[1] = PCHdfdy[(int) NijC][(int) NijH]; - done = 1; - } - if (done == 0) { - x = (int) (floor(NijC)); - y = (int) (floor(NijH)); - for (i = 0; i<16; i++) coeffs[i] = pCH[x][y][i]; - Pij = Spbicubic(NijC,NijH,coeffs,dN2); + Pij = PCCf[x][y]; + dN2[0] = PCCdfdx[x][y]; + dN2[1] = PCCdfdy[x][y]; + } else { + Pij = Spbicubic(NijC,NijH,pCC[x][y],dN2); } - } - if (typei == 1 && typej == 0) { - Pij = 0.0; - dN2[0] = 0.0; - dN2[1] = 0.0; - } + } else if (typej == 1) { + + // if inputs are out of bounds set them back to a point in bounds + if (NijC < pCHdom[0][0]) NijC=pCHdom[0][0]; + if (NijC >= pCHdom[0][1]) NijC=pCHdom[0][1]-TOL; + if (NijH < pCHdom[1][0]) NijH=pCHdom[1][0]; + if (NijH >= pCHdom[1][1]) NijH=pCHdom[1][1]-TOL; + x = (int) floor(NijC); + y = (int) floor(NijH); - if (typei == 1 && typej == 1) { - Pij = 0.0; - dN2[0] = 0.0; - dN2[1] = 0.0; + if (fabs(NijC-floor(NijC)) < TOL && fabs(NijH-floor(NijH)) < TOL) { + Pij = PCHf[x][y]; + dN2[0] = PCHdfdx[x][y]; + dN2[1] = PCHdfdy[x][y]; + } else { + Pij = Spbicubic(NijC,NijH,pCH[x][y],dN2); + } } return Pij; } @@ -3171,115 +3153,84 @@ double PairAIREBO::PijSpline(double NijC, double NijH, int typei, int typej, double PairAIREBO::piRCSpline(double Nij, double Nji, double Nijconj, int typei, int typej, double dN3[3]) { - int x,y,z,i,done; - double piRC,coeffs[64]; + int x,y,z; + double piRC; x=0; y=0; z=0; - i=0; - - done=0; - - for (i=0; i<64; i++) coeffs[i]=0.0; + dN3[0]=0.0; + dN3[1]=0.0; + dN3[2]=0.0; if (typei==0 && typej==0) { - // if the inputs are out of bounds set them back to a point in bounds - - if (NijpiCCdom[0][1]) Nij=piCCdom[0][1]; - if (NjipiCCdom[1][1]) Nji=piCCdom[1][1]; - if (NijconjpiCCdom[2][1]) Nijconj=piCCdom[2][1]; - - if (fabs(Nij-floor(Nij))=(double) i && Nij<=(double) i+1) x=i; - for (i=0; i=(double) i && Nji<=(double) i+1) y=i; - for (i=0; i=(double) i && Nijconj<=(double) i+1) z=i; - - for (i=0; i<64; i++) coeffs[i]=piCC[x][y][z][i]; - piRC=Sptricubic(Nij,Nji,Nijconj,coeffs,dN3); - } - } - - // CH interaction - - if ((typei==0 && typej==1) || (typei==1 && typej==0)) { + // CC interaction // if the inputs are out of bounds set them back to a point in bounds - if (NijpiCHdom[0][1] || - NjipiCHdom[1][1] || - NijconjpiCHdom[2][1]) { - if (NijpiCHdom[0][1]) Nij=piCHdom[0][1]; - if (NjipiCHdom[1][1]) Nji=piCHdom[1][1]; - if (NijconjpiCHdom[2][1]) Nijconj=piCHdom[2][1]; + if (Nij < piCCdom[0][0]) Nij=piCCdom[0][0]; + if (Nij >= piCCdom[0][1]) Nij=piCCdom[0][1]-TOL; + if (Nji < piCCdom[1][0]) Nji=piCCdom[1][0]; + if (Nji >= piCCdom[1][1]) Nji=piCCdom[1][1]-TOL; + if (Nijconj < piCCdom[2][0]) Nijconj=piCCdom[2][0]; + if (Nijconj >= piCCdom[2][1]) Nijconj=piCCdom[2][1]-TOL; + x = (int) floor(Nij); + y = (int) floor(Nji); + z = (int) floor(Nijconj); + + if (fabs(Nij-floor(Nij)) < TOL && fabs(Nji-floor(Nji)) < TOL + && fabs(Nijconj-floor(Nijconj)) < TOL) { + piRC=piCCf[x][y][z]; + dN3[0]=piCCdfdx[x][y][z]; + dN3[1]=piCCdfdy[x][y][z]; + dN3[2]=piCCdfdz[x][y][z]; + } else { + piRC=Sptricubic(Nij,Nji,Nijconj,piCC[x][y][z],dN3); } + } else if ((typei==0 && typej==1) || (typei==1 && typej==0)) { - if (fabs(Nij-floor(Nij))=i && Nij<=i+1) x=i; - for (i=0; i=i && Nji<=i+1) y=i; - for (i=0; i=i && Nijconj<=i+1) z=i; + // if the inputs are out of bounds set them back to a point in bounds - for (i=0; i<64; i++) coeffs[i]=piCH[x][y][z][i]; - piRC=Sptricubic(Nij,Nji,Nijconj,coeffs,dN3); + if (Nij < piCHdom[0][0]) Nij=piCHdom[0][0]; + if (Nij >= piCHdom[0][1]) Nij=piCHdom[0][1]-TOL; + if (Nji < piCHdom[1][0]) Nji=piCHdom[1][0]; + if (Nji >= piCHdom[1][1]) Nji=piCHdom[1][1]-TOL; + if (Nijconj < piCHdom[2][0]) Nijconj=piCHdom[2][0]; + if (Nijconj >= piCHdom[2][1]) Nijconj=piCHdom[2][1]-TOL; + x = (int) floor(Nij); + y = (int) floor(Nji); + z = (int) floor(Nijconj); + + if (fabs(Nij-floor(Nij)) < TOL && fabs(Nji-floor(Nji)) < TOL + && fabs(Nijconj-floor(Nijconj)) < TOL) { + piRC=piCHf[x][y][z]; + dN3[0]=piCHdfdx[x][y][z]; + dN3[1]=piCHdfdy[x][y][z]; + dN3[2]=piCHdfdz[x][y][z]; + } else { + piRC=Sptricubic(Nij,Nji,Nijconj,piCH[x][y][z],dN3); } - } + } else if (typei==1 && typej==1) { + if (Nij < piHHdom[0][0]) Nij=piHHdom[0][0]; + if (Nij >= piHHdom[0][1]) Nij=piHHdom[0][1]-TOL; + if (Nji < piHHdom[1][0]) Nji=piHHdom[1][0]; + if (Nji >= piHHdom[1][1]) Nji=piHHdom[1][1]-TOL; + if (Nijconj < piHHdom[2][0]) Nijconj=piHHdom[2][0]; + if (Nijconj >= piHHdom[2][1]) Nijconj=piHHdom[2][1]-TOL; + x = (int) floor(Nij); + y = (int) floor(Nji); + z = (int) floor(Nijconj); - if (typei==1 && typej==1) { - if (NijpiHHdom[0][1] || - NjipiHHdom[1][1] || - NijconjpiHHdom[2][1]) { - Nij=0.0; - Nji=0.0; - Nijconj=0.0; - } if (fabs(Nij-floor(Nij))=i && Nij<=i+1) x=i; - for (i=0; i=i && Nji<=i+1) y=i; - for (i=0; i=i && Nijconj<=i+1) z=i; - - for (i=0; i<64; i++) coeffs[i]=piHH[x][y][z][i]; - piRC=Sptricubic(Nij,Nji,Nijconj,coeffs,dN3); + piRC=piHHf[x][y][z]; + dN3[0]=piHHdfdx[x][y][z]; + dN3[1]=piHHdfdy[x][y][z]; + dN3[2]=piHHdfdz[x][y][z]; + } else { + piRC=Sptricubic(Nij,Nji,Nijconj,piHH[x][y][z],dN3); } } @@ -3293,45 +3244,37 @@ double PairAIREBO::piRCSpline(double Nij, double Nji, double Nijconj, double PairAIREBO::TijSpline(double Nij, double Nji, double Nijconj, double dN3[3]) { - int x,y,z,i,done; - double Tijf,coeffs[64]; + int x,y,z; + double Tijf; x=0; y=0; z=0; - i=0; Tijf=0.0; - done=0; - for (i=0; i<64; i++) coeffs[i]=0.0; + dN3[0]=0.0; + dN3[1]=0.0; + dN3[2]=0.0; //if the inputs are out of bounds set them back to a point in bounds - if (NijTijdom[0][1]) Nij=Tijdom[0][1]; - if (NjiTijdom[1][1]) Nji=Tijdom[1][1]; - if (NijconjTijdom[2][1]) Nijconj=Tijdom[2][1]; - - if (fabs(Nij-floor(Nij))=i && Nij<=i+1) x=i; - for (i=0; i=i && Nji<=i+1) y=i; - for (i=0; i=i && Nijconj<=i+1) z=i; - - for (i=0; i<64; i++) coeffs[i]=Tijc[x][y][z][i]; - Tijf=Sptricubic(Nij,Nji,Nijconj,coeffs,dN3); + if (Nij < Tijdom[0][0]) Nij=Tijdom[0][0]; + if (Nij >= Tijdom[0][1]) Nij=Tijdom[0][1]-TOL; + if (Nji < Tijdom[1][0]) Nji=Tijdom[1][0]; + if (Nji >= Tijdom[1][1]) Nji=Tijdom[1][1]-TOL; + if (Nijconj < Tijdom[2][0]) Nijconj=Tijdom[2][0]; + if (Nijconj >= Tijdom[2][1]) Nijconj=Tijdom[2][1]-TOL; + x = (int) floor(Nij); + y = (int) floor(Nji); + z = (int) floor(Nijconj); + + if (fabs(Nij-floor(Nij)) < TOL && fabs(Nji-floor(Nji)) < TOL + && fabs(Nijconj-floor(Nijconj)) < TOL) { + Tijf=Tf[x][y][z]; + dN3[0]=Tdfdx[x][y][z]; + dN3[1]=Tdfdy[x][y][z]; + dN3[2]=Tdfdz[x][y][z]; + } else { + Tijf=Sptricubic(Nij,Nji,Nijconj,Tijc[x][y][z],dN3); } return Tijf; -- GitLab From fb7164a8110b06656945d400cb739fdc310078b6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 16:16:01 -0400 Subject: [PATCH 124/593] replace pow(x,-0.5) with 1.0/sqrt(x) --- src/MANYBODY/pair_airebo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 95af9d9c4b..71c206883c 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -1335,7 +1335,7 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], dN2[0] = 0.0; dN2[1] = 0.0; PijS = PijSpline(NijC,NijH,itype,jtype,dN2); - pij = pow(1.0+Etmp+PijS,-0.5); + pij = 1.0/sqrt(1.0+Etmp+PijS); tmp = -0.5*cube(pij); // pij forces @@ -1480,7 +1480,7 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], dN2[0] = 0.0; dN2[1] = 0.0; PjiS = PijSpline(NjiC,NjiH,jtype,itype,dN2); - pji = pow(1.0+Etmp+PjiS,-0.5); + pji = 1.0/sqrt(1.0+Etmp+PjiS); tmp = -0.5*cube(pji); REBO_neighs = REBO_firstneigh[j]; @@ -2171,7 +2171,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, dN2PIJ[0] = 0.0; dN2PIJ[1] = 0.0; PijS = PijSpline(NijC,NijH,itype,jtype,dN2PIJ); - pij = pow(1.0+Etmp+PijS,-0.5); + pij = 1.0/sqrt(1.0+Etmp+PijS); tmppij = -.5*cube(pij); tmp3pij = tmp3; tmp = 0.0; @@ -2211,7 +2211,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, dN2PJI[0] = 0.0; dN2PJI[1] = 0.0; PjiS = PijSpline(NjiC,NjiH,jtype,itype,dN2PJI); - pji = pow(1.0+Etmp+PjiS,-0.5); + pji = 1.0/sqrt(1.0+Etmp+PjiS); tmppji = -.5*cube(pji); tmp3pji = tmp3; -- GitLab From eb6f6a77e5cc1ac1c0cbe4102e1fa88a383068be Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 16:16:12 -0400 Subject: [PATCH 125/593] dead code removal --- src/MANYBODY/pair_airebo.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 71c206883c..6c9e7065de 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -2080,9 +2080,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, double rikmag,rjlmag,cosjik,cosijl,g,tmp2,tmp3; double Etmp,pij,tmp,wij,dwij,NconjtmpI,NconjtmpJ; double Nki,Nlj,dS,lamdajik,lamdaijl,dgdc,dgdN,pji,Nijconj,piRC; - double dcosjikdri[3],dcosijldri[3],dcosjikdrk[3]; - double dN2[2],dN3[3]; - double dcosijldrj[3],dcosijldrl[3],dcosjikdrj[3],dwjl; + double dN2[2],dN3[3],dwjl; double Tij,crosskij[3],crosskijmag; double crossijl[3],crossijlmag,omkijl; double tmppij,tmppji,dN2PIJ[2],dN2PJI[2],dN3piRC[3],dN3Tij[3]; @@ -2092,16 +2090,16 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, double rlnmag,dwln,r23[3],r23mag,r21[3],r21mag; double w21,dw21,r34[3],r34mag,cos234,w34,dw34; double cross321[3],cross234[3],prefactor,SpN; - double fcijpc,fcikpc,fcjlpc,fcjkpc,fcilpc; - double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom; + double fcikpc,fcjlpc,fcjkpc,fcilpc; + double dt2dik[3],dt2djl[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom; double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2; - double dctik,dctjk,dctjl,dctij,dctji,dctil,rik2i,rjl2i,sink2i,sinl2i; - double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil,dt1dij; + double dctik,dctjk,dctjl,dctil,rik2i,rjl2i,sink2i,sinl2i; + double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil; double dNlj; double PijS,PjiS; double rij2,tspjik,dtsjik,tspijl,dtsijl,costmp; int *REBO_neighs,*REBO_neighs_i,*REBO_neighs_j,*REBO_neighs_k,*REBO_neighs_l; - double F12[3],F23[3],F34[3],F31[3],F24[3]; + double F12[3],F34[3],F31[3],F24[3]; double fi[3],fj[3],fk[3],fl[3],f1[3],f2[3],f3[3],f4[4]; double rji[3],rki[3],rlj[3],r13[3],r43[3]; double realrij[3], realrijmag; -- GitLab From 0a40a7af7befd7782ab7d9530271cde7cbcdfa8c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 17:00:41 -0400 Subject: [PATCH 126/593] whitespace cleanup --- src/MANYBODY/pair_airebo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 6c9e7065de..00108e7f2d 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -158,7 +158,7 @@ void PairAIREBO::settings(int narg, char **arg) // this one parameter for C-C interactions is different in AIREBO vs REBO // see Favata, Micheletti, Ryu, Pugno, Comp Phys Comm (2016) - + PCCf_2_0 = -0.0276030; } @@ -2134,7 +2134,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, realrij[0] = x[atomi][0] - x[atomj][0]; realrij[1] = x[atomi][1] - x[atomj][1]; realrij[2] = x[atomi][2] - x[atomj][2]; - realrijmag = sqrt(realrij[0] * realrij[0] + realrij[1] * realrij[1] + realrijmag = sqrt(realrij[0] * realrij[0] + realrij[1] * realrij[1] + realrij[2] * realrij[2]); REBO_neighs = REBO_firstneigh[i]; @@ -2479,7 +2479,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, fj[1] -= rijmbr * (fil[1] - (realrij[1] * realrij[0] * fil[0] + realrij[1] * realrij[1] * fil[1] + realrij[1] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); fj[2] -= rijmbr * (fil[2] - (realrij[2] * realrij[0] * fil[0] + realrij[2] * realrij[1] * fil[1] + realrij[2] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - + tmp2 = VA*.5*(tmp*wjl*g*exp(lamdaijl)*4.0*kronecker(jtype,1)); fj[0] += tmp2*(rjl[0]/rjlmag); fj[1] += tmp2*(rjl[1]/rjlmag); -- GitLab From 93cc6f4a5def8e3451d38f937df5aac2b0098adb Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 15 May 2017 17:34:48 -0400 Subject: [PATCH 127/593] Use in syntax for key lookup for Python 3 compatibility --- examples/python/lj-melt-potential.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python/lj-melt-potential.py b/examples/python/lj-melt-potential.py index fb544f90b8..41fa073ebd 100644 --- a/examples/python/lj-melt-potential.py +++ b/examples/python/lj-melt-potential.py @@ -12,7 +12,7 @@ class LAMMPSLJCutPotential(object): 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}} def map_coeff(self,name,type): - if self.coeff.has_key(name): + if name in self.coeff: self.pmap[type] = name else: raise Exception("cannot match atom type %s" % name) -- GitLab From d9d4ef17c806e2b620f2e5fe9f83abc1de2f4527 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 17:44:25 -0400 Subject: [PATCH 128/593] add gao-weber potentials (regular and with ZBL core) with SiC potential files NOTE: documentation is missing --- potentials/SiC.gw | 19 + potentials/SiC.gw.zbl | 19 + src/MANYBODY/pair_gw.cpp | 763 +++++++++++++++++++++++++++++++++++ src/MANYBODY/pair_gw.h | 196 +++++++++ src/MANYBODY/pair_gw_zbl.cpp | 287 +++++++++++++ src/MANYBODY/pair_gw_zbl.h | 72 ++++ 6 files changed, 1356 insertions(+) create mode 100644 potentials/SiC.gw create mode 100644 potentials/SiC.gw.zbl create mode 100644 src/MANYBODY/pair_gw.cpp create mode 100644 src/MANYBODY/pair_gw.h create mode 100644 src/MANYBODY/pair_gw_zbl.cpp create mode 100644 src/MANYBODY/pair_gw_zbl.h diff --git a/potentials/SiC.gw b/potentials/SiC.gw new file mode 100644 index 0000000000..1c14e3a53e --- /dev/null +++ b/potentials/SiC.gw @@ -0,0 +1,19 @@ +# DATE: 2016-05-06 CONTRIBUTOR: German Samolyuk, samolyuk@gmail.com CITATION: ??? +# Gao-Weber parameters for various elements and mixtures +# multiple entries can be added to this file, LAMMPS reads the ones it needs +# these entries are in LAMMPS "metal" units: + +# format of a single entry (one or more lines): +# element 1, element 2, element 3, +# m, gamma, lambda3, c, d, h, n, beta, lambda2, X_ij*B, R, D, lambda1, A + +#E1 E2 E3 m gamma lambda3 c d h n beta lambda2 B R D lambda1 A + +Si Si Si 1 0.013318 0 14 2.1 -1 0.78000 1 1.80821400248640 632.658058300867 2.35 0.15 2.38684248328205 1708.79738703139 +Si Si C 1 0.013318 0 14 2.1 -1 0.78000 1 1.80821400248640 632.658058300867 2.35 0.15 2.38684248328205 1708.79738703139 +Si C Si 1 0.013318 0 14 2.1 -1 0.78000 1 1.96859970919818 428.946015420752 2.35 0.15 3.03361215187440 1820.05673775234 +C Si Si 1 0.011304 0 19 2.5 -1 0.80468 1 1.96859970919818 428.946015420752 2.35 0.15 3.03361215187440 1820.05673775234 +C C Si 1 0.011304 0 19 2.5 -1 0.80469 1 1.76776695296637 203.208547714849 2.35 0.15 2.54558441227157 458.510465798439 +C Si C 1 0.011304 0 19 2.5 -1 0.80469 1 1.96859970919818 428.946015420752 2.35 0.15 3.03361215187440 1820.05673775234 +Si C C 1 0.013318 0 14 2.1 -1 0.78000 1 1.96859970919818 428.946015420752 2.35 0.15 3.03361215187440 1820.05673775234 +C C C 1 0.011304 0 19 2.5 -1 0.80469 1 1.76776695296637 203.208547714849 2.35 0.15 2.54558441227157 458.510465798439 diff --git a/potentials/SiC.gw.zbl b/potentials/SiC.gw.zbl new file mode 100644 index 0000000000..8129763b10 --- /dev/null +++ b/potentials/SiC.gw.zbl @@ -0,0 +1,19 @@ +# DATE: 2016-05-06 CONTRIBUTOR: German Samolyuk, samolyuk@gmail.com CITATION: ??? +# Gao-Weber parameters for various elements and mixtures +# multiple entries can be added to this file, LAMMPS reads the ones it needs +# these entries are in LAMMPS "metal" units: + +# format of a single entry (one or more lines): +# element 1, element 2, element 3, +# m, gamma, lambda3, c, d, h, n, beta, lambda2, X_ij*B, R, D, lambda1, A + +#E1 E2 E3 m gamma lambda3 c d h n beta lambda2 B R D lambda1 A Z_i, Z_j, ZBLcut, ZBLexpscale + +Si Si Si 1 0.013318 0 14 2.1 -1 0.78000 1 1.80821400248640 632.658058300867 2.35 0.15 2.38684248328205 1708.79738703139 14 14 .95 14 +Si Si C 1 0.013318 0 14 2.1 -1 0.78000 1 1.80821400248640 632.658058300867 2.35 0.15 2.38684248328205 1708.79738703139 14 14 .95 14 +Si C Si 1 0.013318 0 14 2.1 -1 0.78000 1 1.96859970919818 428.946015420752 2.35 0.15 3.03361215187440 1820.05673775234 14 6 .95 14 +C Si Si 1 0.011304 0 19 2.5 -1 0.80468 1 1.96859970919818 428.946015420752 2.35 0.15 3.03361215187440 1820.05673775234 6 14 .95 14 +C C Si 1 0.011304 0 19 2.5 -1 0.80469 1 1.76776695296637 203.208547714849 2.35 0.15 2.54558441227157 458.510465798439 6 6 .95 14 +C Si C 1 0.011304 0 19 2.5 -1 0.80469 1 1.96859970919818 428.946015420752 2.35 0.15 3.03361215187440 1820.05673775234 6 14 .95 14 +Si C C 1 0.013318 0 14 2.1 -1 0.78000 1 1.96859970919818 428.946015420752 2.35 0.15 3.03361215187440 1820.05673775234 14 6 .95 14 +C C C 1 0.011304 0 19 2.5 -1 0.80469 1 1.76776695296637 203.208547714849 2.35 0.15 2.54558441227157 458.510465798439 6 6 .95 14 diff --git a/src/MANYBODY/pair_gw.cpp b/src/MANYBODY/pair_gw.cpp new file mode 100644 index 0000000000..e4090dbed2 --- /dev/null +++ b/src/MANYBODY/pair_gw.cpp @@ -0,0 +1,763 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: German Samolyuk (ORNL) + based on PairTersoff by Aidan Thompson (SNL) +------------------------------------------------------------------------- */ + +#include +#include +#include +#include +#include "pair_gw.h" +#include "atom.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "force.h" +#include "comm.h" +#include "memory.h" +#include "error.h" + +#include "math_const.h" + +using namespace LAMMPS_NS; +using namespace MathConst; + +#define MAXLINE 1024 +#define DELTA 4 + +/* ---------------------------------------------------------------------- */ + +PairGW::PairGW(LAMMPS *lmp) : Pair(lmp) +{ + single_enable = 0; + restartinfo = 0; + one_coeff = 1; + manybody_flag = 1; + + nelements = 0; + elements = NULL; + nparams = maxparam = 0; + params = NULL; + elem2param = NULL; + map = NULL; +} + +/* ---------------------------------------------------------------------- + check if allocated, since class can be destructed when incomplete +------------------------------------------------------------------------- */ + +PairGW::~PairGW() +{ + if (elements) + for (int i = 0; i < nelements; i++) delete [] elements[i]; + delete [] elements; + memory->destroy(params); + memory->destroy(elem2param); + + if (allocated) { + memory->destroy(setflag); + memory->destroy(cutsq); + delete [] map; + } +} + +/* ---------------------------------------------------------------------- */ + +void PairGW::compute(int eflag, int vflag) +{ + int i,j,k,ii,jj,kk,inum,jnum; + int itag,jtag,itype,jtype,ktype,iparam_ij,iparam_ijk; + double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; + double rsq,rsq1,rsq2; + double delr1[3],delr2[3],fi[3],fj[3],fk[3]; + double zeta_ij, prefactor; + int *ilist,*jlist,*numneigh,**firstneigh; + + evdwl = 0.0; + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = vflag_fdotr = vflag_atom = 0; + + double **x = atom->x; + double **f = atom->f; + tagint *tag = atom->tag; + int *type = atom->type; + int nlocal = atom->nlocal; + int newton_pair = force->newton_pair; + + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; + + // loop over full neighbor list of my atoms + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + itag = tag[i]; + itype = map[type[i]]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + + // two-body interactions, skip half of them + + jlist = firstneigh[i]; + jnum = numneigh[i]; + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + jtag = tag[j]; + + if (itag > jtag) { + if ((itag+jtag) % 2 == 0) continue; + } else if (itag < jtag) { + if ((itag+jtag) % 2 == 1) continue; + } else { + if (x[j][2] < x[i][2]) continue; + if (x[j][2] == ztmp && x[j][1] < ytmp) continue; + if (x[j][2] == ztmp && x[j][1] == ytmp && x[j][0] < xtmp) continue; + } + + jtype = map[type[j]]; + + delx = xtmp - x[j][0]; + dely = ytmp - x[j][1]; + delz = ztmp - x[j][2]; + rsq = delx*delx + dely*dely + delz*delz; + + iparam_ij = elem2param[itype][jtype][jtype]; + if (rsq > params[iparam_ij].cutsq) continue; + + repulsive(¶ms[iparam_ij],rsq,fpair,eflag,evdwl); + + f[i][0] += delx*fpair; + f[i][1] += dely*fpair; + f[i][2] += delz*fpair; + f[j][0] -= delx*fpair; + f[j][1] -= dely*fpair; + f[j][2] -= delz*fpair; + + if (evflag) ev_tally(i,j,nlocal,newton_pair, + evdwl,0.0,fpair,delx,dely,delz); + } + + // three-body interactions + // skip immediately if I-J is not within cutoff + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + jtype = map[type[j]]; + iparam_ij = elem2param[itype][jtype][jtype]; + + delr1[0] = x[j][0] - xtmp; + delr1[1] = x[j][1] - ytmp; + delr1[2] = x[j][2] - ztmp; + rsq1 = delr1[0]*delr1[0] + delr1[1]*delr1[1] + delr1[2]*delr1[2]; + if (rsq1 > params[iparam_ij].cutsq) continue; + + // accumulate bondorder zeta for each i-j interaction via loop over k + + zeta_ij = 1.0; + + for (kk = 0; kk < jnum; kk++) { + if (jj == kk) continue; + k = jlist[kk]; + k &= NEIGHMASK; + ktype = map[type[k]]; + iparam_ijk = elem2param[itype][jtype][ktype]; + + delr2[0] = x[k][0] - xtmp; + delr2[1] = x[k][1] - ytmp; + delr2[2] = x[k][2] - ztmp; + rsq2 = delr2[0]*delr2[0] + delr2[1]*delr2[1] + delr2[2]*delr2[2]; + if (rsq2 > params[iparam_ijk].cutsq) continue; + + zeta_ij += zeta(¶ms[iparam_ijk],rsq1,rsq2,delr1,delr2); + } + + // pairwise force due to zeta + + force_zeta(¶ms[iparam_ij],rsq1,zeta_ij,fpair,prefactor,eflag,evdwl); + + f[i][0] += delr1[0]*fpair; + f[i][1] += delr1[1]*fpair; + f[i][2] += delr1[2]*fpair; + f[j][0] -= delr1[0]*fpair; + f[j][1] -= delr1[1]*fpair; + f[j][2] -= delr1[2]*fpair; + + if (evflag) ev_tally(i,j,nlocal,newton_pair, + evdwl,0.0,-fpair,-delr1[0],-delr1[1],-delr1[2]); + + // attractive term via loop over k + + for (kk = 0; kk < jnum; kk++) { + if (jj == kk) continue; + k = jlist[kk]; + k &= NEIGHMASK; + ktype = map[type[k]]; + iparam_ijk = elem2param[itype][jtype][ktype]; + + delr2[0] = x[k][0] - xtmp; + delr2[1] = x[k][1] - ytmp; + delr2[2] = x[k][2] - ztmp; + rsq2 = delr2[0]*delr2[0] + delr2[1]*delr2[1] + delr2[2]*delr2[2]; + if (rsq2 > params[iparam_ijk].cutsq) continue; + + attractive(¶ms[iparam_ijk],prefactor, + rsq1,rsq2,delr1,delr2,fi,fj,fk); + + f[i][0] += fi[0]; + f[i][1] += fi[1]; + f[i][2] += fi[2]; + f[j][0] += fj[0]; + f[j][1] += fj[1]; + f[j][2] += fj[2]; + f[k][0] += fk[0]; + f[k][1] += fk[1]; + f[k][2] += fk[2]; + + if (vflag_atom) v_tally3(i,j,k,fj,fk,delr1,delr2); + } // kk + } // jj + } // ii + + if (vflag_fdotr) virial_fdotr_compute(); +} + +/* ---------------------------------------------------------------------- */ + +void PairGW::allocate() +{ + allocated = 1; + int n = atom->ntypes; + + memory->create(setflag,n+1,n+1,"pair:setflag"); + memory->create(cutsq,n+1,n+1,"pair:cutsq"); + + map = new int[n+1]; +} + +/* ---------------------------------------------------------------------- + global settings +------------------------------------------------------------------------- */ + +void PairGW::settings(int narg, char **arg) +{ + if (narg != 0) error->all(FLERR,"Illegal pair_style command"); +} + +/* ---------------------------------------------------------------------- + set coeffs for one or more type pairs +------------------------------------------------------------------------- */ + +void PairGW::coeff(int narg, char **arg) +{ + int i,j,n; + + if (!allocated) allocate(); + + if (narg != 3 + atom->ntypes) + error->all(FLERR,"Incorrect args for pair coefficients"); + + // insure I,J args are * * + + if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) + error->all(FLERR,"Incorrect args for pair coefficients"); + + // read args that map atom types to elements in potential file + // map[i] = which element the Ith atom type is, -1 if NULL + // nelements = # of unique elements + // elements = list of element names + + if (elements) { + for (i = 0; i < nelements; i++) delete [] elements[i]; + delete [] elements; + } + elements = new char*[atom->ntypes]; + for (i = 0; i < atom->ntypes; i++) elements[i] = NULL; + + nelements = 0; + for (i = 3; i < narg; i++) { + if (strcmp(arg[i],"NULL") == 0) { + map[i-2] = -1; + continue; + } + for (j = 0; j < nelements; j++) + if (strcmp(arg[i],elements[j]) == 0) break; + map[i-2] = j; + if (j == nelements) { + n = strlen(arg[i]) + 1; + elements[j] = new char[n]; + strcpy(elements[j],arg[i]); + nelements++; + } + } + + // read potential file and initialize potential parameters + + read_file(arg[2]); + setup_params(); + + // clear setflag since coeff() called once with I,J = * * + + n = atom->ntypes; + for (i = 1; i <= n; i++) + for (j = i; j <= n; j++) + setflag[i][j] = 0; + + // set setflag i,j for type pairs where both are mapped to elements + + int count = 0; + for (i = 1; i <= n; i++) + for (j = i; j <= n; j++) + if (map[i] >= 0 && map[j] >= 0) { + setflag[i][j] = 1; + count++; + } + + if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); +} + +/* ---------------------------------------------------------------------- + init specific to this pair style +------------------------------------------------------------------------- */ + +void PairGW::init_style() +{ + if (atom->tag_enable == 0) + error->all(FLERR,"Pair style GW requires atom IDs"); + if (force->newton_pair == 0) + error->all(FLERR,"Pair style GW requires newton pair on"); + + // need a full neighbor list + + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->half = 0; + neighbor->requests[irequest]->full = 1; +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +double PairGW::init_one(int i, int j) +{ + if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + + return cutmax; +} + +/* ---------------------------------------------------------------------- */ + +void PairGW::read_file(char *file) +{ + int params_per_line = 17; + char **words = new char*[params_per_line+1]; + + memory->sfree(params); + params = NULL; + nparams = maxparam = 0; + + // open file on proc 0 + + FILE *fp; + if (comm->me == 0) { + fp = force->open_potential(file); + if (fp == NULL) { + char str[128]; + sprintf(str,"Cannot open GW potential file %s",file); + error->one(FLERR,str); + } + } + + // read each line out of file, skipping blank lines or leading '#' + // store line of params if all 3 element tags are in element list + + int n,nwords,ielement,jelement,kelement; + char line[MAXLINE],*ptr; + int eof = 0; + + while (1) { + if (comm->me == 0) { + ptr = fgets(line,MAXLINE,fp); + if (ptr == NULL) { + eof = 1; + fclose(fp); + } else n = strlen(line) + 1; + } + MPI_Bcast(&eof,1,MPI_INT,0,world); + if (eof) break; + MPI_Bcast(&n,1,MPI_INT,0,world); + MPI_Bcast(line,n,MPI_CHAR,0,world); + + // strip comment, skip line if blank + + if ((ptr = strchr(line,'#'))) *ptr = '\0'; + nwords = atom->count_words(line); + if (nwords == 0) continue; + + // concatenate additional lines until have params_per_line words + + while (nwords < params_per_line) { + n = strlen(line); + if (comm->me == 0) { + ptr = fgets(&line[n],MAXLINE-n,fp); + if (ptr == NULL) { + eof = 1; + fclose(fp); + } else n = strlen(line) + 1; + } + MPI_Bcast(&eof,1,MPI_INT,0,world); + if (eof) break; + MPI_Bcast(&n,1,MPI_INT,0,world); + MPI_Bcast(line,n,MPI_CHAR,0,world); + if ((ptr = strchr(line,'#'))) *ptr = '\0'; + nwords = atom->count_words(line); + } + + if (nwords != params_per_line) + error->all(FLERR,"Incorrect format in GW potential file"); + + // words = ptrs to all words in line + + nwords = 0; + words[nwords++] = strtok(line," \t\n\r\f"); + while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue; + + // ielement,jelement,kelement = 1st args + // if all 3 args are in element list, then parse this line + // else skip to next line + + for (ielement = 0; ielement < nelements; ielement++) + if (strcmp(words[0],elements[ielement]) == 0) break; + if (ielement == nelements) continue; + for (jelement = 0; jelement < nelements; jelement++) + if (strcmp(words[1],elements[jelement]) == 0) break; + if (jelement == nelements) continue; + for (kelement = 0; kelement < nelements; kelement++) + if (strcmp(words[2],elements[kelement]) == 0) break; + if (kelement == nelements) continue; + + // load up parameter settings and error check their values + + if (nparams == maxparam) { + maxparam += DELTA; + params = (Param *) memory->srealloc(params,maxparam*sizeof(Param), + "pair:params"); + } + + params[nparams].ielement = ielement; + params[nparams].jelement = jelement; + params[nparams].kelement = kelement; + params[nparams].powerm = atof(words[3]); + params[nparams].gamma = atof(words[4]); + params[nparams].lam3 = atof(words[5]); + params[nparams].c = atof(words[6]); + params[nparams].d = atof(words[7]); + params[nparams].h = atof(words[8]); + params[nparams].powern = atof(words[9]); + params[nparams].beta = atof(words[10]); + params[nparams].lam2 = atof(words[11]); + params[nparams].bigb = atof(words[12]); + params[nparams].bigr = atof(words[13]); + params[nparams].bigd = atof(words[14]); + params[nparams].lam1 = atof(words[15]); + params[nparams].biga = atof(words[16]); + + // currently only allow m exponent of 1 or 3 + + params[nparams].powermint = int(params[nparams].powerm); + + if (params[nparams].c < 0.0 || params[nparams].d < 0.0 || + params[nparams].powern < 0.0 || params[nparams].beta < 0.0 || + params[nparams].lam2 < 0.0 || params[nparams].bigb < 0.0 || + params[nparams].bigr < 0.0 ||params[nparams].bigd < 0.0 || + params[nparams].bigd > params[nparams].bigr || + params[nparams].lam1 < 0.0 || params[nparams].biga < 0.0 || + params[nparams].powerm - params[nparams].powermint != 0.0 || + (params[nparams].powermint != 3 && params[nparams].powermint != 1) || + params[nparams].gamma < 0.0) + error->all(FLERR,"Illegal GW parameter"); + + nparams++; + } + + delete [] words; +} + +/* ---------------------------------------------------------------------- */ + +void PairGW::setup_params() +{ + int i,j,k,m,n; + + // set elem2param for all element triplet combinations + // must be a single exact match to lines read from file + // do not allow for ACB in place of ABC + + memory->destroy(elem2param); + memory->create(elem2param,nelements,nelements,nelements,"pair:elem2param"); + + for (i = 0; i < nelements; i++) + for (j = 0; j < nelements; j++) + for (k = 0; k < nelements; k++) { + n = -1; + for (m = 0; m < nparams; m++) { + if (i == params[m].ielement && j == params[m].jelement && + k == params[m].kelement) { + if (n >= 0) error->all(FLERR,"Potential file has duplicate entry"); + n = m; + } + } + if (n < 0) error->all(FLERR,"Potential file is missing an entry"); + elem2param[i][j][k] = n; + } + + + // compute parameter values derived from inputs + + for (m = 0; m < nparams; m++) { + params[m].cut = params[m].bigr + params[m].bigd; + params[m].cutsq = params[m].cut*params[m].cut; + + params[m].c1 = pow(2.0*params[m].powern*1.0e-16,-1.0/params[m].powern); + params[m].c2 = pow(2.0*params[m].powern*1.0e-8,-1.0/params[m].powern); + params[m].c3 = 1.0/params[m].c2; + params[m].c4 = 1.0/params[m].c1; + } + + // set cutmax to max of all params + + cutmax = 0.0; + for (m = 0; m < nparams; m++) + if (params[m].cut > cutmax) cutmax = params[m].cut; +} + +/* ---------------------------------------------------------------------- */ + +void PairGW::repulsive(Param *param, double rsq, double &fforce, + int eflag, double &eng) +{ + double r,tmp_fc,tmp_fc_d,tmp_exp; + + r = sqrt(rsq); + tmp_fc = gw_fc(r,param); + tmp_fc_d = gw_fc_d(r,param); + tmp_exp = exp(-param->lam1 * r); + fforce = -param->biga * tmp_exp * (tmp_fc_d - tmp_fc*param->lam1) / r; + if (eflag) eng = tmp_fc * param->biga * tmp_exp; +} + +/* ---------------------------------------------------------------------- */ + +double PairGW::zeta(Param *param, double rsqij, double rsqik, + double *delrij, double *delrik) +{ + double rij,rik,costheta,arg,ex_delr; + + rij = sqrt(rsqij); + rik = sqrt(rsqik); + costheta = (delrij[0]*delrik[0] + delrij[1]*delrik[1] + + delrij[2]*delrik[2]) / (rij*rik); + + if (param->powermint == 3) arg = pow(param->lam3 * (rij-rik),3.0); + else arg = param->lam3 * (rij-rik); + + if (arg > 69.0776) ex_delr = 1.e30; + else if (arg < -69.0776) ex_delr = 0.0; + else ex_delr = exp(arg); + + return gw_fc(rik,param) * gw_gijk(costheta,param) * ex_delr; +} + +/* ---------------------------------------------------------------------- */ + +void PairGW::force_zeta(Param *param_i, double rsq, double zeta_ij, + double &fforce, double &prefactor, + int eflag, double &eng) +{ + double r,fa,fa_d,bij; + + r = sqrt(rsq); + fa = gw_fa(r,param_i); + fa_d = gw_fa_d(r,param_i); + bij = gw_bij(zeta_ij,param_i); + fforce = 0.5*bij*fa_d / r; + prefactor = -0.5*fa * gw_bij_d(zeta_ij,param_i); + if (eflag) eng = 0.5*bij*fa; +} + +/* ---------------------------------------------------------------------- + attractive term + use param_ij cutoff for rij test + use param_ijk cutoff for rik test +------------------------------------------------------------------------- */ + +void PairGW::attractive(Param *param, double prefactor, + double rsqij, double rsqik, + double *delrij, double *delrik, + double *fi, double *fj, double *fk) +{ + double rij_hat[3],rik_hat[3]; + double rij,rijinv,rik,rikinv; + + rij = sqrt(rsqij); + rijinv = 1.0/rij; + vec3_scale(rijinv,delrij,rij_hat); + + rik = sqrt(rsqik); + rikinv = 1.0/rik; + vec3_scale(rikinv,delrik,rik_hat); + + gw_zetaterm_d(prefactor,rij_hat,rij,rik_hat,rik,fi,fj,fk,param); +} + +/* ---------------------------------------------------------------------- */ + +double PairGW::gw_fc(double r, Param *param) +{ + double gw_R = param->bigr; + double gw_D = param->bigd; + + if (r < gw_R-gw_D) return 1.0; + if (r > gw_R+gw_D) return 0.0; + return 0.5*(1.0 - sin(MY_PI2*(r - gw_R)/gw_D)); +} + +/* ---------------------------------------------------------------------- */ + +double PairGW::gw_fc_d(double r, Param *param) +{ + double gw_R = param->bigr; + double gw_D = param->bigd; + + if (r < gw_R-gw_D) return 0.0; + if (r > gw_R+gw_D) return 0.0; + return -(MY_PI4/gw_D) * cos(MY_PI2*(r - gw_R)/gw_D); +} + +/* ---------------------------------------------------------------------- */ + +double PairGW::gw_fa(double r, Param *param) +{ + if (r > param->bigr + param->bigd) return 0.0; + return -param->bigb * exp(-param->lam2 * r) * gw_fc(r,param); +} + +/* ---------------------------------------------------------------------- */ + +double PairGW::gw_fa_d(double r, Param *param) +{ + if (r > param->bigr + param->bigd) return 0.0; + return param->bigb * exp(-param->lam2 * r) * + (param->lam2 * gw_fc(r,param) - gw_fc_d(r,param)); +} + +/* ---------------------------------------------------------------------- */ + +double PairGW::gw_bij(double zeta_ij, Param *param_i) +{ + double tmp = param_i->beta * zeta_ij; + return pow(tmp,-param_i->powern); +} + +/* ---------------------------------------------------------------------- */ + +double PairGW::gw_bij_d(double zeta_ij, Param *param_i) +{ + double tmp = param_i->beta * zeta_ij; + return - param_i->powern * pow(tmp,-param_i->powern-1)*tmp / zeta_ij; +} + +/* ---------------------------------------------------------------------- */ + +void PairGW::gw_zetaterm_d(double prefactor, + double *rij_hat, double rij, + double *rik_hat, double rik, + double *dri, double *drj, double *drk, + Param *param) +{ + double gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta,tmp; + double dcosdri[3],dcosdrj[3],dcosdrk[3]; + + fc = gw_fc(rik,param); + dfc = gw_fc_d(rik,param); + if (param->powermint == 3) tmp = pow(param->lam3 * (rij-rik),3.0); + else tmp = param->lam3 * (rij-rik); + + if (tmp > 69.0776) ex_delr = 1.e30; + else if (tmp < -69.0776) ex_delr = 0.0; + else ex_delr = exp(tmp); + + if (param->powermint == 3) + ex_delr_d = 3.0*pow(param->lam3,3.0) * pow(rij-rik,2.0)*ex_delr; + else ex_delr_d = param->lam3 * ex_delr; + + cos_theta = vec3_dot(rij_hat,rik_hat); + gijk = gw_gijk(cos_theta,param); + gijk_d = gw_gijk_d(cos_theta,param); + costheta_d(rij_hat,rij,rik_hat,rik,dcosdri,dcosdrj,dcosdrk); + + // compute the derivative wrt Ri + // dri = -dfc*gijk*ex_delr*rik_hat; + // dri += fc*gijk_d*ex_delr*dcosdri; + // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); + + vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); + vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,dri,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,dri); + vec3_scale(prefactor,dri,dri); + + // compute the derivative wrt Rj + // drj = fc*gijk_d*ex_delr*dcosdrj; + // drj += fc*gijk*ex_delr_d*rij_hat; + + vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,drj); + vec3_scale(prefactor,drj,drj); + + // compute the derivative wrt Rk + // drk = dfc*gijk*ex_delr*rik_hat; + // drk += fc*gijk_d*ex_delr*dcosdrk; + // drk += -fc*gijk*ex_delr_d*rik_hat; + + vec3_scale(dfc*gijk*ex_delr,rik_hat,drk); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,drk); + vec3_scale(prefactor,drk,drk); +} + +/* ---------------------------------------------------------------------- */ + +void PairGW::costheta_d(double *rij_hat, double rij, + double *rik_hat, double rik, + double *dri, double *drj, double *drk) +{ + // first element is devative wrt Ri, second wrt Rj, third wrt Rk + + double cos_theta = vec3_dot(rij_hat,rik_hat); + + vec3_scaleadd(-cos_theta,rij_hat,rik_hat,drj); + vec3_scale(1.0/rij,drj,drj); + vec3_scaleadd(-cos_theta,rik_hat,rij_hat,drk); + vec3_scale(1.0/rik,drk,drk); + vec3_add(drj,drk,dri); + vec3_scale(-1.0,dri,dri); +} diff --git a/src/MANYBODY/pair_gw.h b/src/MANYBODY/pair_gw.h new file mode 100644 index 0000000000..eedc2a1f9f --- /dev/null +++ b/src/MANYBODY/pair_gw.h @@ -0,0 +1,196 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS + +PairStyle(gw,PairGW) + +#else + +#ifndef LMP_PAIR_GW_H +#define LMP_PAIR_GW_H + +#include "pair.h" + +namespace LAMMPS_NS { + +class PairGW : public Pair { + public: + PairGW(class LAMMPS *); + virtual ~PairGW(); + virtual void compute(int, int); + void settings(int, char **); + void coeff(int, char **); + void init_style(); + double init_one(int, int); + + protected: + struct Param { + double lam1,lam2,lam3; + double c,d,h; + double gamma,powerm; + double powern,beta; + double biga,bigb,bigd,bigr; + double cut,cutsq; + double c1,c2,c3,c4; + int ielement,jelement,kelement; + int powermint; + double Z_i,Z_j; + double ZBLcut,ZBLexpscale; + }; + + Param *params; // parameter set for an I-J-K interaction + char **elements; // names of unique elements + int ***elem2param; // mapping from element triplets to paramegw + int *map; // mapping from atom types to elements + double cutmax; // max cutoff for all elements + int nelements; // # of unique elements + int nparams; // # of stored parameter sets + int maxparam; // max # of parameter sets + + int **pages; // neighbor list pages + int maxlocal; // size of numneigh, firstneigh arrays + int maxpage; // # of pages currently allocated + int pgsize; // size of neighbor page + int oneatom; // max # of neighbors for one atom + + + int *GW_numneigh; // # of pair neighbors for each atom + int **GW_firstneigh; // ptr to 1st neighbor of each atom + + void GW_neigh(); + void add_pages(int howmany = 1); + + void allocate(); + virtual void read_file(char *); + void setup_params(); + virtual void repulsive(Param *, double, double &, int, double &); + double zeta(Param *, double, double, double *, double *); + virtual void force_zeta(Param *, double, double, double &, + double &, int, double &); + void attractive(Param *, double, double, double, double *, double *, + double *, double *, double *); + + double gw_fc(double, Param *); + double gw_fc_d(double, Param *); + virtual double gw_fa(double, Param *); + virtual double gw_fa_d(double, Param *); + double gw_bij(double, Param *); + double gw_bij_d(double, Param *); + + void gw_zetaterm_d(double, double *, double, double *, double, + double *, double *, double *, Param *); + void costheta_d(double *, double, double *, double, + double *, double *, double *); + + // inlined functions for efficiency + + inline double gw_gijk(const double costheta, + const Param * const param) const { + const double gw_c = param->c * param->c; + const double gw_d = param->d * param->d; + const double hcth = param->h - costheta; + + //printf("gw_gijk: gw_c=%f gw_d=%f hcth=%f=%f-%f\n", gw_c, gw_d, hcth, param->h, costheta); + + return param->gamma*(1.0 + gw_c/gw_d - gw_c / (gw_d + hcth*hcth)); + } + + inline double gw_gijk_d(const double costheta, + const Param * const param) const { + const double gw_c = param->c * param->c; + const double gw_d = param->d * param->d; + const double hcth = param->h - costheta; + const double numerator = -2.0 * gw_c * hcth; + const double denominator = 1.0/(gw_d + hcth*hcth); + return param->gamma*numerator*denominator*denominator; + } + + inline double vec3_dot(const double x[3], const double y[3]) const { + return x[0]*y[0] + x[1]*y[1] + x[2]*y[2]; + } + + inline void vec3_add(const double x[3], const double y[3], + double * const z) const { + z[0] = x[0]+y[0]; z[1] = x[1]+y[1]; z[2] = x[2]+y[2]; + } + + inline void vec3_scale(const double k, const double x[3], + double y[3]) const { + y[0] = k*x[0]; y[1] = k*x[1]; y[2] = k*x[2]; + } + + inline void vec3_scaleadd(const double k, const double x[3], + const double y[3], double * const z) const { + z[0] = k*x[0]+y[0]; + z[1] = k*x[1]+y[1]; + z[2] = k*x[2]+y[2]; + } +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +E: Incorrect args for pair coefficients + +Self-explanatory. Check the input script or data file. + +E: Pair style GW requires atom IDs + +This is a requirement to use the GW potential. + +E: Pair style GW requires newton pair on + +See the newton command. This is a restriction to use the GW +potential. + +E: All pair coeffs are not set + +All pair coefficients must be set in the data file or by the +pair_coeff command before running a simulation. + +E: Cannot open GW potential file %s + +The specified GW potential file cannot be opened. Check that the +path and name are correct. + +E: Incorrect format in GW potential file + +Incorrect number of words per line in the potential file. + +E: Illegal GW parameter + +One or more of the coefficients defined in the potential file is +invalid. + +E: Potential file has duplicate entry + +The potential file for a SW or GW potential has more than +one entry for the same 3 ordered elements. + +E: Potential file is missing an entry + +The potential file for a SW or GW potential does not have a +needed entry. + +*/ diff --git a/src/MANYBODY/pair_gw_zbl.cpp b/src/MANYBODY/pair_gw_zbl.cpp new file mode 100644 index 0000000000..a4e1ccb1f9 --- /dev/null +++ b/src/MANYBODY/pair_gw_zbl.cpp @@ -0,0 +1,287 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: German Samolyuk (ORNL) + Based on PairTersoffZBL by Aidan Thompson (SNL) and David Farrell (NWU) +------------------------------------------------------------------------- */ + +#include +#include +#include +#include +#include "pair_gw_zbl.h" +#include "atom.h" +#include "update.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "force.h" +#include "comm.h" +#include "memory.h" +#include "error.h" + +#include "math_const.h" +using namespace LAMMPS_NS; +using namespace MathConst; + +#define MAXLINE 1024 +#define DELTA 4 + +/* ---------------------------------------------------------------------- */ + +PairGWZBL::PairGWZBL(LAMMPS *lmp) : PairGW(lmp) +{ + // hard-wired constants in metal or real units + // a0 = Bohr radius + // epsilon0 = permittivity of vacuum = q / energy-distance units + // e = unit charge + // 1 Kcal/mole = 0.043365121 eV + + if (strcmp(update->unit_style,"metal") == 0) { + global_a_0 = 0.529; + global_epsilon_0 = 0.00552635; + global_e = 1.0; + } else if (strcmp(update->unit_style,"real") == 0) { + global_a_0 = 0.529; + global_epsilon_0 = 0.00552635 * 0.043365121; + global_e = 1.0; + } else error->all(FLERR,"Pair gw/zbl requires metal or real units"); +} + +/* ---------------------------------------------------------------------- */ + +void PairGWZBL::read_file(char *file) +{ + int params_per_line = 21; + char **words = new char*[params_per_line+1]; + + memory->sfree(params); + params = NULL; + nparams = maxparam = 0; + + // open file on proc 0 + + FILE *fp; + if (comm->me == 0) { + fp = force->open_potential(file); + if (fp == NULL) { + char str[128]; + sprintf(str,"Cannot open GW potential file %s",file); + error->one(FLERR,str); + } + } + + // read each line out of file, skipping blank lines or leading '#' + // store line of params if all 3 element tags are in element list + + int n,nwords,ielement,jelement,kelement; + char line[MAXLINE],*ptr; + int eof = 0; + + while (1) { + if (comm->me == 0) { + ptr = fgets(line,MAXLINE,fp); + if (ptr == NULL) { + eof = 1; + fclose(fp); + } else n = strlen(line) + 1; + } + MPI_Bcast(&eof,1,MPI_INT,0,world); + if (eof) break; + MPI_Bcast(&n,1,MPI_INT,0,world); + MPI_Bcast(line,n,MPI_CHAR,0,world); + + // strip comment, skip line if blank + + if ((ptr = strchr(line,'#'))) *ptr = '\0'; + nwords = atom->count_words(line); + if (nwords == 0) continue; + + // concatenate additional lines until have params_per_line words + + while (nwords < params_per_line) { + n = strlen(line); + if (comm->me == 0) { + ptr = fgets(&line[n],MAXLINE-n,fp); + if (ptr == NULL) { + eof = 1; + fclose(fp); + } else n = strlen(line) + 1; + } + MPI_Bcast(&eof,1,MPI_INT,0,world); + if (eof) break; + MPI_Bcast(&n,1,MPI_INT,0,world); + MPI_Bcast(line,n,MPI_CHAR,0,world); + if ((ptr = strchr(line,'#'))) *ptr = '\0'; + nwords = atom->count_words(line); + } + + if (nwords != params_per_line) + error->all(FLERR,"Incorrect format in GW potential file"); + + // words = ptrs to all words in line + + nwords = 0; + words[nwords++] = strtok(line," \t\n\r\f"); + while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue; + + // ielement,jelement,kelement = 1st args + // if all 3 args are in element list, then parse this line + // else skip to next line + + for (ielement = 0; ielement < nelements; ielement++) + if (strcmp(words[0],elements[ielement]) == 0) break; + if (ielement == nelements) continue; + for (jelement = 0; jelement < nelements; jelement++) + if (strcmp(words[1],elements[jelement]) == 0) break; + if (jelement == nelements) continue; + for (kelement = 0; kelement < nelements; kelement++) + if (strcmp(words[2],elements[kelement]) == 0) break; + if (kelement == nelements) continue; + + // load up parameter settings and error check their values + + if (nparams == maxparam) { + maxparam += DELTA; + params = (Param *) memory->srealloc(params,maxparam*sizeof(Param), + "pair:params"); + } + + params[nparams].ielement = ielement; + params[nparams].jelement = jelement; + params[nparams].kelement = kelement; + params[nparams].powerm = atof(words[3]); + params[nparams].gamma = atof(words[4]); + params[nparams].lam3 = atof(words[5]); + params[nparams].c = atof(words[6]); + params[nparams].d = atof(words[7]); + params[nparams].h = atof(words[8]); + params[nparams].powern = atof(words[9]); + params[nparams].beta = atof(words[10]); + params[nparams].lam2 = atof(words[11]); + params[nparams].bigb = atof(words[12]); + params[nparams].bigr = atof(words[13]); + params[nparams].bigd = atof(words[14]); + params[nparams].lam1 = atof(words[15]); + params[nparams].biga = atof(words[16]); + params[nparams].Z_i = atof(words[17]); + params[nparams].Z_j = atof(words[18]); + params[nparams].ZBLcut = atof(words[19]); + params[nparams].ZBLexpscale = atof(words[20]); + + // currently only allow m exponent of 1 or 3 + + params[nparams].powermint = int(params[nparams].powerm); + + if ( + params[nparams].lam3 < 0.0 || params[nparams].c < 0.0 || + params[nparams].d < 0.0 || params[nparams].powern < 0.0 || + params[nparams].beta < 0.0 || params[nparams].lam2 < 0.0 || + params[nparams].bigb < 0.0 || params[nparams].bigr < 0.0 || + params[nparams].bigd < 0.0 || + params[nparams].bigd > params[nparams].bigr || + params[nparams].lam3 < 0.0 || params[nparams].biga < 0.0 || + params[nparams].powerm - params[nparams].powermint != 0.0 || + (params[nparams].powermint != 3 && params[nparams].powermint != 1) || + params[nparams].gamma < 0.0 || + params[nparams].Z_i < 1.0 || params[nparams].Z_j < 1.0 || + params[nparams].ZBLcut < 0.0 || params[nparams].ZBLexpscale < 0.0) + error->all(FLERR,"Illegal GW parameter"); + + nparams++; + } + + delete [] words; +} + +/* ---------------------------------------------------------------------- */ + +void PairGWZBL::repulsive(Param *param, double rsq, double &fforce, + int eflag, double &eng) +{ + double r,tmp_fc,tmp_fc_d,tmp_exp; + + // GW repulsive portion + + r = sqrt(rsq); + tmp_fc = gw_fc(r,param); + tmp_fc_d = gw_fc_d(r,param); + tmp_exp = exp(-param->lam1 * r); + double fforce_gw = param->biga * tmp_exp * (tmp_fc_d - tmp_fc*param->lam1); + double eng_gw = tmp_fc * param->biga * tmp_exp; + + // ZBL repulsive portion + + double esq = pow(global_e,2.0); + double a_ij = (0.8854*global_a_0) / + (pow(param->Z_i,0.23) + pow(param->Z_j,0.23)); + double premult = (param->Z_i * param->Z_j * esq)/(4.0*MY_PI*global_epsilon_0); + double r_ov_a = r/a_ij; + double phi = 0.1818*exp(-3.2*r_ov_a) + 0.5099*exp(-0.9423*r_ov_a) + + 0.2802*exp(-0.4029*r_ov_a) + 0.02817*exp(-0.2016*r_ov_a); + double dphi = (1.0/a_ij) * (-3.2*0.1818*exp(-3.2*r_ov_a) - + 0.9423*0.5099*exp(-0.9423*r_ov_a) - + 0.4029*0.2802*exp(-0.4029*r_ov_a) - + 0.2016*0.02817*exp(-0.2016*r_ov_a)); + double fforce_ZBL = premult*-phi/rsq + premult*dphi/r; + double eng_ZBL = premult*(1.0/r)*phi; + + // combine two parts with smoothing by Fermi-like function + + fforce = -(-F_fermi_d(r,param) * eng_ZBL + + (1.0 - F_fermi(r,param))*fforce_ZBL + + F_fermi_d(r,param)*eng_gw + F_fermi(r,param)*fforce_gw) / r; + + if (eflag) + eng = (1.0 - F_fermi(r,param))*eng_ZBL + F_fermi(r,param)*eng_gw; +} + +/* ---------------------------------------------------------------------- */ + +double PairGWZBL::gw_fa(double r, Param *param) +{ + if (r > param->bigr + param->bigd) return 0.0; + return -param->bigb * exp(-param->lam2 * r) * gw_fc(r,param) * + F_fermi(r,param); +} + +/* ---------------------------------------------------------------------- */ + +double PairGWZBL::gw_fa_d(double r, Param *param) +{ + if (r > param->bigr + param->bigd) return 0.0; + return param->bigb * exp(-param->lam2 * r) * + (param->lam2 * gw_fc(r,param) * F_fermi(r,param) - + gw_fc_d(r,param) * F_fermi(r,param) - gw_fc(r,param) * + F_fermi_d(r,param)); +} + +/* ---------------------------------------------------------------------- + Fermi-like smoothing function +------------------------------------------------------------------------- */ + +double PairGWZBL::F_fermi(double r, Param *param) +{ + return 1.0 / (1.0 + exp(-param->ZBLexpscale*(r-param->ZBLcut))); +} + +/* ---------------------------------------------------------------------- + Fermi-like smoothing function derivative with respect to r +------------------------------------------------------------------------- */ + +double PairGWZBL::F_fermi_d(double r, Param *param) +{ + return param->ZBLexpscale*exp(-param->ZBLexpscale*(r-param->ZBLcut)) / + pow(1.0 + exp(-param->ZBLexpscale*(r-param->ZBLcut)),2.0); +} diff --git a/src/MANYBODY/pair_gw_zbl.h b/src/MANYBODY/pair_gw_zbl.h new file mode 100644 index 0000000000..0ed7f1de56 --- /dev/null +++ b/src/MANYBODY/pair_gw_zbl.h @@ -0,0 +1,72 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS + +PairStyle(gw/zbl,PairGWZBL) + +#else + +#ifndef LMP_PAIR_GW_ZBL_H +#define LMP_PAIR_GW_ZBL_H + +#include "pair_gw.h" + +namespace LAMMPS_NS { + +class PairGWZBL : public PairGW { + public: + PairGWZBL(class LAMMPS *); + ~PairGWZBL() {} + + private: + double global_a_0; // Bohr radius for Coulomb repulsion + double global_epsilon_0; // permittivity of vacuum for Coulomb repulsion + double global_e; // proton charge (negative of electron charge) + + void read_file(char *); + void repulsive(Param *, double, double &, int, double &); + + double gw_fa(double, Param *); + double gw_fa_d(double, Param *); + + double F_fermi(double, Param *); + double F_fermi_d(double, Param *); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Pair GW/zbl requires metal or real units + +This is a current restriction of this pair potential. + +E: Cannot open GW potential file %s + +The specified GW potential file cannot be opened. Check that the +path and name are correct. + +E: Incorrect format in GW potential file + +Incorrect number of words per line in the potential file. + +E: Illegal GW parameter + +One or more of the coefficients defined in the potential file is +invalid. + +*/ -- GitLab From 69ccbd1562525f6825db4a0a1674c835b5290398 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 15 May 2017 17:45:36 -0400 Subject: [PATCH 129/593] Extract common wrappers to Python compatibility header --- src/.gitignore | 1 + src/PYTHON/fix_python.cpp | 12 +++++------- src/PYTHON/pair_python.cpp | 17 +---------------- src/PYTHON/python_compat.h | 33 +++++++++++++++++++++++++++++++++ src/PYTHON/python_impl.cpp | 20 +++++--------------- 5 files changed, 45 insertions(+), 38 deletions(-) create mode 100644 src/PYTHON/python_compat.h diff --git a/src/.gitignore b/src/.gitignore index 6171b29af9..4e5f7d9ebc 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -850,6 +850,7 @@ /prd.h /python_impl.cpp /python_impl.h +/python_compat.h /fix_python.cpp /fix_python.h /pair_python.cpp diff --git a/src/PYTHON/fix_python.cpp b/src/PYTHON/fix_python.cpp index 4f437b7488..e1c0dd1fbc 100644 --- a/src/PYTHON/fix_python.cpp +++ b/src/PYTHON/fix_python.cpp @@ -11,6 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- + Contributing author: Axel Kohlmeyer and Richard Berger (Temple U) +------------------------------------------------------------------------- */ + #include #include #include "fix_python.h" @@ -20,17 +24,11 @@ #include "respa.h" #include "error.h" #include "python.h" +#include "python_compat.h" using namespace LAMMPS_NS; using namespace FixConst; -// Wrap API changes between Python 2 and 3 using macros -#if PY_MAJOR_VERSION == 2 -#define PY_VOID_POINTER(X) PyCObject_FromVoidPtr((void *) X, NULL) -#elif PY_MAJOR_VERSION == 3 -#define PY_VOID_POINTER(X) PyCapsule_New((void *) X, NULL, NULL) -#endif - /* ---------------------------------------------------------------------- */ FixPython::FixPython(LAMMPS *lmp, int narg, char **arg) : diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 1d37a9fd06..485efee58d 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -27,25 +27,10 @@ #include "neigh_list.h" #include "python.h" #include "error.h" +#include "python_compat.h" using namespace LAMMPS_NS; -// Wrap API changes between Python 2 and 3 using macros -#if PY_MAJOR_VERSION == 2 -#define PY_INT_FROM_LONG(X) PyInt_FromLong(X) -#define PY_INT_AS_LONG(X) PyInt_AsLong(X) -#define PY_STRING_FROM_STRING(X) PyString_FromString(X) -#define PY_VOID_POINTER(X) PyCObject_FromVoidPtr((void *) X, NULL) -#define PY_STRING_AS_STRING(X) PyString_AsString(X) - -#elif PY_MAJOR_VERSION == 3 -#define PY_INT_FROM_LONG(X) PyLong_FromLong(X) -#define PY_INT_AS_LONG(X) PyLong_AsLong(X) -#define PY_STRING_FROM_STRING(X) PyUnicode_FromString(X) -#define PY_VOID_POINTER(X) PyCapsule_New((void *) X, NULL, NULL) -#define PY_STRING_AS_STRING(X) PyUnicode_AsUTF8(X) -#endif - /* ---------------------------------------------------------------------- */ PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) { diff --git a/src/PYTHON/python_compat.h b/src/PYTHON/python_compat.h new file mode 100644 index 0000000000..175d797ffa --- /dev/null +++ b/src/PYTHON/python_compat.h @@ -0,0 +1,33 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef LMP_PYTHON_COMPAT_H +#define LMP_PYTHON_COMPAT_H + +// Wrap API changes between Python 2 and 3 using macros +#if PY_MAJOR_VERSION == 2 +#define PY_INT_FROM_LONG(X) PyInt_FromLong(X) +#define PY_INT_AS_LONG(X) PyInt_AsLong(X) +#define PY_STRING_FROM_STRING(X) PyString_FromString(X) +#define PY_VOID_POINTER(X) PyCObject_FromVoidPtr((void *) X, NULL) +#define PY_STRING_AS_STRING(X) PyString_AsString(X) + +#elif PY_MAJOR_VERSION == 3 +#define PY_INT_FROM_LONG(X) PyLong_FromLong(X) +#define PY_INT_AS_LONG(X) PyLong_AsLong(X) +#define PY_STRING_FROM_STRING(X) PyUnicode_FromString(X) +#define PY_VOID_POINTER(X) PyCapsule_New((void *) X, NULL, NULL) +#define PY_STRING_AS_STRING(X) PyUnicode_AsUTF8(X) +#endif + +#endif diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index c66e003228..dadcbfeade 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -11,6 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- + Contributing author: Axel Kohlmeyer and Richard Berger (Temple U) +------------------------------------------------------------------------- */ + #include #include "python.h" #include "force.h" @@ -18,6 +22,7 @@ #include "variable.h" #include "memory.h" #include "error.h" +#include "python_compat.h" using namespace LAMMPS_NS; @@ -25,21 +30,6 @@ enum{NONE,INT,DOUBLE,STRING,PTR}; #define VALUELENGTH 64 // also in variable.cpp -// Wrap API changes between Python 2 and 3 using macros -#if PY_MAJOR_VERSION == 2 -#define PY_INT_FROM_LONG(X) PyInt_FromLong(X) -#define PY_INT_AS_LONG(X) PyInt_AsLong(X) -#define PY_STRING_FROM_STRING(X) PyString_FromString(X) -#define PY_VOID_POINTER(X) PyCObject_FromVoidPtr((void *) X, NULL) -#define PY_STRING_AS_STRING(X) PyString_AsString(X) - -#elif PY_MAJOR_VERSION == 3 -#define PY_INT_FROM_LONG(X) PyLong_FromLong(X) -#define PY_INT_AS_LONG(X) PyLong_AsLong(X) -#define PY_STRING_FROM_STRING(X) PyUnicode_FromString(X) -#define PY_VOID_POINTER(X) PyCapsule_New((void *) X, NULL, NULL) -#define PY_STRING_AS_STRING(X) PyUnicode_AsUTF8(X) -#endif /* ---------------------------------------------------------------------- */ -- GitLab From d66a696a845b62c3dcc19d2e03b38d89f8d09f08 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 18:02:02 -0400 Subject: [PATCH 130/593] avoid preprocessor warnings, by placing Python.h include file on the top, as suggested by python docs --- src/PYTHON/fix_python.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PYTHON/fix_python.cpp b/src/PYTHON/fix_python.cpp index 4f437b7488..a3ff292f9a 100644 --- a/src/PYTHON/fix_python.cpp +++ b/src/PYTHON/fix_python.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include #include "fix_python.h" -- GitLab From 14f3deed6b83917269209d27477ee618fa146e0d Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 15 May 2017 18:43:46 -0400 Subject: [PATCH 131/593] Minor coefficient lookup improvement --- examples/python/lj-melt-potential.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/python/lj-melt-potential.py b/examples/python/lj-melt-potential.py index 41fa073ebd..3d7332faa8 100644 --- a/examples/python/lj-melt-potential.py +++ b/examples/python/lj-melt-potential.py @@ -18,17 +18,19 @@ class LAMMPSLJCutPotential(object): raise Exception("cannot match atom type %s" % name) def compute_force(self,rsq,itype,jtype): + coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj1 = self.coeff[self.pmap[itype]][self.pmap[jtype]][2] - lj2 = self.coeff[self.pmap[itype]][self.pmap[jtype]][3] + lj1 = coeff[2] + lj2 = coeff[3] return (r6inv * (lj1*r6inv - lj2)) def compute_energy(self,rsq,itype,jtype): + coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj3 = self.coeff[self.pmap[itype]][self.pmap[jtype]][4] - lj4 = self.coeff[self.pmap[itype]][self.pmap[jtype]][5] + lj3 = coeff[4] + lj4 = coeff[5] return (r6inv * (lj3*r6inv - lj4)) lammps_pair_style = LAMMPSLJCutPotential() -- GitLab From 51fc386e72246be1878a8b3cb1a98aefe2a356f4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 16 May 2017 00:26:18 -0400 Subject: [PATCH 132/593] correct the inner loop range for resetting cutoffs when redefining a pair style this was reported by frank uhlig on lammps-users for lj/cut, but it applies to many more pair styles --- src/ASPHERE/pair_gayberne.cpp | 2 +- src/ASPHERE/pair_line_lj.cpp | 2 +- src/ASPHERE/pair_resquared.cpp | 2 +- src/ASPHERE/pair_tri_lj.cpp | 2 +- src/BODY/pair_body.cpp | 2 +- src/CLASS2/pair_lj_class2.cpp | 2 +- src/CLASS2/pair_lj_class2_coul_cut.cpp | 2 +- src/CLASS2/pair_lj_class2_coul_long.cpp | 2 +- src/COLLOID/pair_brownian.cpp | 2 +- src/COLLOID/pair_colloid.cpp | 2 +- src/COLLOID/pair_lubricate.cpp | 2 +- src/COLLOID/pair_lubricateU.cpp | 2 +- src/COLLOID/pair_lubricateU_poly.cpp | 2 +- src/DIPOLE/pair_lj_cut_dipole_cut.cpp | 2 +- src/DIPOLE/pair_lj_cut_dipole_long.cpp | 358 +++++++++---------- src/DIPOLE/pair_lj_long_dipole_long.cpp | 26 +- src/KOKKOS/pair_coul_debye_kokkos.cpp | 2 +- src/KSPACE/pair_born_coul_long.cpp | 2 +- src/KSPACE/pair_buck_coul_long.cpp | 2 +- src/KSPACE/pair_buck_long_coul_long.cpp | 2 +- src/KSPACE/pair_lj_cut_coul_long.cpp | 2 +- src/KSPACE/pair_lj_cut_tip4p_long.cpp | 2 +- src/KSPACE/pair_lj_long_coul_long.cpp | 2 +- src/KSPACE/pair_lj_long_tip4p_long.cpp | 4 +- src/MC/pair_dsmc.cpp | 2 +- src/MISC/pair_nm_cut.cpp | 2 +- src/MISC/pair_nm_cut_coul_cut.cpp | 2 +- src/MISC/pair_nm_cut_coul_long.cpp | 2 +- src/MOLECULE/pair_lj_cut_tip4p_cut.cpp | 4 +- src/USER-AWPMD/pair_awpmd_cut.cpp | 12 +- src/USER-CGSDK/pair_lj_sdk.cpp | 2 +- src/USER-CGSDK/pair_lj_sdk_coul_long.cpp | 2 +- src/USER-DPD/pair_dpd_fdt.cpp | 2 +- src/USER-DPD/pair_dpd_fdt_energy.cpp | 2 +- src/USER-DPD/pair_exp6_rx.cpp | 2 +- src/USER-DRUDE/pair_lj_cut_thole_long.cpp | 10 +- src/USER-DRUDE/pair_thole.cpp | 10 +- src/USER-EFF/pair_eff_cut.cpp | 2 +- src/USER-FEP/pair_coul_cut_soft.cpp | 2 +- src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp | 2 +- src/USER-FEP/pair_lj_cut_coul_long_soft.cpp | 2 +- src/USER-FEP/pair_lj_cut_soft.cpp | 2 +- src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp | 2 +- src/USER-FEP/pair_morse_soft.cpp | 2 +- src/USER-MISC/pair_buck_mdf.cpp | 2 +- src/USER-MISC/pair_coul_diel.cpp | 2 +- src/USER-MISC/pair_gauss_cut.cpp | 2 +- src/USER-MISC/pair_kolmogorov_crespi_z.cpp | 2 +- src/USER-MISC/pair_lennard_mdf.cpp | 2 +- src/USER-MISC/pair_lj_mdf.cpp | 2 +- src/USER-MISC/pair_lj_sf.cpp | 2 +- src/USER-MISC/pair_lj_sf_dipole_sf.cpp | 2 +- src/USER-MISC/pair_momb.cpp | 2 +- src/USER-MISC/pair_morse_smooth_linear.cpp | 2 +- src/USER-MISC/pair_srp.cpp | 2 +- src/pair_beck.cpp | 6 +- src/pair_born.cpp | 2 +- src/pair_born_coul_dsf.cpp | 5 +- src/pair_born_coul_wolf.cpp | 2 +- src/pair_buck.cpp | 2 +- src/pair_buck_coul_cut.cpp | 2 +- src/pair_coul_cut.cpp | 2 +- src/pair_coul_debye.cpp | 2 +- src/pair_dpd.cpp | 2 +- src/pair_dpd_tstat.cpp | 2 +- src/pair_gauss.cpp | 2 +- src/pair_lj96_cut.cpp | 2 +- src/pair_lj_cubic.cpp | 10 +- src/pair_lj_cut.cpp | 2 +- src/pair_lj_cut_coul_cut.cpp | 2 +- src/pair_lj_cut_coul_dsf.cpp | 2 +- src/pair_lj_expand.cpp | 2 +- src/pair_lj_gromacs.cpp | 2 +- src/pair_lj_smooth.cpp | 2 +- src/pair_lj_smooth_linear.cpp | 2 +- src/pair_mie_cut.cpp | 2 +- src/pair_morse.cpp | 2 +- src/pair_soft.cpp | 2 +- src/pair_yukawa.cpp | 2 +- 79 files changed, 282 insertions(+), 301 deletions(-) diff --git a/src/ASPHERE/pair_gayberne.cpp b/src/ASPHERE/pair_gayberne.cpp index bdff7a5cd6..25bdae14f1 100644 --- a/src/ASPHERE/pair_gayberne.cpp +++ b/src/ASPHERE/pair_gayberne.cpp @@ -281,7 +281,7 @@ void PairGayBerne::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/ASPHERE/pair_line_lj.cpp b/src/ASPHERE/pair_line_lj.cpp index 4e3df473a3..fc92ed4dc1 100644 --- a/src/ASPHERE/pair_line_lj.cpp +++ b/src/ASPHERE/pair_line_lj.cpp @@ -355,7 +355,7 @@ void PairLineLJ::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/ASPHERE/pair_resquared.cpp b/src/ASPHERE/pair_resquared.cpp index 172516aa49..ed9d9b36c4 100644 --- a/src/ASPHERE/pair_resquared.cpp +++ b/src/ASPHERE/pair_resquared.cpp @@ -253,7 +253,7 @@ void PairRESquared::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/ASPHERE/pair_tri_lj.cpp b/src/ASPHERE/pair_tri_lj.cpp index 773ad2d6a3..4f30b40e9a 100644 --- a/src/ASPHERE/pair_tri_lj.cpp +++ b/src/ASPHERE/pair_tri_lj.cpp @@ -426,7 +426,7 @@ void PairTriLJ::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/BODY/pair_body.cpp b/src/BODY/pair_body.cpp index 2a9edb37cc..b1be997310 100644 --- a/src/BODY/pair_body.cpp +++ b/src/BODY/pair_body.cpp @@ -372,7 +372,7 @@ void PairBody::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/CLASS2/pair_lj_class2.cpp b/src/CLASS2/pair_lj_class2.cpp index ee61aaae1f..e79dc0c6de 100644 --- a/src/CLASS2/pair_lj_class2.cpp +++ b/src/CLASS2/pair_lj_class2.cpp @@ -174,7 +174,7 @@ void PairLJClass2::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/CLASS2/pair_lj_class2_coul_cut.cpp b/src/CLASS2/pair_lj_class2_coul_cut.cpp index 45f0ccfe27..bec7f1da15 100644 --- a/src/CLASS2/pair_lj_class2_coul_cut.cpp +++ b/src/CLASS2/pair_lj_class2_coul_cut.cpp @@ -202,7 +202,7 @@ void PairLJClass2CoulCut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_lj[i][j] = cut_lj_global; cut_coul[i][j] = cut_coul_global; diff --git a/src/CLASS2/pair_lj_class2_coul_long.cpp b/src/CLASS2/pair_lj_class2_coul_long.cpp index b58094713f..5f7d738e92 100644 --- a/src/CLASS2/pair_lj_class2_coul_long.cpp +++ b/src/CLASS2/pair_lj_class2_coul_long.cpp @@ -240,7 +240,7 @@ void PairLJClass2CoulLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/COLLOID/pair_brownian.cpp b/src/COLLOID/pair_brownian.cpp index 84fda485a0..2bf01303b4 100644 --- a/src/COLLOID/pair_brownian.cpp +++ b/src/COLLOID/pair_brownian.cpp @@ -403,7 +403,7 @@ void PairBrownian::settings(int narg, char **arg) if (allocated) { for (int i = 1; i <= atom->ntypes; i++) - for (int j = i+1; j <= atom->ntypes; j++) + for (int j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_inner[i][j] = cut_inner_global; cut[i][j] = cut_global; diff --git a/src/COLLOID/pair_colloid.cpp b/src/COLLOID/pair_colloid.cpp index 440d6f9d4f..68150f6eff 100644 --- a/src/COLLOID/pair_colloid.cpp +++ b/src/COLLOID/pair_colloid.cpp @@ -256,7 +256,7 @@ void PairColloid::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/COLLOID/pair_lubricate.cpp b/src/COLLOID/pair_lubricate.cpp index 71e08f3f19..93cb48a15d 100644 --- a/src/COLLOID/pair_lubricate.cpp +++ b/src/COLLOID/pair_lubricate.cpp @@ -489,7 +489,7 @@ void PairLubricate::settings(int narg, char **arg) if (allocated) { for (int i = 1; i <= atom->ntypes; i++) - for (int j = i+1; j <= atom->ntypes; j++) + for (int j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_inner[i][j] = cut_inner_global; cut[i][j] = cut_global; diff --git a/src/COLLOID/pair_lubricateU.cpp b/src/COLLOID/pair_lubricateU.cpp index a50473a194..5d0a4243a7 100644 --- a/src/COLLOID/pair_lubricateU.cpp +++ b/src/COLLOID/pair_lubricateU.cpp @@ -1707,7 +1707,7 @@ void PairLubricateU::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_inner[i][j] = cut_inner_global; cut[i][j] = cut_global; diff --git a/src/COLLOID/pair_lubricateU_poly.cpp b/src/COLLOID/pair_lubricateU_poly.cpp index 29e192cd94..428aa41cb6 100644 --- a/src/COLLOID/pair_lubricateU_poly.cpp +++ b/src/COLLOID/pair_lubricateU_poly.cpp @@ -1104,7 +1104,7 @@ void PairLubricateUPoly::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_inner[i][j] = cut_inner_global; cut[i][j] = cut_global; diff --git a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp index c57eb09e52..addd02e505 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp @@ -307,7 +307,7 @@ void PairLJCutDipoleCut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_lj[i][j] = cut_lj_global; cut_coul[i][j] = cut_coul_global; diff --git a/src/DIPOLE/pair_lj_cut_dipole_long.cpp b/src/DIPOLE/pair_lj_cut_dipole_long.cpp index ae85b55ff7..78922e356f 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_long.cpp @@ -140,174 +140,174 @@ void PairLJCutDipoleLong::compute(int eflag, int vflag) jtype = type[j]; if (rsq < cutsq[itype][jtype]) { - r2inv = 1.0/rsq; - rinv = sqrt(r2inv); - - if (rsq < cut_coulsq) { - r = sqrt(rsq); - grij = g_ewald * r; - expm2 = exp(-grij*grij); - t = 1.0 / (1.0 + EWALD_P*grij); - erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; - - pdotp = mu[i][0]*mu[j][0] + mu[i][1]*mu[j][1] + mu[i][2]*mu[j][2]; - pidotr = mu[i][0]*delx + mu[i][1]*dely + mu[i][2]*delz; - pjdotr = mu[j][0]*delx + mu[j][1]*dely + mu[j][2]*delz; - - g0 = qtmp*q[j]; - g1 = qtmp*pjdotr - q[j]*pidotr + pdotp; - g2 = -pidotr*pjdotr; - - if (factor_coul > 0.0) { - b0 = erfc * rinv; - b1 = (b0 + pre1*expm2) * r2inv; - b2 = (3.0*b1 + pre2*expm2) * r2inv; - b3 = (5.0*b2 + pre3*expm2) * r2inv; - - g0b1_g1b2_g2b3 = g0*b1 + g1*b2 + g2*b3; - fdx = delx * g0b1_g1b2_g2b3 - - b1 * (qtmp*mu[j][0] - q[j]*mu[i][0]) + - b2 * (pjdotr*mu[i][0] + pidotr*mu[j][0]); - fdy = dely * g0b1_g1b2_g2b3 - - b1 * (qtmp*mu[j][1] - q[j]*mu[i][1]) + - b2 * (pjdotr*mu[i][1] + pidotr*mu[j][1]); - fdz = delz * g0b1_g1b2_g2b3 - - b1 * (qtmp*mu[j][2] - q[j]*mu[i][2]) + - b2 * (pjdotr*mu[i][2] + pidotr*mu[j][2]); - - zdix = delx * (q[j]*b1 + b2*pjdotr) - b1*mu[j][0]; - zdiy = dely * (q[j]*b1 + b2*pjdotr) - b1*mu[j][1]; - zdiz = delz * (q[j]*b1 + b2*pjdotr) - b1*mu[j][2]; - zdjx = delx * (-qtmp*b1 + b2*pidotr) - b1*mu[i][0]; - zdjy = dely * (-qtmp*b1 + b2*pidotr) - b1*mu[i][1]; - zdjz = delz * (-qtmp*b1 + b2*pidotr) - b1*mu[i][2]; - - if (factor_coul < 1.0) { - fdx *= factor_coul; - fdy *= factor_coul; - fdz *= factor_coul; - zdix *= factor_coul; - zdiy *= factor_coul; - zdiz *= factor_coul; - zdjx *= factor_coul; - zdjy *= factor_coul; - zdjz *= factor_coul; - } - } else { - fdx = fdy = fdz = 0.0; - zdix = zdiy = zdiz = 0.0; - zdjx = zdjy = zdjz = 0.0; - } - - if (factor_coul < 1.0) { - d0 = (erfc - 1.0) * rinv; - d1 = (d0 + pre1*expm2) * r2inv; - d2 = (3.0*d1 + pre2*expm2) * r2inv; - d3 = (5.0*d2 + pre3*expm2) * r2inv; - - g0d1_g1d2_g2d3 = g0*d1 + g1*d2 + g2*d3; - fax = delx * g0d1_g1d2_g2d3 - - d1 * (qtmp*mu[j][0] - q[j]*mu[i][0]) + - d2 * (pjdotr*mu[i][0] + pidotr*mu[j][0]); - fay = dely * g0d1_g1d2_g2d3 - - d1 * (qtmp*mu[j][1] - q[j]*mu[i][1]) + - d2 * (pjdotr*mu[i][1] + pidotr*mu[j][1]); - faz = delz * g0d1_g1d2_g2d3 - - d1 * (qtmp*mu[j][2] - q[j]*mu[i][2]) + - d2 * (pjdotr*mu[i][2] + pidotr*mu[j][2]); - - zaix = delx * (q[j]*d1 + d2*pjdotr) - d1*mu[j][0]; - zaiy = dely * (q[j]*d1 + d2*pjdotr) - d1*mu[j][1]; - zaiz = delz * (q[j]*d1 + d2*pjdotr) - d1*mu[j][2]; - zajx = delx * (-qtmp*d1 + d2*pidotr) - d1*mu[i][0]; - zajy = dely * (-qtmp*d1 + d2*pidotr) - d1*mu[i][1]; - zajz = delz * (-qtmp*d1 + d2*pidotr) - d1*mu[i][2]; - - if (factor_coul > 0.0) { - facm1 = 1.0 - factor_coul; - fax *= facm1; - fay *= facm1; - faz *= facm1; - zaix *= facm1; - zaiy *= facm1; - zaiz *= facm1; - zajx *= facm1; - zajy *= facm1; - zajz *= facm1; - } - } else { - fax = fay = faz = 0.0; - zaix = zaiy = zaiz = 0.0; - zajx = zajy = zajz = 0.0; - } - - forcecoulx = fdx + fax; - forcecouly = fdy + fay; - forcecoulz = fdz + faz; - - tixcoul = mu[i][1]*(zdiz + zaiz) - mu[i][2]*(zdiy + zaiy); - tiycoul = mu[i][2]*(zdix + zaix) - mu[i][0]*(zdiz + zaiz); - tizcoul = mu[i][0]*(zdiy + zaiy) - mu[i][1]*(zdix + zaix); - tjxcoul = mu[j][1]*(zdjz + zajz) - mu[j][2]*(zdjy + zajy); - tjycoul = mu[j][2]*(zdjx + zajx) - mu[j][0]*(zdjz + zajz); - tjzcoul = mu[j][0]*(zdjy + zajy) - mu[j][1]*(zdjx + zajx); - - } else { - forcecoulx = forcecouly = forcecoulz = 0.0; - tixcoul = tiycoul = tizcoul = 0.0; - tjxcoul = tjycoul = tjzcoul = 0.0; - } - - // LJ interaction - - if (rsq < cut_ljsq[itype][jtype]) { - r6inv = r2inv*r2inv*r2inv; - forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]); - fforce = factor_lj * forcelj*r2inv; - } else fforce = 0.0; - - // total force - - fx = qqrd2e*forcecoulx + delx*fforce; - fy = qqrd2e*forcecouly + dely*fforce; - fz = qqrd2e*forcecoulz + delz*fforce; - - // force & torque accumulation - - f[i][0] += fx; - f[i][1] += fy; - f[i][2] += fz; - torque[i][0] += qqrd2e*tixcoul; - torque[i][1] += qqrd2e*tiycoul; - torque[i][2] += qqrd2e*tizcoul; - - if (newton_pair || j < nlocal) { - f[j][0] -= fx; - f[j][1] -= fy; - f[j][2] -= fz; - torque[j][0] += qqrd2e*tjxcoul; - torque[j][1] += qqrd2e*tjycoul; - torque[j][2] += qqrd2e*tjzcoul; - } - - if (eflag) { - if (rsq < cut_coulsq && factor_coul > 0.0) { - ecoul = qqrd2e*(b0*g0 + b1*g1 + b2*g2); - if (factor_coul < 1.0) { - ecoul *= factor_coul; - ecoul += (1-factor_coul) * qqrd2e * (d0*g0 + d1*g1 + d2*g2); + r2inv = 1.0/rsq; + rinv = sqrt(r2inv); + + if (rsq < cut_coulsq) { + r = sqrt(rsq); + grij = g_ewald * r; + expm2 = exp(-grij*grij); + t = 1.0 / (1.0 + EWALD_P*grij); + erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; + + pdotp = mu[i][0]*mu[j][0] + mu[i][1]*mu[j][1] + mu[i][2]*mu[j][2]; + pidotr = mu[i][0]*delx + mu[i][1]*dely + mu[i][2]*delz; + pjdotr = mu[j][0]*delx + mu[j][1]*dely + mu[j][2]*delz; + + g0 = qtmp*q[j]; + g1 = qtmp*pjdotr - q[j]*pidotr + pdotp; + g2 = -pidotr*pjdotr; + + if (factor_coul > 0.0) { + b0 = erfc * rinv; + b1 = (b0 + pre1*expm2) * r2inv; + b2 = (3.0*b1 + pre2*expm2) * r2inv; + b3 = (5.0*b2 + pre3*expm2) * r2inv; + + g0b1_g1b2_g2b3 = g0*b1 + g1*b2 + g2*b3; + fdx = delx * g0b1_g1b2_g2b3 - + b1 * (qtmp*mu[j][0] - q[j]*mu[i][0]) + + b2 * (pjdotr*mu[i][0] + pidotr*mu[j][0]); + fdy = dely * g0b1_g1b2_g2b3 - + b1 * (qtmp*mu[j][1] - q[j]*mu[i][1]) + + b2 * (pjdotr*mu[i][1] + pidotr*mu[j][1]); + fdz = delz * g0b1_g1b2_g2b3 - + b1 * (qtmp*mu[j][2] - q[j]*mu[i][2]) + + b2 * (pjdotr*mu[i][2] + pidotr*mu[j][2]); + + zdix = delx * (q[j]*b1 + b2*pjdotr) - b1*mu[j][0]; + zdiy = dely * (q[j]*b1 + b2*pjdotr) - b1*mu[j][1]; + zdiz = delz * (q[j]*b1 + b2*pjdotr) - b1*mu[j][2]; + zdjx = delx * (-qtmp*b1 + b2*pidotr) - b1*mu[i][0]; + zdjy = dely * (-qtmp*b1 + b2*pidotr) - b1*mu[i][1]; + zdjz = delz * (-qtmp*b1 + b2*pidotr) - b1*mu[i][2]; + + if (factor_coul < 1.0) { + fdx *= factor_coul; + fdy *= factor_coul; + fdz *= factor_coul; + zdix *= factor_coul; + zdiy *= factor_coul; + zdiz *= factor_coul; + zdjx *= factor_coul; + zdjy *= factor_coul; + zdjz *= factor_coul; + } + } else { + fdx = fdy = fdz = 0.0; + zdix = zdiy = zdiz = 0.0; + zdjx = zdjy = zdjz = 0.0; + } + + if (factor_coul < 1.0) { + d0 = (erfc - 1.0) * rinv; + d1 = (d0 + pre1*expm2) * r2inv; + d2 = (3.0*d1 + pre2*expm2) * r2inv; + d3 = (5.0*d2 + pre3*expm2) * r2inv; + + g0d1_g1d2_g2d3 = g0*d1 + g1*d2 + g2*d3; + fax = delx * g0d1_g1d2_g2d3 - + d1 * (qtmp*mu[j][0] - q[j]*mu[i][0]) + + d2 * (pjdotr*mu[i][0] + pidotr*mu[j][0]); + fay = dely * g0d1_g1d2_g2d3 - + d1 * (qtmp*mu[j][1] - q[j]*mu[i][1]) + + d2 * (pjdotr*mu[i][1] + pidotr*mu[j][1]); + faz = delz * g0d1_g1d2_g2d3 - + d1 * (qtmp*mu[j][2] - q[j]*mu[i][2]) + + d2 * (pjdotr*mu[i][2] + pidotr*mu[j][2]); + + zaix = delx * (q[j]*d1 + d2*pjdotr) - d1*mu[j][0]; + zaiy = dely * (q[j]*d1 + d2*pjdotr) - d1*mu[j][1]; + zaiz = delz * (q[j]*d1 + d2*pjdotr) - d1*mu[j][2]; + zajx = delx * (-qtmp*d1 + d2*pidotr) - d1*mu[i][0]; + zajy = dely * (-qtmp*d1 + d2*pidotr) - d1*mu[i][1]; + zajz = delz * (-qtmp*d1 + d2*pidotr) - d1*mu[i][2]; + + if (factor_coul > 0.0) { + facm1 = 1.0 - factor_coul; + fax *= facm1; + fay *= facm1; + faz *= facm1; + zaix *= facm1; + zaiy *= facm1; + zaiz *= facm1; + zajx *= facm1; + zajy *= facm1; + zajz *= facm1; + } + } else { + fax = fay = faz = 0.0; + zaix = zaiy = zaiz = 0.0; + zajx = zajy = zajz = 0.0; + } + + forcecoulx = fdx + fax; + forcecouly = fdy + fay; + forcecoulz = fdz + faz; + + tixcoul = mu[i][1]*(zdiz + zaiz) - mu[i][2]*(zdiy + zaiy); + tiycoul = mu[i][2]*(zdix + zaix) - mu[i][0]*(zdiz + zaiz); + tizcoul = mu[i][0]*(zdiy + zaiy) - mu[i][1]*(zdix + zaix); + tjxcoul = mu[j][1]*(zdjz + zajz) - mu[j][2]*(zdjy + zajy); + tjycoul = mu[j][2]*(zdjx + zajx) - mu[j][0]*(zdjz + zajz); + tjzcoul = mu[j][0]*(zdjy + zajy) - mu[j][1]*(zdjx + zajx); + + } else { + forcecoulx = forcecouly = forcecoulz = 0.0; + tixcoul = tiycoul = tizcoul = 0.0; + tjxcoul = tjycoul = tjzcoul = 0.0; + } + + // LJ interaction + + if (rsq < cut_ljsq[itype][jtype]) { + r6inv = r2inv*r2inv*r2inv; + forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]); + fforce = factor_lj * forcelj*r2inv; + } else fforce = 0.0; + + // total force + + fx = qqrd2e*forcecoulx + delx*fforce; + fy = qqrd2e*forcecouly + dely*fforce; + fz = qqrd2e*forcecoulz + delz*fforce; + + // force & torque accumulation + + f[i][0] += fx; + f[i][1] += fy; + f[i][2] += fz; + torque[i][0] += qqrd2e*tixcoul; + torque[i][1] += qqrd2e*tiycoul; + torque[i][2] += qqrd2e*tizcoul; + + if (newton_pair || j < nlocal) { + f[j][0] -= fx; + f[j][1] -= fy; + f[j][2] -= fz; + torque[j][0] += qqrd2e*tjxcoul; + torque[j][1] += qqrd2e*tjycoul; + torque[j][2] += qqrd2e*tjzcoul; } - } else ecoul = 0.0; - if (rsq < cut_ljsq[itype][jtype]) { - evdwl = r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]) - - offset[itype][jtype]; - evdwl *= factor_lj; - } else evdwl = 0.0; - } + if (eflag) { + if (rsq < cut_coulsq && factor_coul > 0.0) { + ecoul = qqrd2e*(b0*g0 + b1*g1 + b2*g2); + if (factor_coul < 1.0) { + ecoul *= factor_coul; + ecoul += (1-factor_coul) * qqrd2e * (d0*g0 + d1*g1 + d2*g2); + } + } else ecoul = 0.0; + + if (rsq < cut_ljsq[itype][jtype]) { + evdwl = r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]) - + offset[itype][jtype]; + evdwl *= factor_lj; + } else evdwl = 0.0; + } - if (evflag) ev_tally_xyz(i,j,nlocal,newton_pair, - evdwl,ecoul,fx,fy,fz,delx,dely,delz); + if (evflag) ev_tally_xyz(i,j,nlocal,newton_pair, + evdwl,ecoul,fx,fy,fz,delx,dely,delz); } } } @@ -360,8 +360,8 @@ void PairLJCutDipoleLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) - if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; + for (j = i; j <= atom->ntypes; j++) + if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } @@ -407,7 +407,7 @@ double PairLJCutDipoleLong::init_one(int i, int j) { if (setflag[i][j] == 0) { epsilon[i][j] = mix_energy(epsilon[i][i],epsilon[j][j], - sigma[i][i],sigma[j][j]); + sigma[i][i],sigma[j][j]); sigma[i][j] = mix_distance(sigma[i][i],sigma[j][j]); cut_lj[i][j] = mix_distance(cut_lj[i][i],cut_lj[j][j]); } @@ -472,9 +472,9 @@ void PairLJCutDipoleLong::write_restart(FILE *fp) for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { - fwrite(&epsilon[i][j],sizeof(double),1,fp); - fwrite(&sigma[i][j],sizeof(double),1,fp); - fwrite(&cut_lj[i][j],sizeof(double),1,fp); + fwrite(&epsilon[i][j],sizeof(double),1,fp); + fwrite(&sigma[i][j],sizeof(double),1,fp); + fwrite(&cut_lj[i][j],sizeof(double),1,fp); } } } @@ -496,14 +496,14 @@ void PairLJCutDipoleLong::read_restart(FILE *fp) if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); if (setflag[i][j]) { - if (me == 0) { - fread(&epsilon[i][j],sizeof(double),1,fp); - fread(&sigma[i][j],sizeof(double),1,fp); - fread(&cut_lj[i][j],sizeof(double),1,fp); - } - MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&cut_lj[i][j],1,MPI_DOUBLE,0,world); + if (me == 0) { + fread(&epsilon[i][j],sizeof(double),1,fp); + fread(&sigma[i][j],sizeof(double),1,fp); + fread(&cut_lj[i][j],sizeof(double),1,fp); + } + MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); + MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); + MPI_Bcast(&cut_lj[i][j],1,MPI_DOUBLE,0,world); } } } diff --git a/src/DIPOLE/pair_lj_long_dipole_long.cpp b/src/DIPOLE/pair_lj_long_dipole_long.cpp index ef865b66cd..15ac2e788c 100644 --- a/src/DIPOLE/pair_lj_long_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_long_dipole_long.cpp @@ -102,8 +102,8 @@ void PairLJLongDipoleLong::settings(int narg, char **arg) if (allocated) { // reset explicit cuts int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) - if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; + for (j = i; j <= atom->ntypes; j++) + if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } @@ -343,9 +343,9 @@ void PairLJLongDipoleLong::write_restart(FILE *fp) for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { - fwrite(&epsilon_read[i][j],sizeof(double),1,fp); - fwrite(&sigma_read[i][j],sizeof(double),1,fp); - fwrite(&cut_lj_read[i][j],sizeof(double),1,fp); + fwrite(&epsilon_read[i][j],sizeof(double),1,fp); + fwrite(&sigma_read[i][j],sizeof(double),1,fp); + fwrite(&cut_lj_read[i][j],sizeof(double),1,fp); } } } @@ -367,14 +367,14 @@ void PairLJLongDipoleLong::read_restart(FILE *fp) if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); if (setflag[i][j]) { - if (me == 0) { - fread(&epsilon_read[i][j],sizeof(double),1,fp); - fread(&sigma_read[i][j],sizeof(double),1,fp); - fread(&cut_lj_read[i][j],sizeof(double),1,fp); - } - MPI_Bcast(&epsilon_read[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&sigma_read[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&cut_lj_read[i][j],1,MPI_DOUBLE,0,world); + if (me == 0) { + fread(&epsilon_read[i][j],sizeof(double),1,fp); + fread(&sigma_read[i][j],sizeof(double),1,fp); + fread(&cut_lj_read[i][j],sizeof(double),1,fp); + } + MPI_Bcast(&epsilon_read[i][j],1,MPI_DOUBLE,0,world); + MPI_Bcast(&sigma_read[i][j],1,MPI_DOUBLE,0,world); + MPI_Bcast(&cut_lj_read[i][j],1,MPI_DOUBLE,0,world); } } } diff --git a/src/KOKKOS/pair_coul_debye_kokkos.cpp b/src/KOKKOS/pair_coul_debye_kokkos.cpp index dc85c39832..0771572e46 100644 --- a/src/KOKKOS/pair_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_coul_debye_kokkos.cpp @@ -241,7 +241,7 @@ void PairCoulDebyeKokkos::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } diff --git a/src/KSPACE/pair_born_coul_long.cpp b/src/KSPACE/pair_born_coul_long.cpp index 14d43f4c63..e588a30b55 100644 --- a/src/KSPACE/pair_born_coul_long.cpp +++ b/src/KSPACE/pair_born_coul_long.cpp @@ -250,7 +250,7 @@ void PairBornCoulLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/KSPACE/pair_buck_coul_long.cpp b/src/KSPACE/pair_buck_coul_long.cpp index 9cd8485e5c..476e3c716a 100644 --- a/src/KSPACE/pair_buck_coul_long.cpp +++ b/src/KSPACE/pair_buck_coul_long.cpp @@ -240,7 +240,7 @@ void PairBuckCoulLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index 26bcb136b3..8aa4d72083 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -104,7 +104,7 @@ void PairBuckLongCoulLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_buck[i][j] = cut_buck_global; } } diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index 764aebc522..e9799843fc 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -608,7 +608,7 @@ void PairLJCutCoulLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/KSPACE/pair_lj_cut_tip4p_long.cpp b/src/KSPACE/pair_lj_cut_tip4p_long.cpp index 146d4e6f37..588d21ac66 100644 --- a/src/KSPACE/pair_lj_cut_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_cut_tip4p_long.cpp @@ -450,7 +450,7 @@ void PairLJCutTIP4PLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index e474347935..44256a9fbb 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -103,7 +103,7 @@ void PairLJLongCoulLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/KSPACE/pair_lj_long_tip4p_long.cpp b/src/KSPACE/pair_lj_long_tip4p_long.cpp index c3d95c37a6..fd318fd75b 100644 --- a/src/KSPACE/pair_lj_long_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_long_tip4p_long.cpp @@ -1439,8 +1439,8 @@ void PairLJLongTIP4PLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) - if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; + for (j = i; j <= atom->ntypes; j++) + if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/MC/pair_dsmc.cpp b/src/MC/pair_dsmc.cpp index 344faf87f6..29ecde2023 100644 --- a/src/MC/pair_dsmc.cpp +++ b/src/MC/pair_dsmc.cpp @@ -230,7 +230,7 @@ void PairDSMC::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/MISC/pair_nm_cut.cpp b/src/MISC/pair_nm_cut.cpp index 467be1b7be..0163cdcf58 100644 --- a/src/MISC/pair_nm_cut.cpp +++ b/src/MISC/pair_nm_cut.cpp @@ -187,7 +187,7 @@ void PairNMCut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/MISC/pair_nm_cut_coul_cut.cpp b/src/MISC/pair_nm_cut_coul_cut.cpp index 86fa09f176..5cb2452906 100644 --- a/src/MISC/pair_nm_cut_coul_cut.cpp +++ b/src/MISC/pair_nm_cut_coul_cut.cpp @@ -213,7 +213,7 @@ void PairNMCutCoulCut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_lj[i][j] = cut_lj_global; cut_coul[i][j] = cut_coul_global; diff --git a/src/MISC/pair_nm_cut_coul_long.cpp b/src/MISC/pair_nm_cut_coul_long.cpp index c186d19539..15d5d03757 100644 --- a/src/MISC/pair_nm_cut_coul_long.cpp +++ b/src/MISC/pair_nm_cut_coul_long.cpp @@ -255,7 +255,7 @@ void PairNMCutCoulLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp index 15f5d52961..e3093e4d10 100644 --- a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp +++ b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp @@ -441,7 +441,7 @@ void PairLJCutTIP4PCut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } @@ -596,7 +596,7 @@ void PairLJCutTIP4PCut::write_restart(FILE *fp) for (i = 1; i <= atom->ntypes; i++) { for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); - if (setflag[i][j]){ + if (setflag[i][j]) { fwrite(&epsilon[i][j],sizeof(double),1,fp); fwrite(&sigma[i][j],sizeof(double),1,fp); fwrite(&cut_lj[i][j],sizeof(double),1,fp); diff --git a/src/USER-AWPMD/pair_awpmd_cut.cpp b/src/USER-AWPMD/pair_awpmd_cut.cpp index cd89c3984d..2ce1a92684 100644 --- a/src/USER-AWPMD/pair_awpmd_cut.cpp +++ b/src/USER-AWPMD/pair_awpmd_cut.cpp @@ -454,16 +454,6 @@ void PairAWPMDCut::settings(int narg, char **arg){ else if(!strcmp(arg[i],"flex_press")) flexible_pressure_flag = 1; } - - - // reset cutoffs that have been explicitly set - /* - if (allocated) { - int i,j; - for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) - if (setflag[i][j]) cut[i][j] = cut_global; - }*/ } /* ---------------------------------------------------------------------- @@ -489,7 +479,7 @@ void PairAWPMDCut::coeff(int narg, char **arg) else{ int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } diff --git a/src/USER-CGSDK/pair_lj_sdk.cpp b/src/USER-CGSDK/pair_lj_sdk.cpp index 665f188ce9..23b0f47a6d 100644 --- a/src/USER-CGSDK/pair_lj_sdk.cpp +++ b/src/USER-CGSDK/pair_lj_sdk.cpp @@ -248,7 +248,7 @@ void PairLJSDK::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp b/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp index 5e4a0db31c..845c5822a7 100644 --- a/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp +++ b/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp @@ -308,7 +308,7 @@ void PairLJSDKCoulLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/USER-DPD/pair_dpd_fdt.cpp b/src/USER-DPD/pair_dpd_fdt.cpp index e7e9febd82..26f5806cf1 100644 --- a/src/USER-DPD/pair_dpd_fdt.cpp +++ b/src/USER-DPD/pair_dpd_fdt.cpp @@ -267,7 +267,7 @@ void PairDPDfdt::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-DPD/pair_dpd_fdt_energy.cpp b/src/USER-DPD/pair_dpd_fdt_energy.cpp index 569588b6fd..c3fc7fb3f5 100644 --- a/src/USER-DPD/pair_dpd_fdt_energy.cpp +++ b/src/USER-DPD/pair_dpd_fdt_energy.cpp @@ -351,7 +351,7 @@ void PairDPDfdtEnergy::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-DPD/pair_exp6_rx.cpp b/src/USER-DPD/pair_exp6_rx.cpp index deff0d34e9..61b62efc53 100644 --- a/src/USER-DPD/pair_exp6_rx.cpp +++ b/src/USER-DPD/pair_exp6_rx.cpp @@ -562,7 +562,7 @@ void PairExp6rx::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } diff --git a/src/USER-DRUDE/pair_lj_cut_thole_long.cpp b/src/USER-DRUDE/pair_lj_cut_thole_long.cpp index 671de7090b..a74f51477c 100644 --- a/src/USER-DRUDE/pair_lj_cut_thole_long.cpp +++ b/src/USER-DRUDE/pair_lj_cut_thole_long.cpp @@ -295,11 +295,11 @@ void PairLJCutTholeLong::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) - if (setflag[i][j]) { - thole[i][j] = thole_global; - cut_lj[i][j] = cut_lj_global; - } + for (j = i; j <= atom->ntypes; j++) + if (setflag[i][j]) { + thole[i][j] = thole_global; + cut_lj[i][j] = cut_lj_global; + } } } diff --git a/src/USER-DRUDE/pair_thole.cpp b/src/USER-DRUDE/pair_thole.cpp index 0ed94ebbc9..abb37b82b7 100644 --- a/src/USER-DRUDE/pair_thole.cpp +++ b/src/USER-DRUDE/pair_thole.cpp @@ -199,11 +199,11 @@ void PairThole::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) - if (setflag[i][j]) { - thole[i][j] = thole_global; - cut[i][j] = cut_global; - } + for (j = i; j <= atom->ntypes; j++) + if (setflag[i][j]) { + thole[i][j] = thole_global; + cut[i][j] = cut_global; + } } } diff --git a/src/USER-EFF/pair_eff_cut.cpp b/src/USER-EFF/pair_eff_cut.cpp index 66f59c86c3..850c523629 100644 --- a/src/USER-EFF/pair_eff_cut.cpp +++ b/src/USER-EFF/pair_eff_cut.cpp @@ -846,7 +846,7 @@ void PairEffCut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-FEP/pair_coul_cut_soft.cpp b/src/USER-FEP/pair_coul_cut_soft.cpp index 2c675c607f..a7ac8004fe 100644 --- a/src/USER-FEP/pair_coul_cut_soft.cpp +++ b/src/USER-FEP/pair_coul_cut_soft.cpp @@ -168,7 +168,7 @@ void PairCoulCutSoft::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp b/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp index 16da07a657..b2e781c57b 100644 --- a/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp @@ -211,7 +211,7 @@ void PairLJCutCoulCutSoft::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_lj[i][j] = cut_lj_global; cut_coul[i][j] = cut_coul_global; diff --git a/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp b/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp index 6636e72715..3b80729b0b 100644 --- a/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp @@ -582,7 +582,7 @@ void PairLJCutCoulLongSoft::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/USER-FEP/pair_lj_cut_soft.cpp b/src/USER-FEP/pair_lj_cut_soft.cpp index 3798b27936..800fdfcde8 100644 --- a/src/USER-FEP/pair_lj_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_soft.cpp @@ -462,7 +462,7 @@ void PairLJCutSoft::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp b/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp index 5beed08b72..8d9162e564 100644 --- a/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp @@ -436,7 +436,7 @@ void PairLJCutTIP4PLongSoft::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/USER-FEP/pair_morse_soft.cpp b/src/USER-FEP/pair_morse_soft.cpp index 6c86d8916f..1333bc28ca 100644 --- a/src/USER-FEP/pair_morse_soft.cpp +++ b/src/USER-FEP/pair_morse_soft.cpp @@ -222,7 +222,7 @@ void PairMorseSoft::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-MISC/pair_buck_mdf.cpp b/src/USER-MISC/pair_buck_mdf.cpp index 3a433b16bd..6c3dcbd7ee 100644 --- a/src/USER-MISC/pair_buck_mdf.cpp +++ b/src/USER-MISC/pair_buck_mdf.cpp @@ -197,7 +197,7 @@ void PairBuckMDF::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-MISC/pair_coul_diel.cpp b/src/USER-MISC/pair_coul_diel.cpp index a732ace1a0..a62362aa6f 100644 --- a/src/USER-MISC/pair_coul_diel.cpp +++ b/src/USER-MISC/pair_coul_diel.cpp @@ -168,7 +168,7 @@ void PairCoulDiel::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-MISC/pair_gauss_cut.cpp b/src/USER-MISC/pair_gauss_cut.cpp index f44b1bbd2d..3836187a64 100644 --- a/src/USER-MISC/pair_gauss_cut.cpp +++ b/src/USER-MISC/pair_gauss_cut.cpp @@ -175,7 +175,7 @@ void PairGaussCut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-MISC/pair_kolmogorov_crespi_z.cpp b/src/USER-MISC/pair_kolmogorov_crespi_z.cpp index ddb39f6870..15a325e106 100644 --- a/src/USER-MISC/pair_kolmogorov_crespi_z.cpp +++ b/src/USER-MISC/pair_kolmogorov_crespi_z.cpp @@ -209,7 +209,7 @@ void PairKolmogorovCrespiZ::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-MISC/pair_lennard_mdf.cpp b/src/USER-MISC/pair_lennard_mdf.cpp index 3a81955199..b959f513c0 100644 --- a/src/USER-MISC/pair_lennard_mdf.cpp +++ b/src/USER-MISC/pair_lennard_mdf.cpp @@ -197,7 +197,7 @@ void PairLJ_AB_MDF::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_inner[i][j] = cut_inner_global; cut[i][j] = cut_global; diff --git a/src/USER-MISC/pair_lj_mdf.cpp b/src/USER-MISC/pair_lj_mdf.cpp index 3b52cf0b86..ebec1f80e1 100644 --- a/src/USER-MISC/pair_lj_mdf.cpp +++ b/src/USER-MISC/pair_lj_mdf.cpp @@ -197,7 +197,7 @@ void PairLJMDF::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_inner[i][j] = cut_inner_global; cut[i][j] = cut_global; diff --git a/src/USER-MISC/pair_lj_sf.cpp b/src/USER-MISC/pair_lj_sf.cpp index 32f45ff48d..a34119f880 100644 --- a/src/USER-MISC/pair_lj_sf.cpp +++ b/src/USER-MISC/pair_lj_sf.cpp @@ -181,7 +181,7 @@ void PairLJShiftedForce::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-MISC/pair_lj_sf_dipole_sf.cpp b/src/USER-MISC/pair_lj_sf_dipole_sf.cpp index 33f10f2f12..fb63638b52 100644 --- a/src/USER-MISC/pair_lj_sf_dipole_sf.cpp +++ b/src/USER-MISC/pair_lj_sf_dipole_sf.cpp @@ -342,7 +342,7 @@ void PairLJSFDipoleSF::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_lj[i][j] = cut_lj_global; cut_coul[i][j] = cut_coul_global; diff --git a/src/USER-MISC/pair_momb.cpp b/src/USER-MISC/pair_momb.cpp index b7337c17a8..0d8d2e060e 100644 --- a/src/USER-MISC/pair_momb.cpp +++ b/src/USER-MISC/pair_momb.cpp @@ -199,7 +199,7 @@ void PairMomb::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-MISC/pair_morse_smooth_linear.cpp b/src/USER-MISC/pair_morse_smooth_linear.cpp index ea33510b58..4ef86b6b88 100644 --- a/src/USER-MISC/pair_morse_smooth_linear.cpp +++ b/src/USER-MISC/pair_morse_smooth_linear.cpp @@ -171,7 +171,7 @@ void PairMorseSmoothLinear::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/USER-MISC/pair_srp.cpp b/src/USER-MISC/pair_srp.cpp index 18ea4dc332..46c53349fa 100644 --- a/src/USER-MISC/pair_srp.cpp +++ b/src/USER-MISC/pair_srp.cpp @@ -408,7 +408,7 @@ void PairSRP::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= bptype; i++) - for (j = i+1; j <= bptype; j++) + for (j = i; j <= bptype; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_beck.cpp b/src/pair_beck.cpp index e3e8b0c5cc..36e44e5c2e 100644 --- a/src/pair_beck.cpp +++ b/src/pair_beck.cpp @@ -181,10 +181,8 @@ void PairBeck::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) - if (setflag[i][j]) { - cut[i][j] = cut_global; - } + for (j = i; j <= atom->ntypes; j++) + if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_born.cpp b/src/pair_born.cpp index 5fc26e2529..6d420fb36b 100644 --- a/src/pair_born.cpp +++ b/src/pair_born.cpp @@ -185,7 +185,7 @@ void PairBorn::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_born_coul_dsf.cpp b/src/pair_born_coul_dsf.cpp index 87c2a14baa..caec95759a 100644 --- a/src/pair_born_coul_dsf.cpp +++ b/src/pair_born_coul_dsf.cpp @@ -226,9 +226,8 @@ void PairBornCoulDSF::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) - if (setflag[i][j]) - cut_lj[i][j] = cut_lj_global; + for (j = i; j <= atom->ntypes; j++) + if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/pair_born_coul_wolf.cpp b/src/pair_born_coul_wolf.cpp index 31c0cc715c..bad0c5ed3e 100644 --- a/src/pair_born_coul_wolf.cpp +++ b/src/pair_born_coul_wolf.cpp @@ -229,7 +229,7 @@ void PairBornCoulWolf::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } diff --git a/src/pair_buck.cpp b/src/pair_buck.cpp index ac15e82020..e4da772e0a 100644 --- a/src/pair_buck.cpp +++ b/src/pair_buck.cpp @@ -176,7 +176,7 @@ void PairBuck::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index 7c948f58a8..c052c3100a 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -205,7 +205,7 @@ void PairBuckCoulCut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_lj[i][j] = cut_lj_global; cut_coul[i][j] = cut_coul_global; diff --git a/src/pair_coul_cut.cpp b/src/pair_coul_cut.cpp index fec592bb19..b505dcb02c 100644 --- a/src/pair_coul_cut.cpp +++ b/src/pair_coul_cut.cpp @@ -155,7 +155,7 @@ void PairCoulCut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_coul_debye.cpp b/src/pair_coul_debye.cpp index dcb84d7e2d..df4555753f 100644 --- a/src/pair_coul_debye.cpp +++ b/src/pair_coul_debye.cpp @@ -126,7 +126,7 @@ void PairCoulDebye::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_dpd.cpp b/src/pair_dpd.cpp index b5b959f85b..61f700a33e 100644 --- a/src/pair_dpd.cpp +++ b/src/pair_dpd.cpp @@ -207,7 +207,7 @@ void PairDPD::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_dpd_tstat.cpp b/src/pair_dpd_tstat.cpp index 6d8f75d95d..0a5ebd33f8 100644 --- a/src/pair_dpd_tstat.cpp +++ b/src/pair_dpd_tstat.cpp @@ -159,7 +159,7 @@ void PairDPDTstat::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_gauss.cpp b/src/pair_gauss.cpp index c8f6afdacc..c66cfc2c80 100644 --- a/src/pair_gauss.cpp +++ b/src/pair_gauss.cpp @@ -173,7 +173,7 @@ void PairGauss::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_lj96_cut.cpp b/src/pair_lj96_cut.cpp index 1f79226e64..f4b2747d40 100644 --- a/src/pair_lj96_cut.cpp +++ b/src/pair_lj96_cut.cpp @@ -442,7 +442,7 @@ void PairLJ96Cut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_lj_cubic.cpp b/src/pair_lj_cubic.cpp index 633c12019e..c96d4490cb 100644 --- a/src/pair_lj_cubic.cpp +++ b/src/pair_lj_cubic.cpp @@ -179,14 +179,8 @@ void PairLJCubic::settings(int narg, char **arg) { if (narg != 0) error->all(FLERR,"Illegal pair_style command"); - // reset cutoffs that have been explicitly set - - if (allocated) { - int i,j; - for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) - if (setflag[i][j]) cut[i][j] = 0.0; - } + // NOTE: lj/cubic has no global cutoff. instead the cutoff is + // inferred from the lj parameters. so we must not reset cutoffs here. } /* ---------------------------------------------------------------------- diff --git a/src/pair_lj_cut.cpp b/src/pair_lj_cut.cpp index bffdd7fff4..a3ebf414c9 100644 --- a/src/pair_lj_cut.cpp +++ b/src/pair_lj_cut.cpp @@ -436,7 +436,7 @@ void PairLJCut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_lj_cut_coul_cut.cpp b/src/pair_lj_cut_coul_cut.cpp index 0d2bff3c9f..0d62c43dc3 100644 --- a/src/pair_lj_cut_coul_cut.cpp +++ b/src/pair_lj_cut_coul_cut.cpp @@ -198,7 +198,7 @@ void PairLJCutCoulCut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_lj[i][j] = cut_lj_global; cut_coul[i][j] = cut_coul_global; diff --git a/src/pair_lj_cut_coul_dsf.cpp b/src/pair_lj_cut_coul_dsf.cpp index 538336d8e6..09293a6f4c 100644 --- a/src/pair_lj_cut_coul_dsf.cpp +++ b/src/pair_lj_cut_coul_dsf.cpp @@ -224,7 +224,7 @@ void PairLJCutCoulDSF::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } diff --git a/src/pair_lj_expand.cpp b/src/pair_lj_expand.cpp index 90f1ae0df2..2fd780472a 100644 --- a/src/pair_lj_expand.cpp +++ b/src/pair_lj_expand.cpp @@ -179,7 +179,7 @@ void PairLJExpand::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_lj_gromacs.cpp b/src/pair_lj_gromacs.cpp index bb0a6e647e..3375c6c4e2 100644 --- a/src/pair_lj_gromacs.cpp +++ b/src/pair_lj_gromacs.cpp @@ -204,7 +204,7 @@ void PairLJGromacs::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_inner[i][j] = cut_inner_global; cut[i][j] = cut_global; diff --git a/src/pair_lj_smooth.cpp b/src/pair_lj_smooth.cpp index c59b35aebf..1afaef9235 100644 --- a/src/pair_lj_smooth.cpp +++ b/src/pair_lj_smooth.cpp @@ -206,7 +206,7 @@ void PairLJSmooth::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) { cut_inner[i][j] = cut_inner_global; cut[i][j] = cut_global; diff --git a/src/pair_lj_smooth_linear.cpp b/src/pair_lj_smooth_linear.cpp index 189475aa71..415ca7b6d3 100644 --- a/src/pair_lj_smooth_linear.cpp +++ b/src/pair_lj_smooth_linear.cpp @@ -175,7 +175,7 @@ void PairLJSmoothLinear::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } diff --git a/src/pair_mie_cut.cpp b/src/pair_mie_cut.cpp index 3c13c19a3b..312fb7bc70 100644 --- a/src/pair_mie_cut.cpp +++ b/src/pair_mie_cut.cpp @@ -447,7 +447,7 @@ void PairMIECut::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_morse.cpp b/src/pair_morse.cpp index 2144ad5008..5f90642065 100644 --- a/src/pair_morse.cpp +++ b/src/pair_morse.cpp @@ -165,7 +165,7 @@ void PairMorse::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_soft.cpp b/src/pair_soft.cpp index 8ffd139307..b05058b4dc 100644 --- a/src/pair_soft.cpp +++ b/src/pair_soft.cpp @@ -158,7 +158,7 @@ void PairSoft::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } diff --git a/src/pair_yukawa.cpp b/src/pair_yukawa.cpp index a38e2aa880..0e5fd36cd6 100644 --- a/src/pair_yukawa.cpp +++ b/src/pair_yukawa.cpp @@ -162,7 +162,7 @@ void PairYukawa::settings(int narg, char **arg) if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) - for (j = i+1; j <= atom->ntypes; j++) + for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } -- GitLab From d807ba1974d548515a2af77c340871c45663b920 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 16 May 2017 00:26:39 -0400 Subject: [PATCH 133/593] whitespace cleanup --- src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp index af19f3eb3b..1e34b06478 100644 --- a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp +++ b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp @@ -393,10 +393,10 @@ void PairLJCharmmfswCoulCharmmfsh::write_restart(FILE *fp) for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { - fwrite(&epsilon[i][j],sizeof(double),1,fp); - fwrite(&sigma[i][j],sizeof(double),1,fp); - fwrite(&eps14[i][j],sizeof(double),1,fp); - fwrite(&sigma14[i][j],sizeof(double),1,fp); + fwrite(&epsilon[i][j],sizeof(double),1,fp); + fwrite(&sigma[i][j],sizeof(double),1,fp); + fwrite(&eps14[i][j],sizeof(double),1,fp); + fwrite(&sigma14[i][j],sizeof(double),1,fp); } } } -- GitLab From 66084ad1f41adf9067bcf6c09f3ee0c2deef74b6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 16 May 2017 04:27:15 -0400 Subject: [PATCH 134/593] fix typo in rerun docs. closes #486 --- doc/src/rerun.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/rerun.txt b/doc/src/rerun.txt index 860ee68033..edf94cc711 100644 --- a/doc/src/rerun.txt +++ b/doc/src/rerun.txt @@ -15,7 +15,7 @@ rerun file1 file2 ... keyword args ... :pre file1,file2,... = dump file(s) to read :ulb,l one or more keywords may be appended, keyword {dump} must appear and be last :l keyword = {first} or {last} or {every} or {skip} or {start} or {stop} or {dump} - {first} args = Nfirts + {first} args = Nfirst Nfirst = dump timestep to start on {last} args = Nlast Nlast = dumptimestep to stop on -- GitLab From ca87e571294f80043840ffab745ae42312891612 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 16 May 2017 11:58:34 -0400 Subject: [PATCH 135/593] improved version of AIREBO splines based on a suggestion by markus hoehnerbach --- src/MANYBODY/pair_airebo.cpp | 84 +++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 34 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 00108e7f2d..e3f23a9997 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -3107,10 +3107,10 @@ double PairAIREBO::PijSpline(double NijC, double NijH, int typei, int typej, // if inputs are out of bounds set them back to a point in bounds - if (NijC < pCCdom[0][0]) NijC=pCCdom[0][0]; - if (NijC >= pCCdom[0][1]) NijC=pCCdom[0][1]-TOL; - if (NijH < pCCdom[1][0]) NijH=pCCdom[1][0]; - if (NijH >= pCCdom[1][1]) NijH=pCCdom[1][1]-TOL; + if (NijC < pCCdom[0][0]) NijC=pCCdom[0][0]; + if (NijC > pCCdom[0][1]) NijC=pCCdom[0][1]; + if (NijH < pCCdom[1][0]) NijH=pCCdom[1][0]; + if (NijH > pCCdom[1][1]) NijH=pCCdom[1][1]; x = (int) floor(NijC); y = (int) floor(NijH); @@ -3119,6 +3119,8 @@ double PairAIREBO::PijSpline(double NijC, double NijH, int typei, int typej, dN2[0] = PCCdfdx[x][y]; dN2[1] = PCCdfdy[x][y]; } else { + if (NijC == pCCdom[0][1]) --x; + if (NijH == pCCdom[1][1]) --y; Pij = Spbicubic(NijC,NijH,pCC[x][y],dN2); } @@ -3126,10 +3128,10 @@ double PairAIREBO::PijSpline(double NijC, double NijH, int typei, int typej, // if inputs are out of bounds set them back to a point in bounds - if (NijC < pCHdom[0][0]) NijC=pCHdom[0][0]; - if (NijC >= pCHdom[0][1]) NijC=pCHdom[0][1]-TOL; - if (NijH < pCHdom[1][0]) NijH=pCHdom[1][0]; - if (NijH >= pCHdom[1][1]) NijH=pCHdom[1][1]-TOL; + if (NijC < pCHdom[0][0]) NijC=pCHdom[0][0]; + if (NijC > pCHdom[0][1]) NijC=pCHdom[0][1]; + if (NijH < pCHdom[1][0]) NijH=pCHdom[1][0]; + if (NijH > pCHdom[1][1]) NijH=pCHdom[1][1]; x = (int) floor(NijC); y = (int) floor(NijH); @@ -3138,6 +3140,8 @@ double PairAIREBO::PijSpline(double NijC, double NijH, int typei, int typej, dN2[0] = PCHdfdx[x][y]; dN2[1] = PCHdfdy[x][y]; } else { + if (NijC == pCHdom[0][1]) --x; + if (NijH == pCHdom[1][1]) --y; Pij = Spbicubic(NijC,NijH,pCH[x][y],dN2); } } @@ -3166,12 +3170,12 @@ double PairAIREBO::piRCSpline(double Nij, double Nji, double Nijconj, // if the inputs are out of bounds set them back to a point in bounds - if (Nij < piCCdom[0][0]) Nij=piCCdom[0][0]; - if (Nij >= piCCdom[0][1]) Nij=piCCdom[0][1]-TOL; - if (Nji < piCCdom[1][0]) Nji=piCCdom[1][0]; - if (Nji >= piCCdom[1][1]) Nji=piCCdom[1][1]-TOL; - if (Nijconj < piCCdom[2][0]) Nijconj=piCCdom[2][0]; - if (Nijconj >= piCCdom[2][1]) Nijconj=piCCdom[2][1]-TOL; + if (Nij < piCCdom[0][0]) Nij=piCCdom[0][0]; + if (Nij > piCCdom[0][1]) Nij=piCCdom[0][1]; + if (Nji < piCCdom[1][0]) Nji=piCCdom[1][0]; + if (Nji > piCCdom[1][1]) Nji=piCCdom[1][1]; + if (Nijconj < piCCdom[2][0]) Nijconj=piCCdom[2][0]; + if (Nijconj > piCCdom[2][1]) Nijconj=piCCdom[2][1]; x = (int) floor(Nij); y = (int) floor(Nji); z = (int) floor(Nijconj); @@ -3183,6 +3187,9 @@ double PairAIREBO::piRCSpline(double Nij, double Nji, double Nijconj, dN3[1]=piCCdfdy[x][y][z]; dN3[2]=piCCdfdz[x][y][z]; } else { + if (Nij == piCCdom[0][1]) --x; + if (Nji == piCCdom[1][1]) --y; + if (Nijconj == piCCdom[2][1]) --z; piRC=Sptricubic(Nij,Nji,Nijconj,piCC[x][y][z],dN3); } } else if ((typei==0 && typej==1) || (typei==1 && typej==0)) { @@ -3191,12 +3198,12 @@ double PairAIREBO::piRCSpline(double Nij, double Nji, double Nijconj, // if the inputs are out of bounds set them back to a point in bounds - if (Nij < piCHdom[0][0]) Nij=piCHdom[0][0]; - if (Nij >= piCHdom[0][1]) Nij=piCHdom[0][1]-TOL; - if (Nji < piCHdom[1][0]) Nji=piCHdom[1][0]; - if (Nji >= piCHdom[1][1]) Nji=piCHdom[1][1]-TOL; - if (Nijconj < piCHdom[2][0]) Nijconj=piCHdom[2][0]; - if (Nijconj >= piCHdom[2][1]) Nijconj=piCHdom[2][1]-TOL; + if (Nij < piCHdom[0][0]) Nij=piCHdom[0][0]; + if (Nij > piCHdom[0][1]) Nij=piCHdom[0][1]; + if (Nji < piCHdom[1][0]) Nji=piCHdom[1][0]; + if (Nji > piCHdom[1][1]) Nji=piCHdom[1][1]; + if (Nijconj < piCHdom[2][0]) Nijconj=piCHdom[2][0]; + if (Nijconj > piCHdom[2][1]) Nijconj=piCHdom[2][1]; x = (int) floor(Nij); y = (int) floor(Nji); z = (int) floor(Nijconj); @@ -3208,26 +3215,32 @@ double PairAIREBO::piRCSpline(double Nij, double Nji, double Nijconj, dN3[1]=piCHdfdy[x][y][z]; dN3[2]=piCHdfdz[x][y][z]; } else { + if (Nij == piCHdom[0][1]) --x; + if (Nji == piCHdom[1][1]) --y; + if (Nijconj == piCHdom[2][1]) --z; piRC=Sptricubic(Nij,Nji,Nijconj,piCH[x][y][z],dN3); } } else if (typei==1 && typej==1) { - if (Nij < piHHdom[0][0]) Nij=piHHdom[0][0]; - if (Nij >= piHHdom[0][1]) Nij=piHHdom[0][1]-TOL; - if (Nji < piHHdom[1][0]) Nji=piHHdom[1][0]; - if (Nji >= piHHdom[1][1]) Nji=piHHdom[1][1]-TOL; - if (Nijconj < piHHdom[2][0]) Nijconj=piHHdom[2][0]; - if (Nijconj >= piHHdom[2][1]) Nijconj=piHHdom[2][1]-TOL; + if (Nij < piHHdom[0][0]) Nij=piHHdom[0][0]; + if (Nij > piHHdom[0][1]) Nij=piHHdom[0][1]; + if (Nji < piHHdom[1][0]) Nji=piHHdom[1][0]; + if (Nji > piHHdom[1][1]) Nji=piHHdom[1][1]; + if (Nijconj < piHHdom[2][0]) Nijconj=piHHdom[2][0]; + if (Nijconj > piHHdom[2][1]) Nijconj=piHHdom[2][1]; x = (int) floor(Nij); y = (int) floor(Nji); z = (int) floor(Nijconj); - if (fabs(Nij-floor(Nij))= Tijdom[0][1]) Nij=Tijdom[0][1]-TOL; - if (Nji < Tijdom[1][0]) Nji=Tijdom[1][0]; - if (Nji >= Tijdom[1][1]) Nji=Tijdom[1][1]-TOL; - if (Nijconj < Tijdom[2][0]) Nijconj=Tijdom[2][0]; - if (Nijconj >= Tijdom[2][1]) Nijconj=Tijdom[2][1]-TOL; + if (Nij < Tijdom[0][0]) Nij=Tijdom[0][0]; + if (Nij > Tijdom[0][1]) Nij=Tijdom[0][1]; + if (Nji < Tijdom[1][0]) Nji=Tijdom[1][0]; + if (Nji > Tijdom[1][1]) Nji=Tijdom[1][1]; + if (Nijconj < Tijdom[2][0]) Nijconj=Tijdom[2][0]; + if (Nijconj > Tijdom[2][1]) Nijconj=Tijdom[2][1]; x = (int) floor(Nij); y = (int) floor(Nji); z = (int) floor(Nijconj); @@ -3272,6 +3285,9 @@ double PairAIREBO::TijSpline(double Nij, double Nji, dN3[1]=Tdfdy[x][y][z]; dN3[2]=Tdfdz[x][y][z]; } else { + if (Nij == Tijdom[0][1]) --x; + if (Nji == Tijdom[1][1]) --y; + if (Nijconj == Tijdom[2][1]) --z; Tijf=Sptricubic(Nij,Nji,Nijconj,Tijc[x][y][z],dN3); } -- GitLab From c11e87618bc8956f97d7cc25108ecae4e1a39039 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 16 May 2017 14:18:56 -0400 Subject: [PATCH 136/593] implement second bugfix suggestion from @CF17 on issue #59 --- src/MANYBODY/pair_airebo.cpp | 4 ++-- src/USER-OMP/pair_airebo_omp.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index e3f23a9997..cc7efbcaa6 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -1850,7 +1850,7 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], (1.0-tspjik)*(1.0-tspijl); aaa1 = -prefactor*(1.0-square(om1234)) * (1.0-tspjik)*(1.0-tspijl); - aaa2 = aaa1*w21*w34; + aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34; at2 = aa*cwnum; fcijpc = (-dt1dij*at2)+(aaa2*dtsjik*dctij*(1.0-tspijl)) + @@ -2778,7 +2778,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, (1.0-tspjik)*(1.0-tspijl); aaa1 = -prefactor*(1.0-square(om1234)) * (1.0-tspjik)*(1.0-tspijl); - aaa2 = aaa1*w21*w34; + aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34; at2 = aa*cwnum; fcikpc = (-dt1dik*at2)+(aaa2*dtsjik*dctik*(1.0-tspijl)); diff --git a/src/USER-OMP/pair_airebo_omp.cpp b/src/USER-OMP/pair_airebo_omp.cpp index 84821f1c8c..f3aa9986fe 100644 --- a/src/USER-OMP/pair_airebo_omp.cpp +++ b/src/USER-OMP/pair_airebo_omp.cpp @@ -1622,7 +1622,7 @@ double PairAIREBOOMP::bondorder_thr(int i, int j, double rij[3], double rijmag, (1.0-tspjik)*(1.0-tspijl); aaa1 = -prefactor*(1.0-square(om1234)) * (1.0-tspjik)*(1.0-tspijl); - aaa2 = aaa1*w21*w34; + aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34; at2 = aa*cwnum; fcijpc = (-dt1dij*at2)+(aaa2*dtsjik*dctij*(1.0-tspijl)) + @@ -2550,7 +2550,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag (1.0-tspjik)*(1.0-tspijl); aaa1 = -prefactor*(1.0-square(om1234)) * (1.0-tspjik)*(1.0-tspijl); - aaa2 = aaa1*w21*w34; + aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34; at2 = aa*cwnum; fcikpc = (-dt1dik*at2)+(aaa2*dtsjik*dctik*(1.0-tspijl)); -- GitLab From 35e92733e9da4d3dd80721ef827cf97eceaf0382 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 16 May 2017 17:40:04 -0400 Subject: [PATCH 137/593] import multi-element compatible pair style edip as edip/multi --- doc/src/Section_commands.txt | 1 + doc/src/pair_edip.txt | 18 +- examples/USER/misc/edip/Si.edip | 26 + examples/USER/misc/edip/SiC.edip | 38 + examples/USER/misc/edip/data.SiC | 138 +++ examples/USER/misc/edip/in.edip-Si | 72 ++ examples/USER/misc/edip/in.edip-Si-multi | 72 ++ examples/USER/misc/edip/in.edip-SiC | 33 + .../edip/log.4May2017.g++.edip-Si-multi.1 | 167 ++++ .../edip/log.4May2017.g++.edip-Si-multi.4 | 167 ++++ .../USER/misc/edip/log.4May2017.g++.edip-Si.1 | 167 ++++ .../USER/misc/edip/log.4May2017.g++.edip-Si.4 | 167 ++++ .../misc/edip/log.4May2017.g++.edip-SiC.1 | 92 ++ .../misc/edip/log.4May2017.g++.edip-SiC.4 | 92 ++ src/.gitignore | 2 + src/USER-MISC/pair_edip.cpp | 5 +- src/USER-MISC/pair_edip_multi.cpp | 784 ++++++++++++++++++ src/USER-MISC/pair_edip_multi.h | 113 +++ 18 files changed, 2146 insertions(+), 8 deletions(-) create mode 100644 examples/USER/misc/edip/Si.edip create mode 100644 examples/USER/misc/edip/SiC.edip create mode 100644 examples/USER/misc/edip/data.SiC create mode 100644 examples/USER/misc/edip/in.edip-Si create mode 100644 examples/USER/misc/edip/in.edip-Si-multi create mode 100644 examples/USER/misc/edip/in.edip-SiC create mode 100644 examples/USER/misc/edip/log.4May2017.g++.edip-Si-multi.1 create mode 100644 examples/USER/misc/edip/log.4May2017.g++.edip-Si-multi.4 create mode 100644 examples/USER/misc/edip/log.4May2017.g++.edip-Si.1 create mode 100644 examples/USER/misc/edip/log.4May2017.g++.edip-Si.4 create mode 100644 examples/USER/misc/edip/log.4May2017.g++.edip-SiC.1 create mode 100644 examples/USER/misc/edip/log.4May2017.g++.edip-SiC.4 create mode 100644 src/USER-MISC/pair_edip_multi.cpp create mode 100644 src/USER-MISC/pair_edip_multi.h diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index 771e830841..ed9a8928e8 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -1016,6 +1016,7 @@ package"_Section_start.html#start_3. "dpd/fdt/energy"_pair_dpd_fdt.html, "eam/cd (o)"_pair_eam.html, "edip (o)"_pair_edip.html, +"edip/multi"_pair_edip.html, "eff/cut"_pair_eff.html, "exp6/rx"_pair_exp6_rx.html, "gauss/cut"_pair_gauss.html, diff --git a/doc/src/pair_edip.txt b/doc/src/pair_edip.txt index cdfc265752..d0c90d76dd 100644 --- a/doc/src/pair_edip.txt +++ b/doc/src/pair_edip.txt @@ -12,6 +12,7 @@ pair_style edip command :h3 pair_style edip :pre pair_style edip/omp :pre +pair_style edip/multi :pre [Examples:] @@ -20,11 +21,14 @@ pair_coeff * * Si.edip Si [Description:] -The {edip} style computes a 3-body "EDIP"_#EDIP potential which is -popular for modeling silicon materials where it can have advantages -over other models such as the "Stillinger-Weber"_pair_sw.html or -"Tersoff"_pair_tersoff.html potentials. In EDIP, the energy E of a -system of atoms is +The {edip} and {edip/multi} styles compute a 3-body "EDIP"_#EDIP +potential which is popular for modeling silicon materials where +it can have advantages over other models such as the +"Stillinger-Weber"_pair_sw.html or "Tersoff"_pair_tersoff.html +potentials. The {edip} style has been programmed for single element +potentials, while {edip/multi} supports multi-element EDIP runs. + +In EDIP, the energy E of a system of atoms is :c,image(Eqs/pair_edip.jpg) @@ -142,7 +146,7 @@ This pair style can only be used via the {pair} keyword of the [Restrictions:] -This angle style can only be used if LAMMPS was built with the +This pair style can only be used if LAMMPS was built with the USER-MISC package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info on packages. @@ -151,7 +155,7 @@ for pair interactions. The EDIP potential files provided with LAMMPS (see the potentials directory) are parameterized for metal "units"_units.html. -You can use the SW potential with any LAMMPS units, but you would need +You can use the EDIP potential with any LAMMPS units, but you would need to create your own EDIP potential file with coefficients listed in the appropriate units if your simulation doesn't use "metal" units. diff --git a/examples/USER/misc/edip/Si.edip b/examples/USER/misc/edip/Si.edip new file mode 100644 index 0000000000..b3b960e738 --- /dev/null +++ b/examples/USER/misc/edip/Si.edip @@ -0,0 +1,26 @@ +# DATE: 2011-09-15 CONTRIBUTOR: Unknown CITATION: Justo, Bazant, Kaxiras, Bulatov and Yip, Phys Rev B, 58, 2539 (1998) + +# EDIP parameters for various elements and mixtures +# multiple entries can be added to this file, LAMMPS reads the ones it needs +# these entries are in LAMMPS "metal" units + +# format of a single entry (one or more lines) +# +# element 1, element 2, element 3, +# A B cutoffA cutoffC alpha beta eta +# gamma lambda mu rho sigma Q0 +# u1 u2 u3 u4 +# +# units for each parameters: +# A , lambda are in eV +# B, cutoffA, cutoffC, gamma, sigma are in Angstrom +# alpha, beta, eta, mu, rho, Q0, u1-u4 are pure numbers + +# Here are the original parameters in metal units, for Silicon from: +# J. F. Justo, M. Z. Bazant, E. Kaxiras, V. V. Bulatov, S. Yip +# Phys. Rev. B 58, 2539 (1998) +# + +Si Si Si 7.9821730 1.5075463 3.1213820 2.5609104 3.1083847 0.0070975 0.2523244 + 1.1247945 1.4533108 0.6966326 1.2085196 0.5774108 312.1341346 + -0.165799 32.557 0.286198 0.66 diff --git a/examples/USER/misc/edip/SiC.edip b/examples/USER/misc/edip/SiC.edip new file mode 100644 index 0000000000..0485d345bb --- /dev/null +++ b/examples/USER/misc/edip/SiC.edip @@ -0,0 +1,38 @@ +# DATE: 2017-05-16 CONTRIBUTOR: Laurent Pizzagalli CITATION: G. Lucas, M. Bertolus, and L. Pizzagalli, J. Phys. : Condens. Matter 22, 035802 (2010) +# element 1, element 2, element 3, +# A B cutoffA cutoffC alpha beta eta +# gamma lambda mu rho sigma Q0 +# u1 u2 u3 u4 +# +Si Si Si 5.488043 1.446435 2.941586 2.540193 3.066580 0.008593 0.589390 + 1.135256 2.417497 0.629131 1.343679 0.298443 208.924548 + -0.165799 32.557 0.286198 0.66 + +C C C 10.222599 0.959814 2.212263 1.741598 1.962090 0.025661 0.275605 + 1.084183 3.633621 0.594236 2.827634 0.536561 289.305617 + -0.165799 32.557 0.286198 0.66 + +C Si Si 7.535967 1.177019 2.534972 1.973974 2.507738 0.015347 0.432497 + 1.191567 3.025559 0.611684 2.061835 0.423863 249.115082 + -0.165799 32.557000 0.286198 0.660000 + +Si C C 7.535967 1.177019 2.534972 1.973974 2.507738 0.015347 0.432497 + 1.191567 3.025559 0.611684 2.061835 0.423863 249.115082 + -0.165799 32.557000 0.286198 0.660000 + +Si Si C 5.488043 1.446435 2.941586 2.540193 3.066580 0.008593 0.510944 + 1.135256 2.721528 0.620407 1.343679 0.298443 229.019815 + -0.165799 32.557000 0.286198 0.660000 + +Si C Si 7.535967 1.177019 2.534972 1.973974 2.507738 0.015347 0.510944 + 1.191567 2.721528 0.620407 2.061835 0.423863 229.019815 + -0.165799 32.557000 0.286198 0.660000 + +C C Si 10.222599 0.959814 2.212263 1.741598 1.962090 0.025661 0.354051 + 1.084183 3.329590 0.602960 2.827634 0.536561 269.210350 + -0.165799 32.557000 0.286198 0.660000 + +C Si C 7.535967 1.177019 2.534972 1.973974 2.507738 0.015347 0.354051 + 1.191567 3.329590 0.602960 2.061835 0.423863 269.210350 + -0.165799 32.557000 0.286198 0.660000 + diff --git a/examples/USER/misc/edip/data.SiC b/examples/USER/misc/edip/data.SiC new file mode 100644 index 0000000000..fa50c14803 --- /dev/null +++ b/examples/USER/misc/edip/data.SiC @@ -0,0 +1,138 @@ +Position data for Silicon-Carbon system + + 128 atoms + 2 atom types + -6.00 5.97232152 xlo xhi + -6.00 5.97232152 ylo yhi + -6.00 5.97232152 zlo zhi + + Atoms + +1 2 -2.9378454 -4.4592615 -4.8109196 +2 2 5.6222143 -2.7335026 -1.7157569 +3 2 -2.6614623 -5.5431059 1.6353686 +4 2 -5.4326838 -4.6174577 5.9452279 +5 2 5.8679239 -0.1120535 -3.5839373 +6 2 -3.7174621 -0.6623311 -0.3714789 +7 2 -5.0724728 -2.5671623 4.4103461 +8 2 -3.3951436 0.9341126 4.9310702 +9 2 -5.4347593 1.9523767 -5.6180938 +10 2 -4.5884719 2.2904528 -1.0597739 +11 2 -5.9058662 0.6212406 2.0127574 +12 2 -4.7680660 0.1965740 4.3267764 +13 2 -5.4228882 5.2569673 -4.5162920 +14 2 -5.2683965 -5.9193658 -2.8648668 +15 2 -2.8610884 1.0484664 2.0299077 +16 2 -4.0711084 5.3133026 3.8009514 +17 2 -0.1947147 -4.1677696 -5.6950931 +18 2 -2.9892710 -3.1647368 -1.6173910 +19 2 -0.9129311 -4.3819066 -0.1601859 +20 2 -2.4513693 -5.2466501 4.8882912 +21 2 -2.8879952 -0.1633446 -3.3401150 +22 1 -4.6738762 -1.3807254 -2.2946777 +23 2 -0.6973948 -1.4885343 0.6005156 +24 1 -2.7392164 -2.4774843 0.2387186 +25 2 -2.6551254 -2.7229952 2.6350264 +26 1 -3.4644263 -4.6028144 3.3817786 +27 2 0.7227614 -2.0709446 2.9214737 +28 1 -2.1000577 -3.2131296 5.7273437 +29 2 -3.1057649 2.3204819 -2.2725622 +30 1 -2.2298751 0.7168389 -1.3107201 +31 2 -1.8698261 1.4006751 0.7265108 +32 1 -4.1103409 -0.7093340 1.9341753 +33 2 -0.3505581 3.2707182 -0.2880656 +34 1 -3.4045407 -1.4383961 4.3903527 +35 2 -3.0940529 1.4132478 -5.3635505 +36 1 -4.4560663 1.2072875 -3.7310176 +37 2 -2.6061002 4.6373499 -4.6903941 +38 1 -3.3477444 4.6768137 -2.6284678 +39 2 0.8121697 4.8602418 -4.6710946 +40 1 -2.5756922 3.3740738 -0.2136350 +41 2 -0.3867976 5.8745611 -2.1119905 +42 1 -1.6766249 1.3374292 3.8741477 +43 2 -0.8770613 3.3735941 4.3846975 +44 1 -1.8609254 3.3158245 -5.9786556 +45 1 -5.2732321 -4.6073253 -0.9581754 +46 1 -2.7888697 -5.6910152 -0.7922023 +47 1 -2.4717165 4.5801880 2.5083210 +48 1 -3.8819950 5.8456589 -5.7563384 +49 2 2.2314782 -2.7729214 -5.2356862 +50 2 0.2981976 -3.1385279 -3.1608167 +51 2 2.8810785 -3.4658695 -0.5823196 +52 2 0.2509625 -5.7595229 2.7389761 +53 2 -0.2934120 -0.8029431 -3.3698507 +54 1 -1.0075690 -2.0481922 -1.9419298 +55 2 2.0729069 1.4922441 -2.3898096 +56 1 1.1110944 -3.2004208 0.9491078 +57 2 1.6774298 -0.7901860 2.5158773 +58 1 -0.8342297 -4.3342518 2.0971458 +59 2 3.2747406 -1.3107897 4.7884706 +60 1 1.7126246 -3.3691471 4.5581012 +61 2 0.4770605 1.7769008 -5.3339915 +62 1 0.2944391 0.5892781 -2.2030106 +63 2 2.2039275 3.1557557 -2.0276796 +64 1 -0.0404494 0.4767818 1.0396418 +65 2 1.1395867 2.3763443 2.3481007 +66 1 -0.9738374 -1.6325161 3.7538567 +67 2 -0.3291998 0.2996990 5.2770809 +68 1 -1.6185604 -0.3964274 -5.1771220 +69 2 2.5999949 -5.1977715 5.8230717 +70 1 -1.6270675 2.3210900 -3.6299941 +71 2 3.6532700 4.9282597 -5.4319276 +72 1 0.0788934 4.0241037 -2.5011530 +73 2 2.8556507 2.6168653 2.1125546 +74 1 0.9738989 2.6255364 4.3412121 +75 2 3.7452938 3.4521356 4.5946426 +76 1 2.0805182 4.7039015 5.3280260 +77 1 -1.0324174 -5.8155041 -4.3265820 +78 1 0.7622442 -4.3631629 -1.3156572 +79 1 0.3263684 3.9937357 1.6172321 +80 1 -0.4350105 -5.7997058 4.5959134 +81 2 3.9161132 -4.6052788 -3.3191717 +82 2 1.9240657 5.7345079 -1.9754251 +83 2 -5.9794488 -4.2369359 1.8646522 +84 2 4.3339975 -4.4845227 5.3737440 +85 2 2.2755456 -0.6327737 -5.7931837 +86 1 1.8728190 -1.5504906 -3.4560010 +87 2 3.4558100 -1.1054068 -1.8333071 +88 1 4.3788172 -1.9466494 -0.3284637 +89 2 2.5999235 -3.7548996 2.5740569 +90 1 3.9983910 -4.4856603 1.1968663 +91 2 -5.7295580 -2.1475672 -5.9963645 +92 1 4.2664051 -2.6988975 -5.8005478 +93 2 4.5254685 2.2906832 -3.4765798 +94 1 2.3603088 1.3416442 -4.4173836 +95 2 4.7767057 1.4061217 -0.7524620 +96 1 1.8072666 -0.7835973 -0.4581995 +97 2 4.4745018 0.3736224 2.1068274 +98 1 3.6081170 -1.7315713 2.4019053 +99 2 4.6281423 -0.2865409 4.4756524 +100 1 1.7975239 0.2893530 4.2330830 +101 2 5.8341452 4.4986472 -5.9664541 +102 1 3.2401308 4.1655227 -3.5070029 +103 2 4.8720339 4.8709982 -2.3364366 +104 1 3.5526476 1.2262752 0.6926826 +105 2 -5.8173342 4.5420479 1.5578881 +106 1 3.9683224 1.5441137 3.8284375 +107 2 -5.5349308 1.9067049 3.7504113 +108 1 4.4728615 2.6415574 -5.5952809 +109 1 1.7000950 -4.8115440 -4.1953920 +110 1 1.7221527 4.1878404 -0.3712681 +111 1 3.9218156 4.5935583 1.3263407 +112 1 3.1310195 -5.8922481 3.6001155 +113 1 4.7558719 -2.2877771 -3.4742052 +114 1 -5.5050300 -2.7027381 0.8748867 +115 1 5.8418594 -4.6064370 3.8714113 +116 1 -4.7516868 -3.1691984 -4.4099768 +117 1 3.9404971 0.7188702 -2.2898786 +118 1 -5.6869740 0.2042380 -0.1916738 +119 1 5.8949589 -1.2422560 3.1201292 +120 1 5.9675804 -0.0712572 5.8964022 +121 1 -5.6208517 3.3600036 -2.9493510 +122 1 5.2065263 3.4517912 -0.3800894 +123 1 -4.6994522 2.5489583 1.8297431 +124 1 -4.0758407 3.0726196 5.0647973 +125 1 4.1587591 -5.0896820 -1.1443498 +126 1 -4.6963753 -5.7429833 1.1357818 +127 1 5.5994192 4.6887008 3.5948264 +128 1 5.0988369 -5.3774409 -4.9051267 diff --git a/examples/USER/misc/edip/in.edip-Si b/examples/USER/misc/edip/in.edip-Si new file mode 100644 index 0000000000..b4c6669621 --- /dev/null +++ b/examples/USER/misc/edip/in.edip-Si @@ -0,0 +1,72 @@ + +units metal + +atom_style atomic +atom_modify map array +boundary p p p +atom_modify sort 0 0.0 + +# temperature + +variable t equal 1800.0 + +# coordination number cutoff + +variable r equal 2.835 + +# minimization parameters + +variable etol equal 1.0e-5 +variable ftol equal 1.0e-5 +variable maxiter equal 100 +variable maxeval equal 100 +variable dmax equal 1.0e-1 + +# diamond unit cell + +variable a equal 5.431 +lattice custom $a & + a1 1.0 0.0 0.0 & + a2 0.0 1.0 0.0 & + a3 0.0 0.0 1.0 & + basis 0.0 0.0 0.0 & + basis 0.0 0.5 0.5 & + basis 0.5 0.0 0.5 & + basis 0.5 0.5 0.0 & + basis 0.25 0.25 0.25 & + basis 0.25 0.75 0.75 & + basis 0.75 0.25 0.75 & + basis 0.75 0.75 0.25 + +region myreg block 0 4 & + 0 4 & + 0 4 +create_box 1 myreg +create_atoms 1 region myreg + +mass 1 28.06 + +group Si type 1 + +velocity all create $t 5287287 mom yes rot yes dist gaussian + +# make a vacancy + +group del id 300 +delete_atoms group del + +pair_style edip +pair_coeff * * Si.edip Si + +thermo 10 + +fix 1 all nvt temp $t $t 0.1 + +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes + +# equilibrate + +run 500 + diff --git a/examples/USER/misc/edip/in.edip-Si-multi b/examples/USER/misc/edip/in.edip-Si-multi new file mode 100644 index 0000000000..73a2e09143 --- /dev/null +++ b/examples/USER/misc/edip/in.edip-Si-multi @@ -0,0 +1,72 @@ + +units metal + +atom_style atomic +atom_modify map array +boundary p p p +atom_modify sort 0 0.0 + +# temperature + +variable t equal 1800.0 + +# coordination number cutoff + +variable r equal 2.835 + +# minimization parameters + +variable etol equal 1.0e-5 +variable ftol equal 1.0e-5 +variable maxiter equal 100 +variable maxeval equal 100 +variable dmax equal 1.0e-1 + +# diamond unit cell + +variable a equal 5.431 +lattice custom $a & + a1 1.0 0.0 0.0 & + a2 0.0 1.0 0.0 & + a3 0.0 0.0 1.0 & + basis 0.0 0.0 0.0 & + basis 0.0 0.5 0.5 & + basis 0.5 0.0 0.5 & + basis 0.5 0.5 0.0 & + basis 0.25 0.25 0.25 & + basis 0.25 0.75 0.75 & + basis 0.75 0.25 0.75 & + basis 0.75 0.75 0.25 + +region myreg block 0 4 & + 0 4 & + 0 4 +create_box 1 myreg +create_atoms 1 region myreg + +mass 1 28.06 + +group Si type 1 + +velocity all create $t 5287287 mom yes rot yes dist gaussian + +# make a vacancy + +group del id 300 +delete_atoms group del + +pair_style edip/multi +pair_coeff * * Si.edip Si + +thermo 10 + +fix 1 all nvt temp $t $t 0.1 + +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes + +# equilibrate + +run 500 + diff --git a/examples/USER/misc/edip/in.edip-SiC b/examples/USER/misc/edip/in.edip-SiC new file mode 100644 index 0000000000..ac95f6c4d1 --- /dev/null +++ b/examples/USER/misc/edip/in.edip-SiC @@ -0,0 +1,33 @@ +# Test of MEAM potential for SiC system + +units metal +boundary p p p + +atom_style atomic + +read_data data.SiC + +pair_style edip/multi +pair_coeff * * SiC.edip Si C + +mass 1 28.085 +mass 2 12.001 + +neighbor 1.0 bin +neigh_modify delay 1 + +fix 1 all nve +thermo 10 +timestep 0.001 + +#dump 1 all atom 50 dump.meam + +#dump 2 all image 10 image.*.jpg element element & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 3 element Si C + +#dump 3 all movie 10 movie.mpg element element & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 3 element Si C + +run 100 diff --git a/examples/USER/misc/edip/log.4May2017.g++.edip-Si-multi.1 b/examples/USER/misc/edip/log.4May2017.g++.edip-Si-multi.1 new file mode 100644 index 0000000000..ab7d339023 --- /dev/null +++ b/examples/USER/misc/edip/log.4May2017.g++.edip-Si-multi.1 @@ -0,0 +1,167 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task + +units metal + +atom_style atomic +atom_modify map array +boundary p p p +atom_modify sort 0 0.0 + +# temperature + +variable t equal 1800.0 + +# coordination number cutoff + +variable r equal 2.835 + +# minimization parameters + +variable etol equal 1.0e-5 +variable ftol equal 1.0e-5 +variable maxiter equal 100 +variable maxeval equal 100 +variable dmax equal 1.0e-1 + +# diamond unit cell + +variable a equal 5.431 +lattice custom $a a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +lattice custom 5.431 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +Lattice spacing in x,y,z = 5.431 5.431 5.431 + +region myreg block 0 4 0 4 0 4 +create_box 1 myreg +Created orthogonal box = (0 0 0) to (21.724 21.724 21.724) + 1 by 1 by 1 MPI processor grid +create_atoms 1 region myreg +Created 512 atoms + +mass 1 28.06 + +group Si type 1 +512 atoms in group Si + +velocity all create $t 5287287 mom yes rot yes dist gaussian +velocity all create 1800 5287287 mom yes rot yes dist gaussian + +# make a vacancy + +group del id 300 +1 atoms in group del +delete_atoms group del +Deleted 1 atoms, new total = 511 + +pair_style edip/multi +pair_coeff * * Si.edip Si +Reading potential file Si.edip with DATE: 2011-09-15 + +thermo 10 + +fix 1 all nvt temp $t $t 0.1 +fix 1 all nvt temp 1800 $t 0.1 +fix 1 all nvt temp 1800 1800 0.1 + +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes + +# equilibrate + +run 500 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.12138 + ghost atom cutoff = 4.12138 + binsize = 2.06069, bins = 11 11 11 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair edip/multi, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.979 | 2.979 | 2.979 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 1802.5039 -2372.6618 0 -2253.8359 12261.807 + 10 952.62744 -2316.428 0 -2253.6283 723.08194 + 20 549.13801 -2289.442 0 -2253.2413 -2444.5204 + 30 1047.0106 -2321.1523 0 -2252.1305 9013.201 + 40 663.46141 -2294.2083 0 -2250.4711 2942.5348 + 50 504.74535 -2282.849 0 -2249.5748 -461.44909 + 60 1019.2173 -2315.5639 0 -2248.3744 7706.4286 + 70 844.51195 -2302.5251 0 -2246.8526 3116.8302 + 80 814.90407 -2299.3372 0 -2245.6166 794.77455 + 90 1269.5636 -2327.4775 0 -2243.7845 7729.3968 + 100 977.61563 -2306.1118 0 -2241.6647 2969.9939 + 110 843.08539 -2295.6547 0 -2240.0763 1393.4039 + 120 1161.6968 -2314.6587 0 -2238.0766 7398.3492 + 130 918.19451 -2296.4321 0 -2235.9022 2537.3997 + 140 881.42548 -2292.2768 0 -2234.1709 1550.3339 + 150 1231.1005 -2313.1054 0 -2231.9479 8112.7566 + 160 967.01862 -2293.332 0 -2229.5836 3422.9627 + 170 833.51248 -2282.7489 0 -2227.8015 43.991459 + 180 1240.8488 -2307.3633 0 -2225.5632 6557.8651 + 190 1126.4621 -2297.1922 0 -2222.9328 4289.0067 + 200 947.59571 -2283.29 0 -2220.822 586.2811 + 210 1228.153 -2299.4702 0 -2218.5071 5315.0425 + 220 1215.4104 -2295.9408 0 -2215.8176 4870.3417 + 230 1112.436 -2286.7552 0 -2213.4204 2527.1879 + 240 1300.081 -2296.6013 0 -2210.8965 5738.3708 + 250 1192.5738 -2286.8463 0 -2208.2286 4076.49 + 260 1004.7055 -2272.1753 0 -2205.9424 359.37589 + 270 1241.2018 -2285.3632 0 -2203.5399 4160.5763 + 280 1360.1974 -2290.325 0 -2200.6572 5802.3902 + 290 1151.9365 -2273.9467 0 -2198.008 1418.8887 + 300 1174.3518 -2273.0089 0 -2195.5925 1998.229 + 310 1329.2727 -2280.5049 0 -2192.8757 4721.7297 + 320 1284.4414 -2274.7519 0 -2190.0781 2985.4674 + 330 1328.3761 -2274.9545 0 -2187.3844 4543.2109 + 340 1446.3847 -2279.8693 0 -2184.5198 6254.4059 + 350 1366.2165 -2271.7475 0 -2181.6828 3637.8335 + 360 1358.9609 -2268.5982 0 -2179.0118 3049.5798 + 370 1552.208 -2278.4802 0 -2176.1545 6334.0058 + 380 1562.5295 -2276.1793 0 -2173.1732 5787.5547 + 390 1415.5498 -2263.7824 0 -2170.4655 3438.5766 + 400 1323.1568 -2255.1641 0 -2167.938 2427.2294 + 410 1260.7186 -2248.5373 0 -2165.4273 1208.6299 + 420 1282.1118 -2247.3718 0 -2162.8516 462.65374 + 430 1451.944 -2255.7551 0 -2160.0391 2037.8025 + 440 1568.9415 -2260.417 0 -2156.9882 3531.1602 + 450 1565.8262 -2257.2396 0 -2154.0162 2586.7886 + 460 1677.7143 -2261.7214 0 -2151.122 4112.9756 + 470 1762.9071 -2264.4244 0 -2148.2089 5053.2139 + 480 1704.5898 -2257.8678 0 -2145.4967 4077.4626 + 490 1731.2619 -2257.1048 0 -2142.9753 4710.5263 + 500 1723.9777 -2254.161 0 -2140.5118 4760.7295 +Loop time of 0.679564 on 1 procs for 500 steps with 511 atoms + +Performance: 63.570 ns/day, 0.378 hours/ns, 735.765 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.65181 | 0.65181 | 0.65181 | 0.0 | 95.92 +Neigh | 0.013857 | 0.013857 | 0.013857 | 0.0 | 2.04 +Comm | 0.0033884 | 0.0033884 | 0.0033884 | 0.0 | 0.50 +Output | 0.00070739 | 0.00070739 | 0.00070739 | 0.0 | 0.10 +Modify | 0.0083694 | 0.0083694 | 0.0083694 | 0.0 | 1.23 +Other | | 0.001432 | | | 0.21 + +Nlocal: 511 ave 511 max 511 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 845 ave 845 max 845 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 7902 ave 7902 max 7902 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 7902 +Ave neighs/atom = 15.4638 +Neighbor list builds = 19 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/USER/misc/edip/log.4May2017.g++.edip-Si-multi.4 b/examples/USER/misc/edip/log.4May2017.g++.edip-Si-multi.4 new file mode 100644 index 0000000000..91be601fa8 --- /dev/null +++ b/examples/USER/misc/edip/log.4May2017.g++.edip-Si-multi.4 @@ -0,0 +1,167 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task + +units metal + +atom_style atomic +atom_modify map array +boundary p p p +atom_modify sort 0 0.0 + +# temperature + +variable t equal 1800.0 + +# coordination number cutoff + +variable r equal 2.835 + +# minimization parameters + +variable etol equal 1.0e-5 +variable ftol equal 1.0e-5 +variable maxiter equal 100 +variable maxeval equal 100 +variable dmax equal 1.0e-1 + +# diamond unit cell + +variable a equal 5.431 +lattice custom $a a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +lattice custom 5.431 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +Lattice spacing in x,y,z = 5.431 5.431 5.431 + +region myreg block 0 4 0 4 0 4 +create_box 1 myreg +Created orthogonal box = (0 0 0) to (21.724 21.724 21.724) + 1 by 2 by 2 MPI processor grid +create_atoms 1 region myreg +Created 512 atoms + +mass 1 28.06 + +group Si type 1 +512 atoms in group Si + +velocity all create $t 5287287 mom yes rot yes dist gaussian +velocity all create 1800 5287287 mom yes rot yes dist gaussian + +# make a vacancy + +group del id 300 +1 atoms in group del +delete_atoms group del +Deleted 1 atoms, new total = 511 + +pair_style edip/multi +pair_coeff * * Si.edip Si +Reading potential file Si.edip with DATE: 2011-09-15 + +thermo 10 + +fix 1 all nvt temp $t $t 0.1 +fix 1 all nvt temp 1800 $t 0.1 +fix 1 all nvt temp 1800 1800 0.1 + +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes + +# equilibrate + +run 500 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.12138 + ghost atom cutoff = 4.12138 + binsize = 2.06069, bins = 11 11 11 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair edip/multi, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.955 | 2.955 | 2.955 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 1802.3816 -2372.6618 0 -2253.844 12260.967 + 10 938.75954 -2315.5185 0 -2253.6329 558.21646 + 20 534.27233 -2288.4721 0 -2253.2514 -2710.768 + 30 1043.7796 -2320.9485 0 -2252.1398 8679.4381 + 40 658.0916 -2293.8597 0 -2250.4765 2165.3742 + 50 517.93009 -2283.7238 0 -2249.5805 -1124.9373 + 60 1063.3594 -2318.4409 0 -2248.3414 7277.8526 + 70 868.14006 -2304.0134 0 -2246.7832 2050.2848 + 80 826.37805 -2300.0187 0 -2245.5416 91.099408 + 90 1289.6772 -2328.7151 0 -2243.6961 8180.7423 + 100 976.36208 -2305.9371 0 -2241.5727 3614.0499 + 110 810.81713 -2293.4705 0 -2240.0193 1359.368 + 120 1165.707 -2314.9026 0 -2238.056 7336.45 + 130 929.81245 -2297.139 0 -2235.8432 2793.8451 + 140 804.47874 -2287.2074 0 -2234.174 704.92455 + 150 1182.4141 -2310.0266 0 -2232.0787 7822.2337 + 160 979.92391 -2294.2969 0 -2229.6977 3206.7458 + 170 830.14748 -2282.6079 0 -2227.8824 -296.87377 + 180 1271.1133 -2309.4274 0 -2225.6322 7199.614 + 190 1209.6006 -2302.6407 0 -2222.9006 5528.3784 + 200 954.67693 -2283.6621 0 -2220.7273 47.02795 + 210 1260.814 -2301.5582 0 -2218.442 4829.788 + 220 1274.9954 -2299.7285 0 -2215.6774 5518.0597 + 230 1048.0074 -2282.398 0 -2213.3106 1754.4144 + 240 1261.7072 -2294.1108 0 -2210.9356 5233.2712 + 250 1272.6178 -2292.0793 0 -2208.1849 4795.9325 + 260 989.14205 -2271.0278 0 -2205.8209 -820.1828 + 270 1212.0445 -2283.4212 0 -2203.52 3395.8634 + 280 1391.9572 -2292.3809 0 -2200.6194 6666.2451 + 290 1093.1204 -2270.0421 0 -2197.9807 206.94523 + 300 1159.4831 -2272.102 0 -2195.6657 778.53806 + 310 1407.3528 -2285.6228 0 -2192.8463 5223.048 + 320 1236.7163 -2271.5389 0 -2190.0113 1865.3943 + 330 1258.8275 -2270.4611 0 -2187.4758 2333.3209 + 340 1507.9519 -2283.9906 0 -2184.5824 6775.5456 + 350 1366.5116 -2271.7287 0 -2181.6446 3432.115 + 360 1305.2829 -2265.1092 0 -2179.0614 1498.4073 + 370 1581.4335 -2280.4645 0 -2176.2122 6518.5597 + 380 1589.5319 -2277.9428 0 -2173.1567 6334.6506 + 390 1402.6781 -2262.9323 0 -2170.464 3278.3038 + 400 1374.9587 -2258.5717 0 -2167.9307 3608.7284 + 410 1295.7416 -2250.7752 0 -2165.3565 1877.5222 + 420 1278.6727 -2247.1099 0 -2162.8164 1599.4181 + 430 1508.1328 -2259.4245 0 -2160.0044 4300.2224 + 440 1624.2957 -2263.9806 0 -2156.9026 4432.625 + 450 1597.3356 -2259.263 0 -2153.9624 3370.3816 + 460 1772.0922 -2267.9106 0 -2151.0895 5788.3214 + 470 1806.4047 -2267.304 0 -2148.221 5950.1166 + 480 1593.0406 -2250.7469 0 -2145.7294 2518.0576 + 490 1660.9767 -2252.894 0 -2143.398 4282.1643 + 500 1714.283 -2253.9295 0 -2140.9194 5740.0247 +Loop time of 0.205398 on 4 procs for 500 steps with 511 atoms + +Performance: 210.324 ns/day, 0.114 hours/ns, 2434.304 timesteps/s +99.0% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.16285 | 0.1688 | 0.17446 | 1.1 | 82.18 +Neigh | 0.0035172 | 0.0036234 | 0.0038214 | 0.2 | 1.76 +Comm | 0.018727 | 0.024851 | 0.030996 | 2.9 | 12.10 +Output | 0.0013061 | 0.0014012 | 0.0015635 | 0.3 | 0.68 +Modify | 0.0046582 | 0.0048603 | 0.0050988 | 0.2 | 2.37 +Other | | 0.001861 | | | 0.91 + +Nlocal: 127.75 ave 131 max 124 min +Histogram: 1 0 1 0 0 0 0 0 1 1 +Nghost: 433.75 ave 441 max 426 min +Histogram: 1 0 1 0 0 0 0 0 1 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 1979.5 ave 2040 max 1895 min +Histogram: 1 0 0 0 1 0 0 0 0 2 + +Total # of neighbors = 7918 +Ave neighs/atom = 15.4951 +Neighbor list builds = 19 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/USER/misc/edip/log.4May2017.g++.edip-Si.1 b/examples/USER/misc/edip/log.4May2017.g++.edip-Si.1 new file mode 100644 index 0000000000..f7ce00371f --- /dev/null +++ b/examples/USER/misc/edip/log.4May2017.g++.edip-Si.1 @@ -0,0 +1,167 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task + +units metal + +atom_style atomic +atom_modify map array +boundary p p p +atom_modify sort 0 0.0 + +# temperature + +variable t equal 1800.0 + +# coordination number cutoff + +variable r equal 2.835 + +# minimization parameters + +variable etol equal 1.0e-5 +variable ftol equal 1.0e-5 +variable maxiter equal 100 +variable maxeval equal 100 +variable dmax equal 1.0e-1 + +# diamond unit cell + +variable a equal 5.431 +lattice custom $a a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +lattice custom 5.431 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +Lattice spacing in x,y,z = 5.431 5.431 5.431 + +region myreg block 0 4 0 4 0 4 +create_box 1 myreg +Created orthogonal box = (0 0 0) to (21.724 21.724 21.724) + 1 by 1 by 1 MPI processor grid +create_atoms 1 region myreg +Created 512 atoms + +mass 1 28.06 + +group Si type 1 +512 atoms in group Si + +velocity all create $t 5287287 mom yes rot yes dist gaussian +velocity all create 1800 5287287 mom yes rot yes dist gaussian + +# make a vacancy + +group del id 300 +1 atoms in group del +delete_atoms group del +Deleted 1 atoms, new total = 511 + +pair_style edip +pair_coeff * * Si.edip Si +Reading potential file Si.edip with DATE: 2011-09-15 + +thermo 10 + +fix 1 all nvt temp $t $t 0.1 +fix 1 all nvt temp 1800 $t 0.1 +fix 1 all nvt temp 1800 1800 0.1 + +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes + +# equilibrate + +run 500 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.12138 + ghost atom cutoff = 4.12138 + binsize = 2.06069, bins = 11 11 11 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair edip, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.979 | 2.979 | 2.979 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 1802.5039 -2372.6618 0 -2253.8359 12261.807 + 10 952.62744 -2316.428 0 -2253.6283 723.08283 + 20 549.138 -2289.442 0 -2253.2413 -2444.5194 + 30 1047.0106 -2321.1522 0 -2252.1305 9013.2015 + 40 663.46143 -2294.2083 0 -2250.4711 2942.5358 + 50 504.74533 -2282.849 0 -2249.5748 -461.44817 + 60 1019.2173 -2315.5639 0 -2248.3744 7706.429 + 70 844.51197 -2302.5251 0 -2246.8526 3116.8313 + 80 814.90406 -2299.3372 0 -2245.6165 794.77536 + 90 1269.5635 -2327.4775 0 -2243.7845 7729.3971 + 100 977.61566 -2306.1118 0 -2241.6647 2969.9952 + 110 843.08538 -2295.6547 0 -2240.0763 1393.4046 + 120 1161.6968 -2314.6587 0 -2238.0766 7398.3495 + 130 918.19453 -2296.4321 0 -2235.9022 2537.4011 + 140 881.42546 -2292.2768 0 -2234.1709 1550.3345 + 150 1231.1005 -2313.1054 0 -2231.9479 8112.7568 + 160 967.01865 -2293.332 0 -2229.5836 3422.964 + 170 833.51246 -2282.7489 0 -2227.8015 43.99251 + 180 1240.8487 -2307.3633 0 -2225.5632 6557.8652 + 190 1126.4621 -2297.1922 0 -2222.9328 4289.0083 + 200 947.5957 -2283.29 0 -2220.8219 586.28203 + 210 1228.153 -2299.4702 0 -2218.5071 5315.0427 + 220 1215.4104 -2295.9407 0 -2215.8176 4870.343 + 230 1112.436 -2286.7552 0 -2213.4204 2527.1887 + 240 1300.081 -2296.6013 0 -2210.8965 5738.3711 + 250 1192.5739 -2286.8463 0 -2208.2286 4076.4913 + 260 1004.7055 -2272.1753 0 -2205.9424 359.3769 + 270 1241.2018 -2285.3632 0 -2203.5399 4160.5764 + 280 1360.1974 -2290.325 0 -2200.6572 5802.3912 + 290 1151.9366 -2273.9467 0 -2198.008 1418.8905 + 300 1174.3518 -2273.0089 0 -2195.5925 1998.2297 + 310 1329.2726 -2280.5049 0 -2192.8757 4721.7304 + 320 1284.4414 -2274.7519 0 -2190.0781 2985.4687 + 330 1328.3761 -2274.9545 0 -2187.3844 4543.2115 + 340 1446.3847 -2279.8693 0 -2184.5198 6254.4071 + 350 1366.2165 -2271.7475 0 -2181.6828 3637.8351 + 360 1358.9609 -2268.5982 0 -2179.0118 3049.5811 + 370 1552.2079 -2278.4802 0 -2176.1545 6334.0061 + 380 1562.5295 -2276.1793 0 -2173.1731 5787.5565 + 390 1415.5498 -2263.7823 0 -2170.4655 3438.5782 + 400 1323.1568 -2255.1641 0 -2167.938 2427.2311 + 410 1260.7186 -2248.5373 0 -2165.4273 1208.6316 + 420 1282.1118 -2247.3718 0 -2162.8516 462.65508 + 430 1451.9439 -2255.7551 0 -2160.0391 2037.8027 + 440 1568.9415 -2260.417 0 -2156.9882 3531.1613 + 450 1565.8261 -2257.2396 0 -2154.0161 2586.7896 + 460 1677.7143 -2261.7214 0 -2151.122 4112.976 + 470 1762.9071 -2264.4244 0 -2148.2089 5053.2148 + 480 1704.5898 -2257.8678 0 -2145.4966 4077.4649 + 490 1731.2619 -2257.1048 0 -2142.9753 4710.5276 + 500 1723.9777 -2254.161 0 -2140.5118 4760.7316 +Loop time of 0.312472 on 1 procs for 500 steps with 511 atoms + +Performance: 138.252 ns/day, 0.174 hours/ns, 1600.143 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.28525 | 0.28525 | 0.28525 | 0.0 | 91.29 +Neigh | 0.013753 | 0.013753 | 0.013753 | 0.0 | 4.40 +Comm | 0.0033333 | 0.0033333 | 0.0033333 | 0.0 | 1.07 +Output | 0.00071096 | 0.00071096 | 0.00071096 | 0.0 | 0.23 +Modify | 0.008044 | 0.008044 | 0.008044 | 0.0 | 2.57 +Other | | 0.001385 | | | 0.44 + +Nlocal: 511 ave 511 max 511 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 845 ave 845 max 845 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 7902 ave 7902 max 7902 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 7902 +Ave neighs/atom = 15.4638 +Neighbor list builds = 19 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/USER/misc/edip/log.4May2017.g++.edip-Si.4 b/examples/USER/misc/edip/log.4May2017.g++.edip-Si.4 new file mode 100644 index 0000000000..e33f0116f4 --- /dev/null +++ b/examples/USER/misc/edip/log.4May2017.g++.edip-Si.4 @@ -0,0 +1,167 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task + +units metal + +atom_style atomic +atom_modify map array +boundary p p p +atom_modify sort 0 0.0 + +# temperature + +variable t equal 1800.0 + +# coordination number cutoff + +variable r equal 2.835 + +# minimization parameters + +variable etol equal 1.0e-5 +variable ftol equal 1.0e-5 +variable maxiter equal 100 +variable maxeval equal 100 +variable dmax equal 1.0e-1 + +# diamond unit cell + +variable a equal 5.431 +lattice custom $a a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +lattice custom 5.431 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +Lattice spacing in x,y,z = 5.431 5.431 5.431 + +region myreg block 0 4 0 4 0 4 +create_box 1 myreg +Created orthogonal box = (0 0 0) to (21.724 21.724 21.724) + 1 by 2 by 2 MPI processor grid +create_atoms 1 region myreg +Created 512 atoms + +mass 1 28.06 + +group Si type 1 +512 atoms in group Si + +velocity all create $t 5287287 mom yes rot yes dist gaussian +velocity all create 1800 5287287 mom yes rot yes dist gaussian + +# make a vacancy + +group del id 300 +1 atoms in group del +delete_atoms group del +Deleted 1 atoms, new total = 511 + +pair_style edip +pair_coeff * * Si.edip Si +Reading potential file Si.edip with DATE: 2011-09-15 + +thermo 10 + +fix 1 all nvt temp $t $t 0.1 +fix 1 all nvt temp 1800 $t 0.1 +fix 1 all nvt temp 1800 1800 0.1 + +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes + +# equilibrate + +run 500 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.12138 + ghost atom cutoff = 4.12138 + binsize = 2.06069, bins = 11 11 11 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair edip, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.955 | 2.955 | 2.955 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 1802.3816 -2372.6618 0 -2253.8439 12260.967 + 10 938.75954 -2315.5185 0 -2253.6329 558.21736 + 20 534.27232 -2288.4721 0 -2253.2514 -2710.767 + 30 1043.7796 -2320.9485 0 -2252.1398 8679.4385 + 40 658.09162 -2293.8597 0 -2250.4765 2165.3752 + 50 517.93008 -2283.7238 0 -2249.5805 -1124.9362 + 60 1063.3594 -2318.4409 0 -2248.3414 7277.853 + 70 868.14007 -2304.0133 0 -2246.7832 2050.2859 + 80 826.37803 -2300.0187 0 -2245.5416 91.100098 + 90 1289.6772 -2328.7151 0 -2243.6961 8180.7427 + 100 976.36211 -2305.9371 0 -2241.5727 3614.0511 + 110 810.81711 -2293.4705 0 -2240.0193 1359.3687 + 120 1165.707 -2314.9026 0 -2238.056 7336.4505 + 130 929.81248 -2297.139 0 -2235.8432 2793.8463 + 140 804.47872 -2287.2074 0 -2234.174 704.92524 + 150 1182.414 -2310.0266 0 -2232.0787 7822.2339 + 160 979.92395 -2294.2969 0 -2229.6977 3206.7474 + 170 830.14746 -2282.6079 0 -2227.8824 -296.87288 + 180 1271.1133 -2309.4274 0 -2225.6322 7199.614 + 190 1209.6006 -2302.6407 0 -2222.9006 5528.3799 + 200 954.67692 -2283.6621 0 -2220.7272 47.02925 + 210 1260.814 -2301.5582 0 -2218.442 4829.7879 + 220 1274.9954 -2299.7285 0 -2215.6774 5518.0611 + 230 1048.0074 -2282.398 0 -2213.3106 1754.4157 + 240 1261.7071 -2294.1107 0 -2210.9356 5233.2714 + 250 1272.6179 -2292.0793 0 -2208.1849 4795.934 + 260 989.14207 -2271.0278 0 -2205.8209 -820.18098 + 270 1212.0444 -2283.4212 0 -2203.52 3395.8631 + 280 1391.9572 -2292.3809 0 -2200.6194 6666.2464 + 290 1093.1205 -2270.0421 0 -2197.9807 206.94752 + 300 1159.483 -2272.102 0 -2195.6657 778.53823 + 310 1407.3528 -2285.6227 0 -2192.8463 5223.0487 + 320 1236.7164 -2271.5389 0 -2190.0112 1865.3963 + 330 1258.8275 -2270.4611 0 -2187.4758 2333.321 + 340 1507.9519 -2283.9906 0 -2184.5824 6775.546 + 350 1366.5116 -2271.7287 0 -2181.6446 3432.1175 + 360 1305.2828 -2265.1091 0 -2179.0614 1498.4079 + 370 1581.4334 -2280.4645 0 -2176.2122 6518.5598 + 380 1589.5319 -2277.9428 0 -2173.1566 6334.6527 + 390 1402.6782 -2262.9323 0 -2170.464 3278.3048 + 400 1374.9587 -2258.5717 0 -2167.9307 3608.7293 + 410 1295.7416 -2250.7752 0 -2165.3565 1877.5245 + 420 1278.6727 -2247.1099 0 -2162.8164 1599.4189 + 430 1508.1328 -2259.4245 0 -2160.0044 4300.2235 + 440 1624.2957 -2263.9806 0 -2156.9026 4432.6267 + 450 1597.3356 -2259.263 0 -2153.9623 3370.3829 + 460 1772.0921 -2267.9105 0 -2151.0895 5788.3219 + 470 1806.4047 -2267.304 0 -2148.221 5950.1188 + 480 1593.0406 -2250.7469 0 -2145.7294 2518.0601 + 490 1660.9766 -2252.894 0 -2143.398 4282.1654 + 500 1714.2831 -2253.9295 0 -2140.9194 5740.0268 +Loop time of 0.109584 on 4 procs for 500 steps with 511 atoms + +Performance: 394.220 ns/day, 0.061 hours/ns, 4562.726 timesteps/s +99.0% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.074678 | 0.077817 | 0.084705 | 1.4 | 71.01 +Neigh | 0.0036662 | 0.0037943 | 0.0039661 | 0.2 | 3.46 +Comm | 0.013665 | 0.020312 | 0.023178 | 2.7 | 18.54 +Output | 0.0010247 | 0.0010931 | 0.0012922 | 0.3 | 1.00 +Modify | 0.0043213 | 0.0047521 | 0.0051889 | 0.6 | 4.34 +Other | | 0.001814 | | | 1.66 + +Nlocal: 127.75 ave 131 max 124 min +Histogram: 1 0 1 0 0 0 0 0 1 1 +Nghost: 433.75 ave 441 max 426 min +Histogram: 1 0 1 0 0 0 0 0 1 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 1979.5 ave 2040 max 1895 min +Histogram: 1 0 0 0 1 0 0 0 0 2 + +Total # of neighbors = 7918 +Ave neighs/atom = 15.4951 +Neighbor list builds = 19 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/USER/misc/edip/log.4May2017.g++.edip-SiC.1 b/examples/USER/misc/edip/log.4May2017.g++.edip-SiC.1 new file mode 100644 index 0000000000..125106c504 --- /dev/null +++ b/examples/USER/misc/edip/log.4May2017.g++.edip-SiC.1 @@ -0,0 +1,92 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task +# Test of MEAM potential for SiC system + +units metal +boundary p p p + +atom_style atomic + +read_data data.SiC + orthogonal box = (-6 -6 -6) to (5.97232 5.97232 5.97232) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 128 atoms + +pair_style edip/multi +pair_coeff * * SiC.edip Si C +Reading potential file SiC.edip with DATE: 2017-05-16 + +mass 1 28.085 +mass 2 12.001 + +neighbor 1.0 bin +neigh_modify delay 1 + +fix 1 all nve +thermo 10 +timestep 0.001 + +#dump 1 all atom 50 dump.meam + +#dump 2 all image 10 image.*.jpg element element # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 3 element Si C + +#dump 3 all movie 10 movie.mpg element element # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 3 element Si C + +run 100 +Neighbor list info ... + update every 1 steps, delay 1 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 3.94159 + ghost atom cutoff = 3.94159 + binsize = 1.97079, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair edip/multi, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.692 | 2.692 | 2.692 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -563.61621 0 -563.61621 -726147.34 + 10 4224.3601 -633.24829 0 -563.90103 -312355.55 + 20 4528.5661 -638.15183 0 -563.81071 -20091.291 + 30 4817.3654 -642.92111 0 -563.83905 106625.5 + 40 4619.4324 -639.6884 0 -563.85562 107180.42 + 50 4783.0025 -642.26961 0 -563.75166 75134.335 + 60 4525.145 -638.06177 0 -563.77681 71591.713 + 70 4685.2578 -640.72377 0 -563.8104 63956.042 + 80 4621.8393 -639.75912 0 -563.88682 18177.383 + 90 4834.7702 -643.34582 0 -563.97805 15282.823 + 100 4424.0589 -636.60208 0 -563.97656 47963.501 +Loop time of 0.0552888 on 1 procs for 100 steps with 128 atoms + +Performance: 156.270 ns/day, 0.154 hours/ns, 1808.685 timesteps/s +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.051872 | 0.051872 | 0.051872 | 0.0 | 93.82 +Neigh | 0.0023525 | 0.0023525 | 0.0023525 | 0.0 | 4.25 +Comm | 0.0004518 | 0.0004518 | 0.0004518 | 0.0 | 0.82 +Output | 0.00014806 | 0.00014806 | 0.00014806 | 0.0 | 0.27 +Modify | 0.00024796 | 0.00024796 | 0.00024796 | 0.0 | 0.45 +Other | | 0.0002165 | | | 0.39 + +Nlocal: 128 ave 128 max 128 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 473 ave 473 max 473 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 2376 ave 2376 max 2376 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 2376 +Ave neighs/atom = 18.5625 +Neighbor list builds = 11 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/examples/USER/misc/edip/log.4May2017.g++.edip-SiC.4 b/examples/USER/misc/edip/log.4May2017.g++.edip-SiC.4 new file mode 100644 index 0000000000..eb6955703e --- /dev/null +++ b/examples/USER/misc/edip/log.4May2017.g++.edip-SiC.4 @@ -0,0 +1,92 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task +# Test of MEAM potential for SiC system + +units metal +boundary p p p + +atom_style atomic + +read_data data.SiC + orthogonal box = (-6 -6 -6) to (5.97232 5.97232 5.97232) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 128 atoms + +pair_style edip/multi +pair_coeff * * SiC.edip Si C +Reading potential file SiC.edip with DATE: 2017-05-16 + +mass 1 28.085 +mass 2 12.001 + +neighbor 1.0 bin +neigh_modify delay 1 + +fix 1 all nve +thermo 10 +timestep 0.001 + +#dump 1 all atom 50 dump.meam + +#dump 2 all image 10 image.*.jpg element element # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 3 element Si C + +#dump 3 all movie 10 movie.mpg element element # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 3 element Si C + +run 100 +Neighbor list info ... + update every 1 steps, delay 1 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 3.94159 + ghost atom cutoff = 3.94159 + binsize = 1.97079, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair edip/multi, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.686 | 2.686 | 2.686 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -563.61621 0 -563.61621 -726147.34 + 10 4224.3601 -633.24829 0 -563.90103 -312355.55 + 20 4528.5661 -638.15183 0 -563.81071 -20091.291 + 30 4817.3654 -642.92111 0 -563.83905 106625.5 + 40 4619.4324 -639.6884 0 -563.85562 107180.42 + 50 4783.0025 -642.26961 0 -563.75166 75134.335 + 60 4525.145 -638.06177 0 -563.77681 71591.713 + 70 4685.2578 -640.72377 0 -563.8104 63956.042 + 80 4621.8393 -639.75912 0 -563.88682 18177.383 + 90 4834.7702 -643.34582 0 -563.97805 15282.823 + 100 4424.0589 -636.60208 0 -563.97656 47963.501 +Loop time of 0.020755 on 4 procs for 100 steps with 128 atoms + +Performance: 416.285 ns/day, 0.058 hours/ns, 4818.118 timesteps/s +99.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.011816 | 0.013825 | 0.016871 | 1.6 | 66.61 +Neigh | 0.00061321 | 0.00066817 | 0.00074816 | 0.0 | 3.22 +Comm | 0.0023363 | 0.0054012 | 0.0075014 | 2.7 | 26.02 +Output | 0.00020909 | 0.00022268 | 0.00025558 | 0.0 | 1.07 +Modify | 8.3208e-05 | 9.346e-05 | 0.00010395 | 0.0 | 0.45 +Other | | 0.0005446 | | | 2.62 + +Nlocal: 32 ave 36 max 25 min +Histogram: 1 0 0 0 0 0 0 1 1 1 +Nghost: 262.75 ave 273 max 255 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 594 ave 687 max 453 min +Histogram: 1 0 0 0 0 0 1 1 0 1 + +Total # of neighbors = 2376 +Ave neighs/atom = 18.5625 +Neighbor list builds = 11 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/src/.gitignore b/src/.gitignore index df5cea6eb3..0b53288247 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -637,6 +637,8 @@ /pair_eam_fs_opt.h /pair_edip.cpp /pair_edip.h +/pair_edip_multi.cpp +/pair_edip_multi.h /pair_eff_cut.cpp /pair_eff_cut.h /pair_eff_inline.h diff --git a/src/USER-MISC/pair_edip.cpp b/src/USER-MISC/pair_edip.cpp index 6ce84ab767..bd58b746b8 100644 --- a/src/USER-MISC/pair_edip.cpp +++ b/src/USER-MISC/pair_edip.cpp @@ -798,6 +798,9 @@ void PairEDIP::coeff(int narg, char **arg) } } + if (nelements != 1) + error->all(FLERR,"Pair style edip only supports single element potentials"); + // read potential file and initialize potential parameters read_file(arg[2]); @@ -836,7 +839,7 @@ void PairEDIP::coeff(int narg, char **arg) void PairEDIP::init_style() { if (force->newton_pair == 0) - error->all(FLERR,"Pair style EDIP requires newton pair on"); + error->all(FLERR,"Pair style edip requires newton pair on"); // need a full neighbor list diff --git a/src/USER-MISC/pair_edip_multi.cpp b/src/USER-MISC/pair_edip_multi.cpp new file mode 100644 index 0000000000..ad6d48eb7f --- /dev/null +++ b/src/USER-MISC/pair_edip_multi.cpp @@ -0,0 +1,784 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Environment Dependent Interatomic Potential + + Contributing author: Chao Jiang +------------------------------------------------------------------------- */ + +#include +#include +#include +#include +#include +#include "pair_edip_multi.h" +#include "atom.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "force.h" +#include "comm.h" +#include "memory.h" +#include "error.h" + +using namespace LAMMPS_NS; + +#define MAXLINE 1024 +#define DELTA 4 + +/* ---------------------------------------------------------------------- */ + +PairEDIPMulti::PairEDIPMulti(LAMMPS *lmp) : Pair(lmp) +{ + single_enable = 0; + restartinfo = 0; + one_coeff = 1; + manybody_flag = 1; + + nelements = 0; + elements = NULL; + nparams = maxparam = 0; + params = NULL; + elem2param = NULL; +} + +/* ---------------------------------------------------------------------- + check if allocated, since class can be destructed when incomplete +------------------------------------------------------------------------- */ + +PairEDIPMulti::~PairEDIPMulti() +{ + if (elements) + for (int i = 0; i < nelements; i++) delete [] elements[i]; + delete [] elements; + memory->destroy(params); + memory->destroy(elem2param); + + if (allocated) { + memory->destroy(setflag); + memory->destroy(cutsq); + delete [] map; + +//XXX deallocateGrids(); + deallocatePreLoops(); + } +} + +/* ---------------------------------------------------------------------- */ + +void PairEDIPMulti::compute(int eflag, int vflag) +{ + int i,j,k,ii,jj,kk,inum,jnum; + int itype,jtype,ktype,ijparam,ikparam,ijkparam; + double xtmp,ytmp,ztmp,evdwl; + int *ilist,*jlist,*numneigh,**firstneigh; + register int preForceCoord_counter; + + double zeta_i; + double dzetair; + double fpair; + double costheta; + double dpairZ,dtripleZ; + + // eflag != 0 means compute energy contributions in this step + // vflag != 0 means compute virial contributions in this step + + evdwl = 0.0; + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = vflag_fdotr = 0; + + double **x = atom->x; + double **f = atom->f; + int *type = atom->type; + int nlocal = atom->nlocal; + int newton_pair = force->newton_pair; + + inum = list->inum;//total number of atoms in the cell + ilist = list->ilist;//list of atoms + numneigh = list->numneigh;//number of near neighbors + firstneigh = list->firstneigh;//list of neighbors + + // loop over full neighbor list of my atoms + + for (ii = 0; ii < inum; ii++) { + zeta_i = 0.0; + int numForceCoordPairs = 0; + + i = ilist[ii]; + itype = map[type[i]]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + + // all the neighbors of atom i + + jlist = firstneigh[i]; + jnum = numneigh[i]; + + // pre-loop to compute environment coordination f(Z) + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + + double delx, dely, delz, r_ij; + + delx = x[j][0] - xtmp; + dely = x[j][1] - ytmp; + delz = x[j][2] - ztmp; + r_ij = delx * delx + dely * dely + delz * delz; + + jtype = map[type[j]]; + ijparam = elem2param[itype][jtype][jtype]; + if (r_ij > params[ijparam].cutsq) continue; + + r_ij = sqrt(r_ij); + + // zeta and its derivative dZ/dr + + if (r_ij < params[ijparam].cutoffC) zeta_i += 1.0; + else { + double f, fdr; + edip_fc(r_ij, ¶ms[ijparam], f, fdr); + zeta_i += f; + dzetair = -fdr / r_ij; + + preForceCoord_counter=numForceCoordPairs*5; + preForceCoord[preForceCoord_counter+0]=dzetair; + preForceCoord[preForceCoord_counter+1]=delx; + preForceCoord[preForceCoord_counter+2]=dely; + preForceCoord[preForceCoord_counter+3]=delz; + preForceCoord[preForceCoord_counter+4]=j; + numForceCoordPairs++; + } + } + + // two-body interactions + + dpairZ=0; + dtripleZ=0; + + for (jj = 0; jj < jnum; jj++) { + double dr_ij[3], r_ij, f_ij[3]; + + j = jlist[jj]; + j &= NEIGHMASK; + + dr_ij[0] = x[j][0] - xtmp; + dr_ij[1] = x[j][1] - ytmp; + dr_ij[2] = x[j][2] - ztmp; + r_ij = dr_ij[0]*dr_ij[0] + dr_ij[1]*dr_ij[1] + dr_ij[2]*dr_ij[2]; + + jtype = map[type[j]]; + ijparam = elem2param[itype][jtype][jtype]; + if (r_ij > params[ijparam].cutsq) continue; + + r_ij = sqrt(r_ij); + + // potential energy and force + // since pair i-j is different from pair j-i, double counting is + // already considered in constructing the potential + + double fdr, fdZ; + edip_pair(r_ij, zeta_i, ¶ms[ijparam], evdwl, fdr, fdZ); + fpair = -fdr / r_ij; + dpairZ += fdZ; + + f[i][0] -= fpair * dr_ij[0]; + f[i][1] -= fpair * dr_ij[1]; + f[i][2] -= fpair * dr_ij[2]; + + f[j][0] += fpair * dr_ij[0]; + f[j][1] += fpair * dr_ij[1]; + f[j][2] += fpair * dr_ij[2]; + + if (evflag) ev_tally(i, j, nlocal, newton_pair, evdwl, 0.0, fpair, -dr_ij[0], -dr_ij[1], -dr_ij[2]); + + // three-body Forces + + for (kk = jj + 1; kk < jnum; kk++) { + double dr_ik[3], r_ik, f_ik[3]; + + k = jlist[kk]; + k &= NEIGHMASK; + ktype = map[type[k]]; + ikparam = elem2param[itype][ktype][ktype]; + ijkparam = elem2param[itype][jtype][ktype]; + + dr_ik[0] = x[k][0] - xtmp; + dr_ik[1] = x[k][1] - ytmp; + dr_ik[2] = x[k][2] - ztmp; + r_ik = dr_ik[0]*dr_ik[0] + dr_ik[1]*dr_ik[1] + dr_ik[2]*dr_ik[2]; + + if (r_ik > params[ikparam].cutsq) continue; + + r_ik = sqrt(r_ik); + + costheta=vec3_dot(dr_ij, dr_ik) / r_ij / r_ik; + + double v1, v2, v3, v4, v5, v6, v7; + + edip_fcut3(r_ij, ¶ms[ijparam], v1, v2); + edip_fcut3(r_ik, ¶ms[ikparam], v3, v4); + edip_h(costheta, zeta_i, ¶ms[ijkparam], v5, v6, v7); + + // potential energy and forces + evdwl = v1 * v3 * v5; + dtripleZ += v1 * v3 * v7; + + double dri[3], drj[3], drk[3]; + double dhl, dfr; + + dhl = v1 * v3 * v6; + + costheta_d(dr_ij, r_ij, dr_ik, r_ik, dri, drj, drk); + + f_ij[0] = -dhl * drj[0]; + f_ij[1] = -dhl * drj[1]; + f_ij[2] = -dhl * drj[2]; + f_ik[0] = -dhl * drk[0]; + f_ik[1] = -dhl * drk[1]; + f_ik[2] = -dhl * drk[2]; + + dfr = v2 * v3 * v5; + fpair = -dfr / r_ij; + + f_ij[0] += fpair * dr_ij[0]; + f_ij[1] += fpair * dr_ij[1]; + f_ij[2] += fpair * dr_ij[2]; + + dfr = v1 * v4 * v5; + fpair = -dfr / r_ik; + + f_ik[0] += fpair * dr_ik[0]; + f_ik[1] += fpair * dr_ik[1]; + f_ik[2] += fpair * dr_ik[2]; + + f[j][0] += f_ij[0]; + f[j][1] += f_ij[1]; + f[j][2] += f_ij[2]; + + f[k][0] += f_ik[0]; + f[k][1] += f_ik[1]; + f[k][2] += f_ik[2]; + + f[i][0] -= f_ij[0] + f_ik[0]; + f[i][1] -= f_ij[1] + f_ik[1]; + f[i][2] -= f_ij[2] + f_ik[2]; + + if (evflag) ev_tally3(i,j,k,evdwl,0.0,f_ij,f_ik,dr_ij,dr_ik); + } + } + + // forces due to environment coordination f(Z) + for (int idx = 0; idx < numForceCoordPairs; idx++) { + double delx, dely, delz; + + preForceCoord_counter = idx * 5; + dzetair = preForceCoord[preForceCoord_counter+0]; + delx = preForceCoord[preForceCoord_counter+1]; + dely = preForceCoord[preForceCoord_counter+2]; + delz = preForceCoord[preForceCoord_counter+3]; + j = static_cast (preForceCoord[preForceCoord_counter+4]); + + dzetair *= (dpairZ + dtripleZ); + + f[j][0] += dzetair * delx; + f[j][1] += dzetair * dely; + f[j][2] += dzetair * delz; + + f[i][0] -= dzetair * delx; + f[i][1] -= dzetair * dely; + f[i][2] -= dzetair * delz; + + evdwl = 0.0; + if (evflag) ev_tally(i, j, nlocal, newton_pair, evdwl, 0.0, dzetair, -delx, -dely, -delz); + } + } + + if (vflag_fdotr) virial_fdotr_compute(); +} + +double sqr(double x) +{ + return x * x; +} + +//pair Vij, partial derivatives dVij(r,Z)/dr and dVij(r,Z)/dZ +void PairEDIPMulti::edip_pair(double r, double z, Param *param, double &eng, + double &fdr, double &fZ) +{ + double A = param->A; + double B = param->B; + double rho = param->rho; + double beta = param->beta; + double v1,v2,v3,v4; + + v1 = pow(B / r, rho); + v2 = exp(-beta * z * z); + edip_fcut2(r, param, v3, v4); + + eng = A * (v1 - v2) * v3; + fdr = A * (v1 - v2) * v4 + A * (-rho * v1 / r) * v3; + fZ = A * (2 * beta * z * v2) * v3; +} + +//function fc(r) in calculating coordination Z and derivative fc'(r) +void PairEDIPMulti::edip_fc(double r, Param *param, double &f, double &fdr) +{ + double a = param->cutoffA; + double c = param->cutoffC; + double alpha = param->alpha; + double x; + double v1, v2, v3; + + if(r < c + 1E-6) + { + f=1.0; + fdr=0.0; + return; + } + + if(r > a - 1E-6) + { + f=0.0; + fdr=0.0; + return; + } + + x = (a - c) / (r - c); + v1 = x * x * x; + v2 = 1.0 / (1.0 - v1); + + f = exp(alpha * v2); + fdr = (3.0 * x * v1 / (a - c)) * (-alpha * v2 * v2) * f; +} + +//cut-off function for Vij and its derivative fcut2'(r) +void PairEDIPMulti::edip_fcut2(double r, Param *param, double &f, double &fdr) +{ + double sigma = param->sigma; + double a = param->cutoffA; + double v1; + + if(r > a - 1E-6) + { + f=0.0; + fdr=0.0; + return; + } + + v1 = 1.0 / (r - a); + f = exp(sigma * v1); + fdr = (-sigma * v1 * v1) * f; +} + +//function tau(Z) and its derivative tau'(Z) +void PairEDIPMulti::edip_tau(double z, Param *param, double &f, double &fdZ) +{ + double u1 = param->u1; + double u2 = param->u2; + double u3 = param->u3; + double u4 = param->u4; + double v1, v2; + + v1 = exp(-u4 * z); + v2 = exp(-2.0 * u4 * z); + + f = u1 + u2 * u3 * v1 - u2 * v2; + fdZ = -u2 * u3 * u4 * v1 + 2.0 * u2 * u4 * v2; +} + +//function h(l,Z) and its partial derivatives dh(l,Z)/dl and dh(l,Z)/dZ +void PairEDIPMulti::edip_h(double l, double z, Param *param, double &f, + double &fdl, double &fdZ) +{ + double lambda = param->lambda; + double eta = param->eta; + double Q0 = param->Q0; + double mu = param->mu; + double Q, QdZ, Tau, TaudZ; + double u2, du2l, du2Z; + double v1, v2, v3; + + //function Q(Z) + Q = Q0 * exp(-mu * z); + //derivative Q'(Z) + QdZ= -mu * Q; + + edip_tau(z, param, Tau, TaudZ); + + v1 = sqr(l + Tau); + u2 = Q * v1; + v2 = exp(-u2); + + f = lambda * (1 - v2 + eta * u2); + + //df/du2 + v3 = lambda * (v2 + eta); + + //du2/dl + du2l = Q * 2 * (l + Tau); + fdl = v3 * du2l; + + //du2/dZ + du2Z = QdZ * v1 + Q * 2 * (l + Tau) * TaudZ; + fdZ = v3 * du2Z; +} + +//cut-off function for Vijk and its derivative fcut3'(r) +void PairEDIPMulti::edip_fcut3(double r, Param *param, double &f, double &fdr) +{ + double gamma = param->gamma; + double a = param->cutoffA; + double v1; + + if(r > a - 1E-6) + { + f=0.0; + fdr=0.0; + return; + } + + v1 = 1.0 / (r - a); + f = exp(gamma * v1); + fdr = (-gamma * v1 * v1) * f; +} + +/* ---------------------------------------------------------------------- + pre-calculated structures +------------------------------------------------------------------------- */ + +void PairEDIPMulti::allocatePreLoops(void) +{ + int nthreads = comm->nthreads; + + memory->create(preForceCoord,5*nthreads*leadDimInteractionList,"edip:preForceCoord"); +} + +/* ---------------------------------------------------------------------- + deallocate preLoops +------------------------------------------------------------------------- */ + +void PairEDIPMulti::deallocatePreLoops(void) +{ + memory->destroy(preForceCoord); +} + +/* ---------------------------------------------------------------------- */ + +void PairEDIPMulti::allocate() +{ + allocated = 1; + int n = atom->ntypes; + + memory->create(setflag,n+1,n+1,"pair:setflag"); + memory->create(cutsq,n+1,n+1,"pair:cutsq"); + + map = new int[n+1]; +} + +/* ---------------------------------------------------------------------- + global settings +------------------------------------------------------------------------- */ + +void PairEDIPMulti::settings(int narg, char **arg) +{ + if (narg != 0) error->all(FLERR,"Illegal pair_style command"); +} + +/* ---------------------------------------------------------------------- + set coeffs for one or more type pairs +------------------------------------------------------------------------- */ + +void PairEDIPMulti::coeff(int narg, char **arg) +{ + int i,j,n; + + if (!allocated) allocate(); + + if (narg != 3 + atom->ntypes) + error->all(FLERR,"Incorrect args for pair coefficients"); + + // insure I,J args are * * + + if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) + error->all(FLERR,"Incorrect args for pair coefficients"); + + // read args that map atom types to elements in potential file + // map[i] = which element the Ith atom type is, -1 if NULL + // nelements = # of unique elements + // elements = list of element names + + if (elements) { + for (i = 0; i < nelements; i++) delete [] elements[i]; + delete [] elements; + } + elements = new char*[atom->ntypes]; + for (i = 0; i < atom->ntypes; i++) elements[i] = NULL; + + nelements = 0; + for (i = 3; i < narg; i++) { + if (strcmp(arg[i],"NULL") == 0) { + map[i-2] = -1; + continue; + } + for (j = 0; j < nelements; j++) + if (strcmp(arg[i],elements[j]) == 0) break; + map[i-2] = j; + if (j == nelements) { + n = strlen(arg[i]) + 1; + elements[j] = new char[n]; + strcpy(elements[j],arg[i]); + nelements++; + } + } + + // read potential file and initialize potential parameters + + read_file(arg[2]); + setup(); + + // clear setflag since coeff() called once with I,J = * * + + n = atom->ntypes; + for (int i = 1; i <= n; i++) + for (int j = i; j <= n; j++) + setflag[i][j] = 0; + + // set setflag i,j for type pairs where both are mapped to elements + + int count = 0; + for (int i = 1; i <= n; i++) + for (int j = i; j <= n; j++) + if (map[i] >= 0 && map[j] >= 0) { + setflag[i][j] = 1; + count++; + } + + if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); + + // allocate tables and internal structures + + allocatePreLoops(); +} + +/* ---------------------------------------------------------------------- + init specific to this pair style +------------------------------------------------------------------------- */ + +void PairEDIPMulti::init_style() +{ + if (atom->tag_enable == 0) + error->all(FLERR,"Pair style edip/multi requires atom IDs"); + if (force->newton_pair == 0) + error->all(FLERR,"Pair style edip/multi requires newton pair on"); + + // need a full neighbor list + + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->half = 0; + neighbor->requests[irequest]->full = 1; +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +double PairEDIPMulti::init_one(int i, int j) +{ + if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + + return cutmax; +} + +/* ---------------------------------------------------------------------- */ + +void PairEDIPMulti::read_file(char *file) +{ + int params_per_line = 20; + char **words = new char*[params_per_line+1]; + + memory->sfree(params); + params = NULL; + nparams = maxparam = 0; + + // open file on proc 0 + + FILE *fp; + if (comm->me == 0) { + fp = force->open_potential(file); + if (fp == NULL) { + char str[128]; + sprintf(str,"Cannot open EDIP potential file %s",file); + error->one(FLERR,str); + } + } + + // read each set of params from potential file + // one set of params can span multiple lines + // store params if all 3 element tags are in element list + + int n,nwords,ielement,jelement,kelement; + char line[MAXLINE],*ptr; + int eof = 0; + + while (1) { + if (comm->me == 0) { + ptr = fgets(line,MAXLINE,fp); + if (ptr == NULL) { + eof = 1; + fclose(fp); + } else n = strlen(line) + 1; + } + MPI_Bcast(&eof,1,MPI_INT,0,world); + if (eof) break; + MPI_Bcast(&n,1,MPI_INT,0,world); + MPI_Bcast(line,n,MPI_CHAR,0,world); + + // strip comment, skip line if blank + + if ((ptr = strchr(line,'#'))) *ptr = '\0'; + nwords = atom->count_words(line); + if (nwords == 0) continue; + + // concatenate additional lines until have params_per_line words + + while (nwords < params_per_line) { + n = strlen(line); + if (comm->me == 0) { + ptr = fgets(&line[n],MAXLINE-n,fp); + if (ptr == NULL) { + eof = 1; + fclose(fp); + } else n = strlen(line) + 1; + } + MPI_Bcast(&eof,1,MPI_INT,0,world); + if (eof) break; + MPI_Bcast(&n,1,MPI_INT,0,world); + MPI_Bcast(line,n,MPI_CHAR,0,world); + if ((ptr = strchr(line,'#'))) *ptr = '\0'; + nwords = atom->count_words(line); + } + + if (nwords != params_per_line) + error->all(FLERR,"Incorrect format in EDIP potential file"); + + // words = ptrs to all words in line + + nwords = 0; + words[nwords++] = strtok(line," \t\n\r\f"); + while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue; + + // ielement,jelement,kelement = 1st args + // if all 3 args are in element list, then parse this line + // else skip to next entry in file + + for (ielement = 0; ielement < nelements; ielement++) + if (strcmp(words[0],elements[ielement]) == 0) break; + if (ielement == nelements) continue; + for (jelement = 0; jelement < nelements; jelement++) + if (strcmp(words[1],elements[jelement]) == 0) break; + if (jelement == nelements) continue; + for (kelement = 0; kelement < nelements; kelement++) + if (strcmp(words[2],elements[kelement]) == 0) break; + if (kelement == nelements) continue; + + // load up parameter settings and error check their values + + if (nparams == maxparam) { + maxparam += DELTA; + params = (Param *) memory->srealloc(params,maxparam*sizeof(Param), + "pair:params"); + } + + params[nparams].ielement = ielement; + params[nparams].jelement = jelement; + params[nparams].kelement = kelement; + params[nparams].A = atof(words[3]); + params[nparams].B = atof(words[4]); + params[nparams].cutoffA = atof(words[5]); + params[nparams].cutoffC = atof(words[6]); + params[nparams].alpha = atof(words[7]); + params[nparams].beta = atof(words[8]); + params[nparams].eta = atof(words[9]); + params[nparams].gamma = atof(words[10]); + params[nparams].lambda = atof(words[11]); + params[nparams].mu = atof(words[12]); + params[nparams].rho = atof(words[13]); + params[nparams].sigma = atof(words[14]); + params[nparams].Q0 = atof(words[15]); + params[nparams].u1 = atof(words[16]); + params[nparams].u2 = atof(words[17]); + params[nparams].u3 = atof(words[18]); + params[nparams].u4 = atof(words[19]); + + if (params[nparams].A < 0.0 || params[nparams].B < 0.0 || + params[nparams].cutoffA < 0.0 || params[nparams].cutoffC < 0.0 || + params[nparams].alpha < 0.0 || params[nparams].beta < 0.0 || + params[nparams].eta < 0.0 || params[nparams].gamma < 0.0 || + params[nparams].lambda < 0.0 || params[nparams].mu < 0.0 || + params[nparams].rho < 0.0 || params[nparams].sigma < 0.0) + error->all(FLERR,"Illegal EDIP parameter"); + + nparams++; + } + + delete [] words; +} + +/* ---------------------------------------------------------------------- */ + +void PairEDIPMulti::setup() +{ + int i,j,k,m,n; + double rtmp; + + // set elem2param for all triplet combinations + // must be a single exact match to lines read from file + // do not allow for ACB in place of ABC + + memory->destroy(elem2param); + memory->create(elem2param,nelements,nelements,nelements,"pair:elem2param"); + + for (i = 0; i < nelements; i++) + for (j = 0; j < nelements; j++) + for (k = 0; k < nelements; k++) { + n = -1; + for (m = 0; m < nparams; m++) { + if (i == params[m].ielement && j == params[m].jelement && + k == params[m].kelement) { + if (n >= 0) error->all(FLERR,"Potential file has duplicate entry"); + n = m; + } + } + if (n < 0) error->all(FLERR,"Potential file is missing an entry"); + elem2param[i][j][k] = n; + } + + // set cutoff square + + for (m = 0; m < nparams; m++) { + params[m].cutsq = params[m].cutoffA*params[m].cutoffA; + } + + // set cutmax to max of all params + + cutmax = 0.0; + for (m = 0; m < nparams; m++) { + rtmp = sqrt(params[m].cutsq); + if (rtmp > cutmax) cutmax = rtmp; + } + +} diff --git a/src/USER-MISC/pair_edip_multi.h b/src/USER-MISC/pair_edip_multi.h new file mode 100644 index 0000000000..e55916f79b --- /dev/null +++ b/src/USER-MISC/pair_edip_multi.h @@ -0,0 +1,113 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS + +PairStyle(edip/multi,PairEDIPMulti) + +#else + +#ifndef LMP_PAIR_EDIP_MULTI_H +#define LMP_PAIR_EDIP_MULTI_H + +#include "pair.h" + +namespace LAMMPS_NS { + +class PairEDIPMulti : public Pair { + public: + PairEDIPMulti(class LAMMPS *); + virtual ~PairEDIPMulti(); + virtual void compute(int, int); + void settings(int, char **); + void coeff(int, char **); + double init_one(int, int); + void init_style(); + + protected: + struct Param { + double A, B;//coefficients for pair interaction I-J + double cutoffA;//cut-off distance for pair interaction I-J + double cutoffC;//lower cut-off distance for calculating Z_I + double alpha;//coefficient for calculating Z_I + double beta;//attractive term for pair I-J + double sigma;//cut-off coefficient for pair I-J + double rho;//pair I-J + double gamma;//coefficient for three-body interaction I-J-K + double eta, lambda;//coefficients for function h(l,Z) + double mu, Q0;//coefficients for function Q(Z) + double u1, u2, u3, u4;//coefficients for function tau(Z) + double cutsq; + int ielement,jelement,kelement; + }; + + double *preForceCoord; + + double cutmax; // max cutoff for all elements + int nelements; // # of unique elements + char **elements; // names of unique elements + int ***elem2param; // mapping from element triplets to parameters + int *map; // mapping from atom types to elements + int nparams; // # of stored parameter sets + int maxparam; // max # of parameter sets + Param *params; // parameter set for an I-J-K interaction + + // max number of interaction per atom for f(Z) environment potential + + static const int leadDimInteractionList = 64; + + void allocate(); + void allocatePreLoops(void); + void deallocatePreLoops(void); + + void read_file(char *); + void setup(); + + void edip_pair(double, double, Param *, double &, double &, double &); + void edip_fc(double, Param *, double &, double &); + void edip_fcut2(double, Param *, double &, double &); + void edip_tau(double, Param *, double &, double &); + void edip_h(double, double, Param *, double &, double &, double &); + void edip_fcut3(double, Param *, double &, double &); + + double vec3_dot(double x[3], double y[3]) + { + return x[0]*y[0] + x[1]*y[1] + x[2]*y[2]; + } + + void vec3_add(double k1, double x[3], double k2, double y[3], double *z) + { + z[0] = k1 * x[0] + k2 * y[0]; + z[1] = k1 * x[1] + k2 * y[1]; + z[2] = k1 * x[2] + k2 * y[2]; + } + + //dr_ij=r_j - r_i + //dr_ik=r_k - r_i + void costheta_d(double *dr_ij, double r_ij, double *dr_ik, double r_ik, + double *dri, double *drj, double *drk) + { + double costheta; + + costheta = vec3_dot(dr_ij, dr_ik) / r_ij / r_ik; + vec3_add(1 / r_ij / r_ik, dr_ik, -costheta / r_ij / r_ij, dr_ij, drj); + vec3_add(1 / r_ij / r_ik, dr_ij, -costheta / r_ik / r_ik, dr_ik, drk); + vec3_add(-1, drj, -1, drk, dri); + } + +}; + +} + +#endif +#endif -- GitLab From 7f9a331c73557ddbdce76ea393ddd5f87d346ec1 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 16 May 2017 15:51:41 -0600 Subject: [PATCH 138/593] bugfix for 2 recenty reported neighbor issues, also a ReaxFF fix species issue --- doc/src/pair_yukawa_colloid.txt | 2 +- src/QEQ/fix_qeq.cpp | 3 -- src/USER-DPD/nbin_ssa.cpp | 3 ++ src/USER-DPD/npair_half_bin_newton_ssa.cpp | 2 +- src/USER-OMP/npair_full_bin_ghost_omp.cpp | 2 +- src/USER-OMP/npair_full_bin_omp.cpp | 2 +- src/USER-OMP/npair_full_multi_omp.cpp | 2 +- .../npair_half_bin_newtoff_ghost_omp.cpp | 2 +- src/USER-OMP/npair_half_bin_newtoff_omp.cpp | 2 +- src/USER-OMP/npair_half_bin_newton_omp.cpp | 2 +- .../npair_half_bin_newton_tri_omp.cpp | 2 +- src/USER-OMP/npair_half_multi_newtoff_omp.cpp | 2 +- src/USER-OMP/npair_half_multi_newton_omp.cpp | 2 +- .../npair_half_multi_newton_tri_omp.cpp | 2 +- .../npair_half_respa_bin_newtoff_omp.cpp | 2 +- .../npair_half_respa_bin_newton_omp.cpp | 2 +- .../npair_half_respa_bin_newton_tri_omp.cpp | 2 +- .../npair_half_size_bin_newtoff_omp.cpp | 2 +- .../npair_half_size_bin_newton_omp.cpp | 2 +- .../npair_half_size_bin_newton_tri_omp.cpp | 2 +- src/USER-REAXC/fix_qeq_reax.cpp | 3 -- src/USER-REAXC/fix_reaxc_species.cpp | 2 +- src/nbin.cpp | 9 +++- src/nbin.h | 7 +-- src/nbin_standard.cpp | 3 ++ src/neigh_request.cpp | 1 + src/neighbor.cpp | 22 +++++++- src/npair.cpp | 50 ++----------------- src/npair.h | 2 +- src/npair_full_bin.cpp | 2 +- src/npair_full_bin_atomonly.cpp | 2 +- src/npair_full_bin_ghost.cpp | 2 +- src/npair_full_multi.cpp | 2 +- src/npair_half_bin_atomonly_newton.cpp | 3 +- src/npair_half_bin_newtoff.cpp | 2 +- src/npair_half_bin_newtoff_ghost.cpp | 2 +- src/npair_half_bin_newton.cpp | 2 +- src/npair_half_bin_newton_tri.cpp | 2 +- src/npair_half_multi_newtoff.cpp | 2 +- src/npair_half_multi_newton.cpp | 2 +- src/npair_half_multi_newton_tri.cpp | 2 +- src/npair_half_respa_bin_newtoff.cpp | 2 +- src/npair_half_respa_bin_newton.cpp | 2 +- src/npair_half_respa_bin_newton_tri.cpp | 2 +- src/npair_half_size_bin_newtoff.cpp | 2 +- src/npair_half_size_bin_newton.cpp | 2 +- src/npair_half_size_bin_newton_tri.cpp | 2 +- 47 files changed, 80 insertions(+), 98 deletions(-) diff --git a/doc/src/pair_yukawa_colloid.txt b/doc/src/pair_yukawa_colloid.txt index 3d5294bbdb..ecdc1496ab 100644 --- a/doc/src/pair_yukawa_colloid.txt +++ b/doc/src/pair_yukawa_colloid.txt @@ -35,7 +35,7 @@ cutoff. In contrast to "pair_style yukawa"_pair_yukawa.html, this functional form arises from the Coulombic interaction between two colloid particles, screened due to the presence of an electrolyte, see the -book by "Safran"_#Safran for a derivation in the context of DVLO +book by "Safran"_#Safran for a derivation in the context of DLVO theory. "Pair_style yukawa"_pair_yukawa.html is a screened Coulombic potential between two point-charges and uses no such approximation. diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index 7e8db7632c..c5b566eef7 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -286,9 +286,6 @@ void FixQEq::setup_pre_force(int vflag) if (force->newton_pair == 0) error->all(FLERR,"QEQ with 'newton pair off' not supported"); - // should not be needed - // neighbor->build_one(list); - deallocate_storage(); allocate_storage(); diff --git a/src/USER-DPD/nbin_ssa.cpp b/src/USER-DPD/nbin_ssa.cpp index 73da5e0df3..f65a397e88 100644 --- a/src/USER-DPD/nbin_ssa.cpp +++ b/src/USER-DPD/nbin_ssa.cpp @@ -76,6 +76,7 @@ void NBinSSA::bin_atoms() if (ssaAIR[i] < 2) continue; // skip ghost atoms not in AIR if (mask[i] & bitmask) { ibin = coord2bin(x[i]); + atom2bin[i] = ibin; bins_ssa[i] = gbinhead_ssa[ibin]; gbinhead_ssa[ibin] = i; } @@ -84,12 +85,14 @@ void NBinSSA::bin_atoms() for (i = nall-1; i >= nlocal; i--) { if (ssaAIR[i] < 2) continue; // skip ghost atoms not in AIR ibin = coord2bin(x[i]); + atom2bin[i] = ibin; bins_ssa[i] = gbinhead_ssa[ibin]; gbinhead_ssa[ibin] = i; } } for (i = nlocal-1; i >= 0; i--) { ibin = coord2bin(x[i]); + atom2bin[i] = ibin; bins_ssa[i] = binhead_ssa[ibin]; binhead_ssa[ibin] = i; } diff --git a/src/USER-DPD/npair_half_bin_newton_ssa.cpp b/src/USER-DPD/npair_half_bin_newton_ssa.cpp index 59acbda301..e8e4b20a0a 100644 --- a/src/USER-DPD/npair_half_bin_newton_ssa.cpp +++ b/src/USER-DPD/npair_half_bin_newton_ssa.cpp @@ -141,7 +141,7 @@ void NPairHalfBinNewtonSSA::build(NeighList *list) } } - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; // loop over all local atoms in other bins in "half" stencil diff --git a/src/USER-OMP/npair_full_bin_ghost_omp.cpp b/src/USER-OMP/npair_full_bin_ghost_omp.cpp index 7f7239fe63..b915aca002 100644 --- a/src/USER-OMP/npair_full_bin_ghost_omp.cpp +++ b/src/USER-OMP/npair_full_bin_ghost_omp.cpp @@ -97,7 +97,7 @@ void NPairFullBinGhostOmp::build(NeighList *list) // no molecular test when i = ghost atom if (i < nlocal) { - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { if (i == j) continue; diff --git a/src/USER-OMP/npair_full_bin_omp.cpp b/src/USER-OMP/npair_full_bin_omp.cpp index ad9e48784e..e1f75c06e2 100644 --- a/src/USER-OMP/npair_full_bin_omp.cpp +++ b/src/USER-OMP/npair_full_bin_omp.cpp @@ -90,7 +90,7 @@ void NPairFullBinOmp::build(NeighList *list) // loop over all atoms in surrounding bins in stencil including self // skip i = j - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { diff --git a/src/USER-OMP/npair_full_multi_omp.cpp b/src/USER-OMP/npair_full_multi_omp.cpp index eb0153d63f..9bc196e17a 100644 --- a/src/USER-OMP/npair_full_multi_omp.cpp +++ b/src/USER-OMP/npair_full_multi_omp.cpp @@ -94,7 +94,7 @@ void NPairFullMultiOmp::build(NeighList *list) // skip if i,j neighbor cutoff is less than bin distance // skip i = j - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; s = stencil_multi[itype]; distsq = distsq_multi[itype]; cutsq = cutneighsq[itype]; diff --git a/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp b/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp index e46afebb0d..05763c3d68 100644 --- a/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp @@ -103,7 +103,7 @@ void NPairHalfBinNewtoffGhostOmp::build(NeighList *list) // no molecular test when i = ghost atom if (i < nlocal) { - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { diff --git a/src/USER-OMP/npair_half_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_bin_newtoff_omp.cpp index 99698b1d30..ff74b54d7d 100644 --- a/src/USER-OMP/npair_half_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newtoff_omp.cpp @@ -94,7 +94,7 @@ void NPairHalfBinNewtoffOmp::build(NeighList *list) // stores own/own pairs only once // stores own/ghost pairs on both procs - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { diff --git a/src/USER-OMP/npair_half_bin_newton_omp.cpp b/src/USER-OMP/npair_half_bin_newton_omp.cpp index 33d78fe55a..f7d969ba27 100644 --- a/src/USER-OMP/npair_half_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newton_omp.cpp @@ -130,7 +130,7 @@ void NPairHalfBinNewtonOmp::build(NeighList *list) // loop over all atoms in other bins in stencil, store every pair - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { jtype = type[j]; diff --git a/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp index 9eb9612235..c843d623cd 100644 --- a/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp @@ -94,7 +94,7 @@ void NPairHalfBinNewtonTriOmp::build(NeighList *list) // (equal zyx and j <= i) // latter excludes self-self interaction but allows superposed atoms - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { if (x[j][2] < ztmp) continue; diff --git a/src/USER-OMP/npair_half_multi_newtoff_omp.cpp b/src/USER-OMP/npair_half_multi_newtoff_omp.cpp index 37dc805857..705d1b8d9f 100644 --- a/src/USER-OMP/npair_half_multi_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_multi_newtoff_omp.cpp @@ -97,7 +97,7 @@ void NPairHalfMultiNewtoffOmp::build(NeighList *list) // stores own/own pairs only once // stores own/ghost pairs on both procs - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; s = stencil_multi[itype]; distsq = distsq_multi[itype]; cutsq = cutneighsq[itype]; diff --git a/src/USER-OMP/npair_half_multi_newton_omp.cpp b/src/USER-OMP/npair_half_multi_newton_omp.cpp index 9719911afa..f16dd027a0 100644 --- a/src/USER-OMP/npair_half_multi_newton_omp.cpp +++ b/src/USER-OMP/npair_half_multi_newton_omp.cpp @@ -131,7 +131,7 @@ void NPairHalfMultiNewtonOmp::build(NeighList *list) // loop over all atoms in other bins in stencil, store every pair // skip if i,j neighbor cutoff is less than bin distance - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; s = stencil_multi[itype]; distsq = distsq_multi[itype]; cutsq = cutneighsq[itype]; diff --git a/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp b/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp index 717a709386..f66cf194e7 100644 --- a/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp @@ -99,7 +99,7 @@ void NPairHalfMultiNewtonTriOmp::build(NeighList *list) // (equal zyx and j <= i) // latter excludes self-self interaction but allows superposed atoms - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; s = stencil_multi[itype]; distsq = distsq_multi[itype]; cutsq = cutneighsq[itype]; diff --git a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp index 287f11efa7..12780fa4a3 100644 --- a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp @@ -117,7 +117,7 @@ void NPairHalfRespaBinNewtoffOmp::build(NeighList *list) xtmp = x[i][0]; ytmp = x[i][1]; ztmp = x[i][2]; - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; if (moltemplate) { imol = molindex[i]; iatom = molatom[i]; diff --git a/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp index 30256bd20d..b9a6364242 100644 --- a/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp @@ -176,7 +176,7 @@ void NPairHalfRespaBinNewtonOmp::build(NeighList *list) // loop over all atoms in other bins in stencil, store every pair - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { jtype = type[j]; diff --git a/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp index 27d02000c5..bc03972d85 100644 --- a/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp @@ -128,7 +128,7 @@ void NPairHalfRespaBinNewtonTriOmp::build(NeighList *list) // (equal zyx and j <= i) // latter excludes self-self interaction but allows superposed atoms - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { if (x[j][2] < ztmp) continue; diff --git a/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp index 699d347db5..dbb62e96ef 100644 --- a/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp @@ -113,7 +113,7 @@ void NPairHalfSizeBinNewtoffOmp::build(NeighList *list) ytmp = x[i][1]; ztmp = x[i][2]; radi = radius[i]; - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; // loop over all atoms in surrounding bins in stencil including self // only store pair if i < j diff --git a/src/USER-OMP/npair_half_size_bin_newton_omp.cpp b/src/USER-OMP/npair_half_size_bin_newton_omp.cpp index 0d7e4e68da..2c26c7952c 100644 --- a/src/USER-OMP/npair_half_size_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newton_omp.cpp @@ -168,7 +168,7 @@ void NPairHalfSizeBinNewtonOmp::build(NeighList *list) // loop over all atoms in other bins in stencil, store every pair - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue; diff --git a/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp index 7463a6aba6..bf273f545f 100644 --- a/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp @@ -84,7 +84,7 @@ void NPairHalfSizeBinNewtonTriOmp::build(NeighList *list) // (equal zyx and j <= i) // latter excludes self-self interaction but allows superposed atoms - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { if (x[j][2] < ztmp) continue; diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index 01ecd9d399..96df03c668 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -416,9 +416,6 @@ void FixQEqReax::init_taper() void FixQEqReax::setup_pre_force(int vflag) { - // should not be needed - // neighbor->build_one(list); - deallocate_storage(); allocate_storage(); diff --git a/src/USER-REAXC/fix_reaxc_species.cpp b/src/USER-REAXC/fix_reaxc_species.cpp index 672b1e6a56..fe74337128 100644 --- a/src/USER-REAXC/fix_reaxc_species.cpp +++ b/src/USER-REAXC/fix_reaxc_species.cpp @@ -500,7 +500,7 @@ void FixReaxCSpecies::Output_ReaxC_Bonds(bigint ntimestep, FILE *fp) AtomCoord FixReaxCSpecies::chAnchor(AtomCoord in1, AtomCoord in2) { - if (in1.x < in2.x) + if (in1.x <= in2.x) return in1; return in2; } diff --git a/src/nbin.cpp b/src/nbin.cpp index 6aa37a4c43..6bd1ce322f 100644 --- a/src/nbin.cpp +++ b/src/nbin.cpp @@ -29,6 +29,7 @@ NBin::NBin(LAMMPS *lmp) : Pointers(lmp) maxbin = maxatom = 0; binhead = NULL; bins = NULL; + atom2bin = NULL; // geometry settings @@ -42,6 +43,7 @@ NBin::~NBin() { memory->destroy(binhead); memory->destroy(bins); + memory->destroy(atom2bin); } /* ---------------------------------------------------------------------- */ @@ -87,12 +89,15 @@ void NBin::bin_atoms_setup(int nall) memory->create(binhead,maxbin,"neigh:binhead"); } - // bins = per-atom vector + // bins and atom2bin = per-atom vectors + // for both local and ghost atoms if (nall > maxatom) { maxatom = nall; memory->destroy(bins); memory->create(bins,maxatom,"neigh:bins"); + memory->destroy(atom2bin); + memory->create(atom2bin,maxatom,"neigh:atom2bin"); } } @@ -148,6 +153,6 @@ bigint NBin::memory_usage() { bigint bytes = 0; bytes += maxbin*sizeof(int); - bytes += maxatom*sizeof(int); + bytes += 2*maxatom*sizeof(int); return bytes; } diff --git a/src/nbin.h b/src/nbin.h index 9871a229d8..30c74ff295 100644 --- a/src/nbin.h +++ b/src/nbin.h @@ -31,10 +31,11 @@ class NBin : protected Pointers { double binsizex,binsizey,binsizez; // bin sizes and inverse sizes double bininvx,bininvy,bininvz; - int *binhead; // index of first atom in each bin - int *bins; // index of next atom in same bin + int *binhead; // index of first atom in each bin + int *bins; // index of next atom in same bin + int *atom2bin; // bin assignment for each atom (local+ghost) - double cutoff_custom; // cutoff set by requestor + double cutoff_custom; // cutoff set by requestor NBin(class LAMMPS *); ~NBin(); diff --git a/src/nbin_standard.cpp b/src/nbin_standard.cpp index 2a72d996a5..e6941014f9 100644 --- a/src/nbin_standard.cpp +++ b/src/nbin_standard.cpp @@ -211,12 +211,14 @@ void NBinStandard::bin_atoms() for (i = nall-1; i >= nlocal; i--) { if (mask[i] & bitmask) { ibin = coord2bin(x[i]); + atom2bin[i] = ibin; bins[i] = binhead[ibin]; binhead[ibin] = i; } } for (i = atom->nfirst-1; i >= 0; i--) { ibin = coord2bin(x[i]); + atom2bin[i] = ibin; bins[i] = binhead[ibin]; binhead[ibin] = i; } @@ -224,6 +226,7 @@ void NBinStandard::bin_atoms() } else { for (i = nall-1; i >= 0; i--) { ibin = coord2bin(x[i]); + atom2bin[i] = ibin; bins[i] = binhead[ibin]; binhead[ibin] = i; } diff --git a/src/neigh_request.cpp b/src/neigh_request.cpp index 5e77c23077..bb691d00ba 100644 --- a/src/neigh_request.cpp +++ b/src/neigh_request.cpp @@ -50,6 +50,7 @@ NeighRequest::NeighRequest(LAMMPS *lmp) : Pointers(lmp) // default is no Intel-specific neighbor list build // default is no Kokkos neighbor list build // default is no Shardlow Splitting Algorithm (SSA) neighbor list build + // default is no list-specific cutoff // default is no storage of auxiliary floating point values occasional = 0; diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 545c8cf027..62a9143226 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -640,6 +640,24 @@ int Neighbor::init_pair() delete [] neigh_stencil; delete [] neigh_pair; + // error check on requests + // do not allow occasional, ghost, bin list + // b/c it still uses variant of coord2bin() in NPair() method + // instead of atom2bin, this could cause error b/c stoms have + // moved out of proc domain by time occasional list is built + // solution would be to use a different NBin variant + // that used Npair::coord2bin(x,ix,iy,iz) (then delete it from NPair) + // and stored the ix,iy,iz values for all atoms (including ghosts) + // at time of binning when neighbor lists are rebuilt, + // similar to what vanilla Nbin::coord2atom() does now in atom2bin + + if (style == BIN) { + for (i = 0; i < nrequest; i++) + if (requests[i]->occasional && requests[i]->ghost) + error->all(FLERR,"Cannot request an occasional binned neighbor list " + "with ghost info"); + } + // morph requests in various ways // purpose is to avoid duplicate or inefficient builds // may add new requests if a needed request to derive from does not exist @@ -1669,7 +1687,6 @@ int Neighbor::choose_stencil(NeighRequest *rq) else if (rq->newton == 1) newtflag = 1; else if (rq->newton == 2) newtflag = 0; - //printf("STENCIL RQ FLAGS: hff %d %d n %d g %d s %d newtflag %d\n", // rq->half,rq->full,rq->newton,rq->ghost,rq->ssa, // newtflag); @@ -2087,7 +2104,7 @@ void Neighbor::build(int topoflag) } // bin atoms for all NBin instances - // not just NBin associated with perpetual lists + // not just NBin associated with perpetual lists, also occasional lists // b/c cannot wait to bin occasional lists in build_one() call // if bin then, atoms may have moved outside of proc domain & bin extent, // leading to errors or even a crash @@ -2193,6 +2210,7 @@ void Neighbor::build_one(class NeighList *mylist, int preflag) // build the list + if (!mylist->copy) mylist->grow(atom->nlocal,atom->nlocal+atom->nghost); np->build_setup(); np->build(mylist); } diff --git a/src/npair.cpp b/src/npair.cpp index 6c3f8ac05e..3451cd6eae 100644 --- a/src/npair.cpp +++ b/src/npair.cpp @@ -128,6 +128,7 @@ void NPair::copy_bin_info() bininvy = nb->bininvy; bininvz = nb->bininvz; + atom2bin = nb->atom2bin; bins = nb->bins; binhead = nb->binhead; } @@ -198,53 +199,8 @@ int NPair::exclusion(int i, int j, int itype, int jtype, } /* ---------------------------------------------------------------------- - convert atom coords into local bin # - for orthogonal, only ghost atoms will have coord >= bboxhi or coord < bboxlo - take special care to insure ghosts are in correct bins even w/ roundoff - hi ghost atoms = nbin,nbin+1,etc - owned atoms = 0 to nbin-1 - lo ghost atoms = -1,-2,etc - this is necessary so that both procs on either side of PBC - treat a pair of atoms straddling the PBC in a consistent way - for triclinic, doesn't matter since stencil & neigh list built differently -------------------------------------------------------------------------- */ - -int NPair::coord2bin(double *x) -{ - int ix,iy,iz; - - if (!ISFINITE(x[0]) || !ISFINITE(x[1]) || !ISFINITE(x[2])) - error->one(FLERR,"Non-numeric positions - simulation unstable"); - - if (x[0] >= bboxhi[0]) - ix = static_cast ((x[0]-bboxhi[0])*bininvx) + nbinx; - else if (x[0] >= bboxlo[0]) { - ix = static_cast ((x[0]-bboxlo[0])*bininvx); - ix = MIN(ix,nbinx-1); - } else - ix = static_cast ((x[0]-bboxlo[0])*bininvx) - 1; - - if (x[1] >= bboxhi[1]) - iy = static_cast ((x[1]-bboxhi[1])*bininvy) + nbiny; - else if (x[1] >= bboxlo[1]) { - iy = static_cast ((x[1]-bboxlo[1])*bininvy); - iy = MIN(iy,nbiny-1); - } else - iy = static_cast ((x[1]-bboxlo[1])*bininvy) - 1; - - if (x[2] >= bboxhi[2]) - iz = static_cast ((x[2]-bboxhi[2])*bininvz) + nbinz; - else if (x[2] >= bboxlo[2]) { - iz = static_cast ((x[2]-bboxlo[2])*bininvz); - iz = MIN(iz,nbinz-1); - } else - iz = static_cast ((x[2]-bboxlo[2])*bininvz) - 1; - - return (iz-mbinzlo)*mbiny*mbinx + (iy-mbinylo)*mbinx + (ix-mbinxlo); -} - -/* ---------------------------------------------------------------------- - same as coord2bin, but also return ix,iy,iz offsets in each dim + same as coord2bin in Nbin, but also return ix,iy,iz offsets in each dim + used by some of the ghost neighbor lists ------------------------------------------------------------------------- */ int NPair::coord2bin(double *x, int &ix, int &iy, int &iz) diff --git a/src/npair.h b/src/npair.h index 8f2bcb13bc..4e5e3f5dfd 100644 --- a/src/npair.h +++ b/src/npair.h @@ -77,7 +77,7 @@ class NPair : protected Pointers { int mbinx,mbiny,mbinz; int mbinxlo,mbinylo,mbinzlo; double bininvx,bininvy,bininvz; - int *bins; + int *atom2bin,*bins; int *binhead; // data from NStencil class diff --git a/src/npair_full_bin.cpp b/src/npair_full_bin.cpp index a29acb67ab..94a6af129c 100644 --- a/src/npair_full_bin.cpp +++ b/src/npair_full_bin.cpp @@ -80,7 +80,7 @@ void NPairFullBin::build(NeighList *list) // loop over all atoms in surrounding bins in stencil including self // skip i = j - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { diff --git a/src/npair_full_bin_atomonly.cpp b/src/npair_full_bin_atomonly.cpp index 8d4fc254b5..db84733f1c 100644 --- a/src/npair_full_bin_atomonly.cpp +++ b/src/npair_full_bin_atomonly.cpp @@ -64,7 +64,7 @@ void NPairFullBinAtomonly::build(NeighList *list) // loop over all atoms in surrounding bins in stencil including self // skip i = j - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { diff --git a/src/npair_full_bin_ghost.cpp b/src/npair_full_bin_ghost.cpp index 1e258cf518..2edd03cc9e 100644 --- a/src/npair_full_bin_ghost.cpp +++ b/src/npair_full_bin_ghost.cpp @@ -87,7 +87,7 @@ void NPairFullBinGhost::build(NeighList *list) // no molecular test when i = ghost atom if (i < nlocal) { - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { if (i == j) continue; diff --git a/src/npair_full_multi.cpp b/src/npair_full_multi.cpp index 628a706e7a..9a2490ac5d 100644 --- a/src/npair_full_multi.cpp +++ b/src/npair_full_multi.cpp @@ -83,7 +83,7 @@ void NPairFullMulti::build(NeighList *list) // skip if i,j neighbor cutoff is less than bin distance // skip i = j - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; s = stencil_multi[itype]; distsq = distsq_multi[itype]; cutsq = cutneighsq[itype]; diff --git a/src/npair_half_bin_atomonly_newton.cpp b/src/npair_half_bin_atomonly_newton.cpp index bc425cd22e..6bbef0700a 100644 --- a/src/npair_half_bin_atomonly_newton.cpp +++ b/src/npair_half_bin_atomonly_newton.cpp @@ -90,7 +90,8 @@ void NPairHalfBinAtomonlyNewton::build(NeighList *list) // loop over all atoms in other bins in stencil, store every pair - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; + for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { jtype = type[j]; diff --git a/src/npair_half_bin_newtoff.cpp b/src/npair_half_bin_newtoff.cpp index dd072508a9..4c44741ffe 100644 --- a/src/npair_half_bin_newtoff.cpp +++ b/src/npair_half_bin_newtoff.cpp @@ -84,7 +84,7 @@ void NPairHalfBinNewtoff::build(NeighList *list) // stores own/own pairs only once // stores own/ghost pairs on both procs - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { diff --git a/src/npair_half_bin_newtoff_ghost.cpp b/src/npair_half_bin_newtoff_ghost.cpp index f486df105a..72ec15e66a 100644 --- a/src/npair_half_bin_newtoff_ghost.cpp +++ b/src/npair_half_bin_newtoff_ghost.cpp @@ -92,7 +92,7 @@ void NPairHalfBinNewtoffGhost::build(NeighList *list) // no molecular test when i = ghost atom if (i < nlocal) { - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { diff --git a/src/npair_half_bin_newton.cpp b/src/npair_half_bin_newton.cpp index f1fc203403..3a387870e3 100644 --- a/src/npair_half_bin_newton.cpp +++ b/src/npair_half_bin_newton.cpp @@ -119,7 +119,7 @@ void NPairHalfBinNewton::build(NeighList *list) // loop over all atoms in other bins in stencil, store every pair - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { jtype = type[j]; diff --git a/src/npair_half_bin_newton_tri.cpp b/src/npair_half_bin_newton_tri.cpp index 3ef8c3260e..169e710e0e 100644 --- a/src/npair_half_bin_newton_tri.cpp +++ b/src/npair_half_bin_newton_tri.cpp @@ -84,7 +84,7 @@ void NPairHalfBinNewtonTri::build(NeighList *list) // (equal zyx and j <= i) // latter excludes self-self interaction but allows superposed atoms - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { if (x[j][2] < ztmp) continue; diff --git a/src/npair_half_multi_newtoff.cpp b/src/npair_half_multi_newtoff.cpp index 11e45d91ff..07b5c87a6c 100644 --- a/src/npair_half_multi_newtoff.cpp +++ b/src/npair_half_multi_newtoff.cpp @@ -87,7 +87,7 @@ void NPairHalfMultiNewtoff::build(NeighList *list) // stores own/own pairs only once // stores own/ghost pairs on both procs - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; s = stencil_multi[itype]; distsq = distsq_multi[itype]; cutsq = cutneighsq[itype]; diff --git a/src/npair_half_multi_newton.cpp b/src/npair_half_multi_newton.cpp index cd3a37821f..3d90979329 100644 --- a/src/npair_half_multi_newton.cpp +++ b/src/npair_half_multi_newton.cpp @@ -121,7 +121,7 @@ void NPairHalfMultiNewton::build(NeighList *list) // loop over all atoms in other bins in stencil, store every pair // skip if i,j neighbor cutoff is less than bin distance - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; s = stencil_multi[itype]; distsq = distsq_multi[itype]; cutsq = cutneighsq[itype]; diff --git a/src/npair_half_multi_newton_tri.cpp b/src/npair_half_multi_newton_tri.cpp index f9aaeb0414..909c69246b 100644 --- a/src/npair_half_multi_newton_tri.cpp +++ b/src/npair_half_multi_newton_tri.cpp @@ -88,7 +88,7 @@ void NPairHalfMultiNewtonTri::build(NeighList *list) // (equal zyx and j <= i) // latter excludes self-self interaction but allows superposed atoms - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; s = stencil_multi[itype]; distsq = distsq_multi[itype]; cutsq = cutneighsq[itype]; diff --git a/src/npair_half_respa_bin_newtoff.cpp b/src/npair_half_respa_bin_newtoff.cpp index 39f68a289d..11246b4af8 100644 --- a/src/npair_half_respa_bin_newtoff.cpp +++ b/src/npair_half_respa_bin_newtoff.cpp @@ -101,7 +101,7 @@ void NPairHalfRespaBinNewtoff::build(NeighList *list) xtmp = x[i][0]; ytmp = x[i][1]; ztmp = x[i][2]; - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; if (moltemplate) { imol = molindex[i]; iatom = molatom[i]; diff --git a/src/npair_half_respa_bin_newton.cpp b/src/npair_half_respa_bin_newton.cpp index 537a72d0c1..db76678036 100644 --- a/src/npair_half_respa_bin_newton.cpp +++ b/src/npair_half_respa_bin_newton.cpp @@ -160,7 +160,7 @@ void NPairHalfRespaBinNewton::build(NeighList *list) // loop over all atoms in other bins in stencil, store every pair - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { jtype = type[j]; diff --git a/src/npair_half_respa_bin_newton_tri.cpp b/src/npair_half_respa_bin_newton_tri.cpp index 9c5fd39fbe..38621224c4 100644 --- a/src/npair_half_respa_bin_newton_tri.cpp +++ b/src/npair_half_respa_bin_newton_tri.cpp @@ -113,7 +113,7 @@ void NPairHalfRespaBinNewtonTri::build(NeighList *list) // (equal zyx and j <= i) // latter excludes self-self interaction but allows superposed atoms - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { if (x[j][2] < ztmp) continue; diff --git a/src/npair_half_size_bin_newtoff.cpp b/src/npair_half_size_bin_newtoff.cpp index e98923cd11..571b2484ea 100644 --- a/src/npair_half_size_bin_newtoff.cpp +++ b/src/npair_half_size_bin_newtoff.cpp @@ -105,7 +105,7 @@ void NPairHalfSizeBinNewtoff::build(NeighList *list) ytmp = x[i][1]; ztmp = x[i][2]; radi = radius[i]; - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; // loop over all atoms in surrounding bins in stencil including self // only store pair if i < j diff --git a/src/npair_half_size_bin_newton.cpp b/src/npair_half_size_bin_newton.cpp index 2cd0943ac2..a8be3ce691 100644 --- a/src/npair_half_size_bin_newton.cpp +++ b/src/npair_half_size_bin_newton.cpp @@ -156,7 +156,7 @@ void NPairHalfSizeBinNewton::build(NeighList *list) // loop over all atoms in other bins in stencil, store every pair - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue; diff --git a/src/npair_half_size_bin_newton_tri.cpp b/src/npair_half_size_bin_newton_tri.cpp index 054487d31f..1107f73026 100644 --- a/src/npair_half_size_bin_newton_tri.cpp +++ b/src/npair_half_size_bin_newton_tri.cpp @@ -112,7 +112,7 @@ void NPairHalfSizeBinNewtonTri::build(NeighList *list) // (equal zyx and j <= i) // latter excludes self-self interaction but allows superposed atoms - ibin = coord2bin(x[i]); + ibin = atom2bin[i]; for (k = 0; k < nstencil; k++) { for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { if (x[j][2] < ztmp) continue; -- GitLab From 597f95fb1b29a6e73e8e36533abdecc26ab51280 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 16 May 2017 17:53:12 -0400 Subject: [PATCH 139/593] fix duplicate reference --- doc/src/pair_meam_spline.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/pair_meam_spline.txt b/doc/src/pair_meam_spline.txt index e4d86521c9..2295a6640b 100644 --- a/doc/src/pair_meam_spline.txt +++ b/doc/src/pair_meam_spline.txt @@ -33,7 +33,7 @@ atoms J, I, and K centered on atom I. The five functions Phi, U, rho, f, and g are represented by cubic splines. The {meam/spline} style also supports a new style multicomponent -modified embedded-atom method (MEAM) potential "(Zhang)"_#Zhang1, where +modified embedded-atom method (MEAM) potential "(Zhang)"_#Zhang4, where the total energy E is given by :c,image(Eqs/pair_meam_spline_multicomponent.jpg) @@ -164,5 +164,5 @@ for more info. Kress, Modelling Simulation Materials Science Engineering, 8, 825 (2000). -:link(Zhang1) +:link(Zhang4) [(Zhang)] Zhang and Trinkle, Computational Materials Science, 124, 204-210 (2016). -- GitLab From d2810f9f837217b667506921deebbde395f24bf8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 16 May 2017 18:15:13 -0400 Subject: [PATCH 140/593] port thread-safe temperature biasing from LAMMPS-ICMS --- src/ASPHERE/compute_temp_asphere.cpp | 19 ++++++++++++++++ src/ASPHERE/compute_temp_asphere.h | 2 ++ src/USER-MISC/compute_temp_rotate.cpp | 23 +++++++++++++++++++ src/USER-MISC/compute_temp_rotate.h | 3 +++ src/USER-OMP/fix_nh_asphere_omp.cpp | 5 +++-- src/USER-OMP/fix_nh_omp.cpp | 10 +++++---- src/USER-OMP/fix_nh_sphere_omp.cpp | 5 +++-- src/USER-OMP/fix_nvt_sllod_omp.cpp | 6 ++--- src/compute.h | 2 ++ src/compute_temp_com.cpp | 23 +++++++++++++++++++ src/compute_temp_com.h | 2 ++ src/compute_temp_deform.cpp | 32 +++++++++++++++++++++++++++ src/compute_temp_deform.h | 2 ++ src/compute_temp_partial.cpp | 32 +++++++++++++++++++++++++++ src/compute_temp_partial.h | 2 ++ src/compute_temp_profile.cpp | 19 ++++++++++++++++ src/compute_temp_profile.h | 2 ++ src/compute_temp_ramp.cpp | 23 +++++++++++++++++++ src/compute_temp_ramp.h | 2 ++ src/compute_temp_region.cpp | 29 ++++++++++++++++++++++++ src/compute_temp_region.h | 3 +++ src/compute_temp_sphere.cpp | 19 ++++++++++++++++ src/compute_temp_sphere.h | 3 ++- 23 files changed, 256 insertions(+), 12 deletions(-) diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp index e8d3fcb527..b6d37db6ce 100644 --- a/src/ASPHERE/compute_temp_asphere.cpp +++ b/src/ASPHERE/compute_temp_asphere.cpp @@ -396,6 +396,15 @@ void ComputeTempAsphere::remove_bias(int i, double *v) if (tbias) tbias->remove_bias(i,v); } +/* ---------------------------------------------------------------------- + remove velocity bias from atom I to leave thermal velocity +------------------------------------------------------------------------- */ + +void ComputeTempAsphere::remove_bias_thr(int i, double *v, double *b) +{ + if (tbias) tbias->remove_bias_thr(i,v,b); +} + /* ---------------------------------------------------------------------- add back in velocity bias to atom I removed by remove_bias() assume remove_bias() was previously called @@ -405,3 +414,13 @@ void ComputeTempAsphere::restore_bias(int i, double *v) { if (tbias) tbias->restore_bias(i,v); } + +/* ---------------------------------------------------------------------- + add back in velocity bias to atom I removed by remove_bias_thr() + assume remove_bias_thr() was previously called with the same buffer b +------------------------------------------------------------------------- */ + +void ComputeTempAsphere::restore_bias_thr(int i, double *v, double *b) +{ + if (tbias) tbias->restore_bias_thr(i,v,b); +} diff --git a/src/ASPHERE/compute_temp_asphere.h b/src/ASPHERE/compute_temp_asphere.h index d1cce38025..5ecbf8057a 100644 --- a/src/ASPHERE/compute_temp_asphere.h +++ b/src/ASPHERE/compute_temp_asphere.h @@ -35,6 +35,8 @@ class ComputeTempAsphere : public Compute { void remove_bias(int, double *); void restore_bias(int, double *); + void remove_bias_thr(int, double *, double *); + void restore_bias_thr(int, double *, double *); private: int mode; diff --git a/src/USER-MISC/compute_temp_rotate.cpp b/src/USER-MISC/compute_temp_rotate.cpp index 2210555a7c..b948738e00 100644 --- a/src/USER-MISC/compute_temp_rotate.cpp +++ b/src/USER-MISC/compute_temp_rotate.cpp @@ -221,6 +221,17 @@ void ComputeTempRotate::remove_bias(int i, double *v) v[2] -= vbiasall[i][2]; } +/* ---------------------------------------------------------------------- + remove velocity bias from atom I to leave thermal velocity +------------------------------------------------------------------------- */ + +void ComputeTempRotate::remove_bias_thr(int i, double *v, double *) +{ + v[0] -= vbiasall[i][0]; + v[1] -= vbiasall[i][1]; + v[2] -= vbiasall[i][2]; +} + /* ---------------------------------------------------------------------- remove velocity bias from all atoms to leave thermal velocity ------------------------------------------------------------------------- */ @@ -251,6 +262,18 @@ void ComputeTempRotate::restore_bias(int i, double *v) v[2] += vbiasall[i][2]; } +/* ---------------------------------------------------------------------- + add back in velocity bias to atom I removed by remove_bias_thr() + assume remove_bias_thr() was previously called +------------------------------------------------------------------------- */ + +void ComputeTempRotate::restore_bias_thr(int i, double *v, double *) +{ + v[0] += vbiasall[i][0]; + v[1] += vbiasall[i][1]; + v[2] += vbiasall[i][2]; +} + /* ---------------------------------------------------------------------- add back in velocity bias to all atoms removed by remove_bias_all() assume remove_bias_all() was previously called diff --git a/src/USER-MISC/compute_temp_rotate.h b/src/USER-MISC/compute_temp_rotate.h index 69643b68a5..9590366b15 100644 --- a/src/USER-MISC/compute_temp_rotate.h +++ b/src/USER-MISC/compute_temp_rotate.h @@ -34,9 +34,12 @@ class ComputeTempRotate : public Compute { void compute_vector(); void remove_bias(int, double *); + void remove_bias_thr(int, double *, double *); void remove_bias_all(); void restore_bias(int, double *); void restore_bias_all(); + void restore_bias_thr(int, double *, double *); + double memory_usage(); private: diff --git a/src/USER-OMP/fix_nh_asphere_omp.cpp b/src/USER-OMP/fix_nh_asphere_omp.cpp index f11b1f5e94..e710e6f12e 100644 --- a/src/USER-OMP/fix_nh_asphere_omp.cpp +++ b/src/USER-OMP/fix_nh_asphere_omp.cpp @@ -183,12 +183,13 @@ void FixNHAsphereOMP::nh_v_temp() #pragma omp parallel for default(none) private(i) schedule(static) #endif for (i = 0; i < nlocal; i++) { + double buf[3]; if (mask[i] & groupbit) { - temperature->remove_bias(i,&v[i].x); + temperature->remove_bias_thr(i,&v[i].x,buf); v[i].x *= factor_eta; v[i].y *= factor_eta; v[i].z *= factor_eta; - temperature->restore_bias(i,&v[i].x); + temperature->restore_bias_thr(i,&v[i].x,buf); angmom[i].x *= factor_eta; angmom[i].y *= factor_eta; angmom[i].z *= factor_eta; diff --git a/src/USER-OMP/fix_nh_omp.cpp b/src/USER-OMP/fix_nh_omp.cpp index e77f18304d..ccb6090378 100644 --- a/src/USER-OMP/fix_nh_omp.cpp +++ b/src/USER-OMP/fix_nh_omp.cpp @@ -261,8 +261,9 @@ void FixNHOMP::nh_v_press() #pragma omp parallel for default(none) private(i) schedule(static) #endif for (i = 0; i < nlocal; i++) { + double buf[3]; if (mask[i] & groupbit) { - temperature->remove_bias(i,&v[i].x); + temperature->remove_bias_thr(i,&v[i].x,buf); v[i].x *= factor0; v[i].y *= factor1; v[i].z *= factor2; @@ -273,7 +274,7 @@ void FixNHOMP::nh_v_press() v[i].x *= factor0; v[i].y *= factor1; v[i].z *= factor2; - temperature->restore_bias(i,&v[i].x); + temperature->restore_bias_thr(i,&v[i].x,buf); } } } @@ -373,12 +374,13 @@ void FixNHOMP::nh_v_temp() #pragma omp parallel for default(none) private(i) schedule(static) #endif for (i = 0; i < nlocal; i++) { + double buf[3]; if (mask[i] & groupbit) { - temperature->remove_bias(i,&v[i].x); + temperature->remove_bias_thr(i,&v[i].x,buf); v[i].x *= factor_eta; v[i].y *= factor_eta; v[i].z *= factor_eta; - temperature->restore_bias(i,&v[i].x); + temperature->restore_bias_thr(i,&v[i].x,buf); } } } diff --git a/src/USER-OMP/fix_nh_sphere_omp.cpp b/src/USER-OMP/fix_nh_sphere_omp.cpp index cd06c581ca..dd0530dcfa 100644 --- a/src/USER-OMP/fix_nh_sphere_omp.cpp +++ b/src/USER-OMP/fix_nh_sphere_omp.cpp @@ -137,12 +137,13 @@ void FixNHSphereOMP::nh_v_temp() #pragma omp parallel for default(none) private(i) schedule(static) #endif for (i = 0; i < nlocal; i++) { + double buf[3]; if (mask[i] & groupbit) { - temperature->remove_bias(i,&v[i].x); + temperature->remove_bias_thr(i,&v[i].x,buf); v[i].x *= factor_eta; v[i].y *= factor_eta; v[i].z *= factor_eta; - temperature->restore_bias(i,&v[i].x); + temperature->restore_bias_thr(i,&v[i].x,buf); omega[i].x *= factor_eta; omega[i].y *= factor_eta; omega[i].z *= factor_eta; diff --git a/src/USER-OMP/fix_nvt_sllod_omp.cpp b/src/USER-OMP/fix_nvt_sllod_omp.cpp index f233dc459b..a829d49c0f 100644 --- a/src/USER-OMP/fix_nvt_sllod_omp.cpp +++ b/src/USER-OMP/fix_nvt_sllod_omp.cpp @@ -121,16 +121,16 @@ void FixNVTSllodOMP::nh_v_temp() #pragma omp parallel for default(none) private(i) shared(h_two) schedule(static) #endif for (i = 0; i < nlocal; i++) { - double vdelu0,vdelu1,vdelu2; + double vdelu0,vdelu1,vdelu2,buf[3]; if (mask[i] & groupbit) { vdelu0 = h_two[0]*v[i].x + h_two[5]*v[i].y + h_two[4]*v[i].z; vdelu1 = h_two[1]*v[i].y + h_two[3]*v[i].z; vdelu2 = h_two[2]*v[i].z; - temperature->remove_bias(i,&v[i].x); + temperature->remove_bias_thr(i,&v[i].x,buf); v[i].x = v[i].x*factor_eta - dthalf*vdelu0; v[i].y = v[i].y*factor_eta - dthalf*vdelu1; v[i].z = v[i].z*factor_eta - dthalf*vdelu2; - temperature->restore_bias(i,&v[i].x); + temperature->restore_bias_thr(i,&v[i].x,buf); } } } diff --git a/src/compute.h b/src/compute.h index 18da971f82..7f12cd97e2 100644 --- a/src/compute.h +++ b/src/compute.h @@ -114,9 +114,11 @@ class Compute : protected Pointers { virtual void dof_remove_pre() {} virtual int dof_remove(int) {return 0;} virtual void remove_bias(int, double *) {} + virtual void remove_bias_thr(int, double *, double *) {} virtual void remove_bias_all() {} virtual void reapply_bias_all() {} virtual void restore_bias(int, double *) {} + virtual void restore_bias_thr(int, double *, double *) {} virtual void restore_bias_all() {} virtual void reset_extra_compute_fix(const char *); diff --git a/src/compute_temp_com.cpp b/src/compute_temp_com.cpp index 7e05dcb776..6d64ff5aee 100644 --- a/src/compute_temp_com.cpp +++ b/src/compute_temp_com.cpp @@ -170,6 +170,17 @@ void ComputeTempCOM::remove_bias(int i, double *v) v[2] -= vbias[2]; } +/* ---------------------------------------------------------------------- + remove velocity bias from atom I to leave thermal velocity +------------------------------------------------------------------------- */ + +void ComputeTempCOM::remove_bias_thr(int, double *v, double *) +{ + v[0] -= vbias[0]; + v[1] -= vbias[1]; + v[2] -= vbias[2]; +} + /* ---------------------------------------------------------------------- remove velocity bias from all atoms to leave thermal velocity ------------------------------------------------------------------------- */ @@ -200,6 +211,18 @@ void ComputeTempCOM::restore_bias(int i, double *v) v[2] += vbias[2]; } +/* ---------------------------------------------------------------------- + add back in velocity bias to atom I removed by remove_bias_thr() + assume remove_bias_thr() was previously called +------------------------------------------------------------------------- */ + +void ComputeTempCOM::restore_bias_thr(int, double *v, double *) +{ + v[0] += vbias[0]; + v[1] += vbias[1]; + v[2] += vbias[2]; +} + /* ---------------------------------------------------------------------- add back in velocity bias to all atoms removed by remove_bias_all() assume remove_bias_all() was previously called diff --git a/src/compute_temp_com.h b/src/compute_temp_com.h index 47587ceccc..67bbdc39a9 100644 --- a/src/compute_temp_com.h +++ b/src/compute_temp_com.h @@ -34,9 +34,11 @@ class ComputeTempCOM : public Compute { void compute_vector(); void remove_bias(int, double *); + void remove_bias_thr(int, double *, double *); void remove_bias_all(); void restore_bias(int, double *); void restore_bias_all(); + void restore_bias_thr(int, double *, double *); private: double tfactor,masstotal; diff --git a/src/compute_temp_deform.cpp b/src/compute_temp_deform.cpp index 5af995252c..c8b8200770 100644 --- a/src/compute_temp_deform.cpp +++ b/src/compute_temp_deform.cpp @@ -221,6 +221,26 @@ void ComputeTempDeform::remove_bias(int i, double *v) v[2] -= vbias[2]; } +/* ---------------------------------------------------------------------- + remove velocity bias from atom I to leave thermal velocity +------------------------------------------------------------------------- */ + +void ComputeTempDeform::remove_bias_thr(int i, double *v, double *b) +{ + double lamda[3]; + double *h_rate = domain->h_rate; + double *h_ratelo = domain->h_ratelo; + + domain->x2lamda(atom->x[i],lamda); + b[0] = h_rate[0]*lamda[0] + h_rate[5]*lamda[1] + + h_rate[4]*lamda[2] + h_ratelo[0]; + b[1] = h_rate[1]*lamda[1] + h_rate[3]*lamda[2] + h_ratelo[1]; + b[2] = h_rate[2]*lamda[2] + h_ratelo[2]; + v[0] -= b[0]; + v[1] -= b[1]; + v[2] -= b[2]; +} + /* ---------------------------------------------------------------------- remove velocity bias from all atoms to leave thermal velocity ------------------------------------------------------------------------- */ @@ -266,6 +286,18 @@ void ComputeTempDeform::restore_bias(int i, double *v) v[2] += vbias[2]; } +/* ---------------------------------------------------------------------- + add back in velocity bias to atom I removed by remove_bias_thr() + assume remove_bias_thr() was previously called with the same buffer b +------------------------------------------------------------------------- */ + +void ComputeTempDeform::restore_bias_thr(int i, double *v, double *b) +{ + v[0] += b[0]; + v[1] += b[1]; + v[2] += b[2]; +} + /* ---------------------------------------------------------------------- add back in velocity bias to all atoms removed by remove_bias_all() assume remove_bias_all() was previously called diff --git a/src/compute_temp_deform.h b/src/compute_temp_deform.h index 33ca83c73d..030294e1c8 100644 --- a/src/compute_temp_deform.h +++ b/src/compute_temp_deform.h @@ -34,8 +34,10 @@ class ComputeTempDeform : public Compute { virtual void compute_vector(); void remove_bias(int, double *); + void remove_bias_thr(int, double *, double *); void remove_bias_all(); void restore_bias(int, double *); + void restore_bias_thr(int, double *, double *); void restore_bias_all(); double memory_usage(); diff --git a/src/compute_temp_partial.cpp b/src/compute_temp_partial.cpp index 7678403d88..9df8e8b580 100644 --- a/src/compute_temp_partial.cpp +++ b/src/compute_temp_partial.cpp @@ -185,6 +185,26 @@ void ComputeTempPartial::remove_bias(int i, double *v) } } +/* ---------------------------------------------------------------------- + remove velocity bias from atom I to leave thermal velocity +------------------------------------------------------------------------- */ + +void ComputeTempPartial::remove_bias_thr(int i, double *v, double *b) +{ + if (!xflag) { + b[0] = v[0]; + v[0] = 0.0; + } + if (!yflag) { + b[1] = v[1]; + v[1] = 0.0; + } + if (!zflag) { + b[2] = v[2]; + v[2] = 0.0; + } +} + /* ---------------------------------------------------------------------- remove velocity bias from all atoms to leave thermal velocity ------------------------------------------------------------------------- */ @@ -262,6 +282,18 @@ void ComputeTempPartial::restore_bias(int i, double *v) if (!zflag) v[2] += vbias[2]; } +/* ---------------------------------------------------------------------- + add back in velocity bias to atom I removed by remove_bias_thr() + assume remove_bias_thr() was previously called with the same buffer b +------------------------------------------------------------------------- */ + +void ComputeTempPartial::restore_bias_thr(int i, double *v, double *b) +{ + if (!xflag) v[0] += b[0]; + if (!yflag) v[1] += b[1]; + if (!zflag) v[2] += b[2]; +} + /* ---------------------------------------------------------------------- add back in velocity bias to all atoms removed by remove_bias_all() assume remove_bias_all() was previously called diff --git a/src/compute_temp_partial.h b/src/compute_temp_partial.h index 8a5c260db1..62641d4799 100644 --- a/src/compute_temp_partial.h +++ b/src/compute_temp_partial.h @@ -35,9 +35,11 @@ class ComputeTempPartial : public Compute { int dof_remove(int); void remove_bias(int, double *); + void remove_bias_thr(int, double *, double *); void remove_bias_all(); void reapply_bias_all(); void restore_bias(int, double *); + void restore_bias_thr(int, double *, double *); void restore_bias_all(); double memory_usage(); diff --git a/src/compute_temp_profile.cpp b/src/compute_temp_profile.cpp index 1c6e56359d..236f5bc096 100644 --- a/src/compute_temp_profile.cpp +++ b/src/compute_temp_profile.cpp @@ -359,6 +359,15 @@ void ComputeTempProfile::remove_bias(int i, double *v) if (zflag) v[2] -= binave[ibin][ivz]; } +/* ---------------------------------------------------------------------- + remove velocity bias from atom I to leave thermal velocity +------------------------------------------------------------------------- */ + +void ComputeTempProfile::remove_bias_thr(int i, double *v, double *) +{ + remove_bias(i,v); +} + /* ---------------------------------------------------------------------- remove velocity bias from all atoms to leave thermal velocity ------------------------------------------------------------------------- */ @@ -392,6 +401,16 @@ void ComputeTempProfile::restore_bias(int i, double *v) if (zflag) v[2] += binave[ibin][ivz]; } +/* ---------------------------------------------------------------------- + add back in velocity bias to atom I removed by remove_bias_thr() + assume remove_bias_thr() was previously called +------------------------------------------------------------------------- */ + +void ComputeTempProfile::restore_bias_thr(int i, double *v, double *) +{ + restore_bias(i,v); +} + /* ---------------------------------------------------------------------- add back in velocity bias to all atoms removed by remove_bias_all() assume remove_bias_all() was previously called diff --git a/src/compute_temp_profile.h b/src/compute_temp_profile.h index d78e5396d6..f0c07bbd48 100644 --- a/src/compute_temp_profile.h +++ b/src/compute_temp_profile.h @@ -35,8 +35,10 @@ class ComputeTempProfile : public Compute { void compute_array(); void remove_bias(int, double *); + void remove_bias_thr(int, double *, double *); void remove_bias_all(); void restore_bias(int, double *); + void restore_bias_thr(int, double *, double *); void restore_bias_all(); double memory_usage(); diff --git a/src/compute_temp_ramp.cpp b/src/compute_temp_ramp.cpp index 810d6dd08b..af6a730c9d 100644 --- a/src/compute_temp_ramp.cpp +++ b/src/compute_temp_ramp.cpp @@ -234,6 +234,19 @@ void ComputeTempRamp::remove_bias(int i, double *v) v[v_dim] -= vbias[v_dim]; } +/* ---------------------------------------------------------------------- + remove velocity bias from atom I to leave thermal velocity +------------------------------------------------------------------------- */ + +void ComputeTempRamp::remove_bias_thr(int i, double *v, double *b) +{ + double fraction = (atom->x[i][coord_dim] - coord_lo) / (coord_hi - coord_lo); + fraction = MAX(fraction,0.0); + fraction = MIN(fraction,1.0); + b[v_dim] = v_lo + fraction*(v_hi - v_lo); + v[v_dim] -= b[v_dim]; +} + /* ---------------------------------------------------------------------- remove velocity bias from all atoms to leave thermal velocity ------------------------------------------------------------------------- */ @@ -271,6 +284,16 @@ void ComputeTempRamp::restore_bias(int i, double *v) v[v_dim] += vbias[v_dim]; } +/* ---------------------------------------------------------------------- + add back in velocity bias to atom I removed by remove_bias_thr() + assume remove_bias_thr() was previously called with the same buffer b +------------------------------------------------------------------------- */ + +void ComputeTempRamp::restore_bias_thr(int i, double *v, double *b) +{ + v[v_dim] += b[v_dim]; +} + /* ---------------------------------------------------------------------- add back in velocity bias to all atoms removed by remove_bias_all() assume remove_bias_all() was previously called diff --git a/src/compute_temp_ramp.h b/src/compute_temp_ramp.h index 0e10e519cb..ab888ec31d 100644 --- a/src/compute_temp_ramp.h +++ b/src/compute_temp_ramp.h @@ -35,7 +35,9 @@ class ComputeTempRamp : public Compute { void remove_bias(int, double *); void remove_bias_all(); + void remove_bias_thr(int, double *, double *); void restore_bias(int, double *); + void restore_bias_thr(int, double *, double *); void restore_bias_all(); double memory_usage(); diff --git a/src/compute_temp_region.cpp b/src/compute_temp_region.cpp index e636669344..ed710bc730 100644 --- a/src/compute_temp_region.cpp +++ b/src/compute_temp_region.cpp @@ -199,6 +199,23 @@ void ComputeTempRegion::remove_bias(int i, double *v) } } +/* ---------------------------------------------------------------------- + remove velocity bias from atom I to leave thermal velocity +------------------------------------------------------------------------- */ + +void ComputeTempRegion::remove_bias_thr(int i, double *v, double *b) +{ + double *x = atom->x[i]; + if (domain->regions[iregion]->match(x[0],x[1],x[2])) + b[0] = b[1] = b[2] = 0.0; + else { + b[0] = v[0]; + b[1] = v[1]; + b[2] = v[2]; + v[0] = v[1] = v[2] = 0.0; + } +} + /* ---------------------------------------------------------------------- remove velocity bias from all atoms to leave thermal velocity ------------------------------------------------------------------------- */ @@ -243,6 +260,18 @@ void ComputeTempRegion::restore_bias(int i, double *v) v[2] += vbias[2]; } +/* ---------------------------------------------------------------------- + add back in velocity bias to atom I removed by remove_bias_thr() + assume remove_bias_thr() was previously called with the same buffer b +------------------------------------------------------------------------- */ + +void ComputeTempRegion::restore_bias_thr(int i, double *v, double *b) +{ + v[0] += b[0]; + v[1] += b[1]; + v[2] += b[2]; +} + /* ---------------------------------------------------------------------- add back in velocity bias to all atoms removed by remove_bias_all() assume remove_bias_all() was previously called diff --git a/src/compute_temp_region.h b/src/compute_temp_region.h index 95194d7fdf..fd494ab8d1 100644 --- a/src/compute_temp_region.h +++ b/src/compute_temp_region.h @@ -35,10 +35,13 @@ class ComputeTempRegion : public Compute { void dof_remove_pre(); int dof_remove(int); + void remove_bias(int, double *); + void remove_bias_thr(int, double *, double *); void remove_bias_all(); void restore_bias(int, double *); void restore_bias_all(); + void restore_bias_thr(int, double *, double *); double memory_usage(); protected: diff --git a/src/compute_temp_sphere.cpp b/src/compute_temp_sphere.cpp index febb9339b4..ad5cf565e9 100644 --- a/src/compute_temp_sphere.cpp +++ b/src/compute_temp_sphere.cpp @@ -331,6 +331,15 @@ void ComputeTempSphere::remove_bias(int i, double *v) tbias->remove_bias(i,v); } +/* ---------------------------------------------------------------------- + remove velocity bias from atom I to leave thermal velocity +------------------------------------------------------------------------- */ + +void ComputeTempSphere::remove_bias_thr(int i, double *v, double *b) +{ + tbias->remove_bias_thr(i,v,b); +} + /* ---------------------------------------------------------------------- add back in velocity bias to atom I removed by remove_bias() assume remove_bias() was previously called @@ -340,3 +349,13 @@ void ComputeTempSphere::restore_bias(int i, double *v) { tbias->restore_bias(i,v); } + +/* ---------------------------------------------------------------------- + add back in velocity bias to atom I removed by remove_bias_thr() + assume remove_bias_thr() was previously called with the same buffer b +------------------------------------------------------------------------- */ + +void ComputeTempSphere::restore_bias_thr(int i, double *v, double *b) +{ + tbias->restore_bias_thr(i,v,b); +} diff --git a/src/compute_temp_sphere.h b/src/compute_temp_sphere.h index ae72fe2684..c15e02ffbb 100644 --- a/src/compute_temp_sphere.h +++ b/src/compute_temp_sphere.h @@ -34,12 +34,13 @@ class ComputeTempSphere : public Compute { void compute_vector(); void remove_bias(int, double *); + void remove_bias_thr(int, double *, double *); void restore_bias(int, double *); + void restore_bias_thr(int, double *, double *); private: int mode; double tfactor; - double *inertia; char *id_bias; Compute *tbias; // ptr to additional bias compute -- GitLab From 8936b99e9f894f1346c335026954593c5c3073d0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 16 May 2017 18:15:53 -0400 Subject: [PATCH 141/593] add contributed SiC.edip potential file --- potentials/SiC.edip | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 potentials/SiC.edip diff --git a/potentials/SiC.edip b/potentials/SiC.edip new file mode 100644 index 0000000000..0485d345bb --- /dev/null +++ b/potentials/SiC.edip @@ -0,0 +1,38 @@ +# DATE: 2017-05-16 CONTRIBUTOR: Laurent Pizzagalli CITATION: G. Lucas, M. Bertolus, and L. Pizzagalli, J. Phys. : Condens. Matter 22, 035802 (2010) +# element 1, element 2, element 3, +# A B cutoffA cutoffC alpha beta eta +# gamma lambda mu rho sigma Q0 +# u1 u2 u3 u4 +# +Si Si Si 5.488043 1.446435 2.941586 2.540193 3.066580 0.008593 0.589390 + 1.135256 2.417497 0.629131 1.343679 0.298443 208.924548 + -0.165799 32.557 0.286198 0.66 + +C C C 10.222599 0.959814 2.212263 1.741598 1.962090 0.025661 0.275605 + 1.084183 3.633621 0.594236 2.827634 0.536561 289.305617 + -0.165799 32.557 0.286198 0.66 + +C Si Si 7.535967 1.177019 2.534972 1.973974 2.507738 0.015347 0.432497 + 1.191567 3.025559 0.611684 2.061835 0.423863 249.115082 + -0.165799 32.557000 0.286198 0.660000 + +Si C C 7.535967 1.177019 2.534972 1.973974 2.507738 0.015347 0.432497 + 1.191567 3.025559 0.611684 2.061835 0.423863 249.115082 + -0.165799 32.557000 0.286198 0.660000 + +Si Si C 5.488043 1.446435 2.941586 2.540193 3.066580 0.008593 0.510944 + 1.135256 2.721528 0.620407 1.343679 0.298443 229.019815 + -0.165799 32.557000 0.286198 0.660000 + +Si C Si 7.535967 1.177019 2.534972 1.973974 2.507738 0.015347 0.510944 + 1.191567 2.721528 0.620407 2.061835 0.423863 229.019815 + -0.165799 32.557000 0.286198 0.660000 + +C C Si 10.222599 0.959814 2.212263 1.741598 1.962090 0.025661 0.354051 + 1.084183 3.329590 0.602960 2.827634 0.536561 269.210350 + -0.165799 32.557000 0.286198 0.660000 + +C Si C 7.535967 1.177019 2.534972 1.973974 2.507738 0.015347 0.354051 + 1.191567 3.329590 0.602960 2.061835 0.423863 269.210350 + -0.165799 32.557000 0.286198 0.660000 + -- GitLab From 7caf6cf459d35657c36dd79000c07a65757a9bfe Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Tue, 16 May 2017 23:29:48 -0400 Subject: [PATCH 142/593] Change how a Python pair style is loaded Implements a class loader which takes a fully qualified Python class name, loads the module and creates an object instance. To add flexibility, the current working directory and the directory specified by the LAMMPS_POTENTIALS environment variable are added to the module search path. --- examples/python/in.pair_python_hybrid | 6 +- examples/python/in.pair_python_melt | 6 +- .../{lj-melt-potential.py => potentials.py} | 3 - src/PYTHON/pair_python.cpp | 60 +++++++++++++++---- 4 files changed, 54 insertions(+), 21 deletions(-) rename examples/python/{lj-melt-potential.py => potentials.py} (96%) diff --git a/examples/python/in.pair_python_hybrid b/examples/python/in.pair_python_hybrid index 914b840e86..b917910a29 100644 --- a/examples/python/in.pair_python_hybrid +++ b/examples/python/in.pair_python_hybrid @@ -12,7 +12,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * * python potentials.LAMMPSLJCutPotential lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin @@ -31,7 +31,7 @@ clear read_restart hybrid.restart pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * * python potentials.LAMMPSLJCutPotential lj NULL pair_coeff * 2 lj/cut 1.0 1.0 fix 1 all nve @@ -47,7 +47,7 @@ atom_style atomic read_data hybrid.data pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * * python potentials.LAMMPSLJCutPotential lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin diff --git a/examples/python/in.pair_python_melt b/examples/python/in.pair_python_melt index ae37aafa77..2367ea0026 100644 --- a/examples/python/in.pair_python_melt +++ b/examples/python/in.pair_python_melt @@ -12,7 +12,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * lj-melt-potential.py lj +pair_coeff * * potentials.LAMMPSLJCutPotential lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no @@ -30,7 +30,7 @@ clear read_restart melt.restart pair_style python 2.5 -pair_coeff * * lj-melt-potential.py lj +pair_coeff * * potentials.LAMMPSLJCutPotential lj fix 1 all nve @@ -45,7 +45,7 @@ atom_style atomic read_data melt.data pair_style python 2.5 -pair_coeff * * lj-melt-potential.py lj +pair_coeff * * potentials.LAMMPSLJCutPotential lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no diff --git a/examples/python/lj-melt-potential.py b/examples/python/potentials.py similarity index 96% rename from examples/python/lj-melt-potential.py rename to examples/python/potentials.py index 3d7332faa8..2438a8ba46 100644 --- a/examples/python/lj-melt-potential.py +++ b/examples/python/potentials.py @@ -32,6 +32,3 @@ class LAMMPSLJCutPotential(object): lj3 = coeff[4] lj4 = coeff[5] return (r6inv * (lj3*r6inv - lj4)) - -lammps_pair_style = LAMMPSLJCutPotential() - diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 485efee58d..60f317ee96 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -42,12 +42,26 @@ PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) { reinitflag = 0; python->init(); + + py_potential = NULL; + + // add current directory to PYTHONPATH + PyObject * py_path = PySys_GetObject("path"); + PyList_Append(py_path, PY_STRING_FROM_STRING(".")); + + // if LAMMPS_POTENTIALS environment variable is set, add it to PYTHONPATH as well + const char * potentials_path = getenv("LAMMPS_POTENTIALS"); + if (potentials_path != NULL) { + PyList_Append(py_path, PY_STRING_FROM_STRING(potentials_path)); + } } /* ---------------------------------------------------------------------- */ PairPython::~PairPython() { + if(py_potential) Py_DECREF((PyObject*) py_potential); + if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); @@ -234,34 +248,56 @@ void PairPython::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // check if python potential file exists and source it + char * full_cls_name = arg[2]; + char * lastpos = strrchr(full_cls_name, '.'); + + if (lastpos == NULL) { + error->all(FLERR,"Python pair style requires fully qualified class name"); + } + + size_t module_name_length = strlen(full_cls_name) - strlen(lastpos); + size_t cls_name_length = strlen(lastpos)-1; + + char * module_name = new char[module_name_length+1]; + char * cls_name = new char[cls_name_length+1]; + strncpy(module_name, full_cls_name, module_name_length); + module_name[module_name_length] = 0; - FILE *fp = fopen(arg[2],"r"); - if (fp == NULL) - error->all(FLERR,"Cannot open python pair potential class file"); + strcpy(cls_name, lastpos+1); PyGILState_STATE gstate = PyGILState_Ensure(); - int err = PyRun_SimpleFile(fp,arg[2]); - if (err) { + PyObject * pModule = PyImport_ImportModule(module_name); + if (!pModule) { + PyErr_Print(); + PyErr_Clear(); PyGILState_Release(gstate); - error->all(FLERR,"Loading python pair style class failure"); + error->all(FLERR,"Loading python pair style module failure"); } - fclose(fp); // create LAMMPS atom type to potential file type mapping in python class // by calling 'lammps_pair_style.map_coeff(name,type)' - PyObject *pModule = PyImport_AddModule("__main__"); - if (!pModule) error->all(FLERR,"Could not initialize embedded Python"); + PyObject *py_pair_type = PyObject_GetAttrString(pModule, cls_name); + if (!py_pair_type) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not find pair style class in module'"); + } + + delete [] module_name; + delete [] cls_name; - PyObject *py_pair_instance = PyObject_GetAttrString(pModule,"lammps_pair_style"); + PyObject * py_pair_instance = PyObject_CallObject(py_pair_type, NULL); if (!py_pair_instance) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); - error->all(FLERR,"Could not find 'lammps_pair_style instance'"); + error->all(FLERR,"Could not instantiate instance of pair style class'"); } - py_potential = (void *) py_pair_instance; // XXX do we need to increment reference counter? + + py_potential = (void *) py_pair_instance; PyObject *py_map_coeff = PyObject_GetAttrString(py_pair_instance,"map_coeff"); if (!py_map_coeff) { -- GitLab From 96f0a82aa5ad030da3d432ab106ffd9416077ed1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 May 2017 07:48:15 -0400 Subject: [PATCH 143/593] simplify class names in pair style python examples. add SPC/E water example --- examples/python/in.pair_python_hybrid | 2 +- examples/python/in.pair_python_melt | 2 +- examples/python/in.pair_python_spce | 28 ++++++++++++++++++ examples/python/potentials.py | 41 ++++++++++++++++++++++++++- 4 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 examples/python/in.pair_python_spce diff --git a/examples/python/in.pair_python_hybrid b/examples/python/in.pair_python_hybrid index b917910a29..dcd1f1e35c 100644 --- a/examples/python/in.pair_python_hybrid +++ b/examples/python/in.pair_python_hybrid @@ -12,7 +12,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LAMMPSLJCutPotential lj NULL +pair_coeff * * python potentials.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin diff --git a/examples/python/in.pair_python_melt b/examples/python/in.pair_python_melt index 2367ea0026..2349f080d4 100644 --- a/examples/python/in.pair_python_melt +++ b/examples/python/in.pair_python_melt @@ -12,7 +12,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LAMMPSLJCutPotential lj +pair_coeff * * potentials.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no diff --git a/examples/python/in.pair_python_spce b/examples/python/in.pair_python_spce new file mode 100644 index 0000000000..d3765ebc33 --- /dev/null +++ b/examples/python/in.pair_python_spce @@ -0,0 +1,28 @@ +units real +atom_style full + +read_data data.spce + +pair_style hybrid/overlay python 12.0 coul/long 12.0 +kspace_style pppm 1.0e-6 + +pair_coeff * * coul/long +pair_coeff * * python potentials.LJCutSPCE OW NULL + +bond_style harmonic +angle_style harmonic +dihedral_style none +improper_style none + +bond_coeff 1 1000.00 1.000 +angle_coeff 1 100.0 109.47 + +special_bonds lj/coul 0.0 0.0 1.0 + +neighbor 2.0 bin + +fix 1 all shake 0.0001 20 0 b 1 a 1 +fix 2 all nvt temp 300.0 300.0 100.0 + +thermo 10 +run 100 diff --git a/examples/python/potentials.py b/examples/python/potentials.py index 2438a8ba46..dbce8cd445 100644 --- a/examples/python/potentials.py +++ b/examples/python/potentials.py @@ -1,6 +1,6 @@ from __future__ import print_function -class LAMMPSLJCutPotential(object): +class LJCutMelt(object): def __init__(self): self.pmap=dict() @@ -32,3 +32,42 @@ class LAMMPSLJCutPotential(object): lj3 = coeff[4] lj4 = coeff[5] return (r6inv * (lj3*r6inv - lj4)) + +class LJCutSPCE(object): + + def __init__(self): + self.pmap=dict() + # SPCE oxygen in real units + eps=0.15535 + sig=3.166 + + # set coeffs: eps, sig, 48*eps*sig**12, 24*eps*sig**6, + # 4*eps*sig**12, 4*eps*sig**6 + self.coeff = {'OW' : {'OW' : (1.0,1.0, + 48.0*eps*sig**12,24.0*eps*sig**6, + 4.0*eps*sig**12, 4.0*eps*sig**6), + 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}, + 'NULL': {'OW' : (0.0,1.0, 0.0, 0.0,0.0,0.0), + 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}} + + def map_coeff(self,name,type): + if name in self.coeff: + self.pmap[type] = name + else: + raise Exception("cannot match atom type %s" % name) + + def compute_force(self,rsq,itype,jtype): + coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] + r2inv = 1.0/rsq + r6inv = r2inv*r2inv*r2inv + lj1 = coeff[2] + lj2 = coeff[3] + return (r6inv * (lj1*r6inv - lj2)) + + def compute_energy(self,rsq,itype,jtype): + coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] + r2inv = 1.0/rsq + r6inv = r2inv*r2inv*r2inv + lj3 = coeff[4] + lj4 = coeff[5] + return (r6inv * (lj3*r6inv - lj4)) -- GitLab From 13e16dc3f14a53f5071d90c2357d722e26fd4d97 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 May 2017 07:52:13 -0400 Subject: [PATCH 144/593] update log files for pair style python examples --- ....1 => log.4May17.pair_python_hybrid.g++.1} | 0 ....4 => log.4May17.pair_python_hybrid.g++.4} | 0 ...++.1 => log.4May17.pair_python_melt.g++.1} | 0 ...++.4 => log.4May17.pair_python_melt.g++.4} | 0 .../python/log.4May17.pair_python_spce.g++.1 | 123 ++++++++++++++++++ .../python/log.4May17.pair_python_spce.g++.4 | 123 ++++++++++++++++++ 6 files changed, 246 insertions(+) rename examples/python/{log.4May2017.pair_python_hybrid.g++.1 => log.4May17.pair_python_hybrid.g++.1} (100%) rename examples/python/{log.4May2017.pair_python_hybrid.g++.4 => log.4May17.pair_python_hybrid.g++.4} (100%) rename examples/python/{log.4May2017.pair_python_melt.g++.1 => log.4May17.pair_python_melt.g++.1} (100%) rename examples/python/{log.4May2017.pair_python_melt.g++.4 => log.4May17.pair_python_melt.g++.4} (100%) create mode 100644 examples/python/log.4May17.pair_python_spce.g++.1 create mode 100644 examples/python/log.4May17.pair_python_spce.g++.4 diff --git a/examples/python/log.4May2017.pair_python_hybrid.g++.1 b/examples/python/log.4May17.pair_python_hybrid.g++.1 similarity index 100% rename from examples/python/log.4May2017.pair_python_hybrid.g++.1 rename to examples/python/log.4May17.pair_python_hybrid.g++.1 diff --git a/examples/python/log.4May2017.pair_python_hybrid.g++.4 b/examples/python/log.4May17.pair_python_hybrid.g++.4 similarity index 100% rename from examples/python/log.4May2017.pair_python_hybrid.g++.4 rename to examples/python/log.4May17.pair_python_hybrid.g++.4 diff --git a/examples/python/log.4May2017.pair_python_melt.g++.1 b/examples/python/log.4May17.pair_python_melt.g++.1 similarity index 100% rename from examples/python/log.4May2017.pair_python_melt.g++.1 rename to examples/python/log.4May17.pair_python_melt.g++.1 diff --git a/examples/python/log.4May2017.pair_python_melt.g++.4 b/examples/python/log.4May17.pair_python_melt.g++.4 similarity index 100% rename from examples/python/log.4May2017.pair_python_melt.g++.4 rename to examples/python/log.4May17.pair_python_melt.g++.4 diff --git a/examples/python/log.4May17.pair_python_spce.g++.1 b/examples/python/log.4May17.pair_python_spce.g++.1 new file mode 100644 index 0000000000..4e429b9cdd --- /dev/null +++ b/examples/python/log.4May17.pair_python_spce.g++.1 @@ -0,0 +1,123 @@ +LAMMPS (4 May 2017) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +units real +atom_style full + +read_data data.spce + orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 4500 atoms + scanning bonds ... + 2 = max bonds/atom + scanning angles ... + 1 = max angles/atom + reading bonds ... + 3000 bonds + reading angles ... + 1500 angles + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 2 = max # of special neighbors + +pair_style hybrid/overlay python 12.0 coul/long 12.0 +kspace_style pppm 1.0e-6 + +pair_coeff * * coul/long +pair_coeff * * python potentials.LJCutSPCE OW NULL + +bond_style harmonic +angle_style harmonic +dihedral_style none +improper_style none + +bond_coeff 1 1000.00 1.000 +angle_coeff 1 100.0 109.47 + +special_bonds lj/coul 0.0 0.0 1.0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 2 = max # of special neighbors + +neighbor 2.0 bin + +fix 1 all shake 0.0001 20 0 b 1 a 1 + 0 = # of size 2 clusters + 0 = # of size 3 clusters + 0 = # of size 4 clusters + 1500 = # of frozen angles +fix 2 all nvt temp 300.0 300.0 100.0 + +thermo 10 +run 100 +PPPM initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394674 + estimated relative force accuracy = 1.18855e-06 + using double precision FFTs + 3d grid and FFT values/proc = 103823 64000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair python, perpetual, skip from (2) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (2) pair coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 41.05 | 41.05 | 41.05 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -16692.369 0 -16692.369 -1289.222 + 10 120.56861 -17769.719 0 -16691.902 -4082.7098 + 20 136.08014 -17884.591 0 -16668.109 -5140.7824 + 30 136.97316 -17874.351 0 -16649.887 -5351.3571 + 40 153.37285 -18001.493 0 -16630.424 -5227.0601 + 50 167.70414 -18105.435 0 -16606.252 -4473.2089 + 60 163.08253 -18037.29 0 -16579.422 -3295.8963 + 70 169.60395 -18067.078 0 -16550.912 -2615.7026 + 80 182.94811 -18155.978 0 -16520.523 -2393.3156 + 90 191.29902 -18197.887 0 -16487.779 -2242.7104 + 100 194.70949 -18195.021 0 -16454.425 -1955.2916 +Loop time of 63.3145 on 1 procs for 100 steps with 4500 atoms + +Performance: 0.136 ns/day, 175.874 hours/ns, 1.579 timesteps/s +86.0% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 61.815 | 61.815 | 61.815 | 0.0 | 97.63 +Bond | 0.000132 | 0.000132 | 0.000132 | 0.0 | 0.00 +Kspace | 1.2226 | 1.2226 | 1.2226 | 0.0 | 1.93 +Neigh | 0.21684 | 0.21684 | 0.21684 | 0.0 | 0.34 +Comm | 0.015175 | 0.015175 | 0.015175 | 0.0 | 0.02 +Output | 0.000405 | 0.000405 | 0.000405 | 0.0 | 0.00 +Modify | 0.040088 | 0.040088 | 0.040088 | 0.0 | 0.06 +Other | | 0.003896 | | | 0.01 + +Nlocal: 4500 ave 4500 max 4500 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 21216 ave 21216 max 21216 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1.44594e+06 ave 1.44594e+06 max 1.44594e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1445935 +Ave neighs/atom = 321.319 +Ave special neighs/atom = 2 +Neighbor list builds = 3 +Dangerous builds = 0 +Total wall time: 0:01:05 diff --git a/examples/python/log.4May17.pair_python_spce.g++.4 b/examples/python/log.4May17.pair_python_spce.g++.4 new file mode 100644 index 0000000000..15c11cd376 --- /dev/null +++ b/examples/python/log.4May17.pair_python_spce.g++.4 @@ -0,0 +1,123 @@ +LAMMPS (4 May 2017) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +units real +atom_style full + +read_data data.spce + orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736) + 2 by 2 by 1 MPI processor grid + reading atoms ... + 4500 atoms + scanning bonds ... + 2 = max bonds/atom + scanning angles ... + 1 = max angles/atom + reading bonds ... + 3000 bonds + reading angles ... + 1500 angles + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 2 = max # of special neighbors + +pair_style hybrid/overlay python 12.0 coul/long 12.0 +kspace_style pppm 1.0e-6 + +pair_coeff * * coul/long +pair_coeff * * python potentials.LJCutSPCE OW NULL + +bond_style harmonic +angle_style harmonic +dihedral_style none +improper_style none + +bond_coeff 1 1000.00 1.000 +angle_coeff 1 100.0 109.47 + +special_bonds lj/coul 0.0 0.0 1.0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 2 = max # of special neighbors + +neighbor 2.0 bin + +fix 1 all shake 0.0001 20 0 b 1 a 1 + 0 = # of size 2 clusters + 0 = # of size 3 clusters + 0 = # of size 4 clusters + 1500 = # of frozen angles +fix 2 all nvt temp 300.0 300.0 100.0 + +thermo 10 +run 100 +PPPM initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394674 + estimated relative force accuracy = 1.18855e-06 + using double precision FFTs + 3d grid and FFT values/proc = 34263 16000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair python, perpetual, skip from (2) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (2) pair coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 14.59 | 14.59 | 14.59 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -16692.369 0 -16692.369 -1289.222 + 10 120.56861 -17769.719 0 -16691.902 -4082.7098 + 20 136.08014 -17884.591 0 -16668.109 -5140.7824 + 30 136.97316 -17874.351 0 -16649.887 -5351.3571 + 40 153.37285 -18001.493 0 -16630.424 -5227.0601 + 50 167.70414 -18105.435 0 -16606.252 -4473.2089 + 60 163.08253 -18037.29 0 -16579.422 -3295.8963 + 70 169.60395 -18067.078 0 -16550.912 -2615.7026 + 80 182.94811 -18155.978 0 -16520.523 -2393.3156 + 90 191.29902 -18197.887 0 -16487.779 -2242.7104 + 100 194.70949 -18195.021 0 -16454.425 -1955.2916 +Loop time of 29.6024 on 4 procs for 100 steps with 4500 atoms + +Performance: 0.292 ns/day, 82.229 hours/ns, 3.378 timesteps/s +52.5% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 26.631 | 27.507 | 28.649 | 14.3 | 92.92 +Bond | 0.00021 | 0.00022675 | 0.000248 | 0.0 | 0.00 +Kspace | 0.72315 | 1.8708 | 2.7365 | 54.7 | 6.32 +Neigh | 0.10667 | 0.1067 | 0.10674 | 0.0 | 0.36 +Comm | 0.045357 | 0.054035 | 0.064607 | 3.6 | 0.18 +Output | 0.000424 | 0.00086625 | 0.002189 | 0.0 | 0.00 +Modify | 0.056602 | 0.056667 | 0.056763 | 0.0 | 0.19 +Other | | 0.006337 | | | 0.02 + +Nlocal: 1125 ave 1154 max 1092 min +Histogram: 1 0 0 0 1 0 0 1 0 1 +Nghost: 12256.2 ave 12296 max 12213 min +Histogram: 1 0 1 0 0 0 0 0 1 1 +Neighs: 361484 ave 376583 max 347969 min +Histogram: 1 0 0 0 2 0 0 0 0 1 + +Total # of neighbors = 1445935 +Ave neighs/atom = 321.319 +Ave special neighs/atom = 2 +Neighbor list builds = 3 +Dangerous builds = 0 +Total wall time: 0:00:30 -- GitLab From a34c935e207beec4304fe3907d2b9a603b9af504 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 May 2017 08:00:21 -0400 Subject: [PATCH 145/593] update log files in python pair style example --- examples/python/in.pair_python_hybrid | 4 +- examples/python/in.pair_python_melt | 4 +- .../log.4May17.pair_python_hybrid.g++.1 | 62 ++++---- .../log.4May17.pair_python_hybrid.g++.4 | 144 +++++++++--------- .../python/log.4May17.pair_python_melt.g++.1 | 62 ++++---- .../python/log.4May17.pair_python_melt.g++.4 | 60 ++++---- 6 files changed, 168 insertions(+), 168 deletions(-) diff --git a/examples/python/in.pair_python_hybrid b/examples/python/in.pair_python_hybrid index dcd1f1e35c..289de18b00 100644 --- a/examples/python/in.pair_python_hybrid +++ b/examples/python/in.pair_python_hybrid @@ -31,7 +31,7 @@ clear read_restart hybrid.restart pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LAMMPSLJCutPotential lj NULL +pair_coeff * * python potentials.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 fix 1 all nve @@ -47,7 +47,7 @@ atom_style atomic read_data hybrid.data pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LAMMPSLJCutPotential lj NULL +pair_coeff * * python potentials.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin diff --git a/examples/python/in.pair_python_melt b/examples/python/in.pair_python_melt index 2349f080d4..7b3cbf7c4d 100644 --- a/examples/python/in.pair_python_melt +++ b/examples/python/in.pair_python_melt @@ -30,7 +30,7 @@ clear read_restart melt.restart pair_style python 2.5 -pair_coeff * * potentials.LAMMPSLJCutPotential lj +pair_coeff * * potentials.LJCutMelt lj fix 1 all nve @@ -45,7 +45,7 @@ atom_style atomic read_data melt.data pair_style python 2.5 -pair_coeff * * potentials.LAMMPSLJCutPotential lj +pair_coeff * * potentials.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no diff --git a/examples/python/log.4May17.pair_python_hybrid.g++.1 b/examples/python/log.4May17.pair_python_hybrid.g++.1 index b7520754f9..d9d3bf53c0 100644 --- a/examples/python/log.4May17.pair_python_hybrid.g++.1 +++ b/examples/python/log.4May17.pair_python_hybrid.g++.1 @@ -19,7 +19,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * * python potentials.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin @@ -59,20 +59,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 -Loop time of 41.3888 on 1 procs for 250 steps with 4000 atoms +Loop time of 43.2436 on 1 procs for 250 steps with 4000 atoms -Performance: 2609.399 tau/day, 6.040 timesteps/s -48.7% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 2497.477 tau/day, 5.781 timesteps/s +31.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 41.135 | 41.135 | 41.135 | 0.0 | 99.39 -Neigh | 0.17089 | 0.17089 | 0.17089 | 0.0 | 0.41 -Comm | 0.032175 | 0.032175 | 0.032175 | 0.0 | 0.08 -Output | 0.000513 | 0.000513 | 0.000513 | 0.0 | 0.00 -Modify | 0.046448 | 0.046448 | 0.046448 | 0.0 | 0.11 -Other | | 0.003913 | | | 0.01 +Pair | 42.933 | 42.933 | 42.933 | 0.0 | 99.28 +Neigh | 0.24816 | 0.24816 | 0.24816 | 0.0 | 0.57 +Comm | 0.027748 | 0.027748 | 0.027748 | 0.0 | 0.06 +Output | 0.000519 | 0.000519 | 0.000519 | 0.0 | 0.00 +Modify | 0.028028 | 0.028028 | 0.028028 | 0.0 | 0.06 +Other | | 0.005912 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -99,7 +99,7 @@ read_restart hybrid.restart 4000 atoms pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * * python potentials.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 fix 1 all nve @@ -136,20 +136,20 @@ Step Temp E_pair E_mol TotEng Press 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 -Loop time of 41.5677 on 1 procs for 250 steps with 4000 atoms +Loop time of 46.2882 on 1 procs for 250 steps with 4000 atoms -Performance: 2598.172 tau/day, 6.014 timesteps/s -48.7% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 2333.206 tau/day, 5.401 timesteps/s +31.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 41.124 | 41.124 | 41.124 | 0.0 | 98.93 -Neigh | 0.35605 | 0.35605 | 0.35605 | 0.0 | 0.86 -Comm | 0.034799 | 0.034799 | 0.034799 | 0.0 | 0.08 -Output | 0.000473 | 0.000473 | 0.000473 | 0.0 | 0.00 -Modify | 0.046841 | 0.046841 | 0.046841 | 0.0 | 0.11 -Other | | 0.005854 | | | 0.01 +Pair | 45.662 | 45.662 | 45.662 | 0.0 | 98.65 +Neigh | 0.55234 | 0.55234 | 0.55234 | 0.0 | 1.19 +Comm | 0.035614 | 0.035614 | 0.035614 | 0.0 | 0.08 +Output | 0.000544 | 0.000544 | 0.000544 | 0.0 | 0.00 +Modify | 0.029269 | 0.029269 | 0.029269 | 0.0 | 0.06 +Other | | 0.008735 | | | 0.02 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -179,7 +179,7 @@ read_data hybrid.data 4000 velocities pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * * python potentials.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin @@ -219,20 +219,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 -Loop time of 41.7098 on 1 procs for 250 steps with 4000 atoms +Loop time of 46.4094 on 1 procs for 250 steps with 4000 atoms -Performance: 2589.318 tau/day, 5.994 timesteps/s -48.7% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 2327.115 tau/day, 5.387 timesteps/s +31.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 41.458 | 41.458 | 41.458 | 0.0 | 99.40 -Neigh | 0.16992 | 0.16992 | 0.16992 | 0.0 | 0.41 -Comm | 0.031355 | 0.031355 | 0.031355 | 0.0 | 0.08 -Output | 0.000537 | 0.000537 | 0.000537 | 0.0 | 0.00 -Modify | 0.046569 | 0.046569 | 0.046569 | 0.0 | 0.11 -Other | | 0.003735 | | | 0.01 +Pair | 46.066 | 46.066 | 46.066 | 0.0 | 99.26 +Neigh | 0.27099 | 0.27099 | 0.27099 | 0.0 | 0.58 +Comm | 0.033778 | 0.033778 | 0.033778 | 0.0 | 0.07 +Output | 0.000507 | 0.000507 | 0.000507 | 0.0 | 0.00 +Modify | 0.030938 | 0.030938 | 0.030938 | 0.0 | 0.07 +Other | | 0.006695 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -247,4 +247,4 @@ Neighbor list builds = 12 Dangerous builds not checked shell rm hybrid.data hybrid.restart -Total wall time: 0:02:07 +Total wall time: 0:02:20 diff --git a/examples/python/log.4May17.pair_python_hybrid.g++.4 b/examples/python/log.4May17.pair_python_hybrid.g++.4 index 7e7868c659..e45514a803 100644 --- a/examples/python/log.4May17.pair_python_hybrid.g++.4 +++ b/examples/python/log.4May17.pair_python_hybrid.g++.4 @@ -11,7 +11,7 @@ Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 region box block 0 10 0 10 0 10 create_box 2 box Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) - 1 by 1 by 2 MPI processor grid + 1 by 2 by 2 MPI processor grid create_atoms 1 box Created 4000 atoms mass * 1.0 @@ -19,7 +19,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * * python potentials.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin @@ -51,35 +51,35 @@ Neighbor list info ... pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard -Per MPI rank memory allocation (min/avg/max) = 4.044 | 4.044 | 4.044 Mbytes +Per MPI rank memory allocation (min/avg/max) = 3.953 | 3.953 | 3.953 Mbytes Step Temp E_pair E_mol TotEng Press 0 3 -6.7733681 0 -2.2744931 -3.7033504 - 50 1.6758903 -4.7955425 0 -2.2823355 5.670064 - 100 1.6458363 -4.7492704 0 -2.2811332 5.8691042 - 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 - 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 - 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 -Loop time of 33.3499 on 2 procs for 250 steps with 4000 atoms + 50 1.6754119 -4.7947589 0 -2.2822693 5.6615925 + 100 1.6503357 -4.756014 0 -2.2811293 5.8050524 + 150 1.6596605 -4.7699432 0 -2.2810749 5.7830138 + 200 1.6371874 -4.7365462 0 -2.2813789 5.9246674 + 250 1.6323462 -4.7292021 0 -2.2812949 5.9762238 +Loop time of 11.1422 on 4 procs for 250 steps with 4000 atoms -Performance: 3238.386 tau/day, 7.496 timesteps/s -31.8% CPU use with 2 MPI tasks x 1 OpenMP threads +Performance: 9692.888 tau/day, 22.437 timesteps/s +35.1% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 31.739 | 32.45 | 33.16 | 12.5 | 97.30 -Neigh | 0.12882 | 0.1292 | 0.12959 | 0.1 | 0.39 -Comm | 0.04094 | 0.75173 | 1.4625 | 82.0 | 2.25 -Output | 0.000352 | 0.0004115 | 0.000471 | 0.0 | 0.00 -Modify | 0.014923 | 0.01509 | 0.015257 | 0.1 | 0.05 -Other | | 0.003902 | | | 0.01 - -Nlocal: 2000 ave 2006 max 1994 min -Histogram: 1 0 0 0 0 0 0 0 0 1 -Nghost: 3942 ave 3967 max 3917 min -Histogram: 1 0 0 0 0 0 0 0 0 1 +Pair | 10.448 | 10.772 | 10.937 | 5.9 | 96.67 +Neigh | 0.062061 | 0.062949 | 0.06439 | 0.4 | 0.56 +Comm | 0.12929 | 0.29444 | 0.61802 | 35.8 | 2.64 +Output | 0.000301 | 0.000684 | 0.001824 | 0.0 | 0.01 +Modify | 0.009803 | 0.0098622 | 0.010014 | 0.1 | 0.09 +Other | | 0.002618 | | | 0.02 + +Nlocal: 1000 ave 1010 max 982 min +Histogram: 1 0 0 0 0 0 1 0 0 2 +Nghost: 2703.75 ave 2713 max 2689 min +Histogram: 1 0 0 0 0 0 0 2 0 1 Neighs: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 +Histogram: 4 0 0 0 0 0 0 0 0 0 Total # of neighbors = 0 Ave neighs/atom = 0 @@ -95,11 +95,11 @@ OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) read_restart hybrid.restart orthogonal box = (0 0 0) to (16.796 16.796 16.796) - 1 by 1 by 2 MPI processor grid + 1 by 2 by 2 MPI processor grid 4000 atoms pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * * python potentials.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 fix 1 all nve @@ -128,35 +128,35 @@ Neighbor list info ... pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard -Per MPI rank memory allocation (min/avg/max) = 3.747 | 3.747 | 3.747 Mbytes +Per MPI rank memory allocation (min/avg/max) = 3.612 | 3.612 | 3.612 Mbytes Step Temp E_pair E_mol TotEng Press - 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 - 300 1.645592 -4.7496711 0 -2.2819002 5.8734193 - 350 1.6514972 -4.7580756 0 -2.2814491 5.810167 - 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 - 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 - 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 -Loop time of 33.4436 on 2 procs for 250 steps with 4000 atoms + 250 1.6323462 -4.7292062 0 -2.2812991 5.9762168 + 300 1.6451788 -4.7488091 0 -2.2816578 5.8375485 + 350 1.6171909 -4.7064928 0 -2.2813129 6.0094235 + 400 1.6388136 -4.7387093 0 -2.2811035 5.9331084 + 450 1.6431295 -4.7452215 0 -2.2811435 5.8929898 + 500 1.643316 -4.7454222 0 -2.2810644 5.8454817 +Loop time of 11.287 on 4 procs for 250 steps with 4000 atoms -Performance: 3229.315 tau/day, 7.475 timesteps/s -31.8% CPU use with 2 MPI tasks x 1 OpenMP threads +Performance: 9568.520 tau/day, 22.149 timesteps/s +34.9% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 31.79 | 32.446 | 33.101 | 11.5 | 97.02 -Neigh | 0.26891 | 0.26902 | 0.26912 | 0.0 | 0.80 -Comm | 0.051997 | 0.70764 | 1.3633 | 77.9 | 2.12 -Output | 0.000332 | 0.000396 | 0.00046 | 0.0 | 0.00 -Modify | 0.01539 | 0.015553 | 0.015717 | 0.1 | 0.05 -Other | | 0.005483 | | | 0.02 - -Nlocal: 2000 ave 2000 max 2000 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Nghost: 3912 ave 3920 max 3904 min -Histogram: 1 0 0 0 0 0 0 0 0 1 +Pair | 10.274 | 10.76 | 11.02 | 8.8 | 95.33 +Neigh | 0.12639 | 0.1291 | 0.13056 | 0.5 | 1.14 +Comm | 0.12094 | 0.38226 | 0.87078 | 46.7 | 3.39 +Output | 0.000297 | 0.0006965 | 0.001867 | 0.0 | 0.01 +Modify | 0.010445 | 0.010638 | 0.011054 | 0.2 | 0.09 +Other | | 0.003901 | | | 0.03 + +Nlocal: 1000 ave 1012 max 983 min +Histogram: 1 0 0 0 0 0 2 0 0 1 +Nghost: 2699 ave 2706 max 2693 min +Histogram: 1 1 0 0 0 0 1 0 0 1 Neighs: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 +Histogram: 4 0 0 0 0 0 0 0 0 0 Total # of neighbors = 0 Ave neighs/atom = 0 @@ -172,14 +172,14 @@ atom_style atomic read_data hybrid.data orthogonal box = (0 0 0) to (16.796 16.796 16.796) - 1 by 1 by 2 MPI processor grid + 1 by 2 by 2 MPI processor grid reading atoms ... 4000 atoms reading velocities ... 4000 velocities pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python lj-melt-potential.py lj NULL +pair_coeff * * python potentials.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin @@ -211,35 +211,35 @@ Neighbor list info ... pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard -Per MPI rank memory allocation (min/avg/max) = 3.247 | 3.247 | 3.247 Mbytes +Per MPI rank memory allocation (min/avg/max) = 3.112 | 3.112 | 3.112 Mbytes Step Temp E_pair E_mol TotEng Press - 0 1.6275257 -4.7224992 0 -2.281821 5.9567365 - 50 1.6454666 -4.7497515 0 -2.2821686 5.8729175 - 100 1.6512008 -4.7582693 0 -2.2820874 5.8090548 - 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 - 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 - 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 -Loop time of 33.0043 on 2 procs for 250 steps with 4000 atoms + 0 1.6323462 -4.7292062 0 -2.2812991 5.9762168 + 50 1.6450626 -4.7488948 0 -2.2819177 5.8370409 + 100 1.6169004 -4.7066969 0 -2.2819526 6.0082546 + 150 1.6384234 -4.7389689 0 -2.2819482 5.9315273 + 200 1.6428814 -4.7460743 0 -2.2823683 5.8888228 + 250 1.6432631 -4.7466603 0 -2.2823818 5.8398819 +Loop time of 11.1573 on 4 procs for 250 steps with 4000 atoms -Performance: 3272.302 tau/day, 7.575 timesteps/s -31.8% CPU use with 2 MPI tasks x 1 OpenMP threads +Performance: 9679.760 tau/day, 22.407 timesteps/s +35.0% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 31.676 | 32.248 | 32.819 | 10.1 | 97.71 -Neigh | 0.12725 | 0.12751 | 0.12778 | 0.1 | 0.39 -Comm | 0.038764 | 0.60973 | 1.1807 | 73.1 | 1.85 -Output | 0.000359 | 0.000424 | 0.000489 | 0.0 | 0.00 -Modify | 0.015441 | 0.01555 | 0.01566 | 0.1 | 0.05 -Other | | 0.003519 | | | 0.01 - -Nlocal: 2000 ave 2004 max 1996 min -Histogram: 1 0 0 0 0 0 0 0 0 1 -Nghost: 3923.5 ave 3927 max 3920 min -Histogram: 1 0 0 0 0 0 0 0 0 1 +Pair | 10.166 | 10.713 | 10.932 | 9.7 | 96.01 +Neigh | 0.060687 | 0.062175 | 0.063163 | 0.4 | 0.56 +Comm | 0.14931 | 0.36938 | 0.91686 | 52.5 | 3.31 +Output | 0.00036 | 0.00058175 | 0.001228 | 0.0 | 0.01 +Modify | 0.009918 | 0.010237 | 0.010388 | 0.2 | 0.09 +Other | | 0.002356 | | | 0.02 + +Nlocal: 1000 ave 1013 max 989 min +Histogram: 1 0 0 1 0 1 0 0 0 1 +Nghost: 2695.5 ave 2706 max 2682 min +Histogram: 1 0 0 0 0 0 2 0 0 1 Neighs: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 +Histogram: 4 0 0 0 0 0 0 0 0 0 Total # of neighbors = 0 Ave neighs/atom = 0 @@ -247,4 +247,4 @@ Neighbor list builds = 12 Dangerous builds not checked shell rm hybrid.data hybrid.restart -Total wall time: 0:01:42 +Total wall time: 0:00:35 diff --git a/examples/python/log.4May17.pair_python_melt.g++.1 b/examples/python/log.4May17.pair_python_melt.g++.1 index afcf5cad9c..3459dd4f87 100644 --- a/examples/python/log.4May17.pair_python_melt.g++.1 +++ b/examples/python/log.4May17.pair_python_melt.g++.1 @@ -19,7 +19,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * lj-melt-potential.py lj +pair_coeff * * potentials.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no @@ -48,20 +48,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 -Loop time of 62.2396 on 1 procs for 250 steps with 4000 atoms +Loop time of 24.2466 on 1 procs for 250 steps with 4000 atoms -Performance: 1735.231 tau/day, 4.017 timesteps/s -31.8% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4454.233 tau/day, 10.311 timesteps/s +59.9% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 61.865 | 61.865 | 61.865 | 0.0 | 99.40 -Neigh | 0.24651 | 0.24651 | 0.24651 | 0.0 | 0.40 -Comm | 0.049505 | 0.049505 | 0.049505 | 0.0 | 0.08 -Output | 0.000738 | 0.000738 | 0.000738 | 0.0 | 0.00 -Modify | 0.071444 | 0.071444 | 0.071444 | 0.0 | 0.11 -Other | | 0.005964 | | | 0.01 +Pair | 24.079 | 24.079 | 24.079 | 0.0 | 99.31 +Neigh | 0.13174 | 0.13174 | 0.13174 | 0.0 | 0.54 +Comm | 0.016789 | 0.016789 | 0.016789 | 0.0 | 0.07 +Output | 0.000271 | 0.000271 | 0.000271 | 0.0 | 0.00 +Modify | 0.015073 | 0.015073 | 0.015073 | 0.0 | 0.06 +Other | | 0.003428 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -88,7 +88,7 @@ read_restart melt.restart 4000 atoms pair_style python 2.5 -pair_coeff * * lj-melt-potential.py lj +pair_coeff * * potentials.LJCutMelt lj fix 1 all nve @@ -114,20 +114,20 @@ Step Temp E_pair E_mol TotEng Press 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 -Loop time of 62.6472 on 1 procs for 250 steps with 4000 atoms +Loop time of 24.3239 on 1 procs for 250 steps with 4000 atoms -Performance: 1723.939 tau/day, 3.991 timesteps/s -31.8% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4440.069 tau/day, 10.278 timesteps/s +60.0% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 61.994 | 61.994 | 61.994 | 0.0 | 98.96 -Neigh | 0.519 | 0.519 | 0.519 | 0.0 | 0.83 -Comm | 0.052574 | 0.052574 | 0.052574 | 0.0 | 0.08 -Output | 0.000804 | 0.000804 | 0.000804 | 0.0 | 0.00 -Modify | 0.071878 | 0.071878 | 0.071878 | 0.0 | 0.11 -Other | | 0.009016 | | | 0.01 +Pair | 24.017 | 24.017 | 24.017 | 0.0 | 98.74 +Neigh | 0.26927 | 0.26927 | 0.26927 | 0.0 | 1.11 +Comm | 0.018113 | 0.018113 | 0.018113 | 0.0 | 0.07 +Output | 0.000254 | 0.000254 | 0.000254 | 0.0 | 0.00 +Modify | 0.015259 | 0.015259 | 0.015259 | 0.0 | 0.06 +Other | | 0.004524 | | | 0.02 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -157,7 +157,7 @@ read_data melt.data 4000 velocities pair_style python 2.5 -pair_coeff * * lj-melt-potential.py lj +pair_coeff * * potentials.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no @@ -186,20 +186,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 -Loop time of 62.6778 on 1 procs for 250 steps with 4000 atoms +Loop time of 22.9051 on 1 procs for 250 steps with 4000 atoms -Performance: 1723.098 tau/day, 3.989 timesteps/s -31.7% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4715.116 tau/day, 10.915 timesteps/s +60.1% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 62.298 | 62.298 | 62.298 | 0.0 | 99.39 -Neigh | 0.25251 | 0.25251 | 0.25251 | 0.0 | 0.40 -Comm | 0.04911 | 0.04911 | 0.04911 | 0.0 | 0.08 -Output | 0.000797 | 0.000797 | 0.000797 | 0.0 | 0.00 -Modify | 0.071729 | 0.071729 | 0.071729 | 0.0 | 0.11 -Other | | 0.005419 | | | 0.01 +Pair | 22.752 | 22.752 | 22.752 | 0.0 | 99.33 +Neigh | 0.12254 | 0.12254 | 0.12254 | 0.0 | 0.53 +Comm | 0.013385 | 0.013385 | 0.013385 | 0.0 | 0.06 +Output | 0.000254 | 0.000254 | 0.000254 | 0.0 | 0.00 +Modify | 0.014159 | 0.014159 | 0.014159 | 0.0 | 0.06 +Other | | 0.002851 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -214,4 +214,4 @@ Neighbor list builds = 12 Dangerous builds not checked shell rm melt.data melt.restart -Total wall time: 0:03:12 +Total wall time: 0:01:13 diff --git a/examples/python/log.4May17.pair_python_melt.g++.4 b/examples/python/log.4May17.pair_python_melt.g++.4 index e7c6ffa8eb..7e4ba25acf 100644 --- a/examples/python/log.4May17.pair_python_melt.g++.4 +++ b/examples/python/log.4May17.pair_python_melt.g++.4 @@ -19,7 +19,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * lj-melt-potential.py lj +pair_coeff * * potentials.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no @@ -48,20 +48,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6596605 -4.7699432 0 -2.2810749 5.7830138 200 1.6371874 -4.7365462 0 -2.2813789 5.9246674 250 1.6323462 -4.7292021 0 -2.2812949 5.9762238 -Loop time of 18.0035 on 4 procs for 250 steps with 4000 atoms +Loop time of 12.7083 on 4 procs for 250 steps with 4000 atoms -Performance: 5998.838 tau/day, 13.886 timesteps/s -31.6% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 8498.384 tau/day, 19.672 timesteps/s +31.5% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 16.784 | 17.18 | 17.611 | 8.9 | 95.43 -Neigh | 0.066257 | 0.066613 | 0.066967 | 0.1 | 0.37 -Comm | 0.31192 | 0.74265 | 1.1386 | 42.7 | 4.13 -Output | 0.000344 | 0.00076 | 0.001983 | 0.0 | 0.00 -Modify | 0.010618 | 0.010763 | 0.010947 | 0.1 | 0.06 -Other | | 0.00278 | | | 0.02 +Pair | 11.491 | 11.96 | 12.464 | 10.0 | 94.11 +Neigh | 0.065058 | 0.065956 | 0.067066 | 0.3 | 0.52 +Comm | 0.16288 | 0.66706 | 1.1373 | 42.2 | 5.25 +Output | 0.000416 | 0.00085025 | 0.002121 | 0.0 | 0.01 +Modify | 0.010849 | 0.011123 | 0.011321 | 0.2 | 0.09 +Other | | 0.003005 | | | 0.02 Nlocal: 1000 ave 1010 max 982 min Histogram: 1 0 0 0 0 0 1 0 0 2 @@ -88,7 +88,7 @@ read_restart melt.restart 4000 atoms pair_style python 2.5 -pair_coeff * * lj-melt-potential.py lj +pair_coeff * * potentials.LJCutMelt lj fix 1 all nve @@ -114,20 +114,20 @@ Step Temp E_pair E_mol TotEng Press 400 1.6388136 -4.7387093 0 -2.2811035 5.9331084 450 1.6431295 -4.7452215 0 -2.2811435 5.8929898 500 1.643316 -4.7454222 0 -2.2810644 5.8454817 -Loop time of 17.8516 on 4 procs for 250 steps with 4000 atoms +Loop time of 12.6852 on 4 procs for 250 steps with 4000 atoms -Performance: 6049.891 tau/day, 14.004 timesteps/s +Performance: 8513.855 tau/day, 19.708 timesteps/s 31.6% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 16.549 | 17.138 | 17.615 | 9.3 | 96.00 -Neigh | 0.1326 | 0.13573 | 0.13709 | 0.5 | 0.76 -Comm | 0.083467 | 0.56179 | 1.1533 | 51.4 | 3.15 -Output | 0.000353 | 0.000703 | 0.00173 | 0.0 | 0.00 -Modify | 0.011229 | 0.011437 | 0.011847 | 0.2 | 0.06 -Other | | 0.004124 | | | 0.02 +Pair | 11.653 | 11.92 | 12.472 | 9.6 | 93.97 +Neigh | 0.13284 | 0.13556 | 0.13729 | 0.5 | 1.07 +Comm | 0.051389 | 0.60884 | 0.88175 | 43.0 | 4.80 +Output | 0.000362 | 0.0046985 | 0.008143 | 5.1 | 0.04 +Modify | 0.011007 | 0.011344 | 0.011857 | 0.3 | 0.09 +Other | | 0.004278 | | | 0.03 Nlocal: 1000 ave 1012 max 983 min Histogram: 1 0 0 0 0 0 2 0 0 1 @@ -157,7 +157,7 @@ read_data melt.data 4000 velocities pair_style python 2.5 -pair_coeff * * lj-melt-potential.py lj +pair_coeff * * potentials.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no @@ -186,20 +186,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6384234 -4.7389689 0 -2.2819482 5.9315273 200 1.6428814 -4.7460743 0 -2.2823683 5.8888228 250 1.6432631 -4.7466603 0 -2.2823818 5.8398819 -Loop time of 17.5277 on 4 procs for 250 steps with 4000 atoms +Loop time of 12.5324 on 4 procs for 250 steps with 4000 atoms -Performance: 6161.664 tau/day, 14.263 timesteps/s -31.7% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 8617.631 tau/day, 19.948 timesteps/s +31.6% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 16.46 | 17.032 | 17.348 | 8.3 | 97.17 -Neigh | 0.063784 | 0.06495 | 0.065515 | 0.3 | 0.37 -Comm | 0.10004 | 0.41613 | 0.98807 | 53.0 | 2.37 -Output | 0.000331 | 0.00081525 | 0.002223 | 0.0 | 0.00 -Modify | 0.010998 | 0.011169 | 0.011264 | 0.1 | 0.06 -Other | | 0.002774 | | | 0.02 +Pair | 11.648 | 11.918 | 12.387 | 8.3 | 95.10 +Neigh | 0.064038 | 0.06537 | 0.065914 | 0.3 | 0.52 +Comm | 0.065189 | 0.53362 | 0.80384 | 39.4 | 4.26 +Output | 0.000346 | 0.0007525 | 0.001938 | 0.0 | 0.01 +Modify | 0.011255 | 0.01155 | 0.011852 | 0.2 | 0.09 +Other | | 0.002751 | | | 0.02 Nlocal: 1000 ave 1013 max 989 min Histogram: 1 0 0 1 0 1 0 0 0 1 @@ -214,4 +214,4 @@ Neighbor list builds = 12 Dangerous builds not checked shell rm melt.data melt.restart -Total wall time: 0:00:55 +Total wall time: 0:00:39 -- GitLab From 45becfb235d7bf456de19b19add33be07724a700 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 May 2017 09:59:01 -0400 Subject: [PATCH 146/593] correct author attributions --- src/PYTHON/fix_python.cpp | 2 +- src/PYTHON/pair_python.cpp | 2 +- src/PYTHON/python_impl.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PYTHON/fix_python.cpp b/src/PYTHON/fix_python.cpp index a7b1edfda1..031bb29764 100644 --- a/src/PYTHON/fix_python.cpp +++ b/src/PYTHON/fix_python.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing author: Axel Kohlmeyer and Richard Berger (Temple U) + Contributing author: Richard Berger (Temple U) ------------------------------------------------------------------------- */ #include diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 60f317ee96..381b9050ff 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing author: Axel Kohlmeyer and Richard Berger (Temple U) + Contributing authors: Axel Kohlmeyer and Richard Berger (Temple U) ------------------------------------------------------------------------- */ #include diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index dadcbfeade..55108eb8c7 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing author: Axel Kohlmeyer and Richard Berger (Temple U) + Contributing author: Richard Berger and Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ #include -- GitLab From 085f3afdfb089a85bd0958fb6436f15c1463c5e2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 May 2017 09:59:30 -0400 Subject: [PATCH 147/593] fix typo in docs --- doc/src/velocity.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/velocity.txt b/doc/src/velocity.txt index 70ddb559fa..b8299a5acf 100644 --- a/doc/src/velocity.txt +++ b/doc/src/velocity.txt @@ -61,7 +61,7 @@ keyword/value parameters. Not all options are used by each style. Each option has a default as listed below. The {create} style generates an ensemble of velocities using a random -number generator with the specified seed as the specified temperature. +number generator with the specified seed at the specified temperature. The {set} style sets the velocities of all atoms in the group to the specified values. If any component is specified as NULL, then it is -- GitLab From 278b9f7fba477da3cc235cefb09151330ef2c5b7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 May 2017 14:59:46 -0400 Subject: [PATCH 148/593] move pair gw and gw/zbl to USER-MISC package --- doc/src/Section_commands.txt | 2 + doc/src/lammps.book | 1 + doc/src/pair_gw.txt | 118 ++++++++++++++++++++ doc/src/pairs.txt | 1 + src/USER-MISC/README | 2 + src/{MANYBODY => USER-MISC}/pair_gw.cpp | 0 src/{MANYBODY => USER-MISC}/pair_gw.h | 0 src/{MANYBODY => USER-MISC}/pair_gw_zbl.cpp | 0 src/{MANYBODY => USER-MISC}/pair_gw_zbl.h | 0 9 files changed, 124 insertions(+) create mode 100644 doc/src/pair_gw.txt rename src/{MANYBODY => USER-MISC}/pair_gw.cpp (100%) rename src/{MANYBODY => USER-MISC}/pair_gw.h (100%) rename src/{MANYBODY => USER-MISC}/pair_gw_zbl.cpp (100%) rename src/{MANYBODY => USER-MISC}/pair_gw_zbl.h (100%) diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index 771e830841..bf7b48f32b 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -931,6 +931,8 @@ KOKKOS, o = USER-OMP, t = OPT. "gran/hertz/history (o)"_pair_gran.html, "gran/hooke (o)"_pair_gran.html, "gran/hooke/history (o)"_pair_gran.html, +"gw"_pair_gw.html, +"gw/zbl"_pair_gw.html, "hbond/dreiding/lj (o)"_pair_hbond_dreiding.html, "hbond/dreiding/morse (o)"_pair_hbond_dreiding.html, "kim"_pair_kim.html, diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 6b3ca8aa07..2fd953ffaf 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -432,6 +432,7 @@ pair_gauss.html pair_gayberne.html pair_gran.html pair_gromacs.html +pair_gw.html pair_hbond_dreiding.html pair_hybrid.html pair_kim.html diff --git a/doc/src/pair_gw.txt b/doc/src/pair_gw.txt new file mode 100644 index 0000000000..2240dca6f7 --- /dev/null +++ b/doc/src/pair_gw.txt @@ -0,0 +1,118 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +pair_style gw command :h3 +pair_style gw/zbl command :h3 + +[Syntax:] + +pair_style gw :pre + +[Examples:] + +pair_style gw +pair_coeff * * SiC.gw Si C C + +pair_style gw/zbl +pair_coeff * * SiC.gw.zbl C Si :pre + +[Description:] + +The {gw} style computes a 3-body "Gao-Weber"_#Gao potential; +similarly {gw/zbl} combines this potential with a modified +repulsive ZBL core function in a similar fashion as implemented +in the "tersoff/zbl"_pair_tersoff_zbl.html pair style. + +Unfortunately the author of this contributed code has not been +able to submit a suitable documentation explaining the details +of the potentials. The LAMMPS developers thus have finally decided +to release the code anyway with only the technical explanations. +For details of the model and the parameters, please refer to the +linked publication. + +Only a single pair_coeff command is used with the {gw} and {gw/zbl} +styles which specifies a Gao-Weber potential file with parameters +for all needed elements. These are mapped to LAMMPS atom types by +specifying N additional arguments after the filename in the pair_coeff +command, where N is the number of LAMMPS atom types: + +filename +N element names = mapping of GW elements to atom types :ul + +See the "pair_coeff"_pair_coeff.html doc page for alternate ways +to specify the path for the potential file. + +As an example, imagine a file SiC.gw has Gao-Weber values for Si and C. +If your LAMMPS simulation has 4 atoms types and you want the first 3 to +be Si, and the 4th to be C, you would use the following pair_coeff command: + +pair_coeff * * SiC.gw Si Si Si C :pre + +The first 2 arguments must be * * so as to span all LAMMPS atom types. +The first three Si arguments map LAMMPS atom types 1,2,3 to the Si +element in the GW file. The final C argument maps LAMMPS atom type 4 +to the C element in the GW file. If a mapping value is specified as +NULL, the mapping is not performed. This can be used when a {gw} +potential is used as part of the {hybrid} pair style. The NULL values +are placeholders for atom types that will be used with other +potentials. + +Gao-Weber files in the {potentials} directory of the LAMMPS +distribution have a ".gw" suffix. Gao-Weber with ZBL files +have a ".gz.zbl" suffix. The structure of the potential files +is similar to other many-body potentials supported by LAMMPS. +You have to refer to the comments in the files and the literature +to learn more details. + +:line + +[Mixing, shift, table, tail correction, restart, rRESPA info]: + +For atom type pairs I,J and I != J, where types I and J correspond to +two different element types, mixing is performed by LAMMPS as +described above from values in the potential file. + +This pair style does not support the "pair_modify"_pair_modify.html +shift, table, and tail options. + +This pair style does not write its information to "binary restart +files"_restart.html, since it is stored in potential files. Thus, you +need to re-specify the pair_style and pair_coeff commands in an input +script that reads a restart file. + +This pair style can only be used via the {pair} keyword of the +"run_style respa"_run_style.html command. It does not support the +{inner}, {middle}, {outer} keywords. + +:line + +[Restrictions:] + +This pair style is part of the USER-MISC package. It is only enabled +if LAMMPS was built with that package. See +the "Making LAMMPS"_Section_start.html#start_3 section for more info. + +This pair style requires the "newton"_newton.html setting to be "on" +for pair interactions. + +The Gao-Weber potential files provided with LAMMPS (see the +potentials directory) are parameterized for metal "units"_units.html. +You can use the GW potential with any LAMMPS units, but you would need +to create your own GW potential file with coefficients listed in the +appropriate units if your simulation doesn't use "metal" units. + +[Related commands:] + +"pair_coeff"_pair_coeff.html + +[Default:] none + +:line + +:link(Gao) +[(Gao)] Gao and Weber, Nuclear Instruments and Methods in Physics Research B 191 (2012) 504. diff --git a/doc/src/pairs.txt b/doc/src/pairs.txt index 0898906e7c..369c942280 100644 --- a/doc/src/pairs.txt +++ b/doc/src/pairs.txt @@ -36,6 +36,7 @@ Pair Styles :h1 pair_gayberne pair_gran pair_gromacs + pair_gw pair_hbond_dreiding pair_hybrid pair_kim diff --git a/src/USER-MISC/README b/src/USER-MISC/README index cacee41e0c..1e927fdfab 100644 --- a/src/USER-MISC/README +++ b/src/USER-MISC/README @@ -60,6 +60,8 @@ pair_style dipole/sf, Mario Orsi, orsimario at gmail.com, 8 Aug 11 pair_style edip, Luca Ferraro, luca.ferraro at caspur.it, 15 Sep 11 pair_style eam/cd, Alexander Stukowski, stukowski at mm.tu-darmstadt.de, 7 Nov 09 pair_style gauss/cut, Axel Kohlmeyer, akohlmey at gmail.com, 1 Dec 11 +pair_style gw, German Samolyuk, samolyuk at gmail.com, 17 May 17 +pair_style gw/zbl, German Samolyuk, samolyuk at gmail.com, 17 May 17 pair_style lennard/mdf, Paolo Raiteri, p.raiteri at curtin.edu.au, 2 Dec 15 pair_style list, Axel Kohlmeyer (Temple U), akohlmey at gmail.com, 1 Jun 13 pair_style lj/mdf, Paolo Raiteri, p.raiteri at curtin.edu.au, 2 Dec 15 diff --git a/src/MANYBODY/pair_gw.cpp b/src/USER-MISC/pair_gw.cpp similarity index 100% rename from src/MANYBODY/pair_gw.cpp rename to src/USER-MISC/pair_gw.cpp diff --git a/src/MANYBODY/pair_gw.h b/src/USER-MISC/pair_gw.h similarity index 100% rename from src/MANYBODY/pair_gw.h rename to src/USER-MISC/pair_gw.h diff --git a/src/MANYBODY/pair_gw_zbl.cpp b/src/USER-MISC/pair_gw_zbl.cpp similarity index 100% rename from src/MANYBODY/pair_gw_zbl.cpp rename to src/USER-MISC/pair_gw_zbl.cpp diff --git a/src/MANYBODY/pair_gw_zbl.h b/src/USER-MISC/pair_gw_zbl.h similarity index 100% rename from src/MANYBODY/pair_gw_zbl.h rename to src/USER-MISC/pair_gw_zbl.h -- GitLab From 43efe9e417ee120555e6cbb290d73f484efa8b46 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 May 2017 17:20:56 -0400 Subject: [PATCH 149/593] adding Pair::single() support to python pair style and examples with the single function, python pair styles can be massively sped up and made compatible to accelerators, as one can translate the analytic force and energy functions through LAMMPS into suitable tables and then simply use the on-the-fly tables for production runs --- examples/python/data.spce | 9029 +++++++++++++++++ examples/python/in.pair_python_coulomb | 45 + examples/python/in.pair_python_table | 32 + .../python/log.4May17.pair_python_coulomb.1 | 178 + .../python/log.4May17.pair_python_coulomb.4 | 178 + .../python/log.4May17.pair_python_table.g++.1 | 99 + .../python/log.4May17.pair_python_table.g++.4 | 99 + src/PYTHON/pair_python.cpp | 84 +- src/PYTHON/pair_python.h | 1 + 9 files changed, 9743 insertions(+), 2 deletions(-) create mode 100644 examples/python/data.spce create mode 100644 examples/python/in.pair_python_coulomb create mode 100644 examples/python/in.pair_python_table create mode 100644 examples/python/log.4May17.pair_python_coulomb.1 create mode 100644 examples/python/log.4May17.pair_python_coulomb.4 create mode 100644 examples/python/log.4May17.pair_python_table.g++.1 create mode 100644 examples/python/log.4May17.pair_python_table.g++.4 diff --git a/examples/python/data.spce b/examples/python/data.spce new file mode 100644 index 0000000000..1e8a4a0913 --- /dev/null +++ b/examples/python/data.spce @@ -0,0 +1,9029 @@ +LAMMPS Atom File + + 4500 atoms + 3000 bonds + 1500 angles + 0 dihedrals + 0 impropers + + 2 atom types + 1 bond types + 1 angle types + + 0.02645 35.53280 xlo xhi + 0.02645 35.53280 ylo yhi + 0.02641 35.47360 zlo zhi + +Masses + + 1 15.9994 + 2 1.00794 + +Atoms + + 1 1 1 -0.8472 12.12456 28.09298 22.27452 0 1 0 + 2 1 2 0.4236 12.53683 28.75606 22.89928 0 1 0 + 3 1 2 0.4236 11.49482 28.56390 21.65678 0 1 0 + 4 2 1 -0.8472 1.17079 29.37777 23.72984 1 -1 0 + 5 2 2 0.4236 1.91804 29.48483 23.07399 1 -1 0 + 6 2 2 0.4236 0.40074 28.91964 23.28586 1 -1 0 + 7 3 1 -0.8472 29.68313 14.73733 21.62793 -1 0 0 + 8 3 2 0.4236 30.54284 14.93741 21.15800 -1 0 0 + 9 3 2 0.4236 29.73135 15.07344 22.56848 -1 0 0 + 10 4 1 -0.8472 10.87272 7.00153 35.10920 0 1 0 + 11 4 2 0.4236 11.11057 6.21663 34.53712 0 1 0 + 12 4 2 0.4236 9.95658 7.32301 34.86983 0 1 0 + 13 5 1 -0.8472 9.46588 6.43648 19.79899 0 1 0 + 14 5 2 0.4236 9.04840 6.32936 18.89668 0 1 0 + 15 5 2 0.4236 10.31722 5.91326 19.83657 0 1 0 + 16 6 1 -0.8472 3.17905 29.69801 22.11922 0 0 0 + 17 6 2 0.4236 3.19240 30.63289 21.76465 0 0 0 + 18 6 2 0.4236 3.38651 29.05797 21.37944 0 0 0 + 19 7 1 -0.8472 23.38618 11.29979 30.78238 0 0 0 + 20 7 2 0.4236 23.69882 10.46688 31.23897 0 0 0 + 21 7 2 0.4236 24.17354 11.79208 30.41132 0 0 0 + 22 8 1 -0.8472 11.03761 10.46106 30.14741 0 1 0 + 23 8 2 0.4236 10.94682 11.45112 30.25464 0 1 0 + 24 8 2 0.4236 11.60678 10.09680 30.88450 0 1 0 + 25 9 1 -0.8472 26.24001 25.40937 21.06754 0 0 0 + 26 9 2 0.4236 25.67045 26.09258 21.52442 0 0 0 + 27 9 2 0.4236 26.22311 25.56759 20.08030 0 0 0 + 28 10 1 -0.8472 10.84087 35.33915 19.78347 0 -1 0 + 29 10 2 0.4236 10.20697 0.54421 19.48018 0 0 0 + 30 10 2 0.4236 11.06253 34.74012 19.01405 0 -1 0 + 31 11 1 -0.8472 20.07383 4.95885 33.62365 0 1 0 + 32 11 2 0.4236 19.77359 5.87080 33.90322 0 1 0 + 33 11 2 0.4236 20.68149 4.57954 34.32139 0 1 0 + 34 12 1 -0.8472 12.43897 28.56656 17.39837 0 0 0 + 35 12 2 0.4236 12.80348 27.99505 18.13354 0 0 0 + 36 12 2 0.4236 11.63887 28.12177 16.99597 0 0 0 + 37 13 1 -0.8472 14.80338 7.14199 1.42116 0 0 0 + 38 13 2 0.4236 14.86001 6.68442 0.53382 0 0 0 + 39 13 2 0.4236 14.13589 6.67036 1.99737 0 0 0 + 40 14 1 -0.8472 15.87968 22.18330 24.13468 1 -1 0 + 41 14 2 0.4236 15.97100 22.71526 23.29285 1 -1 0 + 42 14 2 0.4236 16.69618 22.30846 24.69826 1 -1 0 + 43 15 1 -0.8472 13.29194 18.30473 12.37157 1 0 0 + 44 15 2 0.4236 12.55838 18.63231 12.96701 1 0 0 + 45 15 2 0.4236 13.24823 18.78335 11.49467 1 0 0 + 46 16 1 -0.8472 20.27409 23.94157 15.50212 0 0 0 + 47 16 2 0.4236 20.17851 24.67734 14.83167 0 0 0 + 48 16 2 0.4236 20.62006 23.12024 15.04857 0 0 0 + 49 17 1 -0.8472 30.10203 10.78182 14.24321 1 0 0 + 50 17 2 0.4236 29.40171 11.00523 13.56532 1 0 0 + 51 17 2 0.4236 29.70120 10.21329 14.96159 1 0 0 + 52 18 1 -0.8472 19.71525 12.98975 25.40578 0 0 0 + 53 18 2 0.4236 20.21522 13.35852 26.18938 0 0 0 + 54 18 2 0.4236 18.75253 12.87297 25.64962 0 0 0 + 55 19 1 -0.8472 4.22362 18.99305 32.62946 1 0 0 + 56 19 2 0.4236 4.05067 18.17865 32.07556 1 0 0 + 57 19 2 0.4236 3.38513 19.53353 32.69833 1 0 0 + 58 20 1 -0.8472 17.67279 30.86798 34.86933 1 -1 0 + 59 20 2 0.4236 17.18866 31.74218 34.90528 1 -1 0 + 60 20 2 0.4236 18.18607 30.80612 34.01339 1 -1 0 + 61 21 1 -0.8472 7.49194 27.84024 34.65598 0 0 0 + 62 21 2 0.4236 7.36412 27.37987 33.77752 0 0 0 + 63 21 2 0.4236 7.83650 27.18529 35.32848 0 0 0 + 64 22 1 -0.8472 9.58199 8.75878 28.38767 0 0 0 + 65 22 2 0.4236 8.89931 8.96106 27.68557 0 0 0 + 66 22 2 0.4236 9.61451 9.50981 29.04713 0 0 0 + 67 23 1 -0.8472 18.15447 7.97877 4.02967 1 0 0 + 68 23 2 0.4236 17.65379 8.02465 3.16529 1 0 0 + 69 23 2 0.4236 17.56073 7.59903 4.73904 1 0 0 + 70 24 1 -0.8472 13.45467 10.30195 21.94603 0 0 0 + 71 24 2 0.4236 14.12655 11.01716 21.75366 0 0 0 + 72 24 2 0.4236 13.15542 10.37304 22.89754 0 0 0 + 73 25 1 -0.8472 28.77370 1.83495 6.23711 0 0 0 + 74 25 2 0.4236 29.55410 1.23316 6.06742 0 0 0 + 75 25 2 0.4236 28.43863 1.69170 7.16831 0 0 0 + 76 26 1 -0.8472 21.17410 3.00906 4.56251 0 1 0 + 77 26 2 0.4236 21.00772 2.96011 5.54734 0 1 0 + 78 26 2 0.4236 21.17488 3.96581 4.27178 0 1 0 + 79 27 1 -0.8472 15.86257 20.77629 10.34675 1 -1 0 + 80 27 2 0.4236 15.84751 19.99231 10.96732 1 -1 0 + 81 27 2 0.4236 15.76759 20.45695 9.40393 1 -1 0 + 82 28 1 -0.8472 19.37283 6.41248 28.33230 0 0 0 + 83 28 2 0.4236 19.86925 6.14505 27.50645 0 0 0 + 84 28 2 0.4236 19.23659 7.40311 28.33322 0 0 0 + 85 29 1 -0.8472 19.69874 26.80111 22.56675 -1 -1 0 + 86 29 2 0.4236 20.51873 26.54536 22.05471 -1 -1 0 + 87 29 2 0.4236 19.52519 26.12131 23.27927 -1 -1 0 + 88 30 1 -0.8472 10.44934 1.95847 4.23874 1 1 0 + 89 30 2 0.4236 10.99436 1.49085 4.93460 1 1 0 + 90 30 2 0.4236 10.84502 2.85816 4.05448 1 1 0 + 91 31 1 -0.8472 6.35411 29.19722 23.17920 0 0 0 + 92 31 2 0.4236 5.50252 29.65394 23.43641 0 0 0 + 93 31 2 0.4236 7.01350 29.87731 22.85887 0 0 0 + 94 32 1 -0.8472 27.70305 33.63868 1.45545 0 0 0 + 95 32 2 0.4236 27.45511 34.56848 1.72731 0 0 0 + 96 32 2 0.4236 28.23820 33.21008 2.18338 0 0 0 + 97 33 1 -0.8472 34.54150 25.90721 10.97268 0 0 0 + 98 33 2 0.4236 34.26945 25.07242 10.49403 0 0 0 + 99 33 2 0.4236 34.74630 26.62266 10.30478 0 0 0 + 100 34 1 -0.8472 35.13701 10.35159 32.75388 -1 0 0 + 101 34 2 0.4236 35.31674 9.89658 31.88174 -1 0 0 + 102 34 2 0.4236 35.40693 9.74994 33.50557 -1 0 0 + 103 35 1 -0.8472 19.45549 25.22953 13.06888 1 0 0 + 104 35 2 0.4236 18.63554 25.79082 12.95680 1 0 0 + 105 35 2 0.4236 19.57263 24.64638 12.26505 1 0 0 + 106 36 1 -0.8472 8.76637 34.60601 24.20146 0 0 0 + 107 36 2 0.4236 9.50956 34.70873 24.86259 0 0 0 + 108 36 2 0.4236 9.11640 34.17220 23.37125 0 0 0 + 109 37 1 -0.8472 18.52185 34.00287 24.76220 0 0 0 + 110 37 2 0.4236 19.50193 33.87409 24.61123 0 0 0 + 111 37 2 0.4236 18.00811 33.44318 24.11196 0 0 0 + 112 38 1 -0.8472 5.46879 16.75651 12.09359 0 -1 0 + 113 38 2 0.4236 5.19937 17.67659 11.80934 0 -1 0 + 114 38 2 0.4236 5.65240 16.75172 13.07654 0 -1 0 +115 39 1 -0.8472 26.78187 26.54273 35.17124 1 0 0 +116 39 2 0.4236 27.38399 26.93341 0.42029 1 0 1 +117 39 2 0.4236 27.18089 25.69431 34.82353 1 0 0 + 118 40 1 -0.8472 14.04248 15.27305 12.41517 0 0 0 + 119 40 2 0.4236 14.36157 15.76500 13.22517 0 0 0 + 120 40 2 0.4236 14.30963 15.77579 11.59307 0 0 0 + 121 41 1 -0.8472 6.75576 6.34672 6.04938 1 1 0 + 122 41 2 0.4236 7.58170 5.78427 6.08735 1 1 0 + 123 41 2 0.4236 5.98388 5.83092 6.42094 1 1 0 + 124 42 1 -0.8472 10.86576 34.93065 25.98166 0 0 0 + 125 42 2 0.4236 10.69405 35.32452 26.88460 0 0 0 + 126 42 2 0.4236 11.59169 35.44574 25.52591 0 0 0 + 127 43 1 -0.8472 18.34531 30.51202 26.27445 0 0 0 + 128 43 2 0.4236 18.04166 30.29551 25.34662 0 0 0 + 129 43 2 0.4236 19.17552 31.06784 26.23227 0 0 0 + 130 44 1 -0.8472 13.18486 0.77946 20.62491 -1 1 0 + 131 44 2 0.4236 13.44906 0.56426 21.56501 -1 1 0 + 132 44 2 0.4236 12.29152 0.37510 20.42885 -1 1 0 + 133 45 1 -0.8472 24.47790 24.05885 28.20937 -1 0 0 + 134 45 2 0.4236 24.15706 23.14172 27.97301 -1 0 0 + 135 45 2 0.4236 23.74391 24.71952 28.05213 -1 0 0 +136 46 1 -0.8472 30.79103 15.33785 34.86738 0 0 0 +137 46 2 0.4236 31.17614 15.32312 0.34290 0 0 1 +138 46 2 0.4236 29.97833 14.75605 34.83605 0 0 0 + 139 47 1 -0.8472 18.30892 19.76908 34.23734 0 0 0 + 140 47 2 0.4236 17.75981 20.19846 33.52035 0 0 0 + 141 47 2 0.4236 19.04827 19.24096 33.81970 0 0 0 + 142 48 1 -0.8472 24.18923 16.21113 25.53917 0 0 0 + 143 48 2 0.4236 24.35093 17.17602 25.33219 0 0 0 + 144 48 2 0.4236 24.25573 16.06630 26.52637 0 0 0 + 145 49 1 -0.8472 9.29176 8.02479 32.23837 -1 -1 0 + 146 49 2 0.4236 10.25650 7.88688 32.46243 -1 -1 0 + 147 49 2 0.4236 8.95956 7.24816 31.70319 -1 -1 0 + 148 50 1 -0.8472 5.32982 1.15354 27.64551 0 0 0 + 149 50 2 0.4236 4.51900 0.59091 27.48437 0 0 0 + 150 50 2 0.4236 5.05010 2.09452 27.83594 0 0 0 + 151 51 1 -0.8472 22.89850 21.33836 11.63894 1 0 0 + 152 51 2 0.4236 23.24391 20.51986 12.09802 1 0 0 + 153 51 2 0.4236 22.43572 21.07543 10.79239 1 0 0 + 154 52 1 -0.8472 16.88462 32.60779 23.16332 -1 0 0 + 155 52 2 0.4236 15.90624 32.80151 23.09101 -1 0 0 + 156 52 2 0.4236 17.01667 31.65114 23.42276 -1 0 0 + 157 53 1 -0.8472 29.24409 7.09722 23.70701 -1 0 0 + 158 53 2 0.4236 28.47748 7.53121 24.18023 -1 0 0 + 159 53 2 0.4236 29.54220 7.68009 22.95113 -1 0 0 + 160 54 1 -0.8472 34.29952 6.85677 2.08156 -1 0 0 + 161 54 2 0.4236 34.97347 6.89704 1.34390 -1 0 0 + 162 54 2 0.4236 33.70962 7.66305 2.03849 -1 0 0 + 163 55 1 -0.8472 32.95408 29.26891 19.25970 -1 -1 0 + 164 55 2 0.4236 32.57416 28.37248 19.48784 -1 -1 0 + 165 55 2 0.4236 33.66659 29.16225 18.56621 -1 -1 0 + 166 56 1 -0.8472 9.78186 33.73160 21.96701 0 -1 0 + 167 56 2 0.4236 9.24351 33.11436 21.39330 0 -1 0 + 168 56 2 0.4236 10.15276 34.47066 21.40475 0 -1 0 + 169 57 1 -0.8472 7.86139 6.97451 8.72713 0 0 0 + 170 57 2 0.4236 8.16632 6.08021 9.05452 0 0 0 + 171 57 2 0.4236 7.15204 6.85123 8.03315 0 0 0 + 172 58 1 -0.8472 34.25223 27.81706 31.79312 -1 -1 0 + 173 58 2 0.4236 34.70046 28.60821 31.37704 -1 -1 0 + 174 58 2 0.4236 33.75216 28.10807 32.60872 -1 -1 0 + 175 59 1 -0.8472 34.94048 26.84844 19.52041 -1 -1 0 + 176 59 2 0.4236 35.40459 26.00577 19.79339 -1 -1 0 + 177 59 2 0.4236 34.15050 26.62404 18.94986 -1 -1 0 + 178 60 1 -0.8472 21.76411 32.20568 20.89158 0 0 0 + 179 60 2 0.4236 22.66239 31.82480 21.11072 0 0 0 + 180 60 2 0.4236 21.76667 33.18956 21.07031 0 0 0 + 181 61 1 -0.8472 34.30787 3.43694 14.24158 -1 0 0 + 182 61 2 0.4236 34.88829 2.82261 13.70711 -1 0 0 + 183 61 2 0.4236 34.87977 4.10183 14.72200 -1 0 0 + 184 62 1 -0.8472 17.88110 18.91029 14.42187 0 1 0 + 185 62 2 0.4236 17.92538 18.97676 15.41864 0 1 0 + 186 62 2 0.4236 18.59574 19.48109 14.01766 0 1 0 + 187 63 1 -0.8472 19.08402 14.22906 20.78379 0 0 0 + 188 63 2 0.4236 19.62169 13.82628 21.52446 0 0 0 + 189 63 2 0.4236 18.62450 13.50292 20.27246 0 0 0 + 190 64 1 -0.8472 7.85997 17.97828 9.48138 1 0 0 + 191 64 2 0.4236 7.51843 18.85870 9.15243 1 0 0 + 192 64 2 0.4236 8.12328 17.41050 8.70147 1 0 0 + 193 65 1 -0.8472 0.30367 23.18327 0.38100 1 -1 0 + 194 65 2 0.4236 35.34479 24.06840 0.38922 0 -1 0 + 195 65 2 0.4236 35.13158 22.44974 0.42108 0 -1 0 + 196 66 1 -0.8472 4.53675 21.21621 29.86203 1 0 0 + 197 66 2 0.4236 5.08827 22.03780 29.71779 1 0 0 + 198 66 2 0.4236 5.02017 20.59411 30.47781 1 0 0 + 199 67 1 -0.8472 3.76321 1.66558 34.11622 0 0 0 + 200 67 2 0.4236 4.72980 1.83277 33.92193 0 0 0 + 201 67 2 0.4236 3.56027 1.93821 35.05667 0 0 0 + 202 68 1 -0.8472 35.17951 34.70220 7.53093 0 0 0 + 203 68 2 0.4236 34.22070 34.47397 7.36203 0 0 0 + 204 68 2 0.4236 0.09341 33.98533 8.08720 1 0 0 + 205 69 1 -0.8472 24.82000 8.21485 16.09338 0 0 0 + 206 69 2 0.4236 25.55821 8.87272 15.94450 0 0 0 + 207 69 2 0.4236 25.00950 7.68219 16.91816 0 0 0 + 208 70 1 -0.8472 4.18282 28.52828 29.70840 1 0 0 + 209 70 2 0.4236 5.11675 28.38566 30.03614 1 0 0 + 210 70 2 0.4236 4.20438 29.05790 28.86047 1 0 0 + 211 71 1 -0.8472 26.43717 31.27303 3.91741 -1 0 0 + 212 71 2 0.4236 26.51838 30.56852 3.21243 -1 0 0 + 213 71 2 0.4236 27.32007 31.72670 4.03853 -1 0 0 + 214 72 1 -0.8472 35.11244 7.70363 27.08017 -1 0 0 + 215 72 2 0.4236 35.17419 7.38841 28.02717 -1 0 0 + 216 72 2 0.4236 34.54388 7.07077 26.55463 -1 0 0 + 217 73 1 -0.8472 21.45404 34.05655 2.90167 0 0 0 + 218 73 2 0.4236 21.02487 33.76274 3.75574 0 0 0 + 219 73 2 0.4236 22.28101 34.57992 3.10701 0 0 0 + 220 74 1 -0.8472 31.21242 3.31299 25.80396 -1 1 0 + 221 74 2 0.4236 30.72513 4.00625 25.27307 -1 1 0 + 222 74 2 0.4236 31.51511 3.70889 26.67093 -1 1 0 + 223 75 1 -0.8472 7.36998 1.04818 25.83115 0 0 0 + 224 75 2 0.4236 7.49443 0.23812 25.25822 0 0 0 + 225 75 2 0.4236 6.65222 0.87278 26.50493 0 0 0 + 226 76 1 -0.8472 30.34479 6.09271 15.73480 -1 1 0 + 227 76 2 0.4236 30.87025 5.55980 15.07161 -1 1 0 + 228 76 2 0.4236 30.41783 5.66752 16.63693 -1 1 0 + 229 77 1 -0.8472 34.94002 25.15376 32.03668 -1 0 0 + 230 77 2 0.4236 34.65462 24.57426 32.80000 -1 0 0 + 231 77 2 0.4236 34.57715 26.07671 32.16507 -1 0 0 + 232 78 1 -0.8472 0.48609 26.41083 7.95690 1 0 0 + 233 78 2 0.4236 35.24442 26.06137 7.39276 0 0 0 + 234 78 2 0.4236 0.34398 27.38491 8.13268 1 0 0 + 235 79 1 -0.8472 28.55527 15.83548 29.53063 0 0 0 + 236 79 2 0.4236 28.35434 16.81126 29.61648 0 0 0 + 237 79 2 0.4236 29.51472 15.71387 29.27644 0 0 0 + 238 80 1 -0.8472 18.14783 14.69040 4.78991 0 0 0 + 239 80 2 0.4236 18.53030 15.52266 5.19110 0 0 0 + 240 80 2 0.4236 17.28957 14.90833 4.32534 0 0 0 + 241 81 1 -0.8472 23.98866 17.79905 4.00089 0 0 0 + 242 81 2 0.4236 24.91076 17.80239 3.61409 0 0 0 + 243 81 2 0.4236 23.56034 16.91103 3.83379 0 0 0 + 244 82 1 -0.8472 27.78613 18.39989 29.82640 0 0 0 + 245 82 2 0.4236 27.08378 18.93614 30.29448 0 0 0 + 246 82 2 0.4236 28.35313 19.00694 29.26967 0 0 0 + 247 83 1 -0.8472 32.55865 20.99313 23.15964 -1 0 0 + 248 83 2 0.4236 33.14482 20.54010 22.48798 -1 0 0 + 249 83 2 0.4236 32.46068 21.95876 22.91902 -1 0 0 + 250 84 1 -0.8472 0.52838 10.68840 20.51354 1 0 0 + 251 84 2 0.4236 35.18409 10.69540 21.03922 0 0 0 + 252 84 2 0.4236 1.10279 11.45563 20.79882 1 0 0 + 253 85 1 -0.8472 24.98681 7.82783 20.94061 0 0 0 + 254 85 2 0.4236 25.90983 7.94912 20.57557 0 0 0 + 255 85 2 0.4236 24.31734 8.12211 20.25857 0 0 0 + 256 86 1 -0.8472 22.84393 20.12521 4.77949 -1 0 0 + 257 86 2 0.4236 23.21948 19.20137 4.85318 -1 0 0 + 258 86 2 0.4236 23.56755 20.75818 4.50442 -1 0 0 + 259 87 1 -0.8472 33.53546 10.01481 10.45635 0 1 0 + 260 87 2 0.4236 32.83119 9.35450 10.71703 0 1 0 + 261 87 2 0.4236 34.10172 10.22977 11.25204 0 1 0 + 262 88 1 -0.8472 16.00583 10.01890 6.93528 0 0 0 + 263 88 2 0.4236 16.41480 10.74688 6.38507 0 0 0 + 264 88 2 0.4236 15.01766 10.16046 6.99384 0 0 0 + 265 89 1 -0.8472 29.81145 30.32235 24.40624 0 0 0 + 266 89 2 0.4236 29.91989 30.02878 25.35598 0 0 0 + 267 89 2 0.4236 29.93572 29.53794 23.79868 0 0 0 + 268 90 1 -0.8472 4.63663 9.89409 32.09045 0 0 0 + 269 90 2 0.4236 4.00394 9.69969 31.34088 0 0 0 + 270 90 2 0.4236 5.49457 9.40350 31.93817 0 0 0 + 271 91 1 -0.8472 32.85747 18.79237 15.26420 -1 0 0 + 272 91 2 0.4236 33.07562 17.88380 15.62037 -1 0 0 + 273 91 2 0.4236 33.39393 19.47988 15.75358 -1 0 0 + 274 92 1 -0.8472 0.61908 7.95150 15.25321 1 1 0 + 275 92 2 0.4236 0.05994 7.85361 16.07647 1 1 0 + 276 92 2 0.4236 35.53017 8.04513 14.45519 0 1 0 + 277 93 1 -0.8472 2.41100 1.86682 23.94422 0 0 0 + 278 93 2 0.4236 2.46310 1.85101 22.94575 0 0 0 + 279 93 2 0.4236 2.78298 1.01413 24.31096 0 0 0 + 280 94 1 -0.8472 35.13183 4.79424 16.91501 0 1 0 + 281 94 2 0.4236 34.79462 5.73186 16.83068 0 1 0 + 282 94 2 0.4236 34.48810 4.25622 17.45916 0 1 0 + 283 95 1 -0.8472 0.97118 31.04426 15.17959 1 0 0 + 284 95 2 0.4236 35.51597 31.29963 15.28033 0 0 0 + 285 95 2 0.4236 1.24465 30.46576 15.94801 1 0 0 + 286 96 1 -0.8472 2.19969 4.72227 17.02777 0 0 0 + 287 96 2 0.4236 2.38681 5.64899 17.35356 0 0 0 + 288 96 2 0.4236 1.21985 4.62094 16.85574 0 0 0 + 289 97 1 -0.8472 11.32464 9.43507 18.23393 0 0 0 + 290 97 2 0.4236 11.35628 9.66113 17.26037 0 0 0 + 291 97 2 0.4236 10.41863 9.65219 18.59726 0 0 0 + 292 98 1 -0.8472 1.17633 29.87451 2.30651 1 -1 0 + 293 98 2 0.4236 0.77781 30.54458 1.68034 1 -1 0 + 294 98 2 0.4236 2.08692 30.17937 2.58550 1 -1 0 + 295 99 1 -0.8472 30.89603 1.46693 1.97982 -1 0 0 + 296 99 2 0.4236 31.66382 1.01488 2.43382 -1 0 0 + 297 99 2 0.4236 30.67056 0.97609 1.13828 -1 0 0 + 298 100 1 -0.8472 5.03295 1.93998 10.31545 1 0 0 + 299 100 2 0.4236 4.31256 1.98624 11.00745 1 0 0 + 300 100 2 0.4236 4.62804 2.03388 9.40598 1 0 0 + 301 101 1 -0.8472 12.08877 2.72082 8.77105 0 0 0 + 302 101 2 0.4236 11.73932 2.99595 9.66666 0 0 0 + 303 101 2 0.4236 12.21940 3.53177 8.20074 0 0 0 + 304 102 1 -0.8472 33.01497 6.97472 32.69727 0 1 0 + 305 102 2 0.4236 32.33382 6.98790 31.96528 0 1 0 + 306 102 2 0.4236 33.92894 7.07439 32.30391 0 1 0 + 307 103 1 -0.8472 24.19758 6.71414 6.62083 0 0 0 + 308 103 2 0.4236 24.48496 5.94255 6.05339 0 0 0 + 309 103 2 0.4236 23.34354 7.09140 6.26267 0 0 0 + 310 104 1 -0.8472 11.20786 33.66002 13.73986 0 0 0 + 311 104 2 0.4236 11.08611 33.96434 12.79516 0 0 0 + 312 104 2 0.4236 12.16057 33.79345 14.01284 0 0 0 + 313 105 1 -0.8472 9.04560 20.24739 13.13311 0 0 0 + 314 105 2 0.4236 8.82766 19.47789 13.73338 0 0 0 + 315 105 2 0.4236 9.27855 19.90464 12.22304 0 0 0 + 316 106 1 -0.8472 8.42921 16.29486 7.43324 1 0 0 + 317 106 2 0.4236 9.19124 15.72058 7.13424 1 0 0 + 318 106 2 0.4236 7.64285 15.71749 7.65276 1 0 0 + 319 107 1 -0.8472 8.18016 30.95703 14.07257 0 -1 0 + 320 107 2 0.4236 7.61764 30.47123 14.74149 0 -1 0 + 321 107 2 0.4236 7.67505 31.74583 13.72246 0 -1 0 + 322 108 1 -0.8472 17.76414 27.72204 30.17860 -1 0 0 + 323 108 2 0.4236 17.65280 28.63562 29.78755 -1 0 0 + 324 108 2 0.4236 17.44856 27.72492 31.12746 -1 0 0 + 325 109 1 -0.8472 17.45769 25.85512 16.78307 0 1 0 + 326 109 2 0.4236 18.01645 26.62724 17.08576 0 1 0 + 327 109 2 0.4236 17.96426 25.00368 16.91877 0 1 0 + 328 110 1 -0.8472 28.59997 12.45467 18.30443 0 0 0 + 329 110 2 0.4236 28.86886 12.50061 17.34240 0 0 0 + 330 110 2 0.4236 28.32838 13.36441 18.61842 0 0 0 + 331 111 1 -0.8472 20.03964 19.60707 21.61488 0 -1 0 + 332 111 2 0.4236 19.21429 19.35873 22.12192 0 -1 0 + 333 111 2 0.4236 20.56705 20.27317 22.14227 0 -1 0 + 334 112 1 -0.8472 24.43021 31.08112 15.27434 0 0 0 + 335 112 2 0.4236 24.67230 31.05676 14.30439 0 0 0 + 336 112 2 0.4236 23.62159 31.65540 15.40173 0 0 0 + 337 113 1 -0.8472 14.03481 4.28377 28.23021 0 1 0 + 338 113 2 0.4236 13.71830 5.06061 27.68592 0 1 0 + 339 113 2 0.4236 14.81307 3.85222 27.77408 0 1 0 + 340 114 1 -0.8472 3.18866 1.92022 1.25228 0 1 0 + 341 114 2 0.4236 3.95739 2.04883 1.87873 0 1 0 + 342 114 2 0.4236 2.56934 1.22782 1.62238 0 1 0 + 343 115 1 -0.8472 22.54465 23.60224 9.46826 0 0 0 + 344 115 2 0.4236 22.81528 22.78339 8.96211 0 0 0 + 345 115 2 0.4236 23.34546 23.99391 9.92131 0 0 0 + 346 116 1 -0.8472 6.44525 3.02083 18.87605 1 0 0 + 347 116 2 0.4236 5.96940 2.76314 19.71693 1 0 0 + 348 116 2 0.4236 5.93293 2.68338 18.08636 1 0 0 + 349 117 1 -0.8472 12.31665 10.94306 26.18378 0 0 0 + 350 117 2 0.4236 11.78278 11.60820 26.70581 0 0 0 + 351 117 2 0.4236 12.52820 10.15648 26.76387 0 0 0 + 352 118 1 -0.8472 8.93649 1.70958 18.81431 -1 0 0 + 353 118 2 0.4236 9.43794 2.41836 19.31046 -1 0 0 + 354 118 2 0.4236 8.03395 2.05639 18.55926 -1 0 0 + 355 119 1 -0.8472 2.23387 20.21809 0.67571 0 0 0 + 356 119 2 0.4236 1.96454 19.32973 0.30400 0 0 0 + 357 119 2 0.4236 1.48917 20.87294 0.54693 0 0 0 + 358 120 1 -0.8472 32.34699 18.13646 22.38224 0 0 0 + 359 120 2 0.4236 31.75911 18.90777 22.62608 0 0 0 + 360 120 2 0.4236 32.85409 17.83551 23.18984 0 0 0 + 361 121 1 -0.8472 20.24600 32.09543 18.49475 -1 0 0 + 362 121 2 0.4236 19.37450 32.56379 18.64008 -1 0 0 + 363 121 2 0.4236 20.82295 32.20632 19.30394 -1 0 0 + 364 122 1 -0.8472 32.44396 13.48495 19.54721 0 0 0 + 365 122 2 0.4236 32.49225 14.27437 20.15914 0 0 0 + 366 122 2 0.4236 31.99587 13.75157 18.69393 0 0 0 + 367 123 1 -0.8472 35.26586 18.21614 1.39574 -1 0 0 + 368 123 2 0.4236 0.12239 18.40827 2.30752 0 0 0 + 369 123 2 0.4236 34.49009 17.58963 1.47095 -1 0 0 + 370 124 1 -0.8472 3.39252 26.43728 7.35930 0 1 0 + 371 124 2 0.4236 2.42858 26.42070 7.62480 0 1 0 + 372 124 2 0.4236 3.52347 25.87316 6.54412 0 1 0 + 373 125 1 -0.8472 15.94721 21.75698 15.77077 0 0 0 + 374 125 2 0.4236 16.58200 22.15497 15.10848 0 0 0 + 375 125 2 0.4236 15.22931 21.25758 15.28582 0 0 0 + 376 126 1 -0.8472 20.49377 23.57178 7.41254 0 0 0 + 377 126 2 0.4236 19.70411 23.45223 8.01425 0 0 0 + 378 126 2 0.4236 21.29088 23.83328 7.95669 0 0 0 + 379 127 1 -0.8472 6.64565 4.33685 1.91046 0 1 0 + 380 127 2 0.4236 6.29368 4.91344 1.17318 0 1 0 + 381 127 2 0.4236 7.51811 4.70392 2.23304 0 1 0 + 382 128 1 -0.8472 26.70656 32.89276 9.89051 1 0 0 + 383 128 2 0.4236 26.59749 31.89883 9.88051 1 0 0 + 384 128 2 0.4236 27.36144 33.14912 10.60140 1 0 0 + 385 129 1 -0.8472 5.48704 32.63030 12.93174 0 -1 0 + 386 129 2 0.4236 5.73825 33.49250 13.37160 0 -1 0 + 387 129 2 0.4236 4.53739 32.40792 13.15229 0 -1 0 + 388 130 1 -0.8472 3.37091 5.95470 9.99334 1 1 0 + 389 130 2 0.4236 3.99627 6.57052 10.47252 1 1 0 + 390 130 2 0.4236 3.39679 5.05241 10.42360 1 1 0 + 391 131 1 -0.8472 2.63445 9.37840 30.00842 1 0 0 + 392 131 2 0.4236 2.81625 9.87705 29.16095 1 0 0 + 393 131 2 0.4236 1.69314 9.04098 30.00123 1 0 0 + 394 132 1 -0.8472 0.97785 8.01694 8.99862 1 1 0 + 395 132 2 0.4236 1.85940 8.12605 8.53940 1 1 0 + 396 132 2 0.4236 0.38758 8.79268 8.77566 1 1 0 + 397 133 1 -0.8472 2.73822 11.52983 15.38585 1 1 0 + 398 133 2 0.4236 3.54689 11.84375 15.88332 1 1 0 + 399 133 2 0.4236 2.92713 10.64019 14.97013 1 1 0 + 400 134 1 -0.8472 18.35568 23.16903 17.37047 0 0 0 + 401 134 2 0.4236 17.78374 22.43717 17.00005 0 0 0 + 402 134 2 0.4236 19.06840 23.40230 16.70899 0 0 0 + 403 135 1 -0.8472 9.13053 4.89654 5.72398 1 1 0 + 404 135 2 0.4236 9.75352 5.64004 5.96693 1 1 0 + 405 135 2 0.4236 9.45310 4.04375 6.13467 1 1 0 + 406 136 1 -0.8472 7.31448 35.35133 12.86442 0 0 0 + 407 136 2 0.4236 7.78778 35.16424 13.72519 0 0 0 + 408 136 2 0.4236 6.36291 0.08760 13.05321 0 1 0 + 409 137 1 -0.8472 0.52118 24.39975 19.66486 0 -1 0 + 410 137 2 0.4236 0.83476 23.57085 20.12801 0 -1 0 + 411 137 2 0.4236 0.24832 24.17585 18.72923 0 -1 0 + 412 138 1 -0.8472 11.64306 23.42080 11.52906 0 0 0 + 413 138 2 0.4236 12.61679 23.64677 11.50116 0 0 0 + 414 138 2 0.4236 11.14825 24.13853 12.01894 0 0 0 + 415 139 1 -0.8472 3.45756 3.18529 19.12957 0 0 0 + 416 139 2 0.4236 3.12124 3.74194 18.36997 0 0 0 + 417 139 2 0.4236 3.81274 3.78249 19.84869 0 0 0 + 418 140 1 -0.8472 20.63306 31.64067 26.89364 0 0 0 + 419 140 2 0.4236 21.22839 31.75801 26.09881 0 0 0 + 420 140 2 0.4236 20.82429 32.35914 27.56232 0 0 0 + 421 141 1 -0.8472 27.87238 20.32866 9.33395 0 0 0 + 422 141 2 0.4236 27.02686 20.77238 9.03698 0 0 0 + 423 141 2 0.4236 27.66058 19.63412 10.02149 0 0 0 + 424 142 1 -0.8472 31.29036 11.93464 0.40169 -1 0 0 + 425 142 2 0.4236 31.37881 12.03516 1.39266 -1 0 0 + 426 142 2 0.4236 30.32288 11.95452 0.14970 -1 0 0 + 427 143 1 -0.8472 21.39492 7.42434 2.71837 0 0 0 + 428 143 2 0.4236 22.26919 6.94124 2.67113 0 0 0 + 429 143 2 0.4236 21.01752 7.34108 3.64064 0 0 0 + 430 144 1 -0.8472 20.01912 19.53687 17.16647 0 0 0 + 431 144 2 0.4236 19.03559 19.42765 17.02256 0 0 0 + 432 144 2 0.4236 20.17677 20.10021 17.97747 0 0 0 + 433 145 1 -0.8472 3.61472 34.67433 24.72232 0 -1 0 + 434 145 2 0.4236 3.58465 34.54040 25.71283 0 -1 0 + 435 145 2 0.4236 4.55220 34.54959 24.39742 0 -1 0 + 436 146 1 -0.8472 23.41665 19.55686 18.89810 -1 -1 0 + 437 146 2 0.4236 24.10125 19.00406 18.42300 -1 -1 0 + 438 146 2 0.4236 22.99870 20.19654 18.25307 -1 -1 0 + 439 147 1 -0.8472 13.01993 3.81803 4.38911 1 0 0 + 440 147 2 0.4236 13.38071 3.06814 3.83464 1 0 0 + 441 147 2 0.4236 12.92360 4.63574 3.82163 1 0 0 + 442 148 1 -0.8472 15.28417 28.36986 13.07087 0 -1 0 + 443 148 2 0.4236 15.75033 28.86687 12.33902 0 -1 0 + 444 148 2 0.4236 14.37943 28.08353 12.75556 0 -1 0 + 445 149 1 -0.8472 31.07288 4.64018 29.64410 -1 1 0 + 446 149 2 0.4236 30.89042 5.35240 30.32192 -1 1 0 + 447 149 2 0.4236 31.28496 5.06438 28.76373 -1 1 0 + 448 150 1 -0.8472 18.66998 22.71969 9.28241 0 0 0 + 449 150 2 0.4236 19.43319 22.68014 9.92730 0 0 0 + 450 150 2 0.4236 18.18674 21.84425 9.28383 0 0 0 + 451 151 1 -0.8472 20.67684 4.79499 26.44460 0 0 0 + 452 151 2 0.4236 21.36307 4.90680 25.72591 0 0 0 + 453 151 2 0.4236 19.86562 4.35059 26.06464 0 0 0 + 454 152 1 -0.8472 23.32494 28.59379 34.87592 1 0 0 + 455 152 2 0.4236 22.34422 28.77672 34.80776 1 0 0 + 456 152 2 0.4236 23.47151 27.61801 35.03820 1 0 0 + 457 153 1 -0.8472 19.30434 32.15966 13.01468 0 -1 0 + 458 153 2 0.4236 18.79685 32.17514 13.87616 0 -1 0 + 459 153 2 0.4236 19.74774 33.04469 12.87307 0 -1 0 +460 154 1 -0.8472 34.76355 20.49891 35.24394 -1 0 0 +461 154 2 0.4236 34.80087 20.22981 34.28158 -1 0 0 +462 154 2 0.4236 34.89670 19.69303 0.37358 -1 0 1 + 463 155 1 -0.8472 13.98652 1.37155 3.23039 0 0 0 + 464 155 2 0.4236 13.54990 0.47234 3.25696 0 0 0 + 465 155 2 0.4236 14.88021 1.32142 3.67626 0 0 0 + 466 156 1 -0.8472 24.96125 8.59168 8.51399 0 1 0 + 467 156 2 0.4236 24.90010 7.88536 7.80880 0 1 0 + 468 156 2 0.4236 25.92109 8.74798 8.74688 0 1 0 + 469 157 1 -0.8472 14.17804 14.86661 29.62017 0 1 0 + 470 157 2 0.4236 14.50622 13.96710 29.90836 0 1 0 + 471 157 2 0.4236 13.20875 14.80710 29.38165 0 1 0 + 472 158 1 -0.8472 32.49214 9.01293 2.57301 0 0 0 + 473 158 2 0.4236 31.88516 8.85624 3.35211 0 0 0 + 474 158 2 0.4236 32.99481 9.86668 2.70850 0 0 0 + 475 159 1 -0.8472 33.47883 32.17624 27.46842 0 -1 0 + 476 159 2 0.4236 33.32942 32.21278 28.45647 0 -1 0 + 477 159 2 0.4236 34.06965 31.39983 27.24918 0 -1 0 +478 160 1 -0.8472 31.09621 6.22320 0.75259 0 0 0 +479 160 2 0.4236 31.59348 5.78768 35.44946 0 0 -1 +480 160 2 0.4236 31.36134 7.18545 0.81397 0 0 0 + 481 161 1 -0.8472 14.57216 18.78960 19.08835 1 1 0 + 482 161 2 0.4236 15.51077 18.79497 19.43321 1 1 0 + 483 161 2 0.4236 14.22722 17.85110 19.07534 1 1 0 +484 162 1 -0.8472 34.12274 15.77227 34.76104 0 0 0 +485 162 2 0.4236 34.17490 15.19579 0.12925 0 0 1 +486 162 2 0.4236 33.34160 16.39158 34.84009 0 0 0 + 487 163 1 -0.8472 27.18476 6.31416 11.14438 0 0 0 + 488 163 2 0.4236 27.19357 6.88440 10.32300 0 0 0 + 489 163 2 0.4236 26.82710 6.84346 11.91376 0 0 0 +490 164 1 -0.8472 11.84314 26.77963 35.28640 1 -1 0 +491 164 2 0.4236 10.96567 26.43433 0.17205 1 -1 1 +492 164 2 0.4236 12.49337 26.82363 0.59765 1 -1 1 + 493 165 1 -0.8472 7.69412 20.72079 27.49780 0 0 0 + 494 165 2 0.4236 7.69014 21.70350 27.31291 0 0 0 + 495 165 2 0.4236 7.81598 20.22083 26.64044 0 0 0 + 496 166 1 -0.8472 23.50826 8.78434 32.03012 0 1 0 + 497 166 2 0.4236 23.26862 8.22923 31.23365 0 1 0 + 498 166 2 0.4236 23.39645 8.24013 32.86157 0 1 0 + 499 167 1 -0.8472 15.57156 13.00008 12.60169 -1 1 0 + 500 167 2 0.4236 14.79081 13.54649 12.90466 -1 1 0 + 501 167 2 0.4236 15.45716 12.76130 11.63738 -1 1 0 + 502 168 1 -0.8472 11.29876 27.92926 8.68449 0 0 0 + 503 168 2 0.4236 11.64644 27.07029 8.30868 0 0 0 + 504 168 2 0.4236 11.27909 28.62394 7.96544 0 0 0 + 505 169 1 -0.8472 15.75868 14.55512 3.49819 0 0 0 + 506 169 2 0.4236 16.03520 15.14903 2.74271 0 0 0 + 507 169 2 0.4236 15.61473 13.62638 3.15656 0 0 0 + 508 170 1 -0.8472 29.04153 26.88438 19.85085 0 -1 0 + 509 170 2 0.4236 28.56574 26.75357 18.98108 0 -1 0 + 510 170 2 0.4236 28.97499 27.84337 20.12624 0 -1 0 + 511 171 1 -0.8472 28.02811 8.84491 0.36833 0 1 0 + 512 171 2 0.4236 29.02395 8.89761 0.29466 0 1 0 + 513 171 2 0.4236 27.77104 8.71695 1.32619 0 1 0 + 514 172 1 -0.8472 32.75013 2.39378 21.01859 -1 0 0 + 515 172 2 0.4236 32.14493 1.59871 20.97960 -1 0 0 + 516 172 2 0.4236 33.70131 2.09215 20.95322 -1 0 0 + 517 173 1 -0.8472 16.25250 5.40744 30.72899 -1 0 0 + 518 173 2 0.4236 16.73137 6.28231 30.80113 -1 0 0 + 519 173 2 0.4236 16.60479 4.89842 29.94366 -1 0 0 + 520 174 1 -0.8472 28.57796 22.31517 24.22429 -1 0 0 + 521 174 2 0.4236 28.58470 23.09656 24.84827 -1 0 0 + 522 174 2 0.4236 29.27495 21.65646 24.50755 -1 0 0 + 523 175 1 -0.8472 31.71292 17.98411 9.79888 0 0 0 + 524 175 2 0.4236 32.59827 17.60937 10.07395 0 0 0 + 525 175 2 0.4236 31.02797 17.76528 10.49379 0 0 0 + 526 176 1 -0.8472 28.82118 33.24498 34.59564 0 -1 0 + 527 176 2 0.4236 28.54721 33.97957 33.97493 0 -1 0 + 528 176 2 0.4236 28.33279 33.34188 35.46282 0 -1 0 + 529 177 1 -0.8472 34.60878 19.71536 32.71287 -1 0 0 + 530 177 2 0.4236 34.64592 19.24398 31.83176 -1 0 0 + 531 177 2 0.4236 33.91982 20.43912 32.67487 -1 0 0 + 532 178 1 -0.8472 17.69608 27.65071 3.21742 1 0 0 + 533 178 2 0.4236 18.46713 27.41434 3.80862 1 0 0 + 534 178 2 0.4236 17.78836 28.59848 2.91219 1 0 0 + 535 179 1 -0.8472 26.68813 34.62171 27.49337 -1 0 0 + 536 179 2 0.4236 26.45510 35.44751 28.00690 -1 0 0 + 537 179 2 0.4236 26.59489 34.80084 26.51400 -1 0 0 + 538 180 1 -0.8472 21.33619 26.62475 14.50460 0 0 0 + 539 180 2 0.4236 20.69573 26.16271 13.89115 0 0 0 + 540 180 2 0.4236 22.25918 26.57281 14.12340 0 0 0 + 541 181 1 -0.8472 0.36454 14.16600 2.11556 1 1 0 + 542 181 2 0.4236 0.97624 14.65982 1.49757 1 1 0 + 543 181 2 0.4236 35.11443 13.77344 1.59245 0 1 0 + 544 182 1 -0.8472 23.79319 1.57159 23.81505 0 1 0 + 545 182 2 0.4236 23.00502 1.11432 24.22691 0 1 0 + 546 182 2 0.4236 23.48929 2.12744 23.04135 0 1 0 + 547 183 1 -0.8472 8.54975 33.46239 4.50736 0 0 0 + 548 183 2 0.4236 9.38674 33.19180 4.03176 0 0 0 + 549 183 2 0.4236 7.78193 33.44464 3.86700 0 0 0 + 550 184 1 -0.8472 33.97496 22.17620 28.93863 0 0 0 + 551 184 2 0.4236 33.73550 23.05012 29.36155 0 0 0 + 552 184 2 0.4236 34.53692 22.34106 28.12813 0 0 0 + 553 185 1 -0.8472 14.49504 4.44877 8.81426 0 0 0 + 554 185 2 0.4236 14.11718 4.62743 7.90582 0 0 0 + 555 185 2 0.4236 15.42318 4.81711 8.86750 0 0 0 + 556 186 1 -0.8472 33.79611 24.01791 9.18291 -1 0 0 + 557 186 2 0.4236 33.97006 23.08648 8.86336 -1 0 0 + 558 186 2 0.4236 33.55971 24.59880 8.40407 -1 0 0 + 559 187 1 -0.8472 16.22846 19.00342 12.26604 0 0 0 + 560 187 2 0.4236 16.94871 18.98450 12.95946 0 0 0 + 561 187 2 0.4236 15.35887 18.73631 12.68134 0 0 0 + 562 188 1 -0.8472 31.00840 33.57317 32.25266 -1 -1 0 + 563 188 2 0.4236 30.94716 33.24371 33.19481 -1 -1 0 + 564 188 2 0.4236 30.29274 33.14344 31.70212 -1 -1 0 + 565 189 1 -0.8472 2.10006 7.03828 25.49380 0 -1 0 + 566 189 2 0.4236 1.34846 7.26527 26.11306 0 -1 0 + 567 189 2 0.4236 2.26908 6.05309 25.52187 0 -1 0 +568 190 1 -0.8472 20.39048 7.66788 35.45350 1 1 0 +569 190 2 0.4236 20.32745 7.14917 0.85891 1 1 1 +570 190 2 0.4236 21.31606 7.58937 35.08326 1 1 0 + 571 191 1 -0.8472 29.27392 19.03193 27.68532 -1 0 0 + 572 191 2 0.4236 28.40799 18.61701 27.40610 -1 0 0 + 573 191 2 0.4236 30.00918 18.69729 27.09597 -1 0 0 + 574 192 1 -0.8472 13.93940 22.66146 17.38525 -1 0 0 + 575 192 2 0.4236 14.79020 22.51805 16.87977 -1 0 0 + 576 192 2 0.4236 14.02994 23.46909 17.96790 -1 0 0 + 577 193 1 -0.8472 25.12845 22.92439 17.53845 0 -1 0 + 578 193 2 0.4236 24.27881 22.39854 17.57699 0 -1 0 + 579 193 2 0.4236 25.76341 22.58310 18.23148 0 -1 0 + 580 194 1 -0.8472 14.81424 28.36357 3.79200 0 -1 0 + 581 194 2 0.4236 15.79031 28.28929 3.58772 0 -1 0 + 582 194 2 0.4236 14.69331 28.63885 4.74570 0 -1 0 + 583 195 1 -0.8472 9.41760 1.55572 11.44122 0 0 0 + 584 195 2 0.4236 9.09058 1.02170 12.22084 0 0 0 + 585 195 2 0.4236 9.03168 1.18373 10.59704 0 0 0 + 586 196 1 -0.8472 0.58572 35.29558 12.11489 0 -2 0 + 587 196 2 0.4236 1.04027 34.42603 11.92181 0 -2 0 + 588 196 2 0.4236 35.34646 35.43381 11.46305 -1 -2 0 + 589 197 1 -0.8472 24.99565 27.11368 22.85908 -1 0 0 + 590 197 2 0.4236 24.94466 26.62404 23.72948 -1 0 0 + 591 197 2 0.4236 24.97275 28.09884 23.02901 -1 0 0 + 592 198 1 -0.8472 28.09827 27.08137 14.36745 -1 -1 0 + 593 198 2 0.4236 28.14567 26.09053 14.49365 -1 -1 0 + 594 198 2 0.4236 28.79796 27.36787 13.71303 -1 -1 0 + 595 199 1 -0.8472 29.44158 8.93119 21.38827 0 1 0 + 596 199 2 0.4236 29.92798 9.47643 20.70555 0 1 0 + 597 199 2 0.4236 28.77321 8.34420 20.93150 0 1 0 + 598 200 1 -0.8472 5.82233 14.89623 2.82244 0 0 0 + 599 200 2 0.4236 5.70821 13.97491 3.19408 0 0 0 + 600 200 2 0.4236 5.10567 15.07479 2.14829 0 0 0 + 601 201 1 -0.8472 31.11315 8.01659 27.88429 0 1 0 + 602 201 2 0.4236 31.51235 8.74883 27.33255 0 1 0 + 603 201 2 0.4236 30.79916 7.28065 27.28448 0 1 0 + 604 202 1 -0.8472 24.92095 28.59181 25.96921 0 0 0 + 605 202 2 0.4236 25.90902 28.48362 25.85968 0 0 0 + 606 202 2 0.4236 24.73202 29.09078 26.81495 0 0 0 + 607 203 1 -0.8472 34.86059 10.30036 12.87353 0 0 0 + 608 203 2 0.4236 34.64887 9.32336 12.89739 0 0 0 + 609 203 2 0.4236 34.24783 10.78945 13.49425 0 0 0 + 610 204 1 -0.8472 10.31573 24.57994 6.57007 0 0 0 + 611 204 2 0.4236 9.42999 24.66399 7.02652 0 0 0 + 612 204 2 0.4236 10.17346 24.38675 5.59931 0 0 0 + 613 205 1 -0.8472 4.30063 0.28530 18.84890 0 1 0 + 614 205 2 0.4236 3.76992 0.99348 19.31450 0 1 0 + 615 205 2 0.4236 4.35052 0.49419 17.87226 0 1 0 + 616 206 1 -0.8472 8.41827 15.48929 34.91520 1 1 0 + 617 206 2 0.4236 8.57237 16.15336 34.18361 1 1 0 + 618 206 2 0.4236 8.04251 14.64754 34.52759 1 1 0 + 619 207 1 -0.8472 6.19035 7.54030 24.21894 0 0 0 + 620 207 2 0.4236 5.98782 8.51233 24.33762 0 0 0 + 621 207 2 0.4236 6.98218 7.43584 23.61726 0 0 0 + 622 208 1 -0.8472 1.08041 14.41014 23.75419 -1 0 0 + 623 208 2 0.4236 0.61056 15.08927 23.19030 -1 0 0 + 624 208 2 0.4236 0.47286 13.63227 23.91466 -1 0 0 + 625 209 1 -0.8472 31.67035 8.22586 14.08427 -1 0 0 + 626 209 2 0.4236 31.10235 7.76414 14.76556 -1 0 0 + 627 209 2 0.4236 31.37149 9.17541 13.98941 -1 0 0 + 628 210 1 -0.8472 4.32304 13.16675 34.02448 1 0 0 + 629 210 2 0.4236 4.93961 13.82550 33.59337 1 0 0 + 630 210 2 0.4236 3.51145 13.04635 33.45283 1 0 0 + 631 211 1 -0.8472 22.65976 11.99198 8.47744 0 1 0 + 632 211 2 0.4236 22.58083 11.20406 9.08809 0 1 0 + 633 211 2 0.4236 22.40561 11.72100 7.54908 0 1 0 + 634 212 1 -0.8472 12.56499 8.92537 31.88900 -1 0 0 + 635 212 2 0.4236 12.96543 8.59761 32.74470 -1 0 0 + 636 212 2 0.4236 12.39885 8.14974 31.28016 -1 0 0 + 637 213 1 -0.8472 7.37183 21.64222 6.22392 1 0 0 + 638 213 2 0.4236 7.16919 22.55931 5.88065 1 0 0 + 639 213 2 0.4236 7.30951 20.98418 5.47358 1 0 0 + 640 214 1 -0.8472 27.00762 16.63398 8.08993 -1 0 0 + 641 214 2 0.4236 26.39609 16.89271 8.83762 -1 0 0 + 642 214 2 0.4236 27.41015 15.73918 8.28309 -1 0 0 + 643 215 1 -0.8472 7.19611 3.79417 31.59334 -1 1 0 + 644 215 2 0.4236 7.16103 3.74933 30.59497 -1 1 0 + 645 215 2 0.4236 8.13759 3.95988 31.88666 -1 1 0 + 646 216 1 -0.8472 30.15909 16.21000 7.44433 -1 1 0 + 647 216 2 0.4236 30.11627 17.16629 7.73351 -1 1 0 + 648 216 2 0.4236 29.26380 15.92488 7.10209 -1 1 0 + 649 217 1 -0.8472 10.21667 4.39970 31.89677 1 0 0 + 650 217 2 0.4236 10.61047 4.91898 31.13834 1 0 0 + 651 217 2 0.4236 10.85283 4.40222 32.66827 1 0 0 + 652 218 1 -0.8472 27.50584 28.38786 25.68326 -1 -1 0 + 653 218 2 0.4236 28.38796 27.92670 25.77862 -1 -1 0 + 654 218 2 0.4236 27.53933 29.27126 26.15063 -1 -1 0 + 655 219 1 -0.8472 19.05430 11.89931 31.26655 0 0 0 + 656 219 2 0.4236 18.26304 12.04698 30.67327 0 0 0 + 657 219 2 0.4236 18.74274 11.61302 32.17258 0 0 0 + 658 220 1 -0.8472 3.86618 28.09390 13.01872 0 0 0 + 659 220 2 0.4236 4.51190 27.43345 12.63558 0 0 0 + 660 220 2 0.4236 3.79034 28.88012 12.40552 0 0 0 + 661 221 1 -0.8472 26.59923 23.34113 29.55810 -1 0 0 + 662 221 2 0.4236 25.78847 23.65064 29.06127 -1 0 0 + 663 221 2 0.4236 26.80200 22.39435 29.30823 -1 0 0 + 664 222 1 -0.8472 27.68945 7.40971 19.86110 0 1 0 + 665 222 2 0.4236 27.80506 6.60329 20.44098 0 1 0 + 666 222 2 0.4236 27.26625 7.14029 18.99604 0 1 0 + 667 223 1 -0.8472 20.05157 4.56036 1.84594 1 1 0 + 668 223 2 0.4236 19.09425 4.38304 2.07401 1 1 0 + 669 223 2 0.4236 20.43859 5.20207 2.50804 1 1 0 + 670 224 1 -0.8472 32.60186 15.47413 21.29596 0 0 0 + 671 224 2 0.4236 32.41360 16.44824 21.42099 0 0 0 + 672 224 2 0.4236 32.59763 15.01702 22.18537 0 0 0 + 673 225 1 -0.8472 29.05431 5.06576 32.53287 -1 0 0 + 674 225 2 0.4236 28.15604 4.90289 32.12476 -1 0 0 + 675 225 2 0.4236 28.98490 5.79843 33.20987 -1 0 0 + 676 226 1 -0.8472 18.30583 3.04311 8.64163 0 1 0 + 677 226 2 0.4236 18.05345 4.01062 8.65401 0 1 0 + 678 226 2 0.4236 17.52270 2.49818 8.34211 0 1 0 + 679 227 1 -0.8472 34.73675 1.91251 8.11982 0 0 0 + 680 227 2 0.4236 35.36485 2.28659 7.43753 0 0 0 + 681 227 2 0.4236 34.59568 0.93821 7.94428 0 0 0 + 682 228 1 -0.8472 20.95258 29.30857 14.69084 -1 0 0 + 683 228 2 0.4236 21.18298 28.34078 14.58939 -1 0 0 + 684 228 2 0.4236 19.96366 29.40579 14.80271 -1 0 0 + 685 229 1 -0.8472 31.90522 26.19768 33.54499 -1 -1 0 + 686 229 2 0.4236 32.28670 27.11432 33.42592 -1 -1 0 + 687 229 2 0.4236 31.85789 25.98042 34.51993 -1 -1 0 + 688 230 1 -0.8472 2.97458 9.05586 14.30805 0 1 0 + 689 230 2 0.4236 2.89178 8.93222 13.31921 0 1 0 + 690 230 2 0.4236 2.13650 8.74237 14.75447 0 1 0 + 691 231 1 -0.8472 34.24545 3.69756 9.97076 0 0 0 + 692 231 2 0.4236 34.61539 3.02013 9.33498 0 0 0 + 693 231 2 0.4236 33.24679 3.64650 9.96832 0 0 0 + 694 232 1 -0.8472 19.84819 0.14555 18.90147 0 0 0 + 695 232 2 0.4236 20.70006 0.66545 18.83855 0 0 0 + 696 232 2 0.4236 19.07092 0.77369 18.86563 0 0 0 + 697 233 1 -0.8472 32.25840 30.83726 10.92443 0 -1 0 + 698 233 2 0.4236 32.58236 31.71455 10.57039 0 -1 0 + 699 233 2 0.4236 32.93405 30.46448 11.56043 0 -1 0 + 700 234 1 -0.8472 27.01784 17.94590 11.23453 0 0 0 + 701 234 2 0.4236 26.81191 18.37645 12.11326 0 0 0 + 702 234 2 0.4236 28.00904 17.89236 11.11376 0 0 0 + 703 235 1 -0.8472 20.22992 35.23458 14.58694 0 -1 0 + 704 235 2 0.4236 20.57845 34.95937 13.69095 0 -1 0 + 705 235 2 0.4236 20.52427 34.57303 15.27660 0 -1 0 + 706 236 1 -0.8472 28.13686 28.87373 1.33657 -1 -1 0 + 707 236 2 0.4236 27.46398 29.26717 0.71018 -1 -1 0 + 708 236 2 0.4236 28.92013 28.53560 0.81488 -1 -1 0 + 709 237 1 -0.8472 19.05398 9.09800 19.78995 0 0 0 + 710 237 2 0.4236 18.05441 9.10305 19.81771 0 0 0 + 711 237 2 0.4236 19.38916 10.03413 19.68354 0 0 0 + 712 238 1 -0.8472 28.90831 11.67910 7.13534 -1 0 0 + 713 238 2 0.4236 29.80783 11.81981 6.72185 -1 0 0 + 714 238 2 0.4236 28.34177 11.12904 6.52182 -1 0 0 + 715 239 1 -0.8472 15.67854 27.80087 20.40915 1 -1 0 + 716 239 2 0.4236 15.96525 28.55811 19.82235 1 -1 0 + 717 239 2 0.4236 16.44143 27.16584 20.53048 1 -1 0 + 718 240 1 -0.8472 11.47125 8.69000 1.78828 0 0 0 + 719 240 2 0.4236 10.66305 9.18052 2.11417 0 0 0 + 720 240 2 0.4236 11.21383 8.08927 1.03142 0 0 0 + 721 241 1 -0.8472 35.28908 10.28448 26.21504 -1 0 0 + 722 241 2 0.4236 35.21125 9.44014 26.74512 -1 0 0 + 723 241 2 0.4236 0.39578 10.91856 26.68628 0 0 0 + 724 242 1 -0.8472 15.12386 29.33502 22.69833 1 1 0 + 725 242 2 0.4236 14.19377 29.70191 22.71562 1 1 0 + 726 242 2 0.4236 15.21039 28.68142 21.94649 1 1 0 + 727 243 1 -0.8472 26.35331 6.84545 25.17133 0 0 0 + 728 243 2 0.4236 25.98539 7.64249 24.69244 0 0 0 + 729 243 2 0.4236 26.23230 6.03072 24.60432 0 0 0 + 730 244 1 -0.8472 17.87784 33.07860 31.33496 1 -1 0 + 731 244 2 0.4236 18.25637 33.78489 30.73679 1 -1 0 + 732 244 2 0.4236 17.58626 33.49307 32.19700 1 -1 0 + 733 245 1 -0.8472 3.45206 32.22567 21.06903 0 -1 0 + 734 245 2 0.4236 2.96341 32.50549 20.24269 0 -1 0 + 735 245 2 0.4236 3.44745 32.97659 21.72938 0 -1 0 + 736 246 1 -0.8472 34.68849 28.24157 9.56684 0 0 0 + 737 246 2 0.4236 33.83286 28.24004 9.04931 0 0 0 + 738 246 2 0.4236 35.06650 29.16719 9.58322 0 0 0 + 739 247 1 -0.8472 11.83632 33.77069 34.97656 0 0 0 + 740 247 2 0.4236 12.77309 33.76721 34.62670 0 0 0 + 741 247 2 0.4236 11.57656 32.84252 35.24295 0 0 0 + 742 248 1 -0.8472 27.98976 23.64368 17.28664 -1 0 0 + 743 248 2 0.4236 27.31344 24.27555 17.66514 -1 0 0 + 744 248 2 0.4236 27.85693 22.73581 17.68425 -1 0 0 +745 249 1 -0.8472 30.21555 28.59820 35.32079 -1 0 0 +746 249 2 0.4236 31.13658 28.35743 0.17971 -1 0 1 +747 249 2 0.4236 30.14340 28.45205 34.33419 -1 0 0 + 748 250 1 -0.8472 21.89279 27.37113 7.14605 0 0 0 + 749 250 2 0.4236 22.43085 28.04298 7.65503 0 0 0 + 750 250 2 0.4236 22.50662 26.70858 6.71689 0 0 0 + 751 251 1 -0.8472 1.75662 32.96857 9.67410 0 -1 0 + 752 251 2 0.4236 2.22776 33.08964 8.80040 0 -1 0 + 753 251 2 0.4236 2.24821 33.46509 10.38946 0 -1 0 + 754 252 1 -0.8472 0.21094 25.70035 3.19371 1 -1 0 + 755 252 2 0.4236 0.74244 26.43217 3.62019 1 -1 0 + 756 252 2 0.4236 0.80652 24.91764 3.01303 1 -1 0 + 757 253 1 -0.8472 13.89378 31.51483 7.21453 0 0 0 + 758 253 2 0.4236 14.54187 30.75755 7.13407 0 0 0 + 759 253 2 0.4236 13.61470 31.81312 6.30180 0 0 0 + 760 254 1 -0.8472 1.19622 17.23496 10.17207 1 0 0 + 761 254 2 0.4236 1.84313 16.48876 10.32903 1 0 0 + 762 254 2 0.4236 1.44494 17.72104 9.33431 1 0 0 + 763 255 1 -0.8472 26.39631 29.97190 16.79257 0 0 0 + 764 255 2 0.4236 25.56003 30.21629 16.30184 0 0 0 + 765 255 2 0.4236 27.09337 30.67060 16.63179 0 0 0 + 766 256 1 -0.8472 6.05191 32.39660 30.18509 0 0 0 + 767 256 2 0.4236 6.81186 32.75954 30.72424 0 0 0 + 768 256 2 0.4236 6.40726 31.96924 29.35378 0 0 0 + 769 257 1 -0.8472 26.10814 21.66842 1.29484 -1 0 0 + 770 257 2 0.4236 25.67123 21.86200 2.17324 -1 0 0 + 771 257 2 0.4236 25.60231 22.12525 0.56313 -1 0 0 + 772 258 1 -0.8472 17.44295 21.30487 6.11779 0 0 0 + 773 258 2 0.4236 17.34023 22.27327 6.34498 0 0 0 + 774 258 2 0.4236 17.42293 21.19161 5.12446 0 0 0 + 775 259 1 -0.8472 28.41502 27.09376 17.12429 0 0 0 + 776 259 2 0.4236 29.35136 27.32828 16.86315 0 0 0 + 777 259 2 0.4236 27.82586 27.12578 16.31691 0 0 0 + 778 260 1 -0.8472 31.30417 34.71417 13.44331 0 -1 0 + 779 260 2 0.4236 30.92816 34.87480 14.35586 0 -1 0 + 780 260 2 0.4236 31.33151 33.73110 13.26235 0 -1 0 + 781 261 1 -0.8472 17.83189 30.37504 2.80681 1 0 0 + 782 261 2 0.4236 18.77927 30.61759 2.59797 1 0 0 + 783 261 2 0.4236 17.21440 30.96079 2.28189 1 0 0 + 784 262 1 -0.8472 21.21362 4.88439 14.56061 0 0 0 + 785 262 2 0.4236 21.28865 5.64522 15.20511 0 0 0 + 786 262 2 0.4236 20.95119 5.23403 13.66124 0 0 0 + 787 263 1 -0.8472 2.58160 4.47678 29.57948 0 0 0 + 788 263 2 0.4236 1.78431 3.98285 29.23263 0 0 0 + 789 263 2 0.4236 3.10038 3.88258 30.19406 0 0 0 + 790 264 1 -0.8472 13.99926 19.82145 25.19090 0 0 0 + 791 264 2 0.4236 13.52302 20.12052 26.01778 0 0 0 + 792 264 2 0.4236 14.97235 20.03772 25.27009 0 0 0 + 793 265 1 -0.8472 31.23575 21.27430 20.21443 0 0 0 + 794 265 2 0.4236 30.98824 22.03691 19.61687 0 0 0 + 795 265 2 0.4236 31.77445 21.61562 20.98467 0 0 0 + 796 266 1 -0.8472 5.98967 23.61218 29.50507 0 0 0 + 797 266 2 0.4236 6.97700 23.45436 29.48877 0 0 0 + 798 266 2 0.4236 5.74003 24.23844 28.76653 0 0 0 + 799 267 1 -0.8472 34.97950 3.70445 28.21894 -1 0 0 + 800 267 2 0.4236 34.34909 2.94118 28.07776 -1 0 0 + 801 267 2 0.4236 0.32312 3.53113 27.72144 0 0 0 + 802 268 1 -0.8472 23.90763 26.40710 10.43250 0 0 0 + 803 268 2 0.4236 23.14485 27.05044 10.49733 0 0 0 + 804 268 2 0.4236 24.63427 26.80687 9.87378 0 0 0 + 805 269 1 -0.8472 24.66360 14.21401 8.75088 -1 1 0 + 806 269 2 0.4236 25.55807 13.80139 8.57868 -1 1 0 + 807 269 2 0.4236 23.94424 13.56083 8.51463 -1 1 0 + 808 270 1 -0.8472 26.76202 32.32885 18.59478 -1 -1 0 + 809 270 2 0.4236 27.04977 33.25283 18.34289 -1 -1 0 + 810 270 2 0.4236 25.76632 32.26114 18.53211 -1 -1 0 + 811 271 1 -0.8472 15.81595 4.45782 25.29065 0 0 0 + 812 271 2 0.4236 15.00012 4.36334 24.72016 0 0 0 + 813 271 2 0.4236 16.07252 5.42260 25.34818 0 0 0 + 814 272 1 -0.8472 19.18223 10.06356 23.18200 0 0 0 + 815 272 2 0.4236 18.80611 10.71294 23.84292 0 0 0 + 816 272 2 0.4236 20.15560 10.24987 23.04858 0 0 0 + 817 273 1 -0.8472 16.92076 8.80930 1.39624 0 0 0 + 818 273 2 0.4236 17.48546 8.47710 0.64076 0 0 0 + 819 273 2 0.4236 16.01226 8.39523 1.34044 0 0 0 + 820 274 1 -0.8472 22.40156 16.29663 33.08332 0 -1 0 + 821 274 2 0.4236 21.63917 15.71905 32.79159 0 -1 0 + 822 274 2 0.4236 22.94970 15.80750 33.76171 0 -1 0 + 823 275 1 -0.8472 8.68261 34.48827 6.98529 1 0 0 + 824 275 2 0.4236 9.60677 34.43356 7.36327 1 0 0 + 825 275 2 0.4236 8.71088 34.28969 6.00564 1 0 0 + 826 276 1 -0.8472 23.95137 6.80440 13.70629 0 -1 0 + 827 276 2 0.4236 24.01394 5.80664 13.68403 0 -1 0 + 828 276 2 0.4236 24.04121 7.12303 14.64986 0 -1 0 + 829 277 1 -0.8472 9.01439 30.12792 34.41532 0 0 0 + 830 277 2 0.4236 8.30096 29.42784 34.38629 0 0 0 + 831 277 2 0.4236 9.71944 29.91353 33.73938 0 0 0 + 832 278 1 -0.8472 26.45031 33.55297 7.08366 -1 -1 0 + 833 278 2 0.4236 25.78208 32.93952 6.66283 -1 -1 0 + 834 278 2 0.4236 26.50126 33.36762 8.06498 -1 -1 0 + 835 279 1 -0.8472 30.88800 23.18806 18.39688 0 0 0 + 836 279 2 0.4236 29.93334 23.24008 18.10384 0 0 0 + 837 279 2 0.4236 31.48270 23.16839 17.59322 0 0 0 +838 280 1 -0.8472 10.52809 12.54265 34.90389 0 0 0 +839 280 2 0.4236 11.44533 12.14846 34.96061 0 0 0 +840 280 2 0.4236 10.46670 13.33299 0.06628 0 0 1 + 841 281 1 -0.8472 3.63801 19.43628 9.70987 1 0 0 + 842 281 2 0.4236 2.97661 19.22892 8.98912 1 0 0 + 843 281 2 0.4236 4.55252 19.50946 9.31205 1 0 0 + 844 282 1 -0.8472 24.55168 32.70298 5.53394 1 0 0 + 845 282 2 0.4236 25.10629 32.33979 4.78533 1 0 0 + 846 282 2 0.4236 23.65660 32.25716 5.53235 1 0 0 + 847 283 1 -0.8472 11.81055 0.45139 5.96055 0 1 0 + 848 283 2 0.4236 11.39065 35.39717 6.67428 0 0 0 + 849 283 2 0.4236 12.78463 0.56502 6.15590 0 1 0 +850 284 1 -0.8472 7.05422 31.92915 0.30939 0 -1 0 +851 284 2 0.4236 7.50991 32.81916 0.32211 0 -1 0 +852 284 2 0.4236 7.60255 31.28148 35.22760 0 -1 -1 + 853 285 1 -0.8472 4.88099 2.44705 3.21183 1 1 0 + 854 285 2 0.4236 5.10191 2.23231 4.16317 1 1 0 + 855 285 2 0.4236 5.19600 3.37148 2.99700 1 1 0 + 856 286 1 -0.8472 7.47945 15.15365 10.29372 1 0 0 + 857 286 2 0.4236 7.03313 15.93251 10.73429 1 0 0 + 858 286 2 0.4236 7.09594 15.02313 9.37947 1 0 0 + 859 287 1 -0.8472 6.26659 26.90479 24.54665 0 0 0 + 860 287 2 0.4236 5.54453 27.04075 25.22493 0 0 0 + 861 287 2 0.4236 6.35642 27.72783 23.98591 0 0 0 + 862 288 1 -0.8472 7.15187 18.20123 25.54502 0 0 0 + 863 288 2 0.4236 6.48538 17.85437 26.20487 0 0 0 + 864 288 2 0.4236 7.52394 17.43919 25.01512 0 0 0 + 865 289 1 -0.8472 15.23808 32.91772 4.26238 0 0 0 + 866 289 2 0.4236 14.28204 32.86755 4.55117 0 0 0 + 867 289 2 0.4236 15.32351 32.56635 3.33007 0 0 0 + 868 290 1 -0.8472 13.90041 29.69758 15.32527 -1 0 0 + 869 290 2 0.4236 14.48236 29.05538 14.82643 -1 0 0 + 870 290 2 0.4236 13.21933 29.18973 15.85269 -1 0 0 + 871 291 1 -0.8472 0.23593 14.77991 15.99345 1 0 0 + 872 291 2 0.4236 35.16151 14.00125 16.23084 0 0 0 + 873 291 2 0.4236 35.18896 15.61239 15.96630 0 0 0 + 874 292 1 -0.8472 9.98786 25.23095 12.26937 1 0 0 + 875 292 2 0.4236 10.02909 26.10849 11.79168 1 0 0 + 876 292 2 0.4236 10.18929 25.36950 13.23899 1 0 0 + 877 293 1 -0.8472 21.45982 13.20463 15.01415 0 0 0 + 878 293 2 0.4236 21.82643 13.13504 14.08639 0 0 0 + 879 293 2 0.4236 20.48493 12.98240 15.00483 0 0 0 + 880 294 1 -0.8472 31.10796 22.99984 9.65674 0 0 0 + 881 294 2 0.4236 30.36879 23.52310 10.08072 0 0 0 + 882 294 2 0.4236 31.98714 23.41399 9.89228 0 0 0 + 883 295 1 -0.8472 13.25615 9.90592 3.33739 0 0 0 + 884 295 2 0.4236 13.70857 10.67615 2.88796 0 0 0 + 885 295 2 0.4236 12.62006 9.47384 2.69813 0 0 0 + 886 296 1 -0.8472 10.30305 4.65218 17.64093 1 0 0 + 887 296 2 0.4236 10.46972 4.28256 18.55501 1 0 0 + 888 296 2 0.4236 11.16248 4.67871 17.13035 1 0 0 + 889 297 1 -0.8472 28.87774 21.47687 33.75214 -1 0 0 + 890 297 2 0.4236 28.59667 20.77739 34.40919 -1 0 0 + 891 297 2 0.4236 28.64741 21.17648 32.82658 -1 0 0 + 892 298 1 -0.8472 17.68653 22.52768 26.05691 0 0 0 + 893 298 2 0.4236 18.40542 23.22136 26.01338 0 0 0 + 894 298 2 0.4236 17.66622 22.12564 26.97230 0 0 0 + 895 299 1 -0.8472 35.32860 15.35870 21.60921 0 0 0 + 896 299 2 0.4236 34.37125 15.41320 21.32556 0 0 0 + 897 299 2 0.4236 0.36572 14.95613 20.87262 1 0 0 + 898 300 1 -0.8472 34.81358 9.91603 7.88012 -1 1 0 + 899 300 2 0.4236 34.34643 10.38273 7.12917 -1 1 0 + 900 300 2 0.4236 34.39397 10.17956 8.74872 -1 1 0 + 901 301 1 -0.8472 25.98823 17.72835 34.76824 0 1 0 + 902 301 2 0.4236 25.46157 18.42882 34.28669 0 1 0 + 903 301 2 0.4236 25.38292 16.97587 35.02775 0 1 0 + 904 302 1 -0.8472 1.10644 14.44721 19.28866 0 0 0 + 905 302 2 0.4236 1.56807 13.69242 19.75465 0 0 0 + 906 302 2 0.4236 1.73043 14.86132 18.62601 0 0 0 + 907 303 1 -0.8472 23.07025 7.39359 29.72495 -1 0 0 + 908 303 2 0.4236 22.62092 7.30025 28.83650 -1 0 0 + 909 303 2 0.4236 23.24054 6.48626 30.10931 -1 0 0 + 910 304 1 -0.8472 10.52323 33.05449 2.56148 -1 0 0 + 911 304 2 0.4236 10.82351 34.00113 2.44456 -1 0 0 + 912 304 2 0.4236 10.86668 32.49988 1.80358 -1 0 0 + 913 305 1 -0.8472 32.88033 27.86819 13.04648 -1 0 0 + 914 305 2 0.4236 33.46970 28.54401 12.60392 -1 0 0 + 915 305 2 0.4236 33.12675 26.95244 12.72930 -1 0 0 + 916 306 1 -0.8472 28.86382 12.21670 3.75354 0 0 0 + 917 306 2 0.4236 28.56770 11.49284 4.37666 0 0 0 + 918 306 2 0.4236 28.23838 12.26251 2.97467 0 0 0 + 919 307 1 -0.8472 23.12120 7.48978 34.39303 0 0 0 + 920 307 2 0.4236 23.05104 7.80962 35.33787 0 0 0 + 921 307 2 0.4236 23.94307 6.92935 34.29101 0 0 0 + 922 308 1 -0.8472 23.04919 24.12205 3.43733 0 -1 0 + 923 308 2 0.4236 23.21646 24.95901 3.95832 0 -1 0 + 924 308 2 0.4236 22.43224 23.52672 3.95201 0 -1 0 + 925 309 1 -0.8472 32.92674 24.00762 30.56994 -1 0 0 + 926 309 2 0.4236 33.71882 24.55051 30.84902 -1 0 0 + 927 309 2 0.4236 32.11989 24.59624 30.52056 -1 0 0 + 928 310 1 -0.8472 3.45535 11.74575 10.93216 0 0 0 + 929 310 2 0.4236 2.61810 11.84889 11.46912 0 0 0 + 930 310 2 0.4236 4.12115 12.43525 11.21716 0 0 0 + 931 311 1 -0.8472 18.03058 4.40786 5.24725 0 0 0 + 932 311 2 0.4236 18.51841 3.54031 5.15058 0 0 0 + 933 311 2 0.4236 17.13139 4.24134 5.65181 0 0 0 + 934 312 1 -0.8472 21.91775 10.67527 23.00739 0 0 0 + 935 312 2 0.4236 21.50019 11.47111 23.44584 0 0 0 + 936 312 2 0.4236 22.91139 10.78644 22.99172 0 0 0 + 937 313 1 -0.8472 27.43171 31.48689 23.76096 0 0 0 + 938 313 2 0.4236 27.78240 32.24630 23.21302 0 0 0 + 939 313 2 0.4236 28.19676 30.99143 24.17225 0 0 0 + 940 314 1 -0.8472 31.13317 15.04734 2.15137 -1 0 0 + 941 314 2 0.4236 31.39347 14.25637 2.70508 -1 0 0 + 942 314 2 0.4236 30.55850 15.65965 2.69426 -1 0 0 + 943 315 1 -0.8472 26.48284 26.46164 29.23316 0 -1 0 + 944 315 2 0.4236 26.29994 27.37877 29.58724 0 -1 0 + 945 315 2 0.4236 25.62067 25.96515 29.13256 0 -1 0 + 946 316 1 -0.8472 31.22165 24.17798 24.58738 0 1 0 + 947 316 2 0.4236 31.23699 25.14094 24.31833 0 1 0 + 948 316 2 0.4236 31.44662 23.60757 23.79747 0 1 0 + 949 317 1 -0.8472 2.23033 8.39736 11.70154 1 0 0 + 950 317 2 0.4236 2.21591 7.43318 11.96640 1 0 0 + 951 317 2 0.4236 1.68011 8.52458 10.87630 1 0 0 + 952 318 1 -0.8472 10.30355 13.69355 7.45075 0 0 0 + 953 318 2 0.4236 9.95467 13.20339 6.65202 0 0 0 + 954 318 2 0.4236 11.01804 14.33182 7.16427 0 0 0 + 955 319 1 -0.8472 19.09624 27.27097 33.96412 1 -1 0 + 956 319 2 0.4236 18.28761 27.58882 33.46913 1 -1 0 + 957 319 2 0.4236 19.40262 27.98394 34.59479 1 -1 0 + 958 320 1 -0.8472 21.98400 20.91583 33.60592 -1 0 0 + 959 320 2 0.4236 22.11925 21.66026 32.95210 -1 0 0 + 960 320 2 0.4236 21.87187 21.29511 34.52436 -1 0 0 + 961 321 1 -0.8472 8.05909 10.61317 31.65640 1 0 0 + 962 321 2 0.4236 8.44206 9.70136 31.80450 1 0 0 + 963 321 2 0.4236 7.46372 10.59818 30.85313 1 0 0 + 964 322 1 -0.8472 9.09413 18.32337 0.84811 0 0 0 + 965 322 2 0.4236 9.41231 18.00449 1.74088 0 0 0 + 966 322 2 0.4236 8.81473 17.53907 0.29424 0 0 0 + 967 323 1 -0.8472 13.25569 25.97059 14.21521 0 0 0 + 968 323 2 0.4236 13.55824 26.21604 15.13616 0 0 0 + 969 323 2 0.4236 12.33025 25.59418 14.25764 0 0 0 + 970 324 1 -0.8472 33.13584 9.19316 24.05826 -1 0 0 + 971 324 2 0.4236 32.63026 9.79659 23.44165 -1 0 0 + 972 324 2 0.4236 34.11588 9.27845 23.87875 -1 0 0 + 973 325 1 -0.8472 0.58676 30.79636 7.10521 0 0 0 + 974 325 2 0.4236 0.12738 30.93416 7.98267 0 0 0 + 975 325 2 0.4236 1.25039 30.05311 7.18950 0 0 0 + 976 326 1 -0.8472 16.60852 24.00687 6.45844 0 -1 0 + 977 326 2 0.4236 16.74085 24.60096 5.66503 0 -1 0 + 978 326 2 0.4236 16.73950 24.53616 7.29670 0 -1 0 + 979 327 1 -0.8472 21.78272 18.23485 15.29826 -1 0 0 + 980 327 2 0.4236 21.29209 17.36498 15.24772 -1 0 0 + 981 327 2 0.4236 21.47580 18.74440 16.10210 -1 0 0 + 982 328 1 -0.8472 1.07556 17.90780 22.50149 0 0 0 + 983 328 2 0.4236 0.66446 17.09563 22.08753 0 0 0 + 984 328 2 0.4236 2.00753 18.02178 22.15740 0 0 0 + 985 329 1 -0.8472 8.51481 8.69543 13.44579 1 1 0 + 986 329 2 0.4236 8.03320 7.99947 12.91320 1 1 0 + 987 329 2 0.4236 8.13923 9.59736 13.23261 1 1 0 + 988 330 1 -0.8472 28.35224 22.67556 2.57766 0 0 0 + 989 330 2 0.4236 27.72872 22.28765 1.89891 0 0 0 + 990 330 2 0.4236 28.76046 21.93781 3.11531 0 0 0 + 991 331 1 -0.8472 17.15184 8.01186 31.33613 0 0 0 + 992 331 2 0.4236 16.77891 8.44369 32.15737 0 0 0 + 993 331 2 0.4236 16.96330 8.58870 30.54137 0 0 0 + 994 332 1 -0.8472 29.37145 32.28297 30.40766 0 0 0 + 995 332 2 0.4236 28.59990 31.77818 30.79475 0 0 0 + 996 332 2 0.4236 29.34145 32.22393 29.40986 0 0 0 + 997 333 1 -0.8472 35.30101 34.49612 31.31065 -1 0 0 + 998 333 2 0.4236 0.55375 34.83822 31.86447 0 0 0 + 999 333 2 0.4236 34.45007 34.92923 31.60762 -1 0 0 + 1000 334 1 -0.8472 14.09936 2.13015 18.09005 0 0 0 + 1001 334 2 0.4236 13.86459 1.50779 17.34342 0 0 0 + 1002 334 2 0.4236 14.07709 1.63332 18.95758 0 0 0 + 1003 335 1 -0.8472 23.74810 3.68755 32.95671 0 1 0 + 1004 335 2 0.4236 23.65696 3.88556 31.98078 0 1 0 + 1005 335 2 0.4236 22.86999 3.83831 33.41082 0 1 0 + 1006 336 1 -0.8472 31.09997 21.56673 28.07556 -1 0 0 + 1007 336 2 0.4236 31.85938 21.15085 28.57586 -1 0 0 + 1008 336 2 0.4236 31.35399 22.49164 27.79269 -1 0 0 + 1009 337 1 -0.8472 20.64083 15.69267 14.82107 0 0 0 + 1010 337 2 0.4236 20.01411 15.85195 15.58383 0 0 0 + 1011 337 2 0.4236 21.11190 14.82056 14.95329 0 0 0 + 1012 338 1 -0.8472 20.28701 15.13724 31.94210 0 0 0 + 1013 338 2 0.4236 20.65117 14.38373 31.39480 0 0 0 + 1014 338 2 0.4236 19.30068 15.01933 32.05716 0 0 0 + 1015 339 1 -0.8472 32.47304 33.05421 7.42147 0 -1 0 + 1016 339 2 0.4236 31.48483 33.14393 7.54532 0 -1 0 + 1017 339 2 0.4236 32.72329 32.08609 7.42835 0 -1 0 + 1018 340 1 -0.8472 25.63615 27.76429 13.62009 0 -1 0 + 1019 340 2 0.4236 26.57313 27.51515 13.86499 0 -1 0 + 1020 340 2 0.4236 25.13047 26.94246 13.35778 0 -1 0 + 1021 341 1 -0.8472 0.75304 4.33827 20.97066 1 0 0 + 1022 341 2 0.4236 0.72114 4.46730 19.97956 1 0 0 + 1023 341 2 0.4236 1.06157 5.18343 21.40709 1 0 0 + 1024 342 1 -0.8472 1.15960 21.09656 13.17958 1 1 0 + 1025 342 2 0.4236 1.13952 21.53055 12.27891 1 1 0 + 1026 342 2 0.4236 1.23756 20.10565 13.07037 1 1 0 + 1027 343 1 -0.8472 8.63426 29.66811 25.42818 0 0 0 + 1028 343 2 0.4236 8.28239 30.40249 24.84784 0 0 0 + 1029 343 2 0.4236 8.72735 28.83186 24.88783 0 0 0 + 1030 344 1 -0.8472 30.76174 20.63256 25.14989 0 0 0 + 1031 344 2 0.4236 31.51870 20.90756 24.55714 0 0 0 + 1032 344 2 0.4236 30.99303 20.83502 26.10143 0 0 0 + 1033 345 1 -0.8472 4.24571 30.79640 2.94362 0 0 0 + 1034 345 2 0.4236 4.17270 31.39155 2.14334 0 0 0 + 1035 345 2 0.4236 4.36412 29.84944 2.64506 0 0 0 + 1036 346 1 -0.8472 15.42989 29.35349 26.25283 -1 0 0 + 1037 346 2 0.4236 16.28644 29.25844 25.74568 -1 0 0 + 1038 346 2 0.4236 14.71000 28.83510 25.79131 -1 0 0 + 1039 347 1 -0.8472 15.48947 26.89872 10.36047 0 0 0 + 1040 347 2 0.4236 15.06016 26.08318 10.74851 0 0 0 + 1041 347 2 0.4236 16.47729 26.75709 10.29670 0 0 0 + 1042 348 1 -0.8472 3.69092 24.79802 1.79703 1 -1 0 + 1043 348 2 0.4236 2.92286 24.81460 1.15692 1 -1 0 + 1044 348 2 0.4236 4.44248 24.26962 1.40222 1 -1 0 + 1045 349 1 -0.8472 30.63584 20.42155 0.68360 -1 0 0 + 1046 349 2 0.4236 29.66630 20.49948 0.45154 -1 0 0 + 1047 349 2 0.4236 31.17191 21.00886 0.07726 -1 0 0 + 1048 350 1 -0.8472 23.07817 3.25695 10.19922 0 1 0 + 1049 350 2 0.4236 23.13072 3.67899 9.29418 0 1 0 + 1050 350 2 0.4236 22.12223 3.06798 10.42381 0 1 0 + 1051 351 1 -0.8472 35.17355 13.92467 30.41812 -1 0 0 + 1052 351 2 0.4236 34.42649 13.31598 30.68525 -1 0 0 + 1053 351 2 0.4236 35.48891 13.68248 29.50057 -1 0 0 + 1054 352 1 -0.8472 28.88786 35.07154 21.77560 0 -1 0 + 1055 352 2 0.4236 29.82352 35.08183 22.12833 0 -1 0 + 1056 352 2 0.4236 28.66001 34.14976 21.46196 0 -1 0 + 1057 353 1 -0.8472 11.05103 25.60242 26.28306 0 0 0 + 1058 353 2 0.4236 11.23918 24.62323 26.20763 0 0 0 + 1059 353 2 0.4236 10.10113 25.78009 26.02597 0 0 0 + 1060 354 1 -0.8472 31.63339 18.14090 19.44147 0 0 0 + 1061 354 2 0.4236 31.85189 18.85252 20.10916 0 0 0 + 1062 354 2 0.4236 32.47695 17.81105 19.01777 0 0 0 + 1063 355 1 -0.8472 3.31136 2.63236 12.33445 0 0 0 + 1064 355 2 0.4236 2.41026 2.87346 11.97410 0 0 0 + 1065 355 2 0.4236 3.44117 3.06706 13.22559 0 0 0 + 1066 356 1 -0.8472 12.24600 6.49581 14.08200 1 -1 0 + 1067 356 2 0.4236 13.15730 6.37133 13.68960 1 -1 0 + 1068 356 2 0.4236 12.00228 7.46532 14.05786 1 -1 0 + 1069 357 1 -0.8472 11.50548 16.90283 14.04964 0 0 0 + 1070 357 2 0.4236 12.29833 16.85131 13.44246 0 0 0 + 1071 357 2 0.4236 11.71965 16.45258 14.91643 0 0 0 + 1072 358 1 -0.8472 35.43225 34.57807 0.88602 -1 -1 0 + 1073 358 2 0.4236 34.78145 34.97858 0.24105 -1 -1 0 + 1074 358 2 0.4236 0.05551 33.61013 0.67092 0 -1 0 + 1075 359 1 -0.8472 32.90157 21.64637 32.04479 0 0 0 + 1076 359 2 0.4236 32.92099 22.39953 31.38732 0 0 0 + 1077 359 2 0.4236 32.11375 21.05995 31.85667 0 0 0 + 1078 360 1 -0.8472 28.66651 4.66095 28.42273 -1 0 0 + 1079 360 2 0.4236 29.64436 4.61462 28.62669 -1 0 0 + 1080 360 2 0.4236 28.36393 3.78767 28.04089 -1 0 0 + 1081 361 1 -0.8472 11.79766 16.60969 9.43182 0 0 0 + 1082 361 2 0.4236 12.66888 16.45176 9.89661 0 0 0 + 1083 361 2 0.4236 11.22235 15.79621 9.51672 0 0 0 + 1084 362 1 -0.8472 9.55596 34.02911 10.63320 0 0 0 + 1085 362 2 0.4236 8.61455 34.26813 10.87101 0 0 0 + 1086 362 2 0.4236 9.60738 33.05467 10.41463 0 0 0 + 1087 363 1 -0.8472 22.07096 19.00704 23.45916 0 -1 0 + 1088 363 2 0.4236 22.91480 19.42776 23.12621 0 -1 0 + 1089 363 2 0.4236 21.60867 19.63643 24.08378 0 -1 0 + 1090 364 1 -0.8472 35.05069 19.90937 25.80470 -2 -1 0 + 1091 364 2 0.4236 35.34344 20.47030 25.03040 -2 -1 0 + 1092 364 2 0.4236 34.77122 20.50286 26.55945 -2 -1 0 + 1093 365 1 -0.8472 1.29483 5.44650 7.26933 1 1 0 + 1094 365 2 0.4236 0.45590 5.92938 7.52030 1 1 0 + 1095 365 2 0.4236 1.81961 5.23896 8.09486 1 1 0 + 1096 366 1 -0.8472 33.07892 1.60280 25.15613 0 0 0 + 1097 366 2 0.4236 32.33755 2.22668 25.40327 0 0 0 + 1098 366 2 0.4236 33.70561 2.06250 24.52690 0 0 0 + 1099 367 1 -0.8472 14.22157 33.43622 22.79701 0 0 0 + 1100 367 2 0.4236 14.35642 34.29835 23.28540 0 0 0 + 1101 367 2 0.4236 13.26247 33.16147 22.86432 0 0 0 + 1102 368 1 -0.8472 27.07629 24.91963 8.20535 0 0 0 + 1103 368 2 0.4236 27.19239 24.91058 7.21216 0 0 0 + 1104 368 2 0.4236 26.78492 25.83019 8.49857 0 0 0 + 1105 369 1 -0.8472 7.24937 20.22566 4.06221 0 0 0 + 1106 369 2 0.4236 6.58398 19.52352 4.31566 0 0 0 + 1107 369 2 0.4236 7.35965 20.23706 3.06839 0 0 0 + 1108 370 1 -0.8472 13.41227 1.40249 12.73458 0 0 0 + 1109 370 2 0.4236 13.93745 1.43607 11.88427 0 0 0 + 1110 370 2 0.4236 12.54553 1.88546 12.61030 0 0 0 + 1111 371 1 -0.8472 0.85266 16.38948 27.38175 0 -1 0 + 1112 371 2 0.4236 1.08079 16.82099 28.25450 0 -1 0 + 1113 371 2 0.4236 1.16521 16.97097 26.63066 0 -1 0 + 1114 372 1 -0.8472 4.02418 25.29508 4.78828 1 1 0 + 1115 372 2 0.4236 3.89068 25.61801 3.85137 1 1 0 + 1116 372 2 0.4236 4.33792 24.34571 4.77208 1 1 0 + 1117 373 1 -0.8472 16.59052 15.77188 19.36735 0 0 0 + 1118 373 2 0.4236 16.75530 16.39211 20.13429 0 0 0 + 1119 373 2 0.4236 17.42140 15.24909 19.17700 0 0 0 + 1120 374 1 -0.8472 33.13843 25.82196 3.97841 0 0 0 + 1121 374 2 0.4236 32.77967 24.90515 4.15352 0 0 0 + 1122 374 2 0.4236 34.05286 25.75158 3.57992 0 0 0 + 1123 375 1 -0.8472 31.57661 1.02930 18.56306 -1 1 0 + 1124 375 2 0.4236 31.87941 0.41338 19.29029 -1 1 0 + 1125 375 2 0.4236 31.65157 0.56519 17.68046 -1 1 0 + 1126 376 1 -0.8472 2.96164 16.29354 6.71299 0 0 0 + 1127 376 2 0.4236 3.05881 15.49032 7.30060 0 0 0 + 1128 376 2 0.4236 3.23467 16.05902 5.78005 0 0 0 + 1129 377 1 -0.8472 20.34379 33.69865 7.89455 0 -1 0 + 1130 377 2 0.4236 20.39438 32.70170 7.83518 0 -1 0 + 1131 377 2 0.4236 19.51518 33.96147 8.38879 0 -1 0 + 1132 378 1 -0.8472 19.37439 16.80508 19.73572 0 1 0 + 1133 378 2 0.4236 20.27469 17.21358 19.88587 0 1 0 + 1134 378 2 0.4236 19.36459 15.87542 20.10391 0 1 0 + 1135 379 1 -0.8472 19.23315 9.13979 28.88985 -1 0 0 + 1136 379 2 0.4236 20.13295 9.57333 28.93806 -1 0 0 + 1137 379 2 0.4236 18.76709 9.24056 29.76884 -1 0 0 + 1138 380 1 -0.8472 27.72787 22.91683 10.45990 -1 -1 0 + 1139 380 2 0.4236 27.54902 23.44015 9.62678 -1 -1 0 + 1140 380 2 0.4236 28.28042 22.11378 10.23690 -1 -1 0 + 1141 381 1 -0.8472 6.32840 1.89288 33.44010 0 0 0 + 1142 381 2 0.4236 6.55965 2.59979 32.77171 0 0 0 + 1143 381 2 0.4236 6.96546 1.94041 34.20941 0 0 0 + 1144 382 1 -0.8472 5.63638 5.55085 15.38096 0 1 0 + 1145 382 2 0.4236 6.60617 5.51829 15.62260 0 1 0 + 1146 382 2 0.4236 5.27855 6.46702 15.56128 0 1 0 + 1147 383 1 -0.8472 3.24229 34.95287 10.93468 1 -1 0 + 1148 383 2 0.4236 2.73508 0.26278 11.21110 1 0 0 + 1149 383 2 0.4236 4.13670 34.94890 11.38181 1 -1 0 + 1150 384 1 -0.8472 10.54404 28.17006 5.04204 0 -1 0 + 1151 384 2 0.4236 10.79734 28.87476 5.70473 0 -1 0 + 1152 384 2 0.4236 9.58213 27.92638 5.16590 0 -1 0 + 1153 385 1 -0.8472 17.00917 14.06687 8.09635 1 1 0 + 1154 385 2 0.4236 17.37361 14.76031 8.71785 1 1 0 + 1155 385 2 0.4236 16.55338 14.51499 7.32736 1 1 0 + 1156 386 1 -0.8472 6.62644 33.85271 2.78808 0 -1 0 + 1157 386 2 0.4236 5.73917 34.02559 3.21562 0 -1 0 + 1158 386 2 0.4236 6.61962 34.20458 1.85208 0 -1 0 + 1159 387 1 -0.8472 29.76540 24.76348 2.86127 0 -1 0 + 1160 387 2 0.4236 29.15412 23.97946 2.75344 0 -1 0 + 1161 387 2 0.4236 30.61943 24.46419 3.28677 0 -1 0 + 1162 388 1 -0.8472 13.59066 30.37117 2.31161 0 0 0 + 1163 388 2 0.4236 12.65166 30.51884 2.62207 0 0 0 + 1164 388 2 0.4236 14.05913 29.75730 2.94695 0 0 0 + 1165 389 1 -0.8472 12.39821 27.47130 30.65704 0 -1 0 + 1166 389 2 0.4236 12.99120 27.19012 29.90254 0 -1 0 + 1167 389 2 0.4236 12.45715 26.79959 31.39547 0 -1 0 + 1168 390 1 -0.8472 6.06136 34.05062 23.58964 1 0 0 + 1169 390 2 0.4236 5.93233 34.43746 22.67660 1 0 0 + 1170 390 2 0.4236 7.01612 34.15998 23.86610 1 0 0 + 1171 391 1 -0.8472 14.90784 2.14573 10.34168 0 0 0 + 1172 391 2 0.4236 15.85071 2.06423 10.01876 0 0 0 + 1173 391 2 0.4236 14.45030 2.88711 9.85081 0 0 0 + 1174 392 1 -0.8472 5.95470 23.52370 19.25445 1 0 0 + 1175 392 2 0.4236 6.57166 22.96298 19.80661 1 0 0 + 1176 392 2 0.4236 5.74564 23.04724 18.40053 1 0 0 + 1177 393 1 -0.8472 16.53893 22.97687 33.90825 -1 0 0 + 1178 393 2 0.4236 16.96060 22.22410 33.40285 -1 0 0 + 1179 393 2 0.4236 16.93781 23.02835 34.82378 -1 0 0 + 1180 394 1 -0.8472 19.35884 19.30139 25.91860 1 0 0 + 1181 394 2 0.4236 18.36758 19.43312 25.92172 1 0 0 + 1182 394 2 0.4236 19.60298 18.62496 25.22376 1 0 0 + 1183 395 1 -0.8472 17.84105 26.28435 20.60609 0 0 0 + 1184 395 2 0.4236 18.33356 25.48138 20.27048 0 0 0 + 1185 395 2 0.4236 18.48109 26.89968 21.06619 0 0 0 + 1186 396 1 -0.8472 25.39077 19.85526 30.73839 -1 0 0 + 1187 396 2 0.4236 24.77676 19.15798 31.10824 -1 0 0 + 1188 396 2 0.4236 25.40880 20.64357 31.35332 -1 0 0 + 1189 397 1 -0.8472 32.17283 22.92893 4.21570 0 0 0 + 1190 397 2 0.4236 32.63445 22.40316 3.50127 0 0 0 + 1191 397 2 0.4236 32.09738 22.37237 5.04307 0 0 0 + 1192 398 1 -0.8472 17.29312 0.37281 33.34237 1 0 0 + 1193 398 2 0.4236 16.62031 1.11144 33.38353 1 0 0 + 1194 398 2 0.4236 18.16235 0.73226 33.00297 1 0 0 + 1195 399 1 -0.8472 12.89246 11.41146 34.96369 0 1 0 + 1196 399 2 0.4236 13.81811 11.65819 35.25053 0 1 0 + 1197 399 2 0.4236 12.78729 10.41756 34.99613 0 1 0 + 1198 400 1 -0.8472 6.36277 31.86052 10.27376 2 -1 0 + 1199 400 2 0.4236 6.33011 32.23746 11.19940 2 -1 0 + 1200 400 2 0.4236 7.24273 31.40813 10.12900 2 -1 0 + 1201 401 1 -0.8472 28.38360 3.88865 10.78470 0 1 0 + 1202 401 2 0.4236 28.42858 3.61210 11.74461 0 1 0 + 1203 401 2 0.4236 28.18657 4.86742 10.72869 0 1 0 + 1204 402 1 -0.8472 18.39410 3.79825 25.35360 0 0 0 + 1205 402 2 0.4236 18.47271 2.80161 25.37448 0 0 0 + 1206 402 2 0.4236 17.43266 4.05869 25.44176 0 0 0 + 1207 403 1 -0.8472 30.80900 7.81409 7.07058 0 1 0 + 1208 403 2 0.4236 30.55382 7.48751 7.98062 0 1 0 + 1209 403 2 0.4236 31.80460 7.79968 6.97835 0 1 0 + 1210 404 1 -0.8472 23.51102 5.83799 2.88617 0 0 0 + 1211 404 2 0.4236 23.86573 5.70253 3.81125 0 0 0 + 1212 404 2 0.4236 23.71338 5.03178 2.33025 0 0 0 + 1213 405 1 -0.8472 20.52153 3.94426 31.16343 -1 0 0 + 1214 405 2 0.4236 20.17492 4.52582 31.89939 -1 0 0 + 1215 405 2 0.4236 21.49852 4.11501 31.03575 -1 0 0 +1216 406 1 -0.8472 35.47429 28.06507 0.54549 -1 0 0 +1217 406 2 0.4236 0.72718 27.77804 35.40863 0 0 -1 +1218 406 2 0.4236 0.32616 28.54845 1.34422 0 0 0 + 1219 407 1 -0.8472 25.34340 8.52458 3.30496 0 0 0 + 1220 407 2 0.4236 24.76479 8.25867 4.07597 0 0 0 + 1221 407 2 0.4236 25.95386 7.76826 3.06992 0 0 0 + 1222 408 1 -0.8472 14.03033 20.30541 1.00428 0 0 0 + 1223 408 2 0.4236 14.58182 21.08353 1.30490 0 0 0 + 1224 408 2 0.4236 13.32894 20.10945 1.68953 0 0 0 + 1225 409 1 -0.8472 4.87289 5.75995 12.70282 1 0 0 + 1226 409 2 0.4236 5.73516 6.07464 12.30602 1 0 0 + 1227 409 2 0.4236 5.01108 5.53970 13.66840 1 0 0 + 1228 410 1 -0.8472 13.53566 35.12394 16.50467 1 -1 0 + 1229 410 2 0.4236 13.08941 0.40195 16.07381 1 0 0 + 1230 410 2 0.4236 12.84428 34.53745 16.92657 1 -1 0 + 1231 411 1 -0.8472 31.28347 13.97579 12.16494 0 0 0 + 1232 411 2 0.4236 30.31706 14.04855 12.41123 0 0 0 + 1233 411 2 0.4236 31.39500 14.17310 11.19100 0 0 0 + 1234 412 1 -0.8472 23.72875 25.77285 13.04432 -1 0 0 + 1235 412 2 0.4236 23.54106 26.23908 12.17983 -1 0 0 + 1236 412 2 0.4236 23.97314 24.82029 12.86304 -1 0 0 + 1237 413 1 -0.8472 18.42520 13.29901 12.67620 0 0 0 + 1238 413 2 0.4236 18.76063 12.84318 13.50059 0 0 0 + 1239 413 2 0.4236 17.47850 13.02572 12.50598 0 0 0 + 1240 414 1 -0.8472 24.38139 21.23148 28.52212 -1 0 0 + 1241 414 2 0.4236 24.87887 20.69331 29.20242 -1 0 0 + 1242 414 2 0.4236 24.93945 21.32433 27.69755 -1 0 0 + 1243 415 1 -0.8472 4.76545 3.74972 28.15333 2 0 0 + 1244 415 2 0.4236 3.95303 4.05898 28.64753 2 0 0 + 1245 415 2 0.4236 4.90570 4.32652 27.34861 2 0 0 + 1246 416 1 -0.8472 31.10729 24.42201 27.24570 -1 0 0 + 1247 416 2 0.4236 30.99608 24.27377 26.26307 -1 0 0 + 1248 416 2 0.4236 30.32437 24.93611 27.59596 -1 0 0 + 1249 417 1 -0.8472 17.27764 19.50978 16.96588 0 1 0 + 1250 417 2 0.4236 16.89080 19.37919 17.87871 0 1 0 + 1251 417 2 0.4236 16.81794 20.27508 16.51545 0 1 0 + 1252 418 1 -0.8472 3.72639 18.97644 12.27267 1 0 0 + 1253 418 2 0.4236 3.70512 19.37343 11.35512 1 0 0 + 1254 418 2 0.4236 2.86172 18.50772 12.45316 1 0 0 + 1255 419 1 -0.8472 20.96515 21.23762 26.79063 0 0 0 + 1256 419 2 0.4236 20.35291 20.50701 26.48848 0 0 0 + 1257 419 2 0.4236 20.95957 21.28545 27.78946 0 0 0 + 1258 420 1 -0.8472 32.52779 5.30124 27.39384 0 1 0 + 1259 420 2 0.4236 32.53926 5.99020 26.66919 0 1 0 + 1260 420 2 0.4236 33.40185 5.31374 27.87950 0 1 0 + 1261 421 1 -0.8472 4.50515 19.02032 2.73901 0 0 0 + 1262 421 2 0.4236 4.98200 18.24270 3.14870 0 0 0 + 1263 421 2 0.4236 3.52800 18.95648 2.94164 0 0 0 +1264 422 1 -0.8472 5.79914 17.68163 34.54127 0 0 0 +1265 422 2 0.4236 5.22820 18.24930 33.94824 0 0 0 +1266 422 2 0.4236 5.67665 17.96493 0.04523 0 0 1 + 1267 423 1 -0.8472 2.03112 11.27795 4.67878 0 1 0 + 1268 423 2 0.4236 2.55869 11.86871 4.06838 0 1 0 + 1269 423 2 0.4236 1.30126 10.83107 4.16153 0 1 0 + 1270 424 1 -0.8472 21.63764 11.67562 6.00451 0 1 0 + 1271 424 2 0.4236 22.26518 11.45584 5.25763 0 1 0 + 1272 424 2 0.4236 20.83218 11.08572 5.94754 0 1 0 + 1273 425 1 -0.8472 12.73506 6.22561 3.30400 0 -1 0 + 1274 425 2 0.4236 12.99724 6.93528 3.95793 0 -1 0 + 1275 425 2 0.4236 12.40741 6.65328 2.46157 0 -1 0 + 1276 426 1 -0.8472 8.02014 27.69985 5.68973 1 0 0 + 1277 426 2 0.4236 7.57052 27.13867 6.38461 1 0 0 + 1278 426 2 0.4236 7.73250 28.65199 5.79296 1 0 0 + 1279 427 1 -0.8472 25.07348 29.28113 32.08839 -1 0 0 + 1280 427 2 0.4236 25.90142 29.03034 32.58997 -1 0 0 + 1281 427 2 0.4236 24.38203 29.61190 32.73063 -1 0 0 + 1282 428 1 -0.8472 1.22361 34.16286 23.41071 1 -1 0 + 1283 428 2 0.4236 2.07526 34.49875 23.81300 1 -1 0 + 1284 428 2 0.4236 0.45459 34.41914 23.99626 1 -1 0 + 1285 429 1 -0.8472 32.55982 17.30341 1.33505 -1 0 0 + 1286 429 2 0.4236 32.05627 16.45897 1.51747 -1 0 0 + 1287 429 2 0.4236 32.12518 17.79418 0.57993 -1 0 0 + 1288 430 1 -0.8472 23.56130 32.19165 29.59188 0 0 0 + 1289 430 2 0.4236 23.54642 31.84067 30.52811 0 0 0 + 1290 430 2 0.4236 24.39254 32.72925 29.45063 0 0 0 + 1291 431 1 -0.8472 19.51922 6.96283 31.09761 0 0 0 + 1292 431 2 0.4236 19.36239 6.54737 30.20165 0 0 0 + 1293 431 2 0.4236 18.64261 7.22274 31.50252 0 0 0 + 1294 432 1 -0.8472 4.38539 5.20065 20.84759 0 0 0 + 1295 432 2 0.4236 4.95246 5.86004 20.35406 0 0 0 + 1296 432 2 0.4236 4.14576 5.57251 21.74441 0 0 0 + 1297 433 1 -0.8472 31.40867 11.19859 22.79106 0 0 0 + 1298 433 2 0.4236 30.95869 11.02820 21.91445 0 0 0 + 1299 433 2 0.4236 30.74030 11.11633 23.53034 0 0 0 + 1300 434 1 -0.8472 22.15699 13.64693 17.96846 0 0 0 + 1301 434 2 0.4236 21.97115 13.28502 17.05495 0 0 0 + 1302 434 2 0.4236 22.20251 14.64505 17.92862 0 0 0 + 1303 435 1 -0.8472 27.17581 16.07117 32.82215 -1 0 0 + 1304 435 2 0.4236 26.91651 16.04642 31.85667 -1 0 0 + 1305 435 2 0.4236 26.58410 16.71305 33.30983 -1 0 0 + 1306 436 1 -0.8472 15.66526 24.93973 32.39405 0 -1 0 + 1307 436 2 0.4236 15.85550 24.23681 33.07939 0 -1 0 + 1308 436 2 0.4236 15.76485 24.54877 31.47909 0 -1 0 + 1309 437 1 -0.8472 15.40880 32.12991 30.70836 1 0 0 + 1310 437 2 0.4236 16.32127 32.42798 30.98861 1 0 0 + 1311 437 2 0.4236 15.44004 31.80470 29.76327 1 0 0 + 1312 438 1 -0.8472 16.02646 35.51995 25.85561 1 -1 0 + 1313 438 2 0.4236 16.36022 34.65253 26.22458 1 -1 0 + 1314 438 2 0.4236 15.10674 35.39241 25.48440 1 -1 0 + 1315 439 1 -0.8472 22.60142 17.62162 10.57677 -1 1 0 + 1316 439 2 0.4236 22.16810 17.04837 9.88140 -1 1 0 + 1317 439 2 0.4236 21.98106 17.72970 11.35356 -1 1 0 + 1318 440 1 -0.8472 19.65290 1.47489 32.37803 0 0 0 + 1319 440 2 0.4236 19.94551 2.38837 32.09541 0 0 0 + 1320 440 2 0.4236 19.57422 0.88630 31.57349 0 0 0 + 1321 441 1 -0.8472 29.94701 28.28311 22.62910 -1 0 0 + 1322 441 2 0.4236 29.23937 27.58854 22.75866 -1 0 0 + 1323 441 2 0.4236 30.80353 27.84074 22.36342 -1 0 0 + 1324 442 1 -0.8472 1.27173 25.47080 15.54363 0 -1 0 + 1325 442 2 0.4236 1.03307 25.88871 14.66705 0 -1 0 + 1326 442 2 0.4236 0.46325 25.03048 15.93404 0 -1 0 + 1327 443 1 -0.8472 15.31637 29.31819 6.73777 0 0 0 + 1328 443 2 0.4236 14.94391 28.42485 6.98909 0 0 0 + 1329 443 2 0.4236 16.28023 29.36325 7.00015 0 0 0 + 1330 444 1 -0.8472 32.35725 35.03802 20.71803 0 -1 0 + 1331 444 2 0.4236 33.33712 35.09018 20.91062 0 -1 0 + 1332 444 2 0.4236 31.85345 34.94201 21.57646 0 -1 0 + 1333 445 1 -0.8472 16.00211 9.25317 19.85500 0 0 0 + 1334 445 2 0.4236 16.24217 9.66138 20.73572 0 0 0 + 1335 445 2 0.4236 15.43408 8.44423 20.00632 0 0 0 + 1336 446 1 -0.8472 0.16188 12.47022 34.77387 1 1 0 + 1337 446 2 0.4236 0.18865 12.21972 33.80616 1 1 0 + 1338 446 2 0.4236 1.08690 12.68233 35.08896 1 1 0 + 1339 447 1 -0.8472 10.87982 14.01780 18.67798 0 0 0 + 1340 447 2 0.4236 9.93453 14.26617 18.46646 0 0 0 + 1341 447 2 0.4236 11.22640 14.61264 19.40323 0 0 0 + 1342 448 1 -0.8472 10.15286 18.86839 10.84315 1 1 0 + 1343 448 2 0.4236 11.01993 18.43152 10.60388 1 1 0 + 1344 448 2 0.4236 9.39604 18.33981 10.45869 1 1 0 + 1345 449 1 -0.8472 27.86066 32.50244 21.02022 -1 0 0 + 1346 449 2 0.4236 27.45447 32.35015 20.11922 -1 0 0 + 1347 449 2 0.4236 28.30747 31.66339 21.33052 -1 0 0 + 1348 450 1 -0.8472 22.34922 4.76719 7.82422 0 1 0 + 1349 450 2 0.4236 23.25130 5.11188 7.56461 0 1 0 + 1350 450 2 0.4236 21.98578 5.31750 8.57588 0 1 0 + 1351 451 1 -0.8472 22.17357 31.29434 5.91224 0 -1 0 + 1352 451 2 0.4236 22.16509 30.44936 5.37759 0 -1 0 + 1353 451 2 0.4236 21.33321 31.35654 6.45064 0 -1 0 + 1354 452 1 -0.8472 30.13033 27.20667 12.21095 0 -1 0 + 1355 452 2 0.4236 30.05303 26.22797 12.02082 0 -1 0 + 1356 452 2 0.4236 31.05488 27.41186 12.53189 0 -1 0 + 1357 453 1 -0.8472 5.00071 18.67552 17.14077 0 1 0 + 1358 453 2 0.4236 4.29325 18.76947 17.84121 0 1 0 + 1359 453 2 0.4236 5.79076 19.23659 17.38766 0 1 0 + 1360 454 1 -0.8472 0.50513 15.22995 32.85253 0 -1 0 + 1361 454 2 0.4236 0.06619 14.95304 31.99779 0 -1 0 + 1362 454 2 0.4236 35.32108 15.30810 33.57172 -1 -1 0 + 1363 455 1 -0.8472 0.36336 21.48947 23.88549 1 -1 0 + 1364 455 2 0.4236 35.37583 21.67758 23.03656 0 -1 0 + 1365 455 2 0.4236 1.28632 21.17034 23.67043 1 -1 0 + 1366 456 1 -0.8472 8.03722 15.22335 26.84029 0 0 0 + 1367 456 2 0.4236 8.80880 15.78502 27.13887 0 0 0 + 1368 456 2 0.4236 7.19774 15.55391 27.27151 0 0 0 + 1369 457 1 -0.8472 34.68466 18.85053 10.89189 0 -1 0 + 1370 457 2 0.4236 0.02666 18.33065 10.79225 1 -1 0 + 1371 457 2 0.4236 34.83965 19.79809 10.61246 0 -1 0 + 1372 458 1 -0.8472 31.33961 22.90028 34.29431 0 0 0 + 1373 458 2 0.4236 32.01330 22.72538 33.57632 0 0 0 + 1374 458 2 0.4236 30.42440 22.68898 33.95121 0 0 0 + 1375 459 1 -0.8472 35.12721 20.42790 21.39380 -1 -1 0 + 1376 459 2 0.4236 35.36489 19.72054 22.05946 -1 -1 0 + 1377 459 2 0.4236 35.03195 20.01479 20.48816 -1 -1 0 + 1378 460 1 -0.8472 17.36832 12.96180 29.52925 0 0 0 + 1379 460 2 0.4236 17.38806 13.28729 28.58391 0 0 0 + 1380 460 2 0.4236 16.43280 12.70808 29.77490 0 0 0 + 1381 461 1 -0.8472 16.09606 4.35109 20.46593 0 1 0 + 1382 461 2 0.4236 16.85305 4.93396 20.17069 0 1 0 + 1383 461 2 0.4236 16.41625 3.72234 21.17452 0 1 0 + 1384 462 1 -0.8472 13.66607 33.47244 9.21024 0 -1 0 + 1385 462 2 0.4236 14.22920 33.27612 10.01291 0 -1 0 + 1386 462 2 0.4236 13.83657 32.78258 8.50669 0 -1 0 + 1387 463 1 -0.8472 25.16946 0.64360 29.23443 -1 1 0 + 1388 463 2 0.4236 24.70521 0.11676 29.94639 -1 1 0 + 1389 463 2 0.4236 25.62255 1.43400 29.64665 -1 1 0 +1390 464 1 -0.8472 24.81460 0.43732 0.69087 0 1 0 +1391 464 2 0.4236 25.28418 0.50225 1.57135 0 1 0 +1392 464 2 0.4236 25.37131 0.87260 35.43053 0 1 -1 + 1393 465 1 -0.8472 13.79635 23.63164 5.71664 1 0 0 + 1394 465 2 0.4236 13.80281 24.21398 4.90376 1 0 0 + 1395 465 2 0.4236 14.71198 23.60934 6.11797 1 0 0 + 1396 466 1 -0.8472 7.02681 26.64979 3.02480 0 0 0 + 1397 466 2 0.4236 7.59047 26.86453 3.82234 0 0 0 + 1398 466 2 0.4236 6.50426 25.81556 3.20083 0 0 0 + 1399 467 1 -0.8472 18.31755 10.37524 9.82001 0 -1 0 + 1400 467 2 0.4236 18.76024 10.64686 8.96548 0 -1 0 + 1401 467 2 0.4236 17.38714 10.74099 9.84429 0 -1 0 + 1402 468 1 -0.8472 22.32508 9.87101 1.19557 -2 1 0 + 1403 468 2 0.4236 21.56595 10.42438 0.85287 -2 1 0 + 1404 468 2 0.4236 21.96657 9.12144 1.75194 -2 1 0 + 1405 469 1 -0.8472 10.90773 22.43777 26.25786 0 -1 0 + 1406 469 2 0.4236 10.29364 22.43731 27.04706 0 -1 0 + 1407 469 2 0.4236 11.59943 21.72491 26.37335 0 -1 0 + 1408 470 1 -0.8472 1.31955 18.38600 3.47899 1 0 0 + 1409 470 2 0.4236 1.00358 17.95410 4.32374 1 0 0 + 1410 470 2 0.4236 1.03894 19.34578 3.47019 1 0 0 + 1411 471 1 -0.8472 6.61696 10.28455 21.35803 0 0 0 + 1412 471 2 0.4236 6.47810 10.37783 22.34389 0 0 0 + 1413 471 2 0.4236 6.98271 9.37573 21.15747 0 0 0 +1414 472 1 -0.8472 19.80189 1.74573 35.19601 0 0 0 +1415 472 2 0.4236 19.85469 1.68501 34.19927 0 0 0 +1416 472 2 0.4236 20.62333 2.19562 0.09930 0 0 1 + 1417 473 1 -0.8472 21.99977 23.12994 31.80630 0 0 0 + 1418 473 2 0.4236 21.08623 23.53105 31.73959 0 0 0 + 1419 473 2 0.4236 22.56169 23.68131 32.42287 0 0 0 + 1420 474 1 -0.8472 21.02839 21.40514 14.85156 0 0 0 + 1421 474 2 0.4236 20.68163 20.80512 15.57245 0 0 0 + 1422 474 2 0.4236 20.71991 21.06957 13.96151 0 0 0 + 1423 475 1 -0.8472 29.50475 13.09304 27.02263 -1 0 0 + 1424 475 2 0.4236 29.90288 12.69977 27.85135 -1 0 0 + 1425 475 2 0.4236 28.79000 13.74578 27.27360 -1 0 0 + 1426 476 1 -0.8472 30.76891 14.86132 17.31904 -1 0 0 + 1427 476 2 0.4236 30.43544 15.73971 17.66131 -1 0 0 + 1428 476 2 0.4236 29.99732 14.23769 17.19387 -1 0 0 + 1429 477 1 -0.8472 12.57397 32.15444 27.84788 0 0 0 + 1430 477 2 0.4236 12.58061 33.06419 27.43279 0 0 0 + 1431 477 2 0.4236 13.51414 31.83439 27.96447 0 0 0 + 1432 478 1 -0.8472 15.45030 20.13796 7.83369 0 0 0 + 1433 478 2 0.4236 16.08221 20.61942 7.22641 0 0 0 + 1434 478 2 0.4236 15.42577 19.16878 7.58860 0 0 0 + 1435 479 1 -0.8472 27.25616 6.25533 2.82631 0 1 0 + 1436 479 2 0.4236 27.49530 5.28459 2.80580 0 1 0 + 1437 479 2 0.4236 27.60427 6.66664 3.66868 0 1 0 + 1438 480 1 -0.8472 32.30705 10.32216 17.65366 0 0 0 + 1439 480 2 0.4236 32.98270 10.38259 16.91891 0 0 0 + 1440 480 2 0.4236 32.39596 9.44025 18.11653 0 0 0 + 1441 481 1 -0.8472 17.34936 14.89275 22.47125 0 0 0 + 1442 481 2 0.4236 18.03506 14.70169 21.76894 0 0 0 + 1443 481 2 0.4236 16.97988 15.81190 22.33499 0 0 0 + 1444 482 1 -0.8472 24.79053 15.57468 30.86227 0 1 0 + 1445 482 2 0.4236 23.87781 15.71532 31.24585 0 1 0 + 1446 482 2 0.4236 25.10405 14.65002 31.07836 0 1 0 + 1447 483 1 -0.8472 18.67769 24.83694 24.40387 1 -1 0 + 1448 483 2 0.4236 17.82202 25.24420 24.08463 1 -1 0 + 1449 483 2 0.4236 18.94221 24.09319 23.79003 1 -1 0 + 1450 484 1 -0.8472 4.57794 35.31046 30.69351 1 -1 0 + 1451 484 2 0.4236 4.13322 34.49598 30.32096 1 -1 0 + 1452 484 2 0.4236 5.54325 35.11397 30.86539 1 -1 0 + 1453 485 1 -0.8472 22.13661 7.03626 27.30735 0 0 0 + 1454 485 2 0.4236 21.73532 6.12073 27.28041 0 0 0 + 1455 485 2 0.4236 22.26947 7.36952 26.37395 0 0 0 + 1456 486 1 -0.8472 20.99558 25.62127 2.95624 0 0 0 + 1457 486 2 0.4236 21.65774 24.88498 2.81706 0 0 0 + 1458 486 2 0.4236 20.30686 25.59152 2.23185 0 0 0 + 1459 487 1 -0.8472 19.89257 8.75533 11.55086 -1 0 0 + 1460 487 2 0.4236 19.31087 9.22927 10.88984 -1 0 0 + 1461 487 2 0.4236 20.72914 9.28320 11.69740 -1 0 0 + 1462 488 1 -0.8472 35.31710 7.31729 4.49850 -1 1 0 + 1463 488 2 0.4236 34.87607 7.03125 3.64783 -1 1 0 + 1464 488 2 0.4236 0.48658 6.63223 4.77027 0 1 0 + 1465 489 1 -0.8472 1.93468 20.42936 32.73686 1 -1 0 + 1466 489 2 0.4236 1.67361 20.93781 31.91633 1 -1 0 + 1467 489 2 0.4236 1.21014 19.78158 32.97220 1 -1 0 + 1468 490 1 -0.8472 14.69430 26.31691 16.51917 0 0 0 + 1469 490 2 0.4236 14.31886 26.44843 17.43661 0 0 0 + 1470 490 2 0.4236 15.68539 26.19779 16.57854 0 0 0 + 1471 491 1 -0.8472 34.54384 29.00446 17.20468 -1 -1 0 + 1472 491 2 0.4236 0.02730 29.12415 17.12773 0 -1 0 + 1473 491 2 0.4236 34.29128 28.09553 16.87304 -1 -1 0 + 1474 492 1 -0.8472 19.16846 26.02402 7.57209 0 -1 0 + 1475 492 2 0.4236 19.48670 25.39677 6.86130 0 -1 0 + 1476 492 2 0.4236 19.88068 26.69918 7.76403 0 -1 0 +1477 493 1 -0.8472 5.88702 11.59786 0.07425 0 1 0 +1478 493 2 0.4236 6.66923 11.61288 34.89865 0 1 -1 +1479 493 2 0.4236 5.13610 12.12691 35.12622 0 1 -1 + 1480 494 1 -0.8472 33.54430 10.18553 28.65200 -1 1 0 + 1481 494 2 0.4236 33.04807 10.13149 27.78556 -1 1 0 + 1482 494 2 0.4236 32.90409 10.06601 29.41082 -1 1 0 + 1483 495 1 -0.8472 12.83483 20.75939 27.34453 0 -1 0 + 1484 495 2 0.4236 12.07365 20.74291 27.99282 0 -1 0 + 1485 495 2 0.4236 13.69810 20.81986 27.84554 0 -1 0 + 1486 496 1 -0.8472 30.94510 23.53453 7.01751 -1 0 0 + 1487 496 2 0.4236 30.81962 23.35913 7.99394 -1 0 0 + 1488 496 2 0.4236 30.83904 22.68007 6.50902 -1 0 0 + 1489 497 1 -0.8472 22.37756 28.64677 11.27235 0 0 0 + 1490 497 2 0.4236 23.14439 29.15394 11.66563 0 0 0 + 1491 497 2 0.4236 22.12411 29.05339 10.39464 0 0 0 + 1492 498 1 -0.8472 23.97854 11.36306 13.98019 0 0 0 + 1493 498 2 0.4236 24.09429 11.95722 14.77616 0 0 0 + 1494 498 2 0.4236 23.63647 11.90091 13.20971 0 0 0 + 1495 499 1 -0.8472 19.09521 19.82511 30.39699 1 -1 0 + 1496 499 2 0.4236 19.60036 19.35866 29.67089 1 -1 0 + 1497 499 2 0.4236 19.30682 19.39935 31.27672 1 -1 0 + 1498 500 1 -0.8472 35.19922 30.25080 30.67423 -1 0 0 + 1499 500 2 0.4236 35.11968 30.98319 31.35042 -1 0 0 + 1500 500 2 0.4236 0.64477 29.94936 30.61978 0 0 0 + 1501 501 1 -0.8472 3.50017 19.44054 27.89680 1 -1 0 + 1502 501 2 0.4236 2.76383 19.17197 28.51776 1 -1 0 + 1503 501 2 0.4236 4.10894 20.08431 28.36038 1 -1 0 + 1504 502 1 -0.8472 8.60624 18.32181 15.04127 1 0 0 + 1505 502 2 0.4236 9.52518 17.98407 14.83766 1 0 0 + 1506 502 2 0.4236 8.43680 18.25484 16.02450 1 0 0 + 1507 503 1 -0.8472 15.08821 12.02710 30.35400 0 0 0 + 1508 503 2 0.4236 14.28360 12.09424 30.94394 0 0 0 + 1509 503 2 0.4236 15.19533 11.08291 30.04259 0 0 0 + 1510 504 1 -0.8472 34.24491 30.19634 12.70342 -1 0 0 + 1511 504 2 0.4236 34.09586 30.85828 13.43799 -1 0 0 + 1512 504 2 0.4236 35.13854 29.76330 12.82128 -1 0 0 + 1513 505 1 -0.8472 16.03697 11.37886 34.59742 -1 0 0 + 1514 505 2 0.4236 15.95641 12.21333 34.05231 -1 0 0 + 1515 505 2 0.4236 16.98162 11.05206 34.56895 -1 0 0 + 1516 506 1 -0.8472 12.41504 19.77380 32.35963 0 -1 0 + 1517 506 2 0.4236 11.71571 19.77015 33.07439 0 -1 0 + 1518 506 2 0.4236 12.91731 20.63796 32.38916 0 -1 0 + 1519 507 1 -0.8472 16.36097 1.43366 13.60126 0 0 0 + 1520 507 2 0.4236 16.72807 2.34873 13.76804 0 0 0 + 1521 507 2 0.4236 15.44831 1.50881 13.19951 0 0 0 + 1522 508 1 -0.8472 3.93183 21.98716 35.05791 0 0 0 + 1523 508 2 0.4236 3.31515 22.73755 34.82010 0 0 0 + 1524 508 2 0.4236 3.41155 21.13561 35.12164 0 0 0 + 1525 509 1 -0.8472 3.71439 25.49750 16.61339 1 -1 0 + 1526 509 2 0.4236 3.62537 25.26586 17.58209 1 -1 0 + 1527 509 2 0.4236 2.80596 25.55275 16.19905 1 -1 0 + 1528 510 1 -0.8472 12.49813 4.72433 6.90178 1 1 0 + 1529 510 2 0.4236 12.68152 4.46705 5.95300 1 1 0 + 1530 510 2 0.4236 11.92587 5.54417 6.92011 1 1 0 + 1531 511 1 -0.8472 0.21426 15.49408 12.45830 0 1 0 + 1532 511 2 0.4236 0.76877 15.57901 11.63051 0 1 0 + 1533 511 2 0.4236 0.62502 14.81481 13.06644 0 1 0 + 1534 512 1 -0.8472 18.25090 16.03637 12.30365 0 -1 0 + 1535 512 2 0.4236 18.61740 15.18248 12.67308 0 -1 0 + 1536 512 2 0.4236 17.51187 16.36413 12.89214 0 -1 0 + 1537 513 1 -0.8472 26.90199 18.56808 6.14062 -1 0 0 + 1538 513 2 0.4236 27.18156 17.80093 6.71792 -1 0 0 + 1539 513 2 0.4236 26.92006 18.28708 5.18110 -1 0 0 + 1540 514 1 -0.8472 33.44158 4.98761 23.03192 0 0 0 + 1541 514 2 0.4236 32.49417 4.84516 23.31844 0 0 0 + 1542 514 2 0.4236 33.92571 4.11266 23.03447 0 0 0 + 1543 515 1 -0.8472 26.44129 7.53555 13.32226 1 0 0 + 1544 515 2 0.4236 26.54376 8.50657 13.53799 1 0 0 + 1545 515 2 0.4236 25.48592 7.34289 13.09834 1 0 0 + 1546 516 1 -0.8472 3.43874 25.26348 19.52892 1 0 0 + 1547 516 2 0.4236 4.41198 25.04174 19.46898 1 0 0 + 1548 516 2 0.4236 3.04847 24.83353 20.34304 1 0 0 + 1549 517 1 -0.8472 31.86517 26.77264 18.86319 0 0 0 + 1550 517 2 0.4236 31.00166 26.65635 19.35388 0 0 0 + 1551 517 2 0.4236 31.70046 26.70873 17.87892 0 0 0 + 1552 518 1 -0.8472 27.98216 0.07525 33.15709 -1 1 0 + 1553 518 2 0.4236 27.13107 0.52974 33.41972 -1 1 0 + 1554 518 2 0.4236 27.92184 35.28628 32.20363 -1 0 0 + 1555 519 1 -0.8472 12.50129 14.38728 2.64535 0 0 0 + 1556 519 2 0.4236 13.42438 14.05242 2.45638 0 0 0 + 1557 519 2 0.4236 12.09868 14.74756 1.80389 0 0 0 + 1558 520 1 -0.8472 35.34916 8.99351 30.23560 -1 0 0 + 1559 520 2 0.4236 34.73199 9.60837 29.74473 -1 0 0 + 1560 520 2 0.4236 35.06089 8.04691 30.09137 -1 0 0 + 1561 521 1 -0.8472 7.94220 25.31780 7.96523 0 0 0 + 1562 521 2 0.4236 8.06154 26.26412 8.26558 0 0 0 + 1563 521 2 0.4236 8.26247 24.69786 8.68151 0 0 0 + 1564 522 1 -0.8472 32.03791 28.47932 8.56656 -1 -1 0 + 1565 522 2 0.4236 31.56358 27.84276 7.95846 -1 -1 0 + 1566 522 2 0.4236 31.37036 29.07938 9.00727 -1 -1 0 + 1567 523 1 -0.8472 7.65336 14.67403 31.36041 0 0 0 + 1568 523 2 0.4236 8.40726 14.08956 31.06046 0 0 0 + 1569 523 2 0.4236 7.62694 15.49955 30.79666 0 0 0 + 1570 524 1 -0.8472 30.65441 5.02976 23.14808 0 0 0 + 1571 524 2 0.4236 30.30747 5.93609 23.38933 0 0 0 + 1572 524 2 0.4236 30.83112 4.99145 22.16460 0 0 0 + 1573 525 1 -0.8472 16.76986 18.16132 2.61590 1 0 0 + 1574 525 2 0.4236 17.48560 17.79983 2.01843 1 0 0 + 1575 525 2 0.4236 15.87769 17.83789 2.30066 1 0 0 + 1576 526 1 -0.8472 24.48759 17.42694 17.19380 0 0 0 + 1577 526 2 0.4236 23.53748 17.31084 17.48316 0 0 0 + 1578 526 2 0.4236 24.53815 17.39594 16.19557 0 0 0 + 1579 527 1 -0.8472 26.31972 10.56189 19.05712 0 0 0 + 1580 527 2 0.4236 25.49704 11.05068 19.34736 0 0 0 + 1581 527 2 0.4236 27.11059 11.16987 19.12656 0 0 0 + 1582 528 1 -0.8472 17.38870 17.66427 5.36716 0 0 0 + 1583 528 2 0.4236 17.21689 17.87159 4.40414 0 0 0 + 1584 528 2 0.4236 16.58704 17.91430 5.91011 0 0 0 + 1585 529 1 -0.8472 17.48244 20.84375 3.33225 0 1 0 + 1586 529 2 0.4236 17.37372 19.87819 3.09591 0 1 0 + 1587 529 2 0.4236 16.89165 21.39879 2.74671 0 1 0 +1588 530 1 -0.8472 30.70458 8.90567 0.58378 -1 0 0 +1589 530 2 0.4236 31.24449 8.89895 1.42547 -1 0 0 +1590 530 2 0.4236 31.26259 9.25839 35.27988 -1 0 -1 + 1591 531 1 -0.8472 17.24589 9.51645 26.97577 0 0 0 + 1592 531 2 0.4236 18.13025 9.65560 27.42124 0 0 0 + 1593 531 2 0.4236 17.05643 10.28431 26.36385 0 0 0 + 1594 532 1 -0.8472 26.71341 8.00338 33.00835 0 0 0 + 1595 532 2 0.4236 26.42681 7.26893 33.62347 0 0 0 + 1596 532 2 0.4236 26.31855 7.85233 32.10215 0 0 0 + 1597 533 1 -0.8472 2.78325 32.00510 13.26572 0 0 0 + 1598 533 2 0.4236 2.91507 31.36776 12.50655 0 0 0 + 1599 533 2 0.4236 1.96186 31.75034 13.77598 0 0 0 + 1600 534 1 -0.8472 7.54073 16.08292 21.84320 0 0 0 + 1601 534 2 0.4236 8.23534 16.76123 22.08271 0 0 0 + 1602 534 2 0.4236 6.93634 15.93418 22.62580 0 0 0 + 1603 535 1 -0.8472 3.58628 2.68780 31.31068 0 0 0 + 1604 535 2 0.4236 3.76967 1.76383 30.97517 0 0 0 + 1605 535 2 0.4236 3.86213 2.75509 32.26949 0 0 0 + 1606 536 1 -0.8472 6.00583 6.06839 35.24653 0 0 0 + 1607 536 2 0.4236 6.91369 6.48023 35.16836 0 0 0 + 1608 536 2 0.4236 5.68158 5.80167 34.33894 0 0 0 + 1609 537 1 -0.8472 10.80036 12.61686 27.53722 0 0 0 + 1610 537 2 0.4236 9.97750 12.15361 27.86624 0 0 0 + 1611 537 2 0.4236 10.98382 13.41653 28.10891 0 0 0 + 1612 538 1 -0.8472 5.91944 34.41204 7.66308 0 0 0 + 1613 538 2 0.4236 6.14214 34.84256 8.53770 0 0 0 + 1614 538 2 0.4236 6.75284 34.04363 7.25115 0 0 0 + 1615 539 1 -0.8472 33.12021 4.34118 33.43145 -1 1 0 + 1616 539 2 0.4236 32.94883 5.26438 33.08754 -1 1 0 + 1617 539 2 0.4236 33.99253 4.00863 33.07312 -1 1 0 + 1618 540 1 -0.8472 4.74684 32.25578 32.81988 0 0 0 + 1619 540 2 0.4236 5.05074 32.39468 31.87738 0 0 0 + 1620 540 2 0.4236 4.52930 33.13978 33.23362 0 0 0 + 1621 541 1 -0.8472 16.34368 0.38986 4.83953 0 0 0 + 1622 541 2 0.4236 16.19150 34.99317 4.43792 0 -1 0 + 1623 541 2 0.4236 17.20531 0.76550 4.49828 0 0 0 + 1624 542 1 -0.8472 29.76131 18.49380 11.69187 0 -1 0 + 1625 542 2 0.4236 29.61478 19.43603 11.99302 0 -1 0 + 1626 542 2 0.4236 29.83147 17.89584 12.49028 0 -1 0 + 1627 543 1 -0.8472 6.35805 20.23986 32.10952 1 0 0 + 1628 543 2 0.4236 5.57858 19.70794 32.44031 1 0 0 + 1629 543 2 0.4236 6.41383 21.09997 32.61649 1 0 0 + 1630 544 1 -0.8472 32.38857 33.76647 35.35730 0 -2 0 + 1631 544 2 0.4236 33.17635 34.34873 35.15652 0 -2 0 + 1632 544 2 0.4236 31.56884 34.33269 35.44322 0 -2 0 + 1633 545 1 -0.8472 33.53486 26.82508 15.67907 0 0 0 + 1634 545 2 0.4236 33.37107 27.59386 15.06094 0 0 0 + 1635 545 2 0.4236 33.49807 25.96909 15.16346 0 0 0 + 1636 546 1 -0.8472 10.26907 4.84569 26.02852 1 -1 0 + 1637 546 2 0.4236 9.72405 4.17803 26.53559 1 -1 0 + 1638 546 2 0.4236 9.95023 4.88603 25.08162 1 -1 0 + 1639 547 1 -0.8472 21.28403 12.99635 30.41007 0 0 0 + 1640 547 2 0.4236 20.58214 12.32606 30.65094 0 0 0 + 1641 547 2 0.4236 22.18941 12.60184 30.56679 0 0 0 + 1642 548 1 -0.8472 15.45481 8.34949 23.37232 0 1 0 + 1643 548 2 0.4236 15.34211 7.85035 22.51318 0 1 0 + 1644 548 2 0.4236 15.95691 9.19731 23.20178 0 1 0 + 1645 549 1 -0.8472 6.96958 34.41552 28.25021 0 0 0 + 1646 549 2 0.4236 7.79222 34.25461 28.79553 0 0 0 + 1647 549 2 0.4236 6.60968 35.32665 28.45087 0 0 0 + 1648 550 1 -0.8472 1.81120 22.89329 2.63042 1 0 0 + 1649 550 2 0.4236 1.51110 22.86467 1.67697 1 0 0 + 1650 550 2 0.4236 2.73105 23.28247 2.67879 1 0 0 + 1651 551 1 -0.8472 33.27708 8.93368 34.77738 -1 1 0 + 1652 551 2 0.4236 33.57818 8.11473 34.28892 -1 1 0 + 1653 551 2 0.4236 33.98756 9.21787 35.42114 -1 1 0 + 1654 552 1 -0.8472 11.27199 30.33037 3.53330 0 0 0 + 1655 552 2 0.4236 10.35333 30.48973 3.17189 0 0 0 + 1656 552 2 0.4236 11.25036 29.56038 4.17096 0 0 0 + 1657 553 1 -0.8472 24.96636 2.12275 18.90257 0 0 0 + 1658 553 2 0.4236 25.44410 2.99883 18.83795 0 0 0 + 1659 553 2 0.4236 25.45123 1.52498 19.54094 0 0 0 + 1660 554 1 -0.8472 27.58019 12.91742 22.80616 0 0 0 + 1661 554 2 0.4236 28.29124 13.45090 22.34814 0 0 0 + 1662 554 2 0.4236 26.90451 13.53665 23.20614 0 0 0 + 1663 555 1 -0.8472 34.68260 21.43958 8.60959 -1 0 0 + 1664 555 2 0.4236 35.08744 21.14186 7.74503 -1 0 0 + 1665 555 2 0.4236 35.34813 21.32323 9.34679 -1 0 0 + 1666 556 1 -0.8472 2.65962 24.63473 34.38402 0 0 0 + 1667 556 2 0.4236 2.57897 25.62078 34.23869 0 0 0 + 1668 556 2 0.4236 1.76410 24.25847 34.62159 0 0 0 + 1669 557 1 -0.8472 21.59833 20.27093 9.43207 0 0 0 + 1670 557 2 0.4236 21.32327 19.78101 10.25927 0 0 0 + 1671 557 2 0.4236 21.09950 19.90496 8.64649 0 0 0 + 1672 558 1 -0.8472 17.70144 4.33007 28.81474 0 0 0 + 1673 558 2 0.4236 18.33363 5.07425 28.59897 0 0 0 + 1674 558 2 0.4236 17.03534 4.23363 28.07517 0 0 0 +1675 559 1 -0.8472 33.59561 13.39591 0.69504 0 0 0 +1676 559 2 0.4236 32.66438 13.04141 0.61064 0 0 0 +1677 559 2 0.4236 34.13957 13.09357 35.35950 0 0 -1 + 1678 560 1 -0.8472 14.71291 15.98052 26.96475 1 0 0 + 1679 560 2 0.4236 14.68940 15.38014 27.76408 1 0 0 + 1680 560 2 0.4236 15.50516 16.58746 27.02696 1 0 0 + 1681 561 1 -0.8472 25.20926 21.95638 32.28218 0 0 0 + 1682 561 2 0.4236 25.33609 22.94246 32.17492 0 0 0 + 1683 561 2 0.4236 25.09606 21.73837 33.25152 0 0 0 + 1684 562 1 -0.8472 6.81526 3.83312 8.73036 0 1 0 + 1685 562 2 0.4236 7.62105 3.29226 8.48921 0 1 0 + 1686 562 2 0.4236 6.08089 3.22287 9.02737 0 1 0 + 1687 563 1 -0.8472 9.21702 7.78445 24.95624 0 0 0 + 1688 563 2 0.4236 9.47416 7.18840 25.71687 0 0 0 + 1689 563 2 0.4236 10.02681 8.26676 24.62226 0 0 0 + 1690 564 1 -0.8472 25.76586 24.56681 31.82123 0 0 0 + 1691 564 2 0.4236 25.20099 25.37507 31.65516 0 0 0 + 1692 564 2 0.4236 26.09305 24.20382 30.94877 0 0 0 + 1693 565 1 -0.8472 15.97743 35.01757 18.88740 0 0 0 + 1694 565 2 0.4236 15.03871 35.06053 19.22932 0 0 0 + 1695 565 2 0.4236 16.00030 35.32615 17.93653 0 0 0 + 1696 566 1 -0.8472 13.18216 8.82755 28.56636 0 1 0 + 1697 566 2 0.4236 12.35671 9.24546 28.94568 0 1 0 + 1698 566 2 0.4236 12.95644 7.93180 28.18339 0 1 0 + 1699 567 1 -0.8472 1.80194 1.01226 14.21230 0 1 0 + 1700 567 2 0.4236 2.18788 0.27894 14.77198 0 1 0 + 1701 567 2 0.4236 1.33221 0.61709 13.42293 0 1 0 + 1702 568 1 -0.8472 27.20550 9.56978 16.51573 -1 1 0 + 1703 568 2 0.4236 28.12206 9.17580 16.44728 -1 1 0 + 1704 568 2 0.4236 27.04703 9.88443 17.45157 -1 1 0 + 1705 569 1 -0.8472 22.64424 27.88338 17.70052 0 -1 0 + 1706 569 2 0.4236 23.43078 27.61638 17.14368 0 -1 0 + 1707 569 2 0.4236 22.38629 28.82476 17.48330 0 -1 0 + 1708 570 1 -0.8472 35.02158 17.75754 30.83771 0 0 0 + 1709 570 2 0.4236 35.30041 16.79972 30.90651 0 0 0 + 1710 570 2 0.4236 34.14333 17.81577 30.36307 0 0 0 + 1711 571 1 -0.8472 32.15586 2.34760 15.77797 0 1 0 + 1712 571 2 0.4236 31.26558 2.78947 15.88800 0 1 0 + 1713 571 2 0.4236 32.68395 2.83108 15.07987 0 1 0 +1714 572 1 -0.8472 17.34961 33.61287 35.05546 0 -1 0 +1715 572 2 0.4236 17.10728 34.46054 34.58359 0 -1 0 +1716 572 2 0.4236 18.19587 33.74839 0.12349 0 -1 1 + 1717 573 1 -0.8472 1.64640 29.18838 17.08087 0 0 0 + 1718 573 2 0.4236 2.48391 28.77481 16.72381 0 0 0 + 1719 573 2 0.4236 1.56160 28.98120 18.05545 0 0 0 + 1720 574 1 -0.8472 19.94612 29.25446 0.27014 0 0 0 + 1721 574 2 0.4236 19.17911 29.86414 0.07048 0 0 0 + 1722 574 2 0.4236 20.43600 29.58787 1.07563 0 0 0 + 1723 575 1 -0.8472 27.87603 8.50157 9.36777 -1 1 0 + 1724 575 2 0.4236 28.70979 7.95495 9.29035 -1 1 0 + 1725 575 2 0.4236 28.11733 9.45097 9.56858 -1 1 0 + 1726 576 1 -0.8472 9.83071 27.74860 10.85315 0 -1 0 + 1727 576 2 0.4236 9.99678 28.63555 11.28401 0 -1 0 + 1728 576 2 0.4236 10.41174 27.65689 10.04446 0 -1 0 + 1729 577 1 -0.8472 26.30076 18.46106 21.29522 0 0 0 + 1730 577 2 0.4236 27.23387 18.82014 21.31372 0 0 0 + 1731 577 2 0.4236 25.65252 19.21035 21.43056 0 0 0 + 1732 578 1 -0.8472 14.19228 25.99075 24.74448 0 0 0 + 1733 578 2 0.4236 13.37034 26.52353 24.94578 0 0 0 + 1734 578 2 0.4236 13.97910 25.01532 24.79992 0 0 0 + 1735 579 1 -0.8472 0.68976 8.97160 18.20142 0 0 0 + 1736 579 2 0.4236 1.50615 8.39601 18.15506 0 0 0 + 1737 579 2 0.4236 0.62225 9.38166 19.11096 0 0 0 + 1738 580 1 -0.8472 32.76423 11.76137 33.24131 0 0 0 + 1739 580 2 0.4236 33.62352 11.28392 33.05802 0 0 0 + 1740 580 2 0.4236 32.41726 11.49035 34.13912 0 0 0 + 1741 581 1 -0.8472 11.58373 29.93909 6.86949 0 0 0 + 1742 581 2 0.4236 10.77287 30.52328 6.83510 0 0 0 + 1743 581 2 0.4236 12.37620 30.48458 7.14222 0 0 0 + 1744 582 1 -0.8472 33.74122 13.45829 4.64075 -1 0 0 + 1745 582 2 0.4236 33.22265 14.06928 5.23885 -1 0 0 + 1746 582 2 0.4236 34.30148 14.00090 4.01492 -1 0 0 + 1747 583 1 -0.8472 20.83466 4.12619 19.87995 0 0 0 + 1748 583 2 0.4236 20.90699 4.49091 20.80821 0 0 0 + 1749 583 2 0.4236 21.52331 4.55806 19.29756 0 0 0 + 1750 584 1 -0.8472 25.28194 8.95363 23.55618 -1 0 0 + 1751 584 2 0.4236 25.07171 8.56157 22.66061 -1 0 0 + 1752 584 2 0.4236 26.10167 9.52213 23.48703 -1 0 0 + 1753 585 1 -0.8472 16.33729 1.45574 7.44614 0 0 0 + 1754 585 2 0.4236 15.53044 1.08269 7.90423 0 0 0 + 1755 585 2 0.4236 16.36871 1.12364 6.50346 0 0 0 + 1756 586 1 -0.8472 8.46319 10.81445 34.53439 0 0 0 + 1757 586 2 0.4236 8.54521 10.89899 33.54137 0 0 0 + 1758 586 2 0.4236 9.27543 11.20225 34.97011 0 0 0 + 1759 587 1 -0.8472 5.31409 12.69501 25.27016 0 1 0 + 1760 587 2 0.4236 5.23857 12.42388 26.22972 0 1 0 + 1761 587 2 0.4236 6.23790 13.03342 25.09115 0 1 0 +1762 588 1 -0.8472 28.51799 6.14980 35.24103 0 0 0 +1763 588 2 0.4236 28.05275 6.99734 0.04908 0 0 1 +1764 588 2 0.4236 29.45447 6.16511 0.14421 0 0 1 + 1765 589 1 -0.8472 7.79048 0.69800 16.22464 0 0 0 + 1766 589 2 0.4236 8.07389 0.82781 17.17477 0 0 0 + 1767 589 2 0.4236 8.56353 0.88323 15.61796 0 0 0 + 1768 590 1 -0.8472 21.68103 21.80441 29.46721 0 0 0 + 1769 590 2 0.4236 21.56755 21.92180 30.45375 0 0 0 + 1770 590 2 0.4236 22.63704 21.59233 29.26456 0 0 0 + 1771 591 1 -0.8472 20.54184 13.51645 22.88712 -1 0 0 + 1772 591 2 0.4236 20.07263 13.38529 23.76036 -1 0 0 + 1773 591 2 0.4236 21.43912 13.92704 23.04922 -1 0 0 + 1774 592 1 -0.8472 13.50917 24.41399 28.85132 0 -1 0 + 1775 592 2 0.4236 13.78505 25.37319 28.78968 0 -1 0 + 1776 592 2 0.4236 12.70570 24.26063 28.27612 0 -1 0 + 1777 593 1 -0.8472 10.69717 24.26781 31.92530 0 0 0 + 1778 593 2 0.4236 10.60386 23.69449 32.73927 0 0 0 + 1779 593 2 0.4236 11.64253 24.58417 31.84703 0 0 0 + 1780 594 1 -0.8472 15.95641 28.97606 35.05433 0 0 0 + 1781 594 2 0.4236 15.96032 28.35359 34.27173 0 0 0 + 1782 594 2 0.4236 16.63849 29.69350 34.91293 0 0 0 + 1783 595 1 -0.8472 1.56519 0.69624 33.04969 1 0 0 + 1784 595 2 0.4236 2.41404 1.17829 33.26655 1 0 0 + 1785 595 2 0.4236 1.02145 0.58791 33.88191 1 0 0 + 1786 596 1 -0.8472 26.14808 0.15636 10.03297 -1 0 0 + 1787 596 2 0.4236 25.35902 0.37673 9.45958 -1 0 0 + 1788 596 2 0.4236 26.26507 34.67035 10.07186 -1 -1 0 + 1789 597 1 -0.8472 9.77710 17.72509 3.30862 0 0 0 + 1790 597 2 0.4236 9.87566 17.93734 4.28081 0 0 0 + 1791 597 2 0.4236 9.23151 16.89378 3.20261 0 0 0 + 1792 598 1 -0.8472 8.75437 5.30451 3.09848 0 0 0 + 1793 598 2 0.4236 8.58717 5.03388 4.04651 0 0 0 + 1794 598 2 0.4236 9.12882 6.23147 3.07757 0 0 0 + 1795 599 1 -0.8472 20.48155 15.91696 9.33594 0 1 0 + 1796 599 2 0.4236 20.56631 15.50253 8.42984 0 1 0 + 1797 599 2 0.4236 20.25513 15.21003 10.00593 0 1 0 + 1798 600 1 -0.8472 16.82592 18.58235 26.17211 0 0 0 + 1799 600 2 0.4236 16.58729 18.45481 27.13479 0 0 0 + 1800 600 2 0.4236 17.21880 17.73656 25.81123 0 0 0 + 1801 601 1 -0.8472 13.75988 16.98609 22.32067 0 0 0 + 1802 601 2 0.4236 13.58551 17.90045 21.95528 0 0 0 + 1803 601 2 0.4236 13.59282 16.98375 23.30660 0 0 0 + 1804 602 1 -0.8472 32.62092 30.40547 6.88962 -1 -1 0 + 1805 602 2 0.4236 33.54931 30.43647 6.51938 -1 -1 0 + 1806 602 2 0.4236 32.51760 29.59252 7.46270 -1 -1 0 + 1807 603 1 -0.8472 17.63259 14.60870 27.18186 0 0 0 + 1808 603 2 0.4236 17.90163 15.20858 27.93536 0 0 0 + 1809 603 2 0.4236 17.69519 15.10944 26.31855 0 0 0 + 1810 604 1 -0.8472 11.62304 21.25939 16.47149 0 -1 0 + 1811 604 2 0.4236 11.45555 21.34865 15.48971 0 -1 0 + 1812 604 2 0.4236 12.53275 21.61367 16.68797 0 -1 0 + 1813 605 1 -0.8472 1.37600 22.27800 20.75203 1 -1 0 + 1814 605 2 0.4236 2.16943 21.85760 20.31195 1 -1 0 + 1815 605 2 0.4236 0.71462 21.56840 20.99487 1 -1 0 + 1816 606 1 -0.8472 7.18336 3.26655 24.36441 0 0 0 + 1817 606 2 0.4236 7.73090 3.12923 23.53899 0 0 0 + 1818 606 2 0.4236 6.93062 2.37846 24.74831 0 0 0 + 1819 607 1 -0.8472 17.64928 11.95310 5.42292 0 1 0 + 1820 607 2 0.4236 17.65692 12.93297 5.62238 0 1 0 + 1821 607 2 0.4236 17.41402 11.81051 4.46152 0 1 0 + 1822 608 1 -0.8472 12.84893 11.66550 32.14876 0 0 0 + 1823 608 2 0.4236 12.95939 10.67321 32.09304 0 0 0 + 1824 608 2 0.4236 12.82748 11.94512 33.10860 0 0 0 + 1825 609 1 -0.8472 28.12575 28.57384 6.21194 0 0 0 + 1826 609 2 0.4236 28.72740 27.81667 6.46617 0 0 0 + 1827 609 2 0.4236 28.67723 29.34738 5.89972 0 0 0 + 1828 610 1 -0.8472 9.60709 10.13056 3.09602 1 -1 0 + 1829 610 2 0.4236 9.17047 10.54496 3.89451 1 -1 0 + 1830 610 2 0.4236 8.91309 9.92399 2.40636 1 -1 0 + 1831 611 1 -0.8472 14.42399 9.53487 14.30475 0 1 0 + 1832 611 2 0.4236 13.60791 9.60745 14.87804 0 1 0 + 1833 611 2 0.4236 14.17935 9.71599 13.35221 0 1 0 + 1834 612 1 -0.8472 6.04272 31.14841 20.46104 0 0 0 + 1835 612 2 0.4236 6.17572 30.16410 20.34531 0 0 0 + 1836 612 2 0.4236 5.07705 31.33535 20.64129 0 0 0 + 1837 613 1 -0.8472 8.78576 13.58167 21.88541 0 1 0 + 1838 613 2 0.4236 8.51872 14.54379 21.93947 0 1 0 + 1839 613 2 0.4236 8.23602 13.12187 21.18806 0 1 0 + 1840 614 1 -0.8472 23.47264 35.27453 4.51530 0 -1 0 + 1841 614 2 0.4236 22.72332 35.48142 5.14431 0 -1 0 + 1842 614 2 0.4236 24.07799 34.59518 4.92999 0 -1 0 + 1843 615 1 -0.8472 22.09421 26.54415 21.45579 0 -1 0 + 1844 615 2 0.4236 22.63260 26.42361 22.28983 0 -1 0 + 1845 615 2 0.4236 22.48660 27.28439 20.90987 0 -1 0 + 1846 616 1 -0.8472 1.89433 19.06162 16.66270 0 0 0 + 1847 616 2 0.4236 1.86443 20.00623 16.33594 0 0 0 + 1848 616 2 0.4236 2.02229 19.05590 17.65444 0 0 0 + 1849 617 1 -0.8472 23.96341 29.62000 2.08747 0 -1 0 + 1850 617 2 0.4236 23.99764 29.18700 1.18675 0 -1 0 + 1851 617 2 0.4236 23.53567 30.52040 2.00840 0 -1 0 + 1852 618 1 -0.8472 1.04699 21.68909 30.59706 1 0 0 + 1853 618 2 0.4236 0.06322 21.75332 30.42968 1 0 0 + 1854 618 2 0.4236 1.52221 21.52537 29.73261 1 0 0 + 1855 619 1 -0.8472 13.73343 18.77132 16.05091 0 0 0 + 1856 619 2 0.4236 14.06321 19.15745 16.91235 0 0 0 + 1857 619 2 0.4236 13.14349 17.98673 16.24155 0 0 0 + 1858 620 1 -0.8472 15.02561 6.07506 33.93037 -1 0 0 + 1859 620 2 0.4236 14.69203 5.58795 33.12331 -1 0 0 + 1860 620 2 0.4236 16.00179 5.89373 34.04930 -1 0 0 + 1861 621 1 -0.8472 31.82004 4.72525 13.93145 -1 0 0 + 1862 621 2 0.4236 32.80133 4.70708 14.12290 -1 0 0 + 1863 621 2 0.4236 31.64404 4.28540 13.05084 -1 0 0 + 1864 622 1 -0.8472 24.24718 18.83076 7.32403 0 -1 0 + 1865 622 2 0.4236 24.38484 18.48542 8.25232 0 -1 0 + 1866 622 2 0.4236 25.05566 18.63064 6.77066 0 -1 0 + 1867 623 1 -0.8472 30.09284 6.70704 9.34689 0 1 0 + 1868 623 2 0.4236 30.69726 6.91436 10.11606 0 1 0 + 1869 623 2 0.4236 30.28333 5.78402 9.01266 0 1 0 + 1870 624 1 -0.8472 6.44543 22.20950 16.52672 1 0 0 + 1871 624 2 0.4236 6.63187 21.34098 16.98587 1 0 0 + 1872 624 2 0.4236 6.77340 22.16484 15.58312 1 0 0 + 1873 625 1 -0.8472 26.53478 4.89718 31.49008 0 1 0 + 1874 625 2 0.4236 26.41051 4.03196 31.00435 0 1 0 + 1875 625 2 0.4236 26.22715 5.65186 30.91066 0 1 0 + 1876 626 1 -0.8472 16.62247 30.95933 12.57652 1 0 0 + 1877 626 2 0.4236 17.56488 31.25972 12.42949 1 0 0 + 1878 626 2 0.4236 16.48769 30.74633 13.54423 1 0 0 + 1879 627 1 -0.8472 4.87356 34.61588 34.44684 1 0 0 + 1880 627 2 0.4236 5.82893 34.71196 34.72609 1 0 0 + 1881 627 2 0.4236 4.56619 35.46296 34.01332 1 0 0 + 1882 628 1 -0.8472 2.50288 12.28157 26.08722 0 0 0 + 1883 628 2 0.4236 3.13155 12.43414 25.32471 0 0 0 + 1884 628 2 0.4236 2.99882 11.86718 26.85029 0 0 0 + 1885 629 1 -0.8472 11.00864 34.29008 8.17472 1 0 0 + 1886 629 2 0.4236 10.75288 34.35239 9.13942 1 0 0 + 1887 629 2 0.4236 11.92072 33.88754 8.09702 1 0 0 + 1888 630 1 -0.8472 10.46049 16.76421 26.41355 1 0 0 + 1889 630 2 0.4236 10.39178 17.07209 27.36247 1 0 0 + 1890 630 2 0.4236 11.33817 17.05388 26.03185 1 0 0 + 1891 631 1 -0.8472 17.21021 4.69788 34.67997 0 0 0 + 1892 631 2 0.4236 18.05686 4.48907 34.19055 0 0 0 + 1893 631 2 0.4236 16.82710 3.85507 35.05788 0 0 0 + 1894 632 1 -0.8472 6.97884 35.13516 32.26371 1 0 0 + 1895 632 2 0.4236 7.59758 34.77477 32.96174 1 0 0 + 1896 632 2 0.4236 6.61568 0.51094 32.56360 1 1 0 + 1897 633 1 -0.8472 30.26859 4.69039 18.04698 -1 1 0 + 1898 633 2 0.4236 29.55779 4.00235 17.90097 -1 1 0 + 1899 633 2 0.4236 30.81486 4.44085 18.84653 -1 1 0 + 1900 634 1 -0.8472 14.15940 29.63583 31.68196 0 0 0 + 1901 634 2 0.4236 14.48471 30.44261 31.18878 0 0 0 + 1902 634 2 0.4236 13.52149 29.12674 31.10417 0 0 0 + 1903 635 1 -0.8472 22.40695 9.51538 9.73709 0 -1 0 + 1904 635 2 0.4236 22.71650 9.39313 10.68006 0 -1 0 + 1905 635 2 0.4236 23.02803 9.03544 9.11755 0 -1 0 +1906 636 1 -0.8472 22.24110 0.13405 35.41380 0 1 0 +1907 636 2 0.4236 23.18710 0.36198 0.19705 0 1 1 +1908 636 2 0.4236 21.82447 35.13999 0.72551 0 0 1 + 1909 637 1 -0.8472 30.80385 21.12738 11.62863 -1 0 0 + 1910 637 2 0.4236 31.14074 21.74078 10.91430 -1 0 0 + 1911 637 2 0.4236 31.43501 20.35877 11.73284 -1 0 0 + 1912 638 1 -0.8472 27.44982 5.23264 21.39756 -1 1 0 + 1913 638 2 0.4236 27.87749 4.69834 22.12667 -1 1 0 + 1914 638 2 0.4236 26.53230 5.51030 21.68213 -1 1 0 + 1915 639 1 -0.8472 34.24917 16.52998 18.53573 0 0 0 + 1916 639 2 0.4236 34.91854 15.83455 18.79704 0 0 0 + 1917 639 2 0.4236 33.88140 16.31527 17.63097 0 0 0 + 1918 640 1 -0.8472 32.11496 35.09444 16.48223 -1 -1 0 + 1919 640 2 0.4236 32.98099 34.62132 16.64370 -1 -1 0 + 1920 640 2 0.4236 32.28074 0.41008 15.93745 -1 0 0 + 1921 641 1 -0.8472 5.27734 31.52491 24.59110 0 0 0 + 1922 641 2 0.4236 5.60492 31.56543 25.53502 0 0 0 + 1923 641 2 0.4236 5.51573 32.37348 24.11884 0 0 0 + 1924 642 1 -0.8472 25.79032 25.41548 18.29376 -1 -1 0 + 1925 642 2 0.4236 25.40295 24.65387 17.77428 -1 -1 0 + 1926 642 2 0.4236 25.77416 26.24352 17.73341 -1 -1 0 + 1927 643 1 -0.8472 4.93641 22.51784 12.73054 0 0 0 + 1928 643 2 0.4236 4.69948 21.69044 13.23963 0 0 0 + 1929 643 2 0.4236 4.10361 23.03009 12.52080 0 0 0 + 1930 644 1 -0.8472 12.37112 3.40763 24.86826 0 1 0 + 1931 644 2 0.4236 11.49379 3.77028 25.18239 0 1 0 + 1932 644 2 0.4236 12.78779 4.05198 24.22706 0 1 0 + 1933 645 1 -0.8472 17.22029 21.06776 32.22767 0 -1 0 + 1934 645 2 0.4236 16.31836 21.34141 31.89361 0 -1 0 + 1935 645 2 0.4236 17.79546 20.80136 31.45424 0 -1 0 + 1936 646 1 -0.8472 25.41708 13.65890 27.43081 -1 1 0 + 1937 646 2 0.4236 25.98599 14.41622 27.11030 -1 1 0 + 1938 646 2 0.4236 25.01532 13.18819 26.64533 -1 1 0 + 1939 647 1 -0.8472 31.34632 0.92208 6.09316 0 0 0 + 1940 647 2 0.4236 31.49282 0.15259 5.47156 0 0 0 + 1941 647 2 0.4236 31.97499 1.66376 5.85935 0 0 0 + 1942 648 1 -0.8472 14.52004 27.14727 0.85218 -1 0 0 + 1943 648 2 0.4236 15.06648 27.88580 0.45734 -1 0 0 + 1944 648 2 0.4236 14.58562 27.18061 1.84945 -1 0 0 + 1945 649 1 -0.8472 28.87721 13.80291 31.40189 -1 0 0 + 1946 649 2 0.4236 29.22211 14.24724 32.22866 -1 0 0 + 1947 649 2 0.4236 28.79132 14.47981 30.67082 -1 0 0 + 1948 650 1 -0.8472 32.29796 1.69820 30.01991 0 -1 0 + 1949 650 2 0.4236 33.00137 1.81610 29.31905 0 -1 0 + 1950 650 2 0.4236 31.71924 2.51309 30.05174 0 -1 0 + 1951 651 1 -0.8472 12.62275 8.26297 20.33641 0 0 0 + 1952 651 2 0.4236 12.83214 8.94927 21.03291 0 0 0 + 1953 651 2 0.4236 12.11033 8.68982 19.59131 0 0 0 + 1954 652 1 -0.8472 12.52870 25.44736 7.87215 0 -1 0 + 1955 652 2 0.4236 13.00949 24.63086 8.19160 0 -1 0 + 1956 652 2 0.4236 11.64782 25.18323 7.47946 0 -1 0 + 1957 653 1 -0.8472 1.10135 20.97932 6.76187 1 1 0 + 1958 653 2 0.4236 0.77452 21.00470 5.81713 1 1 0 + 1959 653 2 0.4236 1.95251 21.49916 6.83418 1 1 0 + 1960 654 1 -0.8472 4.82318 0.41033 13.47479 0 0 0 + 1961 654 2 0.4236 4.34431 1.17994 13.05247 0 0 0 + 1962 654 2 0.4236 4.19429 35.42103 14.07377 0 -1 0 + 1963 655 1 -0.8472 7.97884 14.32280 18.39989 0 0 0 + 1964 655 2 0.4236 7.48239 15.14935 18.66497 0 0 0 + 1965 655 2 0.4236 7.76346 13.58505 19.03968 0 0 0 + 1966 656 1 -0.8472 6.57446 10.83838 7.69395 0 0 0 + 1967 656 2 0.4236 6.93009 11.43436 6.97402 0 0 0 + 1968 656 2 0.4236 5.66493 11.15166 7.96697 0 0 0 + 1969 657 1 -0.8472 10.13095 13.45872 3.45462 0 1 0 + 1970 657 2 0.4236 9.41951 14.02714 3.04153 0 1 0 + 1971 657 2 0.4236 11.02593 13.74220 3.11019 0 1 0 + 1972 658 1 -0.8472 2.78532 23.98202 22.68429 0 0 0 + 1973 658 2 0.4236 2.24782 23.30083 22.18728 0 0 0 + 1974 658 2 0.4236 2.17788 24.69474 23.03500 0 0 0 + 1975 659 1 -0.8472 29.67656 34.06660 9.42289 -1 0 0 + 1976 659 2 0.4236 29.37866 33.82615 10.34668 -1 0 0 + 1977 659 2 0.4236 30.23579 34.89486 9.45798 -1 0 0 + 1978 660 1 -0.8472 17.39594 25.01387 9.24906 0 0 0 + 1979 660 2 0.4236 18.05931 25.56908 8.74748 0 0 0 + 1980 660 2 0.4236 17.77142 24.09901 9.39751 0 0 0 + 1981 661 1 -0.8472 11.13962 14.07290 32.95291 1 1 0 + 1982 661 2 0.4236 12.10521 14.31041 33.05855 1 1 0 + 1983 661 2 0.4236 10.89910 13.35632 33.60762 1 1 0 + 1984 662 1 -0.8472 1.12560 32.01749 27.53520 1 -1 0 + 1985 662 2 0.4236 0.50802 31.29622 27.84873 1 -1 0 + 1986 662 2 0.4236 1.59583 31.71636 26.70563 1 -1 0 + 1987 663 1 -0.8472 16.74625 10.36654 22.14588 0 0 0 + 1988 663 2 0.4236 17.64843 10.13447 22.50939 0 0 0 + 1989 663 2 0.4236 16.51070 11.30163 22.41056 0 0 0 + 1990 664 1 -0.8472 3.76112 22.81755 16.72253 1 0 0 + 1991 664 2 0.4236 3.76488 23.70592 16.26345 1 0 0 + 1992 664 2 0.4236 4.62662 22.34826 16.54749 1 0 0 + 1993 665 1 -0.8472 1.85948 2.74210 27.37838 0 0 0 + 1994 665 2 0.4236 2.54531 2.13125 27.77390 0 0 0 + 1995 665 2 0.4236 2.26198 3.24393 26.61279 0 0 0 + 1996 666 1 -0.8472 20.97424 33.57107 23.88091 0 -1 0 + 1997 666 2 0.4236 21.63334 32.88392 24.18640 0 -1 0 + 1998 666 2 0.4236 21.20496 33.86510 22.95340 0 -1 0 + 1999 667 1 -0.8472 14.93408 6.66163 21.35215 0 0 0 + 2000 667 2 0.4236 14.05135 6.86086 20.92664 0 0 0 + 2001 667 2 0.4236 15.24543 5.75568 21.06534 0 0 0 + 2002 668 1 -0.8472 22.24661 5.18993 17.87120 -1 0 0 + 2003 668 2 0.4236 21.88334 5.84047 17.20429 -1 0 0 + 2004 668 2 0.4236 23.18057 5.45019 18.11607 -1 0 0 + 2005 669 1 -0.8472 31.73682 29.92390 26.37363 0 0 0 + 2006 669 2 0.4236 32.14422 30.71878 26.82324 0 0 0 + 2007 669 2 0.4236 32.44996 29.40671 25.90048 0 0 0 + 2008 670 1 -0.8472 24.55434 23.28950 6.20609 0 0 0 + 2009 670 2 0.4236 25.36818 22.74753 5.99656 0 0 0 + 2010 670 2 0.4236 24.07519 22.88402 6.98448 0 0 0 + 2011 671 1 -0.8472 25.88342 13.36903 31.69745 -1 0 0 + 2012 671 2 0.4236 26.03190 12.91533 30.81878 -1 0 0 + 2013 671 2 0.4236 26.76589 13.60848 32.10225 -1 0 0 + 2014 672 1 -0.8472 31.90813 10.22292 30.85168 0 0 0 + 2015 672 2 0.4236 32.27321 10.76208 31.61060 0 0 0 + 2016 672 2 0.4236 31.57679 9.34449 31.19597 0 0 0 + 2017 673 1 -0.8472 0.84917 3.66386 11.68793 1 0 0 + 2018 673 2 0.4236 0.87147 4.59942 12.04035 1 0 0 + 2019 673 2 0.4236 0.11734 3.57978 11.01167 1 0 0 + 2020 674 1 -0.8472 12.64903 6.40652 27.25223 0 0 0 + 2021 674 2 0.4236 11.96507 5.83731 26.79599 0 0 0 + 2022 674 2 0.4236 12.95893 7.12172 26.62584 0 0 0 + 2023 675 1 -0.8472 15.96014 7.99372 15.88506 0 0 0 + 2024 675 2 0.4236 16.82916 7.82162 15.42119 0 0 0 + 2025 675 2 0.4236 15.41302 8.63081 15.34222 0 0 0 + 2026 676 1 -0.8472 20.03414 20.13508 12.66468 0 0 0 + 2027 676 2 0.4236 19.40056 20.36704 11.92663 0 0 0 + 2028 676 2 0.4236 20.38174 19.20773 12.52643 0 0 0 + 2029 677 1 -0.8472 21.35607 6.30596 10.13191 -1 -1 0 + 2030 677 2 0.4236 20.87120 5.49454 10.45802 -1 -1 0 + 2031 677 2 0.4236 21.92900 6.66958 10.86641 -1 -1 0 + 2032 678 1 -0.8472 35.15594 30.93388 9.83376 0 -1 0 + 2033 678 2 0.4236 0.35036 31.64684 9.85606 1 -1 0 + 2034 678 2 0.4236 34.54498 31.04238 10.61796 0 -1 0 + 2035 679 1 -0.8472 4.27599 27.25591 26.29171 1 0 0 + 2036 679 2 0.4236 3.35993 27.34560 25.90091 1 0 0 + 2037 679 2 0.4236 4.46769 28.04433 26.87613 1 0 0 + 2038 680 1 -0.8472 26.85910 19.33388 13.68598 0 0 0 + 2039 680 2 0.4236 25.94374 19.21433 14.07041 0 0 0 + 2040 680 2 0.4236 27.54078 19.00690 14.34044 0 0 0 + 2041 681 1 -0.8472 7.83799 28.18316 15.83373 0 -1 0 + 2042 681 2 0.4236 7.63358 27.28088 16.21326 0 -1 0 + 2043 681 2 0.4236 7.00487 28.73603 15.82129 0 -1 0 + 2044 682 1 -0.8472 32.63008 18.22477 29.78603 0 1 0 + 2045 682 2 0.4236 32.15689 17.45297 29.36130 0 1 0 + 2046 682 2 0.4236 31.95728 18.87141 30.14536 0 1 0 + 2047 683 1 -0.8472 3.25697 33.47986 7.39333 -1 -1 0 + 2048 683 2 0.4236 4.14306 33.83996 7.68509 -1 -1 0 + 2049 683 2 0.4236 3.20470 33.49200 6.39478 -1 -1 0 + 2050 684 1 -0.8472 0.84315 3.50002 3.05779 0 0 0 + 2051 684 2 0.4236 1.36600 4.15296 3.60572 0 0 0 + 2052 684 2 0.4236 1.42306 2.71869 2.82722 0 0 0 + 2053 685 1 -0.8472 25.12323 15.97604 21.47090 0 0 0 + 2054 685 2 0.4236 25.42059 15.67903 22.37827 0 0 0 + 2055 685 2 0.4236 25.51738 16.87233 21.26778 0 0 0 + 2056 686 1 -0.8472 7.27468 22.21053 14.03439 0 0 0 + 2057 686 2 0.4236 7.89057 21.43472 13.89746 0 0 0 + 2058 686 2 0.4236 6.46872 22.10302 13.45235 0 0 0 + 2059 687 1 -0.8472 14.24074 9.72792 11.56220 0 1 0 + 2060 687 2 0.4236 13.63511 9.58057 10.78023 0 1 0 + 2061 687 2 0.4236 15.02007 10.28708 11.27947 0 1 0 + 2062 688 1 -0.8472 24.56624 34.10605 22.50422 0 -1 0 + 2063 688 2 0.4236 24.42631 33.16115 22.20827 0 -1 0 + 2064 688 2 0.4236 24.89936 34.11414 23.44704 0 -1 0 + 2065 689 1 -0.8472 28.18228 24.21568 14.50155 0 0 0 + 2066 689 2 0.4236 28.15529 24.11183 15.49574 0 0 0 + 2067 689 2 0.4236 27.53670 23.57749 14.08211 0 0 0 + 2068 690 1 -0.8472 35.20714 9.78963 0.99118 0 1 0 + 2069 690 2 0.4236 0.60853 10.16753 0.80907 1 1 0 + 2070 690 2 0.4236 34.53749 10.53157 1.02295 0 1 0 + 2071 691 1 -0.8472 0.69131 26.23859 12.99395 0 0 0 + 2072 691 2 0.4236 0.05017 25.81851 12.35175 0 0 0 + 2073 691 2 0.4236 0.86619 27.18423 12.71973 0 0 0 + 2074 692 1 -0.8472 22.19338 29.11773 4.33016 0 -1 0 + 2075 692 2 0.4236 21.46426 28.43597 4.38932 0 -1 0 + 2076 692 2 0.4236 22.95489 28.74612 3.79919 0 -1 0 + 2077 693 1 -0.8472 17.91530 28.67983 14.99455 0 0 0 + 2078 693 2 0.4236 18.48897 28.40781 15.76712 0 0 0 + 2079 693 2 0.4236 17.45208 27.87490 14.62374 0 0 0 + 2080 694 1 -0.8472 12.79492 25.77029 32.65179 0 -1 0 + 2081 694 2 0.4236 13.77749 25.61527 32.75437 0 -1 0 + 2082 694 2 0.4236 12.43237 26.17705 33.49026 0 -1 0 + 2083 695 1 -0.8472 30.87195 23.17070 13.46252 0 0 0 + 2084 695 2 0.4236 30.40061 23.03858 14.33449 0 0 0 + 2085 695 2 0.4236 30.94240 22.29458 12.98565 0 0 0 + 2086 696 1 -0.8472 9.82436 23.58229 1.74889 0 0 0 + 2087 696 2 0.4236 9.70115 23.45578 0.76463 0 0 0 + 2088 696 2 0.4236 10.38990 22.84180 2.11190 0 0 0 + 2089 697 1 -0.8472 6.89586 12.57425 5.59544 1 0 0 + 2090 697 2 0.4236 7.86359 12.41511 5.40009 1 0 0 + 2091 697 2 0.4236 6.36472 12.47100 4.75450 1 0 0 + 2092 698 1 -0.8472 11.02525 29.55403 32.81425 0 -1 0 + 2093 698 2 0.4236 11.59857 29.39549 33.61808 0 -1 0 + 2094 698 2 0.4236 11.36970 29.01280 32.04720 0 -1 0 + 2095 699 1 -0.8472 5.68577 15.11644 32.97163 1 0 0 + 2096 699 2 0.4236 6.45292 15.18049 32.33340 1 0 0 + 2097 699 2 0.4236 5.80866 15.78136 33.70833 1 0 0 + 2098 700 1 -0.8472 21.25974 27.21306 29.97592 0 0 0 + 2099 700 2 0.4236 21.13419 27.98997 30.59288 0 0 0 + 2100 700 2 0.4236 20.57820 27.25410 29.24532 0 0 0 + 2101 701 1 -0.8472 6.19813 8.13823 30.34241 0 0 0 + 2102 701 2 0.4236 7.03828 7.67736 30.05652 0 0 0 + 2103 701 2 0.4236 5.46127 7.46723 30.42450 0 0 0 + 2104 702 1 -0.8472 32.41076 28.40941 3.86814 0 0 0 + 2105 702 2 0.4236 32.55062 27.42269 3.95038 0 0 0 + 2106 702 2 0.4236 31.47031 28.63505 4.12222 0 0 0 + 2107 703 1 -0.8472 23.98855 26.62099 31.21987 0 0 0 + 2108 703 2 0.4236 23.15933 26.86421 30.71666 0 0 0 + 2109 703 2 0.4236 24.52935 27.44488 31.38923 0 0 0 + 2110 704 1 -0.8472 28.50283 29.57437 20.87556 -1 -1 0 + 2111 704 2 0.4236 29.24214 30.01036 20.36250 -1 -1 0 + 2112 704 2 0.4236 28.88225 29.10445 21.67252 -1 -1 0 + 2113 705 1 -0.8472 27.75031 21.27721 18.51655 0 0 0 + 2114 705 2 0.4236 27.38498 20.41242 18.17211 0 0 0 + 2115 705 2 0.4236 28.28475 21.10710 19.34442 0 0 0 + 2116 706 1 -0.8472 25.25588 27.43813 16.54983 0 0 0 + 2117 706 2 0.4236 25.68771 28.33889 16.59591 0 0 0 + 2118 706 2 0.4236 24.90231 27.28485 15.62711 0 0 0 + 2119 707 1 -0.8472 5.61274 2.12353 21.50202 0 1 0 + 2120 707 2 0.4236 4.74517 2.16269 21.99775 0 1 0 + 2121 707 2 0.4236 5.95246 1.18305 21.49858 0 1 0 + 2122 708 1 -0.8472 14.20520 17.29851 2.13547 -1 0 0 + 2123 708 2 0.4236 13.44849 17.62485 1.56903 -1 0 0 + 2124 708 2 0.4236 13.92488 17.29329 3.09534 -1 0 0 +2125 709 1 -0.8472 33.77325 2.92399 0.15598 -1 1 0 +2126 709 2 0.4236 33.43998 3.50499 34.86065 -1 1 -1 +2127 709 2 0.4236 33.65455 3.39756 1.02868 -1 1 0 + 2128 710 1 -0.8472 0.22885 13.68528 9.35288 0 0 0 + 2129 710 2 0.4236 0.61334 13.37045 10.22063 0 0 0 + 2130 710 2 0.4236 0.84262 13.43233 8.60505 0 0 0 + 2131 711 1 -0.8472 27.57011 24.36623 33.91899 0 0 0 + 2132 711 2 0.4236 26.97918 24.28932 33.11594 0 0 0 + 2133 711 2 0.4236 28.12870 23.54099 34.00201 0 0 0 + 2134 712 1 -0.8472 18.75243 23.43472 22.11490 0 1 0 + 2135 712 2 0.4236 17.78133 23.32273 21.90431 0 1 0 + 2136 712 2 0.4236 19.23205 23.77381 21.30561 0 1 0 + 2137 713 1 -0.8472 2.29530 10.87158 1.51153 0 1 0 + 2138 713 2 0.4236 2.47430 11.79162 1.86004 0 1 0 + 2139 713 2 0.4236 2.87595 10.21436 1.99197 0 1 0 + 2140 714 1 -0.8472 25.61886 25.89666 25.24432 0 -1 0 + 2141 714 2 0.4236 25.42787 26.64268 25.88223 0 -1 0 + 2142 714 2 0.4236 26.42453 25.39162 25.55370 0 -1 0 + 2143 715 1 -0.8472 16.92797 16.32560 9.80037 0 0 0 + 2144 715 2 0.4236 17.19604 17.12020 9.25562 0 0 0 + 2145 715 2 0.4236 17.34592 16.38653 10.70675 0 0 0 + 2146 716 1 -0.8472 10.47600 17.21124 29.11058 1 0 0 + 2147 716 2 0.4236 10.94213 18.08313 29.26056 1 0 0 + 2148 716 2 0.4236 10.16834 16.84254 29.98769 1 0 0 + 2149 717 1 -0.8472 16.06644 22.36974 1.69499 0 0 0 + 2150 717 2 0.4236 15.33260 23.01429 1.48056 0 0 0 + 2151 717 2 0.4236 16.89555 22.63246 1.20148 0 0 0 + 2152 718 1 -0.8472 16.33203 27.58130 32.80553 0 0 0 + 2153 718 2 0.4236 15.97264 26.66864 32.61096 0 0 0 + 2154 718 2 0.4236 15.82791 28.25908 32.27034 0 0 0 + 2155 719 1 -0.8472 20.49220 11.62449 35.26514 1 0 0 + 2156 719 2 0.4236 21.01717 12.11061 34.56651 1 0 0 + 2157 719 2 0.4236 19.68795 11.20396 34.84526 1 0 0 + 2158 720 1 -0.8472 30.40952 26.57771 6.51282 0 0 0 + 2159 720 2 0.4236 30.16665 26.78894 5.56606 0 0 0 + 2160 720 2 0.4236 30.45919 25.58598 6.63086 0 0 0 + 2161 721 1 -0.8472 12.37322 16.37428 4.55968 0 0 0 + 2162 721 2 0.4236 12.38784 15.52288 4.03541 0 0 0 + 2163 721 2 0.4236 11.65794 16.97416 4.20127 0 0 0 + 2164 722 1 -0.8472 33.56731 11.90620 21.46299 0 0 0 + 2165 722 2 0.4236 33.23117 12.42030 20.67390 0 0 0 + 2166 722 2 0.4236 32.79888 11.66522 22.05577 0 0 0 + 2167 723 1 -0.8472 31.32107 31.23181 1.41386 -1 0 0 + 2168 723 2 0.4236 31.49725 32.04700 0.86213 -1 0 0 + 2169 723 2 0.4236 31.18817 30.44435 0.81204 -1 0 0 + 2170 724 1 -0.8472 28.87096 19.63852 21.22815 -1 -1 0 + 2171 724 2 0.4236 29.73458 19.39950 20.78432 -1 -1 0 + 2172 724 2 0.4236 28.83879 20.62564 21.38486 -1 -1 0 + 2173 725 1 -0.8472 4.42927 23.17098 25.42492 -1 -1 0 + 2174 725 2 0.4236 3.94617 23.57806 24.64980 -1 -1 0 + 2175 725 2 0.4236 4.55071 22.19140 25.26477 -1 -1 0 + 2176 726 1 -0.8472 24.00712 31.99530 18.18540 -1 0 0 + 2177 726 2 0.4236 23.23226 32.61152 18.04443 -1 0 0 + 2178 726 2 0.4236 23.69523 31.04742 18.12064 -1 0 0 + 2179 727 1 -0.8472 12.59691 11.80803 19.01561 -1 0 0 + 2180 727 2 0.4236 12.20861 11.09527 18.43151 -1 0 0 + 2181 727 2 0.4236 12.30089 12.70527 18.68815 -1 0 0 + 2182 728 1 -0.8472 22.60920 27.90494 24.82016 0 0 0 + 2183 728 2 0.4236 23.54351 28.24544 24.92530 0 0 0 + 2184 728 2 0.4236 22.02693 28.30545 25.52765 0 0 0 + 2185 729 1 -0.8472 10.89154 10.44597 15.79910 0 1 0 + 2186 729 2 0.4236 10.71507 9.97810 14.93312 0 1 0 + 2187 729 2 0.4236 10.96922 11.42960 15.63671 0 1 0 + 2188 730 1 -0.8472 0.08050 9.79588 3.64393 1 0 0 + 2189 730 2 0.4236 35.44276 8.87250 3.99968 0 0 0 + 2190 730 2 0.4236 0.10043 9.76868 2.64453 1 0 0 + 2191 731 1 -0.8472 30.40682 21.08786 5.84641 -1 -1 0 + 2192 731 2 0.4236 30.08055 20.97761 4.90763 -1 -1 0 + 2193 731 2 0.4236 30.13488 20.29333 6.38928 -1 -1 0 + 2194 732 1 -0.8472 24.67265 21.92020 3.54047 0 0 0 + 2195 732 2 0.4236 24.31684 22.84343 3.39577 0 0 0 + 2196 732 2 0.4236 25.25080 21.90987 4.35632 0 0 0 + 2197 733 1 -0.8472 28.95227 32.91147 27.71368 -1 0 0 + 2198 733 2 0.4236 28.22236 33.56969 27.89800 -1 0 0 + 2199 733 2 0.4236 29.69126 33.36429 27.21490 -1 0 0 + 2200 734 1 -0.8472 30.03521 19.21092 7.99937 0 0 0 + 2201 734 2 0.4236 30.75755 18.74029 8.50601 0 0 0 + 2202 734 2 0.4236 29.43004 19.68149 8.64149 0 0 0 + 2203 735 1 -0.8472 24.49927 23.34755 12.15367 0 -1 0 + 2204 735 2 0.4236 25.45013 23.07497 12.30028 0 -1 0 + 2205 735 2 0.4236 23.95535 22.54362 11.91337 0 -1 0 + 2206 736 1 -0.8472 31.77314 12.63461 3.01134 -1 0 0 + 2207 736 2 0.4236 30.89137 12.32301 3.36544 -1 0 0 + 2208 736 2 0.4236 32.34380 12.95066 3.76924 -1 0 0 + 2209 737 1 -0.8472 14.30093 32.51323 11.88551 1 -1 0 + 2210 737 2 0.4236 15.16348 32.00737 11.89441 1 -1 0 + 2211 737 2 0.4236 14.04074 32.74491 12.82281 1 -1 0 + 2212 738 1 -0.8472 29.43476 16.82816 3.26399 1 0 0 + 2213 738 2 0.4236 29.24168 16.37876 4.13619 1 0 0 + 2214 738 2 0.4236 30.06337 17.59119 3.41419 1 0 0 + 2215 739 1 -0.8472 16.93347 0.29074 22.92551 0 1 0 + 2216 739 2 0.4236 17.69583 35.41574 23.44835 0 0 0 + 2217 739 2 0.4236 16.96046 35.44329 21.99062 0 0 0 + 2218 740 1 -0.8472 6.39175 32.07466 27.11458 1 -1 0 + 2219 740 2 0.4236 7.22451 31.66481 27.48671 1 -1 0 + 2220 740 2 0.4236 6.37538 33.05084 27.33071 1 -1 0 + 2221 741 1 -0.8472 11.38564 0.73620 34.44418 0 0 0 + 2222 741 2 0.4236 11.86164 0.78090 33.56590 0 0 0 + 2223 741 2 0.4236 11.33377 35.29097 34.74711 0 -1 0 + 2224 742 1 -0.8472 5.62992 0.95326 5.96640 0 1 0 + 2225 742 2 0.4236 5.57858 0.12421 6.52317 0 1 0 + 2226 742 2 0.4236 6.52933 1.00840 5.53281 0 1 0 + 2227 743 1 -0.8472 31.44385 14.78115 9.52565 0 1 0 + 2228 743 2 0.4236 30.75006 15.29894 9.02517 0 1 0 + 2229 743 2 0.4236 32.31791 15.26482 9.48035 0 1 0 + 2230 744 1 -0.8472 4.14274 30.46651 11.25686 0 0 0 + 2231 744 2 0.4236 4.24418 30.27143 10.28139 0 0 0 + 2232 744 2 0.4236 4.98630 30.87589 11.60442 0 0 0 + 2233 745 1 -0.8472 2.68589 19.08193 19.35984 1 0 0 + 2234 745 2 0.4236 2.25025 18.54564 20.08271 1 0 0 + 2235 745 2 0.4236 2.89396 19.99767 19.70350 1 0 0 + 2236 746 1 -0.8472 22.93007 35.32345 10.64943 0 0 0 + 2237 746 2 0.4236 23.02317 34.50265 11.21294 0 0 0 + 2238 746 2 0.4236 23.03648 35.07981 9.68545 0 0 0 + 2239 747 1 -0.8472 21.42354 28.83286 27.26180 0 0 0 + 2240 747 2 0.4236 20.97399 28.00329 27.59298 0 0 0 + 2241 747 2 0.4236 20.73823 29.54462 27.10803 0 0 0 + 2242 748 1 -0.8472 30.85260 9.03928 4.70154 0 0 0 + 2243 748 2 0.4236 30.83123 8.53171 5.56283 0 0 0 + 2244 748 2 0.4236 30.48394 9.95743 4.84645 0 0 0 + 2245 749 1 -0.8472 4.86366 22.69509 4.35096 0 -1 0 + 2246 749 2 0.4236 5.74042 23.17460 4.38730 0 -1 0 + 2247 749 2 0.4236 4.79229 22.19598 3.48739 0 -1 0 + 2248 750 1 -0.8472 13.44540 3.46032 20.90541 0 0 0 + 2249 750 2 0.4236 14.28871 3.71208 20.43070 0 0 0 + 2250 750 2 0.4236 13.34566 2.46533 20.90261 0 0 0 + 2251 751 1 -0.8472 22.15447 21.84585 0.90028 -1 0 0 + 2252 751 2 0.4236 22.49980 20.96721 1.22992 -1 0 0 + 2253 751 2 0.4236 21.26628 22.03343 1.31967 -1 0 0 + 2254 752 1 -0.8472 9.81374 3.47732 1.49633 0 1 0 + 2255 752 2 0.4236 9.63291 4.24716 2.10834 0 1 0 + 2256 752 2 0.4236 9.29957 2.67749 1.80593 0 1 0 + 2257 753 1 -0.8472 25.04380 17.85028 9.69757 -1 0 0 + 2258 753 2 0.4236 24.14790 17.88394 10.14048 -1 0 0 + 2259 753 2 0.4236 25.75957 17.81957 10.39524 -1 0 0 + 2260 754 1 -0.8472 15.18930 12.41305 1.71036 0 1 0 + 2261 754 2 0.4236 15.50981 12.43400 0.76337 0 1 0 + 2262 754 2 0.4236 15.83054 11.88561 2.26766 0 1 0 + 2263 755 1 -0.8472 10.82347 25.41843 22.69425 0 0 0 + 2264 755 2 0.4236 11.56321 24.78166 22.91154 0 0 0 + 2265 755 2 0.4236 11.20822 26.31734 22.48472 0 0 0 + 2266 756 1 -0.8472 18.25594 35.02978 9.19947 1 -1 0 + 2267 756 2 0.4236 17.84180 0.07856 8.47819 1 0 0 + 2268 756 2 0.4236 17.96845 35.37547 10.09267 1 -1 0 + 2269 757 1 -0.8472 20.67847 9.17313 32.72868 -2 0 0 + 2270 757 2 0.4236 21.62862 9.12414 33.03650 -2 0 0 + 2271 757 2 0.4236 20.51184 8.46081 32.04696 -2 0 0 + 2272 758 1 -0.8472 26.32004 10.13277 13.93904 0 0 0 + 2273 758 2 0.4236 26.65302 10.03054 14.87641 0 0 0 + 2274 758 2 0.4236 25.48681 10.68560 13.93975 0 0 0 + 2275 759 1 -0.8472 0.82292 13.72334 27.81676 0 0 0 + 2276 759 2 0.4236 0.81930 14.69363 27.57501 0 0 0 + 2277 759 2 0.4236 1.36210 13.21465 27.14560 0 0 0 +2278 760 1 -0.8472 21.84848 3.72532 35.36222 1 0 0 +2279 760 2 0.4236 22.80203 3.91962 0.14510 1 0 1 +2280 760 2 0.4236 21.26702 3.93165 0.70199 1 0 1 + 2281 761 1 -0.8472 19.27100 12.35007 7.94418 0 -1 0 + 2282 761 2 0.4236 18.53371 12.99546 7.74468 0 -1 0 + 2283 761 2 0.4236 20.09563 12.62243 7.44845 0 -1 0 + 2284 762 1 -0.8472 29.80637 8.79620 16.49510 0 1 0 + 2285 762 2 0.4236 30.54579 9.39281 16.80697 0 1 0 + 2286 762 2 0.4236 30.06674 7.84108 16.63611 0 1 0 + 2287 763 1 -0.8472 27.86105 15.07042 19.60552 0 0 0 + 2288 763 2 0.4236 28.38626 14.86999 20.43254 0 0 0 + 2289 763 2 0.4236 28.25993 15.86093 19.14081 0 0 0 + 2290 764 1 -0.8472 23.97935 35.02669 31.20469 0 1 0 + 2291 764 2 0.4236 23.16342 35.21431 31.75150 0 1 0 + 2292 764 2 0.4236 24.57607 34.39674 31.70170 0 1 0 + 2293 765 1 -0.8472 28.68895 19.26482 23.89389 0 -1 0 + 2294 765 2 0.4236 29.47375 19.59056 24.42113 0 -1 0 + 2295 765 2 0.4236 28.75893 19.59595 22.95294 0 -1 0 + 2296 766 1 -0.8472 20.73446 23.11914 11.38748 0 -1 0 + 2297 766 2 0.4236 21.15404 22.50279 12.05385 0 -1 0 + 2298 766 2 0.4236 21.43213 23.44527 10.74964 0 -1 0 + 2299 767 1 -0.8472 5.76836 34.80673 20.93589 0 0 0 + 2300 767 2 0.4236 5.91884 33.81987 20.87765 0 0 0 + 2301 767 2 0.4236 5.27138 35.11652 20.12532 0 0 0 + 2302 768 1 -0.8472 26.37188 21.61587 25.72215 -1 -1 0 + 2303 768 2 0.4236 25.53695 21.94736 25.28292 -1 -1 0 + 2304 768 2 0.4236 27.13913 21.70066 25.08644 -1 -1 0 + 2305 769 1 -0.8472 31.19538 33.50312 26.15716 0 0 0 + 2306 769 2 0.4236 31.15565 33.39063 25.16432 0 0 0 + 2307 769 2 0.4236 31.86528 32.86595 26.53821 0 0 0 + 2308 770 1 -0.8472 24.54540 11.80739 22.67823 1 1 0 + 2309 770 2 0.4236 24.18408 12.50615 22.06088 1 1 0 + 2310 770 2 0.4236 25.52601 11.69543 22.51747 1 1 0 + 2311 771 1 -0.8472 5.96311 23.16757 33.38140 1 0 0 + 2312 771 2 0.4236 5.33976 22.81627 34.07999 1 0 0 + 2313 771 2 0.4236 5.56640 23.98337 32.96057 1 0 0 + 2314 772 1 -0.8472 5.02457 11.13969 19.20624 1 0 0 + 2315 772 2 0.4236 5.60681 10.82397 19.95542 1 0 0 + 2316 772 2 0.4236 5.03100 12.13923 19.17757 1 0 0 + 2317 773 1 -0.8472 22.69289 11.29961 3.68803 0 0 0 + 2318 773 2 0.4236 23.22768 12.13699 3.57506 0 0 0 + 2319 773 2 0.4236 22.64169 10.81637 2.81407 0 0 0 + 2320 774 1 -0.8472 13.27284 8.09133 34.27364 0 0 0 + 2321 774 2 0.4236 12.32436 7.84246 34.46966 0 0 0 + 2322 774 2 0.4236 13.86320 7.29815 34.42305 0 0 0 + 2323 775 1 -0.8472 34.14695 7.38518 17.29660 -1 1 0 + 2324 775 2 0.4236 34.85981 8.00973 17.61548 -1 1 0 + 2325 775 2 0.4236 33.33691 7.48069 17.87510 -1 1 0 + 2326 776 1 -0.8472 20.66778 14.07322 27.68068 0 1 0 + 2327 776 2 0.4236 20.85554 15.05125 27.77103 0 1 0 + 2328 776 2 0.4236 20.64343 13.65329 28.58788 0 1 0 + 2329 777 1 -0.8472 6.84647 29.77811 7.44210 0 0 0 + 2330 777 2 0.4236 7.16340 29.12266 8.12754 0 0 0 + 2331 777 2 0.4236 5.94607 30.12533 7.70416 0 0 0 + 2332 778 1 -0.8472 8.84506 31.91105 32.16028 -1 -1 0 + 2333 778 2 0.4236 8.21208 31.23536 32.53808 -1 -1 0 + 2334 778 2 0.4236 9.75068 31.49931 32.05904 -1 -1 0 + 2335 779 1 -0.8472 12.70318 30.32629 23.63215 0 0 0 + 2336 779 2 0.4236 12.38699 31.24576 23.39851 0 0 0 + 2337 779 2 0.4236 12.43482 30.11006 24.57086 0 0 0 + 2338 780 1 -0.8472 21.76695 30.45784 17.16849 0 -1 0 + 2339 780 2 0.4236 21.33757 30.08595 16.34555 0 -1 0 + 2340 780 2 0.4236 21.12138 31.05996 17.63824 0 -1 0 + 2341 781 1 -0.8472 6.27827 16.18969 19.53970 0 0 0 + 2342 781 2 0.4236 6.77621 16.02181 20.39046 0 0 0 + 2343 781 2 0.4236 6.29187 17.16799 19.33300 0 0 0 + 2344 782 1 -0.8472 6.99905 25.03102 14.18710 0 0 0 + 2345 782 2 0.4236 6.99187 24.03133 14.21039 0 0 0 + 2346 782 2 0.4236 7.78825 25.34645 13.66025 0 0 0 +2347 783 1 -0.8472 7.49439 35.07402 0.57318 0 0 0 +2348 783 2 0.4236 7.72721 0.45223 0.97731 0 1 0 +2349 783 2 0.4236 8.10031 34.89152 35.24610 0 0 -1 + 2350 784 1 -0.8472 6.48253 7.54091 20.64983 0 1 0 + 2351 784 2 0.4236 7.23016 7.35251 21.28664 0 1 0 + 2352 784 2 0.4236 6.65080 7.06313 19.78761 0 1 0 + 2353 785 1 -0.8472 5.23939 9.16145 11.08029 1 1 0 + 2354 785 2 0.4236 5.14998 8.69820 10.19862 1 1 0 + 2355 785 2 0.4236 4.33355 9.42580 11.41127 1 1 0 + 2356 786 1 -0.8472 27.63885 15.53268 26.97939 0 0 0 + 2357 786 2 0.4236 27.56862 16.48567 26.68472 0 0 0 + 2358 786 2 0.4236 28.27637 15.46727 27.74700 0 0 0 + 2359 787 1 -0.8472 22.84734 5.25153 24.86060 0 0 0 + 2360 787 2 0.4236 23.62550 4.64803 25.03440 0 0 0 + 2361 787 2 0.4236 23.14815 6.20420 24.90392 0 0 0 + 2362 788 1 -0.8472 29.52317 32.08275 3.42793 0 -1 0 + 2363 788 2 0.4236 29.87256 31.71462 4.28953 0 -1 0 + 2364 788 2 0.4236 30.13165 31.81621 2.68048 0 -1 0 + 2365 789 1 -0.8472 13.98726 20.89644 14.31914 0 1 0 + 2366 789 2 0.4236 13.71170 20.12407 14.89136 0 1 0 + 2367 789 2 0.4236 13.20414 21.20918 13.78169 0 1 0 + 2368 790 1 -0.8472 8.36348 15.60252 2.20981 0 1 0 + 2369 790 2 0.4236 7.40456 15.45392 2.45137 0 1 0 + 2370 790 2 0.4236 8.45076 15.66632 1.21569 0 1 0 + 2371 791 1 -0.8472 25.80754 29.12614 29.49717 0 0 0 + 2372 791 2 0.4236 25.48585 29.29941 30.42801 0 0 0 + 2373 791 2 0.4236 25.18000 29.54909 28.84349 0 0 0 + 2374 792 1 -0.8472 21.33150 23.75797 26.23790 0 0 0 + 2375 792 2 0.4236 21.19338 22.77082 26.31770 0 0 0 + 2376 792 2 0.4236 21.28495 24.17549 27.14535 0 0 0 + 2377 793 1 -0.8472 32.60946 28.83470 33.79971 0 0 0 + 2378 793 2 0.4236 32.86613 29.79320 33.67597 0 0 0 + 2379 793 2 0.4236 32.61258 28.61201 34.77458 0 0 0 + 2380 794 1 -0.8472 22.06496 16.58778 18.19685 0 0 0 + 2381 794 2 0.4236 22.26078 17.03822 19.06789 0 0 0 + 2382 794 2 0.4236 21.18163 16.90294 17.84982 0 0 0 + 2383 795 1 -0.8472 10.53697 29.73866 12.93262 1 1 0 + 2384 795 2 0.4236 9.76680 30.37241 13.00426 1 1 0 + 2385 795 2 0.4236 11.31257 30.20358 12.50573 1 1 0 + 2386 796 1 -0.8472 17.15354 2.96270 22.81665 0 0 0 + 2387 796 2 0.4236 16.88895 2.00964 22.96368 0 0 0 + 2388 796 2 0.4236 17.93997 3.18308 23.39362 0 0 0 + 2389 797 1 -0.8472 2.84564 16.62453 31.83402 1 0 0 + 2390 797 2 0.4236 3.10323 15.76698 31.38884 1 0 0 + 2391 797 2 0.4236 2.03370 16.47622 32.39859 1 0 0 + 2392 798 1 -0.8472 17.81943 7.51506 34.65704 0 0 0 + 2393 798 2 0.4236 18.80665 7.65481 34.73307 0 0 0 + 2394 798 2 0.4236 17.61228 6.54140 34.75225 0 0 0 + 2395 799 1 -0.8472 26.88072 17.82532 18.49156 0 -1 0 + 2396 799 2 0.4236 26.11776 17.51858 17.92256 0 -1 0 + 2397 799 2 0.4236 26.52995 18.16675 19.36352 0 -1 0 + 2398 800 1 -0.8472 19.05473 1.05564 26.01912 0 1 0 + 2399 800 2 0.4236 18.53612 0.26365 25.69698 0 1 0 + 2400 800 2 0.4236 20.00776 0.97065 25.72849 0 1 0 + 2401 801 1 -0.8472 1.10090 34.65231 5.12389 1 -2 0 + 2402 801 2 0.4236 0.88676 33.69453 4.93230 1 -2 0 + 2403 801 2 0.4236 0.81296 34.87856 6.05441 1 -2 0 + 2404 802 1 -0.8472 3.04415 35.09483 27.41560 -1 -1 0 + 2405 802 2 0.4236 2.04659 35.14369 27.46491 -1 -1 0 + 2406 802 2 0.4236 3.36467 34.29913 27.92952 -1 -1 0 + 2407 803 1 -0.8472 14.12553 17.71309 32.84625 1 0 0 + 2408 803 2 0.4236 14.80874 18.03250 33.50288 1 0 0 + 2409 803 2 0.4236 13.54887 18.48031 32.56548 1 0 0 + 2410 804 1 -0.8472 20.95283 30.69605 2.27698 1 -1 0 + 2411 804 2 0.4236 21.43674 31.56358 2.16209 1 -1 0 + 2412 804 2 0.4236 21.10945 30.34685 3.20082 1 -1 0 + 2413 805 1 -0.8472 16.96120 25.71167 27.42127 0 -1 0 + 2414 805 2 0.4236 17.00892 25.25432 26.53332 0 -1 0 + 2415 805 2 0.4236 16.03527 26.05992 27.56749 0 -1 0 + 2416 806 1 -0.8472 28.75134 33.83258 11.82146 0 -1 0 + 2417 806 2 0.4236 29.41268 33.26260 12.30897 0 -1 0 + 2418 806 2 0.4236 28.26501 34.41222 12.47525 0 -1 0 + 2419 807 1 -0.8472 13.89605 4.37296 31.95128 0 0 0 + 2420 807 2 0.4236 13.85063 3.37752 32.03487 0 0 0 + 2421 807 2 0.4236 14.53001 4.61728 31.21756 0 0 0 + 2422 808 1 -0.8472 34.19027 7.66458 13.39454 -1 0 0 + 2423 808 2 0.4236 34.28081 6.84995 12.82167 -1 0 0 + 2424 808 2 0.4236 33.22886 7.79758 13.63529 -1 0 0 + 2425 809 1 -0.8472 2.17980 12.87336 21.40333 0 0 0 + 2426 809 2 0.4236 3.07992 12.88277 20.96786 0 0 0 + 2427 809 2 0.4236 2.18575 13.48520 22.19423 0 0 0 + 2428 810 1 -0.8472 20.02462 29.93870 11.78367 0 -1 0 + 2429 810 2 0.4236 20.80388 29.40100 12.10550 0 -1 0 + 2430 810 2 0.4236 19.99075 30.80637 12.27962 0 -1 0 + 2431 811 1 -0.8472 12.68365 8.32013 9.63150 0 0 0 + 2432 811 2 0.4236 12.61121 7.49198 10.18724 0 0 0 + 2433 811 2 0.4236 11.84641 8.43744 9.09745 0 0 0 + 2434 812 1 -0.8472 27.17613 35.07242 17.94308 0 0 0 + 2435 812 2 0.4236 26.68391 0.14013 17.28876 0 1 0 + 2436 812 2 0.4236 26.95688 35.36482 18.87389 0 0 0 + 2437 813 1 -0.8472 23.49934 14.01290 4.26713 0 0 0 + 2438 813 2 0.4236 22.61339 14.33182 3.93045 0 0 0 + 2439 813 2 0.4236 23.75755 14.53985 5.07682 0 0 0 + 2440 814 1 -0.8472 13.20350 1.23982 26.22755 0 0 0 + 2441 814 2 0.4236 12.88408 2.07198 25.77429 0 0 0 + 2442 814 2 0.4236 13.26656 1.40003 27.21260 0 0 0 + 2443 815 1 -0.8472 32.61237 13.56172 31.22696 0 0 0 + 2444 815 2 0.4236 32.55463 13.01499 32.06223 0 0 0 + 2445 815 2 0.4236 32.54636 14.53225 31.45860 0 0 0 + 2446 816 1 -0.8472 11.36654 10.00604 5.49041 1 0 0 + 2447 816 2 0.4236 11.88120 10.10621 6.34193 1 0 0 + 2448 816 2 0.4236 12.00022 9.99830 4.71689 1 0 0 + 2449 817 1 -0.8472 9.17409 26.41828 20.72491 0 0 0 + 2450 817 2 0.4236 8.20218 26.24356 20.56724 0 0 0 + 2451 817 2 0.4236 9.53423 25.74235 21.36785 0 0 0 + 2452 818 1 -0.8472 9.87087 7.59502 4.03917 0 0 0 + 2453 818 2 0.4236 10.28509 7.32965 4.90975 0 0 0 + 2454 818 2 0.4236 10.18784 8.50846 3.78395 0 0 0 + 2455 819 1 -0.8472 20.55690 13.77494 1.37155 0 0 0 + 2456 819 2 0.4236 20.36111 13.42403 2.28724 0 0 0 + 2457 819 2 0.4236 20.65014 13.00995 0.73433 0 0 0 + 2458 820 1 -0.8472 29.93334 5.93329 4.91025 -1 1 0 + 2459 820 2 0.4236 30.44733 6.10116 5.75141 -1 1 0 + 2460 820 2 0.4236 30.43331 5.28306 4.33824 -1 1 0 + 2461 821 1 -0.8472 12.51631 1.74380 15.29578 -1 0 0 + 2462 821 2 0.4236 12.90148 1.92344 14.39060 -1 0 0 + 2463 821 2 0.4236 12.50505 2.59074 15.82728 -1 0 0 + 2464 822 1 -0.8472 11.62432 32.78866 23.82742 0 0 0 + 2465 822 2 0.4236 11.47814 32.97102 24.79971 0 0 0 + 2466 822 2 0.4236 10.99539 33.34611 23.28551 0 0 0 + 2467 823 1 -0.8472 13.06353 18.99199 9.84223 -1 0 0 + 2468 823 2 0.4236 12.64747 18.31758 9.23233 -1 0 0 + 2469 823 2 0.4236 13.60323 19.63963 9.30439 -1 0 0 + 2470 824 1 -0.8472 26.02381 14.57180 17.78265 0 0 0 + 2471 824 2 0.4236 25.40295 15.34481 17.91249 0 0 0 + 2472 824 2 0.4236 26.77232 14.63089 18.44310 0 0 0 + 2473 825 1 -0.8472 27.04004 16.24973 1.75746 -1 0 0 + 2474 825 2 0.4236 28.02140 16.29883 1.94311 -1 0 0 + 2475 825 2 0.4236 26.63441 15.51478 2.30084 -1 0 0 + 2476 826 1 -0.8472 15.35923 20.72413 28.72655 -1 0 0 + 2477 826 2 0.4236 15.98094 21.50730 28.71864 -1 0 0 + 2478 826 2 0.4236 15.88483 19.88260 28.85111 -1 0 0 + 2479 827 1 -0.8472 27.10562 30.50244 27.42418 0 0 0 + 2480 827 2 0.4236 26.85157 29.94872 28.21717 0 0 0 + 2481 827 2 0.4236 27.49967 31.36762 27.73431 0 0 0 + 2482 828 1 -0.8472 24.97410 18.81542 24.69035 0 -1 0 + 2483 828 2 0.4236 25.47556 19.25392 23.94454 0 -1 0 + 2484 828 2 0.4236 24.12908 19.32039 24.86599 0 -1 0 + 2485 829 1 -0.8472 29.23419 2.55747 15.47922 0 0 0 + 2486 829 2 0.4236 29.50393 2.04589 14.66347 0 0 0 + 2487 829 2 0.4236 28.38704 3.05587 15.29511 0 0 0 + 2488 830 1 -0.8472 23.98692 0.63026 13.05063 0 0 0 + 2489 830 2 0.4236 23.91026 1.62337 13.13896 0 0 0 + 2490 830 2 0.4236 23.75542 0.35991 12.11613 0 0 0 + 2491 831 1 -0.8472 30.84135 19.97655 31.52762 0 0 0 + 2492 831 2 0.4236 30.18071 19.23471 31.64257 0 0 0 + 2493 831 2 0.4236 30.39532 20.75442 31.08499 0 0 0 + 2494 832 1 -0.8472 30.16396 12.12918 29.67611 -1 0 0 + 2495 832 2 0.4236 29.80722 12.67140 30.43684 -1 0 0 + 2496 832 2 0.4236 30.99193 11.65024 29.96762 -1 0 0 + 2497 833 1 -0.8472 8.49954 25.11534 30.47891 0 0 0 + 2498 833 2 0.4236 9.25949 24.81659 31.05610 0 0 0 + 2499 833 2 0.4236 7.88880 25.70294 31.00970 0 0 0 + 2500 834 1 -0.8472 5.73690 9.02997 5.59303 0 0 0 + 2501 834 2 0.4236 6.08273 9.73744 6.20935 0 0 0 + 2502 834 2 0.4236 6.03640 8.13191 5.91504 0 0 0 + 2503 835 1 -0.8472 11.25292 34.76600 31.52106 1 0 0 + 2504 835 2 0.4236 12.23126 34.77144 31.31419 1 0 0 + 2505 835 2 0.4236 10.93027 0.19972 31.63102 1 1 0 + 2506 836 1 -0.8472 5.35443 22.01777 22.23507 1 -1 0 + 2507 836 2 0.4236 5.97242 21.37209 22.68358 1 -1 0 + 2508 836 2 0.4236 5.66259 22.95233 22.41273 1 -1 0 + 2509 837 1 -0.8472 33.55893 31.09610 3.22281 -1 0 0 + 2510 837 2 0.4236 32.83407 31.61340 2.76793 -1 0 0 + 2511 837 2 0.4236 33.28962 30.13559 3.29237 -1 0 0 + 2512 838 1 -0.8472 25.96434 29.58289 7.26377 0 -1 0 + 2513 838 2 0.4236 26.80640 29.16573 6.92195 0 -1 0 + 2514 838 2 0.4236 25.58609 30.19055 6.56546 0 -1 0 + 2515 839 1 -0.8472 33.87842 4.18772 2.43606 0 1 0 + 2516 839 2 0.4236 34.84944 3.98367 2.55999 0 1 0 + 2517 839 2 0.4236 33.75503 5.17533 2.33928 0 1 0 + 2518 840 1 -0.8472 13.81168 25.37248 3.67048 1 0 0 + 2519 840 2 0.4236 13.19977 26.10015 3.36064 1 0 0 + 2520 840 2 0.4236 14.72533 25.52182 3.29245 1 0 0 + 2521 841 1 -0.8472 30.88527 4.38191 2.92050 0 0 0 + 2522 841 2 0.4236 31.38047 3.51892 2.82042 0 0 0 + 2523 841 2 0.4236 30.98738 4.92349 2.08611 0 0 0 + 2524 842 1 -0.8472 12.07003 4.99198 33.85700 1 0 0 + 2525 842 2 0.4236 12.07748 4.21318 34.48420 1 0 0 + 2526 842 2 0.4236 12.88025 4.95661 33.27201 1 0 0 + 2527 843 1 -0.8472 7.37641 22.99672 25.99460 1 -1 0 + 2528 843 2 0.4236 7.72980 23.93199 26.01296 1 -1 0 + 2529 843 2 0.4236 6.39689 23.01440 25.79418 1 -1 0 + 2530 844 1 -0.8472 6.26662 14.45666 7.69016 0 1 0 + 2531 844 2 0.4236 5.26733 14.49397 7.68828 0 1 0 + 2532 844 2 0.4236 6.57485 13.74763 7.05594 0 1 0 + 2533 845 1 -0.8472 3.42084 16.32571 24.55314 0 0 0 + 2534 845 2 0.4236 2.77021 15.56634 24.54874 0 0 0 + 2535 845 2 0.4236 2.94499 17.17090 24.79634 0 0 0 + 2536 846 1 -0.8472 11.89267 13.73016 11.88059 0 0 0 + 2537 846 2 0.4236 11.21898 14.10411 11.24321 0 0 0 + 2538 846 2 0.4236 12.59005 14.42090 12.07165 0 0 0 + 2539 847 1 -0.8472 27.08577 4.13603 19.06782 0 1 0 + 2540 847 2 0.4236 27.68203 3.34019 18.96269 0 1 0 + 2541 847 2 0.4236 27.28308 4.58777 19.93784 0 1 0 + 2542 848 1 -0.8472 27.82810 10.58117 29.11657 0 0 0 + 2543 848 2 0.4236 28.01188 9.59839 29.09796 0 0 0 + 2544 848 2 0.4236 28.69236 11.08086 29.17439 0 0 0 + 2545 849 1 -0.8472 8.69913 11.82528 17.33215 0 0 0 + 2546 849 2 0.4236 8.89196 12.79954 17.21553 0 0 0 + 2547 849 2 0.4236 9.43475 11.28818 16.91944 0 0 0 + 2548 850 1 -0.8472 13.42854 16.97612 24.95943 0 1 0 + 2549 850 2 0.4236 13.93336 16.42101 25.62045 0 1 0 + 2550 850 2 0.4236 13.65180 17.94136 25.09526 0 1 0 + 2551 851 1 -0.8472 25.29362 29.77548 23.45629 0 -1 0 + 2552 851 2 0.4236 24.94292 29.55669 24.36686 0 -1 0 + 2553 851 2 0.4236 26.16750 30.25393 23.54179 0 -1 0 + 2554 852 1 -0.8472 1.80838 18.66945 8.01684 1 0 0 + 2555 852 2 0.4236 2.29523 17.98783 7.47064 1 0 0 + 2556 852 2 0.4236 1.49659 19.41139 7.42331 1 0 0 + 2557 853 1 -0.8472 30.12316 27.61353 26.54594 -1 -1 0 + 2558 853 2 0.4236 30.51614 26.94751 25.91193 -1 -1 0 + 2559 853 2 0.4236 30.70632 28.42514 26.58050 -1 -1 0 + 2560 854 1 -0.8472 33.18420 17.88586 6.35292 0 0 0 + 2561 854 2 0.4236 32.56568 18.63391 6.59328 0 0 0 + 2562 854 2 0.4236 33.30133 17.28346 7.14243 0 0 0 + 2563 855 1 -0.8472 33.27243 21.18032 2.29436 0 0 0 + 2564 855 2 0.4236 32.31035 20.90983 2.25953 0 0 0 + 2565 855 2 0.4236 33.73202 20.88576 1.45652 0 0 0 + 2566 856 1 -0.8472 28.34333 11.53743 12.37493 0 1 0 + 2567 856 2 0.4236 28.30293 11.14523 11.45596 0 1 0 + 2568 856 2 0.4236 27.66669 11.08888 12.95882 0 1 0 + 2569 857 1 -0.8472 28.30112 2.64491 2.85806 -1 1 0 + 2570 857 2 0.4236 28.30594 2.79162 3.84719 -1 1 0 + 2571 857 2 0.4236 29.22236 2.40458 2.55225 -1 1 0 + 2572 858 1 -0.8472 31.44250 35.43431 23.40153 -1 -1 0 + 2573 858 2 0.4236 32.25162 0.43229 23.70308 -1 0 0 + 2574 858 2 0.4236 31.62859 34.45252 23.43896 -1 -1 0 + 2575 859 1 -0.8472 3.71364 28.20102 15.87903 0 0 0 + 2576 859 2 0.4236 3.95001 28.35402 14.91951 0 0 0 + 2577 859 2 0.4236 3.89064 27.24622 16.11777 0 0 0 + 2578 860 1 -0.8472 10.94561 21.02636 2.86138 0 0 0 + 2579 860 2 0.4236 11.66778 20.96916 3.55069 0 0 0 + 2580 860 2 0.4236 10.18759 20.42872 3.12244 0 0 0 + 2581 861 1 -0.8472 15.57876 3.78370 6.21942 0 1 0 + 2582 861 2 0.4236 15.75140 2.89661 6.64741 0 1 0 + 2583 861 2 0.4236 14.68720 3.76754 5.76683 0 1 0 + 2584 862 1 -0.8472 19.64502 9.99145 5.15182 0 0 0 + 2585 862 2 0.4236 18.87851 10.56189 5.44685 0 0 0 + 2586 862 2 0.4236 19.29720 9.19863 4.65138 0 0 0 + 2587 863 1 -0.8472 3.53630 21.94683 7.08827 0 0 0 + 2588 863 2 0.4236 4.17231 22.62170 7.46241 0 0 0 + 2589 863 2 0.4236 3.79062 21.73660 6.14431 0 0 0 + 2590 864 1 -0.8472 12.52461 18.64953 6.43774 0 0 0 + 2591 864 2 0.4236 11.73637 18.38334 5.88299 0 0 0 + 2592 864 2 0.4236 12.89090 19.51724 6.10174 0 0 0 + 2593 865 1 -0.8472 23.94939 18.89381 33.06954 0 0 0 + 2594 865 2 0.4236 23.54241 18.01770 32.81123 0 0 0 + 2595 865 2 0.4236 23.22403 19.55824 33.24918 0 0 0 + 2596 866 1 -0.8472 19.85103 7.44596 22.03046 0 -1 0 + 2597 866 2 0.4236 19.50211 7.83913 22.88113 0 -1 0 + 2598 866 2 0.4236 19.83736 8.14114 21.31177 0 -1 0 + 2599 867 1 -0.8472 8.00029 26.63881 28.43389 1 -1 0 + 2600 867 2 0.4236 8.46716 27.49058 28.67157 1 -1 0 + 2601 867 2 0.4236 8.28274 25.91654 29.06517 1 -1 0 + 2602 868 1 -0.8472 23.83651 15.01649 11.21893 0 0 0 + 2603 868 2 0.4236 24.18952 14.99547 10.28358 0 0 0 + 2604 868 2 0.4236 23.14282 15.73247 11.29737 0 0 0 + 2605 869 1 -0.8472 17.62223 5.88933 12.54249 1 1 0 + 2606 869 2 0.4236 16.72054 6.23868 12.28780 1 1 0 + 2607 869 2 0.4236 17.53364 5.28246 13.33229 1 1 0 + 2608 870 1 -0.8472 33.24750 25.79249 27.99548 0 0 0 + 2609 870 2 0.4236 33.02399 26.03127 28.94043 0 0 0 + 2610 870 2 0.4236 32.68988 25.01397 27.70758 0 0 0 + 2611 871 1 -0.8472 8.52461 32.10974 20.14850 0 0 0 + 2612 871 2 0.4236 8.91213 31.73007 19.30847 0 0 0 + 2613 871 2 0.4236 7.58494 31.78581 20.25814 0 0 0 + 2614 872 1 -0.8472 27.82661 4.07116 5.11535 0 -1 0 + 2615 872 2 0.4236 28.49917 4.80088 4.99256 0 -1 0 + 2616 872 2 0.4236 28.22481 3.34080 5.67031 0 -1 0 + 2617 873 1 -0.8472 26.08680 14.33409 3.52290 -1 0 0 + 2618 873 2 0.4236 26.16612 13.67463 2.77538 -1 0 0 + 2619 873 2 0.4236 25.17681 14.26645 3.93187 -1 0 0 + 2620 874 1 -0.8472 30.17457 24.55253 31.22908 -1 0 0 + 2621 874 2 0.4236 29.87880 25.19861 30.52549 -1 0 0 + 2622 874 2 0.4236 30.45908 25.05559 32.04511 -1 0 0 + 2623 875 1 -0.8472 4.56924 31.17933 8.22970 0 -1 0 + 2624 875 2 0.4236 4.00014 31.89659 7.82770 0 -1 0 + 2625 875 2 0.4236 5.22266 31.58961 8.86584 0 -1 0 + 2626 876 1 -0.8472 6.38127 30.89315 16.11454 0 -1 0 + 2627 876 2 0.4236 5.40346 30.80048 16.30241 0 -1 0 + 2628 876 2 0.4236 6.63635 31.85960 16.14485 0 -1 0 + 2629 877 1 -0.8472 22.93838 32.25635 1.41573 0 -1 0 + 2630 877 2 0.4236 22.70262 32.88541 2.15644 0 -1 0 + 2631 877 2 0.4236 23.77665 32.56766 0.96817 0 -1 0 + 2632 878 1 -0.8472 26.74043 10.53690 34.14043 -1 0 0 + 2633 878 2 0.4236 26.64411 9.85226 33.41798 -1 0 0 + 2634 878 2 0.4236 27.20748 10.12975 34.92534 -1 0 0 + 2635 879 1 -0.8472 18.12890 0.52898 11.63908 0 1 0 + 2636 879 2 0.4236 17.58828 0.63169 12.47404 0 1 0 + 2637 879 2 0.4236 19.06300 0.84452 11.80590 0 1 0 + 2638 880 1 -0.8472 5.04130 17.24838 27.16687 0 0 0 + 2639 880 2 0.4236 4.48860 16.56822 26.68532 0 0 0 + 2640 880 2 0.4236 4.46897 18.03161 27.40961 0 0 0 + 2641 881 1 -0.8472 0.20092 22.73060 26.74870 0 0 0 + 2642 881 2 0.4236 0.46042 22.50399 25.80995 0 0 0 + 2643 881 2 0.4236 0.98848 22.60455 27.35187 0 0 0 + 2644 882 1 -0.8472 6.67370 10.39196 29.12618 0 1 0 + 2645 882 2 0.4236 7.10798 10.06630 28.28636 0 1 0 + 2646 882 2 0.4236 6.37648 9.60922 29.67288 0 1 0 + 2647 883 1 -0.8472 0.36169 3.59757 32.96571 1 1 0 + 2648 883 2 0.4236 0.87742 2.77151 32.73853 1 1 0 + 2649 883 2 0.4236 0.63239 3.92065 33.87249 1 1 0 + 2650 884 1 -0.8472 1.12537 7.04733 21.97028 -1 0 0 + 2651 884 2 0.4236 2.12283 7.02656 21.90261 -1 0 0 + 2652 884 2 0.4236 0.84706 7.80508 22.56044 -1 0 0 + 2653 885 1 -0.8472 20.46699 7.96130 8.20960 0 -1 0 + 2654 885 2 0.4236 20.71352 7.27486 8.89370 0 -1 0 + 2655 885 2 0.4236 20.65472 8.87456 8.57113 0 -1 0 + 2656 886 1 -0.8472 29.22087 8.66749 31.72871 0 1 0 + 2657 886 2 0.4236 28.46753 8.10986 32.07723 0 1 0 + 2658 886 2 0.4236 29.02683 9.63362 31.89868 0 1 0 + 2659 887 1 -0.8472 13.34328 26.47105 19.29320 0 0 0 + 2660 887 2 0.4236 12.39942 26.30189 19.00962 0 0 0 + 2661 887 2 0.4236 13.35088 26.84291 20.22145 0 0 0 + 2662 888 1 -0.8472 19.94676 12.70619 3.72610 0 0 0 + 2663 888 2 0.4236 20.76802 12.44352 4.23254 0 0 0 + 2664 888 2 0.4236 19.38323 13.30678 4.29329 0 0 0 + 2665 889 1 -0.8472 35.23224 31.63158 19.72906 -1 -1 0 + 2666 889 2 0.4236 0.38022 30.95809 19.38525 0 -1 0 + 2667 889 2 0.4236 35.31912 31.70365 20.72264 -1 -1 0 + 2668 890 1 -0.8472 24.90334 4.71897 4.92216 0 -1 0 + 2669 890 2 0.4236 24.54870 3.87726 4.51512 0 -1 0 + 2670 890 2 0.4236 25.89173 4.63677 5.04984 0 -1 0 + 2671 891 1 -0.8472 24.35419 20.38980 21.39334 0 -1 0 + 2672 891 2 0.4236 24.59812 21.35941 21.41149 0 -1 0 + 2673 891 2 0.4236 23.71902 20.21994 20.63991 0 -1 0 + 2674 892 1 -0.8472 27.50765 1.34560 12.13095 0 0 0 + 2675 892 2 0.4236 26.89496 0.89751 11.48000 0 0 0 + 2676 892 2 0.4236 26.98383 1.98011 12.69924 0 0 0 + 2677 893 1 -0.8472 13.13728 1.89420 29.11232 0 0 0 + 2678 893 2 0.4236 13.11182 2.85364 28.83168 0 0 0 + 2679 893 2 0.4236 13.88348 1.75716 29.76377 0 0 0 + 2680 894 1 -0.8472 28.14563 3.96173 23.80406 0 1 0 + 2681 894 2 0.4236 28.04813 2.97062 23.89421 0 1 0 + 2682 894 2 0.4236 29.11641 4.20075 23.78439 0 1 0 + 2683 895 1 -0.8472 18.25055 23.22783 0.51719 -1 0 0 + 2684 895 2 0.4236 18.48570 24.19917 0.55041 -1 0 0 + 2685 895 2 0.4236 18.98979 22.69179 0.92475 -1 0 0 + 2686 896 1 -0.8472 2.51465 29.09014 7.57570 2 -1 0 + 2687 896 2 0.4236 3.10673 29.87007 7.37298 2 -1 0 + 2688 896 2 0.4236 3.07310 28.31692 7.87608 2 -1 0 + 2689 897 1 -0.8472 25.00737 10.68975 1.68683 0 0 0 + 2690 897 2 0.4236 25.28105 9.84935 2.15462 0 0 0 + 2691 897 2 0.4236 24.06560 10.59939 1.36302 0 0 0 + 2692 898 1 -0.8472 0.50800 31.98245 4.59059 0 0 0 + 2693 898 2 0.4236 0.60245 31.58627 5.50388 0 0 0 + 2694 898 2 0.4236 35.23000 31.56962 4.12765 -1 0 0 + 2695 899 1 -0.8472 8.51918 24.05662 22.25963 0 -1 0 + 2696 899 2 0.4236 7.69557 24.41189 22.70173 0 -1 0 + 2697 899 2 0.4236 9.32524 24.50158 22.64980 0 -1 0 + 2698 900 1 -0.8472 3.74077 33.15075 4.30432 1 -1 0 + 2699 900 2 0.4236 2.74523 33.05868 4.28503 1 -1 0 + 2700 900 2 0.4236 4.15286 32.43271 3.74351 1 -1 0 + 2701 901 1 -0.8472 23.70766 3.65644 13.10291 0 1 0 + 2702 901 2 0.4236 22.83186 3.36378 13.48663 0 1 0 + 2703 901 2 0.4236 23.72321 3.46266 12.12202 0 1 0 + 2704 902 1 -0.8472 24.60561 3.76942 1.43568 0 -1 0 + 2705 902 2 0.4236 25.48227 3.58820 0.99007 0 -1 0 + 2706 902 2 0.4236 24.42968 3.06545 2.12375 0 -1 0 + 2707 903 1 -0.8472 19.48773 29.49157 22.01061 0 1 0 + 2708 903 2 0.4236 19.53211 28.50847 22.18799 0 1 0 + 2709 903 2 0.4236 20.40113 29.88825 22.10143 0 1 0 + 2710 904 1 -0.8472 16.23080 13.90116 33.79773 0 0 0 + 2711 904 2 0.4236 16.83015 14.21028 33.05940 0 0 0 + 2712 904 2 0.4236 16.41710 14.43372 34.62333 0 0 0 + 2713 905 1 -0.8472 31.40149 4.69855 20.61956 0 0 0 + 2714 905 2 0.4236 31.88814 3.87342 20.90643 0 0 0 + 2715 905 2 0.4236 31.98877 5.49631 20.75600 0 0 0 + 2716 906 1 -0.8472 11.91330 27.21469 2.83126 0 -1 0 + 2717 906 2 0.4236 11.77039 27.62948 3.72986 0 -1 0 + 2718 906 2 0.4236 11.05540 27.22822 2.31766 0 -1 0 + 2719 907 1 -0.8472 22.29397 12.32624 33.31082 -1 -1 0 + 2720 907 2 0.4236 23.15046 12.43347 33.81570 -1 -1 0 + 2721 907 2 0.4236 22.45521 11.77078 32.49511 -1 -1 0 + 2722 908 1 -0.8472 34.76448 23.65326 16.89257 -1 0 0 + 2723 908 2 0.4236 35.51917 23.16707 16.45207 -1 0 0 + 2724 908 2 0.4236 33.92404 23.11964 16.79832 -1 0 0 + 2725 909 1 -0.8472 1.74181 27.58620 25.60166 0 0 0 + 2726 909 2 0.4236 1.15598 27.69342 26.40493 0 0 0 + 2727 909 2 0.4236 1.52271 28.29593 24.93217 0 0 0 + 2728 910 1 -0.8472 12.89470 5.60990 10.67435 0 0 0 + 2729 910 2 0.4236 12.12215 5.02493 10.92114 0 0 0 + 2730 910 2 0.4236 13.50768 5.11149 10.06133 0 0 0 + 2731 911 1 -0.8472 26.31194 30.23025 9.95928 -1 -1 0 + 2732 911 2 0.4236 26.26983 29.99008 8.98948 -1 -1 0 + 2733 911 2 0.4236 26.89847 29.57778 10.43909 -1 -1 0 + 2734 912 1 -0.8472 2.44644 10.30330 33.95784 0 1 0 + 2735 912 2 0.4236 3.27225 10.40567 33.40331 0 1 0 + 2736 912 2 0.4236 2.65024 10.54393 34.90680 0 1 0 + 2737 913 1 -0.8472 23.59507 21.37553 7.99419 0 0 0 + 2738 913 2 0.4236 22.79284 21.02924 8.48049 0 0 0 + 2739 913 2 0.4236 24.00179 20.63828 7.45479 0 0 0 + 2740 914 1 -0.8472 35.31436 2.94640 23.58373 -1 0 0 + 2741 914 2 0.4236 0.21370 3.41681 22.80009 0 0 0 + 2742 914 2 0.4236 0.53235 2.53576 24.13752 0 0 0 + 2743 915 1 -0.8472 13.99749 14.34449 15.50116 0 0 0 + 2744 915 2 0.4236 14.78839 13.91007 15.93209 0 0 0 + 2745 915 2 0.4236 14.12556 15.33622 15.49251 0 0 0 + 2746 916 1 -0.8472 6.46769 25.98596 20.36657 0 1 0 + 2747 916 2 0.4236 6.61622 25.29763 19.65657 0 1 0 + 2748 916 2 0.4236 6.11029 25.54426 21.18944 0 1 0 + 2749 917 1 -0.8472 13.24177 10.22217 7.85839 1 0 0 + 2750 917 2 0.4236 12.93251 10.97416 8.44047 1 0 0 + 2751 917 2 0.4236 13.34595 9.39473 8.41013 1 0 0 + 2752 918 1 -0.8472 19.88118 15.75995 34.78713 -1 0 0 + 2753 918 2 0.4236 20.21312 15.08235 35.44333 -1 0 0 + 2754 918 2 0.4236 20.26709 15.56722 33.88500 -1 0 0 +2755 919 1 -0.8472 28.06120 14.47494 34.86905 -1 0 0 +2756 919 2 0.4236 27.85061 15.02284 0.23143 -1 0 1 +2757 919 2 0.4236 27.89570 15.01872 34.04632 -1 0 0 + 2758 920 1 -0.8472 19.62699 30.99995 7.02680 0 -1 0 + 2759 920 2 0.4236 18.89452 31.41499 6.48719 0 -1 0 + 2760 920 2 0.4236 19.30945 30.13154 7.40754 0 -1 0 + 2761 921 1 -0.8472 23.51923 19.57951 13.65426 0 0 0 + 2762 921 2 0.4236 23.70354 20.49167 14.02025 0 0 0 + 2763 921 2 0.4236 22.92226 19.08218 14.28373 0 0 0 + 2764 922 1 -0.8472 17.23063 33.39138 27.42826 0 0 0 + 2765 922 2 0.4236 17.91483 33.70380 28.08718 0 0 0 + 2766 922 2 0.4236 17.60174 32.62856 26.89878 0 0 0 +2767 923 1 -0.8472 14.52742 35.08290 34.70376 1 0 0 +2768 923 2 0.4236 14.91728 34.45866 34.02682 1 0 0 +2769 923 2 0.4236 14.84723 34.82725 0.16889 1 0 1 + 2770 924 1 -0.8472 23.44598 32.97673 12.21251 0 0 0 + 2771 924 2 0.4236 24.25669 32.40696 12.34679 0 0 0 + 2772 924 2 0.4236 23.30310 33.54871 13.02021 0 0 0 + 2773 925 1 -0.8472 27.83250 1.81797 26.90445 1 0 0 + 2774 925 2 0.4236 28.40408 1.28779 27.53066 1 0 0 + 2775 925 2 0.4236 27.92130 1.44938 25.97910 1 0 0 + 2776 926 1 -0.8472 33.48976 28.09017 24.91668 -1 0 0 + 2777 926 2 0.4236 33.93640 28.56163 24.15630 -1 0 0 + 2778 926 2 0.4236 33.81589 27.14592 24.96117 -1 0 0 + 2779 927 1 -0.8472 4.51573 24.79905 27.51794 1 -1 0 + 2780 927 2 0.4236 4.61827 24.08055 26.83001 1 -1 0 + 2781 927 2 0.4236 4.53544 25.69346 27.07120 1 -1 0 +2782 928 1 -0.8472 21.98652 18.50956 0.09403 0 0 0 +2783 928 2 0.4236 22.42105 17.88902 34.88847 0 0 -1 +2784 928 2 0.4236 22.64332 18.75754 0.80610 0 0 0 +2785 929 1 -0.8472 1.51311 16.03062 0.14690 0 0 0 +2786 929 2 0.4236 1.10681 16.69203 0.77731 0 0 0 +2787 929 2 0.4236 1.19358 16.21607 34.66487 0 0 -1 + 2788 930 1 -0.8472 15.60223 24.97747 19.15233 0 -1 0 + 2789 930 2 0.4236 16.21656 25.42691 18.50382 0 -1 0 + 2790 930 2 0.4236 14.89182 25.62028 19.43878 0 -1 0 + 2791 931 1 -0.8472 14.89459 26.77828 7.57077 0 0 0 + 2792 931 2 0.4236 15.10000 26.99785 8.52448 0 0 0 + 2793 931 2 0.4236 14.05018 26.24452 7.52604 0 0 0 + 2794 932 1 -0.8472 20.12223 16.99391 24.38823 0 -1 0 + 2795 932 2 0.4236 20.03531 16.23201 23.74646 0 -1 0 + 2796 932 2 0.4236 20.97165 17.48876 24.20508 0 -1 0 + 2797 933 1 -0.8472 31.97095 9.82411 26.24234 0 0 0 + 2798 933 2 0.4236 31.18540 10.35809 25.92973 0 0 0 + 2799 933 2 0.4236 32.47982 9.48527 25.45101 0 0 0 + 2800 934 1 -0.8472 0.38419 34.93068 18.53576 0 -1 0 + 2801 934 2 0.4236 0.38508 0.23464 17.94978 0 0 0 + 2802 934 2 0.4236 35.16957 34.30492 18.23811 -1 -1 0 + 2803 935 1 -0.8472 13.41437 12.33309 24.23677 1 0 0 + 2804 935 2 0.4236 13.12758 11.74937 24.99633 1 0 0 + 2805 935 2 0.4236 12.60873 12.74142 23.80761 1 0 0 + 2806 936 1 -0.8472 5.18744 5.18751 32.87277 1 1 0 + 2807 936 2 0.4236 4.57151 5.77599 32.34907 1 1 0 + 2808 936 2 0.4236 5.82066 4.72905 32.24922 1 1 0 + 2809 937 1 -0.8472 32.42642 26.66747 22.09377 -2 0 0 + 2810 937 2 0.4236 33.12682 27.03535 22.70538 -2 0 0 + 2811 937 2 0.4236 32.68856 25.74768 21.80190 -2 0 0 + 2812 938 1 -0.8472 26.55012 2.70441 29.91123 0 1 0 + 2813 938 2 0.4236 26.41349 3.09573 29.00119 0 1 0 + 2814 938 2 0.4236 27.49214 2.37992 29.99651 0 1 0 + 2815 939 1 -0.8472 31.36066 7.26066 30.58650 -1 0 0 + 2816 939 2 0.4236 31.50950 7.56090 29.64434 -1 0 0 + 2817 939 2 0.4236 30.45500 7.55543 30.89113 -1 0 0 + 2818 940 1 -0.8472 10.17399 14.38777 10.06711 0 -1 0 + 2819 940 2 0.4236 9.26801 14.52344 10.46802 0 -1 0 + 2820 940 2 0.4236 10.08025 13.95584 9.17012 0 -1 0 + 2821 941 1 -0.8472 28.15600 13.94540 15.95737 0 0 0 + 2822 941 2 0.4236 27.27058 14.23684 16.31935 0 0 0 + 2823 941 2 0.4236 28.13899 13.99060 14.95857 0 0 0 + 2824 942 1 -0.8472 8.84083 24.57103 17.24477 -1 0 0 + 2825 942 2 0.4236 7.85233 24.69033 17.33754 -1 0 0 + 2826 942 2 0.4236 9.13305 23.78027 17.78261 -1 0 0 + 2827 943 1 -0.8472 6.95722 20.29000 23.84983 0 1 0 + 2828 943 2 0.4236 7.04815 19.41917 24.33287 0 1 0 + 2829 943 2 0.4236 7.86565 20.64730 23.63296 0 1 0 + 2830 944 1 -0.8472 5.75302 13.11004 29.05447 0 0 0 + 2831 944 2 0.4236 5.97810 12.96788 30.01835 0 0 0 + 2832 944 2 0.4236 4.76843 13.25708 28.96028 0 0 0 + 2833 945 1 -0.8472 30.02928 16.68514 32.84891 0 0 0 + 2834 945 2 0.4236 29.04487 16.85998 32.83002 0 0 0 + 2835 945 2 0.4236 30.27126 16.23411 33.70794 0 0 0 + 2836 946 1 -0.8472 19.41079 24.31013 19.45445 0 -1 0 + 2837 946 2 0.4236 18.91910 23.72864 18.80633 0 -1 0 + 2838 946 2 0.4236 20.21515 24.70141 19.00742 0 -1 0 + 2839 947 1 -0.8472 21.08786 32.52428 34.05522 -1 0 0 + 2840 947 2 0.4236 21.43422 33.32512 33.56665 -1 0 0 + 2841 947 2 0.4236 20.99938 32.73966 35.02771 -1 0 0 + 2842 948 1 -0.8472 27.57938 10.46951 5.09160 0 0 0 + 2843 948 2 0.4236 26.59109 10.61508 5.13655 0 0 0 + 2844 948 2 0.4236 27.76614 9.50420 4.90926 0 0 0 + 2845 949 1 -0.8472 28.73415 28.94644 29.88776 -1 0 0 + 2846 949 2 0.4236 27.74647 28.86939 30.02388 -1 0 0 + 2847 949 2 0.4236 29.09021 28.08186 29.53322 -1 0 0 + 2848 950 1 -0.8472 23.12812 9.19046 12.33250 1 0 0 + 2849 950 2 0.4236 23.47605 8.37982 12.80345 1 0 0 + 2850 950 2 0.4236 23.49814 10.01219 12.76592 1 0 0 +2851 951 1 -0.8472 7.73215 20.48784 35.38931 0 0 0 +2852 951 2 0.4236 7.10638 20.79855 0.65752 0 0 1 +2853 951 2 0.4236 8.34921 19.79575 0.31656 0 0 1 + 2854 952 1 -0.8472 15.75196 1.18543 29.47016 1 0 0 + 2855 952 2 0.4236 16.64637 1.19402 29.91732 1 0 0 + 2856 952 2 0.4236 15.77930 1.76944 28.65891 1 0 0 + 2857 953 1 -0.8472 21.01330 1.65554 12.01507 0 1 0 + 2858 953 2 0.4236 21.26148 1.90066 12.95223 0 1 0 + 2859 953 2 0.4236 21.76578 1.15061 11.59222 0 1 0 + 2860 954 1 -0.8472 17.77139 21.95343 29.40937 -1 0 0 + 2861 954 2 0.4236 18.03328 22.88377 29.66597 -1 0 0 + 2862 954 2 0.4236 18.43500 21.30533 29.78294 -1 0 0 + 2863 955 1 -0.8472 22.46831 13.05746 12.45944 1 0 0 + 2864 955 2 0.4236 23.14396 13.67278 12.05350 1 0 0 + 2865 955 2 0.4236 21.99568 12.55653 11.73444 1 0 0 + 2866 956 1 -0.8472 11.21873 21.74164 13.52771 0 0 0 + 2867 956 2 0.4236 11.52085 22.26841 12.73327 0 0 0 + 2868 956 2 0.4236 10.30802 21.36754 13.35285 0 0 0 + 2869 957 1 -0.8472 21.72722 10.88987 26.22695 0 0 0 + 2870 957 2 0.4236 20.94466 11.47054 26.00254 0 0 0 + 2871 957 2 0.4236 21.66050 10.59424 27.17988 0 0 0 + 2872 958 1 -0.8472 18.46838 8.09516 14.49744 0 0 0 + 2873 958 2 0.4236 19.27863 8.50562 14.07916 0 0 0 + 2874 958 2 0.4236 17.95254 7.59374 13.80289 0 0 0 + 2875 959 1 -0.8472 2.92072 4.40179 25.40986 1 0 0 + 2876 959 2 0.4236 2.92375 3.55851 24.87244 1 0 0 + 2877 959 2 0.4236 3.86068 4.71670 25.54126 1 0 0 + 2878 960 1 -0.8472 5.27077 8.45307 8.47067 0 1 0 + 2879 960 2 0.4236 6.13663 8.79876 8.10908 0 1 0 + 2880 960 2 0.4236 4.51250 8.83717 7.94393 0 1 0 + 2881 961 1 -0.8472 1.76958 24.14716 31.58841 1 1 0 + 2882 961 2 0.4236 1.60567 23.16857 31.46406 1 1 0 + 2883 961 2 0.4236 0.90327 24.60856 31.77958 1 1 0 + 2884 962 1 -0.8472 24.44793 22.66778 34.86292 -1 -1 0 + 2885 962 2 0.4236 24.15877 23.46022 34.32593 -1 -1 0 + 2886 962 2 0.4236 23.64563 22.22751 35.26595 -1 -1 0 + 2887 963 1 -0.8472 4.18215 10.93176 27.72718 0 -1 0 + 2888 963 2 0.4236 4.41887 10.10976 27.20934 0 -1 0 + 2889 963 2 0.4236 4.91894 11.14537 28.36860 0 -1 0 + 2890 964 1 -0.8472 17.69104 23.19157 14.16626 0 -1 0 + 2891 964 2 0.4236 17.12986 23.22868 13.33945 0 -1 0 + 2892 964 2 0.4236 18.57188 23.63143 13.99125 0 -1 0 + 2893 965 1 -0.8472 7.47643 4.12395 28.94377 1 1 0 + 2894 965 2 0.4236 6.53643 4.10965 28.60301 1 1 0 + 2895 965 2 0.4236 8.06807 3.62466 28.31082 1 1 0 + 2896 966 1 -0.8472 24.00375 12.48900 25.21944 0 1 0 + 2897 966 2 0.4236 24.26664 12.12701 24.32514 0 1 0 + 2898 966 2 0.4236 23.24029 11.95566 25.58362 0 1 0 + 2899 967 1 -0.8472 29.91768 1.50145 13.03496 -1 1 0 + 2900 967 2 0.4236 29.05335 1.37915 12.54717 -1 1 0 + 2901 967 2 0.4236 30.45234 0.65805 12.98236 -1 1 0 + 2902 968 1 -0.8472 10.68432 11.21692 11.70509 1 0 0 + 2903 968 2 0.4236 10.03839 11.20065 10.94187 1 0 0 + 2904 968 2 0.4236 10.94732 12.16199 11.89905 1 0 0 + 2905 969 1 -0.8472 26.83864 6.78430 27.89995 0 1 0 + 2906 969 2 0.4236 27.65156 6.22192 28.05128 0 1 0 + 2907 969 2 0.4236 26.70471 6.91923 26.91824 0 1 0 + 2908 970 1 -0.8472 19.45471 27.26305 28.04780 0 -1 0 + 2909 970 2 0.4236 19.04134 26.44985 27.63821 0 -1 0 + 2910 970 2 0.4236 18.84070 27.63413 28.74441 0 -1 0 + 2911 971 1 -0.8472 9.18329 17.54386 23.21323 0 0 0 + 2912 971 2 0.4236 9.75033 18.33292 22.97698 0 0 0 + 2913 971 2 0.4236 9.51723 17.13593 24.06294 0 0 0 + 2914 972 1 -0.8472 18.24866 34.63289 20.65628 1 -1 0 + 2915 972 2 0.4236 17.34524 34.34596 20.33775 1 -1 0 + 2916 972 2 0.4236 18.85770 34.74797 19.87159 1 -1 0 + 2917 973 1 -0.8472 32.52843 32.10108 29.97826 1 -1 0 + 2918 973 2 0.4236 33.25404 32.71935 30.28020 1 -1 0 + 2919 973 2 0.4236 31.64947 32.57665 30.01282 1 -1 0 + 2920 974 1 -0.8472 3.80241 11.49035 8.14956 0 0 0 + 2921 974 2 0.4236 2.91277 11.28906 7.73975 0 0 0 + 2922 974 2 0.4236 3.77571 11.27632 9.12598 0 0 0 + 2923 975 1 -0.8472 19.18653 31.11922 32.50674 0 -1 0 + 2924 975 2 0.4236 19.84180 31.57338 33.11034 0 -1 0 + 2925 975 2 0.4236 18.78222 31.79206 31.88727 0 -1 0 + 2926 976 1 -0.8472 13.34133 28.41424 10.64040 0 -1 0 + 2927 976 2 0.4236 14.24813 28.04636 10.43466 0 -1 0 + 2928 976 2 0.4236 12.65347 27.92404 10.10514 0 -1 0 + 2929 977 1 -0.8472 9.56133 12.05955 5.53720 0 1 0 + 2930 977 2 0.4236 10.08838 11.22096 5.67478 0 1 0 + 2931 977 2 0.4236 9.83717 12.48936 4.67747 0 1 0 + 2932 978 1 -0.8472 7.60177 1.79201 2.09133 0 1 0 + 2933 978 2 0.4236 7.01076 2.58930 1.96898 0 1 0 + 2934 978 2 0.4236 7.51467 1.45316 3.02810 0 1 0 + 2935 979 1 -0.8472 28.78709 11.03509 9.63724 -1 0 0 + 2936 979 2 0.4236 28.90284 11.24252 8.66588 -1 0 0 + 2937 979 2 0.4236 29.64333 11.21599 10.12102 -1 0 0 + 2938 980 1 -0.8472 4.02056 14.84396 0.81996 0 0 0 + 2939 980 2 0.4236 4.39483 14.28239 0.08204 0 0 0 + 2940 980 2 0.4236 3.13862 15.22111 0.53729 0 0 0 + 2941 981 1 -0.8472 28.30108 1.63976 9.02932 -1 0 0 + 2942 981 2 0.4236 28.30413 2.50150 9.53661 -1 0 0 + 2943 981 2 0.4236 27.77598 0.95633 9.53643 -1 0 0 + 2944 982 1 -0.8472 8.86171 20.46625 30.05231 1 0 0 + 2945 982 2 0.4236 8.40488 20.55409 29.16712 1 0 0 + 2946 982 2 0.4236 8.28711 19.93206 30.67235 1 0 0 + 2947 983 1 -0.8472 18.15383 12.23297 19.15095 0 0 0 + 2948 983 2 0.4236 18.65379 11.76439 18.42265 0 0 0 + 2949 983 2 0.4236 17.17857 12.02685 19.07172 0 0 0 + 2950 984 1 -0.8472 30.27019 30.12955 18.83444 1 -1 0 + 2951 984 2 0.4236 31.18072 29.72570 18.74618 1 -1 0 + 2952 984 2 0.4236 29.82132 30.13800 17.94092 1 -1 0 + 2953 985 1 -0.8472 28.72211 14.94210 4.97487 0 1 0 + 2954 985 2 0.4236 29.12355 14.04801 5.17337 0 1 0 + 2955 985 2 0.4236 27.75045 14.83217 4.76577 0 1 0 + 2956 986 1 -0.8472 30.79139 17.34339 25.87787 -1 1 0 + 2957 986 2 0.4236 31.64276 17.65688 25.45739 -1 1 0 + 2958 986 2 0.4236 30.40203 16.60291 25.33010 -1 1 0 + 2959 987 1 -0.8472 20.85050 21.78155 22.79995 0 0 0 + 2960 987 2 0.4236 19.95588 22.19630 22.63385 0 0 0 + 2961 987 2 0.4236 21.56993 22.42549 22.53966 0 0 0 + 2962 988 1 -0.8472 3.21863 15.29262 10.93758 0 0 0 + 2963 988 2 0.4236 3.54765 14.72274 11.69052 0 0 0 + 2964 988 2 0.4236 3.77983 16.11786 10.87424 0 0 0 + 2965 989 1 -0.8472 33.92695 7.67534 6.62621 0 0 0 + 2966 989 2 0.4236 34.05946 8.56683 7.05938 0 0 0 + 2967 989 2 0.4236 34.43072 7.64604 5.76290 0 0 0 + 2968 990 1 -0.8472 33.09880 6.74056 25.13263 0 0 0 + 2969 990 2 0.4236 33.49921 6.29904 24.32971 0 0 0 + 2970 990 2 0.4236 32.69648 7.61622 24.86557 0 0 0 + 2971 991 1 -0.8472 29.48955 24.63672 11.59942 0 0 0 + 2972 991 2 0.4236 29.87987 24.05306 12.31141 0 0 0 + 2973 991 2 0.4236 28.56720 24.32043 11.37763 0 0 0 + 2974 992 1 -0.8472 2.34540 1.81481 21.23390 1 0 0 + 2975 992 2 0.4236 1.37305 1.62113 21.10363 1 0 0 + 2976 992 2 0.4236 2.62003 2.56305 20.63002 1 0 0 +2977 993 1 -0.8472 11.06680 31.42120 0.34581 0 1 0 +2978 993 2 0.4236 10.24429 30.97031 35.44638 0 1 -1 +2979 993 2 0.4236 11.86807 30.86173 0.13383 0 1 0 + 2980 994 1 -0.8472 34.93665 6.07698 11.10142 0 0 0 + 2981 994 2 0.4236 0.18436 6.56576 10.66276 1 0 0 + 2982 994 2 0.4236 34.63985 5.32489 10.51300 0 0 0 + 2983 995 1 -0.8472 20.00992 11.13905 17.51811 0 0 0 + 2984 995 2 0.4236 20.59134 10.54105 16.96644 0 0 0 + 2985 995 2 0.4236 20.46099 11.33089 18.38972 0 0 0 + 2986 996 1 -0.8472 26.63427 15.23996 11.58010 0 0 0 + 2987 996 2 0.4236 25.74658 14.89786 11.27210 0 0 0 + 2988 996 2 0.4236 26.79731 16.14495 11.18720 0 0 0 + 2989 997 1 -0.8472 7.32425 7.27500 11.52314 1 -1 0 + 2990 997 2 0.4236 7.92814 7.17928 10.73188 1 -1 0 + 2991 997 2 0.4236 6.60180 7.93375 11.31325 1 -1 0 + 2992 998 1 -0.8472 8.60862 9.07382 19.34881 1 0 0 + 2993 998 2 0.4236 8.98896 8.19288 19.63037 1 0 0 + 2994 998 2 0.4236 7.76257 8.92345 18.83745 1 0 0 + 2995 999 1 -0.8472 11.21280 13.03889 22.91023 0 0 0 + 2996 999 2 0.4236 10.95126 13.31509 23.83501 0 0 0 + 2997 999 2 0.4236 10.41518 13.08938 22.30919 0 0 0 + 2998 1000 1 -0.8472 15.70634 18.82610 34.73704 0 0 0 + 2999 1000 2 0.4236 15.21674 19.57997 35.17510 0 0 0 + 3000 1000 2 0.4236 16.64346 19.11026 34.53453 0 0 0 + 3001 1001 1 -0.8472 23.12248 30.95440 32.80659 0 -1 0 + 3002 1001 2 0.4236 22.36914 31.30904 33.36034 0 -1 0 + 3003 1001 2 0.4236 23.81237 31.66815 32.68603 0 -1 0 + 3004 1002 1 -0.8472 2.07358 30.68505 32.50823 1 0 0 + 3005 1002 2 0.4236 2.42659 29.78201 32.26368 1 0 0 + 3006 1002 2 0.4236 2.83305 31.27939 32.77274 1 0 0 + 3007 1003 1 -0.8472 12.19941 21.23716 5.42888 1 0 0 + 3008 1003 2 0.4236 11.39729 21.44906 5.98714 1 0 0 + 3009 1003 2 0.4236 12.89772 21.93912 5.56872 1 0 0 + 3010 1004 1 -0.8472 16.49685 26.02267 23.28030 0 -1 0 + 3011 1004 2 0.4236 15.74529 26.37284 23.83930 0 -1 0 + 3012 1004 2 0.4236 16.83643 26.75059 22.68468 0 -1 0 + 3013 1005 1 -0.8472 3.71190 6.69664 23.09349 1 1 0 + 3014 1005 2 0.4236 4.51275 7.22874 23.36821 1 1 0 + 3015 1005 2 0.4236 3.05011 6.67935 23.84295 1 1 0 + 3016 1006 1 -0.8472 23.69417 19.64211 1.85845 0 0 0 + 3017 1006 2 0.4236 23.57866 19.06634 2.66783 0 0 0 + 3018 1006 2 0.4236 24.60178 20.06158 1.87460 0 0 0 + 3019 1007 1 -0.8472 12.49699 4.32659 15.95705 0 0 0 + 3020 1007 2 0.4236 12.08185 4.98442 15.32868 0 0 0 + 3021 1007 2 0.4236 13.47285 4.52425 16.04971 0 0 0 + 3022 1008 1 -0.8472 2.88817 24.31400 12.33073 0 0 0 + 3023 1008 2 0.4236 2.75143 24.30782 11.34016 0 0 0 + 3024 1008 2 0.4236 2.08913 24.71913 12.77495 0 0 0 + 3025 1009 1 -0.8472 4.47007 13.67005 19.84575 0 1 0 + 3026 1009 2 0.4236 4.22969 13.43095 18.90498 0 1 0 + 3027 1009 2 0.4236 4.94923 14.54770 19.85454 0 1 0 + 3028 1010 1 -0.8472 7.11277 19.85870 18.43619 0 0 0 + 3029 1010 2 0.4236 7.43137 20.07081 19.36001 0 0 0 + 3030 1010 2 0.4236 7.65350 19.10536 18.06190 0 0 0 + 3031 1011 1 -0.8472 23.31116 24.86119 33.37442 0 0 0 + 3032 1011 2 0.4236 23.60537 25.39212 32.57973 0 0 0 + 3033 1011 2 0.4236 23.46057 25.39567 34.20626 0 0 0 + 3034 1012 1 -0.8472 6.59172 35.26853 10.29528 0 0 0 + 3035 1012 2 0.4236 6.03345 0.59177 10.30124 0 1 0 + 3036 1012 2 0.4236 6.84495 35.03042 11.23290 0 0 0 + 3037 1013 1 -0.8472 21.58857 3.03691 28.35042 0 -1 0 + 3038 1013 2 0.4236 21.37983 3.73264 27.66317 0 -1 0 + 3039 1013 2 0.4236 20.77001 2.84809 28.89286 0 -1 0 + 3040 1014 1 -0.8472 24.81563 5.45260 22.57323 -1 0 0 + 3041 1014 2 0.4236 24.32945 4.64426 22.24134 -1 0 0 + 3042 1014 2 0.4236 24.64602 6.22053 21.95564 -1 0 0 + 3043 1015 1 -0.8472 34.44382 0.14050 3.28625 -1 1 0 + 3044 1015 2 0.4236 34.61155 35.38786 2.33507 -1 0 0 + 3045 1015 2 0.4236 35.31692 0.29608 3.74826 -1 1 0 + 3046 1016 1 -0.8472 4.27791 2.41161 7.98065 1 1 0 + 3047 1016 2 0.4236 4.66546 1.93228 7.19326 1 1 0 + 3048 1016 2 0.4236 3.77390 3.21600 7.66616 1 1 0 + 3049 1017 1 -0.8472 24.52356 31.65334 21.53988 0 -1 0 + 3050 1017 2 0.4236 24.66693 30.96367 22.24963 0 -1 0 + 3051 1017 2 0.4236 25.23898 31.57129 20.84603 0 -1 0 + 3052 1018 1 -0.8472 34.42078 34.68317 25.27342 0 -1 0 + 3053 1018 2 0.4236 33.95998 0.05744 25.16350 0 0 0 + 3054 1018 2 0.4236 33.89777 34.10967 25.90389 0 -1 0 + 3055 1019 1 -0.8472 11.26425 8.85731 13.25615 0 0 0 + 3056 1019 2 0.4236 11.21883 9.47948 12.47465 0 0 0 + 3057 1019 2 0.4236 10.33767 8.63461 13.55915 0 0 0 +3058 1020 1 -0.8472 17.04930 2.12995 0.32083 0 0 0 +3059 1020 2 0.4236 17.15528 2.34363 1.29194 0 0 0 +3060 1020 2 0.4236 17.87979 1.68577 35.43191 0 0 -1 + 3061 1021 1 -0.8472 24.82320 22.07636 14.94227 0 0 0 + 3062 1021 2 0.4236 25.10356 22.41409 15.84075 0 0 0 + 3063 1021 2 0.4236 24.74082 22.84510 14.30805 0 0 0 + 3064 1022 1 -0.8472 17.77824 29.21423 7.78133 0 0 0 + 3065 1022 2 0.4236 17.50573 29.18071 8.74291 0 0 0 + 3066 1022 2 0.4236 17.68695 28.30413 7.37716 0 0 0 + 3067 1023 1 -0.8472 14.04599 24.76525 11.84064 0 -1 0 + 3068 1023 2 0.4236 14.75054 24.05867 11.90618 0 -1 0 + 3069 1023 2 0.4236 13.88820 25.16342 12.74426 0 -1 0 + 3070 1024 1 -0.8472 24.42854 23.40458 24.83813 -1 0 0 + 3071 1024 2 0.4236 24.80885 24.10174 25.44580 -1 0 0 + 3072 1024 2 0.4236 23.67780 23.79831 24.30777 -1 0 0 +3073 1025 1 -0.8472 11.88653 15.08214 0.29503 1 0 0 +3074 1025 2 0.4236 12.54716 15.05647 34.99198 1 0 -1 +3075 1025 2 0.4236 11.40432 15.95808 0.28467 1 0 0 + 3076 1026 1 -0.8472 11.00548 18.76354 17.70020 1 0 0 + 3077 1026 2 0.4236 11.20683 19.08015 18.62714 1 0 0 + 3078 1026 2 0.4236 11.36832 19.41906 17.03794 1 0 0 + 3079 1027 1 -0.8472 0.21383 34.43335 28.44343 0 -1 0 + 3080 1027 2 0.4236 35.41456 34.46051 29.39515 -1 -1 0 + 3081 1027 2 0.4236 0.52632 33.51015 28.21990 0 -1 0 + 3082 1028 1 -0.8472 27.69776 7.75551 5.28429 0 0 0 + 3083 1028 2 0.4236 28.61915 7.37076 5.22974 0 0 0 + 3084 1028 2 0.4236 27.22506 7.37690 6.08001 0 0 0 + 3085 1029 1 -0.8472 18.57223 5.67473 20.22081 0 0 0 + 3086 1029 2 0.4236 19.11772 6.30191 20.77677 0 0 0 + 3087 1029 2 0.4236 19.17712 5.02379 19.76220 0 0 0 + 3088 1030 1 -0.8472 2.33426 13.17303 32.36357 1 1 0 + 3089 1030 2 0.4236 1.55811 13.79024 32.49242 1 1 0 + 3090 1030 2 0.4236 2.00010 12.26705 32.10388 1 1 0 + 3091 1031 1 -0.8472 35.01515 31.73394 0.97577 0 0 0 + 3092 1031 2 0.4236 34.61233 31.43018 1.83914 0 0 0 + 3093 1031 2 0.4236 34.51750 31.32192 0.21256 0 0 0 + 3094 1032 1 -0.8472 17.16853 3.81647 14.52459 0 1 0 + 3095 1032 2 0.4236 16.50516 3.96386 15.25821 0 1 0 + 3096 1032 2 0.4236 17.89736 3.21428 14.85032 0 1 0 + 3097 1033 1 -0.8472 23.73791 2.45782 3.91262 -1 1 0 + 3098 1033 2 0.4236 23.84521 1.51408 4.22530 -1 1 0 + 3099 1033 2 0.4236 22.76894 2.70462 3.92407 -1 1 0 + 3100 1034 1 -0.8472 22.46593 29.50499 22.79524 -1 1 0 + 3101 1034 2 0.4236 22.76962 29.36450 21.85291 -1 1 0 + 3102 1034 2 0.4236 22.69303 28.69928 23.34222 -1 1 0 + 3103 1035 1 -0.8472 8.33742 6.62626 29.93646 0 0 0 + 3104 1035 2 0.4236 8.89033 7.18506 29.31844 0 0 0 + 3105 1035 2 0.4236 8.14846 5.74280 29.50784 0 0 0 + 3106 1036 1 -0.8472 35.17706 29.80069 28.03160 0 0 0 + 3107 1036 2 0.4236 35.01927 29.87252 29.01643 0 0 0 + 3108 1036 2 0.4236 35.31696 28.84163 27.78553 0 0 0 + 3109 1037 1 -0.8472 30.28414 0.50891 35.01782 0 2 0 + 3110 1037 2 0.4236 29.35072 0.49034 34.65963 0 2 0 + 3111 1037 2 0.4236 30.92912 0.62031 34.26180 0 2 0 + 3112 1038 1 -0.8472 9.04361 33.89809 34.15394 0 -1 0 + 3113 1038 2 0.4236 10.01843 33.94915 34.37094 0 -1 0 + 3114 1038 2 0.4236 8.90680 33.28308 33.37739 0 -1 0 + 3115 1039 1 -0.8472 8.19458 7.90346 34.62935 0 1 0 + 3116 1039 2 0.4236 8.09541 8.76794 35.12211 0 1 0 + 3117 1039 2 0.4236 8.56665 8.08000 33.71811 0 1 0 + 3118 1040 1 -0.8472 16.36566 30.72861 16.14680 0 1 0 + 3119 1040 2 0.4236 15.39278 30.64034 16.36047 0 1 0 + 3120 1040 2 0.4236 16.69757 29.87490 15.74557 0 1 0 + 3121 1041 1 -0.8472 1.38336 21.51866 15.82979 1 -1 0 + 3122 1041 2 0.4236 2.18483 22.02775 16.14354 1 -1 0 + 3123 1041 2 0.4236 1.45028 21.36630 14.84376 1 -1 0 + 3124 1042 1 -0.8472 24.49576 16.91647 14.41347 -1 0 0 + 3125 1042 2 0.4236 24.46970 15.94853 14.16378 -1 0 0 + 3126 1042 2 0.4236 23.81844 17.41789 13.87513 -1 0 0 + 3127 1043 1 -0.8472 6.59665 30.08094 32.96472 1 -1 0 + 3128 1043 2 0.4236 6.38187 29.47645 33.73180 1 -1 0 + 3129 1043 2 0.4236 5.91582 30.81166 32.91541 1 -1 0 + 3130 1044 1 -0.8472 13.78850 1.75258 32.98996 0 1 0 + 3131 1044 2 0.4236 13.86420 0.79825 32.70103 0 1 0 + 3132 1044 2 0.4236 13.84481 1.80443 33.98698 0 1 0 + 3133 1045 1 -0.8472 4.51044 20.46650 25.38327 0 -1 0 + 3134 1045 2 0.4236 4.07148 20.23567 26.25162 0 -1 0 + 3135 1045 2 0.4236 5.12949 19.72804 25.11607 0 -1 0 + 3136 1046 1 -0.8472 8.55000 4.97817 10.53916 -1 0 0 + 3137 1046 2 0.4236 9.43556 4.58181 10.29702 -1 0 0 + 3138 1046 2 0.4236 7.81839 4.44049 10.12007 -1 0 0 + 3139 1047 1 -0.8472 6.56871 13.42917 12.46635 1 0 0 + 3140 1047 2 0.4236 6.84090 14.14672 11.82525 1 0 0 + 3141 1047 2 0.4236 6.79037 13.71379 13.39897 1 0 0 + 3142 1048 1 -0.8472 17.30718 29.56617 18.82292 0 0 0 + 3143 1048 2 0.4236 16.96795 30.09198 18.04294 0 0 0 + 3144 1048 2 0.4236 17.82287 30.16861 19.43211 0 0 0 + 3145 1049 1 -0.8472 7.07716 33.67983 15.88066 1 0 0 + 3146 1049 2 0.4236 8.00388 33.31507 15.97055 1 0 0 + 3147 1049 2 0.4236 7.04393 34.60331 16.26278 1 0 0 + 3148 1050 1 -0.8472 4.32190 32.08805 0.42408 0 0 0 + 3149 1050 2 0.4236 5.29471 32.01881 0.20306 0 0 0 + 3150 1050 2 0.4236 3.99734 33.01036 0.21455 0 0 0 + 3151 1051 1 -0.8472 12.50008 15.43329 7.00231 0 1 0 + 3152 1051 2 0.4236 12.41639 16.01705 7.80983 0 1 0 + 3153 1051 2 0.4236 12.42069 15.99245 6.17710 0 1 0 + 3154 1052 1 -0.8472 20.22282 27.44026 4.69087 -1 0 0 + 3155 1052 2 0.4236 20.73730 27.36336 5.54490 -1 0 0 + 3156 1052 2 0.4236 20.53211 26.73685 4.05097 -1 0 0 + 3157 1053 1 -0.8472 30.00375 27.99420 32.63038 1 1 0 + 3158 1053 2 0.4236 30.47584 28.62820 32.01789 1 1 0 + 3159 1053 2 0.4236 30.56692 27.17887 32.76465 1 1 0 + 3160 1054 1 -0.8472 14.63493 3.86305 1.20786 0 0 0 + 3161 1054 2 0.4236 15.22310 3.05436 1.20241 0 0 0 + 3162 1054 2 0.4236 13.73513 3.62321 0.84348 0 0 0 + 3163 1055 1 -0.8472 4.28675 7.12818 1.70239 1 1 0 + 3164 1055 2 0.4236 4.90666 6.75032 1.01472 1 1 0 + 3165 1055 2 0.4236 4.14189 6.45424 2.42680 1 1 0 + 3166 1056 1 -0.8472 29.16030 26.19530 28.88081 0 -1 0 + 3167 1056 2 0.4236 29.28848 26.91125 28.19459 0 -1 0 + 3168 1056 2 0.4236 28.24711 26.27605 29.28020 0 -1 0 + 3169 1057 1 -0.8472 3.63095 32.78344 28.91318 0 0 0 + 3170 1057 2 0.4236 3.02331 32.00049 28.78007 0 0 0 + 3171 1057 2 0.4236 4.53711 32.45965 29.18516 0 0 0 + 3172 1058 1 -0.8472 23.76056 25.84720 5.67648 0 0 0 + 3173 1058 2 0.4236 23.89776 24.87390 5.86034 0 0 0 + 3174 1058 2 0.4236 24.62472 26.25609 5.38322 0 0 0 + 3175 1059 1 -0.8472 25.38019 33.27871 0.14931 -1 0 0 + 3176 1059 2 0.4236 26.31880 33.35051 0.48664 -1 0 0 + 3177 1059 2 0.4236 24.90181 34.14226 0.30861 -1 0 0 + 3178 1060 1 -0.8472 0.68491 1.52207 17.07190 0 1 0 + 3179 1060 2 0.4236 0.51175 2.44926 17.40397 0 1 0 + 3180 1060 2 0.4236 1.30523 1.55905 16.28844 0 1 0 + 3181 1061 1 -0.8472 23.65181 8.67747 18.77421 0 0 0 + 3182 1061 2 0.4236 22.68856 8.74187 18.51354 0 0 0 + 3183 1061 2 0.4236 24.14900 9.46503 18.41024 0 0 0 + 3184 1062 1 -0.8472 33.05211 15.62986 13.34261 0 0 0 + 3185 1062 2 0.4236 34.00020 15.64431 13.02507 0 0 0 + 3186 1062 2 0.4236 32.54828 14.91657 12.85545 0 0 0 + 3187 1063 1 -0.8472 18.32997 24.65156 30.13550 0 0 0 + 3188 1063 2 0.4236 18.99945 24.85640 30.84948 0 0 0 + 3189 1063 2 0.4236 18.12862 25.48369 29.61879 0 0 0 + 3190 1064 1 -0.8472 5.36408 26.76539 9.70657 1 0 0 + 3191 1064 2 0.4236 4.61487 26.83602 9.04804 1 0 0 + 3192 1064 2 0.4236 5.01332 26.41228 10.57390 1 0 0 + 3193 1065 1 -0.8472 10.10567 10.08061 21.54331 0 0 0 + 3194 1065 2 0.4236 10.54602 10.94036 21.28469 0 0 0 + 3195 1065 2 0.4236 9.48169 9.79389 20.81643 0 0 0 + 3196 1066 1 -0.8472 19.00683 35.07186 29.84480 0 0 0 + 3197 1066 2 0.4236 19.04738 0.45529 29.39029 0 1 0 + 3198 1066 2 0.4236 19.86037 34.57629 29.68408 0 0 0 + 3199 1067 1 -0.8472 29.99711 14.98272 24.72885 -1 0 0 + 3200 1067 2 0.4236 29.69719 14.56470 25.58631 -1 0 0 + 3201 1067 2 0.4236 30.81369 14.51127 24.39589 -1 0 0 + 3202 1068 1 -0.8472 6.63614 29.00766 30.49536 1 0 0 + 3203 1068 2 0.4236 7.11384 29.32519 29.67625 1 0 0 + 3204 1068 2 0.4236 6.90641 29.56908 31.27747 1 0 0 + 3205 1069 1 -0.8472 10.11551 30.29423 18.30231 0 0 0 + 3206 1069 2 0.4236 10.98545 30.70152 18.58028 0 0 0 + 3207 1069 2 0.4236 10.19849 29.93235 17.37380 0 0 0 + 3208 1070 1 -0.8472 32.38903 34.15199 4.78994 0 0 0 + 3209 1070 2 0.4236 33.33485 34.20962 4.47042 0 0 0 + 3210 1070 2 0.4236 32.32473 33.47169 5.51998 0 0 0 + 3211 1071 1 -0.8472 8.26907 25.90440 25.87939 0 0 0 + 3212 1071 2 0.4236 7.44369 26.19768 25.39703 0 0 0 + 3213 1071 2 0.4236 8.21908 26.19751 26.83413 0 0 0 + 3214 1072 1 -0.8472 34.39606 28.76401 22.33914 -1 0 0 + 3215 1072 2 0.4236 34.78287 28.19023 21.61726 -1 0 0 + 3216 1072 2 0.4236 33.95646 29.56347 21.92983 -1 0 0 + 3217 1073 1 -0.8472 26.17808 0.33318 20.75823 0 0 0 + 3218 1073 2 0.4236 27.03602 0.13193 21.23088 0 0 0 + 3219 1073 2 0.4236 25.41800 35.41922 21.25378 0 -1 0 + 3220 1074 1 -0.8472 10.61100 26.37578 18.41595 0 -1 0 + 3221 1074 2 0.4236 10.08330 25.72318 17.87230 0 -1 0 + 3222 1074 2 0.4236 10.12037 26.57693 19.26374 0 -1 0 + 3223 1075 1 -0.8472 8.64359 7.64068 22.40826 1 1 0 + 3224 1075 2 0.4236 9.38042 7.39398 21.77883 1 1 0 + 3225 1075 2 0.4236 9.00778 7.70978 23.33701 1 1 0 + 3226 1076 1 -0.8472 34.94158 6.28899 29.47998 -1 1 0 + 3227 1076 2 0.4236 34.74992 5.34456 29.21292 -1 1 0 + 3228 1076 2 0.4236 35.35594 6.30049 30.38998 -1 1 0 + 3229 1077 1 -0.8472 22.96785 8.26787 24.97489 0 0 0 + 3230 1077 2 0.4236 23.63128 8.57475 24.29249 0 0 0 + 3231 1077 2 0.4236 22.64048 9.05422 25.49872 0 0 0 + 3232 1078 1 -0.8472 11.45410 14.58764 29.16903 -1 -1 0 + 3233 1078 2 0.4236 11.28686 15.56996 29.25265 -1 -1 0 + 3234 1078 2 0.4236 10.98431 14.10543 29.90843 -1 -1 0 + 3235 1079 1 -0.8472 30.98568 28.19268 16.35175 -1 -1 0 + 3236 1079 2 0.4236 30.86407 29.08556 15.91827 -1 -1 0 + 3237 1079 2 0.4236 31.87810 27.81855 16.09965 -1 -1 0 + 3238 1080 1 -0.8472 19.60511 34.63779 0.73034 0 -1 0 + 3239 1080 2 0.4236 20.07181 34.47947 1.60044 0 -1 0 + 3240 1080 2 0.4236 19.65749 0.10212 0.49583 0 0 0 + 3241 1081 1 -0.8472 6.52788 20.20134 8.34657 -1 0 0 + 3242 1081 2 0.4236 6.44859 20.82437 9.12471 -1 0 0 + 3243 1081 2 0.4236 6.75885 20.72214 7.52476 -1 0 0 + 3244 1082 1 -0.8472 2.22359 5.95019 13.03372 1 0 0 + 3245 1082 2 0.4236 3.20048 5.73680 13.04474 1 0 0 + 3246 1082 2 0.4236 1.93257 6.22714 13.94943 1 0 0 + 3247 1083 1 -0.8472 33.54633 3.02522 18.32549 -1 0 0 + 3248 1083 2 0.4236 33.26547 2.84323 19.26782 -1 0 0 + 3249 1083 2 0.4236 32.87661 2.63119 17.69609 -1 0 0 + 3250 1084 1 -0.8472 27.71341 5.53405 14.97739 0 0 0 + 3251 1084 2 0.4236 28.61577 5.86831 15.24942 0 0 0 + 3252 1084 2 0.4236 27.30630 6.16972 14.32155 0 0 0 + 3253 1085 1 -0.8472 15.94416 23.73383 21.56160 0 1 0 + 3254 1085 2 0.4236 15.98176 24.62802 22.00764 0 1 0 + 3255 1085 2 0.4236 15.63717 23.84542 20.61651 0 1 0 + 3256 1086 1 -0.8472 6.69227 14.39868 15.10160 0 0 0 + 3257 1086 2 0.4236 7.68503 14.51748 15.11791 0 0 0 + 3258 1086 2 0.4236 6.25284 15.28527 14.95723 0 0 0 + 3259 1087 1 -0.8472 5.95374 12.14523 3.05261 0 0 0 + 3260 1087 2 0.4236 6.30415 12.22359 2.11933 0 0 0 + 3261 1087 2 0.4236 5.21340 11.47341 3.07535 0 0 0 + 3262 1088 1 -0.8472 12.10252 30.80971 11.22350 1 1 0 + 3263 1088 2 0.4236 12.52277 29.92727 11.01224 1 1 0 + 3264 1088 2 0.4236 12.81790 31.48717 11.39446 1 1 0 + 3265 1089 1 -0.8472 18.93365 2.00832 15.99019 0 -1 0 + 3266 1089 2 0.4236 19.47296 1.23800 15.65004 0 -1 0 + 3267 1089 2 0.4236 18.54763 1.77650 16.88304 0 -1 0 + 3268 1090 1 -0.8472 23.96448 13.72856 20.70151 -1 1 0 + 3269 1090 2 0.4236 24.48869 14.52327 21.00735 -1 1 0 + 3270 1090 2 0.4236 23.44154 13.96884 19.88371 -1 1 0 + 3271 1091 1 -0.8472 8.25157 5.78700 16.02100 0 1 0 + 3272 1091 2 0.4236 8.74962 5.11181 16.56511 0 1 0 + 3273 1091 2 0.4236 8.66944 5.85908 15.11539 0 1 0 + 3274 1092 1 -0.8472 28.35054 22.25648 21.49869 -1 -1 0 + 3275 1092 2 0.4236 29.09362 22.80409 21.11415 -1 -1 0 + 3276 1092 2 0.4236 28.28496 22.42712 22.48181 -1 -1 0 + 3277 1093 1 -0.8472 1.81162 0.06670 2.46594 0 1 0 + 3278 1093 2 0.4236 1.21799 34.98582 1.91575 0 0 0 + 3279 1093 2 0.4236 1.94043 35.16403 3.36929 0 0 0 + 3280 1094 1 -0.8472 35.53166 20.98042 3.82252 -1 0 0 + 3281 1094 2 0.4236 34.63470 21.34595 3.57389 -1 0 0 + 3282 1094 2 0.4236 0.74022 21.58995 3.47998 0 0 0 + 3283 1095 1 -0.8472 11.17694 3.63400 11.43282 0 0 0 + 3284 1095 2 0.4236 10.46131 2.93763 11.37926 0 0 0 + 3285 1095 2 0.4236 11.26616 3.94827 12.37791 0 0 0 + 3286 1096 1 -0.8472 9.92654 28.89578 20.68262 0 0 0 + 3287 1096 2 0.4236 9.98108 29.33694 19.78687 0 0 0 + 3288 1096 2 0.4236 9.37314 28.06585 20.61226 0 0 0 + 3289 1097 1 -0.8472 8.08827 0.98702 4.46142 1 1 0 + 3290 1097 2 0.4236 8.92399 1.53197 4.39386 1 1 0 + 3291 1097 2 0.4236 8.30273 35.53173 4.29053 1 0 0 + 3292 1098 1 -0.8472 2.10866 25.58374 29.35790 0 -1 0 + 3293 1098 2 0.4236 2.19232 25.06311 30.20753 0 -1 0 + 3294 1098 2 0.4236 3.01122 25.90930 29.07623 0 -1 0 + 3295 1099 1 -0.8472 0.21720 17.12702 5.62458 1 0 0 + 3296 1099 2 0.4236 0.72164 16.95368 6.47042 1 0 0 + 3297 1099 2 0.4236 34.80790 17.46284 5.84542 0 0 0 + 3298 1100 1 -0.8472 29.35960 32.88200 7.15034 0 0 0 + 3299 1100 2 0.4236 28.43114 33.02456 6.80738 0 0 0 + 3300 1100 2 0.4236 29.47698 33.37806 8.01064 0 0 0 + 3301 1101 1 -0.8472 33.46143 17.44437 24.98963 1 0 0 + 3302 1101 2 0.4236 33.72538 16.51329 25.24138 1 0 0 + 3303 1101 2 0.4236 33.83439 18.08860 25.65735 1 0 0 + 3304 1102 1 -0.8472 14.63472 31.97268 20.11819 1 -1 0 + 3305 1102 2 0.4236 14.36253 32.40462 20.97800 1 -1 0 + 3306 1102 2 0.4236 15.60752 31.74378 20.15354 1 -1 0 + 3307 1103 1 -0.8472 17.90095 30.19602 29.07393 0 0 0 + 3308 1103 2 0.4236 17.96731 30.36446 28.09048 0 0 0 + 3309 1103 2 0.4236 18.56336 30.76959 29.55576 0 0 0 + 3310 1104 1 -0.8472 29.81731 30.58982 9.54416 -1 -1 0 + 3311 1104 2 0.4236 29.63821 31.39695 8.98161 -1 -1 0 + 3312 1104 2 0.4236 30.53858 30.79746 10.20493 -1 -1 0 + 3313 1105 1 -0.8472 21.82976 0.18004 6.59623 0 1 0 + 3314 1105 2 0.4236 21.32664 34.98930 7.10702 0 0 0 + 3315 1105 2 0.4236 21.47662 1.08550 6.83159 0 1 0 + 3316 1106 1 -0.8472 29.69215 11.04418 25.02770 0 0 0 + 3317 1106 2 0.4236 28.84149 10.53054 24.91587 0 0 0 + 3318 1106 2 0.4236 29.59049 11.69820 25.77727 0 0 0 + 3319 1107 1 -0.8472 7.91759 12.41881 27.49079 1 0 0 + 3320 1107 2 0.4236 7.27216 12.31040 28.24684 1 0 0 + 3321 1107 2 0.4236 8.07535 13.39211 27.32415 1 0 0 + 3322 1108 1 -0.8472 1.58250 18.15258 25.23805 0 0 0 + 3323 1108 2 0.4236 0.92416 18.82419 25.57788 0 0 0 + 3324 1108 2 0.4236 1.37849 17.93983 24.28250 0 0 0 + 3325 1109 1 -0.8472 6.93347 23.53201 2.35517 1 -1 0 + 3326 1109 2 0.4236 6.65652 22.58772 2.17757 1 -1 0 + 3327 1109 2 0.4236 7.76609 23.73748 1.84092 1 -1 0 + 3328 1110 1 -0.8472 4.74464 5.25742 7.60193 0 1 0 + 3329 1110 2 0.4236 5.42640 4.59168 7.90511 0 1 0 + 3330 1110 2 0.4236 4.27163 5.63599 8.39747 0 1 0 + 3331 1111 1 -0.8472 8.12552 1.12029 8.50091 1 0 0 + 3332 1111 2 0.4236 7.73332 0.58543 9.24927 1 0 0 + 3333 1111 2 0.4236 8.35748 0.51169 7.74213 1 0 0 + 3334 1112 1 -0.8472 19.74359 22.07163 2.67622 0 0 0 + 3335 1112 2 0.4236 20.34968 22.23695 3.45421 0 0 0 + 3336 1112 2 0.4236 19.04678 21.40195 2.93298 0 0 0 +3337 1113 1 -0.8472 26.99679 3.40644 0.23973 0 1 0 +3338 1113 2 0.4236 27.37894 4.26925 35.35606 0 1 -1 +3339 1113 2 0.4236 27.54590 3.07037 1.00492 0 1 0 + 3340 1114 1 -0.8472 2.76236 30.72744 25.44148 1 0 0 + 3341 1114 2 0.4236 2.26842 30.38711 24.64140 1 0 0 + 3342 1114 2 0.4236 3.56792 31.23927 25.14305 1 0 0 + 3343 1115 1 -0.8472 32.12430 13.85696 23.83760 -1 0 0 + 3344 1115 2 0.4236 32.83244 14.29542 24.39093 -1 0 0 + 3345 1115 2 0.4236 32.25120 12.86530 23.85869 -1 0 0 + 3346 1116 1 -0.8472 10.21628 20.26624 34.40125 1 0 0 + 3347 1116 2 0.4236 10.71138 21.11413 34.59057 1 0 0 + 3348 1116 2 0.4236 9.23602 20.45695 34.35014 1 0 0 + 3349 1117 1 -0.8472 23.09081 20.87638 25.30398 -1 -1 0 + 3350 1117 2 0.4236 22.37116 20.90702 25.99764 -1 -1 0 + 3351 1117 2 0.4236 23.32969 21.80796 25.03015 -1 -1 0 + 3352 1118 1 -0.8472 29.45887 17.10774 18.22032 0 0 0 + 3353 1118 2 0.4236 30.22190 17.47370 18.75302 0 0 0 + 3354 1118 2 0.4236 28.68228 17.73528 18.27593 0 0 0 + 3355 1119 1 -0.8472 20.05651 13.40407 10.45749 1 1 0 + 3356 1119 2 0.4236 19.47165 13.23293 11.25034 1 1 0 + 3357 1119 2 0.4236 19.78197 12.80508 9.70530 1 1 0 + 3358 1120 1 -0.8472 20.70762 15.06236 6.66545 -1 0 0 + 3359 1120 2 0.4236 21.25889 14.32457 6.27596 -1 0 0 + 3360 1120 2 0.4236 21.16718 15.93745 6.51395 -1 0 0 + 3361 1121 1 -0.8472 18.89325 16.33477 29.01551 0 0 0 + 3362 1121 2 0.4236 19.58381 17.05767 29.03667 0 0 0 + 3363 1121 2 0.4236 18.82390 15.91345 29.91973 0 0 0 + 3364 1122 1 -0.8472 32.53070 22.11236 16.33258 0 0 0 + 3365 1122 2 0.4236 31.61485 21.71487 16.27572 0 0 0 + 3366 1122 2 0.4236 32.95674 22.09858 15.42800 0 0 0 + 3367 1123 1 -0.8472 25.66860 12.05813 29.52616 0 0 0 + 3368 1123 2 0.4236 25.53751 12.57429 28.67979 0 0 0 + 3369 1123 2 0.4236 26.45841 11.45268 29.42833 0 0 0 + 3370 1124 1 -0.8472 17.50953 29.89865 23.74962 0 0 0 + 3371 1124 2 0.4236 18.29724 29.81518 23.13925 0 0 0 + 3372 1124 2 0.4236 16.70119 29.51259 23.30525 0 0 0 + 3373 1125 1 -0.8472 20.42758 5.60773 4.90458 0 0 0 + 3374 1125 2 0.4236 20.79830 5.93925 5.77208 0 0 0 + 3375 1125 2 0.4236 19.45567 5.40009 5.01507 0 0 0 + 3376 1126 1 -0.8472 21.22300 7.21858 16.33609 0 0 0 + 3377 1126 2 0.4236 21.71859 8.08305 16.25232 0 0 0 + 3378 1126 2 0.4236 20.23901 7.39452 16.30900 0 0 0 + 3379 1127 1 -0.8472 8.72497 17.28708 17.55696 -1 -1 0 + 3380 1127 2 0.4236 9.58423 17.79092 17.64519 -1 -1 0 + 3381 1127 2 0.4236 8.91490 16.35639 17.24449 -1 -1 0 + 3382 1128 1 -0.8472 8.76414 18.06755 33.54747 0 1 0 + 3383 1128 2 0.4236 9.30454 18.84130 33.87802 0 1 0 + 3384 1128 2 0.4236 7.81310 18.35231 33.42741 0 1 0 + 3385 1129 1 -0.8472 32.82700 35.52108 32.09864 0 0 0 + 3386 1129 2 0.4236 32.18718 34.75823 32.19162 0 0 0 + 3387 1129 2 0.4236 32.43608 0.70537 31.49022 0 1 0 + 3388 1130 1 -0.8472 9.68869 32.41541 15.80987 0 -2 0 + 3389 1130 2 0.4236 10.32198 32.88836 15.19734 0 -2 0 + 3390 1130 2 0.4236 9.49060 31.50514 15.44640 0 -2 0 + 3391 1131 1 -0.8472 3.13703 9.32361 6.33009 0 0 0 + 3392 1131 2 0.4236 2.73001 10.14381 5.92815 0 0 0 + 3393 1131 2 0.4236 3.81597 8.94572 5.70069 0 0 0 + 3394 1132 1 -0.8472 8.17658 30.34937 28.56505 0 0 0 + 3395 1132 2 0.4236 8.28700 29.89563 27.68082 0 0 0 + 3396 1132 2 0.4236 8.88873 31.04267 28.67515 0 0 0 + 3397 1133 1 -0.8472 5.53061 5.11969 25.83483 1 1 0 + 3398 1133 2 0.4236 6.24983 4.47405 25.57827 1 1 0 + 3399 1133 2 0.4236 5.62889 5.95828 25.29905 1 1 0 + 3400 1134 1 -0.8472 27.96519 26.59699 23.46335 0 0 0 + 3401 1134 2 0.4236 27.46175 26.09209 22.76224 0 0 0 + 3402 1134 2 0.4236 27.32121 27.10484 24.03546 0 0 0 + 3403 1135 1 -0.8472 8.76854 34.46179 30.13004 0 0 0 + 3404 1135 2 0.4236 7.98772 34.69897 30.70797 0 0 0 + 3405 1135 2 0.4236 9.57720 34.32484 30.70212 0 0 0 + 3406 1136 1 -0.8472 6.61675 26.68586 32.41993 0 1 0 + 3407 1136 2 0.4236 6.44110 27.45464 31.80503 0 1 0 + 3408 1136 2 0.4236 5.81960 26.08236 32.43514 0 1 0 + 3409 1137 1 -0.8472 20.61037 1.66831 21.21259 0 1 0 + 3410 1137 2 0.4236 20.46142 2.52558 20.71980 0 1 0 + 3411 1137 2 0.4236 19.80342 1.08529 21.11862 0 1 0 + 3412 1138 1 -0.8472 17.10976 11.94341 25.70251 0 1 0 + 3413 1138 2 0.4236 16.57575 12.22093 24.90392 0 1 0 + 3414 1138 2 0.4236 17.05537 12.65457 26.40341 0 1 0 + 3415 1139 1 -0.8472 35.29388 32.21867 32.51401 -1 -1 0 + 3416 1139 2 0.4236 0.72519 31.87316 32.55062 0 -1 0 + 3417 1139 2 0.4236 35.30112 33.17035 32.20707 -1 -1 0 + 3418 1140 1 -0.8472 18.63749 20.06698 10.24470 -1 0 0 + 3419 1140 2 0.4236 18.71657 19.22662 9.70852 -1 0 0 + 3420 1140 2 0.4236 17.74969 20.08665 10.70452 -1 0 0 + 3421 1141 1 -0.8472 15.67168 16.70914 30.84639 -1 -1 0 + 3422 1141 2 0.4236 15.18511 17.13458 31.60940 -1 -1 0 + 3423 1141 2 0.4236 15.07898 16.03321 30.40844 -1 -1 0 + 3424 1142 1 -0.8472 25.32085 32.99754 32.93324 0 0 0 + 3425 1142 2 0.4236 25.32696 32.97137 33.93285 0 0 0 + 3426 1142 2 0.4236 26.15749 32.57590 32.58366 0 0 0 + 3427 1143 1 -0.8472 21.95911 34.91495 21.68096 0 -1 0 + 3428 1143 2 0.4236 22.86918 35.09934 22.05209 0 -1 0 + 3429 1143 2 0.4236 21.54269 0.26581 21.37813 0 0 0 + 3430 1144 1 -0.8472 9.90943 22.86932 28.54732 0 -1 0 + 3431 1144 2 0.4236 9.65403 22.01433 28.99867 0 -1 0 + 3432 1144 2 0.4236 9.79947 23.62979 29.18729 0 -1 0 + 3433 1145 1 -0.8472 18.92073 1.83062 28.54452 0 0 0 + 3434 1145 2 0.4236 18.77899 1.62596 27.57604 0 0 0 + 3435 1145 2 0.4236 18.45840 2.68673 28.77539 0 0 0 + 3436 1146 1 -0.8472 16.83842 26.30374 13.63728 1 0 0 + 3437 1146 2 0.4236 16.31083 25.83360 14.34480 1 0 0 + 3438 1146 2 0.4236 16.31854 27.08861 13.30007 1 0 0 + 3439 1147 1 -0.8472 23.03513 33.97776 14.66518 -1 0 0 + 3440 1147 2 0.4236 22.86690 33.83634 15.64068 -1 0 0 + 3441 1147 2 0.4236 23.46646 34.86929 14.52711 -1 0 0 +3442 1148 1 -0.8472 26.37468 30.43214 35.25468 0 0 0 +3443 1148 2 0.4236 25.71419 30.35818 34.50752 0 0 0 +3444 1148 2 0.4236 26.42258 31.38172 0.11725 0 0 1 + 3445 1149 1 -0.8472 32.63917 13.78229 28.38877 -1 0 0 + 3446 1149 2 0.4236 32.58013 13.67594 29.38133 -1 0 0 + 3447 1149 2 0.4236 33.03290 12.95516 27.98776 -1 0 0 + 3448 1150 1 -0.8472 1.19545 11.88827 7.42402 0 0 0 + 3449 1150 2 0.4236 1.37418 11.89679 6.44019 0 0 0 + 3450 1150 2 0.4236 0.43544 11.26847 7.61937 0 0 0 + 3451 1151 1 -0.8472 35.00393 34.58219 14.67872 -1 0 0 + 3452 1151 2 0.4236 35.36912 34.75521 13.76404 -1 0 0 + 3453 1151 2 0.4236 35.20028 35.36471 15.26952 -1 0 0 + 3454 1152 1 -0.8472 9.91103 32.33524 28.62464 1 0 0 + 3455 1152 2 0.4236 10.87005 32.22620 28.36321 1 0 0 + 3456 1152 2 0.4236 9.82922 33.07729 29.28991 1 0 0 + 3457 1153 1 -0.8472 6.36330 25.82391 16.66394 1 -1 0 + 3458 1153 2 0.4236 6.42232 25.33261 15.79498 1 -1 0 + 3459 1153 2 0.4236 5.42022 25.80214 16.99576 1 -1 0 + 3460 1154 1 -0.8472 32.81749 28.00308 1.05981 0 0 0 + 3461 1154 2 0.4236 32.64819 27.98472 2.04517 0 0 0 + 3462 1154 2 0.4236 33.80293 27.98990 0.89062 0 0 0 + 3463 1155 1 -0.8472 2.09892 25.00453 9.72837 1 -1 0 + 3464 1155 2 0.4236 1.31233 25.44939 9.30021 1 -1 0 + 3465 1155 2 0.4236 2.79673 24.82249 9.03567 1 -1 0 + 3466 1156 1 -0.8472 3.70573 6.67896 30.88514 1 0 0 + 3467 1156 2 0.4236 3.24241 7.52493 30.62130 1 0 0 + 3468 1156 2 0.4236 3.21166 5.89633 30.50649 1 0 0 + 3469 1157 1 -0.8472 22.91846 23.35707 22.00831 -1 -1 0 + 3470 1157 2 0.4236 23.89673 23.33055 21.80272 -1 -1 0 + 3471 1157 2 0.4236 22.69047 24.23401 22.43137 -1 -1 0 + 3472 1158 1 -0.8472 4.20157 8.41273 26.79776 0 1 0 + 3473 1158 2 0.4236 4.90641 7.70392 26.82417 0 1 0 + 3474 1158 2 0.4236 3.43075 8.09587 26.24514 0 1 0 + 3475 1159 1 -0.8472 27.83257 24.37855 5.10280 0 -1 0 + 3476 1159 2 0.4236 28.60423 24.78261 4.61164 0 -1 0 + 3477 1159 2 0.4236 27.02864 24.96430 5.00022 0 -1 0 + 3478 1160 1 -0.8472 28.25521 34.70625 30.38048 0 0 0 + 3479 1160 2 0.4236 28.81969 33.89251 30.51886 0 0 0 + 3480 1160 2 0.4236 28.61204 35.23210 29.60840 0 0 0 + 3481 1161 1 -0.8472 30.16072 30.72861 15.64472 0 -1 0 + 3482 1161 2 0.4236 29.37415 31.30921 15.85493 0 -1 0 + 3483 1161 2 0.4236 30.99754 31.17198 15.96580 0 -1 0 + 3484 1162 1 -0.8472 14.30036 15.88614 9.70147 1 -1 0 + 3485 1162 2 0.4236 14.12425 15.15890 9.03808 1 -1 0 + 3486 1162 2 0.4236 15.27146 16.12414 9.68516 1 -1 0 + 3487 1163 1 -0.8472 32.30744 26.75439 30.27938 -2 -1 0 + 3488 1163 2 0.4236 31.79334 27.51898 29.89077 -2 -1 0 + 3489 1163 2 0.4236 33.17053 27.09038 30.65636 -2 -1 0 + 3490 1164 1 -0.8472 26.38370 26.69069 5.02854 0 0 0 + 3491 1164 2 0.4236 26.06841 26.98085 4.12499 0 0 0 + 3492 1164 2 0.4236 26.97407 27.39737 5.41835 0 0 0 + 3493 1165 1 -0.8472 20.86392 29.03407 31.88890 0 0 0 + 3494 1165 2 0.4236 21.65113 29.58265 32.17038 0 0 0 + 3495 1165 2 0.4236 20.02838 29.43015 32.26960 0 0 0 + 3496 1166 1 -0.8472 25.81223 29.44957 19.78123 -1 -1 0 + 3497 1166 2 0.4236 26.68614 29.32640 20.25133 -1 -1 0 + 3498 1166 2 0.4236 25.97911 29.70752 18.82962 -1 -1 0 + 3499 1167 1 -0.8472 9.81268 4.84917 23.38536 1 0 0 + 3500 1167 2 0.4236 10.63486 5.32563 23.07407 1 0 0 + 3501 1167 2 0.4236 9.19011 4.71979 22.61361 1 0 0 + 3502 1168 1 -0.8472 27.09504 22.27136 13.03967 1 -1 0 + 3503 1168 2 0.4236 27.07533 21.30935 13.31187 1 -1 0 + 3504 1168 2 0.4236 27.49938 22.35174 12.12861 1 -1 0 + 3505 1169 1 -0.8472 29.74324 0.48259 28.65165 0 1 0 + 3506 1169 2 0.4236 30.70461 0.21026 28.61248 0 1 0 + 3507 1169 2 0.4236 29.63711 1.23896 29.29707 0 1 0 + 3508 1170 1 -0.8472 23.29461 4.02585 30.19760 0 1 0 + 3509 1170 2 0.4236 23.97815 4.36071 29.54906 0 1 0 + 3510 1170 2 0.4236 22.50367 3.67469 29.69656 0 1 0 + 3511 1171 1 -0.8472 10.11973 1.62285 31.79003 0 0 0 + 3512 1171 2 0.4236 10.13259 2.60573 31.97369 0 0 0 + 3513 1171 2 0.4236 9.27443 1.38412 31.31210 0 0 0 + 3514 1172 1 -0.8472 23.98447 35.12348 7.95924 -1 -1 0 + 3515 1172 2 0.4236 23.32600 35.43441 7.27390 -1 -1 0 + 3516 1172 2 0.4236 24.62710 34.48366 7.53784 -1 -1 0 + 3517 1173 1 -0.8472 18.95755 12.21646 15.09912 0 1 0 + 3518 1173 2 0.4236 19.29259 11.86381 15.97282 0 1 0 + 3519 1173 2 0.4236 18.12141 11.73165 14.84259 0 1 0 + 3520 1174 1 -0.8472 20.64435 34.05811 11.96399 0 -1 0 + 3521 1174 2 0.4236 20.04418 34.42348 11.25246 0 -1 0 + 3522 1174 2 0.4236 21.38622 33.53873 11.53994 0 -1 0 + 3523 1175 1 -0.8472 1.02047 25.62099 23.79503 1 0 0 + 3524 1175 2 0.4236 1.42266 26.30733 24.40092 1 0 0 + 3525 1175 2 0.4236 0.53030 24.94115 24.34042 1 0 0 + 3526 1176 1 -0.8472 10.99120 19.54610 23.24843 1 0 0 + 3527 1176 2 0.4236 10.59016 20.42272 23.51428 1 0 0 + 3528 1176 2 0.4236 11.87233 19.70414 22.80279 1 0 0 + 3529 1177 1 -0.8472 27.88427 14.09439 8.71746 0 0 0 + 3530 1177 2 0.4236 28.03205 13.69075 9.62033 0 0 0 + 3531 1177 2 0.4236 28.05850 13.40695 8.01245 0 0 0 + 3532 1178 1 -0.8472 24.85221 12.37059 16.45030 0 0 0 + 3533 1178 2 0.4236 24.81993 11.76201 17.24311 0 0 0 + 3534 1178 2 0.4236 25.21529 13.26013 16.72749 0 0 0 +3535 1179 1 -0.8472 3.37410 29.51426 35.24851 1 0 0 +3536 1179 2 0.4236 3.67043 30.43590 0.05182 1 0 1 +3537 1179 2 0.4236 3.66223 28.86794 0.50788 1 0 1 + 3538 1180 1 -0.8472 0.35240 31.88385 22.28260 0 0 0 + 3539 1180 2 0.4236 0.75035 32.67685 22.74384 0 0 0 + 3540 1180 2 0.4236 0.12386 31.18441 22.95971 0 0 0 + 3541 1181 1 -0.8472 22.09365 22.96551 19.30426 -1 1 0 + 3542 1181 2 0.4236 22.15372 23.84283 18.82824 -1 1 0 + 3543 1181 2 0.4236 22.25424 23.10473 20.28136 -1 1 0 + 3544 1182 1 -0.8472 21.04348 34.07945 16.88194 0 -1 0 + 3545 1182 2 0.4236 20.64076 33.23881 17.24399 0 -1 0 + 3546 1182 2 0.4236 20.84507 34.83819 17.50233 0 -1 0 + 3547 1183 1 -0.8472 33.55073 31.23980 34.07326 -1 -1 0 + 3548 1183 2 0.4236 33.07430 31.97063 34.56197 -1 -1 0 + 3549 1183 2 0.4236 34.22507 31.63882 33.45194 -1 -1 0 + 3550 1184 1 -0.8472 18.03786 31.41193 20.73579 -1 0 0 + 3551 1184 2 0.4236 18.60060 30.70706 21.16754 -1 0 0 + 3552 1184 2 0.4236 17.84513 32.13633 21.39763 -1 0 0 + 3553 1185 1 -0.8472 21.11935 11.51623 20.22975 1 0 0 + 3554 1185 2 0.4236 21.20219 11.22096 21.18154 1 0 0 + 3555 1185 2 0.4236 21.20649 12.51119 20.18069 1 0 0 + 3556 1186 1 -0.8472 2.50377 22.45553 28.26102 0 0 0 + 3557 1186 2 0.4236 2.69363 23.41750 28.06489 0 0 0 + 3558 1186 2 0.4236 3.26130 22.06638 28.78510 0 0 0 + 3559 1187 1 -0.8472 1.89482 15.34996 4.09798 1 0 0 + 3560 1187 2 0.4236 1.58103 16.17698 4.56436 1 0 0 + 3561 1187 2 0.4236 1.10474 14.83228 3.76974 1 0 0 + 3562 1188 1 -0.8472 11.31662 29.94794 26.07063 1 0 0 + 3563 1188 2 0.4236 10.36281 30.18370 25.88446 1 0 0 + 3564 1188 2 0.4236 11.60685 30.38189 26.92349 1 0 0 + 3565 1189 1 -0.8472 10.46187 0.48151 28.47016 0 0 0 + 3566 1189 2 0.4236 11.30710 0.79408 28.90357 0 0 0 + 3567 1189 2 0.4236 9.81615 0.18539 29.17392 0 0 0 + 3568 1190 1 -0.8472 20.01390 21.11502 19.40053 0 0 0 + 3569 1190 2 0.4236 19.92265 20.43003 20.12333 0 0 0 + 3570 1190 2 0.4236 20.72410 21.77249 19.65214 0 0 0 + 3571 1191 1 -0.8472 17.49785 14.90201 31.45641 0 1 0 + 3572 1191 2 0.4236 17.50843 14.17303 30.77203 0 1 0 + 3573 1191 2 0.4236 16.85603 15.61498 31.17410 0 1 0 + 3574 1192 1 -0.8472 23.93241 26.17915 0.41284 -1 -1 0 + 3575 1192 2 0.4236 23.77665 25.45312 1.08259 -1 -1 0 + 3576 1192 2 0.4236 24.91551 26.30253 0.27758 -1 -1 0 + 3577 1193 1 -0.8472 15.48155 12.36384 9.66953 0 0 0 + 3578 1193 2 0.4236 14.53261 12.38191 9.35473 0 0 0 + 3579 1193 2 0.4236 16.05799 12.85827 9.01897 0 0 0 + 3580 1194 1 -0.8472 24.94921 4.70274 28.23684 -1 0 0 + 3581 1194 2 0.4236 25.43668 5.57148 28.32404 -1 0 0 + 3582 1194 2 0.4236 25.25172 4.23253 27.40777 -1 0 0 + 3583 1195 1 -0.8472 7.23520 24.31872 5.42817 0 0 0 + 3584 1195 2 0.4236 7.41578 24.72360 6.32449 0 0 0 + 3585 1195 2 0.4236 8.06583 24.35494 4.87261 0 0 0 + 3586 1196 1 -0.8472 28.58261 14.10891 13.19958 0 1 0 + 3587 1196 2 0.4236 27.78762 14.51354 12.74766 0 1 0 + 3588 1196 2 0.4236 28.68835 13.16021 12.90164 0 1 0 + 3589 1197 1 -0.8472 34.03337 15.87375 9.37663 -1 0 0 + 3590 1197 2 0.4236 34.58744 16.59549 9.79136 -1 0 0 + 3591 1197 2 0.4236 34.53727 15.01038 9.40222 -1 0 0 + 3592 1198 1 -0.8472 31.82828 18.36860 3.71224 -1 -1 0 + 3593 1198 2 0.4236 32.31781 17.82539 4.39432 -1 -1 0 + 3594 1198 2 0.4236 32.15945 18.13334 2.79850 -1 -1 0 + 3595 1199 1 -0.8472 23.59606 11.47870 18.85195 -1 0 0 + 3596 1199 2 0.4236 23.08158 11.20644 19.66507 -1 0 0 + 3597 1199 2 0.4236 23.26663 12.36661 18.53091 -1 0 0 + 3598 1200 1 -0.8472 15.34275 31.40288 27.99920 0 0 0 + 3599 1200 2 0.4236 16.12521 31.94953 27.70102 0 0 0 + 3600 1200 2 0.4236 15.34691 30.52552 27.51943 0 0 0 + 3601 1201 1 -0.8472 13.77256 0.54624 8.10259 0 1 0 + 3602 1201 2 0.4236 13.86377 35.20962 8.63274 0 0 0 + 3603 1201 2 0.4236 13.42179 1.27416 8.69169 0 1 0 + 3604 1202 1 -0.8472 29.74122 21.73816 15.80987 0 0 0 + 3605 1202 2 0.4236 28.91356 22.21483 16.10610 0 0 0 + 3606 1202 2 0.4236 29.58403 20.75090 15.83419 0 0 0 + 3607 1203 1 -0.8472 9.34349 5.53388 13.38007 1 0 0 + 3608 1203 2 0.4236 8.89988 5.78430 12.51959 1 0 0 + 3609 1203 2 0.4236 10.20861 6.02809 13.46529 1 0 0 + 3610 1204 1 -0.8472 33.68754 33.26661 18.34318 0 -1 0 + 3611 1204 2 0.4236 34.19102 32.52776 18.79102 0 -1 0 + 3612 1204 2 0.4236 33.14660 33.76135 19.02330 0 -1 0 + 3613 1205 1 -0.8472 8.49063 30.24622 2.44138 1 1 0 + 3614 1205 2 0.4236 8.21723 31.11119 2.02057 1 1 0 + 3615 1205 2 0.4236 7.88983 30.04774 3.21571 1 1 0 + 3616 1206 1 -0.8472 25.31936 5.99106 34.51443 1 0 0 + 3617 1206 2 0.4236 25.28141 5.19128 33.91538 1 0 0 + 3618 1206 2 0.4236 25.62081 5.71091 35.42578 1 0 0 + 3619 1207 1 -0.8472 26.73560 34.72965 14.29355 0 -1 0 + 3620 1207 2 0.4236 26.80598 35.39294 15.03854 0 -1 0 + 3621 1207 2 0.4236 25.87589 34.86993 13.80250 0 -1 0 + 3622 1208 1 -0.8472 21.83502 2.05714 14.53069 0 0 0 + 3623 1208 2 0.4236 21.33580 1.21622 14.73940 0 0 0 + 3624 1208 2 0.4236 21.32241 2.84341 14.87559 0 0 0 + 3625 1209 1 -0.8472 35.01867 0.23622 21.00335 0 0 0 + 3626 1209 2 0.4236 35.14727 0.04188 20.03089 0 0 0 + 3627 1209 2 0.4236 0.26234 35.33762 21.52623 1 -1 0 + 3628 1210 1 -0.8472 22.35916 9.63134 16.26225 0 0 0 + 3629 1210 2 0.4236 23.23198 9.14331 16.26402 0 0 0 + 3630 1210 2 0.4236 22.39939 10.38390 15.60499 0 0 0 + 3631 1211 1 -0.8472 11.20172 33.59575 17.81686 1 0 0 + 3632 1211 2 0.4236 10.69181 33.24651 17.03074 1 0 0 + 3633 1211 2 0.4236 11.65801 32.83712 18.28189 1 0 0 + 3634 1212 1 -0.8472 31.82608 18.51865 34.56225 0 -1 0 + 3635 1212 2 0.4236 31.28986 19.16910 35.10013 0 -1 0 + 3636 1212 2 0.4236 31.53461 18.55633 33.60645 0 -1 0 + 3637 1213 1 -0.8472 30.88253 31.96225 12.90618 0 -1 0 + 3638 1213 2 0.4236 31.38406 31.32256 12.32378 0 -1 0 + 3639 1213 2 0.4236 30.61549 31.50276 13.75323 0 -1 0 + 3640 1214 1 -0.8472 13.98169 21.39098 19.92118 0 0 0 + 3641 1214 2 0.4236 13.95328 20.40141 19.78017 0 0 0 + 3642 1214 2 0.4236 14.32905 21.83552 19.09554 0 0 0 + 3643 1215 1 -0.8472 4.16081 28.17702 1.92690 1 0 0 + 3644 1215 2 0.4236 5.01126 27.72808 2.20102 1 0 0 + 3645 1215 2 0.4236 3.39356 27.76728 2.42026 1 0 0 + 3646 1216 1 -0.8472 2.61206 16.00836 16.04875 1 0 0 + 3647 1216 2 0.4236 1.74345 15.51304 16.05970 1 0 0 + 3648 1216 2 0.4236 2.43904 16.98712 16.15867 1 0 0 + 3649 1217 1 -0.8472 13.59737 19.95485 22.53633 1 0 0 + 3650 1217 2 0.4236 14.21305 20.60053 22.08473 1 0 0 + 3651 1217 2 0.4236 13.73769 19.99671 23.52552 1 0 0 + 3652 1218 1 -0.8472 7.18982 10.71677 12.05084 1 0 0 + 3653 1218 2 0.4236 6.43794 10.12559 11.75911 1 0 0 + 3654 1218 2 0.4236 6.83195 11.62130 12.28263 1 0 0 + 3655 1219 1 -0.8472 15.07429 14.72118 6.25090 1 0 0 + 3656 1219 2 0.4236 14.14374 14.54507 6.57184 1 0 0 + 3657 1219 2 0.4236 15.07706 14.77984 5.25263 1 0 0 + 3658 1220 1 -0.8472 17.76755 16.08175 24.87563 0 0 0 + 3659 1220 2 0.4236 17.58977 15.62862 24.00214 0 0 0 + 3660 1220 2 0.4236 18.65997 16.53165 24.84217 0 0 0 + 3661 1221 1 -0.8472 17.65901 7.92406 7.74964 1 0 0 + 3662 1221 2 0.4236 18.59311 8.23144 7.93120 1 0 0 + 3663 1221 2 0.4236 17.05661 8.71812 7.66886 1 0 0 + 3664 1222 1 -0.8472 3.05199 13.20694 2.89879 0 0 0 + 3665 1222 2 0.4236 3.57780 13.70311 2.20789 0 0 0 + 3666 1222 2 0.4236 2.63537 13.85891 3.53230 0 0 0 + 3667 1223 1 -0.8472 5.26002 2.13592 16.40436 0 -1 0 + 3668 1223 2 0.4236 6.09694 1.78456 15.98477 0 -1 0 + 3669 1223 2 0.4236 4.80845 2.76476 15.77141 0 -1 0 + 3670 1224 1 -0.8472 12.61256 32.52531 4.71798 0 0 0 + 3671 1224 2 0.4236 11.90890 33.23199 4.79132 0 0 0 + 3672 1224 2 0.4236 12.25715 31.75468 4.18908 0 0 0 + 3673 1225 1 -0.8472 33.05943 19.81815 12.71554 0 1 0 + 3674 1225 2 0.4236 32.86723 19.31471 13.55788 0 1 0 + 3675 1225 2 0.4236 33.70078 19.29557 12.15385 0 1 0 + 3676 1226 1 -0.8472 8.67356 22.94470 34.61606 0 0 0 + 3677 1226 2 0.4236 8.08575 22.17542 34.86632 0 0 0 + 3678 1226 2 0.4236 8.33529 23.36200 33.77263 0 0 0 + 3679 1227 1 -0.8472 0.86965 12.09925 11.68222 1 0 0 + 3680 1227 2 0.4236 0.73608 12.60411 12.53501 1 0 0 + 3681 1227 2 0.4236 0.57426 11.15194 11.80597 1 0 0 + 3682 1228 1 -0.8472 27.29430 18.02558 25.87602 0 0 0 + 3683 1228 2 0.4236 26.33030 18.09609 25.61981 0 0 0 + 3684 1228 2 0.4236 27.85129 18.53772 25.22227 0 0 0 + 3685 1229 1 -0.8472 20.96856 4.94099 22.32248 0 0 0 + 3686 1229 2 0.4236 21.44516 4.83664 23.19537 0 0 0 + 3687 1229 2 0.4236 20.65070 5.88429 22.22695 0 0 0 + 3688 1230 1 -0.8472 22.27256 31.32924 24.77039 0 0 0 + 3689 1230 2 0.4236 22.20439 30.66428 24.02667 0 0 0 + 3690 1230 2 0.4236 23.23365 31.45980 25.01366 0 0 0 + 3691 1231 1 -0.8472 22.66253 15.15411 23.54686 0 0 0 + 3692 1231 2 0.4236 23.07572 15.58551 22.74490 0 0 0 + 3693 1231 2 0.4236 23.21000 15.36328 24.35708 0 0 0 + 3694 1232 1 -0.8472 11.19746 9.41692 24.15577 0 1 0 + 3695 1232 2 0.4236 10.84190 9.88305 23.34570 0 1 0 + 3696 1232 2 0.4236 11.55668 10.09332 24.79875 0 1 0 + 3697 1233 1 -0.8472 11.99905 23.28826 34.33738 0 0 0 + 3698 1233 2 0.4236 12.52234 23.62944 35.11821 0 0 0 + 3699 1233 2 0.4236 12.62467 22.89914 33.66126 0 0 0 + 3700 1234 1 -0.8472 23.22442 18.59940 28.07421 0 0 0 + 3701 1234 2 0.4236 23.49579 19.56080 28.11912 0 0 0 + 3702 1234 2 0.4236 24.00062 18.02181 28.32688 0 0 0 + 3703 1235 1 -0.8472 30.92539 3.09568 32.51957 0 1 0 + 3704 1235 2 0.4236 31.84312 3.44347 32.71134 0 1 0 + 3705 1235 2 0.4236 30.25006 3.80152 32.73328 0 1 0 + 3706 1236 1 -0.8472 1.33811 18.35817 13.38681 1 -1 0 + 3707 1236 2 0.4236 1.22509 18.30768 14.37908 1 -1 0 + 3708 1236 2 0.4236 0.99542 17.51674 12.96910 1 -1 0 + 3709 1237 1 -0.8472 9.40393 27.68480 1.86054 0 0 0 + 3710 1237 2 0.4236 9.19178 28.63569 2.08582 0 0 0 + 3711 1237 2 0.4236 8.65357 27.09582 2.16051 0 0 0 + 3712 1238 1 -0.8472 22.59500 25.15458 24.16226 0 0 0 + 3713 1238 2 0.4236 22.11992 24.61236 24.85525 0 0 0 + 3714 1238 2 0.4236 22.72289 26.08747 24.49890 0 0 0 + 3715 1239 1 -0.8472 34.94268 12.24206 24.23039 0 1 0 + 3716 1239 2 0.4236 34.99080 11.48130 24.87762 0 1 0 + 3717 1239 2 0.4236 34.50585 11.93365 23.38540 0 1 0 + 3718 1240 1 -0.8472 13.66060 32.55204 14.55827 0 0 0 + 3719 1240 2 0.4236 13.52586 31.65916 14.98789 0 0 0 + 3720 1240 2 0.4236 14.30011 33.09209 15.10536 0 0 0 + 3721 1241 1 -0.8472 25.84720 7.64647 30.19310 0 0 0 + 3722 1241 2 0.4236 26.49207 7.44799 29.45506 0 0 0 + 3723 1241 2 0.4236 24.99842 8.00675 29.80616 0 0 0 + 3724 1242 1 -0.8472 31.34937 3.95974 8.27135 -1 0 0 + 3725 1242 2 0.4236 31.73419 4.48651 7.51346 -1 0 0 + 3726 1242 2 0.4236 30.58520 3.40699 7.93900 -1 0 0 + 3727 1243 1 -0.8472 32.08346 7.74273 18.98396 0 1 0 + 3728 1243 2 0.4236 31.48557 6.94437 18.91249 0 1 0 + 3729 1243 2 0.4236 32.68945 7.63585 19.77216 0 1 0 + 3730 1244 1 -0.8472 33.86230 32.04057 14.82923 -1 -1 0 + 3731 1244 2 0.4236 34.19829 32.96445 14.64614 -1 -1 0 + 3732 1244 2 0.4236 33.23522 32.06216 15.60786 -1 -1 0 + 3733 1245 1 -0.8472 15.80498 9.53892 29.22621 0 0 0 + 3734 1245 2 0.4236 16.28878 9.52316 28.35120 0 0 0 + 3735 1245 2 0.4236 14.88959 9.15417 29.10789 0 0 0 + 3736 1246 1 -0.8472 14.75644 31.78471 33.95051 1 -1 0 + 3737 1246 2 0.4236 14.87879 31.63463 32.96947 1 -1 0 + 3738 1246 2 0.4236 14.49184 30.92567 34.38867 1 -1 0 + 3739 1247 1 -0.8472 19.54738 27.88289 17.04095 0 -1 0 + 3740 1247 2 0.4236 19.89389 28.26231 17.89881 0 -1 0 + 3741 1247 2 0.4236 20.31297 27.55072 16.49007 0 -1 0 + 3742 1248 1 -0.8472 29.41360 2.42179 30.27314 0 0 0 + 3743 1248 2 0.4236 29.56706 3.38868 30.06936 0 0 0 + 3744 1248 2 0.4236 29.72219 2.22420 31.20356 0 0 0 + 3745 1249 1 -0.8472 25.21448 16.45875 28.33471 0 1 0 + 3746 1249 2 0.4236 26.21071 16.47683 28.25035 0 1 0 + 3747 1249 2 0.4236 24.95734 15.91164 29.13128 0 1 0 + 3748 1250 1 -0.8472 4.35720 14.20875 17.03220 1 0 0 + 3749 1250 2 0.4236 5.27798 14.24944 16.64433 1 0 0 + 3750 1250 2 0.4236 3.76871 14.86764 16.56366 1 0 0 + 3751 1251 1 -0.8472 29.13693 0.84916 24.77184 -1 1 0 + 3752 1251 2 0.4236 29.74416 1.35202 25.38696 -1 1 0 + 3753 1251 2 0.4236 29.68242 0.27811 24.15840 -1 1 0 + 3754 1252 1 -0.8472 27.62042 10.22750 23.30181 -1 0 0 + 3755 1252 2 0.4236 28.40039 9.89629 22.77089 -1 0 0 + 3756 1252 2 0.4236 27.57125 11.22405 23.23563 -1 0 0 + 3757 1253 1 -0.8472 13.10422 23.78581 22.52010 0 0 0 + 3758 1253 2 0.4236 13.33878 23.51699 23.45427 0 0 0 + 3759 1253 2 0.4236 13.86548 23.56773 21.90941 0 0 0 + 3760 1254 1 -0.8472 33.19233 2.34733 4.32601 0 1 0 + 3761 1254 2 0.4236 33.68352 3.06983 3.83950 0 1 0 + 3762 1254 2 0.4236 33.54114 1.45534 4.03853 0 1 0 + 3763 1255 1 -0.8472 25.94719 28.29984 2.89677 0 1 0 + 3764 1255 2 0.4236 25.07124 28.70411 2.63365 0 1 0 + 3765 1255 2 0.4236 26.66612 28.63786 2.28947 0 1 0 + 3766 1256 1 -0.8472 9.90709 2.77986 7.29641 -1 0 0 + 3767 1256 2 0.4236 9.28065 2.13448 7.73344 -1 0 0 + 3768 1256 2 0.4236 10.84882 2.54552 7.53760 -1 0 0 + 3769 1257 1 -0.8472 16.30796 34.86244 16.12167 1 0 0 + 3770 1257 2 0.4236 16.62176 35.28557 15.27171 1 0 0 + 3771 1257 2 0.4236 15.30895 34.81894 16.12330 1 0 0 + 3772 1258 1 -0.8472 7.61771 9.73779 26.78220 1 1 0 + 3773 1258 2 0.4236 7.47927 10.72185 26.89368 1 1 0 + 3774 1258 2 0.4236 8.00824 9.55632 25.87971 1 1 0 + 3775 1259 1 -0.8472 3.53455 14.19611 8.20227 0 1 0 + 3776 1259 2 0.4236 3.27523 14.50182 9.11836 0 1 0 + 3777 1259 2 0.4236 3.41713 13.20527 8.13587 0 1 0 + 3778 1260 1 -0.8472 17.36729 21.51876 20.34297 0 0 0 + 3779 1260 2 0.4236 18.19977 21.66761 19.80934 0 0 0 + 3780 1260 2 0.4236 16.76176 22.30825 20.24311 0 0 0 + 3781 1261 1 -0.8472 24.85956 10.53353 5.64142 -1 1 0 + 3782 1261 2 0.4236 24.62252 9.97391 6.43551 -1 1 0 + 3783 1261 2 0.4236 24.04025 10.69600 5.09160 -1 1 0 + 3784 1262 1 -0.8472 17.54124 19.88458 23.16534 0 -1 0 + 3785 1262 2 0.4236 18.30863 20.31961 23.63629 0 -1 0 + 3786 1262 2 0.4236 16.71124 20.42236 23.31326 0 -1 0 + 3787 1263 1 -0.8472 9.13809 2.62440 27.30937 0 1 0 + 3788 1263 2 0.4236 9.78967 1.98344 27.71510 0 1 0 + 3789 1263 2 0.4236 8.56054 2.14095 26.65161 0 1 0 + 3790 1264 1 -0.8472 14.26627 24.14780 0.96270 0 0 0 + 3791 1264 2 0.4236 13.73311 24.38448 1.77489 0 0 0 + 3792 1264 2 0.4236 14.80771 24.93859 0.67731 0 0 0 + 3793 1265 1 -0.8472 34.12753 0.60519 34.36017 0 0 0 + 3794 1265 2 0.4236 33.98288 1.43738 34.89542 0 0 0 + 3795 1265 2 0.4236 33.66886 0.69362 33.47601 0 0 0 + 3796 1266 1 -0.8472 12.28580 18.19129 0.67816 0 0 0 + 3797 1266 2 0.4236 12.91440 18.64946 0.04978 0 0 0 + 3798 1266 2 0.4236 11.43961 18.71959 0.74726 0 0 0 + 3799 1267 1 -0.8472 12.16281 6.42562 30.34156 0 0 0 + 3800 1267 2 0.4236 12.59339 5.68077 30.85118 0 0 0 + 3801 1267 2 0.4236 12.60106 6.51449 29.44712 0 0 0 + 3802 1268 1 -0.8472 22.54245 21.32955 17.15786 0 0 0 + 3803 1268 2 0.4236 22.26706 21.46728 16.20646 0 0 0 + 3804 1268 2 0.4236 22.14968 22.05228 17.72650 0 0 0 + 3805 1269 1 -0.8472 16.46941 17.24841 22.22819 0 -1 0 + 3806 1269 2 0.4236 16.69927 18.02693 22.81218 0 -1 0 + 3807 1269 2 0.4236 15.47597 17.13973 22.19338 0 -1 0 + 3808 1270 1 -0.8472 15.89729 2.63284 27.11334 0 1 0 + 3809 1270 2 0.4236 15.95407 1.69174 26.78010 0 1 0 + 3810 1270 2 0.4236 16.01219 3.26519 26.34726 0 1 0 + 3811 1271 1 -0.8472 17.56428 29.20553 10.53540 0 -1 0 + 3812 1271 2 0.4236 16.89516 29.75865 11.03170 0 -1 0 + 3813 1271 2 0.4236 18.48421 29.42333 10.86137 0 -1 0 + 3814 1272 1 -0.8472 14.13472 0.57957 23.40535 0 0 0 + 3815 1272 2 0.4236 15.12428 0.71936 23.37111 0 0 0 + 3816 1272 2 0.4236 13.74827 1.11485 24.15637 0 0 0 + 3817 1273 1 -0.8472 14.94299 16.74046 14.49758 0 0 0 + 3818 1273 2 0.4236 14.51357 17.57578 14.84078 0 0 0 + 3819 1273 2 0.4236 15.77043 16.54983 15.02574 0 0 0 + 3820 1274 1 -0.8472 18.60554 10.10070 33.85186 0 0 0 + 3821 1274 2 0.4236 18.03410 9.28115 33.89305 0 0 0 + 3822 1274 2 0.4236 19.47154 9.88099 33.40267 0 0 0 + 3823 1275 1 -0.8472 21.91949 17.78066 6.96782 -1 0 0 + 3824 1275 2 0.4236 22.76969 18.25566 7.19482 -1 0 0 + 3825 1275 2 0.4236 21.34876 18.37255 6.39871 -1 0 0 + 3826 1276 1 -0.8472 9.21876 31.25393 9.94935 0 0 0 + 3827 1276 2 0.4236 9.97547 30.68146 10.26497 0 0 0 + 3828 1276 2 0.4236 9.23222 31.30335 8.95070 0 0 0 + 3829 1277 1 -0.8472 13.41060 7.95548 25.27966 1 1 0 + 3830 1277 2 0.4236 12.62868 8.49127 24.96117 1 1 0 + 3831 1277 2 0.4236 14.22917 8.22717 24.77362 1 1 0 + 3832 1278 1 -0.8472 12.07574 15.03988 21.04418 0 0 0 + 3833 1278 2 0.4236 11.95903 14.17033 21.52403 0 0 0 + 3834 1278 2 0.4236 12.31435 15.75417 21.70205 0 0 0 + 3835 1279 1 -0.8472 9.88529 18.41150 5.93407 0 0 0 + 3836 1279 2 0.4236 9.71670 19.36165 6.19620 0 0 0 + 3837 1279 2 0.4236 9.38429 17.80224 6.54865 0 0 0 + 3838 1280 1 -0.8472 17.69317 1.78597 18.64760 0 0 0 + 3839 1280 2 0.4236 17.13270 0.95939 18.69861 0 0 0 + 3840 1280 2 0.4236 17.23908 2.52755 19.14138 0 0 0 + 3841 1281 1 -0.8472 31.78581 31.55779 20.70371 0 -1 0 + 3842 1281 2 0.4236 30.92713 31.48884 20.19593 0 -1 0 + 3843 1281 2 0.4236 32.50326 31.06227 20.21415 0 -1 0 + 3844 1282 1 -0.8472 3.88805 14.07173 13.16821 0 0 0 + 3845 1282 2 0.4236 4.86565 13.88586 13.06952 0 0 0 + 3846 1282 2 0.4236 3.59566 13.83494 14.09469 0 0 0 + 3847 1283 1 -0.8472 17.40159 4.33028 2.50015 -1 0 0 + 3848 1283 2 0.4236 16.66174 4.99386 2.38964 -1 0 0 + 3849 1283 2 0.4236 17.65489 4.27123 3.46570 -1 0 0 + 3850 1284 1 -0.8472 32.95401 16.04344 16.03578 0 0 0 + 3851 1284 2 0.4236 32.18345 15.56378 16.45540 0 0 0 + 3852 1284 2 0.4236 33.06983 15.72825 15.09387 0 0 0 + 3853 1285 1 -0.8472 26.81393 18.75179 3.07330 -1 -1 0 + 3854 1285 2 0.4236 26.78553 17.98088 2.43704 -1 -1 0 + 3855 1285 2 0.4236 27.76469 19.01741 3.23286 -1 -1 0 + 3856 1286 1 -0.8472 31.29948 29.38498 30.48980 -1 -1 0 + 3857 1286 2 0.4236 30.36542 29.67830 30.28626 -1 -1 0 + 3858 1286 2 0.4236 31.94439 30.07640 30.16425 -1 -1 0 + 3859 1287 1 -0.8472 7.70452 13.58317 24.43091 0 1 0 + 3860 1287 2 0.4236 8.11380 13.58285 23.51854 0 1 0 + 3861 1287 2 0.4236 8.38876 13.86587 25.10306 0 1 0 + 3862 1288 1 -0.8472 6.40123 28.60910 19.73785 0 0 0 + 3863 1288 2 0.4236 6.93446 28.83300 18.92206 0 0 0 + 3864 1288 2 0.4236 6.51282 27.63896 19.95312 0 0 0 + 3865 1289 1 -0.8472 3.04379 10.50807 22.19377 0 1 0 + 3866 1289 2 0.4236 2.93294 9.89004 21.41549 0 1 0 + 3867 1289 2 0.4236 2.80507 11.43883 21.91689 0 1 0 + 3868 1290 1 -0.8472 14.37599 26.93440 28.59915 0 0 0 + 3869 1290 2 0.4236 13.74025 27.42354 28.00208 0 0 0 + 3870 1290 2 0.4236 15.27401 27.37252 28.56009 0 0 0 + 3871 1291 1 -0.8472 34.12274 21.85242 14.14839 0 -1 0 + 3872 1291 2 0.4236 33.61787 21.07635 13.77045 0 -1 0 + 3873 1291 2 0.4236 35.09050 21.76777 13.91132 0 -1 0 + 3874 1292 1 -0.8472 32.64567 5.25739 5.99940 -1 1 0 + 3875 1292 2 0.4236 33.11844 4.88493 5.20085 -1 1 0 + 3876 1292 2 0.4236 33.08134 6.11426 6.27500 -1 1 0 + 3877 1293 1 -0.8472 23.64858 3.21683 21.36377 0 0 0 + 3878 1293 2 0.4236 22.71597 3.53283 21.18962 0 0 0 + 3879 1293 2 0.4236 23.97889 2.70125 20.57320 0 0 0 + 3880 1294 1 -0.8472 32.64212 16.11772 31.97213 -1 0 0 + 3881 1294 2 0.4236 31.81837 16.41178 32.45680 -1 0 0 + 3882 1294 2 0.4236 33.26061 16.89594 31.86352 -1 0 0 + 3883 1295 1 -0.8472 6.29229 17.36253 3.95587 0 0 0 + 3884 1295 2 0.4236 6.77184 17.44356 4.82957 0 0 0 + 3885 1295 2 0.4236 6.12602 16.39715 3.75517 0 0 0 + 3886 1296 1 -0.8472 31.92486 23.30850 22.00260 0 0 0 + 3887 1296 2 0.4236 31.25077 23.84248 21.49234 0 0 0 + 3888 1296 2 0.4236 32.82945 23.72002 21.89141 0 0 0 + 3889 1297 1 -0.8472 27.33250 28.07000 32.92133 0 0 0 + 3890 1297 2 0.4236 27.07320 27.40863 33.62506 0 0 0 + 3891 1297 2 0.4236 28.29881 27.95187 32.69273 0 0 0 + 3892 1298 1 -0.8472 2.64561 33.53042 18.92001 1 0 0 + 3893 1298 2 0.4236 1.69345 33.79700 18.77078 1 0 0 + 3894 1298 2 0.4236 3.23109 34.33901 18.86227 1 0 0 + 3895 1299 1 -0.8472 20.25726 25.40408 31.93927 -1 0 0 + 3896 1299 2 0.4236 19.93756 25.82497 32.78816 -1 0 0 + 3897 1299 2 0.4236 20.87305 26.03411 31.46615 -1 0 0 + 3898 1300 1 -0.8472 3.04174 13.82425 29.63913 1 0 0 + 3899 1300 2 0.4236 2.19951 13.71557 29.11115 1 0 0 + 3900 1300 2 0.4236 2.90738 13.45836 30.56002 1 0 0 + 3901 1301 1 -0.8472 27.74001 30.99889 32.58650 0 0 0 + 3902 1301 2 0.4236 28.31372 31.33194 33.33475 0 0 0 + 3903 1301 2 0.4236 27.55154 30.02577 32.71868 0 0 0 + 3904 1302 1 -0.8472 31.54537 3.17343 11.48007 -1 0 0 + 3905 1302 2 0.4236 31.00105 2.58309 12.07601 -1 0 0 + 3906 1302 2 0.4236 31.24008 3.06453 10.53409 -1 0 0 +3907 1303 1 -0.8472 12.78374 29.36396 35.25028 0 -1 0 +3908 1303 2 0.4236 12.48790 28.41019 35.19821 0 -1 0 +3909 1303 2 0.4236 13.10919 29.56198 0.72764 0 -1 1 +3910 1304 1 -0.8472 23.77746 14.97626 35.08085 0 0 0 +3911 1304 2 0.4236 23.65699 15.06343 0.62252 0 0 1 +3912 1304 2 0.4236 23.98557 14.02508 34.85299 0 0 0 + 3913 1305 1 -0.8472 9.02720 31.44392 7.07983 1 0 0 + 3914 1305 2 0.4236 8.96368 32.37089 6.71012 1 0 0 + 3915 1305 2 0.4236 8.13255 31.00077 7.02393 1 0 0 + 3916 1306 1 -0.8472 31.36549 11.59481 10.42094 0 0 0 + 3917 1306 2 0.4236 31.65377 12.22675 11.14031 0 0 0 + 3918 1306 2 0.4236 32.09618 10.93542 10.24406 0 0 0 + 3919 1307 1 -0.8472 29.50183 27.32803 3.75836 0 -1 0 + 3920 1307 2 0.4236 29.53439 26.49065 3.21279 0 -1 0 + 3921 1307 2 0.4236 29.08094 28.05932 3.22170 0 -1 0 + 3922 1308 1 -0.8472 33.81990 14.88458 25.76164 0 0 0 + 3923 1308 2 0.4236 34.72524 14.95250 25.34251 0 0 0 + 3924 1308 2 0.4236 33.89155 14.39907 26.63289 0 0 0 + 3925 1309 1 -0.8472 7.98850 21.50658 20.41280 0 0 0 + 3926 1309 2 0.4236 8.56246 21.56801 19.59624 0 0 0 + 3927 1309 2 0.4236 8.56179 21.31560 21.20954 0 0 0 + 3928 1310 1 -0.8472 32.46665 14.83711 6.59392 0 0 0 + 3929 1310 2 0.4236 32.73572 14.17385 7.29220 0 0 0 + 3930 1310 2 0.4236 31.57544 15.22519 6.82865 0 0 0 + 3931 1311 1 -0.8472 19.27221 16.62720 16.91022 0 -1 0 + 3932 1311 2 0.4236 18.39566 16.51808 16.44147 0 -1 0 + 3933 1311 2 0.4236 19.11058 16.84716 17.87223 0 -1 0 + 3934 1312 1 -0.8472 10.75317 25.30896 14.90281 1 -1 0 + 3935 1312 2 0.4236 10.02110 24.75819 15.30365 1 -1 0 + 3936 1312 2 0.4236 10.68350 26.24920 15.23605 1 -1 0 + 3937 1313 1 -0.8472 10.59250 3.58120 20.02809 0 0 0 + 3938 1313 2 0.4236 10.10365 3.59853 20.90027 0 0 0 + 3939 1313 2 0.4236 11.56509 3.41878 20.19430 0 0 0 + 3940 1314 1 -0.8472 23.15667 28.53308 20.17853 0 -1 0 + 3941 1314 2 0.4236 23.99072 29.08474 20.18023 0 -1 0 + 3942 1314 2 0.4236 23.01997 28.13839 19.26998 0 -1 0 + 3943 1315 1 -0.8472 6.61160 15.88142 29.17336 1 0 0 + 3944 1315 2 0.4236 5.96957 16.51911 28.74778 1 0 0 + 3945 1315 2 0.4236 6.23172 14.95687 29.14422 1 0 0 + 3946 1316 1 -0.8472 33.84117 10.87684 5.32296 -1 0 0 + 3947 1316 2 0.4236 34.05499 11.83082 5.11283 -1 0 0 + 3948 1316 2 0.4236 34.38758 10.27642 4.73908 -1 0 0 + 3949 1317 1 -0.8472 5.10908 7.98804 15.75723 0 1 0 + 3950 1317 2 0.4236 5.83685 8.64150 15.96527 0 1 0 + 3951 1317 2 0.4236 4.52699 8.35699 15.03262 0 1 0 + 3952 1318 1 -0.8472 21.73216 9.98499 28.65661 0 0 0 + 3953 1318 2 0.4236 22.11985 9.08867 28.44162 0 0 0 + 3954 1318 2 0.4236 22.22861 10.38703 29.42592 0 0 0 + 3955 1319 1 -0.8472 15.11924 17.54695 6.96555 1 0 0 + 3956 1319 2 0.4236 15.24394 16.65784 6.52526 1 0 0 + 3957 1319 2 0.4236 14.14970 17.79152 6.95414 1 0 0 + 3958 1320 1 -0.8472 9.36217 21.72925 23.47370 0 0 0 + 3959 1320 2 0.4236 9.44785 22.47012 22.80757 0 0 0 + 3960 1320 2 0.4236 9.25579 22.11545 24.38994 0 0 0 + 3961 1321 1 -0.8472 9.43645 15.00189 14.94078 1 0 0 + 3962 1321 2 0.4236 10.25430 14.52785 15.26696 1 0 0 + 3963 1321 2 0.4236 9.65662 15.51329 14.11018 1 0 0 + 3964 1322 1 -0.8472 8.59033 10.76868 9.86814 0 0 0 + 3965 1322 2 0.4236 7.82215 10.93745 9.25058 0 0 0 + 3966 1322 2 0.4236 8.25906 10.73652 10.81111 0 0 0 + 3967 1323 1 -0.8472 11.61768 13.08370 14.89370 0 0 0 + 3968 1323 2 0.4236 11.67363 13.04553 13.89601 0 0 0 + 3969 1323 2 0.4236 12.47416 13.44533 15.26196 0 0 0 + 3970 1324 1 -0.8472 16.11690 13.08391 16.65249 0 0 0 + 3971 1324 2 0.4236 16.28495 12.57915 15.80576 0 0 0 + 3972 1324 2 0.4236 15.93060 12.43894 17.39362 0 0 0 + 3973 1325 1 -0.8472 15.86534 31.96218 1.66332 0 0 0 + 3974 1325 2 0.4236 15.01496 31.44332 1.57625 0 0 0 + 3975 1325 2 0.4236 15.96614 32.57132 0.87672 0 0 0 + 3976 1326 1 -0.8472 24.92119 12.54887 34.11767 0 0 0 + 3977 1326 2 0.4236 25.52292 11.78246 34.34234 0 0 0 + 3978 1326 2 0.4236 25.18156 12.92786 33.22969 0 0 0 + 3979 1327 1 -0.8472 11.53054 35.48053 2.50601 0 -1 0 + 3980 1327 2 0.4236 11.26027 0.86465 2.87208 0 0 0 + 3981 1327 2 0.4236 11.70360 0.05592 1.52453 0 0 0 + 3982 1328 1 -0.8472 30.37646 11.06481 19.98364 -1 1 0 + 3983 1328 2 0.4236 31.07807 10.97906 19.27629 -1 1 0 + 3984 1328 2 0.4236 29.60175 11.58441 19.62339 -1 1 0 + 3985 1329 1 -0.8472 5.33838 10.35688 23.82633 0 1 0 + 3986 1329 2 0.4236 4.49407 10.43102 23.29565 0 1 0 + 3987 1329 2 0.4236 5.42533 11.15151 24.42705 0 1 0 + 3988 1330 1 -0.8472 17.21081 5.64167 9.21177 -1 1 0 + 3989 1330 2 0.4236 17.44537 5.70658 10.18167 -1 1 0 + 3990 1330 2 0.4236 17.43319 6.50384 8.75666 -1 1 0 + 3991 1331 1 -0.8472 8.48413 30.64049 22.56444 0 -1 0 + 3992 1331 2 0.4236 9.06406 29.97286 22.09767 0 -1 0 + 3993 1331 2 0.4236 8.37563 31.44943 21.98669 0 -1 0 + 3994 1332 1 -0.8472 1.13258 13.38927 14.12372 1 1 0 + 3995 1332 2 0.4236 1.00638 14.05274 14.86113 1 1 0 + 3996 1332 2 0.4236 1.57468 12.56864 14.48574 1 1 0 + 3997 1333 1 -0.8472 3.61348 27.78485 20.21784 1 -1 0 + 3998 1333 2 0.4236 3.54423 26.84230 19.89108 1 -1 0 + 3999 1333 2 0.4236 4.49674 28.16750 19.94691 1 -1 0 + 4000 1334 1 -0.8472 34.87963 19.16306 19.16038 -1 1 0 + 4001 1334 2 0.4236 34.72652 18.19533 18.96042 -1 1 0 + 4002 1334 2 0.4236 34.73462 19.70187 18.33056 -1 1 0 + 4003 1335 1 -0.8472 33.17028 25.43707 7.09681 -1 0 0 + 4004 1335 2 0.4236 32.75169 26.26784 6.73000 -1 0 0 + 4005 1335 2 0.4236 32.53585 24.67095 6.99433 -1 0 0 + 4006 1336 1 -0.8472 10.03853 8.39253 8.37546 0 1 0 + 4007 1336 2 0.4236 9.83643 9.29993 8.74386 0 1 0 + 4008 1336 2 0.4236 9.26076 7.78562 8.53887 0 1 0 + 4009 1337 1 -0.8472 8.03214 12.07162 19.93674 1 0 0 + 4010 1337 2 0.4236 7.62829 11.35734 20.50829 1 0 0 + 4011 1337 2 0.4236 8.51882 11.65059 19.17133 1 0 0 + 4012 1338 1 -0.8472 1.41857 21.54262 10.36366 0 0 0 + 4013 1338 2 0.4236 2.20565 20.94132 10.22637 0 0 0 + 4014 1338 2 0.4236 1.66063 22.47502 10.09525 0 0 0 + 4015 1339 1 -0.8472 34.50038 20.54422 16.81189 -1 0 0 + 4016 1339 2 0.4236 35.23362 20.99512 16.30298 -1 0 0 + 4017 1339 2 0.4236 33.70511 21.14879 16.85659 -1 0 0 + 4018 1340 1 -0.8472 9.44547 24.80491 4.00309 1 0 0 + 4019 1340 2 0.4236 10.06637 25.56510 3.81178 1 0 0 + 4020 1340 2 0.4236 9.34559 24.24167 3.18290 1 0 0 + 4021 1341 1 -0.8472 4.73779 28.13530 4.76587 1 0 0 + 4022 1341 2 0.4236 4.64675 27.24203 5.20595 1 0 0 + 4023 1341 2 0.4236 5.38013 28.06692 4.00255 1 0 0 + 4024 1342 1 -0.8472 28.79309 11.26361 32.56261 -1 0 0 + 4025 1342 2 0.4236 28.66814 12.07106 31.98609 -1 0 0 + 4026 1342 2 0.4236 28.00130 11.15780 33.16414 -1 0 0 + 4027 1343 1 -0.8472 29.00688 2.02184 18.32003 0 1 0 + 4028 1343 2 0.4236 29.92131 1.72090 18.59060 0 1 0 + 4029 1343 2 0.4236 28.91878 1.96743 17.32545 0 1 0 + 4030 1344 1 -0.8472 31.38630 11.70534 6.36117 0 1 0 + 4031 1344 2 0.4236 31.72496 12.31115 7.08107 0 1 0 + 4032 1344 2 0.4236 32.14258 11.15776 6.00323 0 1 0 + 4033 1345 1 -0.8472 14.04432 34.74239 31.23302 -1 -1 0 + 4034 1345 2 0.4236 14.42009 35.30378 30.49572 -1 -1 0 + 4035 1345 2 0.4236 14.59804 33.91641 31.33837 -1 -1 0 + 4036 1346 1 -0.8472 11.74166 19.24522 20.21415 0 0 0 + 4037 1346 2 0.4236 12.20073 18.37581 20.39670 0 0 0 + 4038 1346 2 0.4236 11.64250 19.75559 21.06832 0 0 0 + 4039 1347 1 -0.8472 35.52179 6.24067 32.03171 0 0 0 + 4040 1347 2 0.4236 0.50438 6.83174 32.67320 1 0 0 + 4041 1347 2 0.4236 0.29816 5.29165 32.17109 1 0 0 + 4042 1348 1 -0.8472 15.57283 9.26811 33.08255 0 0 0 + 4043 1348 2 0.4236 15.53601 10.10503 33.62861 0 0 0 + 4044 1348 2 0.4236 15.19689 8.50778 33.61220 0 0 0 + 4045 1349 1 -0.8472 17.80359 31.80829 5.14239 1 -1 0 + 4046 1349 2 0.4236 16.85934 32.13019 5.07387 1 -1 0 + 4047 1349 2 0.4236 17.97257 31.11858 4.43838 1 -1 0 + 4048 1350 1 -0.8472 30.38406 19.12162 16.07527 0 0 0 + 4049 1350 2 0.4236 31.29341 19.04947 15.66557 0 0 0 + 4050 1350 2 0.4236 30.08197 18.21753 16.37749 0 0 0 + 4051 1351 1 -0.8472 11.10369 6.99773 6.45008 0 1 0 + 4052 1351 2 0.4236 12.01908 7.37712 6.31577 0 1 0 + 4053 1351 2 0.4236 10.59371 7.57531 7.08745 0 1 0 + 4054 1352 1 -0.8472 12.27206 16.59023 16.74848 1 -1 0 + 4055 1352 2 0.4236 11.81988 17.30736 17.27877 1 -1 0 + 4056 1352 2 0.4236 12.89672 16.08136 17.34073 1 -1 0 + 4057 1353 1 -0.8472 20.33587 18.83981 32.69894 0 1 0 + 4058 1353 2 0.4236 20.70478 19.62858 33.19059 0 1 0 + 4059 1353 2 0.4236 20.73393 18.00044 33.06900 0 1 0 + 4060 1354 1 -0.8472 2.03095 27.60334 3.55915 1 0 0 + 4061 1354 2 0.4236 1.49012 28.34142 3.15579 1 0 0 + 4062 1354 2 0.4236 2.33241 27.87255 4.47382 1 0 0 + 4063 1355 1 -0.8472 18.88135 18.11410 0.87201 0 1 0 + 4064 1355 2 0.4236 19.39275 17.48421 0.28749 0 1 0 + 4065 1355 2 0.4236 18.56634 18.89200 0.32833 0 1 0 + 4066 1356 1 -0.8472 16.25484 6.69873 5.58205 -1 1 0 + 4067 1356 2 0.4236 16.87855 7.00828 6.29978 -1 1 0 + 4068 1356 2 0.4236 16.02398 5.73754 5.73284 -1 1 0 + 4069 1357 1 -0.8472 4.91653 23.82036 8.55004 0 0 0 + 4070 1357 2 0.4236 5.34761 23.21217 9.21648 0 0 0 + 4071 1357 2 0.4236 5.41269 24.68806 8.52083 0 0 0 + 4072 1358 1 -0.8472 33.30943 33.20561 10.09238 -1 0 0 + 4073 1358 2 0.4236 33.26590 34.05918 10.61147 -1 0 0 + 4074 1358 2 0.4236 32.96598 33.36084 9.16618 -1 0 0 + 4075 1359 1 -0.8472 16.61015 7.10659 25.54548 0 0 0 + 4076 1359 2 0.4236 17.06577 7.76016 26.14985 0 0 0 + 4077 1359 2 0.4236 16.33132 7.56921 24.70396 0 0 0 + 4078 1360 1 -0.8472 21.90262 1.55066 18.37026 0 1 0 + 4079 1360 2 0.4236 22.89510 1.63523 18.45827 0 1 0 + 4080 1360 2 0.4236 21.50605 2.45082 18.19019 0 1 0 + 4081 1361 1 -0.8472 3.86501 3.59828 14.83734 0 0 0 + 4082 1361 2 0.4236 4.42352 4.42579 14.89434 0 0 0 + 4083 1361 2 0.4236 3.15744 3.62445 15.54349 0 0 0 + 4084 1362 1 -0.8472 21.92304 8.04648 5.73415 0 0 0 + 4085 1362 2 0.4236 21.15202 8.10038 6.36865 0 0 0 + 4086 1362 2 0.4236 21.92013 8.84868 5.13715 0 0 0 + 4087 1363 1 -0.8472 3.88461 21.70830 19.87333 0 0 0 + 4088 1363 2 0.4236 3.77326 22.48610 19.25477 0 0 0 + 4089 1363 2 0.4236 4.65296 21.88004 20.48982 0 0 0 + 4090 1364 1 -0.8472 12.50665 27.83119 26.83785 0 0 0 + 4091 1364 2 0.4236 11.81736 27.12241 26.68791 0 0 0 + 4092 1364 2 0.4236 12.13096 28.72130 26.57993 0 0 0 + 4093 1365 1 -0.8472 32.46832 31.16200 16.94950 0 0 0 + 4094 1365 2 0.4236 33.05634 30.35349 16.92696 0 0 0 + 4095 1365 2 0.4236 32.80140 31.79707 17.64643 0 0 0 + 4096 1366 1 -0.8472 4.04609 20.23787 14.72111 0 1 0 + 4097 1366 2 0.4236 4.07606 19.71469 15.57277 0 1 0 + 4098 1366 2 0.4236 3.88322 19.61722 13.95421 0 1 0 + 4099 1367 1 -0.8472 13.76311 15.06580 33.41259 0 0 0 + 4100 1367 2 0.4236 14.68056 14.84069 33.74052 0 0 0 + 4101 1367 2 0.4236 13.74788 16.01155 33.08807 0 0 0 + 4102 1368 1 -0.8472 7.97774 4.02759 21.41028 1 1 0 + 4103 1368 2 0.4236 7.63454 3.91294 20.47809 1 1 0 + 4104 1368 2 0.4236 7.20683 4.12630 22.03950 1 1 0 + 4105 1369 1 -0.8472 20.29710 6.13425 12.62094 1 1 0 + 4106 1369 2 0.4236 19.31701 6.01240 12.46433 1 1 0 + 4107 1369 2 0.4236 20.56868 7.05305 12.33463 1 1 0 + 4108 1370 1 -0.8472 5.16656 5.52045 3.92872 1 1 0 + 4109 1370 2 0.4236 5.60269 5.98846 4.69728 1 1 0 + 4110 1370 2 0.4236 5.86909 5.12236 3.33884 1 1 0 + 4111 1371 1 -0.8472 17.27686 18.91878 19.63934 0 0 0 + 4112 1371 2 0.4236 18.05111 18.28992 19.71027 0 0 0 + 4113 1371 2 0.4236 17.49359 19.76961 20.11795 0 0 0 + 4114 1372 1 -0.8472 14.92005 7.12502 11.97112 0 0 0 + 4115 1372 2 0.4236 14.48733 6.58039 11.25271 0 0 0 + 4116 1372 2 0.4236 14.49309 8.02852 12.00724 0 0 0 + 4117 1373 1 -0.8472 1.10019 6.63116 0.49417 0 0 0 + 4118 1373 2 0.4236 1.99111 6.89491 0.86381 0 0 0 + 4119 1373 2 0.4236 1.03948 5.63397 0.45037 0 0 0 + 4120 1374 1 -0.8472 22.59485 0.72080 27.60450 1 1 0 + 4121 1374 2 0.4236 22.17357 1.60200 27.81888 1 1 0 + 4122 1374 2 0.4236 23.51241 0.68494 28.00041 1 1 0 + 4123 1375 1 -0.8472 15.78119 12.79592 23.35569 0 0 0 + 4124 1375 2 0.4236 16.02480 13.73623 23.11820 0 0 0 + 4125 1375 2 0.4236 14.85064 12.77490 23.72119 0 0 0 + 4126 1376 1 -0.8472 33.58141 6.89870 20.97751 -1 1 0 + 4127 1376 2 0.4236 34.40863 7.44824 21.09409 -1 1 0 + 4128 1376 2 0.4236 33.57629 6.15751 21.64870 -1 1 0 + 4129 1377 1 -0.8472 1.92074 17.89289 29.55807 1 0 0 + 4130 1377 2 0.4236 1.00224 17.93553 29.95110 1 0 0 + 4131 1377 2 0.4236 2.57668 17.64257 30.27013 1 0 0 + 4132 1378 1 -0.8472 11.63025 22.33197 20.78411 0 0 0 + 4133 1378 2 0.4236 11.83395 22.71874 21.68347 0 0 0 + 4134 1378 2 0.4236 12.46780 21.96046 20.38359 0 0 0 + 4135 1379 1 -0.8472 18.99923 25.73489 1.07719 0 0 0 + 4136 1379 2 0.4236 19.23105 26.05481 0.15857 0 0 0 + 4137 1379 2 0.4236 18.34556 26.36595 1.49482 0 0 0 + 4138 1380 1 -0.8472 26.73163 0.58642 2.49028 -1 1 0 + 4139 1380 2 0.4236 27.25801 1.43411 2.55567 -1 1 0 + 4140 1380 2 0.4236 26.60863 0.19913 3.40397 -1 1 0 + 4141 1381 1 -0.8472 10.39938 13.91835 25.30518 0 1 0 + 4142 1381 2 0.4236 10.62229 13.45115 26.16077 0 1 0 + 4143 1381 2 0.4236 10.41238 14.90734 25.45229 0 1 0 + 4144 1382 1 -0.8472 21.36317 34.04409 28.83108 0 -1 0 + 4145 1382 2 0.4236 21.78783 34.69929 28.20632 0 -1 0 + 4146 1382 2 0.4236 22.07522 33.53628 29.31593 0 -1 0 + 4147 1383 1 -0.8472 6.60638 30.22876 4.76665 0 -1 0 + 4148 1383 2 0.4236 6.87058 30.19293 5.73043 0 -1 0 + 4149 1383 2 0.4236 5.62090 30.38335 4.69672 0 -1 0 + 4150 1384 1 -0.8472 6.99525 5.86455 18.49351 1 0 0 + 4151 1384 2 0.4236 6.79939 4.89785 18.65820 1 0 0 + 4152 1384 2 0.4236 7.16656 6.00860 17.51892 1 0 0 + 4153 1385 1 -0.8472 27.85100 24.40461 26.76259 -1 0 0 + 4154 1385 2 0.4236 28.16466 23.49121 27.02200 -1 0 0 + 4155 1385 2 0.4236 27.50868 24.88178 27.57192 -1 0 0 + 4156 1386 1 -0.8472 26.18497 0.14061 24.90006 0 0 0 + 4157 1386 2 0.4236 27.13608 0.23417 24.60577 0 0 0 + 4158 1386 2 0.4236 25.60583 0.74498 24.35296 0 0 0 + 4159 1387 1 -0.8472 28.23866 32.55211 16.47504 0 -1 0 + 4160 1387 2 0.4236 27.78773 32.40987 17.35615 0 -1 0 + 4161 1387 2 0.4236 27.95660 33.43281 16.09458 0 -1 0 + 4162 1388 1 -0.8472 3.71190 17.69512 22.13922 0 0 0 + 4163 1388 2 0.4236 4.11270 18.60508 22.24549 0 0 0 + 4164 1388 2 0.4236 3.85950 17.16622 22.97496 0 0 0 + 4165 1389 1 -0.8472 21.99849 17.97835 20.53867 0 -1 0 + 4166 1389 2 0.4236 22.74324 18.54152 20.18072 0 -1 0 + 4167 1389 2 0.4236 21.44970 18.51802 21.17704 0 -1 0 + 4168 1390 1 -0.8472 10.41557 21.36907 9.81845 0 -1 0 + 4169 1390 2 0.4236 10.99340 21.92631 10.41470 0 -1 0 + 4170 1390 2 0.4236 10.29063 20.46447 10.22595 0 -1 0 + 4171 1391 1 -0.8472 26.10008 27.35743 8.93223 -2 0 0 + 4172 1391 2 0.4236 26.71331 27.76259 9.61030 -2 0 0 + 4173 1391 2 0.4236 25.82174 28.05715 8.27430 -2 0 0 + 4174 1392 1 -0.8472 17.35902 11.08757 2.80124 0 1 0 + 4175 1392 2 0.4236 17.01865 10.28022 2.31926 0 1 0 + 4176 1392 2 0.4236 18.34155 11.18187 2.64093 0 1 0 +4177 1393 1 -0.8472 16.76823 15.96965 35.38491 0 0 0 +4178 1393 2 0.4236 16.40681 16.87372 0.16584 0 0 1 +4179 1393 2 0.4236 17.75158 16.03673 35.21615 0 0 0 + 4180 1394 1 -0.8472 5.38571 21.32895 1.85800 0 0 0 + 4181 1394 2 0.4236 4.97998 21.46462 0.95415 0 0 0 + 4182 1394 2 0.4236 5.12424 20.42993 2.20919 0 0 0 + 4183 1395 1 -0.8472 13.98879 4.76207 23.30507 1 0 0 + 4184 1395 2 0.4236 14.66465 5.49461 23.22411 1 0 0 + 4185 1395 2 0.4236 14.11509 4.10815 22.55919 1 0 0 + 4186 1396 1 -0.8472 25.20454 3.81448 25.19998 0 1 0 + 4187 1396 2 0.4236 25.43529 4.37239 24.40284 0 1 0 + 4188 1396 2 0.4236 24.75751 2.97209 24.89910 0 1 0 + 4189 1397 1 -0.8472 34.55435 24.91541 25.79393 0 0 0 + 4190 1397 2 0.4236 35.08581 24.14893 26.15450 0 0 0 + 4191 1397 2 0.4236 33.85857 25.18160 26.46101 0 0 0 + 4192 1398 1 -0.8472 26.21632 33.11524 29.54084 0 0 0 + 4193 1398 2 0.4236 26.88558 33.61308 30.09236 0 0 0 + 4194 1398 2 0.4236 26.05296 33.61059 28.68766 0 0 0 + 4195 1399 1 -0.8472 12.75839 12.33150 9.28135 0 0 0 + 4196 1399 2 0.4236 12.49269 12.46848 10.23559 0 0 0 + 4197 1399 2 0.4236 12.18297 12.89711 8.69066 0 0 0 + 4198 1400 1 -0.8472 30.89915 15.99270 28.39554 -1 0 0 + 4199 1400 2 0.4236 31.44059 15.15457 28.46154 -1 0 0 + 4200 1400 2 0.4236 30.93487 16.33963 27.45835 -1 0 0 + 4201 1401 1 -0.8472 0.81922 11.50629 17.18912 0 0 0 + 4202 1401 2 0.4236 0.61583 10.52916 17.25048 0 0 0 + 4203 1401 2 0.4236 1.64440 11.64122 16.64065 0 0 0 + 4204 1402 1 -0.8472 6.31281 10.44238 16.76762 0 0 0 + 4205 1402 2 0.4236 7.01406 11.14835 16.66862 0 0 0 + 4206 1402 2 0.4236 5.76953 10.62481 17.58709 0 0 0 + 4207 1403 1 -0.8472 0.54456 9.54460 23.55923 0 0 0 + 4208 1403 2 0.4236 0.32188 9.63088 24.53027 0 0 0 + 4209 1403 2 0.4236 1.35608 10.09147 23.35353 0 0 0 + 4210 1404 1 -0.8472 1.24532 29.21899 12.99820 0 -1 0 + 4211 1404 2 0.4236 2.10877 28.72424 12.90008 0 -1 0 + 4212 1404 2 0.4236 1.18386 29.60264 13.91958 0 -1 0 + 4213 1405 1 -0.8472 9.87755 0.56243 14.38546 1 1 0 + 4214 1405 2 0.4236 10.32219 35.29136 13.94064 1 0 0 + 4215 1405 2 0.4236 10.56154 1.10058 14.87789 1 1 0 + 4216 1406 1 -0.8472 20.62159 2.62651 7.23282 1 1 0 + 4217 1406 2 0.4236 21.26312 3.32400 7.55202 1 1 0 + 4218 1406 2 0.4236 19.72502 2.78378 7.64684 1 1 0 + 4219 1407 1 -0.8472 26.24895 1.51497 16.19898 0 0 0 + 4220 1407 2 0.4236 25.40298 1.65532 16.71335 0 0 0 + 4221 1407 2 0.4236 26.29696 2.17550 15.44973 0 0 0 + 4222 1408 1 -0.8472 21.52089 15.53065 3.18350 0 -1 0 + 4223 1408 2 0.4236 21.15454 15.06314 2.37904 0 -1 0 + 4224 1408 2 0.4236 20.93898 16.31204 3.40870 0 -1 0 + 4225 1409 1 -0.8472 9.60116 12.81307 30.75366 0 0 0 + 4226 1409 2 0.4236 10.22636 13.08164 31.48643 0 0 0 + 4227 1409 2 0.4236 9.05604 12.02934 31.05121 0 0 0 + 4228 1410 1 -0.8472 5.23729 9.36348 2.76133 0 1 0 + 4229 1410 2 0.4236 5.49223 9.14952 3.70430 0 1 0 + 4230 1410 2 0.4236 4.82716 8.55685 2.33574 0 1 0 + 4231 1411 1 -0.8472 30.15622 30.86325 5.78803 -1 0 0 + 4232 1411 2 0.4236 31.03997 30.61950 6.18741 -1 0 0 + 4233 1411 2 0.4236 29.77296 31.64556 6.27901 -1 0 0 + 4234 1412 1 -0.8472 3.00118 7.40350 17.66433 1 1 0 + 4235 1412 2 0.4236 3.31933 7.97153 18.42332 1 1 0 + 4236 1412 2 0.4236 3.68758 7.40392 16.93713 1 1 0 + 4237 1413 1 -0.8472 1.27143 7.78395 33.63201 1 0 0 + 4238 1413 2 0.4236 1.04920 7.43066 34.54070 1 0 0 + 4239 1413 2 0.4236 1.85411 8.59165 33.72173 1 0 0 + 4240 1414 1 -0.8472 10.36647 16.58874 31.95040 1 0 0 + 4241 1414 2 0.4236 9.90077 17.17268 32.61532 1 0 0 + 4242 1414 2 0.4236 10.58267 15.70882 32.37335 1 0 0 + 4243 1415 1 -0.8472 2.92649 20.78950 22.99831 0 0 0 + 4244 1415 2 0.4236 3.38630 20.43813 23.81381 0 0 0 + 4245 1415 2 0.4236 3.60510 21.17464 22.37292 0 0 0 + 4246 1416 1 -0.8472 31.24310 32.56486 23.40585 -1 0 0 + 4247 1416 2 0.4236 30.76987 31.83084 23.89290 -1 0 0 + 4248 1416 2 0.4236 31.66708 32.19655 22.57848 -1 0 0 + 4249 1417 1 -0.8472 20.50168 18.67424 3.60469 0 1 0 + 4250 1417 2 0.4236 20.50225 18.74384 2.60714 0 1 0 + 4251 1417 2 0.4236 21.11534 19.36488 3.98731 0 1 0 + 4252 1418 1 -0.8472 29.26181 22.02665 30.81917 0 0 0 + 4253 1418 2 0.4236 29.77498 22.84230 31.08623 0 0 0 + 4254 1418 2 0.4236 28.58254 22.27185 30.12749 0 0 0 + 4255 1419 1 -0.8472 1.85161 27.62341 34.11640 -1 0 0 + 4256 1419 2 0.4236 2.16253 28.55236 34.31717 -1 0 0 + 4257 1419 2 0.4236 1.65257 27.54234 33.13979 -1 0 0 + 4258 1420 1 -0.8472 7.53004 9.50217 1.47002 0 1 0 + 4259 1420 2 0.4236 6.61551 9.21649 1.75623 0 1 0 + 4260 1420 2 0.4236 7.45608 10.27834 0.84390 0 1 0 + 4261 1421 1 -0.8472 16.58285 11.39480 14.39794 0 0 0 + 4262 1421 2 0.4236 16.18969 11.93603 13.65465 0 0 0 + 4263 1421 2 0.4236 16.00811 10.59421 14.56741 0 0 0 + 4264 1422 1 -0.8472 2.10592 5.43627 4.72316 0 1 0 + 4265 1422 2 0.4236 3.08841 5.34757 4.55950 0 1 0 + 4266 1422 2 0.4236 1.92931 5.42178 5.70732 0 1 0 + 4267 1423 1 -0.8472 3.71506 8.98264 20.01685 -1 0 0 + 4268 1423 2 0.4236 3.94387 9.91834 19.74841 -1 0 0 + 4269 1423 2 0.4236 4.50529 8.56072 20.46122 -1 0 0 + 4270 1424 1 -0.8472 1.86906 28.23419 30.94543 0 0 0 + 4271 1424 2 0.4236 2.78640 28.42230 30.59465 0 0 0 + 4272 1424 2 0.4236 1.58999 27.31365 30.67214 0 0 0 + 4273 1425 1 -0.8472 25.91892 1.73795 33.90733 1 1 0 + 4274 1425 2 0.4236 26.38470 2.45005 34.43262 1 1 0 + 4275 1425 2 0.4236 25.22904 2.15669 33.31689 1 1 0 + 4276 1426 1 -0.8472 4.30326 25.01135 31.69404 1 0 0 + 4277 1426 2 0.4236 4.77681 24.60093 30.91477 1 0 0 + 4278 1426 2 0.4236 3.42338 24.55523 31.82725 1 0 0 + 4279 1427 1 -0.8472 19.66466 33.96005 4.92748 0 -1 0 + 4280 1427 2 0.4236 19.99973 33.92475 5.86895 0 -1 0 + 4281 1427 2 0.4236 19.05768 33.18317 4.76034 0 -1 0 + 4282 1428 1 -0.8472 21.52853 24.53570 28.70701 0 -1 0 + 4283 1428 2 0.4236 21.55814 23.79625 29.37955 0 -1 0 + 4284 1428 2 0.4236 21.25506 25.38540 29.15776 0 -1 0 + 4285 1429 1 -0.8472 26.10586 14.96142 24.05624 0 0 0 + 4286 1429 2 0.4236 26.93664 15.23325 24.54190 0 0 0 + 4287 1429 2 0.4236 25.31446 15.40773 24.47395 0 0 0 + 4288 1430 1 -0.8472 8.93989 1.91730 34.66523 0 1 0 + 4289 1430 2 0.4236 9.71720 1.70768 34.07209 0 1 0 + 4290 1430 2 0.4236 9.19437 2.64332 35.30406 0 1 0 + 4291 1431 1 -0.8472 5.49155 24.85029 22.62250 1 0 0 + 4292 1431 2 0.4236 4.52301 24.64929 22.47596 1 0 0 + 4293 1431 2 0.4236 5.58611 25.50776 23.37001 1 0 0 + 4294 1432 1 -0.8472 30.35913 16.66043 13.69265 0 0 0 + 4295 1432 2 0.4236 31.35846 16.64719 13.65890 0 0 0 + 4296 1432 2 0.4236 30.01994 15.73968 13.88523 0 0 0 + 4297 1433 1 -0.8472 23.73905 30.09756 28.00530 0 -1 0 + 4298 1433 2 0.4236 22.88636 29.76565 27.60195 0 -1 0 + 4299 1433 2 0.4236 23.54863 30.89468 28.57831 0 -1 0 + 4300 1434 1 -0.8472 6.27457 22.28510 10.31293 0 0 0 + 4301 1434 2 0.4236 7.20338 22.65451 10.28568 0 0 0 + 4302 1434 2 0.4236 5.87861 22.44520 11.21712 0 0 0 + 4303 1435 1 -0.8472 34.26671 24.67070 21.96499 -1 0 0 + 4304 1435 2 0.4236 34.87274 24.93575 21.21504 -1 0 0 + 4305 1435 2 0.4236 34.76260 24.73063 22.83129 -1 0 0 + 4306 1436 1 -0.8472 18.92162 1.08281 4.46925 -1 -1 0 + 4307 1436 2 0.4236 19.78754 1.54407 4.27592 -1 -1 0 + 4308 1436 2 0.4236 19.09471 0.11779 4.66605 -1 -1 0 + 4309 1437 1 -0.8472 12.57287 31.40153 18.46855 1 0 0 + 4310 1437 2 0.4236 12.50938 30.52513 17.99122 1 0 0 + 4311 1437 2 0.4236 13.40979 31.42337 19.01540 1 0 0 + 4312 1438 1 -0.8472 18.33881 32.50240 15.43232 0 0 0 + 4313 1438 2 0.4236 17.94420 33.42056 15.39759 0 0 0 + 4314 1438 2 0.4236 17.69459 31.87927 15.87577 0 0 0 + 4315 1439 1 -0.8472 7.67654 27.84873 9.04314 0 0 0 + 4316 1439 2 0.4236 8.43198 27.95713 9.68931 0 0 0 + 4317 1439 2 0.4236 6.89338 27.43980 9.51151 0 0 0 + 4318 1440 1 -0.8472 21.65035 35.23355 32.90414 -1 0 0 + 4319 1440 2 0.4236 21.89201 35.27549 33.87358 -1 0 0 + 4320 1440 2 0.4236 21.11552 0.53569 32.65870 -1 1 0 + 4321 1441 1 -0.8472 26.98866 12.66178 1.39463 0 0 0 + 4322 1441 2 0.4236 27.22858 13.05128 0.50543 0 0 0 + 4323 1441 2 0.4236 26.30814 11.93983 1.26961 0 0 0 + 4324 1442 1 -0.8472 33.90498 1.20205 27.79719 -1 0 0 + 4325 1442 2 0.4236 33.57512 1.17136 26.85369 -1 0 0 + 4326 1442 2 0.4236 34.38097 0.34922 28.01175 -1 0 0 + 4327 1443 1 -0.8472 16.09059 23.00449 11.90689 0 -1 0 + 4328 1443 2 0.4236 15.59851 22.16519 11.67591 0 -1 0 + 4329 1443 2 0.4236 16.68248 23.26450 11.14399 0 -1 0 + 4330 1444 1 -0.8472 21.66203 22.49671 5.11467 0 -1 0 + 4331 1444 2 0.4236 21.48400 22.99703 5.96197 0 -1 0 + 4332 1444 2 0.4236 22.09350 21.62052 5.32931 0 -1 0 + 4333 1445 1 -0.8472 28.27062 28.47059 10.54210 0 -1 0 + 4334 1445 2 0.4236 28.73699 29.21139 10.05878 0 -1 0 + 4335 1445 2 0.4236 28.92304 27.99473 11.13191 0 -1 0 + 4336 1446 1 -0.8472 11.81133 6.08344 22.22918 2 0 0 + 4337 1446 2 0.4236 11.98293 6.96727 21.79400 2 0 0 + 4338 1446 2 0.4236 12.67690 5.59722 22.34885 2 0 0 + 4339 1447 1 -0.8472 11.54720 20.00403 29.64998 0 0 0 + 4340 1447 2 0.4236 12.20847 19.94668 30.39788 0 0 0 + 4341 1447 2 0.4236 10.65105 20.25502 30.01590 0 0 0 + 4342 1448 1 -0.8472 23.63295 15.75324 6.26015 -1 0 0 + 4343 1448 2 0.4236 24.01845 15.46731 7.13740 -1 0 0 + 4344 1448 2 0.4236 23.17822 16.63724 6.36819 -1 0 0 + 4345 1449 1 -0.8472 18.59627 17.84478 8.51395 0 0 0 + 4346 1449 2 0.4236 19.30661 17.22786 8.85265 0 0 0 + 4347 1449 2 0.4236 18.88270 18.23432 7.63866 0 0 0 + 4348 1450 1 -0.8472 24.95837 31.64730 25.42719 0 0 0 + 4349 1450 2 0.4236 25.82533 31.64851 24.92884 0 0 0 + 4350 1450 2 0.4236 25.13906 31.67401 26.41036 0 0 0 + 4351 1451 1 -0.8472 16.66874 15.84535 16.59843 0 0 0 + 4352 1451 2 0.4236 16.30160 16.17484 17.46823 0 0 0 + 4353 1451 2 0.4236 16.72463 14.84712 16.61697 0 0 0 + 4354 1452 1 -0.8472 33.01487 0.03301 11.50236 0 1 0 + 4355 1452 2 0.4236 32.49598 0.68423 10.94864 0 1 0 + 4356 1452 2 0.4236 32.63147 35.50688 12.42537 0 0 0 +4357 1453 1 -0.8472 28.05328 19.82767 0.19572 0 0 0 +4358 1453 2 0.4236 27.36733 20.21266 0.81312 0 0 0 +4359 1453 2 0.4236 27.69662 18.99018 35.22901 0 0 -1 + 4360 1454 1 -0.8472 13.82727 16.06989 19.24354 0 0 0 + 4361 1454 2 0.4236 14.79294 15.86683 19.40546 0 0 0 + 4362 1454 2 0.4236 13.26084 15.39722 19.71956 0 0 0 + 4363 1455 1 -0.8472 14.08001 21.97765 33.17988 1 0 0 + 4364 1455 2 0.4236 14.86867 22.09727 33.78291 1 0 0 + 4365 1455 2 0.4236 14.36835 22.08619 32.22855 1 0 0 + 4366 1456 1 -0.8472 16.33725 25.39311 3.01993 0 -1 0 + 4367 1456 2 0.4236 16.78886 26.28499 3.04273 0 -1 0 + 4368 1456 2 0.4236 16.96355 24.71199 2.64072 0 -1 0 + 4369 1457 1 -0.8472 34.41055 25.51007 0.15059 0 0 0 + 4370 1457 2 0.4236 34.86965 26.36478 0.39277 0 0 0 + 4371 1457 2 0.4236 33.46228 25.53993 0.46653 0 0 0 + 4372 1458 1 -0.8472 27.86190 21.35174 28.12153 -1 0 0 + 4373 1458 2 0.4236 28.79121 21.05583 27.90073 -1 0 0 + 4374 1458 2 0.4236 27.23273 21.03009 27.41397 -1 0 0 + 4375 1459 1 -0.8472 0.23515 27.24082 28.00084 1 -1 0 + 4376 1459 2 0.4236 0.82580 26.63370 28.53233 1 -1 0 + 4377 1459 2 0.4236 34.89553 26.76177 27.76667 0 -1 0 + 4378 1460 1 -0.8472 21.68728 25.32330 17.79708 0 0 0 + 4379 1460 2 0.4236 22.01241 26.26845 17.76638 0 0 0 + 4380 1460 2 0.4236 21.31354 25.07022 16.90477 0 0 0 + 4381 1461 1 -0.8472 30.97176 0.89911 8.90394 -1 2 0 + 4382 1461 2 0.4236 31.32718 0.98094 7.97285 -1 2 0 + 4383 1461 2 0.4236 29.99239 1.10098 8.90582 -1 2 0 + 4384 1462 1 -0.8472 25.45716 22.87578 20.99721 0 0 0 + 4385 1462 2 0.4236 26.30239 22.39353 21.22734 0 0 0 + 4386 1462 2 0.4236 25.66033 23.83885 20.82076 0 0 0 + 4387 1463 1 -0.8472 24.87472 30.47978 12.60569 0 0 0 + 4388 1463 2 0.4236 25.65927 30.69811 12.02542 0 0 0 + 4389 1463 2 0.4236 24.98656 29.56166 12.98590 0 0 0 + 4390 1464 1 -0.8472 13.80973 7.99429 5.29049 0 1 0 + 4391 1464 2 0.4236 13.73023 8.76929 4.66357 0 1 0 + 4392 1464 2 0.4236 14.76858 7.86828 5.54475 0 1 0 + 4393 1465 1 -0.8472 33.97510 12.84300 16.82412 -1 0 0 + 4394 1465 2 0.4236 34.81504 12.34044 17.02876 -1 0 0 + 4395 1465 2 0.4236 33.55414 13.15013 17.67758 -1 0 0 + 4396 1466 1 -0.8472 26.59067 21.83864 5.49548 0 0 0 + 4397 1466 2 0.4236 27.17656 22.56826 5.14296 0 0 0 + 4398 1466 2 0.4236 27.14602 21.03034 5.69097 0 0 0 + 4399 1467 1 -0.8472 5.16628 25.92485 12.35774 0 0 0 + 4400 1467 2 0.4236 4.34860 25.35313 12.42442 0 0 0 + 4401 1467 2 0.4236 5.79329 25.69800 13.10298 0 0 0 + 4402 1468 1 -0.8472 26.79149 35.42791 5.15590 -1 0 0 + 4403 1468 2 0.4236 26.57100 34.75869 5.86548 -1 0 0 + 4404 1468 2 0.4236 27.24633 0.70960 5.57074 -1 1 0 + 4405 1469 1 -0.8472 1.20630 3.82773 0.24514 0 0 0 + 4406 1469 2 0.4236 2.07387 3.42063 0.53070 0 0 0 + 4407 1469 2 0.4236 0.45018 3.34497 0.68691 0 0 0 + 4408 1470 1 -0.8472 26.43671 3.26559 13.86247 -1 0 0 + 4409 1470 2 0.4236 26.83179 4.06661 14.31219 -1 0 0 + 4410 1470 2 0.4236 25.70088 3.55590 13.25073 -1 0 0 + 4411 1471 1 -0.8472 33.20618 12.63476 8.22853 0 0 0 + 4412 1471 2 0.4236 32.62856 12.82716 9.02181 0 0 0 + 4413 1471 2 0.4236 34.16325 12.80270 8.46454 0 0 0 + 4414 1472 1 -0.8472 29.90540 24.56808 20.70513 -1 0 0 + 4415 1472 2 0.4236 29.45905 25.46288 20.69386 -1 0 0 + 4416 1472 2 0.4236 30.31745 24.38988 19.81161 -1 0 0 + 4417 1473 1 -0.8472 15.29819 4.02922 16.44477 0 1 0 + 4418 1473 2 0.4236 15.74731 4.67008 17.06729 0 1 0 + 4419 1473 2 0.4236 14.96500 3.24064 16.96159 0 1 0 +4420 1474 1 -0.8472 31.27200 25.18131 0.42504 0 0 0 +4421 1474 2 0.4236 31.06216 24.44154 35.23295 0 0 -1 +4422 1474 2 0.4236 30.72503 25.06997 1.25474 0 0 0 +4423 1475 1 -0.8472 12.12236 3.02649 0.17854 1 1 0 +4424 1475 2 0.4236 11.88057 2.13716 35.23770 1 1 -1 +4425 1475 2 0.4236 11.35234 3.37843 0.71066 1 1 0 + 4426 1476 1 -0.8472 32.84202 11.55156 14.38224 -1 1 0 + 4427 1476 2 0.4236 31.87238 11.54439 14.13797 -1 1 0 + 4428 1476 2 0.4236 33.01945 12.30064 15.02046 -1 1 0 + 4429 1477 1 -0.8472 20.56141 17.44100 12.45462 0 0 0 + 4430 1477 2 0.4236 19.82341 16.87961 12.08022 0 0 0 + 4431 1477 2 0.4236 20.67251 17.23961 13.42779 0 0 0 + 4432 1478 1 -0.8472 15.28058 11.62137 18.81314 0 0 0 + 4433 1478 2 0.4236 14.35106 11.87755 19.07832 0 0 0 + 4434 1478 2 0.4236 15.44910 10.66895 19.06701 0 0 0 + 4435 1479 1 -0.8472 29.74122 20.36633 3.36258 1 0 0 + 4436 1479 2 0.4236 30.50489 19.77988 3.63245 1 0 0 + 4437 1479 2 0.4236 29.83808 20.61761 2.39955 1 0 0 + 4438 1480 1 -0.8472 10.45942 28.09788 15.37735 0 0 0 + 4439 1480 2 0.4236 9.49177 28.21579 15.60027 0 0 0 + 4440 1480 2 0.4236 10.68404 28.64230 14.56918 0 0 0 + 4441 1481 1 -0.8472 16.77284 6.13546 17.93915 -1 1 0 + 4442 1481 2 0.4236 17.27231 6.27930 18.79343 -1 1 0 + 4443 1481 2 0.4236 16.65241 7.01137 17.47196 -1 1 0 + 4444 1482 1 -0.8472 21.51809 0.32169 25.14138 1 0 0 + 4445 1482 2 0.4236 22.25467 0.17201 25.80091 1 0 0 + 4446 1482 2 0.4236 21.38164 34.99836 24.60010 1 -1 0 + 4447 1483 1 -0.8472 8.70687 23.66278 10.13832 1 0 0 + 4448 1483 2 0.4236 9.01094 24.13022 10.96842 1 0 0 + 4449 1483 2 0.4236 9.40929 23.01447 9.84461 1 0 0 + 4450 1484 1 -0.8472 20.24838 3.67061 10.36639 0 1 0 + 4451 1484 2 0.4236 20.42013 3.09249 11.16402 0 1 0 + 4452 1484 2 0.4236 19.45158 3.32583 9.87020 0 1 0 + 4453 1485 1 -0.8472 5.99031 17.08661 14.86595 0 -1 0 + 4454 1485 2 0.4236 6.68059 17.76993 14.62817 0 -1 0 + 4455 1485 2 0.4236 5.51211 17.37098 15.69683 0 -1 0 + 4456 1486 1 -0.8472 9.84126 21.02704 7.17564 1 0 0 + 4457 1486 2 0.4236 9.10851 21.60977 6.82433 1 0 0 + 4458 1486 2 0.4236 9.88717 21.11282 8.17086 1 0 0 + 4459 1487 1 -0.8472 14.27700 22.34872 30.47271 0 -1 0 + 4460 1487 2 0.4236 13.79127 23.17247 30.18038 0 -1 0 + 4461 1487 2 0.4236 14.51549 21.80029 29.67128 0 -1 0 + 4462 1488 1 -0.8472 9.99770 22.36314 18.62254 0 0 0 + 4463 1488 2 0.4236 10.44813 21.95194 17.83008 0 0 0 + 4464 1488 2 0.4236 10.66650 22.49693 19.35385 0 0 0 + 4465 1489 1 -0.8472 13.54588 23.31244 25.33301 0 0 0 + 4466 1489 2 0.4236 13.21038 22.99391 26.21954 0 0 0 + 4467 1489 2 0.4236 14.46674 22.95517 25.17718 0 0 0 + 4468 1490 1 -0.8472 20.37993 18.69129 28.39579 0 0 0 + 4469 1490 2 0.4236 19.95915 18.99234 27.54006 0 0 0 + 4470 1490 2 0.4236 21.36712 18.59759 28.26690 0 0 0 + 4471 1491 1 -0.8472 31.97357 7.21056 11.20401 0 1 0 + 4472 1491 2 0.4236 31.56230 7.14412 12.11308 0 1 0 + 4473 1491 2 0.4236 32.88388 6.79691 11.21900 0 1 0 + 4474 1492 1 -0.8472 3.59839 34.17205 15.10830 1 -1 0 + 4475 1492 2 0.4236 3.17559 33.45078 14.55972 1 -1 0 + 4476 1492 2 0.4236 3.57179 33.91506 16.07431 1 -1 0 + 4477 1493 1 -0.8472 16.75495 18.40965 28.99548 0 0 0 + 4478 1493 2 0.4236 17.67786 18.68610 29.26339 0 0 0 + 4479 1493 2 0.4236 16.49472 17.58541 29.49830 0 0 0 + 4480 1494 1 -0.8472 4.30401 30.00446 27.41270 2 -1 0 + 4481 1494 2 0.4236 5.20242 30.40877 27.24145 2 -1 0 + 4482 1494 2 0.4236 3.66298 30.30545 26.70673 2 -1 0 + 4483 1495 1 -0.8472 6.15115 15.71784 24.07151 1 1 0 + 4484 1495 2 0.4236 5.27191 15.89172 24.51496 1 1 0 + 4485 1495 2 0.4236 6.55767 14.88710 24.45172 1 1 0 + 4486 1496 1 -0.8472 1.16767 28.77477 19.83689 0 0 0 + 4487 1496 2 0.4236 0.50183 28.05644 19.63537 0 0 0 + 4488 1496 2 0.4236 2.07490 28.36794 19.94340 0 0 0 + 4489 1497 1 -0.8472 23.23606 29.74360 8.55284 0 0 0 + 4490 1497 2 0.4236 24.21877 29.83041 8.71618 0 0 0 + 4491 1497 2 0.4236 22.95269 30.40987 7.86311 0 0 0 + 4492 1498 1 -0.8472 19.48056 19.15564 6.41598 0 0 0 + 4493 1498 2 0.4236 18.99884 18.47150 5.86839 0 0 0 + 4494 1498 2 0.4236 18.88774 19.94885 6.55504 0 0 0 + 4495 1499 1 -0.8472 33.04434 24.82100 13.64486 0 0 0 + 4496 1499 2 0.4236 33.83932 24.36499 13.24495 0 0 0 + 4497 1499 2 0.4236 32.21569 24.31265 13.41066 0 0 0 + 4498 1500 1 -0.8472 26.04955 6.03860 17.25587 0 0 0 + 4499 1500 2 0.4236 26.40284 5.43861 17.97360 0 0 0 + 4500 1500 2 0.4236 26.43423 5.76580 16.37409 0 0 0 + +Bonds + + 1 1 1 2 + 2 1 1 3 + 3 1 4 5 + 4 1 4 6 + 5 1 7 8 + 6 1 7 9 + 7 1 10 11 + 8 1 10 12 + 9 1 13 14 + 10 1 13 15 + 11 1 16 17 + 12 1 16 18 + 13 1 19 20 + 14 1 19 21 + 15 1 22 23 + 16 1 22 24 + 17 1 25 26 + 18 1 25 27 + 19 1 28 29 + 20 1 28 30 + 21 1 31 32 + 22 1 31 33 + 23 1 34 35 + 24 1 34 36 + 25 1 37 38 + 26 1 37 39 + 27 1 40 41 + 28 1 40 42 + 29 1 43 44 + 30 1 43 45 + 31 1 46 47 + 32 1 46 48 + 33 1 49 50 + 34 1 49 51 + 35 1 52 53 + 36 1 52 54 + 37 1 55 56 + 38 1 55 57 + 39 1 58 59 + 40 1 58 60 + 41 1 61 62 + 42 1 61 63 + 43 1 64 65 + 44 1 64 66 + 45 1 67 68 + 46 1 67 69 + 47 1 70 71 + 48 1 70 72 + 49 1 73 74 + 50 1 73 75 + 51 1 76 77 + 52 1 76 78 + 53 1 79 80 + 54 1 79 81 + 55 1 82 83 + 56 1 82 84 + 57 1 85 86 + 58 1 85 87 + 59 1 88 89 + 60 1 88 90 + 61 1 91 92 + 62 1 91 93 + 63 1 94 95 + 64 1 94 96 + 65 1 97 98 + 66 1 97 99 + 67 1 100 101 + 68 1 100 102 + 69 1 103 104 + 70 1 103 105 + 71 1 106 107 + 72 1 106 108 + 73 1 109 110 + 74 1 109 111 + 75 1 112 113 + 76 1 112 114 + 77 1 115 116 + 78 1 115 117 + 79 1 118 119 + 80 1 118 120 + 81 1 121 122 + 82 1 121 123 + 83 1 124 125 + 84 1 124 126 + 85 1 127 128 + 86 1 127 129 + 87 1 130 131 + 88 1 130 132 + 89 1 133 134 + 90 1 133 135 + 91 1 136 137 + 92 1 136 138 + 93 1 139 140 + 94 1 139 141 + 95 1 142 143 + 96 1 142 144 + 97 1 145 146 + 98 1 145 147 + 99 1 148 149 + 100 1 148 150 + 101 1 151 152 + 102 1 151 153 + 103 1 154 155 + 104 1 154 156 + 105 1 157 158 + 106 1 157 159 + 107 1 160 161 + 108 1 160 162 + 109 1 163 164 + 110 1 163 165 + 111 1 166 167 + 112 1 166 168 + 113 1 169 170 + 114 1 169 171 + 115 1 172 173 + 116 1 172 174 + 117 1 175 176 + 118 1 175 177 + 119 1 178 179 + 120 1 178 180 + 121 1 181 182 + 122 1 181 183 + 123 1 184 185 + 124 1 184 186 + 125 1 187 188 + 126 1 187 189 + 127 1 190 191 + 128 1 190 192 + 129 1 193 194 + 130 1 193 195 + 131 1 196 197 + 132 1 196 198 + 133 1 199 200 + 134 1 199 201 + 135 1 202 203 + 136 1 202 204 + 137 1 205 206 + 138 1 205 207 + 139 1 208 209 + 140 1 208 210 + 141 1 211 212 + 142 1 211 213 + 143 1 214 215 + 144 1 214 216 + 145 1 217 218 + 146 1 217 219 + 147 1 220 221 + 148 1 220 222 + 149 1 223 224 + 150 1 223 225 + 151 1 226 227 + 152 1 226 228 + 153 1 229 230 + 154 1 229 231 + 155 1 232 233 + 156 1 232 234 + 157 1 235 236 + 158 1 235 237 + 159 1 238 239 + 160 1 238 240 + 161 1 241 242 + 162 1 241 243 + 163 1 244 245 + 164 1 244 246 + 165 1 247 248 + 166 1 247 249 + 167 1 250 251 + 168 1 250 252 + 169 1 253 254 + 170 1 253 255 + 171 1 256 257 + 172 1 256 258 + 173 1 259 260 + 174 1 259 261 + 175 1 262 263 + 176 1 262 264 + 177 1 265 266 + 178 1 265 267 + 179 1 268 269 + 180 1 268 270 + 181 1 271 272 + 182 1 271 273 + 183 1 274 275 + 184 1 274 276 + 185 1 277 278 + 186 1 277 279 + 187 1 280 281 + 188 1 280 282 + 189 1 283 284 + 190 1 283 285 + 191 1 286 287 + 192 1 286 288 + 193 1 289 290 + 194 1 289 291 + 195 1 292 293 + 196 1 292 294 + 197 1 295 296 + 198 1 295 297 + 199 1 298 299 + 200 1 298 300 + 201 1 301 302 + 202 1 301 303 + 203 1 304 305 + 204 1 304 306 + 205 1 307 308 + 206 1 307 309 + 207 1 310 311 + 208 1 310 312 + 209 1 313 314 + 210 1 313 315 + 211 1 316 317 + 212 1 316 318 + 213 1 319 320 + 214 1 319 321 + 215 1 322 323 + 216 1 322 324 + 217 1 325 326 + 218 1 325 327 + 219 1 328 329 + 220 1 328 330 + 221 1 331 332 + 222 1 331 333 + 223 1 334 335 + 224 1 334 336 + 225 1 337 338 + 226 1 337 339 + 227 1 340 341 + 228 1 340 342 + 229 1 343 344 + 230 1 343 345 + 231 1 346 347 + 232 1 346 348 + 233 1 349 350 + 234 1 349 351 + 235 1 352 353 + 236 1 352 354 + 237 1 355 356 + 238 1 355 357 + 239 1 358 359 + 240 1 358 360 + 241 1 361 362 + 242 1 361 363 + 243 1 364 365 + 244 1 364 366 + 245 1 367 368 + 246 1 367 369 + 247 1 370 371 + 248 1 370 372 + 249 1 373 374 + 250 1 373 375 + 251 1 376 377 + 252 1 376 378 + 253 1 379 380 + 254 1 379 381 + 255 1 382 383 + 256 1 382 384 + 257 1 385 386 + 258 1 385 387 + 259 1 388 389 + 260 1 388 390 + 261 1 391 392 + 262 1 391 393 + 263 1 394 395 + 264 1 394 396 + 265 1 397 398 + 266 1 397 399 + 267 1 400 401 + 268 1 400 402 + 269 1 403 404 + 270 1 403 405 + 271 1 406 407 + 272 1 406 408 + 273 1 409 410 + 274 1 409 411 + 275 1 412 413 + 276 1 412 414 + 277 1 415 416 + 278 1 415 417 + 279 1 418 419 + 280 1 418 420 + 281 1 421 422 + 282 1 421 423 + 283 1 424 425 + 284 1 424 426 + 285 1 427 428 + 286 1 427 429 + 287 1 430 431 + 288 1 430 432 + 289 1 433 434 + 290 1 433 435 + 291 1 436 437 + 292 1 436 438 + 293 1 439 440 + 294 1 439 441 + 295 1 442 443 + 296 1 442 444 + 297 1 445 446 + 298 1 445 447 + 299 1 448 449 + 300 1 448 450 + 301 1 451 452 + 302 1 451 453 + 303 1 454 455 + 304 1 454 456 + 305 1 457 458 + 306 1 457 459 + 307 1 460 461 + 308 1 460 462 + 309 1 463 464 + 310 1 463 465 + 311 1 466 467 + 312 1 466 468 + 313 1 469 470 + 314 1 469 471 + 315 1 472 473 + 316 1 472 474 + 317 1 475 476 + 318 1 475 477 + 319 1 478 479 + 320 1 478 480 + 321 1 481 482 + 322 1 481 483 + 323 1 484 485 + 324 1 484 486 + 325 1 487 488 + 326 1 487 489 + 327 1 490 491 + 328 1 490 492 + 329 1 493 494 + 330 1 493 495 + 331 1 496 497 + 332 1 496 498 + 333 1 499 500 + 334 1 499 501 + 335 1 502 503 + 336 1 502 504 + 337 1 505 506 + 338 1 505 507 + 339 1 508 509 + 340 1 508 510 + 341 1 511 512 + 342 1 511 513 + 343 1 514 515 + 344 1 514 516 + 345 1 517 518 + 346 1 517 519 + 347 1 520 521 + 348 1 520 522 + 349 1 523 524 + 350 1 523 525 + 351 1 526 527 + 352 1 526 528 + 353 1 529 530 + 354 1 529 531 + 355 1 532 533 + 356 1 532 534 + 357 1 535 536 + 358 1 535 537 + 359 1 538 539 + 360 1 538 540 + 361 1 541 542 + 362 1 541 543 + 363 1 544 545 + 364 1 544 546 + 365 1 547 548 + 366 1 547 549 + 367 1 550 551 + 368 1 550 552 + 369 1 553 554 + 370 1 553 555 + 371 1 556 557 + 372 1 556 558 + 373 1 559 560 + 374 1 559 561 + 375 1 562 563 + 376 1 562 564 + 377 1 565 566 + 378 1 565 567 + 379 1 568 569 + 380 1 568 570 + 381 1 571 572 + 382 1 571 573 + 383 1 574 575 + 384 1 574 576 + 385 1 577 578 + 386 1 577 579 + 387 1 580 581 + 388 1 580 582 + 389 1 583 584 + 390 1 583 585 + 391 1 586 587 + 392 1 586 588 + 393 1 589 590 + 394 1 589 591 + 395 1 592 593 + 396 1 592 594 + 397 1 595 596 + 398 1 595 597 + 399 1 598 599 + 400 1 598 600 + 401 1 601 602 + 402 1 601 603 + 403 1 604 605 + 404 1 604 606 + 405 1 607 608 + 406 1 607 609 + 407 1 610 611 + 408 1 610 612 + 409 1 613 614 + 410 1 613 615 + 411 1 616 617 + 412 1 616 618 + 413 1 619 620 + 414 1 619 621 + 415 1 622 623 + 416 1 622 624 + 417 1 625 626 + 418 1 625 627 + 419 1 628 629 + 420 1 628 630 + 421 1 631 632 + 422 1 631 633 + 423 1 634 635 + 424 1 634 636 + 425 1 637 638 + 426 1 637 639 + 427 1 640 641 + 428 1 640 642 + 429 1 643 644 + 430 1 643 645 + 431 1 646 647 + 432 1 646 648 + 433 1 649 650 + 434 1 649 651 + 435 1 652 653 + 436 1 652 654 + 437 1 655 656 + 438 1 655 657 + 439 1 658 659 + 440 1 658 660 + 441 1 661 662 + 442 1 661 663 + 443 1 664 665 + 444 1 664 666 + 445 1 667 668 + 446 1 667 669 + 447 1 670 671 + 448 1 670 672 + 449 1 673 674 + 450 1 673 675 + 451 1 676 677 + 452 1 676 678 + 453 1 679 680 + 454 1 679 681 + 455 1 682 683 + 456 1 682 684 + 457 1 685 686 + 458 1 685 687 + 459 1 688 689 + 460 1 688 690 + 461 1 691 692 + 462 1 691 693 + 463 1 694 695 + 464 1 694 696 + 465 1 697 698 + 466 1 697 699 + 467 1 700 701 + 468 1 700 702 + 469 1 703 704 + 470 1 703 705 + 471 1 706 707 + 472 1 706 708 + 473 1 709 710 + 474 1 709 711 + 475 1 712 713 + 476 1 712 714 + 477 1 715 716 + 478 1 715 717 + 479 1 718 719 + 480 1 718 720 + 481 1 721 722 + 482 1 721 723 + 483 1 724 725 + 484 1 724 726 + 485 1 727 728 + 486 1 727 729 + 487 1 730 731 + 488 1 730 732 + 489 1 733 734 + 490 1 733 735 + 491 1 736 737 + 492 1 736 738 + 493 1 739 740 + 494 1 739 741 + 495 1 742 743 + 496 1 742 744 + 497 1 745 746 + 498 1 745 747 + 499 1 748 749 + 500 1 748 750 + 501 1 751 752 + 502 1 751 753 + 503 1 754 755 + 504 1 754 756 + 505 1 757 758 + 506 1 757 759 + 507 1 760 761 + 508 1 760 762 + 509 1 763 764 + 510 1 763 765 + 511 1 766 767 + 512 1 766 768 + 513 1 769 770 + 514 1 769 771 + 515 1 772 773 + 516 1 772 774 + 517 1 775 776 + 518 1 775 777 + 519 1 778 779 + 520 1 778 780 + 521 1 781 782 + 522 1 781 783 + 523 1 784 785 + 524 1 784 786 + 525 1 787 788 + 526 1 787 789 + 527 1 790 791 + 528 1 790 792 + 529 1 793 794 + 530 1 793 795 + 531 1 796 797 + 532 1 796 798 + 533 1 799 800 + 534 1 799 801 + 535 1 802 803 + 536 1 802 804 + 537 1 805 806 + 538 1 805 807 + 539 1 808 809 + 540 1 808 810 + 541 1 811 812 + 542 1 811 813 + 543 1 814 815 + 544 1 814 816 + 545 1 817 818 + 546 1 817 819 + 547 1 820 821 + 548 1 820 822 + 549 1 823 824 + 550 1 823 825 + 551 1 826 827 + 552 1 826 828 + 553 1 829 830 + 554 1 829 831 + 555 1 832 833 + 556 1 832 834 + 557 1 835 836 + 558 1 835 837 + 559 1 838 839 + 560 1 838 840 + 561 1 841 842 + 562 1 841 843 + 563 1 844 845 + 564 1 844 846 + 565 1 847 848 + 566 1 847 849 + 567 1 850 851 + 568 1 850 852 + 569 1 853 854 + 570 1 853 855 + 571 1 856 857 + 572 1 856 858 + 573 1 859 860 + 574 1 859 861 + 575 1 862 863 + 576 1 862 864 + 577 1 865 866 + 578 1 865 867 + 579 1 868 869 + 580 1 868 870 + 581 1 871 872 + 582 1 871 873 + 583 1 874 875 + 584 1 874 876 + 585 1 877 878 + 586 1 877 879 + 587 1 880 881 + 588 1 880 882 + 589 1 883 884 + 590 1 883 885 + 591 1 886 887 + 592 1 886 888 + 593 1 889 890 + 594 1 889 891 + 595 1 892 893 + 596 1 892 894 + 597 1 895 896 + 598 1 895 897 + 599 1 898 899 + 600 1 898 900 + 601 1 901 902 + 602 1 901 903 + 603 1 904 905 + 604 1 904 906 + 605 1 907 908 + 606 1 907 909 + 607 1 910 911 + 608 1 910 912 + 609 1 913 914 + 610 1 913 915 + 611 1 916 917 + 612 1 916 918 + 613 1 919 920 + 614 1 919 921 + 615 1 922 923 + 616 1 922 924 + 617 1 925 926 + 618 1 925 927 + 619 1 928 929 + 620 1 928 930 + 621 1 931 932 + 622 1 931 933 + 623 1 934 935 + 624 1 934 936 + 625 1 937 938 + 626 1 937 939 + 627 1 940 941 + 628 1 940 942 + 629 1 943 944 + 630 1 943 945 + 631 1 946 947 + 632 1 946 948 + 633 1 949 950 + 634 1 949 951 + 635 1 952 953 + 636 1 952 954 + 637 1 955 956 + 638 1 955 957 + 639 1 958 959 + 640 1 958 960 + 641 1 961 962 + 642 1 961 963 + 643 1 964 965 + 644 1 964 966 + 645 1 967 968 + 646 1 967 969 + 647 1 970 971 + 648 1 970 972 + 649 1 973 974 + 650 1 973 975 + 651 1 976 977 + 652 1 976 978 + 653 1 979 980 + 654 1 979 981 + 655 1 982 983 + 656 1 982 984 + 657 1 985 986 + 658 1 985 987 + 659 1 988 989 + 660 1 988 990 + 661 1 991 992 + 662 1 991 993 + 663 1 994 995 + 664 1 994 996 + 665 1 997 998 + 666 1 997 999 + 667 1 1000 1001 + 668 1 1000 1002 + 669 1 1003 1004 + 670 1 1003 1005 + 671 1 1006 1007 + 672 1 1006 1008 + 673 1 1009 1010 + 674 1 1009 1011 + 675 1 1012 1013 + 676 1 1012 1014 + 677 1 1015 1016 + 678 1 1015 1017 + 679 1 1018 1019 + 680 1 1018 1020 + 681 1 1021 1022 + 682 1 1021 1023 + 683 1 1024 1025 + 684 1 1024 1026 + 685 1 1027 1028 + 686 1 1027 1029 + 687 1 1030 1031 + 688 1 1030 1032 + 689 1 1033 1034 + 690 1 1033 1035 + 691 1 1036 1037 + 692 1 1036 1038 + 693 1 1039 1040 + 694 1 1039 1041 + 695 1 1042 1043 + 696 1 1042 1044 + 697 1 1045 1046 + 698 1 1045 1047 + 699 1 1048 1049 + 700 1 1048 1050 + 701 1 1051 1052 + 702 1 1051 1053 + 703 1 1054 1055 + 704 1 1054 1056 + 705 1 1057 1058 + 706 1 1057 1059 + 707 1 1060 1061 + 708 1 1060 1062 + 709 1 1063 1064 + 710 1 1063 1065 + 711 1 1066 1067 + 712 1 1066 1068 + 713 1 1069 1070 + 714 1 1069 1071 + 715 1 1072 1073 + 716 1 1072 1074 + 717 1 1075 1076 + 718 1 1075 1077 + 719 1 1078 1079 + 720 1 1078 1080 + 721 1 1081 1082 + 722 1 1081 1083 + 723 1 1084 1085 + 724 1 1084 1086 + 725 1 1087 1088 + 726 1 1087 1089 + 727 1 1090 1091 + 728 1 1090 1092 + 729 1 1093 1094 + 730 1 1093 1095 + 731 1 1096 1097 + 732 1 1096 1098 + 733 1 1099 1100 + 734 1 1099 1101 + 735 1 1102 1103 + 736 1 1102 1104 + 737 1 1105 1106 + 738 1 1105 1107 + 739 1 1108 1109 + 740 1 1108 1110 + 741 1 1111 1112 + 742 1 1111 1113 + 743 1 1114 1115 + 744 1 1114 1116 + 745 1 1117 1118 + 746 1 1117 1119 + 747 1 1120 1121 + 748 1 1120 1122 + 749 1 1123 1124 + 750 1 1123 1125 + 751 1 1126 1127 + 752 1 1126 1128 + 753 1 1129 1130 + 754 1 1129 1131 + 755 1 1132 1133 + 756 1 1132 1134 + 757 1 1135 1136 + 758 1 1135 1137 + 759 1 1138 1139 + 760 1 1138 1140 + 761 1 1141 1142 + 762 1 1141 1143 + 763 1 1144 1145 + 764 1 1144 1146 + 765 1 1147 1148 + 766 1 1147 1149 + 767 1 1150 1151 + 768 1 1150 1152 + 769 1 1153 1154 + 770 1 1153 1155 + 771 1 1156 1157 + 772 1 1156 1158 + 773 1 1159 1160 + 774 1 1159 1161 + 775 1 1162 1163 + 776 1 1162 1164 + 777 1 1165 1166 + 778 1 1165 1167 + 779 1 1168 1169 + 780 1 1168 1170 + 781 1 1171 1172 + 782 1 1171 1173 + 783 1 1174 1175 + 784 1 1174 1176 + 785 1 1177 1178 + 786 1 1177 1179 + 787 1 1180 1181 + 788 1 1180 1182 + 789 1 1183 1184 + 790 1 1183 1185 + 791 1 1186 1187 + 792 1 1186 1188 + 793 1 1189 1190 + 794 1 1189 1191 + 795 1 1192 1193 + 796 1 1192 1194 + 797 1 1195 1196 + 798 1 1195 1197 + 799 1 1198 1199 + 800 1 1198 1200 + 801 1 1201 1202 + 802 1 1201 1203 + 803 1 1204 1205 + 804 1 1204 1206 + 805 1 1207 1208 + 806 1 1207 1209 + 807 1 1210 1211 + 808 1 1210 1212 + 809 1 1213 1214 + 810 1 1213 1215 + 811 1 1216 1217 + 812 1 1216 1218 + 813 1 1219 1220 + 814 1 1219 1221 + 815 1 1222 1223 + 816 1 1222 1224 + 817 1 1225 1226 + 818 1 1225 1227 + 819 1 1228 1229 + 820 1 1228 1230 + 821 1 1231 1232 + 822 1 1231 1233 + 823 1 1234 1235 + 824 1 1234 1236 + 825 1 1237 1238 + 826 1 1237 1239 + 827 1 1240 1241 + 828 1 1240 1242 + 829 1 1243 1244 + 830 1 1243 1245 + 831 1 1246 1247 + 832 1 1246 1248 + 833 1 1249 1250 + 834 1 1249 1251 + 835 1 1252 1253 + 836 1 1252 1254 + 837 1 1255 1256 + 838 1 1255 1257 + 839 1 1258 1259 + 840 1 1258 1260 + 841 1 1261 1262 + 842 1 1261 1263 + 843 1 1264 1265 + 844 1 1264 1266 + 845 1 1267 1268 + 846 1 1267 1269 + 847 1 1270 1271 + 848 1 1270 1272 + 849 1 1273 1274 + 850 1 1273 1275 + 851 1 1276 1277 + 852 1 1276 1278 + 853 1 1279 1280 + 854 1 1279 1281 + 855 1 1282 1283 + 856 1 1282 1284 + 857 1 1285 1286 + 858 1 1285 1287 + 859 1 1288 1289 + 860 1 1288 1290 + 861 1 1291 1292 + 862 1 1291 1293 + 863 1 1294 1295 + 864 1 1294 1296 + 865 1 1297 1298 + 866 1 1297 1299 + 867 1 1300 1301 + 868 1 1300 1302 + 869 1 1303 1304 + 870 1 1303 1305 + 871 1 1306 1307 + 872 1 1306 1308 + 873 1 1309 1310 + 874 1 1309 1311 + 875 1 1312 1313 + 876 1 1312 1314 + 877 1 1315 1316 + 878 1 1315 1317 + 879 1 1318 1319 + 880 1 1318 1320 + 881 1 1321 1322 + 882 1 1321 1323 + 883 1 1324 1325 + 884 1 1324 1326 + 885 1 1327 1328 + 886 1 1327 1329 + 887 1 1330 1331 + 888 1 1330 1332 + 889 1 1333 1334 + 890 1 1333 1335 + 891 1 1336 1337 + 892 1 1336 1338 + 893 1 1339 1340 + 894 1 1339 1341 + 895 1 1342 1343 + 896 1 1342 1344 + 897 1 1345 1346 + 898 1 1345 1347 + 899 1 1348 1349 + 900 1 1348 1350 + 901 1 1351 1352 + 902 1 1351 1353 + 903 1 1354 1355 + 904 1 1354 1356 + 905 1 1357 1358 + 906 1 1357 1359 + 907 1 1360 1361 + 908 1 1360 1362 + 909 1 1363 1364 + 910 1 1363 1365 + 911 1 1366 1367 + 912 1 1366 1368 + 913 1 1369 1370 + 914 1 1369 1371 + 915 1 1372 1373 + 916 1 1372 1374 + 917 1 1375 1376 + 918 1 1375 1377 + 919 1 1378 1379 + 920 1 1378 1380 + 921 1 1381 1382 + 922 1 1381 1383 + 923 1 1384 1385 + 924 1 1384 1386 + 925 1 1387 1388 + 926 1 1387 1389 + 927 1 1390 1391 + 928 1 1390 1392 + 929 1 1393 1394 + 930 1 1393 1395 + 931 1 1396 1397 + 932 1 1396 1398 + 933 1 1399 1400 + 934 1 1399 1401 + 935 1 1402 1403 + 936 1 1402 1404 + 937 1 1405 1406 + 938 1 1405 1407 + 939 1 1408 1409 + 940 1 1408 1410 + 941 1 1411 1412 + 942 1 1411 1413 + 943 1 1414 1415 + 944 1 1414 1416 + 945 1 1417 1418 + 946 1 1417 1419 + 947 1 1420 1421 + 948 1 1420 1422 + 949 1 1423 1424 + 950 1 1423 1425 + 951 1 1426 1427 + 952 1 1426 1428 + 953 1 1429 1430 + 954 1 1429 1431 + 955 1 1432 1433 + 956 1 1432 1434 + 957 1 1435 1436 + 958 1 1435 1437 + 959 1 1438 1439 + 960 1 1438 1440 + 961 1 1441 1442 + 962 1 1441 1443 + 963 1 1444 1445 + 964 1 1444 1446 + 965 1 1447 1448 + 966 1 1447 1449 + 967 1 1450 1451 + 968 1 1450 1452 + 969 1 1453 1454 + 970 1 1453 1455 + 971 1 1456 1457 + 972 1 1456 1458 + 973 1 1459 1460 + 974 1 1459 1461 + 975 1 1462 1463 + 976 1 1462 1464 + 977 1 1465 1466 + 978 1 1465 1467 + 979 1 1468 1469 + 980 1 1468 1470 + 981 1 1471 1472 + 982 1 1471 1473 + 983 1 1474 1475 + 984 1 1474 1476 + 985 1 1477 1478 + 986 1 1477 1479 + 987 1 1480 1481 + 988 1 1480 1482 + 989 1 1483 1484 + 990 1 1483 1485 + 991 1 1486 1487 + 992 1 1486 1488 + 993 1 1489 1490 + 994 1 1489 1491 + 995 1 1492 1493 + 996 1 1492 1494 + 997 1 1495 1496 + 998 1 1495 1497 + 999 1 1498 1499 + 1000 1 1498 1500 + 1001 1 1501 1502 + 1002 1 1501 1503 + 1003 1 1504 1505 + 1004 1 1504 1506 + 1005 1 1507 1508 + 1006 1 1507 1509 + 1007 1 1510 1511 + 1008 1 1510 1512 + 1009 1 1513 1514 + 1010 1 1513 1515 + 1011 1 1516 1517 + 1012 1 1516 1518 + 1013 1 1519 1520 + 1014 1 1519 1521 + 1015 1 1522 1523 + 1016 1 1522 1524 + 1017 1 1525 1526 + 1018 1 1525 1527 + 1019 1 1528 1529 + 1020 1 1528 1530 + 1021 1 1531 1532 + 1022 1 1531 1533 + 1023 1 1534 1535 + 1024 1 1534 1536 + 1025 1 1537 1538 + 1026 1 1537 1539 + 1027 1 1540 1541 + 1028 1 1540 1542 + 1029 1 1543 1544 + 1030 1 1543 1545 + 1031 1 1546 1547 + 1032 1 1546 1548 + 1033 1 1549 1550 + 1034 1 1549 1551 + 1035 1 1552 1553 + 1036 1 1552 1554 + 1037 1 1555 1556 + 1038 1 1555 1557 + 1039 1 1558 1559 + 1040 1 1558 1560 + 1041 1 1561 1562 + 1042 1 1561 1563 + 1043 1 1564 1565 + 1044 1 1564 1566 + 1045 1 1567 1568 + 1046 1 1567 1569 + 1047 1 1570 1571 + 1048 1 1570 1572 + 1049 1 1573 1574 + 1050 1 1573 1575 + 1051 1 1576 1577 + 1052 1 1576 1578 + 1053 1 1579 1580 + 1054 1 1579 1581 + 1055 1 1582 1583 + 1056 1 1582 1584 + 1057 1 1585 1586 + 1058 1 1585 1587 + 1059 1 1588 1589 + 1060 1 1588 1590 + 1061 1 1591 1592 + 1062 1 1591 1593 + 1063 1 1594 1595 + 1064 1 1594 1596 + 1065 1 1597 1598 + 1066 1 1597 1599 + 1067 1 1600 1601 + 1068 1 1600 1602 + 1069 1 1603 1604 + 1070 1 1603 1605 + 1071 1 1606 1607 + 1072 1 1606 1608 + 1073 1 1609 1610 + 1074 1 1609 1611 + 1075 1 1612 1613 + 1076 1 1612 1614 + 1077 1 1615 1616 + 1078 1 1615 1617 + 1079 1 1618 1619 + 1080 1 1618 1620 + 1081 1 1621 1622 + 1082 1 1621 1623 + 1083 1 1624 1625 + 1084 1 1624 1626 + 1085 1 1627 1628 + 1086 1 1627 1629 + 1087 1 1630 1631 + 1088 1 1630 1632 + 1089 1 1633 1634 + 1090 1 1633 1635 + 1091 1 1636 1637 + 1092 1 1636 1638 + 1093 1 1639 1640 + 1094 1 1639 1641 + 1095 1 1642 1643 + 1096 1 1642 1644 + 1097 1 1645 1646 + 1098 1 1645 1647 + 1099 1 1648 1649 + 1100 1 1648 1650 + 1101 1 1651 1652 + 1102 1 1651 1653 + 1103 1 1654 1655 + 1104 1 1654 1656 + 1105 1 1657 1658 + 1106 1 1657 1659 + 1107 1 1660 1661 + 1108 1 1660 1662 + 1109 1 1663 1664 + 1110 1 1663 1665 + 1111 1 1666 1667 + 1112 1 1666 1668 + 1113 1 1669 1670 + 1114 1 1669 1671 + 1115 1 1672 1673 + 1116 1 1672 1674 + 1117 1 1675 1676 + 1118 1 1675 1677 + 1119 1 1678 1679 + 1120 1 1678 1680 + 1121 1 1681 1682 + 1122 1 1681 1683 + 1123 1 1684 1685 + 1124 1 1684 1686 + 1125 1 1687 1688 + 1126 1 1687 1689 + 1127 1 1690 1691 + 1128 1 1690 1692 + 1129 1 1693 1694 + 1130 1 1693 1695 + 1131 1 1696 1697 + 1132 1 1696 1698 + 1133 1 1699 1700 + 1134 1 1699 1701 + 1135 1 1702 1703 + 1136 1 1702 1704 + 1137 1 1705 1706 + 1138 1 1705 1707 + 1139 1 1708 1709 + 1140 1 1708 1710 + 1141 1 1711 1712 + 1142 1 1711 1713 + 1143 1 1714 1715 + 1144 1 1714 1716 + 1145 1 1717 1718 + 1146 1 1717 1719 + 1147 1 1720 1721 + 1148 1 1720 1722 + 1149 1 1723 1724 + 1150 1 1723 1725 + 1151 1 1726 1727 + 1152 1 1726 1728 + 1153 1 1729 1730 + 1154 1 1729 1731 + 1155 1 1732 1733 + 1156 1 1732 1734 + 1157 1 1735 1736 + 1158 1 1735 1737 + 1159 1 1738 1739 + 1160 1 1738 1740 + 1161 1 1741 1742 + 1162 1 1741 1743 + 1163 1 1744 1745 + 1164 1 1744 1746 + 1165 1 1747 1748 + 1166 1 1747 1749 + 1167 1 1750 1751 + 1168 1 1750 1752 + 1169 1 1753 1754 + 1170 1 1753 1755 + 1171 1 1756 1757 + 1172 1 1756 1758 + 1173 1 1759 1760 + 1174 1 1759 1761 + 1175 1 1762 1763 + 1176 1 1762 1764 + 1177 1 1765 1766 + 1178 1 1765 1767 + 1179 1 1768 1769 + 1180 1 1768 1770 + 1181 1 1771 1772 + 1182 1 1771 1773 + 1183 1 1774 1775 + 1184 1 1774 1776 + 1185 1 1777 1778 + 1186 1 1777 1779 + 1187 1 1780 1781 + 1188 1 1780 1782 + 1189 1 1783 1784 + 1190 1 1783 1785 + 1191 1 1786 1787 + 1192 1 1786 1788 + 1193 1 1789 1790 + 1194 1 1789 1791 + 1195 1 1792 1793 + 1196 1 1792 1794 + 1197 1 1795 1796 + 1198 1 1795 1797 + 1199 1 1798 1799 + 1200 1 1798 1800 + 1201 1 1801 1802 + 1202 1 1801 1803 + 1203 1 1804 1805 + 1204 1 1804 1806 + 1205 1 1807 1808 + 1206 1 1807 1809 + 1207 1 1810 1811 + 1208 1 1810 1812 + 1209 1 1813 1814 + 1210 1 1813 1815 + 1211 1 1816 1817 + 1212 1 1816 1818 + 1213 1 1819 1820 + 1214 1 1819 1821 + 1215 1 1822 1823 + 1216 1 1822 1824 + 1217 1 1825 1826 + 1218 1 1825 1827 + 1219 1 1828 1829 + 1220 1 1828 1830 + 1221 1 1831 1832 + 1222 1 1831 1833 + 1223 1 1834 1835 + 1224 1 1834 1836 + 1225 1 1837 1838 + 1226 1 1837 1839 + 1227 1 1840 1841 + 1228 1 1840 1842 + 1229 1 1843 1844 + 1230 1 1843 1845 + 1231 1 1846 1847 + 1232 1 1846 1848 + 1233 1 1849 1850 + 1234 1 1849 1851 + 1235 1 1852 1853 + 1236 1 1852 1854 + 1237 1 1855 1856 + 1238 1 1855 1857 + 1239 1 1858 1859 + 1240 1 1858 1860 + 1241 1 1861 1862 + 1242 1 1861 1863 + 1243 1 1864 1865 + 1244 1 1864 1866 + 1245 1 1867 1868 + 1246 1 1867 1869 + 1247 1 1870 1871 + 1248 1 1870 1872 + 1249 1 1873 1874 + 1250 1 1873 1875 + 1251 1 1876 1877 + 1252 1 1876 1878 + 1253 1 1879 1880 + 1254 1 1879 1881 + 1255 1 1882 1883 + 1256 1 1882 1884 + 1257 1 1885 1886 + 1258 1 1885 1887 + 1259 1 1888 1889 + 1260 1 1888 1890 + 1261 1 1891 1892 + 1262 1 1891 1893 + 1263 1 1894 1895 + 1264 1 1894 1896 + 1265 1 1897 1898 + 1266 1 1897 1899 + 1267 1 1900 1901 + 1268 1 1900 1902 + 1269 1 1903 1904 + 1270 1 1903 1905 + 1271 1 1906 1907 + 1272 1 1906 1908 + 1273 1 1909 1910 + 1274 1 1909 1911 + 1275 1 1912 1913 + 1276 1 1912 1914 + 1277 1 1915 1916 + 1278 1 1915 1917 + 1279 1 1918 1919 + 1280 1 1918 1920 + 1281 1 1921 1922 + 1282 1 1921 1923 + 1283 1 1924 1925 + 1284 1 1924 1926 + 1285 1 1927 1928 + 1286 1 1927 1929 + 1287 1 1930 1931 + 1288 1 1930 1932 + 1289 1 1933 1934 + 1290 1 1933 1935 + 1291 1 1936 1937 + 1292 1 1936 1938 + 1293 1 1939 1940 + 1294 1 1939 1941 + 1295 1 1942 1943 + 1296 1 1942 1944 + 1297 1 1945 1946 + 1298 1 1945 1947 + 1299 1 1948 1949 + 1300 1 1948 1950 + 1301 1 1951 1952 + 1302 1 1951 1953 + 1303 1 1954 1955 + 1304 1 1954 1956 + 1305 1 1957 1958 + 1306 1 1957 1959 + 1307 1 1960 1961 + 1308 1 1960 1962 + 1309 1 1963 1964 + 1310 1 1963 1965 + 1311 1 1966 1967 + 1312 1 1966 1968 + 1313 1 1969 1970 + 1314 1 1969 1971 + 1315 1 1972 1973 + 1316 1 1972 1974 + 1317 1 1975 1976 + 1318 1 1975 1977 + 1319 1 1978 1979 + 1320 1 1978 1980 + 1321 1 1981 1982 + 1322 1 1981 1983 + 1323 1 1984 1985 + 1324 1 1984 1986 + 1325 1 1987 1988 + 1326 1 1987 1989 + 1327 1 1990 1991 + 1328 1 1990 1992 + 1329 1 1993 1994 + 1330 1 1993 1995 + 1331 1 1996 1997 + 1332 1 1996 1998 + 1333 1 1999 2000 + 1334 1 1999 2001 + 1335 1 2002 2003 + 1336 1 2002 2004 + 1337 1 2005 2006 + 1338 1 2005 2007 + 1339 1 2008 2009 + 1340 1 2008 2010 + 1341 1 2011 2012 + 1342 1 2011 2013 + 1343 1 2014 2015 + 1344 1 2014 2016 + 1345 1 2017 2018 + 1346 1 2017 2019 + 1347 1 2020 2021 + 1348 1 2020 2022 + 1349 1 2023 2024 + 1350 1 2023 2025 + 1351 1 2026 2027 + 1352 1 2026 2028 + 1353 1 2029 2030 + 1354 1 2029 2031 + 1355 1 2032 2033 + 1356 1 2032 2034 + 1357 1 2035 2036 + 1358 1 2035 2037 + 1359 1 2038 2039 + 1360 1 2038 2040 + 1361 1 2041 2042 + 1362 1 2041 2043 + 1363 1 2044 2045 + 1364 1 2044 2046 + 1365 1 2047 2048 + 1366 1 2047 2049 + 1367 1 2050 2051 + 1368 1 2050 2052 + 1369 1 2053 2054 + 1370 1 2053 2055 + 1371 1 2056 2057 + 1372 1 2056 2058 + 1373 1 2059 2060 + 1374 1 2059 2061 + 1375 1 2062 2063 + 1376 1 2062 2064 + 1377 1 2065 2066 + 1378 1 2065 2067 + 1379 1 2068 2069 + 1380 1 2068 2070 + 1381 1 2071 2072 + 1382 1 2071 2073 + 1383 1 2074 2075 + 1384 1 2074 2076 + 1385 1 2077 2078 + 1386 1 2077 2079 + 1387 1 2080 2081 + 1388 1 2080 2082 + 1389 1 2083 2084 + 1390 1 2083 2085 + 1391 1 2086 2087 + 1392 1 2086 2088 + 1393 1 2089 2090 + 1394 1 2089 2091 + 1395 1 2092 2093 + 1396 1 2092 2094 + 1397 1 2095 2096 + 1398 1 2095 2097 + 1399 1 2098 2099 + 1400 1 2098 2100 + 1401 1 2101 2102 + 1402 1 2101 2103 + 1403 1 2104 2105 + 1404 1 2104 2106 + 1405 1 2107 2108 + 1406 1 2107 2109 + 1407 1 2110 2111 + 1408 1 2110 2112 + 1409 1 2113 2114 + 1410 1 2113 2115 + 1411 1 2116 2117 + 1412 1 2116 2118 + 1413 1 2119 2120 + 1414 1 2119 2121 + 1415 1 2122 2123 + 1416 1 2122 2124 + 1417 1 2125 2126 + 1418 1 2125 2127 + 1419 1 2128 2129 + 1420 1 2128 2130 + 1421 1 2131 2132 + 1422 1 2131 2133 + 1423 1 2134 2135 + 1424 1 2134 2136 + 1425 1 2137 2138 + 1426 1 2137 2139 + 1427 1 2140 2141 + 1428 1 2140 2142 + 1429 1 2143 2144 + 1430 1 2143 2145 + 1431 1 2146 2147 + 1432 1 2146 2148 + 1433 1 2149 2150 + 1434 1 2149 2151 + 1435 1 2152 2153 + 1436 1 2152 2154 + 1437 1 2155 2156 + 1438 1 2155 2157 + 1439 1 2158 2159 + 1440 1 2158 2160 + 1441 1 2161 2162 + 1442 1 2161 2163 + 1443 1 2164 2165 + 1444 1 2164 2166 + 1445 1 2167 2168 + 1446 1 2167 2169 + 1447 1 2170 2171 + 1448 1 2170 2172 + 1449 1 2173 2174 + 1450 1 2173 2175 + 1451 1 2176 2177 + 1452 1 2176 2178 + 1453 1 2179 2180 + 1454 1 2179 2181 + 1455 1 2182 2183 + 1456 1 2182 2184 + 1457 1 2185 2186 + 1458 1 2185 2187 + 1459 1 2188 2189 + 1460 1 2188 2190 + 1461 1 2191 2192 + 1462 1 2191 2193 + 1463 1 2194 2195 + 1464 1 2194 2196 + 1465 1 2197 2198 + 1466 1 2197 2199 + 1467 1 2200 2201 + 1468 1 2200 2202 + 1469 1 2203 2204 + 1470 1 2203 2205 + 1471 1 2206 2207 + 1472 1 2206 2208 + 1473 1 2209 2210 + 1474 1 2209 2211 + 1475 1 2212 2213 + 1476 1 2212 2214 + 1477 1 2215 2216 + 1478 1 2215 2217 + 1479 1 2218 2219 + 1480 1 2218 2220 + 1481 1 2221 2222 + 1482 1 2221 2223 + 1483 1 2224 2225 + 1484 1 2224 2226 + 1485 1 2227 2228 + 1486 1 2227 2229 + 1487 1 2230 2231 + 1488 1 2230 2232 + 1489 1 2233 2234 + 1490 1 2233 2235 + 1491 1 2236 2237 + 1492 1 2236 2238 + 1493 1 2239 2240 + 1494 1 2239 2241 + 1495 1 2242 2243 + 1496 1 2242 2244 + 1497 1 2245 2246 + 1498 1 2245 2247 + 1499 1 2248 2249 + 1500 1 2248 2250 + 1501 1 2251 2252 + 1502 1 2251 2253 + 1503 1 2254 2255 + 1504 1 2254 2256 + 1505 1 2257 2258 + 1506 1 2257 2259 + 1507 1 2260 2261 + 1508 1 2260 2262 + 1509 1 2263 2264 + 1510 1 2263 2265 + 1511 1 2266 2267 + 1512 1 2266 2268 + 1513 1 2269 2270 + 1514 1 2269 2271 + 1515 1 2272 2273 + 1516 1 2272 2274 + 1517 1 2275 2276 + 1518 1 2275 2277 + 1519 1 2278 2279 + 1520 1 2278 2280 + 1521 1 2281 2282 + 1522 1 2281 2283 + 1523 1 2284 2285 + 1524 1 2284 2286 + 1525 1 2287 2288 + 1526 1 2287 2289 + 1527 1 2290 2291 + 1528 1 2290 2292 + 1529 1 2293 2294 + 1530 1 2293 2295 + 1531 1 2296 2297 + 1532 1 2296 2298 + 1533 1 2299 2300 + 1534 1 2299 2301 + 1535 1 2302 2303 + 1536 1 2302 2304 + 1537 1 2305 2306 + 1538 1 2305 2307 + 1539 1 2308 2309 + 1540 1 2308 2310 + 1541 1 2311 2312 + 1542 1 2311 2313 + 1543 1 2314 2315 + 1544 1 2314 2316 + 1545 1 2317 2318 + 1546 1 2317 2319 + 1547 1 2320 2321 + 1548 1 2320 2322 + 1549 1 2323 2324 + 1550 1 2323 2325 + 1551 1 2326 2327 + 1552 1 2326 2328 + 1553 1 2329 2330 + 1554 1 2329 2331 + 1555 1 2332 2333 + 1556 1 2332 2334 + 1557 1 2335 2336 + 1558 1 2335 2337 + 1559 1 2338 2339 + 1560 1 2338 2340 + 1561 1 2341 2342 + 1562 1 2341 2343 + 1563 1 2344 2345 + 1564 1 2344 2346 + 1565 1 2347 2348 + 1566 1 2347 2349 + 1567 1 2350 2351 + 1568 1 2350 2352 + 1569 1 2353 2354 + 1570 1 2353 2355 + 1571 1 2356 2357 + 1572 1 2356 2358 + 1573 1 2359 2360 + 1574 1 2359 2361 + 1575 1 2362 2363 + 1576 1 2362 2364 + 1577 1 2365 2366 + 1578 1 2365 2367 + 1579 1 2368 2369 + 1580 1 2368 2370 + 1581 1 2371 2372 + 1582 1 2371 2373 + 1583 1 2374 2375 + 1584 1 2374 2376 + 1585 1 2377 2378 + 1586 1 2377 2379 + 1587 1 2380 2381 + 1588 1 2380 2382 + 1589 1 2383 2384 + 1590 1 2383 2385 + 1591 1 2386 2387 + 1592 1 2386 2388 + 1593 1 2389 2390 + 1594 1 2389 2391 + 1595 1 2392 2393 + 1596 1 2392 2394 + 1597 1 2395 2396 + 1598 1 2395 2397 + 1599 1 2398 2399 + 1600 1 2398 2400 + 1601 1 2401 2402 + 1602 1 2401 2403 + 1603 1 2404 2405 + 1604 1 2404 2406 + 1605 1 2407 2408 + 1606 1 2407 2409 + 1607 1 2410 2411 + 1608 1 2410 2412 + 1609 1 2413 2414 + 1610 1 2413 2415 + 1611 1 2416 2417 + 1612 1 2416 2418 + 1613 1 2419 2420 + 1614 1 2419 2421 + 1615 1 2422 2423 + 1616 1 2422 2424 + 1617 1 2425 2426 + 1618 1 2425 2427 + 1619 1 2428 2429 + 1620 1 2428 2430 + 1621 1 2431 2432 + 1622 1 2431 2433 + 1623 1 2434 2435 + 1624 1 2434 2436 + 1625 1 2437 2438 + 1626 1 2437 2439 + 1627 1 2440 2441 + 1628 1 2440 2442 + 1629 1 2443 2444 + 1630 1 2443 2445 + 1631 1 2446 2447 + 1632 1 2446 2448 + 1633 1 2449 2450 + 1634 1 2449 2451 + 1635 1 2452 2453 + 1636 1 2452 2454 + 1637 1 2455 2456 + 1638 1 2455 2457 + 1639 1 2458 2459 + 1640 1 2458 2460 + 1641 1 2461 2462 + 1642 1 2461 2463 + 1643 1 2464 2465 + 1644 1 2464 2466 + 1645 1 2467 2468 + 1646 1 2467 2469 + 1647 1 2470 2471 + 1648 1 2470 2472 + 1649 1 2473 2474 + 1650 1 2473 2475 + 1651 1 2476 2477 + 1652 1 2476 2478 + 1653 1 2479 2480 + 1654 1 2479 2481 + 1655 1 2482 2483 + 1656 1 2482 2484 + 1657 1 2485 2486 + 1658 1 2485 2487 + 1659 1 2488 2489 + 1660 1 2488 2490 + 1661 1 2491 2492 + 1662 1 2491 2493 + 1663 1 2494 2495 + 1664 1 2494 2496 + 1665 1 2497 2498 + 1666 1 2497 2499 + 1667 1 2500 2501 + 1668 1 2500 2502 + 1669 1 2503 2504 + 1670 1 2503 2505 + 1671 1 2506 2507 + 1672 1 2506 2508 + 1673 1 2509 2510 + 1674 1 2509 2511 + 1675 1 2512 2513 + 1676 1 2512 2514 + 1677 1 2515 2516 + 1678 1 2515 2517 + 1679 1 2518 2519 + 1680 1 2518 2520 + 1681 1 2521 2522 + 1682 1 2521 2523 + 1683 1 2524 2525 + 1684 1 2524 2526 + 1685 1 2527 2528 + 1686 1 2527 2529 + 1687 1 2530 2531 + 1688 1 2530 2532 + 1689 1 2533 2534 + 1690 1 2533 2535 + 1691 1 2536 2537 + 1692 1 2536 2538 + 1693 1 2539 2540 + 1694 1 2539 2541 + 1695 1 2542 2543 + 1696 1 2542 2544 + 1697 1 2545 2546 + 1698 1 2545 2547 + 1699 1 2548 2549 + 1700 1 2548 2550 + 1701 1 2551 2552 + 1702 1 2551 2553 + 1703 1 2554 2555 + 1704 1 2554 2556 + 1705 1 2557 2558 + 1706 1 2557 2559 + 1707 1 2560 2561 + 1708 1 2560 2562 + 1709 1 2563 2564 + 1710 1 2563 2565 + 1711 1 2566 2567 + 1712 1 2566 2568 + 1713 1 2569 2570 + 1714 1 2569 2571 + 1715 1 2572 2573 + 1716 1 2572 2574 + 1717 1 2575 2576 + 1718 1 2575 2577 + 1719 1 2578 2579 + 1720 1 2578 2580 + 1721 1 2581 2582 + 1722 1 2581 2583 + 1723 1 2584 2585 + 1724 1 2584 2586 + 1725 1 2587 2588 + 1726 1 2587 2589 + 1727 1 2590 2591 + 1728 1 2590 2592 + 1729 1 2593 2594 + 1730 1 2593 2595 + 1731 1 2596 2597 + 1732 1 2596 2598 + 1733 1 2599 2600 + 1734 1 2599 2601 + 1735 1 2602 2603 + 1736 1 2602 2604 + 1737 1 2605 2606 + 1738 1 2605 2607 + 1739 1 2608 2609 + 1740 1 2608 2610 + 1741 1 2611 2612 + 1742 1 2611 2613 + 1743 1 2614 2615 + 1744 1 2614 2616 + 1745 1 2617 2618 + 1746 1 2617 2619 + 1747 1 2620 2621 + 1748 1 2620 2622 + 1749 1 2623 2624 + 1750 1 2623 2625 + 1751 1 2626 2627 + 1752 1 2626 2628 + 1753 1 2629 2630 + 1754 1 2629 2631 + 1755 1 2632 2633 + 1756 1 2632 2634 + 1757 1 2635 2636 + 1758 1 2635 2637 + 1759 1 2638 2639 + 1760 1 2638 2640 + 1761 1 2641 2642 + 1762 1 2641 2643 + 1763 1 2644 2645 + 1764 1 2644 2646 + 1765 1 2647 2648 + 1766 1 2647 2649 + 1767 1 2650 2651 + 1768 1 2650 2652 + 1769 1 2653 2654 + 1770 1 2653 2655 + 1771 1 2656 2657 + 1772 1 2656 2658 + 1773 1 2659 2660 + 1774 1 2659 2661 + 1775 1 2662 2663 + 1776 1 2662 2664 + 1777 1 2665 2666 + 1778 1 2665 2667 + 1779 1 2668 2669 + 1780 1 2668 2670 + 1781 1 2671 2672 + 1782 1 2671 2673 + 1783 1 2674 2675 + 1784 1 2674 2676 + 1785 1 2677 2678 + 1786 1 2677 2679 + 1787 1 2680 2681 + 1788 1 2680 2682 + 1789 1 2683 2684 + 1790 1 2683 2685 + 1791 1 2686 2687 + 1792 1 2686 2688 + 1793 1 2689 2690 + 1794 1 2689 2691 + 1795 1 2692 2693 + 1796 1 2692 2694 + 1797 1 2695 2696 + 1798 1 2695 2697 + 1799 1 2698 2699 + 1800 1 2698 2700 + 1801 1 2701 2702 + 1802 1 2701 2703 + 1803 1 2704 2705 + 1804 1 2704 2706 + 1805 1 2707 2708 + 1806 1 2707 2709 + 1807 1 2710 2711 + 1808 1 2710 2712 + 1809 1 2713 2714 + 1810 1 2713 2715 + 1811 1 2716 2717 + 1812 1 2716 2718 + 1813 1 2719 2720 + 1814 1 2719 2721 + 1815 1 2722 2723 + 1816 1 2722 2724 + 1817 1 2725 2726 + 1818 1 2725 2727 + 1819 1 2728 2729 + 1820 1 2728 2730 + 1821 1 2731 2732 + 1822 1 2731 2733 + 1823 1 2734 2735 + 1824 1 2734 2736 + 1825 1 2737 2738 + 1826 1 2737 2739 + 1827 1 2740 2741 + 1828 1 2740 2742 + 1829 1 2743 2744 + 1830 1 2743 2745 + 1831 1 2746 2747 + 1832 1 2746 2748 + 1833 1 2749 2750 + 1834 1 2749 2751 + 1835 1 2752 2753 + 1836 1 2752 2754 + 1837 1 2755 2756 + 1838 1 2755 2757 + 1839 1 2758 2759 + 1840 1 2758 2760 + 1841 1 2761 2762 + 1842 1 2761 2763 + 1843 1 2764 2765 + 1844 1 2764 2766 + 1845 1 2767 2768 + 1846 1 2767 2769 + 1847 1 2770 2771 + 1848 1 2770 2772 + 1849 1 2773 2774 + 1850 1 2773 2775 + 1851 1 2776 2777 + 1852 1 2776 2778 + 1853 1 2779 2780 + 1854 1 2779 2781 + 1855 1 2782 2783 + 1856 1 2782 2784 + 1857 1 2785 2786 + 1858 1 2785 2787 + 1859 1 2788 2789 + 1860 1 2788 2790 + 1861 1 2791 2792 + 1862 1 2791 2793 + 1863 1 2794 2795 + 1864 1 2794 2796 + 1865 1 2797 2798 + 1866 1 2797 2799 + 1867 1 2800 2801 + 1868 1 2800 2802 + 1869 1 2803 2804 + 1870 1 2803 2805 + 1871 1 2806 2807 + 1872 1 2806 2808 + 1873 1 2809 2810 + 1874 1 2809 2811 + 1875 1 2812 2813 + 1876 1 2812 2814 + 1877 1 2815 2816 + 1878 1 2815 2817 + 1879 1 2818 2819 + 1880 1 2818 2820 + 1881 1 2821 2822 + 1882 1 2821 2823 + 1883 1 2824 2825 + 1884 1 2824 2826 + 1885 1 2827 2828 + 1886 1 2827 2829 + 1887 1 2830 2831 + 1888 1 2830 2832 + 1889 1 2833 2834 + 1890 1 2833 2835 + 1891 1 2836 2837 + 1892 1 2836 2838 + 1893 1 2839 2840 + 1894 1 2839 2841 + 1895 1 2842 2843 + 1896 1 2842 2844 + 1897 1 2845 2846 + 1898 1 2845 2847 + 1899 1 2848 2849 + 1900 1 2848 2850 + 1901 1 2851 2852 + 1902 1 2851 2853 + 1903 1 2854 2855 + 1904 1 2854 2856 + 1905 1 2857 2858 + 1906 1 2857 2859 + 1907 1 2860 2861 + 1908 1 2860 2862 + 1909 1 2863 2864 + 1910 1 2863 2865 + 1911 1 2866 2867 + 1912 1 2866 2868 + 1913 1 2869 2870 + 1914 1 2869 2871 + 1915 1 2872 2873 + 1916 1 2872 2874 + 1917 1 2875 2876 + 1918 1 2875 2877 + 1919 1 2878 2879 + 1920 1 2878 2880 + 1921 1 2881 2882 + 1922 1 2881 2883 + 1923 1 2884 2885 + 1924 1 2884 2886 + 1925 1 2887 2888 + 1926 1 2887 2889 + 1927 1 2890 2891 + 1928 1 2890 2892 + 1929 1 2893 2894 + 1930 1 2893 2895 + 1931 1 2896 2897 + 1932 1 2896 2898 + 1933 1 2899 2900 + 1934 1 2899 2901 + 1935 1 2902 2903 + 1936 1 2902 2904 + 1937 1 2905 2906 + 1938 1 2905 2907 + 1939 1 2908 2909 + 1940 1 2908 2910 + 1941 1 2911 2912 + 1942 1 2911 2913 + 1943 1 2914 2915 + 1944 1 2914 2916 + 1945 1 2917 2918 + 1946 1 2917 2919 + 1947 1 2920 2921 + 1948 1 2920 2922 + 1949 1 2923 2924 + 1950 1 2923 2925 + 1951 1 2926 2927 + 1952 1 2926 2928 + 1953 1 2929 2930 + 1954 1 2929 2931 + 1955 1 2932 2933 + 1956 1 2932 2934 + 1957 1 2935 2936 + 1958 1 2935 2937 + 1959 1 2938 2939 + 1960 1 2938 2940 + 1961 1 2941 2942 + 1962 1 2941 2943 + 1963 1 2944 2945 + 1964 1 2944 2946 + 1965 1 2947 2948 + 1966 1 2947 2949 + 1967 1 2950 2951 + 1968 1 2950 2952 + 1969 1 2953 2954 + 1970 1 2953 2955 + 1971 1 2956 2957 + 1972 1 2956 2958 + 1973 1 2959 2960 + 1974 1 2959 2961 + 1975 1 2962 2963 + 1976 1 2962 2964 + 1977 1 2965 2966 + 1978 1 2965 2967 + 1979 1 2968 2969 + 1980 1 2968 2970 + 1981 1 2971 2972 + 1982 1 2971 2973 + 1983 1 2974 2975 + 1984 1 2974 2976 + 1985 1 2977 2978 + 1986 1 2977 2979 + 1987 1 2980 2981 + 1988 1 2980 2982 + 1989 1 2983 2984 + 1990 1 2983 2985 + 1991 1 2986 2987 + 1992 1 2986 2988 + 1993 1 2989 2990 + 1994 1 2989 2991 + 1995 1 2992 2993 + 1996 1 2992 2994 + 1997 1 2995 2996 + 1998 1 2995 2997 + 1999 1 2998 2999 + 2000 1 2998 3000 + 2001 1 3001 3002 + 2002 1 3001 3003 + 2003 1 3004 3005 + 2004 1 3004 3006 + 2005 1 3007 3008 + 2006 1 3007 3009 + 2007 1 3010 3011 + 2008 1 3010 3012 + 2009 1 3013 3014 + 2010 1 3013 3015 + 2011 1 3016 3017 + 2012 1 3016 3018 + 2013 1 3019 3020 + 2014 1 3019 3021 + 2015 1 3022 3023 + 2016 1 3022 3024 + 2017 1 3025 3026 + 2018 1 3025 3027 + 2019 1 3028 3029 + 2020 1 3028 3030 + 2021 1 3031 3032 + 2022 1 3031 3033 + 2023 1 3034 3035 + 2024 1 3034 3036 + 2025 1 3037 3038 + 2026 1 3037 3039 + 2027 1 3040 3041 + 2028 1 3040 3042 + 2029 1 3043 3044 + 2030 1 3043 3045 + 2031 1 3046 3047 + 2032 1 3046 3048 + 2033 1 3049 3050 + 2034 1 3049 3051 + 2035 1 3052 3053 + 2036 1 3052 3054 + 2037 1 3055 3056 + 2038 1 3055 3057 + 2039 1 3058 3059 + 2040 1 3058 3060 + 2041 1 3061 3062 + 2042 1 3061 3063 + 2043 1 3064 3065 + 2044 1 3064 3066 + 2045 1 3067 3068 + 2046 1 3067 3069 + 2047 1 3070 3071 + 2048 1 3070 3072 + 2049 1 3073 3074 + 2050 1 3073 3075 + 2051 1 3076 3077 + 2052 1 3076 3078 + 2053 1 3079 3080 + 2054 1 3079 3081 + 2055 1 3082 3083 + 2056 1 3082 3084 + 2057 1 3085 3086 + 2058 1 3085 3087 + 2059 1 3088 3089 + 2060 1 3088 3090 + 2061 1 3091 3092 + 2062 1 3091 3093 + 2063 1 3094 3095 + 2064 1 3094 3096 + 2065 1 3097 3098 + 2066 1 3097 3099 + 2067 1 3100 3101 + 2068 1 3100 3102 + 2069 1 3103 3104 + 2070 1 3103 3105 + 2071 1 3106 3107 + 2072 1 3106 3108 + 2073 1 3109 3110 + 2074 1 3109 3111 + 2075 1 3112 3113 + 2076 1 3112 3114 + 2077 1 3115 3116 + 2078 1 3115 3117 + 2079 1 3118 3119 + 2080 1 3118 3120 + 2081 1 3121 3122 + 2082 1 3121 3123 + 2083 1 3124 3125 + 2084 1 3124 3126 + 2085 1 3127 3128 + 2086 1 3127 3129 + 2087 1 3130 3131 + 2088 1 3130 3132 + 2089 1 3133 3134 + 2090 1 3133 3135 + 2091 1 3136 3137 + 2092 1 3136 3138 + 2093 1 3139 3140 + 2094 1 3139 3141 + 2095 1 3142 3143 + 2096 1 3142 3144 + 2097 1 3145 3146 + 2098 1 3145 3147 + 2099 1 3148 3149 + 2100 1 3148 3150 + 2101 1 3151 3152 + 2102 1 3151 3153 + 2103 1 3154 3155 + 2104 1 3154 3156 + 2105 1 3157 3158 + 2106 1 3157 3159 + 2107 1 3160 3161 + 2108 1 3160 3162 + 2109 1 3163 3164 + 2110 1 3163 3165 + 2111 1 3166 3167 + 2112 1 3166 3168 + 2113 1 3169 3170 + 2114 1 3169 3171 + 2115 1 3172 3173 + 2116 1 3172 3174 + 2117 1 3175 3176 + 2118 1 3175 3177 + 2119 1 3178 3179 + 2120 1 3178 3180 + 2121 1 3181 3182 + 2122 1 3181 3183 + 2123 1 3184 3185 + 2124 1 3184 3186 + 2125 1 3187 3188 + 2126 1 3187 3189 + 2127 1 3190 3191 + 2128 1 3190 3192 + 2129 1 3193 3194 + 2130 1 3193 3195 + 2131 1 3196 3197 + 2132 1 3196 3198 + 2133 1 3199 3200 + 2134 1 3199 3201 + 2135 1 3202 3203 + 2136 1 3202 3204 + 2137 1 3205 3206 + 2138 1 3205 3207 + 2139 1 3208 3209 + 2140 1 3208 3210 + 2141 1 3211 3212 + 2142 1 3211 3213 + 2143 1 3214 3215 + 2144 1 3214 3216 + 2145 1 3217 3218 + 2146 1 3217 3219 + 2147 1 3220 3221 + 2148 1 3220 3222 + 2149 1 3223 3224 + 2150 1 3223 3225 + 2151 1 3226 3227 + 2152 1 3226 3228 + 2153 1 3229 3230 + 2154 1 3229 3231 + 2155 1 3232 3233 + 2156 1 3232 3234 + 2157 1 3235 3236 + 2158 1 3235 3237 + 2159 1 3238 3239 + 2160 1 3238 3240 + 2161 1 3241 3242 + 2162 1 3241 3243 + 2163 1 3244 3245 + 2164 1 3244 3246 + 2165 1 3247 3248 + 2166 1 3247 3249 + 2167 1 3250 3251 + 2168 1 3250 3252 + 2169 1 3253 3254 + 2170 1 3253 3255 + 2171 1 3256 3257 + 2172 1 3256 3258 + 2173 1 3259 3260 + 2174 1 3259 3261 + 2175 1 3262 3263 + 2176 1 3262 3264 + 2177 1 3265 3266 + 2178 1 3265 3267 + 2179 1 3268 3269 + 2180 1 3268 3270 + 2181 1 3271 3272 + 2182 1 3271 3273 + 2183 1 3274 3275 + 2184 1 3274 3276 + 2185 1 3277 3278 + 2186 1 3277 3279 + 2187 1 3280 3281 + 2188 1 3280 3282 + 2189 1 3283 3284 + 2190 1 3283 3285 + 2191 1 3286 3287 + 2192 1 3286 3288 + 2193 1 3289 3290 + 2194 1 3289 3291 + 2195 1 3292 3293 + 2196 1 3292 3294 + 2197 1 3295 3296 + 2198 1 3295 3297 + 2199 1 3298 3299 + 2200 1 3298 3300 + 2201 1 3301 3302 + 2202 1 3301 3303 + 2203 1 3304 3305 + 2204 1 3304 3306 + 2205 1 3307 3308 + 2206 1 3307 3309 + 2207 1 3310 3311 + 2208 1 3310 3312 + 2209 1 3313 3314 + 2210 1 3313 3315 + 2211 1 3316 3317 + 2212 1 3316 3318 + 2213 1 3319 3320 + 2214 1 3319 3321 + 2215 1 3322 3323 + 2216 1 3322 3324 + 2217 1 3325 3326 + 2218 1 3325 3327 + 2219 1 3328 3329 + 2220 1 3328 3330 + 2221 1 3331 3332 + 2222 1 3331 3333 + 2223 1 3334 3335 + 2224 1 3334 3336 + 2225 1 3337 3338 + 2226 1 3337 3339 + 2227 1 3340 3341 + 2228 1 3340 3342 + 2229 1 3343 3344 + 2230 1 3343 3345 + 2231 1 3346 3347 + 2232 1 3346 3348 + 2233 1 3349 3350 + 2234 1 3349 3351 + 2235 1 3352 3353 + 2236 1 3352 3354 + 2237 1 3355 3356 + 2238 1 3355 3357 + 2239 1 3358 3359 + 2240 1 3358 3360 + 2241 1 3361 3362 + 2242 1 3361 3363 + 2243 1 3364 3365 + 2244 1 3364 3366 + 2245 1 3367 3368 + 2246 1 3367 3369 + 2247 1 3370 3371 + 2248 1 3370 3372 + 2249 1 3373 3374 + 2250 1 3373 3375 + 2251 1 3376 3377 + 2252 1 3376 3378 + 2253 1 3379 3380 + 2254 1 3379 3381 + 2255 1 3382 3383 + 2256 1 3382 3384 + 2257 1 3385 3386 + 2258 1 3385 3387 + 2259 1 3388 3389 + 2260 1 3388 3390 + 2261 1 3391 3392 + 2262 1 3391 3393 + 2263 1 3394 3395 + 2264 1 3394 3396 + 2265 1 3397 3398 + 2266 1 3397 3399 + 2267 1 3400 3401 + 2268 1 3400 3402 + 2269 1 3403 3404 + 2270 1 3403 3405 + 2271 1 3406 3407 + 2272 1 3406 3408 + 2273 1 3409 3410 + 2274 1 3409 3411 + 2275 1 3412 3413 + 2276 1 3412 3414 + 2277 1 3415 3416 + 2278 1 3415 3417 + 2279 1 3418 3419 + 2280 1 3418 3420 + 2281 1 3421 3422 + 2282 1 3421 3423 + 2283 1 3424 3425 + 2284 1 3424 3426 + 2285 1 3427 3428 + 2286 1 3427 3429 + 2287 1 3430 3431 + 2288 1 3430 3432 + 2289 1 3433 3434 + 2290 1 3433 3435 + 2291 1 3436 3437 + 2292 1 3436 3438 + 2293 1 3439 3440 + 2294 1 3439 3441 + 2295 1 3442 3443 + 2296 1 3442 3444 + 2297 1 3445 3446 + 2298 1 3445 3447 + 2299 1 3448 3449 + 2300 1 3448 3450 + 2301 1 3451 3452 + 2302 1 3451 3453 + 2303 1 3454 3455 + 2304 1 3454 3456 + 2305 1 3457 3458 + 2306 1 3457 3459 + 2307 1 3460 3461 + 2308 1 3460 3462 + 2309 1 3463 3464 + 2310 1 3463 3465 + 2311 1 3466 3467 + 2312 1 3466 3468 + 2313 1 3469 3470 + 2314 1 3469 3471 + 2315 1 3472 3473 + 2316 1 3472 3474 + 2317 1 3475 3476 + 2318 1 3475 3477 + 2319 1 3478 3479 + 2320 1 3478 3480 + 2321 1 3481 3482 + 2322 1 3481 3483 + 2323 1 3484 3485 + 2324 1 3484 3486 + 2325 1 3487 3488 + 2326 1 3487 3489 + 2327 1 3490 3491 + 2328 1 3490 3492 + 2329 1 3493 3494 + 2330 1 3493 3495 + 2331 1 3496 3497 + 2332 1 3496 3498 + 2333 1 3499 3500 + 2334 1 3499 3501 + 2335 1 3502 3503 + 2336 1 3502 3504 + 2337 1 3505 3506 + 2338 1 3505 3507 + 2339 1 3508 3509 + 2340 1 3508 3510 + 2341 1 3511 3512 + 2342 1 3511 3513 + 2343 1 3514 3515 + 2344 1 3514 3516 + 2345 1 3517 3518 + 2346 1 3517 3519 + 2347 1 3520 3521 + 2348 1 3520 3522 + 2349 1 3523 3524 + 2350 1 3523 3525 + 2351 1 3526 3527 + 2352 1 3526 3528 + 2353 1 3529 3530 + 2354 1 3529 3531 + 2355 1 3532 3533 + 2356 1 3532 3534 + 2357 1 3535 3536 + 2358 1 3535 3537 + 2359 1 3538 3539 + 2360 1 3538 3540 + 2361 1 3541 3542 + 2362 1 3541 3543 + 2363 1 3544 3545 + 2364 1 3544 3546 + 2365 1 3547 3548 + 2366 1 3547 3549 + 2367 1 3550 3551 + 2368 1 3550 3552 + 2369 1 3553 3554 + 2370 1 3553 3555 + 2371 1 3556 3557 + 2372 1 3556 3558 + 2373 1 3559 3560 + 2374 1 3559 3561 + 2375 1 3562 3563 + 2376 1 3562 3564 + 2377 1 3565 3566 + 2378 1 3565 3567 + 2379 1 3568 3569 + 2380 1 3568 3570 + 2381 1 3571 3572 + 2382 1 3571 3573 + 2383 1 3574 3575 + 2384 1 3574 3576 + 2385 1 3577 3578 + 2386 1 3577 3579 + 2387 1 3580 3581 + 2388 1 3580 3582 + 2389 1 3583 3584 + 2390 1 3583 3585 + 2391 1 3586 3587 + 2392 1 3586 3588 + 2393 1 3589 3590 + 2394 1 3589 3591 + 2395 1 3592 3593 + 2396 1 3592 3594 + 2397 1 3595 3596 + 2398 1 3595 3597 + 2399 1 3598 3599 + 2400 1 3598 3600 + 2401 1 3601 3602 + 2402 1 3601 3603 + 2403 1 3604 3605 + 2404 1 3604 3606 + 2405 1 3607 3608 + 2406 1 3607 3609 + 2407 1 3610 3611 + 2408 1 3610 3612 + 2409 1 3613 3614 + 2410 1 3613 3615 + 2411 1 3616 3617 + 2412 1 3616 3618 + 2413 1 3619 3620 + 2414 1 3619 3621 + 2415 1 3622 3623 + 2416 1 3622 3624 + 2417 1 3625 3626 + 2418 1 3625 3627 + 2419 1 3628 3629 + 2420 1 3628 3630 + 2421 1 3631 3632 + 2422 1 3631 3633 + 2423 1 3634 3635 + 2424 1 3634 3636 + 2425 1 3637 3638 + 2426 1 3637 3639 + 2427 1 3640 3641 + 2428 1 3640 3642 + 2429 1 3643 3644 + 2430 1 3643 3645 + 2431 1 3646 3647 + 2432 1 3646 3648 + 2433 1 3649 3650 + 2434 1 3649 3651 + 2435 1 3652 3653 + 2436 1 3652 3654 + 2437 1 3655 3656 + 2438 1 3655 3657 + 2439 1 3658 3659 + 2440 1 3658 3660 + 2441 1 3661 3662 + 2442 1 3661 3663 + 2443 1 3664 3665 + 2444 1 3664 3666 + 2445 1 3667 3668 + 2446 1 3667 3669 + 2447 1 3670 3671 + 2448 1 3670 3672 + 2449 1 3673 3674 + 2450 1 3673 3675 + 2451 1 3676 3677 + 2452 1 3676 3678 + 2453 1 3679 3680 + 2454 1 3679 3681 + 2455 1 3682 3683 + 2456 1 3682 3684 + 2457 1 3685 3686 + 2458 1 3685 3687 + 2459 1 3688 3689 + 2460 1 3688 3690 + 2461 1 3691 3692 + 2462 1 3691 3693 + 2463 1 3694 3695 + 2464 1 3694 3696 + 2465 1 3697 3698 + 2466 1 3697 3699 + 2467 1 3700 3701 + 2468 1 3700 3702 + 2469 1 3703 3704 + 2470 1 3703 3705 + 2471 1 3706 3707 + 2472 1 3706 3708 + 2473 1 3709 3710 + 2474 1 3709 3711 + 2475 1 3712 3713 + 2476 1 3712 3714 + 2477 1 3715 3716 + 2478 1 3715 3717 + 2479 1 3718 3719 + 2480 1 3718 3720 + 2481 1 3721 3722 + 2482 1 3721 3723 + 2483 1 3724 3725 + 2484 1 3724 3726 + 2485 1 3727 3728 + 2486 1 3727 3729 + 2487 1 3730 3731 + 2488 1 3730 3732 + 2489 1 3733 3734 + 2490 1 3733 3735 + 2491 1 3736 3737 + 2492 1 3736 3738 + 2493 1 3739 3740 + 2494 1 3739 3741 + 2495 1 3742 3743 + 2496 1 3742 3744 + 2497 1 3745 3746 + 2498 1 3745 3747 + 2499 1 3748 3749 + 2500 1 3748 3750 + 2501 1 3751 3752 + 2502 1 3751 3753 + 2503 1 3754 3755 + 2504 1 3754 3756 + 2505 1 3757 3758 + 2506 1 3757 3759 + 2507 1 3760 3761 + 2508 1 3760 3762 + 2509 1 3763 3764 + 2510 1 3763 3765 + 2511 1 3766 3767 + 2512 1 3766 3768 + 2513 1 3769 3770 + 2514 1 3769 3771 + 2515 1 3772 3773 + 2516 1 3772 3774 + 2517 1 3775 3776 + 2518 1 3775 3777 + 2519 1 3778 3779 + 2520 1 3778 3780 + 2521 1 3781 3782 + 2522 1 3781 3783 + 2523 1 3784 3785 + 2524 1 3784 3786 + 2525 1 3787 3788 + 2526 1 3787 3789 + 2527 1 3790 3791 + 2528 1 3790 3792 + 2529 1 3793 3794 + 2530 1 3793 3795 + 2531 1 3796 3797 + 2532 1 3796 3798 + 2533 1 3799 3800 + 2534 1 3799 3801 + 2535 1 3802 3803 + 2536 1 3802 3804 + 2537 1 3805 3806 + 2538 1 3805 3807 + 2539 1 3808 3809 + 2540 1 3808 3810 + 2541 1 3811 3812 + 2542 1 3811 3813 + 2543 1 3814 3815 + 2544 1 3814 3816 + 2545 1 3817 3818 + 2546 1 3817 3819 + 2547 1 3820 3821 + 2548 1 3820 3822 + 2549 1 3823 3824 + 2550 1 3823 3825 + 2551 1 3826 3827 + 2552 1 3826 3828 + 2553 1 3829 3830 + 2554 1 3829 3831 + 2555 1 3832 3833 + 2556 1 3832 3834 + 2557 1 3835 3836 + 2558 1 3835 3837 + 2559 1 3838 3839 + 2560 1 3838 3840 + 2561 1 3841 3842 + 2562 1 3841 3843 + 2563 1 3844 3845 + 2564 1 3844 3846 + 2565 1 3847 3848 + 2566 1 3847 3849 + 2567 1 3850 3851 + 2568 1 3850 3852 + 2569 1 3853 3854 + 2570 1 3853 3855 + 2571 1 3856 3857 + 2572 1 3856 3858 + 2573 1 3859 3860 + 2574 1 3859 3861 + 2575 1 3862 3863 + 2576 1 3862 3864 + 2577 1 3865 3866 + 2578 1 3865 3867 + 2579 1 3868 3869 + 2580 1 3868 3870 + 2581 1 3871 3872 + 2582 1 3871 3873 + 2583 1 3874 3875 + 2584 1 3874 3876 + 2585 1 3877 3878 + 2586 1 3877 3879 + 2587 1 3880 3881 + 2588 1 3880 3882 + 2589 1 3883 3884 + 2590 1 3883 3885 + 2591 1 3886 3887 + 2592 1 3886 3888 + 2593 1 3889 3890 + 2594 1 3889 3891 + 2595 1 3892 3893 + 2596 1 3892 3894 + 2597 1 3895 3896 + 2598 1 3895 3897 + 2599 1 3898 3899 + 2600 1 3898 3900 + 2601 1 3901 3902 + 2602 1 3901 3903 + 2603 1 3904 3905 + 2604 1 3904 3906 + 2605 1 3907 3908 + 2606 1 3907 3909 + 2607 1 3910 3911 + 2608 1 3910 3912 + 2609 1 3913 3914 + 2610 1 3913 3915 + 2611 1 3916 3917 + 2612 1 3916 3918 + 2613 1 3919 3920 + 2614 1 3919 3921 + 2615 1 3922 3923 + 2616 1 3922 3924 + 2617 1 3925 3926 + 2618 1 3925 3927 + 2619 1 3928 3929 + 2620 1 3928 3930 + 2621 1 3931 3932 + 2622 1 3931 3933 + 2623 1 3934 3935 + 2624 1 3934 3936 + 2625 1 3937 3938 + 2626 1 3937 3939 + 2627 1 3940 3941 + 2628 1 3940 3942 + 2629 1 3943 3944 + 2630 1 3943 3945 + 2631 1 3946 3947 + 2632 1 3946 3948 + 2633 1 3949 3950 + 2634 1 3949 3951 + 2635 1 3952 3953 + 2636 1 3952 3954 + 2637 1 3955 3956 + 2638 1 3955 3957 + 2639 1 3958 3959 + 2640 1 3958 3960 + 2641 1 3961 3962 + 2642 1 3961 3963 + 2643 1 3964 3965 + 2644 1 3964 3966 + 2645 1 3967 3968 + 2646 1 3967 3969 + 2647 1 3970 3971 + 2648 1 3970 3972 + 2649 1 3973 3974 + 2650 1 3973 3975 + 2651 1 3976 3977 + 2652 1 3976 3978 + 2653 1 3979 3980 + 2654 1 3979 3981 + 2655 1 3982 3983 + 2656 1 3982 3984 + 2657 1 3985 3986 + 2658 1 3985 3987 + 2659 1 3988 3989 + 2660 1 3988 3990 + 2661 1 3991 3992 + 2662 1 3991 3993 + 2663 1 3994 3995 + 2664 1 3994 3996 + 2665 1 3997 3998 + 2666 1 3997 3999 + 2667 1 4000 4001 + 2668 1 4000 4002 + 2669 1 4003 4004 + 2670 1 4003 4005 + 2671 1 4006 4007 + 2672 1 4006 4008 + 2673 1 4009 4010 + 2674 1 4009 4011 + 2675 1 4012 4013 + 2676 1 4012 4014 + 2677 1 4015 4016 + 2678 1 4015 4017 + 2679 1 4018 4019 + 2680 1 4018 4020 + 2681 1 4021 4022 + 2682 1 4021 4023 + 2683 1 4024 4025 + 2684 1 4024 4026 + 2685 1 4027 4028 + 2686 1 4027 4029 + 2687 1 4030 4031 + 2688 1 4030 4032 + 2689 1 4033 4034 + 2690 1 4033 4035 + 2691 1 4036 4037 + 2692 1 4036 4038 + 2693 1 4039 4040 + 2694 1 4039 4041 + 2695 1 4042 4043 + 2696 1 4042 4044 + 2697 1 4045 4046 + 2698 1 4045 4047 + 2699 1 4048 4049 + 2700 1 4048 4050 + 2701 1 4051 4052 + 2702 1 4051 4053 + 2703 1 4054 4055 + 2704 1 4054 4056 + 2705 1 4057 4058 + 2706 1 4057 4059 + 2707 1 4060 4061 + 2708 1 4060 4062 + 2709 1 4063 4064 + 2710 1 4063 4065 + 2711 1 4066 4067 + 2712 1 4066 4068 + 2713 1 4069 4070 + 2714 1 4069 4071 + 2715 1 4072 4073 + 2716 1 4072 4074 + 2717 1 4075 4076 + 2718 1 4075 4077 + 2719 1 4078 4079 + 2720 1 4078 4080 + 2721 1 4081 4082 + 2722 1 4081 4083 + 2723 1 4084 4085 + 2724 1 4084 4086 + 2725 1 4087 4088 + 2726 1 4087 4089 + 2727 1 4090 4091 + 2728 1 4090 4092 + 2729 1 4093 4094 + 2730 1 4093 4095 + 2731 1 4096 4097 + 2732 1 4096 4098 + 2733 1 4099 4100 + 2734 1 4099 4101 + 2735 1 4102 4103 + 2736 1 4102 4104 + 2737 1 4105 4106 + 2738 1 4105 4107 + 2739 1 4108 4109 + 2740 1 4108 4110 + 2741 1 4111 4112 + 2742 1 4111 4113 + 2743 1 4114 4115 + 2744 1 4114 4116 + 2745 1 4117 4118 + 2746 1 4117 4119 + 2747 1 4120 4121 + 2748 1 4120 4122 + 2749 1 4123 4124 + 2750 1 4123 4125 + 2751 1 4126 4127 + 2752 1 4126 4128 + 2753 1 4129 4130 + 2754 1 4129 4131 + 2755 1 4132 4133 + 2756 1 4132 4134 + 2757 1 4135 4136 + 2758 1 4135 4137 + 2759 1 4138 4139 + 2760 1 4138 4140 + 2761 1 4141 4142 + 2762 1 4141 4143 + 2763 1 4144 4145 + 2764 1 4144 4146 + 2765 1 4147 4148 + 2766 1 4147 4149 + 2767 1 4150 4151 + 2768 1 4150 4152 + 2769 1 4153 4154 + 2770 1 4153 4155 + 2771 1 4156 4157 + 2772 1 4156 4158 + 2773 1 4159 4160 + 2774 1 4159 4161 + 2775 1 4162 4163 + 2776 1 4162 4164 + 2777 1 4165 4166 + 2778 1 4165 4167 + 2779 1 4168 4169 + 2780 1 4168 4170 + 2781 1 4171 4172 + 2782 1 4171 4173 + 2783 1 4174 4175 + 2784 1 4174 4176 + 2785 1 4177 4178 + 2786 1 4177 4179 + 2787 1 4180 4181 + 2788 1 4180 4182 + 2789 1 4183 4184 + 2790 1 4183 4185 + 2791 1 4186 4187 + 2792 1 4186 4188 + 2793 1 4189 4190 + 2794 1 4189 4191 + 2795 1 4192 4193 + 2796 1 4192 4194 + 2797 1 4195 4196 + 2798 1 4195 4197 + 2799 1 4198 4199 + 2800 1 4198 4200 + 2801 1 4201 4202 + 2802 1 4201 4203 + 2803 1 4204 4205 + 2804 1 4204 4206 + 2805 1 4207 4208 + 2806 1 4207 4209 + 2807 1 4210 4211 + 2808 1 4210 4212 + 2809 1 4213 4214 + 2810 1 4213 4215 + 2811 1 4216 4217 + 2812 1 4216 4218 + 2813 1 4219 4220 + 2814 1 4219 4221 + 2815 1 4222 4223 + 2816 1 4222 4224 + 2817 1 4225 4226 + 2818 1 4225 4227 + 2819 1 4228 4229 + 2820 1 4228 4230 + 2821 1 4231 4232 + 2822 1 4231 4233 + 2823 1 4234 4235 + 2824 1 4234 4236 + 2825 1 4237 4238 + 2826 1 4237 4239 + 2827 1 4240 4241 + 2828 1 4240 4242 + 2829 1 4243 4244 + 2830 1 4243 4245 + 2831 1 4246 4247 + 2832 1 4246 4248 + 2833 1 4249 4250 + 2834 1 4249 4251 + 2835 1 4252 4253 + 2836 1 4252 4254 + 2837 1 4255 4256 + 2838 1 4255 4257 + 2839 1 4258 4259 + 2840 1 4258 4260 + 2841 1 4261 4262 + 2842 1 4261 4263 + 2843 1 4264 4265 + 2844 1 4264 4266 + 2845 1 4267 4268 + 2846 1 4267 4269 + 2847 1 4270 4271 + 2848 1 4270 4272 + 2849 1 4273 4274 + 2850 1 4273 4275 + 2851 1 4276 4277 + 2852 1 4276 4278 + 2853 1 4279 4280 + 2854 1 4279 4281 + 2855 1 4282 4283 + 2856 1 4282 4284 + 2857 1 4285 4286 + 2858 1 4285 4287 + 2859 1 4288 4289 + 2860 1 4288 4290 + 2861 1 4291 4292 + 2862 1 4291 4293 + 2863 1 4294 4295 + 2864 1 4294 4296 + 2865 1 4297 4298 + 2866 1 4297 4299 + 2867 1 4300 4301 + 2868 1 4300 4302 + 2869 1 4303 4304 + 2870 1 4303 4305 + 2871 1 4306 4307 + 2872 1 4306 4308 + 2873 1 4309 4310 + 2874 1 4309 4311 + 2875 1 4312 4313 + 2876 1 4312 4314 + 2877 1 4315 4316 + 2878 1 4315 4317 + 2879 1 4318 4319 + 2880 1 4318 4320 + 2881 1 4321 4322 + 2882 1 4321 4323 + 2883 1 4324 4325 + 2884 1 4324 4326 + 2885 1 4327 4328 + 2886 1 4327 4329 + 2887 1 4330 4331 + 2888 1 4330 4332 + 2889 1 4333 4334 + 2890 1 4333 4335 + 2891 1 4336 4337 + 2892 1 4336 4338 + 2893 1 4339 4340 + 2894 1 4339 4341 + 2895 1 4342 4343 + 2896 1 4342 4344 + 2897 1 4345 4346 + 2898 1 4345 4347 + 2899 1 4348 4349 + 2900 1 4348 4350 + 2901 1 4351 4352 + 2902 1 4351 4353 + 2903 1 4354 4355 + 2904 1 4354 4356 + 2905 1 4357 4358 + 2906 1 4357 4359 + 2907 1 4360 4361 + 2908 1 4360 4362 + 2909 1 4363 4364 + 2910 1 4363 4365 + 2911 1 4366 4367 + 2912 1 4366 4368 + 2913 1 4369 4370 + 2914 1 4369 4371 + 2915 1 4372 4373 + 2916 1 4372 4374 + 2917 1 4375 4376 + 2918 1 4375 4377 + 2919 1 4378 4379 + 2920 1 4378 4380 + 2921 1 4381 4382 + 2922 1 4381 4383 + 2923 1 4384 4385 + 2924 1 4384 4386 + 2925 1 4387 4388 + 2926 1 4387 4389 + 2927 1 4390 4391 + 2928 1 4390 4392 + 2929 1 4393 4394 + 2930 1 4393 4395 + 2931 1 4396 4397 + 2932 1 4396 4398 + 2933 1 4399 4400 + 2934 1 4399 4401 + 2935 1 4402 4403 + 2936 1 4402 4404 + 2937 1 4405 4406 + 2938 1 4405 4407 + 2939 1 4408 4409 + 2940 1 4408 4410 + 2941 1 4411 4412 + 2942 1 4411 4413 + 2943 1 4414 4415 + 2944 1 4414 4416 + 2945 1 4417 4418 + 2946 1 4417 4419 + 2947 1 4420 4421 + 2948 1 4420 4422 + 2949 1 4423 4424 + 2950 1 4423 4425 + 2951 1 4426 4427 + 2952 1 4426 4428 + 2953 1 4429 4430 + 2954 1 4429 4431 + 2955 1 4432 4433 + 2956 1 4432 4434 + 2957 1 4435 4436 + 2958 1 4435 4437 + 2959 1 4438 4439 + 2960 1 4438 4440 + 2961 1 4441 4442 + 2962 1 4441 4443 + 2963 1 4444 4445 + 2964 1 4444 4446 + 2965 1 4447 4448 + 2966 1 4447 4449 + 2967 1 4450 4451 + 2968 1 4450 4452 + 2969 1 4453 4454 + 2970 1 4453 4455 + 2971 1 4456 4457 + 2972 1 4456 4458 + 2973 1 4459 4460 + 2974 1 4459 4461 + 2975 1 4462 4463 + 2976 1 4462 4464 + 2977 1 4465 4466 + 2978 1 4465 4467 + 2979 1 4468 4469 + 2980 1 4468 4470 + 2981 1 4471 4472 + 2982 1 4471 4473 + 2983 1 4474 4475 + 2984 1 4474 4476 + 2985 1 4477 4478 + 2986 1 4477 4479 + 2987 1 4480 4481 + 2988 1 4480 4482 + 2989 1 4483 4484 + 2990 1 4483 4485 + 2991 1 4486 4487 + 2992 1 4486 4488 + 2993 1 4489 4490 + 2994 1 4489 4491 + 2995 1 4492 4493 + 2996 1 4492 4494 + 2997 1 4495 4496 + 2998 1 4495 4497 + 2999 1 4498 4499 + 3000 1 4498 4500 + +Angles + + 1 1 2 1 3 + 2 1 5 4 6 + 3 1 8 7 9 + 4 1 11 10 12 + 5 1 14 13 15 + 6 1 17 16 18 + 7 1 20 19 21 + 8 1 23 22 24 + 9 1 26 25 27 + 10 1 29 28 30 + 11 1 32 31 33 + 12 1 35 34 36 + 13 1 38 37 39 + 14 1 41 40 42 + 15 1 44 43 45 + 16 1 47 46 48 + 17 1 50 49 51 + 18 1 53 52 54 + 19 1 56 55 57 + 20 1 59 58 60 + 21 1 62 61 63 + 22 1 65 64 66 + 23 1 68 67 69 + 24 1 71 70 72 + 25 1 74 73 75 + 26 1 77 76 78 + 27 1 80 79 81 + 28 1 83 82 84 + 29 1 86 85 87 + 30 1 89 88 90 + 31 1 92 91 93 + 32 1 95 94 96 + 33 1 98 97 99 + 34 1 101 100 102 + 35 1 104 103 105 + 36 1 107 106 108 + 37 1 110 109 111 + 38 1 113 112 114 + 39 1 116 115 117 + 40 1 119 118 120 + 41 1 122 121 123 + 42 1 125 124 126 + 43 1 128 127 129 + 44 1 131 130 132 + 45 1 134 133 135 + 46 1 137 136 138 + 47 1 140 139 141 + 48 1 143 142 144 + 49 1 146 145 147 + 50 1 149 148 150 + 51 1 152 151 153 + 52 1 155 154 156 + 53 1 158 157 159 + 54 1 161 160 162 + 55 1 164 163 165 + 56 1 167 166 168 + 57 1 170 169 171 + 58 1 173 172 174 + 59 1 176 175 177 + 60 1 179 178 180 + 61 1 182 181 183 + 62 1 185 184 186 + 63 1 188 187 189 + 64 1 191 190 192 + 65 1 194 193 195 + 66 1 197 196 198 + 67 1 200 199 201 + 68 1 203 202 204 + 69 1 206 205 207 + 70 1 209 208 210 + 71 1 212 211 213 + 72 1 215 214 216 + 73 1 218 217 219 + 74 1 221 220 222 + 75 1 224 223 225 + 76 1 227 226 228 + 77 1 230 229 231 + 78 1 233 232 234 + 79 1 236 235 237 + 80 1 239 238 240 + 81 1 242 241 243 + 82 1 245 244 246 + 83 1 248 247 249 + 84 1 251 250 252 + 85 1 254 253 255 + 86 1 257 256 258 + 87 1 260 259 261 + 88 1 263 262 264 + 89 1 266 265 267 + 90 1 269 268 270 + 91 1 272 271 273 + 92 1 275 274 276 + 93 1 278 277 279 + 94 1 281 280 282 + 95 1 284 283 285 + 96 1 287 286 288 + 97 1 290 289 291 + 98 1 293 292 294 + 99 1 296 295 297 + 100 1 299 298 300 + 101 1 302 301 303 + 102 1 305 304 306 + 103 1 308 307 309 + 104 1 311 310 312 + 105 1 314 313 315 + 106 1 317 316 318 + 107 1 320 319 321 + 108 1 323 322 324 + 109 1 326 325 327 + 110 1 329 328 330 + 111 1 332 331 333 + 112 1 335 334 336 + 113 1 338 337 339 + 114 1 341 340 342 + 115 1 344 343 345 + 116 1 347 346 348 + 117 1 350 349 351 + 118 1 353 352 354 + 119 1 356 355 357 + 120 1 359 358 360 + 121 1 362 361 363 + 122 1 365 364 366 + 123 1 368 367 369 + 124 1 371 370 372 + 125 1 374 373 375 + 126 1 377 376 378 + 127 1 380 379 381 + 128 1 383 382 384 + 129 1 386 385 387 + 130 1 389 388 390 + 131 1 392 391 393 + 132 1 395 394 396 + 133 1 398 397 399 + 134 1 401 400 402 + 135 1 404 403 405 + 136 1 407 406 408 + 137 1 410 409 411 + 138 1 413 412 414 + 139 1 416 415 417 + 140 1 419 418 420 + 141 1 422 421 423 + 142 1 425 424 426 + 143 1 428 427 429 + 144 1 431 430 432 + 145 1 434 433 435 + 146 1 437 436 438 + 147 1 440 439 441 + 148 1 443 442 444 + 149 1 446 445 447 + 150 1 449 448 450 + 151 1 452 451 453 + 152 1 455 454 456 + 153 1 458 457 459 + 154 1 461 460 462 + 155 1 464 463 465 + 156 1 467 466 468 + 157 1 470 469 471 + 158 1 473 472 474 + 159 1 476 475 477 + 160 1 479 478 480 + 161 1 482 481 483 + 162 1 485 484 486 + 163 1 488 487 489 + 164 1 491 490 492 + 165 1 494 493 495 + 166 1 497 496 498 + 167 1 500 499 501 + 168 1 503 502 504 + 169 1 506 505 507 + 170 1 509 508 510 + 171 1 512 511 513 + 172 1 515 514 516 + 173 1 518 517 519 + 174 1 521 520 522 + 175 1 524 523 525 + 176 1 527 526 528 + 177 1 530 529 531 + 178 1 533 532 534 + 179 1 536 535 537 + 180 1 539 538 540 + 181 1 542 541 543 + 182 1 545 544 546 + 183 1 548 547 549 + 184 1 551 550 552 + 185 1 554 553 555 + 186 1 557 556 558 + 187 1 560 559 561 + 188 1 563 562 564 + 189 1 566 565 567 + 190 1 569 568 570 + 191 1 572 571 573 + 192 1 575 574 576 + 193 1 578 577 579 + 194 1 581 580 582 + 195 1 584 583 585 + 196 1 587 586 588 + 197 1 590 589 591 + 198 1 593 592 594 + 199 1 596 595 597 + 200 1 599 598 600 + 201 1 602 601 603 + 202 1 605 604 606 + 203 1 608 607 609 + 204 1 611 610 612 + 205 1 614 613 615 + 206 1 617 616 618 + 207 1 620 619 621 + 208 1 623 622 624 + 209 1 626 625 627 + 210 1 629 628 630 + 211 1 632 631 633 + 212 1 635 634 636 + 213 1 638 637 639 + 214 1 641 640 642 + 215 1 644 643 645 + 216 1 647 646 648 + 217 1 650 649 651 + 218 1 653 652 654 + 219 1 656 655 657 + 220 1 659 658 660 + 221 1 662 661 663 + 222 1 665 664 666 + 223 1 668 667 669 + 224 1 671 670 672 + 225 1 674 673 675 + 226 1 677 676 678 + 227 1 680 679 681 + 228 1 683 682 684 + 229 1 686 685 687 + 230 1 689 688 690 + 231 1 692 691 693 + 232 1 695 694 696 + 233 1 698 697 699 + 234 1 701 700 702 + 235 1 704 703 705 + 236 1 707 706 708 + 237 1 710 709 711 + 238 1 713 712 714 + 239 1 716 715 717 + 240 1 719 718 720 + 241 1 722 721 723 + 242 1 725 724 726 + 243 1 728 727 729 + 244 1 731 730 732 + 245 1 734 733 735 + 246 1 737 736 738 + 247 1 740 739 741 + 248 1 743 742 744 + 249 1 746 745 747 + 250 1 749 748 750 + 251 1 752 751 753 + 252 1 755 754 756 + 253 1 758 757 759 + 254 1 761 760 762 + 255 1 764 763 765 + 256 1 767 766 768 + 257 1 770 769 771 + 258 1 773 772 774 + 259 1 776 775 777 + 260 1 779 778 780 + 261 1 782 781 783 + 262 1 785 784 786 + 263 1 788 787 789 + 264 1 791 790 792 + 265 1 794 793 795 + 266 1 797 796 798 + 267 1 800 799 801 + 268 1 803 802 804 + 269 1 806 805 807 + 270 1 809 808 810 + 271 1 812 811 813 + 272 1 815 814 816 + 273 1 818 817 819 + 274 1 821 820 822 + 275 1 824 823 825 + 276 1 827 826 828 + 277 1 830 829 831 + 278 1 833 832 834 + 279 1 836 835 837 + 280 1 839 838 840 + 281 1 842 841 843 + 282 1 845 844 846 + 283 1 848 847 849 + 284 1 851 850 852 + 285 1 854 853 855 + 286 1 857 856 858 + 287 1 860 859 861 + 288 1 863 862 864 + 289 1 866 865 867 + 290 1 869 868 870 + 291 1 872 871 873 + 292 1 875 874 876 + 293 1 878 877 879 + 294 1 881 880 882 + 295 1 884 883 885 + 296 1 887 886 888 + 297 1 890 889 891 + 298 1 893 892 894 + 299 1 896 895 897 + 300 1 899 898 900 + 301 1 902 901 903 + 302 1 905 904 906 + 303 1 908 907 909 + 304 1 911 910 912 + 305 1 914 913 915 + 306 1 917 916 918 + 307 1 920 919 921 + 308 1 923 922 924 + 309 1 926 925 927 + 310 1 929 928 930 + 311 1 932 931 933 + 312 1 935 934 936 + 313 1 938 937 939 + 314 1 941 940 942 + 315 1 944 943 945 + 316 1 947 946 948 + 317 1 950 949 951 + 318 1 953 952 954 + 319 1 956 955 957 + 320 1 959 958 960 + 321 1 962 961 963 + 322 1 965 964 966 + 323 1 968 967 969 + 324 1 971 970 972 + 325 1 974 973 975 + 326 1 977 976 978 + 327 1 980 979 981 + 328 1 983 982 984 + 329 1 986 985 987 + 330 1 989 988 990 + 331 1 992 991 993 + 332 1 995 994 996 + 333 1 998 997 999 + 334 1 1001 1000 1002 + 335 1 1004 1003 1005 + 336 1 1007 1006 1008 + 337 1 1010 1009 1011 + 338 1 1013 1012 1014 + 339 1 1016 1015 1017 + 340 1 1019 1018 1020 + 341 1 1022 1021 1023 + 342 1 1025 1024 1026 + 343 1 1028 1027 1029 + 344 1 1031 1030 1032 + 345 1 1034 1033 1035 + 346 1 1037 1036 1038 + 347 1 1040 1039 1041 + 348 1 1043 1042 1044 + 349 1 1046 1045 1047 + 350 1 1049 1048 1050 + 351 1 1052 1051 1053 + 352 1 1055 1054 1056 + 353 1 1058 1057 1059 + 354 1 1061 1060 1062 + 355 1 1064 1063 1065 + 356 1 1067 1066 1068 + 357 1 1070 1069 1071 + 358 1 1073 1072 1074 + 359 1 1076 1075 1077 + 360 1 1079 1078 1080 + 361 1 1082 1081 1083 + 362 1 1085 1084 1086 + 363 1 1088 1087 1089 + 364 1 1091 1090 1092 + 365 1 1094 1093 1095 + 366 1 1097 1096 1098 + 367 1 1100 1099 1101 + 368 1 1103 1102 1104 + 369 1 1106 1105 1107 + 370 1 1109 1108 1110 + 371 1 1112 1111 1113 + 372 1 1115 1114 1116 + 373 1 1118 1117 1119 + 374 1 1121 1120 1122 + 375 1 1124 1123 1125 + 376 1 1127 1126 1128 + 377 1 1130 1129 1131 + 378 1 1133 1132 1134 + 379 1 1136 1135 1137 + 380 1 1139 1138 1140 + 381 1 1142 1141 1143 + 382 1 1145 1144 1146 + 383 1 1148 1147 1149 + 384 1 1151 1150 1152 + 385 1 1154 1153 1155 + 386 1 1157 1156 1158 + 387 1 1160 1159 1161 + 388 1 1163 1162 1164 + 389 1 1166 1165 1167 + 390 1 1169 1168 1170 + 391 1 1172 1171 1173 + 392 1 1175 1174 1176 + 393 1 1178 1177 1179 + 394 1 1181 1180 1182 + 395 1 1184 1183 1185 + 396 1 1187 1186 1188 + 397 1 1190 1189 1191 + 398 1 1193 1192 1194 + 399 1 1196 1195 1197 + 400 1 1199 1198 1200 + 401 1 1202 1201 1203 + 402 1 1205 1204 1206 + 403 1 1208 1207 1209 + 404 1 1211 1210 1212 + 405 1 1214 1213 1215 + 406 1 1217 1216 1218 + 407 1 1220 1219 1221 + 408 1 1223 1222 1224 + 409 1 1226 1225 1227 + 410 1 1229 1228 1230 + 411 1 1232 1231 1233 + 412 1 1235 1234 1236 + 413 1 1238 1237 1239 + 414 1 1241 1240 1242 + 415 1 1244 1243 1245 + 416 1 1247 1246 1248 + 417 1 1250 1249 1251 + 418 1 1253 1252 1254 + 419 1 1256 1255 1257 + 420 1 1259 1258 1260 + 421 1 1262 1261 1263 + 422 1 1265 1264 1266 + 423 1 1268 1267 1269 + 424 1 1271 1270 1272 + 425 1 1274 1273 1275 + 426 1 1277 1276 1278 + 427 1 1280 1279 1281 + 428 1 1283 1282 1284 + 429 1 1286 1285 1287 + 430 1 1289 1288 1290 + 431 1 1292 1291 1293 + 432 1 1295 1294 1296 + 433 1 1298 1297 1299 + 434 1 1301 1300 1302 + 435 1 1304 1303 1305 + 436 1 1307 1306 1308 + 437 1 1310 1309 1311 + 438 1 1313 1312 1314 + 439 1 1316 1315 1317 + 440 1 1319 1318 1320 + 441 1 1322 1321 1323 + 442 1 1325 1324 1326 + 443 1 1328 1327 1329 + 444 1 1331 1330 1332 + 445 1 1334 1333 1335 + 446 1 1337 1336 1338 + 447 1 1340 1339 1341 + 448 1 1343 1342 1344 + 449 1 1346 1345 1347 + 450 1 1349 1348 1350 + 451 1 1352 1351 1353 + 452 1 1355 1354 1356 + 453 1 1358 1357 1359 + 454 1 1361 1360 1362 + 455 1 1364 1363 1365 + 456 1 1367 1366 1368 + 457 1 1370 1369 1371 + 458 1 1373 1372 1374 + 459 1 1376 1375 1377 + 460 1 1379 1378 1380 + 461 1 1382 1381 1383 + 462 1 1385 1384 1386 + 463 1 1388 1387 1389 + 464 1 1391 1390 1392 + 465 1 1394 1393 1395 + 466 1 1397 1396 1398 + 467 1 1400 1399 1401 + 468 1 1403 1402 1404 + 469 1 1406 1405 1407 + 470 1 1409 1408 1410 + 471 1 1412 1411 1413 + 472 1 1415 1414 1416 + 473 1 1418 1417 1419 + 474 1 1421 1420 1422 + 475 1 1424 1423 1425 + 476 1 1427 1426 1428 + 477 1 1430 1429 1431 + 478 1 1433 1432 1434 + 479 1 1436 1435 1437 + 480 1 1439 1438 1440 + 481 1 1442 1441 1443 + 482 1 1445 1444 1446 + 483 1 1448 1447 1449 + 484 1 1451 1450 1452 + 485 1 1454 1453 1455 + 486 1 1457 1456 1458 + 487 1 1460 1459 1461 + 488 1 1463 1462 1464 + 489 1 1466 1465 1467 + 490 1 1469 1468 1470 + 491 1 1472 1471 1473 + 492 1 1475 1474 1476 + 493 1 1478 1477 1479 + 494 1 1481 1480 1482 + 495 1 1484 1483 1485 + 496 1 1487 1486 1488 + 497 1 1490 1489 1491 + 498 1 1493 1492 1494 + 499 1 1496 1495 1497 + 500 1 1499 1498 1500 + 501 1 1502 1501 1503 + 502 1 1505 1504 1506 + 503 1 1508 1507 1509 + 504 1 1511 1510 1512 + 505 1 1514 1513 1515 + 506 1 1517 1516 1518 + 507 1 1520 1519 1521 + 508 1 1523 1522 1524 + 509 1 1526 1525 1527 + 510 1 1529 1528 1530 + 511 1 1532 1531 1533 + 512 1 1535 1534 1536 + 513 1 1538 1537 1539 + 514 1 1541 1540 1542 + 515 1 1544 1543 1545 + 516 1 1547 1546 1548 + 517 1 1550 1549 1551 + 518 1 1553 1552 1554 + 519 1 1556 1555 1557 + 520 1 1559 1558 1560 + 521 1 1562 1561 1563 + 522 1 1565 1564 1566 + 523 1 1568 1567 1569 + 524 1 1571 1570 1572 + 525 1 1574 1573 1575 + 526 1 1577 1576 1578 + 527 1 1580 1579 1581 + 528 1 1583 1582 1584 + 529 1 1586 1585 1587 + 530 1 1589 1588 1590 + 531 1 1592 1591 1593 + 532 1 1595 1594 1596 + 533 1 1598 1597 1599 + 534 1 1601 1600 1602 + 535 1 1604 1603 1605 + 536 1 1607 1606 1608 + 537 1 1610 1609 1611 + 538 1 1613 1612 1614 + 539 1 1616 1615 1617 + 540 1 1619 1618 1620 + 541 1 1622 1621 1623 + 542 1 1625 1624 1626 + 543 1 1628 1627 1629 + 544 1 1631 1630 1632 + 545 1 1634 1633 1635 + 546 1 1637 1636 1638 + 547 1 1640 1639 1641 + 548 1 1643 1642 1644 + 549 1 1646 1645 1647 + 550 1 1649 1648 1650 + 551 1 1652 1651 1653 + 552 1 1655 1654 1656 + 553 1 1658 1657 1659 + 554 1 1661 1660 1662 + 555 1 1664 1663 1665 + 556 1 1667 1666 1668 + 557 1 1670 1669 1671 + 558 1 1673 1672 1674 + 559 1 1676 1675 1677 + 560 1 1679 1678 1680 + 561 1 1682 1681 1683 + 562 1 1685 1684 1686 + 563 1 1688 1687 1689 + 564 1 1691 1690 1692 + 565 1 1694 1693 1695 + 566 1 1697 1696 1698 + 567 1 1700 1699 1701 + 568 1 1703 1702 1704 + 569 1 1706 1705 1707 + 570 1 1709 1708 1710 + 571 1 1712 1711 1713 + 572 1 1715 1714 1716 + 573 1 1718 1717 1719 + 574 1 1721 1720 1722 + 575 1 1724 1723 1725 + 576 1 1727 1726 1728 + 577 1 1730 1729 1731 + 578 1 1733 1732 1734 + 579 1 1736 1735 1737 + 580 1 1739 1738 1740 + 581 1 1742 1741 1743 + 582 1 1745 1744 1746 + 583 1 1748 1747 1749 + 584 1 1751 1750 1752 + 585 1 1754 1753 1755 + 586 1 1757 1756 1758 + 587 1 1760 1759 1761 + 588 1 1763 1762 1764 + 589 1 1766 1765 1767 + 590 1 1769 1768 1770 + 591 1 1772 1771 1773 + 592 1 1775 1774 1776 + 593 1 1778 1777 1779 + 594 1 1781 1780 1782 + 595 1 1784 1783 1785 + 596 1 1787 1786 1788 + 597 1 1790 1789 1791 + 598 1 1793 1792 1794 + 599 1 1796 1795 1797 + 600 1 1799 1798 1800 + 601 1 1802 1801 1803 + 602 1 1805 1804 1806 + 603 1 1808 1807 1809 + 604 1 1811 1810 1812 + 605 1 1814 1813 1815 + 606 1 1817 1816 1818 + 607 1 1820 1819 1821 + 608 1 1823 1822 1824 + 609 1 1826 1825 1827 + 610 1 1829 1828 1830 + 611 1 1832 1831 1833 + 612 1 1835 1834 1836 + 613 1 1838 1837 1839 + 614 1 1841 1840 1842 + 615 1 1844 1843 1845 + 616 1 1847 1846 1848 + 617 1 1850 1849 1851 + 618 1 1853 1852 1854 + 619 1 1856 1855 1857 + 620 1 1859 1858 1860 + 621 1 1862 1861 1863 + 622 1 1865 1864 1866 + 623 1 1868 1867 1869 + 624 1 1871 1870 1872 + 625 1 1874 1873 1875 + 626 1 1877 1876 1878 + 627 1 1880 1879 1881 + 628 1 1883 1882 1884 + 629 1 1886 1885 1887 + 630 1 1889 1888 1890 + 631 1 1892 1891 1893 + 632 1 1895 1894 1896 + 633 1 1898 1897 1899 + 634 1 1901 1900 1902 + 635 1 1904 1903 1905 + 636 1 1907 1906 1908 + 637 1 1910 1909 1911 + 638 1 1913 1912 1914 + 639 1 1916 1915 1917 + 640 1 1919 1918 1920 + 641 1 1922 1921 1923 + 642 1 1925 1924 1926 + 643 1 1928 1927 1929 + 644 1 1931 1930 1932 + 645 1 1934 1933 1935 + 646 1 1937 1936 1938 + 647 1 1940 1939 1941 + 648 1 1943 1942 1944 + 649 1 1946 1945 1947 + 650 1 1949 1948 1950 + 651 1 1952 1951 1953 + 652 1 1955 1954 1956 + 653 1 1958 1957 1959 + 654 1 1961 1960 1962 + 655 1 1964 1963 1965 + 656 1 1967 1966 1968 + 657 1 1970 1969 1971 + 658 1 1973 1972 1974 + 659 1 1976 1975 1977 + 660 1 1979 1978 1980 + 661 1 1982 1981 1983 + 662 1 1985 1984 1986 + 663 1 1988 1987 1989 + 664 1 1991 1990 1992 + 665 1 1994 1993 1995 + 666 1 1997 1996 1998 + 667 1 2000 1999 2001 + 668 1 2003 2002 2004 + 669 1 2006 2005 2007 + 670 1 2009 2008 2010 + 671 1 2012 2011 2013 + 672 1 2015 2014 2016 + 673 1 2018 2017 2019 + 674 1 2021 2020 2022 + 675 1 2024 2023 2025 + 676 1 2027 2026 2028 + 677 1 2030 2029 2031 + 678 1 2033 2032 2034 + 679 1 2036 2035 2037 + 680 1 2039 2038 2040 + 681 1 2042 2041 2043 + 682 1 2045 2044 2046 + 683 1 2048 2047 2049 + 684 1 2051 2050 2052 + 685 1 2054 2053 2055 + 686 1 2057 2056 2058 + 687 1 2060 2059 2061 + 688 1 2063 2062 2064 + 689 1 2066 2065 2067 + 690 1 2069 2068 2070 + 691 1 2072 2071 2073 + 692 1 2075 2074 2076 + 693 1 2078 2077 2079 + 694 1 2081 2080 2082 + 695 1 2084 2083 2085 + 696 1 2087 2086 2088 + 697 1 2090 2089 2091 + 698 1 2093 2092 2094 + 699 1 2096 2095 2097 + 700 1 2099 2098 2100 + 701 1 2102 2101 2103 + 702 1 2105 2104 2106 + 703 1 2108 2107 2109 + 704 1 2111 2110 2112 + 705 1 2114 2113 2115 + 706 1 2117 2116 2118 + 707 1 2120 2119 2121 + 708 1 2123 2122 2124 + 709 1 2126 2125 2127 + 710 1 2129 2128 2130 + 711 1 2132 2131 2133 + 712 1 2135 2134 2136 + 713 1 2138 2137 2139 + 714 1 2141 2140 2142 + 715 1 2144 2143 2145 + 716 1 2147 2146 2148 + 717 1 2150 2149 2151 + 718 1 2153 2152 2154 + 719 1 2156 2155 2157 + 720 1 2159 2158 2160 + 721 1 2162 2161 2163 + 722 1 2165 2164 2166 + 723 1 2168 2167 2169 + 724 1 2171 2170 2172 + 725 1 2174 2173 2175 + 726 1 2177 2176 2178 + 727 1 2180 2179 2181 + 728 1 2183 2182 2184 + 729 1 2186 2185 2187 + 730 1 2189 2188 2190 + 731 1 2192 2191 2193 + 732 1 2195 2194 2196 + 733 1 2198 2197 2199 + 734 1 2201 2200 2202 + 735 1 2204 2203 2205 + 736 1 2207 2206 2208 + 737 1 2210 2209 2211 + 738 1 2213 2212 2214 + 739 1 2216 2215 2217 + 740 1 2219 2218 2220 + 741 1 2222 2221 2223 + 742 1 2225 2224 2226 + 743 1 2228 2227 2229 + 744 1 2231 2230 2232 + 745 1 2234 2233 2235 + 746 1 2237 2236 2238 + 747 1 2240 2239 2241 + 748 1 2243 2242 2244 + 749 1 2246 2245 2247 + 750 1 2249 2248 2250 + 751 1 2252 2251 2253 + 752 1 2255 2254 2256 + 753 1 2258 2257 2259 + 754 1 2261 2260 2262 + 755 1 2264 2263 2265 + 756 1 2267 2266 2268 + 757 1 2270 2269 2271 + 758 1 2273 2272 2274 + 759 1 2276 2275 2277 + 760 1 2279 2278 2280 + 761 1 2282 2281 2283 + 762 1 2285 2284 2286 + 763 1 2288 2287 2289 + 764 1 2291 2290 2292 + 765 1 2294 2293 2295 + 766 1 2297 2296 2298 + 767 1 2300 2299 2301 + 768 1 2303 2302 2304 + 769 1 2306 2305 2307 + 770 1 2309 2308 2310 + 771 1 2312 2311 2313 + 772 1 2315 2314 2316 + 773 1 2318 2317 2319 + 774 1 2321 2320 2322 + 775 1 2324 2323 2325 + 776 1 2327 2326 2328 + 777 1 2330 2329 2331 + 778 1 2333 2332 2334 + 779 1 2336 2335 2337 + 780 1 2339 2338 2340 + 781 1 2342 2341 2343 + 782 1 2345 2344 2346 + 783 1 2348 2347 2349 + 784 1 2351 2350 2352 + 785 1 2354 2353 2355 + 786 1 2357 2356 2358 + 787 1 2360 2359 2361 + 788 1 2363 2362 2364 + 789 1 2366 2365 2367 + 790 1 2369 2368 2370 + 791 1 2372 2371 2373 + 792 1 2375 2374 2376 + 793 1 2378 2377 2379 + 794 1 2381 2380 2382 + 795 1 2384 2383 2385 + 796 1 2387 2386 2388 + 797 1 2390 2389 2391 + 798 1 2393 2392 2394 + 799 1 2396 2395 2397 + 800 1 2399 2398 2400 + 801 1 2402 2401 2403 + 802 1 2405 2404 2406 + 803 1 2408 2407 2409 + 804 1 2411 2410 2412 + 805 1 2414 2413 2415 + 806 1 2417 2416 2418 + 807 1 2420 2419 2421 + 808 1 2423 2422 2424 + 809 1 2426 2425 2427 + 810 1 2429 2428 2430 + 811 1 2432 2431 2433 + 812 1 2435 2434 2436 + 813 1 2438 2437 2439 + 814 1 2441 2440 2442 + 815 1 2444 2443 2445 + 816 1 2447 2446 2448 + 817 1 2450 2449 2451 + 818 1 2453 2452 2454 + 819 1 2456 2455 2457 + 820 1 2459 2458 2460 + 821 1 2462 2461 2463 + 822 1 2465 2464 2466 + 823 1 2468 2467 2469 + 824 1 2471 2470 2472 + 825 1 2474 2473 2475 + 826 1 2477 2476 2478 + 827 1 2480 2479 2481 + 828 1 2483 2482 2484 + 829 1 2486 2485 2487 + 830 1 2489 2488 2490 + 831 1 2492 2491 2493 + 832 1 2495 2494 2496 + 833 1 2498 2497 2499 + 834 1 2501 2500 2502 + 835 1 2504 2503 2505 + 836 1 2507 2506 2508 + 837 1 2510 2509 2511 + 838 1 2513 2512 2514 + 839 1 2516 2515 2517 + 840 1 2519 2518 2520 + 841 1 2522 2521 2523 + 842 1 2525 2524 2526 + 843 1 2528 2527 2529 + 844 1 2531 2530 2532 + 845 1 2534 2533 2535 + 846 1 2537 2536 2538 + 847 1 2540 2539 2541 + 848 1 2543 2542 2544 + 849 1 2546 2545 2547 + 850 1 2549 2548 2550 + 851 1 2552 2551 2553 + 852 1 2555 2554 2556 + 853 1 2558 2557 2559 + 854 1 2561 2560 2562 + 855 1 2564 2563 2565 + 856 1 2567 2566 2568 + 857 1 2570 2569 2571 + 858 1 2573 2572 2574 + 859 1 2576 2575 2577 + 860 1 2579 2578 2580 + 861 1 2582 2581 2583 + 862 1 2585 2584 2586 + 863 1 2588 2587 2589 + 864 1 2591 2590 2592 + 865 1 2594 2593 2595 + 866 1 2597 2596 2598 + 867 1 2600 2599 2601 + 868 1 2603 2602 2604 + 869 1 2606 2605 2607 + 870 1 2609 2608 2610 + 871 1 2612 2611 2613 + 872 1 2615 2614 2616 + 873 1 2618 2617 2619 + 874 1 2621 2620 2622 + 875 1 2624 2623 2625 + 876 1 2627 2626 2628 + 877 1 2630 2629 2631 + 878 1 2633 2632 2634 + 879 1 2636 2635 2637 + 880 1 2639 2638 2640 + 881 1 2642 2641 2643 + 882 1 2645 2644 2646 + 883 1 2648 2647 2649 + 884 1 2651 2650 2652 + 885 1 2654 2653 2655 + 886 1 2657 2656 2658 + 887 1 2660 2659 2661 + 888 1 2663 2662 2664 + 889 1 2666 2665 2667 + 890 1 2669 2668 2670 + 891 1 2672 2671 2673 + 892 1 2675 2674 2676 + 893 1 2678 2677 2679 + 894 1 2681 2680 2682 + 895 1 2684 2683 2685 + 896 1 2687 2686 2688 + 897 1 2690 2689 2691 + 898 1 2693 2692 2694 + 899 1 2696 2695 2697 + 900 1 2699 2698 2700 + 901 1 2702 2701 2703 + 902 1 2705 2704 2706 + 903 1 2708 2707 2709 + 904 1 2711 2710 2712 + 905 1 2714 2713 2715 + 906 1 2717 2716 2718 + 907 1 2720 2719 2721 + 908 1 2723 2722 2724 + 909 1 2726 2725 2727 + 910 1 2729 2728 2730 + 911 1 2732 2731 2733 + 912 1 2735 2734 2736 + 913 1 2738 2737 2739 + 914 1 2741 2740 2742 + 915 1 2744 2743 2745 + 916 1 2747 2746 2748 + 917 1 2750 2749 2751 + 918 1 2753 2752 2754 + 919 1 2756 2755 2757 + 920 1 2759 2758 2760 + 921 1 2762 2761 2763 + 922 1 2765 2764 2766 + 923 1 2768 2767 2769 + 924 1 2771 2770 2772 + 925 1 2774 2773 2775 + 926 1 2777 2776 2778 + 927 1 2780 2779 2781 + 928 1 2783 2782 2784 + 929 1 2786 2785 2787 + 930 1 2789 2788 2790 + 931 1 2792 2791 2793 + 932 1 2795 2794 2796 + 933 1 2798 2797 2799 + 934 1 2801 2800 2802 + 935 1 2804 2803 2805 + 936 1 2807 2806 2808 + 937 1 2810 2809 2811 + 938 1 2813 2812 2814 + 939 1 2816 2815 2817 + 940 1 2819 2818 2820 + 941 1 2822 2821 2823 + 942 1 2825 2824 2826 + 943 1 2828 2827 2829 + 944 1 2831 2830 2832 + 945 1 2834 2833 2835 + 946 1 2837 2836 2838 + 947 1 2840 2839 2841 + 948 1 2843 2842 2844 + 949 1 2846 2845 2847 + 950 1 2849 2848 2850 + 951 1 2852 2851 2853 + 952 1 2855 2854 2856 + 953 1 2858 2857 2859 + 954 1 2861 2860 2862 + 955 1 2864 2863 2865 + 956 1 2867 2866 2868 + 957 1 2870 2869 2871 + 958 1 2873 2872 2874 + 959 1 2876 2875 2877 + 960 1 2879 2878 2880 + 961 1 2882 2881 2883 + 962 1 2885 2884 2886 + 963 1 2888 2887 2889 + 964 1 2891 2890 2892 + 965 1 2894 2893 2895 + 966 1 2897 2896 2898 + 967 1 2900 2899 2901 + 968 1 2903 2902 2904 + 969 1 2906 2905 2907 + 970 1 2909 2908 2910 + 971 1 2912 2911 2913 + 972 1 2915 2914 2916 + 973 1 2918 2917 2919 + 974 1 2921 2920 2922 + 975 1 2924 2923 2925 + 976 1 2927 2926 2928 + 977 1 2930 2929 2931 + 978 1 2933 2932 2934 + 979 1 2936 2935 2937 + 980 1 2939 2938 2940 + 981 1 2942 2941 2943 + 982 1 2945 2944 2946 + 983 1 2948 2947 2949 + 984 1 2951 2950 2952 + 985 1 2954 2953 2955 + 986 1 2957 2956 2958 + 987 1 2960 2959 2961 + 988 1 2963 2962 2964 + 989 1 2966 2965 2967 + 990 1 2969 2968 2970 + 991 1 2972 2971 2973 + 992 1 2975 2974 2976 + 993 1 2978 2977 2979 + 994 1 2981 2980 2982 + 995 1 2984 2983 2985 + 996 1 2987 2986 2988 + 997 1 2990 2989 2991 + 998 1 2993 2992 2994 + 999 1 2996 2995 2997 + 1000 1 2999 2998 3000 + 1001 1 3002 3001 3003 + 1002 1 3005 3004 3006 + 1003 1 3008 3007 3009 + 1004 1 3011 3010 3012 + 1005 1 3014 3013 3015 + 1006 1 3017 3016 3018 + 1007 1 3020 3019 3021 + 1008 1 3023 3022 3024 + 1009 1 3026 3025 3027 + 1010 1 3029 3028 3030 + 1011 1 3032 3031 3033 + 1012 1 3035 3034 3036 + 1013 1 3038 3037 3039 + 1014 1 3041 3040 3042 + 1015 1 3044 3043 3045 + 1016 1 3047 3046 3048 + 1017 1 3050 3049 3051 + 1018 1 3053 3052 3054 + 1019 1 3056 3055 3057 + 1020 1 3059 3058 3060 + 1021 1 3062 3061 3063 + 1022 1 3065 3064 3066 + 1023 1 3068 3067 3069 + 1024 1 3071 3070 3072 + 1025 1 3074 3073 3075 + 1026 1 3077 3076 3078 + 1027 1 3080 3079 3081 + 1028 1 3083 3082 3084 + 1029 1 3086 3085 3087 + 1030 1 3089 3088 3090 + 1031 1 3092 3091 3093 + 1032 1 3095 3094 3096 + 1033 1 3098 3097 3099 + 1034 1 3101 3100 3102 + 1035 1 3104 3103 3105 + 1036 1 3107 3106 3108 + 1037 1 3110 3109 3111 + 1038 1 3113 3112 3114 + 1039 1 3116 3115 3117 + 1040 1 3119 3118 3120 + 1041 1 3122 3121 3123 + 1042 1 3125 3124 3126 + 1043 1 3128 3127 3129 + 1044 1 3131 3130 3132 + 1045 1 3134 3133 3135 + 1046 1 3137 3136 3138 + 1047 1 3140 3139 3141 + 1048 1 3143 3142 3144 + 1049 1 3146 3145 3147 + 1050 1 3149 3148 3150 + 1051 1 3152 3151 3153 + 1052 1 3155 3154 3156 + 1053 1 3158 3157 3159 + 1054 1 3161 3160 3162 + 1055 1 3164 3163 3165 + 1056 1 3167 3166 3168 + 1057 1 3170 3169 3171 + 1058 1 3173 3172 3174 + 1059 1 3176 3175 3177 + 1060 1 3179 3178 3180 + 1061 1 3182 3181 3183 + 1062 1 3185 3184 3186 + 1063 1 3188 3187 3189 + 1064 1 3191 3190 3192 + 1065 1 3194 3193 3195 + 1066 1 3197 3196 3198 + 1067 1 3200 3199 3201 + 1068 1 3203 3202 3204 + 1069 1 3206 3205 3207 + 1070 1 3209 3208 3210 + 1071 1 3212 3211 3213 + 1072 1 3215 3214 3216 + 1073 1 3218 3217 3219 + 1074 1 3221 3220 3222 + 1075 1 3224 3223 3225 + 1076 1 3227 3226 3228 + 1077 1 3230 3229 3231 + 1078 1 3233 3232 3234 + 1079 1 3236 3235 3237 + 1080 1 3239 3238 3240 + 1081 1 3242 3241 3243 + 1082 1 3245 3244 3246 + 1083 1 3248 3247 3249 + 1084 1 3251 3250 3252 + 1085 1 3254 3253 3255 + 1086 1 3257 3256 3258 + 1087 1 3260 3259 3261 + 1088 1 3263 3262 3264 + 1089 1 3266 3265 3267 + 1090 1 3269 3268 3270 + 1091 1 3272 3271 3273 + 1092 1 3275 3274 3276 + 1093 1 3278 3277 3279 + 1094 1 3281 3280 3282 + 1095 1 3284 3283 3285 + 1096 1 3287 3286 3288 + 1097 1 3290 3289 3291 + 1098 1 3293 3292 3294 + 1099 1 3296 3295 3297 + 1100 1 3299 3298 3300 + 1101 1 3302 3301 3303 + 1102 1 3305 3304 3306 + 1103 1 3308 3307 3309 + 1104 1 3311 3310 3312 + 1105 1 3314 3313 3315 + 1106 1 3317 3316 3318 + 1107 1 3320 3319 3321 + 1108 1 3323 3322 3324 + 1109 1 3326 3325 3327 + 1110 1 3329 3328 3330 + 1111 1 3332 3331 3333 + 1112 1 3335 3334 3336 + 1113 1 3338 3337 3339 + 1114 1 3341 3340 3342 + 1115 1 3344 3343 3345 + 1116 1 3347 3346 3348 + 1117 1 3350 3349 3351 + 1118 1 3353 3352 3354 + 1119 1 3356 3355 3357 + 1120 1 3359 3358 3360 + 1121 1 3362 3361 3363 + 1122 1 3365 3364 3366 + 1123 1 3368 3367 3369 + 1124 1 3371 3370 3372 + 1125 1 3374 3373 3375 + 1126 1 3377 3376 3378 + 1127 1 3380 3379 3381 + 1128 1 3383 3382 3384 + 1129 1 3386 3385 3387 + 1130 1 3389 3388 3390 + 1131 1 3392 3391 3393 + 1132 1 3395 3394 3396 + 1133 1 3398 3397 3399 + 1134 1 3401 3400 3402 + 1135 1 3404 3403 3405 + 1136 1 3407 3406 3408 + 1137 1 3410 3409 3411 + 1138 1 3413 3412 3414 + 1139 1 3416 3415 3417 + 1140 1 3419 3418 3420 + 1141 1 3422 3421 3423 + 1142 1 3425 3424 3426 + 1143 1 3428 3427 3429 + 1144 1 3431 3430 3432 + 1145 1 3434 3433 3435 + 1146 1 3437 3436 3438 + 1147 1 3440 3439 3441 + 1148 1 3443 3442 3444 + 1149 1 3446 3445 3447 + 1150 1 3449 3448 3450 + 1151 1 3452 3451 3453 + 1152 1 3455 3454 3456 + 1153 1 3458 3457 3459 + 1154 1 3461 3460 3462 + 1155 1 3464 3463 3465 + 1156 1 3467 3466 3468 + 1157 1 3470 3469 3471 + 1158 1 3473 3472 3474 + 1159 1 3476 3475 3477 + 1160 1 3479 3478 3480 + 1161 1 3482 3481 3483 + 1162 1 3485 3484 3486 + 1163 1 3488 3487 3489 + 1164 1 3491 3490 3492 + 1165 1 3494 3493 3495 + 1166 1 3497 3496 3498 + 1167 1 3500 3499 3501 + 1168 1 3503 3502 3504 + 1169 1 3506 3505 3507 + 1170 1 3509 3508 3510 + 1171 1 3512 3511 3513 + 1172 1 3515 3514 3516 + 1173 1 3518 3517 3519 + 1174 1 3521 3520 3522 + 1175 1 3524 3523 3525 + 1176 1 3527 3526 3528 + 1177 1 3530 3529 3531 + 1178 1 3533 3532 3534 + 1179 1 3536 3535 3537 + 1180 1 3539 3538 3540 + 1181 1 3542 3541 3543 + 1182 1 3545 3544 3546 + 1183 1 3548 3547 3549 + 1184 1 3551 3550 3552 + 1185 1 3554 3553 3555 + 1186 1 3557 3556 3558 + 1187 1 3560 3559 3561 + 1188 1 3563 3562 3564 + 1189 1 3566 3565 3567 + 1190 1 3569 3568 3570 + 1191 1 3572 3571 3573 + 1192 1 3575 3574 3576 + 1193 1 3578 3577 3579 + 1194 1 3581 3580 3582 + 1195 1 3584 3583 3585 + 1196 1 3587 3586 3588 + 1197 1 3590 3589 3591 + 1198 1 3593 3592 3594 + 1199 1 3596 3595 3597 + 1200 1 3599 3598 3600 + 1201 1 3602 3601 3603 + 1202 1 3605 3604 3606 + 1203 1 3608 3607 3609 + 1204 1 3611 3610 3612 + 1205 1 3614 3613 3615 + 1206 1 3617 3616 3618 + 1207 1 3620 3619 3621 + 1208 1 3623 3622 3624 + 1209 1 3626 3625 3627 + 1210 1 3629 3628 3630 + 1211 1 3632 3631 3633 + 1212 1 3635 3634 3636 + 1213 1 3638 3637 3639 + 1214 1 3641 3640 3642 + 1215 1 3644 3643 3645 + 1216 1 3647 3646 3648 + 1217 1 3650 3649 3651 + 1218 1 3653 3652 3654 + 1219 1 3656 3655 3657 + 1220 1 3659 3658 3660 + 1221 1 3662 3661 3663 + 1222 1 3665 3664 3666 + 1223 1 3668 3667 3669 + 1224 1 3671 3670 3672 + 1225 1 3674 3673 3675 + 1226 1 3677 3676 3678 + 1227 1 3680 3679 3681 + 1228 1 3683 3682 3684 + 1229 1 3686 3685 3687 + 1230 1 3689 3688 3690 + 1231 1 3692 3691 3693 + 1232 1 3695 3694 3696 + 1233 1 3698 3697 3699 + 1234 1 3701 3700 3702 + 1235 1 3704 3703 3705 + 1236 1 3707 3706 3708 + 1237 1 3710 3709 3711 + 1238 1 3713 3712 3714 + 1239 1 3716 3715 3717 + 1240 1 3719 3718 3720 + 1241 1 3722 3721 3723 + 1242 1 3725 3724 3726 + 1243 1 3728 3727 3729 + 1244 1 3731 3730 3732 + 1245 1 3734 3733 3735 + 1246 1 3737 3736 3738 + 1247 1 3740 3739 3741 + 1248 1 3743 3742 3744 + 1249 1 3746 3745 3747 + 1250 1 3749 3748 3750 + 1251 1 3752 3751 3753 + 1252 1 3755 3754 3756 + 1253 1 3758 3757 3759 + 1254 1 3761 3760 3762 + 1255 1 3764 3763 3765 + 1256 1 3767 3766 3768 + 1257 1 3770 3769 3771 + 1258 1 3773 3772 3774 + 1259 1 3776 3775 3777 + 1260 1 3779 3778 3780 + 1261 1 3782 3781 3783 + 1262 1 3785 3784 3786 + 1263 1 3788 3787 3789 + 1264 1 3791 3790 3792 + 1265 1 3794 3793 3795 + 1266 1 3797 3796 3798 + 1267 1 3800 3799 3801 + 1268 1 3803 3802 3804 + 1269 1 3806 3805 3807 + 1270 1 3809 3808 3810 + 1271 1 3812 3811 3813 + 1272 1 3815 3814 3816 + 1273 1 3818 3817 3819 + 1274 1 3821 3820 3822 + 1275 1 3824 3823 3825 + 1276 1 3827 3826 3828 + 1277 1 3830 3829 3831 + 1278 1 3833 3832 3834 + 1279 1 3836 3835 3837 + 1280 1 3839 3838 3840 + 1281 1 3842 3841 3843 + 1282 1 3845 3844 3846 + 1283 1 3848 3847 3849 + 1284 1 3851 3850 3852 + 1285 1 3854 3853 3855 + 1286 1 3857 3856 3858 + 1287 1 3860 3859 3861 + 1288 1 3863 3862 3864 + 1289 1 3866 3865 3867 + 1290 1 3869 3868 3870 + 1291 1 3872 3871 3873 + 1292 1 3875 3874 3876 + 1293 1 3878 3877 3879 + 1294 1 3881 3880 3882 + 1295 1 3884 3883 3885 + 1296 1 3887 3886 3888 + 1297 1 3890 3889 3891 + 1298 1 3893 3892 3894 + 1299 1 3896 3895 3897 + 1300 1 3899 3898 3900 + 1301 1 3902 3901 3903 + 1302 1 3905 3904 3906 + 1303 1 3908 3907 3909 + 1304 1 3911 3910 3912 + 1305 1 3914 3913 3915 + 1306 1 3917 3916 3918 + 1307 1 3920 3919 3921 + 1308 1 3923 3922 3924 + 1309 1 3926 3925 3927 + 1310 1 3929 3928 3930 + 1311 1 3932 3931 3933 + 1312 1 3935 3934 3936 + 1313 1 3938 3937 3939 + 1314 1 3941 3940 3942 + 1315 1 3944 3943 3945 + 1316 1 3947 3946 3948 + 1317 1 3950 3949 3951 + 1318 1 3953 3952 3954 + 1319 1 3956 3955 3957 + 1320 1 3959 3958 3960 + 1321 1 3962 3961 3963 + 1322 1 3965 3964 3966 + 1323 1 3968 3967 3969 + 1324 1 3971 3970 3972 + 1325 1 3974 3973 3975 + 1326 1 3977 3976 3978 + 1327 1 3980 3979 3981 + 1328 1 3983 3982 3984 + 1329 1 3986 3985 3987 + 1330 1 3989 3988 3990 + 1331 1 3992 3991 3993 + 1332 1 3995 3994 3996 + 1333 1 3998 3997 3999 + 1334 1 4001 4000 4002 + 1335 1 4004 4003 4005 + 1336 1 4007 4006 4008 + 1337 1 4010 4009 4011 + 1338 1 4013 4012 4014 + 1339 1 4016 4015 4017 + 1340 1 4019 4018 4020 + 1341 1 4022 4021 4023 + 1342 1 4025 4024 4026 + 1343 1 4028 4027 4029 + 1344 1 4031 4030 4032 + 1345 1 4034 4033 4035 + 1346 1 4037 4036 4038 + 1347 1 4040 4039 4041 + 1348 1 4043 4042 4044 + 1349 1 4046 4045 4047 + 1350 1 4049 4048 4050 + 1351 1 4052 4051 4053 + 1352 1 4055 4054 4056 + 1353 1 4058 4057 4059 + 1354 1 4061 4060 4062 + 1355 1 4064 4063 4065 + 1356 1 4067 4066 4068 + 1357 1 4070 4069 4071 + 1358 1 4073 4072 4074 + 1359 1 4076 4075 4077 + 1360 1 4079 4078 4080 + 1361 1 4082 4081 4083 + 1362 1 4085 4084 4086 + 1363 1 4088 4087 4089 + 1364 1 4091 4090 4092 + 1365 1 4094 4093 4095 + 1366 1 4097 4096 4098 + 1367 1 4100 4099 4101 + 1368 1 4103 4102 4104 + 1369 1 4106 4105 4107 + 1370 1 4109 4108 4110 + 1371 1 4112 4111 4113 + 1372 1 4115 4114 4116 + 1373 1 4118 4117 4119 + 1374 1 4121 4120 4122 + 1375 1 4124 4123 4125 + 1376 1 4127 4126 4128 + 1377 1 4130 4129 4131 + 1378 1 4133 4132 4134 + 1379 1 4136 4135 4137 + 1380 1 4139 4138 4140 + 1381 1 4142 4141 4143 + 1382 1 4145 4144 4146 + 1383 1 4148 4147 4149 + 1384 1 4151 4150 4152 + 1385 1 4154 4153 4155 + 1386 1 4157 4156 4158 + 1387 1 4160 4159 4161 + 1388 1 4163 4162 4164 + 1389 1 4166 4165 4167 + 1390 1 4169 4168 4170 + 1391 1 4172 4171 4173 + 1392 1 4175 4174 4176 + 1393 1 4178 4177 4179 + 1394 1 4181 4180 4182 + 1395 1 4184 4183 4185 + 1396 1 4187 4186 4188 + 1397 1 4190 4189 4191 + 1398 1 4193 4192 4194 + 1399 1 4196 4195 4197 + 1400 1 4199 4198 4200 + 1401 1 4202 4201 4203 + 1402 1 4205 4204 4206 + 1403 1 4208 4207 4209 + 1404 1 4211 4210 4212 + 1405 1 4214 4213 4215 + 1406 1 4217 4216 4218 + 1407 1 4220 4219 4221 + 1408 1 4223 4222 4224 + 1409 1 4226 4225 4227 + 1410 1 4229 4228 4230 + 1411 1 4232 4231 4233 + 1412 1 4235 4234 4236 + 1413 1 4238 4237 4239 + 1414 1 4241 4240 4242 + 1415 1 4244 4243 4245 + 1416 1 4247 4246 4248 + 1417 1 4250 4249 4251 + 1418 1 4253 4252 4254 + 1419 1 4256 4255 4257 + 1420 1 4259 4258 4260 + 1421 1 4262 4261 4263 + 1422 1 4265 4264 4266 + 1423 1 4268 4267 4269 + 1424 1 4271 4270 4272 + 1425 1 4274 4273 4275 + 1426 1 4277 4276 4278 + 1427 1 4280 4279 4281 + 1428 1 4283 4282 4284 + 1429 1 4286 4285 4287 + 1430 1 4289 4288 4290 + 1431 1 4292 4291 4293 + 1432 1 4295 4294 4296 + 1433 1 4298 4297 4299 + 1434 1 4301 4300 4302 + 1435 1 4304 4303 4305 + 1436 1 4307 4306 4308 + 1437 1 4310 4309 4311 + 1438 1 4313 4312 4314 + 1439 1 4316 4315 4317 + 1440 1 4319 4318 4320 + 1441 1 4322 4321 4323 + 1442 1 4325 4324 4326 + 1443 1 4328 4327 4329 + 1444 1 4331 4330 4332 + 1445 1 4334 4333 4335 + 1446 1 4337 4336 4338 + 1447 1 4340 4339 4341 + 1448 1 4343 4342 4344 + 1449 1 4346 4345 4347 + 1450 1 4349 4348 4350 + 1451 1 4352 4351 4353 + 1452 1 4355 4354 4356 + 1453 1 4358 4357 4359 + 1454 1 4361 4360 4362 + 1455 1 4364 4363 4365 + 1456 1 4367 4366 4368 + 1457 1 4370 4369 4371 + 1458 1 4373 4372 4374 + 1459 1 4376 4375 4377 + 1460 1 4379 4378 4380 + 1461 1 4382 4381 4383 + 1462 1 4385 4384 4386 + 1463 1 4388 4387 4389 + 1464 1 4391 4390 4392 + 1465 1 4394 4393 4395 + 1466 1 4397 4396 4398 + 1467 1 4400 4399 4401 + 1468 1 4403 4402 4404 + 1469 1 4406 4405 4407 + 1470 1 4409 4408 4410 + 1471 1 4412 4411 4413 + 1472 1 4415 4414 4416 + 1473 1 4418 4417 4419 + 1474 1 4421 4420 4422 + 1475 1 4424 4423 4425 + 1476 1 4427 4426 4428 + 1477 1 4430 4429 4431 + 1478 1 4433 4432 4434 + 1479 1 4436 4435 4437 + 1480 1 4439 4438 4440 + 1481 1 4442 4441 4443 + 1482 1 4445 4444 4446 + 1483 1 4448 4447 4449 + 1484 1 4451 4450 4452 + 1485 1 4454 4453 4455 + 1486 1 4457 4456 4458 + 1487 1 4460 4459 4461 + 1488 1 4463 4462 4464 + 1489 1 4466 4465 4467 + 1490 1 4469 4468 4470 + 1491 1 4472 4471 4473 + 1492 1 4475 4474 4476 + 1493 1 4478 4477 4479 + 1494 1 4481 4480 4482 + 1495 1 4484 4483 4485 + 1496 1 4487 4486 4488 + 1497 1 4490 4489 4491 + 1498 1 4493 4492 4494 + 1499 1 4496 4495 4497 + 1500 1 4499 4498 4500 diff --git a/examples/python/in.pair_python_coulomb b/examples/python/in.pair_python_coulomb new file mode 100644 index 0000000000..87a8fa69ce --- /dev/null +++ b/examples/python/in.pair_python_coulomb @@ -0,0 +1,45 @@ +units real +atom_style full + +read_data data.spce + +pair_style hybrid/overlay python 12.0 coul/long 12.0 +kspace_style pppm 1.0e-6 + +pair_coeff * * coul/long +pair_coeff * * python potentials.LJCutSPCE OW NULL + +pair_modify table 0 + +bond_style harmonic +angle_style harmonic +dihedral_style none +improper_style none + +bond_coeff 1 1000.00 1.000 +angle_coeff 1 100.0 109.47 + +special_bonds lj/coul 0.0 0.0 1.0 + +neighbor 2.0 bin + +fix 1 all shake 0.0001 20 0 b 1 a 1 +fix 2 all nvt temp 300.0 300.0 100.0 + +# create combined lj/coul table for all atom types +# generate tabulated potential from python variant +pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW -0.8472 -0.8472 +pair_write 1 2 2000 rsq 0.1 12 spce.table OW-HW -0.8472 0.4236 +pair_write 2 2 2000 rsq 0.1 12 spce.table HW-HW 0.4236 0.4236 + +# switch to tabulated potential +pair_style table linear 2000 pppm +pair_coeff 1 1 spce.table OW-OW +pair_coeff 1 2 spce.table OW-HW +pair_coeff 2 2 spce.table HW-HW + +thermo 10 +run 100 + +shell rm spce.table + diff --git a/examples/python/in.pair_python_table b/examples/python/in.pair_python_table new file mode 100644 index 0000000000..87dad849cc --- /dev/null +++ b/examples/python/in.pair_python_table @@ -0,0 +1,32 @@ +# 3d Lennard-Jones melt + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 10 0 10 0 10 +create_box 1 box +create_atoms 1 box +mass * 1.0 + +velocity all create 3.0 87287 + +pair_style python 2.5 +pair_coeff * * potentials.LJCutMelt lj + +# generate tabulated potential from python variant +pair_write 1 1 10000 rsq 0.01 2.5 lj_1_1.table LJ + +pair_style table linear 10000 +pair_coeff 1 1 lj_1_1.table LJ + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 + +shell rm lj_1_1.table + diff --git a/examples/python/log.4May17.pair_python_coulomb.1 b/examples/python/log.4May17.pair_python_coulomb.1 new file mode 100644 index 0000000000..97826eda47 --- /dev/null +++ b/examples/python/log.4May17.pair_python_coulomb.1 @@ -0,0 +1,178 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task +units real +atom_style full + +read_data data.spce + orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 4500 atoms + scanning bonds ... + 2 = max bonds/atom + scanning angles ... + 1 = max angles/atom + reading bonds ... + 3000 bonds + reading angles ... + 1500 angles + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 2 = max # of special neighbors + +pair_style hybrid/overlay python 12.0 coul/long 12.0 +kspace_style pppm 1.0e-6 + +pair_coeff * * coul/long +pair_coeff * * python potentials.LJCutSPCE OW NULL + +pair_modify table 0 + +bond_style harmonic +angle_style harmonic +dihedral_style none +improper_style none + +bond_coeff 1 1000.00 1.000 +angle_coeff 1 100.0 109.47 + +special_bonds lj/coul 0.0 0.0 1.0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 2 = max # of special neighbors + +neighbor 2.0 bin + +fix 1 all shake 0.0001 20 0 b 1 a 1 + 0 = # of size 2 clusters + 0 = # of size 3 clusters + 0 = # of size 4 clusters + 1500 = # of frozen angles +fix 2 all nvt temp 300.0 300.0 100.0 + +# create combined lj/coul table for all atom types +# generate tabulated potential from python variant +pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW -0.8472 -0.8472 +PPPM initialization ... +WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394206 + estimated relative force accuracy = 1.18714e-06 + using double precision FFTs + 3d grid and FFT values/proc = 103823 64000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair python, perpetual, skip from (2) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (2) pair coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +pair_write 1 2 2000 rsq 0.1 12 spce.table OW-HW -0.8472 0.4236 +PPPM initialization ... +WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394206 + estimated relative force accuracy = 1.18714e-06 + using double precision FFTs + 3d grid and FFT values/proc = 103823 64000 +pair_write 2 2 2000 rsq 0.1 12 spce.table HW-HW 0.4236 0.4236 +PPPM initialization ... +WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394206 + estimated relative force accuracy = 1.18714e-06 + using double precision FFTs + 3d grid and FFT values/proc = 103823 64000 + +# switch to tabulated potential +pair_style table linear 2000 pppm +pair_coeff 1 1 spce.table OW-OW +pair_coeff 1 2 spce.table OW-HW +pair_coeff 2 2 spce.table HW-HW + +thermo 10 +run 100 +PPPM initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394674 + estimated relative force accuracy = 1.18855e-06 + using double precision FFTs + 3d grid and FFT values/proc = 103823 64000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 35.26 | 35.26 | 35.26 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -100272.97 0 -100272.97 -1282.0708 + 10 120.61568 -101350.63 0 -100272.39 -4077.5051 + 20 136.11379 -101465.43 0 -100248.65 -5136.5677 + 30 137.01602 -101455.3 0 -100230.46 -5347.8311 + 40 153.424 -101582.46 0 -100210.93 -5223.1676 + 50 167.73654 -101686.24 0 -100186.77 -4468.6687 + 60 163.11642 -101618.16 0 -100159.99 -3291.7815 + 70 169.64512 -101647.89 0 -100131.35 -2611.638 + 80 182.9979 -101737.01 0 -100101.11 -2390.6293 + 90 191.33873 -101778.71 0 -100068.24 -2239.386 + 100 194.7458 -101775.84 0 -100034.92 -1951.9128 +Loop time of 7.60221 on 1 procs for 100 steps with 4500 atoms + +Performance: 1.137 ns/day, 21.117 hours/ns, 13.154 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 5.7401 | 5.7401 | 5.7401 | 0.0 | 75.51 +Bond | 0.00017881 | 0.00017881 | 0.00017881 | 0.0 | 0.00 +Kspace | 1.5387 | 1.5387 | 1.5387 | 0.0 | 20.24 +Neigh | 0.2299 | 0.2299 | 0.2299 | 0.0 | 3.02 +Comm | 0.024311 | 0.024311 | 0.024311 | 0.0 | 0.32 +Output | 0.00057936 | 0.00057936 | 0.00057936 | 0.0 | 0.01 +Modify | 0.063158 | 0.063158 | 0.063158 | 0.0 | 0.83 +Other | | 0.005243 | | | 0.07 + +Nlocal: 4500 ave 4500 max 4500 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 21216 ave 21216 max 21216 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 2.60177e+06 ave 2.60177e+06 max 2.60177e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 2601766 +Ave neighs/atom = 578.17 +Ave special neighs/atom = 2 +Neighbor list builds = 3 +Dangerous builds = 0 + +shell rm spce.table + +Total wall time: 0:00:07 diff --git a/examples/python/log.4May17.pair_python_coulomb.4 b/examples/python/log.4May17.pair_python_coulomb.4 new file mode 100644 index 0000000000..a3b13cfbaf --- /dev/null +++ b/examples/python/log.4May17.pair_python_coulomb.4 @@ -0,0 +1,178 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task +units real +atom_style full + +read_data data.spce + orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736) + 2 by 2 by 1 MPI processor grid + reading atoms ... + 4500 atoms + scanning bonds ... + 2 = max bonds/atom + scanning angles ... + 1 = max angles/atom + reading bonds ... + 3000 bonds + reading angles ... + 1500 angles + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 2 = max # of special neighbors + +pair_style hybrid/overlay python 12.0 coul/long 12.0 +kspace_style pppm 1.0e-6 + +pair_coeff * * coul/long +pair_coeff * * python potentials.LJCutSPCE OW NULL + +pair_modify table 0 + +bond_style harmonic +angle_style harmonic +dihedral_style none +improper_style none + +bond_coeff 1 1000.00 1.000 +angle_coeff 1 100.0 109.47 + +special_bonds lj/coul 0.0 0.0 1.0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 2 = max # of special neighbors + +neighbor 2.0 bin + +fix 1 all shake 0.0001 20 0 b 1 a 1 + 0 = # of size 2 clusters + 0 = # of size 3 clusters + 0 = # of size 4 clusters + 1500 = # of frozen angles +fix 2 all nvt temp 300.0 300.0 100.0 + +# create combined lj/coul table for all atom types +# generate tabulated potential from python variant +pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW -0.8472 -0.8472 +PPPM initialization ... +WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394206 + estimated relative force accuracy = 1.18714e-06 + using double precision FFTs + 3d grid and FFT values/proc = 34263 16000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair python, perpetual, skip from (2) + attributes: half, newton on + pair build: skip + stencil: none + bin: none + (2) pair coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +pair_write 1 2 2000 rsq 0.1 12 spce.table OW-HW -0.8472 0.4236 +PPPM initialization ... +WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394206 + estimated relative force accuracy = 1.18714e-06 + using double precision FFTs + 3d grid and FFT values/proc = 34263 16000 +pair_write 2 2 2000 rsq 0.1 12 spce.table HW-HW 0.4236 0.4236 +PPPM initialization ... +WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394206 + estimated relative force accuracy = 1.18714e-06 + using double precision FFTs + 3d grid and FFT values/proc = 34263 16000 + +# switch to tabulated potential +pair_style table linear 2000 pppm +pair_coeff 1 1 spce.table OW-OW +pair_coeff 1 2 spce.table OW-HW +pair_coeff 2 2 spce.table HW-HW + +thermo 10 +run 100 +PPPM initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394674 + estimated relative force accuracy = 1.18855e-06 + using double precision FFTs + 3d grid and FFT values/proc = 34263 16000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 13.05 | 13.05 | 13.05 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -100272.97 0 -100272.97 -1282.0708 + 10 120.61568 -101350.63 0 -100272.39 -4077.5051 + 20 136.11379 -101465.43 0 -100248.65 -5136.5677 + 30 137.01602 -101455.3 0 -100230.46 -5347.8311 + 40 153.424 -101582.46 0 -100210.93 -5223.1676 + 50 167.73654 -101686.24 0 -100186.77 -4468.6687 + 60 163.11642 -101618.16 0 -100159.99 -3291.7815 + 70 169.64512 -101647.89 0 -100131.35 -2611.638 + 80 182.9979 -101737.01 0 -100101.11 -2390.6293 + 90 191.33873 -101778.71 0 -100068.24 -2239.386 + 100 194.7458 -101775.84 0 -100034.92 -1951.9128 +Loop time of 2.38392 on 4 procs for 100 steps with 4500 atoms + +Performance: 3.624 ns/day, 6.622 hours/ns, 41.948 timesteps/s +99.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.4377 | 1.5465 | 1.6848 | 7.3 | 64.87 +Bond | 0.00010276 | 0.00012648 | 0.0001452 | 0.0 | 0.01 +Kspace | 0.53311 | 0.66842 | 0.77484 | 10.9 | 28.04 +Neigh | 0.066 | 0.066074 | 0.066101 | 0.0 | 2.77 +Comm | 0.045355 | 0.048344 | 0.050747 | 1.0 | 2.03 +Output | 0.00042391 | 0.00044996 | 0.00052667 | 0.0 | 0.02 +Modify | 0.049891 | 0.050191 | 0.050336 | 0.1 | 2.11 +Other | | 0.003771 | | | 0.16 + +Nlocal: 1125 ave 1154 max 1092 min +Histogram: 1 0 0 0 1 0 0 1 0 1 +Nghost: 12256.2 ave 12296 max 12213 min +Histogram: 1 0 1 0 0 0 0 0 1 1 +Neighs: 650442 ave 678824 max 626375 min +Histogram: 1 0 0 0 2 0 0 0 0 1 + +Total # of neighbors = 2601766 +Ave neighs/atom = 578.17 +Ave special neighs/atom = 2 +Neighbor list builds = 3 +Dangerous builds = 0 + +shell rm spce.table + +Total wall time: 0:00:02 diff --git a/examples/python/log.4May17.pair_python_table.g++.1 b/examples/python/log.4May17.pair_python_table.g++.1 new file mode 100644 index 0000000000..21d42693ba --- /dev/null +++ b/examples/python/log.4May17.pair_python_table.g++.1 @@ -0,0 +1,99 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task +# 3d Lennard-Jones melt + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 +region box block 0 10 0 10 0 10 +create_box 1 box +Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 4000 atoms +mass * 1.0 + +velocity all create 3.0 87287 + +pair_style python 2.5 +pair_coeff * * potentials.LJCutMelt lj + +# generate tabulated potential from python variant +pair_write 1 1 10000 rsq 0.01 2.5 lj_1_1.table LJ +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair python, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + +pair_style table linear 10000 +pair_coeff 1 1 lj_1_1.table LJ +WARNING: 1 of 1000 force values in table are inconsistent with -dE/dr. + Should only be flagged at inflection points (../pair_table.cpp:476) + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.184 | 3.184 | 3.184 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 3 -6.7733675 0 -2.2744925 -3.7033435 + 50 1.6758875 -4.7951764 0 -2.2819736 5.6705794 + 100 1.6458266 -4.7488945 0 -2.2807717 5.8696895 + 150 1.6324439 -4.7283321 0 -2.2802784 5.9594952 + 200 1.6630547 -4.7746809 0 -2.2807225 5.7372657 + 250 1.6278968 -4.7226363 0 -2.2814016 5.9559236 +Loop time of 1.0498 on 1 procs for 250 steps with 4000 atoms + +Performance: 102877.190 tau/day, 238.142 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.93242 | 0.93242 | 0.93242 | 0.0 | 88.82 +Neigh | 0.088495 | 0.088495 | 0.088495 | 0.0 | 8.43 +Comm | 0.012153 | 0.012153 | 0.012153 | 0.0 | 1.16 +Output | 0.00013924 | 0.00013924 | 0.00013924 | 0.0 | 0.01 +Modify | 0.013729 | 0.013729 | 0.013729 | 0.0 | 1.31 +Other | | 0.002855 | | | 0.27 + +Nlocal: 4000 ave 4000 max 4000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 5504 ave 5504 max 5504 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 151497 ave 151497 max 151497 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 151497 +Ave neighs/atom = 37.8743 +Neighbor list builds = 12 +Dangerous builds not checked + +shell rm lj_1_1.table + +Total wall time: 0:00:01 diff --git a/examples/python/log.4May17.pair_python_table.g++.4 b/examples/python/log.4May17.pair_python_table.g++.4 new file mode 100644 index 0000000000..a64ebd6631 --- /dev/null +++ b/examples/python/log.4May17.pair_python_table.g++.4 @@ -0,0 +1,99 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task +# 3d Lennard-Jones melt + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 +region box block 0 10 0 10 0 10 +create_box 1 box +Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) + 1 by 2 by 2 MPI processor grid +create_atoms 1 box +Created 4000 atoms +mass * 1.0 + +velocity all create 3.0 87287 + +pair_style python 2.5 +pair_coeff * * potentials.LJCutMelt lj + +# generate tabulated potential from python variant +pair_write 1 1 10000 rsq 0.01 2.5 lj_1_1.table LJ +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair python, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + +pair_style table linear 10000 +pair_coeff 1 1 lj_1_1.table LJ +WARNING: 1 of 10000 force values in table are inconsistent with -dE/dr. + Should only be flagged at inflection points (../pair_table.cpp:476) + +neighbor 0.3 bin +neigh_modify every 20 delay 0 check no + +fix 1 all nve + +thermo 50 +run 250 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.69 | 2.69 | 2.69 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 3 -6.7733675 0 -2.2744925 -3.7033435 + 50 1.6754092 -4.794723 0 -2.2822376 5.6616601 + 100 1.6503295 -4.7559815 0 -2.2811061 5.8051261 + 150 1.6596603 -4.7699379 0 -2.2810699 5.7830168 + 200 1.6371948 -4.7365549 0 -2.2813766 5.9245585 + 250 1.6321199 -4.7288017 0 -2.2812339 5.9776124 +Loop time of 0.313548 on 4 procs for 250 steps with 4000 atoms + +Performance: 344444.576 tau/day, 797.325 timesteps/s +99.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.24963 | 0.25443 | 0.2632 | 1.1 | 81.15 +Neigh | 0.023249 | 0.023735 | 0.024497 | 0.3 | 7.57 +Comm | 0.020689 | 0.030402 | 0.035249 | 3.4 | 9.70 +Output | 0.00020766 | 0.00021476 | 0.00023031 | 0.0 | 0.07 +Modify | 0.0034959 | 0.0035564 | 0.0036762 | 0.1 | 1.13 +Other | | 0.001206 | | | 0.38 + +Nlocal: 1000 ave 1010 max 982 min +Histogram: 1 0 0 0 0 0 1 0 0 2 +Nghost: 2703.75 ave 2713 max 2689 min +Histogram: 1 0 0 0 0 0 0 2 0 1 +Neighs: 37915.5 ave 39231 max 36202 min +Histogram: 1 0 0 0 0 1 1 0 0 1 + +Total # of neighbors = 151662 +Ave neighs/atom = 37.9155 +Neighbor list builds = 12 +Dangerous builds not checked + +shell rm lj_1_1.table + +Total wall time: 0:00:00 diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 381b9050ff..1d80145c58 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -35,7 +35,7 @@ using namespace LAMMPS_NS; PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) { respa_enable = 0; - single_enable = 0; + single_enable = 1; writedata = 0; restartinfo = 0; one_coeff = 1; @@ -46,7 +46,7 @@ PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) { py_potential = NULL; // add current directory to PYTHONPATH - PyObject * py_path = PySys_GetObject("path"); + PyObject * py_path = PySys_GetObject((char *)"path"); PyList_Append(py_path, PY_STRING_FROM_STRING(".")); // if LAMMPS_POTENTIALS environment variable is set, add it to PYTHONPATH as well @@ -353,3 +353,83 @@ double PairPython::init_one(int, int) return cut_global; } +/* ---------------------------------------------------------------------- */ + +double PairPython::single(int i, int j, int itype, int jtype, double rsq, + double factor_coul, double factor_lj, + double &fforce) +{ + + // prepare access to compute_force and compute_energy functions + + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *py_pair_instance = (PyObject *) py_potential; + PyObject *py_compute_force + = PyObject_GetAttrString(py_pair_instance,"compute_force"); + if (!py_compute_force) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not find 'compute_force' method'"); + } + if (!PyCallable_Check(py_compute_force)) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Python 'compute_force' is not callable"); + } + + PyObject *py_compute_energy + = PyObject_GetAttrString(py_pair_instance,"compute_energy"); + if (!py_compute_energy) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not find 'compute_energy' method'"); + } + if (!PyCallable_Check(py_compute_energy)) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Python 'compute_energy' is not callable"); + } + + PyObject *py_rsq, *py_itype, *py_jtype, *py_value; + PyObject *py_compute_args = PyTuple_New(3); + if (!py_compute_args) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not create tuple for 'compute' function arguments"); + } + + py_itype = PY_INT_FROM_LONG(itype); + PyTuple_SetItem(py_compute_args,1,py_itype); + py_jtype = PY_INT_FROM_LONG(jtype); + PyTuple_SetItem(py_compute_args,2,py_jtype); + py_rsq = PyFloat_FromDouble(rsq); + PyTuple_SetItem(py_compute_args,0,py_rsq); + + py_value = PyObject_CallObject(py_compute_force,py_compute_args); + if (!py_value) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Calling 'compute_force' function failed"); + } + fforce = factor_lj*PyFloat_AsDouble(py_value)/rsq; + + py_value = PyObject_CallObject(py_compute_energy,py_compute_args); + if (!py_value) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Calling 'compute_energy' function failed"); + } + double evdwl = factor_lj*PyFloat_AsDouble(py_value); + + Py_DECREF(py_compute_args); + PyGILState_Release(gstate); + + return evdwl; +} diff --git a/src/PYTHON/pair_python.h b/src/PYTHON/pair_python.h index e038d9b25e..3c9c34fbdf 100644 --- a/src/PYTHON/pair_python.h +++ b/src/PYTHON/pair_python.h @@ -42,6 +42,7 @@ class PairPython : public Pair { void settings(int, char **); void coeff(int, char **); double init_one(int, int); + double single(int, int, int, int, double, double, double, double &); protected: double cut_global; -- GitLab From 1d48f287f00acc5bbf6d922cd30e9305ce455ee7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 May 2017 19:05:18 -0400 Subject: [PATCH 150/593] add partial documentation for pair style python --- doc/src/Section_python.txt | 2 + doc/src/lammps.book | 2 + doc/src/pair_python.txt | 137 +++++++++++++++++++ doc/src/pairs.txt | 1 + examples/python/{potentials.py => py_pot.py} | 0 5 files changed, 142 insertions(+) create mode 100644 doc/src/pair_python.txt rename examples/python/{potentials.py => py_pot.py} (100%) diff --git a/doc/src/Section_python.txt b/doc/src/Section_python.txt index 5d366f6b6c..7b62f7e948 100644 --- a/doc/src/Section_python.txt +++ b/doc/src/Section_python.txt @@ -157,6 +157,8 @@ doc page for its python-style variables for more info, including examples of Python code you can write for both pure Python operations and callbacks to LAMMPS. See "fix python"_fix_python.html to learn about possibilities to execute Python code during each time step. +Through the "python pair style"_pair_python.html it is also possible +to define potential functions as python code. To run pure Python code from LAMMPS, you only need to build LAMMPS with the PYTHON package installed: diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 6b3ca8aa07..6fbdbb9e78 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -237,6 +237,7 @@ fix_pour.html fix_press_berendsen.html fix_print.html fix_property_atom.html +fix_python.html fix_qbmsst.html fix_qeq.html fix_qeq_comb.html @@ -467,6 +468,7 @@ pair_oxdna.html pair_oxdna2.html pair_peri.html pair_polymorphic.html +pair_python.html pair_quip.html pair_reax.html pair_reaxc.html diff --git a/doc/src/pair_python.txt b/doc/src/pair_python.txt new file mode 100644 index 0000000000..2f034031f1 --- /dev/null +++ b/doc/src/pair_python.txt @@ -0,0 +1,137 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +pair_style python command :h3 + +[Syntax:] + +pair_style python cutoff :pre + +cutoff = global cutoff for interactions in python potential classes + +[Examples:] + +pair_style python 2.5 +pair_coeff * * py_pot.LJCutMelt lj :pre + +pair_style hybrid/overlay coul/long 12.0 python 12.0 +pair_coeff * * coul/long +pair_coeff * * python py_pot.LJCutSPCE OW NULL :pre + +[Description:] + +The {python} pair style provides a way to define pairwise additive +potential functions as scripted python script code that is loaded +into LAMMPS from a python file which must contain specific python +class definitions. This allows to model potentials, that are not +currently available in LAMMPS without having to program a new +pair style or modify an existing one and recompile LAMMPS. Due to +python being an interpreted language, the performance of this pair +style is going to be significantly slower (often between 20x and 100x), +but this penalty can be significantly reduced through generating +tabulations from the python code through the "pair_write"_pair_write.html +command. + +Only a single pair_coeff command is used with the {python} pair style +which specifies a python class inside a python module that LAMMPS will +look up either in the current directory, the folder pointed to by the +LAMMPS_POTENTIALS environment variable or somewhere in your python path. +The class definition has to follow specific rules as explained below. + +Atom types in the python class are specified through symbolic constants, +typically strings. These are mapped to LAMMPS atom types by specifying +N additional arguments after the filename in the pair_coeff command, +where N is the number of LAMMPS atom types: + +module.class +N element names = mapping of python atom types to LAMMPS atom types :ul + +As an example, imagine a file py_pot.py has a python class LJCutMelt +with parameters and potential functions for a two Lennard-Jones +atom types labeled as 'LJ1' and 'LJ2', and you would have defined +4 atom types in LAMMPS, out which the first three are supposed to be +using the 'LJ1' parameters and the fourth the 'LJ2' parameters, then +you would use the following pair_coeff command: + +pair_coeff * * py_pot.LJCutMelt LJ1 LJ1 LJ1 LJ2 :pre + +The 1st 2 arguments must be * * so as to span all LAMMPS atom types. +The first three LJ1 arguments map LAMMPS atom types 1,2,3 to the LJ1 +atom type in the py_pot.py file. The final LJ2 argument maps LAMMPS +atom type 4 to the LJ2 atom type the python file. If a mapping value +is specified as NULL, the mapping is not performed. This can be used +when a {python} potential is used as part of the {hybrid} pair style. +The NULL values are placeholders for atom types that will be used with +other potentials. + +The python potential file has to provide classes for the computation +of the potential energy and forces, which have to contain three methods: +{map_coeff}, {compute_force}, and {compute_energy}. For details please +see the provided examples in the examples/python folder. + +:line + +IMPORTANT NOTE: The evaluation of scripted python code will slow down +the computation pair-wise interactions very significantly. However, +this can be largely worked around through using the python pair style +to generate tabulated potentials on the fly. Please see below for an +example of how to build the table file: + +pair_style python 2.5 +pair_coeff * * py_pot.LJCutMelt LJ1 LJ2 LJ2 +shell rm -f lj1_lj2.table +pair_write 1 1 10000 rsq 0.01 2.5 lj1_lj2.table LJ1-LJ1 +pair_write 1 2 10000 rsq 0.01 2.5 lj1_lj2.table LJ1-LJ2 +pair_write 2 2 10000 rsq 0.01 2.5 lj1_lj2.table LJ2-LJ2 :pre + +After switching the pair style to {table}, the various potential +function tables need to be assigned to the LAMMPS atom types: + +pair_style table linear 10000 +pair_coeff 1 1 lj1_lj2.table LJ1-LJ1 +pair_coeff 1 2* lj1_lj2.table LJ1-LJ2 +pair_coeff 2* 2* lj1_lj2.table LJ2-LJ2 :pre + +:line + +[Mixing, shift, table, tail correction, restart, rRESPA info]: + +Mixing of potential parameters has to be handled inside the +provided python module. The python pair style assumes that force +and energy computation can be correctly performed for all +pairs of atom types as they are mapped to the atom type labels +inside the python potential class. + +This pair style does not support the "pair_modify"_pair_modify.html +shift, table, and tail options. + +This pair style does not write its information to "binary restart +files"_restart.html, since it is stored in potential files. Thus, you +need to re-specify the pair_style and pair_coeff commands in an input +script that reads a restart file. + +This pair style can only be used via the {pair} keyword of the +"run_style respa"_run_style.html command. It does not support the +{inner}, {middle}, {outer} keywords. + +:line + +[Restrictions:] + +This pair style is part of the PYTHON package. It is only enabled +if LAMMPS was built with that package. See +the "Making LAMMPS"_Section_start.html#start_3 section for more info. + +[Related commands:] + +"pair_coeff"_pair_coeff.html, "pair_write"_pair_write.html, +"pair style table"_pair_table.html + +[Default:] none + + diff --git a/doc/src/pairs.txt b/doc/src/pairs.txt index 0898906e7c..b74d25502a 100644 --- a/doc/src/pairs.txt +++ b/doc/src/pairs.txt @@ -71,6 +71,7 @@ Pair Styles :h1 pair_oxdna2 pair_peri pair_polymorphic + pair_python pair_quip pair_reax pair_reaxc diff --git a/examples/python/potentials.py b/examples/python/py_pot.py similarity index 100% rename from examples/python/potentials.py rename to examples/python/py_pot.py -- GitLab From 67962b15fc07fce7eec058ab406229e5ef017455 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 May 2017 20:55:48 -0400 Subject: [PATCH 151/593] a bunch refactoring changes in the python pair style and the examples - make all python potential classes derived from LAMMPSPairPotential which contains shared functionality. We currently don't check for supported atom types. may want to add that again later. - keep track of skipped atom types in the C++ code. - add test against units setting. must set self.units='...' in constructor - make compute_force method consistent with Pair::single() in LAMMPS and return force/r instead of force. - rename potentials.py to py_pot.py - update test runs. some small tweaks. --- examples/python/in.pair_python_coulomb | 4 +- examples/python/in.pair_python_hybrid | 6 +- examples/python/in.pair_python_melt | 6 +- examples/python/in.pair_python_spce | 4 +- examples/python/in.pair_python_table | 6 +- .../log.4May17.pair_python_coulomb.g++.1 | 178 ++++++++++++++++++ ...4 => log.4May17.pair_python_coulomb.g++.4} | 38 ++-- .../log.4May17.pair_python_hybrid.g++.1 | 65 +++---- .../log.4May17.pair_python_hybrid.g++.4 | 65 +++---- .../python/log.4May17.pair_python_melt.g++.1 | 65 +++---- .../python/log.4May17.pair_python_melt.g++.4 | 65 +++---- .../python/log.4May17.pair_python_spce.g++.1 | 47 +++-- .../python/log.4May17.pair_python_spce.g++.4 | 47 +++-- .../python/log.4May17.pair_python_table.g++.1 | 46 ++--- .../python/log.4May17.pair_python_table.g++.4 | 50 ++--- examples/python/py_pot.py | 74 ++++---- src/PYTHON/pair_python.cpp | 70 +++++-- src/PYTHON/pair_python.h | 1 + 18 files changed, 521 insertions(+), 316 deletions(-) create mode 100644 examples/python/log.4May17.pair_python_coulomb.g++.1 rename examples/python/{log.4May17.pair_python_coulomb.4 => log.4May17.pair_python_coulomb.g++.4} (86%) diff --git a/examples/python/in.pair_python_coulomb b/examples/python/in.pair_python_coulomb index 87a8fa69ce..5944592473 100644 --- a/examples/python/in.pair_python_coulomb +++ b/examples/python/in.pair_python_coulomb @@ -3,11 +3,11 @@ atom_style full read_data data.spce -pair_style hybrid/overlay python 12.0 coul/long 12.0 +pair_style hybrid/overlay coul/long 12.0 python 12.0 kspace_style pppm 1.0e-6 pair_coeff * * coul/long -pair_coeff * * python potentials.LJCutSPCE OW NULL +pair_coeff * * python py_pot.LJCutSPCE OW NULL pair_modify table 0 diff --git a/examples/python/in.pair_python_hybrid b/examples/python/in.pair_python_hybrid index 289de18b00..d5db729bda 100644 --- a/examples/python/in.pair_python_hybrid +++ b/examples/python/in.pair_python_hybrid @@ -12,7 +12,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin @@ -31,7 +31,7 @@ clear read_restart hybrid.restart pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 fix 1 all nve @@ -47,7 +47,7 @@ atom_style atomic read_data hybrid.data pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin diff --git a/examples/python/in.pair_python_melt b/examples/python/in.pair_python_melt index 7b3cbf7c4d..3f775e6651 100644 --- a/examples/python/in.pair_python_melt +++ b/examples/python/in.pair_python_melt @@ -12,7 +12,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no @@ -30,7 +30,7 @@ clear read_restart melt.restart pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj fix 1 all nve @@ -45,7 +45,7 @@ atom_style atomic read_data melt.data pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no diff --git a/examples/python/in.pair_python_spce b/examples/python/in.pair_python_spce index d3765ebc33..5bd9e1e23a 100644 --- a/examples/python/in.pair_python_spce +++ b/examples/python/in.pair_python_spce @@ -3,11 +3,11 @@ atom_style full read_data data.spce -pair_style hybrid/overlay python 12.0 coul/long 12.0 +pair_style hybrid/overlay coul/long 12.0 python 12.0 kspace_style pppm 1.0e-6 pair_coeff * * coul/long -pair_coeff * * python potentials.LJCutSPCE OW NULL +pair_coeff * * python py_pot.LJCutSPCE OW NULL bond_style harmonic angle_style harmonic diff --git a/examples/python/in.pair_python_table b/examples/python/in.pair_python_table index 87dad849cc..761a6efd78 100644 --- a/examples/python/in.pair_python_table +++ b/examples/python/in.pair_python_table @@ -12,12 +12,12 @@ mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj # generate tabulated potential from python variant -pair_write 1 1 10000 rsq 0.01 2.5 lj_1_1.table LJ +pair_write 1 1 2000 rsq 0.01 2.5 lj_1_1.table LJ -pair_style table linear 10000 +pair_style table linear 2000 pair_coeff 1 1 lj_1_1.table LJ neighbor 0.3 bin diff --git a/examples/python/log.4May17.pair_python_coulomb.g++.1 b/examples/python/log.4May17.pair_python_coulomb.g++.1 new file mode 100644 index 0000000000..67bb3b3496 --- /dev/null +++ b/examples/python/log.4May17.pair_python_coulomb.g++.1 @@ -0,0 +1,178 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task +units real +atom_style full + +read_data data.spce + orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 4500 atoms + scanning bonds ... + 2 = max bonds/atom + scanning angles ... + 1 = max angles/atom + reading bonds ... + 3000 bonds + reading angles ... + 1500 angles + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 2 = max # of special neighbors + +pair_style hybrid/overlay coul/long 12.0 python 12.0 +kspace_style pppm 1.0e-6 + +pair_coeff * * coul/long +pair_coeff * * python py_pot.LJCutSPCE OW NULL + +pair_modify table 0 + +bond_style harmonic +angle_style harmonic +dihedral_style none +improper_style none + +bond_coeff 1 1000.00 1.000 +angle_coeff 1 100.0 109.47 + +special_bonds lj/coul 0.0 0.0 1.0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 2 = max # of special neighbors + +neighbor 2.0 bin + +fix 1 all shake 0.0001 20 0 b 1 a 1 + 0 = # of size 2 clusters + 0 = # of size 3 clusters + 0 = # of size 4 clusters + 1500 = # of frozen angles +fix 2 all nvt temp 300.0 300.0 100.0 + +# create combined lj/coul table for all atom types +# generate tabulated potential from python variant +pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW -0.8472 -0.8472 +PPPM initialization ... +WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394206 + estimated relative force accuracy = 1.18714e-06 + using double precision FFTs + 3d grid and FFT values/proc = 103823 64000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + (2) pair python, perpetual, skip from (1) + attributes: half, newton on + pair build: skip + stencil: none + bin: none +pair_write 1 2 2000 rsq 0.1 12 spce.table OW-HW -0.8472 0.4236 +PPPM initialization ... +WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394206 + estimated relative force accuracy = 1.18714e-06 + using double precision FFTs + 3d grid and FFT values/proc = 103823 64000 +pair_write 2 2 2000 rsq 0.1 12 spce.table HW-HW 0.4236 0.4236 +PPPM initialization ... +WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394206 + estimated relative force accuracy = 1.18714e-06 + using double precision FFTs + 3d grid and FFT values/proc = 103823 64000 + +# switch to tabulated potential +pair_style table linear 2000 pppm +pair_coeff 1 1 spce.table OW-OW +pair_coeff 1 2 spce.table OW-HW +pair_coeff 2 2 spce.table HW-HW + +thermo 10 +run 100 +PPPM initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394674 + estimated relative force accuracy = 1.18855e-06 + using double precision FFTs + 3d grid and FFT values/proc = 103823 64000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 35.26 | 35.26 | 35.26 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -100272.97 0 -100272.97 -1282.0708 + 10 120.61568 -101350.63 0 -100272.39 -4077.5051 + 20 136.11379 -101465.43 0 -100248.65 -5136.5677 + 30 137.01602 -101455.3 0 -100230.46 -5347.8311 + 40 153.424 -101582.46 0 -100210.93 -5223.1676 + 50 167.73654 -101686.24 0 -100186.77 -4468.6687 + 60 163.11642 -101618.16 0 -100159.99 -3291.7815 + 70 169.64512 -101647.89 0 -100131.35 -2611.638 + 80 182.9979 -101737.01 0 -100101.11 -2390.6293 + 90 191.33873 -101778.71 0 -100068.24 -2239.386 + 100 194.7458 -101775.84 0 -100034.92 -1951.9128 +Loop time of 7.63869 on 1 procs for 100 steps with 4500 atoms + +Performance: 1.131 ns/day, 21.219 hours/ns, 13.091 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 5.7777 | 5.7777 | 5.7777 | 0.0 | 75.64 +Bond | 0.00017595 | 0.00017595 | 0.00017595 | 0.0 | 0.00 +Kspace | 1.5385 | 1.5385 | 1.5385 | 0.0 | 20.14 +Neigh | 0.22962 | 0.22962 | 0.22962 | 0.0 | 3.01 +Comm | 0.024123 | 0.024123 | 0.024123 | 0.0 | 0.32 +Output | 0.00061131 | 0.00061131 | 0.00061131 | 0.0 | 0.01 +Modify | 0.062444 | 0.062444 | 0.062444 | 0.0 | 0.82 +Other | | 0.005466 | | | 0.07 + +Nlocal: 4500 ave 4500 max 4500 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 21216 ave 21216 max 21216 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 2.60177e+06 ave 2.60177e+06 max 2.60177e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 2601766 +Ave neighs/atom = 578.17 +Ave special neighs/atom = 2 +Neighbor list builds = 3 +Dangerous builds = 0 + +shell rm spce.table + +Total wall time: 0:00:07 diff --git a/examples/python/log.4May17.pair_python_coulomb.4 b/examples/python/log.4May17.pair_python_coulomb.g++.4 similarity index 86% rename from examples/python/log.4May17.pair_python_coulomb.4 rename to examples/python/log.4May17.pair_python_coulomb.g++.4 index a3b13cfbaf..d5fd15ccd3 100644 --- a/examples/python/log.4May17.pair_python_coulomb.4 +++ b/examples/python/log.4May17.pair_python_coulomb.g++.4 @@ -21,11 +21,11 @@ read_data data.spce 1 = max # of 1-4 neighbors 2 = max # of special neighbors -pair_style hybrid/overlay python 12.0 coul/long 12.0 +pair_style hybrid/overlay coul/long 12.0 python 12.0 kspace_style pppm 1.0e-6 pair_coeff * * coul/long -pair_coeff * * python potentials.LJCutSPCE OW NULL +pair_coeff * * python py_pot.LJCutSPCE OW NULL pair_modify table 0 @@ -70,16 +70,16 @@ Neighbor list info ... ghost atom cutoff = 14 binsize = 7, bins = 6 6 6 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair python, perpetual, skip from (2) - attributes: half, newton on - pair build: skip - stencil: none - bin: none - (2) pair coul/long, perpetual + (1) pair coul/long, perpetual attributes: half, newton on pair build: half/bin/newton stencil: half/bin/3d/newton bin: standard + (2) pair python, perpetual, skip from (1) + attributes: half, newton on + pair build: skip + stencil: none + bin: none pair_write 1 2 2000 rsq 0.1 12 spce.table OW-HW -0.8472 0.4236 PPPM initialization ... WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) @@ -143,22 +143,22 @@ Step Temp E_pair E_mol TotEng Press 80 182.9979 -101737.01 0 -100101.11 -2390.6293 90 191.33873 -101778.71 0 -100068.24 -2239.386 100 194.7458 -101775.84 0 -100034.92 -1951.9128 -Loop time of 2.38392 on 4 procs for 100 steps with 4500 atoms +Loop time of 2.35848 on 4 procs for 100 steps with 4500 atoms -Performance: 3.624 ns/day, 6.622 hours/ns, 41.948 timesteps/s -99.1% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 3.663 ns/day, 6.551 hours/ns, 42.400 timesteps/s +99.0% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 1.4377 | 1.5465 | 1.6848 | 7.3 | 64.87 -Bond | 0.00010276 | 0.00012648 | 0.0001452 | 0.0 | 0.01 -Kspace | 0.53311 | 0.66842 | 0.77484 | 10.9 | 28.04 -Neigh | 0.066 | 0.066074 | 0.066101 | 0.0 | 2.77 -Comm | 0.045355 | 0.048344 | 0.050747 | 1.0 | 2.03 -Output | 0.00042391 | 0.00044996 | 0.00052667 | 0.0 | 0.02 -Modify | 0.049891 | 0.050191 | 0.050336 | 0.1 | 2.11 -Other | | 0.003771 | | | 0.16 +Pair | 1.5061 | 1.5612 | 1.6879 | 5.9 | 66.20 +Bond | 9.5129e-05 | 0.00012672 | 0.00014567 | 0.0 | 0.01 +Kspace | 0.52033 | 0.64456 | 0.69933 | 9.1 | 27.33 +Neigh | 0.066265 | 0.066342 | 0.06644 | 0.0 | 2.81 +Comm | 0.03394 | 0.036139 | 0.038043 | 0.8 | 1.53 +Output | 0.00040889 | 0.00044978 | 0.00056887 | 0.0 | 0.02 +Modify | 0.04557 | 0.045813 | 0.046082 | 0.1 | 1.94 +Other | | 0.003826 | | | 0.16 Nlocal: 1125 ave 1154 max 1092 min Histogram: 1 0 0 0 1 0 0 1 0 1 diff --git a/examples/python/log.4May17.pair_python_hybrid.g++.1 b/examples/python/log.4May17.pair_python_hybrid.g++.1 index d9d3bf53c0..497943d4fd 100644 --- a/examples/python/log.4May17.pair_python_hybrid.g++.1 +++ b/examples/python/log.4May17.pair_python_hybrid.g++.1 @@ -1,5 +1,4 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task # 3d Lennard-Jones hybrid @@ -19,7 +18,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin @@ -59,20 +58,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 -Loop time of 43.2436 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.9463 on 1 procs for 250 steps with 4000 atoms -Performance: 2497.477 tau/day, 5.781 timesteps/s -31.7% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4921.114 tau/day, 11.391 timesteps/s +98.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 42.933 | 42.933 | 42.933 | 0.0 | 99.28 -Neigh | 0.24816 | 0.24816 | 0.24816 | 0.0 | 0.57 -Comm | 0.027748 | 0.027748 | 0.027748 | 0.0 | 0.06 -Output | 0.000519 | 0.000519 | 0.000519 | 0.0 | 0.00 -Modify | 0.028028 | 0.028028 | 0.028028 | 0.0 | 0.06 -Other | | 0.005912 | | | 0.01 +Pair | 21.819 | 21.819 | 21.819 | 0.0 | 99.42 +Neigh | 0.094718 | 0.094718 | 0.094718 | 0.0 | 0.43 +Comm | 0.01407 | 0.01407 | 0.01407 | 0.0 | 0.06 +Output | 0.00024915 | 0.00024915 | 0.00024915 | 0.0 | 0.00 +Modify | 0.015002 | 0.015002 | 0.015002 | 0.0 | 0.07 +Other | | 0.003232 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -90,7 +89,6 @@ write_data hybrid.data write_restart hybrid.restart clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task read_restart hybrid.restart @@ -99,7 +97,7 @@ read_restart hybrid.restart 4000 atoms pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 fix 1 all nve @@ -136,20 +134,20 @@ Step Temp E_pair E_mol TotEng Press 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 -Loop time of 46.2882 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.9098 on 1 procs for 250 steps with 4000 atoms -Performance: 2333.206 tau/day, 5.401 timesteps/s -31.7% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4929.303 tau/day, 11.410 timesteps/s +98.8% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 45.662 | 45.662 | 45.662 | 0.0 | 98.65 -Neigh | 0.55234 | 0.55234 | 0.55234 | 0.0 | 1.19 -Comm | 0.035614 | 0.035614 | 0.035614 | 0.0 | 0.08 -Output | 0.000544 | 0.000544 | 0.000544 | 0.0 | 0.00 -Modify | 0.029269 | 0.029269 | 0.029269 | 0.0 | 0.06 -Other | | 0.008735 | | | 0.02 +Pair | 21.68 | 21.68 | 21.68 | 0.0 | 98.95 +Neigh | 0.19625 | 0.19625 | 0.19625 | 0.0 | 0.90 +Comm | 0.014877 | 0.014877 | 0.014877 | 0.0 | 0.07 +Output | 0.00027227 | 0.00027227 | 0.00027227 | 0.0 | 0.00 +Modify | 0.013663 | 0.013663 | 0.013663 | 0.0 | 0.06 +Other | | 0.004371 | | | 0.02 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -164,7 +162,6 @@ Neighbor list builds = 25 Dangerous builds = 25 clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units lj @@ -179,7 +176,7 @@ read_data hybrid.data 4000 velocities pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin @@ -219,20 +216,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 -Loop time of 46.4094 on 1 procs for 250 steps with 4000 atoms +Loop time of 22.091 on 1 procs for 250 steps with 4000 atoms -Performance: 2327.115 tau/day, 5.387 timesteps/s -31.6% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4888.868 tau/day, 11.317 timesteps/s +98.8% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 46.066 | 46.066 | 46.066 | 0.0 | 99.26 -Neigh | 0.27099 | 0.27099 | 0.27099 | 0.0 | 0.58 -Comm | 0.033778 | 0.033778 | 0.033778 | 0.0 | 0.07 -Output | 0.000507 | 0.000507 | 0.000507 | 0.0 | 0.00 -Modify | 0.030938 | 0.030938 | 0.030938 | 0.0 | 0.07 -Other | | 0.006695 | | | 0.01 +Pair | 21.966 | 21.966 | 21.966 | 0.0 | 99.43 +Neigh | 0.094647 | 0.094647 | 0.094647 | 0.0 | 0.43 +Comm | 0.013071 | 0.013071 | 0.013071 | 0.0 | 0.06 +Output | 0.00027871 | 0.00027871 | 0.00027871 | 0.0 | 0.00 +Modify | 0.013882 | 0.013882 | 0.013882 | 0.0 | 0.06 +Other | | 0.003102 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -247,4 +244,4 @@ Neighbor list builds = 12 Dangerous builds not checked shell rm hybrid.data hybrid.restart -Total wall time: 0:02:20 +Total wall time: 0:01:07 diff --git a/examples/python/log.4May17.pair_python_hybrid.g++.4 b/examples/python/log.4May17.pair_python_hybrid.g++.4 index e45514a803..0331f34a5e 100644 --- a/examples/python/log.4May17.pair_python_hybrid.g++.4 +++ b/examples/python/log.4May17.pair_python_hybrid.g++.4 @@ -1,5 +1,4 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task # 3d Lennard-Jones hybrid @@ -19,7 +18,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin @@ -59,20 +58,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6596605 -4.7699432 0 -2.2810749 5.7830138 200 1.6371874 -4.7365462 0 -2.2813789 5.9246674 250 1.6323462 -4.7292021 0 -2.2812949 5.9762238 -Loop time of 11.1422 on 4 procs for 250 steps with 4000 atoms +Loop time of 6.01723 on 4 procs for 250 steps with 4000 atoms -Performance: 9692.888 tau/day, 22.437 timesteps/s -35.1% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 17948.472 tau/day, 41.547 timesteps/s +98.2% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 10.448 | 10.772 | 10.937 | 5.9 | 96.67 -Neigh | 0.062061 | 0.062949 | 0.06439 | 0.4 | 0.56 -Comm | 0.12929 | 0.29444 | 0.61802 | 35.8 | 2.64 -Output | 0.000301 | 0.000684 | 0.001824 | 0.0 | 0.01 -Modify | 0.009803 | 0.0098622 | 0.010014 | 0.1 | 0.09 -Other | | 0.002618 | | | 0.02 +Pair | 5.1507 | 5.4989 | 5.9629 | 13.1 | 91.39 +Neigh | 0.024123 | 0.024877 | 0.025959 | 0.5 | 0.41 +Comm | 0.02258 | 0.48785 | 0.83691 | 44.1 | 8.11 +Output | 0.00039768 | 0.00045246 | 0.00052929 | 0.0 | 0.01 +Modify | 0.0036325 | 0.0037773 | 0.0038905 | 0.2 | 0.06 +Other | | 0.001357 | | | 0.02 Nlocal: 1000 ave 1010 max 982 min Histogram: 1 0 0 0 0 0 1 0 0 2 @@ -90,7 +89,6 @@ write_data hybrid.data write_restart hybrid.restart clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task read_restart hybrid.restart @@ -99,7 +97,7 @@ read_restart hybrid.restart 4000 atoms pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 fix 1 all nve @@ -136,20 +134,20 @@ Step Temp E_pair E_mol TotEng Press 400 1.6388136 -4.7387093 0 -2.2811035 5.9331084 450 1.6431295 -4.7452215 0 -2.2811435 5.8929898 500 1.643316 -4.7454222 0 -2.2810644 5.8454817 -Loop time of 11.287 on 4 procs for 250 steps with 4000 atoms +Loop time of 6.09991 on 4 procs for 250 steps with 4000 atoms -Performance: 9568.520 tau/day, 22.149 timesteps/s -34.9% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 17705.179 tau/day, 40.984 timesteps/s +98.2% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 10.274 | 10.76 | 11.02 | 8.8 | 95.33 -Neigh | 0.12639 | 0.1291 | 0.13056 | 0.5 | 1.14 -Comm | 0.12094 | 0.38226 | 0.87078 | 46.7 | 3.39 -Output | 0.000297 | 0.0006965 | 0.001867 | 0.0 | 0.01 -Modify | 0.010445 | 0.010638 | 0.011054 | 0.2 | 0.09 -Other | | 0.003901 | | | 0.03 +Pair | 5.2315 | 5.5179 | 6.0183 | 13.7 | 90.46 +Neigh | 0.049134 | 0.051424 | 0.053837 | 0.8 | 0.84 +Comm | 0.021671 | 0.52455 | 0.8132 | 44.5 | 8.60 +Output | 0.00019336 | 0.00026017 | 0.00032115 | 0.0 | 0.00 +Modify | 0.0036032 | 0.0036635 | 0.0038021 | 0.1 | 0.06 +Other | | 0.002068 | | | 0.03 Nlocal: 1000 ave 1012 max 983 min Histogram: 1 0 0 0 0 0 2 0 0 1 @@ -164,7 +162,6 @@ Neighbor list builds = 25 Dangerous builds = 25 clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units lj @@ -179,7 +176,7 @@ read_data hybrid.data 4000 velocities pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin @@ -219,20 +216,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6384234 -4.7389689 0 -2.2819482 5.9315273 200 1.6428814 -4.7460743 0 -2.2823683 5.8888228 250 1.6432631 -4.7466603 0 -2.2823818 5.8398819 -Loop time of 11.1573 on 4 procs for 250 steps with 4000 atoms +Loop time of 6.04476 on 4 procs for 250 steps with 4000 atoms -Performance: 9679.760 tau/day, 22.407 timesteps/s -35.0% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 17866.705 tau/day, 41.358 timesteps/s +98.3% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 10.166 | 10.713 | 10.932 | 9.7 | 96.01 -Neigh | 0.060687 | 0.062175 | 0.063163 | 0.4 | 0.56 -Comm | 0.14931 | 0.36938 | 0.91686 | 52.5 | 3.31 -Output | 0.00036 | 0.00058175 | 0.001228 | 0.0 | 0.01 -Modify | 0.009918 | 0.010237 | 0.010388 | 0.2 | 0.09 -Other | | 0.002356 | | | 0.02 +Pair | 5.2589 | 5.5841 | 5.9788 | 11.1 | 92.38 +Neigh | 0.023942 | 0.024705 | 0.025509 | 0.4 | 0.41 +Comm | 0.034946 | 0.43056 | 0.75671 | 40.0 | 7.12 +Output | 0.00022149 | 0.00029725 | 0.0003593 | 0.0 | 0.00 +Modify | 0.003613 | 0.0037647 | 0.003829 | 0.1 | 0.06 +Other | | 0.001313 | | | 0.02 Nlocal: 1000 ave 1013 max 989 min Histogram: 1 0 0 1 0 1 0 0 0 1 @@ -247,4 +244,4 @@ Neighbor list builds = 12 Dangerous builds not checked shell rm hybrid.data hybrid.restart -Total wall time: 0:00:35 +Total wall time: 0:00:18 diff --git a/examples/python/log.4May17.pair_python_melt.g++.1 b/examples/python/log.4May17.pair_python_melt.g++.1 index 3459dd4f87..fcb902fb3c 100644 --- a/examples/python/log.4May17.pair_python_melt.g++.1 +++ b/examples/python/log.4May17.pair_python_melt.g++.1 @@ -1,5 +1,4 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task # 3d Lennard-Jones melt @@ -19,7 +18,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no @@ -48,20 +47,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 -Loop time of 24.2466 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.6481 on 1 procs for 250 steps with 4000 atoms -Performance: 4454.233 tau/day, 10.311 timesteps/s -59.9% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4988.899 tau/day, 11.548 timesteps/s +98.5% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 24.079 | 24.079 | 24.079 | 0.0 | 99.31 -Neigh | 0.13174 | 0.13174 | 0.13174 | 0.0 | 0.54 -Comm | 0.016789 | 0.016789 | 0.016789 | 0.0 | 0.07 -Output | 0.000271 | 0.000271 | 0.000271 | 0.0 | 0.00 -Modify | 0.015073 | 0.015073 | 0.015073 | 0.0 | 0.06 -Other | | 0.003428 | | | 0.01 +Pair | 21.529 | 21.529 | 21.529 | 0.0 | 99.45 +Neigh | 0.08819 | 0.08819 | 0.08819 | 0.0 | 0.41 +Comm | 0.013276 | 0.013276 | 0.013276 | 0.0 | 0.06 +Output | 0.00025654 | 0.00025654 | 0.00025654 | 0.0 | 0.00 +Modify | 0.014466 | 0.014466 | 0.014466 | 0.0 | 0.07 +Other | | 0.003143 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -79,7 +78,6 @@ write_data melt.data write_restart melt.restart clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task read_restart melt.restart @@ -88,7 +86,7 @@ read_restart melt.restart 4000 atoms pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj fix 1 all nve @@ -114,20 +112,20 @@ Step Temp E_pair E_mol TotEng Press 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 -Loop time of 24.3239 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.9592 on 1 procs for 250 steps with 4000 atoms -Performance: 4440.069 tau/day, 10.278 timesteps/s -60.0% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4918.203 tau/day, 11.385 timesteps/s +98.5% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 24.017 | 24.017 | 24.017 | 0.0 | 98.74 -Neigh | 0.26927 | 0.26927 | 0.26927 | 0.0 | 1.11 -Comm | 0.018113 | 0.018113 | 0.018113 | 0.0 | 0.07 -Output | 0.000254 | 0.000254 | 0.000254 | 0.0 | 0.00 -Modify | 0.015259 | 0.015259 | 0.015259 | 0.0 | 0.06 -Other | | 0.004524 | | | 0.02 +Pair | 21.74 | 21.74 | 21.74 | 0.0 | 99.00 +Neigh | 0.18588 | 0.18588 | 0.18588 | 0.0 | 0.85 +Comm | 0.01476 | 0.01476 | 0.01476 | 0.0 | 0.07 +Output | 0.00022244 | 0.00022244 | 0.00022244 | 0.0 | 0.00 +Modify | 0.01356 | 0.01356 | 0.01356 | 0.0 | 0.06 +Other | | 0.004382 | | | 0.02 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -142,7 +140,6 @@ Neighbor list builds = 25 Dangerous builds = 25 clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units lj @@ -157,7 +154,7 @@ read_data melt.data 4000 velocities pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no @@ -186,20 +183,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 -Loop time of 22.9051 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.8255 on 1 procs for 250 steps with 4000 atoms -Performance: 4715.116 tau/day, 10.915 timesteps/s -60.1% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4948.331 tau/day, 11.454 timesteps/s +98.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 22.752 | 22.752 | 22.752 | 0.0 | 99.33 -Neigh | 0.12254 | 0.12254 | 0.12254 | 0.0 | 0.53 -Comm | 0.013385 | 0.013385 | 0.013385 | 0.0 | 0.06 -Output | 0.000254 | 0.000254 | 0.000254 | 0.0 | 0.00 -Modify | 0.014159 | 0.014159 | 0.014159 | 0.0 | 0.06 -Other | | 0.002851 | | | 0.01 +Pair | 21.707 | 21.707 | 21.707 | 0.0 | 99.46 +Neigh | 0.088455 | 0.088455 | 0.088455 | 0.0 | 0.41 +Comm | 0.01311 | 0.01311 | 0.01311 | 0.0 | 0.06 +Output | 0.00025082 | 0.00025082 | 0.00025082 | 0.0 | 0.00 +Modify | 0.013836 | 0.013836 | 0.013836 | 0.0 | 0.06 +Other | | 0.003096 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -214,4 +211,4 @@ Neighbor list builds = 12 Dangerous builds not checked shell rm melt.data melt.restart -Total wall time: 0:01:13 +Total wall time: 0:01:07 diff --git a/examples/python/log.4May17.pair_python_melt.g++.4 b/examples/python/log.4May17.pair_python_melt.g++.4 index 7e4ba25acf..d504efc4ac 100644 --- a/examples/python/log.4May17.pair_python_melt.g++.4 +++ b/examples/python/log.4May17.pair_python_melt.g++.4 @@ -1,5 +1,4 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task # 3d Lennard-Jones melt @@ -19,7 +18,7 @@ mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no @@ -48,20 +47,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6596605 -4.7699432 0 -2.2810749 5.7830138 200 1.6371874 -4.7365462 0 -2.2813789 5.9246674 250 1.6323462 -4.7292021 0 -2.2812949 5.9762238 -Loop time of 12.7083 on 4 procs for 250 steps with 4000 atoms +Loop time of 5.83903 on 4 procs for 250 steps with 4000 atoms -Performance: 8498.384 tau/day, 19.672 timesteps/s -31.5% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 18496.226 tau/day, 42.815 timesteps/s +98.2% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 11.491 | 11.96 | 12.464 | 10.0 | 94.11 -Neigh | 0.065058 | 0.065956 | 0.067066 | 0.3 | 0.52 -Comm | 0.16288 | 0.66706 | 1.1373 | 42.2 | 5.25 -Output | 0.000416 | 0.00085025 | 0.002121 | 0.0 | 0.01 -Modify | 0.010849 | 0.011123 | 0.011321 | 0.2 | 0.09 -Other | | 0.003005 | | | 0.02 +Pair | 5.152 | 5.5209 | 5.7679 | 9.6 | 94.55 +Neigh | 0.022809 | 0.023364 | 0.023891 | 0.3 | 0.40 +Comm | 0.041927 | 0.28952 | 0.65893 | 42.2 | 4.96 +Output | 0.0002389 | 0.00024772 | 0.00026727 | 0.0 | 0.00 +Modify | 0.0036368 | 0.0036796 | 0.0037563 | 0.1 | 0.06 +Other | | 0.001328 | | | 0.02 Nlocal: 1000 ave 1010 max 982 min Histogram: 1 0 0 0 0 0 1 0 0 2 @@ -79,7 +78,6 @@ write_data melt.data write_restart melt.restart clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task read_restart melt.restart @@ -88,7 +86,7 @@ read_restart melt.restart 4000 atoms pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj fix 1 all nve @@ -114,20 +112,20 @@ Step Temp E_pair E_mol TotEng Press 400 1.6388136 -4.7387093 0 -2.2811035 5.9331084 450 1.6431295 -4.7452215 0 -2.2811435 5.8929898 500 1.643316 -4.7454222 0 -2.2810644 5.8454817 -Loop time of 12.6852 on 4 procs for 250 steps with 4000 atoms +Loop time of 5.85683 on 4 procs for 250 steps with 4000 atoms -Performance: 8513.855 tau/day, 19.708 timesteps/s -31.6% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 18440.001 tau/day, 42.685 timesteps/s +98.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 11.653 | 11.92 | 12.472 | 9.6 | 93.97 -Neigh | 0.13284 | 0.13556 | 0.13729 | 0.5 | 1.07 -Comm | 0.051389 | 0.60884 | 0.88175 | 43.0 | 4.80 -Output | 0.000362 | 0.0046985 | 0.008143 | 5.1 | 0.04 -Modify | 0.011007 | 0.011344 | 0.011857 | 0.3 | 0.09 -Other | | 0.004278 | | | 0.03 +Pair | 5.2483 | 5.5095 | 5.7744 | 8.0 | 94.07 +Neigh | 0.047228 | 0.047998 | 0.049293 | 0.4 | 0.82 +Comm | 0.027134 | 0.29341 | 0.55554 | 34.6 | 5.01 +Output | 0.00020003 | 0.00021219 | 0.0002358 | 0.0 | 0.00 +Modify | 0.0035472 | 0.0036988 | 0.0038681 | 0.2 | 0.06 +Other | | 0.001984 | | | 0.03 Nlocal: 1000 ave 1012 max 983 min Histogram: 1 0 0 0 0 0 2 0 0 1 @@ -142,7 +140,6 @@ Neighbor list builds = 25 Dangerous builds = 25 clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units lj @@ -157,7 +154,7 @@ read_data melt.data 4000 velocities pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no @@ -186,20 +183,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6384234 -4.7389689 0 -2.2819482 5.9315273 200 1.6428814 -4.7460743 0 -2.2823683 5.8888228 250 1.6432631 -4.7466603 0 -2.2823818 5.8398819 -Loop time of 12.5324 on 4 procs for 250 steps with 4000 atoms +Loop time of 5.86684 on 4 procs for 250 steps with 4000 atoms -Performance: 8617.631 tau/day, 19.948 timesteps/s -31.6% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 18408.545 tau/day, 42.612 timesteps/s +98.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 11.648 | 11.918 | 12.387 | 8.3 | 95.10 -Neigh | 0.064038 | 0.06537 | 0.065914 | 0.3 | 0.52 -Comm | 0.065189 | 0.53362 | 0.80384 | 39.4 | 4.26 -Output | 0.000346 | 0.0007525 | 0.001938 | 0.0 | 0.01 -Modify | 0.011255 | 0.01155 | 0.011852 | 0.2 | 0.09 -Other | | 0.002751 | | | 0.02 +Pair | 5.3207 | 5.5695 | 5.8071 | 7.6 | 94.93 +Neigh | 0.023073 | 0.023405 | 0.023834 | 0.2 | 0.40 +Comm | 0.030558 | 0.2686 | 0.51789 | 34.7 | 4.58 +Output | 0.00028825 | 0.00036758 | 0.00042987 | 0.0 | 0.01 +Modify | 0.0034878 | 0.0036733 | 0.0039375 | 0.3 | 0.06 +Other | | 0.001259 | | | 0.02 Nlocal: 1000 ave 1013 max 989 min Histogram: 1 0 0 1 0 1 0 0 0 1 @@ -214,4 +211,4 @@ Neighbor list builds = 12 Dangerous builds not checked shell rm melt.data melt.restart -Total wall time: 0:00:39 +Total wall time: 0:00:18 diff --git a/examples/python/log.4May17.pair_python_spce.g++.1 b/examples/python/log.4May17.pair_python_spce.g++.1 index 4e429b9cdd..1a535df0e9 100644 --- a/examples/python/log.4May17.pair_python_spce.g++.1 +++ b/examples/python/log.4May17.pair_python_spce.g++.1 @@ -1,5 +1,4 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units real atom_style full @@ -22,11 +21,11 @@ read_data data.spce 1 = max # of 1-4 neighbors 2 = max # of special neighbors -pair_style hybrid/overlay python 12.0 coul/long 12.0 +pair_style hybrid/overlay coul/long 12.0 python 12.0 kspace_style pppm 1.0e-6 pair_coeff * * coul/long -pair_coeff * * python potentials.LJCutSPCE OW NULL +pair_coeff * * python py_pot.LJCutSPCE OW NULL bond_style harmonic angle_style harmonic @@ -68,16 +67,16 @@ Neighbor list info ... ghost atom cutoff = 14 binsize = 7, bins = 6 6 6 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair python, perpetual, skip from (2) - attributes: half, newton on - pair build: skip - stencil: none - bin: none - (2) pair coul/long, perpetual + (1) pair coul/long, perpetual attributes: half, newton on pair build: half/bin/newton stencil: half/bin/3d/newton bin: standard + (2) pair python, perpetual, skip from (1) + attributes: half, newton on + pair build: skip + stencil: none + bin: none Per MPI rank memory allocation (min/avg/max) = 41.05 | 41.05 | 41.05 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -16692.369 0 -16692.369 -1289.222 @@ -91,33 +90,33 @@ Step Temp E_pair E_mol TotEng Press 80 182.94811 -18155.978 0 -16520.523 -2393.3156 90 191.29902 -18197.887 0 -16487.779 -2242.7104 100 194.70949 -18195.021 0 -16454.425 -1955.2916 -Loop time of 63.3145 on 1 procs for 100 steps with 4500 atoms +Loop time of 23.0818 on 1 procs for 100 steps with 4500 atoms -Performance: 0.136 ns/day, 175.874 hours/ns, 1.579 timesteps/s -86.0% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 0.374 ns/day, 64.116 hours/ns, 4.332 timesteps/s +98.9% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 61.815 | 61.815 | 61.815 | 0.0 | 97.63 -Bond | 0.000132 | 0.000132 | 0.000132 | 0.0 | 0.00 -Kspace | 1.2226 | 1.2226 | 1.2226 | 0.0 | 1.93 -Neigh | 0.21684 | 0.21684 | 0.21684 | 0.0 | 0.34 -Comm | 0.015175 | 0.015175 | 0.015175 | 0.0 | 0.02 -Output | 0.000405 | 0.000405 | 0.000405 | 0.0 | 0.00 -Modify | 0.040088 | 0.040088 | 0.040088 | 0.0 | 0.06 -Other | | 0.003896 | | | 0.01 +Pair | 21.186 | 21.186 | 21.186 | 0.0 | 91.79 +Bond | 0.00022054 | 0.00022054 | 0.00022054 | 0.0 | 0.00 +Kspace | 1.5442 | 1.5442 | 1.5442 | 0.0 | 6.69 +Neigh | 0.25672 | 0.25672 | 0.25672 | 0.0 | 1.11 +Comm | 0.023787 | 0.023787 | 0.023787 | 0.0 | 0.10 +Output | 0.00060248 | 0.00060248 | 0.00060248 | 0.0 | 0.00 +Modify | 0.064809 | 0.064809 | 0.064809 | 0.0 | 0.28 +Other | | 0.005301 | | | 0.02 Nlocal: 4500 ave 4500 max 4500 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 21216 ave 21216 max 21216 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 1.44594e+06 ave 1.44594e+06 max 1.44594e+06 min +Neighs: 2.60176e+06 ave 2.60176e+06 max 2.60176e+06 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 1445935 -Ave neighs/atom = 321.319 +Total # of neighbors = 2601762 +Ave neighs/atom = 578.169 Ave special neighs/atom = 2 Neighbor list builds = 3 Dangerous builds = 0 -Total wall time: 0:01:05 +Total wall time: 0:00:23 diff --git a/examples/python/log.4May17.pair_python_spce.g++.4 b/examples/python/log.4May17.pair_python_spce.g++.4 index 15c11cd376..c277663287 100644 --- a/examples/python/log.4May17.pair_python_spce.g++.4 +++ b/examples/python/log.4May17.pair_python_spce.g++.4 @@ -1,5 +1,4 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units real atom_style full @@ -22,11 +21,11 @@ read_data data.spce 1 = max # of 1-4 neighbors 2 = max # of special neighbors -pair_style hybrid/overlay python 12.0 coul/long 12.0 +pair_style hybrid/overlay coul/long 12.0 python 12.0 kspace_style pppm 1.0e-6 pair_coeff * * coul/long -pair_coeff * * python potentials.LJCutSPCE OW NULL +pair_coeff * * python py_pot.LJCutSPCE OW NULL bond_style harmonic angle_style harmonic @@ -68,16 +67,16 @@ Neighbor list info ... ghost atom cutoff = 14 binsize = 7, bins = 6 6 6 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair python, perpetual, skip from (2) - attributes: half, newton on - pair build: skip - stencil: none - bin: none - (2) pair coul/long, perpetual + (1) pair coul/long, perpetual attributes: half, newton on pair build: half/bin/newton stencil: half/bin/3d/newton bin: standard + (2) pair python, perpetual, skip from (1) + attributes: half, newton on + pair build: skip + stencil: none + bin: none Per MPI rank memory allocation (min/avg/max) = 14.59 | 14.59 | 14.59 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -16692.369 0 -16692.369 -1289.222 @@ -91,33 +90,33 @@ Step Temp E_pair E_mol TotEng Press 80 182.94811 -18155.978 0 -16520.523 -2393.3156 90 191.29902 -18197.887 0 -16487.779 -2242.7104 100 194.70949 -18195.021 0 -16454.425 -1955.2916 -Loop time of 29.6024 on 4 procs for 100 steps with 4500 atoms +Loop time of 6.588 on 4 procs for 100 steps with 4500 atoms -Performance: 0.292 ns/day, 82.229 hours/ns, 3.378 timesteps/s -52.5% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 1.311 ns/day, 18.300 hours/ns, 15.179 timesteps/s +98.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 26.631 | 27.507 | 28.649 | 14.3 | 92.92 -Bond | 0.00021 | 0.00022675 | 0.000248 | 0.0 | 0.00 -Kspace | 0.72315 | 1.8708 | 2.7365 | 54.7 | 6.32 -Neigh | 0.10667 | 0.1067 | 0.10674 | 0.0 | 0.36 -Comm | 0.045357 | 0.054035 | 0.064607 | 3.6 | 0.18 -Output | 0.000424 | 0.00086625 | 0.002189 | 0.0 | 0.00 -Modify | 0.056602 | 0.056667 | 0.056763 | 0.0 | 0.19 -Other | | 0.006337 | | | 0.02 +Pair | 5.3756 | 5.5417 | 5.8745 | 8.3 | 84.12 +Bond | 0.0001049 | 0.00013965 | 0.0001812 | 0.0 | 0.00 +Kspace | 0.54765 | 0.87786 | 1.042 | 20.8 | 13.33 +Neigh | 0.072695 | 0.072884 | 0.072973 | 0.0 | 1.11 +Comm | 0.04138 | 0.043576 | 0.045475 | 0.7 | 0.66 +Output | 0.00041032 | 0.00043947 | 0.00052142 | 0.0 | 0.01 +Modify | 0.047381 | 0.047567 | 0.047745 | 0.1 | 0.72 +Other | | 0.003845 | | | 0.06 Nlocal: 1125 ave 1154 max 1092 min Histogram: 1 0 0 0 1 0 0 1 0 1 Nghost: 12256.2 ave 12296 max 12213 min Histogram: 1 0 1 0 0 0 0 0 1 1 -Neighs: 361484 ave 376583 max 347969 min +Neighs: 650440 ave 678828 max 626375 min Histogram: 1 0 0 0 2 0 0 0 0 1 -Total # of neighbors = 1445935 -Ave neighs/atom = 321.319 +Total # of neighbors = 2601762 +Ave neighs/atom = 578.169 Ave special neighs/atom = 2 Neighbor list builds = 3 Dangerous builds = 0 -Total wall time: 0:00:30 +Total wall time: 0:00:06 diff --git a/examples/python/log.4May17.pair_python_table.g++.1 b/examples/python/log.4May17.pair_python_table.g++.1 index 21d42693ba..bd3e86501b 100644 --- a/examples/python/log.4May17.pair_python_table.g++.1 +++ b/examples/python/log.4May17.pair_python_table.g++.1 @@ -18,10 +18,10 @@ mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj # generate tabulated potential from python variant -pair_write 1 1 10000 rsq 0.01 2.5 lj_1_1.table LJ +pair_write 1 1 2000 rsq 0.01 2.5 lj_1_1.table LJ Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 @@ -35,9 +35,9 @@ Neighbor list info ... stencil: half/bin/3d/newton bin: standard -pair_style table linear 10000 +pair_style table linear 2000 pair_coeff 1 1 lj_1_1.table LJ -WARNING: 1 of 1000 force values in table are inconsistent with -dE/dr. +WARNING: 2 of 2000 force values in table are inconsistent with -dE/dr. Should only be flagged at inflection points (../pair_table.cpp:476) neighbor 0.3 bin @@ -61,36 +61,36 @@ Neighbor list info ... bin: standard Per MPI rank memory allocation (min/avg/max) = 3.184 | 3.184 | 3.184 Mbytes Step Temp E_pair E_mol TotEng Press - 0 3 -6.7733675 0 -2.2744925 -3.7033435 - 50 1.6758875 -4.7951764 0 -2.2819736 5.6705794 - 100 1.6458266 -4.7488945 0 -2.2807717 5.8696895 - 150 1.6324439 -4.7283321 0 -2.2802784 5.9594952 - 200 1.6630547 -4.7746809 0 -2.2807225 5.7372657 - 250 1.6278968 -4.7226363 0 -2.2814016 5.9559236 -Loop time of 1.0498 on 1 procs for 250 steps with 4000 atoms + 0 3 -6.7733629 0 -2.2744879 -3.7032813 + 50 1.6758731 -4.7953067 0 -2.2821255 5.6706553 + 100 1.6458118 -4.7490281 0 -2.2809276 5.8697466 + 150 1.632425 -4.7284533 0 -2.2804279 5.9595684 + 200 1.6631578 -4.7749889 0 -2.2808759 5.7365839 + 250 1.6277062 -4.7224727 0 -2.2815238 5.9572913 +Loop time of 0.996652 on 1 procs for 250 steps with 4000 atoms -Performance: 102877.190 tau/day, 238.142 timesteps/s -99.7% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 108362.785 tau/day, 250.840 timesteps/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.93242 | 0.93242 | 0.93242 | 0.0 | 88.82 -Neigh | 0.088495 | 0.088495 | 0.088495 | 0.0 | 8.43 -Comm | 0.012153 | 0.012153 | 0.012153 | 0.0 | 1.16 -Output | 0.00013924 | 0.00013924 | 0.00013924 | 0.0 | 0.01 -Modify | 0.013729 | 0.013729 | 0.013729 | 0.0 | 1.31 -Other | | 0.002855 | | | 0.27 +Pair | 0.87999 | 0.87999 | 0.87999 | 0.0 | 88.29 +Neigh | 0.087921 | 0.087921 | 0.087921 | 0.0 | 8.82 +Comm | 0.012098 | 0.012098 | 0.012098 | 0.0 | 1.21 +Output | 0.00013614 | 0.00013614 | 0.00013614 | 0.0 | 0.01 +Modify | 0.01363 | 0.01363 | 0.01363 | 0.0 | 1.37 +Other | | 0.002882 | | | 0.29 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 5504 ave 5504 max 5504 min +Nghost: 5500 ave 5500 max 5500 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 151497 ave 151497 max 151497 min +Neighs: 151496 ave 151496 max 151496 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 151497 -Ave neighs/atom = 37.8743 +Total # of neighbors = 151496 +Ave neighs/atom = 37.874 Neighbor list builds = 12 Dangerous builds not checked diff --git a/examples/python/log.4May17.pair_python_table.g++.4 b/examples/python/log.4May17.pair_python_table.g++.4 index a64ebd6631..8dfe82097e 100644 --- a/examples/python/log.4May17.pair_python_table.g++.4 +++ b/examples/python/log.4May17.pair_python_table.g++.4 @@ -18,10 +18,10 @@ mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj # generate tabulated potential from python variant -pair_write 1 1 10000 rsq 0.01 2.5 lj_1_1.table LJ +pair_write 1 1 2000 rsq 0.01 2.5 lj_1_1.table LJ Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 @@ -35,9 +35,9 @@ Neighbor list info ... stencil: half/bin/3d/newton bin: standard -pair_style table linear 10000 +pair_style table linear 2000 pair_coeff 1 1 lj_1_1.table LJ -WARNING: 1 of 10000 force values in table are inconsistent with -dE/dr. +WARNING: 2 of 2000 force values in table are inconsistent with -dE/dr. Should only be flagged at inflection points (../pair_table.cpp:476) neighbor 0.3 bin @@ -61,36 +61,36 @@ Neighbor list info ... bin: standard Per MPI rank memory allocation (min/avg/max) = 2.69 | 2.69 | 2.69 Mbytes Step Temp E_pair E_mol TotEng Press - 0 3 -6.7733675 0 -2.2744925 -3.7033435 - 50 1.6754092 -4.794723 0 -2.2822376 5.6616601 - 100 1.6503295 -4.7559815 0 -2.2811061 5.8051261 - 150 1.6596603 -4.7699379 0 -2.2810699 5.7830168 - 200 1.6371948 -4.7365549 0 -2.2813766 5.9245585 - 250 1.6321199 -4.7288017 0 -2.2812339 5.9776124 -Loop time of 0.313548 on 4 procs for 250 steps with 4000 atoms + 0 3 -6.7733629 0 -2.2744879 -3.7032813 + 50 1.675395 -4.7945736 0 -2.2821094 5.6620623 + 100 1.6503067 -4.7558145 0 -2.2809733 5.8055967 + 150 1.6595852 -4.7697199 0 -2.2809644 5.7837898 + 200 1.6371471 -4.7363942 0 -2.2812874 5.924977 + 250 1.6315623 -4.7278268 0 -2.2810951 5.9807196 +Loop time of 0.300176 on 4 procs for 250 steps with 4000 atoms -Performance: 344444.576 tau/day, 797.325 timesteps/s -99.1% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 359789.395 tau/day, 832.846 timesteps/s +99.3% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.24963 | 0.25443 | 0.2632 | 1.1 | 81.15 -Neigh | 0.023249 | 0.023735 | 0.024497 | 0.3 | 7.57 -Comm | 0.020689 | 0.030402 | 0.035249 | 3.4 | 9.70 -Output | 0.00020766 | 0.00021476 | 0.00023031 | 0.0 | 0.07 -Modify | 0.0034959 | 0.0035564 | 0.0036762 | 0.1 | 1.13 -Other | | 0.001206 | | | 0.38 +Pair | 0.23104 | 0.23876 | 0.2451 | 1.2 | 79.54 +Neigh | 0.022763 | 0.023687 | 0.024305 | 0.4 | 7.89 +Comm | 0.025416 | 0.032499 | 0.041304 | 3.7 | 10.83 +Output | 0.00015378 | 0.00016057 | 0.00017667 | 0.0 | 0.05 +Modify | 0.0035894 | 0.0036637 | 0.0037456 | 0.1 | 1.22 +Other | | 0.001409 | | | 0.47 -Nlocal: 1000 ave 1010 max 982 min +Nlocal: 1000 ave 1010 max 981 min Histogram: 1 0 0 0 0 0 1 0 0 2 -Nghost: 2703.75 ave 2713 max 2689 min -Histogram: 1 0 0 0 0 0 0 2 0 1 -Neighs: 37915.5 ave 39231 max 36202 min +Nghost: 2703 ave 2715 max 2688 min Histogram: 1 0 0 0 0 1 1 0 0 1 +Neighs: 37915.2 ave 39191 max 36151 min +Histogram: 1 0 0 0 0 1 0 1 0 1 -Total # of neighbors = 151662 -Ave neighs/atom = 37.9155 +Total # of neighbors = 151661 +Ave neighs/atom = 37.9153 Neighbor list builds = 12 Dangerous builds not checked diff --git a/examples/python/py_pot.py b/examples/python/py_pot.py index dbce8cd445..5699bd082c 100644 --- a/examples/python/py_pot.py +++ b/examples/python/py_pot.py @@ -1,73 +1,65 @@ from __future__ import print_function -class LJCutMelt(object): - +class LAMMPSPairPotential(object): def __init__(self): self.pmap=dict() - # set coeffs: eps, sig, 48*eps*sig**12, 24*eps*sig**6, - # 4*eps*sig**12, 4*eps*sig**6 - self.coeff = {'lj' : {'lj' : (1.0,1.0,48.0,24.0,4.0,4.0), - 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}, - 'NULL': {'lj' : (0.0,1.0, 0.0, 0.0,0.0,0.0), - 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}} + self.units='lj' + def map_coeff(self,name,ltype): + self.pmap[ltype]=name + def check_units(self,units): + if (units != self.units): + raise Exception("Conflicting units: %s vs. %s" % (self.units,units)) - def map_coeff(self,name,type): - if name in self.coeff: - self.pmap[type] = name - else: - raise Exception("cannot match atom type %s" % name) +class LJCutMelt(LAMMPSPairPotential): + def __init__(self): + super(LJCutMelt,self).__init__() + # set coeffs: 48*eps*sig**12, 24*eps*sig**6, + # 4*eps*sig**12, 4*eps*sig**6 + self.units = 'lj' + self.coeff = {'lj' : {'lj' : (48.0,24.0,4.0,4.0)}} def compute_force(self,rsq,itype,jtype): coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj1 = coeff[2] - lj2 = coeff[3] - return (r6inv * (lj1*r6inv - lj2)) + lj1 = coeff[0] + lj2 = coeff[1] + return (r6inv * (lj1*r6inv - lj2))*r2inv def compute_energy(self,rsq,itype,jtype): coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj3 = coeff[4] - lj4 = coeff[5] + lj3 = coeff[2] + lj4 = coeff[3] return (r6inv * (lj3*r6inv - lj4)) -class LJCutSPCE(object): +class LJCutSPCE(LAMMPSPairPotential): def __init__(self): - self.pmap=dict() - # SPCE oxygen in real units + super(LJCutSPCE,self).__init__() + self.units='real' + # SPCE oxygen LJ parameters in real units eps=0.15535 sig=3.166 - - # set coeffs: eps, sig, 48*eps*sig**12, 24*eps*sig**6, - # 4*eps*sig**12, 4*eps*sig**6 - self.coeff = {'OW' : {'OW' : (1.0,1.0, - 48.0*eps*sig**12,24.0*eps*sig**6, - 4.0*eps*sig**12, 4.0*eps*sig**6), - 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}, - 'NULL': {'OW' : (0.0,1.0, 0.0, 0.0,0.0,0.0), - 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}} - - def map_coeff(self,name,type): - if name in self.coeff: - self.pmap[type] = name - else: - raise Exception("cannot match atom type %s" % name) + self.coeff = {'OW' : {'OW' : (48.0*eps*sig**12,24.0*eps*sig**6, + 4.0*eps*sig**12, 4.0*eps*sig**6), + 'HW' : (0.0,0.0, 0.0,0.0)}, + 'HW' : {'OW' : (0.0,0.0, 0.0,0.0), + 'HW' : (0.0,0.0, 0.0,0.0)}} def compute_force(self,rsq,itype,jtype): coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj1 = coeff[2] - lj2 = coeff[3] - return (r6inv * (lj1*r6inv - lj2)) + lj1 = coeff[0] + lj2 = coeff[1] + return (r6inv * (lj1*r6inv - lj2))*r2inv def compute_energy(self,rsq,itype,jtype): coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj3 = coeff[4] - lj4 = coeff[5] + lj3 = coeff[2] + lj4 = coeff[3] return (r6inv * (lj3*r6inv - lj4)) diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 1d80145c58..384aa5a94b 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -24,6 +24,7 @@ #include "comm.h" #include "force.h" #include "memory.h" +#include "update.h" #include "neigh_list.h" #include "python.h" #include "error.h" @@ -41,9 +42,10 @@ PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) { one_coeff = 1; reinitflag = 0; - python->init(); - py_potential = NULL; + skip_types = NULL; + + python->init(); // add current directory to PYTHONPATH PyObject * py_path = PySys_GetObject((char *)"path"); @@ -60,7 +62,8 @@ PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) { PairPython::~PairPython() { - if(py_potential) Py_DECREF((PyObject*) py_potential); + if (py_potential) Py_DECREF((PyObject*) py_potential); + delete[] skip_types; if (allocated) { memory->destroy(setflag); @@ -160,6 +163,9 @@ void PairPython::compute(int eflag, int vflag) rsq = delx*delx + dely*dely + delz*delz; jtype = type[j]; + // with hybrid/overlay we might get called for skipped types + if (skip_types[itype] || skip_types[jtype]) continue; + py_jtype = PY_INT_FROM_LONG(jtype); PyTuple_SetItem(py_compute_args,2,py_jtype); @@ -173,7 +179,7 @@ void PairPython::compute(int eflag, int vflag) PyGILState_Release(gstate); error->all(FLERR,"Calling 'compute_force' function failed"); } - fpair = factor_lj*PyFloat_AsDouble(py_value)/rsq; + fpair = factor_lj*PyFloat_AsDouble(py_value); f[i][0] += delx*fpair; f[i][1] += dely*fpair; @@ -299,6 +305,39 @@ void PairPython::coeff(int narg, char **arg) py_potential = (void *) py_pair_instance; + PyObject *py_check_units = PyObject_GetAttrString(py_pair_instance,"check_units"); + if (!py_check_units) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not find 'check_units' method'"); + } + if (!PyCallable_Check(py_check_units)) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Python 'check_units' is not callable"); + } + PyObject *py_units_args = PyTuple_New(1); + if (!py_units_args) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not create tuple for 'check_units' function arguments"); + } + + PyObject *py_name = PY_STRING_FROM_STRING(update->unit_style); + PyTuple_SetItem(py_units_args,0,py_name); + PyObject *py_value = PyObject_CallObject(py_check_units,py_units_args); + if (!py_value) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Calling 'check_units' function failed"); + } + Py_DECREF(py_units_args); + + PyObject *py_map_coeff = PyObject_GetAttrString(py_pair_instance,"map_coeff"); if (!py_map_coeff) { PyErr_Print(); @@ -321,9 +360,15 @@ void PairPython::coeff(int narg, char **arg) error->all(FLERR,"Could not create tuple for 'map_coeff' function arguments"); } - PyObject *py_type, *py_name, *py_value; + delete[] skip_types; + skip_types = new int[ntypes+1]; + skip_types[0] = 1; for (int i = 1; i <= ntypes ; i++) { - py_type = PY_INT_FROM_LONG(i); + if (strcmp(arg[2+i],"NULL") == 0) { + skip_types[i] = 1; + continue; + } else skip_types[i] = 0; + PyObject *py_type = PY_INT_FROM_LONG(i); py_name = PY_STRING_FROM_STRING(arg[2+i]); PyTuple_SetItem(py_map_args,0,py_name); PyTuple_SetItem(py_map_args,1,py_type); @@ -336,10 +381,8 @@ void PairPython::coeff(int narg, char **arg) } for (int j = i; j <= ntypes ; j++) { - if (strcmp(arg[2+i],"NULL") != 0) { - setflag[i][j] = 1; - cutsq[i][j] = cut_global*cut_global; - } + setflag[i][j] = 1; + cutsq[i][j] = cut_global*cut_global; } } Py_DECREF(py_map_args); @@ -359,6 +402,11 @@ double PairPython::single(int i, int j, int itype, int jtype, double rsq, double factor_coul, double factor_lj, double &fforce) { + // with hybrid/overlay we might get called for skipped types + if (skip_types[itype] || skip_types[jtype]) { + fforce = 0.0; + return 0.0; + } // prepare access to compute_force and compute_energy functions @@ -417,7 +465,7 @@ double PairPython::single(int i, int j, int itype, int jtype, double rsq, PyGILState_Release(gstate); error->all(FLERR,"Calling 'compute_force' function failed"); } - fforce = factor_lj*PyFloat_AsDouble(py_value)/rsq; + fforce = factor_lj*PyFloat_AsDouble(py_value); py_value = PyObject_CallObject(py_compute_energy,py_compute_args); if (!py_value) { diff --git a/src/PYTHON/pair_python.h b/src/PYTHON/pair_python.h index 3c9c34fbdf..440b39e482 100644 --- a/src/PYTHON/pair_python.h +++ b/src/PYTHON/pair_python.h @@ -47,6 +47,7 @@ class PairPython : public Pair { protected: double cut_global; void * py_potential; + int * skip_types; virtual void allocate(); }; -- GitLab From 9725708b90b9e9c3106ed0fa3c065a4c8cf2c0b1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 00:29:02 -0400 Subject: [PATCH 152/593] update pair style python docs --- doc/src/pair_python.txt | 197 +++++++++++++++++++++++++++------------- 1 file changed, 136 insertions(+), 61 deletions(-) diff --git a/doc/src/pair_python.txt b/doc/src/pair_python.txt index 2f034031f1..2e2a528b7f 100644 --- a/doc/src/pair_python.txt +++ b/doc/src/pair_python.txt @@ -26,86 +26,161 @@ pair_coeff * * python py_pot.LJCutSPCE OW NULL :pre [Description:] The {python} pair style provides a way to define pairwise additive -potential functions as scripted python script code that is loaded -into LAMMPS from a python file which must contain specific python -class definitions. This allows to model potentials, that are not -currently available in LAMMPS without having to program a new -pair style or modify an existing one and recompile LAMMPS. Due to -python being an interpreted language, the performance of this pair -style is going to be significantly slower (often between 20x and 100x), -but this penalty can be significantly reduced through generating -tabulations from the python code through the "pair_write"_pair_write.html -command. +potential functions as python script code that is loaded into LAMMPS +from a python file which must contain specific python class definitions. +This allows to rapidly evaluate different potential functions without +having to modify and recompile LAMMPS. Due to python being an +interpreted language, however, the performance of this pair style is +going to be significantly slower (often between 20x and 100x) than +corresponding compiled code. This penalty can be significantly reduced +through generating tabulations from the python code through the +"pair_write"_pair_write.html command, which is supported by this style. Only a single pair_coeff command is used with the {python} pair style -which specifies a python class inside a python module that LAMMPS will -look up either in the current directory, the folder pointed to by the -LAMMPS_POTENTIALS environment variable or somewhere in your python path. -The class definition has to follow specific rules as explained below. +which specifies a python class inside a python module or file that +LAMMPS will look up in the current directory, the folder pointed to by +the LAMMPS_POTENTIALS environment variable or somewhere in your python +path. A single python module can hold multiple python pair class +definitions. The class definitions itself have to follow specific rules +that are explained below. Atom types in the python class are specified through symbolic constants, typically strings. These are mapped to LAMMPS atom types by specifying -N additional arguments after the filename in the pair_coeff command, -where N is the number of LAMMPS atom types: - -module.class -N element names = mapping of python atom types to LAMMPS atom types :ul - -As an example, imagine a file py_pot.py has a python class LJCutMelt -with parameters and potential functions for a two Lennard-Jones -atom types labeled as 'LJ1' and 'LJ2', and you would have defined -4 atom types in LAMMPS, out which the first three are supposed to be -using the 'LJ1' parameters and the fourth the 'LJ2' parameters, then -you would use the following pair_coeff command: - -pair_coeff * * py_pot.LJCutMelt LJ1 LJ1 LJ1 LJ2 :pre - -The 1st 2 arguments must be * * so as to span all LAMMPS atom types. -The first three LJ1 arguments map LAMMPS atom types 1,2,3 to the LJ1 -atom type in the py_pot.py file. The final LJ2 argument maps LAMMPS -atom type 4 to the LJ2 atom type the python file. If a mapping value -is specified as NULL, the mapping is not performed. This can be used -when a {python} potential is used as part of the {hybrid} pair style. -The NULL values are placeholders for atom types that will be used with -other potentials. - -The python potential file has to provide classes for the computation -of the potential energy and forces, which have to contain three methods: -{map_coeff}, {compute_force}, and {compute_energy}. For details please -see the provided examples in the examples/python folder. +N additional arguments after the class name in the pair_coeff command, +where N must be the number of currently defined atom types: + +As an example, imagine a file {py_pot.py} has a python potential class +names {LJCutMelt} with parameters and potential functions for a two +Lennard-Jones atom types labeled as 'LJ1' and 'LJ2'. In your LAMMPS +input and you would have defined 3 atom types, out of which the first +two are supposed to be using the 'LJ1' parameters and the third +the 'LJ2' parameters, then you would use the following pair_coeff +command: + +pair_coeff * * py_pot.LJCutMelt LJ1 LJ1 LJ2 :pre + +The first two arguments [must] be * * so as to span all LAMMPS atom types. +The first two LJ1 arguments map LAMMPS atom types 1 and 2 to the LJ1 +atom type in the LJCutMelt class of the py_pot.py file. The final LJ2 +argument maps LAMMPS atom type 3 to the LJ2 atom type the python file. +If a mapping value is specified as NULL, the mapping is not performed, +any pair interaction with this atom type will be skipped. This can be +used when a {python} potential is used as part of the {hybrid} or +{hybrid/overlay} pair style. The NULL values are then placeholders for +atom types that will be used with other potentials. + +:line + +The python potential file has to start with the following code: + +from __future__ import print_function + +class LAMMPSPairPotential(object): + def __init__(self): + self.pmap=dict() + self.units='lj' + def map_coeff(self,name,ltype): + self.pmap[ltype]=name + def check_units(self,units): + if (units != self.units): + raise Exception("Conflicting units: %s vs. %s" % (self.units,units)) +:pre + +Any classes with definitions of specific potentials have to be derived +from this class and should be initialize in a similar fashion to the +example given below. NOTE: The class constructor has to set up a data +structure containing the potential parameters supported by this class. +It should also define a variable {self.units} containing a string +matching one of the options of LAMMPS' "units command"_units.html, which +is used to verify, that the potential definition in the python class and +in the LAMMPS input match. Example for a single type Lennard-Jones +potential class {LJCutMelt} in reducted units, which defines an atom +type {lj} for which the parameters epsilon and sigma are both 1.0: + +class LJCutMelt(LAMMPSPairPotential): + def __init__(self): + super(LJCutMelt,self).__init__() + # set coeffs: 48*eps*sig**12, 24*eps*sig**6, + # 4*eps*sig**12, 4*eps*sig**6 + self.units = 'lj' + self.coeff = {'lj' : {'lj' : (48.0,24.0,4.0,4.0)}} +:pre + +The class also has to provide two methods for the computation of the +potential energy and forces, which have be named {compute_force}, +and {compute_energy}, which both take 3 numerical arguments: + + rsq = the square of the distance between a pair of atoms (float) :li + itype = the (numerical) type of the first atom :li + jtype = the (numerical) type of the second atom :ul + +This functions need to compute the force and the energy, respectively, +and use the result as return value. The functions need to use the +{pmap} dictionary to convert the LAMMPS atom type number to the symbolic +value of the internal potential parameter data structure. Following +the {LJCutMelt} example, here are the two functions: + + def compute_force(self,rsq,itype,jtype): + coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] + r2inv = 1.0/rsq + r6inv = r2inv*r2inv*r2inv + lj1 = coeff[0] + lj2 = coeff[1] + return (r6inv * (lj1*r6inv - lj2))*r2inv :pre + + def compute_energy(self,rsq,itype,jtype): + coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] + r2inv = 1.0/rsq + r6inv = r2inv*r2inv*r2inv + lj3 = coeff[2] + lj4 = coeff[3] + return (r6inv * (lj3*r6inv - lj4)) :pre + +IMPORTANT NOTE: for consistency with the C++ pair styles in LAMMPS, +the {compute_force} function follows the conventions of the Pair::single() +methods and does not return the full force, but the force scaled by +the distance between the two atoms, so this value only needs to be +multiplied by delta x, delta y, and delta z to conveniently obtain +the three components of the force vector between these two atoms. :line IMPORTANT NOTE: The evaluation of scripted python code will slow down -the computation pair-wise interactions very significantly. However, +the computation pair-wise interactions quite significantly. However, this can be largely worked around through using the python pair style -to generate tabulated potentials on the fly. Please see below for an -example of how to build the table file: +not for the actual simulation, but to generate tabulated potentials +on the fly using the "pair_write command"_pair_write.html . Please +see below for an example LAMMPS input of how to build a table file: pair_style python 2.5 -pair_coeff * * py_pot.LJCutMelt LJ1 LJ2 LJ2 -shell rm -f lj1_lj2.table -pair_write 1 1 10000 rsq 0.01 2.5 lj1_lj2.table LJ1-LJ1 -pair_write 1 2 10000 rsq 0.01 2.5 lj1_lj2.table LJ1-LJ2 -pair_write 2 2 10000 rsq 0.01 2.5 lj1_lj2.table LJ2-LJ2 :pre +pair_coeff * * py_pot.LJCutMelt lj +shell rm -f melt.table +pair_write 1 1 2000 rsq 0.01 2.5 lj1_lj2.table lj :pre + +Note, that it is strong recommended to try to [delete] the potential +table file before generating it. Since the {pair_write} command will +always append to a table file, which pair style table will use the first +match. Thus when changing the potential function in the python class, +the table pair style will still read the old variant. + +After switching the pair style to {table}, the potential tables need +to be assigned to the LAMMPS atom types like this: -After switching the pair style to {table}, the various potential -function tables need to be assigned to the LAMMPS atom types: +pair_style table linear 2000 +pair_coeff 1 1 melt.table lj :pre -pair_style table linear 10000 -pair_coeff 1 1 lj1_lj2.table LJ1-LJ1 -pair_coeff 1 2* lj1_lj2.table LJ1-LJ2 -pair_coeff 2* 2* lj1_lj2.table LJ2-LJ2 :pre +This can also be done for more complex systems. Please see the +{examples/python} folders for a few more examples. :line [Mixing, shift, table, tail correction, restart, rRESPA info]: -Mixing of potential parameters has to be handled inside the -provided python module. The python pair style assumes that force -and energy computation can be correctly performed for all -pairs of atom types as they are mapped to the atom type labels -inside the python potential class. +Mixing of potential parameters has to be handled inside the provided +python module. The python pair style simply assumes that force and +energy computation can be correctly performed for all pairs of atom +types as they are mapped to the atom type labels inside the python +potential class. This pair style does not support the "pair_modify"_pair_modify.html shift, table, and tail options. -- GitLab From 9833f38499a06fadc1861d3270ec88bcea54dbbc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 00:30:19 -0400 Subject: [PATCH 153/593] change coulomb example to use cutoff coulomb --- examples/python/in.pair_python_coulomb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/python/in.pair_python_coulomb b/examples/python/in.pair_python_coulomb index 5944592473..7eb8599ac2 100644 --- a/examples/python/in.pair_python_coulomb +++ b/examples/python/in.pair_python_coulomb @@ -3,14 +3,11 @@ atom_style full read_data data.spce -pair_style hybrid/overlay coul/long 12.0 python 12.0 -kspace_style pppm 1.0e-6 +pair_style hybrid/overlay coul/cut 12.0 python 12.0 -pair_coeff * * coul/long +pair_coeff * * coul/cut pair_coeff * * python py_pot.LJCutSPCE OW NULL -pair_modify table 0 - bond_style harmonic angle_style harmonic dihedral_style none -- GitLab From 436d3fd761881b402e68acaf76cb1913848fbf90 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 00:30:41 -0400 Subject: [PATCH 154/593] make hybrid example use half the atoms with python, half with lj/cut --- examples/python/in.pair_python_hybrid | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/python/in.pair_python_hybrid b/examples/python/in.pair_python_hybrid index d5db729bda..5d5157ae6d 100644 --- a/examples/python/in.pair_python_hybrid +++ b/examples/python/in.pair_python_hybrid @@ -8,6 +8,8 @@ region box block 0 10 0 10 0 10 create_box 2 box create_atoms 1 box mass * 1.0 +region half block -0.1 4.9 0 10 0 10 +set region half type 2 velocity all create 3.0 87287 -- GitLab From 09f3b687f7d76fa407ffccb00fb43ea00fbbf43d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 00:31:15 -0400 Subject: [PATCH 155/593] new long-rance example with using hybrid/overlay and table only for lj part --- examples/python/in.pair_python_long | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 examples/python/in.pair_python_long diff --git a/examples/python/in.pair_python_long b/examples/python/in.pair_python_long new file mode 100644 index 0000000000..a600e824df --- /dev/null +++ b/examples/python/in.pair_python_long @@ -0,0 +1,38 @@ +units real +atom_style full + +read_data data.spce + +pair_style python 12.0 +pair_coeff * * py_pot.LJCutSPCE OW HW + +bond_style harmonic +angle_style harmonic +dihedral_style none +improper_style none + +bond_coeff 1 1000.00 1.000 +angle_coeff 1 100.0 109.47 + +special_bonds lj/coul 0.0 0.0 1.0 + +neighbor 2.0 bin + +fix 1 all shake 0.0001 20 0 b 1 a 1 +fix 2 all nvt temp 300.0 300.0 100.0 + +# create only lj/cut table for the oxygen atoms from python +shell rm -f spce.table +pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW + +# switch to tabulated potential with long-range coulomb as overlay +pair_style hybrid/overlay coul/long 12.0 table linear 2000 +kspace_style pppm 1.0e-6 +pair_coeff * * coul/long +pair_coeff 1 1 table spce.table OW-OW + +thermo 10 +run 100 + +shell rm spce.table + -- GitLab From 8d46aa605606a5ac047077c4827fc87ea4da98f0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 00:31:54 -0400 Subject: [PATCH 156/593] add readme file to discuss various python pair style usage examples --- examples/python/README.pair_python | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 examples/python/README.pair_python diff --git a/examples/python/README.pair_python b/examples/python/README.pair_python new file mode 100644 index 0000000000..3844a2676e --- /dev/null +++ b/examples/python/README.pair_python @@ -0,0 +1,41 @@ +This folder contains several LAMMPS input scripts and a python module +file py_pot.py to demonstrate the use of the pair style python. + +in.pair_python_melt: +This is a version of the melt example using the python pair style. The first +part of the output should have identical energies, temperature and pressure +than the melt example. The following two sections then demonstrate how to +restart with pair style python from a restart file and a data file. + +in.pair_python_hybrid: +This versions shows how to mix regular pair styles with a python pair style. +However, in this case both potentials are the same, so the energies and +pressure in the output should be identical to that of the previous example. + +in.pair_python_spce: +This input shows a simulation of small bulk water system with the SPC/E +water potential. Since the python pair style does not support computing +coulomb contributions, pair style hybrid/overload is used to combine +the python style containing the Lennard-Jones part with the long-range coulomb. +Same as for the previous example, it also showcases restarting. + +in.pair_python_table: +This input demonstrates the use of using the python pair style to build +a table file for use with pair style table. This will run much faster +than the python pair style. This example tabulates the melt example from +above. Note that tabulation is approximative, so the output will only +agree with the melt result to some degree. + +in.pair_python_coulomb: +This is another tabulation example, this time for the SPC/E water example +with cutoff coulomb interactions. +Please note, that tabulating long-range coulomb has a systematic error in +forces and energies for all systems with bonds, angle and dihedrals. +In this case, this will only affect the energies, since the water molecules +are held rigid with fix shake. To enable long-range coulomb the coul/cut +style needs to be replaced with coul/long, a suitable kspace style added +and the pppm keyword added to the table pair style definition. + +in.pair_python_long: +The final example shows how to combine long-range coulomb with tabulation +for only the short range interactions via pair style hybrid/overlay. -- GitLab From 24654ad28f378ecfbe7b321369bf1fc5e414fcc2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 00:38:36 -0400 Subject: [PATCH 157/593] small formatting corrections to pair python style --- doc/src/pair_python.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/src/pair_python.txt b/doc/src/pair_python.txt index 2e2a528b7f..84927e52d9 100644 --- a/doc/src/pair_python.txt +++ b/doc/src/pair_python.txt @@ -80,7 +80,7 @@ class LAMMPSPairPotential(object): self.pmap=dict() self.units='lj' def map_coeff(self,name,ltype): - self.pmap[ltype]=name + self.pmap\[ltype\]=name def check_units(self,units): if (units != self.units): raise Exception("Conflicting units: %s vs. %s" % (self.units,units)) @@ -91,7 +91,7 @@ from this class and should be initialize in a similar fashion to the example given below. NOTE: The class constructor has to set up a data structure containing the potential parameters supported by this class. It should also define a variable {self.units} containing a string -matching one of the options of LAMMPS' "units command"_units.html, which +matching one of the options of LAMMPS' "units"_units.html command, which is used to verify, that the potential definition in the python class and in the LAMMPS input match. Example for a single type Lennard-Jones potential class {LJCutMelt} in reducted units, which defines an atom @@ -121,19 +121,19 @@ value of the internal potential parameter data structure. Following the {LJCutMelt} example, here are the two functions: def compute_force(self,rsq,itype,jtype): - coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] + coeff = self.coeff\[self.pmap\[itype\]\]\[self.pmap\[jtype\]\] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj1 = coeff[0] - lj2 = coeff[1] + lj1 = coeff\[0\] + lj2 = coeff\[1\] return (r6inv * (lj1*r6inv - lj2))*r2inv :pre def compute_energy(self,rsq,itype,jtype): - coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] + coeff = self.coeff\[self.pmap\[itype\]\]\[self.pmap\[jtype\]\] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj3 = coeff[2] - lj4 = coeff[3] + lj3 = coeff\[2\] + lj4 = coeff\[3\] return (r6inv * (lj3*r6inv - lj4)) :pre IMPORTANT NOTE: for consistency with the C++ pair styles in LAMMPS, @@ -149,7 +149,7 @@ IMPORTANT NOTE: The evaluation of scripted python code will slow down the computation pair-wise interactions quite significantly. However, this can be largely worked around through using the python pair style not for the actual simulation, but to generate tabulated potentials -on the fly using the "pair_write command"_pair_write.html . Please +on the fly using the "pair_write"_pair_write.html command. Please see below for an example LAMMPS input of how to build a table file: pair_style python 2.5 -- GitLab From 0208fe9996be246d389fd05d0a7d3be995dc324d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 00:46:49 -0400 Subject: [PATCH 158/593] update example outputs --- .../log.4May17.pair_python_coulomb.g++.1 | 102 ++++-------- .../log.4May17.pair_python_coulomb.g++.4 | 114 +++++--------- .../log.4May17.pair_python_hybrid.g++.1 | 81 +++++----- .../log.4May17.pair_python_hybrid.g++.4 | 83 +++++----- .../python/log.4May17.pair_python_long.g++.1 | 146 ++++++++++++++++++ .../python/log.4May17.pair_python_long.g++.4 | 146 ++++++++++++++++++ .../python/log.4May17.pair_python_melt.g++.1 | 54 +++---- .../python/log.4May17.pair_python_melt.g++.4 | 56 +++---- .../python/log.4May17.pair_python_spce.g++.1 | 22 +-- .../python/log.4May17.pair_python_spce.g++.4 | 22 +-- .../python/log.4May17.pair_python_table.g++.1 | 16 +- .../python/log.4May17.pair_python_table.g++.4 | 18 +-- 12 files changed, 539 insertions(+), 321 deletions(-) create mode 100644 examples/python/log.4May17.pair_python_long.g++.1 create mode 100644 examples/python/log.4May17.pair_python_long.g++.4 diff --git a/examples/python/log.4May17.pair_python_coulomb.g++.1 b/examples/python/log.4May17.pair_python_coulomb.g++.1 index 67bb3b3496..b08d4b939c 100644 --- a/examples/python/log.4May17.pair_python_coulomb.g++.1 +++ b/examples/python/log.4May17.pair_python_coulomb.g++.1 @@ -21,14 +21,11 @@ read_data data.spce 1 = max # of 1-4 neighbors 2 = max # of special neighbors -pair_style hybrid/overlay coul/long 12.0 python 12.0 -kspace_style pppm 1.0e-6 +pair_style hybrid/overlay coul/cut 12.0 python 12.0 -pair_coeff * * coul/long +pair_coeff * * coul/cut pair_coeff * * python py_pot.LJCutSPCE OW NULL -pair_modify table 0 - bond_style harmonic angle_style harmonic dihedral_style none @@ -54,15 +51,6 @@ fix 2 all nvt temp 300.0 300.0 100.0 # create combined lj/coul table for all atom types # generate tabulated potential from python variant pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW -0.8472 -0.8472 -PPPM initialization ... -WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.279652 - grid = 40 40 40 - stencil order = 5 - estimated absolute RMS force accuracy = 0.000394206 - estimated relative force accuracy = 1.18714e-06 - using double precision FFTs - 3d grid and FFT values/proc = 103823 64000 Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 @@ -70,7 +58,7 @@ Neighbor list info ... ghost atom cutoff = 14 binsize = 7, bins = 6 6 6 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair coul/long, perpetual + (1) pair coul/cut, perpetual attributes: half, newton on pair build: half/bin/newton stencil: half/bin/3d/newton @@ -81,25 +69,7 @@ Neighbor list info ... stencil: none bin: none pair_write 1 2 2000 rsq 0.1 12 spce.table OW-HW -0.8472 0.4236 -PPPM initialization ... -WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.279652 - grid = 40 40 40 - stencil order = 5 - estimated absolute RMS force accuracy = 0.000394206 - estimated relative force accuracy = 1.18714e-06 - using double precision FFTs - 3d grid and FFT values/proc = 103823 64000 pair_write 2 2 2000 rsq 0.1 12 spce.table HW-HW 0.4236 0.4236 -PPPM initialization ... -WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.279652 - grid = 40 40 40 - stencil order = 5 - estimated absolute RMS force accuracy = 0.000394206 - estimated relative force accuracy = 1.18714e-06 - using double precision FFTs - 3d grid and FFT values/proc = 103823 64000 # switch to tabulated potential pair_style table linear 2000 pppm @@ -109,15 +79,6 @@ pair_coeff 2 2 spce.table HW-HW thermo 10 run 100 -PPPM initialization ... -WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.279652 - grid = 40 40 40 - stencil order = 5 - estimated absolute RMS force accuracy = 0.000394674 - estimated relative force accuracy = 1.18855e-06 - using double precision FFTs - 3d grid and FFT values/proc = 103823 64000 Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 @@ -130,49 +91,48 @@ Neighbor list info ... pair build: half/bin/newton stencil: half/bin/3d/newton bin: standard -Per MPI rank memory allocation (min/avg/max) = 35.26 | 35.26 | 35.26 Mbytes +Per MPI rank memory allocation (min/avg/max) = 25.08 | 25.08 | 25.08 Mbytes Step Temp E_pair E_mol TotEng Press - 0 0 -100272.97 0 -100272.97 -1282.0708 - 10 120.61568 -101350.63 0 -100272.39 -4077.5051 - 20 136.11379 -101465.43 0 -100248.65 -5136.5677 - 30 137.01602 -101455.3 0 -100230.46 -5347.8311 - 40 153.424 -101582.46 0 -100210.93 -5223.1676 - 50 167.73654 -101686.24 0 -100186.77 -4468.6687 - 60 163.11642 -101618.16 0 -100159.99 -3291.7815 - 70 169.64512 -101647.89 0 -100131.35 -2611.638 - 80 182.9979 -101737.01 0 -100101.11 -2390.6293 - 90 191.33873 -101778.71 0 -100068.24 -2239.386 - 100 194.7458 -101775.84 0 -100034.92 -1951.9128 -Loop time of 7.63869 on 1 procs for 100 steps with 4500 atoms - -Performance: 1.131 ns/day, 21.219 hours/ns, 13.091 timesteps/s -99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + 0 0 -18284.922 0 -18284.922 -2080.7739 + 10 146.83806 -19552.072 0 -18239.421 -4865.31 + 20 183.15761 -18706.872 0 -17069.543 -4865.6695 + 30 205.96203 -18901.541 0 -17060.354 -4454.8634 + 40 241.62768 -18323.117 0 -16163.099 -3269.1475 + 50 265.98384 -19883.562 0 -17505.813 -2788.5194 + 60 274.01897 -21320.575 0 -18870.996 -2387.0708 + 70 288.7601 -19849.269 0 -17267.913 -1235.818 + 80 300.64724 -20958.602 0 -18270.981 -1714.7988 + 90 304.19113 -21580.4 0 -18861.099 -2144.1614 + 100 304.22027 -21239.014 0 -18519.452 -2092.6759 +Loop time of 6.01861 on 1 procs for 100 steps with 4500 atoms + +Performance: 1.436 ns/day, 16.718 hours/ns, 16.615 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 5.7777 | 5.7777 | 5.7777 | 0.0 | 75.64 -Bond | 0.00017595 | 0.00017595 | 0.00017595 | 0.0 | 0.00 -Kspace | 1.5385 | 1.5385 | 1.5385 | 0.0 | 20.14 -Neigh | 0.22962 | 0.22962 | 0.22962 | 0.0 | 3.01 -Comm | 0.024123 | 0.024123 | 0.024123 | 0.0 | 0.32 -Output | 0.00061131 | 0.00061131 | 0.00061131 | 0.0 | 0.01 -Modify | 0.062444 | 0.062444 | 0.062444 | 0.0 | 0.82 -Other | | 0.005466 | | | 0.07 +Pair | 5.698 | 5.698 | 5.698 | 0.0 | 94.67 +Bond | 0.0001626 | 0.0001626 | 0.0001626 | 0.0 | 0.00 +Neigh | 0.23235 | 0.23235 | 0.23235 | 0.0 | 3.86 +Comm | 0.018961 | 0.018961 | 0.018961 | 0.0 | 0.32 +Output | 0.00058126 | 0.00058126 | 0.00058126 | 0.0 | 0.01 +Modify | 0.063452 | 0.063452 | 0.063452 | 0.0 | 1.05 +Other | | 0.005146 | | | 0.09 Nlocal: 4500 ave 4500 max 4500 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 21216 ave 21216 max 21216 min +Nghost: 21285 ave 21285 max 21285 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 2.60177e+06 ave 2.60177e+06 max 2.60177e+06 min +Neighs: 2.59766e+06 ave 2.59766e+06 max 2.59766e+06 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 2601766 -Ave neighs/atom = 578.17 +Total # of neighbors = 2597662 +Ave neighs/atom = 577.258 Ave special neighs/atom = 2 Neighbor list builds = 3 Dangerous builds = 0 shell rm spce.table -Total wall time: 0:00:07 +Total wall time: 0:00:06 diff --git a/examples/python/log.4May17.pair_python_coulomb.g++.4 b/examples/python/log.4May17.pair_python_coulomb.g++.4 index d5fd15ccd3..b002d5c1ab 100644 --- a/examples/python/log.4May17.pair_python_coulomb.g++.4 +++ b/examples/python/log.4May17.pair_python_coulomb.g++.4 @@ -21,14 +21,11 @@ read_data data.spce 1 = max # of 1-4 neighbors 2 = max # of special neighbors -pair_style hybrid/overlay coul/long 12.0 python 12.0 -kspace_style pppm 1.0e-6 +pair_style hybrid/overlay coul/cut 12.0 python 12.0 -pair_coeff * * coul/long +pair_coeff * * coul/cut pair_coeff * * python py_pot.LJCutSPCE OW NULL -pair_modify table 0 - bond_style harmonic angle_style harmonic dihedral_style none @@ -54,15 +51,6 @@ fix 2 all nvt temp 300.0 300.0 100.0 # create combined lj/coul table for all atom types # generate tabulated potential from python variant pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW -0.8472 -0.8472 -PPPM initialization ... -WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.279652 - grid = 40 40 40 - stencil order = 5 - estimated absolute RMS force accuracy = 0.000394206 - estimated relative force accuracy = 1.18714e-06 - using double precision FFTs - 3d grid and FFT values/proc = 34263 16000 Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 @@ -70,7 +58,7 @@ Neighbor list info ... ghost atom cutoff = 14 binsize = 7, bins = 6 6 6 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair coul/long, perpetual + (1) pair coul/cut, perpetual attributes: half, newton on pair build: half/bin/newton stencil: half/bin/3d/newton @@ -81,25 +69,7 @@ Neighbor list info ... stencil: none bin: none pair_write 1 2 2000 rsq 0.1 12 spce.table OW-HW -0.8472 0.4236 -PPPM initialization ... -WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.279652 - grid = 40 40 40 - stencil order = 5 - estimated absolute RMS force accuracy = 0.000394206 - estimated relative force accuracy = 1.18714e-06 - using double precision FFTs - 3d grid and FFT values/proc = 34263 16000 pair_write 2 2 2000 rsq 0.1 12 spce.table HW-HW 0.4236 0.4236 -PPPM initialization ... -WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.279652 - grid = 40 40 40 - stencil order = 5 - estimated absolute RMS force accuracy = 0.000394206 - estimated relative force accuracy = 1.18714e-06 - using double precision FFTs - 3d grid and FFT values/proc = 34263 16000 # switch to tabulated potential pair_style table linear 2000 pppm @@ -109,15 +79,6 @@ pair_coeff 2 2 spce.table HW-HW thermo 10 run 100 -PPPM initialization ... -WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.279652 - grid = 40 40 40 - stencil order = 5 - estimated absolute RMS force accuracy = 0.000394674 - estimated relative force accuracy = 1.18855e-06 - using double precision FFTs - 3d grid and FFT values/proc = 34263 16000 Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 @@ -130,49 +91,48 @@ Neighbor list info ... pair build: half/bin/newton stencil: half/bin/3d/newton bin: standard -Per MPI rank memory allocation (min/avg/max) = 13.05 | 13.05 | 13.05 Mbytes +Per MPI rank memory allocation (min/avg/max) = 9.962 | 9.963 | 9.963 Mbytes Step Temp E_pair E_mol TotEng Press - 0 0 -100272.97 0 -100272.97 -1282.0708 - 10 120.61568 -101350.63 0 -100272.39 -4077.5051 - 20 136.11379 -101465.43 0 -100248.65 -5136.5677 - 30 137.01602 -101455.3 0 -100230.46 -5347.8311 - 40 153.424 -101582.46 0 -100210.93 -5223.1676 - 50 167.73654 -101686.24 0 -100186.77 -4468.6687 - 60 163.11642 -101618.16 0 -100159.99 -3291.7815 - 70 169.64512 -101647.89 0 -100131.35 -2611.638 - 80 182.9979 -101737.01 0 -100101.11 -2390.6293 - 90 191.33873 -101778.71 0 -100068.24 -2239.386 - 100 194.7458 -101775.84 0 -100034.92 -1951.9128 -Loop time of 2.35848 on 4 procs for 100 steps with 4500 atoms - -Performance: 3.663 ns/day, 6.551 hours/ns, 42.400 timesteps/s -99.0% CPU use with 4 MPI tasks x 1 OpenMP threads + 0 0 -18284.922 0 -18284.922 -2080.7739 + 10 146.83806 -19552.072 0 -18239.421 -4865.31 + 20 183.15761 -18706.872 0 -17069.543 -4865.6695 + 30 205.96203 -18901.541 0 -17060.354 -4454.8634 + 40 241.62768 -18323.117 0 -16163.099 -3269.1475 + 50 265.98384 -19883.562 0 -17505.813 -2788.5194 + 60 274.01897 -21320.575 0 -18870.996 -2387.0708 + 70 288.7601 -19849.269 0 -17267.913 -1235.818 + 80 300.64724 -20958.602 0 -18270.981 -1714.7988 + 90 304.19113 -21580.4 0 -18861.099 -2144.1614 + 100 304.22027 -21239.014 0 -18519.452 -2092.6759 +Loop time of 1.7361 on 4 procs for 100 steps with 4500 atoms + +Performance: 4.977 ns/day, 4.823 hours/ns, 57.600 timesteps/s +99.2% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 1.5061 | 1.5612 | 1.6879 | 5.9 | 66.20 -Bond | 9.5129e-05 | 0.00012672 | 0.00014567 | 0.0 | 0.01 -Kspace | 0.52033 | 0.64456 | 0.69933 | 9.1 | 27.33 -Neigh | 0.066265 | 0.066342 | 0.06644 | 0.0 | 2.81 -Comm | 0.03394 | 0.036139 | 0.038043 | 0.8 | 1.53 -Output | 0.00040889 | 0.00044978 | 0.00056887 | 0.0 | 0.02 -Modify | 0.04557 | 0.045813 | 0.046082 | 0.1 | 1.94 -Other | | 0.003826 | | | 0.16 - -Nlocal: 1125 ave 1154 max 1092 min -Histogram: 1 0 0 0 1 0 0 1 0 1 -Nghost: 12256.2 ave 12296 max 12213 min -Histogram: 1 0 1 0 0 0 0 0 1 1 -Neighs: 650442 ave 678824 max 626375 min -Histogram: 1 0 0 0 2 0 0 0 0 1 - -Total # of neighbors = 2601766 -Ave neighs/atom = 578.17 +Pair | 1.4424 | 1.5149 | 1.6066 | 5.3 | 87.26 +Bond | 8.9407e-05 | 0.00010258 | 0.00012374 | 0.0 | 0.01 +Neigh | 0.064205 | 0.064241 | 0.064295 | 0.0 | 3.70 +Comm | 0.023643 | 0.1155 | 0.18821 | 19.2 | 6.65 +Output | 0.00038004 | 0.00042355 | 0.00054145 | 0.0 | 0.02 +Modify | 0.037507 | 0.037787 | 0.038042 | 0.1 | 2.18 +Other | | 0.003148 | | | 0.18 + +Nlocal: 1125 ave 1162 max 1098 min +Histogram: 1 1 0 0 0 1 0 0 0 1 +Nghost: 12267.8 ave 12302 max 12238 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Neighs: 649416 ave 681458 max 630541 min +Histogram: 1 0 2 0 0 0 0 0 0 1 + +Total # of neighbors = 2597662 +Ave neighs/atom = 577.258 Ave special neighs/atom = 2 Neighbor list builds = 3 Dangerous builds = 0 shell rm spce.table -Total wall time: 0:00:02 +Total wall time: 0:00:01 diff --git a/examples/python/log.4May17.pair_python_hybrid.g++.1 b/examples/python/log.4May17.pair_python_hybrid.g++.1 index 497943d4fd..718f794a57 100644 --- a/examples/python/log.4May17.pair_python_hybrid.g++.1 +++ b/examples/python/log.4May17.pair_python_hybrid.g++.1 @@ -14,6 +14,9 @@ Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) create_atoms 1 box Created 4000 atoms mass * 1.0 +region half block -0.1 4.9 0 10 0 10 +set region half type 2 + 2000 settings made for type velocity all create 3.0 87287 @@ -50,7 +53,7 @@ Neighbor list info ... pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard -Per MPI rank memory allocation (min/avg/max) = 4.828 | 4.828 | 4.828 Mbytes +Per MPI rank memory allocation (min/avg/max) = 4.446 | 4.446 | 4.446 Mbytes Step Temp E_pair E_mol TotEng Press 0 3 -6.7733681 0 -2.2744931 -3.7033504 50 1.6758903 -4.7955425 0 -2.2823355 5.670064 @@ -58,30 +61,30 @@ Step Temp E_pair E_mol TotEng Press 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 -Loop time of 21.9463 on 1 procs for 250 steps with 4000 atoms +Loop time of 10.0384 on 1 procs for 250 steps with 4000 atoms -Performance: 4921.114 tau/day, 11.391 timesteps/s -98.6% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 10758.705 tau/day, 24.904 timesteps/s +98.8% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 21.819 | 21.819 | 21.819 | 0.0 | 99.42 -Neigh | 0.094718 | 0.094718 | 0.094718 | 0.0 | 0.43 -Comm | 0.01407 | 0.01407 | 0.01407 | 0.0 | 0.06 -Output | 0.00024915 | 0.00024915 | 0.00024915 | 0.0 | 0.00 -Modify | 0.015002 | 0.015002 | 0.015002 | 0.0 | 0.07 -Other | | 0.003232 | | | 0.01 +Pair | 9.913 | 9.913 | 9.913 | 0.0 | 98.75 +Neigh | 0.095569 | 0.095569 | 0.095569 | 0.0 | 0.95 +Comm | 0.012686 | 0.012686 | 0.012686 | 0.0 | 0.13 +Output | 0.00027537 | 0.00027537 | 0.00027537 | 0.0 | 0.00 +Modify | 0.01386 | 0.01386 | 0.01386 | 0.0 | 0.14 +Other | | 0.003027 | | | 0.03 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5499 ave 5499 max 5499 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min +Neighs: 85978 ave 85978 max 85978 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 0 -Ave neighs/atom = 0 +Total # of neighbors = 85978 +Ave neighs/atom = 21.4945 Neighbor list builds = 12 Dangerous builds not checked @@ -126,7 +129,7 @@ Neighbor list info ... pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard -Per MPI rank memory allocation (min/avg/max) = 4.626 | 4.626 | 4.626 Mbytes +Per MPI rank memory allocation (min/avg/max) = 4.245 | 4.245 | 4.245 Mbytes Step Temp E_pair E_mol TotEng Press 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 300 1.645592 -4.7496711 0 -2.2819002 5.8734193 @@ -134,30 +137,30 @@ Step Temp E_pair E_mol TotEng Press 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 -Loop time of 21.9098 on 1 procs for 250 steps with 4000 atoms +Loop time of 10.0803 on 1 procs for 250 steps with 4000 atoms -Performance: 4929.303 tau/day, 11.410 timesteps/s -98.8% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 10713.932 tau/day, 24.801 timesteps/s +98.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 21.68 | 21.68 | 21.68 | 0.0 | 98.95 -Neigh | 0.19625 | 0.19625 | 0.19625 | 0.0 | 0.90 -Comm | 0.014877 | 0.014877 | 0.014877 | 0.0 | 0.07 -Output | 0.00027227 | 0.00027227 | 0.00027227 | 0.0 | 0.00 -Modify | 0.013663 | 0.013663 | 0.013663 | 0.0 | 0.06 -Other | | 0.004371 | | | 0.02 +Pair | 9.8479 | 9.8479 | 9.8479 | 0.0 | 97.69 +Neigh | 0.20002 | 0.20002 | 0.20002 | 0.0 | 1.98 +Comm | 0.01437 | 0.01437 | 0.01437 | 0.0 | 0.14 +Output | 0.00024033 | 0.00024033 | 0.00024033 | 0.0 | 0.00 +Modify | 0.013422 | 0.013422 | 0.013422 | 0.0 | 0.13 +Other | | 0.004348 | | | 0.04 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5472 ave 5472 max 5472 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min +Neighs: 86930 ave 86930 max 86930 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 0 -Ave neighs/atom = 0 +Total # of neighbors = 86930 +Ave neighs/atom = 21.7325 Neighbor list builds = 25 Dangerous builds = 25 @@ -208,7 +211,7 @@ Neighbor list info ... pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard -Per MPI rank memory allocation (min/avg/max) = 4.126 | 4.126 | 4.126 Mbytes +Per MPI rank memory allocation (min/avg/max) = 3.745 | 3.745 | 3.745 Mbytes Step Temp E_pair E_mol TotEng Press 0 1.6275257 -4.7224992 0 -2.281821 5.9567365 50 1.6454666 -4.7497515 0 -2.2821686 5.8729175 @@ -216,32 +219,32 @@ Step Temp E_pair E_mol TotEng Press 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 -Loop time of 22.091 on 1 procs for 250 steps with 4000 atoms +Loop time of 9.93686 on 1 procs for 250 steps with 4000 atoms -Performance: 4888.868 tau/day, 11.317 timesteps/s +Performance: 10868.626 tau/day, 25.159 timesteps/s 98.8% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 21.966 | 21.966 | 21.966 | 0.0 | 99.43 -Neigh | 0.094647 | 0.094647 | 0.094647 | 0.0 | 0.43 -Comm | 0.013071 | 0.013071 | 0.013071 | 0.0 | 0.06 -Output | 0.00027871 | 0.00027871 | 0.00027871 | 0.0 | 0.00 -Modify | 0.013882 | 0.013882 | 0.013882 | 0.0 | 0.06 -Other | | 0.003102 | | | 0.01 +Pair | 9.8119 | 9.8119 | 9.8119 | 0.0 | 98.74 +Neigh | 0.096041 | 0.096041 | 0.096041 | 0.0 | 0.97 +Comm | 0.01243 | 0.01243 | 0.01243 | 0.0 | 0.13 +Output | 0.00028133 | 0.00028133 | 0.00028133 | 0.0 | 0.00 +Modify | 0.013261 | 0.013261 | 0.013261 | 0.0 | 0.13 +Other | | 0.002994 | | | 0.03 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5487 ave 5487 max 5487 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min +Neighs: 86831 ave 86831 max 86831 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 0 -Ave neighs/atom = 0 +Total # of neighbors = 86831 +Ave neighs/atom = 21.7078 Neighbor list builds = 12 Dangerous builds not checked shell rm hybrid.data hybrid.restart -Total wall time: 0:01:07 +Total wall time: 0:00:30 diff --git a/examples/python/log.4May17.pair_python_hybrid.g++.4 b/examples/python/log.4May17.pair_python_hybrid.g++.4 index 0331f34a5e..32d9fc1740 100644 --- a/examples/python/log.4May17.pair_python_hybrid.g++.4 +++ b/examples/python/log.4May17.pair_python_hybrid.g++.4 @@ -14,6 +14,9 @@ Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) create_atoms 1 box Created 4000 atoms mass * 1.0 +region half block -0.1 4.9 0 10 0 10 +set region half type 2 + 2000 settings made for type velocity all create 3.0 87287 @@ -58,30 +61,30 @@ Step Temp E_pair E_mol TotEng Press 150 1.6596605 -4.7699432 0 -2.2810749 5.7830138 200 1.6371874 -4.7365462 0 -2.2813789 5.9246674 250 1.6323462 -4.7292021 0 -2.2812949 5.9762238 -Loop time of 6.01723 on 4 procs for 250 steps with 4000 atoms +Loop time of 2.71748 on 4 procs for 250 steps with 4000 atoms -Performance: 17948.472 tau/day, 41.547 timesteps/s -98.2% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 39742.745 tau/day, 91.997 timesteps/s +98.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 5.1507 | 5.4989 | 5.9629 | 13.1 | 91.39 -Neigh | 0.024123 | 0.024877 | 0.025959 | 0.5 | 0.41 -Comm | 0.02258 | 0.48785 | 0.83691 | 44.1 | 8.11 -Output | 0.00039768 | 0.00045246 | 0.00052929 | 0.0 | 0.01 -Modify | 0.0036325 | 0.0037773 | 0.0038905 | 0.2 | 0.06 -Other | | 0.001357 | | | 0.02 +Pair | 2.4777 | 2.5639 | 2.6253 | 3.9 | 94.35 +Neigh | 0.024626 | 0.025331 | 0.02598 | 0.3 | 0.93 +Comm | 0.061933 | 0.12297 | 0.20987 | 18.0 | 4.53 +Output | 0.00026131 | 0.00027591 | 0.00031352 | 0.0 | 0.01 +Modify | 0.0036087 | 0.0036573 | 0.0037553 | 0.1 | 0.13 +Other | | 0.001337 | | | 0.05 Nlocal: 1000 ave 1010 max 982 min Histogram: 1 0 0 0 0 0 1 0 0 2 Nghost: 2703.75 ave 2713 max 2689 min Histogram: 1 0 0 0 0 0 0 2 0 1 -Neighs: 0 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 21469.8 ave 22167 max 20546 min +Histogram: 1 0 0 0 0 1 1 0 0 1 -Total # of neighbors = 0 -Ave neighs/atom = 0 +Total # of neighbors = 85879 +Ave neighs/atom = 21.4698 Neighbor list builds = 12 Dangerous builds not checked @@ -134,30 +137,30 @@ Step Temp E_pair E_mol TotEng Press 400 1.6388136 -4.7387093 0 -2.2811035 5.9331084 450 1.6431295 -4.7452215 0 -2.2811435 5.8929898 500 1.643316 -4.7454222 0 -2.2810644 5.8454817 -Loop time of 6.09991 on 4 procs for 250 steps with 4000 atoms +Loop time of 2.75827 on 4 procs for 250 steps with 4000 atoms -Performance: 17705.179 tau/day, 40.984 timesteps/s -98.2% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 39155.038 tau/day, 90.637 timesteps/s +98.3% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 5.2315 | 5.5179 | 6.0183 | 13.7 | 90.46 -Neigh | 0.049134 | 0.051424 | 0.053837 | 0.8 | 0.84 -Comm | 0.021671 | 0.52455 | 0.8132 | 44.5 | 8.60 -Output | 0.00019336 | 0.00026017 | 0.00032115 | 0.0 | 0.00 -Modify | 0.0036032 | 0.0036635 | 0.0038021 | 0.1 | 0.06 -Other | | 0.002068 | | | 0.03 +Pair | 2.3631 | 2.5412 | 2.6672 | 7.2 | 92.13 +Neigh | 0.050358 | 0.052316 | 0.053312 | 0.5 | 1.90 +Comm | 0.032793 | 0.15893 | 0.33904 | 29.1 | 5.76 +Output | 0.00018525 | 0.00020212 | 0.00024509 | 0.0 | 0.01 +Modify | 0.0034482 | 0.0035321 | 0.0036578 | 0.1 | 0.13 +Other | | 0.002039 | | | 0.07 Nlocal: 1000 ave 1012 max 983 min Histogram: 1 0 0 0 0 0 2 0 0 1 Nghost: 2699 ave 2706 max 2693 min Histogram: 1 1 0 0 0 0 1 0 0 1 -Neighs: 0 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 21802 ave 22700 max 21236 min +Histogram: 1 1 0 1 0 0 0 0 0 1 -Total # of neighbors = 0 -Ave neighs/atom = 0 +Total # of neighbors = 87208 +Ave neighs/atom = 21.802 Neighbor list builds = 25 Dangerous builds = 25 @@ -216,32 +219,32 @@ Step Temp E_pair E_mol TotEng Press 150 1.6384234 -4.7389689 0 -2.2819482 5.9315273 200 1.6428814 -4.7460743 0 -2.2823683 5.8888228 250 1.6432631 -4.7466603 0 -2.2823818 5.8398819 -Loop time of 6.04476 on 4 procs for 250 steps with 4000 atoms +Loop time of 2.71936 on 4 procs for 250 steps with 4000 atoms -Performance: 17866.705 tau/day, 41.358 timesteps/s -98.3% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 39715.257 tau/day, 91.933 timesteps/s +98.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 5.2589 | 5.5841 | 5.9788 | 11.1 | 92.38 -Neigh | 0.023942 | 0.024705 | 0.025509 | 0.4 | 0.41 -Comm | 0.034946 | 0.43056 | 0.75671 | 40.0 | 7.12 -Output | 0.00022149 | 0.00029725 | 0.0003593 | 0.0 | 0.00 -Modify | 0.003613 | 0.0037647 | 0.003829 | 0.1 | 0.06 -Other | | 0.001313 | | | 0.02 +Pair | 2.3769 | 2.5432 | 2.6447 | 6.6 | 93.52 +Neigh | 0.024088 | 0.025093 | 0.025748 | 0.4 | 0.92 +Comm | 0.044614 | 0.14598 | 0.31339 | 27.5 | 5.37 +Output | 0.00026488 | 0.00028872 | 0.00034189 | 0.0 | 0.01 +Modify | 0.0034099 | 0.0035709 | 0.0036535 | 0.2 | 0.13 +Other | | 0.001215 | | | 0.04 Nlocal: 1000 ave 1013 max 989 min Histogram: 1 0 0 1 0 1 0 0 0 1 Nghost: 2695.5 ave 2706 max 2682 min Histogram: 1 0 0 0 0 0 2 0 0 1 -Neighs: 0 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 21792 ave 22490 max 21457 min +Histogram: 2 0 1 0 0 0 0 0 0 1 -Total # of neighbors = 0 -Ave neighs/atom = 0 +Total # of neighbors = 87168 +Ave neighs/atom = 21.792 Neighbor list builds = 12 Dangerous builds not checked shell rm hybrid.data hybrid.restart -Total wall time: 0:00:18 +Total wall time: 0:00:08 diff --git a/examples/python/log.4May17.pair_python_long.g++.1 b/examples/python/log.4May17.pair_python_long.g++.1 new file mode 100644 index 0000000000..e2d7cf1bde --- /dev/null +++ b/examples/python/log.4May17.pair_python_long.g++.1 @@ -0,0 +1,146 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task +units real +atom_style full + +read_data data.spce + orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 4500 atoms + scanning bonds ... + 2 = max bonds/atom + scanning angles ... + 1 = max angles/atom + reading bonds ... + 3000 bonds + reading angles ... + 1500 angles + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 2 = max # of special neighbors + +pair_style python 12.0 +pair_coeff * * py_pot.LJCutSPCE OW HW + +bond_style harmonic +angle_style harmonic +dihedral_style none +improper_style none + +bond_coeff 1 1000.00 1.000 +angle_coeff 1 100.0 109.47 + +special_bonds lj/coul 0.0 0.0 1.0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 2 = max # of special neighbors + +neighbor 2.0 bin + +fix 1 all shake 0.0001 20 0 b 1 a 1 + 0 = # of size 2 clusters + 0 = # of size 3 clusters + 0 = # of size 4 clusters + 1500 = # of frozen angles +fix 2 all nvt temp 300.0 300.0 100.0 + +# create only lj/cut table for the oxygen atoms from python +shell rm -f spce.table +WARNING: Shell command 'rm' failed with error 'No such file or directory' (../input.cpp:1285) +WARNING: Shell command 'rm' failed with error 'No such file or directory' (../input.cpp:1285) +pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair python, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + +# switch to tabulated potential with long-range coulomb as overlay +pair_style hybrid/overlay coul/long 12.0 table linear 2000 +kspace_style pppm 1.0e-6 +pair_coeff * * coul/long +pair_coeff 1 1 table spce.table OW-OW + +thermo 10 +run 100 +PPPM initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394674 + estimated relative force accuracy = 1.18855e-06 + using double precision FFTs + 3d grid and FFT values/proc = 103823 64000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + (2) pair table, perpetual, skip from (1) + attributes: half, newton on + pair build: skip + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 36.47 | 36.47 | 36.47 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -16690.032 0 -16690.032 -1268.9538 + 10 120.58553 -17767.504 0 -16689.536 -4063.8589 + 20 136.11736 -17882.557 0 -16665.742 -5124.6758 + 30 137.00764 -17872.318 0 -16647.545 -5337.2022 + 40 153.38868 -17999.269 0 -16628.059 -5213.6001 + 50 167.70342 -18103.06 0 -16603.883 -4460.6632 + 60 163.07134 -18034.856 0 -16577.088 -3285.0037 + 70 169.59286 -18064.636 0 -16548.57 -2606.407 + 80 182.92893 -18153.499 0 -16518.215 -2385.5152 + 90 191.2793 -18195.356 0 -16485.425 -2235.3701 + 100 194.68587 -18192.458 0 -16452.073 -1948.3746 +Loop time of 7.90705 on 1 procs for 100 steps with 4500 atoms + +Performance: 1.093 ns/day, 21.964 hours/ns, 12.647 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 6.0343 | 6.0343 | 6.0343 | 0.0 | 76.32 +Bond | 0.00019622 | 0.00019622 | 0.00019622 | 0.0 | 0.00 +Kspace | 1.5311 | 1.5311 | 1.5311 | 0.0 | 19.36 +Neigh | 0.246 | 0.246 | 0.246 | 0.0 | 3.11 +Comm | 0.023937 | 0.023937 | 0.023937 | 0.0 | 0.30 +Output | 0.00060368 | 0.00060368 | 0.00060368 | 0.0 | 0.01 +Modify | 0.065543 | 0.065543 | 0.065543 | 0.0 | 0.83 +Other | | 0.005364 | | | 0.07 + +Nlocal: 4500 ave 4500 max 4500 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 21216 ave 21216 max 21216 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 2.60177e+06 ave 2.60177e+06 max 2.60177e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 2601769 +Ave neighs/atom = 578.171 +Ave special neighs/atom = 2 +Neighbor list builds = 3 +Dangerous builds = 0 + +shell rm spce.table + +Total wall time: 0:00:08 diff --git a/examples/python/log.4May17.pair_python_long.g++.4 b/examples/python/log.4May17.pair_python_long.g++.4 new file mode 100644 index 0000000000..35347da713 --- /dev/null +++ b/examples/python/log.4May17.pair_python_long.g++.4 @@ -0,0 +1,146 @@ +LAMMPS (4 May 2017) + using 1 OpenMP thread(s) per MPI task +units real +atom_style full + +read_data data.spce + orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736) + 2 by 2 by 1 MPI processor grid + reading atoms ... + 4500 atoms + scanning bonds ... + 2 = max bonds/atom + scanning angles ... + 1 = max angles/atom + reading bonds ... + 3000 bonds + reading angles ... + 1500 angles + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 2 = max # of special neighbors + +pair_style python 12.0 +pair_coeff * * py_pot.LJCutSPCE OW HW + +bond_style harmonic +angle_style harmonic +dihedral_style none +improper_style none + +bond_coeff 1 1000.00 1.000 +angle_coeff 1 100.0 109.47 + +special_bonds lj/coul 0.0 0.0 1.0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 2 = max # of special neighbors + +neighbor 2.0 bin + +fix 1 all shake 0.0001 20 0 b 1 a 1 + 0 = # of size 2 clusters + 0 = # of size 3 clusters + 0 = # of size 4 clusters + 1500 = # of frozen angles +fix 2 all nvt temp 300.0 300.0 100.0 + +# create only lj/cut table for the oxygen atoms from python +shell rm -f spce.table +WARNING: Shell command 'rm' failed with error 'No such file or directory' (../input.cpp:1285) +WARNING: Shell command 'rm' failed with error 'No such file or directory' (../input.cpp:1285) +pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair python, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + +# switch to tabulated potential with long-range coulomb as overlay +pair_style hybrid/overlay coul/long 12.0 table linear 2000 +kspace_style pppm 1.0e-6 +pair_coeff * * coul/long +pair_coeff 1 1 table spce.table OW-OW + +thermo 10 +run 100 +PPPM initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.279652 + grid = 40 40 40 + stencil order = 5 + estimated absolute RMS force accuracy = 0.000394674 + estimated relative force accuracy = 1.18855e-06 + using double precision FFTs + 3d grid and FFT values/proc = 34263 16000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + (2) pair table, perpetual, skip from (1) + attributes: half, newton on + pair build: skip + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 13.45 | 13.45 | 13.45 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -16690.032 0 -16690.032 -1268.9538 + 10 120.58553 -17767.504 0 -16689.536 -4063.8589 + 20 136.11736 -17882.557 0 -16665.742 -5124.6758 + 30 137.00764 -17872.318 0 -16647.545 -5337.2022 + 40 153.38868 -17999.269 0 -16628.059 -5213.6001 + 50 167.70342 -18103.06 0 -16603.883 -4460.6632 + 60 163.07134 -18034.856 0 -16577.088 -3285.0037 + 70 169.59286 -18064.636 0 -16548.57 -2606.407 + 80 182.92893 -18153.499 0 -16518.215 -2385.5152 + 90 191.2793 -18195.356 0 -16485.425 -2235.3701 + 100 194.68587 -18192.458 0 -16452.073 -1948.3746 +Loop time of 2.36748 on 4 procs for 100 steps with 4500 atoms + +Performance: 3.649 ns/day, 6.576 hours/ns, 42.239 timesteps/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.5309 | 1.5977 | 1.6926 | 4.7 | 67.49 +Bond | 9.9182e-05 | 0.00012749 | 0.00016403 | 0.0 | 0.01 +Kspace | 0.52158 | 0.61232 | 0.67676 | 7.3 | 25.86 +Neigh | 0.066937 | 0.06702 | 0.067093 | 0.0 | 2.83 +Comm | 0.035882 | 0.039862 | 0.042244 | 1.2 | 1.68 +Output | 0.0004003 | 0.00044602 | 0.00057578 | 0.0 | 0.02 +Modify | 0.046088 | 0.046227 | 0.046315 | 0.0 | 1.95 +Other | | 0.003775 | | | 0.16 + +Nlocal: 1125 ave 1154 max 1092 min +Histogram: 1 0 0 0 1 0 0 1 0 1 +Nghost: 12256.2 ave 12296 max 12213 min +Histogram: 1 0 1 0 0 0 0 0 1 1 +Neighs: 650442 ave 678831 max 626373 min +Histogram: 1 0 0 0 2 0 0 0 0 1 + +Total # of neighbors = 2601769 +Ave neighs/atom = 578.171 +Ave special neighs/atom = 2 +Neighbor list builds = 3 +Dangerous builds = 0 + +shell rm spce.table + +Total wall time: 0:00:02 diff --git a/examples/python/log.4May17.pair_python_melt.g++.1 b/examples/python/log.4May17.pair_python_melt.g++.1 index fcb902fb3c..d234ce93b5 100644 --- a/examples/python/log.4May17.pair_python_melt.g++.1 +++ b/examples/python/log.4May17.pair_python_melt.g++.1 @@ -47,20 +47,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 -Loop time of 21.6481 on 1 procs for 250 steps with 4000 atoms +Loop time of 20.9283 on 1 procs for 250 steps with 4000 atoms -Performance: 4988.899 tau/day, 11.548 timesteps/s -98.5% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 5160.475 tau/day, 11.946 timesteps/s +98.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 21.529 | 21.529 | 21.529 | 0.0 | 99.45 -Neigh | 0.08819 | 0.08819 | 0.08819 | 0.0 | 0.41 -Comm | 0.013276 | 0.013276 | 0.013276 | 0.0 | 0.06 -Output | 0.00025654 | 0.00025654 | 0.00025654 | 0.0 | 0.00 -Modify | 0.014466 | 0.014466 | 0.014466 | 0.0 | 0.07 -Other | | 0.003143 | | | 0.01 +Pair | 20.809 | 20.809 | 20.809 | 0.0 | 99.43 +Neigh | 0.088638 | 0.088638 | 0.088638 | 0.0 | 0.42 +Comm | 0.013424 | 0.013424 | 0.013424 | 0.0 | 0.06 +Output | 0.0002737 | 0.0002737 | 0.0002737 | 0.0 | 0.00 +Modify | 0.014334 | 0.014334 | 0.014334 | 0.0 | 0.07 +Other | | 0.003089 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -112,20 +112,20 @@ Step Temp E_pair E_mol TotEng Press 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 -Loop time of 21.9592 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.1422 on 1 procs for 250 steps with 4000 atoms -Performance: 4918.203 tau/day, 11.385 timesteps/s +Performance: 5108.279 tau/day, 11.825 timesteps/s 98.5% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 21.74 | 21.74 | 21.74 | 0.0 | 99.00 -Neigh | 0.18588 | 0.18588 | 0.18588 | 0.0 | 0.85 -Comm | 0.01476 | 0.01476 | 0.01476 | 0.0 | 0.07 -Output | 0.00022244 | 0.00022244 | 0.00022244 | 0.0 | 0.00 -Modify | 0.01356 | 0.01356 | 0.01356 | 0.0 | 0.06 -Other | | 0.004382 | | | 0.02 +Pair | 20.925 | 20.925 | 20.925 | 0.0 | 98.97 +Neigh | 0.18452 | 0.18452 | 0.18452 | 0.0 | 0.87 +Comm | 0.014836 | 0.014836 | 0.014836 | 0.0 | 0.07 +Output | 0.00027108 | 0.00027108 | 0.00027108 | 0.0 | 0.00 +Modify | 0.01366 | 0.01366 | 0.01366 | 0.0 | 0.06 +Other | | 0.004355 | | | 0.02 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -183,20 +183,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 -Loop time of 21.8255 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.1026 on 1 procs for 250 steps with 4000 atoms -Performance: 4948.331 tau/day, 11.454 timesteps/s -98.6% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 5117.845 tau/day, 11.847 timesteps/s +98.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 21.707 | 21.707 | 21.707 | 0.0 | 99.46 -Neigh | 0.088455 | 0.088455 | 0.088455 | 0.0 | 0.41 -Comm | 0.01311 | 0.01311 | 0.01311 | 0.0 | 0.06 -Output | 0.00025082 | 0.00025082 | 0.00025082 | 0.0 | 0.00 -Modify | 0.013836 | 0.013836 | 0.013836 | 0.0 | 0.06 -Other | | 0.003096 | | | 0.01 +Pair | 20.984 | 20.984 | 20.984 | 0.0 | 99.44 +Neigh | 0.088639 | 0.088639 | 0.088639 | 0.0 | 0.42 +Comm | 0.012881 | 0.012881 | 0.012881 | 0.0 | 0.06 +Output | 0.00028563 | 0.00028563 | 0.00028563 | 0.0 | 0.00 +Modify | 0.013523 | 0.013523 | 0.013523 | 0.0 | 0.06 +Other | | 0.003033 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -211,4 +211,4 @@ Neighbor list builds = 12 Dangerous builds not checked shell rm melt.data melt.restart -Total wall time: 0:01:07 +Total wall time: 0:01:05 diff --git a/examples/python/log.4May17.pair_python_melt.g++.4 b/examples/python/log.4May17.pair_python_melt.g++.4 index d504efc4ac..58dae340bd 100644 --- a/examples/python/log.4May17.pair_python_melt.g++.4 +++ b/examples/python/log.4May17.pair_python_melt.g++.4 @@ -47,20 +47,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6596605 -4.7699432 0 -2.2810749 5.7830138 200 1.6371874 -4.7365462 0 -2.2813789 5.9246674 250 1.6323462 -4.7292021 0 -2.2812949 5.9762238 -Loop time of 5.83903 on 4 procs for 250 steps with 4000 atoms +Loop time of 5.65922 on 4 procs for 250 steps with 4000 atoms -Performance: 18496.226 tau/day, 42.815 timesteps/s -98.2% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 19083.895 tau/day, 44.176 timesteps/s +98.3% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 5.152 | 5.5209 | 5.7679 | 9.6 | 94.55 -Neigh | 0.022809 | 0.023364 | 0.023891 | 0.3 | 0.40 -Comm | 0.041927 | 0.28952 | 0.65893 | 42.2 | 4.96 -Output | 0.0002389 | 0.00024772 | 0.00026727 | 0.0 | 0.00 -Modify | 0.0036368 | 0.0036796 | 0.0037563 | 0.1 | 0.06 -Other | | 0.001328 | | | 0.02 +Pair | 5.4529 | 5.5207 | 5.5575 | 1.7 | 97.55 +Neigh | 0.023164 | 0.023376 | 0.023883 | 0.2 | 0.41 +Comm | 0.073318 | 0.1099 | 0.17804 | 12.2 | 1.94 +Output | 0.00023365 | 0.00026143 | 0.00030684 | 0.0 | 0.00 +Modify | 0.0036483 | 0.0037143 | 0.003896 | 0.2 | 0.07 +Other | | 0.001274 | | | 0.02 Nlocal: 1000 ave 1010 max 982 min Histogram: 1 0 0 0 0 0 1 0 0 2 @@ -112,20 +112,20 @@ Step Temp E_pair E_mol TotEng Press 400 1.6388136 -4.7387093 0 -2.2811035 5.9331084 450 1.6431295 -4.7452215 0 -2.2811435 5.8929898 500 1.643316 -4.7454222 0 -2.2810644 5.8454817 -Loop time of 5.85683 on 4 procs for 250 steps with 4000 atoms +Loop time of 5.70169 on 4 procs for 250 steps with 4000 atoms -Performance: 18440.001 tau/day, 42.685 timesteps/s -98.4% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 18941.760 tau/day, 43.847 timesteps/s +98.3% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 5.2483 | 5.5095 | 5.7744 | 8.0 | 94.07 -Neigh | 0.047228 | 0.047998 | 0.049293 | 0.4 | 0.82 -Comm | 0.027134 | 0.29341 | 0.55554 | 34.6 | 5.01 -Output | 0.00020003 | 0.00021219 | 0.0002358 | 0.0 | 0.00 -Modify | 0.0035472 | 0.0036988 | 0.0038681 | 0.2 | 0.06 -Other | | 0.001984 | | | 0.03 +Pair | 5.3919 | 5.4905 | 5.6136 | 3.7 | 96.30 +Neigh | 0.046791 | 0.047817 | 0.048795 | 0.3 | 0.84 +Comm | 0.034221 | 0.1575 | 0.25635 | 22.1 | 2.76 +Output | 0.00020409 | 0.00023448 | 0.00026131 | 0.0 | 0.00 +Modify | 0.0035028 | 0.0035674 | 0.0036926 | 0.1 | 0.06 +Other | | 0.002079 | | | 0.04 Nlocal: 1000 ave 1012 max 983 min Histogram: 1 0 0 0 0 0 2 0 0 1 @@ -183,20 +183,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6384234 -4.7389689 0 -2.2819482 5.9315273 200 1.6428814 -4.7460743 0 -2.2823683 5.8888228 250 1.6432631 -4.7466603 0 -2.2823818 5.8398819 -Loop time of 5.86684 on 4 procs for 250 steps with 4000 atoms +Loop time of 5.69568 on 4 procs for 250 steps with 4000 atoms -Performance: 18408.545 tau/day, 42.612 timesteps/s -98.4% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 18961.751 tau/day, 43.893 timesteps/s +98.3% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 5.3207 | 5.5695 | 5.8071 | 7.6 | 94.93 -Neigh | 0.023073 | 0.023405 | 0.023834 | 0.2 | 0.40 -Comm | 0.030558 | 0.2686 | 0.51789 | 34.7 | 4.58 -Output | 0.00028825 | 0.00036758 | 0.00042987 | 0.0 | 0.01 -Modify | 0.0034878 | 0.0036733 | 0.0039375 | 0.3 | 0.06 -Other | | 0.001259 | | | 0.02 +Pair | 5.4041 | 5.5245 | 5.6139 | 3.2 | 96.99 +Neigh | 0.022658 | 0.022986 | 0.023398 | 0.2 | 0.40 +Comm | 0.053521 | 0.14309 | 0.26385 | 20.2 | 2.51 +Output | 0.00027037 | 0.00029504 | 0.00033665 | 0.0 | 0.01 +Modify | 0.0035288 | 0.0035585 | 0.0035827 | 0.0 | 0.06 +Other | | 0.001275 | | | 0.02 Nlocal: 1000 ave 1013 max 989 min Histogram: 1 0 0 1 0 1 0 0 0 1 @@ -211,4 +211,4 @@ Neighbor list builds = 12 Dangerous builds not checked shell rm melt.data melt.restart -Total wall time: 0:00:18 +Total wall time: 0:00:17 diff --git a/examples/python/log.4May17.pair_python_spce.g++.1 b/examples/python/log.4May17.pair_python_spce.g++.1 index 1a535df0e9..540c06853f 100644 --- a/examples/python/log.4May17.pair_python_spce.g++.1 +++ b/examples/python/log.4May17.pair_python_spce.g++.1 @@ -90,22 +90,22 @@ Step Temp E_pair E_mol TotEng Press 80 182.94811 -18155.978 0 -16520.523 -2393.3156 90 191.29902 -18197.887 0 -16487.779 -2242.7104 100 194.70949 -18195.021 0 -16454.425 -1955.2916 -Loop time of 23.0818 on 1 procs for 100 steps with 4500 atoms +Loop time of 23.5385 on 1 procs for 100 steps with 4500 atoms -Performance: 0.374 ns/day, 64.116 hours/ns, 4.332 timesteps/s +Performance: 0.367 ns/day, 65.385 hours/ns, 4.248 timesteps/s 98.9% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 21.186 | 21.186 | 21.186 | 0.0 | 91.79 -Bond | 0.00022054 | 0.00022054 | 0.00022054 | 0.0 | 0.00 -Kspace | 1.5442 | 1.5442 | 1.5442 | 0.0 | 6.69 -Neigh | 0.25672 | 0.25672 | 0.25672 | 0.0 | 1.11 -Comm | 0.023787 | 0.023787 | 0.023787 | 0.0 | 0.10 -Output | 0.00060248 | 0.00060248 | 0.00060248 | 0.0 | 0.00 -Modify | 0.064809 | 0.064809 | 0.064809 | 0.0 | 0.28 -Other | | 0.005301 | | | 0.02 +Pair | 21.642 | 21.642 | 21.642 | 0.0 | 91.94 +Bond | 0.00021696 | 0.00021696 | 0.00021696 | 0.0 | 0.00 +Kspace | 1.5436 | 1.5436 | 1.5436 | 0.0 | 6.56 +Neigh | 0.25623 | 0.25623 | 0.25623 | 0.0 | 1.09 +Comm | 0.024325 | 0.024325 | 0.024325 | 0.0 | 0.10 +Output | 0.00064301 | 0.00064301 | 0.00064301 | 0.0 | 0.00 +Modify | 0.065919 | 0.065919 | 0.065919 | 0.0 | 0.28 +Other | | 0.005401 | | | 0.02 Nlocal: 4500 ave 4500 max 4500 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -119,4 +119,4 @@ Ave neighs/atom = 578.169 Ave special neighs/atom = 2 Neighbor list builds = 3 Dangerous builds = 0 -Total wall time: 0:00:23 +Total wall time: 0:00:24 diff --git a/examples/python/log.4May17.pair_python_spce.g++.4 b/examples/python/log.4May17.pair_python_spce.g++.4 index c277663287..332c079ec1 100644 --- a/examples/python/log.4May17.pair_python_spce.g++.4 +++ b/examples/python/log.4May17.pair_python_spce.g++.4 @@ -90,22 +90,22 @@ Step Temp E_pair E_mol TotEng Press 80 182.94811 -18155.978 0 -16520.523 -2393.3156 90 191.29902 -18197.887 0 -16487.779 -2242.7104 100 194.70949 -18195.021 0 -16454.425 -1955.2916 -Loop time of 6.588 on 4 procs for 100 steps with 4500 atoms +Loop time of 6.4942 on 4 procs for 100 steps with 4500 atoms -Performance: 1.311 ns/day, 18.300 hours/ns, 15.179 timesteps/s -98.4% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 1.330 ns/day, 18.039 hours/ns, 15.398 timesteps/s +98.7% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 5.3756 | 5.5417 | 5.8745 | 8.3 | 84.12 -Bond | 0.0001049 | 0.00013965 | 0.0001812 | 0.0 | 0.00 -Kspace | 0.54765 | 0.87786 | 1.042 | 20.8 | 13.33 -Neigh | 0.072695 | 0.072884 | 0.072973 | 0.0 | 1.11 -Comm | 0.04138 | 0.043576 | 0.045475 | 0.7 | 0.66 -Output | 0.00041032 | 0.00043947 | 0.00052142 | 0.0 | 0.01 -Modify | 0.047381 | 0.047567 | 0.047745 | 0.1 | 0.72 -Other | | 0.003845 | | | 0.06 +Pair | 5.4084 | 5.572 | 5.8013 | 7.2 | 85.80 +Bond | 0.00012994 | 0.0001421 | 0.00016356 | 0.0 | 0.00 +Kspace | 0.52942 | 0.75773 | 0.92078 | 19.5 | 11.67 +Neigh | 0.071055 | 0.07116 | 0.071278 | 0.0 | 1.10 +Comm | 0.040311 | 0.041255 | 0.041817 | 0.3 | 0.64 +Output | 0.00040603 | 0.00048071 | 0.00058675 | 0.0 | 0.01 +Modify | 0.047507 | 0.047629 | 0.047772 | 0.1 | 0.73 +Other | | 0.003771 | | | 0.06 Nlocal: 1125 ave 1154 max 1092 min Histogram: 1 0 0 0 1 0 0 1 0 1 diff --git a/examples/python/log.4May17.pair_python_table.g++.1 b/examples/python/log.4May17.pair_python_table.g++.1 index bd3e86501b..c594a8e90a 100644 --- a/examples/python/log.4May17.pair_python_table.g++.1 +++ b/examples/python/log.4May17.pair_python_table.g++.1 @@ -67,20 +67,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.632425 -4.7284533 0 -2.2804279 5.9595684 200 1.6631578 -4.7749889 0 -2.2808759 5.7365839 250 1.6277062 -4.7224727 0 -2.2815238 5.9572913 -Loop time of 0.996652 on 1 procs for 250 steps with 4000 atoms +Loop time of 0.996739 on 1 procs for 250 steps with 4000 atoms -Performance: 108362.785 tau/day, 250.840 timesteps/s +Performance: 108353.298 tau/day, 250.818 timesteps/s 99.8% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.87999 | 0.87999 | 0.87999 | 0.0 | 88.29 -Neigh | 0.087921 | 0.087921 | 0.087921 | 0.0 | 8.82 -Comm | 0.012098 | 0.012098 | 0.012098 | 0.0 | 1.21 -Output | 0.00013614 | 0.00013614 | 0.00013614 | 0.0 | 0.01 -Modify | 0.01363 | 0.01363 | 0.01363 | 0.0 | 1.37 -Other | | 0.002882 | | | 0.29 +Pair | 0.87985 | 0.87985 | 0.87985 | 0.0 | 88.27 +Neigh | 0.08799 | 0.08799 | 0.08799 | 0.0 | 8.83 +Comm | 0.012301 | 0.012301 | 0.012301 | 0.0 | 1.23 +Output | 0.00013161 | 0.00013161 | 0.00013161 | 0.0 | 0.01 +Modify | 0.013656 | 0.013656 | 0.013656 | 0.0 | 1.37 +Other | | 0.002808 | | | 0.28 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 diff --git a/examples/python/log.4May17.pair_python_table.g++.4 b/examples/python/log.4May17.pair_python_table.g++.4 index 8dfe82097e..e509fc7f6a 100644 --- a/examples/python/log.4May17.pair_python_table.g++.4 +++ b/examples/python/log.4May17.pair_python_table.g++.4 @@ -67,20 +67,20 @@ Step Temp E_pair E_mol TotEng Press 150 1.6595852 -4.7697199 0 -2.2809644 5.7837898 200 1.6371471 -4.7363942 0 -2.2812874 5.924977 250 1.6315623 -4.7278268 0 -2.2810951 5.9807196 -Loop time of 0.300176 on 4 procs for 250 steps with 4000 atoms +Loop time of 0.291846 on 4 procs for 250 steps with 4000 atoms -Performance: 359789.395 tau/day, 832.846 timesteps/s -99.3% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 370058.286 tau/day, 856.616 timesteps/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.23104 | 0.23876 | 0.2451 | 1.2 | 79.54 -Neigh | 0.022763 | 0.023687 | 0.024305 | 0.4 | 7.89 -Comm | 0.025416 | 0.032499 | 0.041304 | 3.7 | 10.83 -Output | 0.00015378 | 0.00016057 | 0.00017667 | 0.0 | 0.05 -Modify | 0.0035894 | 0.0036637 | 0.0037456 | 0.1 | 1.22 -Other | | 0.001409 | | | 0.47 +Pair | 0.22586 | 0.23364 | 0.24085 | 1.3 | 80.06 +Neigh | 0.022808 | 0.023235 | 0.023602 | 0.2 | 7.96 +Comm | 0.022573 | 0.030065 | 0.038092 | 3.9 | 10.30 +Output | 0.00013423 | 0.00014067 | 0.00015759 | 0.0 | 0.05 +Modify | 0.0035079 | 0.0035501 | 0.0036008 | 0.1 | 1.22 +Other | | 0.001211 | | | 0.42 Nlocal: 1000 ave 1010 max 981 min Histogram: 1 0 0 0 0 0 1 0 0 2 -- GitLab From bd11479a16880c55e89dcc8ee65b886f8baf9eb5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 00:50:35 -0400 Subject: [PATCH 159/593] lock the sphinx command to version 1.5.6, since version 1.6.x seems to break one of the extensions we use --- doc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Makefile b/doc/Makefile index fd087f0344..a1f76d7041 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -158,7 +158,7 @@ $(VENV): @( \ virtualenv -p $(PYTHON) $(VENV); \ . $(VENV)/bin/activate; \ - pip install Sphinx; \ + pip install Sphinx==1.5.6; \ pip install sphinxcontrib-images; \ deactivate;\ ) -- GitLab From 4b1914aa1f29a85bb5e4341d5f66be694732ecdc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 01:07:52 -0400 Subject: [PATCH 160/593] update citations for multi-element edip potential --- potentials/SiC.edip | 2 +- src/USER-MISC/pair_edip_multi.cpp | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/potentials/SiC.edip b/potentials/SiC.edip index 0485d345bb..a38f30d974 100644 --- a/potentials/SiC.edip +++ b/potentials/SiC.edip @@ -1,4 +1,4 @@ -# DATE: 2017-05-16 CONTRIBUTOR: Laurent Pizzagalli CITATION: G. Lucas, M. Bertolus, and L. Pizzagalli, J. Phys. : Condens. Matter 22, 035802 (2010) +# DATE: 2017-05-16 CONTRIBUTOR: Chao Jiang , Phys. Rev. B 86, 144118 (2012) # element 1, element 2, element 3, # A B cutoffA cutoffC alpha beta eta # gamma lambda mu rho sigma Q0 diff --git a/src/USER-MISC/pair_edip_multi.cpp b/src/USER-MISC/pair_edip_multi.cpp index ad6d48eb7f..d52b2e4a47 100644 --- a/src/USER-MISC/pair_edip_multi.cpp +++ b/src/USER-MISC/pair_edip_multi.cpp @@ -31,16 +31,39 @@ #include "comm.h" #include "memory.h" #include "error.h" +#include "citeme.h" using namespace LAMMPS_NS; #define MAXLINE 1024 #define DELTA 4 + +static const char cite_pair_edip[] = + "@article{cjiang2012\n" + " author = {Jian, Chao and Morgan, Dane, and Szlufarska, Izabella},\n" + " title = {Carbon tri-interstitial defect: A model for DII center},\n" + " journal = {Physical Review B},\n" + " volume = {86},\n" + " pages = {144118},\n" + " year = {2012},\n" + "}\n\n" + "@article{lpizzagalli2010,\n" + " author = {G. Lucas, M. Bertolus, and L. Pizzagalli},\n" + " journal = {J. Phys. : Condens. Matter 22},\n" + " volume = {22},\n" + " pages = {035802},\n" + " year = {2010},\n" + "}\n\n"; + + + /* ---------------------------------------------------------------------- */ PairEDIPMulti::PairEDIPMulti(LAMMPS *lmp) : Pair(lmp) { + if (lmp->citeme) lmp->citeme->add(cite_pair_edip); + single_enable = 0; restartinfo = 0; one_coeff = 1; -- GitLab From 640edbc1d40e6571d25b02d9f4e892d95a9c4008 Mon Sep 17 00:00:00 2001 From: Emile Maras Date: Thu, 18 May 2017 11:08:08 +0200 Subject: [PATCH 161/593] added several features to the NEB --- doc/src/fix_neb.txt | 143 +++++--- doc/src/neb.txt | 110 ++++--- src/REPLICA/fix_neb.cpp | 706 +++++++++++++++++++++++++++++++++------- src/REPLICA/fix_neb.h | 20 +- src/REPLICA/neb.cpp | 77 ++++- src/REPLICA/neb.h | 5 +- 6 files changed, 818 insertions(+), 243 deletions(-) diff --git a/doc/src/fix_neb.txt b/doc/src/fix_neb.txt index 9d11b7289e..aaec960dd2 100644 --- a/doc/src/fix_neb.txt +++ b/doc/src/fix_neb.txt @@ -1,3 +1,11 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" + "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) @@ -10,68 +18,90 @@ fix neb command :h3 [Syntax:] -fix ID group-ID neb Kspring :pre - +fix ID group-ID neb Kspring keyword value :pre + ID, group-ID are documented in "fix"_fix.html command neb = style name of this fix command -Kspring = inter-replica spring constant (force/distance units) :ul +Kspring = parallel spring constant (force/distance units) :ul +keyword = {idealpos} or {nearestneigh} or {PerpSpring} or {freeend} + {idealpos} value = none = each replica is attached with a spring to its interpolated ideal position (default value) + {nearestneigh} value = none = each replica is attached with a spring with the previous and next replica. + {PerpSpring} value = KspringPerpend + {freeend} value = ini or final or finalWithRespToIni or finalAndInterWithRespToIni + + [Examples:] fix 1 active neb 10.0 :pre +fix 2 all neb 1.0 PerpSpring 1.0 freeend final :pre +fix 1 all neb 1.0 nearestneigh freeend finalAndInterWithRespToIni :pre [Description:] -Add inter-replica forces to atoms in the group for a multi-replica -simulation run via the "neb"_neb.html command to perform a nudged -elastic band (NEB) calculation for transition state finding. Hi-level -explanations of NEB are given with the "neb"_neb.html command and in -"Section 6.5"_Section_howto.html#howto_5 of the manual. The fix -neb command must be used with the "neb" command to define how -inter-replica forces are computed. - -Only the N atoms in the fix group experience inter-replica forces. -Atoms in the two end-point replicas do not experience these forces, -but those in intermediate replicas do. During the initial stage of -NEB, the 3N-length vector of interatomic forces Fi = -Grad(V) acting -on the atoms of each intermediate replica I is altered, as described -in the "(Henkelman1)"_#Henkelman1 paper, to become: - -Fi = -Grad(V) + (Grad(V) dot That) That + Kspring (| Ri+i - Ri | - | Ri - Ri-1 |) That :pre - -Ri are the atomic coordinates of replica I; Ri-1 and Ri+1 are the -coordinates of its neighbor replicas. That (t with a hat over it) is -the unit "tangent" vector for replica I which is a function of Ri, -Ri-1, Ri+1, and the potential energy of the 3 replicas; it points -roughly in the direction of (Ri+i - Ri-1); see the -"(Henkelman1)"_#Henkelman1 paper for details. - -The first two terms in the above equation are the component of the -interatomic forces perpendicular to the tangent vector. The last term -is a spring force between replica I and its neighbors, parallel to the -tangent vector direction with the specified spring constant {Kspring}. - -The effect of the first two terms is to push the atoms of each replica -toward the minimum energy path (MEP) of conformational states that -transition over the energy barrier. The MEP for an energy barrier is -defined as a sequence of 3N-dimensional states which cross the barrier -at its saddle point, each of which has a potential energy gradient -parallel to the MEP itself. - -The effect of the last term is to push each replica away from its two -neighbors in a direction along the MEP, so that the final set of -states are equidistant from each other. - -During the second stage of NEB, the forces on the N atoms in the -replica nearest the top of the energy barrier are altered so that it -climbs to the top of the barrier and finds the saddle point. The -forces on atoms in this replica are described in the -"(Henkelman2)"_#Henkelman2 paper, and become: +Add a nudging force to atoms in the group for a multi-replica simulation run via the "neb"_neb.html command to perform a nudged elastic band (NEB) calculation for finding the transition state. Hi-level +explanations of NEB are given with the "neb"_neb.html command and in "Section_howto 5"_Section_howto.html#howto_5 of the manual. The fix neb command must be used with the "neb" command and defines how +nudging inter-replica forces are computed. +A NEB calculation is divided in two stages. In the first stage n replicas are relaxed toward a MEP and in a second stage, the climbing image scheme (see "(Henkelman2)"_#Henkelman2) is turned on so that the replica having the highest energy relaxes toward the saddle point (i.e. the point of highest energy along the MEP). + +One purpose of the nudging forces is to keep the replicas equally spaced. +During the NEB, the 3N-length vector of interatomic force Fi = -Grad(V) of replicas i is altered. For all intermediate replicas (i.e. for 1 0 + +where E is the energy of the free end replica and ETarget is the target energy. + +When the value {ini} ({final}) is used after the keyword {freeend}, the first (last) replica is considered as a free end. The target energy is set to the energy of the replica at starting of the NEB calculation. When the value {finalWithRespToIni} or {finalAndInterWithRespToIni} is used the last image is considered as a free end and the target energy is equal to the energy of the first replica (which can evolve during the NEB relaxation). +With the value {finalWithRespToIni}, when the initial path is too far from the MEP, an intermediate repilica might relax "faster" and get a lower energy than the last replica. The benefit of the free end is then lost since this intermediate replica will relax toward a local minima. This behavior can be prevented by using the value {finalAndInterWithRespToIni} which remove entirely the contribution of the gradient for all intermediate replica which have a lower energy than the initial one thus preventing these replicae to over-relax. After converging a NEB with the {finalAndInterWithRespToIni} value it +is recommended to check that all intermediate replica have a larger energy than the initial replica. Finally note that if the last replica converges toward a local minimum with a larger energy than the energy of the first replica, a free end neb calculation with the value {finalWithRespToIni} or {finalAndInterWithRespToIni} cannot reach the convergence criteria. + +:line + + +The keywords {idealpos} and {nearestneigh} allow to specify how to parallel spring force is computed. +If the keyword {idealpos} is used or by default, the spring force is computed as suggested in "(E)"_#E : + +Fspringparallel=-{Kspring}* (RD-RDideal)/(2 meanDist) + +where RD is the "reaction coordinate" see "neb"_neb.html section, and RDideal is the ideal RD for which all the images are equally spaced (i.e. RDideal = (i-1)*meanDist when the climbing image is off, where i is the replica number). The meanDist is the average distance between replicas. + +If the keyword {nearestneigh} is used, the parallel spring force is computed as in "(Henkelman1)"_#Henkelman1 by connecting each intermediate replica with the previous and the next image: + +Fspringparallel= {Kspring}* (|Ri+1 - Ri| - |Ri - Ri-1|) + +The parallel spring force associated with the key word idealpos should usually be more efficient at keeping the images equally spaced. + +:line + +The keyword {PerpSpring} allows to add a spring force perpendicular to the path in order to prevent the path from becoming too kinky. It can improve significantly the convergence of the NEB when the resolution is poor (i.e. when too few images are used) (see "(Maras)"_#Maras). +The perpendicular spring force is given by + +Fspringperp = {Kspringperp} * f(Ri-1,Ri,Ri+1) (Ri+1 + Ri-1 - 2 Ri) + + f(Ri-1 Ri R+1) is a smooth scalar function of the angle Ri-1 Ri Ri+1. It is equal to 0 when the path is straight and is equal to 1 when the angle Ri-1 Ri Ri+1 is accute. f(Ri-1 Ri R+1) is defined in "(Jonsson)"_#Jonsson + +:line [Restart, fix_modify, output, run start/stop, minimize info:] @@ -98,9 +128,18 @@ for more info on packages. [Default:] none -:link(Henkelman1) +:link(Henkelman) [(Henkelman1)] Henkelman and Jonsson, J Chem Phys, 113, 9978-9985 (2000). -:link(Henkelman2) +:link(Henkelman) [(Henkelman2)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, 9901-9904 (2000). + +:link(E) +[(E)] E, Ren, Vanden-Eijnden, Phys Rev B, 66, 052301 (2002) + +:link(Jonsson) +[(Jonsson)] Jonsson, Mills and Jacobsen, in Classical and Quantum Dynamics in Condensed Phase Simulations, edited by Berne, Ciccotti, and Coker ͑World Scientific, Singapore, 1998͒, p. 385 + +:link(Maras) +[(Maras)] Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp Phys Comm, 205, 13-21 (2016) diff --git a/doc/src/neb.txt b/doc/src/neb.txt index 3a62a77a6e..b0be171eda 100644 --- a/doc/src/neb.txt +++ b/doc/src/neb.txt @@ -10,7 +10,7 @@ neb command :h3 [Syntax:] -neb etol ftol N1 N2 Nevery file-style arg :pre +neb etol ftol N1 N2 Nevery file-style arg keyword :pre etol = stopping tolerance for energy (energy units) :ulb,l ftol = stopping tolerance for force (force units) :l @@ -25,13 +25,14 @@ file-style= {final} or {each} or {none} :l filename = unique filename for each replica (except first) with its initial coords {none} arg = no argument all replicas assumed to already have their initial coords :pre +keyword = {verbose} :pre :ule [Examples:] neb 0.1 0.0 1000 500 50 final coords.final neb 0.0 0.001 1000 500 50 each coords.initial.$i -neb 0.0 0.001 1000 500 50 none :pre +neb 0.0 0.001 1000 500 50 none verbose :pre [Description:] @@ -43,8 +44,8 @@ NEB is a method for finding both the atomic configurations and height of the energy barrier associated with a transition state, e.g. for an atom to perform a diffusive hop from one energy basin to another in a coordinated fashion with its neighbors. The implementation in LAMMPS -follows the discussion in these 3 papers: "(HenkelmanA)"_#HenkelmanA, -"(HenkelmanB)"_#HenkelmanB, and "(Nakano)"_#Nakano3. +follows the discussion in these 4 papers: "(HenkelmanA)"_#HenkelmanA, +"(HenkelmanB)"_#HenkelmanB, "(Nakano)"_#Nakano and "(Maras)"_#Maras. Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the -partition command-line @@ -58,7 +59,7 @@ would see with one or more physical processors per replica. See discussion. NOTE: As explained below, a NEB calculation perfoms a damped dynamics -minimization across all the replicas. The minimizer uses whatever +minimization across all the replicas. The mimimizer uses whatever timestep you have defined in your input script, via the "timestep"_timestep.html command. Often NEB will converge more quickly if you use a timestep about 10x larger than you would normally @@ -70,9 +71,8 @@ I.e. the simulation domain, the number of atoms, the interaction potentials, and the starting configuration when the neb command is issued should be the same for every replica. -In a NEB calculation each atom in a replica is connected to the same -atom in adjacent replicas by springs, which induce inter-replica -forces. These forces are imposed by the "fix neb"_fix_neb.html +In a NEB calculation each replica is connected to other replicas by inter-replica +nudging forces. These forces are imposed by the "fix neb"_fix_neb.html command, which must be used in conjunction with the neb command. The group used to define the fix neb command defines the NEB atoms which are the only ones that inter-replica springs are applied to. If the @@ -81,7 +81,7 @@ inter-replica springs and the forces they feel and their motion is computed in the usual way due only to other atoms within their replica. Conceptually, the non-NEB atoms provide a background force field for the NEB atoms. They can be allowed to move during the NEB -minimization procedure (which will typically induce different +minimiation procedure (which will typically induce different coordinates for non-NEB atoms in different replicas), or held fixed using other LAMMPS commands such as "fix setforce"_fix_setforce.html. Note that the "partition"_partition.html command can be used to invoke @@ -93,31 +93,16 @@ specified in different manners via the {file-style} setting, as discussed below. Only atoms whose initial coordinates should differ from the current configuration need be specified. -Conceptually, the initial configuration for the first replica should -be a state with all the atoms (NEB and non-NEB) having coordinates on -one side of the energy barrier. A perfect energy minimum is not -required, since atoms in the first replica experience no spring forces -from the 2nd replica. Thus the damped dynamics minimization will -drive the first replica to an energy minimum if it is not already -there. However, you will typically get better convergence if the -initial state is already at a minimum. For example, for a system with -a free surface, the surface should be fully relaxed before attempting -a NEB calculation. - -Likewise, the initial configuration of the final replica should be a -state with all the atoms (NEB and non-NEB) on the other side of the -energy barrier. Again, a perfect energy minimum is not required, -since the atoms in the last replica also experience no spring forces -from the next-to-last replica, and thus the damped dynamics -minimization will drive it to an energy minimum. +Conceptually, the initial and final configurations for the first replica should +be states on either side of an energy barrier. As explained below, the initial configurations of intermediate replicas can be atomic coordinates interpolated in a linear fashion -between the first and last replicas. This is often adequate state for +between the first and last replicas. This is often adequate for simple transitions. For more complex transitions, it may lead to slow convergence or even bad results if the minimum energy path (MEP, see below) of states over the barrier cannot be correctly converged to -from such an initial configuration. In this case, you will want to +from such an initial path. In this case, you will want to generate initial states for the intermediate replicas that are geometrically closer to the MEP and read them in. @@ -135,7 +120,7 @@ is assigned to be a fraction of the distance. E.g. if there are 10 replicas, the 2nd replica will assign a position that is 10% of the distance along a line between the starting and final point, and the 9th replica will assign a position that is 90% of the distance along -the line. Note that this procedure to produce consistent coordinates +the line. Note that for this procedure to produce consistent coordinates across all the replicas, the current coordinates need to be the same in all replicas. LAMMPS does not check for this, but invalid initial configurations will likely result if it is not the case. @@ -163,7 +148,7 @@ world-, universe-, or uloop-style variables. Each replica (except the first replica) will read its file, formatted as described below, and for any atom that appears in the file, assign -the specified coordinates to its atom. The various files do not need +the specified coordinates to this atom. The various files do not need to contain the same set of atoms. For a {file-style} setting of {none}, no filename is specified. Each @@ -197,12 +182,11 @@ The minimizer tolerances for energy and force are set by {etol} and A non-zero {etol} means that the NEB calculation will terminate if the energy criterion is met by every replica. The energies being compared -to {etol} do not include any contribution from the inter-replica +to {etol} do not include any contribution from the inter-replica nudging forces, since these are non-conservative. A non-zero {ftol} means that the NEB calculation will terminate if the force criterion is met by every replica. The forces being compared to {ftol} include the -inter-replica forces between an atom and its images in adjacent -replicas. +inter-replica nudging forces. The maximum number of iterations in each stage is set by {N1} and {N2}. These are effectively timestep counts since each iteration of @@ -220,12 +204,12 @@ finding a good energy barrier. {N1} and {N2} must both be multiples of {Nevery}. In the first stage of NEB, the set of replicas should converge toward -the minimum energy path (MEP) of conformational states that transition -over the barrier. The MEP for a barrier is defined as a sequence of -3N-dimensional states that cross the barrier at its saddle point, each -of which has a potential energy gradient parallel to the MEP itself. +a minimum energy path (MEP) of conformational states that transition +over a barrier. The MEP for a transition is defined as a sequence of +3N-dimensional states, each of which has a potential energy gradient parallel to the MEP itself. +The configuration of highest energy along a MEP corresponds to a saddle point. The replica states will also be roughly equally spaced along the MEP -due to the inter-replica spring force added by the "fix +due to the inter-replica nugding force added by the "fix neb"_fix_neb.html command. In the second stage of NEB, the replica with the highest energy @@ -235,12 +219,10 @@ the barrier, via the barrier-climbing calculation described in "(HenkelmanB)"_#HenkelmanB. As before, the other replicas rearrange themselves along the MEP so as to be roughly equally spaced. -When both stages are complete, if the NEB calculation was successful, -one of the replicas should be an atomic configuration at the top or -saddle point of the barrier, the potential energies for the set of -replicas should represent the energy profile of the barrier along the -MEP, and the configurations of the replicas should be a sequence of -configurations along the MEP. +When both stages are complete, if the NEB calculation was successful, the configurations of the replicas should be along (close to) the MEP and the replica with the highest energy should be an atomic configuration at (close to) the saddle point of +the transition. The potential energies for the set of +replicas represents the energy profile of the transition along the +MEP. :line @@ -321,14 +303,7 @@ is checking against. In this case, N is all the atoms in each replica. The "maximum force per atom" is the maximum force component of any atom in any replica. The potential gradients are the two-norm of the 3N-length force vector solely due to the interaction potential i.e. -without adding in inter-replica forces. Note that inter-replica forces -are zero in the initial and final replicas, and only affect -the direction in the climbing replica. For this reason, the "maximum -force per replica" is often equal to the potential gradient in the -climbing replica. In the first stage of NEB, there is no climbing -replica, and so the potential gradient in the highest energy replica -is reported, since this replica will become the climbing replica -in the second stage of NEB. +without adding in inter-replica forces. The "reaction coordinate" (RD) for each replica is the two-norm of the 3N-length vector of distances between @@ -343,6 +318,27 @@ being operated on by the fix neb command. The forward (reverse) energy barrier is the potential energy of the highest replica minus the energy of the first (last) replica. +Supplementary informations for all replicas can be printed out to the screen and master +log.lammps file by adding the verbose keyword. These informations include the following. +The "path angle" (pathangle) for the replica i which is the angle +between the 3N-length vectors (Ri-1 - Ri) and (Ri+1 - Ri) (where Ri is the +atomic coordinates of replica i). A "path angle" of 180 indicates that replicas +i-1, i and i+1 are aligned. + "angletangrad" is the angle between the 3N-length tangent vector and +the 3N-length force vector at image i. The tangent vector is calculated as in "(HenkelmanA)"_#HenkelmanA for all intermediate replicas and at R2 - R1 and RM - RM-1 for the first and last replica, respectively. +"anglegrad" is the angle between the 3N-length energy gradient vector of replica i and that of +replica i+1. It is not defined for the final replica and reads nan. +gradV is the norm of the energy gradient of image i. +ReplicaForce is the two-norm of the 3N-length force vector (including nudging forces) for replica i. +MaxAtomForce is the maximum force component of any atom in replica i. + +When a NEB calculation does not converge properly, these suplementary +informations can help understanding what is going wrong. For instance when the +path angle becomes accute the definition of tangent used in the NEB +calculation is questionable and the NEB cannot may diverge +"(Maras)"_#Maras. + + When running on multiple partitions, LAMMPS produces additional log files for each partition, e.g. log.lammps.0, log.lammps.1, etc. For a NEB calculation, these contain the thermodynamic output for each @@ -366,7 +362,7 @@ parameters. There are 2 Python scripts provided in the tools/python directory, neb_combine.py and neb_final.py, which are useful in analyzing output from a NEB calculation. Assume a NEB simulation with M replicas, and -the NEB atoms labeled with a specific atom type. +the NEB atoms labelled with a specific atom type. The neb_combine.py script extracts atom coords for the NEB atoms from all M dump files and creates a single dump file where each snapshot @@ -396,6 +392,9 @@ This command can only be used if LAMMPS was built with the REPLICA package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info on packages. +:line + + [Related commands:] "prd"_prd.html, "temper"_temper.html, "fix @@ -412,5 +411,8 @@ langevin"_fix_langevin.html, "fix viscous"_fix_viscous.html [(HenkelmanB)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, 9901-9904 (2000). -:link(Nakano3) +:link(Nakano) [(Nakano)] Nakano, Comp Phys Comm, 178, 280-289 (2008). + +:link(Maras) +[(Maras)] Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp Phys Comm, 205, 13-21 (2016) diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index 249339191a..2087df46e0 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -32,38 +32,90 @@ using namespace LAMMPS_NS; using namespace FixConst; enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC}; - /* ---------------------------------------------------------------------- */ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), id_pe(NULL), pe(NULL), xprev(NULL), xnext(NULL), - tangent(NULL), xsend(NULL), xrecv(NULL), tagsend(NULL), tagrecv(NULL), - xsendall(NULL), xrecvall(NULL), tagsendall(NULL), tagrecvall(NULL), - counts(NULL), displacements(NULL) + Fix(lmp, narg, arg), id_pe(NULL), pe(NULL), xprev(NULL), xnext(NULL), fnext(NULL), + tangent(NULL),springF(NULL), xsend(NULL), xrecv(NULL),fsend(NULL),frecv(NULL), tagsend(NULL), tagrecv(NULL), xsendall(NULL), xrecvall(NULL),fsendall(NULL), frecvall(NULL), tagsendall(NULL), tagrecvall(NULL), counts(NULL), displacements(NULL),nlenall(NULL) { - if (narg != 4) error->all(FLERR,"Illegal fix neb command"); + + + StandardNEB=false; + NEBLongRange=true; + PerpSpring=false; + FreeEndIni=false; + FreeEndFinal=false; + FreeEndFinalWithRespToEIni =false; + FinalAndInterWithRespToEIni = false; + kspringPerp=0; + if (narg < 4) error->all(FLERR,"Illegal fix neb command, argument missing"); kspring = force->numeric(FLERR,arg[3]); - if (kspring <= 0.0) error->all(FLERR,"Illegal fix neb command"); + if (kspring <= 0.0) error->all(FLERR,"Illegal fix neb command. The spring force was not provided properly"); + + int iarg =4; + while (iarg < narg){ + if (strcmp (arg[iarg],"idealpos")==0) + {NEBLongRange = true; + iarg+=1;} + else if (strcmp (arg[iarg],"nearestneigh")==0) + {NEBLongRange = false; + StandardNEB = true; + iarg+=1;} + else if (strcmp (arg[iarg],"PerpSpring")==0) + {PerpSpring=true; + kspringPerp = force->numeric(FLERR,arg[iarg+1]); + if (kspringPerp < 0.0) error->all(FLERR,"Illegal fix neb command. The perpendicular spring force was not provided properly"); + iarg+=2; + } + else if (strcmp (arg[iarg],"freeend")==0) + { + if (strcmp (arg[iarg+1],"ini")==0) + FreeEndIni=true; + else if (strcmp (arg[iarg+1],"final")==0) + FreeEndFinal=true; + else if (strcmp (arg[iarg+1],"final")==0) + FreeEndFinal=true; + else if (strcmp (arg[iarg+1],"finalWithRespToIni")==0) + FreeEndFinalWithRespToEIni=true; + else if (strcmp (arg[iarg+1],"finalAndInterWithRespToIni")==0) + {FinalAndInterWithRespToEIni=true; + FreeEndFinalWithRespToEIni=true;} + iarg+=2;} + else {error->all(FLERR,"Illegal fix neb command. Unknown keyword");} + } // nreplica = number of partitions // ireplica = which world I am in universe // nprocs_universe = # of procs in all replicase // procprev,procnext = root proc in adjacent replicas + me = comm->me; nprocs = comm->nprocs; nprocs_universe = universe->nprocs; nreplica = universe->nworlds; ireplica = universe->iworld; - + if (ireplica > 0) procprev = universe->root_proc[ireplica-1]; else procprev = -1; if (ireplica < nreplica-1) procnext = universe->root_proc[ireplica+1]; else procnext = -1; uworld = universe->uworld; - + int *iroots = new int[nreplica]; + MPI_Group uworldgroup,rootgroup; + if (NEBLongRange ){ + for (int iIm =0; iIm < nreplica;iIm++) + { + iroots[iIm]=universe->root_proc[iIm]; + } + MPI_Comm_group(uworld, &uworldgroup); + MPI_Group_incl(uworldgroup, nreplica, iroots, &rootgroup); + + // MPI_Comm_create_group(uworld, rootgroup, 0, &rootworld); + MPI_Comm_create(uworld, rootgroup, &rootworld); + } // create a new compute pe style // id = fix-ID + pe, compute group = all @@ -84,12 +136,19 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : maxlocal = 0; ntotal = 0; - xprev = xnext = tangent = NULL; + xprev = xnext = tangent = springF= NULL; + fnext = NULL; xsend = xrecv = NULL; + fsend = frecv = NULL; tagsend = tagrecv = NULL; xsendall = xrecvall = NULL; + fsendall = frecvall = NULL; tagsendall = tagrecvall = NULL; counts = displacements = NULL; + + + if (NEBLongRange) + {nlenall=NULL;} } /* ---------------------------------------------------------------------- */ @@ -102,19 +161,27 @@ FixNEB::~FixNEB() memory->destroy(xprev); memory->destroy(xnext); memory->destroy(tangent); - + memory->destroy(springF); memory->destroy(xsend); memory->destroy(xrecv); + memory->destroy(fsend); + memory->destroy(frecv); memory->destroy(tagsend); memory->destroy(tagrecv); memory->destroy(xsendall); memory->destroy(xrecvall); + memory->destroy(fsendall); + memory->destroy(frecvall); memory->destroy(tagsendall); memory->destroy(tagrecvall); memory->destroy(counts); memory->destroy(displacements); + + if (NEBLongRange) + memory->destroy(nlenall); + } /* ---------------------------------------------------------------------- */ @@ -139,6 +206,7 @@ void FixNEB::init() rclimber = -1; + // nebatoms = # of atoms in fix group = atoms with inter-replica forces bigint count = group->count(igroup); @@ -163,11 +231,18 @@ void FixNEB::init() if (MULTI_PROC && counts == NULL) { memory->create(xsendall,ntotal,3,"neb:xsendall"); memory->create(xrecvall,ntotal,3,"neb:xrecvall"); + memory->create(fsendall,ntotal,3,"neb:fsendall"); + memory->create(frecvall,ntotal,3,"neb:frecvall"); memory->create(tagsendall,ntotal,"neb:tagsendall"); memory->create(tagrecvall,ntotal,"neb:tagrecvall"); memory->create(counts,nprocs,"neb:counts"); memory->create(displacements,nprocs,"neb:displacements"); } + + + + + } /* ---------------------------------------------------------------------- */ @@ -186,140 +261,284 @@ void FixNEB::min_setup(int vflag) void FixNEB::min_post_force(int vflag) { double vprev,vnext,vmax,vmin; - double delx,dely,delz; + double delxp,delyp,delzp,delxn,delyn,delzn; double delta1[3],delta2[3]; - + MPI_Status status; + MPI_Request request; + double vIni =0.0; // veng = PE of this replica // vprev,vnext = PEs of adjacent replicas // only proc 0 in each replica communicates - vprev = vnext = veng = pe->compute_scalar(); + vprev=vnext=veng = pe->compute_scalar(); - if (ireplica < nreplica-1 && me == 0) + if (ireplica < nreplica-1 && me ==0) MPI_Send(&veng,1,MPI_DOUBLE,procnext,0,uworld); - if (ireplica > 0 && me == 0) - MPI_Recv(&vprev,1,MPI_DOUBLE,procprev,0,uworld,MPI_STATUS_IGNORE); + if (ireplica > 0 && me ==0) + MPI_Recv(&vprev,1,MPI_DOUBLE,procprev,0,uworld,&status); if (ireplica > 0 && me == 0) MPI_Send(&veng,1,MPI_DOUBLE,procprev,0,uworld); if (ireplica < nreplica-1 && me == 0) - MPI_Recv(&vnext,1,MPI_DOUBLE,procnext,0,uworld,MPI_STATUS_IGNORE); + MPI_Recv(&vnext,1,MPI_DOUBLE,procnext,0,uworld,&status); if (cmode == MULTI_PROC) { MPI_Bcast(&vprev,1,MPI_DOUBLE,0,world); MPI_Bcast(&vnext,1,MPI_DOUBLE,0,world); } - // communicate atoms to/from adjacent replicas to fill xprev,xnext + if (FreeEndFinal) + { + if (update->ntimestep==0) + {EFinalIni = veng;} + } + + if (ireplica==0) + vIni=veng; + + if (FreeEndFinalWithRespToEIni ) { + if ( me ==0){ + int procFirst; + procFirst=universe->root_proc[0]; + MPI_Bcast(&vIni,1,MPI_DOUBLE,procFirst,uworld); //MPI_Recv(&vIni,1,MPI_DOUBLE,procFirst,0,uworld,&status); + } + if (cmode == MULTI_PROC) { + MPI_Bcast(&vIni,1,MPI_DOUBLE,0,world); + } + } + if (FreeEndIni && ireplica==0 ) + { + if (me == 0 ) + if (update->ntimestep==0) + { + EIniIni = veng; + if (cmode == MULTI_PROC) + MPI_Bcast(&EIniIni,1,MPI_DOUBLE,0,world); + } + } + + // communicate atoms to/from adjacent replicas to fill xprev,xnext + inter_replica_comm(); // trigger potential energy computation on next timestep pe->addstep(update->ntimestep+1); - // compute norm of GradV for log output + /* ALL THIS SHOULD BE DONE IN inter_replica_comm() + // xprev,xnext = atom coords of adjacent replicas + // assume order of atoms in all replicas is the same + // check that number of atoms hasn't changed - double **f = atom->f; + double **x = atom->x; + int *mask = atom->mask; int nlocal = atom->nlocal; + double dot = 0.0; + double prefactor; - double fsq = 0.0; - for (int i = 0; i < nlocal; i++) - fsq += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + if (nlocal != nebatoms) error->one(FLERR,"Atom count changed in fix neb"); + + if (ireplica > 0) + MPI_Irecv(xprev[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld,&request); + if (ireplica < nreplica-1) + MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld); + if (ireplica > 0) MPI_Wait(&request,&status); + + + + + if (ireplica < nreplica-1) + MPI_Irecv(xnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); + if (ireplica > 0) + MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); + if (ireplica < nreplica-1) MPI_Wait(&request,&status); + */ - MPI_Allreduce(&fsq,&gradvnorm,1,MPI_DOUBLE,MPI_SUM,world); - gradvnorm = sqrt(gradvnorm); - // first or last replica has no change to forces, just return - if (ireplica == 0 || ireplica == nreplica-1) { - plen = nlen = 0.0; - return; - } - // tangent = unit tangent vector in 3N space - // based on delta vectors between atoms and their images in adjacent replicas - // use one or two delta vecs to compute tangent, - // depending on relative PEs of 3 replicas - // see Henkelman & Jonsson 2000 paper, eqs 8-11 double **x = atom->x; int *mask = atom->mask; + double dot = 0.0; + double prefactor; - if (vnext > veng && veng > vprev) { - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - tangent[i][0] = xnext[i][0] - x[i][0]; - tangent[i][1] = xnext[i][1] - x[i][1]; - tangent[i][2] = xnext[i][2] - x[i][2]; - domain->minimum_image(tangent[i]); - } - } else if (vnext < veng && veng < vprev) { + double **f = atom->f; + int nlocal = atom->nlocal; + + /* SHOULD BE DONE IN inter_replica_comm() + if (ireplica < nreplica-1) + MPI_Irecv(fnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); + if (ireplica > 0) + MPI_Send(f[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); + if (ireplica < nreplica-1) MPI_Wait(&request,&status); + */ + + + //calculating separation between images + plen = 0.0; + nlen = 0.0; + double tlen = 0.0; + double gradnextlen = 0.0; + double dotFreeEndIniOld=0.0; + double dotFreeEndFinalOld=0.0; + + dotgrad = 0.0; + + gradlen = 0.0; + + + dotpath = 0.0; + dottangrad = 0.0; + + + + + if (ireplica ==nreplica-1){ + + for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - tangent[i][0] = x[i][0] - xprev[i][0]; - tangent[i][1] = x[i][1] - xprev[i][1]; - tangent[i][2] = x[i][2] - xprev[i][2]; - domain->minimum_image(tangent[i]); + + delxp = x[i][0] - xprev[i][0]; + delyp = x[i][1] - xprev[i][1]; + delzp = x[i][2] - xprev[i][2]; + domain->minimum_image(delxp,delyp,delzp); + plen += delxp*delxp + delyp*delyp + delzp*delzp; + dottangrad += delxp* f[i][0]+ delyp*f[i][1]+delzp*f[i][2]; + gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + + if (FreeEndFinal||FreeEndFinalWithRespToEIni){ + tangent[i][0]=delxp; + tangent[i][1]=delyp; + tangent[i][2]=delzp; + tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + + tangent[i][2]*tangent[i][2]; + dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + f[i][2]*tangent[i][2]; + } } - } else { - vmax = MAX(fabs(vnext-veng),fabs(vprev-veng)); - vmin = MIN(fabs(vnext-veng),fabs(vprev-veng)); + } + + + else if (ireplica == 0){ for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - delta1[0] = xnext[i][0] - x[i][0]; - delta1[1] = xnext[i][1] - x[i][1]; - delta1[2] = xnext[i][2] - x[i][2]; - domain->minimum_image(delta1); - delta2[0] = x[i][0] - xprev[i][0]; - delta2[1] = x[i][1] - xprev[i][1]; - delta2[2] = x[i][2] - xprev[i][2]; - domain->minimum_image(delta2); - if (vnext > vprev) { - tangent[i][0] = vmax*delta1[0] + vmin*delta2[0]; - tangent[i][1] = vmax*delta1[1] + vmin*delta2[1]; - tangent[i][2] = vmax*delta1[2] + vmin*delta2[2]; - } else { - tangent[i][0] = vmin*delta1[0] + vmax*delta2[0]; - tangent[i][1] = vmin*delta1[1] + vmax*delta2[1]; - tangent[i][2] = vmin*delta1[2] + vmax*delta2[2]; - } + delxn = xnext[i][0] - x[i][0]; + delyn = xnext[i][1] - x[i][1]; + delzn = xnext[i][2] - x[i][2]; + domain->minimum_image(delxn,delyn,delzn); + nlen += delxn*delxn + delyn*delyn + delzn*delzn; + gradnextlen += fnext[i][0]*fnext[i][0] + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; + dotgrad += f[i][0]*fnext[i][0] + f[i][1]*fnext[i][1] + + f[i][2]*fnext[i][2]; + dottangrad += delxn* f[i][0]+ delyn*f[i][1]+delzn*f[i][2]; + gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + if (FreeEndIni) + { + tangent[i][0]=delxn; + tangent[i][1]=delyn; + tangent[i][2]=delzn; + tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + + tangent[i][2]*tangent[i][2]; + dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + f[i][2]*tangent[i][2]; + } } } - - // tlen,plen,nlen = lengths of tangent, prev, next vectors - - double tlen = 0.0; - plen = 0.0; - nlen = 0.0; - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + - tangent[i][2]*tangent[i][2]; - - delx = x[i][0] - xprev[i][0]; - dely = x[i][1] - xprev[i][1]; - delz = x[i][2] - xprev[i][2]; - domain->minimum_image(delx,dely,delz); - plen += delx*delx + dely*dely + delz*delz; - - delx = xnext[i][0] - x[i][0]; - dely = xnext[i][1] - x[i][1]; - delz = xnext[i][2] - x[i][2]; - domain->minimum_image(delx,dely,delz); - nlen += delx*delx + dely*dely + delz*delz; + else //not the first or last replica + { + vmax = MAX(fabs(vnext-veng),fabs(vprev-veng)); + vmin = MIN(fabs(vnext-veng),fabs(vprev-veng)); + + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + delxp = x[i][0] - xprev[i][0]; + delyp = x[i][1] - xprev[i][1]; + delzp = x[i][2] - xprev[i][2]; + domain->minimum_image(delxp,delyp,delzp); + plen += delxp*delxp + delyp*delyp + delzp*delzp; + + delxn = xnext[i][0] - x[i][0]; + delyn = xnext[i][1] - x[i][1]; + delzn = xnext[i][2] - x[i][2]; + domain->minimum_image(delxn,delyn,delzn); domain->minimum_image(delxn,delyn,delzn); + + if (vnext > veng && veng > vprev) { + tangent[i][0]=delxn; + tangent[i][1]=delyn; + tangent[i][2]=delzn; + } + else if (vnext < veng && veng < vprev) { + tangent[i][0]=delxp; + tangent[i][1]=delyp; + tangent[i][2]=delzp; + } + else { + if (vnext > vprev) { + tangent[i][0] = vmax*delxn + vmin*delxp; + tangent[i][1] = vmax*delyn + vmin*delyp; + tangent[i][2] = vmax*delzn + vmin*delzp; + } else { + tangent[i][0] = vmin*delxn + vmax*delxp; + tangent[i][1] = vmin*delyn + vmax*delyp; + tangent[i][2] = vmin*delzn + vmax*delzp; + } + + } + + nlen += delxn*delxn + delyn*delyn + delzn*delzn; + tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + + tangent[i][2]*tangent[i][2]; + gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + dotpath += delxp*delxn + delyp*delyn + delzp*delzn; + dottangrad += tangent[i][0]* f[i][0]+ tangent[i][1]*f[i][1]+tangent[i][2]*f[i][2]; + + + + gradnextlen += fnext[i][0]*fnext[i][0] + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; + dotgrad += f[i][0]*fnext[i][0] + f[i][1]*fnext[i][1] + + f[i][2]*fnext[i][2]; + + + springF[i][0]=kspringPerp*(delxn-delxp); + springF[i][1]=kspringPerp*(delyn-delyp); + springF[i][2]=kspringPerp*(delzn-delzp); + + } } double lenall; - MPI_Allreduce(&tlen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); - tlen = sqrt(lenall); + MPI_Allreduce(&nlen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); + nlen = sqrt(lenall); MPI_Allreduce(&plen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); plen = sqrt(lenall); - MPI_Allreduce(&nlen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); - nlen = sqrt(lenall); + MPI_Allreduce(&tlen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); + tlen = sqrt(lenall); + + MPI_Allreduce(&gradlen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); + gradlen = sqrt(lenall); + + MPI_Allreduce(&gradnextlen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); + gradnextlen = sqrt(lenall); + + + + + double dotpathall; + double dottangradall; + double dotgradall; + + MPI_Allreduce(&dotpath,&dotpathall,1,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(&dottangrad,&dottangradall,1,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(&dotgrad,&dotgradall,1,MPI_DOUBLE,MPI_SUM,world); + + + dotpath=dotpathall; + dottangrad=dottangradall; + dotgrad=dotgradall; // normalize tangent vector @@ -333,38 +552,237 @@ void FixNEB::min_post_force(int vflag) } } - // reset force on each atom in this replica - // regular NEB for all replicas except rclimber does hill-climbing NEB - // currently have F = -Grad(V) = -Grad(V)_perp - Grad(V)_parallel - // want F = -Grad(V)_perp + Fspring for regular NEB - // thus Fdelta = Grad(V)_parallel + Fspring for regular NEB - // want F = -Grad(V) + 2 Grad(V)_parallel for hill-climbing NEB - // thus Fdelta = 2 Grad(V)_parallel for hill-climbing NEB - // Grad(V)_parallel = (Grad(V) . utan) * utangent = -(F . utan) * utangent - // Fspring = k (nlen - plen) * utangent - // see Henkelman & Jonsson 2000 paper, eqs 3,4,12 - // see Henkelman & Jonsson 2000a paper, eq 5 - double dot = 0.0; + // first or last replica has no change to forces, just return + + if(ireplica >0 && ireplica 0.0) { + double dotall; + MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); + dot=dotall; + + double tleninv = 1.0/tlen; + dot *= tleninv; + if (dot<0) + prefactor = -dot - (veng-EIniIni); + else prefactor = -dot + (veng-EIniIni); + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + f[i][0] += prefactor *tangent[i][0]; + f[i][1] += prefactor *tangent[i][1]; + f[i][2] += prefactor *tangent[i][2]; + } + + } + + + } + + + + + + + if(FreeEndFinal&&ireplica == nreplica -1) + {if (tlen > 0.0) { + double dotall; + MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); + dot=dotall; + double tleninv = 1.0/tlen; + dot *= tleninv; + if (dot<0) + prefactor = -dot - (veng-EFinalIni); + else prefactor = -dot + (veng-EFinalIni); + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + f[i][0] += prefactor *tangent[i][0]; + f[i][1] += prefactor *tangent[i][1]; + f[i][2] += prefactor *tangent[i][2]; + } + + } + } + + if(FreeEndFinalWithRespToEIni&&ireplica == nreplica -1) + {if (tlen > 0.0) { + double dotall; + MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); + dot=dotall; + double tleninv = 1.0/tlen; + dot *= tleninv; + if (dot<0) + prefactor = -dot - (veng-vIni); + else prefactor = -dot + (veng-vIni); + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + f[i][0] += prefactor *tangent[i][0]; + f[i][1] += prefactor *tangent[i][1]; + f[i][2] += prefactor *tangent[i][2]; + } + + } + } + + double lentot = 0; + + double meanDist,idealPos,lenuntilIm,lenuntilClimber; + lenuntilClimber=0; + if(NEBLongRange) + { + if (cmode == SINGLE_PROC_DIRECT or cmode == SINGLE_PROC_MAP) + {MPI_Allgather(&nlen,1,MPI_DOUBLE,&nlenall[0],1,MPI_DOUBLE,uworld);} + else + { + /* int procRootiIm; + double nlentmp; + + for (int iIm = 0; i < nreplica; i++) + { + procRootiIm=universe->root_proc[iIm]; + if (ireplica == iIm && me ==0) + { nlentmp=nlen; + MPI_Bcast(&nlentmp,1,MPI_DOUBLE,procRootiIm,uworld); + } + else + { + MPI_Bcast(&nlentmp,1,MPI_DOUBLE,procRootiIm,uworld); + } + nlenall[iIm]=nlen; + } + */ + if (me == 0) + MPI_Allgather(&nlen,1,MPI_DOUBLE,&nlenall[0],1,MPI_DOUBLE,rootworld); + + MPI_Bcast(nlenall,nreplica,MPI_DOUBLE,0,world); + + } + + + + lenuntilIm = 0; + for (int i = 0; i < ireplica; i++) + lenuntilIm += nlenall[i]; + + + for (int i = 0; i < nreplica; i++) + lentot += nlenall[i]; + + meanDist = lentot/(nreplica -1); + + if (rclimber>0) + { + for (int i = 0; i < rclimber; i++) + lenuntilClimber += nlenall[i]; + + double meanDistBeforeClimber = lenuntilClimber/rclimber; + double meanDistAfterClimber = (lentot-lenuntilClimber)/(nreplica-rclimber-1); + + + if (ireplicanlocal > maxlocal) reallocate(); double **x = atom->x; + double **f = atom->f; tagint *tag = atom->tag; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -395,7 +815,7 @@ void FixNEB::inter_replica_comm() // ----------------------------------------------------- // single proc per replica - // all atoms are NEB atoms and no atom sorting is enabled + // all atoms are NEB atoms and no atom sorting // direct comm of x -> xprev and x -> xnext if (cmode == SINGLE_PROC_DIRECT) { @@ -411,6 +831,13 @@ void FixNEB::inter_replica_comm() MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); if (ireplica < nreplica-1) MPI_Wait(&request,MPI_STATUS_IGNORE); + if (ireplica < nreplica-1) + MPI_Irecv(fnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); + if (ireplica > 0) + MPI_Send(f[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); + if (ireplica < nreplica-1) MPI_Wait(&request,MPI_STATUS_IGNORE); + + return; } @@ -427,6 +854,9 @@ void FixNEB::inter_replica_comm() xsend[m][0] = x[i][0]; xsend[m][1] = x[i][1]; xsend[m][2] = x[i][2]; + fsend[m][0] = f[i][0]; + fsend[m][1] = f[i][1]; + fsend[m][2] = f[i][2]; m++; } @@ -451,10 +881,12 @@ void FixNEB::inter_replica_comm() if (ireplica < nreplica-1) { MPI_Irecv(xrecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); + MPI_Irecv(frecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); MPI_Irecv(tagrecv,nebatoms,MPI_LMP_TAGINT,procnext,0,uworld,&requests[1]); } if (ireplica > 0) { MPI_Send(xsend[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); + MPI_Send(fsend[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); MPI_Send(tagsend,nebatoms,MPI_LMP_TAGINT,procprev,0,uworld); } @@ -465,6 +897,9 @@ void FixNEB::inter_replica_comm() xnext[m][0] = xrecv[i][0]; xnext[m][1] = xrecv[i][1]; xnext[m][2] = xrecv[i][2]; + fnext[m][0] = frecv[i][0]; + fnext[m][1] = frecv[i][1]; + fnext[m][2] = frecv[i][2]; } } @@ -484,6 +919,9 @@ void FixNEB::inter_replica_comm() xsend[m][0] = x[i][0]; xsend[m][1] = x[i][1]; xsend[m][2] = x[i][2]; + fsend[m][0] = f[i][0]; + fsend[m][1] = f[i][1]; + fsend[m][2] = f[i][2]; m++; } @@ -496,12 +934,18 @@ void FixNEB::inter_replica_comm() for (i = 0; i < nprocs; i++) counts[i] *= 3; for (i = 0; i < nprocs-1; i++) displacements[i+1] = displacements[i] + counts[i]; - if (xsend) + if (xsend){ MPI_Gatherv(xsend[0],3*m,MPI_DOUBLE, xsendall[0],counts,displacements,MPI_DOUBLE,0,world); - else + MPI_Gatherv(fsend[0],3*m,MPI_DOUBLE, + fsendall[0],counts,displacements,MPI_DOUBLE,0,world); + } + else { MPI_Gatherv(NULL,3*m,MPI_DOUBLE, xsendall[0],counts,displacements,MPI_DOUBLE,0,world); + MPI_Gatherv(NULL,3*m,MPI_DOUBLE, + fsendall[0],counts,displacements,MPI_DOUBLE,0,world); + } if (ireplica > 0 && me == 0) { MPI_Irecv(xrecvall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld,&requests[0]); @@ -530,11 +974,13 @@ void FixNEB::inter_replica_comm() if (ireplica < nreplica-1 && me == 0) { MPI_Irecv(xrecvall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); + MPI_Irecv(frecvall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); MPI_Irecv(tagrecvall,nebatoms,MPI_LMP_TAGINT,procnext,0,uworld, &requests[1]); } if (ireplica > 0 && me == 0) { MPI_Send(xsendall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); + MPI_Send(fsendall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); MPI_Send(tagsendall,nebatoms,MPI_LMP_TAGINT,procprev,0,uworld); } @@ -543,6 +989,7 @@ void FixNEB::inter_replica_comm() MPI_Bcast(tagrecvall,nebatoms,MPI_INT,0,world); MPI_Bcast(xrecvall[0],3*nebatoms,MPI_DOUBLE,0,world); + MPI_Bcast(frecvall[0],3*nebatoms,MPI_DOUBLE,0,world); for (i = 0; i < nebatoms; i++) { m = atom->map(tagrecvall[i]); @@ -550,10 +997,14 @@ void FixNEB::inter_replica_comm() xnext[m][0] = xrecvall[i][0]; xnext[m][1] = xrecvall[i][1]; xnext[m][2] = xrecvall[i][2]; + fnext[m][0] = frecvall[i][0]; + fnext[m][1] = frecvall[i][1]; + fnext[m][2] = frecvall[i][2]; } } } + /* ---------------------------------------------------------------------- reallocate xprev,xnext,tangent arrays if necessary reallocate communication arrays if necessary @@ -561,13 +1012,25 @@ void FixNEB::inter_replica_comm() void FixNEB::reallocate() { + memory->destroy(xprev); memory->destroy(xnext); memory->destroy(tangent); + memory->destroy(fnext); + memory->destroy(springF); + + if (NEBLongRange) + {memory->destroy(nlenall); + memory->create(nlenall,nreplica,"neb:nlenall"); + } + + if (cmode != SINGLE_PROC_DIRECT) { memory->destroy(xsend); + memory->destroy(fsend); memory->destroy(xrecv); + memory->destroy(frecv); memory->destroy(tagsend); memory->destroy(tagrecv); } @@ -577,10 +1040,15 @@ void FixNEB::reallocate() memory->create(xprev,maxlocal,3,"neb:xprev"); memory->create(xnext,maxlocal,3,"neb:xnext"); memory->create(tangent,maxlocal,3,"neb:tangent"); + memory->create(fnext,maxlocal,3,"neb:fnext"); + memory->create(springF,maxlocal,3,"neb:springF"); + if (cmode != SINGLE_PROC_DIRECT) { memory->create(xsend,maxlocal,3,"neb:xsend"); + memory->create(fsend,maxlocal,3,"neb:fsend"); memory->create(xrecv,maxlocal,3,"neb:xrecv"); + memory->create(frecv,maxlocal,3,"neb:frecv"); memory->create(tagsend,maxlocal,"neb:tagsend"); memory->create(tagrecv,maxlocal,"neb:tagrecv"); } diff --git a/src/REPLICA/fix_neb.h b/src/REPLICA/fix_neb.h index 4026f84f15..5280e9064a 100644 --- a/src/REPLICA/fix_neb.h +++ b/src/REPLICA/fix_neb.h @@ -26,9 +26,8 @@ namespace LAMMPS_NS { class FixNEB : public Fix { public: - double veng,plen,nlen; + double veng,plen,nlen,dotpath, dottangrad,gradlen,dotgrad ; int rclimber; - double gradvnorm; FixNEB(class LAMMPS *, int, char **); ~FixNEB(); @@ -39,33 +38,38 @@ class FixNEB : public Fix { private: int me,nprocs,nprocs_universe; - double kspring; + double kspring, kspringPerp,EIniIni,EFinalIni; + bool StandardNEB, NEBLongRange,PerpSpring, FreeEndIni,FreeEndFinal,FreeEndFinalWithRespToEIni,FinalAndInterWithRespToEIni ; int ireplica,nreplica; int procnext,procprev; int cmode; MPI_Comm uworld; + MPI_Comm rootworld; + char *id_pe; class Compute *pe; - int nebatoms; // # of active NEB atoms + int nebatoms; int ntotal; // total # of atoms, NEB or not int maxlocal; // size of xprev,xnext,tangent arrays - - double **xprev,**xnext; // coords of my owned atoms in neighbor replicas - double **tangent; // work vector for inter-replica forces - + double *nlenall; + double **xprev,**xnext,**fnext,**springF; + double **tangent; double **xsend,**xrecv; // coords to send/recv to/from other replica + double **fsend,**frecv; // coords to send/recv to/from other replica tagint *tagsend,*tagrecv; // ditto for atom IDs // info gathered from all procs in my replica double **xsendall,**xrecvall; // coords to send/recv to/from other replica + double **fsendall,**frecvall; // force to send/recv to/from other replica tagint *tagsendall,*tagrecvall; // ditto for atom IDs int *counts,*displacements; // used for MPI_Gather void inter_replica_comm(); void reallocate(); + }; } diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index 03bd0b61e1..8610860253 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -143,17 +143,19 @@ void NEB::command(int narg, char **arg) // process file-style setting to setup initial configs for all replicas if (strcmp(arg[5],"final") == 0) { - if (narg != 7) error->universe_all(FLERR,"Illegal NEB command"); + if (narg != 7 and narg !=8) error->universe_all(FLERR,"Illegal NEB command"); infile = arg[6]; readfile(infile,0); } else if (strcmp(arg[5],"each") == 0) { - if (narg != 7) error->universe_all(FLERR,"Illegal NEB command"); + if (narg != 7 and narg !=8) error->universe_all(FLERR,"Illegal NEB command"); infile = arg[6]; readfile(infile,1); } else if (strcmp(arg[5],"none") == 0) { - if (narg != 6) error->universe_all(FLERR,"Illegal NEB command"); + if (narg != 6 and narg !=7) error->universe_all(FLERR,"Illegal NEB command"); } else error->universe_all(FLERR,"Illegal NEB command"); - + + Verbose=false; + if (strcmp(arg[narg-1],"verbose") == 0) Verbose=true; // run the NEB calculation run(); @@ -178,7 +180,8 @@ void NEB::run() if (ineb == modify->nfix) error->all(FLERR,"NEB requires use of fix neb"); fneb = (FixNEB *) modify->fix[ineb]; - nall = 4; + if (Verbose) nall =7; + else nall = 4; memory->create(all,nreplica,nall,"neb:all"); rdist = new double[nreplica]; @@ -210,11 +213,25 @@ void NEB::run() if (me_universe == 0) { if (universe->uscreen) + if (Verbose) + fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); + else + fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " "GradV0 GradV1 GradVc " "EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN\n"); if (universe->ulogfile) + if (Verbose) + fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); + else + fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " "GradV0 GradV1 GradVc " "EBF EBR RDT " @@ -280,11 +297,24 @@ void NEB::run() if (me_universe == 0) { if (universe->uscreen) - fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " + if (Verbose) + fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); + else + fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " "GradV0 GradV1 GradVc " "EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN\n"); if (universe->ulogfile) + if (Verbose) + fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); + else + fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " "GradV0 GradV1 GradVc " "EBF EBR RDT " @@ -538,12 +568,28 @@ void NEB::print_status() double fnorminf = update->minimize->fnorm_inf(); double fmaxatom; MPI_Allreduce(&fnorminf,&fmaxatom,1,MPI_DOUBLE,MPI_MAX,roots); + + if (Verbose) + { + freplica = new double[nreplica]; + MPI_Allgather(&fnorm2,1,MPI_DOUBLE,&freplica[0],1,MPI_DOUBLE,roots); + fmaxatomInRepl = new double[nreplica]; + MPI_Allgather(&fnorminf,1,MPI_DOUBLE,&fmaxatomInRepl[0],1,MPI_DOUBLE,roots); + } - double one[4]; + double one[nall]; one[0] = fneb->veng; one[1] = fneb->plen; one[2] = fneb->nlen; - one[nall-1] = fneb->gradvnorm; + one[3] = fneb->gradlen; + + if (Verbose) + { + one[4] = fneb->dotpath; + one[5] = fneb->dottangrad; + one[6] = fneb->dotgrad; + + } if (output->thermo->normflag) one[0] /= atom->natoms; if (me == 0) @@ -586,7 +632,7 @@ void NEB::print_status() ebf = all[irep][0]-all[0][0]; ebr = all[irep][0]-all[nreplica-1][0]; } - + double pi=3.14159265; if (me_universe == 0) { if (universe->uscreen) { fprintf(universe->uscreen,BIGINT_FORMAT " %12.8g %12.8g ", @@ -596,8 +642,15 @@ void NEB::print_status() fprintf(universe->uscreen,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); for (int i = 0; i < nreplica; i++) fprintf(universe->uscreen,"%12.8g %12.8g ",rdist[i],all[i][0]); + if (Verbose) + {fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[0][5])*180/pi,180-acos(all[0][6])*180/pi,all[0][3],freplica[0],fmaxatomInRepl[0]); + for (int i = 1; i < nreplica-1; i++) + fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",180-acos(all[i][4])*180/pi,180-acos(all[i][5])*180/pi,180-acos(all[i][6])*180/pi,all[i][3],freplica[i],fmaxatomInRepl[i]); + fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[nreplica-1][5])*180/pi,NAN,all[nreplica-1][3],freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); + } fprintf(universe->uscreen,"\n"); } + if (universe->ulogfile) { fprintf(universe->ulogfile,BIGINT_FORMAT " %12.8g %12.8g ", update->ntimestep,fmaxreplica,fmaxatom); @@ -606,6 +659,12 @@ void NEB::print_status() fprintf(universe->ulogfile,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); for (int i = 0; i < nreplica; i++) fprintf(universe->ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); + if (Verbose) + {fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[0][5])*180/pi,180-acos(all[0][6])*180/pi,all[0][3],freplica[0],fmaxatomInRepl[0]); + for (int i = 1; i < nreplica-1; i++) + fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",180-acos(all[i][4])*180/pi,180-acos(all[i][5])*180/pi,180-acos(all[i][6])*180/pi,all[i][3],freplica[i],fmaxatomInRepl[i]); + fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[nreplica-1][5])*180/pi,NAN,all[nreplica-1][3],freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); + } fprintf(universe->ulogfile,"\n"); fflush(universe->ulogfile); } diff --git a/src/REPLICA/neb.h b/src/REPLICA/neb.h index afedf0cdc5..bd60efe961 100644 --- a/src/REPLICA/neb.h +++ b/src/REPLICA/neb.h @@ -38,6 +38,7 @@ class NEB : protected Pointers { private: int me,me_universe; // my proc ID in world and universe int ireplica,nreplica; + bool Verbose; MPI_Comm uworld; MPI_Comm roots; // MPI comm with 1 root proc from each world FILE *fp; @@ -52,6 +53,8 @@ class NEB : protected Pointers { int nall; // per-replica dimension of array all double **all; // PE,plen,nlen,gradvnorm from each replica double *rdist; // normalize reaction distance, 0 to 1 + double *freplica; // force on an image + double *fmaxatomInRepl; // force on an image void readfile(char *, int); void open(char *); @@ -106,7 +109,7 @@ for NEB. E: Too many timesteps -The cumulative timesteps must fit in a 64-bit integer. +The cummulative timesteps must fit in a 64-bit integer. E: Unexpected end of neb file -- GitLab From 8daba01151423437699eba44d50dca0bccda0eef Mon Sep 17 00:00:00 2001 From: Emile Maras Date: Thu, 18 May 2017 16:48:20 +0200 Subject: [PATCH 162/593] some small formating change but does not work anymore --- doc/src/fix_neb.txt | 178 +++++++----- doc/src/neb.txt | 626 +++++++++++++++++++--------------------- src/REPLICA/fix_neb.cpp | 538 +++++++++++++++------------------- src/REPLICA/neb.cpp | 112 +++---- 4 files changed, 683 insertions(+), 771 deletions(-) diff --git a/doc/src/fix_neb.txt b/doc/src/fix_neb.txt index aaec960dd2..3d6f3de540 100644 --- a/doc/src/fix_neb.txt +++ b/doc/src/fix_neb.txt @@ -1,15 +1,6 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) +:link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line @@ -20,107 +11,145 @@ fix neb command :h3 fix ID group-ID neb Kspring keyword value :pre -ID, group-ID are documented in "fix"_fix.html command -neb = style name of this fix command -Kspring = parallel spring constant (force/distance units) :ul -keyword = {idealpos} or {nearestneigh} or {PerpSpring} or {freeend} - {idealpos} value = none = each replica is attached with a spring to its interpolated ideal position (default value) - {nearestneigh} value = none = each replica is attached with a spring with the previous and next replica. - {PerpSpring} value = KspringPerpend - {freeend} value = ini or final or finalWithRespToIni or finalAndInterWithRespToIni +ID, group-ID are documented in "fix"_fix.html command neb = style name of this +fix command Kspring = parallel spring constant (force/distance units) :ul +keyword = {idealpos} or {neigh} or {perp} or {freeend} {idealpos} value = none = +each replica is attached with a spring to its interpolated ideal position +(default value) {neigh} value = none = each replica is attached with a spring +with the previous and next replica. {perp} value = spring constant for the +perpendicular spring {freeend} value = ini or final or finaleini or final2eini [Examples:] -fix 1 active neb 10.0 :pre -fix 2 all neb 1.0 PerpSpring 1.0 freeend final :pre -fix 1 all neb 1.0 nearestneigh freeend finalAndInterWithRespToIni :pre +fix 1 active neb 10.0 :pre fix 2 all neb 1.0 perp 1.0 freeend final :pre fix 1 +all neb 1.0 neigh freeend final2eini :pre [Description:] -Add a nudging force to atoms in the group for a multi-replica simulation run via the "neb"_neb.html command to perform a nudged elastic band (NEB) calculation for finding the transition state. Hi-level -explanations of NEB are given with the "neb"_neb.html command and in "Section_howto 5"_Section_howto.html#howto_5 of the manual. The fix neb command must be used with the "neb" command and defines how -nudging inter-replica forces are computed. -A NEB calculation is divided in two stages. In the first stage n replicas are relaxed toward a MEP and in a second stage, the climbing image scheme (see "(Henkelman2)"_#Henkelman2) is turned on so that the replica having the highest energy relaxes toward the saddle point (i.e. the point of highest energy along the MEP). - -One purpose of the nudging forces is to keep the replicas equally spaced. -During the NEB, the 3N-length vector of interatomic force Fi = -Grad(V) of replicas i is altered. For all intermediate replicas (i.e. for 1 0 +Fi = -Grad(V)+ (Grad(V) dot That + E-ETarget) That when Grad(V) dot That < 0 Fi += -Grad(V)+ (Grad(V) dot That + ETarget- E) That when Grad(V) dot That > 0 where E is the energy of the free end replica and ETarget is the target energy. -When the value {ini} ({final}) is used after the keyword {freeend}, the first (last) replica is considered as a free end. The target energy is set to the energy of the replica at starting of the NEB calculation. When the value {finalWithRespToIni} or {finalAndInterWithRespToIni} is used the last image is considered as a free end and the target energy is equal to the energy of the first replica (which can evolve during the NEB relaxation). -With the value {finalWithRespToIni}, when the initial path is too far from the MEP, an intermediate repilica might relax "faster" and get a lower energy than the last replica. The benefit of the free end is then lost since this intermediate replica will relax toward a local minima. This behavior can be prevented by using the value {finalAndInterWithRespToIni} which remove entirely the contribution of the gradient for all intermediate replica which have a lower energy than the initial one thus preventing these replicae to over-relax. After converging a NEB with the {finalAndInterWithRespToIni} value it -is recommended to check that all intermediate replica have a larger energy than the initial replica. Finally note that if the last replica converges toward a local minimum with a larger energy than the energy of the first replica, a free end neb calculation with the value {finalWithRespToIni} or {finalAndInterWithRespToIni} cannot reach the convergence criteria. +When the value {ini} ({final}) is used after the keyword {freeend}, the first +(last) replica is considered as a free end. The target energy is set to the +energy of the replica at starting of the NEB calculation. When the value +{finaleini} or {final2eini} is used the last image is considered as a free end +and the target energy is equal to the energy of the first replica (which can +evolve during the NEB relaxation). With the value {finaleini}, when the initial +path is too far from the MEP, an intermediate repilica might relax "faster" and +get a lower energy than the last replica. The benefit of the free end is then +lost since this intermediate replica will relax toward a local minima. This +behavior can be prevented by using the value {final2eini} which remove entirely +the contribution of the gradient for all intermediate replica which have a lower +energy than the initial one thus preventing these replicae to over-relax. After +converging a NEB with the {final2eini} value it is recommended to check that all +intermediate replica have a larger energy than the initial replica. Finally note +that if the last replica converges toward a local minimum with a larger energy +than the energy of the first replica, a free end neb calculation with the value +{finaleini} or {final2eini} cannot reach the convergence criteria. :line -The keywords {idealpos} and {nearestneigh} allow to specify how to parallel spring force is computed. -If the keyword {idealpos} is used or by default, the spring force is computed as suggested in "(E)"_#E : +The keywords {idealpos} and {neigh} allow to specify how to parallel spring +force is computed. If the keyword {idealpos} is used or by default, the spring +force is computed as suggested in "(E)"_#E : Fspringparallel=-{Kspring}* (RD-RDideal)/(2 meanDist) -where RD is the "reaction coordinate" see "neb"_neb.html section, and RDideal is the ideal RD for which all the images are equally spaced (i.e. RDideal = (i-1)*meanDist when the climbing image is off, where i is the replica number). The meanDist is the average distance between replicas. +where RD is the "reaction coordinate" see "neb"_neb.html section, and RDideal is +the ideal RD for which all the images are equally spaced (i.e. RDideal = +(i-1)*meanDist when the climbing image is off, where i is the replica +number). The meanDist is the average distance between replicas. -If the keyword {nearestneigh} is used, the parallel spring force is computed as in "(Henkelman1)"_#Henkelman1 by connecting each intermediate replica with the previous and the next image: +If the keyword {neigh} is used, the parallel spring force is computed as in +"(Henkelman1)"_#Henkelman1 by connecting each intermediate replica with the +previous and the next image: Fspringparallel= {Kspring}* (|Ri+1 - Ri| - |Ri - Ri-1|) -The parallel spring force associated with the key word idealpos should usually be more efficient at keeping the images equally spaced. +The parallel spring force associated with the key word idealpos should usually +be more efficient at keeping the images equally spaced. :line -The keyword {PerpSpring} allows to add a spring force perpendicular to the path in order to prevent the path from becoming too kinky. It can improve significantly the convergence of the NEB when the resolution is poor (i.e. when too few images are used) (see "(Maras)"_#Maras). -The perpendicular spring force is given by +The keyword {perp} allows to add a spring force perpendicular to the path in +order to prevent the path from becoming too kinky. It can improve significantly +the convergence of the NEB when the resolution is poor (i.e. when too few images +are used) (see "(Maras)"_#Maras). The perpendicular spring force is given by Fspringperp = {Kspringperp} * f(Ri-1,Ri,Ri+1) (Ri+1 + Ri-1 - 2 Ri) - f(Ri-1 Ri R+1) is a smooth scalar function of the angle Ri-1 Ri Ri+1. It is equal to 0 when the path is straight and is equal to 1 when the angle Ri-1 Ri Ri+1 is accute. f(Ri-1 Ri R+1) is defined in "(Jonsson)"_#Jonsson + f(Ri-1 Ri R+1) is a smooth scalar function of the angle Ri-1 Ri Ri+1. It is + equal to 0 when the path is straight and is equal to 1 when the angle Ri-1 Ri + Ri+1 is accute. f(Ri-1 Ri R+1) is defined in "(Jonsson)"_#Jonsson :line [Restart, fix_modify, output, run start/stop, minimize info:] -No information about this fix is written to "binary restart -files"_restart.html. None of the "fix_modify"_fix_modify.html options -are relevant to this fix. No global or per-atom quantities are stored -by this fix for access by various "output -commands"_Section_howto.html#howto_15. No parameter of this fix can -be used with the {start/stop} keywords of the "run"_run.html command. +No information about this fix is written to "binary restart files"_restart.html. +None of the "fix_modify"_fix_modify.html options are relevant to this fix. No +global or per-atom quantities are stored by this fix for access by various +"output commands"_Section_howto.html#howto_15. No parameter of this fix can be +used with the {start/stop} keywords of the "run"_run.html command. -The forces due to this fix are imposed during an energy minimization, -as invoked by the "minimize"_minimize.html command via the -"neb"_neb.html command. +The forces due to this fix are imposed during an energy minimization, as invoked +by the "minimize"_minimize.html command via the "neb"_neb.html command. [Restrictions:] -This command can only be used if LAMMPS was built with the REPLICA -package. See the "Making LAMMPS"_Section_start.html#start_3 section -for more info on packages. +This command can only be used if LAMMPS was built with the REPLICA package. See +the "Making LAMMPS"_Section_start.html#start_3 section for more info on +packages. [Related commands:] @@ -128,18 +157,17 @@ for more info on packages. [Default:] none -:link(Henkelman) -[(Henkelman1)] Henkelman and Jonsson, J Chem Phys, 113, 9978-9985 (2000). +:link(Henkelman1) [(Henkelman1)] Henkelman and Jonsson, J Chem Phys, 113, +9978-9985 (2000). -:link(Henkelman) -[(Henkelman2)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, +:link(Henkelman2) [(Henkelman2)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, 9901-9904 (2000). -:link(E) -[(E)] E, Ren, Vanden-Eijnden, Phys Rev B, 66, 052301 (2002) +:link(E) [(E)] E, Ren, Vanden-Eijnden, Phys Rev B, 66, 052301 (2002) -:link(Jonsson) -[(Jonsson)] Jonsson, Mills and Jacobsen, in Classical and Quantum Dynamics in Condensed Phase Simulations, edited by Berne, Ciccotti, and Coker ͑World Scientific, Singapore, 1998͒, p. 385 +:link(Jonsson) [(Jonsson)] Jonsson, Mills and Jacobsen, in Classical and Quantum +Dynamics in Condensed Phase Simulations, edited by Berne, Ciccotti, and Coker +͑World Scientific, Singapore, 1998͒, p. 385 -:link(Maras) -[(Maras)] Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp Phys Comm, 205, 13-21 (2016) +:link(Maras) [(Maras)] Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp +Phys Comm, 205, 13-21 (2016) diff --git a/doc/src/neb.txt b/doc/src/neb.txt index b0be171eda..964291bfcf 100644 --- a/doc/src/neb.txt +++ b/doc/src/neb.txt @@ -1,7 +1,6 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) +:link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line @@ -12,407 +11,362 @@ neb command :h3 neb etol ftol N1 N2 Nevery file-style arg keyword :pre -etol = stopping tolerance for energy (energy units) :ulb,l -ftol = stopping tolerance for force (force units) :l -N1 = max # of iterations (timesteps) to run initial NEB :l -N2 = max # of iterations (timesteps) to run barrier-climbing NEB :l -Nevery = print replica energies and reaction coordinates every this many timesteps :l -file-style= {final} or {each} or {none} :l - {final} arg = filename - filename = file with initial coords for final replica - coords for intermediate replicas are linearly interpolated between first and last replica - {each} arg = filename - filename = unique filename for each replica (except first) with its initial coords - {none} arg = no argument - all replicas assumed to already have their initial coords :pre -keyword = {verbose} :pre -:ule +etol = stopping tolerance for energy (energy units) :ulb,l ftol = stopping +tolerance for force (force units) :l N1 = max # of iterations (timesteps) to run +initial NEB :l N2 = max # of iterations (timesteps) to run barrier-climbing NEB +:l Nevery = print replica energies and reaction coordinates every this many +timesteps :l file-style= {final} or {each} or {none} :l {final} arg = filename +filename = file with initial coords for final replica coords for intermediate +replicas are linearly interpolated between first and last replica {each} arg = +filename filename = unique filename for each replica (except first) with its +initial coords {none} arg = no argument all replicas assumed to already have +their initial coords :pre keyword = {verbose} :pre :ule [Examples:] -neb 0.1 0.0 1000 500 50 final coords.final -neb 0.0 0.001 1000 500 50 each coords.initial.$i -neb 0.0 0.001 1000 500 50 none verbose :pre +neb 0.1 0.0 1000 500 50 final coords.final neb 0.0 0.001 1000 500 50 each +coords.initial.$i neb 0.0 0.001 1000 500 50 none verbose :pre [Description:] -Perform a nudged elastic band (NEB) calculation using multiple -replicas of a system. Two or more replicas must be used; the first -and last are the end points of the transition path. +Perform a nudged elastic band (NEB) calculation using multiple replicas of a +system. Two or more replicas must be used; the first and last are the end +points of the transition path. -NEB is a method for finding both the atomic configurations and height -of the energy barrier associated with a transition state, e.g. for an -atom to perform a diffusive hop from one energy basin to another in a -coordinated fashion with its neighbors. The implementation in LAMMPS -follows the discussion in these 4 papers: "(HenkelmanA)"_#HenkelmanA, -"(HenkelmanB)"_#HenkelmanB, "(Nakano)"_#Nakano and "(Maras)"_#Maras. +NEB is a method for finding both the atomic configurations and height of the +energy barrier associated with a transition state, e.g. for an atom to perform a +diffusive hop from one energy basin to another in a coordinated fashion with its +neighbors. The implementation in LAMMPS follows the discussion in these 4 +papers: "(HenkelmanA)"_#HenkelmanA, "(HenkelmanB)"_#HenkelmanB, +"(Nakano)"_#Nakano3 and "(Maras)"_#Maras. Each replica runs on a partition of one or more processors. Processor -partitions are defined at run-time using the -partition command-line -switch; see "Section 2.7"_Section_start.html#start_7 of the manual. -Note that if you have MPI installed, you can run a multi-replica -simulation with more replicas (partitions) than you have physical -processors, e.g you can run a 10-replica simulation on just one or two -processors. You will simply not get the performance speed-up you -would see with one or more physical processors per replica. See -"Section 6.5"_Section_howto.html#howto_5 of the manual for further +partitions are defined at run-time using the -partition command-line switch; see +"Section 2.7"_Section_start.html#start_7 of the manual. Note that if you have +MPI installed, you can run a multi-replica simulation with more replicas +(partitions) than you have physical processors, e.g you can run a 10-replica +simulation on just one or two processors. You will simply not get the +performance speed-up you would see with one or more physical processors per +replica. See "Section 6.5"_Section_howto.html#howto_5 of the manual for further discussion. NOTE: As explained below, a NEB calculation perfoms a damped dynamics -minimization across all the replicas. The mimimizer uses whatever -timestep you have defined in your input script, via the -"timestep"_timestep.html command. Often NEB will converge more -quickly if you use a timestep about 10x larger than you would normally -use for dynamics simulations. - -When a NEB calculation is performed, it is assumed that each replica -is running the same system, though LAMMPS does not check for this. -I.e. the simulation domain, the number of atoms, the interaction -potentials, and the starting configuration when the neb command is -issued should be the same for every replica. - -In a NEB calculation each replica is connected to other replicas by inter-replica -nudging forces. These forces are imposed by the "fix neb"_fix_neb.html -command, which must be used in conjunction with the neb command. The -group used to define the fix neb command defines the NEB atoms which -are the only ones that inter-replica springs are applied to. If the -group does not include all atoms, then non-NEB atoms have no -inter-replica springs and the forces they feel and their motion is -computed in the usual way due only to other atoms within their -replica. Conceptually, the non-NEB atoms provide a background force -field for the NEB atoms. They can be allowed to move during the NEB -minimiation procedure (which will typically induce different -coordinates for non-NEB atoms in different replicas), or held fixed -using other LAMMPS commands such as "fix setforce"_fix_setforce.html. -Note that the "partition"_partition.html command can be used to invoke -a command on a subset of the replicas, e.g. if you wish to hold NEB or -non-NEB atoms fixed in only the end-point replicas. - -The initial atomic configuration for each of the replicas can be -specified in different manners via the {file-style} setting, as -discussed below. Only atoms whose initial coordinates should differ -from the current configuration need be specified. +minimization across all the replicas. The mimimizer uses whatever timestep you +have defined in your input script, via the "timestep"_timestep.html command. +Often NEB will converge more quickly if you use a timestep about 10x larger than +you would normally use for dynamics simulations. + +When a NEB calculation is performed, it is assumed that each replica is running +the same system, though LAMMPS does not check for this. I.e. the simulation +domain, the number of atoms, the interaction potentials, and the starting +configuration when the neb command is issued should be the same for every +replica. + +In a NEB calculation each replica is connected to other replicas by +inter-replica nudging forces. These forces are imposed by the "fix +neb"_fix_neb.html command, which must be used in conjunction with the neb +command. The group used to define the fix neb command defines the NEB atoms +which are the only ones that inter-replica springs are applied to. If the group +does not include all atoms, then non-NEB atoms have no inter-replica springs and +the forces they feel and their motion is computed in the usual way due only to +other atoms within their replica. Conceptually, the non-NEB atoms provide a +background force field for the NEB atoms. They can be allowed to move during +the NEB minimization procedure (which will typically induce different +coordinates for non-NEB atoms in different replicas), or held fixed using other +LAMMPS commands such as "fix setforce"_fix_setforce.html. Note that the +"partition"_partition.html command can be used to invoke a command on a subset +of the replicas, e.g. if you wish to hold NEB or non-NEB atoms fixed in only the +end-point replicas. + +The initial atomic configuration for each of the replicas can be specified in +different manners via the {file-style} setting, as discussed below. Only atoms +whose initial coordinates should differ from the current configuration need be +specified. Conceptually, the initial and final configurations for the first replica should -be states on either side of an energy barrier. - -As explained below, the initial configurations of intermediate -replicas can be atomic coordinates interpolated in a linear fashion -between the first and last replicas. This is often adequate for -simple transitions. For more complex transitions, it may lead to slow -convergence or even bad results if the minimum energy path (MEP, see -below) of states over the barrier cannot be correctly converged to -from such an initial path. In this case, you will want to -generate initial states for the intermediate replicas that are -geometrically closer to the MEP and read them in. +be states on either side of an energy barrier. + +As explained below, the initial configurations of intermediate replicas can be +atomic coordinates interpolated in a linear fashion between the first and last +replicas. This is often adequate for simple transitions. For more complex +transitions, it may lead to slow convergence or even bad results if the minimum +energy path (MEP, see below) of states over the barrier cannot be correctly +converged to from such an initial path. In this case, you will want to generate +initial states for the intermediate replicas that are geometrically closer to +the MEP and read them in. :line -For a {file-style} setting of {final}, a filename is specified which -contains atomic coordinates for zero or more atoms, in the format -described below. For each atom that appears in the file, the new -coordinates are assigned to that atom in the final replica. Each -intermediate replica also assigns a new position to that atom in an -interpolated manner. This is done by using the current position of -the atom as the starting point and the read-in position as the final -point. The distance between them is calculated, and the new position -is assigned to be a fraction of the distance. E.g. if there are 10 -replicas, the 2nd replica will assign a position that is 10% of the -distance along a line between the starting and final point, and the -9th replica will assign a position that is 90% of the distance along -the line. Note that for this procedure to produce consistent coordinates -across all the replicas, the current coordinates need to be the same -in all replicas. LAMMPS does not check for this, but invalid initial -configurations will likely result if it is not the case. - -NOTE: The "distance" between the starting and final point is -calculated in a minimum-image sense for a periodic simulation box. -This means that if the two positions are on opposite sides of a box -(periodic in that dimension), the distance between them will be small, -because the periodic image of one of the atoms is close to the other. -Similarly, even if the assigned position resulting from the -interpolation is outside the periodic box, the atom will be wrapped +For a {file-style} setting of {final}, a filename is specified which contains +atomic coordinates for zero or more atoms, in the format described below. For +each atom that appears in the file, the new coordinates are assigned to that +atom in the final replica. Each intermediate replica also assigns a new +position to that atom in an interpolated manner. This is done by using the +current position of the atom as the starting point and the read-in position as +the final point. The distance between them is calculated, and the new position +is assigned to be a fraction of the distance. E.g. if there are 10 replicas, +the 2nd replica will assign a position that is 10% of the distance along a line +between the starting and final point, and the 9th replica will assign a position +that is 90% of the distance along the line. Note that for this procedure to +produce consistent coordinates across all the replicas, the current coordinates +need to be the same in all replicas. LAMMPS does not check for this, but +invalid initial configurations will likely result if it is not the case. + +NOTE: The "distance" between the starting and final point is calculated in a +minimum-image sense for a periodic simulation box. This means that if the two +positions are on opposite sides of a box (periodic in that dimension), the +distance between them will be small, because the periodic image of one of the +atoms is close to the other. Similarly, even if the assigned position resulting +from the interpolation is outside the periodic box, the atom will be wrapped back into the box when the NEB calculation begins. -For a {file-style} setting of {each}, a filename is specified which is -assumed to be unique to each replica. This can be done by -using a variable in the filename, e.g. - -variable i equal part -neb 0.0 0.001 1000 500 50 each coords.initial.$i :pre - -which in this case will substitute the partition ID (0 to N-1) for the -variable I, which is also effectively the replica ID. See the -"variable"_variable.html command for other options, such as using -world-, universe-, or uloop-style variables. - -Each replica (except the first replica) will read its file, formatted -as described below, and for any atom that appears in the file, assign -the specified coordinates to this atom. The various files do not need -to contain the same set of atoms. - -For a {file-style} setting of {none}, no filename is specified. Each -replica is assumed to already be in its initial configuration at the -time the neb command is issued. This allows each replica to define -its own configuration by reading a replica-specific data or restart or -dump file, via the "read_data"_read_data.html, -"read_restart"_read_restart.html, or "read_dump"_read_dump.html -commands. The replica-specific names of these files can be specified -as in the discussion above for the {each} file-style. Also see the -section below for how a NEB calculation can produce restart files, so -that a long calculation can be restarted if needed. - -NOTE: None of the {file-style} settings change the initial -configuration of any atom in the first replica. The first replica -must thus be in the correct initial configuration at the time the neb -command is issued. +For a {file-style} setting of {each}, a filename is specified which is assumed +to be unique to each replica. This can be done by using a variable in the +filename, e.g. + +variable i equal part neb 0.0 0.001 1000 500 50 each coords.initial.$i :pre + +which in this case will substitute the partition ID (0 to N-1) for the variable +I, which is also effectively the replica ID. See the "variable"_variable.html +command for other options, such as using world-, universe-, or uloop-style +variables. + +Each replica (except the first replica) will read its file, formatted as +described below, and for any atom that appears in the file, assign the specified +coordinates to this atom. The various files do not need to contain the same set +of atoms. + +For a {file-style} setting of {none}, no filename is specified. Each replica is +assumed to already be in its initial configuration at the time the neb command +is issued. This allows each replica to define its own configuration by reading +a replica-specific data or restart or dump file, via the +"read_data"_read_data.html, "read_restart"_read_restart.html, or +"read_dump"_read_dump.html commands. The replica-specific names of these files +can be specified as in the discussion above for the {each} file-style. Also see +the section below for how a NEB calculation can produce restart files, so that a +long calculation can be restarted if needed. + +NOTE: None of the {file-style} settings change the initial configuration of any +atom in the first replica. The first replica must thus be in the correct +initial configuration at the time the neb command is issued. :line -A NEB calculation proceeds in two stages, each of which is a -minimization procedure, performed via damped dynamics. To enable -this, you must first define a damped dynamics -"min_style"_min_style.html, such as {quickmin} or {fire}. The {cg}, -{sd}, and {hftn} styles cannot be used, since they perform iterative -line searches in their inner loop, which cannot be easily synchronized -across multiple replicas. - -The minimizer tolerances for energy and force are set by {etol} and -{ftol}, the same as for the "minimize"_minimize.html command. - -A non-zero {etol} means that the NEB calculation will terminate if the -energy criterion is met by every replica. The energies being compared -to {etol} do not include any contribution from the inter-replica nudging -forces, since these are non-conservative. A non-zero {ftol} means -that the NEB calculation will terminate if the force criterion is met -by every replica. The forces being compared to {ftol} include the -inter-replica nudging forces. - -The maximum number of iterations in each stage is set by {N1} and -{N2}. These are effectively timestep counts since each iteration of -damped dynamics is like a single timestep in a dynamics -"run"_run.html. During both stages, the potential energy of each -replica and its normalized distance along the reaction path (reaction -coordinate RD) will be printed to the screen and log file every -{Nevery} timesteps. The RD is 0 and 1 for the first and last replica. -For intermediate replicas, it is the cumulative distance (normalized -by the total cumulative distance) between adjacent replicas, where -"distance" is defined as the length of the 3N-vector of differences in -atomic coordinates, where N is the number of NEB atoms involved in the -transition. These outputs allow you to monitor NEB's progress in -finding a good energy barrier. {N1} and {N2} must both be multiples -of {Nevery}. - -In the first stage of NEB, the set of replicas should converge toward -a minimum energy path (MEP) of conformational states that transition -over a barrier. The MEP for a transition is defined as a sequence of -3N-dimensional states, each of which has a potential energy gradient parallel to the MEP itself. -The configuration of highest energy along a MEP corresponds to a saddle point. -The replica states will also be roughly equally spaced along the MEP -due to the inter-replica nugding force added by the "fix -neb"_fix_neb.html command. - -In the second stage of NEB, the replica with the highest energy -is selected and the inter-replica forces on it are converted to a -force that drives its atom coordinates to the top or saddle point of -the barrier, via the barrier-climbing calculation described in -"(HenkelmanB)"_#HenkelmanB. As before, the other replicas rearrange -themselves along the MEP so as to be roughly equally spaced. - -When both stages are complete, if the NEB calculation was successful, the configurations of the replicas should be along (close to) the MEP and the replica with the highest energy should be an atomic configuration at (close to) the saddle point of -the transition. The potential energies for the set of -replicas represents the energy profile of the transition along the -MEP. +A NEB calculation proceeds in two stages, each of which is a minimization +procedure, performed via damped dynamics. To enable this, you must first define +a damped dynamics "min_style"_min_style.html, such as {quickmin} or {fire}. The +{cg}, {sd}, and {hftn} styles cannot be used, since they perform iterative line +searches in their inner loop, which cannot be easily synchronized across +multiple replicas. + +The minimizer tolerances for energy and force are set by {etol} and {ftol}, the +same as for the "minimize"_minimize.html command. + +A non-zero {etol} means that the NEB calculation will terminate if the energy +criterion is met by every replica. The energies being compared to {etol} do not +include any contribution from the inter-replica nudging forces, since these are +non-conservative. A non-zero {ftol} means that the NEB calculation will +terminate if the force criterion is met by every replica. The forces being +compared to {ftol} include the inter-replica nudging forces. + +The maximum number of iterations in each stage is set by {N1} and {N2}. These +are effectively timestep counts since each iteration of damped dynamics is like +a single timestep in a dynamics "run"_run.html. During both stages, the +potential energy of each replica and its normalized distance along the reaction +path (reaction coordinate RD) will be printed to the screen and log file every +{Nevery} timesteps. The RD is 0 and 1 for the first and last replica. For +intermediate replicas, it is the cumulative distance (normalized by the total +cumulative distance) between adjacent replicas, where "distance" is defined as +the length of the 3N-vector of differences in atomic coordinates, where N is the +number of NEB atoms involved in the transition. These outputs allow you to +monitor NEB's progress in finding a good energy barrier. {N1} and {N2} must +both be multiples of {Nevery}. + +In the first stage of NEB, the set of replicas should converge toward a minimum +energy path (MEP) of conformational states that transition over a barrier. The +MEP for a transition is defined as a sequence of 3N-dimensional states, each of +which has a potential energy gradient parallel to the MEP itself. The +configuration of highest energy along a MEP corresponds to a saddle point. The +replica states will also be roughly equally spaced along the MEP due to the +inter-replica nugding force added by the "fix neb"_fix_neb.html command. + +In the second stage of NEB, the replica with the highest energy is selected and +the inter-replica forces on it are converted to a force that drives its atom +coordinates to the top or saddle point of the barrier, via the barrier-climbing +calculation described in "(HenkelmanB)"_#HenkelmanB. As before, the other +replicas rearrange themselves along the MEP so as to be roughly equally spaced. + +When both stages are complete, if the NEB calculation was successful, the +configurations of the replicas should be along (close to) the MEP and the +replica with the highest energy should be an atomic configuration at (close to) +the saddle point of the transition. The potential energies for the set of +replicas represents the energy profile of the transition along the MEP. :line -A few other settings in your input script are required or advised to -perform a NEB calculation. See the NOTE about the choice of timestep -at the beginning of this doc page. +A few other settings in your input script are required or advised to perform a +NEB calculation. See the NOTE about the choice of timestep at the beginning of +this doc page. An atom map must be defined which it is not by default for "atom_style -atomic"_atom_style.html problems. The "atom_modify -map"_atom_modify.html command can be used to do this. - -The minimizers in LAMMPS operate on all atoms in your system, even -non-NEB atoms, as defined above. To prevent non-NEB atoms from moving -during the minimization, you should use the "fix -setforce"_fix_setforce.html command to set the force on each of those -atoms to 0.0. This is not required, and may not even be desired in -some cases, but if those atoms move too far (e.g. because the initial -state of your system was not well-minimized), it can cause problems -for the NEB procedure. - -The damped dynamics "minimizers"_min_style.html, such as {quickmin} -and {fire}), adjust the position and velocity of the atoms via an -Euler integration step. Thus you must define an appropriate -"timestep"_timestep.html to use with NEB. As mentioned above, NEB -will often converge more quickly if you use a timestep about 10x -larger than you would normally use for dynamics simulations. +atomic"_atom_style.html problems. The "atom_modify map"_atom_modify.html +command can be used to do this. + +The minimizers in LAMMPS operate on all atoms in your system, even non-NEB +atoms, as defined above. To prevent non-NEB atoms from moving during the +minimization, you should use the "fix setforce"_fix_setforce.html command to set +the force on each of those atoms to 0.0. This is not required, and may not even +be desired in some cases, but if those atoms move too far (e.g. because the +initial state of your system was not well-minimized), it can cause problems for +the NEB procedure. + +The damped dynamics "minimizers"_min_style.html, such as {quickmin} and {fire}), +adjust the position and velocity of the atoms via an Euler integration step. +Thus you must define an appropriate "timestep"_timestep.html to use with NEB. +As mentioned above, NEB will often converge more quickly if you use a timestep +about 10x larger than you would normally use for dynamics simulations. :line -Each file read by the neb command containing atomic coordinates used -to initialize one or more replicas must be formatted as follows. +Each file read by the neb command containing atomic coordinates used to +initialize one or more replicas must be formatted as follows. -The file can be ASCII text or a gzipped text file (detected by a .gz -suffix). The file can contain initial blank lines or comment lines -starting with "#" which are ignored. The first non-blank, non-comment -line should list N = the number of lines to follow. The N successive -lines contain the following information: +The file can be ASCII text or a gzipped text file (detected by a .gz suffix). +The file can contain initial blank lines or comment lines starting with "#" +which are ignored. The first non-blank, non-comment line should list N = the +number of lines to follow. The N successive lines contain the following +information: -ID1 x1 y1 z1 -ID2 x2 y2 z2 -... -IDN xN yN zN :pre +ID1 x1 y1 z1 ID2 x2 y2 z2 ... IDN xN yN zN :pre -The fields are the atom ID, followed by the x,y,z coordinates. -The lines can be listed in any order. Additional trailing information -on the line is OK, such as a comment. +The fields are the atom ID, followed by the x,y,z coordinates. The lines can be +listed in any order. Additional trailing information on the line is OK, such as +a comment. -Note that for a typical NEB calculation you do not need to specify -initial coordinates for very many atoms to produce differing starting -and final replicas whose intermediate replicas will converge to the -energy barrier. Typically only new coordinates for atoms -geometrically near the barrier need be specified. +Note that for a typical NEB calculation you do not need to specify initial +coordinates for very many atoms to produce differing starting and final replicas +whose intermediate replicas will converge to the energy barrier. Typically only +new coordinates for atoms geometrically near the barrier need be specified. -Also note there is no requirement that the atoms in the file -correspond to the NEB atoms in the group defined by the "fix -neb"_fix_neb.html command. Not every NEB atom need be in the file, -and non-NEB atoms can be listed in the file. +Also note there is no requirement that the atoms in the file correspond to the +NEB atoms in the group defined by the "fix neb"_fix_neb.html command. Not every +NEB atom need be in the file, and non-NEB atoms can be listed in the file. :line -Four kinds of output can be generated during a NEB calculation: energy -barrier statistics, thermodynamic output by each replica, dump files, -and restart files. - -When running with multiple partitions (each of which is a replica in -this case), the print-out to the screen and master log.lammps file -contains a line of output, printed once every {Nevery} timesteps. It -contains the timestep, the maximum force per replica, the maximum -force per atom (in any replica), potential gradients in the initial, -final, and climbing replicas, the forward and backward energy barriers, -the total reaction coordinate (RDT), and the normalized reaction -coordinate and potential energy of each replica. - -The "maximum force per replica" is -the two-norm of the 3N-length force vector for the atoms in each -replica, maximized across replicas, which is what the {ftol} setting -is checking against. In this case, N is all the atoms in each -replica. The "maximum force per atom" is the maximum force component -of any atom in any replica. The potential gradients are the two-norm -of the 3N-length force vector solely due to the interaction potential i.e. -without adding in inter-replica forces. - -The "reaction coordinate" (RD) for each -replica is the two-norm of the 3N-length vector of distances between -its atoms and the preceding replica's atoms, added to the RD of the -preceding replica. The RD of the first replica RD1 = 0.0; -the RD of the final replica RDN = RDT, the total reaction coordinate. -The normalized RDs are divided by RDT, -so that they form a monotonically increasing sequence -from zero to one. When computing RD, N only includes the atoms -being operated on by the fix neb command. +Four kinds of output can be generated during a NEB calculation: energy barrier +statistics, thermodynamic output by each replica, dump files, and restart files. + +When running with multiple partitions (each of which is a replica in this case), +the print-out to the screen and master log.lammps file contains a line of +output, printed once every {Nevery} timesteps. It contains the timestep, the +maximum force per replica, the maximum force per atom (in any replica), +potential gradients in the initial, final, and climbing replicas, the forward +and backward energy barriers, the total reaction coordinate (RDT), and the +normalized reaction coordinate and potential energy of each replica. + +The "maximum force per replica" is the two-norm of the 3N-length force vector +for the atoms in each replica, maximized across replicas, which is what the +{ftol} setting is checking against. In this case, N is all the atoms in each +replica. The "maximum force per atom" is the maximum force component of any +atom in any replica. The potential gradients are the two-norm of the 3N-length +force vector solely due to the interaction potential i.e. without adding in +inter-replica forces. + +The "reaction coordinate" (RD) for each replica is the two-norm of the 3N-length +vector of distances between its atoms and the preceding replica's atoms, added +to the RD of the preceding replica. The RD of the first replica RD1 = 0.0; the +RD of the final replica RDN = RDT, the total reaction coordinate. The +normalized RDs are divided by RDT, so that they form a monotonically increasing +sequence from zero to one. When computing RD, N only includes the atoms being +operated on by the fix neb command. The forward (reverse) energy barrier is the potential energy of the highest replica minus the energy of the first (last) replica. -Supplementary informations for all replicas can be printed out to the screen and master -log.lammps file by adding the verbose keyword. These informations include the following. -The "path angle" (pathangle) for the replica i which is the angle -between the 3N-length vectors (Ri-1 - Ri) and (Ri+1 - Ri) (where Ri is the +Supplementary informations for all replicas can be printed out to the screen and +master log.lammps file by adding the verbose keyword. These informations include +the following. The "path angle" (pathangle) for the replica i which is the +angle between the 3N-length vectors (Ri-1 - Ri) and (Ri+1 - Ri) (where Ri is the atomic coordinates of replica i). A "path angle" of 180 indicates that replicas -i-1, i and i+1 are aligned. - "angletangrad" is the angle between the 3N-length tangent vector and -the 3N-length force vector at image i. The tangent vector is calculated as in "(HenkelmanA)"_#HenkelmanA for all intermediate replicas and at R2 - R1 and RM - RM-1 for the first and last replica, respectively. -"anglegrad" is the angle between the 3N-length energy gradient vector of replica i and that of -replica i+1. It is not defined for the final replica and reads nan. -gradV is the norm of the energy gradient of image i. -ReplicaForce is the two-norm of the 3N-length force vector (including nudging forces) for replica i. -MaxAtomForce is the maximum force component of any atom in replica i. +i-1, i and i+1 are aligned. "angletangrad" is the angle between the 3N-length +tangent vector and the 3N-length force vector at image i. The tangent vector is +calculated as in "(HenkelmanA)"_#HenkelmanA for all intermediate replicas and at +R2 - R1 and RM - RM-1 for the first and last replica, respectively. "anglegrad" +is the angle between the 3N-length energy gradient vector of replica i and that +of replica i+1. It is not defined for the final replica and reads nan. gradV is +the norm of the energy gradient of image i. ReplicaForce is the two-norm of the +3N-length force vector (including nudging forces) for replica i. MaxAtomForce +is the maximum force component of any atom in replica i. When a NEB calculation does not converge properly, these suplementary informations can help understanding what is going wrong. For instance when the -path angle becomes accute the definition of tangent used in the NEB -calculation is questionable and the NEB cannot may diverge -"(Maras)"_#Maras. +path angle becomes accute the definition of tangent used in the NEB calculation +is questionable and the NEB cannot may diverge "(Maras)"_#Maras. -When running on multiple partitions, LAMMPS produces additional log -files for each partition, e.g. log.lammps.0, log.lammps.1, etc. For a -NEB calculation, these contain the thermodynamic output for each -replica. +When running on multiple partitions, LAMMPS produces additional log files for +each partition, e.g. log.lammps.0, log.lammps.1, etc. For a NEB calculation, +these contain the thermodynamic output for each replica. + +If "dump"_dump.html commands in the input script define a filename that includes +a {universe} or {uloop} style "variable"_variable.html, then one dump file (per +dump command) will be created for each replica. At the end of the NEB +calculation, the final snapshot in each file will contain the sequence of +snapshots that transition the system over the energy barrier. Earlier snapshots +will show the convergence of the replicas to the MEP. -If "dump"_dump.html commands in the input script define a filename -that includes a {universe} or {uloop} style "variable"_variable.html, -then one dump file (per dump command) will be created for each -replica. At the end of the NEB calculation, the final snapshot in -each file will contain the sequence of snapshots that transition the -system over the energy barrier. Earlier snapshots will show the -convergence of the replicas to the MEP. - -Likewise, "restart"_restart.html filenames can be specified with a -{universe} or {uloop} style "variable"_variable.html, to generate -restart files for each replica. These may be useful if the NEB -calculation fails to converge properly to the MEP, and you wish to -restart the calculation from an intermediate point with altered -parameters. +Likewise, "restart"_restart.html filenames can be specified with a {universe} or +{uloop} style "variable"_variable.html, to generate restart files for each +replica. These may be useful if the NEB calculation fails to converge properly +to the MEP, and you wish to restart the calculation from an intermediate point +with altered parameters. There are 2 Python scripts provided in the tools/python directory, -neb_combine.py and neb_final.py, which are useful in analyzing output -from a NEB calculation. Assume a NEB simulation with M replicas, and -the NEB atoms labelled with a specific atom type. - -The neb_combine.py script extracts atom coords for the NEB atoms from -all M dump files and creates a single dump file where each snapshot -contains the NEB atoms from all the replicas and one copy of non-NEB -atoms from the first replica (presumed to be identical in other -replicas). This can be visualized/animated to see how the NEB atoms -relax as the NEB calculation proceeds. - -The neb_final.py script extracts the final snapshot from each of the M -dump files to create a single dump file with M snapshots. This can be -visualized to watch the system make its transition over the energy -barrier. +neb_combine.py and neb_final.py, which are useful in analyzing output from a NEB +calculation. Assume a NEB simulation with M replicas, and the NEB atoms labeled +with a specific atom type. + +The neb_combine.py script extracts atom coords for the NEB atoms from all M dump +files and creates a single dump file where each snapshot contains the NEB atoms +from all the replicas and one copy of non-NEB atoms from the first replica +(presumed to be identical in other replicas). This can be visualized/animated +to see how the NEB atoms relax as the NEB calculation proceeds. + +The neb_final.py script extracts the final snapshot from each of the M dump +files to create a single dump file with M snapshots. This can be visualized to +watch the system make its transition over the energy barrier. To illustrate, here are images from the final snapshot produced by the -neb_combine.py script run on the dump files produced by the two -example input scripts in examples/neb. Click on them to see a larger -image. +neb_combine.py script run on the dump files produced by the two example input +scripts in examples/neb. Click on them to see a larger image. -:image(JPG/hop1_small.jpg,JPG/hop1.jpg) -:image(JPG/hop2_small.jpg,JPG/hop2.jpg) +:image(JPG/hop1_small.jpg,JPG/hop1.jpg) :image(JPG/hop2_small.jpg,JPG/hop2.jpg) :line [Restrictions:] -This command can only be used if LAMMPS was built with the REPLICA -package. See the "Making LAMMPS"_Section_start.html#start_3 section -for more info on packages. - -:line - +This command can only be used if LAMMPS was built with the REPLICA package. See +the "Making LAMMPS"_Section_start.html#start_3 section for more info on +packages. -[Related commands:] +:line [Related commands:] -"prd"_prd.html, "temper"_temper.html, "fix -langevin"_fix_langevin.html, "fix viscous"_fix_viscous.html +"prd"_prd.html, "temper"_temper.html, "fix langevin"_fix_langevin.html, "fix +viscous"_fix_viscous.html [Default:] none :line -:link(HenkelmanA) -[(HenkelmanA)] Henkelman and Jonsson, J Chem Phys, 113, 9978-9985 (2000). +:link(HenkelmanA) [(HenkelmanA)] Henkelman and Jonsson, J Chem Phys, 113, +9978-9985 (2000). -:link(HenkelmanB) -[(HenkelmanB)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, +:link(HenkelmanB) [(HenkelmanB)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, 9901-9904 (2000). -:link(Nakano) -[(Nakano)] Nakano, Comp Phys Comm, 178, 280-289 (2008). +:link(Nakano3) [(Nakano)] Nakano, Comp Phys Comm, 178, 280-289 (2008). -:link(Maras) -[(Maras)] Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp Phys Comm, 205, 13-21 (2016) +:link(Maras) [(Maras)] Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp +Phys Comm, 205, 13-21 (2016) diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index 2087df46e0..4c243274d1 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -27,9 +27,11 @@ #include "memory.h" #include "error.h" #include "force.h" +#include "math_const.h" using namespace LAMMPS_NS; using namespace FixConst; +using namespace MathConst; enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC}; /* ---------------------------------------------------------------------- */ @@ -55,35 +57,34 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : int iarg =4; while (iarg < narg){ - if (strcmp (arg[iarg],"idealpos")==0) - {NEBLongRange = true; - iarg+=1;} - else if (strcmp (arg[iarg],"nearestneigh")==0) - {NEBLongRange = false; - StandardNEB = true; - iarg+=1;} - else if (strcmp (arg[iarg],"PerpSpring")==0) - {PerpSpring=true; - kspringPerp = force->numeric(FLERR,arg[iarg+1]); - if (kspringPerp < 0.0) error->all(FLERR,"Illegal fix neb command. The perpendicular spring force was not provided properly"); + if (strcmp (arg[iarg],"idealpos")==0){ + NEBLongRange = true; + iarg+=1;} + else if (strcmp (arg[iarg],"neigh")==0){ + NEBLongRange = false; + StandardNEB = true; + iarg+=1;} + else if (strcmp (arg[iarg],"perp")==0){ + PerpSpring=true; + kspringPerp = force->numeric(FLERR,arg[iarg+1]); + if (kspringPerp < 0.0) error->all(FLERR,"Illegal fix neb command. The perpendicular spring force was not provided properly"); iarg+=2; - } - else if (strcmp (arg[iarg],"freeend")==0) - { - if (strcmp (arg[iarg+1],"ini")==0) - FreeEndIni=true; - else if (strcmp (arg[iarg+1],"final")==0) - FreeEndFinal=true; - else if (strcmp (arg[iarg+1],"final")==0) - FreeEndFinal=true; - else if (strcmp (arg[iarg+1],"finalWithRespToIni")==0) - FreeEndFinalWithRespToEIni=true; - else if (strcmp (arg[iarg+1],"finalAndInterWithRespToIni")==0) - {FinalAndInterWithRespToEIni=true; - FreeEndFinalWithRespToEIni=true;} - iarg+=2;} - else {error->all(FLERR,"Illegal fix neb command. Unknown keyword");} - } + } + else if (strcmp (arg[iarg],"freeend")==0){ + if (strcmp (arg[iarg+1],"ini")==0) + FreeEndIni=true; + else if (strcmp (arg[iarg+1],"final")==0) + FreeEndFinal=true; + else if (strcmp (arg[iarg+1],"final")==0) + FreeEndFinal=true; + else if (strcmp (arg[iarg+1],"finaleini")==0) + FreeEndFinalWithRespToEIni=true; + else if (strcmp (arg[iarg+1],"final2eini")==0){ + FinalAndInterWithRespToEIni=true; + FreeEndFinalWithRespToEIni=true;} + iarg+=2;} + else {error->all(FLERR,"Illegal fix neb command. Unknown keyword");} + } // nreplica = number of partitions // ireplica = which world I am in universe @@ -97,7 +98,7 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : nprocs_universe = universe->nprocs; nreplica = universe->nworlds; ireplica = universe->iworld; - + if (ireplica > 0) procprev = universe->root_proc[ireplica-1]; else procprev = -1; if (ireplica < nreplica-1) procnext = universe->root_proc[ireplica+1]; @@ -106,13 +107,10 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : int *iroots = new int[nreplica]; MPI_Group uworldgroup,rootgroup; if (NEBLongRange ){ - for (int iIm =0; iIm < nreplica;iIm++) - { - iroots[iIm]=universe->root_proc[iIm]; - } + for (int iIm =0; iIm < nreplica;iIm++){ + iroots[iIm]=universe->root_proc[iIm];} MPI_Comm_group(uworld, &uworldgroup); MPI_Group_incl(uworldgroup, nreplica, iroots, &rootgroup); - // MPI_Comm_create_group(uworld, rootgroup, 0, &rootworld); MPI_Comm_create(uworld, rootgroup, &rootworld); } @@ -179,7 +177,7 @@ FixNEB::~FixNEB() memory->destroy(counts); memory->destroy(displacements); - if (NEBLongRange) + if (NEBLongRange) memory->destroy(nlenall); } @@ -216,7 +214,7 @@ void FixNEB::init() // comm mode for inter-replica exchange of coords if (nreplica == nprocs_universe && - nebatoms == atom->natoms && atom->sortfreq == 0) + nebatoms == atom->natoms && atom->sortfreq == 0) cmode = SINGLE_PROC_DIRECT; else if (nreplica == nprocs_universe) cmode = SINGLE_PROC_MAP; else cmode = MULTI_PROC; @@ -266,15 +264,12 @@ void FixNEB::min_post_force(int vflag) MPI_Status status; MPI_Request request; double vIni =0.0; - // veng = PE of this replica - // vprev,vnext = PEs of adjacent replicas - // only proc 0 in each replica communicates vprev=vnext=veng = pe->compute_scalar(); if (ireplica < nreplica-1 && me ==0) MPI_Send(&veng,1,MPI_DOUBLE,procnext,0,uworld); - if (ireplica > 0 && me ==0) + if (ireplica > 0 && me ==0) MPI_Recv(&vprev,1,MPI_DOUBLE,procprev,0,uworld,&status); if (ireplica > 0 && me == 0) @@ -287,39 +282,32 @@ void FixNEB::min_post_force(int vflag) MPI_Bcast(&vnext,1,MPI_DOUBLE,0,world); } - if (FreeEndFinal) - { - if (update->ntimestep==0) - {EFinalIni = veng;} - } + if (FreeEndFinal){ + if (update->ntimestep==0){EFinalIni = veng;} + } - if (ireplica==0) vIni=veng; - - if (FreeEndFinalWithRespToEIni ) { + if (FreeEndFinalWithRespToEIni ){ if ( me ==0){ int procFirst; procFirst=universe->root_proc[0]; - MPI_Bcast(&vIni,1,MPI_DOUBLE,procFirst,uworld); //MPI_Recv(&vIni,1,MPI_DOUBLE,procFirst,0,uworld,&status); + MPI_Bcast(&vIni,1,MPI_DOUBLE,procFirst,uworld); //MPI_Recv(&vIni,1,MPI_DOUBLE,procFirst,0,uworld,&status); } if (cmode == MULTI_PROC) { MPI_Bcast(&vIni,1,MPI_DOUBLE,0,world); } } - if (FreeEndIni && ireplica==0 ) - { - if (me == 0 ) - if (update->ntimestep==0) - { - EIniIni = veng; - if (cmode == MULTI_PROC) - MPI_Bcast(&EIniIni,1,MPI_DOUBLE,0,world); - } + if (FreeEndIni && ireplica==0 ){ + if (me == 0 ) + if (update->ntimestep==0){ + EIniIni = veng; + if (cmode == MULTI_PROC) + MPI_Bcast(&EIniIni,1,MPI_DOUBLE,0,world); + } } // communicate atoms to/from adjacent replicas to fill xprev,xnext - inter_replica_comm(); // trigger potential energy computation on next timestep @@ -349,7 +337,7 @@ void FixNEB::min_post_force(int vflag) if (ireplica < nreplica-1) - MPI_Irecv(xnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); + MMY_PI_Irecv(xnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); if (ireplica > 0) MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); if (ireplica < nreplica-1) MPI_Wait(&request,&status); @@ -392,57 +380,52 @@ void FixNEB::min_post_force(int vflag) dotpath = 0.0; dottangrad = 0.0; - - if (ireplica ==nreplica-1){ - for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - delxp = x[i][0] - xprev[i][0]; - delyp = x[i][1] - xprev[i][1]; - delzp = x[i][2] - xprev[i][2]; - domain->minimum_image(delxp,delyp,delzp); - plen += delxp*delxp + delyp*delyp + delzp*delzp; - dottangrad += delxp* f[i][0]+ delyp*f[i][1]+delzp*f[i][2]; - gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; - - if (FreeEndFinal||FreeEndFinalWithRespToEIni){ - tangent[i][0]=delxp; - tangent[i][1]=delyp; - tangent[i][2]=delzp; - tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + - tangent[i][2]*tangent[i][2]; - dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + f[i][2]*tangent[i][2]; - } - } + delxp = x[i][0] - xprev[i][0]; + delyp = x[i][1] - xprev[i][1]; + delzp = x[i][2] - xprev[i][2]; + domain->minimum_image(delxp,delyp,delzp); + plen += delxp*delxp + delyp*delyp + delzp*delzp; + dottangrad += delxp* f[i][0]+ delyp*f[i][1]+delzp*f[i][2]; + gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + if (FreeEndFinal||FreeEndFinalWithRespToEIni){ + tangent[i][0]=delxp; + tangent[i][1]=delyp; + tangent[i][2]=delzp; + tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + + tangent[i][2]*tangent[i][2]; + dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + f[i][2]*tangent[i][2]; + } } + } - else if (ireplica == 0){ for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - delxn = xnext[i][0] - x[i][0]; - delyn = xnext[i][1] - x[i][1]; - delzn = xnext[i][2] - x[i][2]; - domain->minimum_image(delxn,delyn,delzn); - nlen += delxn*delxn + delyn*delyn + delzn*delzn; - gradnextlen += fnext[i][0]*fnext[i][0] + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; - dotgrad += f[i][0]*fnext[i][0] + f[i][1]*fnext[i][1] + - f[i][2]*fnext[i][2]; - dottangrad += delxn* f[i][0]+ delyn*f[i][1]+delzn*f[i][2]; - gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; - if (FreeEndIni) - { - tangent[i][0]=delxn; - tangent[i][1]=delyn; - tangent[i][2]=delzn; - tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + - tangent[i][2]*tangent[i][2]; - dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + f[i][2]*tangent[i][2]; - } + delxn = xnext[i][0] - x[i][0]; + delyn = xnext[i][1] - x[i][1]; + delzn = xnext[i][2] - x[i][2]; + domain->minimum_image(delxn,delyn,delzn); + nlen += delxn*delxn + delyn*delyn + delzn*delzn; + gradnextlen += fnext[i][0]*fnext[i][0] + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; + dotgrad += f[i][0]*fnext[i][0] + f[i][1]*fnext[i][1] + + f[i][2]*fnext[i][2]; + dottangrad += delxn* f[i][0]+ delyn*f[i][1]+delzn*f[i][2]; + gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + if (FreeEndIni) + { + tangent[i][0]=delxn; + tangent[i][1]=delyn; + tangent[i][2]=delzn; + tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + + tangent[i][2]*tangent[i][2]; + dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + f[i][2]*tangent[i][2]; + } } } else //not the first or last replica @@ -452,61 +435,59 @@ void FixNEB::min_post_force(int vflag) for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - delxp = x[i][0] - xprev[i][0]; - delyp = x[i][1] - xprev[i][1]; - delzp = x[i][2] - xprev[i][2]; - domain->minimum_image(delxp,delyp,delzp); - plen += delxp*delxp + delyp*delyp + delzp*delzp; - - delxn = xnext[i][0] - x[i][0]; - delyn = xnext[i][1] - x[i][1]; - delzn = xnext[i][2] - x[i][2]; - domain->minimum_image(delxn,delyn,delzn); domain->minimum_image(delxn,delyn,delzn); - - if (vnext > veng && veng > vprev) { - tangent[i][0]=delxn; - tangent[i][1]=delyn; - tangent[i][2]=delzn; - } - else if (vnext < veng && veng < vprev) { - tangent[i][0]=delxp; - tangent[i][1]=delyp; - tangent[i][2]=delzp; - } - else { - if (vnext > vprev) { - tangent[i][0] = vmax*delxn + vmin*delxp; - tangent[i][1] = vmax*delyn + vmin*delyp; - tangent[i][2] = vmax*delzn + vmin*delzp; - } else { - tangent[i][0] = vmin*delxn + vmax*delxp; - tangent[i][1] = vmin*delyn + vmax*delyp; - tangent[i][2] = vmin*delzn + vmax*delzp; - } - - } - - nlen += delxn*delxn + delyn*delyn + delzn*delzn; - tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + - tangent[i][2]*tangent[i][2]; - gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; - dotpath += delxp*delxn + delyp*delyn + delzp*delzn; - dottangrad += tangent[i][0]* f[i][0]+ tangent[i][1]*f[i][1]+tangent[i][2]*f[i][2]; - - - - gradnextlen += fnext[i][0]*fnext[i][0] + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; - dotgrad += f[i][0]*fnext[i][0] + f[i][1]*fnext[i][1] + - f[i][2]*fnext[i][2]; - - - springF[i][0]=kspringPerp*(delxn-delxp); - springF[i][1]=kspringPerp*(delyn-delyp); - springF[i][2]=kspringPerp*(delzn-delzp); - - } - } + if (mask[i] & groupbit) { + delxp = x[i][0] - xprev[i][0]; + delyp = x[i][1] - xprev[i][1]; + delzp = x[i][2] - xprev[i][2]; + domain->minimum_image(delxp,delyp,delzp); + plen += delxp*delxp + delyp*delyp + delzp*delzp; + + delxn = xnext[i][0] - x[i][0]; + delyn = xnext[i][1] - x[i][1]; + delzn = xnext[i][2] - x[i][2]; + domain->minimum_image(delxn,delyn,delzn); domain->minimum_image(delxn,delyn,delzn); + + if (vnext > veng && veng > vprev) { + tangent[i][0]=delxn; + tangent[i][1]=delyn; + tangent[i][2]=delzn; + } + else if (vnext < veng && veng < vprev) { + tangent[i][0]=delxp; + tangent[i][1]=delyp; + tangent[i][2]=delzp; + } + else { + if (vnext > vprev) { + tangent[i][0] = vmax*delxn + vmin*delxp; + tangent[i][1] = vmax*delyn + vmin*delyp; + tangent[i][2] = vmax*delzn + vmin*delzp; + } else { + tangent[i][0] = vmin*delxn + vmax*delxp; + tangent[i][1] = vmin*delyn + vmax*delyp; + tangent[i][2] = vmin*delzn + vmax*delzp; + } + + } + + nlen += delxn*delxn + delyn*delyn + delzn*delzn; + tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + + tangent[i][2]*tangent[i][2]; + gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + dotpath += delxp*delxn + delyp*delyn + delzp*delzn; + dottangrad += tangent[i][0]* f[i][0]+ tangent[i][1]*f[i][1]+tangent[i][2]*f[i][2]; + + + + gradnextlen += fnext[i][0]*fnext[i][0] + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; + dotgrad += f[i][0]*fnext[i][0] + f[i][1]*fnext[i][1] + + f[i][2]*fnext[i][2]; + + springF[i][0]=kspringPerp*(delxn-delxp); + springF[i][1]=kspringPerp*(delyn-delyp); + springF[i][2]=kspringPerp*(delzn-delzp); + } + } double lenall; MPI_Allreduce(&nlen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); @@ -525,7 +506,6 @@ void FixNEB::min_post_force(int vflag) gradnextlen = sqrt(lenall); - double dotpathall; double dottangradall; @@ -561,146 +541,109 @@ void FixNEB::min_post_force(int vflag) } if(ireplica==0) dottangrad = dottangrad/(nlen*gradlen); if(ireplica==nreplica-1) dottangrad = dottangrad/(plen*gradlen); - if(ireplica < nreplica-1) - { - dotgrad = dotgrad /(gradlen*gradnextlen); - } - - - - if(FreeEndIni&&ireplica == 0) - { - if (tlen > 0.0) { - double dotall; - MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); - dot=dotall; - - double tleninv = 1.0/tlen; - dot *= tleninv; - if (dot<0) - prefactor = -dot - (veng-EIniIni); - else prefactor = -dot + (veng-EIniIni); - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - f[i][0] += prefactor *tangent[i][0]; - f[i][1] += prefactor *tangent[i][1]; - f[i][2] += prefactor *tangent[i][2]; - } + if(ireplica < nreplica-1){ + dotgrad = dotgrad /(gradlen*gradnextlen); + } - } - + if(FreeEndIni&&ireplica == 0) { + if (tlen > 0.0) { + double dotall; + MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); + dot=dotall; + double tleninv = 1.0/tlen; + dot *= tleninv; + if (dot<0) + prefactor = -dot - (veng-EIniIni); + else prefactor = -dot + (veng-EIniIni); + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + f[i][0] += prefactor *tangent[i][0]; + f[i][1] += prefactor *tangent[i][1]; + f[i][2] += prefactor *tangent[i][2]; + } } - - - + } - if(FreeEndFinal&&ireplica == nreplica -1) - {if (tlen > 0.0) { - double dotall; - MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); - dot=dotall; - double tleninv = 1.0/tlen; - dot *= tleninv; - if (dot<0) - prefactor = -dot - (veng-EFinalIni); - else prefactor = -dot + (veng-EFinalIni); - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - f[i][0] += prefactor *tangent[i][0]; - f[i][1] += prefactor *tangent[i][1]; - f[i][2] += prefactor *tangent[i][2]; - } + if(FreeEndFinal&&ireplica == nreplica -1){ + if (tlen > 0.0) { + double dotall; + MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); + dot=dotall; + double tleninv = 1.0/tlen; + dot *= tleninv; + if (dot<0) + prefactor = -dot - (veng-EFinalIni); + else prefactor = -dot + (veng-EFinalIni); + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + f[i][0] += prefactor *tangent[i][0]; + f[i][1] += prefactor *tangent[i][1]; + f[i][2] += prefactor *tangent[i][2]; + } - } } + } - if(FreeEndFinalWithRespToEIni&&ireplica == nreplica -1) - {if (tlen > 0.0) { - double dotall; - MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); - dot=dotall; - double tleninv = 1.0/tlen; - dot *= tleninv; - if (dot<0) - prefactor = -dot - (veng-vIni); - else prefactor = -dot + (veng-vIni); - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - f[i][0] += prefactor *tangent[i][0]; - f[i][1] += prefactor *tangent[i][1]; - f[i][2] += prefactor *tangent[i][2]; - } + if(FreeEndFinalWithRespToEIni&&ireplica == nreplica -1){ + if (tlen > 0.0) { + double dotall; + MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); + dot=dotall; + double tleninv = 1.0/tlen; + dot *= tleninv; + if (dot<0) + prefactor = -dot - (veng-vIni); + else prefactor = -dot + (veng-vIni); + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + f[i][0] += prefactor *tangent[i][0]; + f[i][1] += prefactor *tangent[i][1]; + f[i][2] += prefactor *tangent[i][2]; + } - } } - + } double lentot = 0; double meanDist,idealPos,lenuntilIm,lenuntilClimber; lenuntilClimber=0; if(NEBLongRange) { - if (cmode == SINGLE_PROC_DIRECT or cmode == SINGLE_PROC_MAP) - {MPI_Allgather(&nlen,1,MPI_DOUBLE,&nlenall[0],1,MPI_DOUBLE,uworld);} - else - { - /* int procRootiIm; - double nlentmp; - - for (int iIm = 0; i < nreplica; i++) - { - procRootiIm=universe->root_proc[iIm]; - if (ireplica == iIm && me ==0) - { nlentmp=nlen; - MPI_Bcast(&nlentmp,1,MPI_DOUBLE,procRootiIm,uworld); - } - else - { - MPI_Bcast(&nlentmp,1,MPI_DOUBLE,procRootiIm,uworld); - } - nlenall[iIm]=nlen; - } - */ - if (me == 0) - MPI_Allgather(&nlen,1,MPI_DOUBLE,&nlenall[0],1,MPI_DOUBLE,rootworld); - - MPI_Bcast(nlenall,nreplica,MPI_DOUBLE,0,world); - - } + if (cmode == SINGLE_PROC_DIRECT or cmode == SINGLE_PROC_MAP) + {MPI_Allgather(&nlen,1,MPI_DOUBLE,&nlenall[0],1,MPI_DOUBLE,uworld);} + else{ + if (me == 0) + MPI_Allgather(&nlen,1,MPI_DOUBLE,&nlenall[0],1,MPI_DOUBLE,rootworld); + + MPI_Bcast(nlenall,nreplica,MPI_DOUBLE,0,world); + } lenuntilIm = 0; for (int i = 0; i < ireplica; i++) - lenuntilIm += nlenall[i]; - + lenuntilIm += nlenall[i]; for (int i = 0; i < nreplica; i++) - lentot += nlenall[i]; - + lentot += nlenall[i]; + meanDist = lentot/(nreplica -1); - if (rclimber>0) - { - for (int i = 0; i < rclimber; i++) - lenuntilClimber += nlenall[i]; - - double meanDistBeforeClimber = lenuntilClimber/rclimber; - double meanDistAfterClimber = (lentot-lenuntilClimber)/(nreplica-rclimber-1); - - - if (ireplica0) { + for (int i = 0; i < rclimber; i++) + lenuntilClimber += nlenall[i]; + double meanDistBeforeClimber = lenuntilClimber/rclimber; + double meanDistAfterClimber = (lentot-lenuntilClimber)/(nreplica-rclimber-1); + if (ireplica 0) MPI_Wait(&request,MPI_STATUS_IGNORE); - if (ireplica < nreplica-1) MPI_Irecv(xnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); if (ireplica > 0) @@ -878,7 +808,6 @@ void FixNEB::inter_replica_comm() xprev[m][2] = xrecv[i][2]; } } - if (ireplica < nreplica-1) { MPI_Irecv(xrecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); MPI_Irecv(frecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); @@ -1019,11 +948,10 @@ void FixNEB::reallocate() memory->destroy(fnext); memory->destroy(springF); - if (NEBLongRange) - {memory->destroy(nlenall); - memory->create(nlenall,nreplica,"neb:nlenall"); - } - + if (NEBLongRange){ + memory->destroy(nlenall); + memory->create(nlenall,nreplica,"neb:nlenall"); + } if (cmode != SINGLE_PROC_DIRECT) { diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index 8610860253..a0feedf13f 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -9,7 +9,7 @@ the GNU General Public License. See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ + ------------------------------------------------------------------------- */ // lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h // due to OpenMPI bug which sets INT64_MAX via its mpi.h @@ -37,8 +37,10 @@ #include "memory.h" #include "error.h" #include "force.h" +#include "math_const.h" using namespace LAMMPS_NS; +using namespace MathConst; #define MAXLINE 256 #define CHUNK 1024 @@ -50,7 +52,7 @@ NEB::NEB(LAMMPS *lmp) : Pointers(lmp) {} /* ---------------------------------------------------------------------- internal NEB constructor, called from TAD -------------------------------------------------------------------------- */ + ------------------------------------------------------------------------- */ NEB::NEB(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, int n2steps_in, int nevery_in, double *buf_init, double *buf_final) @@ -103,7 +105,7 @@ NEB::~NEB() /* ---------------------------------------------------------------------- perform NEB on multiple replicas -------------------------------------------------------------------------- */ + ------------------------------------------------------------------------- */ void NEB::command(int narg, char **arg) { @@ -153,7 +155,7 @@ void NEB::command(int narg, char **arg) } else if (strcmp(arg[5],"none") == 0) { if (narg != 6 and narg !=7) error->universe_all(FLERR,"Illegal NEB command"); } else error->universe_all(FLERR,"Illegal NEB command"); - + Verbose=false; if (strcmp(arg[narg-1],"verbose") == 0) Verbose=true; // run the NEB calculation @@ -163,7 +165,7 @@ void NEB::command(int narg, char **arg) /* ---------------------------------------------------------------------- run NEB on multiple replicas -------------------------------------------------------------------------- */ + ------------------------------------------------------------------------- */ void NEB::run() { @@ -215,27 +217,27 @@ void NEB::run() if (universe->uscreen) if (Verbose) fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); else - fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN\n"); + fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN\n"); if (universe->ulogfile) if (Verbose) fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); else - fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN\n"); + fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN\n"); } print_status(); @@ -299,26 +301,26 @@ void NEB::run() if (universe->uscreen) if (Verbose) fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); else fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN\n"); + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN\n"); if (universe->ulogfile) if (Verbose) fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); else - fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN\n"); + fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN\n"); } print_status(); @@ -351,17 +353,17 @@ void NEB::run() /* ---------------------------------------------------------------------- read initial config atom coords from file flag = 0 - only first replica opens file and reads it - first replica bcasts lines to all replicas - final replica stores coords - intermediate replicas interpolate from coords - new coord = replica fraction between current and final state - initial replica does nothing + only first replica opens file and reads it + first replica bcasts lines to all replicas + final replica stores coords + intermediate replicas interpolate from coords + new coord = replica fraction between current and final state + initial replica does nothing flag = 1 - each replica (except first) opens file and reads it - each replica stores coords - initial replica does nothing -------------------------------------------------------------------------- */ + each replica (except first) opens file and reads it + each replica stores coords + initial replica does nothing + ------------------------------------------------------------------------- */ void NEB::readfile(char *file, int flag) { @@ -524,7 +526,7 @@ void NEB::readfile(char *file, int flag) /* ---------------------------------------------------------------------- universe proc 0 opens NEB data file test if gzipped -------------------------------------------------------------------------- */ + ------------------------------------------------------------------------- */ void NEB::open(char *file) { @@ -558,7 +560,7 @@ void NEB::open(char *file) /* ---------------------------------------------------------------------- query fix NEB for info on each replica universe proc 0 prints current NEB status -------------------------------------------------------------------------- */ + ------------------------------------------------------------------------- */ void NEB::print_status() { @@ -568,7 +570,7 @@ void NEB::print_status() double fnorminf = update->minimize->fnorm_inf(); double fmaxatom; MPI_Allreduce(&fnorminf,&fmaxatom,1,MPI_DOUBLE,MPI_MAX,roots); - + if (Verbose) { freplica = new double[nreplica]; @@ -585,9 +587,9 @@ void NEB::print_status() if (Verbose) { - one[4] = fneb->dotpath; - one[5] = fneb->dottangrad; - one[6] = fneb->dotgrad; + one[4] = fneb->dotpath; + one[5] = fneb->dottangrad; + one[6] = fneb->dotgrad; } @@ -632,7 +634,7 @@ void NEB::print_status() ebf = all[irep][0]-all[0][0]; ebr = all[irep][0]-all[nreplica-1][0]; } - double pi=3.14159265; + if (me_universe == 0) { if (universe->uscreen) { fprintf(universe->uscreen,BIGINT_FORMAT " %12.8g %12.8g ", @@ -643,10 +645,10 @@ void NEB::print_status() for (int i = 0; i < nreplica; i++) fprintf(universe->uscreen,"%12.8g %12.8g ",rdist[i],all[i][0]); if (Verbose) - {fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[0][5])*180/pi,180-acos(all[0][6])*180/pi,all[0][3],freplica[0],fmaxatomInRepl[0]); + {fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[0][5])*180/MY_PI,180-acos(all[0][6])*180/MY_PI,all[0][3],freplica[0],fmaxatomInRepl[0]); for (int i = 1; i < nreplica-1; i++) - fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",180-acos(all[i][4])*180/pi,180-acos(all[i][5])*180/pi,180-acos(all[i][6])*180/pi,all[i][3],freplica[i],fmaxatomInRepl[i]); - fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[nreplica-1][5])*180/pi,NAN,all[nreplica-1][3],freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); + fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",180-acos(all[i][4])*180/MY_PI,180-acos(all[i][5])*180/MY_PI,180-acos(all[i][6])*180/MY_PI,all[i][3],freplica[i],fmaxatomInRepl[i]); + fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[nreplica-1][5])*180/MY_PI,NAN,all[nreplica-1][3],freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); } fprintf(universe->uscreen,"\n"); } @@ -660,10 +662,10 @@ void NEB::print_status() for (int i = 0; i < nreplica; i++) fprintf(universe->ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); if (Verbose) - {fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[0][5])*180/pi,180-acos(all[0][6])*180/pi,all[0][3],freplica[0],fmaxatomInRepl[0]); + {fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[0][5])*180/MY_PI,180-acos(all[0][6])*180/MY_PI,all[0][3],freplica[0],fmaxatomInRepl[0]); for (int i = 1; i < nreplica-1; i++) - fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",180-acos(all[i][4])*180/pi,180-acos(all[i][5])*180/pi,180-acos(all[i][6])*180/pi,all[i][3],freplica[i],fmaxatomInRepl[i]); - fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[nreplica-1][5])*180/pi,NAN,all[nreplica-1][3],freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); + fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",180-acos(all[i][4])*180/MY_PI,180-acos(all[i][5])*180/MY_PI,180-acos(all[i][6])*180/MY_PI,all[i][3],freplica[i],fmaxatomInRepl[i]); + fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[nreplica-1][5])*180/MY_PI,NAN,all[nreplica-1][3],freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); } fprintf(universe->ulogfile,"\n"); fflush(universe->ulogfile); -- GitLab From 65eacb6b9060bf630ae039aa909e100052fcf94f Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 18 May 2017 12:20:39 -0400 Subject: [PATCH 163/593] Fix compilation warnings in fix_python --- src/PYTHON/fix_python.cpp | 4 ++-- src/PYTHON/fix_python.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/PYTHON/fix_python.cpp b/src/PYTHON/fix_python.cpp index 031bb29764..88a1a5088d 100644 --- a/src/PYTHON/fix_python.cpp +++ b/src/PYTHON/fix_python.cpp @@ -86,7 +86,7 @@ void FixPython::end_of_step() PyObject * ptr = PY_VOID_POINTER(lmp); PyObject * arglist = Py_BuildValue("(O)", ptr); - PyObject * result = PyEval_CallObject(pFunc, arglist); + PyObject * result = PyEval_CallObject((PyObject*)pFunc, arglist); Py_DECREF(arglist); PyGILState_Release(gstate); @@ -103,7 +103,7 @@ void FixPython::post_force(int vflag) PyObject * ptr = PY_VOID_POINTER(lmp); PyObject * arglist = Py_BuildValue("(Oi)", ptr, vflag); - PyObject * result = PyEval_CallObject(pFunc, arglist); + PyObject * result = PyEval_CallObject((PyObject*)pFunc, arglist); Py_DECREF(arglist); PyGILState_Release(gstate); diff --git a/src/PYTHON/fix_python.h b/src/PYTHON/fix_python.h index 534cd74cfb..2e740dedcd 100644 --- a/src/PYTHON/fix_python.h +++ b/src/PYTHON/fix_python.h @@ -21,7 +21,6 @@ FixStyle(python,FixPython) #define LMP_FIX_PYTHON_H #include "fix.h" -#include namespace LAMMPS_NS { @@ -34,7 +33,7 @@ class FixPython : public Fix { virtual void post_force(int); private: - PyObject * pFunc; + void * pFunc; int selected_callback; }; -- GitLab From 26d71b66e413dfb58635597835cc0fe047510e01 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 12:41:48 -0400 Subject: [PATCH 164/593] convert bigint values for bonds/angles/dihedrals/impropers to doubles when evaluating those keywords in variable expressions --- src/thermo.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/thermo.cpp b/src/thermo.cpp index dbbeff4998..fa18b7de78 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -1145,6 +1145,22 @@ int Thermo::evaluate_keyword(char *word, double *answer) compute_atoms(); dvalue = bivalue; + } else if (strcmp(word,"bonds") == 0) { + compute_bonds(); + dvalue = bivalue; + + } else if (strcmp(word,"angles") == 0) { + compute_angles(); + dvalue = bivalue; + + } else if (strcmp(word,"dihedrals") == 0) { + compute_dihedrals(); + dvalue = bivalue; + + } else if (strcmp(word,"impropers") == 0) { + compute_impropers(); + dvalue = bivalue; + } else if (strcmp(word,"temp") == 0) { if (!temperature) error->all(FLERR,"Thermo keyword in variable requires " -- GitLab From 34dbf6b225acc97b1dd8a14d803d432873fd3b05 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 12:45:43 -0400 Subject: [PATCH 165/593] do not compute properties twice --- src/thermo.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/thermo.cpp b/src/thermo.cpp index fa18b7de78..18deecb1a8 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -1385,11 +1385,6 @@ int Thermo::evaluate_keyword(char *word, double *answer) else if (strcmp(word,"ylat") == 0) compute_ylat(); else if (strcmp(word,"zlat") == 0) compute_zlat(); - else if (strcmp(word,"bonds") == 0) compute_bonds(); - else if (strcmp(word,"angles") == 0) compute_angles(); - else if (strcmp(word,"dihedrals") == 0) compute_dihedrals(); - else if (strcmp(word,"impropers") == 0) compute_impropers(); - else if (strcmp(word,"pxx") == 0) { if (!pressure) error->all(FLERR,"Thermo keyword in variable requires " -- GitLab From b28ecd44c25d7059d20c9b4317ca438c5ffc1934 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 18 May 2017 13:14:47 -0600 Subject: [PATCH 166/593] update docs before patch release --- doc/src/Section_commands.txt | 2 + doc/src/Section_python.txt | 39 ++++++--- doc/src/fix_reax_bonds.txt | 15 +++- doc/src/pair_edip.txt | 9 +- doc/src/pair_gw.txt | 4 +- doc/src/pair_python.txt | 94 +++++++++++---------- doc/src/pair_tersoff.txt | 2 +- src/{USER-MISC => MANYBODY}/pair_gw.cpp | 0 src/{USER-MISC => MANYBODY}/pair_gw.h | 0 src/{USER-MISC => MANYBODY}/pair_gw_zbl.cpp | 0 src/{USER-MISC => MANYBODY}/pair_gw_zbl.h | 0 src/USER-MISC/README | 2 - 12 files changed, 100 insertions(+), 67 deletions(-) rename src/{USER-MISC => MANYBODY}/pair_gw.cpp (100%) rename src/{USER-MISC => MANYBODY}/pair_gw.h (100%) rename src/{USER-MISC => MANYBODY}/pair_gw_zbl.cpp (100%) rename src/{USER-MISC => MANYBODY}/pair_gw_zbl.h (100%) diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index ae13c87cb8..dc7ddebe58 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -618,6 +618,7 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "press/berendsen"_fix_press_berendsen.html, "print"_fix_print.html, "property/atom"_fix_property_atom.html, +"python"_fix_python.html, "qeq/comb (o)"_fix_qeq_comb.html, "qeq/dynamic"_fix_qeq.html, "qeq/fire"_fix_qeq.html, @@ -984,6 +985,7 @@ KOKKOS, o = USER-OMP, t = OPT. "peri/pmb (o)"_pair_peri.html, "peri/ves"_pair_peri.html, "polymorphic"_pair_polymorphic.html, +"python"_pair_python.html, "reax"_pair_reax.html, "rebo (o)"_pair_airebo.html, "resquared (go)"_pair_resquared.html, diff --git a/doc/src/Section_python.txt b/doc/src/Section_python.txt index 7b62f7e948..718e9e229c 100644 --- a/doc/src/Section_python.txt +++ b/doc/src/Section_python.txt @@ -118,13 +118,21 @@ check which version of Python you have installed, by simply typing 11.2 Overview of using Python from a LAMMPS script :link(py_2),h4 -LAMMPS has a "python"_python.html command which can be used in an -input script to define and execute a Python function that you write -the code for. The Python function can also be assigned to a LAMMPS -python-style variable via the "variable"_variable.html command. Each -time the variable is evaluated, either in the LAMMPS input script -itself, or by another LAMMPS command that uses the variable, this will -trigger the Python function to be invoked. +LAMMPS has several commands which can be used to invoke Python +code directly from an input script: + +"python"_python.html +"variable python"_variable.html +"fix python"_fix_python.html +"pair_style python"_pair_python.html :ul + +The "python"_python.html command which can be used to define and +execute a Python function that you write the code for. The Python +function can also be assigned to a LAMMPS python-style variable via +the "variable"_variable.html command. Each time the variable is +evaluated, either in the LAMMPS input script itself, or by another +LAMMPS command that uses the variable, this will trigger the Python +function to be invoked. The Python code for the function can be included directly in the input script or in an auxiliary file. The function can have arguments which @@ -155,13 +163,18 @@ commands. See the "python"_python.html doc page and the "variable"_variable.html doc page for its python-style variables for more info, including examples of Python code you can write for both pure Python operations -and callbacks to LAMMPS. See "fix python"_fix_python.html to learn about -possibilities to execute Python code during each time step. -Through the "python pair style"_pair_python.html it is also possible -to define potential functions as python code. +and callbacks to LAMMPS. -To run pure Python code from LAMMPS, you only need to build LAMMPS -with the PYTHON package installed: +The "fix python"_fix_python.html command can execute +Python code at selected timesteps during a simulation run. + +The "pair_style python"_pair_python command allows you to define +pairwise potentials as python code which encodes a single pairwise +interaction. This is useful for rapid-developement and debugging of a +new potential. + +To use any of these commands, you only need to build LAMMPS with the +PYTHON package installed: make yes-python make machine :pre diff --git a/doc/src/fix_reax_bonds.txt b/doc/src/fix_reax_bonds.txt index a874fa3d16..aadb0a9cbc 100644 --- a/doc/src/fix_reax_bonds.txt +++ b/doc/src/fix_reax_bonds.txt @@ -34,7 +34,20 @@ written to {filename} on timesteps that are multiples of {Nevery}, including timestep 0. For time-averaged chemical species analysis, please see the "fix reaxc/c/species"_fix_reaxc_species.html command. -The format of the output file should be self-explanatory. +The format of the output file should be reasonably self-explanatory. +The meaning of the column header abbreviations is as follows: + +id = atom id +type = atom type +nb = number of bonds +id_1 = atom id of first bond +id_nb = atom id of Nth bond +mol = molecule id +bo_1 = bond order of first bond +bo_nb = bond order of Nth bond +abo = atom bond order (sum of all bonds) +nlp = number of lone pairs +q = atomic charge :ul If the filename ends with ".gz", the output file is written in gzipped format. A gzipped dump file will be about 3x smaller than the text diff --git a/doc/src/pair_edip.txt b/doc/src/pair_edip.txt index d0c90d76dd..86453859d3 100644 --- a/doc/src/pair_edip.txt +++ b/doc/src/pair_edip.txt @@ -7,12 +7,13 @@ :line pair_style edip command :h3 +pair_style edip/multi command :h3 [Syntax:] -pair_style edip :pre -pair_style edip/omp :pre -pair_style edip/multi :pre +pair_style style :pre + +style = {edip} or {edip/multi} :ul [Examples:] @@ -168,4 +169,4 @@ appropriate units if your simulation doesn't use "metal" units. :line :link(EDIP) -[(EDIP)] J. F. Justo et al., Phys. Rev. B 58, 2539 (1998). +[(EDIP)] J F Justo et al, Phys Rev B 58, 2539 (1998). diff --git a/doc/src/pair_gw.txt b/doc/src/pair_gw.txt index 2240dca6f7..fcf63b1bc4 100644 --- a/doc/src/pair_gw.txt +++ b/doc/src/pair_gw.txt @@ -11,7 +11,9 @@ pair_style gw/zbl command :h3 [Syntax:] -pair_style gw :pre +pair_style style :pre + +style = {gw} or {gw/zbl} :ul [Examples:] diff --git a/doc/src/pair_python.txt b/doc/src/pair_python.txt index 84927e52d9..af6d08cb56 100644 --- a/doc/src/pair_python.txt +++ b/doc/src/pair_python.txt @@ -40,34 +40,34 @@ Only a single pair_coeff command is used with the {python} pair style which specifies a python class inside a python module or file that LAMMPS will look up in the current directory, the folder pointed to by the LAMMPS_POTENTIALS environment variable or somewhere in your python -path. A single python module can hold multiple python pair class -definitions. The class definitions itself have to follow specific rules -that are explained below. +path. A single python module can hold multiple python pair class +definitions. The class definitions itself have to follow specific +rules that are explained below. -Atom types in the python class are specified through symbolic constants, -typically strings. These are mapped to LAMMPS atom types by specifying -N additional arguments after the class name in the pair_coeff command, -where N must be the number of currently defined atom types: +Atom types in the python class are specified through symbolic +constants, typically strings. These are mapped to LAMMPS atom types by +specifying N additional arguments after the class name in the +pair_coeff command, where N must be the number of currently defined +atom types: As an example, imagine a file {py_pot.py} has a python potential class names {LJCutMelt} with parameters and potential functions for a two Lennard-Jones atom types labeled as 'LJ1' and 'LJ2'. In your LAMMPS input and you would have defined 3 atom types, out of which the first -two are supposed to be using the 'LJ1' parameters and the third -the 'LJ2' parameters, then you would use the following pair_coeff -command: +two are supposed to be using the 'LJ1' parameters and the third the +'LJ2' parameters, then you would use the following pair_coeff command: pair_coeff * * py_pot.LJCutMelt LJ1 LJ1 LJ2 :pre -The first two arguments [must] be * * so as to span all LAMMPS atom types. -The first two LJ1 arguments map LAMMPS atom types 1 and 2 to the LJ1 -atom type in the LJCutMelt class of the py_pot.py file. The final LJ2 -argument maps LAMMPS atom type 3 to the LJ2 atom type the python file. -If a mapping value is specified as NULL, the mapping is not performed, -any pair interaction with this atom type will be skipped. This can be -used when a {python} potential is used as part of the {hybrid} or -{hybrid/overlay} pair style. The NULL values are then placeholders for -atom types that will be used with other potentials. +The first two arguments [must] be * * so as to span all LAMMPS atom +types. The first two LJ1 arguments map LAMMPS atom types 1 and 2 to +the LJ1 atom type in the LJCutMelt class of the py_pot.py file. The +final LJ2 argument maps LAMMPS atom type 3 to the LJ2 atom type the +python file. If a mapping value is specified as NULL, the mapping is +not performed, any pair interaction with this atom type will be +skipped. This can be used when a {python} potential is used as part of +the {hybrid} or {hybrid/overlay} pair style. The NULL values are then +placeholders for atom types that will be used with other potentials. :line @@ -88,14 +88,18 @@ class LAMMPSPairPotential(object): Any classes with definitions of specific potentials have to be derived from this class and should be initialize in a similar fashion to the -example given below. NOTE: The class constructor has to set up a data -structure containing the potential parameters supported by this class. -It should also define a variable {self.units} containing a string -matching one of the options of LAMMPS' "units"_units.html command, which -is used to verify, that the potential definition in the python class and -in the LAMMPS input match. Example for a single type Lennard-Jones -potential class {LJCutMelt} in reducted units, which defines an atom -type {lj} for which the parameters epsilon and sigma are both 1.0: +example given below. + +NOTE: The class constructor has to set up a data structure containing +the potential parameters supported by this class. It should also +define a variable {self.units} containing a string matching one of the +options of LAMMPS' "units"_units.html command, which is used to +verify, that the potential definition in the python class and in the +LAMMPS input match. + +Here is an example for a single type Lennard-Jones potential class +{LJCutMelt} in reducted units, which defines an atom type {lj} for +which the parameters epsilon and sigma are both 1.0: class LJCutMelt(LAMMPSPairPotential): def __init__(self): @@ -136,32 +140,32 @@ the {LJCutMelt} example, here are the two functions: lj4 = coeff\[3\] return (r6inv * (lj3*r6inv - lj4)) :pre -IMPORTANT NOTE: for consistency with the C++ pair styles in LAMMPS, -the {compute_force} function follows the conventions of the Pair::single() +NOTE: for consistency with the C++ pair styles in LAMMPS, the +{compute_force} function follows the conventions of the Pair::single() methods and does not return the full force, but the force scaled by the distance between the two atoms, so this value only needs to be -multiplied by delta x, delta y, and delta z to conveniently obtain -the three components of the force vector between these two atoms. +multiplied by delta x, delta y, and delta z to conveniently obtain the +three components of the force vector between these two atoms. :line -IMPORTANT NOTE: The evaluation of scripted python code will slow down -the computation pair-wise interactions quite significantly. However, -this can be largely worked around through using the python pair style -not for the actual simulation, but to generate tabulated potentials -on the fly using the "pair_write"_pair_write.html command. Please -see below for an example LAMMPS input of how to build a table file: +NOTE: The evaluation of scripted python code will slow down the +computation pair-wise interactions quite significantly. However, this +can be largely worked around through using the python pair style not +for the actual simulation, but to generate tabulated potentials on the +fly using the "pair_write"_pair_write.html command. Please see below +for an example LAMMPS input of how to build a table file: pair_style python 2.5 pair_coeff * * py_pot.LJCutMelt lj shell rm -f melt.table pair_write 1 1 2000 rsq 0.01 2.5 lj1_lj2.table lj :pre -Note, that it is strong recommended to try to [delete] the potential +Note that it is strongly recommended to try to [delete] the potential table file before generating it. Since the {pair_write} command will -always append to a table file, which pair style table will use the first -match. Thus when changing the potential function in the python class, -the table pair style will still read the old variant. +always append to a table file, which pair style table will use the +first match. Thus when changing the potential function in the python +class, the table pair style will still read the old variant. After switching the pair style to {table}, the potential tables need to be assigned to the LAMMPS atom types like this: @@ -169,7 +173,7 @@ to be assigned to the LAMMPS atom types like this: pair_style table linear 2000 pair_coeff 1 1 melt.table lj :pre -This can also be done for more complex systems. Please see the +This can also be done for more complex systems. Please see the {examples/python} folders for a few more examples. :line @@ -198,9 +202,9 @@ This pair style can only be used via the {pair} keyword of the [Restrictions:] -This pair style is part of the PYTHON package. It is only enabled -if LAMMPS was built with that package. See -the "Making LAMMPS"_Section_start.html#start_3 section for more info. +This pair style is part of the PYTHON package. It is only enabled if +LAMMPS was built with that package. See the "Making +LAMMPS"_Section_start.html#start_3 section for more info. [Related commands:] diff --git a/doc/src/pair_tersoff.txt b/doc/src/pair_tersoff.txt index eb4a8993cf..23a20ad0fd 100644 --- a/doc/src/pair_tersoff.txt +++ b/doc/src/pair_tersoff.txt @@ -18,7 +18,7 @@ pair_style tersoff/table/omp command :h3 pair_style style :pre -style = {tersoff} or {tersoff/table} or {tersoff/gpu} or {tersoff/omp} or {tersoff/table/omp} +style = {tersoff} or {tersoff/table} or {tersoff/gpu} or {tersoff/omp} or {tersoff/table/omp} :ul [Examples:] diff --git a/src/USER-MISC/pair_gw.cpp b/src/MANYBODY/pair_gw.cpp similarity index 100% rename from src/USER-MISC/pair_gw.cpp rename to src/MANYBODY/pair_gw.cpp diff --git a/src/USER-MISC/pair_gw.h b/src/MANYBODY/pair_gw.h similarity index 100% rename from src/USER-MISC/pair_gw.h rename to src/MANYBODY/pair_gw.h diff --git a/src/USER-MISC/pair_gw_zbl.cpp b/src/MANYBODY/pair_gw_zbl.cpp similarity index 100% rename from src/USER-MISC/pair_gw_zbl.cpp rename to src/MANYBODY/pair_gw_zbl.cpp diff --git a/src/USER-MISC/pair_gw_zbl.h b/src/MANYBODY/pair_gw_zbl.h similarity index 100% rename from src/USER-MISC/pair_gw_zbl.h rename to src/MANYBODY/pair_gw_zbl.h diff --git a/src/USER-MISC/README b/src/USER-MISC/README index 1e927fdfab..cacee41e0c 100644 --- a/src/USER-MISC/README +++ b/src/USER-MISC/README @@ -60,8 +60,6 @@ pair_style dipole/sf, Mario Orsi, orsimario at gmail.com, 8 Aug 11 pair_style edip, Luca Ferraro, luca.ferraro at caspur.it, 15 Sep 11 pair_style eam/cd, Alexander Stukowski, stukowski at mm.tu-darmstadt.de, 7 Nov 09 pair_style gauss/cut, Axel Kohlmeyer, akohlmey at gmail.com, 1 Dec 11 -pair_style gw, German Samolyuk, samolyuk at gmail.com, 17 May 17 -pair_style gw/zbl, German Samolyuk, samolyuk at gmail.com, 17 May 17 pair_style lennard/mdf, Paolo Raiteri, p.raiteri at curtin.edu.au, 2 Dec 15 pair_style list, Axel Kohlmeyer (Temple U), akohlmey at gmail.com, 1 Jun 13 pair_style lj/mdf, Paolo Raiteri, p.raiteri at curtin.edu.au, 2 Dec 15 -- GitLab From 069f3e746b46e0655fa648d864734424704fc273 Mon Sep 17 00:00:00 2001 From: Emile Maras Date: Thu, 18 May 2017 21:23:29 +0200 Subject: [PATCH 167/593] small formating changes --- src/REPLICA/fix_neb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index 4c243274d1..fed2934b70 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -337,7 +337,7 @@ void FixNEB::min_post_force(int vflag) if (ireplica < nreplica-1) - MMY_PI_Irecv(xnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); + MPI_Irecv(xnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); if (ireplica > 0) MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); if (ireplica < nreplica-1) MPI_Wait(&request,&status); -- GitLab From d4ee03c778df8a7405fed6f78ab7a1703e41728c Mon Sep 17 00:00:00 2001 From: Emile Maras Date: Thu, 18 May 2017 21:31:39 +0200 Subject: [PATCH 168/593] changed doc links --- doc/src/fix_neb.txt | 5 +++-- doc/src/neb.txt | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/src/fix_neb.txt b/doc/src/fix_neb.txt index 3d6f3de540..0250a40d8c 100644 --- a/doc/src/fix_neb.txt +++ b/doc/src/fix_neb.txt @@ -1,7 +1,8 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c -:link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) -:link(lc,Section_commands.html#comm) +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) + :line diff --git a/doc/src/neb.txt b/doc/src/neb.txt index 964291bfcf..966d1574a4 100644 --- a/doc/src/neb.txt +++ b/doc/src/neb.txt @@ -1,7 +1,7 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c -:link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) -:link(lc,Section_commands.html#comm) +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) :line -- GitLab From 8751850ecaa8ddfbd87d5ccbd63530e29c551b65 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 18:34:03 -0400 Subject: [PATCH 169/593] a few formatting fixes for pair style python --- doc/src/pair_python.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/pair_python.txt b/doc/src/pair_python.txt index af6d08cb56..557db37bbb 100644 --- a/doc/src/pair_python.txt +++ b/doc/src/pair_python.txt @@ -107,15 +107,15 @@ class LJCutMelt(LAMMPSPairPotential): # set coeffs: 48*eps*sig**12, 24*eps*sig**6, # 4*eps*sig**12, 4*eps*sig**6 self.units = 'lj' - self.coeff = {'lj' : {'lj' : (48.0,24.0,4.0,4.0)}} + self.coeff = \{'lj' : \{'lj' : (48.0,24.0,4.0,4.0)\}\} :pre The class also has to provide two methods for the computation of the potential energy and forces, which have be named {compute_force}, and {compute_energy}, which both take 3 numerical arguments: - rsq = the square of the distance between a pair of atoms (float) :li - itype = the (numerical) type of the first atom :li + rsq = the square of the distance between a pair of atoms (float) :l + itype = the (numerical) type of the first atom :l jtype = the (numerical) type of the second atom :ul This functions need to compute the force and the energy, respectively, -- GitLab From 654e09e999b8b894acf5a292f01f9363054fd670 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 18 May 2017 18:34:27 -0400 Subject: [PATCH 170/593] correct input examples affected by the Pair::settings() bugfix --- examples/ASPHERE/poly/in.poly | 1 + examples/ASPHERE/poly/in.poly.mp | 1 + 2 files changed, 2 insertions(+) diff --git a/examples/ASPHERE/poly/in.poly b/examples/ASPHERE/poly/in.poly index 77df095e15..3496a774bb 100644 --- a/examples/ASPHERE/poly/in.poly +++ b/examples/ASPHERE/poly/in.poly @@ -62,6 +62,7 @@ pair_coeff 3 3 1.0 1.5 pair_coeff 1 4 0.0 1.0 0.5 pair_coeff 2 4 0.0 1.0 1.0 pair_coeff 3 4 0.0 1.0 0.75 +pair_coeff 4 4 0.0 1.0 0.0 delete_atoms overlap 1.0 small big diff --git a/examples/ASPHERE/poly/in.poly.mp b/examples/ASPHERE/poly/in.poly.mp index 5ced616e7c..1c6a1faee3 100644 --- a/examples/ASPHERE/poly/in.poly.mp +++ b/examples/ASPHERE/poly/in.poly.mp @@ -62,6 +62,7 @@ pair_coeff 3 3 1.0 1.5 pair_coeff 1 4 0.0 1.0 0.5 pair_coeff 2 4 0.0 1.0 1.0 pair_coeff 3 4 0.0 1.0 0.75 +pair_coeff 4 4 0.0 1.0 0.0 delete_atoms overlap 1.0 small big -- GitLab From 9593e05c9ec55ddd0d97ea019b08ccfdf7f2c42d Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 18 May 2017 19:37:08 -0400 Subject: [PATCH 171/593] Force PDF documentation build to fail on first error --- doc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/Makefile b/doc/Makefile index a1f76d7041..2274ca5550 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -100,6 +100,7 @@ epub: $(OBJECTS) pdf: utils/txt2html/txt2html.exe @(\ + set -e; \ cd src; \ ../utils/txt2html/txt2html.exe -b *.txt; \ htmldoc --batch lammps.book; \ -- GitLab From 2225fce94eee9334316349799ad198ec35cab5c2 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 19 May 2017 07:35:36 -0600 Subject: [PATCH 172/593] patch 19May17 --- doc/src/Manual.txt | 4 ++-- src/version.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index bceb174017..dd24f8465a 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -1,7 +1,7 @@ LAMMPS Users Manual - + @@ -21,7 +21,7 @@

    LAMMPS Documentation :c,h3 -4 May 2017 version :c,h4 +19 May 2017 version :c,h4 Version info: :h4 diff --git a/src/version.h b/src/version.h index 7ae7ec4872..dc0ebe76b8 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "4 May 2017" +#define LAMMPS_VERSION "19 May 2017" -- GitLab From a5110d81ea6133a74b79d5bf1be433a3d4625995 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 19 May 2017 12:13:23 -0400 Subject: [PATCH 173/593] correct a bunch of documentation formatting issues for updated neb and fix neb commands --- doc/src/fix_neb.txt | 246 +++++++++-------- doc/src/neb.txt | 645 ++++++++++++++++++++++++-------------------- 2 files changed, 483 insertions(+), 408 deletions(-) diff --git a/doc/src/fix_neb.txt b/doc/src/fix_neb.txt index 0250a40d8c..a5c4bf4396 100644 --- a/doc/src/fix_neb.txt +++ b/doc/src/fix_neb.txt @@ -1,8 +1,8 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c -:link(lws,http://lammps.sandia.gov) +:link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) - +:link(lc,Section_commands.html#comm) :line @@ -11,164 +11,184 @@ fix neb command :h3 [Syntax:] fix ID group-ID neb Kspring keyword value :pre - -ID, group-ID are documented in "fix"_fix.html command neb = style name of this -fix command Kspring = parallel spring constant (force/distance units) :ul -keyword = {idealpos} or {neigh} or {perp} or {freeend} {idealpos} value = none = -each replica is attached with a spring to its interpolated ideal position -(default value) {neigh} value = none = each replica is attached with a spring -with the previous and next replica. {perp} value = spring constant for the -perpendicular spring {freeend} value = ini or final or finaleini or final2eini - +ID, group-ID are documented in "fix"_fix.html command +neb = style name of this fix command +Kspring = parallel spring constant (force/distance units) +keyword = {idealpos} or {neigh} or {perp} or {freeend} :ul + {idealpos} = each replica is attached with a spring to its interpolated ideal position (default) + {neigh} = each replica is connected with spring to the previous and next replica. + {perp} value = set spring constant for the perpendicular spring to {value} + {freeend} flag = set behavior for the end points + flag = {ini} or {final} or {finaleini} or {final2eini} + :pre [Examples:] -fix 1 active neb 10.0 :pre fix 2 all neb 1.0 perp 1.0 freeend final :pre fix 1 -all neb 1.0 neigh freeend final2eini :pre +fix 1 active neb 10.0 +fix 2 all neb 1.0 perp 1.0 freeend final +fix 1 all neb 1.0 neigh freeend final2eini :pre [Description:] -Add a nudging force to atoms in the group for a multi-replica simulation run via -the "neb"_neb.html command to perform a nudged elastic band (NEB) calculation -for finding the transition state. Hi-level explanations of NEB are given with -the "neb"_neb.html command and in "Section_howto 5"_Section_howto.html#howto_5 -of the manual. The fix neb command must be used with the "neb" command and -defines how nudging inter-replica forces are computed. A NEB calculation is -divided in two stages. In the first stage n replicas are relaxed toward a MEP -and in a second stage, the climbing image scheme (see -"(Henkelman2)"_#Henkelman2) is turned on so that the replica having the highest -energy relaxes toward the saddle point (i.e. the point of highest energy along -the MEP). - -One purpose of the nudging forces is to keep the replicas equally spaced. -During the NEB, the 3N-length vector of interatomic force Fi = -Grad(V) of -replicas i is altered. For all intermediate replicas (i.e. for 1 0 - -where E is the energy of the free end replica and ETarget is the target energy. - -When the value {ini} ({final}) is used after the keyword {freeend}, the first -(last) replica is considered as a free end. The target energy is set to the -energy of the replica at starting of the NEB calculation. When the value -{finaleini} or {final2eini} is used the last image is considered as a free end -and the target energy is equal to the energy of the first replica (which can -evolve during the NEB relaxation). With the value {finaleini}, when the initial -path is too far from the MEP, an intermediate repilica might relax "faster" and -get a lower energy than the last replica. The benefit of the free end is then -lost since this intermediate replica will relax toward a local minima. This -behavior can be prevented by using the value {final2eini} which remove entirely -the contribution of the gradient for all intermediate replica which have a lower -energy than the initial one thus preventing these replicae to over-relax. After -converging a NEB with the {final2eini} value it is recommended to check that all -intermediate replica have a larger energy than the initial replica. Finally note -that if the last replica converges toward a local minimum with a larger energy -than the energy of the first replica, a free end neb calculation with the value -{finaleini} or {final2eini} cannot reach the convergence criteria. +By default, the force acting on the first and last replicas is not +altered so that during the NEB relaxation, these ending replicas relax +toward local minima. However it is possible to use the key word +{freeend} to allow either the initial or the final replica to relax +toward a MEP while constraining its energy. The interatomic force Fi +for the free end image becomes : + +Fi = -Grad(V)+ (Grad(V) dot That + E-ETarget) That, {when} Grad(V) dot That < 0 +Fi = -Grad(V)+ (Grad(V) dot That + ETarget- E) That, {when} Grad(V) dot That > 0 +:pre + +where E is the energy of the free end replica and ETarget is the +target energy. + +When the value {ini} ({final}) is used after the keyword {freeend}, +the first (last) replica is considered as a free end. The target +energy is set to the energy of the replica at starting of the NEB +calculation. When the value {finaleini} or {final2eini} is used the +last image is considered as a free end and the target energy is equal +to the energy of the first replica (which can evolve during the NEB +relaxation). With the value {finaleini}, when the initial path is too +far from the MEP, an intermediate repilica might relax "faster" and +get a lower energy than the last replica. The benefit of the free end +is then lost since this intermediate replica will relax toward a local +minima. This behavior can be prevented by using the value {final2eini} +which remove entirely the contribution of the gradient for all +intermediate replica which have a lower energy than the initial one +thus preventing these replicae to over-relax. After converging a NEB +with the {final2eini} value it is recommended to check that all +intermediate replica have a larger energy than the initial +replica. Finally note that if the last replica converges toward a +local minimum with a larger energy than the energy of the first +replica, a free end neb calculation with the value {finaleini} or +{final2eini} cannot reach the convergence criteria. :line - -The keywords {idealpos} and {neigh} allow to specify how to parallel spring -force is computed. If the keyword {idealpos} is used or by default, the spring -force is computed as suggested in "(E)"_#E : +The keywords {idealpos} and {neigh} allow to specify how to parallel +spring force is computed. If the keyword {idealpos} is used or by +default, the spring force is computed as suggested in "(E)"_#E : -Fspringparallel=-{Kspring}* (RD-RDideal)/(2 meanDist) +Fspringparallel=-{Kspring}* (RD-RDideal)/(2 meanDist) :pre -where RD is the "reaction coordinate" see "neb"_neb.html section, and RDideal is -the ideal RD for which all the images are equally spaced (i.e. RDideal = -(i-1)*meanDist when the climbing image is off, where i is the replica -number). The meanDist is the average distance between replicas. +where RD is the "reaction coordinate" see "neb"_neb.html section, and +RDideal is the ideal RD for which all the images are equally spaced +(i.e. RDideal = (i-1)*meanDist when the climbing image is off, where i +is the replica number). The meanDist is the average distance between +replicas. -If the keyword {neigh} is used, the parallel spring force is computed as in -"(Henkelman1)"_#Henkelman1 by connecting each intermediate replica with the -previous and the next image: +If the keyword {neigh} is used, the parallel spring force is computed +as in "(Henkelman1)"_#Henkelman1 by connecting each intermediate +replica with the previous and the next image: -Fspringparallel= {Kspring}* (|Ri+1 - Ri| - |Ri - Ri-1|) +Fspringparallel= {Kspring}* (|Ri+1 - Ri| - |Ri - Ri-1|) :pre -The parallel spring force associated with the key word idealpos should usually -be more efficient at keeping the images equally spaced. +The parallel spring force associated with the key word idealpos should +usually be more efficient at keeping the images equally spaced. :line -The keyword {perp} allows to add a spring force perpendicular to the path in -order to prevent the path from becoming too kinky. It can improve significantly -the convergence of the NEB when the resolution is poor (i.e. when too few images -are used) (see "(Maras)"_#Maras). The perpendicular spring force is given by +The keyword {perp} allows to add a spring force perpendicular to the +path in order to prevent the path from becoming too kinky. It can +improve significantly the convergence of the NEB when the resolution +is poor (i.e. when too few images are used) (see "(Maras)"_#Maras1). +The perpendicular spring force is given by -Fspringperp = {Kspringperp} * f(Ri-1,Ri,Ri+1) (Ri+1 + Ri-1 - 2 Ri) +Fspringperp = {Kspringperp} * f(Ri-1,Ri,Ri+1) (Ri+1 + Ri-1 - 2 Ri) :pre - f(Ri-1 Ri R+1) is a smooth scalar function of the angle Ri-1 Ri Ri+1. It is - equal to 0 when the path is straight and is equal to 1 when the angle Ri-1 Ri - Ri+1 is accute. f(Ri-1 Ri R+1) is defined in "(Jonsson)"_#Jonsson +f(Ri-1 Ri R+1) is a smooth scalar function of the angle Ri-1 Ri +Ri+1. It is equal to 0 when the path is straight and is equal to 1 +when the angle Ri-1 Ri Ri+1 is accute. f(Ri-1 Ri R+1) is defined in +"(Jonsson)"_#Jonsson :line [Restart, fix_modify, output, run start/stop, minimize info:] -No information about this fix is written to "binary restart files"_restart.html. -None of the "fix_modify"_fix_modify.html options are relevant to this fix. No -global or per-atom quantities are stored by this fix for access by various -"output commands"_Section_howto.html#howto_15. No parameter of this fix can be -used with the {start/stop} keywords of the "run"_run.html command. +No information about this fix is written to "binary restart +files"_restart.html. None of the "fix_modify"_fix_modify.html options +are relevant to this fix. No global or per-atom quantities are stored +by this fix for access by various "output +commands"_Section_howto.html#howto_15. No parameter of this fix can +be used with the {start/stop} keywords of the "run"_run.html command. -The forces due to this fix are imposed during an energy minimization, as invoked -by the "minimize"_minimize.html command via the "neb"_neb.html command. +The forces due to this fix are imposed during an energy minimization, +as invoked by the "minimize"_minimize.html command via the +"neb"_neb.html command. [Restrictions:] -This command can only be used if LAMMPS was built with the REPLICA package. See -the "Making LAMMPS"_Section_start.html#start_3 section for more info on -packages. +This command can only be used if LAMMPS was built with the REPLICA +package. See the "Making LAMMPS"_Section_start.html#start_3 section +for more info on packages. [Related commands:] "neb"_neb.html -[Default:] none +[Default:] + +none -:link(Henkelman1) [(Henkelman1)] Henkelman and Jonsson, J Chem Phys, 113, -9978-9985 (2000). +:link(Henkelman1) +[(Henkelman1)] Henkelman and Jonsson, J Chem Phys, 113, 9978-9985 (2000). -:link(Henkelman2) [(Henkelman2)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, +:link(Henkelman2) +[(Henkelman2)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, 9901-9904 (2000). -:link(E) [(E)] E, Ren, Vanden-Eijnden, Phys Rev B, 66, 052301 (2002) +:link(E) +[(E)] E, Ren, Vanden-Eijnden, Phys Rev B, 66, 052301 (2002) -:link(Jonsson) [(Jonsson)] Jonsson, Mills and Jacobsen, in Classical and Quantum +:link(Jonsson) +[(Jonsson)] Jonsson, Mills and Jacobsen, in Classical and Quantum Dynamics in Condensed Phase Simulations, edited by Berne, Ciccotti, and Coker -͑World Scientific, Singapore, 1998͒, p. 385 +World Scientific, Singapore, 1998, p. 385 -:link(Maras) [(Maras)] Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp -Phys Comm, 205, 13-21 (2016) +:link(Maras1) +[(Maras)] Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, +Comp Phys Comm, 205, 13-21 (2016) diff --git a/doc/src/neb.txt b/doc/src/neb.txt index 966d1574a4..294bbdeb09 100644 --- a/doc/src/neb.txt +++ b/doc/src/neb.txt @@ -2,6 +2,7 @@ :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) +:link(lc,Section_commands.html#comm) :line @@ -11,362 +12,416 @@ neb command :h3 neb etol ftol N1 N2 Nevery file-style arg keyword :pre -etol = stopping tolerance for energy (energy units) :ulb,l ftol = stopping -tolerance for force (force units) :l N1 = max # of iterations (timesteps) to run -initial NEB :l N2 = max # of iterations (timesteps) to run barrier-climbing NEB -:l Nevery = print replica energies and reaction coordinates every this many -timesteps :l file-style= {final} or {each} or {none} :l {final} arg = filename -filename = file with initial coords for final replica coords for intermediate -replicas are linearly interpolated between first and last replica {each} arg = -filename filename = unique filename for each replica (except first) with its -initial coords {none} arg = no argument all replicas assumed to already have -their initial coords :pre keyword = {verbose} :pre :ule +etol = stopping tolerance for energy (energy units) :ulb,l +ftol = stopping tolerance for force (force units) :l +N1 = max # of iterations (timesteps) to run initial NEB :l +N2 = max # of iterations (timesteps) to run barrier-climbing NEB :l +Nevery = print replica energies and reaction coordinates every this many timesteps :l +file-style = {final} or {each} or {none} :l + {final} arg = filename + filename = file with initial coords for final replica + coords for intermediate replicas are linearly interpolated + between first and last replica + {each} arg = filename + filename = unique filename for each replica (except first) + with its initial coords + {none} arg = no argument all replicas assumed to already have + their initial coords :pre +keyword = {verbose} +:ule [Examples:] -neb 0.1 0.0 1000 500 50 final coords.final neb 0.0 0.001 1000 500 50 each -coords.initial.$i neb 0.0 0.001 1000 500 50 none verbose :pre +neb 0.1 0.0 1000 500 50 final coords.final +neb 0.0 0.001 1000 500 50 each coords.initial.$i +neb 0.0 0.001 1000 500 50 none verbose :pre [Description:] -Perform a nudged elastic band (NEB) calculation using multiple replicas of a -system. Two or more replicas must be used; the first and last are the end -points of the transition path. +Perform a nudged elastic band (NEB) calculation using multiple +replicas of a system. Two or more replicas must be used; the first +and last are the end points of the transition path. -NEB is a method for finding both the atomic configurations and height of the -energy barrier associated with a transition state, e.g. for an atom to perform a -diffusive hop from one energy basin to another in a coordinated fashion with its -neighbors. The implementation in LAMMPS follows the discussion in these 4 -papers: "(HenkelmanA)"_#HenkelmanA, "(HenkelmanB)"_#HenkelmanB, -"(Nakano)"_#Nakano3 and "(Maras)"_#Maras. +NEB is a method for finding both the atomic configurations and height +of the energy barrier associated with a transition state, e.g. for an +atom to perform a diffusive hop from one energy basin to another in a +coordinated fashion with its neighbors. The implementation in LAMMPS +follows the discussion in these 4 papers: "(HenkelmanA)"_#HenkelmanA, +"(HenkelmanB)"_#HenkelmanB, "(Nakano)"_#Nakano3 and "(Maras)"_#Maras2. Each replica runs on a partition of one or more processors. Processor -partitions are defined at run-time using the -partition command-line switch; see -"Section 2.7"_Section_start.html#start_7 of the manual. Note that if you have -MPI installed, you can run a multi-replica simulation with more replicas -(partitions) than you have physical processors, e.g you can run a 10-replica -simulation on just one or two processors. You will simply not get the -performance speed-up you would see with one or more physical processors per -replica. See "Section 6.5"_Section_howto.html#howto_5 of the manual for further +partitions are defined at run-time using the -partition command-line +switch; see "Section 2.7"_Section_start.html#start_7 of the manual. +Note that if you have MPI installed, you can run a multi-replica +simulation with more replicas (partitions) than you have physical +processors, e.g you can run a 10-replica simulation on just one or two +processors. You will simply not get the performance speed-up you +would see with one or more physical processors per replica. See +"Section 6.5"_Section_howto.html#howto_5 of the manual for further discussion. NOTE: As explained below, a NEB calculation perfoms a damped dynamics -minimization across all the replicas. The mimimizer uses whatever timestep you -have defined in your input script, via the "timestep"_timestep.html command. -Often NEB will converge more quickly if you use a timestep about 10x larger than -you would normally use for dynamics simulations. - -When a NEB calculation is performed, it is assumed that each replica is running -the same system, though LAMMPS does not check for this. I.e. the simulation -domain, the number of atoms, the interaction potentials, and the starting -configuration when the neb command is issued should be the same for every -replica. +minimization across all the replicas. The mimimizer uses whatever +timestep you have defined in your input script, via the +"timestep"_timestep.html command. Often NEB will converge more +quickly if you use a timestep about 10x larger than you would normally +use for dynamics simulations. + +When a NEB calculation is performed, it is assumed that each replica +is running the same system, though LAMMPS does not check for this. +I.e. the simulation domain, the number of atoms, the interaction +potentials, and the starting configuration when the neb command is +issued should be the same for every replica. In a NEB calculation each replica is connected to other replicas by inter-replica nudging forces. These forces are imposed by the "fix -neb"_fix_neb.html command, which must be used in conjunction with the neb -command. The group used to define the fix neb command defines the NEB atoms -which are the only ones that inter-replica springs are applied to. If the group -does not include all atoms, then non-NEB atoms have no inter-replica springs and -the forces they feel and their motion is computed in the usual way due only to -other atoms within their replica. Conceptually, the non-NEB atoms provide a -background force field for the NEB atoms. They can be allowed to move during -the NEB minimization procedure (which will typically induce different -coordinates for non-NEB atoms in different replicas), or held fixed using other -LAMMPS commands such as "fix setforce"_fix_setforce.html. Note that the -"partition"_partition.html command can be used to invoke a command on a subset -of the replicas, e.g. if you wish to hold NEB or non-NEB atoms fixed in only the -end-point replicas. - -The initial atomic configuration for each of the replicas can be specified in -different manners via the {file-style} setting, as discussed below. Only atoms -whose initial coordinates should differ from the current configuration need be -specified. - -Conceptually, the initial and final configurations for the first replica should -be states on either side of an energy barrier. - -As explained below, the initial configurations of intermediate replicas can be -atomic coordinates interpolated in a linear fashion between the first and last -replicas. This is often adequate for simple transitions. For more complex -transitions, it may lead to slow convergence or even bad results if the minimum -energy path (MEP, see below) of states over the barrier cannot be correctly -converged to from such an initial path. In this case, you will want to generate -initial states for the intermediate replicas that are geometrically closer to -the MEP and read them in. +neb"_fix_neb.html command, which must be used in conjunction with the +neb command. The group used to define the fix neb command defines the +NEB atoms which are the only ones that inter-replica springs are +applied to. If the group does not include all atoms, then non-NEB +atoms have no inter-replica springs and the forces they feel and their +motion is computed in the usual way due only to other atoms within +their replica. Conceptually, the non-NEB atoms provide a background +force field for the NEB atoms. They can be allowed to move during the +NEB minimization procedure (which will typically induce different +coordinates for non-NEB atoms in different replicas), or held fixed +using other LAMMPS commands such as "fix setforce"_fix_setforce.html. +Note that the "partition"_partition.html command can be used to invoke +a command on a subset of the replicas, e.g. if you wish to hold NEB or +non-NEB atoms fixed in only the end-point replicas. + +The initial atomic configuration for each of the replicas can be +specified in different manners via the {file-style} setting, as +discussed below. Only atoms whose initial coordinates should differ +from the current configuration need be specified. + +Conceptually, the initial and final configurations for the first +replica should be states on either side of an energy barrier. + +As explained below, the initial configurations of intermediate +replicas can be atomic coordinates interpolated in a linear fashion +between the first and last replicas. This is often adequate for +simple transitions. For more complex transitions, it may lead to slow +convergence or even bad results if the minimum energy path (MEP, see +below) of states over the barrier cannot be correctly converged to +from such an initial path. In this case, you will want to generate +initial states for the intermediate replicas that are geometrically +closer to the MEP and read them in. :line -For a {file-style} setting of {final}, a filename is specified which contains -atomic coordinates for zero or more atoms, in the format described below. For -each atom that appears in the file, the new coordinates are assigned to that -atom in the final replica. Each intermediate replica also assigns a new -position to that atom in an interpolated manner. This is done by using the -current position of the atom as the starting point and the read-in position as -the final point. The distance between them is calculated, and the new position -is assigned to be a fraction of the distance. E.g. if there are 10 replicas, -the 2nd replica will assign a position that is 10% of the distance along a line -between the starting and final point, and the 9th replica will assign a position -that is 90% of the distance along the line. Note that for this procedure to -produce consistent coordinates across all the replicas, the current coordinates -need to be the same in all replicas. LAMMPS does not check for this, but -invalid initial configurations will likely result if it is not the case. - -NOTE: The "distance" between the starting and final point is calculated in a -minimum-image sense for a periodic simulation box. This means that if the two -positions are on opposite sides of a box (periodic in that dimension), the -distance between them will be small, because the periodic image of one of the -atoms is close to the other. Similarly, even if the assigned position resulting -from the interpolation is outside the periodic box, the atom will be wrapped +For a {file-style} setting of {final}, a filename is specified which +contains atomic coordinates for zero or more atoms, in the format +described below. For each atom that appears in the file, the new +coordinates are assigned to that atom in the final replica. Each +intermediate replica also assigns a new position to that atom in an +interpolated manner. This is done by using the current position of +the atom as the starting point and the read-in position as the final +point. The distance between them is calculated, and the new position +is assigned to be a fraction of the distance. E.g. if there are 10 +replicas, the 2nd replica will assign a position that is 10% of the +distance along a line between the starting and final point, and the +9th replica will assign a position that is 90% of the distance along +the line. Note that for this procedure to produce consistent +coordinates across all the replicas, the current coordinates need to +be the same in all replicas. LAMMPS does not check for this, but +invalid initial configurations will likely result if it is not the +case. + +NOTE: The "distance" between the starting and final point is +calculated in a minimum-image sense for a periodic simulation box. +This means that if the two positions are on opposite sides of a box +(periodic in that dimension), the distance between them will be small, +because the periodic image of one of the atoms is close to the other. +Similarly, even if the assigned position resulting from the +interpolation is outside the periodic box, the atom will be wrapped back into the box when the NEB calculation begins. -For a {file-style} setting of {each}, a filename is specified which is assumed -to be unique to each replica. This can be done by using a variable in the -filename, e.g. - -variable i equal part neb 0.0 0.001 1000 500 50 each coords.initial.$i :pre - -which in this case will substitute the partition ID (0 to N-1) for the variable -I, which is also effectively the replica ID. See the "variable"_variable.html -command for other options, such as using world-, universe-, or uloop-style -variables. - -Each replica (except the first replica) will read its file, formatted as -described below, and for any atom that appears in the file, assign the specified -coordinates to this atom. The various files do not need to contain the same set -of atoms. - -For a {file-style} setting of {none}, no filename is specified. Each replica is -assumed to already be in its initial configuration at the time the neb command -is issued. This allows each replica to define its own configuration by reading -a replica-specific data or restart or dump file, via the -"read_data"_read_data.html, "read_restart"_read_restart.html, or -"read_dump"_read_dump.html commands. The replica-specific names of these files -can be specified as in the discussion above for the {each} file-style. Also see -the section below for how a NEB calculation can produce restart files, so that a -long calculation can be restarted if needed. - -NOTE: None of the {file-style} settings change the initial configuration of any -atom in the first replica. The first replica must thus be in the correct -initial configuration at the time the neb command is issued. +For a {file-style} setting of {each}, a filename is specified which is +assumed to be unique to each replica. This can be done by using a +variable in the filename, e.g. + +variable i equal part +neb 0.0 0.001 1000 500 50 each coords.initial.$i :pre + +which in this case will substitute the partition ID (0 to N-1) for the +variable I, which is also effectively the replica ID. See the +"variable"_variable.html command for other options, such as using +world-, universe-, or uloop-style variables. + +Each replica (except the first replica) will read its file, formatted +as described below, and for any atom that appears in the file, assign +the specified coordinates to this atom. The various files do not need +to contain the same set of atoms. + +For a {file-style} setting of {none}, no filename is specified. Each +replica is assumed to already be in its initial configuration at the +time the neb command is issued. This allows each replica to define +its own configuration by reading a replica-specific data or restart or +dump file, via the "read_data"_read_data.html, +"read_restart"_read_restart.html, or "read_dump"_read_dump.html +commands. The replica-specific names of these files can be specified +as in the discussion above for the {each} file-style. Also see the +section below for how a NEB calculation can produce restart files, so +that a long calculation can be restarted if needed. + +NOTE: None of the {file-style} settings change the initial +configuration of any atom in the first replica. The first replica +must thus be in the correct initial configuration at the time the neb +command is issued. :line -A NEB calculation proceeds in two stages, each of which is a minimization -procedure, performed via damped dynamics. To enable this, you must first define -a damped dynamics "min_style"_min_style.html, such as {quickmin} or {fire}. The -{cg}, {sd}, and {hftn} styles cannot be used, since they perform iterative line -searches in their inner loop, which cannot be easily synchronized across -multiple replicas. - -The minimizer tolerances for energy and force are set by {etol} and {ftol}, the -same as for the "minimize"_minimize.html command. - -A non-zero {etol} means that the NEB calculation will terminate if the energy -criterion is met by every replica. The energies being compared to {etol} do not -include any contribution from the inter-replica nudging forces, since these are -non-conservative. A non-zero {ftol} means that the NEB calculation will -terminate if the force criterion is met by every replica. The forces being -compared to {ftol} include the inter-replica nudging forces. - -The maximum number of iterations in each stage is set by {N1} and {N2}. These -are effectively timestep counts since each iteration of damped dynamics is like -a single timestep in a dynamics "run"_run.html. During both stages, the -potential energy of each replica and its normalized distance along the reaction -path (reaction coordinate RD) will be printed to the screen and log file every -{Nevery} timesteps. The RD is 0 and 1 for the first and last replica. For -intermediate replicas, it is the cumulative distance (normalized by the total -cumulative distance) between adjacent replicas, where "distance" is defined as -the length of the 3N-vector of differences in atomic coordinates, where N is the -number of NEB atoms involved in the transition. These outputs allow you to -monitor NEB's progress in finding a good energy barrier. {N1} and {N2} must -both be multiples of {Nevery}. - -In the first stage of NEB, the set of replicas should converge toward a minimum -energy path (MEP) of conformational states that transition over a barrier. The -MEP for a transition is defined as a sequence of 3N-dimensional states, each of -which has a potential energy gradient parallel to the MEP itself. The -configuration of highest energy along a MEP corresponds to a saddle point. The -replica states will also be roughly equally spaced along the MEP due to the -inter-replica nugding force added by the "fix neb"_fix_neb.html command. - -In the second stage of NEB, the replica with the highest energy is selected and -the inter-replica forces on it are converted to a force that drives its atom -coordinates to the top or saddle point of the barrier, via the barrier-climbing -calculation described in "(HenkelmanB)"_#HenkelmanB. As before, the other -replicas rearrange themselves along the MEP so as to be roughly equally spaced. - -When both stages are complete, if the NEB calculation was successful, the -configurations of the replicas should be along (close to) the MEP and the -replica with the highest energy should be an atomic configuration at (close to) -the saddle point of the transition. The potential energies for the set of -replicas represents the energy profile of the transition along the MEP. +A NEB calculation proceeds in two stages, each of which is a +minimization procedure, performed via damped dynamics. To enable +this, you must first define a damped dynamics +"min_style"_min_style.html, such as {quickmin} or {fire}. The {cg}, +{sd}, and {hftn} styles cannot be used, since they perform iterative +line searches in their inner loop, which cannot be easily synchronized +across multiple replicas. + +The minimizer tolerances for energy and force are set by {etol} and +{ftol}, the same as for the "minimize"_minimize.html command. + +A non-zero {etol} means that the NEB calculation will terminate if the +energy criterion is met by every replica. The energies being compared +to {etol} do not include any contribution from the inter-replica +nudging forces, since these are non-conservative. A non-zero {ftol} +means that the NEB calculation will terminate if the force criterion +is met by every replica. The forces being compared to {ftol} include +the inter-replica nudging forces. + +The maximum number of iterations in each stage is set by {N1} and +{N2}. These are effectively timestep counts since each iteration of +damped dynamics is like a single timestep in a dynamics +"run"_run.html. During both stages, the potential energy of each +replica and its normalized distance along the reaction path (reaction +coordinate RD) will be printed to the screen and log file every +{Nevery} timesteps. The RD is 0 and 1 for the first and last replica. +For intermediate replicas, it is the cumulative distance (normalized +by the total cumulative distance) between adjacent replicas, where +"distance" is defined as the length of the 3N-vector of differences in +atomic coordinates, where N is the number of NEB atoms involved in the +transition. These outputs allow you to monitor NEB's progress in +finding a good energy barrier. {N1} and {N2} must both be multiples +of {Nevery}. + +In the first stage of NEB, the set of replicas should converge toward +a minimum energy path (MEP) of conformational states that transition +over a barrier. The MEP for a transition is defined as a sequence of +3N-dimensional states, each of which has a potential energy gradient +parallel to the MEP itself. The configuration of highest energy along +a MEP corresponds to a saddle point. The replica states will also be +roughly equally spaced along the MEP due to the inter-replica nugding +force added by the "fix neb"_fix_neb.html command. + +In the second stage of NEB, the replica with the highest energy is +selected and the inter-replica forces on it are converted to a force +that drives its atom coordinates to the top or saddle point of the +barrier, via the barrier-climbing calculation described in +"(HenkelmanB)"_#HenkelmanB. As before, the other replicas rearrange +themselves along the MEP so as to be roughly equally spaced. + +When both stages are complete, if the NEB calculation was successful, +the configurations of the replicas should be along (close to) the MEP +and the replica with the highest energy should be an atomic +configuration at (close to) the saddle point of the transition. The +potential energies for the set of replicas represents the energy +profile of the transition along the MEP. :line -A few other settings in your input script are required or advised to perform a -NEB calculation. See the NOTE about the choice of timestep at the beginning of -this doc page. +A few other settings in your input script are required or advised to +perform a NEB calculation. See the NOTE about the choice of timestep +at the beginning of this doc page. An atom map must be defined which it is not by default for "atom_style -atomic"_atom_style.html problems. The "atom_modify map"_atom_modify.html -command can be used to do this. - -The minimizers in LAMMPS operate on all atoms in your system, even non-NEB -atoms, as defined above. To prevent non-NEB atoms from moving during the -minimization, you should use the "fix setforce"_fix_setforce.html command to set -the force on each of those atoms to 0.0. This is not required, and may not even -be desired in some cases, but if those atoms move too far (e.g. because the -initial state of your system was not well-minimized), it can cause problems for -the NEB procedure. - -The damped dynamics "minimizers"_min_style.html, such as {quickmin} and {fire}), -adjust the position and velocity of the atoms via an Euler integration step. -Thus you must define an appropriate "timestep"_timestep.html to use with NEB. -As mentioned above, NEB will often converge more quickly if you use a timestep -about 10x larger than you would normally use for dynamics simulations. +atomic"_atom_style.html problems. The "atom_modify +map"_atom_modify.html command can be used to do this. + +The minimizers in LAMMPS operate on all atoms in your system, even +non-NEB atoms, as defined above. To prevent non-NEB atoms from moving +during the minimization, you should use the "fix +setforce"_fix_setforce.html command to set the force on each of those +atoms to 0.0. This is not required, and may not even be desired in +some cases, but if those atoms move too far (e.g. because the initial +state of your system was not well-minimized), it can cause problems +for the NEB procedure. + +The damped dynamics "minimizers"_min_style.html, such as {quickmin} +and {fire}), adjust the position and velocity of the atoms via an +Euler integration step. Thus you must define an appropriate +"timestep"_timestep.html to use with NEB. As mentioned above, NEB +will often converge more quickly if you use a timestep about 10x +larger than you would normally use for dynamics simulations. :line -Each file read by the neb command containing atomic coordinates used to -initialize one or more replicas must be formatted as follows. +Each file read by the neb command containing atomic coordinates used +to initialize one or more replicas must be formatted as follows. -The file can be ASCII text or a gzipped text file (detected by a .gz suffix). -The file can contain initial blank lines or comment lines starting with "#" -which are ignored. The first non-blank, non-comment line should list N = the -number of lines to follow. The N successive lines contain the following -information: +The file can be ASCII text or a gzipped text file (detected by a .gz +suffix). The file can contain initial blank lines or comment lines +starting with "#" which are ignored. The first non-blank, non-comment +line should list N = the number of lines to follow. The N successive +lines contain the following information: -ID1 x1 y1 z1 ID2 x2 y2 z2 ... IDN xN yN zN :pre +ID1 x1 y1 z1 +ID2 x2 y2 z2 +... +IDN xN yN zN :pre -The fields are the atom ID, followed by the x,y,z coordinates. The lines can be -listed in any order. Additional trailing information on the line is OK, such as -a comment. +The fields are the atom ID, followed by the x,y,z coordinates. The +lines can be listed in any order. Additional trailing information on +the line is OK, such as a comment. -Note that for a typical NEB calculation you do not need to specify initial -coordinates for very many atoms to produce differing starting and final replicas -whose intermediate replicas will converge to the energy barrier. Typically only -new coordinates for atoms geometrically near the barrier need be specified. +Note that for a typical NEB calculation you do not need to specify +initial coordinates for very many atoms to produce differing starting +and final replicas whose intermediate replicas will converge to the +energy barrier. Typically only new coordinates for atoms +geometrically near the barrier need be specified. -Also note there is no requirement that the atoms in the file correspond to the -NEB atoms in the group defined by the "fix neb"_fix_neb.html command. Not every -NEB atom need be in the file, and non-NEB atoms can be listed in the file. +Also note there is no requirement that the atoms in the file +correspond to the NEB atoms in the group defined by the "fix +neb"_fix_neb.html command. Not every NEB atom need be in the file, +and non-NEB atoms can be listed in the file. :line -Four kinds of output can be generated during a NEB calculation: energy barrier -statistics, thermodynamic output by each replica, dump files, and restart files. - -When running with multiple partitions (each of which is a replica in this case), -the print-out to the screen and master log.lammps file contains a line of -output, printed once every {Nevery} timesteps. It contains the timestep, the -maximum force per replica, the maximum force per atom (in any replica), -potential gradients in the initial, final, and climbing replicas, the forward -and backward energy barriers, the total reaction coordinate (RDT), and the -normalized reaction coordinate and potential energy of each replica. - -The "maximum force per replica" is the two-norm of the 3N-length force vector -for the atoms in each replica, maximized across replicas, which is what the -{ftol} setting is checking against. In this case, N is all the atoms in each -replica. The "maximum force per atom" is the maximum force component of any -atom in any replica. The potential gradients are the two-norm of the 3N-length -force vector solely due to the interaction potential i.e. without adding in -inter-replica forces. - -The "reaction coordinate" (RD) for each replica is the two-norm of the 3N-length -vector of distances between its atoms and the preceding replica's atoms, added -to the RD of the preceding replica. The RD of the first replica RD1 = 0.0; the -RD of the final replica RDN = RDT, the total reaction coordinate. The -normalized RDs are divided by RDT, so that they form a monotonically increasing -sequence from zero to one. When computing RD, N only includes the atoms being -operated on by the fix neb command. - -The forward (reverse) energy barrier is the potential energy of the highest -replica minus the energy of the first (last) replica. - -Supplementary informations for all replicas can be printed out to the screen and -master log.lammps file by adding the verbose keyword. These informations include -the following. The "path angle" (pathangle) for the replica i which is the -angle between the 3N-length vectors (Ri-1 - Ri) and (Ri+1 - Ri) (where Ri is the -atomic coordinates of replica i). A "path angle" of 180 indicates that replicas -i-1, i and i+1 are aligned. "angletangrad" is the angle between the 3N-length -tangent vector and the 3N-length force vector at image i. The tangent vector is -calculated as in "(HenkelmanA)"_#HenkelmanA for all intermediate replicas and at -R2 - R1 and RM - RM-1 for the first and last replica, respectively. "anglegrad" -is the angle between the 3N-length energy gradient vector of replica i and that -of replica i+1. It is not defined for the final replica and reads nan. gradV is -the norm of the energy gradient of image i. ReplicaForce is the two-norm of the -3N-length force vector (including nudging forces) for replica i. MaxAtomForce -is the maximum force component of any atom in replica i. +Four kinds of output can be generated during a NEB calculation: energy +barrier statistics, thermodynamic output by each replica, dump files, +and restart files. + +When running with multiple partitions (each of which is a replica in +this case), the print-out to the screen and master log.lammps file +contains a line of output, printed once every {Nevery} timesteps. It +contains the timestep, the maximum force per replica, the maximum +force per atom (in any replica), potential gradients in the initial, +final, and climbing replicas, the forward and backward energy +barriers, the total reaction coordinate (RDT), and the normalized +reaction coordinate and potential energy of each replica. + +The "maximum force per replica" is the two-norm of the 3N-length force +vector for the atoms in each replica, maximized across replicas, which +is what the {ftol} setting is checking against. In this case, N is +all the atoms in each replica. The "maximum force per atom" is the +maximum force component of any atom in any replica. The potential +gradients are the two-norm of the 3N-length force vector solely due to +the interaction potential i.e. without adding in inter-replica +forces. + +The "reaction coordinate" (RD) for each replica is the two-norm of the +3N-length vector of distances between its atoms and the preceding +replica's atoms, added to the RD of the preceding replica. The RD of +the first replica RD1 = 0.0; the RD of the final replica RDN = RDT, +the total reaction coordinate. The normalized RDs are divided by RDT, +so that they form a monotonically increasing sequence from zero to +one. When computing RD, N only includes the atoms being operated on by +the fix neb command. + +The forward (reverse) energy barrier is the potential energy of the +highest replica minus the energy of the first (last) replica. + +Supplementary informations for all replicas can be printed out to the +screen and master log.lammps file by adding the verbose keyword. These +informations include the following. The "path angle" (pathangle) for +the replica i which is the angle between the 3N-length vectors (Ri-1 - +Ri) and (Ri+1 - Ri) (where Ri is the atomic coordinates of replica +i). A "path angle" of 180 indicates that replicas i-1, i and i+1 are +aligned. "angletangrad" is the angle between the 3N-length tangent +vector and the 3N-length force vector at image i. The tangent vector +is calculated as in "(HenkelmanA)"_#HenkelmanA for all intermediate +replicas and at R2 - R1 and RM - RM-1 for the first and last replica, +respectively. "anglegrad" is the angle between the 3N-length energy +gradient vector of replica i and that of replica i+1. It is not +defined for the final replica and reads nan. gradV is the norm of the +energy gradient of image i. ReplicaForce is the two-norm of the +3N-length force vector (including nudging forces) for replica i. +MaxAtomForce is the maximum force component of any atom in replica i. When a NEB calculation does not converge properly, these suplementary -informations can help understanding what is going wrong. For instance when the -path angle becomes accute the definition of tangent used in the NEB calculation -is questionable and the NEB cannot may diverge "(Maras)"_#Maras. +informations can help understanding what is going wrong. For instance +when the path angle becomes accute the definition of tangent used in +the NEB calculation is questionable and the NEB cannot may diverge +"(Maras)"_#Maras2. -When running on multiple partitions, LAMMPS produces additional log files for -each partition, e.g. log.lammps.0, log.lammps.1, etc. For a NEB calculation, -these contain the thermodynamic output for each replica. - -If "dump"_dump.html commands in the input script define a filename that includes -a {universe} or {uloop} style "variable"_variable.html, then one dump file (per -dump command) will be created for each replica. At the end of the NEB -calculation, the final snapshot in each file will contain the sequence of -snapshots that transition the system over the energy barrier. Earlier snapshots -will show the convergence of the replicas to the MEP. +When running on multiple partitions, LAMMPS produces additional log +files for each partition, e.g. log.lammps.0, log.lammps.1, etc. For a +NEB calculation, these contain the thermodynamic output for each +replica. -Likewise, "restart"_restart.html filenames can be specified with a {universe} or -{uloop} style "variable"_variable.html, to generate restart files for each -replica. These may be useful if the NEB calculation fails to converge properly -to the MEP, and you wish to restart the calculation from an intermediate point -with altered parameters. +If "dump"_dump.html commands in the input script define a filename +that includes a {universe} or {uloop} style "variable"_variable.html, +then one dump file (per dump command) will be created for each +replica. At the end of the NEB calculation, the final snapshot in +each file will contain the sequence of snapshots that transition the +system over the energy barrier. Earlier snapshots will show the +convergence of the replicas to the MEP. + +Likewise, "restart"_restart.html filenames can be specified with a +{universe} or {uloop} style "variable"_variable.html, to generate +restart files for each replica. These may be useful if the NEB +calculation fails to converge properly to the MEP, and you wish to +restart the calculation from an intermediate point with altered +parameters. There are 2 Python scripts provided in the tools/python directory, -neb_combine.py and neb_final.py, which are useful in analyzing output from a NEB -calculation. Assume a NEB simulation with M replicas, and the NEB atoms labeled -with a specific atom type. - -The neb_combine.py script extracts atom coords for the NEB atoms from all M dump -files and creates a single dump file where each snapshot contains the NEB atoms -from all the replicas and one copy of non-NEB atoms from the first replica -(presumed to be identical in other replicas). This can be visualized/animated -to see how the NEB atoms relax as the NEB calculation proceeds. - -The neb_final.py script extracts the final snapshot from each of the M dump -files to create a single dump file with M snapshots. This can be visualized to -watch the system make its transition over the energy barrier. +neb_combine.py and neb_final.py, which are useful in analyzing output +from a NEB calculation. Assume a NEB simulation with M replicas, and +the NEB atoms labeled with a specific atom type. + +The neb_combine.py script extracts atom coords for the NEB atoms from +all M dump files and creates a single dump file where each snapshot +contains the NEB atoms from all the replicas and one copy of non-NEB +atoms from the first replica (presumed to be identical in other +replicas). This can be visualized/animated to see how the NEB atoms +relax as the NEB calculation proceeds. + +The neb_final.py script extracts the final snapshot from each of the M +dump files to create a single dump file with M snapshots. This can be +visualized to watch the system make its transition over the energy +barrier. To illustrate, here are images from the final snapshot produced by the -neb_combine.py script run on the dump files produced by the two example input -scripts in examples/neb. Click on them to see a larger image. +neb_combine.py script run on the dump files produced by the two +example input scripts in examples/neb. Click on them to see a larger +image. -:image(JPG/hop1_small.jpg,JPG/hop1.jpg) :image(JPG/hop2_small.jpg,JPG/hop2.jpg) +:image(JPG/hop1_small.jpg,JPG/hop1.jpg) +:image(JPG/hop2_small.jpg,JPG/hop2.jpg) :line [Restrictions:] -This command can only be used if LAMMPS was built with the REPLICA package. See -the "Making LAMMPS"_Section_start.html#start_3 section for more info on -packages. +This command can only be used if LAMMPS was built with the REPLICA +package. See the "Making LAMMPS"_Section_start.html#start_3 section +for more info on packages. + +:line + +[Related commands:] -:line [Related commands:] +"prd"_prd.html, "temper"_temper.html, "fix langevin"_fix_langevin.html, +"fix viscous"_fix_viscous.html -"prd"_prd.html, "temper"_temper.html, "fix langevin"_fix_langevin.html, "fix -viscous"_fix_viscous.html +[Default:] -[Default:] none +none :line -:link(HenkelmanA) [(HenkelmanA)] Henkelman and Jonsson, J Chem Phys, 113, -9978-9985 (2000). +:link(HenkelmanA) +[(HenkelmanA)] Henkelman and Jonsson, J Chem Phys, 113, 9978-9985 (2000). -:link(HenkelmanB) [(HenkelmanB)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, +:link(HenkelmanB) +[(HenkelmanB)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, 9901-9904 (2000). -:link(Nakano3) [(Nakano)] Nakano, Comp Phys Comm, 178, 280-289 (2008). +:link(Nakano3) +[(Nakano)] Nakano, Comp Phys Comm, 178, 280-289 (2008). -:link(Maras) [(Maras)] Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp -Phys Comm, 205, 13-21 (2016) +:link(Maras2) +[(Maras)] Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, +Comp Phys Comm, 205, 13-21 (2016) -- GitLab From aca16745e4cce43bb29e0473ec8f2c3676f13e67 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 19 May 2017 12:17:19 -0400 Subject: [PATCH 174/593] restore spelling fix and semantic fix from upstream --- doc/src/neb.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/neb.txt b/doc/src/neb.txt index 294bbdeb09..a4afc2fe6d 100644 --- a/doc/src/neb.txt +++ b/doc/src/neb.txt @@ -61,7 +61,7 @@ would see with one or more physical processors per replica. See discussion. NOTE: As explained below, a NEB calculation perfoms a damped dynamics -minimization across all the replicas. The mimimizer uses whatever +minimization across all the replicas. The minimizer uses whatever timestep you have defined in your input script, via the "timestep"_timestep.html command. Often NEB will converge more quickly if you use a timestep about 10x larger than you would normally @@ -151,7 +151,7 @@ world-, universe-, or uloop-style variables. Each replica (except the first replica) will read its file, formatted as described below, and for any atom that appears in the file, assign -the specified coordinates to this atom. The various files do not need +the specified coordinates to its atom. The various files do not need to contain the same set of atoms. For a {file-style} setting of {none}, no filename is specified. Each -- GitLab From c2bf3269acf4893be8ac7896c21561c90ff51ac8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 19 May 2017 15:02:29 -0400 Subject: [PATCH 175/593] formatting cleanup. combine 8 MPI_Allreduce() calls into 1 --- src/REPLICA/fix_neb.cpp | 594 +++++++++++++++++----------------------- src/REPLICA/fix_neb.h | 9 +- src/REPLICA/neb.cpp | 14 +- src/REPLICA/neb.h | 4 +- 4 files changed, 259 insertions(+), 362 deletions(-) diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index fed2934b70..23b9297017 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -37,54 +37,58 @@ enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC}; /* ---------------------------------------------------------------------- */ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), id_pe(NULL), pe(NULL), xprev(NULL), xnext(NULL), fnext(NULL), - tangent(NULL),springF(NULL), xsend(NULL), xrecv(NULL),fsend(NULL),frecv(NULL), tagsend(NULL), tagrecv(NULL), xsendall(NULL), xrecvall(NULL),fsendall(NULL), frecvall(NULL), tagsendall(NULL), tagrecvall(NULL), counts(NULL), displacements(NULL),nlenall(NULL) + Fix(lmp, narg, arg), + id_pe(NULL), pe(NULL), xprev(NULL), xnext(NULL), fnext(NULL), + tangent(NULL), springF(NULL), xsend(NULL), xrecv(NULL), + fsend(NULL), frecv(NULL), tagsend(NULL), tagrecv(NULL), + xsendall(NULL), xrecvall(NULL), fsendall(NULL), frecvall(NULL), + tagsendall(NULL), tagrecvall(NULL), counts(NULL), + displacements(NULL),nlenall(NULL) { - StandardNEB=false; - NEBLongRange=true; - PerpSpring=false; - FreeEndIni=false; - FreeEndFinal=false; - FreeEndFinalWithRespToEIni =false; - FinalAndInterWithRespToEIni = false; - kspringPerp=0; - if (narg < 4) error->all(FLERR,"Illegal fix neb command, argument missing"); + StandardNEB=NEBLongRange=PerpSpring=FreeEndIni=FreeEndFinal=false; + FreeEndFinalWithRespToEIni=FinalAndInterWithRespToEIni=false; + + kspringPerp=0.0; + + if (narg < 4) + error->all(FLERR,"Illegal fix neb command, argument missing"); kspring = force->numeric(FLERR,arg[3]); - if (kspring <= 0.0) error->all(FLERR,"Illegal fix neb command. The spring force was not provided properly"); + if (kspring <= 0.0) + error->all(FLERR,"Illegal fix neb command." + " The spring force was not provided properly"); int iarg =4; - while (iarg < narg){ - if (strcmp (arg[iarg],"idealpos")==0){ + while (iarg < narg) { + if (strcmp (arg[iarg],"idealpos")==0) { NEBLongRange = true; - iarg+=1;} - else if (strcmp (arg[iarg],"neigh")==0){ + iarg+=1; + } else if (strcmp (arg[iarg],"neigh")==0) { NEBLongRange = false; StandardNEB = true; - iarg+=1;} - else if (strcmp (arg[iarg],"perp")==0){ + iarg+=1; + } else if (strcmp (arg[iarg],"perp")==0) { PerpSpring=true; kspringPerp = force->numeric(FLERR,arg[iarg+1]); - if (kspringPerp < 0.0) error->all(FLERR,"Illegal fix neb command. The perpendicular spring force was not provided properly"); + if (kspringPerp < 0.0) + error->all(FLERR,"Illegal fix neb command. " + "The perpendicular spring force was not provided properly"); iarg+=2; - } - else if (strcmp (arg[iarg],"freeend")==0){ + } else if (strcmp (arg[iarg],"freeend")==0) { if (strcmp (arg[iarg+1],"ini")==0) FreeEndIni=true; else if (strcmp (arg[iarg+1],"final")==0) FreeEndFinal=true; - else if (strcmp (arg[iarg+1],"final")==0) - FreeEndFinal=true; else if (strcmp (arg[iarg+1],"finaleini")==0) - FreeEndFinalWithRespToEIni=true; - else if (strcmp (arg[iarg+1],"final2eini")==0){ + FreeEndFinalWithRespToEIni=true; + else if (strcmp (arg[iarg+1],"final2eini")==0) { FinalAndInterWithRespToEIni=true; FreeEndFinalWithRespToEIni=true;} - iarg+=2;} - else {error->all(FLERR,"Illegal fix neb command. Unknown keyword");} - } + iarg+=2; + } else error->all(FLERR,"Illegal fix neb command. Unknown keyword"); + } // nreplica = number of partitions // ireplica = which world I am in universe @@ -99,16 +103,20 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : nreplica = universe->nworlds; ireplica = universe->iworld; - if (ireplica > 0) procprev = universe->root_proc[ireplica-1]; + if (ireplica > 0) + procprev = universe->root_proc[ireplica-1]; else procprev = -1; - if (ireplica < nreplica-1) procnext = universe->root_proc[ireplica+1]; + + if (ireplica < nreplica-1) + procnext = universe->root_proc[ireplica+1]; else procnext = -1; + uworld = universe->uworld; int *iroots = new int[nreplica]; MPI_Group uworldgroup,rootgroup; - if (NEBLongRange ){ - for (int iIm =0; iIm < nreplica;iIm++){ - iroots[iIm]=universe->root_proc[iIm];} + if (NEBLongRange) { + for (int iIm =0; iIm < nreplica;iIm++) + iroots[iIm]=universe->root_proc[iIm]; MPI_Comm_group(uworld, &uworldgroup); MPI_Group_incl(uworldgroup, nreplica, iroots, &rootgroup); // MPI_Comm_create_group(uworld, rootgroup, 0, &rootworld); @@ -133,20 +141,6 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : maxlocal = 0; ntotal = 0; - - xprev = xnext = tangent = springF= NULL; - fnext = NULL; - xsend = xrecv = NULL; - fsend = frecv = NULL; - tagsend = tagrecv = NULL; - xsendall = xrecvall = NULL; - fsendall = frecvall = NULL; - tagsendall = tagrecvall = NULL; - counts = displacements = NULL; - - - if (NEBLongRange) - {nlenall=NULL;} } /* ---------------------------------------------------------------------- */ @@ -204,7 +198,6 @@ void FixNEB::init() rclimber = -1; - // nebatoms = # of atoms in fix group = atoms with inter-replica forces bigint count = group->count(igroup); @@ -236,11 +229,6 @@ void FixNEB::init() memory->create(counts,nprocs,"neb:counts"); memory->create(displacements,nprocs,"neb:displacements"); } - - - - - } /* ---------------------------------------------------------------------- */ @@ -261,8 +249,6 @@ void FixNEB::min_post_force(int vflag) double vprev,vnext,vmax,vmin; double delxp,delyp,delzp,delxn,delyn,delzn; double delta1[3],delta2[3]; - MPI_Status status; - MPI_Request request; double vIni =0.0; vprev=vnext=veng = pe->compute_scalar(); @@ -270,42 +256,42 @@ void FixNEB::min_post_force(int vflag) if (ireplica < nreplica-1 && me ==0) MPI_Send(&veng,1,MPI_DOUBLE,procnext,0,uworld); if (ireplica > 0 && me ==0) - MPI_Recv(&vprev,1,MPI_DOUBLE,procprev,0,uworld,&status); + MPI_Recv(&vprev,1,MPI_DOUBLE,procprev,0,uworld,MPI_STATUS_IGNORE); if (ireplica > 0 && me == 0) MPI_Send(&veng,1,MPI_DOUBLE,procprev,0,uworld); if (ireplica < nreplica-1 && me == 0) - MPI_Recv(&vnext,1,MPI_DOUBLE,procnext,0,uworld,&status); + MPI_Recv(&vnext,1,MPI_DOUBLE,procnext,0,uworld,MPI_STATUS_IGNORE); if (cmode == MULTI_PROC) { MPI_Bcast(&vprev,1,MPI_DOUBLE,0,world); MPI_Bcast(&vnext,1,MPI_DOUBLE,0,world); } - if (FreeEndFinal){ - if (update->ntimestep==0){EFinalIni = veng;} + if (FreeEndFinal) { + if (update->ntimestep == 0) {EFinalIni = veng;} } - if (ireplica==0) + if (ireplica == 0) vIni=veng; - if (FreeEndFinalWithRespToEIni ){ - if ( me ==0){ + if (FreeEndFinalWithRespToEIni) { + if (me == 0) { int procFirst; procFirst=universe->root_proc[0]; - MPI_Bcast(&vIni,1,MPI_DOUBLE,procFirst,uworld); //MPI_Recv(&vIni,1,MPI_DOUBLE,procFirst,0,uworld,&status); + MPI_Bcast(&vIni,1,MPI_DOUBLE,procFirst,uworld); } if (cmode == MULTI_PROC) { MPI_Bcast(&vIni,1,MPI_DOUBLE,0,world); } } - if (FreeEndIni && ireplica==0 ){ - if (me == 0 ) - if (update->ntimestep==0){ - EIniIni = veng; - if (cmode == MULTI_PROC) - MPI_Bcast(&EIniIni,1,MPI_DOUBLE,0,world); - } - } + if (FreeEndIni && ireplica == 0) { + if (me == 0 ) + if (update->ntimestep == 0) { + EIniIni = veng; + if (cmode == MULTI_PROC) + MPI_Bcast(&EIniIni,1,MPI_DOUBLE,0,world); + } + } // communicate atoms to/from adjacent replicas to fill xprev,xnext inter_replica_comm(); @@ -314,39 +300,6 @@ void FixNEB::min_post_force(int vflag) pe->addstep(update->ntimestep+1); - /* ALL THIS SHOULD BE DONE IN inter_replica_comm() - // xprev,xnext = atom coords of adjacent replicas - // assume order of atoms in all replicas is the same - // check that number of atoms hasn't changed - - double **x = atom->x; - int *mask = atom->mask; - int nlocal = atom->nlocal; - double dot = 0.0; - double prefactor; - - if (nlocal != nebatoms) error->one(FLERR,"Atom count changed in fix neb"); - - if (ireplica > 0) - MPI_Irecv(xprev[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld,&request); - if (ireplica < nreplica-1) - MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld); - if (ireplica > 0) MPI_Wait(&request,&status); - - - - - if (ireplica < nreplica-1) - MPI_Irecv(xnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); - if (ireplica > 0) - MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); - if (ireplica < nreplica-1) MPI_Wait(&request,&status); - */ - - - - - double **x = atom->x; int *mask = atom->mask; double dot = 0.0; @@ -355,33 +308,18 @@ void FixNEB::min_post_force(int vflag) double **f = atom->f; int nlocal = atom->nlocal; - /* SHOULD BE DONE IN inter_replica_comm() - if (ireplica < nreplica-1) - MPI_Irecv(fnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); - if (ireplica > 0) - MPI_Send(f[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); - if (ireplica < nreplica-1) MPI_Wait(&request,&status); - */ - - //calculating separation between images + plen = 0.0; nlen = 0.0; double tlen = 0.0; - double gradnextlen = 0.0; - double dotFreeEndIniOld=0.0; - double dotFreeEndFinalOld=0.0; - - dotgrad = 0.0; - - gradlen = 0.0; + double gradnextlen = 0.0; + double dotFreeEndIniOld = 0.0; + double dotFreeEndFinalOld = 0.0; + dotgrad = gradlen = dotpath = dottangrad = 0.0; - dotpath = 0.0; - dottangrad = 0.0; - - - if (ireplica ==nreplica-1){ + if (ireplica ==nreplica-1) { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -393,18 +331,18 @@ void FixNEB::min_post_force(int vflag) plen += delxp*delxp + delyp*delyp + delzp*delzp; dottangrad += delxp* f[i][0]+ delyp*f[i][1]+delzp*f[i][2]; gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; - if (FreeEndFinal||FreeEndFinalWithRespToEIni){ + if (FreeEndFinal||FreeEndFinalWithRespToEIni) { tangent[i][0]=delxp; tangent[i][1]=delyp; tangent[i][2]=delzp; - tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + - tangent[i][2]*tangent[i][2]; - dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + f[i][2]*tangent[i][2]; + tlen += tangent[i][0]*tangent[i][0] + + tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + dot += f[i][0]*tangent[i][0] + + f[i][1]*tangent[i][1] + f[i][2]*tangent[i][2]; } - } - } + } - else if (ireplica == 0){ + } else if (ireplica == 0) { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { delxn = xnext[i][0] - x[i][0]; @@ -412,113 +350,98 @@ void FixNEB::min_post_force(int vflag) delzn = xnext[i][2] - x[i][2]; domain->minimum_image(delxn,delyn,delzn); nlen += delxn*delxn + delyn*delyn + delzn*delzn; - gradnextlen += fnext[i][0]*fnext[i][0] + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; - dotgrad += f[i][0]*fnext[i][0] + f[i][1]*fnext[i][1] + - f[i][2]*fnext[i][2]; - dottangrad += delxn* f[i][0]+ delyn*f[i][1]+delzn*f[i][2]; + gradnextlen += fnext[i][0]*fnext[i][0] + + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; + dotgrad += f[i][0]*fnext[i][0] + + f[i][1]*fnext[i][1] + f[i][2]*fnext[i][2]; + dottangrad += delxn*f[i][0]+ delyn*f[i][1] + delzn*f[i][2]; gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; - if (FreeEndIni) - { - tangent[i][0]=delxn; - tangent[i][1]=delyn; - tangent[i][2]=delzn; - tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + - tangent[i][2]*tangent[i][2]; - dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + f[i][2]*tangent[i][2]; - } + if (FreeEndIni) { + tangent[i][0]=delxn; + tangent[i][1]=delyn; + tangent[i][2]=delzn; + tlen += tangent[i][0]*tangent[i][0] + + tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + dot += f[i][0]*tangent[i][0] + + f[i][1]*tangent[i][1] + f[i][2]*tangent[i][2]; + } } - } - else //not the first or last replica - { - vmax = MAX(fabs(vnext-veng),fabs(vprev-veng)); - vmin = MIN(fabs(vnext-veng),fabs(vprev-veng)); - - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - delxp = x[i][0] - xprev[i][0]; - delyp = x[i][1] - xprev[i][1]; - delzp = x[i][2] - xprev[i][2]; - domain->minimum_image(delxp,delyp,delzp); - plen += delxp*delxp + delyp*delyp + delzp*delzp; - - delxn = xnext[i][0] - x[i][0]; - delyn = xnext[i][1] - x[i][1]; - delzn = xnext[i][2] - x[i][2]; - domain->minimum_image(delxn,delyn,delzn); domain->minimum_image(delxn,delyn,delzn); - - if (vnext > veng && veng > vprev) { - tangent[i][0]=delxn; - tangent[i][1]=delyn; - tangent[i][2]=delzn; - } - else if (vnext < veng && veng < vprev) { - tangent[i][0]=delxp; - tangent[i][1]=delyp; - tangent[i][2]=delzp; - } - else { - if (vnext > vprev) { - tangent[i][0] = vmax*delxn + vmin*delxp; - tangent[i][1] = vmax*delyn + vmin*delyp; - tangent[i][2] = vmax*delzn + vmin*delzp; - } else { - tangent[i][0] = vmin*delxn + vmax*delxp; - tangent[i][1] = vmin*delyn + vmax*delyp; - tangent[i][2] = vmin*delzn + vmax*delzp; - } - - } - - nlen += delxn*delxn + delyn*delyn + delzn*delzn; - tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + - tangent[i][2]*tangent[i][2]; - gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; - dotpath += delxp*delxn + delyp*delyn + delzp*delzn; - dottangrad += tangent[i][0]* f[i][0]+ tangent[i][1]*f[i][1]+tangent[i][2]*f[i][2]; + } else { + //not the first or last replica + vmax = MAX(fabs(vnext-veng),fabs(vprev-veng)); + vmin = MIN(fabs(vnext-veng),fabs(vprev-veng)); + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + delxp = x[i][0] - xprev[i][0]; + delyp = x[i][1] - xprev[i][1]; + delzp = x[i][2] - xprev[i][2]; + domain->minimum_image(delxp,delyp,delzp); + plen += delxp*delxp + delyp*delyp + delzp*delzp; - gradnextlen += fnext[i][0]*fnext[i][0] + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; - dotgrad += f[i][0]*fnext[i][0] + f[i][1]*fnext[i][1] + - f[i][2]*fnext[i][2]; + delxn = xnext[i][0] - x[i][0]; + delyn = xnext[i][1] - x[i][1]; + delzn = xnext[i][2] - x[i][2]; + domain->minimum_image(delxn,delyn,delzn); - springF[i][0]=kspringPerp*(delxn-delxp); - springF[i][1]=kspringPerp*(delyn-delyp); - springF[i][2]=kspringPerp*(delzn-delzp); + if (vnext > veng && veng > vprev) { + tangent[i][0]=delxn; + tangent[i][1]=delyn; + tangent[i][2]=delzn; + } else if (vnext < veng && veng < vprev) { + tangent[i][0]=delxp; + tangent[i][1]=delyp; + tangent[i][2]=delzp; + } else { + if (vnext > vprev) { + tangent[i][0] = vmax*delxn + vmin*delxp; + tangent[i][1] = vmax*delyn + vmin*delyp; + tangent[i][2] = vmax*delzn + vmin*delzp; + } else { + tangent[i][0] = vmin*delxn + vmax*delxp; + tangent[i][1] = vmin*delyn + vmax*delyp; + tangent[i][2] = vmin*delzn + vmax*delzp; + } } - } - - double lenall; - MPI_Allreduce(&nlen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); - nlen = sqrt(lenall); - - MPI_Allreduce(&plen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); - plen = sqrt(lenall); - - MPI_Allreduce(&tlen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); - tlen = sqrt(lenall); - - MPI_Allreduce(&gradlen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); - gradlen = sqrt(lenall); - - MPI_Allreduce(&gradnextlen,&lenall,1,MPI_DOUBLE,MPI_SUM,world); - gradnextlen = sqrt(lenall); - - - - double dotpathall; - double dottangradall; - double dotgradall; - - MPI_Allreduce(&dotpath,&dotpathall,1,MPI_DOUBLE,MPI_SUM,world); - MPI_Allreduce(&dottangrad,&dottangradall,1,MPI_DOUBLE,MPI_SUM,world); - MPI_Allreduce(&dotgrad,&dotgradall,1,MPI_DOUBLE,MPI_SUM,world); + nlen += delxn*delxn + delyn*delyn + delzn*delzn; + tlen += tangent[i][0]*tangent[i][0] + + tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + dotpath += delxp*delxn + delyp*delyn + delzp*delzn; + dottangrad += tangent[i][0]* f[i][0] + + tangent[i][1]*f[i][1] + tangent[i][2]*f[i][2]; + gradnextlen += fnext[i][0]*fnext[i][0] + + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; + dotgrad += f[i][0]*fnext[i][0] + + f[i][1]*fnext[i][1] + f[i][2]*fnext[i][2]; + + springF[i][0]=kspringPerp*(delxn-delxp); + springF[i][1]=kspringPerp*(delyn-delyp); + springF[i][2]=kspringPerp*(delzn-delzp); + } + } - dotpath=dotpathall; - dottangrad=dottangradall; - dotgrad=dotgradall; +#define BUFSIZE 8 + double bufin[BUFSIZE], bufout[BUFSIZE]; + bufin[0] = nlen; + bufin[1] = plen; + bufin[2] = tlen; + bufin[3] = gradlen; + bufin[4] = gradnextlen; + bufin[5] = dotpath; + bufin[6] = dottangrad; + bufin[7] = dotgrad; + MPI_Allreduce(bufin,bufout,BUFSIZE,MPI_DOUBLE,MPI_SUM,world); + nlen = sqrt(bufout[0]); + plen = sqrt(bufout[1]); + tlen = sqrt(bufout[2]); + gradlen = sqrt(bufout[3]); + gradnextlen = sqrt(bufout[4]); + dotpath = bufout[5]; + dottangrag = bufout[6]; + dotgrad = bufout[7]; // normalize tangent vector @@ -532,146 +455,123 @@ void FixNEB::min_post_force(int vflag) } } - // first or last replica has no change to forces, just return - if(ireplica >0 && ireplica0 && ireplica 0.0) { double dotall; MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); - dot=dotall; - double tleninv = 1.0/tlen; - dot *= tleninv; - if (dot<0) - prefactor = -dot - (veng-EIniIni); - else prefactor = -dot + (veng-EIniIni); + dot=dotall/tlen; + + if (dot<0) prefactor = -dot - (veng-EIniIni); + else prefactor = -dot + (veng-EIniIni); + for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { f[i][0] += prefactor *tangent[i][0]; - f[i][1] += prefactor *tangent[i][1]; + f[i][1] += prefactor *tangent[i][1]; f[i][2] += prefactor *tangent[i][2]; } } - } - - if(FreeEndFinal&&ireplica == nreplica -1){ + if (FreeEndFinal&&ireplica == nreplica -1) { if (tlen > 0.0) { double dotall; MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); - dot=dotall; - double tleninv = 1.0/tlen; - dot *= tleninv; - if (dot<0) - prefactor = -dot - (veng-EFinalIni); - else prefactor = -dot + (veng-EFinalIni); - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - f[i][0] += prefactor *tangent[i][0]; - f[i][1] += prefactor *tangent[i][1]; - f[i][2] += prefactor *tangent[i][2]; - } + dot=dotall/tlen; + if (dot<0) prefactor = -dot - (veng-EFinalIni); + else prefactor = -dot + (veng-EFinalIni); + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + f[i][0] += prefactor *tangent[i][0]; + f[i][1] += prefactor *tangent[i][1]; + f[i][2] += prefactor *tangent[i][2]; + } } } - if(FreeEndFinalWithRespToEIni&&ireplica == nreplica -1){ + if (FreeEndFinalWithRespToEIni&&ireplica == nreplica -1) { if (tlen > 0.0) { double dotall; MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); - dot=dotall; - double tleninv = 1.0/tlen; - dot *= tleninv; - if (dot<0) - prefactor = -dot - (veng-vIni); - else prefactor = -dot + (veng-vIni); - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - f[i][0] += prefactor *tangent[i][0]; - f[i][1] += prefactor *tangent[i][1]; - f[i][2] += prefactor *tangent[i][2]; - } + dot=dotall/tlen; + + if (dot<0) prefactor = -dot - (veng-vIni); + else prefactor = -dot + (veng-vIni); + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + f[i][0] += prefactor *tangent[i][0]; + f[i][1] += prefactor *tangent[i][1]; + f[i][2] += prefactor *tangent[i][2]; + } } } - double lentot = 0; + double lentot = 0; double meanDist,idealPos,lenuntilIm,lenuntilClimber; lenuntilClimber=0; - if(NEBLongRange) - { - if (cmode == SINGLE_PROC_DIRECT or cmode == SINGLE_PROC_MAP) - {MPI_Allgather(&nlen,1,MPI_DOUBLE,&nlenall[0],1,MPI_DOUBLE,uworld);} - else{ - if (me == 0) - MPI_Allgather(&nlen,1,MPI_DOUBLE,&nlenall[0],1,MPI_DOUBLE,rootworld); - - MPI_Bcast(nlenall,nreplica,MPI_DOUBLE,0,world); - } - - - - lenuntilIm = 0; - for (int i = 0; i < ireplica; i++) - lenuntilIm += nlenall[i]; - - for (int i = 0; i < nreplica; i++) - lentot += nlenall[i]; - - meanDist = lentot/(nreplica -1); - - if (rclimber>0) { - for (int i = 0; i < rclimber; i++) - lenuntilClimber += nlenall[i]; - double meanDistBeforeClimber = lenuntilClimber/rclimber; - double meanDistAfterClimber = (lentot-lenuntilClimber)/(nreplica-rclimber-1); - if (ireplica0) { + for (int i = 0; i < rclimber; i++) + lenuntilClimber += nlenall[i]; + double meanDistBeforeClimber = lenuntilClimber/rclimber; + double meanDistAfterClimber = + (lentot-lenuntilClimber)/(nreplica-rclimber-1); + if (ireplicadestroy(fnext); memory->destroy(springF); - if (NEBLongRange){ + if (NEBLongRange) { memory->destroy(nlenall); memory->create(nlenall,nreplica,"neb:nlenall"); } diff --git a/src/REPLICA/fix_neb.h b/src/REPLICA/fix_neb.h index 5280e9064a..290494bef4 100644 --- a/src/REPLICA/fix_neb.h +++ b/src/REPLICA/fix_neb.h @@ -26,7 +26,7 @@ namespace LAMMPS_NS { class FixNEB : public Fix { public: - double veng,plen,nlen,dotpath, dottangrad,gradlen,dotgrad ; + double veng,plen,nlen,dotpath,dottangrad,gradlen,dotgrad; int rclimber; FixNEB(class LAMMPS *, int, char **); @@ -38,14 +38,15 @@ class FixNEB : public Fix { private: int me,nprocs,nprocs_universe; - double kspring, kspringPerp,EIniIni,EFinalIni; - bool StandardNEB, NEBLongRange,PerpSpring, FreeEndIni,FreeEndFinal,FreeEndFinalWithRespToEIni,FinalAndInterWithRespToEIni ; + double kspring,kspringPerp,EIniIni,EFinalIni; + bool StandardNEB,NEBLongRange,PerpSpring,FreeEndIni,FreeEndFinal; + bool FreeEndFinalWithRespToEIni,FinalAndInterWithRespToEIni; int ireplica,nreplica; int procnext,procprev; int cmode; MPI_Comm uworld; MPI_Comm rootworld; - + char *id_pe; class Compute *pe; diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index a0feedf13f..671ad9215c 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -9,7 +9,7 @@ the GNU General Public License. See the README file in the top-level LAMMPS directory. - ------------------------------------------------------------------------- */ +------------------------------------------------------------------------- */ // lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h // due to OpenMPI bug which sets INT64_MAX via its mpi.h @@ -52,7 +52,7 @@ NEB::NEB(LAMMPS *lmp) : Pointers(lmp) {} /* ---------------------------------------------------------------------- internal NEB constructor, called from TAD - ------------------------------------------------------------------------- */ +------------------------------------------------------------------------- */ NEB::NEB(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, int n2steps_in, int nevery_in, double *buf_init, double *buf_final) @@ -105,7 +105,7 @@ NEB::~NEB() /* ---------------------------------------------------------------------- perform NEB on multiple replicas - ------------------------------------------------------------------------- */ +------------------------------------------------------------------------- */ void NEB::command(int narg, char **arg) { @@ -165,7 +165,7 @@ void NEB::command(int narg, char **arg) /* ---------------------------------------------------------------------- run NEB on multiple replicas - ------------------------------------------------------------------------- */ +------------------------------------------------------------------------- */ void NEB::run() { @@ -363,7 +363,7 @@ void NEB::run() each replica (except first) opens file and reads it each replica stores coords initial replica does nothing - ------------------------------------------------------------------------- */ +------------------------------------------------------------------------- */ void NEB::readfile(char *file, int flag) { @@ -526,7 +526,7 @@ void NEB::readfile(char *file, int flag) /* ---------------------------------------------------------------------- universe proc 0 opens NEB data file test if gzipped - ------------------------------------------------------------------------- */ +------------------------------------------------------------------------- */ void NEB::open(char *file) { @@ -560,7 +560,7 @@ void NEB::open(char *file) /* ---------------------------------------------------------------------- query fix NEB for info on each replica universe proc 0 prints current NEB status - ------------------------------------------------------------------------- */ +------------------------------------------------------------------------- */ void NEB::print_status() { diff --git a/src/REPLICA/neb.h b/src/REPLICA/neb.h index bd60efe961..12a103284f 100644 --- a/src/REPLICA/neb.h +++ b/src/REPLICA/neb.h @@ -53,8 +53,8 @@ class NEB : protected Pointers { int nall; // per-replica dimension of array all double **all; // PE,plen,nlen,gradvnorm from each replica double *rdist; // normalize reaction distance, 0 to 1 - double *freplica; // force on an image - double *fmaxatomInRepl; // force on an image + double *freplica; // force on an image + double *fmaxatomInRepl; // force on an image void readfile(char *, int); void open(char *); -- GitLab From 6ef79d371541742278bca75638924d6c6d44cafd Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 19 May 2017 15:13:19 -0400 Subject: [PATCH 176/593] silence several compiler warnings --- src/REPLICA/fix_neb.cpp | 14 ++++------- src/REPLICA/neb.cpp | 51 ++++++++++++++++++++++------------------- 2 files changed, 31 insertions(+), 34 deletions(-) diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index 23b9297017..ea98431fdd 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -38,12 +38,12 @@ enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC}; FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), - id_pe(NULL), pe(NULL), xprev(NULL), xnext(NULL), fnext(NULL), - tangent(NULL), springF(NULL), xsend(NULL), xrecv(NULL), + id_pe(NULL), pe(NULL), nlenall(NULL), xprev(NULL), xnext(NULL), + fnext(NULL), springF(NULL), tangent(NULL), xsend(NULL), xrecv(NULL), fsend(NULL), frecv(NULL), tagsend(NULL), tagrecv(NULL), xsendall(NULL), xrecvall(NULL), fsendall(NULL), frecvall(NULL), tagsendall(NULL), tagrecvall(NULL), counts(NULL), - displacements(NULL),nlenall(NULL) + displacements(NULL) { @@ -248,7 +248,6 @@ void FixNEB::min_post_force(int vflag) { double vprev,vnext,vmax,vmin; double delxp,delyp,delzp,delxn,delyn,delzn; - double delta1[3],delta2[3]; double vIni =0.0; vprev=vnext=veng = pe->compute_scalar(); @@ -314,8 +313,6 @@ void FixNEB::min_post_force(int vflag) nlen = 0.0; double tlen = 0.0; double gradnextlen = 0.0; - double dotFreeEndIniOld = 0.0; - double dotFreeEndFinalOld = 0.0; dotgrad = gradlen = dotpath = dottangrad = 0.0; @@ -440,7 +437,7 @@ void FixNEB::min_post_force(int vflag) gradlen = sqrt(bufout[3]); gradnextlen = sqrt(bufout[4]); dotpath = bufout[5]; - dottangrag = bufout[6]; + dottangrad = bufout[6]; dotgrad = bufout[7]; // normalize tangent vector @@ -557,7 +554,6 @@ void FixNEB::min_post_force(int vflag) if (ireplica == 0 || ireplica == nreplica-1) return ; double AngularContr; - double thetapath; dotpath = dotpath/(plen*nlen); AngularContr = 0.5 *(1+cos(MY_PI * dotpath)); @@ -579,8 +575,6 @@ void FixNEB::min_post_force(int vflag) MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); dot=dotall; - // double prefactor, prefSpring; - double ToDisp; if (ireplica == rclimber) prefactor = -2.0*dot; else { diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index 671ad9215c..c1bd6191bf 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -214,30 +214,33 @@ void NEB::run() update->minimize->setup(); if (me_universe == 0) { - if (universe->uscreen) - if (Verbose) - fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); - else - - fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN\n"); - if (universe->ulogfile) - if (Verbose) - fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); - else - - fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN\n"); + if (universe->uscreen) { + if (Verbose) { + fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " + "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " + "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " + "... ReplicaForceN MaxAtomForceN\n"); + } else { + fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " + "RDN PEN\n"); + } + } + + if (universe->ulogfile) { + if (Verbose) { + fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " + "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " + "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " + "... ReplicaForceN MaxAtomForceN\n"); + } else { + fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " + "RDN PEN\n"); + } + } } print_status(); -- GitLab From 546aed7ccde80f17456f65a60099ee752c9315a3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 19 May 2017 16:14:59 -0400 Subject: [PATCH 177/593] plug some memory leaks --- src/REPLICA/fix_neb.cpp | 61 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index ea98431fdd..216d5a6202 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -115,13 +115,14 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : int *iroots = new int[nreplica]; MPI_Group uworldgroup,rootgroup; if (NEBLongRange) { - for (int iIm =0; iIm < nreplica;iIm++) - iroots[iIm]=universe->root_proc[iIm]; + for (int i=0; iroot_proc[i]; MPI_Comm_group(uworld, &uworldgroup); MPI_Group_incl(uworldgroup, nreplica, iroots, &rootgroup); - // MPI_Comm_create_group(uworld, rootgroup, 0, &rootworld); MPI_Comm_create(uworld, rootgroup, &rootworld); } + delete[] iroots; + // create a new compute pe style // id = fix-ID + pe, compute group = all @@ -139,8 +140,8 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : // initialize local storage - maxlocal = 0; - ntotal = 0; + maxlocal = -1; + ntotal = -1; } /* ---------------------------------------------------------------------- */ @@ -153,6 +154,7 @@ FixNEB::~FixNEB() memory->destroy(xprev); memory->destroy(xnext); memory->destroy(tangent); + memory->destroy(fnext); memory->destroy(springF); memory->destroy(xsend); memory->destroy(xrecv); @@ -171,9 +173,10 @@ FixNEB::~FixNEB() memory->destroy(counts); memory->destroy(displacements); - if (NEBLongRange) + if (NEBLongRange) { + MPI_Comm_free(&rootworld); memory->destroy(nlenall); - + } } /* ---------------------------------------------------------------------- */ @@ -246,11 +249,11 @@ void FixNEB::min_setup(int vflag) void FixNEB::min_post_force(int vflag) { - double vprev,vnext,vmax,vmin; + double vprev,vnext; double delxp,delyp,delzp,delxn,delyn,delzn; - double vIni =0.0; + double vIni=0.0; - vprev=vnext=veng = pe->compute_scalar(); + vprev=vnext=veng=pe->compute_scalar(); if (ireplica < nreplica-1 && me ==0) MPI_Send(&veng,1,MPI_DOUBLE,procnext,0,uworld); @@ -302,7 +305,7 @@ void FixNEB::min_post_force(int vflag) double **x = atom->x; int *mask = atom->mask; double dot = 0.0; - double prefactor; + double prefactor = 0.0; double **f = atom->f; int nlocal = atom->nlocal; @@ -364,9 +367,9 @@ void FixNEB::min_post_force(int vflag) } } } else { - //not the first or last replica - vmax = MAX(fabs(vnext-veng),fabs(vprev-veng)); - vmin = MIN(fabs(vnext-veng),fabs(vprev-veng)); + // not the first or last replica + double vmax = MAX(fabs(vnext-veng),fabs(vprev-veng)); + double vmin = MIN(fabs(vnext-veng),fabs(vprev-veng)); for (int i = 0; i < nlocal; i++) @@ -658,7 +661,6 @@ void FixNEB::inter_replica_comm() MPI_Send(f[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); if (ireplica < nreplica-1) MPI_Wait(&request,MPI_STATUS_IGNORE); - return; } @@ -832,17 +834,19 @@ void FixNEB::inter_replica_comm() void FixNEB::reallocate() { + maxlocal = atom->nmax; + memory->destroy(xprev); memory->destroy(xnext); memory->destroy(tangent); memory->destroy(fnext); memory->destroy(springF); - if (NEBLongRange) { - memory->destroy(nlenall); - memory->create(nlenall,nreplica,"neb:nlenall"); - } - + memory->create(xprev,maxlocal,3,"neb:xprev"); + memory->create(xnext,maxlocal,3,"neb:xnext"); + memory->create(tangent,maxlocal,3,"neb:tangent"); + memory->create(fnext,maxlocal,3,"neb:fnext"); + memory->create(springF,maxlocal,3,"neb:springF"); if (cmode != SINGLE_PROC_DIRECT) { memory->destroy(xsend); @@ -851,18 +855,6 @@ void FixNEB::reallocate() memory->destroy(frecv); memory->destroy(tagsend); memory->destroy(tagrecv); - } - - maxlocal = atom->nmax; - - memory->create(xprev,maxlocal,3,"neb:xprev"); - memory->create(xnext,maxlocal,3,"neb:xnext"); - memory->create(tangent,maxlocal,3,"neb:tangent"); - memory->create(fnext,maxlocal,3,"neb:fnext"); - memory->create(springF,maxlocal,3,"neb:springF"); - - - if (cmode != SINGLE_PROC_DIRECT) { memory->create(xsend,maxlocal,3,"neb:xsend"); memory->create(fsend,maxlocal,3,"neb:fsend"); memory->create(xrecv,maxlocal,3,"neb:xrecv"); @@ -870,4 +862,9 @@ void FixNEB::reallocate() memory->create(tagsend,maxlocal,"neb:tagsend"); memory->create(tagrecv,maxlocal,"neb:tagrecv"); } + + if (NEBLongRange) { + memory->destroy(nlenall); + memory->create(nlenall,nreplica,"neb:nlenall"); + } } -- GitLab From 97d3c843c44afd97125ce166c7d0a6b46a53a483 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 21 May 2017 11:13:47 -0400 Subject: [PATCH 178/593] small documentation fixes to fix typos and formatting issues --- doc/src/compute_saed.txt | 40 +++++++++++++++++----------------- doc/src/dihedral_spherical.txt | 1 + doc/src/fix_gle.txt | 2 +- doc/src/fix_langevin_drude.txt | 4 ++-- doc/src/package.txt | 6 ++--- doc/src/pair_python.txt | 9 ++++---- doc/src/pair_snap.txt | 7 +++--- doc/src/pair_zero.txt | 2 +- doc/src/tutorial_pylammps.txt | 1 + 9 files changed, 38 insertions(+), 34 deletions(-) diff --git a/doc/src/compute_saed.txt b/doc/src/compute_saed.txt index aadda49533..020f72f565 100644 --- a/doc/src/compute_saed.txt +++ b/doc/src/compute_saed.txt @@ -111,26 +111,26 @@ Coefficients parameterized by "(Fox)"_#Fox are assigned for each atom type designating the chemical symbol and charge of each atom type. Valid chemical symbols for compute saed are: - H: He: Li: Be: B: - C: N: O: F: Ne: - Na: Mg: Al: Si: P: - S: Cl: Ar: K: Ca: - Sc: Ti: V: Cr: Mn: - Fe: Co: Ni: Cu: Zn: - Ga: Ge: As: Se: Br: - Kr: Rb: Sr: Y: Zr: - Nb: Mo: Tc: Ru: Rh: - Pd: Ag: Cd: In: Sn: - Sb: Te: I: Xe: Cs: - Ba: La: Ce: Pr: Nd: - Pm: Sm: Eu: Gd: Tb: - Dy: Ho: Er: Tm: Yb: - Lu: Hf: Ta: W: Re: - Os: Ir: Pt: Au: Hg: - Tl: Pb: Bi: Po: At: - Rn: Fr: Ra: Ac: Th: - Pa: U: Np: Pu: Am: - Cm: Bk: Cf:tb(c=5,s=:) +H: He: Li: Be: B: +C: N: O: F: Ne: +Na: Mg: Al: Si: P: +S: Cl: Ar: K: Ca: +Sc: Ti: V: Cr: Mn: +Fe: Co: Ni: Cu: Zn: +Ga: Ge: As: Se: Br: +Kr: Rb: Sr: Y: Zr: +Nb: Mo: Tc: Ru: Rh: +Pd: Ag: Cd: In: Sn: +Sb: Te: I: Xe: Cs: +Ba: La: Ce: Pr: Nd: +Pm: Sm: Eu: Gd: Tb: +Dy: Ho: Er: Tm: Yb: +Lu: Hf: Ta: W: Re: +Os: Ir: Pt: Au: Hg: +Tl: Pb: Bi: Po: At: +Rn: Fr: Ra: Ac: Th: +Pa: U: Np: Pu: Am: +Cm: Bk: Cf:tb(c=5,s=:) If the {echo} keyword is specified, compute saed will provide extra diff --git a/doc/src/dihedral_spherical.txt b/doc/src/dihedral_spherical.txt index c71a319912..7c17fbf5ef 100644 --- a/doc/src/dihedral_spherical.txt +++ b/doc/src/dihedral_spherical.txt @@ -18,6 +18,7 @@ dihedral_coeff 1 1 286.1 1 124 1 1 90.0 0 1 90.0 0 dihedral_coeff 1 3 69.3 1 93.9 1 1 90 0 1 90 0 & 49.1 0 0.00 0 1 74.4 1 0 0.00 0 & 25.2 0 0.00 0 0 0.00 0 1 48.1 1 +:pre [Description:] diff --git a/doc/src/fix_gle.txt b/doc/src/fix_gle.txt index b8d3cc9b34..6568060f0c 100644 --- a/doc/src/fix_gle.txt +++ b/doc/src/fix_gle.txt @@ -68,7 +68,7 @@ matrix that gives canonical sampling for a given A is computed automatically. However, the GLE framework also allow for non-equilibrium sampling, that can be used for instance to model inexpensively zero-point energy effects "(Ceriotti2)"_#Ceriotti2. This is achieved specifying the {noneq} - keyword followed by the name of the file that contains the static covariance +keyword followed by the name of the file that contains the static covariance matrix for the non-equilibrium dynamics. Please note, that the covariance matrix is expected to be given in [temperature units]. diff --git a/doc/src/fix_langevin_drude.txt b/doc/src/fix_langevin_drude.txt index 04437e7f36..afc9c5f257 100644 --- a/doc/src/fix_langevin_drude.txt +++ b/doc/src/fix_langevin_drude.txt @@ -67,11 +67,11 @@ The Langevin forces are computed as \(F_r'\) is a random force proportional to \(\sqrt \{ \frac \{2\, k_B \mathtt\{Tcom\}\, m'\} \{\mathrm dt\, \mathtt\{damp\_com\} \} - \} \). :b + \} \). \(f_r'\) is a random force proportional to \(\sqrt \{ \frac \{2\, k_B \mathtt\{Tdrude\}\, m'\} \{\mathrm dt\, \mathtt\{damp\_drude\} \} - \} \). :b + \} \). Then the real forces acting on the particles are computed from the inverse transform: \begin\{equation\} F = \frac M \{M'\}\, F' - f' \end\{equation\} diff --git a/doc/src/package.txt b/doc/src/package.txt index a0894b3128..18a26bd55c 100644 --- a/doc/src/package.txt +++ b/doc/src/package.txt @@ -574,9 +574,9 @@ is used. If it is not used, you must invoke the package intel command in your input script or or via the "-pk intel" "command-line switch"_Section_start.html#start_7. -For the KOKKOS package, the option defaults neigh = full, neigh/qeq - = full, newton = off, binsize = 0.0, and comm = device. These settings - are made automatically by the required "-k on" "command-line +For the KOKKOS package, the option defaults neigh = full, +neigh/qeq = full, newton = off, binsize = 0.0, and comm = device. +These settings are made automatically by the required "-k on" "command-line switch"_Section_start.html#start_7. You can change them bu using the package kokkos command in your input script or via the "-pk kokkos" "command-line switch"_Section_start.html#start_7. diff --git a/doc/src/pair_python.txt b/doc/src/pair_python.txt index 557db37bbb..2f8ed7a27c 100644 --- a/doc/src/pair_python.txt +++ b/doc/src/pair_python.txt @@ -74,7 +74,7 @@ placeholders for atom types that will be used with other potentials. The python potential file has to start with the following code: from __future__ import print_function - +# class LAMMPSPairPotential(object): def __init__(self): self.pmap=dict() @@ -163,9 +163,10 @@ pair_write 1 1 2000 rsq 0.01 2.5 lj1_lj2.table lj :pre Note that it is strongly recommended to try to [delete] the potential table file before generating it. Since the {pair_write} command will -always append to a table file, which pair style table will use the -first match. Thus when changing the potential function in the python -class, the table pair style will still read the old variant. +always [append] to a table file, while pair style table will use the +[first match]. Thus when changing the potential function in the python +class, the table pair style will still read the old variant unless the +table file is first deleted. After switching the pair style to {table}, the potential tables need to be assigned to the LAMMPS atom types like this: diff --git a/doc/src/pair_snap.txt b/doc/src/pair_snap.txt index ab7313832c..4e3546481d 100644 --- a/doc/src/pair_snap.txt +++ b/doc/src/pair_snap.txt @@ -10,7 +10,8 @@ pair_style snap command :h3 [Syntax:] -pair_style snap :pre +pair_style snap +:pre [Examples:] @@ -19,11 +20,11 @@ pair_coeff * * InP.snapcoeff In P InP.snapparam In In P P :pre [Description:] -Style {snap} computes interactions +Pair style {snap} computes interactions using the spectral neighbor analysis potential (SNAP) "(Thompson)"_#Thompson20142. Like the GAP framework of Bartok et al. "(Bartok2010)"_#Bartok20102, "(Bartok2013)"_#Bartok2013 -it uses bispectrum components +which uses bispectrum components to characterize the local neighborhood of each atom in a very general way. The mathematical definition of the bispectrum calculation used by SNAP is identical diff --git a/doc/src/pair_zero.txt b/doc/src/pair_zero.txt index ffd40a977d..e58b33c75f 100644 --- a/doc/src/pair_zero.txt +++ b/doc/src/pair_zero.txt @@ -14,7 +14,7 @@ pair_style zero cutoff {nocoeff} :pre zero = style name of this pair style cutoff = global cutoff (distance units) -nocoeff = ignore all pair_coeff parameters (optional) :l +nocoeff = ignore all pair_coeff parameters (optional) :ul [Examples:] diff --git a/doc/src/tutorial_pylammps.txt b/doc/src/tutorial_pylammps.txt index a4a7a4041e..0b4fb32ed2 100644 --- a/doc/src/tutorial_pylammps.txt +++ b/doc/src/tutorial_pylammps.txt @@ -10,6 +10,7 @@ PyLammps Tutorial :h1 Overview :h2 -- GitLab From 8bc829c7f19ed87a0560fb7bae76705571873b0e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 May 2017 14:40:01 -0400 Subject: [PATCH 179/593] change example inputs to be backward compatible --- examples/neb/in.neb.hop1 | 2 +- examples/neb/in.neb.hop2 | 2 +- examples/neb/in.neb.sivac | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/neb/in.neb.hop1 b/examples/neb/in.neb.hop1 index 9a3d7579f3..495b2faa93 100644 --- a/examples/neb/in.neb.hop1 +++ b/examples/neb/in.neb.hop1 @@ -51,7 +51,7 @@ set group nebatoms type 3 group nonneb subtract all nebatoms fix 1 lower setforce 0.0 0.0 0.0 -fix 2 nebatoms neb 1.0 +fix 2 nebatoms neb 1.0 neigh fix 3 all enforce2d thermo 100 diff --git a/examples/neb/in.neb.hop2 b/examples/neb/in.neb.hop2 index 3eb16248e1..9a8986f454 100644 --- a/examples/neb/in.neb.hop2 +++ b/examples/neb/in.neb.hop2 @@ -53,7 +53,7 @@ set group nebatoms type 3 group nonneb subtract all nebatoms fix 1 lower setforce 0.0 0.0 0.0 -fix 2 nebatoms neb 1.0 +fix 2 nebatoms neb 1.0 neigh fix 3 all enforce2d thermo 100 diff --git a/examples/neb/in.neb.sivac b/examples/neb/in.neb.sivac index 566a380627..2fdf46f9d5 100644 --- a/examples/neb/in.neb.sivac +++ b/examples/neb/in.neb.sivac @@ -66,7 +66,7 @@ minimize 1.0e-6 1.0e-4 1000 10000 reset_timestep 0 -fix 1 all neb 1.0 +fix 1 all neb 1.0 neigh thermo 100 -- GitLab From 3fd91a239ff0a93149a0fc1e3b0bb2ed56b06ab4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 May 2017 14:41:01 -0400 Subject: [PATCH 180/593] avoid use '&&' and '||' instead of 'and' and 'or' for consistency --- src/REPLICA/fix_neb.cpp | 12 +++++------- src/REPLICA/neb.cpp | 6 +++--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index 216d5a6202..62a46b5bda 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -270,12 +270,10 @@ void FixNEB::min_post_force(int vflag) MPI_Bcast(&vnext,1,MPI_DOUBLE,0,world); } - if (FreeEndFinal) { - if (update->ntimestep == 0) {EFinalIni = veng;} - } + if (FreeEndFinal && (update->ntimestep == 0)) EFinalIni = veng; + + if (ireplica == 0) vIni=veng; - if (ireplica == 0) - vIni=veng; if (FreeEndFinalWithRespToEIni) { if (me == 0) { int procFirst; @@ -484,7 +482,7 @@ void FixNEB::min_post_force(int vflag) } } - if (FreeEndFinal&&ireplica == nreplica -1) { + if (FreeEndFinal && ireplica == nreplica -1) { if (tlen > 0.0) { double dotall; MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); @@ -524,7 +522,7 @@ void FixNEB::min_post_force(int vflag) double meanDist,idealPos,lenuntilIm,lenuntilClimber; lenuntilClimber=0; if (NEBLongRange) { - if (cmode == SINGLE_PROC_DIRECT or cmode == SINGLE_PROC_MAP) { + if (cmode == SINGLE_PROC_DIRECT || cmode == SINGLE_PROC_MAP) { MPI_Allgather(&nlen,1,MPI_DOUBLE,&nlenall[0],1,MPI_DOUBLE,uworld); } else { if (me == 0) diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index c1bd6191bf..9401b4a3f4 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -145,15 +145,15 @@ void NEB::command(int narg, char **arg) // process file-style setting to setup initial configs for all replicas if (strcmp(arg[5],"final") == 0) { - if (narg != 7 and narg !=8) error->universe_all(FLERR,"Illegal NEB command"); + if (narg != 7 && narg !=8) error->universe_all(FLERR,"Illegal NEB command"); infile = arg[6]; readfile(infile,0); } else if (strcmp(arg[5],"each") == 0) { - if (narg != 7 and narg !=8) error->universe_all(FLERR,"Illegal NEB command"); + if (narg != 7 && narg !=8) error->universe_all(FLERR,"Illegal NEB command"); infile = arg[6]; readfile(infile,1); } else if (strcmp(arg[5],"none") == 0) { - if (narg != 6 and narg !=7) error->universe_all(FLERR,"Illegal NEB command"); + if (narg != 6 && narg !=7) error->universe_all(FLERR,"Illegal NEB command"); } else error->universe_all(FLERR,"Illegal NEB command"); Verbose=false; -- GitLab From 4780d72809c006485f2a6032d38b2d74d2ac58c3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 May 2017 14:42:42 -0400 Subject: [PATCH 181/593] use '&&' and '||' instead of 'and' and 'or' operators for consistency --- src/MC/pair_dsmc.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MC/pair_dsmc.cpp b/src/MC/pair_dsmc.cpp index 29ecde2023..d3327eea29 100644 --- a/src/MC/pair_dsmc.cpp +++ b/src/MC/pair_dsmc.cpp @@ -93,9 +93,9 @@ void PairDSMC::compute(int eflag, int vflag) int ycell = static_cast((x[i][1] - domain->boxlo[1])/celly); int zcell = static_cast((x[i][2] - domain->boxlo[2])/cellz); - if ((xcell < 0) or (xcell > ncellsx-1) or - (ycell < 0) or (ycell > ncellsy-1) or - (zcell < 0) or (zcell > ncellsz-1)) continue; + if ((xcell < 0) || (xcell > ncellsx-1) || + (ycell < 0) || (ycell > ncellsy-1) || + (zcell < 0) || (zcell > ncellsz-1)) continue; int icell = xcell + ycell*ncellsx + zcell*ncellsx*ncellsy; itype = type[i]; @@ -146,7 +146,7 @@ void PairDSMC::compute(int eflag, int vflag) double num_of_collisions_double = number_of_A * number_of_B * weighting * Vs_max * update->dt / vol; - if ((itype == jtype) and number_of_B) + if ((itype == jtype) && number_of_B) num_of_collisions_double *= 0.5 * double(number_of_B - 1) / double(number_of_B); @@ -161,8 +161,8 @@ void PairDSMC::compute(int eflag, int vflag) // perform collisions on pairs of particles in icell for (int k = 0; k < num_of_collisions; k++) { - if ((number_of_A < 1) or (number_of_B < 1)) break; - if ((itype == jtype) and (number_of_A < 2)) break; + if ((number_of_A < 1) || (number_of_B < 1)) break; + if ((itype == jtype) && (number_of_A < 2)) break; int ith_A = static_cast(random->uniform()*number_of_A); int jth_B = static_cast(random->uniform()*number_of_B); int i = particle_list[itype][ith_A]; -- GitLab From 7185db98b4c78843b8aca73f9fc55f2bb8f046b8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 May 2017 17:13:38 -0400 Subject: [PATCH 182/593] NEBLongRange was incorrectly set to false by default. revert to true. --- src/REPLICA/fix_neb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index 62a46b5bda..695f7ff224 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -46,8 +46,8 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : displacements(NULL) { - - StandardNEB=NEBLongRange=PerpSpring=FreeEndIni=FreeEndFinal=false; + NEBLongRange=true; + StandardNEB=PerpSpring=FreeEndIni=FreeEndFinal=false; FreeEndFinalWithRespToEIni=FinalAndInterWithRespToEIni=false; kspringPerp=0.0; -- GitLab From f73fd0625d53e1631cbc8fd9f3990595f00d45ea Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 May 2017 17:14:38 -0400 Subject: [PATCH 183/593] rename nall class member to numall to avoid confusion with the common convention nall = atom->nlocal+atom->nghost --- src/REPLICA/neb.cpp | 12 ++++++------ src/REPLICA/neb.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index 9401b4a3f4..aaa7f35691 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -182,9 +182,9 @@ void NEB::run() if (ineb == modify->nfix) error->all(FLERR,"NEB requires use of fix neb"); fneb = (FixNEB *) modify->fix[ineb]; - if (Verbose) nall =7; - else nall = 4; - memory->create(all,nreplica,nall,"neb:all"); + if (Verbose) numall =7; + else numall = 4; + memory->create(all,nreplica,numall,"neb:all"); rdist = new double[nreplica]; // initialize LAMMPS @@ -582,7 +582,7 @@ void NEB::print_status() MPI_Allgather(&fnorminf,1,MPI_DOUBLE,&fmaxatomInRepl[0],1,MPI_DOUBLE,roots); } - double one[nall]; + double one[numall]; one[0] = fneb->veng; one[1] = fneb->plen; one[2] = fneb->nlen; @@ -598,8 +598,8 @@ void NEB::print_status() if (output->thermo->normflag) one[0] /= atom->natoms; if (me == 0) - MPI_Allgather(one,nall,MPI_DOUBLE,&all[0][0],nall,MPI_DOUBLE,roots); - MPI_Bcast(&all[0][0],nall*nreplica,MPI_DOUBLE,0,world); + MPI_Allgather(one,numall,MPI_DOUBLE,&all[0][0],numall,MPI_DOUBLE,roots); + MPI_Bcast(&all[0][0],numall*nreplica,MPI_DOUBLE,0,world); rdist[0] = 0.0; for (int i = 1; i < nreplica; i++) diff --git a/src/REPLICA/neb.h b/src/REPLICA/neb.h index 12a103284f..2a03496e59 100644 --- a/src/REPLICA/neb.h +++ b/src/REPLICA/neb.h @@ -50,7 +50,7 @@ class NEB : protected Pointers { char *infile; // name of file containing final state class FixNEB *fneb; - int nall; // per-replica dimension of array all + int numall; // per-replica dimension of array all double **all; // PE,plen,nlen,gradvnorm from each replica double *rdist; // normalize reaction distance, 0 to 1 double *freplica; // force on an image -- GitLab From 081910adbc410fd559587df65fc30973b67eb738 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 May 2017 17:15:14 -0400 Subject: [PATCH 184/593] do not try to free null communicators --- src/REPLICA/fix_neb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index 695f7ff224..da08133134 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -174,7 +174,7 @@ FixNEB::~FixNEB() memory->destroy(displacements); if (NEBLongRange) { - MPI_Comm_free(&rootworld); + if (rootworld != MPI_COMM_NULL) MPI_Comm_free(&rootworld); memory->destroy(nlenall); } } -- GitLab From 62601678cddebab94eff8eae4474380b3248f29a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 May 2017 17:16:19 -0400 Subject: [PATCH 185/593] when growing arrays with reallocate, always check against atom->nmax and not atom->nlocal or else these arrays may be of inconsistent size and communication can lead to data corruption --- src/REPLICA/fix_neb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index da08133134..c6c68e6cab 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -220,7 +220,7 @@ void FixNEB::init() if (atom->natoms > MAXSMALLINT) error->all(FLERR,"Too many atoms for NEB"); ntotal = atom->natoms; - if (atom->nlocal > maxlocal) reallocate(); + if (atom->nmax > maxlocal) reallocate(); if (MULTI_PROC && counts == NULL) { memory->create(xsendall,ntotal,3,"neb:xsendall"); @@ -624,7 +624,7 @@ void FixNEB::inter_replica_comm() // reallocate memory if necessary - if (atom->nlocal > maxlocal) reallocate(); + if (atom->nmax > maxlocal) reallocate(); double **x = atom->x; double **f = atom->f; -- GitLab From 617ca4e0c89be716530fa48b99fc4e643d872b2c Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 22 May 2017 17:30:46 -0400 Subject: [PATCH 186/593] Fixes coverity issue CID 179436 --- src/PYTHON/python_impl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index 55108eb8c7..25536e55d5 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -35,6 +35,12 @@ enum{NONE,INT,DOUBLE,STRING,PTR}; PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp) { + ninput = noutput = 0; + istr = NULL; + ostr = NULL; + format = NULL; + length_longstr = 0; + // pfuncs stores interface info for each Python function nfunc = 0; -- GitLab From 8a630ff4ec8aef64668046f28e87a68de84bf843 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 22 May 2017 17:32:07 -0400 Subject: [PATCH 187/593] Fixes coverity issue CID 179440 --- src/PYTHON/fix_python.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PYTHON/fix_python.cpp b/src/PYTHON/fix_python.cpp index 88a1a5088d..ffca66e77c 100644 --- a/src/PYTHON/fix_python.cpp +++ b/src/PYTHON/fix_python.cpp @@ -47,6 +47,8 @@ FixPython::FixPython(LAMMPS *lmp, int narg, char **arg) : selected_callback = POST_FORCE; } else if (strcmp(arg[4],"end_of_step") == 0) { selected_callback = END_OF_STEP; + } else { + error->all(FLERR,"Unsupported callback name for fix/python"); } // get Python function -- GitLab From a7d790a82778093c15cc0264046e1e2035bc6521 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 22 May 2017 17:33:47 -0400 Subject: [PATCH 188/593] Fixes coverity issue CID 179439 --- src/PYTHON/pair_python.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 384aa5a94b..fcec2baaa9 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -41,6 +41,7 @@ PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) { restartinfo = 0; one_coeff = 1; reinitflag = 0; + cut_global = 0.0; py_potential = NULL; skip_types = NULL; -- GitLab From 084626e60b43596ed612f6ea340392a802c1cf3b Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 22 May 2017 17:36:16 -0400 Subject: [PATCH 189/593] Fixes coverity issue CID 179426 --- src/PYTHON/python_impl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index 25536e55d5..daa4952665 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -313,6 +313,9 @@ void PythonImpl::invoke_function(int ifunc, char *result) } } else if (itype == PTR) { pValue = PY_VOID_POINTER(lmp); + } else { + PyGILState_Release(gstate); + error->all(FLERR,"Unsupported variable type"); } PyTuple_SetItem(pArgs,i,pValue); } -- GitLab From bdfb7c69ea3f0a98066af51551ade6dc8aa920f9 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 22 May 2017 17:51:40 -0400 Subject: [PATCH 190/593] Remove unused code detected by coverity CID 177700 --- src/neigh_request.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/neigh_request.cpp b/src/neigh_request.cpp index bb691d00ba..8d720e766c 100644 --- a/src/neigh_request.cpp +++ b/src/neigh_request.cpp @@ -228,7 +228,6 @@ void NeighRequest::copy_request(NeighRequest *other, int skipflag) dnum = other->dnum; - iskip = other->iskip; iskip = NULL; ijskip = NULL; -- GitLab From 9008a3119009c84f9f641aa1881f84ebbbec4c82 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 May 2017 21:55:55 -0400 Subject: [PATCH 191/593] more formatting cleanup This cleans up and simplifies the neb command code some more --- src/REPLICA/neb.cpp | 183 ++++++++++++++++++++++++-------------------- src/REPLICA/neb.h | 4 +- 2 files changed, 104 insertions(+), 83 deletions(-) diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index aaa7f35691..efcea08fb4 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -156,8 +156,8 @@ void NEB::command(int narg, char **arg) if (narg != 6 && narg !=7) error->universe_all(FLERR,"Illegal NEB command"); } else error->universe_all(FLERR,"Illegal NEB command"); - Verbose=false; - if (strcmp(arg[narg-1],"verbose") == 0) Verbose=true; + verbose=false; + if (strcmp(arg[narg-1],"verbose") == 0) verbose=true; // run the NEB calculation run(); @@ -182,7 +182,7 @@ void NEB::run() if (ineb == modify->nfix) error->all(FLERR,"NEB requires use of fix neb"); fneb = (FixNEB *) modify->fix[ineb]; - if (Verbose) numall =7; + if (verbose) numall =7; else numall = 4; memory->create(all,nreplica,numall,"neb:all"); rdist = new double[nreplica]; @@ -200,9 +200,11 @@ void NEB::run() error->all(FLERR,"NEB requires damped dynamics minimizer"); // setup regular NEB minimization + FILE *uscreen = universe->uscreen; + FILE *ulogfile = universe->ulogfile; - if (me_universe == 0 && universe->uscreen) - fprintf(universe->uscreen,"Setting up regular NEB ...\n"); + if (me_universe == 0 && uscreen) + fprintf(uscreen,"Setting up regular NEB ...\n"); update->beginstep = update->firststep = update->ntimestep; update->endstep = update->laststep = update->firststep + n1steps; @@ -214,29 +216,29 @@ void NEB::run() update->minimize->setup(); if (me_universe == 0) { - if (universe->uscreen) { - if (Verbose) { - fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " + if (uscreen) { + if (verbose) { + fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " "... ReplicaForceN MaxAtomForceN\n"); } else { - fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " + fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " "RDN PEN\n"); } } - if (universe->ulogfile) { - if (Verbose) { - fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " + if (ulogfile) { + if (verbose) { + fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " "... ReplicaForceN MaxAtomForceN\n"); } else { - fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " + fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " "RDN PEN\n"); } @@ -279,14 +281,14 @@ void NEB::run() // setup climbing NEB minimization // must reinitialize minimizer so it re-creates its fix MINIMIZE - if (me_universe == 0 && universe->uscreen) - fprintf(universe->uscreen,"Setting up climbing ...\n"); + if (me_universe == 0 && uscreen) + fprintf(uscreen,"Setting up climbing ...\n"); if (me_universe == 0) { - if (universe->uscreen) - fprintf(universe->uscreen,"Climbing replica = %d\n",top+1); - if (universe->ulogfile) - fprintf(universe->ulogfile,"Climbing replica = %d\n",top+1); + if (uscreen) + fprintf(uscreen,"Climbing replica = %d\n",top+1); + if (ulogfile) + fprintf(ulogfile,"Climbing replica = %d\n",top+1); } update->beginstep = update->firststep = update->ntimestep; @@ -301,29 +303,34 @@ void NEB::run() update->minimize->setup(); if (me_universe == 0) { - if (universe->uscreen) - if (Verbose) - fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); - else - fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN\n"); - if (universe->ulogfile) - if (Verbose) - fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n"); - else - - fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce " - "GradV0 GradV1 GradVc " - "EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN\n"); + if (uscreen) + if (verbose) { + fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN " + "pathangle1 angletangrad1 anglegrad1 gradV1 " + "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " + "... ReplicaForceN MaxAtomForceN\n"); + } else { + fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN\n"); + } + if (ulogfile) + if (verbose) { + fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN " + "pathangle1 angletangrad1 anglegrad1 gradV1 " + "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " + "... ReplicaForceN MaxAtomForceN\n"); + } else { + fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN\n"); + } } print_status(); @@ -574,13 +581,12 @@ void NEB::print_status() double fmaxatom; MPI_Allreduce(&fnorminf,&fmaxatom,1,MPI_DOUBLE,MPI_MAX,roots); - if (Verbose) - { - freplica = new double[nreplica]; - MPI_Allgather(&fnorm2,1,MPI_DOUBLE,&freplica[0],1,MPI_DOUBLE,roots); - fmaxatomInRepl = new double[nreplica]; - MPI_Allgather(&fnorminf,1,MPI_DOUBLE,&fmaxatomInRepl[0],1,MPI_DOUBLE,roots); - } + if (verbose) { + freplica = new double[nreplica]; + MPI_Allgather(&fnorm2,1,MPI_DOUBLE,&freplica[0],1,MPI_DOUBLE,roots); + fmaxatomInRepl = new double[nreplica]; + MPI_Allgather(&fnorminf,1,MPI_DOUBLE,&fmaxatomInRepl[0],1,MPI_DOUBLE,roots); + } double one[numall]; one[0] = fneb->veng; @@ -588,13 +594,11 @@ void NEB::print_status() one[2] = fneb->nlen; one[3] = fneb->gradlen; - if (Verbose) - { - one[4] = fneb->dotpath; - one[5] = fneb->dottangrad; - one[6] = fneb->dotgrad; - - } + if (verbose) { + one[4] = fneb->dotpath; + one[5] = fneb->dottangrad; + one[6] = fneb->dotgrad; + } if (output->thermo->normflag) one[0] /= atom->natoms; if (me == 0) @@ -639,39 +643,56 @@ void NEB::print_status() } if (me_universe == 0) { - if (universe->uscreen) { - fprintf(universe->uscreen,BIGINT_FORMAT " %12.8g %12.8g ", + const double todeg=180.0/MY_PI; + FILE *uscreen = universe->uscreen; + FILE *ulogfile = universe->ulogfile; + if (uscreen) { + fprintf(uscreen,BIGINT_FORMAT " %12.8g %12.8g ", update->ntimestep,fmaxreplica,fmaxatom); - fprintf(universe->uscreen,"%12.8g %12.8g %12.8g ", + fprintf(uscreen,"%12.8g %12.8g %12.8g ", gradvnorm0,gradvnorm1,gradvnormc); - fprintf(universe->uscreen,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); + fprintf(uscreen,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); for (int i = 0; i < nreplica; i++) - fprintf(universe->uscreen,"%12.8g %12.8g ",rdist[i],all[i][0]); - if (Verbose) - {fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[0][5])*180/MY_PI,180-acos(all[0][6])*180/MY_PI,all[0][3],freplica[0],fmaxatomInRepl[0]); - for (int i = 1; i < nreplica-1; i++) - fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",180-acos(all[i][4])*180/MY_PI,180-acos(all[i][5])*180/MY_PI,180-acos(all[i][6])*180/MY_PI,all[i][3],freplica[i],fmaxatomInRepl[i]); - fprintf(universe->uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[nreplica-1][5])*180/MY_PI,NAN,all[nreplica-1][3],freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); - } - fprintf(universe->uscreen,"\n"); + fprintf(uscreen,"%12.8g %12.8g ",rdist[i],all[i][0]); + if (verbose) { + fprintf(uscreen,"NaN %12.5g %12.5g %12.5g %12.5g %12.5g", + 180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, + all[0][3],freplica[0],fmaxatomInRepl[0]); + for (int i = 1; i < nreplica-1; i++) + fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + 180-acos(all[i][4])*todeg,180-acos(all[i][5])*todeg, + 180-acos(all[i][6])*todeg,all[i][3],freplica[i], + fmaxatomInRepl[i]); + fprintf(uscreen,"NaN %12.5g NaN %12.5g %12.5g %12.5g", + 180-acos(all[nreplica-1][5])*todeg,all[nreplica-1][3], + freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); + } + fprintf(uscreen,"\n"); } - if (universe->ulogfile) { - fprintf(universe->ulogfile,BIGINT_FORMAT " %12.8g %12.8g ", + if (ulogfile) { + fprintf(ulogfile,BIGINT_FORMAT " %12.8g %12.8g ", update->ntimestep,fmaxreplica,fmaxatom); - fprintf(universe->ulogfile,"%12.8g %12.8g %12.8g ", + fprintf(ulogfile,"%12.8g %12.8g %12.8g ", gradvnorm0,gradvnorm1,gradvnormc); - fprintf(universe->ulogfile,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); + fprintf(ulogfile,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); for (int i = 0; i < nreplica; i++) - fprintf(universe->ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); - if (Verbose) - {fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[0][5])*180/MY_PI,180-acos(all[0][6])*180/MY_PI,all[0][3],freplica[0],fmaxatomInRepl[0]); - for (int i = 1; i < nreplica-1; i++) - fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",180-acos(all[i][4])*180/MY_PI,180-acos(all[i][5])*180/MY_PI,180-acos(all[i][6])*180/MY_PI,all[i][3],freplica[i],fmaxatomInRepl[i]); - fprintf(universe->ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g",NAN,180-acos(all[nreplica-1][5])*180/MY_PI,NAN,all[nreplica-1][3],freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); - } - fprintf(universe->ulogfile,"\n"); - fflush(universe->ulogfile); + fprintf(ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); + if (verbose) { + fprintf(ulogfile,"NaN %12.5g %12.5g %12.5g %12.5g %12.5g", + 180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, + all[0][3],freplica[0],fmaxatomInRepl[0]); + for (int i = 1; i < nreplica-1; i++) + fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + 180-acos(all[i][4])*todeg,180-acos(all[i][5])*todeg, + 180-acos(all[i][6])*todeg,all[i][3],freplica[i], + fmaxatomInRepl[i]); + fprintf(ulogfile,"NaN %12.5g NaN %12.5g %12.5g %12.5g", + 180-acos(all[nreplica-1][5])*todeg,all[nreplica-1][3], + freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); + } + fprintf(ulogfile,"\n"); + fflush(ulogfile); } } } diff --git a/src/REPLICA/neb.h b/src/REPLICA/neb.h index 2a03496e59..8c2bcf9b16 100644 --- a/src/REPLICA/neb.h +++ b/src/REPLICA/neb.h @@ -38,7 +38,7 @@ class NEB : protected Pointers { private: int me,me_universe; // my proc ID in world and universe int ireplica,nreplica; - bool Verbose; + bool verbose; MPI_Comm uworld; MPI_Comm roots; // MPI comm with 1 root proc from each world FILE *fp; @@ -109,7 +109,7 @@ for NEB. E: Too many timesteps -The cummulative timesteps must fit in a 64-bit integer. +The cumulative timesteps must fit in a 64-bit integer. E: Unexpected end of neb file -- GitLab From c801cdd81fe05d1ecf1c727b524ea82e69d67e25 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 May 2017 22:33:14 -0400 Subject: [PATCH 192/593] some more formatting cleanup in fix neb --- src/REPLICA/fix_neb.cpp | 18 +++++++----------- src/REPLICA/fix_neb.h | 1 - 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index c6c68e6cab..726d300d66 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -95,7 +95,6 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : // nprocs_universe = # of procs in all replicase // procprev,procnext = root proc in adjacent replicas - me = comm->me; nprocs = comm->nprocs; @@ -103,12 +102,9 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : nreplica = universe->nworlds; ireplica = universe->iworld; - if (ireplica > 0) - procprev = universe->root_proc[ireplica-1]; + if (ireplica > 0) procprev = universe->root_proc[ireplica-1]; else procprev = -1; - - if (ireplica < nreplica-1) - procnext = universe->root_proc[ireplica+1]; + if (ireplica < nreplica-1) procnext = universe->root_proc[ireplica+1]; else procnext = -1; uworld = universe->uworld; @@ -317,11 +313,10 @@ void FixNEB::min_post_force(int vflag) dotgrad = gradlen = dotpath = dottangrad = 0.0; - if (ireplica ==nreplica-1) { + if (ireplica == nreplica-1) { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - delxp = x[i][0] - xprev[i][0]; delyp = x[i][1] - xprev[i][1]; delzp = x[i][2] - xprev[i][2]; @@ -365,7 +360,9 @@ void FixNEB::min_post_force(int vflag) } } } else { + // not the first or last replica + double vmax = MAX(fabs(vnext-veng),fabs(vprev-veng)); double vmin = MIN(fabs(vnext-veng),fabs(vprev-veng)); @@ -464,6 +461,7 @@ void FixNEB::min_post_force(int vflag) if (ireplica < nreplica-1) dotgrad = dotgrad /(gradlen*gradnextlen); + dot = 0.0; if (FreeEndIni && ireplica == 0) { if (tlen > 0.0) { double dotall; @@ -576,8 +574,7 @@ void FixNEB::min_post_force(int vflag) MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); dot=dotall; - if (ireplica == rclimber) - prefactor = -2.0*dot; + if (ireplica == rclimber) prefactor = -2.0*dot; else { if (NEBLongRange) { prefactor = -dot - kspring*(lenuntilIm-idealPos)/(2*meanDist); @@ -831,7 +828,6 @@ void FixNEB::inter_replica_comm() void FixNEB::reallocate() { - maxlocal = atom->nmax; memory->destroy(xprev); diff --git a/src/REPLICA/fix_neb.h b/src/REPLICA/fix_neb.h index 290494bef4..1582912dac 100644 --- a/src/REPLICA/fix_neb.h +++ b/src/REPLICA/fix_neb.h @@ -70,7 +70,6 @@ class FixNEB : public Fix { void inter_replica_comm(); void reallocate(); - }; } -- GitLab From 4002dce63984aa906214990d06b6f121c80134c0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 May 2017 22:39:52 -0400 Subject: [PATCH 193/593] restore explicit NAN constants in output --- src/REPLICA/neb.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index efcea08fb4..1388a260ea 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -655,16 +655,16 @@ void NEB::print_status() for (int i = 0; i < nreplica; i++) fprintf(uscreen,"%12.8g %12.8g ",rdist[i],all[i][0]); if (verbose) { - fprintf(uscreen,"NaN %12.5g %12.5g %12.5g %12.5g %12.5g", - 180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, + fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + NAN,180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, all[0][3],freplica[0],fmaxatomInRepl[0]); for (int i = 1; i < nreplica-1; i++) fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", 180-acos(all[i][4])*todeg,180-acos(all[i][5])*todeg, 180-acos(all[i][6])*todeg,all[i][3],freplica[i], fmaxatomInRepl[i]); - fprintf(uscreen,"NaN %12.5g NaN %12.5g %12.5g %12.5g", - 180-acos(all[nreplica-1][5])*todeg,all[nreplica-1][3], + fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + NAN,180-acos(all[nreplica-1][5])*todeg,NAN,all[nreplica-1][3], freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); } fprintf(uscreen,"\n"); @@ -679,16 +679,16 @@ void NEB::print_status() for (int i = 0; i < nreplica; i++) fprintf(ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); if (verbose) { - fprintf(ulogfile,"NaN %12.5g %12.5g %12.5g %12.5g %12.5g", - 180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, + fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + NAN,180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, all[0][3],freplica[0],fmaxatomInRepl[0]); for (int i = 1; i < nreplica-1; i++) fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", 180-acos(all[i][4])*todeg,180-acos(all[i][5])*todeg, 180-acos(all[i][6])*todeg,all[i][3],freplica[i], fmaxatomInRepl[i]); - fprintf(ulogfile,"NaN %12.5g NaN %12.5g %12.5g %12.5g", - 180-acos(all[nreplica-1][5])*todeg,all[nreplica-1][3], + fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + NAN,180-acos(all[nreplica-1][5])*todeg,NAN,all[nreplica-1][3], freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); } fprintf(ulogfile,"\n"); -- GitLab From bb890941ca401edb9d5ecbb9a665cbb6b685b1fa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 24 May 2017 00:19:36 -0400 Subject: [PATCH 194/593] first chunk of code from USER-REAXC-OMP imported and adapted into USER-REAXC --- src/USER-REAXC/fix_qeq_reax.cpp | 106 ++++++++++++++++++++++++------ src/USER-REAXC/fix_qeq_reax.h | 39 ++++++----- src/USER-REAXC/fix_reaxc.h | 1 + src/USER-REAXC/pair_reaxc.cpp | 8 ++- src/USER-REAXC/pair_reaxc.h | 21 +++--- src/USER-REAXC/reaxc_allocate.cpp | 62 +++++++++++++++-- src/USER-REAXC/reaxc_control.cpp | 1 + src/USER-REAXC/reaxc_types.h | 43 ++++++++++++ 8 files changed, 227 insertions(+), 54 deletions(-) diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index 96df03c668..22b5382727 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -68,7 +68,7 @@ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) : { if (lmp->citeme) lmp->citeme->add(cite_fix_qeq_reax); - if (narg != 8) error->all(FLERR,"Illegal fix qeq/reax command"); + if (narg < 8 || narg > 9) error->all(FLERR,"Illegal fix qeq/reax command"); nevery = force->inumeric(FLERR,arg[3]); if (nevery <= 0) error->all(FLERR,"Illegal fix qeq/reax command"); @@ -78,6 +78,9 @@ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) : tolerance = force->numeric(FLERR,arg[6]); pertype_parameters(arg[7]); + // dual CG support only available for USER-OMP variant + dual_enabled = 0; + shld = NULL; n = n_cap = 0; @@ -111,16 +114,21 @@ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) : // perform initial allocation of atom-based arrays // register with Atom class - s_hist = t_hist = NULL; - grow_arrays(atom->nmax); - atom->add_callback(0); - for( int i = 0; i < atom->nmax; i++ ) - for (int j = 0; j < nprev; ++j ) - s_hist[i][j] = t_hist[i][j] = 0; - reaxc = NULL; reaxc = (PairReaxC *) force->pair_match("reax/c",1); + if (reaxc) { + s_hist = t_hist = NULL; + grow_arrays(atom->nmax); + atom->add_callback(0); + for( int i = 0; i < atom->nmax; i++ ) + for (int j = 0; j < nprev; ++j ) + s_hist[i][j] = t_hist[i][j] = 0; + } + + // dual CG support + // Update comm sizes for this fix + if (dual_enabled) comm_forward = comm_reverse = 2; } /* ---------------------------------------------------------------------- */ @@ -180,6 +188,10 @@ void FixQEqReax::pertype_parameters(char *arg) return; } + // OMP style will use it's own pertype_parameters() + Pair * pair = force->pair_match("reax/c/omp",1); + if (pair) return; + int i,itype,ntypes; double v1,v2,v3; FILE *pf; @@ -227,10 +239,14 @@ void FixQEqReax::allocate_storage() memory->create(b_prc,nmax,"qeq:b_prc"); memory->create(b_prm,nmax,"qeq:b_prm"); - memory->create(p,nmax,"qeq:p"); - memory->create(q,nmax,"qeq:q"); - memory->create(r,nmax,"qeq:r"); - memory->create(d,nmax,"qeq:d"); + // dual CG support + int size = nmax; + if (dual_enabled) size*= 2; + + memory->create(p,size,"qeq:p"); + memory->create(q,size,"qeq:q"); + memory->create(r,size,"qeq:r"); + memory->create(d,size,"qeq:d"); } /* ---------------------------------------------------------------------- */ @@ -437,6 +453,13 @@ void FixQEqReax::setup_pre_force_respa(int vflag, int ilevel) /* ---------------------------------------------------------------------- */ +void FixQEqReax::min_setup_pre_force(int vflag) +{ + setup_pre_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + void FixQEqReax::init_storage() { int NN; @@ -476,11 +499,14 @@ void FixQEqReax::pre_force(int vflag) reallocate_matrix(); init_matvec(); - matvecs = CG(b_s, s); // CG on s - parallel - matvecs += CG(b_t, t); // CG on t - parallel + + matvecs_s = CG(b_s, s); // CG on s - parallel + matvecs_t = CG(b_t, t); // CG on t - parallel + matvecs = matvecs_s + matvecs_t; + calculate_Q(); - if( comm->me == 0 ) { + if (comm->me == 0) { t_end = MPI_Wtime(); qeq_time = t_end - t_start; } @@ -702,7 +728,6 @@ int FixQEqReax::CG( double *b, double *x ) beta = sig_new / sig_old; vector_sum( d, 1., p, beta, d, nn ); - } if (i >= imax && comm->me == 0) { @@ -816,7 +841,15 @@ int FixQEqReax::pack_forward_comm(int n, int *list, double *buf, for(m = 0; m < n; m++) buf[m] = t[list[m]]; else if( pack_flag == 4 ) for(m = 0; m < n; m++) buf[m] = atom->q[list[m]]; - + else if( pack_flag == 5) { + m = 0; + for(int i = 0; i < n; i++) { + int j = 2 * list[i]; + buf[m++] = d[j ]; + buf[m++] = d[j+1]; + } + return m; + } return n; } @@ -834,6 +867,15 @@ void FixQEqReax::unpack_forward_comm(int n, int first, double *buf) for(m = 0, i = first; m < n; m++, i++) t[i] = buf[m]; else if( pack_flag == 4) for(m = 0, i = first; m < n; m++, i++) atom->q[i] = buf[m]; + else if( pack_flag == 5) { + int last = first + n; + m = 0; + for(i = first; i < last; i++) { + int j = 2 * i; + d[j ] = buf[m++]; + d[j+1] = buf[m++]; + } + } } /* ---------------------------------------------------------------------- */ @@ -841,15 +883,35 @@ void FixQEqReax::unpack_forward_comm(int n, int first, double *buf) int FixQEqReax::pack_reverse_comm(int n, int first, double *buf) { int i, m; - for(m = 0, i = first; m < n; m++, i++) buf[m] = q[i]; - return n; + if (pack_flag == 5) { + m = 0; + int last = first + n; + for(i = first; i < last; i++) { + int indxI = 2 * i; + buf[m++] = q[indxI ]; + buf[m++] = q[indxI+1]; + } + return m; + } else { + for (m = 0, i = first; m < n; m++, i++) buf[m] = q[i]; + return n; + } } /* ---------------------------------------------------------------------- */ void FixQEqReax::unpack_reverse_comm(int n, int *list, double *buf) { - for(int m = 0; m < n; m++) q[list[m]] += buf[m]; + if (pack_flag == 5) { + int m = 0; + for(int i = 0; i < n; i++) { + int indxI = 2 * list[i]; + q[indxI ] += buf[m++]; + q[indxI+1] += buf[m++]; + } + } else { + for (int m = 0; m < n; m++) q[list[m]] += buf[m]; + } } /* ---------------------------------------------------------------------- @@ -866,6 +928,9 @@ double FixQEqReax::memory_usage() bytes += m_cap * sizeof(int); bytes += m_cap * sizeof(double); + if (dual_enabled) + bytes += atom->nmax*4 * sizeof(double); // double size for q, d, r, and p + return bytes; } @@ -1034,5 +1099,4 @@ void FixQEqReax::vector_add( double* dest, double c, double* v, int k ) if (atom->mask[kk] & groupbit) dest[kk] += c * v[kk]; } - } diff --git a/src/USER-REAXC/fix_qeq_reax.h b/src/USER-REAXC/fix_qeq_reax.h index 7c3e8a8f96..d82232576a 100644 --- a/src/USER-REAXC/fix_qeq_reax.h +++ b/src/USER-REAXC/fix_qeq_reax.h @@ -39,15 +39,16 @@ class FixQEqReax : public Fix { FixQEqReax(class LAMMPS *, int, char **); ~FixQEqReax(); int setmask(); - void init(); + virtual void init(); void init_list(int,class NeighList *); - void init_storage(); + virtual void init_storage(); void setup_pre_force(int); - void pre_force(int); + virtual void pre_force(int); void setup_pre_force_respa(int, int); void pre_force_respa(int, int, int); + void min_setup_pre_force(int); void min_pre_force(int); int matvecs; @@ -99,25 +100,25 @@ class FixQEqReax : public Fix { //double **h; //double *hc, *hs; - void pertype_parameters(char*); + virtual void pertype_parameters(char*); void init_shielding(); void init_taper(); - void allocate_storage(); - void deallocate_storage(); + virtual void allocate_storage(); + virtual void deallocate_storage(); void reallocate_storage(); - void allocate_matrix(); + virtual void allocate_matrix(); void deallocate_matrix(); void reallocate_matrix(); - void init_matvec(); + virtual void init_matvec(); void init_H(); - void compute_H(); + virtual void compute_H(); double calculate_H(double,double); - void calculate_Q(); + virtual void calculate_Q(); - int CG(double*,double*); + virtual int CG(double*,double*); //int GMRES(double*,double*); - void sparse_matvec(sparse_matrix*,double*,double*); + virtual void sparse_matvec(sparse_matrix*,double*,double*); int pack_forward_comm(int, int *, double *, int, int *); void unpack_forward_comm(int, int, double *); @@ -129,12 +130,16 @@ class FixQEqReax : public Fix { int pack_exchange(int, double *); int unpack_exchange(int, double *); - double parallel_norm( double*, int ); - double parallel_dot( double*, double*, int ); - double parallel_vector_acc( double*, int ); + virtual double parallel_norm( double*, int ); + virtual double parallel_dot( double*, double*, int ); + virtual double parallel_vector_acc( double*, int ); - void vector_sum(double*,double,double*,double,double*,int); - void vector_add(double*, double, double*,int); + virtual void vector_sum(double*,double,double*,double,double*,int); + virtual void vector_add(double*, double, double*,int); + + // dual CG support + int dual_enabled; // 0: Original, separate s & t optimization; 1: dual optimization + int matvecs_s, matvecs_t; // Iteration count for each system }; } diff --git a/src/USER-REAXC/fix_reaxc.h b/src/USER-REAXC/fix_reaxc.h index e51a94e4a9..0e173f5ece 100644 --- a/src/USER-REAXC/fix_reaxc.h +++ b/src/USER-REAXC/fix_reaxc.h @@ -36,6 +36,7 @@ namespace LAMMPS_NS { class FixReaxC : public Fix { friend class PairReaxC; + friend class PairReaxCOMP; public: FixReaxC(class LAMMPS *,int, char **); diff --git a/src/USER-REAXC/pair_reaxc.cpp b/src/USER-REAXC/pair_reaxc.cpp index d51b0fc2f8..b520fc14c7 100644 --- a/src/USER-REAXC/pair_reaxc.cpp +++ b/src/USER-REAXC/pair_reaxc.cpp @@ -211,6 +211,9 @@ void PairReaxC::settings(int narg, char **arg) control->thb_cutsq = 0.00001; control->bg_cut = 0.3; + // Initialize for when omp style included + control->nthreads = 1; + out_control->write_steps = 0; out_control->traj_method = 0; strcpy( out_control->traj_title, "default_title" ); @@ -256,7 +259,7 @@ void PairReaxC::settings(int narg, char **arg) system->safezone = force->numeric(FLERR,arg[iarg+1]); if (system->safezone < 0.0) error->all(FLERR,"Illegal pair_style reax/c safezone command"); - system->saferzone = system->safezone*1.2; + system->saferzone = system->safezone*1.2 + 0.2; iarg += 2; } else if (strcmp(arg[iarg],"mincap") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal pair_style reax/c command"); @@ -457,6 +460,9 @@ void PairReaxC::setup( ) ReAllocate( system, control, data, workspace, &lists, mpi_data ); } + + bigint local_ngroup = list->inum; + MPI_Allreduce( &local_ngroup, &ngroup, 1, MPI_LMP_BIGINT, MPI_SUM, world ); } /* ---------------------------------------------------------------------- */ diff --git a/src/USER-REAXC/pair_reaxc.h b/src/USER-REAXC/pair_reaxc.h index e3c9e63bdc..5658648db6 100644 --- a/src/USER-REAXC/pair_reaxc.h +++ b/src/USER-REAXC/pair_reaxc.h @@ -37,12 +37,18 @@ namespace LAMMPS_NS { class PairReaxC : public Pair { public: + PairReaxC(class LAMMPS *); + ~PairReaxC(); + void compute(int, int); + void settings(int, char **); + void coeff(int, char **); + void init_style(); + double init_one(int, int); + void *extract(const char *, int &); int fixbond_flag, fixspecies_flag; int **tmpid; double **tmpbo,**tmpr; - double *chi,*eta,*gamma; - int *map; control_params *control; reax_system *system; output_controls *out_control; @@ -51,21 +57,16 @@ class PairReaxC : public Pair { reax_list *lists; mpi_datatypes *mpi_data; - PairReaxC(class LAMMPS *); - ~PairReaxC(); - void compute(int, int); - void settings(int, char **); - void coeff(int, char **); - void init_style(); - double init_one(int, int); - void *extract(const char *, int &); + bigint ngroup; protected: double cutmax; int nelements; // # of unique elements char **elements; // names of unique elements + int *map; class FixReaxC *fix_reax; + double *chi,*eta,*gamma; int qeqflag; int setup_flag; int firstwarn; diff --git a/src/USER-REAXC/reaxc_allocate.cpp b/src/USER-REAXC/reaxc_allocate.cpp index 969912e082..ac835e7ce3 100644 --- a/src/USER-REAXC/reaxc_allocate.cpp +++ b/src/USER-REAXC/reaxc_allocate.cpp @@ -31,6 +31,10 @@ #include "reaxc_tool_box.h" #include "reaxc_vector.h" +#if defined(_OPENMP) +#include +#endif + /* allocate space for my_atoms important: we cannot know the exact number of atoms that will fall into a process's box throughout the whole simulation. therefore @@ -49,6 +53,15 @@ int PreAllocate_Space( reax_system *system, control_params *control, system->my_atoms = (reax_atom*) scalloc( system->total_cap, sizeof(reax_atom), "my_atoms", comm ); + // Nullify some arrays only used in omp styles + // Should be safe to do here since called in pair->setup(); +#ifdef LMP_USER_OMP + workspace->CdDeltaReduction = NULL; + workspace->forceReduction = NULL; + workspace->valence_angle_atom_myoffset = NULL; + workspace->my_ext_pressReduction = NULL; +#endif + return SUCCESS; } @@ -174,13 +187,21 @@ void DeAllocate_Workspace( control_params *control, storage *workspace ) sfree( workspace->q2, "q2" ); sfree( workspace->p2, "p2" ); - /* integrator */ + /* integrator storage */ sfree( workspace->v_const, "v_const" ); /* force related storage */ sfree( workspace->f, "f" ); sfree( workspace->CdDelta, "CdDelta" ); + /* reductions */ +#ifdef LMP_USER_OMP + if(workspace->CdDeltaReduction) sfree( workspace->CdDeltaReduction, "cddelta_reduce" ); + if(workspace->forceReduction) sfree( workspace->forceReduction, "f_reduce" ); + if(workspace->valence_angle_atom_myoffset) sfree( workspace->valence_angle_atom_myoffset, "valence_angle_atom_myoffset"); + + if (control->virial && workspace->my_ext_pressReduction) sfree( workspace->my_ext_pressReduction, "ext_press_reduce"); +#endif } @@ -272,10 +293,24 @@ int Allocate_Workspace( reax_system *system, control_params *control, /* integrator storage */ workspace->v_const = (rvec*) smalloc( local_rvec, "v_const", comm ); - // /* force related storage */ + /* force related storage */ workspace->f = (rvec*) scalloc( total_cap, sizeof(rvec), "f", comm ); workspace->CdDelta = (double*) scalloc( total_cap, sizeof(double), "CdDelta", comm ); + + // storage for reductions with multiple threads +#ifdef LMP_USER_OMP + workspace->CdDeltaReduction = (double *) scalloc(sizeof(double), total_cap*control->nthreads, + "cddelta_reduce", comm); + + workspace->forceReduction = (rvec *) scalloc(sizeof(rvec), total_cap*control->nthreads, + "forceReduction", comm); + + workspace->valence_angle_atom_myoffset = (int *) scalloc(sizeof(int), total_cap, "valence_angle_atom_myoffset", comm); + + if (control->virial) + workspace->my_ext_pressReduction = (rvec *) calloc(sizeof(rvec), control->nthreads); +#endif return SUCCESS; } @@ -333,13 +368,30 @@ static int Reallocate_Bonds_List( reax_system *system, reax_list *bonds, *total_bonds += system->my_atoms[i].num_bonds; } *total_bonds = (int)(MAX( *total_bonds * safezone, mincap*MIN_BONDS )); - + +#ifdef LMP_USER_OMP + for (i = 0; i < bonds->num_intrs; ++i) + sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); +#endif + Delete_List( bonds, comm ); if(!Make_List(system->total_cap, *total_bonds, TYP_BOND, bonds, comm)) { fprintf( stderr, "not enough space for bonds list. terminating!\n" ); MPI_Abort( comm, INSUFFICIENT_MEMORY ); } - + +#ifdef LMP_USER_OMP +#if defined(_OPENMP) + int nthreads = omp_get_num_threads(); +#else + int nthreads = 1; +#endif + + for (i = 0; i < bonds->num_intrs; ++i) + bonds->select.bond_list[i].bo_data.CdboReduction = + (double*) smalloc(sizeof(double)*nthreads, "CdboReduction", comm); +#endif + return SUCCESS; } @@ -438,7 +490,7 @@ void ReAllocate( reax_system *system, control_params *control, Reallocate_Bonds_List( system, (*lists)+BONDS, &num_bonds, &est_3body, comm ); realloc->bonds = 0; - realloc->num_3body = MAX( realloc->num_3body, est_3body ); + realloc->num_3body = MAX( realloc->num_3body, est_3body ) * 2; } /* 3-body list */ diff --git a/src/USER-REAXC/reaxc_control.cpp b/src/USER-REAXC/reaxc_control.cpp index 4def41bc8c..11a89020b8 100644 --- a/src/USER-REAXC/reaxc_control.cpp +++ b/src/USER-REAXC/reaxc_control.cpp @@ -48,6 +48,7 @@ char Read_Control_File( char *control_file, control_params* control, control->nsteps = 0; control->dt = 0.25; control->nprocs = 1; + control->nthreads = 1; control->procs_by_dim[0] = 1; control->procs_by_dim[1] = 1; control->procs_by_dim[2] = 1; diff --git a/src/USER-REAXC/reaxc_types.h b/src/USER-REAXC/reaxc_types.h index b3e2f40f02..1b9ce63dc2 100644 --- a/src/USER-REAXC/reaxc_types.h +++ b/src/USER-REAXC/reaxc_types.h @@ -38,6 +38,40 @@ #include "sys/time.h" #include +#if defined LMP_USER_OMP +#define OMP_TIMING 1 + +#ifdef OMP_TIMING +// pkcoff timing fields +enum { + COMPUTEINDEX=0, + COMPUTEWLINDEX, + COMPUTEBFINDEX, + COMPUTEQEQINDEX, + COMPUTENBFINDEX, + COMPUTEIFINDEX, + COMPUTETFINDEX, + COMPUTEBOINDEX, + COMPUTEBONDSINDEX, + COMPUTEATOMENERGYINDEX, + COMPUTEVALENCEANGLESBOINDEX, + COMPUTETORSIONANGLESBOINDEX, + COMPUTEHBONDSINDEX, + COMPUTECG1INDEX, + COMPUTECG2INDEX, + COMPUTECGCOMPUTEINDEX, + COMPUTECALCQINDEX, + COMPUTEINITMVINDEX, + COMPUTEMVCOMPINDEX, + LASTTIMINGINDEX +}; + +extern double ompTimingData[LASTTIMINGINDEX]; +extern int ompTimingCount[LASTTIMINGINDEX]; +extern int ompTimingCGCount[LASTTIMINGINDEX]; +#endif +#endif + /************* SOME DEFS - crucial for reax_types.h *********/ #define LAMMPS_REAX @@ -391,6 +425,7 @@ typedef struct { char sim_name[REAX_MAX_STR]; int nprocs; + int nthreads; ivec procs_by_dim; /* ensemble values: 0 : NVE @@ -616,6 +651,7 @@ typedef struct{ double C1dbopi, C2dbopi, C3dbopi, C4dbopi; double C1dbopi2, C2dbopi2, C3dbopi2, C4dbopi2; rvec dBOp, dln_BOp_s, dln_BOp_pi, dln_BOp_pi2; + double *CdboReduction; } bond_order_data; typedef struct { @@ -702,6 +738,13 @@ typedef struct double *CdDelta; // coefficient of dDelta rvec *f; + /* omp */ + rvec *forceReduction; + rvec *my_ext_pressReduction; + double *CdDeltaReduction; + int *valence_angle_atom_myoffset; + + reallocate_data realloc; } storage; -- GitLab From 4f9e7cbd161ffea53510f78c6666b8d2548afaad Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Wed, 24 May 2017 13:36:14 -0400 Subject: [PATCH 195/593] Cleaned up docs for pair_mores, a missing :pre ruined formatting. --- doc/src/pair_morse.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/pair_morse.txt b/doc/src/pair_morse.txt index c5e3a3c399..5fbb6d5c0a 100644 --- a/doc/src/pair_morse.txt +++ b/doc/src/pair_morse.txt @@ -26,7 +26,7 @@ args = list of arguments for a particular style :ul {morse/smooth/linear} args = cutoff cutoff = global cutoff for Morse interactions (distance units) {morse/soft} args = n lf cutoff - n = soft-core parameter + n = soft-core parameter lf = transformation range is lf < lambda < 1 cutoff = global cutoff for Morse interactions (distance units) :pre @@ -36,7 +36,7 @@ args = list of arguments for a particular style :ul pair_style morse 2.5 pair_style morse/smooth/linear 2.5 pair_coeff * * 100.0 2.0 1.5 -pair_coeff 1 1 100.0 2.0 1.5 3.0 +pair_coeff 1 1 100.0 2.0 1.5 3.0 :pre pair_style morse/soft 4 0.9 10.0 pair_coeff * * 100.0 2.0 1.5 1.0 -- GitLab From 5345ad2da7bd5dc9419f2b547acf6206d6cd73ca Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 24 May 2017 16:24:43 -0400 Subject: [PATCH 196/593] merge in the remainder of the USER-REAXC-OMP code. still a lot of work to do. compiles only with -fopenmp active --- src/Depend.sh | 1 + src/USER-OMP/fix_qeq_reax_omp.cpp | 1300 +++++++++++++++++++++ src/USER-OMP/fix_qeq_reax_omp.h | 84 ++ src/USER-OMP/fix_reaxc_species_omp.cpp | 83 ++ src/USER-OMP/fix_reaxc_species_omp.h | 44 + src/USER-OMP/pair_reaxc_omp.cpp | 584 +++++++++ src/USER-OMP/pair_reaxc_omp.h | 113 ++ src/USER-OMP/reaxc_bond_orders_omp.cpp | 711 +++++++++++ src/USER-OMP/reaxc_bond_orders_omp.h | 43 + src/USER-OMP/reaxc_bonds_omp.cpp | 174 +++ src/USER-OMP/reaxc_bonds_omp.h | 35 + src/USER-OMP/reaxc_forces_omp.cpp | 637 ++++++++++ src/USER-OMP/reaxc_forces_omp.h | 36 + src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp | 242 ++++ src/USER-OMP/reaxc_hydrogen_bonds_omp.h | 35 + src/USER-OMP/reaxc_init_md_omp.cpp | 188 +++ src/USER-OMP/reaxc_init_md_omp.h | 34 + src/USER-OMP/reaxc_multi_body_omp.cpp | 285 +++++ src/USER-OMP/reaxc_multi_body_omp.h | 35 + src/USER-OMP/reaxc_nonbonded_omp.cpp | 383 ++++++ src/USER-OMP/reaxc_nonbonded_omp.h | 38 + src/USER-OMP/reaxc_torsion_angles_omp.cpp | 467 ++++++++ src/USER-OMP/reaxc_torsion_angles_omp.h | 36 + src/USER-OMP/reaxc_valence_angles_omp.cpp | 613 ++++++++++ src/USER-OMP/reaxc_valence_angles_omp.h | 37 + src/USER-REAXC/fix_qeq_reax.cpp | 15 +- src/USER-REAXC/fix_qeq_reax.h | 2 + src/USER-REAXC/pair_reaxc.h | 2 +- 28 files changed, 6254 insertions(+), 3 deletions(-) create mode 100644 src/USER-OMP/fix_qeq_reax_omp.cpp create mode 100644 src/USER-OMP/fix_qeq_reax_omp.h create mode 100644 src/USER-OMP/fix_reaxc_species_omp.cpp create mode 100644 src/USER-OMP/fix_reaxc_species_omp.h create mode 100644 src/USER-OMP/pair_reaxc_omp.cpp create mode 100644 src/USER-OMP/pair_reaxc_omp.h create mode 100644 src/USER-OMP/reaxc_bond_orders_omp.cpp create mode 100644 src/USER-OMP/reaxc_bond_orders_omp.h create mode 100644 src/USER-OMP/reaxc_bonds_omp.cpp create mode 100644 src/USER-OMP/reaxc_bonds_omp.h create mode 100644 src/USER-OMP/reaxc_forces_omp.cpp create mode 100644 src/USER-OMP/reaxc_forces_omp.h create mode 100644 src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp create mode 100644 src/USER-OMP/reaxc_hydrogen_bonds_omp.h create mode 100644 src/USER-OMP/reaxc_init_md_omp.cpp create mode 100644 src/USER-OMP/reaxc_init_md_omp.h create mode 100644 src/USER-OMP/reaxc_multi_body_omp.cpp create mode 100644 src/USER-OMP/reaxc_multi_body_omp.h create mode 100644 src/USER-OMP/reaxc_nonbonded_omp.cpp create mode 100644 src/USER-OMP/reaxc_nonbonded_omp.h create mode 100644 src/USER-OMP/reaxc_torsion_angles_omp.cpp create mode 100644 src/USER-OMP/reaxc_torsion_angles_omp.h create mode 100644 src/USER-OMP/reaxc_valence_angles_omp.cpp create mode 100644 src/USER-OMP/reaxc_valence_angles_omp.h diff --git a/src/Depend.sh b/src/Depend.sh index 520d9ae2bf..0962dace51 100644 --- a/src/Depend.sh +++ b/src/Depend.sh @@ -126,4 +126,5 @@ fi if (test $1 = "USER-REAXC") then depend KOKKOS + depend USER-OMP fi diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp new file mode 100644 index 0000000000..c8e5e3cb93 --- /dev/null +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -0,0 +1,1300 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Hasan Metin Aktulga, Purdue University + (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov) + + Hybrid and sub-group capabilities: Ray Shan (Sandia) +------------------------------------------------------------------------- */ + +#include "math.h" +#include "stdio.h" +#include "stdlib.h" +#include "string.h" +#include "fix_qeq_reax_omp.h" +#include "pair_reaxc_omp.h" +#include "atom.h" +#include "comm.h" +#include "domain.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "update.h" +#include "force.h" +#include "group.h" +#include "pair.h" +#include "respa.h" +#include "memory.h" +#include "citeme.h" +#include "error.h" +#include "reaxc_defs.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +#define EV_TO_KCAL_PER_MOL 14.4 +//#define DANGER_ZONE 0.95 +//#define LOOSE_ZONE 0.7 +#define SQR(x) ((x)*(x)) +#define CUBE(x) ((x)*(x)*(x)) +#define MIN_NBRS 100 + +/* ---------------------------------------------------------------------- */ + +FixQEqReaxOMP::FixQEqReaxOMP(LAMMPS *lmp, int narg, char **arg) : + FixQEqReax(lmp, narg, arg) +{ + if (narg < 8 || narg > 9) error->all(FLERR,"Illegal fix qeq/reax/omp command"); + + nevery = force->inumeric(FLERR,arg[3]); + swa = force->numeric(FLERR,arg[4]); + swb = force->numeric(FLERR,arg[5]); + tolerance = force->numeric(FLERR,arg[6]); + + // dual CG support + dual_enabled = 0; + if(narg == 9) + if(strcmp(arg[8],"dual") == 0) dual_enabled = 1; + else error->all(FLERR,"Unknown fix qeq/reax argument in location 9"); + + // perform initial allocation of atom-based arrays + // register with Atom class + + s_hist = t_hist = NULL; + grow_arrays(atom->nmax); + atom->add_callback(0); + for( int i = 0; i < atom->nmax; i++ ) + for (int j = 0; j < nprev; ++j ) + s_hist[i][j] = t_hist[i][j] = 0; + + reaxc = NULL; + reaxc = (PairReaxCOMP *) force->pair_match("reax/c/omp",1); + + b_temp = NULL; + + // ASPC: Kolafa, J. Comp. Chem., 25(3), 335 (2003) + do_aspc = 0; + aspc_order = 1; + aspc_order_max = nprev - 2; // Must be consistent with nprev to store history: nprev = aspc_order + 2 + aspc_omega = 0.0; + aspc_b = NULL; +} + +FixQEqReaxOMP::~FixQEqReaxOMP() +{ + memory->destroy(b_temp); +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::post_constructor() +{ + pertype_parameters(pertype_option); +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::pertype_parameters(char *arg) +{ + if (strcmp(arg,"reax/c") == 0) { + reaxflag = 1; + Pair *pair = force->pair_match("reax/c",0); + if (pair == NULL) error->all(FLERR,"No pair reax/c for fix qeq/reax/omp"); + int tmp; + chi = (double *) pair->extract("chi",tmp); + eta = (double *) pair->extract("eta",tmp); + gamma = (double *) pair->extract("gamma",tmp); + if (chi == NULL || eta == NULL || gamma == NULL) + error->all(FLERR, + "Fix qeq/reax/omp could not extract params from pair reax/c"); + return; + } + + int i,itype,ntypes; + double v1,v2,v3; + FILE *pf; + + reaxflag = 0; + ntypes = atom->ntypes; + + memory->create(chi,ntypes+1,"qeq/reax:chi"); + memory->create(eta,ntypes+1,"qeq/reax:eta"); + memory->create(gamma,ntypes+1,"qeq/reax:gamma"); + + if (comm->me == 0) { + if ((pf = fopen(arg,"r")) == NULL) + error->one(FLERR,"Fix qeq/reax/omp parameter file could not be found"); + + for (i = 1; i <= ntypes && !feof(pf); i++) { + fscanf(pf,"%d %lg %lg %lg",&itype,&v1,&v2,&v3); + if (itype < 1 || itype > ntypes) + error->one(FLERR,"Fix qeq/reax/omp invalid atom type in param file"); + chi[itype] = v1; + eta[itype] = v2; + gamma[itype] = v3; + } + if (i <= ntypes) error->one(FLERR,"Invalid param file for fix qeq/reax/omp"); + fclose(pf); + } + + MPI_Bcast(&chi[1],ntypes,MPI_DOUBLE,0,world); + MPI_Bcast(&eta[1],ntypes,MPI_DOUBLE,0,world); + MPI_Bcast(&gamma[1],ntypes,MPI_DOUBLE,0,world); +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::allocate_storage() +{ + FixQEqReax::allocate_storage(); + + // dual CG support + int size = nmax; + if(dual_enabled) size*= 2; + memory->create(b_temp, comm->nthreads, size, "qeq/reax/omp:b_temp"); +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::deallocate_storage() +{ + memory->destroy(b_temp); + + FixQEqReax::deallocate_storage(); +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::allocate_matrix() +{ + int i,ii,inum,m; + int *ilist, *numneigh; + + int mincap; + double safezone; + + if( reaxflag ) { + mincap = reaxc->system->mincap; + safezone = reaxc->system->safezone; + } else { + mincap = MIN_CAP; + safezone = SAFE_ZONE; + } + + n = atom->nlocal; + n_cap = MAX( (int)(n * safezone), mincap ); + + // determine the total space for the H matrix + + if (reaxc) { + inum = reaxc->list->inum; + ilist = reaxc->list->ilist; + numneigh = reaxc->list->numneigh; + } else { + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + } + + m = 0; + for( ii = 0; ii < inum; ii++ ) { + i = ilist[ii]; + m += numneigh[i]; + } + m_cap = MAX( (int)(m * safezone), mincap * MIN_NBRS ); + + H.n = n_cap; + H.m = m_cap; + memory->create(H.firstnbr,n_cap,"qeq:H.firstnbr"); + memory->create(H.numnbrs,n_cap,"qeq:H.numnbrs"); + memory->create(H.jlist,m_cap,"qeq:H.jlist"); + memory->create(H.val,m_cap,"qeq:H.val"); +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::init() +{ + if (!atom->q_flag) error->all(FLERR,"Fix qeq/reax/omp requires atom attribute q"); + + ngroup = group->count(igroup); + if (ngroup == 0) error->all(FLERR,"Fix qeq/reax group has no atoms"); + + if (!force->pair_match("reax/c/omp",1)) + error->all(FLERR,"Must use pair_style reax/c/omp with fix qeq/reax/omp"); + + // need a half neighbor list w/ Newton off and ghost neighbors + // built whenever re-neighboring occurs + + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->pair = 0; + neighbor->requests[irequest]->fix = 1; + neighbor->requests[irequest]->newton = 2; + neighbor->requests[irequest]->ghost = 1; + + init_shielding(); + init_taper(); + + if (strstr(update->integrate_style,"respa")) + nlevels_respa = ((Respa *) update->integrate)->nlevels; + + // APSC setup + if(do_aspc) { + memory->create(aspc_b, aspc_order_max+2, "qeq/reax/aspc_b"); + + // Calculate damping factor + double o = double(aspc_order); + aspc_omega = (o+2.0) / (2*o+3.0); + + // Calculate B coefficients + double c = (4.0 * o + 6.0) / (o + 3.0); + aspc_b[0] = c; + + double n = 1.0; + double d = 4.0; + double s = -1.0; + double f = 2.0; + + for(int i=1; iall(FLERR,"Early Termination"); + } +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::compute_H() +{ + int inum, *ilist, *numneigh, **firstneigh; + double SMALL = 0.0001; + + int *type = atom->type; + tagint * tag = atom->tag; + double **x = atom->x; + int *mask = atom->mask; + + if(reaxc) { + inum = reaxc->list->inum; + ilist = reaxc->list->ilist; + numneigh = reaxc->list->numneigh; + firstneigh = reaxc->list->firstneigh; + } else { + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; + } + int ai, num_nbrs; + + // sumscan of the number of neighbors per atom to determine the offsets + // most likely, we are overallocating. desirable to work on this part + // to reduce the memory footprint of the far_nbrs list. + + num_nbrs = 0; + + for (int itr_i = 0; itr_i < inum; ++itr_i) { + ai = ilist[itr_i]; + H.firstnbr[ai] = num_nbrs; + num_nbrs += numneigh[ai]; + } + + // fill in the H matrix + +#pragma omp parallel default(shared) + { + int i, j, ii, jj, mfill, jnum, flag; + int *jlist; + double dx, dy, dz, r_sqr; + + mfill = 0; + + //#pragma omp for schedule(dynamic,50) +#pragma omp for schedule(guided) + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + if(mask[i] & groupbit) { + jlist = firstneigh[i]; + jnum = numneigh[i]; + mfill = H.firstnbr[i]; + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + + dx = x[j][0] - x[i][0]; + dy = x[j][1] - x[i][1]; + dz = x[j][2] - x[i][2]; + r_sqr = SQR(dx) + SQR(dy) + SQR(dz); + + flag = 0; + if (r_sqr <= SQR(swb)) { + if (j < n) flag = 1; + else if (tag[i] < tag[j]) flag = 1; + else if (tag[i] == tag[j]) { + if (dz > SMALL) flag = 1; + else if (fabs(dz) < SMALL) { + if (dy > SMALL) flag = 1; + else if (fabs(dy) < SMALL && dx > SMALL) flag = 1; + } + } + } + + if( flag ) { + H.jlist[mfill] = j; + H.val[mfill] = calculate_H( sqrt(r_sqr), shld[type[i]][type[j]] ); + mfill++; + } + } + + H.numnbrs[i] = mfill - H.firstnbr[i]; + } + } + + if (mfill >= H.m) { + char str[128]; + sprintf(str,"H matrix size has been exceeded: mfill=%d H.m=%d\n", + mfill, H.m ); + error->warning(FLERR,str); + error->all(FLERR,"Fix qeq/reax/omp has insufficient QEq matrix size"); + } + } // omp + +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::init_storage() +{ + int NN; + + if(reaxc) NN = reaxc->list->inum + reaxc->list->gnum; + else NN = list->inum + list->gnum; + +#pragma omp parallel for schedule(static) + for (int i = 0; i < NN; i++) { + Hdia_inv[i] = 1. / eta[atom->type[i]]; + b_s[i] = -chi[atom->type[i]]; + b_t[i] = -1.0; + b_prc[i] = 0; + b_prm[i] = 0; + s[i] = t[i] = 0; + } +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::pre_force(int vflag) +{ + +#ifdef OMP_TIMING + double endTimeBase, startTimeBase, funcstartTimeBase; + funcstartTimeBase = MPI_Wtime(); +#endif + + double t_start, t_end; + + if (update->ntimestep % nevery) return; + if( comm->me == 0 ) t_start = MPI_Wtime(); + + n = atom->nlocal; + N = atom->nlocal + atom->nghost; + + // grow arrays if necessary + // need to be atom->nmax in length + + if( atom->nmax > nmax ) reallocate_storage(); + if( n > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE ) + reallocate_matrix(); + +#ifdef OMP_TIMING + startTimeBase = MPI_Wtime(); +#endif + + init_matvec(); + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEINITMVINDEX] += (endTimeBase-startTimeBase); + startTimeBase = endTimeBase; +#endif + + if(dual_enabled) matvecs = dual_CG(b_s, b_t, s, t); // OMP_TIMING inside dual_CG + else { + + matvecs_s = CG(b_s, s); // CG on s - parallel + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTECG1INDEX] += (endTimeBase-startTimeBase); + ompTimingCount[COMPUTECG1INDEX]++; + ompTimingCGCount[COMPUTECG1INDEX]+= matvecs_s; + startTimeBase = endTimeBase; +#endif + + matvecs_t = CG(b_t, t); // CG on t - parallel + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTECG2INDEX] += (endTimeBase-startTimeBase); + ompTimingCount[COMPUTECG2INDEX]++; + ompTimingCGCount[COMPUTECG2INDEX]+= matvecs_t; + startTimeBase = endTimeBase; +#endif + + } // if(dual_enabled) + + // if(comm->me == 0) fprintf(stdout,"matvecs= %i %i\n",matvecs_s,matvecs_t); + +#ifdef OMP_TIMING + startTimeBase = MPI_Wtime(); +#endif + + calculate_Q(); + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTECALCQINDEX] += (endTimeBase-startTimeBase); +#endif + + if( comm->me == 0 ) { + t_end = MPI_Wtime(); + qeq_time = t_end - t_start; + } + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEQEQINDEX] += (endTimeBase-funcstartTimeBase); +#endif +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::init_matvec() +{ +#ifdef OMP_TIMING + long endTimeBase, startTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + /* fill-in H matrix */ + compute_H(); + + int nn,i; + int *ilist; + + if(reaxc) { + nn = reaxc->list->inum; + ilist = reaxc->list->ilist; + } else { + nn = list->inum; + ilist = list->ilist; + } + + // Should really be more careful with initialization and first (aspc_order+2) MD steps + if(do_aspc) { + + double m_aspc_omega = 1.0 - aspc_omega; +#pragma omp parallel for schedule(dynamic,50) private(i) + for(int ii = 0; ii < nn; ++ii ) { + i = ilist[ii]; + if(atom->mask[i] & groupbit) { + + /* init pre-conditioner for H and init solution vectors */ + Hdia_inv[i] = 1. / eta[ atom->type[i] ]; + b_s[i] = -chi[ atom->type[i] ]; + b_t[i] = -1.0; + + // Predictor Step + double tp = 0.0; + double sp = 0.0; + for(int j=0; jmask[i] & groupbit) { + + /* init pre-conditioner for H and init solution vectors */ + Hdia_inv[i] = 1. / eta[ atom->type[i] ]; + b_s[i] = -chi[ atom->type[i] ]; + b_t[i] = -1.0; + + /* linear extrapolation for s & t from previous solutions */ + //s[i] = 2 * s_hist[i][0] - s_hist[i][1]; + //t[i] = 2 * t_hist[i][0] - t_hist[i][1]; + + /* quadratic extrapolation for s & t from previous solutions */ + //s[i] = s_hist[i][2] + 3 * ( s_hist[i][0] - s_hist[i][1] ); + t[i] = t_hist[i][2] + 3 * ( t_hist[i][0] - t_hist[i][1] ); + + /* cubic extrapolation for s & t from previous solutions */ + s[i] = 4*(s_hist[i][0]+s_hist[i][2])-(6*s_hist[i][1]+s_hist[i][3]); + //t[i] = 4*(t_hist[i][0]+t_hist[i][2])-(6*t_hist[i][1]+t_hist[i][3]); + } + } + } + + pack_flag = 2; + comm->forward_comm_fix(this); //Dist_vector( s ); + pack_flag = 3; + comm->forward_comm_fix(this); //Dist_vector( t ); + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEMVCOMPINDEX] += (long) (endTimeBase-startTimeBase); +#endif +} + +/* ---------------------------------------------------------------------- */ + +int FixQEqReaxOMP::CG( double *b, double *x ) +{ + int i, ii, j, imax; + double tmp, alpha, beta, b_norm; + double sig_old, sig_new; + + double my_buf[2], buf[2]; + + int nn, jj; + int *ilist; + if (reaxc) { + nn = reaxc->list->inum; + ilist = reaxc->list->ilist; + } else { + nn = list->inum; + ilist = list->ilist; + } + + imax = 200; + + pack_flag = 1; + sparse_matvec( &H, x, q ); + comm->reverse_comm_fix( this ); //Coll_Vector( q ); + + double tmp1, tmp2; + tmp1 = tmp2 = 0.0; + +#pragma omp parallel for schedule(dynamic,50) private(i) reduction(+:tmp1,tmp2) + for( jj = 0; jj < nn; ++jj ) { + i = ilist[jj]; + if (atom->mask[i] & groupbit) { + r[i] = b[i] - q[i]; + d[i] = r[i] * Hdia_inv[i]; //pre-condition + + tmp1 += b[i] * b[i]; + tmp2 += r[i] * d[i]; + } + } + + my_buf[0] = tmp1; + my_buf[1] = tmp2; + + MPI_Allreduce(&my_buf, &buf, 2, MPI_DOUBLE, MPI_SUM, world); + + b_norm = sqrt(buf[0]); + sig_new = buf[1]; + + for( i = 1; i < imax && sqrt(sig_new) / b_norm > tolerance; ++i ) { + comm->forward_comm_fix(this); //Dist_vector( d ); + sparse_matvec( &H, d, q ); + comm->reverse_comm_fix(this); //Coll_vector( q ); + + tmp1 = 0.0; +#pragma omp parallel + { + +#pragma omp for schedule(dynamic,50) private(ii) reduction(+:tmp1) + for( jj = 0; jj < nn; jj++) { + ii = ilist[jj]; + if(atom->mask[ii] & groupbit) tmp1 += d[ii] * q[ii]; + } + +#pragma omp barrier +#pragma omp master + { + MPI_Allreduce(&tmp1, &tmp2, 1, MPI_DOUBLE, MPI_SUM, world); + + alpha = sig_new / tmp2; + tmp1 = 0.0; + } + +#pragma omp barrier +#pragma omp for schedule(dynamic,50) private(ii) reduction(+:tmp1) + for( jj = 0; jj < nn; jj++) { + ii = ilist[jj]; + if(atom->mask[ii] & groupbit) { + x[ii] += alpha * d[ii]; + r[ii] -= alpha * q[ii]; + + // pre-conditioning + p[ii] = r[ii] * Hdia_inv[ii]; + tmp1 += r[ii] * p[ii]; + } + } + } // omp parallel + + sig_old = sig_new; + + MPI_Allreduce(&tmp1, &tmp2, 1, MPI_DOUBLE, MPI_SUM, world); + + sig_new = tmp2; + beta = sig_new / sig_old; + +#pragma omp for schedule(dynamic,50) private(ii) + for( jj = 0; jj < nn; jj++) { + ii = ilist[jj]; + if(atom->mask[ii] & groupbit) d[ii] = p[ii] + beta * d[ii]; + } + } + + if (i >= imax && comm->me == 0) { + char str[128]; + sprintf(str,"Fix qeq/reax CG convergence failed after %d iterations " + "at " BIGINT_FORMAT " step",i,update->ntimestep); + error->warning(FLERR,str); + } + + return i; +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::sparse_matvec( sparse_matrix *A, double *x, double *b ) +{ +#pragma omp parallel default(shared) + { + int i, j, itr_j; + int nn, NN, ii; + int *ilist; + int nthreads = comm->nthreads; + int tid = omp_get_thread_num(); + + if(reaxc) { + nn = reaxc->list->inum; + NN = reaxc->list->inum + reaxc->list->gnum; + ilist = reaxc->list->ilist; + } else { + nn = list->inum; + NN = list->inum + list->gnum; + ilist = list->ilist; + } + +#pragma omp for schedule(dynamic,50) + for (ii = 0; ii < nn; ++ii) { + i = ilist[ii]; + if(atom->mask[i] & groupbit) b[i] = eta[ atom->type[i] ] * x[i]; + } + +#pragma omp for schedule(dynamic,50) + for (ii = nn; ii < NN; ++ii) { + i = ilist[ii]; + if(atom->mask[i] & groupbit) b[i] = 0; + } + +#pragma omp for schedule(dynamic,50) + for (i = 0; i < NN; ++i) + for(int t=0; tmask[i] & groupbit) { + for (itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { + j = A->jlist[itr_j]; + b[i] += A->val[itr_j] * x[j]; + + b_temp[tid][j] += A->val[itr_j] * x[i]; + } + } + } + + // Wait till b_temp accumulated +#pragma omp barrier + +#pragma omp for schedule(dynamic,50) + for (i = 0; i < NN; ++i) + for (int t = 0; t < nthreads; ++t) b[i] += b_temp[t][i]; + + } //end omp parallel +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::calculate_Q() +{ + int i; + double *q = atom->q; + + int nn; + int *ilist; + + if (reaxc) { + nn = reaxc->list->inum; + ilist = reaxc->list->ilist; + } else { + nn = list->inum; + ilist = list->ilist; + } + + double tmp1, tmp2; + tmp1 = tmp2 = 0.0; +#pragma omp parallel for schedule(dynamic,50) private(i) reduction(+:tmp1,tmp2) + for(int ii = 0; ii < nn; ii++) { + i = ilist[ii]; + if(atom->mask[i] & groupbit) { + tmp1 += s[i]; + tmp2 += t[i]; + } + } + + double my_buf[2], buf[2]; + buf[0] = 0.0; + buf[1] = 0.0; + + my_buf[0] = tmp1; + my_buf[1] = tmp2; + + MPI_Allreduce(&my_buf,&buf,2,MPI_DOUBLE,MPI_SUM,world); + + double u = buf[0] / buf[1]; + +#pragma omp parallel for schedule(static) private(i) + for (int ii = 0; ii < nn; ++ii) { + i = ilist[ii]; + if(atom->mask[i] & groupbit) { + q[i] = s[i] - u * t[i]; + + // backup s & t + for (int k = 4; k > 0; --k) { + s_hist[i][k] = s_hist[i][k-1]; + t_hist[i][k] = t_hist[i][k-1]; + } + s_hist[i][0] = s[i]; + t_hist[i][0] = t[i]; + } + } + + pack_flag = 4; + comm->forward_comm_fix( this ); //Dist_vector( atom->q ); +} + +/* ---------------------------------------------------------------------- */ + +// double FixQEqReaxOMP::parallel_norm( double *v, int n ) +// { +// int i; +// double my_sum, norm_sqr; + +// int *ilist; + +// if (reaxc) ilist = reaxc->list->ilist; +// else ilist = list->ilist; + +// my_sum = 0.0; +// norm_sqr = 0.0; + +// #pragma omp parallel for schedule(static) private(i) reduction(+:my_sum) +// for (int ii = 0; ii < n; ++ii) { +// i = ilist[ii]; +// if(atom->mask[i] & groupbit) my_sum += SQR( v[i] ); +// } + +// MPI_Allreduce( &my_sum, &norm_sqr, 1, MPI_DOUBLE, MPI_SUM, world ); + +// return sqrt( norm_sqr ); +// } + +// /* ---------------------------------------------------------------------- */ + +// double FixQEqReaxOMP::parallel_dot( double *v1, double *v2, int n ) +// { +// int i; +// double my_dot, res; + +// int *ilist; + +// if (reaxc) ilist = reaxc->list->ilist; +// else ilist = list->ilist; + +// my_dot = 0.0; +// res = 0.0; + +// #pragma omp parallel for schedule(static) private(i) reduction(+:my_dot) +// for (int ii = 0; ii < n; ++ii) { +// i = ilist[ii]; +// if(atom->mask[i] & groupbit) my_dot += v1[i] * v2[i]; +// } + +// MPI_Allreduce( &my_dot, &res, 1, MPI_DOUBLE, MPI_SUM, world ); + +// return res; +// } + +// /* ---------------------------------------------------------------------- */ + +// double FixQEqReaxOMP::parallel_vector_acc( double *v, int n ) +// { +// int i; +// double my_acc, res; + +// int *ilist; + +// if (reaxc) ilist = reaxc->list->ilist; +// else ilist = list->ilist; + +// my_acc = 0.0; +// res = 0.0; + +// #pragma omp parallel for schedule(static) private(i) reduction(+:my_acc) +// for (int ii = 0; ii < n; ++ii) { +// i = ilist[ii]; +// if(atom->mask[i] & groupbit) my_acc += v[i]; +// } + +// MPI_Allreduce( &my_acc, &res, 1, MPI_DOUBLE, MPI_SUM, world ); + +// return res; +// } + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::vector_sum( double* dest, double c, double* v, + double d, double* y, int k ) +{ + int i; + int *ilist; + + if (reaxc) ilist = reaxc->list->ilist; + else ilist = list->ilist; + +#pragma omp parallel for schedule(static) private(i) + for (int ii=0; iimask[i] & groupbit) dest[i] = c * v[i] + d * y[i]; + } +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::vector_add( double* dest, double c, double* v, int k ) +{ + int i; + int *ilist; + + if (reaxc) ilist = reaxc->list->ilist; + else ilist = list->ilist; + +#pragma omp parallel for schedule(static) private(i) + for (int ii=0; iimask[i] & groupbit) dest[i] += c * v[i]; + } +} + +/* ---------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- */ +/* dual CG support */ +/* ---------------------------------------------------------------------- */ + +int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) +{ + +#ifdef OMP_TIMING + double endTimeBase, startTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + int i, j, imax; + double tmp, alpha_s, alpha_t, beta_s, beta_t, b_norm_s, b_norm_t; + double sig_old_s, sig_old_t, sig_new_s, sig_new_t; + + double my_buf[4], buf[4]; + + int nn, ii, jj; + int *ilist; + if (reaxc) { + nn = reaxc->list->inum; + ilist = reaxc->list->ilist; + } else { + nn = list->inum; + ilist = list->ilist; + } + + imax = 200; + + pack_flag = 5; // forward 2x d and reverse 2x q + dual_sparse_matvec( &H, x1, x2, q ); + comm->reverse_comm_fix( this ); //Coll_Vector( q ); + + double tmp1, tmp2, tmp3, tmp4; + tmp1 = tmp2 = tmp3 = tmp4 = 0.0; + +#pragma omp parallel for schedule(dynamic,50) private(i) reduction(+:tmp1,tmp2,tmp3,tmp4) + for( jj = 0; jj < nn; ++jj ) { + i = ilist[jj]; + if (atom->mask[i] & groupbit) { + int indxI = 2 * i; + r[indxI ] = b1[i] - q[indxI ]; + r[indxI+1] = b2[i] - q[indxI+1]; + + d[indxI ] = r[indxI ] * Hdia_inv[i]; //pre-condition + d[indxI+1] = r[indxI+1] * Hdia_inv[i]; + + tmp1 += b1[i] * b1[i]; + tmp2 += b2[i] * b2[i]; + + tmp3 += r[indxI ] * d[indxI ]; + tmp4 += r[indxI+1] * d[indxI+1]; + } + } + + my_buf[0] = tmp1; + my_buf[1] = tmp2; + my_buf[2] = tmp3; + my_buf[3] = tmp4; + + MPI_Allreduce(&my_buf, &buf, 4, MPI_DOUBLE, MPI_SUM, world); + + b_norm_s = sqrt(buf[0]); + b_norm_t = sqrt(buf[1]); + + sig_new_s = buf[2]; + sig_new_t = buf[3]; + + for( i = 1; i < imax; ++i ) { + comm->forward_comm_fix(this); //Dist_vector( d ); + dual_sparse_matvec( &H, d, q ); + comm->reverse_comm_fix(this); //Coll_vector( q ); + + tmp1 = tmp2 = 0.0; +#pragma omp parallel + { + +#pragma omp for schedule(dynamic,50) private(ii) reduction(+:tmp1,tmp2) + for( jj = 0; jj < nn; jj++) { + ii = ilist[jj]; + if(atom->mask[ii] & groupbit) { + int indxI = 2 * ii; + tmp1 += d[indxI ] * q[indxI ]; + tmp2 += d[indxI+1] * q[indxI+1]; + } + } + +#pragma omp barrier +#pragma omp master + { + my_buf[0] = tmp1; + my_buf[1] = tmp2; + + MPI_Allreduce(&my_buf, &buf, 2, MPI_DOUBLE, MPI_SUM, world); + + alpha_s = sig_new_s / buf[0]; + alpha_t = sig_new_t / buf[1]; + + tmp1 = tmp2 = 0.0; + } + +#pragma omp barrier +#pragma omp for schedule(dynamic,50) private(ii) reduction(+:tmp1,tmp2) + for( jj = 0; jj < nn; jj++) { + ii = ilist[jj]; + if(atom->mask[ii] & groupbit) { + int indxI = 2 * ii; + x1[ii] += alpha_s * d[indxI ]; + x2[ii] += alpha_t * d[indxI+1]; + + r[indxI ] -= alpha_s * q[indxI ]; + r[indxI+1] -= alpha_t * q[indxI+1]; + + // pre-conditioning + p[indxI ] = r[indxI ] * Hdia_inv[ii]; + p[indxI+1] = r[indxI+1] * Hdia_inv[ii]; + + tmp1 += r[indxI ] * p[indxI ]; + tmp2 += r[indxI+1] * p[indxI+1]; + } + } + } // omp parallel + + my_buf[0] = tmp1; + my_buf[1] = tmp2; + + sig_old_s = sig_new_s; + sig_old_t = sig_new_t; + + MPI_Allreduce(&my_buf, &buf, 2, MPI_DOUBLE, MPI_SUM, world); + + sig_new_s = buf[0]; + sig_new_t = buf[1]; + + if( sqrt(sig_new_s)/b_norm_s <= tolerance || sqrt(sig_new_t)/b_norm_t <= tolerance) break; + + beta_s = sig_new_s / sig_old_s; + beta_t = sig_new_t / sig_old_t; + +#pragma omp for schedule(dynamic,50) private(ii) + for( jj = 0; jj < nn; jj++) { + ii = ilist[jj]; + if(atom->mask[ii] & groupbit) { + int indxI = 2 * ii; + + d[indxI ] = p[indxI ] + beta_s * d[indxI ]; + d[indxI+1] = p[indxI+1] + beta_t * d[indxI+1]; + } + } + } + + i++; + matvecs_s = matvecs_t = i; // The plus one makes consistent with count from CG() + matvecs = i; + + // Timing info for iterating s&t together +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTECG1INDEX] += (endTimeBase-startTimeBase); + ompTimingCount[COMPUTECG1INDEX]++; + ompTimingCGCount[COMPUTECG1INDEX]+= i; + startTimeBase = endTimeBase; +#endif + + // If necessary, converge other system + if(sqrt(sig_new_s)/b_norm_s > tolerance) { + pack_flag = 2; + comm->forward_comm_fix(this); // x1 => s + + i+= CG(b1, x1); + matvecs_s = i; + } + else if(sqrt(sig_new_t)/b_norm_t > tolerance) { + pack_flag = 3; + comm->forward_comm_fix(this); // x2 => t + + i+= CG(b2, x2); + matvecs_t = i; + } + + // Timing info for remainder of s or t +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTECG2INDEX] += (endTimeBase-startTimeBase); + ompTimingCount[COMPUTECG2INDEX]++; + ompTimingCGCount[COMPUTECG2INDEX]+= i - matvecs; + startTimeBase = endTimeBase; +#endif + + if ( i >= imax && comm->me == 0) { + char str[128]; + sprintf(str,"Fix qeq/reax CG convergence failed after %d iterations " + "at " BIGINT_FORMAT " step",i,update->ntimestep); + error->warning(FLERR,str); + } + + return i; +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2, double *b ) +{ +#pragma omp parallel default(shared) + { + int i, j, itr_j; + int nn, NN, ii; + int *ilist; + int indxI, indxJ; + + int nthreads = comm->nthreads; + int tid = omp_get_thread_num(); + + if (reaxc) { + nn = reaxc->list->inum; + NN = reaxc->list->inum + reaxc->list->gnum; + ilist = reaxc->list->ilist; + } else { + nn = list->inum; + NN = list->inum + list->gnum; + ilist = list->ilist; + } + +#pragma omp for schedule(dynamic,50) + for( ii = 0; ii < nn; ++ii ) { + i = ilist[ii]; + if (atom->mask[i] & groupbit) { + indxI = 2 * i; + b[indxI ] = eta[ atom->type[i] ] * x1[i]; + b[indxI+1] = eta[ atom->type[i] ] * x2[i]; + } + } + +#pragma omp for schedule(dynamic,50) + for( ii = nn; ii < NN; ++ii ) { + i = ilist[ii]; + if (atom->mask[i] & groupbit) { + indxI = 2 * i; + b[indxI] = 0; + b[indxI+1] = 0; + } + } + +#pragma omp for schedule(dynamic,50) + for (i = 0; i < NN; ++i) { + indxI = 2 * i; + for(int t=0; tmask[i] & groupbit) { + indxI = 2 * i; + for( itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { + j = A->jlist[itr_j]; + indxJ = 2 * j; + b[indxI ] += A->val[itr_j] * x1[j]; + b[indxI+1] += A->val[itr_j] * x2[j]; + + b_temp[tid][indxJ ] += A->val[itr_j] * x1[i]; + b_temp[tid][indxJ+1] += A->val[itr_j] * x2[i]; + } + } + } + + // Wait till b_temp accumulated +#pragma omp barrier +#pragma omp for schedule(dynamic,50) + for (i = 0; i < NN; ++i) { + indxI = 2 * i; + for (int t = 0; t < nthreads; ++t) { + b[indxI ] += b_temp[t][indxI ]; + b[indxI+1] += b_temp[t][indxI+1]; + } + } + + } // omp parallel +} + +/* ---------------------------------------------------------------------- */ + +void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x, double *b ) +{ +#pragma omp parallel default(shared) + { + int i, j, itr_j; + int nn, NN, ii; + int *ilist; + int indxI, indxJ; + + int nthreads = comm->nthreads; + int tid = omp_get_thread_num(); + + if (reaxc) { + nn = reaxc->list->inum; + NN = reaxc->list->inum + reaxc->list->gnum; + ilist = reaxc->list->ilist; + } else { + nn = list->inum; + NN = list->inum + list->gnum; + ilist = list->ilist; + } + +#pragma omp for schedule(dynamic,50) + for( ii = 0; ii < nn; ++ii ) { + i = ilist[ii]; + if (atom->mask[i] & groupbit) { + indxI = 2 * i; + b[indxI ] = eta[ atom->type[i] ] * x[indxI ]; + b[indxI+1] = eta[ atom->type[i] ] * x[indxI+1]; + } + } + +#pragma omp for schedule(dynamic,50) + for( ii = nn; ii < NN; ++ii ) { + i = ilist[ii]; + if (atom->mask[i] & groupbit) { + indxI = 2 * i; + b[indxI] = 0; + b[indxI+1] = 0; + } + } + +#pragma omp for schedule(dynamic,50) + for (i = 0; i < NN; ++i) { + indxI = 2 * i; + for(int t=0; tmask[i] & groupbit) { + indxI = 2 * i; + for( itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { + j = A->jlist[itr_j]; + indxJ = 2 * j; + b[indxI ] += A->val[itr_j] * x[indxJ ]; + b[indxI+1] += A->val[itr_j] * x[indxJ+1]; + + b_temp[tid][indxJ ] += A->val[itr_j] * x[indxI ]; + b_temp[tid][indxJ+1] += A->val[itr_j] * x[indxI+1]; + } + } + } + + // Wait till b_temp accumulated +#pragma omp barrier +#pragma omp for schedule(dynamic,50) + for (i = 0; i < NN; ++i) { + indxI = 2 * i; + for (int t = 0; t < nthreads; ++t) { + b[indxI ] += b_temp[t][indxI ]; + b[indxI+1] += b_temp[t][indxI+1]; + } + } + + } // omp parallel +} diff --git a/src/USER-OMP/fix_qeq_reax_omp.h b/src/USER-OMP/fix_qeq_reax_omp.h new file mode 100644 index 0000000000..c06185ca2e --- /dev/null +++ b/src/USER-OMP/fix_qeq_reax_omp.h @@ -0,0 +1,84 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Hasan Metin Aktulga, Purdue University + (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov) + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(qeq/reax/omp,FixQEqReaxOMP) + +#else + +#ifndef LMP_FIX_QEQ_REAX_OMP_H +#define LMP_FIX_QEQ_REAX_OMP_H + +#include "fix_qeq_reax.h" + +namespace LAMMPS_NS { + +class FixQEqReaxOMP : public FixQEqReax { + + public: + FixQEqReaxOMP(class LAMMPS *, int, char **); + ~FixQEqReaxOMP(); + virtual void init(); + virtual void init_storage(); + virtual void pre_force(int); + virtual void post_constructor(); + + protected: + double **b_temp; + + class PairReaxCOMP *reaxc; + + int do_aspc; + int aspc_order, aspc_order_max; + double aspc_omega; + double * aspc_b; + + virtual void pertype_parameters(char*); + virtual void allocate_storage(); + virtual void deallocate_storage(); + virtual void allocate_matrix(); + virtual void init_matvec(); + virtual void compute_H(); + + virtual int CG(double*,double*); + virtual void sparse_matvec(sparse_matrix*,double*,double*); + virtual void calculate_Q(); + + /* virtual double parallel_norm( double*, int ); */ + /* virtual double parallel_dot( double*, double*, int ); */ + /* virtual double parallel_vector_acc( double*, int ); */ + + virtual void vector_sum(double*,double,double*,double,double*,int); + virtual void vector_add(double*, double, double*,int); + + // dual CG support + virtual int dual_CG(double*,double*,double*,double*); + virtual void dual_sparse_matvec(sparse_matrix*,double*,double*,double*); + virtual void dual_sparse_matvec(sparse_matrix*,double*,double*); +}; + +} + +#endif +#endif diff --git a/src/USER-OMP/fix_reaxc_species_omp.cpp b/src/USER-OMP/fix_reaxc_species_omp.cpp new file mode 100644 index 0000000000..e9ac388252 --- /dev/null +++ b/src/USER-OMP/fix_reaxc_species_omp.cpp @@ -0,0 +1,83 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing authors: Ray Shan (Sandia, tnshan@sandia.gov) + Oleg Sergeev (VNIIA, sergeev@vniia.ru) +------------------------------------------------------------------------- */ + +#include "lmptype.h" +#include "stdlib.h" +#include "math.h" +#include "atom.h" +#include "string.h" +#include "fix_ave_atom.h" +#include "fix_reaxc_species_omp.h" +#include "domain.h" +#include "update.h" +#include "pair_reaxc_omp.h" +#include "modify.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "comm.h" +#include "force.h" +#include "compute.h" +#include "input.h" +#include "variable.h" +#include "memory.h" +#include "error.h" +#include "reaxc_list.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- */ + +FixReaxCSpeciesOMP::FixReaxCSpeciesOMP(LAMMPS *lmp, int narg, char **arg) : + FixReaxCSpecies(lmp, narg, arg) +{ +} + +/* ---------------------------------------------------------------------- */ + +void FixReaxCSpeciesOMP::init() +{ + if (atom->tag_enable == 0) + error->all(FLERR,"Cannot use fix reax/c/species unless atoms have IDs"); + + reaxc = (PairReaxCOMP *) force->pair_match("reax/c/omp",1); + if (reaxc == NULL) error->all(FLERR,"Cannot use fix reax/c/species/omp without " + "pair_style reax/c/omp"); + + reaxc->fixspecies_flag = 1; + nvalid = update->ntimestep+nfreq; + + // check if this fix has been called twice + int count = 0; + for (int i = 0; i < modify->nfix; i++) + if (strcmp(modify->fix[i]->style,"reax/c/species/omp") == 0) count++; + if (count > 1 && comm->me == 0) + error->warning(FLERR,"More than one fix reax/c/species"); + + if (!setupflag) { + // create a compute to store properties + create_compute(); + + // create a fix to point to fix_ave_atom for averaging stored properties + create_fix(); + + setupflag = 1; + } + +} diff --git a/src/USER-OMP/fix_reaxc_species_omp.h b/src/USER-OMP/fix_reaxc_species_omp.h new file mode 100644 index 0000000000..006bb3e87a --- /dev/null +++ b/src/USER-OMP/fix_reaxc_species_omp.h @@ -0,0 +1,44 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(reax/c/species/omp,FixReaxCSpeciesOMP) + +#else + +#ifndef LMP_FIX_REAXC_SPECIES_OMP_H +#define LMP_FIX_REAXC_SPECIES_OMP_H + +#include "pair_reaxc_omp.h" +#include "fix_reaxc_species.h" + +#define BUFLEN 1000 + +namespace LAMMPS_NS { + + class FixReaxCSpeciesOMP : public FixReaxCSpecies { + + public: + FixReaxCSpeciesOMP(class LAMMPS *, int, char **); + ~FixReaxCSpeciesOMP(){}; + virtual void init(); + + private: + class PairReaxCOMP *reaxc; + + }; +} + +#endif +#endif diff --git a/src/USER-OMP/pair_reaxc_omp.cpp b/src/USER-OMP/pair_reaxc_omp.cpp new file mode 100644 index 0000000000..c7a6c27f48 --- /dev/null +++ b/src/USER-OMP/pair_reaxc_omp.cpp @@ -0,0 +1,584 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Hasan Metin Aktulga, Purdue University + (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov) + Per-atom energy/virial added by Ray Shan (Sandia) + Fix reax/c/bonds and fix reax/c/species for pair_style reax/c added by + Ray Shan (Sandia) +------------------------------------------------------------------------- */ + +#include "pair_reaxc_omp.h" +#include "atom.h" +#include "update.h" +#include "force.h" +#include "comm.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "modify.h" +#include "fix.h" +#include "fix_reaxc.h" +#include "citeme.h" +#include "memory.h" +#include "error.h" + +#include "reaxc_types.h" +#include "reaxc_allocate.h" +#include "reaxc_control.h" +#include "reaxc_ffield.h" +#include "reaxc_forces_omp.h" +#include "reaxc_init_md_omp.h" +#include "reaxc_io_tools.h" +#include "reaxc_list.h" +#include "reaxc_lookup.h" +#include "reaxc_reset_tools.h" +#include "reaxc_tool_box.h" +#include "reaxc_traj.h" +#include "reaxc_vector.h" +#include "fix_reaxc_bonds.h" + +using namespace LAMMPS_NS; + +#ifdef OMP_TIMING +double ompTimingData[LASTTIMINGINDEX]; +int ompTimingCount[LASTTIMINGINDEX]; +int ompTimingCGCount[LASTTIMINGINDEX]; +#endif + +/* ---------------------------------------------------------------------- */ + +PairReaxCOMP::PairReaxCOMP(LAMMPS *lmp) : PairReaxC(lmp), ThrOMP(lmp, THR_PAIR) +{ + suffix_flag |= Suffix::OMP; + system->pair_ptr = this; + + num_nbrs_offset = NULL; + +#ifdef OMP_TIMING + for (int i=0;inum_intrs; ++i) + sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); + + memory->destroy(num_nbrs_offset); + +#ifdef OMP_TIMING + int myrank; + + MPI_Comm_rank(mpi_data->world,&myrank); + + // Write screen output + if (myrank == 0 && screen) { + fprintf(screen,"\n\nWrite_Lists took %11.3lf seconds", ompTimingData[COMPUTEWLINDEX]); + + fprintf(screen,"\n\nCompute_Forces took %11.3lf seconds:", ompTimingData[COMPUTEINDEX]); + fprintf(screen,"\n ->Initial Forces: %11.3lf seconds", ompTimingData[COMPUTEIFINDEX]); + fprintf(screen,"\n ->Bond Order: %11.3lf seconds", ompTimingData[COMPUTEBOINDEX]); + fprintf(screen,"\n ->Atom Energy: %11.3lf seconds", ompTimingData[COMPUTEATOMENERGYINDEX]); + fprintf(screen,"\n ->Bond: %11.3lf seconds", ompTimingData[COMPUTEBONDSINDEX]); + fprintf(screen,"\n ->Hydrogen bonds: %11.3lf seconds", ompTimingData[COMPUTEHBONDSINDEX]); + fprintf(screen,"\n ->Torsion Angles: %11.3lf seconds", ompTimingData[COMPUTETORSIONANGLESBOINDEX]); + fprintf(screen,"\n ->Valence Angles: %11.3lf seconds", ompTimingData[COMPUTEVALENCEANGLESBOINDEX]); + fprintf(screen,"\n ->Non-Bonded For: %11.3lf seconds", ompTimingData[COMPUTENBFINDEX]); + fprintf(screen,"\n ->Total Forces: %11.3lf seconds", ompTimingData[COMPUTETFINDEX]); + + fprintf(screen,"\n\nfixQEQ: %11.3lf seconds", ompTimingData[COMPUTEQEQINDEX]); + fprintf(screen,"\n ->QEQ init: %11.3lf seconds", ompTimingData[COMPUTEINITMVINDEX]); + + double avg = double(ompTimingCGCount[COMPUTECG1INDEX]) / double(ompTimingCount[COMPUTECG1INDEX]); + fprintf(screen,"\n ->QEQ CG1: %11.3lf seconds with %4.1lf iterations on average.", ompTimingData[COMPUTECG1INDEX], avg); + + avg = double(ompTimingCGCount[COMPUTECG2INDEX]) / double(ompTimingCount[COMPUTECG2INDEX]); + fprintf(screen,"\n ->QEQ CG2: %11.3lf seconds with %4.1lf iterations on average.", ompTimingData[COMPUTECG2INDEX], avg); + fprintf(screen,"\n ->QEQ CalcQ: %11.3lf seconds\n", ompTimingData[COMPUTECALCQINDEX]); + } + + // Write logfile output + if (myrank == 0 && logfile) { + fprintf(logfile,"\n\nWrite_Lists took %11.3lf seconds", ompTimingData[COMPUTEWLINDEX]); + + fprintf(logfile,"\n\nCompute_Forces took %11.3lf seconds:", ompTimingData[COMPUTEINDEX]); + fprintf(logfile,"\n ->Initial Forces: %11.3lf seconds", ompTimingData[COMPUTEIFINDEX]); + fprintf(logfile,"\n ->Bond Order: %11.3lf seconds", ompTimingData[COMPUTEBOINDEX]); + fprintf(logfile,"\n ->Atom Energy: %11.3lf seconds", ompTimingData[COMPUTEATOMENERGYINDEX]); + fprintf(logfile,"\n ->Bond: %11.3lf seconds", ompTimingData[COMPUTEBONDSINDEX]); + fprintf(logfile,"\n ->Hydrogen bonds: %11.3lf seconds", ompTimingData[COMPUTEHBONDSINDEX]); + fprintf(logfile,"\n ->Torsion Angles: %11.3lf seconds", ompTimingData[COMPUTETORSIONANGLESBOINDEX]); + fprintf(logfile,"\n ->Valence Angles: %11.3lf seconds", ompTimingData[COMPUTEVALENCEANGLESBOINDEX]); + fprintf(logfile,"\n ->Non-Bonded For: %11.3lf seconds", ompTimingData[COMPUTENBFINDEX]); + fprintf(logfile,"\n ->Total Forces: %11.3lf seconds", ompTimingData[COMPUTETFINDEX]); + + fprintf(logfile,"\n\nfixQEQ: %11.3lf seconds", ompTimingData[COMPUTEQEQINDEX]); + fprintf(logfile,"\n ->QEQ init: %11.3lf seconds", ompTimingData[COMPUTEINITMVINDEX]); + + double avg = double(ompTimingCGCount[COMPUTECG1INDEX]) / double(ompTimingCount[COMPUTECG1INDEX]); + fprintf(logfile,"\n ->QEQ CG1: %11.3lf seconds with %4.1lf iterations on average.", ompTimingData[COMPUTECG1INDEX], avg); + + avg = double(ompTimingCGCount[COMPUTECG2INDEX]) / double(ompTimingCount[COMPUTECG2INDEX]); + fprintf(logfile,"\n ->QEQ CG2: %11.3lf seconds with %4.1lf iterations on average.", ompTimingData[COMPUTECG2INDEX], avg); + fprintf(logfile,"\n ->QEQ CalcQ: %11.3lf seconds\n", ompTimingData[COMPUTECALCQINDEX]); + } +#endif +} + +/* ---------------------------------------------------------------------- */ + +void PairReaxCOMP::compute(int eflag, int vflag) +{ + double evdwl,ecoul; + double t_start, t_end; + + // communicate num_bonds once every reneighboring + // 2 num arrays stored by fix, grab ptr to them + + if (neighbor->ago == 0) comm->forward_comm_fix(fix_reax); + int *num_bonds = fix_reax->num_bonds; + int *num_hbonds = fix_reax->num_hbonds; + + evdwl = ecoul = 0.0; + if (eflag || vflag) ev_setup(eflag,vflag); + else ev_unset(); + + if (vflag_global) control->virial = 1; + else control->virial = 0; + + system->n = atom->nlocal; // my atoms + system->N = atom->nlocal + atom->nghost; // mine + ghosts + system->bigN = static_cast (atom->natoms); // all atoms in the system + + system->big_box.V = 0; + system->big_box.box_norms[0] = 0; + system->big_box.box_norms[1] = 0; + system->big_box.box_norms[2] = 0; + if( comm->me == 0 ) t_start = MPI_Wtime(); + // setup data structures + + setup(); + + Reset( system, control, data, workspace, &lists, world ); + + // Why not update workspace like in MPI-only code? + // Using the MPI-only way messes up the hb energy + //workspace->realloc.num_far = write_reax_lists(); + write_reax_lists(); + + // timing for filling in the reax lists + if( comm->me == 0 ) { + t_end = MPI_Wtime(); + data->timing.nbrs = t_end - t_start; + } + + // forces + +#ifdef OMP_TIMING + double startTimeBase,endTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + Compute_ForcesOMP(system,control,data,workspace,&lists,out_control,mpi_data); + read_reax_forces(vflag); + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEINDEX] += (endTimeBase-startTimeBase); +#endif + +#pragma omp parallel for schedule(static) + for(int k = 0; k < system->N; ++k) { + num_bonds[k] = system->my_atoms[k].num_bonds; + num_hbonds[k] = system->my_atoms[k].num_hbonds; + } + + // energies and pressure + + if (eflag_global) { + evdwl += data->my_en.e_bond; + evdwl += data->my_en.e_ov; + evdwl += data->my_en.e_un; + evdwl += data->my_en.e_lp; + evdwl += data->my_en.e_ang; + evdwl += data->my_en.e_pen; + evdwl += data->my_en.e_coa; + evdwl += data->my_en.e_hb; + evdwl += data->my_en.e_tor; + evdwl += data->my_en.e_con; + evdwl += data->my_en.e_vdW; + + ecoul += data->my_en.e_ele; + ecoul += data->my_en.e_pol; + + // Store the different parts of the energy + // in a list for output by compute pair command + + pvector[0] = data->my_en.e_bond; + pvector[1] = data->my_en.e_ov + data->my_en.e_un; + pvector[2] = data->my_en.e_lp; + pvector[3] = 0.0; + pvector[4] = data->my_en.e_ang; + pvector[5] = data->my_en.e_pen; + pvector[6] = data->my_en.e_coa; + pvector[7] = data->my_en.e_hb; + pvector[8] = data->my_en.e_tor; + pvector[9] = data->my_en.e_con; + pvector[10] = data->my_en.e_vdW; + pvector[11] = data->my_en.e_ele; + pvector[12] = 0.0; + pvector[13] = data->my_en.e_pol; + } + + if (vflag_fdotr) virial_fdotr_compute(); + +// Set internal timestep counter to that of LAMMPS + + data->step = update->ntimestep; + + Output_Results( system, control, data, &lists, out_control, mpi_data ); + + // populate tmpid and tmpbo arrays for fix reax/c/species + int i, j; + + if(fixspecies_flag) { + if (system->N > nmax) { + memory->destroy(tmpid); + memory->destroy(tmpbo); + nmax = system->N; + memory->create(tmpid,nmax,MAXSPECBOND,"pair:tmpid"); + memory->create(tmpbo,nmax,MAXSPECBOND,"pair:tmpbo"); + } + +#pragma omp parallel for collapse(2) schedule(static) default(shared) + for (i = 0; i < system->N; i ++) + for (j = 0; j < MAXSPECBOND; j ++) { + tmpbo[i][j] = 0.0; + tmpid[i][j] = 0; + } + + FindBond(); + } +} + +/* ---------------------------------------------------------------------- */ + +void PairReaxCOMP::init_style( ) +{ + if (!atom->q_flag) + error->all(FLERR,"Pair reax/c/omp requires atom attribute q"); + + // firstwarn = 1; + + int iqeq = modify->find_fix_by_style("qeq/reax/omp"); + if (iqeq < 0 && qeqflag == 1) + error->all(FLERR,"Pair reax/c/omp requires use of fix qeq/reax/omp"); + + system->n = atom->nlocal; // my atoms + system->N = atom->nlocal + atom->nghost; // mine + ghosts + system->bigN = static_cast (atom->natoms); // all atoms in the system + system->wsize = comm->nprocs; + + system->big_box.V = 0; + system->big_box.box_norms[0] = 0; + system->big_box.box_norms[1] = 0; + system->big_box.box_norms[2] = 0; + + if (atom->tag_enable == 0) + error->all(FLERR,"Pair style reax/c/omp requires atom IDs"); + if (force->newton_pair == 0) + error->all(FLERR,"Pair style reax/c/omp requires newton pair on"); + + // need a half neighbor list w/ Newton off and ghost neighbors + // built whenever re-neighboring occurs + + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->newton = 2; + neighbor->requests[irequest]->ghost = 1; + + cutmax = MAX3(control->nonb_cut, control->hbond_cut, 2*control->bond_cut); + + for( int i = 0; i < LIST_N; ++i ) + lists[i].allocated = 0; + + if (fix_reax == NULL) { + char **fixarg = new char*[3]; + fixarg[0] = (char *) "REAXC"; + fixarg[1] = (char *) "all"; + fixarg[2] = (char *) "REAXC"; + modify->add_fix(3,fixarg); + delete [] fixarg; + fix_reax = (FixReaxC *) modify->fix[modify->nfix-1]; + } + +#pragma omp parallel + { control->nthreads = omp_get_num_threads(); } +} + +/* ---------------------------------------------------------------------- */ + +void PairReaxCOMP::setup( ) +{ + int oldN; + int mincap = system->mincap; + double safezone = system->safezone; + + system->n = atom->nlocal; // my atoms + system->N = atom->nlocal + atom->nghost; // mine + ghosts + oldN = system->N; + system->bigN = static_cast (atom->natoms); // all atoms in the system + + if (system->N > nmax) { + memory->destroy(num_nbrs_offset); + // Don't update nmax here. It is updated at end of compute(). + memory->create(num_nbrs_offset, system->N, "pair:num_nbrs_offset"); + } + + if (setup_flag == 0) { + + setup_flag = 1; + + int *num_bonds = fix_reax->num_bonds; + int *num_hbonds = fix_reax->num_hbonds; + + control->vlist_cut = neighbor->cutneighmax; + + // determine the local and total capacity + + system->local_cap = MAX( (int)(system->n * safezone), mincap ); + system->total_cap = MAX( (int)(system->N * safezone), mincap ); + + // initialize my data structures + + PreAllocate_Space( system, control, workspace, world ); + write_reax_atoms(); + + int num_nbrs = estimate_reax_lists(); + if(!Make_List(system->total_cap, num_nbrs, TYP_FAR_NEIGHBOR, + lists+FAR_NBRS, world)) + error->all(FLERR,"Pair reax/c problem in far neighbor list"); + + write_reax_lists(); + + InitializeOMP( system, control, data, workspace, &lists, out_control, + mpi_data, world ); + + for( int k = 0; k < system->N; ++k ) { + num_bonds[k] = system->my_atoms[k].num_bonds; + num_hbonds[k] = system->my_atoms[k].num_hbonds; + } + + } else { + + // fill in reax datastructures + + write_reax_atoms(); + + // reset the bond list info for new atoms + + for(int k = oldN; k < system->N; ++k) + Set_End_Index( k, Start_Index( k, lists+BONDS ), lists+BONDS ); + + // estimate far neighbor list size + // Not present in MPI-only version + workspace->realloc.num_far = estimate_reax_lists(); + + // check if I need to shrink/extend my data-structs + + ReAllocate( system, control, data, workspace, &lists, mpi_data ); + } +} + +/* ---------------------------------------------------------------------- */ + +void PairReaxCOMP::write_reax_atoms() +{ + int *num_bonds = fix_reax->num_bonds; + int *num_hbonds = fix_reax->num_hbonds; + + if (system->N > system->total_cap) + error->all(FLERR,"Too many ghost atoms"); + +#pragma omp parallel for schedule(static) default(shared) + for( int i = 0; i < system->N; ++i ){ + system->my_atoms[i].orig_id = atom->tag[i]; + system->my_atoms[i].type = map[atom->type[i]]; + system->my_atoms[i].x[0] = atom->x[i][0]; + system->my_atoms[i].x[1] = atom->x[i][1]; + system->my_atoms[i].x[2] = atom->x[i][2]; + system->my_atoms[i].q = atom->q[i]; + system->my_atoms[i].num_bonds = num_bonds[i]; + system->my_atoms[i].num_hbonds = num_hbonds[i]; + } +} + +/* ---------------------------------------------------------------------- */ + +int PairReaxCOMP::estimate_reax_lists() +{ + int i; + int *ilist = list->ilist; + int *numneigh = list->numneigh; + int numall = list->inum + list->gnum; + int mincap = system->mincap; + + // for good performance in the OpenMP implementation, each thread needs + // to know where to place the neighbors of the atoms it is responsible for. + // The sumscan values for the list->numneigh will be used to determine the + // neighbor offset of each atom. Note that this may cause some significant + // memory overhead if delayed neighboring is used - so it may be desirable + // to work on this part to reduce the memory footprint of the far_nbrs list. + + int num_nbrs = 0; + + for (int itr_i = 0; itr_i < numall; ++itr_i) { + i = ilist[itr_i]; + num_nbrs += numneigh[i]; + } + + int new_estimate = MAX (num_nbrs, mincap*MIN_NBRS); + + return new_estimate; +} + +/* ---------------------------------------------------------------------- */ + +int PairReaxCOMP::write_reax_lists() +{ +#ifdef OMP_TIMING + double startTimeBase, endTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + int itr_i, itr_j, i, j, num_mynbrs; + int *jlist; + double d_sqr, dist, cutoff_sqr; + rvec dvec; + + double **x = atom->x; + int *ilist = list->ilist; + int *numneigh = list->numneigh; + int **firstneigh = list->firstneigh; + reax_list *far_nbrs = lists + FAR_NBRS; + far_neighbor_data *far_list = far_nbrs->select.far_nbr_list; + + int num_nbrs = 0; + int inum = list->inum; + int gnum = list->gnum; + int numall = inum + gnum; + + // sumscan of the number of neighbors per atom to determine the offsets + // most likely, we are overallocating. desirable to work on this part + // to reduce the memory footprint of the far_nbrs list. + + num_nbrs = 0; + + for (itr_i = 0; itr_i < numall; ++itr_i) { + i = ilist[itr_i]; + num_nbrs_offset[i] = num_nbrs; + num_nbrs += numneigh[i]; + } + +//#pragma omp parallel for schedule(guided) default(shared) +#pragma omp parallel for schedule(dynamic,50) default(shared) \ + private(itr_i, itr_j, i, j, jlist, cutoff_sqr, num_mynbrs, d_sqr, dvec, dist) + for (itr_i = 0; itr_i < numall; ++itr_i) { + i = ilist[itr_i]; + jlist = firstneigh[i]; + Set_Start_Index( i, num_nbrs_offset[i], far_nbrs ); + + if (i < inum) + cutoff_sqr = control->nonb_cut*control->nonb_cut; + else + cutoff_sqr = control->bond_cut*control->bond_cut; + + num_mynbrs = 0; + + for (itr_j = 0; itr_j < numneigh[i]; ++itr_j) { + j = jlist[itr_j]; + j &= NEIGHMASK; + get_distance( x[j], x[i], &d_sqr, &dvec ); + + if (d_sqr <= cutoff_sqr) { + dist = sqrt( d_sqr ); + set_far_nbr( &far_list[num_nbrs_offset[i] + num_mynbrs], j, dist, dvec ); + ++num_mynbrs; + } + } + Set_End_Index( i, num_nbrs_offset[i] + num_mynbrs, far_nbrs ); + } + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEWLINDEX] += (endTimeBase-startTimeBase); +#endif + + return num_nbrs; +} + +/* ---------------------------------------------------------------------- */ + +void PairReaxCOMP::read_reax_forces(int vflag) +{ +#pragma omp parallel for schedule(static) default(shared) + for( int i = 0; i < system->N; ++i ) { + system->my_atoms[i].f[0] = workspace->f[i][0]; + system->my_atoms[i].f[1] = workspace->f[i][1]; + system->my_atoms[i].f[2] = workspace->f[i][2]; + + atom->f[i][0] = -workspace->f[i][0]; + atom->f[i][1] = -workspace->f[i][1]; + atom->f[i][2] = -workspace->f[i][2]; + } +} + +/* ---------------------------------------------------------------------- */ + +void PairReaxCOMP::FindBond() +{ + int i, ii, j, pj, jtag, nj, jtmp, jj; + double bo_tmp, bo_cut, rij, rsq; + + bond_data *bo_ij; + bo_cut = 0.10; + +#pragma omp parallel for schedule(static) default(shared) \ + private(i, nj, pj, bo_ij, j, bo_tmp) + for (i = 0; i < system->n; i++) { + nj = 0; + for( pj = Start_Index(i, lists); pj < End_Index(i, lists); ++pj ) { + bo_ij = &( lists->select.bond_list[pj] ); + j = bo_ij->nbr; + if (j < i) continue; + + bo_tmp = bo_ij->bo_data.BO; + + if (bo_tmp >= bo_cut ) { + tmpid[i][nj] = j; + tmpbo[i][nj] = bo_tmp; + nj ++; + if (nj > MAXSPECBOND) error->all(FLERR,"Increase MAXSPECBOND in fix_reaxc_species.h"); + } + } + } +} + diff --git a/src/USER-OMP/pair_reaxc_omp.h b/src/USER-OMP/pair_reaxc_omp.h new file mode 100644 index 0000000000..5d5c7e145b --- /dev/null +++ b/src/USER-OMP/pair_reaxc_omp.h @@ -0,0 +1,113 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Hasan Metin Aktulga, Purdue University + (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov) + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS + +PairStyle(reax/c/omp,PairReaxCOMP) + +#else + +#ifndef LMP_PAIR_REAXC_OMP_H +#define LMP_PAIR_REAXC_OMP_H + +#include "pair_reaxc.h" +#include "thr_omp.h" +#include "suffix.h" + +namespace LAMMPS_NS { + +class PairReaxCOMP : public PairReaxC, public ThrOMP { + public: + PairReaxCOMP(class LAMMPS *); + ~PairReaxCOMP(); + virtual void compute(int, int); + virtual void init_style(); + + inline FixOMP *getFixOMP() { + return fix; + }; + + inline void ev_setup_thr_proxy(int eflagparm, int vflagparm, int nallparm, + double *eatomparm, double **vatomparm, ThrData *thrparm) { + ev_setup_thr(eflagparm, vflagparm, nallparm, eatomparm, vatomparm, thrparm); + }; + + // reduce per thread data as needed + inline void reduce_thr_proxy(void * const styleparm, const int eflagparm, + const int vflagparm, ThrData * const thrparm) { + reduce_thr(styleparm, eflagparm, vflagparm, thrparm); + } + + inline void ev_tally_thr_proxy(Pair * const pairparm, const int iparm, const int jparm, + const int nlocalparm, const int newton_pairparm, + const double evdwlparm, const double ecoulparm, + const double fpairparm, const double delxparm, + const double delyparm, const double delzparm, + ThrData * const thrparm) { + ev_tally_thr(pairparm, iparm, jparm, nlocalparm, newton_pairparm, + evdwlparm, ecoulparm, fpairparm, delxparm, delyparm, delzparm, thrparm); + } + + inline void ev_tally_xyz_thr_proxy(Pair * const pairparm, const int iparm, const int jparm, + const int nlocalparm, const int newton_pairparm, + const double evdwlparm, const double ecoulparm, + const double fxparm, const double fyparm, const double fzparm, + const double delxparm, const double delyparm, + const double delzparm, ThrData * const thrparm) { + ev_tally_xyz_thr(pairparm, iparm, jparm, nlocalparm, newton_pairparm, + evdwlparm, ecoulparm, fxparm, fyparm, fzparm, + delxparm, delyparm, delzparm, thrparm); + } + + inline void ev_tally3_thr_proxy(Pair * const pairparm,int i, int j, int k, + double evdwl, double ecoul, double *fj, double *fk, + double *drji, double *drki, ThrData * const thrparm) { + ev_tally3_thr(pairparm, i, j, k, evdwl, ecoul, fj, fk, drji, drki, thrparm); + } + + protected: + virtual void setup(); + virtual void write_reax_atoms(); + virtual int estimate_reax_lists(); + virtual int write_reax_lists(); + virtual void read_reax_forces(int); + virtual void FindBond(); + + // work array used in write_reax_lists() + int * num_nbrs_offset; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Too many ghost atoms + +Number of ghost atoms has increased too much during simulation and has exceeded +the size of reax/c arrays. Increase safe_zone and min_cap in pair_style reax/c +command + +*/ diff --git a/src/USER-OMP/reaxc_bond_orders_omp.cpp b/src/USER-OMP/reaxc_bond_orders_omp.cpp new file mode 100644 index 0000000000..1d32cbd34f --- /dev/null +++ b/src/USER-OMP/reaxc_bond_orders_omp.cpp @@ -0,0 +1,711 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#include +#include "pair_reaxc_omp.h" +#include "reaxc_types.h" +#include "reaxc_bond_orders_omp.h" +#include "reaxc_list.h" +#include "reaxc_vector.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj, + storage *workspace, reax_list **lists ) { + reax_list *bonds = (*lists) + BONDS; + bond_data *nbr_j, *nbr_k; + bond_order_data *bo_ij, *bo_ji; + dbond_coefficients coef; + int pk, k, j; + + PairReaxCOMP *pair_reax_ptr = static_cast(system->pair_ptr); + + int tid = omp_get_thread_num(); + ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); + long reductionOffset = (system->N * tid); + + /* Virial Tallying variables */ + double f_scaler; + rvec fi_tmp, fj_tmp, fk_tmp, delij, delji, delki, delkj, temp; + + /* Initializations */ + nbr_j = &(bonds->select.bond_list[pj]); + j = nbr_j->nbr; + bo_ij = &(nbr_j->bo_data); + bo_ji = &(bonds->select.bond_list[ nbr_j->sym_index ].bo_data); + + double c = bo_ij->Cdbo + bo_ji->Cdbo; + coef.C1dbo = bo_ij->C1dbo * c; + coef.C2dbo = bo_ij->C2dbo * c; + coef.C3dbo = bo_ij->C3dbo * c; + + c = bo_ij->Cdbopi + bo_ji->Cdbopi; + coef.C1dbopi = bo_ij->C1dbopi * c; + coef.C2dbopi = bo_ij->C2dbopi * c; + coef.C3dbopi = bo_ij->C3dbopi * c; + coef.C4dbopi = bo_ij->C4dbopi * c; + + c = bo_ij->Cdbopi2 + bo_ji->Cdbopi2; + coef.C1dbopi2 = bo_ij->C1dbopi2 * c; + coef.C2dbopi2 = bo_ij->C2dbopi2 * c; + coef.C3dbopi2 = bo_ij->C3dbopi2 * c; + coef.C4dbopi2 = bo_ij->C4dbopi2 * c; + + c = workspace->CdDelta[i] + workspace->CdDelta[j]; + coef.C1dDelta = bo_ij->C1dbo * c; + coef.C2dDelta = bo_ij->C2dbo * c; + coef.C3dDelta = bo_ij->C3dbo * c; + + // The same "c" refactoring here can be replicated below in Add_dBond_to_Forces_NPTOMP(), but + // I'd prefer to wait for a test to verify changes before doing so (just to be safe). + + // forces on i + // rvec_Scale( temp, coef.C1dbo, bo_ij->dBOp ); + // rvec_ScaledAdd( temp, coef.C2dbo, workspace->dDeltap_self[i] ); + // rvec_ScaledAdd( temp, coef.C1dDelta, bo_ij->dBOp ); + // rvec_ScaledAdd( temp, coef.C2dDelta, workspace->dDeltap_self[i] ); + // rvec_ScaledAdd( temp, coef.C1dbopi, bo_ij->dln_BOp_pi ); + // rvec_ScaledAdd( temp, coef.C2dbopi, bo_ij->dBOp ); + // rvec_ScaledAdd( temp, coef.C3dbopi, workspace->dDeltap_self[i]); + // rvec_ScaledAdd( temp, coef.C1dbopi2, bo_ij->dln_BOp_pi2 ); + // rvec_ScaledAdd( temp, coef.C2dbopi2, bo_ij->dBOp ); + // rvec_ScaledAdd( temp, coef.C3dbopi2, workspace->dDeltap_self[i] ); + + c = (coef.C1dbo + coef.C1dDelta + coef.C2dbopi + coef.C2dbopi2); + rvec_Scale( temp, c, bo_ij->dBOp ); + + c = (coef.C2dbo + coef.C2dDelta + coef.C3dbopi + coef.C3dbopi2); + rvec_ScaledAdd( temp, c, workspace->dDeltap_self[i] ); + + rvec_ScaledAdd( temp, coef.C1dbopi, bo_ij->dln_BOp_pi ); + rvec_ScaledAdd( temp, coef.C1dbopi2, bo_ij->dln_BOp_pi2 ); + + rvec_Add(workspace->forceReduction[reductionOffset+i],temp ); + + if( system->pair_ptr->vflag_atom) { + rvec_Scale(fi_tmp, -1.0, temp); + rvec_ScaledSum( delij, 1., system->my_atoms[i].x,-1., system->my_atoms[j].x ); + + pair_reax_ptr->ev_tally_xyz_thr_proxy(system->pair_ptr,i,j,system->N,0,0,0, + fi_tmp[0],fi_tmp[1],fi_tmp[2], + delij[0],delij[1],delij[2],thr); + } + + // forces on j + // rvec_Scale( temp, -coef.C1dbo, bo_ij->dBOp ); + // rvec_ScaledAdd( temp, coef.C3dbo, workspace->dDeltap_self[j] ); + // rvec_ScaledAdd( temp, -coef.C1dDelta, bo_ij->dBOp ); + // rvec_ScaledAdd( temp, coef.C3dDelta, workspace->dDeltap_self[j]); + // rvec_ScaledAdd( temp, -coef.C1dbopi, bo_ij->dln_BOp_pi ); + // rvec_ScaledAdd( temp, -coef.C2dbopi, bo_ij->dBOp ); + // rvec_ScaledAdd( temp, coef.C4dbopi, workspace->dDeltap_self[j]); + // rvec_ScaledAdd( temp, -coef.C1dbopi2, bo_ij->dln_BOp_pi2 ); + // rvec_ScaledAdd( temp, -coef.C2dbopi2, bo_ij->dBOp ); + // rvec_ScaledAdd( temp, coef.C4dbopi2, workspace->dDeltap_self[j]); + + + c = -(coef.C1dbo + coef.C1dDelta + coef.C2dbopi + coef.C2dbopi2); + rvec_Scale( temp, c, bo_ij->dBOp ); + + c = (coef.C3dbo + coef.C3dDelta + coef.C4dbopi + coef.C4dbopi2); + rvec_ScaledAdd( temp, c, workspace->dDeltap_self[j] ); + + rvec_ScaledAdd( temp, -coef.C1dbopi, bo_ij->dln_BOp_pi ); + rvec_ScaledAdd( temp, -coef.C1dbopi2, bo_ij->dln_BOp_pi2 ); + + + rvec_Add(workspace->forceReduction[reductionOffset+j],temp ); + + if( system->pair_ptr->vflag_atom) { + rvec_Scale(fj_tmp, -1.0, temp); + rvec_ScaledSum( delji, 1., system->my_atoms[j].x,-1., system->my_atoms[i].x ); + + pair_reax_ptr->ev_tally_xyz_thr_proxy(system->pair_ptr,j,i,system->N,0,0,0, + fj_tmp[0],fj_tmp[1],fj_tmp[2], + delji[0],delji[1],delji[2],thr); + } + + // forces on k: i neighbor + for( pk = Start_Index(i, bonds); pk < End_Index(i, bonds); ++pk ) { + nbr_k = &(bonds->select.bond_list[pk]); + k = nbr_k->nbr; + + // rvec_Scale( temp, -coef.C2dbo, nbr_k->bo_data.dBOp); + // rvec_ScaledAdd( temp, -coef.C2dDelta, nbr_k->bo_data.dBOp); + // rvec_ScaledAdd( temp, -coef.C3dbopi, nbr_k->bo_data.dBOp); + // rvec_ScaledAdd( temp, -coef.C3dbopi2, nbr_k->bo_data.dBOp); + + const double c = -(coef.C2dbo + coef.C2dDelta + coef.C3dbopi + coef.C3dbopi2); + rvec_Scale(temp, c, nbr_k->bo_data.dBOp); + + rvec_Add(workspace->forceReduction[reductionOffset+k],temp ); + + if( system->pair_ptr->vflag_atom ) { + rvec_Scale(fk_tmp, -1.0, temp); + rvec_ScaledSum(delki,1.,system->my_atoms[k].x,-1.,system->my_atoms[i].x); + + pair_reax_ptr->ev_tally_xyz_thr_proxy(system->pair_ptr,k,i,system->N,0,0,0, + fk_tmp[0],fk_tmp[1],fk_tmp[2], + delki[0],delki[1],delki[2],thr); + rvec_ScaledSum(delkj,1.,system->my_atoms[k].x,-1.,system->my_atoms[j].x); + + pair_reax_ptr->ev_tally_xyz_thr_proxy(system->pair_ptr,k,j,system->N,0,0,0, + fk_tmp[0],fk_tmp[1],fk_tmp[2], + delkj[0],delkj[1],delkj[2],thr); + } + } + + // forces on k: j neighbor + for( pk = Start_Index(j, bonds); pk < End_Index(j, bonds); ++pk ) { + nbr_k = &(bonds->select.bond_list[pk]); + k = nbr_k->nbr; + + // rvec_Scale( temp, -coef.C3dbo, nbr_k->bo_data.dBOp ); + // rvec_ScaledAdd( temp, -coef.C3dDelta, nbr_k->bo_data.dBOp); + // rvec_ScaledAdd( temp, -coef.C4dbopi, nbr_k->bo_data.dBOp); + // rvec_ScaledAdd( temp, -coef.C4dbopi2, nbr_k->bo_data.dBOp); + + const double c = -(coef.C3dbo + coef.C3dDelta + coef.C4dbopi + coef.C4dbopi2); + rvec_Scale(temp, c, nbr_k->bo_data.dBOp); + + rvec_Add(workspace->forceReduction[reductionOffset+k],temp ); + + if( system->pair_ptr->vflag_atom ) { + rvec_Scale(fk_tmp, -1.0, temp); + rvec_ScaledSum(delki,1.,system->my_atoms[k].x,-1.,system->my_atoms[i].x); + + pair_reax_ptr->ev_tally_xyz_thr_proxy(system->pair_ptr,k,i,system->N,0,0,0, + fk_tmp[0],fk_tmp[1],fk_tmp[2], + delki[0],delki[1],delki[2],thr); + + rvec_ScaledSum(delkj,1.,system->my_atoms[k].x,-1.,system->my_atoms[j].x); + + pair_reax_ptr->ev_tally_xyz_thr_proxy(system->pair_ptr,k,j,system->N,0,0,0, + fk_tmp[0],fk_tmp[1],fk_tmp[2], + delkj[0],delkj[1],delkj[2],thr); + } + } +} + +/* ---------------------------------------------------------------------- */ + +void Add_dBond_to_Forces_NPTOMP( reax_system *system, int i, int pj, simulation_data *data, + storage *workspace, reax_list **lists ) { + reax_list *bonds = (*lists) + BONDS; + bond_data *nbr_j, *nbr_k; + bond_order_data *bo_ij, *bo_ji; + dbond_coefficients coef; + rvec temp, ext_press; + ivec rel_box; + int pk, k, j; + + PairReaxCOMP *pair_reax_ptr = static_cast(system->pair_ptr); + + int tid = omp_get_thread_num(); + ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); + long reductionOffset = (system->N * tid); + + /* Initializations */ + nbr_j = &(bonds->select.bond_list[pj]); + j = nbr_j->nbr; + bo_ij = &(nbr_j->bo_data); + bo_ji = &(bonds->select.bond_list[ nbr_j->sym_index ].bo_data); + + coef.C1dbo = bo_ij->C1dbo * (bo_ij->Cdbo + bo_ji->Cdbo); + coef.C2dbo = bo_ij->C2dbo * (bo_ij->Cdbo + bo_ji->Cdbo); + coef.C3dbo = bo_ij->C3dbo * (bo_ij->Cdbo + bo_ji->Cdbo); + + coef.C1dbopi = bo_ij->C1dbopi * (bo_ij->Cdbopi + bo_ji->Cdbopi); + coef.C2dbopi = bo_ij->C2dbopi * (bo_ij->Cdbopi + bo_ji->Cdbopi); + coef.C3dbopi = bo_ij->C3dbopi * (bo_ij->Cdbopi + bo_ji->Cdbopi); + coef.C4dbopi = bo_ij->C4dbopi * (bo_ij->Cdbopi + bo_ji->Cdbopi); + + coef.C1dbopi2 = bo_ij->C1dbopi2 * (bo_ij->Cdbopi2 + bo_ji->Cdbopi2); + coef.C2dbopi2 = bo_ij->C2dbopi2 * (bo_ij->Cdbopi2 + bo_ji->Cdbopi2); + coef.C3dbopi2 = bo_ij->C3dbopi2 * (bo_ij->Cdbopi2 + bo_ji->Cdbopi2); + coef.C4dbopi2 = bo_ij->C4dbopi2 * (bo_ij->Cdbopi2 + bo_ji->Cdbopi2); + + coef.C1dDelta = bo_ij->C1dbo * (workspace->CdDelta[i]+workspace->CdDelta[j]); + coef.C2dDelta = bo_ij->C2dbo * (workspace->CdDelta[i]+workspace->CdDelta[j]); + coef.C3dDelta = bo_ij->C3dbo * (workspace->CdDelta[i]+workspace->CdDelta[j]); + + + /************************************ + * forces related to atom i * + * first neighbors of atom i * + ************************************/ + for( pk = Start_Index(i, bonds); pk < End_Index(i, bonds); ++pk ) { + nbr_k = &(bonds->select.bond_list[pk]); + k = nbr_k->nbr; + + rvec_Scale(temp, -coef.C2dbo, nbr_k->bo_data.dBOp); /*2nd, dBO*/ + rvec_ScaledAdd(temp, -coef.C2dDelta, nbr_k->bo_data.dBOp);/*dDelta*/ + rvec_ScaledAdd(temp, -coef.C3dbopi, nbr_k->bo_data.dBOp); /*3rd, dBOpi*/ + rvec_ScaledAdd(temp, -coef.C3dbopi2, nbr_k->bo_data.dBOp);/*3rd, dBOpi2*/ + + /* force */ + rvec_Add(workspace->forceReduction[reductionOffset+k],temp ); + + /* pressure */ + rvec_iMultiply( ext_press, nbr_k->rel_box, temp ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + } + + /* then atom i itself */ + rvec_Scale( temp, coef.C1dbo, bo_ij->dBOp ); /*1st,dBO*/ + rvec_ScaledAdd( temp, coef.C2dbo, workspace->dDeltap_self[i] ); /*2nd,dBO*/ + rvec_ScaledAdd( temp, coef.C1dDelta, bo_ij->dBOp ); /*1st,dBO*/ + rvec_ScaledAdd( temp, coef.C2dDelta, workspace->dDeltap_self[i] );/*2nd,dBO*/ + rvec_ScaledAdd( temp, coef.C1dbopi, bo_ij->dln_BOp_pi ); /*1st,dBOpi*/ + rvec_ScaledAdd( temp, coef.C2dbopi, bo_ij->dBOp ); /*2nd,dBOpi*/ + rvec_ScaledAdd( temp, coef.C3dbopi, workspace->dDeltap_self[i]);/*3rd,dBOpi*/ + + rvec_ScaledAdd( temp, coef.C1dbopi2, bo_ij->dln_BOp_pi2 ); /*1st,dBO_pi2*/ + rvec_ScaledAdd( temp, coef.C2dbopi2, bo_ij->dBOp ); /*2nd,dBO_pi2*/ + rvec_ScaledAdd( temp, coef.C3dbopi2, workspace->dDeltap_self[i] );/*3rd*/ + + /* force */ + rvec_Add(workspace->forceReduction[reductionOffset+i],temp ); + + for( pk = Start_Index(j, bonds); pk < End_Index(j, bonds); ++pk ) { + nbr_k = &(bonds->select.bond_list[pk]); + k = nbr_k->nbr; + + rvec_Scale( temp, -coef.C3dbo, nbr_k->bo_data.dBOp ); /*3rd,dBO*/ + rvec_ScaledAdd( temp, -coef.C3dDelta, nbr_k->bo_data.dBOp);/*dDelta*/ + rvec_ScaledAdd( temp, -coef.C4dbopi, nbr_k->bo_data.dBOp); /*4th,dBOpi*/ + rvec_ScaledAdd( temp, -coef.C4dbopi2, nbr_k->bo_data.dBOp);/*4th,dBOpi2*/ + + /* force */ + rvec_Add(workspace->forceReduction[reductionOffset+k],temp ); + + /* pressure */ + if( k != i ) { + ivec_Sum( rel_box, nbr_k->rel_box, nbr_j->rel_box ); //rel_box(k, i) + rvec_iMultiply( ext_press, rel_box, temp ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + } + } + + /* then atom j itself */ + rvec_Scale( temp, -coef.C1dbo, bo_ij->dBOp ); /*1st, dBO*/ + rvec_ScaledAdd( temp, coef.C3dbo, workspace->dDeltap_self[j] ); /*2nd, dBO*/ + rvec_ScaledAdd( temp, -coef.C1dDelta, bo_ij->dBOp ); /*1st, dBO*/ + rvec_ScaledAdd( temp, coef.C3dDelta, workspace->dDeltap_self[j]);/*2nd, dBO*/ + + rvec_ScaledAdd( temp, -coef.C1dbopi, bo_ij->dln_BOp_pi ); /*1st,dBOpi*/ + rvec_ScaledAdd( temp, -coef.C2dbopi, bo_ij->dBOp ); /*2nd,dBOpi*/ + rvec_ScaledAdd( temp, coef.C4dbopi, workspace->dDeltap_self[j]);/*3rd,dBOpi*/ + + rvec_ScaledAdd( temp, -coef.C1dbopi2, bo_ij->dln_BOp_pi2 ); /*1st,dBOpi2*/ + rvec_ScaledAdd( temp, -coef.C2dbopi2, bo_ij->dBOp ); /*2nd,dBOpi2*/ + rvec_ScaledAdd( temp,coef.C4dbopi2,workspace->dDeltap_self[j]);/*3rd,dBOpi2*/ + + /* force */ + rvec_Add(workspace->forceReduction[reductionOffset+j],temp ); + + /* pressure */ + rvec_iMultiply( ext_press, nbr_j->rel_box, temp ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); +} + +/* ---------------------------------------------------------------------- */ + +int BOp_OMP( storage *workspace, reax_list *bonds, double bo_cut, + int i, int btop_i, far_neighbor_data *nbr_pj, + single_body_parameters *sbp_i, single_body_parameters *sbp_j, + two_body_parameters *twbp, + int btop_j, double C12, double C34, double C56, double BO, double BO_s, double BO_pi, double BO_pi2) { + int j; + double rr2; + double Cln_BOp_s, Cln_BOp_pi, Cln_BOp_pi2; + bond_data *ibond, *jbond; + bond_order_data *bo_ij, *bo_ji; + + j = nbr_pj->nbr; + rr2 = 1.0 / SQR(nbr_pj->d); + + // Top portion of BOp() moved to reaxc_forces_omp.cpp::Init_Forces_noQEq_OMP() + + /* Initially BO values are the uncorrected ones, page 1 */ + + /****** bonds i-j and j-i ******/ + ibond = &( bonds->select.bond_list[btop_i] ); + jbond = &( bonds->select.bond_list[btop_j] ); + + ibond->nbr = j; + jbond->nbr = i; + ibond->d = nbr_pj->d; + jbond->d = nbr_pj->d; + rvec_Copy( ibond->dvec, nbr_pj->dvec ); + rvec_Scale( jbond->dvec, -1, nbr_pj->dvec ); + ivec_Copy( ibond->rel_box, nbr_pj->rel_box ); + ivec_Scale( jbond->rel_box, -1, nbr_pj->rel_box ); + ibond->dbond_index = btop_i; + jbond->dbond_index = btop_i; + ibond->sym_index = btop_j; + jbond->sym_index = btop_i; + + bo_ij = &( ibond->bo_data ); + bo_ji = &( jbond->bo_data ); + bo_ji->BO = bo_ij->BO = BO; + bo_ji->BO_s = bo_ij->BO_s = BO_s; + bo_ji->BO_pi = bo_ij->BO_pi = BO_pi; + bo_ji->BO_pi2 = bo_ij->BO_pi2 = BO_pi2; + + /* Bond Order page2-3, derivative of total bond order prime */ + Cln_BOp_s = twbp->p_bo2 * C12 * rr2; + Cln_BOp_pi = twbp->p_bo4 * C34 * rr2; + Cln_BOp_pi2 = twbp->p_bo6 * C56 * rr2; + + /* Only dln_BOp_xx wrt. dr_i is stored here, note that + dln_BOp_xx/dr_i = -dln_BOp_xx/dr_j and all others are 0 */ + rvec_Scale(bo_ij->dln_BOp_s,-bo_ij->BO_s*Cln_BOp_s,ibond->dvec); + rvec_Scale(bo_ij->dln_BOp_pi,-bo_ij->BO_pi*Cln_BOp_pi,ibond->dvec); + rvec_Scale(bo_ij->dln_BOp_pi2, + -bo_ij->BO_pi2*Cln_BOp_pi2,ibond->dvec); + rvec_Scale(bo_ji->dln_BOp_s, -1., bo_ij->dln_BOp_s); + rvec_Scale(bo_ji->dln_BOp_pi, -1., bo_ij->dln_BOp_pi ); + rvec_Scale(bo_ji->dln_BOp_pi2, -1., bo_ij->dln_BOp_pi2 ); + + rvec_Scale( bo_ij->dBOp, + -(bo_ij->BO_s * Cln_BOp_s + + bo_ij->BO_pi * Cln_BOp_pi + + bo_ij->BO_pi2 * Cln_BOp_pi2), ibond->dvec ); + rvec_Scale( bo_ji->dBOp, -1., bo_ij->dBOp ); + + bo_ij->BO_s -= bo_cut; + bo_ij->BO -= bo_cut; + bo_ji->BO_s -= bo_cut; + bo_ji->BO -= bo_cut; + + bo_ij->Cdbo = bo_ij->Cdbopi = bo_ij->Cdbopi2 = 0.0; + bo_ji->Cdbo = bo_ji->Cdbopi = bo_ji->Cdbopi2 = 0.0; + + return 1; +} + +/* ---------------------------------------------------------------------- */ + +void BOOMP( reax_system *system, control_params *control, simulation_data *data, + storage *workspace, reax_list **lists, output_controls *out_control ) +{ +#ifdef OMP_TIMING + double endTimeBase, startTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + double p_lp1 = system->reax_param.gp.l[15]; + int num_bonds = 0; + double p_boc1 = system->reax_param.gp.l[0]; + double p_boc2 = system->reax_param.gp.l[1]; + reax_list *bonds = (*lists) + BONDS; + int natoms = system->N; + int nthreads = control->nthreads; + +#pragma omp parallel default(shared) + { + int i, j, pj, type_i, type_j; + int start_i, end_i, sym_index; + double val_i, Deltap_i, Deltap_boc_i; + double val_j, Deltap_j, Deltap_boc_j; + double f1, f2, f3, f4, f5, f4f5, exp_f4, exp_f5; + double exp_p1i, exp_p2i, exp_p1j, exp_p2j, explp1; + double temp, u1_ij, u1_ji, Cf1A_ij, Cf1B_ij, Cf1_ij, Cf1_ji; + double Cf45_ij, Cf45_ji; //u_ij, u_ji + double A0_ij, A1_ij, A2_ij, A2_ji, A3_ij, A3_ji; + single_body_parameters *sbp_i, *sbp_j; + two_body_parameters *twbp; + bond_order_data *bo_ij, *bo_ji; + + int tid = omp_get_thread_num(); + + /* Calculate Deltaprime, Deltaprime_boc values */ +#pragma omp for schedule(static) + for (i = 0; i < system->N; ++i) { + type_i = system->my_atoms[i].type; + if(type_i < 0) continue; + sbp_i = &(system->reax_param.sbp[type_i]); + workspace->Deltap[i] = workspace->total_bond_order[i] - sbp_i->valency; + workspace->Deltap_boc[i] = + workspace->total_bond_order[i] - sbp_i->valency_val; + + workspace->total_bond_order[i] = 0; + } + + // Wait till initialization complete +#pragma omp barrier + + /* Corrected Bond Order calculations */ +//#pragma omp for schedule(dynamic,50) +#pragma omp for schedule(guided) + for (i = 0; i < system->N; ++i) { + type_i = system->my_atoms[i].type; + if(type_i < 0) continue; + sbp_i = &(system->reax_param.sbp[type_i]); + val_i = sbp_i->valency; + Deltap_i = workspace->Deltap[i]; + Deltap_boc_i = workspace->Deltap_boc[i]; + start_i = Start_Index(i, bonds); + end_i = End_Index(i, bonds); + + for (pj = start_i; pj < end_i; ++pj) { + j = bonds->select.bond_list[pj].nbr; + type_j = system->my_atoms[j].type; + if(type_j < 0) continue; + bo_ij = &( bonds->select.bond_list[pj].bo_data ); + + if( i < j || workspace->bond_mark[j] > 3) { + twbp = &( system->reax_param.tbp[type_i][type_j] ); + + if( twbp->ovc < 0.001 && twbp->v13cor < 0.001 ) { + bo_ij->C1dbo = 1.000000; + bo_ij->C2dbo = 0.000000; + bo_ij->C3dbo = 0.000000; + + bo_ij->C1dbopi = bo_ij->BO_pi; + bo_ij->C2dbopi = 0.000000; + bo_ij->C3dbopi = 0.000000; + bo_ij->C4dbopi = 0.000000; + + bo_ij->C1dbopi2 = bo_ij->BO_pi2; + bo_ij->C2dbopi2 = 0.000000; + bo_ij->C3dbopi2 = 0.000000; + bo_ij->C4dbopi2 = 0.000000; + + } + else { + val_j = system->reax_param.sbp[type_j].valency; + Deltap_j = workspace->Deltap[j]; + Deltap_boc_j = workspace->Deltap_boc[j]; + + /* on page 1 */ + if( twbp->ovc >= 0.001 ) { + /* Correction for overcoordination */ + exp_p1i = exp( -p_boc1 * Deltap_i ); + exp_p2i = exp( -p_boc2 * Deltap_i ); + exp_p1j = exp( -p_boc1 * Deltap_j ); + exp_p2j = exp( -p_boc2 * Deltap_j ); + + f2 = exp_p1i + exp_p1j; + f3 = -1.0 / p_boc2 * log( 0.5 * ( exp_p2i + exp_p2j ) ); + f1 = 0.5 * ( ( val_i + f2 )/( val_i + f2 + f3 ) + + ( val_j + f2 )/( val_j + f2 + f3 ) ); + + /* Now come the derivates */ + /* Bond Order pages 5-7, derivative of f1 */ + temp = f2 + f3; + u1_ij = val_i + temp; + u1_ji = val_j + temp; + Cf1A_ij = 0.5 * f3 * (1.0 / SQR( u1_ij ) + + 1.0 / SQR( u1_ji )); + Cf1B_ij = -0.5 * (( u1_ij - f3 ) / SQR( u1_ij ) + + ( u1_ji - f3 ) / SQR( u1_ji )); + + Cf1_ij = 0.50 * ( -p_boc1 * exp_p1i / u1_ij - + ((val_i+f2) / SQR(u1_ij)) * + ( -p_boc1 * exp_p1i + + exp_p2i / ( exp_p2i + exp_p2j ) ) + + -p_boc1 * exp_p1i / u1_ji - + ((val_j+f2) / SQR(u1_ji)) * + ( -p_boc1 * exp_p1i + + exp_p2i / ( exp_p2i + exp_p2j ) )); + + + Cf1_ji = -Cf1A_ij * p_boc1 * exp_p1j + + Cf1B_ij * exp_p2j / ( exp_p2i + exp_p2j ); + } + else { + /* No overcoordination correction! */ + f1 = 1.0; + Cf1_ij = Cf1_ji = 0.0; + } + + if( twbp->v13cor >= 0.001 ) { + /* Correction for 1-3 bond orders */ + exp_f4 =exp(-(twbp->p_boc4 * SQR( bo_ij->BO ) - + Deltap_boc_i) * twbp->p_boc3 + twbp->p_boc5); + exp_f5 =exp(-(twbp->p_boc4 * SQR( bo_ij->BO ) - + Deltap_boc_j) * twbp->p_boc3 + twbp->p_boc5); + + f4 = 1. / (1. + exp_f4); + f5 = 1. / (1. + exp_f5); + f4f5 = f4 * f5; + + /* Bond Order pages 8-9, derivative of f4 and f5 */ + Cf45_ij = -f4 * exp_f4; + Cf45_ji = -f5 * exp_f5; + } + else { + f4 = f5 = f4f5 = 1.0; + Cf45_ij = Cf45_ji = 0.0; + } + + /* Bond Order page 10, derivative of total bond order */ + A0_ij = f1 * f4f5; + A1_ij = -2 * twbp->p_boc3 * twbp->p_boc4 * bo_ij->BO * + (Cf45_ij + Cf45_ji); + A2_ij = Cf1_ij / f1 + twbp->p_boc3 * Cf45_ij; + A2_ji = Cf1_ji / f1 + twbp->p_boc3 * Cf45_ji; + A3_ij = A2_ij + Cf1_ij / f1; + A3_ji = A2_ji + Cf1_ji / f1; + + /* find corrected bond orders and their derivative coef */ + bo_ij->BO = bo_ij->BO * A0_ij; + bo_ij->BO_pi = bo_ij->BO_pi * A0_ij *f1; + bo_ij->BO_pi2= bo_ij->BO_pi2* A0_ij *f1; + bo_ij->BO_s = bo_ij->BO - ( bo_ij->BO_pi + bo_ij->BO_pi2 ); + + bo_ij->C1dbo = A0_ij + bo_ij->BO * A1_ij; + bo_ij->C2dbo = bo_ij->BO * A2_ij; + bo_ij->C3dbo = bo_ij->BO * A2_ji; + + bo_ij->C1dbopi = f1*f1*f4*f5; + bo_ij->C2dbopi = bo_ij->BO_pi * A1_ij; + bo_ij->C3dbopi = bo_ij->BO_pi * A3_ij; + bo_ij->C4dbopi = bo_ij->BO_pi * A3_ji; + + bo_ij->C1dbopi2 = f1*f1*f4*f5; + bo_ij->C2dbopi2 = bo_ij->BO_pi2 * A1_ij; + bo_ij->C3dbopi2 = bo_ij->BO_pi2 * A3_ij; + bo_ij->C4dbopi2 = bo_ij->BO_pi2 * A3_ji; + } + + /* neglect bonds that are < 1e-10 */ + if( bo_ij->BO < 1e-10 ) + bo_ij->BO = 0.0; + if( bo_ij->BO_s < 1e-10 ) + bo_ij->BO_s = 0.0; + if( bo_ij->BO_pi < 1e-10 ) + bo_ij->BO_pi = 0.0; + if( bo_ij->BO_pi2 < 1e-10 ) + bo_ij->BO_pi2 = 0.0; + + workspace->total_bond_order[i] += bo_ij->BO; //now keeps total_BO + } + // else { + // /* We only need to update bond orders from bo_ji + // everything else is set in uncorrected_bo calculations */ + // sym_index = bonds->select.bond_list[pj].sym_index; + // bo_ji = &(bonds->select.bond_list[ sym_index ].bo_data); + // bo_ij->BO = bo_ji->BO; + // bo_ij->BO_s = bo_ji->BO_s; + // bo_ij->BO_pi = bo_ji->BO_pi; + // bo_ij->BO_pi2 = bo_ji->BO_pi2; + + // workspace->total_bond_order[i] += bo_ij->BO;// now keeps total_BO + // } + } + + } + + // Wait for bo_ij to be updated +#pragma omp barrier + + // Try to combine the following for-loop back into the for-loop above + /*-------------------------*/ +#pragma omp for schedule(guided) + for (i = 0; i < system->N; ++i) { + type_i = system->my_atoms[i].type; + if(type_i < 0) continue; + start_i = Start_Index(i, bonds); + end_i = End_Index(i, bonds); + + for (pj = start_i; pj < end_i; ++pj) { + j = bonds->select.bond_list[pj].nbr; + type_j = system->my_atoms[j].type; + if(type_j < 0) continue; + + if( i < j || workspace->bond_mark[j] > 3) { + // Computed in previous for-loop + } else { + /* We only need to update bond orders from bo_ji + everything else is set in uncorrected_bo calculations */ + sym_index = bonds->select.bond_list[pj].sym_index; + + bo_ij = &( bonds->select.bond_list[pj].bo_data ); + bo_ji = &(bonds->select.bond_list[ sym_index ].bo_data); + bo_ij->BO = bo_ji->BO; + bo_ij->BO_s = bo_ji->BO_s; + bo_ij->BO_pi = bo_ji->BO_pi; + bo_ij->BO_pi2 = bo_ji->BO_pi2; + + workspace->total_bond_order[i] += bo_ij->BO;// now keeps total_BO + } + } + + } + + /*-------------------------*/ + + // Need to wait for total_bond_order to be accumulated. +#pragma omp barrier + + /* Calculate some helper variables that are used at many places + throughout force calculations */ +#pragma omp for schedule(guided) + for(j = 0; j < system->N; ++j ) { + type_j = system->my_atoms[j].type; + if(type_j < 0) continue; + sbp_j = &(system->reax_param.sbp[ type_j ]); + + workspace->Delta[j] = workspace->total_bond_order[j] - sbp_j->valency; + workspace->Delta_e[j] = workspace->total_bond_order[j] - sbp_j->valency_e; + workspace->Delta_boc[j] = workspace->total_bond_order[j] - + sbp_j->valency_boc; + workspace->Delta_val[j] = workspace->total_bond_order[j] - + sbp_j->valency_val; + + workspace->vlpex[j] = workspace->Delta_e[j] - + 2.0 * (int)(workspace->Delta_e[j]/2.0); + explp1 = exp(-p_lp1 * SQR(2.0 + workspace->vlpex[j])); + workspace->nlp[j] = explp1 - (int)(workspace->Delta_e[j] / 2.0); + workspace->Delta_lp[j] = sbp_j->nlp_opt - workspace->nlp[j]; + workspace->Clp[j] = 2.0 * p_lp1 * explp1 * (2.0 + workspace->vlpex[j]); + workspace->dDelta_lp[j] = workspace->Clp[j]; + + if( sbp_j->mass > 21.0 ) { + workspace->nlp_temp[j] = 0.5 * (sbp_j->valency_e - sbp_j->valency); + workspace->Delta_lp_temp[j] = sbp_j->nlp_opt - workspace->nlp_temp[j]; + workspace->dDelta_lp_temp[j] = 0.; + } + else { + workspace->nlp_temp[j] = workspace->nlp[j]; + workspace->Delta_lp_temp[j] = sbp_j->nlp_opt - workspace->nlp_temp[j]; + workspace->dDelta_lp_temp[j] = workspace->Clp[j]; + } + } + + } // parallel region + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEBOINDEX] += (endTimeBase-startTimeBase); + +#endif +} diff --git a/src/USER-OMP/reaxc_bond_orders_omp.h b/src/USER-OMP/reaxc_bond_orders_omp.h new file mode 100644 index 0000000000..272309cadd --- /dev/null +++ b/src/USER-OMP/reaxc_bond_orders_omp.h @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#ifndef __BOND_ORDERS_OMP_H_ +#define __BOND_ORDERS_OMP_H_ + +#include "reaxc_types.h" +#include "reaxc_bond_orders.h" + +void Add_dBond_to_ForcesOMP( reax_system*, int, int, storage*, reax_list** ); +void Add_dBond_to_Forces_NPTOMP( reax_system *system, int, int, simulation_data*, + storage*, reax_list** ); + +int BOp_OMP(storage*, reax_list*, double, int, int, far_neighbor_data*, + single_body_parameters*, single_body_parameters*, two_body_parameters*, + int, double, double, double, double, double, double, double); + +void BOOMP( reax_system*, control_params*, simulation_data*, + storage*, reax_list**, output_controls* ); +#endif diff --git a/src/USER-OMP/reaxc_bonds_omp.cpp b/src/USER-OMP/reaxc_bonds_omp.cpp new file mode 100644 index 0000000000..4dc666b3ee --- /dev/null +++ b/src/USER-OMP/reaxc_bonds_omp.cpp @@ -0,0 +1,174 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#include "pair_reaxc_omp.h" +#include + +#include "reaxc_bonds_omp.h" +#include "reaxc_bond_orders_omp.h" +#include "reaxc_list.h" +#include "reaxc_tool_box.h" +#include "reaxc_vector.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +void BondsOMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, reax_list **lists, + output_controls *out_control ) +{ +#ifdef OMP_TIMING + double endTimeBase, startTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + int natoms = system->n; + int nthreads = control->nthreads; + reax_list *bonds = (*lists) + BONDS; + double gp3 = system->reax_param.gp.l[3]; + double gp4 = system->reax_param.gp.l[4]; + double gp7 = system->reax_param.gp.l[7]; + double gp10 = system->reax_param.gp.l[10]; + double gp37 = (int) system->reax_param.gp.l[37]; + double total_Ebond = 0.0; + +#pragma omp parallel default(shared) reduction(+: total_Ebond) + { + int i, j, pj; + int start_i, end_i; + int type_i, type_j; + double ebond, ebond_thr=0.0, pow_BOs_be2, exp_be12, CEbo; + double gp3, gp4, gp7, gp10, gp37; + double exphu, exphua1, exphub1, exphuov, hulpov, estriph, estriph_thr=0.0; + double decobdbo, decobdboua, decobdboub; + single_body_parameters *sbp_i, *sbp_j; + two_body_parameters *twbp; + bond_order_data *bo_ij; + int tid = omp_get_thread_num(); + long reductionOffset = (system->N * tid); + + class PairReaxCOMP *pair_reax_ptr; + pair_reax_ptr = static_cast(system->pair_ptr); + class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); + + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, natoms, + system->pair_ptr->eatom, system->pair_ptr->vatom, thr); + +#pragma omp for schedule(guided) + for (i = 0; i < natoms; ++i) { + start_i = Start_Index(i, bonds); + end_i = End_Index(i, bonds); + + for (pj = start_i; pj < end_i; ++pj) { + j = bonds->select.bond_list[pj].nbr; + + if( system->my_atoms[i].orig_id > system->my_atoms[j].orig_id ) continue; + + if( system->my_atoms[i].orig_id == system->my_atoms[j].orig_id ) { + if (system->my_atoms[j].x[2] < system->my_atoms[i].x[2]) continue; + if (system->my_atoms[j].x[2] == system->my_atoms[i].x[2] && + system->my_atoms[j].x[1] < system->my_atoms[i].x[1]) continue; + if (system->my_atoms[j].x[2] == system->my_atoms[i].x[2] && + system->my_atoms[j].x[1] == system->my_atoms[i].x[1] && + system->my_atoms[j].x[0] < system->my_atoms[i].x[0]) continue; + } + + /* set the pointers */ + type_i = system->my_atoms[i].type; + type_j = system->my_atoms[j].type; + sbp_i = &( system->reax_param.sbp[type_i] ); + sbp_j = &( system->reax_param.sbp[type_j] ); + twbp = &( system->reax_param.tbp[type_i][type_j] ); + bo_ij = &( bonds->select.bond_list[pj].bo_data ); + + /* calculate the constants */ + pow_BOs_be2 = pow( bo_ij->BO_s, twbp->p_be2 ); + exp_be12 = exp( twbp->p_be1 * ( 1.0 - pow_BOs_be2 ) ); + CEbo = -twbp->De_s * exp_be12 * + ( 1.0 - twbp->p_be1 * twbp->p_be2 * pow_BOs_be2 ); + + /* calculate the Bond Energy */ + total_Ebond += ebond = + -twbp->De_s * bo_ij->BO_s * exp_be12 + -twbp->De_p * bo_ij->BO_pi + -twbp->De_pp * bo_ij->BO_pi2; + + /* tally into per-atom energy */ + if (system->pair_ptr->evflag) + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, j, natoms, 1, + ebond, 0.0, 0.0, 0.0, 0.0, 0.0, thr); + + /* calculate derivatives of Bond Orders */ + bo_ij->Cdbo += CEbo; + bo_ij->Cdbopi -= (CEbo + twbp->De_p); + bo_ij->Cdbopi2 -= (CEbo + twbp->De_pp); + + /* Stabilisation terminal triple bond */ + if (bo_ij->BO >= 1.00) { + if (gp37 == 2 || + (sbp_i->mass == 12.0000 && sbp_j->mass == 15.9990) || + (sbp_j->mass == 12.0000 && sbp_i->mass == 15.9990)) { + exphu = exp( -gp7 * SQR(bo_ij->BO - 2.50) ); + exphua1 = exp(-gp3 * (workspace->total_bond_order[i]-bo_ij->BO)); + exphub1 = exp(-gp3 * (workspace->total_bond_order[j]-bo_ij->BO)); + exphuov = exp(gp4 * (workspace->Delta[i] + workspace->Delta[j])); + hulpov = 1.0 / (1.0 + 25.0 * exphuov); + + estriph = gp10 * exphu * hulpov * (exphua1 + exphub1); + total_Ebond += estriph; + + decobdbo = gp10 * exphu * hulpov * (exphua1 + exphub1) * + ( gp3 - 2.0 * gp7 * (bo_ij->BO-2.50) ); + decobdboua = -gp10 * exphu * hulpov * + (gp3*exphua1 + 25.0*gp4*exphuov*hulpov*(exphua1+exphub1)); + decobdboub = -gp10 * exphu * hulpov * + (gp3*exphub1 + 25.0*gp4*exphuov*hulpov*(exphua1+exphub1)); + + /* tally into per-atom energy */ + if (system->pair_ptr->evflag) + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, j, natoms, 1, + estriph, 0.0, 0.0, 0.0, 0.0, 0.0, thr); + + bo_ij->Cdbo += decobdbo; + workspace->CdDelta[i] += decobdboua; + workspace->CdDeltaReduction[reductionOffset+j] += decobdboub; + } + } + } + } // for(i) + + } // omp + + data->my_en.e_bond += total_Ebond; + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEBONDSINDEX] += (endTimeBase-startTimeBase); +#endif + +} diff --git a/src/USER-OMP/reaxc_bonds_omp.h b/src/USER-OMP/reaxc_bonds_omp.h new file mode 100644 index 0000000000..8c07fd8957 --- /dev/null +++ b/src/USER-OMP/reaxc_bonds_omp.h @@ -0,0 +1,35 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#ifndef __BONDS_OMP_H_ +#define __BONDS_OMP_H_ + +#include "reaxc_types.h" + +void BondsOMP( reax_system*, control_params*, simulation_data*, + storage*, reax_list**, output_controls* ); + +#endif diff --git a/src/USER-OMP/reaxc_forces_omp.cpp b/src/USER-OMP/reaxc_forces_omp.cpp new file mode 100644 index 0000000000..1bf04129e0 --- /dev/null +++ b/src/USER-OMP/reaxc_forces_omp.cpp @@ -0,0 +1,637 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#include "pair_reaxc_omp.h" +#include "omp.h" +#include "thr_data.h" + +#include "reaxc_forces_omp.h" +#include "reaxc_bond_orders_omp.h" +#include "reaxc_bonds_omp.h" +#include "reaxc_hydrogen_bonds_omp.h" +#include "reaxc_io_tools.h" +#include "reaxc_list.h" +#include "reaxc_lookup.h" +#include "reaxc_multi_body_omp.h" +#include "reaxc_nonbonded_omp.h" +#include "reaxc_tool_box.h" +#include "reaxc_torsion_angles_omp.h" +#include "reaxc_valence_angles_omp.h" +#include "reaxc_vector.h" + +using namespace LAMMPS_NS; + +// Functions defined in reaxc_forces.cpp +extern interaction_function Interaction_Functions[]; +extern double Compute_H(double, double, double*); +extern double Compute_tabH(double, int, int); +extern void Dummy_Interaction(reax_system*, control_params*, simulation_data*, storage*, reax_list**, output_controls*); + +/* ---------------------------------------------------------------------- */ + +void Init_Force_FunctionsOMP( control_params *control ) +{ + Interaction_Functions[0] = BOOMP; + Interaction_Functions[1] = BondsOMP; //Dummy_Interaction; + Interaction_Functions[2] = Atom_EnergyOMP; //Dummy_Interaction; + Interaction_Functions[3] = Valence_AnglesOMP; //Dummy_Interaction; + Interaction_Functions[4] = Torsion_AnglesOMP; //Dummy_Interaction; + if( control->hbond_cut > 0 ) + Interaction_Functions[5] = Hydrogen_BondsOMP; + else Interaction_Functions[5] = Dummy_Interaction; + Interaction_Functions[6] = Dummy_Interaction; //empty + Interaction_Functions[7] = Dummy_Interaction; //empty + Interaction_Functions[8] = Dummy_Interaction; //empty + Interaction_Functions[9] = Dummy_Interaction; //empty +} + +/* ---------------------------------------------------------------------- */ + +// Only difference with MPI-only version is inclusion of OMP_TIMING statements +void Compute_Bonded_ForcesOMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, + reax_list **lists, output_controls *out_control, + MPI_Comm comm ) +{ + int i; + +#ifdef OMP_TIMING + double startTimeBase, endTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + /* Implement all force calls as function pointers */ + for( i = 0; i < NUM_INTRS; i++ ) { + (Interaction_Functions[i])( system, control, data, workspace, + lists, out_control ); + } + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEBFINDEX] += (endTimeBase-startTimeBase); +#endif + +} + +// Only difference with MPI-only version is inclusion of OMP_TIMING statements +void Compute_NonBonded_ForcesOMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, + reax_list **lists, output_controls *out_control, + MPI_Comm comm ) +{ + /* van der Waals and Coulomb interactions */ +#ifdef OMP_TIMING + double endTimeBase, startTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + if( control->tabulate == 0 ) + vdW_Coulomb_Energy_OMP( system, control, data, workspace, + lists, out_control ); + else + Tabulated_vdW_Coulomb_Energy_OMP( system, control, data, workspace, + lists, out_control ); + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTENBFINDEX] += (endTimeBase-startTimeBase); +#endif +} + +/* ---------------------------------------------------------------------- */ + +/* this version of Compute_Total_Force computes forces from + coefficients accumulated by all interaction functions. + Saves enormous time & space! */ +void Compute_Total_ForceOMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, + reax_list **lists, mpi_datatypes *mpi_data ) +{ +#ifdef OMP_TIMING + double startTimeBase,endTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + int natoms = system->N; + int nthreads = control->nthreads; + long totalReductionSize = system->N * nthreads; + reax_list *bonds = (*lists) + BONDS; + +#pragma omp parallel default(shared) //default(none) + { + int i, j, k, pj, pk, start_j, end_j; + int tid = omp_get_thread_num(); + bond_order_data *bo_jk; + + class PairReaxCOMP *pair_reax_ptr; + pair_reax_ptr = static_cast(system->pair_ptr); + class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); + + pair_reax_ptr->ev_setup_thr_proxy(0, 1, natoms, system->pair_ptr->eatom, + system->pair_ptr->vatom, thr); + +#pragma omp for schedule(guided) + for (i = 0; i < system->N; ++i) { + for (j = 0; j < nthreads; ++j) + workspace->CdDelta[i] += workspace->CdDeltaReduction[system->N*j+i]; + } + +#pragma omp for schedule(dynamic,50) + for (j = 0; j < system->N; ++j) { + start_j = Start_Index(j, bonds); + end_j = End_Index(j, bonds); + + for (pk = start_j; pk < end_j; ++pk) { + bo_jk = &( bonds->select.bond_list[pk].bo_data ); + for (k = 0; k < nthreads; ++k) + bo_jk->Cdbo += bo_jk->CdboReduction[k]; + } + } + +// #pragma omp for schedule(guided) //(dynamic,50) +// for (i = 0; i < system->N; ++i) +// for (pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj) +// if (i < bonds->select.bond_list[pj].nbr) { +// if (control->virial == 0) +// Add_dBond_to_ForcesOMP( system, i, pj, workspace, lists ); +// else +// Add_dBond_to_Forces_NPTOMP(system, i, pj, data, workspace, lists ); +// } + + if(control->virial == 0) { + +#pragma omp for schedule(dynamic,50) + for (i = 0; i < system->N; ++i) { + const int startj = Start_Index(i, bonds); + const int endj = End_Index(i, bonds); + for (pj = startj; pj < endj; ++pj) + if (i < bonds->select.bond_list[pj].nbr) + Add_dBond_to_ForcesOMP( system, i, pj, workspace, lists ); + } + + } else { + +#pragma omp for schedule(dynamic,50) + for (i = 0; i < system->N; ++i) { + const int startj = Start_Index(i, bonds); + const int endj = End_Index(i, bonds); + for (pj = startj; pj < endj; ++pj) + if (i < bonds->select.bond_list[pj].nbr) + Add_dBond_to_Forces_NPTOMP(system, i, pj, data, workspace, lists ); + } + + } // if(virial == 0) + + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, 0, 1, thr); + +#pragma omp for schedule(guided) + for (i = 0; i < system->N; ++i) { + for (j = 0; j < nthreads; ++j) + rvec_Add( workspace->f[i], workspace->forceReduction[system->N*j+i] ); + } + + +#pragma omp for schedule(guided) + for (i = 0; i < totalReductionSize; i++) { + workspace->forceReduction[i][0] = 0; + workspace->forceReduction[i][1] = 0; + workspace->forceReduction[i][2] = 0; + workspace->CdDeltaReduction[i] = 0; + } + } // parallel region + + if (control->virial) + for (int i=0; i < nthreads; ++i) { + rvec_Add(data->my_ext_press, workspace->my_ext_pressReduction[i]); + workspace->my_ext_pressReduction[i][0] = 0; + workspace->my_ext_pressReduction[i][1] = 0; + workspace->my_ext_pressReduction[i][2] = 0; + } + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTETFINDEX] += (endTimeBase-startTimeBase); +#endif +} + +/* ---------------------------------------------------------------------- */ + +void Validate_ListsOMP( reax_system *system, storage *workspace, reax_list **lists, + int step, int n, int N, int numH, MPI_Comm comm ) +{ + int i, comp, Hindex; + reax_list *bonds, *hbonds; + reallocate_data *realloc = &(workspace->realloc); + double saferzone = system->saferzone; + +#pragma omp parallel default(shared) private(i, comp, Hindex) + { + + /* bond list */ + if( N > 0 ) { + bonds = *lists + BONDS; + +#pragma omp for schedule(guided) + for( i = 0; i < N; ++i ) { + system->my_atoms[i].num_bonds = MAX(Num_Entries(i,bonds)*2, MIN_BONDS); + + if( i < N-1 ) + comp = Start_Index(i+1, bonds); + else comp = bonds->num_intrs; + + if( End_Index(i, bonds) > comp ) { + fprintf( stderr, "step%d-bondchk failed: i=%d end(i)=%d str(i+1)=%d\n", + step, i, End_Index(i,bonds), comp ); + MPI_Abort( comm, INSUFFICIENT_MEMORY ); + } + } + } + + + /* hbonds list */ + if( numH > 0 ) { + hbonds = *lists + HBONDS; + +#pragma omp for schedule(guided) + for( i = 0; i < n; ++i ) { + Hindex = system->my_atoms[i].Hindex; + if( Hindex > -1 ) { + system->my_atoms[i].num_hbonds = + (int)(MAX( Num_Entries(Hindex, hbonds)*saferzone, MIN_HBONDS )); + + if( Hindex < numH-1 ) + comp = Start_Index(Hindex+1, hbonds); + else comp = hbonds->num_intrs; + + if( End_Index(Hindex, hbonds) > comp ) { + fprintf(stderr,"step%d-hbondchk failed: H=%d end(H)=%d str(H+1)=%d\n", + step, Hindex, End_Index(Hindex,hbonds), comp ); + MPI_Abort( comm, INSUFFICIENT_MEMORY ); + } + } + } + } + + } // omp parallel +} + + +void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, + reax_list **lists, output_controls *out_control, + MPI_Comm comm ) { +#ifdef OMP_TIMING + double startTimeBase, endTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + int i, j, pi, pj; + int start_i, end_i, start_j, end_j; + int type_i, type_j; + int ihb, jhb, ihb_top, jhb_top; + int local, flag; + double r_ij, cutoff; + single_body_parameters *sbp_i, *sbp_j; + two_body_parameters *twbp; + far_neighbor_data *nbr_pj; + reax_atom *atom_i, *atom_j; + bond_data *ibond, *jbond; + reax_list *far_nbrs = *lists + FAR_NBRS; + reax_list *bonds = *lists + BONDS; + reax_list *hbonds = *lists + HBONDS; + int num_bonds = 0; + int num_hbonds = 0; + int btop_i = 0; + int btop_j = 0; + int renbr = (data->step-data->prev_steps) % control->reneighbor == 0; + + // We will use CdDeltaReduction as a temporary (double) buffer to accumulate total_bond_order + // This is safe because CdDeltaReduction is currently zeroed and its accumulation doesn't start until BondsOMP() + double * tmp_bond_order = workspace->CdDeltaReduction; + + // We do the same with forceReduction as a temporary (rvec) buffer to accumulate dDeltap_self + // This is safe because forceReduction is currently zeroed and its accumulation does start until Hydrogen_BondsOMP() + rvec * tmp_ddelta = workspace->forceReduction; + + /* uncorrected bond orders */ + cutoff = control->bond_cut; + +#pragma omp parallel default(shared) \ + private(i, atom_i, type_i, pi, start_i, end_i, sbp_i, btop_i, ibond, ihb, ihb_top, \ + j, atom_j, type_j, pj, start_j, end_j, sbp_j, nbr_pj, jbond, jhb, twbp) + { + + int nthreads = control->nthreads; + int tid = omp_get_thread_num(); + long reductionOffset = system->N * tid; + long totalReductionSize = system->N * nthreads; + +#pragma omp for schedule(dynamic,50) reduction(+ : num_bonds) +//#pragma omp for schedule(guided) reduction(+ : num_bonds) + for (i = 0; i < system->N; ++i) { + atom_i = &(system->my_atoms[i]); + type_i = atom_i->type; + sbp_i = &(system->reax_param.sbp[type_i]); + + start_i = Start_Index(i, far_nbrs); + end_i = End_Index(i, far_nbrs); + + for( pj = start_i; pj < end_i; ++pj ) { + nbr_pj = &( far_nbrs->select.far_nbr_list[pj] ); + if (nbr_pj->d <= cutoff) { + j = nbr_pj->nbr; + atom_j = &(system->my_atoms[j]); + type_j = atom_j->type; + sbp_j = &(system->reax_param.sbp[type_j]); + twbp = &(system->reax_param.tbp[type_i][type_j]); + +// #pragma omp critical +// { +// btop_i = End_Index(i, bonds); +// if( BOp(workspace, bonds, control->bo_cut, i, btop_i, nbr_pj, sbp_i, sbp_j, twbp) ) { +// num_bonds++; +// btop_i++; +// Set_End_Index(i, btop_i, bonds); +// } + +// } + + // Trying to minimize time spent in critical section by moving initial part of BOp() + // outside of critical section. + + // Start top portion of BOp() + int jj = nbr_pj->nbr; + double C12, C34, C56; + double BO, BO_s, BO_pi, BO_pi2; + double bo_cut = control->bo_cut; + + if( sbp_i->r_s > 0.0 && sbp_j->r_s > 0.0 ) { + C12 = twbp->p_bo1 * pow( nbr_pj->d / twbp->r_s, twbp->p_bo2 ); + BO_s = (1.0 + bo_cut) * exp( C12 ); + } + else BO_s = C12 = 0.0; + + if( sbp_i->r_pi > 0.0 && sbp_j->r_pi > 0.0 ) { + C34 = twbp->p_bo3 * pow( nbr_pj->d / twbp->r_p, twbp->p_bo4 ); + BO_pi = exp( C34 ); + } + else BO_pi = C34 = 0.0; + + if( sbp_i->r_pi_pi > 0.0 && sbp_j->r_pi_pi > 0.0 ) { + C56 = twbp->p_bo5 * pow( nbr_pj->d / twbp->r_pp, twbp->p_bo6 ); + BO_pi2= exp( C56 ); + } + else BO_pi2 = C56 = 0.0; + + /* Initially BO values are the uncorrected ones, page 1 */ + BO = BO_s + BO_pi + BO_pi2; + // End top portion of BOp() + + if(BO >= bo_cut) { + int btop_j; + + // Update indices in critical section +#pragma omp critical + { + btop_i = End_Index( i, bonds ); + btop_j = End_Index( j, bonds ); + Set_End_Index( j, btop_j+1, bonds ); + Set_End_Index( i, btop_i+1, bonds ); + } // omp critical + + // Finish remaining BOp() work + BOp_OMP(workspace, bonds, bo_cut, + i , btop_i, nbr_pj, sbp_i, sbp_j, twbp, btop_j, + C12, C34, C56, BO, BO_s, BO_pi, BO_pi2); + + bond_data * ibond = &(bonds->select.bond_list[btop_i]); + bond_order_data * bo_ij = &(ibond->bo_data); + + bond_data * jbond = &(bonds->select.bond_list[btop_j]); + bond_order_data * bo_ji = &(jbond->bo_data); + + workspace->total_bond_order[i] += bo_ij->BO; + tmp_bond_order[reductionOffset + j] += bo_ji->BO; + + rvec_Add(workspace->dDeltap_self[i], bo_ij->dBOp); + rvec_Add(tmp_ddelta[reductionOffset + j], bo_ji->dBOp); + + btop_i++; + num_bonds++; + } // if(BO>=bo_cut) + + } // if(cutoff) + + } // for(pj) + } // for(i) + + // Need to wait for all indices and tmp arrays accumulated. +#pragma omp barrier + +#pragma omp for schedule(dynamic,50) + for(i=0; iN; i++) + for(int t=0; tN + i; + workspace->dDeltap_self[i][0] += tmp_ddelta[indx][0]; + workspace->dDeltap_self[i][1] += tmp_ddelta[indx][1]; + workspace->dDeltap_self[i][2] += tmp_ddelta[indx][2]; + workspace->total_bond_order[i] += tmp_bond_order[indx]; + } + + // Not needed anymore with newest BOp_OMP()? + //#pragma omp for schedule(guided) +// #pragma omp for schedule(dynamic,50) +// for (i = 0; i < system->N; ++i) { +// start_i = Start_Index(i, bonds); +// end_i = End_Index(i, bonds); + +// for (pi = start_i; pi < end_i; ++pi) { +// ibond = &(bonds->select.bond_list[pi]); +// j = ibond->nbr; + +// if (i < j) { +// start_j = Start_Index(j, bonds); +// end_j = End_Index(j, bonds); + +// for (pj = start_j; pj < end_j; ++pj) { +// jbond = &(bonds->select.bond_list[pj]); + +// if (jbond->nbr == i) { +// ibond->sym_index = pj; +// jbond->sym_index = pi; +// break; +// } +// } +// } +// } +// } + + /* hydrogen bond list */ + if (control->hbond_cut > 0) { + cutoff = control->hbond_cut; + +//#pragma omp for schedule(guided) reduction(+ : num_hbonds) +#pragma omp for schedule(dynamic,50) reduction(+ : num_hbonds) + for (i = 0; i < system->n; ++i) { + atom_i = &(system->my_atoms[i]); + type_i = atom_i->type; + sbp_i = &(system->reax_param.sbp[type_i]); + ihb = sbp_i->p_hbond; + +#pragma omp critical + { + + if (ihb == 1 || ihb == 2) { + start_i = Start_Index(i, far_nbrs); + end_i = End_Index(i, far_nbrs); + + for (pj = start_i; pj < end_i; ++pj) { + nbr_pj = &( far_nbrs->select.far_nbr_list[pj] ); + j = nbr_pj->nbr; + atom_j = &(system->my_atoms[j]); + type_j = atom_j->type; + if(type_j < 0) continue; + sbp_j = &(system->reax_param.sbp[type_j]); + jhb = sbp_j->p_hbond; + + if (nbr_pj->d <= control->hbond_cut) { + int iflag = 0; + int jflag = 0; + + if(ihb==1 && jhb==2) iflag = 1; + else if(jn && ihb == 2 && jhb == 1) jflag = 1; + + if(iflag || jflag) { + + // This critical section enforces H-bonds to be added by threads one at a time. +// #pragma omp critical +// { + if(iflag) { + ihb_top = End_Index(atom_i->Hindex, hbonds); + Set_End_Index(atom_i->Hindex, ihb_top+1, hbonds); + } else if(jflag) { + jhb_top = End_Index(atom_j->Hindex, hbonds); + Set_End_Index(atom_j->Hindex, jhb_top+1, hbonds); + } + // } // omp critical + + if(iflag) { + hbonds->select.hbond_list[ihb_top].nbr = j; + hbonds->select.hbond_list[ihb_top].scl = 1; + hbonds->select.hbond_list[ihb_top].ptr = nbr_pj; + } else if(jflag) { + hbonds->select.hbond_list[jhb_top].nbr = i; + hbonds->select.hbond_list[jhb_top].scl = -1; + hbonds->select.hbond_list[jhb_top].ptr = nbr_pj; + } + + num_hbonds++; + } // if(iflag || jflag) + + } + } + } + + } // omp critical + } + + } // if(control->hbond > 0) + + // Zero buffers for others to use as intended. +#pragma omp for schedule(guided) + for(i=0; irealloc.num_bonds = num_bonds; + workspace->realloc.num_hbonds = num_hbonds; + + Validate_ListsOMP( system, workspace, lists, data->step, + system->n, system->N, system->numH, comm ); + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEIFINDEX] += (endTimeBase-startTimeBase); +#endif +} + +/* ---------------------------------------------------------------------- */ + +void Compute_ForcesOMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, + reax_list **lists, output_controls *out_control, + mpi_datatypes *mpi_data ) +{ + int qeq_flag; + MPI_Comm comm = mpi_data->world; + + // Init Forces +#if defined(LOG_PERFORMANCE) + double t_start = 0; + if( system->my_rank == MASTER_NODE ) + t_start = Get_Time( ); +#endif + + Init_Forces_noQEq_OMP( system, control, data, workspace, + lists, out_control, comm ); + +#if defined(LOG_PERFORMANCE) + //MPI_Barrier( comm ); + if( system->my_rank == MASTER_NODE ) + Update_Timing_Info( &t_start, &(data->timing.init_forces) ); +#endif + + // Bonded Interactions + Compute_Bonded_ForcesOMP( system, control, data, workspace, + lists, out_control, mpi_data->world ); + +#if defined(LOG_PERFORMANCE) + if( system->my_rank == MASTER_NODE ) + Update_Timing_Info( &t_start, &(data->timing.bonded) ); +#endif + + // Nonbonded Interactions + Compute_NonBonded_ForcesOMP( system, control, data, workspace, + lists, out_control, mpi_data->world ); + +#if defined(LOG_PERFORMANCE) + if( system->my_rank == MASTER_NODE ) + Update_Timing_Info( &t_start, &(data->timing.nonb) ); +#endif + + // Total Force + Compute_Total_ForceOMP( system, control, data, workspace, lists, mpi_data ); + +#if defined(LOG_PERFORMANCE) + if( system->my_rank == MASTER_NODE ) + Update_Timing_Info( &t_start, &(data->timing.bonded) ); +#endif +} diff --git a/src/USER-OMP/reaxc_forces_omp.h b/src/USER-OMP/reaxc_forces_omp.h new file mode 100644 index 0000000000..f4941fc7fa --- /dev/null +++ b/src/USER-OMP/reaxc_forces_omp.h @@ -0,0 +1,36 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#ifndef __FORCES_OMP_H_ +#define __FORCES_OMP_H_ + +#include "reaxc_types.h" +#include "reaxc_defs.h" + +void Init_Force_FunctionsOMP( control_params* ); +void Compute_ForcesOMP( reax_system*, control_params*, simulation_data*, + storage*, reax_list**, output_controls*, mpi_datatypes* ); +#endif diff --git a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp new file mode 100644 index 0000000000..5047e2775e --- /dev/null +++ b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp @@ -0,0 +1,242 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#include "pair_reaxc_omp.h" +#include + +#include "reaxc_hydrogen_bonds_omp.h" +#include "reaxc_bond_orders_omp.h" +#include "reaxc_list.h" +#include "reaxc_valence_angles.h" // To access Calculate_Theta() +#include "reaxc_valence_angles_omp.h" // To access Calculate_dCos_ThetaOMP() +#include "reaxc_vector.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +void Hydrogen_BondsOMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, + reax_list **lists, output_controls *out_control ) +{ +#ifdef OMP_TIMING + double endTimeBase, startTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + const int nthreads = control->nthreads; + long totalReductionSize = system->N; + +#pragma omp parallel default(shared) //default(none) + { + int i, j, k, pi, pk; + int type_i, type_j, type_k; + int start_j, end_j, hb_start_j, hb_end_j; + int hblist[MAX_BONDS]; + int itr, top; + int num_hb_intrs = 0; + ivec rel_jk; + double r_jk, theta, cos_theta, sin_xhz4, cos_xhz1, sin_theta2; + double e_hb, e_hb_thr = 0.0, exp_hb2, exp_hb3, CEhb1, CEhb2, CEhb3; + rvec dcos_theta_di, dcos_theta_dj, dcos_theta_dk; + rvec dvec_jk, force, ext_press; + hbond_parameters *hbp; + bond_order_data *bo_ij; + bond_data *pbond_ij; + far_neighbor_data *nbr_jk; + reax_list *bonds, *hbonds; + bond_data *bond_list; + hbond_data *hbond_list; + + // tally variables + double fi_tmp[3], fk_tmp[3], delij[3], delkj[3]; + + bonds = (*lists) + BONDS; + bond_list = bonds->select.bond_list; + hbonds = (*lists) + HBONDS; + hbond_list = hbonds->select.hbond_list; + + int natoms = system->n; + int tid = omp_get_thread_num(); + const int idelta = 1 + natoms/nthreads; + int ifrom = tid*idelta; + int ito = ((ifrom + idelta) > natoms) ? natoms : ifrom + idelta; + + long reductionOffset = (system->N * tid); + + class PairReaxCOMP *pair_reax_ptr; + pair_reax_ptr = static_cast(system->pair_ptr); + + class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); + + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, + natoms, system->pair_ptr->eatom, + system->pair_ptr->vatom, thr); + + /* loops below discover the Hydrogen bonds between i-j-k triplets. + here j is H atom and there has to be some bond between i and j. + Hydrogen bond is between j and k. + so in this function i->X, j->H, k->Z when we map + variables onto the ones in the handout.*/ + // for( j = 0; j < system->n; ++j ) + for( j = ifrom; j < ito; ++j ) { + /* j has to be of type H */ + if( system->reax_param.sbp[system->my_atoms[j].type].p_hbond == 1 ) { + /*set j's variables */ + type_j = system->my_atoms[j].type; + start_j = Start_Index(j, bonds); + end_j = End_Index(j, bonds); + hb_start_j = Start_Index( system->my_atoms[j].Hindex, hbonds ); + hb_end_j = End_Index( system->my_atoms[j].Hindex, hbonds ); + if(type_j < 0) continue; + + top = 0; + for( pi = start_j; pi < end_j; ++pi ) { + pbond_ij = &( bond_list[pi] ); + i = pbond_ij->nbr; + type_i = system->my_atoms[i].type; + if(type_i < 0) continue; + bo_ij = &(pbond_ij->bo_data); + + if( system->reax_param.sbp[type_i].p_hbond == 2 && + bo_ij->BO >= HB_THRESHOLD ) + hblist[top++] = pi; + } + + for( pk = hb_start_j; pk < hb_end_j; ++pk ) { + /* set k's varibles */ + k = hbond_list[pk].nbr; + type_k = system->my_atoms[k].type; + if(type_k < 0) continue; + nbr_jk = hbond_list[pk].ptr; + r_jk = nbr_jk->d; + rvec_Scale( dvec_jk, hbond_list[pk].scl, nbr_jk->dvec ); + + for( itr = 0; itr < top; ++itr ) { + pi = hblist[itr]; + pbond_ij = &( bonds->select.bond_list[pi] ); + i = pbond_ij->nbr; + + if( system->my_atoms[i].orig_id != system->my_atoms[k].orig_id ) { + bo_ij = &(pbond_ij->bo_data); + type_i = system->my_atoms[i].type; + if(type_i < 0) continue; + hbp = &(system->reax_param.hbp[ type_i ][ type_j ][ type_k ]); + ++num_hb_intrs; + + Calculate_Theta( pbond_ij->dvec, pbond_ij->d, dvec_jk, r_jk, + &theta, &cos_theta ); + /* the derivative of cos(theta) */ + Calculate_dCos_ThetaOMP( pbond_ij->dvec, pbond_ij->d, dvec_jk, r_jk, + &dcos_theta_di, &dcos_theta_dj, + &dcos_theta_dk ); + + /* hydrogen bond energy*/ + sin_theta2 = sin( theta/2.0 ); + sin_xhz4 = SQR(sin_theta2); + sin_xhz4 *= sin_xhz4; + cos_xhz1 = ( 1.0 - cos_theta ); + exp_hb2 = exp( -hbp->p_hb2 * bo_ij->BO ); + exp_hb3 = exp( -hbp->p_hb3 * ( hbp->r0_hb / r_jk + + r_jk / hbp->r0_hb - 2.0 ) ); + + e_hb_thr += e_hb = hbp->p_hb1 * (1.0 - exp_hb2) * exp_hb3 * sin_xhz4; + + CEhb1 = hbp->p_hb1 * hbp->p_hb2 * exp_hb2 * exp_hb3 * sin_xhz4; + CEhb2 = -hbp->p_hb1/2.0 * (1.0 - exp_hb2) * exp_hb3 * cos_xhz1; + CEhb3 = -hbp->p_hb3 * + (-hbp->r0_hb / SQR(r_jk) + 1.0 / hbp->r0_hb) * e_hb; + + /* hydrogen bond forces */ + bo_ij->Cdbo += CEhb1; // dbo term + + if( control->virial == 0 ) { + // dcos terms + rvec_ScaledAdd(workspace->forceReduction[reductionOffset+i], +CEhb2, dcos_theta_di ); + rvec_ScaledAdd(workspace->forceReduction[reductionOffset+j], +CEhb2, dcos_theta_dj ); + rvec_ScaledAdd(workspace->forceReduction[reductionOffset+k], +CEhb2, dcos_theta_dk ); + // dr terms + rvec_ScaledAdd(workspace->forceReduction[reductionOffset+j], -CEhb3/r_jk, dvec_jk ); + rvec_ScaledAdd(workspace->forceReduction[reductionOffset+k], +CEhb3/r_jk, dvec_jk ); + } + else { + /* for pressure coupling, terms that are not related to bond order + derivatives are added directly into pressure vector/tensor */ + rvec_Scale( force, +CEhb2, dcos_theta_di ); // dcos terms + rvec_Add(workspace->forceReduction[reductionOffset+i], force ); + rvec_iMultiply( ext_press, pbond_ij->rel_box, force ); + rvec_ScaledAdd( workspace->my_ext_pressReduction[tid],1.0, ext_press ); + + rvec_ScaledAdd(workspace->forceReduction[reductionOffset+j], +CEhb2, dcos_theta_dj ); + + ivec_Scale( rel_jk, hbond_list[pk].scl, nbr_jk->rel_box ); + rvec_Scale( force, +CEhb2, dcos_theta_dk ); + rvec_Add(workspace->forceReduction[reductionOffset+k], force ); + rvec_iMultiply( ext_press, rel_jk, force ); + rvec_ScaledAdd( workspace->my_ext_pressReduction[tid],1.0, ext_press ); + // dr terms + rvec_ScaledAdd(workspace->forceReduction[reductionOffset+j],-CEhb3/r_jk, dvec_jk ); + + rvec_Scale( force, CEhb3/r_jk, dvec_jk ); + rvec_Add(workspace->forceReduction[reductionOffset+k], force ); + rvec_iMultiply( ext_press, rel_jk, force ); + rvec_ScaledAdd( workspace->my_ext_pressReduction[tid],1.0, ext_press ); + } + + /* tally into per-atom virials */ + if (system->pair_ptr->vflag_atom || system->pair_ptr->evflag) { + rvec_ScaledSum( delij, 1., system->my_atoms[j].x, + -1., system->my_atoms[i].x ); + rvec_ScaledSum( delkj, 1., system->my_atoms[j].x, + -1., system->my_atoms[k].x ); + + rvec_Scale(fi_tmp, CEhb2, dcos_theta_di); + rvec_Scale(fk_tmp, CEhb2, dcos_theta_dk); + rvec_ScaledAdd(fk_tmp, CEhb3/r_jk, dvec_jk); + + pair_reax_ptr->ev_tally3_thr_proxy(system->pair_ptr,i,j,k,e_hb,0.0,fi_tmp,fk_tmp,delij,delkj,thr); + } + } + } + } + + } + } +#pragma omp critical + { + data->my_en.e_hb += e_hb_thr; + } + + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, thr); +} + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEHBONDSINDEX] += (endTimeBase-startTimeBase); +#endif +} diff --git a/src/USER-OMP/reaxc_hydrogen_bonds_omp.h b/src/USER-OMP/reaxc_hydrogen_bonds_omp.h new file mode 100644 index 0000000000..b4a2d78dbb --- /dev/null +++ b/src/USER-OMP/reaxc_hydrogen_bonds_omp.h @@ -0,0 +1,35 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#ifndef __HBONDS_OMP_H_ +#define __HBONDS_OMP_H_ + +#include "reaxc_types.h" + +void Hydrogen_BondsOMP( reax_system*, control_params*, simulation_data*, + storage*, reax_list**, output_controls* ); + +#endif diff --git a/src/USER-OMP/reaxc_init_md_omp.cpp b/src/USER-OMP/reaxc_init_md_omp.cpp new file mode 100644 index 0000000000..1584d5e53e --- /dev/null +++ b/src/USER-OMP/reaxc_init_md_omp.cpp @@ -0,0 +1,188 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#include "pair_reaxc_omp.h" +#include "reaxc_init_md_omp.h" +#include "reaxc_allocate.h" +#include "reaxc_forces.h" +#include "reaxc_forces_omp.h" +#include "reaxc_io_tools.h" +#include "reaxc_list.h" +#include "reaxc_lookup.h" +#include "reaxc_reset_tools.h" +#include "reaxc_system_props.h" +#include "reaxc_tool_box.h" +#include "reaxc_vector.h" +#include "omp.h" + +// Functions definedd in reaxc_init_md.cpp +extern int Init_MPI_Datatypes(reax_system*, storage*, mpi_datatypes*, MPI_Comm, char*); +extern int Init_System(reax_system*, control_params*, char*); +extern int Init_Simulation_Data(reax_system*, control_params*, simulation_data*, char*); +extern int Init_Workspace(reax_system*, control_params*, storage*, MPI_Comm, char*); + +/* ---------------------------------------------------------------------- */ + +int Init_ListsOMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, reax_list **lists, + mpi_datatypes *mpi_data, char *msg ) +{ + int i, total_hbonds, total_bonds, bond_cap, num_3body, cap_3body, Htop; + int *hb_top, *bond_top; + MPI_Comm comm; + + int TWICE = 2; + int mincap = system->mincap; + double safezone = system->safezone; + double saferzone = system->saferzone; + + comm = mpi_data->world; + bond_top = (int*) calloc( system->total_cap, sizeof(int) ); + hb_top = (int*) calloc( system->local_cap, sizeof(int) ); + Estimate_Storages( system, control, lists, + &Htop, hb_top, bond_top, &num_3body, comm ); + + if( control->hbond_cut > 0 ) { + /* init H indexes */ + total_hbonds = 0; + for( i = 0; i < system->n; ++i ) { + system->my_atoms[i].num_hbonds = hb_top[i]; + total_hbonds += hb_top[i]; + } + total_hbonds = (int)(MAX( total_hbonds*saferzone, mincap*MIN_HBONDS )); + + if( !Make_List( system->Hcap, total_hbonds, TYP_HBOND, + *lists+HBONDS, comm ) ) { + fprintf( stderr, "not enough space for hbonds list. terminating!\n" ); + MPI_Abort( comm, INSUFFICIENT_MEMORY ); + } + } + + total_bonds = 0; + for( i = 0; i < system->N; ++i ) { + system->my_atoms[i].num_bonds = bond_top[i]; + total_bonds += bond_top[i]; + } + bond_cap = (int)(MAX( total_bonds*safezone, mincap*MIN_BONDS )); + + if( !Make_List( system->total_cap, bond_cap, TYP_BOND, + *lists+BONDS, comm ) ) { + fprintf( stderr, "not enough space for bonds list. terminating!\n" ); + MPI_Abort( comm, INSUFFICIENT_MEMORY ); + } + + int nthreads = control->nthreads; + reax_list *bonds = (*lists)+BONDS; + + for (i = 0; i < bonds->num_intrs; ++i) + bonds->select.bond_list[i].bo_data.CdboReduction = + (double*) smalloc(sizeof(double)*nthreads, "CdboReduction", comm); + + /* 3bodies list */ + cap_3body = (int)(MAX( num_3body*safezone, MIN_3BODIES )); + if( !Make_List( bond_cap, cap_3body, TYP_THREE_BODY, + *lists+THREE_BODIES, comm ) ){ + + fprintf( stderr, "Problem in initializing angles list. Terminating!\n" ); + MPI_Abort( comm, INSUFFICIENT_MEMORY ); + } + + free( hb_top ); + free( bond_top ); + + return SUCCESS; +} + +/* ---------------------------------------------------------------------- */ + +// The only difference with the MPI-only function is calls to Init_ListsOMP and Init_Force_FunctionsOMP(). +void InitializeOMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, + reax_list **lists, output_controls *out_control, + mpi_datatypes *mpi_data, MPI_Comm comm ) +{ + char msg[MAX_STR]; + + + if( Init_MPI_Datatypes(system, workspace, mpi_data, comm, msg) == FAILURE ) { + fprintf( stderr, "p%d: init_mpi_datatypes: could not create datatypes\n", + system->my_rank ); + fprintf( stderr, "p%d: mpi_data couldn't be initialized! terminating.\n", + system->my_rank ); + MPI_Abort( mpi_data->world, CANNOT_INITIALIZE ); + } + + if( Init_System(system, control, msg) == FAILURE ){ + fprintf( stderr, "p%d: %s\n", system->my_rank, msg ); + fprintf( stderr, "p%d: system could not be initialized! terminating.\n", + system->my_rank ); + MPI_Abort( mpi_data->world, CANNOT_INITIALIZE ); + } + + if( Init_Simulation_Data( system, control, data, msg ) == FAILURE ) { + fprintf( stderr, "p%d: %s\n", system->my_rank, msg ); + fprintf( stderr, "p%d: sim_data couldn't be initialized! terminating.\n", + system->my_rank ); + MPI_Abort( mpi_data->world, CANNOT_INITIALIZE ); + } + + if( Init_Workspace( system, control, workspace, mpi_data->world, msg ) == + FAILURE ) { + fprintf( stderr, "p%d:init_workspace: not enough memory\n", + system->my_rank ); + fprintf( stderr, "p%d:workspace couldn't be initialized! terminating.\n", + system->my_rank ); + MPI_Abort( mpi_data->world, CANNOT_INITIALIZE ); + } + + if( Init_ListsOMP( system, control, data, workspace, lists, mpi_data, msg ) == + FAILURE ) { + fprintf( stderr, "p%d: %s\n", system->my_rank, msg ); + fprintf( stderr, "p%d: system could not be initialized! terminating.\n", + system->my_rank ); + MPI_Abort( mpi_data->world, CANNOT_INITIALIZE ); + } + + if( Init_Output_Files(system,control,out_control,mpi_data,msg)== FAILURE) { + fprintf( stderr, "p%d: %s\n", system->my_rank, msg ); + fprintf( stderr, "p%d: could not open output files! terminating...\n", + system->my_rank ); + MPI_Abort( mpi_data->world, CANNOT_INITIALIZE ); + } + + if( control->tabulate ) { + if( Init_Lookup_Tables( system, control, workspace, mpi_data, msg ) == FAILURE ) { + fprintf( stderr, "p%d: %s\n", system->my_rank, msg ); + fprintf( stderr, "p%d: couldn't create lookup table! terminating.\n", + system->my_rank ); + MPI_Abort( mpi_data->world, CANNOT_INITIALIZE ); + } + } + + + Init_Force_FunctionsOMP( control ); +} + diff --git a/src/USER-OMP/reaxc_init_md_omp.h b/src/USER-OMP/reaxc_init_md_omp.h new file mode 100644 index 0000000000..bb4e9c7061 --- /dev/null +++ b/src/USER-OMP/reaxc_init_md_omp.h @@ -0,0 +1,34 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#ifndef __INIT_MD_OMP_H_ +#define __INIT_MD_OMP_H_ + +#include "reaxc_types.h" + +void InitializeOMP( reax_system*, control_params*, simulation_data*, storage*, + reax_list**, output_controls*, mpi_datatypes*, MPI_Comm ); +#endif diff --git a/src/USER-OMP/reaxc_multi_body_omp.cpp b/src/USER-OMP/reaxc_multi_body_omp.cpp new file mode 100644 index 0000000000..a355ce8609 --- /dev/null +++ b/src/USER-OMP/reaxc_multi_body_omp.cpp @@ -0,0 +1,285 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#include "pair_reaxc_omp.h" +#include +#include "thr_data.h" + +#include "reaxc_multi_body_omp.h" +#include "reaxc_bond_orders_omp.h" +#include "reaxc_list.h" +#include "reaxc_vector.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +void Atom_EnergyOMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, reax_list **lists, + output_controls *out_control ) +{ +#ifdef OMP_TIMING + double endTimeBase, startTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + /* Initialize parameters */ + double p_lp1 = system->reax_param.gp.l[15]; + double p_lp3 = system->reax_param.gp.l[5]; + double p_ovun3 = system->reax_param.gp.l[32]; + double p_ovun4 = system->reax_param.gp.l[31]; + double p_ovun6 = system->reax_param.gp.l[6]; + double p_ovun7 = system->reax_param.gp.l[8]; + double p_ovun8 = system->reax_param.gp.l[9]; + + int natoms = system->n; + int nthreads = control->nthreads; + reax_list *bonds = (*lists) + BONDS; + + double total_Elp = 0.0; + double total_Eun = 0.0; + double total_Eov = 0.0; + +#pragma omp parallel default(shared) reduction(+:total_Elp, total_Eun, total_Eov) +{ + int i, j, pj, type_i, type_j; + double Delta_lpcorr, dfvl; + double e_lp, expvd2, inv_expvd2, dElp, CElp, DlpVi; + double e_lph, Di, vov3, deahu2dbo, deahu2dsbo; + double e_ov, CEover1, CEover2, CEover3, CEover4; + double exp_ovun1, exp_ovun2, sum_ovun1, sum_ovun2; + double exp_ovun2n, exp_ovun6, exp_ovun8; + double inv_exp_ovun1, inv_exp_ovun2, inv_exp_ovun2n, inv_exp_ovun8; + double e_un, CEunder1, CEunder2, CEunder3, CEunder4; + double eng_tmp, f_tmp; + double p_lp2, p_ovun2, p_ovun5; + int numbonds; + + single_body_parameters *sbp_i, *sbp_j; + two_body_parameters *twbp; + bond_data *pbond; + bond_order_data *bo_ij; + + int tid = omp_get_thread_num(); + + long reductionOffset = (system->N * tid); + class PairReaxCOMP *pair_reax_ptr; + pair_reax_ptr = static_cast(system->pair_ptr); + class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); + + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, natoms, + system->pair_ptr->eatom, system->pair_ptr->vatom, thr); + +#pragma omp for schedule(guided) + for ( i = 0; i < system->n; ++i) { + type_i = system->my_atoms[i].type; + if(type_i < 0) continue; + sbp_i = &(system->reax_param.sbp[ type_i ]); + + /* lone-pair Energy */ + p_lp2 = sbp_i->p_lp2; + expvd2 = exp( -75 * workspace->Delta_lp[i] ); + inv_expvd2 = 1. / (1. + expvd2 ); + + numbonds = 0; + e_lp = 0.0; + for( pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj ) + numbonds ++; + + /* calculate the energy */ + if(numbonds > 0) + total_Elp += e_lp = + p_lp2 * workspace->Delta_lp[i] * inv_expvd2; + + dElp = p_lp2 * inv_expvd2 + + 75 * p_lp2 * workspace->Delta_lp[i] * expvd2 * SQR(inv_expvd2); + CElp = dElp * workspace->dDelta_lp[i]; + + if(numbonds > 0) workspace->CdDelta[i] += CElp; // lp - 1st term + + /* tally into per-atom energy */ + if( system->pair_ptr->evflag) + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, i, system->n, 1, + e_lp, 0.0, 0.0, 0.0, 0.0, 0.0, thr); + + /* correction for C2 */ + if( p_lp3 > 0.001 && !strcmp(system->reax_param.sbp[type_i].name, "C") ) + for( pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj ) { + j = bonds->select.bond_list[pj].nbr; + type_j = system->my_atoms[j].type; + if(type_j < 0) continue; + + if( !strcmp( system->reax_param.sbp[type_j].name, "C" ) ) { + twbp = &( system->reax_param.tbp[type_i][type_j]); + bo_ij = &( bonds->select.bond_list[pj].bo_data ); + Di = workspace->Delta[i]; + vov3 = bo_ij->BO - Di - 0.040*pow(Di, 4.); + + if( vov3 > 3. ) { + total_Elp += e_lph = p_lp3 * SQR(vov3-3.0); + + deahu2dbo = 2.*p_lp3*(vov3 - 3.); + deahu2dsbo = 2.*p_lp3*(vov3 - 3.)*(-1. - 0.16*pow(Di, 3.)); + + bo_ij->Cdbo += deahu2dbo; + workspace->CdDelta[i] += deahu2dsbo; + + /* tally into per-atom energy */ + if( system->pair_ptr->evflag) + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, j, system->n, 1, + e_lph, 0.0, 0.0, 0.0, 0.0, 0.0, thr); + } + } + } + } +#pragma omp barrier + +#pragma omp for schedule(guided) + for (i = 0; i < system->n; ++i) { + type_i = system->my_atoms[i].type; + if(type_i < 0) continue; + sbp_i = &(system->reax_param.sbp[ type_i ]); + + /* over-coordination energy */ + if( sbp_i->mass > 21.0 ) + dfvl = 0.0; + else dfvl = 1.0; // only for 1st-row elements + + p_ovun2 = sbp_i->p_ovun2; + sum_ovun1 = sum_ovun2 = 0; + for (pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj) { + j = bonds->select.bond_list[pj].nbr; + type_j = system->my_atoms[j].type; + if(type_j < 0) continue; + bo_ij = &(bonds->select.bond_list[pj].bo_data); + twbp = &(system->reax_param.tbp[ type_i ][ type_j ]); + + sum_ovun1 += twbp->p_ovun1 * twbp->De_s * bo_ij->BO; + sum_ovun2 += (workspace->Delta[j] - dfvl*workspace->Delta_lp_temp[j])* + ( bo_ij->BO_pi + bo_ij->BO_pi2 ); + } + + exp_ovun1 = p_ovun3 * exp( p_ovun4 * sum_ovun2 ); + inv_exp_ovun1 = 1.0 / (1 + exp_ovun1); + Delta_lpcorr = workspace->Delta[i] - + (dfvl * workspace->Delta_lp_temp[i]) * inv_exp_ovun1; + + exp_ovun2 = exp( p_ovun2 * Delta_lpcorr ); + inv_exp_ovun2 = 1.0 / (1.0 + exp_ovun2); + + DlpVi = 1.0 / (Delta_lpcorr + sbp_i->valency + 1e-8); + CEover1 = Delta_lpcorr * DlpVi * inv_exp_ovun2; + + total_Eov += e_ov = sum_ovun1 * CEover1; + + CEover2 = sum_ovun1 * DlpVi * inv_exp_ovun2 * + (1.0 - Delta_lpcorr * ( DlpVi + p_ovun2 * exp_ovun2 * inv_exp_ovun2 )); + + CEover3 = CEover2 * (1.0 - dfvl * workspace->dDelta_lp[i] * inv_exp_ovun1 ); + + CEover4 = CEover2 * (dfvl * workspace->Delta_lp_temp[i]) * + p_ovun4 * exp_ovun1 * SQR(inv_exp_ovun1); + + + /* under-coordination potential */ + p_ovun2 = sbp_i->p_ovun2; + p_ovun5 = sbp_i->p_ovun5; + + exp_ovun2n = 1.0 / exp_ovun2; + exp_ovun6 = exp( p_ovun6 * Delta_lpcorr ); + exp_ovun8 = p_ovun7 * exp(p_ovun8 * sum_ovun2); + inv_exp_ovun2n = 1.0 / (1.0 + exp_ovun2n); + inv_exp_ovun8 = 1.0 / (1.0 + exp_ovun8); + + numbonds = 0; + e_un = 0.0; + for( pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj ) + numbonds ++; + + if(numbonds > 0) total_Eun += e_un = + -p_ovun5 * (1.0 - exp_ovun6) * inv_exp_ovun2n * inv_exp_ovun8; + + CEunder1 = inv_exp_ovun2n * + ( p_ovun5 * p_ovun6 * exp_ovun6 * inv_exp_ovun8 + + p_ovun2 * e_un * exp_ovun2n ); + CEunder2 = -e_un * p_ovun8 * exp_ovun8 * inv_exp_ovun8; + CEunder3 = CEunder1 * (1.0 - dfvl*workspace->dDelta_lp[i]*inv_exp_ovun1); + CEunder4 = CEunder1 * (dfvl*workspace->Delta_lp_temp[i]) * + p_ovun4 * exp_ovun1 * SQR(inv_exp_ovun1) + CEunder2; + + /* tally into per-atom energy */ + if (system->pair_ptr->evflag) { + eng_tmp = e_ov; + if(numbonds > 0) eng_tmp+= e_un; + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, i, system->n, 1, + eng_tmp, 0.0, 0.0, 0.0, 0.0, 0.0, thr); + } + + /* forces */ + workspace->CdDelta[i] += CEover3; // OvCoor - 2nd term + if(numbonds > 0) workspace->CdDelta[i] += CEunder3; // UnCoor - 1st term + + for (pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj) { + pbond = &(bonds->select.bond_list[pj]); + j = pbond->nbr; + bo_ij = &(pbond->bo_data); + twbp = &(system->reax_param.tbp[ system->my_atoms[i].type ] + [system->my_atoms[pbond->nbr].type]); + + bo_ij->Cdbo += CEover1 * twbp->p_ovun1 * twbp->De_s; // OvCoor-1st + workspace->CdDeltaReduction[reductionOffset+j] += + CEover4 * (1.0 - dfvl*workspace->dDelta_lp[j]) * (bo_ij->BO_pi + bo_ij->BO_pi2); // OvCoor-3a + + bo_ij->Cdbopi += CEover4 * + (workspace->Delta[j] - dfvl*workspace->Delta_lp_temp[j]); // OvCoor-3b + bo_ij->Cdbopi2 += CEover4 * + (workspace->Delta[j] - dfvl*workspace->Delta_lp_temp[j]); // OvCoor-3b + + workspace->CdDeltaReduction[reductionOffset+j] += + CEunder4 * (1.0 - dfvl*workspace->dDelta_lp[j]) * (bo_ij->BO_pi + bo_ij->BO_pi2); // UnCoor - 2a + + bo_ij->Cdbopi += CEunder4 * + (workspace->Delta[j] - dfvl*workspace->Delta_lp_temp[j]); // UnCoor-2b + bo_ij->Cdbopi2 += CEunder4 * + (workspace->Delta[j] - dfvl*workspace->Delta_lp_temp[j]); // UnCoor-2b + } + } + + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, thr); + + } + + data->my_en.e_lp += total_Elp; + data->my_en.e_ov += total_Eov; + data->my_en.e_un += total_Eun; + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEATOMENERGYINDEX] += (endTimeBase-startTimeBase); +#endif +} diff --git a/src/USER-OMP/reaxc_multi_body_omp.h b/src/USER-OMP/reaxc_multi_body_omp.h new file mode 100644 index 0000000000..b0746569ca --- /dev/null +++ b/src/USER-OMP/reaxc_multi_body_omp.h @@ -0,0 +1,35 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#ifndef __MULTI_BODY_OMP_H_ +#define __MULTI_BODY_OMP_H_ + +#include "reaxc_types.h" + +void Atom_EnergyOMP( reax_system*, control_params*, simulation_data*, + storage*, reax_list**, output_controls* ); + +#endif diff --git a/src/USER-OMP/reaxc_nonbonded_omp.cpp b/src/USER-OMP/reaxc_nonbonded_omp.cpp new file mode 100644 index 0000000000..73dbc1dda4 --- /dev/null +++ b/src/USER-OMP/reaxc_nonbonded_omp.cpp @@ -0,0 +1,383 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#include "pair_reaxc_omp.h" +#include +#include "thr_data.h" + +#include "reaxc_types.h" + +#include "reaxc_nonbonded.h" +#include "reaxc_nonbonded_omp.h" +#include "reaxc_bond_orders_omp.h" +#include "reaxc_list.h" +#include "reaxc_vector.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, + reax_list **lists, output_controls *out_control ) { + + int natoms = system->n; + int nthreads = control->nthreads; + long totalReductionSize = system->N * nthreads; + reax_list *far_nbrs = (*lists) + FAR_NBRS; + double p_vdW1 = system->reax_param.gp.l[28]; + double p_vdW1i = 1.0 / p_vdW1; + double total_EvdW = 0.; + double total_Eele = 0.; + +#pragma omp parallel default(shared) reduction(+: total_EvdW, total_Eele) //default(none) + { + int tid = omp_get_thread_num(); + int i, j, pj; + int start_i, end_i, orig_i, orig_j, flag; + double powr_vdW1, powgi_vdW1; + double tmp, r_ij, fn13, exp1, exp2; + double Tap, dTap, dfn13, CEvd, CEclmb, de_core; + double dr3gamij_1, dr3gamij_3; + double e_ele, e_ele_thr, e_vdW, e_vdW_thr, e_core, SMALL = 0.0001; + double e_lg, de_lg, r_ij5, r_ij6, re6; + rvec temp, ext_press; + two_body_parameters *twbp; + far_neighbor_data *nbr_pj; + + // Tallying variables: + double pe_vdw, f_tmp, delij[3]; + + long reductionOffset = (system->N * tid); + + class PairReaxCOMP *pair_reax_ptr; + pair_reax_ptr = static_cast(system->pair_ptr); + class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); + + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, + natoms, system->pair_ptr->eatom, + system->pair_ptr->vatom, thr); + e_core = 0; + e_vdW = 0; + e_vdW_thr = 0; + e_lg = 0; + de_lg = 0.0; + +//#pragma omp for schedule(dynamic,50) +#pragma omp for schedule(guided) + for( i = 0; i < natoms; ++i ) { + if(system->my_atoms[i].type < 0) continue; + start_i = Start_Index(i, far_nbrs); + end_i = End_Index(i, far_nbrs); + orig_i = system->my_atoms[i].orig_id; + + for( pj = start_i; pj < end_i; ++pj ) { + nbr_pj = &(far_nbrs->select.far_nbr_list[pj]); + j = nbr_pj->nbr; + orig_j = system->my_atoms[j].orig_id; + + flag = 0; + if(nbr_pj->d <= control->nonb_cut) { + if(j < natoms) flag = 1; + else if (orig_i < orig_j) flag = 1; + else if (orig_i == orig_j) { + if (nbr_pj->dvec[2] > SMALL) flag = 1; + else if (fabs(nbr_pj->dvec[2]) < SMALL) { + if (nbr_pj->dvec[1] > SMALL) flag = 1; + else if (fabs(nbr_pj->dvec[1]) < SMALL && nbr_pj->dvec[0] > SMALL) + flag = 1; + } + } + } + + if (flag) { + + r_ij = nbr_pj->d; + twbp = &(system->reax_param.tbp[ system->my_atoms[i].type ] + [ system->my_atoms[j].type ]); + + /* Calculate Taper and its derivative */ + // Tap = nbr_pj->Tap; -- precomputed during compte_H + Tap = workspace->Tap[7] * r_ij + workspace->Tap[6]; + Tap = Tap * r_ij + workspace->Tap[5]; + Tap = Tap * r_ij + workspace->Tap[4]; + Tap = Tap * r_ij + workspace->Tap[3]; + Tap = Tap * r_ij + workspace->Tap[2]; + Tap = Tap * r_ij + workspace->Tap[1]; + Tap = Tap * r_ij + workspace->Tap[0]; + + dTap = 7*workspace->Tap[7] * r_ij + 6*workspace->Tap[6]; + dTap = dTap * r_ij + 5*workspace->Tap[5]; + dTap = dTap * r_ij + 4*workspace->Tap[4]; + dTap = dTap * r_ij + 3*workspace->Tap[3]; + dTap = dTap * r_ij + 2*workspace->Tap[2]; + dTap += workspace->Tap[1]/r_ij; + + /*vdWaals Calculations*/ + if(system->reax_param.gp.vdw_type==1 || system->reax_param.gp.vdw_type==3) + { // shielding + powr_vdW1 = pow(r_ij, p_vdW1); + powgi_vdW1 = pow( 1.0 / twbp->gamma_w, p_vdW1); + + fn13 = pow( powr_vdW1 + powgi_vdW1, p_vdW1i ); + exp1 = exp( twbp->alpha * (1.0 - fn13 / twbp->r_vdW) ); + exp2 = exp( 0.5 * twbp->alpha * (1.0 - fn13 / twbp->r_vdW) ); + + e_vdW = twbp->D * (exp1 - 2.0 * exp2); + total_EvdW += Tap * e_vdW; + + dfn13 = pow( powr_vdW1 + powgi_vdW1, p_vdW1i - 1.0) * + pow(r_ij, p_vdW1 - 2.0); + + CEvd = dTap * e_vdW - + Tap * twbp->D * (twbp->alpha / twbp->r_vdW) * (exp1 - exp2) * dfn13; + } + else{ // no shielding + exp1 = exp( twbp->alpha * (1.0 - r_ij / twbp->r_vdW) ); + exp2 = exp( 0.5 * twbp->alpha * (1.0 - r_ij / twbp->r_vdW) ); + + e_vdW = twbp->D * (exp1 - 2.0 * exp2); + total_EvdW += Tap * e_vdW; + + CEvd = dTap * e_vdW - + Tap * twbp->D * (twbp->alpha / twbp->r_vdW) * (exp1 - exp2) / r_ij; + } + + if(system->reax_param.gp.vdw_type==2 || system->reax_param.gp.vdw_type==3) + { // innner wall + e_core = twbp->ecore * exp(twbp->acore * (1.0-(r_ij/twbp->rcore))); + total_EvdW += Tap * e_core; + + de_core = -(twbp->acore/twbp->rcore) * e_core; + CEvd += dTap * e_core + Tap * de_core / r_ij; + + // lg correction, only if lgvdw is yes + if (control->lgflag) { + r_ij5 = pow( r_ij, 5.0 ); + r_ij6 = pow( r_ij, 6.0 ); + re6 = pow( twbp->lgre, 6.0 ); + + e_lg = -(twbp->lgcij/( r_ij6 + re6 )); + total_EvdW += Tap * e_lg; + + de_lg = -6.0 * e_lg * r_ij5 / ( r_ij6 + re6 ) ; + CEvd += dTap * e_lg + Tap * de_lg / r_ij; + } + + } + + /*Coulomb Calculations*/ + dr3gamij_1 = ( r_ij * r_ij * r_ij + twbp->gamma ); + dr3gamij_3 = pow( dr3gamij_1 , 0.33333333333333 ); + + tmp = Tap / dr3gamij_3; + total_Eele += e_ele = + C_ele * system->my_atoms[i].q * system->my_atoms[j].q * tmp; + + CEclmb = C_ele * system->my_atoms[i].q * system->my_atoms[j].q * + ( dTap - Tap * r_ij / dr3gamij_1 ) / dr3gamij_3; + + /* tally into per-atom energy */ + if( system->pair_ptr->evflag || system->pair_ptr->vflag_atom) { + pe_vdw = Tap * (e_vdW + e_core + e_lg); + rvec_ScaledSum( delij, 1., system->my_atoms[i].x, + -1., system->my_atoms[j].x ); + f_tmp = -(CEvd + CEclmb); + pair_reax_ptr->ev_tally_thr_proxy( system->pair_ptr, i, j, natoms, + 1, pe_vdw, e_ele, f_tmp, + delij[0], delij[1], delij[2], thr); + } + + if( control->virial == 0 ) { + rvec_ScaledAdd( workspace->f[i], -(CEvd + CEclmb), nbr_pj->dvec ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+j], + +(CEvd + CEclmb), nbr_pj->dvec ); + } + else { /* NPT, iNPT or sNPT */ + /* for pressure coupling, terms not related to bond order + derivatives are added directly into pressure vector/tensor */ + + rvec_Scale( temp, CEvd + CEclmb, nbr_pj->dvec ); + rvec_ScaledAdd( workspace->f[reductionOffset+i], -1., temp ); + rvec_Add( workspace->forceReduction[reductionOffset+j], temp); + + rvec_iMultiply( ext_press, nbr_pj->rel_box, temp ); + + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + } + } + } + } + + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, thr); + } // parallel region + + data->my_en.e_vdW = total_EvdW; + data->my_en.e_ele = total_Eele; + + Compute_Polarization_Energy( system, data ); +} + +/* ---------------------------------------------------------------------- */ + +void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *control, + simulation_data *data, storage *workspace, + reax_list **lists, + output_controls *out_control ) { + + double SMALL = 0.0001; + int natoms = system->n; + reax_list *far_nbrs = (*lists) + FAR_NBRS; + int nthreads = control->nthreads; + long totalReductionSize = system->N * nthreads; + double total_EvdW = 0.; + double total_Eele = 0.; + +#pragma omp parallel default(shared) reduction(+:total_EvdW, total_Eele) + { + int i, j, pj, r; + int type_i, type_j, tmin, tmax; + int start_i, end_i, orig_i, orig_j, flag; + double r_ij, base, dif; + double e_vdW, e_ele; + double CEvd, CEclmb; + double f_tmp, delij[3]; + rvec temp, ext_press; + far_neighbor_data *nbr_pj; + LR_lookup_table *t; + int tid = omp_get_thread_num(); + long froffset = (system->N * tid); + + class PairReaxCOMP *pair_reax_ptr; + pair_reax_ptr = static_cast(system->pair_ptr); + class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); + + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, + natoms, system->pair_ptr->eatom, + system->pair_ptr->vatom, thr); + +//#pragma omp for schedule(dynamic,50) +#pragma omp for schedule(guided) + for (i = 0; i < natoms; ++i) { + type_i = system->my_atoms[i].type; + if(type_i < 0) continue; + start_i = Start_Index(i,far_nbrs); + end_i = End_Index(i,far_nbrs); + orig_i = system->my_atoms[i].orig_id; + + for (pj = start_i; pj < end_i; ++pj) { + nbr_pj = &(far_nbrs->select.far_nbr_list[pj]); + j = nbr_pj->nbr; + type_j = system->my_atoms[j].type; + if(type_j < 0) continue; + orig_j = system->my_atoms[j].orig_id; + + flag = 0; + if(nbr_pj->d <= control->nonb_cut) { + if(j < natoms) flag = 1; + else if (orig_i < orig_j) flag = 1; + else if (orig_i == orig_j) { + if (nbr_pj->dvec[2] > SMALL) flag = 1; + else if (fabs(nbr_pj->dvec[2]) < SMALL) { + if (nbr_pj->dvec[1] > SMALL) flag = 1; + else if (fabs(nbr_pj->dvec[1]) < SMALL && nbr_pj->dvec[0] > SMALL) + flag = 1; + } + } + + } + + if (flag) { + + r_ij = nbr_pj->d; + tmin = MIN( type_i, type_j ); + tmax = MAX( type_i, type_j ); + t = &( LR[tmin][tmax] ); + + /* Cubic Spline Interpolation */ + r = (int)(r_ij * t->inv_dx); + if( r == 0 ) ++r; + base = (double)(r+1) * t->dx; + dif = r_ij - base; + + e_vdW = ((t->vdW[r].d*dif + t->vdW[r].c)*dif + t->vdW[r].b)*dif + + t->vdW[r].a; + + e_ele = ((t->ele[r].d*dif + t->ele[r].c)*dif + t->ele[r].b)*dif + + t->ele[r].a; + e_ele *= system->my_atoms[i].q * system->my_atoms[j].q; + + total_EvdW += e_vdW; + total_Eele += e_ele; + + CEvd = ((t->CEvd[r].d*dif + t->CEvd[r].c)*dif + t->CEvd[r].b)*dif + + t->CEvd[r].a; + + CEclmb = ((t->CEclmb[r].d*dif+t->CEclmb[r].c)*dif+t->CEclmb[r].b)*dif + + t->CEclmb[r].a; + CEclmb *= system->my_atoms[i].q * system->my_atoms[j].q; + + /* tally into per-atom energy */ + if( system->pair_ptr->evflag || system->pair_ptr->vflag_atom) { + rvec_ScaledSum( delij, 1., system->my_atoms[i].x, + -1., system->my_atoms[j].x ); + f_tmp = -(CEvd + CEclmb); + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, j, natoms, 1, e_vdW, e_ele, + f_tmp, delij[0], delij[1], delij[2], thr); + } + + if( control->virial == 0 ) { + rvec_ScaledAdd( workspace->f[i], -(CEvd + CEclmb), nbr_pj->dvec ); + rvec_ScaledAdd( workspace->forceReduction[froffset+j], + +(CEvd + CEclmb), nbr_pj->dvec ); + } + else { // NPT, iNPT or sNPT + /* for pressure coupling, terms not related to bond order derivatives + are added directly into pressure vector/tensor */ + rvec_Scale( temp, CEvd + CEclmb, nbr_pj->dvec ); + + rvec_ScaledAdd( workspace->f[i], -1., temp ); + rvec_Add( workspace->forceReduction[froffset+j], temp ); + + rvec_iMultiply( ext_press, nbr_pj->rel_box, temp ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + } + } + } + } + + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, thr); + } // end omp parallel + + data->my_en.e_vdW = total_EvdW; + data->my_en.e_ele = total_Eele; + + Compute_Polarization_Energy( system, data ); +} diff --git a/src/USER-OMP/reaxc_nonbonded_omp.h b/src/USER-OMP/reaxc_nonbonded_omp.h new file mode 100644 index 0000000000..1ea51257cf --- /dev/null +++ b/src/USER-OMP/reaxc_nonbonded_omp.h @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#ifndef __NONBONDED_OMP_H_ +#define __NONBONDED_OMP_H_ + +#include "reaxc_types.h" + +void vdW_Coulomb_Energy_OMP( reax_system*, control_params*, simulation_data*, + storage*, reax_list**, output_controls* ); + +void Tabulated_vdW_Coulomb_Energy_OMP( reax_system*, control_params*, + simulation_data*, storage*, + reax_list**, output_controls* ); +#endif diff --git a/src/USER-OMP/reaxc_torsion_angles_omp.cpp b/src/USER-OMP/reaxc_torsion_angles_omp.cpp new file mode 100644 index 0000000000..294eeb9544 --- /dev/null +++ b/src/USER-OMP/reaxc_torsion_angles_omp.cpp @@ -0,0 +1,467 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#include "pair_reaxc_omp.h" +#include +#include "thr_data.h" + +#include "reaxc_types.h" +#include "reaxc_torsion_angles_omp.h" +#include "reaxc_bond_orders_omp.h" +#include "reaxc_list.h" +#include "reaxc_tool_box.h" +#include "reaxc_vector.h" + +#define MIN_SINE 1e-10 + +using namespace LAMMPS_NS; + +// Functions defined in reaxc_torsion_angles.cpp +extern double Calculate_Omega(rvec, double, rvec, double, rvec, double, rvec, double, + three_body_interaction_data*, three_body_interaction_data*, + rvec, rvec, rvec, rvec, output_controls*); + +/* ---------------------------------------------------------------------- */ + +void Torsion_AnglesOMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, + reax_list **lists, output_controls *out_control ) +{ +#ifdef OMP_TIMING + double endTimeBase, startTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + int natoms = system->n; + reax_list *bonds = (*lists) + BONDS; + reax_list *thb_intrs = (*lists) + THREE_BODIES; + double p_tor2 = system->reax_param.gp.l[23]; + double p_tor3 = system->reax_param.gp.l[24]; + double p_tor4 = system->reax_param.gp.l[25]; + double p_cot2 = system->reax_param.gp.l[27]; + double total_Etor = 0; + double total_Econ = 0; + int nthreads = control->nthreads; + +#pragma omp parallel default(shared) reduction(+: total_Etor, total_Econ) + { + int i, j, k, l, pi, pj, pk, pl, pij, plk; + int type_i, type_j, type_k, type_l; + int start_j, end_j, start_k, end_k; + int start_pj, end_pj, start_pk, end_pk; + int num_frb_intrs = 0; + + double Delta_j, Delta_k; + double r_ij, r_jk, r_kl, r_li; + double BOA_ij, BOA_jk, BOA_kl; + + double exp_tor2_ij, exp_tor2_jk, exp_tor2_kl; + double exp_tor1, exp_tor3_DjDk, exp_tor4_DjDk, exp_tor34_inv; + double exp_cot2_jk, exp_cot2_ij, exp_cot2_kl; + double fn10, f11_DjDk, dfn11, fn12; + double theta_ijk, theta_jkl; + double sin_ijk, sin_jkl; + double cos_ijk, cos_jkl; + double tan_ijk_i, tan_jkl_i; + double omega, cos_omega, cos2omega, cos3omega; + rvec dcos_omega_di, dcos_omega_dj, dcos_omega_dk, dcos_omega_dl; + double CV, cmn, CEtors1, CEtors2, CEtors3, CEtors4; + double CEtors5, CEtors6, CEtors7, CEtors8, CEtors9; + double Cconj, CEconj1, CEconj2, CEconj3; + double CEconj4, CEconj5, CEconj6; + double e_tor, e_con; + rvec dvec_li; + rvec force, ext_press; + ivec rel_box_jl; + // rtensor total_rtensor, temp_rtensor; + four_body_header *fbh; + four_body_parameters *fbp; + bond_data *pbond_ij, *pbond_jk, *pbond_kl; + bond_order_data *bo_ij, *bo_jk, *bo_kl; + three_body_interaction_data *p_ijk, *p_jkl; + + // Virial tallying variables + double delil[3], deljl[3], delkl[3]; + double eng_tmp, f_scaler, fi_tmp[3], fj_tmp[3], fk_tmp[3]; + + int tid = omp_get_thread_num(); + long reductionOffset = (system->N * tid); + int num_thb_intrs = 0; + class PairReaxCOMP *pair_reax_ptr; + pair_reax_ptr = static_cast(system->pair_ptr); + class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); + + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, + system->N, system->pair_ptr->eatom, + system->pair_ptr->vatom, thr); + +#pragma omp for schedule(static) + for (j = 0; j < system->N; ++j) { + start_j = Start_Index(j, bonds); + end_j = End_Index(j, bonds); + + for (pk = start_j; pk < end_j; ++pk) { + bo_jk = &( bonds->select.bond_list[pk].bo_data ); + for (k = 0; k < nthreads; ++k) + bo_jk->CdboReduction[k] = 0.; + } + } + +#pragma omp for schedule(dynamic,50) + for (j = 0; j < natoms; ++j) { + type_j = system->my_atoms[j].type; + Delta_j = workspace->Delta_boc[j]; + start_j = Start_Index(j, bonds); + end_j = End_Index(j, bonds); + + for (pk = start_j; pk < end_j; ++pk) { + pbond_jk = &( bonds->select.bond_list[pk] ); + k = pbond_jk->nbr; + bo_jk = &( pbond_jk->bo_data ); + BOA_jk = bo_jk->BO - control->thb_cut; + + /* see if there are any 3-body interactions involving j&k + where j is the central atom. Otherwise there is no point in + trying to form a 4-body interaction out of this neighborhood */ + if (system->my_atoms[j].orig_id < system->my_atoms[k].orig_id && + bo_jk->BO > control->thb_cut/*0*/ && Num_Entries(pk, thb_intrs)) { + start_k = Start_Index(k, bonds); + end_k = End_Index(k, bonds); + pj = pbond_jk->sym_index; // pj points to j on k's list + + /* do the same check as above: + are there any 3-body interactions involving k&j + where k is the central atom */ + if (Num_Entries(pj, thb_intrs)) { + type_k = system->my_atoms[k].type; + Delta_k = workspace->Delta_boc[k]; + r_jk = pbond_jk->d; + + start_pk = Start_Index(pk, thb_intrs ); + end_pk = End_Index(pk, thb_intrs ); + start_pj = Start_Index(pj, thb_intrs ); + end_pj = End_Index(pj, thb_intrs ); + + exp_tor2_jk = exp( -p_tor2 * BOA_jk ); + exp_cot2_jk = exp( -p_cot2 * SQR(BOA_jk - 1.5) ); + exp_tor3_DjDk = exp( -p_tor3 * (Delta_j + Delta_k) ); + exp_tor4_DjDk = exp( p_tor4 * (Delta_j + Delta_k) ); + exp_tor34_inv = 1.0 / (1.0 + exp_tor3_DjDk + exp_tor4_DjDk); + f11_DjDk = (2.0 + exp_tor3_DjDk) * exp_tor34_inv; + + + /* pick i up from j-k interaction where j is the central atom */ + for (pi = start_pk; pi < end_pk; ++pi) { + p_ijk = &( thb_intrs->select.three_body_list[pi] ); + pij = p_ijk->pthb; // pij is pointer to i on j's bond_list + pbond_ij = &( bonds->select.bond_list[pij] ); + bo_ij = &( pbond_ij->bo_data ); + + if (bo_ij->BO > control->thb_cut/*0*/) { + i = p_ijk->thb; + type_i = system->my_atoms[i].type; + r_ij = pbond_ij->d; + BOA_ij = bo_ij->BO - control->thb_cut; + + theta_ijk = p_ijk->theta; + sin_ijk = sin( theta_ijk ); + cos_ijk = cos( theta_ijk ); + //tan_ijk_i = 1. / tan( theta_ijk ); + if( sin_ijk >= 0 && sin_ijk <= MIN_SINE ) + tan_ijk_i = cos_ijk / MIN_SINE; + else if( sin_ijk <= 0 && sin_ijk >= -MIN_SINE ) + tan_ijk_i = cos_ijk / -MIN_SINE; + else tan_ijk_i = cos_ijk / sin_ijk; + + exp_tor2_ij = exp( -p_tor2 * BOA_ij ); + exp_cot2_ij = exp( -p_cot2 * SQR(BOA_ij -1.5) ); + + + /* pick l up from j-k interaction where k is the central atom */ + for (pl = start_pj; pl < end_pj; ++pl) { + p_jkl = &( thb_intrs->select.three_body_list[pl] ); + l = p_jkl->thb; + plk = p_jkl->pthb; //pointer to l on k's bond_list! + pbond_kl = &( bonds->select.bond_list[plk] ); + bo_kl = &( pbond_kl->bo_data ); + type_l = system->my_atoms[l].type; + fbh = &(system->reax_param.fbp[type_i][type_j] + [type_k][type_l]); + fbp = &(system->reax_param.fbp[type_i][type_j] + [type_k][type_l].prm[0]); + + if (i != l && fbh->cnt && + bo_kl->BO > control->thb_cut/*0*/ && + bo_ij->BO * bo_jk->BO * bo_kl->BO > control->thb_cut/*0*/) { + ++num_frb_intrs; + //fprintf(stderr, + // "%5d: %6d %6d %6d %6d\n", num_frb_intrs, + // system->my_atoms[i].orig_id,system->my_atoms[j].orig_id, + // system->my_atoms[k].orig_id,system->my_atoms[l].orig_id); + + r_kl = pbond_kl->d; + BOA_kl = bo_kl->BO - control->thb_cut; + + theta_jkl = p_jkl->theta; + sin_jkl = sin( theta_jkl ); + cos_jkl = cos( theta_jkl ); + //tan_jkl_i = 1. / tan( theta_jkl ); + if( sin_jkl >= 0 && sin_jkl <= MIN_SINE ) + tan_jkl_i = cos_jkl / MIN_SINE; + else if( sin_jkl <= 0 && sin_jkl >= -MIN_SINE ) + tan_jkl_i = cos_jkl / -MIN_SINE; + else tan_jkl_i = cos_jkl /sin_jkl; + + rvec_ScaledSum( dvec_li, 1., system->my_atoms[i].x, + -1., system->my_atoms[l].x ); + r_li = rvec_Norm( dvec_li ); + + + /* omega and its derivative */ + omega = Calculate_Omega( pbond_ij->dvec, r_ij, + pbond_jk->dvec, r_jk, + pbond_kl->dvec, r_kl, + dvec_li, r_li, + p_ijk, p_jkl, + dcos_omega_di, dcos_omega_dj, + dcos_omega_dk, dcos_omega_dl, + out_control ); + + cos_omega = cos( omega ); + cos2omega = cos( 2. * omega ); + cos3omega = cos( 3. * omega ); + /* end omega calculations */ + + /* torsion energy */ + exp_tor1 = exp( fbp->p_tor1 * + SQR(2.0 - bo_jk->BO_pi - f11_DjDk) ); + exp_tor2_kl = exp( -p_tor2 * BOA_kl ); + exp_cot2_kl = exp( -p_cot2 * SQR(BOA_kl - 1.5) ); + fn10 = (1.0 - exp_tor2_ij) * (1.0 - exp_tor2_jk) * + (1.0 - exp_tor2_kl); + + CV = 0.5 * ( fbp->V1 * (1.0 + cos_omega) + + fbp->V2 * exp_tor1 * (1.0 - cos2omega) + + fbp->V3 * (1.0 + cos3omega) ); + + total_Etor += e_tor = fn10 * sin_ijk * sin_jkl * CV; + + dfn11 = (-p_tor3 * exp_tor3_DjDk + + (p_tor3 * exp_tor3_DjDk - p_tor4 * exp_tor4_DjDk) * + (2.0 + exp_tor3_DjDk) * exp_tor34_inv) * + exp_tor34_inv; + + CEtors1 = sin_ijk * sin_jkl * CV; + + CEtors2 = -fn10 * 2.0 * fbp->p_tor1 * fbp->V2 * exp_tor1 * + (2.0 - bo_jk->BO_pi - f11_DjDk) * (1.0 - SQR(cos_omega)) * + sin_ijk * sin_jkl; + CEtors3 = CEtors2 * dfn11; + + CEtors4 = CEtors1 * p_tor2 * exp_tor2_ij * + (1.0 - exp_tor2_jk) * (1.0 - exp_tor2_kl); + CEtors5 = CEtors1 * p_tor2 * + (1.0 - exp_tor2_ij) * exp_tor2_jk * (1.0 - exp_tor2_kl); + CEtors6 = CEtors1 * p_tor2 * + (1.0 - exp_tor2_ij) * (1.0 - exp_tor2_jk) * exp_tor2_kl; + + cmn = -fn10 * CV; + CEtors7 = cmn * sin_jkl * tan_ijk_i; + CEtors8 = cmn * sin_ijk * tan_jkl_i; + + CEtors9 = fn10 * sin_ijk * sin_jkl * + (0.5 * fbp->V1 - 2.0 * fbp->V2 * exp_tor1 * cos_omega + + 1.5 * fbp->V3 * (cos2omega + 2.0 * SQR(cos_omega))); + /* end of torsion energy */ + + + /* 4-body conjugation energy */ + fn12 = exp_cot2_ij * exp_cot2_jk * exp_cot2_kl; + //data->my_en.e_con += e_con = + total_Econ += e_con = + fbp->p_cot1 * fn12 * + (1.0 + (SQR(cos_omega) - 1.0) * sin_ijk * sin_jkl); + + Cconj = -2.0 * fn12 * fbp->p_cot1 * p_cot2 * + (1.0 + (SQR(cos_omega) - 1.0) * sin_ijk * sin_jkl); + + CEconj1 = Cconj * (BOA_ij - 1.5e0); + CEconj2 = Cconj * (BOA_jk - 1.5e0); + CEconj3 = Cconj * (BOA_kl - 1.5e0); + + CEconj4 = -fbp->p_cot1 * fn12 * + (SQR(cos_omega) - 1.0) * sin_jkl * tan_ijk_i; + CEconj5 = -fbp->p_cot1 * fn12 * + (SQR(cos_omega) - 1.0) * sin_ijk * tan_jkl_i; + CEconj6 = 2.0 * fbp->p_cot1 * fn12 * + cos_omega * sin_ijk * sin_jkl; + /* end 4-body conjugation energy */ + + /* FORCES */ + bo_jk->Cdbopi += CEtors2; + workspace->CdDelta[j] += CEtors3; + //workspace->CdDelta[k] += CEtors3; + workspace->CdDeltaReduction[reductionOffset+k] += CEtors3; + bo_ij->Cdbo += (CEtors4 + CEconj1); + bo_jk->Cdbo += (CEtors5 + CEconj2); + //bo_kl->Cdbo += (CEtors6 + CEconj3); + bo_kl->CdboReduction[tid] += (CEtors6 + CEconj3); + + if( control->virial == 0 ) { + /* dcos_theta_ijk */ + rvec_ScaledAdd( workspace->f[j], + CEtors7 + CEconj4, p_ijk->dcos_dj ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+i], + CEtors7 + CEconj4, p_ijk->dcos_dk ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+k], + CEtors7 + CEconj4, p_ijk->dcos_di ); + + /* dcos_theta_jkl */ + rvec_ScaledAdd( workspace->f[j], + CEtors8 + CEconj5, p_jkl->dcos_di ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+k], + CEtors8 + CEconj5, p_jkl->dcos_dj ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+l], + CEtors8 + CEconj5, p_jkl->dcos_dk ); + + /* dcos_omega */ + rvec_ScaledAdd( workspace->f[j], + CEtors9 + CEconj6, dcos_omega_dj ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+i], + CEtors9 + CEconj6, dcos_omega_di ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+k], + CEtors9 + CEconj6, dcos_omega_dk ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+l], + CEtors9 + CEconj6, dcos_omega_dl ); + } + else { + ivec_Sum(rel_box_jl, pbond_jk->rel_box, pbond_kl->rel_box); + + /* dcos_theta_ijk */ + rvec_Scale( force, CEtors7 + CEconj4, p_ijk->dcos_dk ); + rvec_Add( workspace->forceReduction[reductionOffset+i], force ); + rvec_iMultiply( ext_press, pbond_ij->rel_box, force ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + + rvec_ScaledAdd( workspace->f[j], + CEtors7 + CEconj4, p_ijk->dcos_dj ); + + rvec_Scale( force, CEtors7 + CEconj4, p_ijk->dcos_di ); + rvec_Add( workspace->forceReduction[reductionOffset+k], force ); + rvec_iMultiply( ext_press, pbond_jk->rel_box, force ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + + /* dcos_theta_jkl */ + rvec_ScaledAdd( workspace->f[j], + CEtors8 + CEconj5, p_jkl->dcos_di ); + + rvec_Scale( force, CEtors8 + CEconj5, p_jkl->dcos_dj ); + rvec_Add( workspace->forceReduction[reductionOffset+k], force ); + rvec_iMultiply( ext_press, pbond_jk->rel_box, force ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + + rvec_Scale( force, CEtors8 + CEconj5, p_jkl->dcos_dk ); + rvec_Add( workspace->forceReduction[reductionOffset+l], force ); + rvec_iMultiply( ext_press, rel_box_jl, force ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + + /* dcos_omega */ + rvec_Scale( force, CEtors9 + CEconj6, dcos_omega_di ); + rvec_Add( workspace->forceReduction[reductionOffset+i], force ); + rvec_iMultiply( ext_press, pbond_ij->rel_box, force ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + + rvec_ScaledAdd( workspace->f[j], + CEtors9 + CEconj6, dcos_omega_dj ); + + rvec_Scale( force, CEtors9 + CEconj6, dcos_omega_dk ); + rvec_Add( workspace->forceReduction[reductionOffset+k], force ); + rvec_iMultiply( ext_press, pbond_jk->rel_box, force ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + + rvec_Scale( force, CEtors9 + CEconj6, dcos_omega_dl ); + rvec_Add( workspace->forceReduction[reductionOffset+i], force ); + rvec_iMultiply( ext_press, rel_box_jl, force ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + } + + /* tally into per-atom virials */ + if( system->pair_ptr->vflag_atom || system->pair_ptr->evflag) { + + // acquire vectors + rvec_ScaledSum( delil, 1., system->my_atoms[l].x, + -1., system->my_atoms[i].x ); + rvec_ScaledSum( deljl, 1., system->my_atoms[l].x, + -1., system->my_atoms[j].x ); + rvec_ScaledSum( delkl, 1., system->my_atoms[l].x, + -1., system->my_atoms[k].x ); + // dcos_theta_ijk + rvec_Scale( fi_tmp, CEtors7 + CEconj4, p_ijk->dcos_dk ); + rvec_Scale( fj_tmp, CEtors7 + CEconj4, p_ijk->dcos_dj ); + rvec_Scale( fk_tmp, CEtors7 + CEconj4, p_ijk->dcos_di ); + + // dcos_theta_jkl + rvec_ScaledAdd( fj_tmp, CEtors8 + CEconj5, p_jkl->dcos_di ); + rvec_ScaledAdd( fk_tmp, CEtors8 + CEconj5, p_jkl->dcos_dj ); + + // dcos_omega + rvec_ScaledAdd( fi_tmp, CEtors9 + CEconj6, dcos_omega_di ); + rvec_ScaledAdd( fj_tmp, CEtors9 + CEconj6, dcos_omega_dj ); + rvec_ScaledAdd( fk_tmp, CEtors9 + CEconj6, dcos_omega_dk ); + + // tally + eng_tmp = e_tor + e_con; + + if (system->pair_ptr->evflag) + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, j, k, system->n, 1, + eng_tmp, 0.0, 0.0, 0.0, 0.0, 0.0, thr); + + // NEED TO MAKE AN OMP VERSION OF THIS CALL! + if (system->pair_ptr->vflag_atom) + system->pair_ptr->v_tally4(i, j, k, l, fi_tmp, fj_tmp, fk_tmp, + delil, deljl, delkl ); + } + + } // pl check ends + } // pl loop ends + } // pi check ends + } // pi loop ends + } // k-j neighbor check ends + } // jmy_en.e_tor = total_Etor; + data->my_en.e_con = total_Econ; + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTETORSIONANGLESBOINDEX] += (endTimeBase-startTimeBase); +#endif +} diff --git a/src/USER-OMP/reaxc_torsion_angles_omp.h b/src/USER-OMP/reaxc_torsion_angles_omp.h new file mode 100644 index 0000000000..51b05f7ae1 --- /dev/null +++ b/src/USER-OMP/reaxc_torsion_angles_omp.h @@ -0,0 +1,36 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#ifndef __TORSION_ANGLES_OMP_H_ +#define __TORSION_ANGLES_OMP_H_ + +#include "reaxc_types.h" +#include "reaxc_torsion_angles.h" + +void Torsion_AnglesOMP( reax_system*, control_params*, simulation_data*, + storage*, reax_list**, output_controls* ); + +#endif diff --git a/src/USER-OMP/reaxc_valence_angles_omp.cpp b/src/USER-OMP/reaxc_valence_angles_omp.cpp new file mode 100644 index 0000000000..7c45db1493 --- /dev/null +++ b/src/USER-OMP/reaxc_valence_angles_omp.cpp @@ -0,0 +1,613 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#include "pair_reaxc_omp.h" +#include +#include "thr_data.h" + +#include "reaxc_types.h" +#include "reaxc_valence_angles.h" +#include "reaxc_valence_angles_omp.h" +#include "reaxc_bond_orders_omp.h" +#include "reaxc_list.h" +#include "reaxc_vector.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +void Calculate_dCos_ThetaOMP( rvec dvec_ji, double d_ji, rvec dvec_jk, double d_jk, + rvec* dcos_theta_di, + rvec* dcos_theta_dj, + rvec* dcos_theta_dk ) +{ + int t; + double sqr_d_ji = SQR(d_ji); + double sqr_d_jk = SQR(d_jk); + double inv_dists = 1.0 / (d_ji * d_jk); + double inv_dists3 = inv_dists * inv_dists * inv_dists; + double dot_dvecs = dvec_ji[0]*dvec_jk[0] + dvec_ji[1]*dvec_jk[1] + dvec_ji[2]*dvec_jk[2]; + double Cdot_inv3 = dot_dvecs * inv_dists3; + + double csqr_jk = Cdot_inv3 * sqr_d_jk; + double csqr_ji = Cdot_inv3 * sqr_d_ji; + + // Try to help compiler out by unrolling + // x-component + double dinv_jk = dvec_jk[0] * inv_dists; + double dinv_ji = dvec_ji[0] * inv_dists; + + double cdev_ji = csqr_jk * dvec_ji[0]; + double cdev_jk = csqr_ji * dvec_jk[0]; + + (*dcos_theta_di)[0] = dinv_jk - cdev_ji; + (*dcos_theta_dj)[0] = -(dinv_jk + dinv_ji) + cdev_ji + cdev_jk; + (*dcos_theta_dk)[0] = dinv_ji - cdev_jk; + + // y-component + dinv_jk = dvec_jk[1] * inv_dists; + dinv_ji = dvec_ji[1] * inv_dists; + + cdev_ji = csqr_jk * dvec_ji[1]; + cdev_jk = csqr_ji * dvec_jk[1]; + + (*dcos_theta_di)[1] = dinv_jk - cdev_ji; + (*dcos_theta_dj)[1] = -(dinv_jk + dinv_ji) + cdev_ji + cdev_jk; + (*dcos_theta_dk)[1] = dinv_ji - cdev_jk; + + // z-component + dinv_jk = dvec_jk[2] * inv_dists; + dinv_ji = dvec_ji[2] * inv_dists; + + cdev_ji = csqr_jk * dvec_ji[2]; + cdev_jk = csqr_ji * dvec_jk[2]; + + (*dcos_theta_di)[2] = dinv_jk - cdev_ji; + (*dcos_theta_dj)[2] = -(dinv_jk + dinv_ji) + cdev_ji + cdev_jk; + (*dcos_theta_dk)[2] = dinv_ji - cdev_jk; +} + +/* ---------------------------------------------------------------------- */ + +/* this is a 3-body interaction in which the main role is + played by j which sits in the middle of the other two. */ +void Valence_AnglesOMP( reax_system *system, control_params *control, + simulation_data *data, storage *workspace, + reax_list **lists, output_controls *out_control ) +{ + +#ifdef OMP_TIMING + double endTimeBase, startTimeBase; + startTimeBase = MPI_Wtime(); +#endif + + reax_list *bonds = (*lists) + BONDS; + reax_list *thb_intrs = (*lists) + THREE_BODIES; + + // Precompute and store valence_angle offsets for OpenMP code. + int * _my_offset = workspace->valence_angle_atom_myoffset; + + /* global parameters used in these calculations */ + double p_val6 = system->reax_param.gp.l[14]; + double p_val8 = system->reax_param.gp.l[33]; + double p_val9 = system->reax_param.gp.l[16]; + double p_val10 = system->reax_param.gp.l[17]; + double total_Eang = 0; + double total_Epen = 0; + double total_Ecoa = 0; + + int per_atom = (thb_intrs->num_intrs / system->N); + int nthreads = control->nthreads; + int chunksize = system->N/(nthreads*10); + int num_thb_intrs = 0; + int TWICE = 2; + +#pragma omp parallel default(shared) reduction(+:total_Eang, total_Epen, total_Ecoa, num_thb_intrs) + { + int i, j, pi, k, pk, t; + int type_i, type_j, type_k; + int start_j, end_j, start_pk, end_pk; + int cnt, my_offset, mark; + + double temp, temp_bo_jt, pBOjt7; + double p_val1, p_val2, p_val3, p_val4, p_val5, p_val7; + double p_pen1, p_pen2, p_pen3, p_pen4; + double p_coa1, p_coa2, p_coa3, p_coa4; + double trm8, expval6, expval7, expval2theta, expval12theta, exp3ij, exp3jk; + double exp_pen2ij, exp_pen2jk, exp_pen3, exp_pen4, trm_pen34, exp_coa2; + double dSBO1, dSBO2, SBO, SBO2, CSBO2, SBOp, prod_SBO, vlpadj; + double CEval1, CEval2, CEval3, CEval4, CEval5, CEval6, CEval7, CEval8; + double CEpen1, CEpen2, CEpen3; + double e_ang, e_coa, e_pen; + double CEcoa1, CEcoa2, CEcoa3, CEcoa4, CEcoa5; + double Cf7ij, Cf7jk, Cf8j, Cf9j; + double f7_ij, f7_jk, f8_Dj, f9_Dj; + double Ctheta_0, theta_0, theta_00, theta, cos_theta, sin_theta; + double r_ij, r_jk; + double BOA_ij, BOA_jk; + rvec force, ext_press; + // rtensor temp_rtensor, total_rtensor; + + // Tallying variables + double eng_tmp, f_scaler, fi_tmp[3], fj_tmp[3], fk_tmp[3]; + double delij[3], delkj[3]; + + three_body_header *thbh; + three_body_parameters *thbp; + three_body_interaction_data *p_ijk, *p_kji; + bond_data *pbond_ij, *pbond_jk, *pbond_jt; + bond_order_data *bo_ij, *bo_jk, *bo_jt; + + int tid = omp_get_thread_num(); + long reductionOffset = (system->N * tid); + class PairReaxCOMP *pair_reax_ptr; + pair_reax_ptr = static_cast(system->pair_ptr); + class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); + + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, + system->N, system->pair_ptr->eatom, + system->pair_ptr->vatom, thr); + + + // Run through a minimal for(jnum_intrs / nthreads; + +#pragma omp for schedule(dynamic,50) + for (j = 0; j < system->N; ++j) { + type_j = system->my_atoms[j].type; + _my_offset[j] = 0; + if(type_j < 0) continue; + + start_j = Start_Index(j, bonds); + end_j = End_Index(j, bonds); + + // Always point to start of workspace to count angles + my_offset = tid * per_thread; + + for (pi = start_j; pi < end_j; ++pi) { + Set_Start_Index( pi, my_offset, thb_intrs ); + pbond_ij = &(bonds->select.bond_list[pi]); + bo_ij = &(pbond_ij->bo_data); + BOA_ij = bo_ij->BO - control->thb_cut; + + if (BOA_ij > 0.0) { + i = pbond_ij->nbr; + + /* first copy 3-body intrs from previously computed ones where i>k. + in the second for-loop below, + we compute only new 3-body intrs where i < k */ + for (pk = start_j; pk < pi; ++pk) { + start_pk = Start_Index( pk, thb_intrs ); + end_pk = End_Index( pk, thb_intrs ); + + for (t = start_pk; t < end_pk; ++t) + if (thb_intrs->select.three_body_list[t].thb == i) { + + p_ijk = &(thb_intrs->select.three_body_list[my_offset] ); + p_ijk->thb = bonds->select.bond_list[pk].nbr; + + ++my_offset; + break; + } + } // for(pk) + + /* and this is the second for loop mentioned above */ + for (pk = pi+1; pk < end_j; ++pk) { + pbond_jk = &(bonds->select.bond_list[pk]); + k = pbond_jk->nbr; + + if (j >= system->n && i >= system->n && k >= system->n) continue; + + p_ijk = &( thb_intrs->select.three_body_list[my_offset] ); + p_ijk->thb = k; + + ++my_offset; // add this to the list of 3-body interactions + } // for(pk) + } // if() + + Set_End_Index(pi, my_offset, thb_intrs ); + } // for(pi) + + // Confirm that thb_intrs->num_intrs / nthreads is enough to hold all angles from a single atom + if(my_offset >= (tid+1)*per_thread) { + int me; + MPI_Comm_rank(MPI_COMM_WORLD,&me); + fprintf( stderr, "step%d-ran out of space on angle_list on proc %i for atom %i:", data->step, me, j); + fprintf( stderr, " nthreads= %d, tid=%d, my_offset=%d, per_thread=%d\n", nthreads, tid, my_offset, per_thread); + fprintf( stderr, " num_intrs= %i N= %i\n",thb_intrs->num_intrs , system->N); + MPI_Abort( MPI_COMM_WORLD, INSUFFICIENT_MEMORY ); + } + + // Number of angles owned by this atom + _my_offset[j] = my_offset - tid * per_thread; + } // for(j) + + // Wait for all threads to finish counting angles +#pragma omp barrier + + // Master thread uses angle counts to compute offsets + // This can be threaded +#pragma omp master + { + int current_count = 0; + int m = _my_offset[0]; + _my_offset[0] = current_count; + for(j=1; jN; j++) { + current_count+= m; + m = _my_offset[j]; + _my_offset[j] = current_count; + } + _my_offset[system->N] = current_count + m; // Used to test if last particle has any angles + } + + // All threads wait till master thread finished computing offsets +#pragma omp barrier + + // Original loop, but now using precomputed offsets + // Safe to use all threads available, regardless of threads tasked above + // We also now skip over atoms that have no angles assigned +#pragma omp for schedule(dynamic,50)//(dynamic,chunksize)//(guided) + for (j = 0; j < system->N; ++j) { // Ray: the first one with system->N + type_j = system->my_atoms[j].type; + if(type_j < 0) continue; + + // Skip if no angles for this atom + if(_my_offset[j] == _my_offset[j+1]) continue; + + start_j = Start_Index(j, bonds); + end_j = End_Index(j, bonds); + + type_j = system->my_atoms[j].type; + + my_offset = _my_offset[j]; + + p_val3 = system->reax_param.sbp[ type_j ].p_val3; + p_val5 = system->reax_param.sbp[ type_j ].p_val5; + + SBOp = 0, prod_SBO = 1; + for (t = start_j; t < end_j; ++t) { + bo_jt = &(bonds->select.bond_list[t].bo_data); + SBOp += (bo_jt->BO_pi + bo_jt->BO_pi2); + temp = SQR( bo_jt->BO ); + temp *= temp; + temp *= temp; + prod_SBO *= exp( -temp ); + } + + // modifications to match Adri's code - 09/01/09 + if( workspace->vlpex[j] >= 0 ){ + vlpadj = 0; + dSBO2 = prod_SBO - 1; + } + else{ + vlpadj = workspace->nlp[j]; + dSBO2 = (prod_SBO - 1) * (1 - p_val8 * workspace->dDelta_lp[j]); + } + + SBO = SBOp + (1 - prod_SBO) * (-workspace->Delta_boc[j] - p_val8 * vlpadj); + dSBO1 = -8 * prod_SBO * ( workspace->Delta_boc[j] + p_val8 * vlpadj ); + + if( SBO <= 0 ) + SBO2 = 0, CSBO2 = 0; + else if( SBO > 0 && SBO <= 1 ) { + SBO2 = pow( SBO, p_val9 ); + CSBO2 = p_val9 * pow( SBO, p_val9 - 1 ); + } + else if( SBO > 1 && SBO < 2 ) { + SBO2 = 2 - pow( 2-SBO, p_val9 ); + CSBO2 = p_val9 * pow( 2 - SBO, p_val9 - 1 ); + } + else + SBO2 = 2, CSBO2 = 0; + + expval6 = exp( p_val6 * workspace->Delta_boc[j] ); + + for (pi = start_j; pi < end_j; ++pi) { + Set_Start_Index( pi, my_offset, thb_intrs ); + pbond_ij = &(bonds->select.bond_list[pi]); + bo_ij = &(pbond_ij->bo_data); + BOA_ij = bo_ij->BO - control->thb_cut; + + + if (BOA_ij > 0.0) { + i = pbond_ij->nbr; + r_ij = pbond_ij->d; + type_i = system->my_atoms[i].type; + + + /* first copy 3-body intrs from previously computed ones where i>k. + in the second for-loop below, + we compute only new 3-body intrs where i < k */ + for (pk = start_j; pk < pi; ++pk) { + start_pk = Start_Index( pk, thb_intrs ); + end_pk = End_Index( pk, thb_intrs ); + + for (t = start_pk; t < end_pk; ++t) + if (thb_intrs->select.three_body_list[t].thb == i) { + p_ijk = &(thb_intrs->select.three_body_list[my_offset] ); + p_kji = &(thb_intrs->select.three_body_list[t]); + + p_ijk->thb = bonds->select.bond_list[pk].nbr; + p_ijk->pthb = pk; + p_ijk->theta = p_kji->theta; + rvec_Copy( p_ijk->dcos_di, p_kji->dcos_dk ); + rvec_Copy( p_ijk->dcos_dj, p_kji->dcos_dj ); + rvec_Copy( p_ijk->dcos_dk, p_kji->dcos_di ); + + ++my_offset; + ++num_thb_intrs; + break; + } + } // for(pk) + + + /* and this is the second for loop mentioned above */ + for (pk = pi+1; pk < end_j; ++pk) { + pbond_jk = &(bonds->select.bond_list[pk]); + bo_jk = &(pbond_jk->bo_data); + BOA_jk = bo_jk->BO - control->thb_cut; + k = pbond_jk->nbr; + type_k = system->my_atoms[k].type; + p_ijk = &( thb_intrs->select.three_body_list[my_offset] ); + + // Fix by Sudhir + // if (BOA_jk <= 0) continue; + if (j >= system->n && i >= system->n && k >= system->n) continue; + + Calculate_Theta( pbond_ij->dvec, pbond_ij->d, + pbond_jk->dvec, pbond_jk->d, + &theta, &cos_theta ); + + Calculate_dCos_ThetaOMP( pbond_ij->dvec, pbond_ij->d, + pbond_jk->dvec, pbond_jk->d, + &(p_ijk->dcos_di), &(p_ijk->dcos_dj), + &(p_ijk->dcos_dk) ); + p_ijk->thb = k; + p_ijk->pthb = pk; + p_ijk->theta = theta; + + sin_theta = sin( theta ); + if( sin_theta < 1.0e-5 ) + sin_theta = 1.0e-5; + + ++my_offset; // add this to the list of 3-body interactions + ++num_thb_intrs; + + if ((j < system->n) && (BOA_jk > 0.0) && + (bo_ij->BO > control->thb_cut) && + (bo_jk->BO > control->thb_cut) && + (bo_ij->BO * bo_jk->BO > control->thb_cutsq)) { + r_jk = pbond_jk->d; + thbh = &( system->reax_param.thbp[ type_i ][ type_j ][ type_k ] ); + + for (cnt = 0; cnt < thbh->cnt; ++cnt) { + + if( fabs(thbh->prm[cnt].p_val1) > 0.001 ) { + thbp = &( thbh->prm[cnt] ); + + /* ANGLE ENERGY */ + p_val1 = thbp->p_val1; + p_val2 = thbp->p_val2; + p_val4 = thbp->p_val4; + p_val7 = thbp->p_val7; + theta_00 = thbp->theta_00; + + exp3ij = exp( -p_val3 * pow( BOA_ij, p_val4 ) ); + f7_ij = 1.0 - exp3ij; + Cf7ij = p_val3 * p_val4 * pow( BOA_ij, p_val4 - 1.0 ) * exp3ij; + + exp3jk = exp( -p_val3 * pow( BOA_jk, p_val4 ) ); + f7_jk = 1.0 - exp3jk; + Cf7jk = p_val3 * p_val4 * pow( BOA_jk, p_val4 - 1.0 ) * exp3jk; + + expval7 = exp( -p_val7 * workspace->Delta_boc[j] ); + trm8 = 1.0 + expval6 + expval7; + f8_Dj = p_val5 - ( (p_val5 - 1.0) * (2.0 + expval6) / trm8 ); + Cf8j = ( (1.0 - p_val5) / SQR(trm8) ) * + ( p_val6 * expval6 * trm8 - + (2.0 + expval6) * ( p_val6*expval6 - p_val7*expval7 ) ); + + theta_0 = 180.0 - theta_00 * (1.0 - + exp(-p_val10 * (2.0 - SBO2))); + theta_0 = DEG2RAD( theta_0 ); + + expval2theta = exp( -p_val2 * SQR(theta_0 - theta) ); + if (p_val1 >= 0) + expval12theta = p_val1 * (1.0 - expval2theta); + else // To avoid linear Me-H-Me angles (6/6/06) + expval12theta = p_val1 * -expval2theta; + + CEval1 = Cf7ij * f7_jk * f8_Dj * expval12theta; + CEval2 = Cf7jk * f7_ij * f8_Dj * expval12theta; + CEval3 = Cf8j * f7_ij * f7_jk * expval12theta; + CEval4 = -2.0 * p_val1 * p_val2 * f7_ij * f7_jk * f8_Dj * + expval2theta * (theta_0 - theta); + + Ctheta_0 = p_val10 * DEG2RAD(theta_00) * + exp( -p_val10 * (2.0 - SBO2) ); + + CEval5 = -CEval4 * Ctheta_0 * CSBO2; + CEval6 = CEval5 * dSBO1; + CEval7 = CEval5 * dSBO2; + CEval8 = -CEval4 / sin_theta; + + total_Eang += e_ang = + f7_ij * f7_jk * f8_Dj * expval12theta; + /* END ANGLE ENERGY*/ + + + /* PENALTY ENERGY */ + p_pen1 = thbp->p_pen1; + p_pen2 = system->reax_param.gp.l[19]; + p_pen3 = system->reax_param.gp.l[20]; + p_pen4 = system->reax_param.gp.l[21]; + + exp_pen2ij = exp( -p_pen2 * SQR( BOA_ij - 2.0 ) ); + exp_pen2jk = exp( -p_pen2 * SQR( BOA_jk - 2.0 ) ); + exp_pen3 = exp( -p_pen3 * workspace->Delta[j] ); + exp_pen4 = exp( p_pen4 * workspace->Delta[j] ); + trm_pen34 = 1.0 + exp_pen3 + exp_pen4; + f9_Dj = ( 2.0 + exp_pen3 ) / trm_pen34; + Cf9j = ( -p_pen3 * exp_pen3 * trm_pen34 - + (2.0 + exp_pen3) * ( -p_pen3 * exp_pen3 + + p_pen4 * exp_pen4 ) ) / + SQR( trm_pen34 ); + + total_Epen += e_pen = + p_pen1 * f9_Dj * exp_pen2ij * exp_pen2jk; + + CEpen1 = e_pen * Cf9j / f9_Dj; + temp = -2.0 * p_pen2 * e_pen; + CEpen2 = temp * (BOA_ij - 2.0); + CEpen3 = temp * (BOA_jk - 2.0); + /* END PENALTY ENERGY */ + + + /* COALITION ENERGY */ + p_coa1 = thbp->p_coa1; + p_coa2 = system->reax_param.gp.l[2]; + p_coa3 = system->reax_param.gp.l[38]; + p_coa4 = system->reax_param.gp.l[30]; + + exp_coa2 = exp( p_coa2 * workspace->Delta_val[j] ); + total_Ecoa += e_coa = + p_coa1 / (1. + exp_coa2) * + exp( -p_coa3 * SQR(workspace->total_bond_order[i]-BOA_ij) ) * + exp( -p_coa3 * SQR(workspace->total_bond_order[k]-BOA_jk) ) * + exp( -p_coa4 * SQR(BOA_ij - 1.5) ) * + exp( -p_coa4 * SQR(BOA_jk - 1.5) ); + + CEcoa1 = -2 * p_coa4 * (BOA_ij - 1.5) * e_coa; + CEcoa2 = -2 * p_coa4 * (BOA_jk - 1.5) * e_coa; + CEcoa3 = -p_coa2 * exp_coa2 * e_coa / (1 + exp_coa2); + CEcoa4 = -2 * p_coa3 * + (workspace->total_bond_order[i]-BOA_ij) * e_coa; + CEcoa5 = -2 * p_coa3 * + (workspace->total_bond_order[k]-BOA_jk) * e_coa; + /* END COALITION ENERGY */ + + + /* FORCES */ + bo_ij->Cdbo += (CEval1 + CEpen2 + (CEcoa1 - CEcoa4)); + bo_jk->Cdbo += (CEval2 + CEpen3 + (CEcoa2 - CEcoa5)); + workspace->CdDelta[j] += ((CEval3 + CEval7) + CEpen1 + CEcoa3); + workspace->CdDeltaReduction[reductionOffset+i] += CEcoa4; + workspace->CdDeltaReduction[reductionOffset+k] += CEcoa5; + + for (t = start_j; t < end_j; ++t) { + pbond_jt = &( bonds->select.bond_list[t] ); + bo_jt = &(pbond_jt->bo_data); + temp_bo_jt = bo_jt->BO; + temp = CUBE( temp_bo_jt ); + pBOjt7 = temp * temp * temp_bo_jt; + + bo_jt->Cdbo += (CEval6 * pBOjt7); + bo_jt->Cdbopi += CEval5; + bo_jt->Cdbopi2 += CEval5; + } + + if( control->virial == 0 ) { + rvec_ScaledAdd( workspace->f[j], CEval8, p_ijk->dcos_dj ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+i], + CEval8, p_ijk->dcos_di ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+k], + CEval8, p_ijk->dcos_dk ); + } + else { + /* terms not related to bond order derivatives are + added directly into forces and pressure vector/tensor */ + rvec_Scale( force, CEval8, p_ijk->dcos_di ); + rvec_Add( workspace->forceReduction[reductionOffset+i], force ); + + rvec_iMultiply( ext_press, pbond_ij->rel_box, force ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + + rvec_ScaledAdd( workspace->f[j], CEval8, p_ijk->dcos_dj ); + + rvec_Scale( force, CEval8, p_ijk->dcos_dk ); + rvec_Add( workspace->forceReduction[reductionOffset+k], force ); + + rvec_iMultiply( ext_press, pbond_jk->rel_box, force ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + } + + /* tally into per-atom virials */ + if( system->pair_ptr->vflag_atom || system->pair_ptr->evflag) { + + /* Acquire vectors */ + rvec_ScaledSum( delij, 1., system->my_atoms[i].x, + -1., system->my_atoms[j].x ); + rvec_ScaledSum( delkj, 1., system->my_atoms[k].x, + -1., system->my_atoms[j].x ); + + rvec_Scale( fi_tmp, -CEval8, p_ijk->dcos_di ); + rvec_Scale( fj_tmp, -CEval8, p_ijk->dcos_dj ); + rvec_Scale( fk_tmp, -CEval8, p_ijk->dcos_dk ); + + eng_tmp = e_ang + e_pen + e_coa; + + if( system->pair_ptr->evflag) + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, j, j, system->N, 1, + eng_tmp, 0.0, 0.0, 0.0, 0.0, 0.0, thr); + if( system->pair_ptr->vflag_atom) + // NEED TO MAKE AN OMP VERSION OF THIS CALL! + system->pair_ptr->v_tally3( i, j, k, fi_tmp, fk_tmp, delij, delkj); + } + + } // if(p_val1>0.001) + } // for(cnt) + } // if(j0) + } // for(pk) + } // if(BOA_ij>0) + + Set_End_Index(pi, my_offset, thb_intrs ); + } // for(pi) + } // for(j) + + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, thr); + } // end omp parallel + + data->my_en.e_ang = total_Eang; + data->my_en.e_pen = total_Epen; + data->my_en.e_coa = total_Ecoa; + + if( num_thb_intrs >= thb_intrs->num_intrs * DANGER_ZONE ) { + workspace->realloc.num_3body = num_thb_intrs * TWICE; + if( num_thb_intrs > thb_intrs->num_intrs ) { + fprintf( stderr, "step%d-ran out of space on angle_list: top=%d, max=%d", + data->step, num_thb_intrs, thb_intrs->num_intrs ); + MPI_Abort( MPI_COMM_WORLD, INSUFFICIENT_MEMORY ); + } + } + +#ifdef OMP_TIMING + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTEVALENCEANGLESBOINDEX] += (endTimeBase-startTimeBase); +#endif +} diff --git a/src/USER-OMP/reaxc_valence_angles_omp.h b/src/USER-OMP/reaxc_valence_angles_omp.h new file mode 100644 index 0000000000..ce304acced --- /dev/null +++ b/src/USER-OMP/reaxc_valence_angles_omp.h @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------- + PuReMD - Purdue ReaxFF Molecular Dynamics Program + + Copyright (2010) Purdue University + Hasan Metin Aktulga, hmaktulga@lbl.gov + Joseph Fogarty, jcfogart@mail.usf.edu + Sagar Pandit, pandit@usf.edu + Ananth Y Grama, ayg@cs.purdue.edu + + Please cite the related publication: + H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, + "Parallel Reactive Molecular Dynamics: Numerical Methods and + Algorithmic Techniques", Parallel Computing, in press. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details: + . + ----------------------------------------------------------------------*/ + +#ifndef __VALENCE_ANGLES_OMP_H_ +#define __VALENCE_ANGLES_OMP_H_ + +#include "reaxc_types.h" + +void Valence_AnglesOMP( reax_system*, control_params*, simulation_data*, + storage*, reax_list**, output_controls* ); + +void Calculate_dCos_ThetaOMP( rvec, double, rvec, double, rvec*, rvec*, rvec* ); + +#endif diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index 22b5382727..5f171c8768 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -64,7 +64,7 @@ static const char cite_fix_qeq_reax[] = /* ---------------------------------------------------------------------- */ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) + Fix(lmp, narg, arg), pertype_option(NULL) { if (lmp->citeme) lmp->citeme->add(cite_fix_qeq_reax); @@ -76,7 +76,9 @@ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) : swa = force->numeric(FLERR,arg[4]); swb = force->numeric(FLERR,arg[5]); tolerance = force->numeric(FLERR,arg[6]); - pertype_parameters(arg[7]); + int len = strlen(arg[7]) + 1; + pertype_option = new char[len]; + strcpy(pertype_option,arg[7]); // dual CG support only available for USER-OMP variant dual_enabled = 0; @@ -135,6 +137,8 @@ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) : FixQEqReax::~FixQEqReax() { + delete[] pertype_option; + // unregister callbacks to this fix from Atom class if (copymode) return; @@ -158,6 +162,13 @@ FixQEqReax::~FixQEqReax() /* ---------------------------------------------------------------------- */ +void FixQEqReax::post_constructor() +{ + pertype_parameters(pertype_option); +} + +/* ---------------------------------------------------------------------- */ + int FixQEqReax::setmask() { int mask = 0; diff --git a/src/USER-REAXC/fix_qeq_reax.h b/src/USER-REAXC/fix_qeq_reax.h index d82232576a..19efcd2b03 100644 --- a/src/USER-REAXC/fix_qeq_reax.h +++ b/src/USER-REAXC/fix_qeq_reax.h @@ -39,6 +39,7 @@ class FixQEqReax : public Fix { FixQEqReax(class LAMMPS *, int, char **); ~FixQEqReax(); int setmask(); + virtual void post_constructor(); virtual void init(); void init_list(int,class NeighList *); virtual void init_storage(); @@ -100,6 +101,7 @@ class FixQEqReax : public Fix { //double **h; //double *hc, *hs; + char *pertype_option; // argument to determine how per-type info is obtained virtual void pertype_parameters(char*); void init_shielding(); void init_taper(); diff --git a/src/USER-REAXC/pair_reaxc.h b/src/USER-REAXC/pair_reaxc.h index 5658648db6..91b44be661 100644 --- a/src/USER-REAXC/pair_reaxc.h +++ b/src/USER-REAXC/pair_reaxc.h @@ -42,7 +42,7 @@ class PairReaxC : public Pair { void compute(int, int); void settings(int, char **); void coeff(int, char **); - void init_style(); + virtual void init_style(); double init_one(int, int); void *extract(const char *, int &); int fixbond_flag, fixspecies_flag; -- GitLab From 0e3cfbc007c88d6ecfbbd6e03cca7f5bb5efbd27 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 24 May 2017 16:29:26 -0400 Subject: [PATCH 197/593] remove trailing whitespace --- src/USER-OMP/angle_dipole_omp.cpp | 8 +- src/USER-OMP/fix_qeq_reax_omp.cpp | 114 ++++++++++----------- src/USER-OMP/fix_qeq_reax_omp.h | 8 +- src/USER-OMP/fix_reaxc_species_omp.cpp | 2 +- src/USER-OMP/fix_reaxc_species_omp.h | 10 +- src/USER-OMP/pair_reaxc_omp.cpp | 116 +++++++++++----------- src/USER-OMP/pair_reaxc_omp.h | 34 +++---- src/USER-OMP/reaxc_bond_orders_omp.cpp | 102 +++++++++---------- src/USER-OMP/reaxc_bonds_omp.cpp | 54 +++++----- src/USER-OMP/reaxc_forces_omp.cpp | 112 ++++++++++----------- src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp | 18 ++-- src/USER-OMP/reaxc_init_md_omp.cpp | 6 +- src/USER-OMP/reaxc_multi_body_omp.cpp | 94 +++++++++--------- src/USER-OMP/reaxc_nonbonded_omp.cpp | 98 +++++++++--------- src/USER-OMP/reaxc_torsion_angles_omp.cpp | 74 +++++++------- src/USER-OMP/reaxc_valence_angles_omp.cpp | 100 +++++++++---------- src/USER-REAXC/pair_reaxc.cpp | 2 +- src/USER-REAXC/reaxc_allocate.cpp | 18 ++-- src/USER-REAXC/reaxc_types.h | 2 +- 19 files changed, 486 insertions(+), 486 deletions(-) diff --git a/src/USER-OMP/angle_dipole_omp.cpp b/src/USER-OMP/angle_dipole_omp.cpp index 9a646e04b0..f582ce4c41 100644 --- a/src/USER-OMP/angle_dipole_omp.cpp +++ b/src/USER-OMP/angle_dipole_omp.cpp @@ -122,14 +122,14 @@ void AngleDipoleOMP::eval(int nfrom, int nto, ThrData * const thr) delTx = tangle * (dely*mu[iDip][2] - delz*mu[iDip][1]); delTy = tangle * (delz*mu[iDip][0] - delx*mu[iDip][2]); delTz = tangle * (delx*mu[iDip][1] - dely*mu[iDip][0]); - + torque[iDip][0] += delTx; torque[iDip][1] += delTy; torque[iDip][2] += delTz; // Force couple that counterbalances dipolar torque fx = dely*delTz - delz*delTy; // direction (fi): - r x (-T) - fy = delz*delTx - delx*delTz; + fy = delz*delTx - delx*delTz; fz = delx*delTy - dely*delTx; fmod = sqrt(delTx*delTx + delTy*delTy + delTz*delTz) / r; // magnitude @@ -142,11 +142,11 @@ void AngleDipoleOMP::eval(int nfrom, int nto, ThrData * const thr) fj[0] = -fi[0]; fj[1] = -fi[1]; fj[2] = -fi[2]; - + f[iDip][0] += fj[0]; f[iDip][1] += fj[1]; f[iDip][2] += fj[2]; - + f[iRef][0] += fi[0]; f[iRef][1] += fi[1]; f[iRef][2] += fi[2]; diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp index c8e5e3cb93..a43d6cfdd1 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.cpp +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -168,10 +168,10 @@ void FixQEqReaxOMP::allocate_storage() /* ---------------------------------------------------------------------- */ void FixQEqReaxOMP::deallocate_storage() -{ +{ memory->destroy(b_temp); - - FixQEqReax::deallocate_storage(); + + FixQEqReax::deallocate_storage(); } /* ---------------------------------------------------------------------- */ @@ -275,7 +275,7 @@ void FixQEqReaxOMP::init() n -= 1.0; d += 1.0; } - + // fprintf(stdout,"aspc_omega= %f\n",aspc_omega); // for(int i=0; iall(FLERR,"Early Termination"); @@ -306,21 +306,21 @@ void FixQEqReaxOMP::compute_H() firstneigh = list->firstneigh; } int ai, num_nbrs; - + // sumscan of the number of neighbors per atom to determine the offsets // most likely, we are overallocating. desirable to work on this part // to reduce the memory footprint of the far_nbrs list. - + num_nbrs = 0; - + for (int itr_i = 0; itr_i < inum; ++itr_i) { ai = ilist[itr_i]; H.firstnbr[ai] = num_nbrs; num_nbrs += numneigh[ai]; } - + // fill in the H matrix - + #pragma omp parallel default(shared) { int i, j, ii, jj, mfill, jnum, flag; @@ -328,7 +328,7 @@ void FixQEqReaxOMP::compute_H() double dx, dy, dz, r_sqr; mfill = 0; - + //#pragma omp for schedule(dynamic,50) #pragma omp for schedule(guided) for (ii = 0; ii < inum; ii++) { @@ -340,12 +340,12 @@ void FixQEqReaxOMP::compute_H() for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; - + dx = x[j][0] - x[i][0]; dy = x[j][1] - x[i][1]; dz = x[j][2] - x[i][2]; r_sqr = SQR(dx) + SQR(dy) + SQR(dz); - + flag = 0; if (r_sqr <= SQR(swb)) { if (j < n) flag = 1; @@ -358,7 +358,7 @@ void FixQEqReaxOMP::compute_H() } } } - + if( flag ) { H.jlist[mfill] = j; H.val[mfill] = calculate_H( sqrt(r_sqr), shld[type[i]][type[j]] ); @@ -378,7 +378,7 @@ void FixQEqReaxOMP::compute_H() error->all(FLERR,"Fix qeq/reax/omp has insufficient QEq matrix size"); } } // omp - + } /* ---------------------------------------------------------------------- */ @@ -386,10 +386,10 @@ void FixQEqReaxOMP::compute_H() void FixQEqReaxOMP::init_storage() { int NN; - + if(reaxc) NN = reaxc->list->inum + reaxc->list->gnum; else NN = list->inum + list->gnum; - + #pragma omp parallel for schedule(static) for (int i = 0; i < NN; i++) { Hdia_inv[i] = 1. / eta[atom->type[i]]; @@ -450,9 +450,9 @@ void FixQEqReaxOMP::pre_force(int vflag) ompTimingCGCount[COMPUTECG1INDEX]+= matvecs_s; startTimeBase = endTimeBase; #endif - + matvecs_t = CG(b_t, t); // CG on t - parallel - + #ifdef OMP_TIMING endTimeBase = MPI_Wtime(); ompTimingData[COMPUTECG2INDEX] += (endTimeBase-startTimeBase); @@ -495,7 +495,7 @@ void FixQEqReaxOMP::init_matvec() long endTimeBase, startTimeBase; startTimeBase = MPI_Wtime(); #endif - + /* fill-in H matrix */ compute_H(); @@ -611,12 +611,12 @@ int FixQEqReaxOMP::CG( double *b, double *x ) if (atom->mask[i] & groupbit) { r[i] = b[i] - q[i]; d[i] = r[i] * Hdia_inv[i]; //pre-condition - + tmp1 += b[i] * b[i]; tmp2 += r[i] * d[i]; } } - + my_buf[0] = tmp1; my_buf[1] = tmp2; @@ -633,7 +633,7 @@ int FixQEqReaxOMP::CG( double *b, double *x ) tmp1 = 0.0; #pragma omp parallel { - + #pragma omp for schedule(dynamic,50) private(ii) reduction(+:tmp1) for( jj = 0; jj < nn; jj++) { ii = ilist[jj]; @@ -656,7 +656,7 @@ int FixQEqReaxOMP::CG( double *b, double *x ) if(atom->mask[ii] & groupbit) { x[ii] += alpha * d[ii]; r[ii] -= alpha * q[ii]; - + // pre-conditioning p[ii] = r[ii] * Hdia_inv[ii]; tmp1 += r[ii] * p[ii]; @@ -665,12 +665,12 @@ int FixQEqReaxOMP::CG( double *b, double *x ) } // omp parallel sig_old = sig_new; - + MPI_Allreduce(&tmp1, &tmp2, 1, MPI_DOUBLE, MPI_SUM, world); - + sig_new = tmp2; beta = sig_new / sig_old; - + #pragma omp for schedule(dynamic,50) private(ii) for( jj = 0; jj < nn; jj++) { ii = ilist[jj]; @@ -699,7 +699,7 @@ void FixQEqReaxOMP::sparse_matvec( sparse_matrix *A, double *x, double *b ) int *ilist; int nthreads = comm->nthreads; int tid = omp_get_thread_num(); - + if(reaxc) { nn = reaxc->list->inum; NN = reaxc->list->inum + reaxc->list->gnum; @@ -709,21 +709,21 @@ void FixQEqReaxOMP::sparse_matvec( sparse_matrix *A, double *x, double *b ) NN = list->inum + list->gnum; ilist = list->ilist; } - + #pragma omp for schedule(dynamic,50) for (ii = 0; ii < nn; ++ii) { i = ilist[ii]; if(atom->mask[i] & groupbit) b[i] = eta[ atom->type[i] ] * x[i]; } - + #pragma omp for schedule(dynamic,50) for (ii = nn; ii < NN; ++ii) { i = ilist[ii]; if(atom->mask[i] & groupbit) b[i] = 0; } - + #pragma omp for schedule(dynamic,50) - for (i = 0; i < NN; ++i) + for (i = 0; i < NN; ++i) for(int t=0; tmask[i] & groupbit) { q[i] = s[i] - u * t[i]; - + // backup s & t for (int k = 4; k > 0; --k) { s_hist[i][k] = s_hist[i][k-1]; @@ -817,7 +817,7 @@ void FixQEqReaxOMP::calculate_Q() // double FixQEqReaxOMP::parallel_norm( double *v, int n ) // { // int i; -// double my_sum, norm_sqr; +// double my_sum, norm_sqr; // int *ilist; @@ -911,7 +911,7 @@ void FixQEqReaxOMP::vector_sum( double* dest, double c, double* v, /* ---------------------------------------------------------------------- */ void FixQEqReaxOMP::vector_add( double* dest, double c, double* v, int k ) -{ +{ int i; int *ilist; @@ -971,18 +971,18 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) int indxI = 2 * i; r[indxI ] = b1[i] - q[indxI ]; r[indxI+1] = b2[i] - q[indxI+1]; - + d[indxI ] = r[indxI ] * Hdia_inv[i]; //pre-condition d[indxI+1] = r[indxI+1] * Hdia_inv[i]; - + tmp1 += b1[i] * b1[i]; tmp2 += b2[i] * b2[i]; - + tmp3 += r[indxI ] * d[indxI ]; tmp4 += r[indxI+1] * d[indxI+1]; } } - + my_buf[0] = tmp1; my_buf[1] = tmp2; my_buf[2] = tmp3; @@ -1004,7 +1004,7 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) tmp1 = tmp2 = 0.0; #pragma omp parallel { - + #pragma omp for schedule(dynamic,50) private(ii) reduction(+:tmp1,tmp2) for( jj = 0; jj < nn; jj++) { ii = ilist[jj]; @@ -1037,14 +1037,14 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) int indxI = 2 * ii; x1[ii] += alpha_s * d[indxI ]; x2[ii] += alpha_t * d[indxI+1]; - + r[indxI ] -= alpha_s * q[indxI ]; r[indxI+1] -= alpha_t * q[indxI+1]; - + // pre-conditioning p[indxI ] = r[indxI ] * Hdia_inv[ii]; p[indxI+1] = r[indxI+1] * Hdia_inv[ii]; - + tmp1 += r[indxI ] * p[indxI ]; tmp2 += r[indxI+1] * p[indxI+1]; } @@ -1053,20 +1053,20 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) my_buf[0] = tmp1; my_buf[1] = tmp2; - + sig_old_s = sig_new_s; sig_old_t = sig_new_t; - + MPI_Allreduce(&my_buf, &buf, 2, MPI_DOUBLE, MPI_SUM, world); - + sig_new_s = buf[0]; sig_new_t = buf[1]; if( sqrt(sig_new_s)/b_norm_s <= tolerance || sqrt(sig_new_t)/b_norm_t <= tolerance) break; - + beta_s = sig_new_s / sig_old_s; beta_t = sig_new_t / sig_old_t; - + #pragma omp for schedule(dynamic,50) private(ii) for( jj = 0; jj < nn; jj++) { ii = ilist[jj]; @@ -1082,7 +1082,7 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) i++; matvecs_s = matvecs_t = i; // The plus one makes consistent with count from CG() matvecs = i; - + // Timing info for iterating s&t together #ifdef OMP_TIMING endTimeBase = MPI_Wtime(); @@ -1140,7 +1140,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2 int nthreads = comm->nthreads; int tid = omp_get_thread_num(); - + if (reaxc) { nn = reaxc->list->inum; NN = reaxc->list->inum + reaxc->list->gnum; @@ -1150,7 +1150,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2 NN = list->inum + list->gnum; ilist = list->ilist; } - + #pragma omp for schedule(dynamic,50) for( ii = 0; ii < nn; ++ii ) { i = ilist[ii]; @@ -1160,7 +1160,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2 b[indxI+1] = eta[ atom->type[i] ] * x2[i]; } } - + #pragma omp for schedule(dynamic,50) for( ii = nn; ii < NN; ++ii ) { i = ilist[ii]; @@ -1179,7 +1179,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2 b_temp[t][indxI+1] = 0.0; } } - + // Wait for b accumulated and b_temp zeroed #pragma omp barrier #pragma omp for schedule(dynamic,50) @@ -1226,7 +1226,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x, double *b ) int nthreads = comm->nthreads; int tid = omp_get_thread_num(); - + if (reaxc) { nn = reaxc->list->inum; NN = reaxc->list->inum + reaxc->list->gnum; @@ -1236,7 +1236,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x, double *b ) NN = list->inum + list->gnum; ilist = list->ilist; } - + #pragma omp for schedule(dynamic,50) for( ii = 0; ii < nn; ++ii ) { i = ilist[ii]; @@ -1246,7 +1246,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x, double *b ) b[indxI+1] = eta[ atom->type[i] ] * x[indxI+1]; } } - + #pragma omp for schedule(dynamic,50) for( ii = nn; ii < NN; ++ii ) { i = ilist[ii]; @@ -1265,7 +1265,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x, double *b ) b_temp[t][indxI+1] = 0.0; } } - + // Wait for b accumulated and b_temp zeroed #pragma omp barrier #pragma omp for schedule(dynamic,50) diff --git a/src/USER-OMP/fix_qeq_reax_omp.h b/src/USER-OMP/fix_qeq_reax_omp.h index c06185ca2e..6d8719857d 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.h +++ b/src/USER-OMP/fix_qeq_reax_omp.h @@ -43,7 +43,7 @@ class FixQEqReaxOMP : public FixQEqReax { virtual void init_storage(); virtual void pre_force(int); virtual void post_constructor(); - + protected: double **b_temp; @@ -53,7 +53,7 @@ class FixQEqReaxOMP : public FixQEqReax { int aspc_order, aspc_order_max; double aspc_omega; double * aspc_b; - + virtual void pertype_parameters(char*); virtual void allocate_storage(); virtual void deallocate_storage(); @@ -64,7 +64,7 @@ class FixQEqReaxOMP : public FixQEqReax { virtual int CG(double*,double*); virtual void sparse_matvec(sparse_matrix*,double*,double*); virtual void calculate_Q(); - + /* virtual double parallel_norm( double*, int ); */ /* virtual double parallel_dot( double*, double*, int ); */ /* virtual double parallel_vector_acc( double*, int ); */ @@ -72,7 +72,7 @@ class FixQEqReaxOMP : public FixQEqReax { virtual void vector_sum(double*,double,double*,double,double*,int); virtual void vector_add(double*, double, double*,int); - // dual CG support + // dual CG support virtual int dual_CG(double*,double*,double*,double*); virtual void dual_sparse_matvec(sparse_matrix*,double*,double*,double*); virtual void dual_sparse_matvec(sparse_matrix*,double*,double*); diff --git a/src/USER-OMP/fix_reaxc_species_omp.cpp b/src/USER-OMP/fix_reaxc_species_omp.cpp index e9ac388252..786ba9824b 100644 --- a/src/USER-OMP/fix_reaxc_species_omp.cpp +++ b/src/USER-OMP/fix_reaxc_species_omp.cpp @@ -5,7 +5,7 @@ Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under + certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. diff --git a/src/USER-OMP/fix_reaxc_species_omp.h b/src/USER-OMP/fix_reaxc_species_omp.h index 006bb3e87a..f2ef3fb266 100644 --- a/src/USER-OMP/fix_reaxc_species_omp.h +++ b/src/USER-OMP/fix_reaxc_species_omp.h @@ -5,7 +5,7 @@ Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under + certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. @@ -26,17 +26,17 @@ FixStyle(reax/c/species/omp,FixReaxCSpeciesOMP) #define BUFLEN 1000 namespace LAMMPS_NS { - + class FixReaxCSpeciesOMP : public FixReaxCSpecies { - + public: FixReaxCSpeciesOMP(class LAMMPS *, int, char **); ~FixReaxCSpeciesOMP(){}; virtual void init(); - + private: class PairReaxCOMP *reaxc; - + }; } diff --git a/src/USER-OMP/pair_reaxc_omp.cpp b/src/USER-OMP/pair_reaxc_omp.cpp index c7a6c27f48..f216b47665 100644 --- a/src/USER-OMP/pair_reaxc_omp.cpp +++ b/src/USER-OMP/pair_reaxc_omp.cpp @@ -89,7 +89,7 @@ PairReaxCOMP::~PairReaxCOMP() int myrank; MPI_Comm_rank(mpi_data->world,&myrank); - + // Write screen output if (myrank == 0 && screen) { fprintf(screen,"\n\nWrite_Lists took %11.3lf seconds", ompTimingData[COMPUTEWLINDEX]); @@ -98,11 +98,11 @@ PairReaxCOMP::~PairReaxCOMP() fprintf(screen,"\n ->Initial Forces: %11.3lf seconds", ompTimingData[COMPUTEIFINDEX]); fprintf(screen,"\n ->Bond Order: %11.3lf seconds", ompTimingData[COMPUTEBOINDEX]); fprintf(screen,"\n ->Atom Energy: %11.3lf seconds", ompTimingData[COMPUTEATOMENERGYINDEX]); - fprintf(screen,"\n ->Bond: %11.3lf seconds", ompTimingData[COMPUTEBONDSINDEX]); + fprintf(screen,"\n ->Bond: %11.3lf seconds", ompTimingData[COMPUTEBONDSINDEX]); fprintf(screen,"\n ->Hydrogen bonds: %11.3lf seconds", ompTimingData[COMPUTEHBONDSINDEX]); fprintf(screen,"\n ->Torsion Angles: %11.3lf seconds", ompTimingData[COMPUTETORSIONANGLESBOINDEX]); fprintf(screen,"\n ->Valence Angles: %11.3lf seconds", ompTimingData[COMPUTEVALENCEANGLESBOINDEX]); - fprintf(screen,"\n ->Non-Bonded For: %11.3lf seconds", ompTimingData[COMPUTENBFINDEX]); + fprintf(screen,"\n ->Non-Bonded For: %11.3lf seconds", ompTimingData[COMPUTENBFINDEX]); fprintf(screen,"\n ->Total Forces: %11.3lf seconds", ompTimingData[COMPUTETFINDEX]); fprintf(screen,"\n\nfixQEQ: %11.3lf seconds", ompTimingData[COMPUTEQEQINDEX]); @@ -124,11 +124,11 @@ PairReaxCOMP::~PairReaxCOMP() fprintf(logfile,"\n ->Initial Forces: %11.3lf seconds", ompTimingData[COMPUTEIFINDEX]); fprintf(logfile,"\n ->Bond Order: %11.3lf seconds", ompTimingData[COMPUTEBOINDEX]); fprintf(logfile,"\n ->Atom Energy: %11.3lf seconds", ompTimingData[COMPUTEATOMENERGYINDEX]); - fprintf(logfile,"\n ->Bond: %11.3lf seconds", ompTimingData[COMPUTEBONDSINDEX]); + fprintf(logfile,"\n ->Bond: %11.3lf seconds", ompTimingData[COMPUTEBONDSINDEX]); fprintf(logfile,"\n ->Hydrogen bonds: %11.3lf seconds", ompTimingData[COMPUTEHBONDSINDEX]); fprintf(logfile,"\n ->Torsion Angles: %11.3lf seconds", ompTimingData[COMPUTETORSIONANGLESBOINDEX]); fprintf(logfile,"\n ->Valence Angles: %11.3lf seconds", ompTimingData[COMPUTEVALENCEANGLESBOINDEX]); - fprintf(logfile,"\n ->Non-Bonded For: %11.3lf seconds", ompTimingData[COMPUTENBFINDEX]); + fprintf(logfile,"\n ->Non-Bonded For: %11.3lf seconds", ompTimingData[COMPUTENBFINDEX]); fprintf(logfile,"\n ->Total Forces: %11.3lf seconds", ompTimingData[COMPUTETFINDEX]); fprintf(logfile,"\n\nfixQEQ: %11.3lf seconds", ompTimingData[COMPUTEQEQINDEX]); @@ -150,41 +150,41 @@ void PairReaxCOMP::compute(int eflag, int vflag) { double evdwl,ecoul; double t_start, t_end; - + // communicate num_bonds once every reneighboring // 2 num arrays stored by fix, grab ptr to them - + if (neighbor->ago == 0) comm->forward_comm_fix(fix_reax); int *num_bonds = fix_reax->num_bonds; int *num_hbonds = fix_reax->num_hbonds; - + evdwl = ecoul = 0.0; if (eflag || vflag) ev_setup(eflag,vflag); else ev_unset(); - + if (vflag_global) control->virial = 1; else control->virial = 0; - + system->n = atom->nlocal; // my atoms system->N = atom->nlocal + atom->nghost; // mine + ghosts system->bigN = static_cast (atom->natoms); // all atoms in the system - + system->big_box.V = 0; system->big_box.box_norms[0] = 0; system->big_box.box_norms[1] = 0; system->big_box.box_norms[2] = 0; if( comm->me == 0 ) t_start = MPI_Wtime(); // setup data structures - + setup(); - + Reset( system, control, data, workspace, &lists, world ); - + // Why not update workspace like in MPI-only code? - // Using the MPI-only way messes up the hb energy + // Using the MPI-only way messes up the hb energy //workspace->realloc.num_far = write_reax_lists(); write_reax_lists(); - + // timing for filling in the reax lists if( comm->me == 0 ) { t_end = MPI_Wtime(); @@ -192,7 +192,7 @@ void PairReaxCOMP::compute(int eflag, int vflag) } // forces - + #ifdef OMP_TIMING double startTimeBase,endTimeBase; startTimeBase = MPI_Wtime(); @@ -200,20 +200,20 @@ void PairReaxCOMP::compute(int eflag, int vflag) Compute_ForcesOMP(system,control,data,workspace,&lists,out_control,mpi_data); read_reax_forces(vflag); - + #ifdef OMP_TIMING endTimeBase = MPI_Wtime(); ompTimingData[COMPUTEINDEX] += (endTimeBase-startTimeBase); #endif - + #pragma omp parallel for schedule(static) for(int k = 0; k < system->N; ++k) { num_bonds[k] = system->my_atoms[k].num_bonds; num_hbonds[k] = system->my_atoms[k].num_hbonds; } - + // energies and pressure - + if (eflag_global) { evdwl += data->my_en.e_bond; evdwl += data->my_en.e_ov; @@ -226,13 +226,13 @@ void PairReaxCOMP::compute(int eflag, int vflag) evdwl += data->my_en.e_tor; evdwl += data->my_en.e_con; evdwl += data->my_en.e_vdW; - + ecoul += data->my_en.e_ele; ecoul += data->my_en.e_pol; - + // Store the different parts of the energy // in a list for output by compute pair command - + pvector[0] = data->my_en.e_bond; pvector[1] = data->my_en.e_ov + data->my_en.e_un; pvector[2] = data->my_en.e_lp; @@ -250,16 +250,16 @@ void PairReaxCOMP::compute(int eflag, int vflag) } if (vflag_fdotr) virial_fdotr_compute(); - + // Set internal timestep counter to that of LAMMPS - + data->step = update->ntimestep; Output_Results( system, control, data, &lists, out_control, mpi_data ); - + // populate tmpid and tmpbo arrays for fix reax/c/species int i, j; - + if(fixspecies_flag) { if (system->N > nmax) { memory->destroy(tmpid); @@ -268,14 +268,14 @@ void PairReaxCOMP::compute(int eflag, int vflag) memory->create(tmpid,nmax,MAXSPECBOND,"pair:tmpid"); memory->create(tmpbo,nmax,MAXSPECBOND,"pair:tmpbo"); } - + #pragma omp parallel for collapse(2) schedule(static) default(shared) for (i = 0; i < system->N; i ++) for (j = 0; j < MAXSPECBOND; j ++) { tmpbo[i][j] = 0.0; tmpid[i][j] = 0; } - + FindBond(); } } @@ -284,7 +284,7 @@ void PairReaxCOMP::compute(int eflag, int vflag) void PairReaxCOMP::init_style( ) { - if (!atom->q_flag) + if (!atom->q_flag) error->all(FLERR,"Pair reax/c/omp requires atom attribute q"); // firstwarn = 1; @@ -330,7 +330,7 @@ void PairReaxCOMP::init_style( ) fix_reax = (FixReaxC *) modify->fix[modify->nfix-1]; } -#pragma omp parallel +#pragma omp parallel { control->nthreads = omp_get_num_threads(); } } @@ -397,11 +397,11 @@ void PairReaxCOMP::setup( ) for(int k = oldN; k < system->N; ++k) Set_End_Index( k, Start_Index( k, lists+BONDS ), lists+BONDS ); - + // estimate far neighbor list size // Not present in MPI-only version workspace->realloc.num_far = estimate_reax_lists(); - + // check if I need to shrink/extend my data-structs ReAllocate( system, control, data, workspace, &lists, mpi_data ); @@ -414,10 +414,10 @@ void PairReaxCOMP::write_reax_atoms() { int *num_bonds = fix_reax->num_bonds; int *num_hbonds = fix_reax->num_hbonds; - + if (system->N > system->total_cap) error->all(FLERR,"Too many ghost atoms"); - + #pragma omp parallel for schedule(static) default(shared) for( int i = 0; i < system->N; ++i ){ system->my_atoms[i].orig_id = atom->tag[i]; @@ -435,28 +435,28 @@ void PairReaxCOMP::write_reax_atoms() int PairReaxCOMP::estimate_reax_lists() { - int i; + int i; int *ilist = list->ilist; int *numneigh = list->numneigh; int numall = list->inum + list->gnum; int mincap = system->mincap; - + // for good performance in the OpenMP implementation, each thread needs // to know where to place the neighbors of the atoms it is responsible for. // The sumscan values for the list->numneigh will be used to determine the - // neighbor offset of each atom. Note that this may cause some significant - // memory overhead if delayed neighboring is used - so it may be desirable + // neighbor offset of each atom. Note that this may cause some significant + // memory overhead if delayed neighboring is used - so it may be desirable // to work on this part to reduce the memory footprint of the far_nbrs list. - + int num_nbrs = 0; - + for (int itr_i = 0; itr_i < numall; ++itr_i) { i = ilist[itr_i]; num_nbrs += numneigh[i]; } - + int new_estimate = MAX (num_nbrs, mincap*MIN_NBRS); - + return new_estimate; } @@ -473,51 +473,51 @@ int PairReaxCOMP::write_reax_lists() int *jlist; double d_sqr, dist, cutoff_sqr; rvec dvec; - + double **x = atom->x; int *ilist = list->ilist; int *numneigh = list->numneigh; int **firstneigh = list->firstneigh; reax_list *far_nbrs = lists + FAR_NBRS; far_neighbor_data *far_list = far_nbrs->select.far_nbr_list; - + int num_nbrs = 0; int inum = list->inum; int gnum = list->gnum; int numall = inum + gnum; - + // sumscan of the number of neighbors per atom to determine the offsets // most likely, we are overallocating. desirable to work on this part // to reduce the memory footprint of the far_nbrs list. - + num_nbrs = 0; - + for (itr_i = 0; itr_i < numall; ++itr_i) { i = ilist[itr_i]; num_nbrs_offset[i] = num_nbrs; num_nbrs += numneigh[i]; } -//#pragma omp parallel for schedule(guided) default(shared) +//#pragma omp parallel for schedule(guided) default(shared) #pragma omp parallel for schedule(dynamic,50) default(shared) \ private(itr_i, itr_j, i, j, jlist, cutoff_sqr, num_mynbrs, d_sqr, dvec, dist) for (itr_i = 0; itr_i < numall; ++itr_i) { i = ilist[itr_i]; jlist = firstneigh[i]; Set_Start_Index( i, num_nbrs_offset[i], far_nbrs ); - - if (i < inum) + + if (i < inum) cutoff_sqr = control->nonb_cut*control->nonb_cut; - else - cutoff_sqr = control->bond_cut*control->bond_cut; - + else + cutoff_sqr = control->bond_cut*control->bond_cut; + num_mynbrs = 0; - + for (itr_j = 0; itr_j < numneigh[i]; ++itr_j) { j = jlist[itr_j]; j &= NEIGHMASK; get_distance( x[j], x[i], &d_sqr, &dvec ); - + if (d_sqr <= cutoff_sqr) { dist = sqrt( d_sqr ); set_far_nbr( &far_list[num_nbrs_offset[i] + num_mynbrs], j, dist, dvec ); @@ -531,7 +531,7 @@ int PairReaxCOMP::write_reax_lists() endTimeBase = MPI_Wtime(); ompTimingData[COMPUTEWLINDEX] += (endTimeBase-startTimeBase); #endif - + return num_nbrs; } diff --git a/src/USER-OMP/pair_reaxc_omp.h b/src/USER-OMP/pair_reaxc_omp.h index 5d5c7e145b..a5e077c309 100644 --- a/src/USER-OMP/pair_reaxc_omp.h +++ b/src/USER-OMP/pair_reaxc_omp.h @@ -47,40 +47,40 @@ class PairReaxCOMP : public PairReaxC, public ThrOMP { return fix; }; - inline void ev_setup_thr_proxy(int eflagparm, int vflagparm, int nallparm, + inline void ev_setup_thr_proxy(int eflagparm, int vflagparm, int nallparm, double *eatomparm, double **vatomparm, ThrData *thrparm) { ev_setup_thr(eflagparm, vflagparm, nallparm, eatomparm, vatomparm, thrparm); }; - + // reduce per thread data as needed - inline void reduce_thr_proxy(void * const styleparm, const int eflagparm, + inline void reduce_thr_proxy(void * const styleparm, const int eflagparm, const int vflagparm, ThrData * const thrparm) { reduce_thr(styleparm, eflagparm, vflagparm, thrparm); } - inline void ev_tally_thr_proxy(Pair * const pairparm, const int iparm, const int jparm, - const int nlocalparm, const int newton_pairparm, + inline void ev_tally_thr_proxy(Pair * const pairparm, const int iparm, const int jparm, + const int nlocalparm, const int newton_pairparm, const double evdwlparm, const double ecoulparm, - const double fpairparm, const double delxparm, - const double delyparm, const double delzparm, + const double fpairparm, const double delxparm, + const double delyparm, const double delzparm, ThrData * const thrparm) { - ev_tally_thr(pairparm, iparm, jparm, nlocalparm, newton_pairparm, + ev_tally_thr(pairparm, iparm, jparm, nlocalparm, newton_pairparm, evdwlparm, ecoulparm, fpairparm, delxparm, delyparm, delzparm, thrparm); } - inline void ev_tally_xyz_thr_proxy(Pair * const pairparm, const int iparm, const int jparm, - const int nlocalparm, const int newton_pairparm, - const double evdwlparm, const double ecoulparm, + inline void ev_tally_xyz_thr_proxy(Pair * const pairparm, const int iparm, const int jparm, + const int nlocalparm, const int newton_pairparm, + const double evdwlparm, const double ecoulparm, const double fxparm, const double fyparm, const double fzparm, - const double delxparm, const double delyparm, + const double delxparm, const double delyparm, const double delzparm, ThrData * const thrparm) { - ev_tally_xyz_thr(pairparm, iparm, jparm, nlocalparm, newton_pairparm, - evdwlparm, ecoulparm, fxparm, fyparm, fzparm, + ev_tally_xyz_thr(pairparm, iparm, jparm, nlocalparm, newton_pairparm, + evdwlparm, ecoulparm, fxparm, fyparm, fzparm, delxparm, delyparm, delzparm, thrparm); } - - inline void ev_tally3_thr_proxy(Pair * const pairparm,int i, int j, int k, - double evdwl, double ecoul, double *fj, double *fk, + + inline void ev_tally3_thr_proxy(Pair * const pairparm,int i, int j, int k, + double evdwl, double ecoul, double *fj, double *fk, double *drji, double *drki, ThrData * const thrparm) { ev_tally3_thr(pairparm, i, j, k, evdwl, ecoul, fj, fk, drji, drki, thrparm); } diff --git a/src/USER-OMP/reaxc_bond_orders_omp.cpp b/src/USER-OMP/reaxc_bond_orders_omp.cpp index 1d32cbd34f..aaa311640e 100644 --- a/src/USER-OMP/reaxc_bond_orders_omp.cpp +++ b/src/USER-OMP/reaxc_bond_orders_omp.cpp @@ -44,11 +44,11 @@ void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj, int pk, k, j; PairReaxCOMP *pair_reax_ptr = static_cast(system->pair_ptr); - + int tid = omp_get_thread_num(); ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); long reductionOffset = (system->N * tid); - + /* Virial Tallying variables */ double f_scaler; rvec fi_tmp, fj_tmp, fk_tmp, delij, delji, delki, delkj, temp; @@ -154,7 +154,7 @@ void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj, for( pk = Start_Index(i, bonds); pk < End_Index(i, bonds); ++pk ) { nbr_k = &(bonds->select.bond_list[pk]); k = nbr_k->nbr; - + // rvec_Scale( temp, -coef.C2dbo, nbr_k->bo_data.dBOp); // rvec_ScaledAdd( temp, -coef.C2dDelta, nbr_k->bo_data.dBOp); // rvec_ScaledAdd( temp, -coef.C3dbopi, nbr_k->bo_data.dBOp); @@ -179,12 +179,12 @@ void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj, delkj[0],delkj[1],delkj[2],thr); } } - + // forces on k: j neighbor for( pk = Start_Index(j, bonds); pk < End_Index(j, bonds); ++pk ) { nbr_k = &(bonds->select.bond_list[pk]); k = nbr_k->nbr; - + // rvec_Scale( temp, -coef.C3dbo, nbr_k->bo_data.dBOp ); // rvec_ScaledAdd( temp, -coef.C3dDelta, nbr_k->bo_data.dBOp); // rvec_ScaledAdd( temp, -coef.C4dbopi, nbr_k->bo_data.dBOp); @@ -202,7 +202,7 @@ void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj, pair_reax_ptr->ev_tally_xyz_thr_proxy(system->pair_ptr,k,i,system->N,0,0,0, fk_tmp[0],fk_tmp[1],fk_tmp[2], delki[0],delki[1],delki[2],thr); - + rvec_ScaledSum(delkj,1.,system->my_atoms[k].x,-1.,system->my_atoms[j].x); pair_reax_ptr->ev_tally_xyz_thr_proxy(system->pair_ptr,k,j,system->N,0,0,0, @@ -357,7 +357,7 @@ int BOp_OMP( storage *workspace, reax_list *bonds, double bo_cut, /****** bonds i-j and j-i ******/ ibond = &( bonds->select.bond_list[btop_i] ); jbond = &( bonds->select.bond_list[btop_j] ); - + ibond->nbr = j; jbond->nbr = i; ibond->d = nbr_pj->d; @@ -370,19 +370,19 @@ int BOp_OMP( storage *workspace, reax_list *bonds, double bo_cut, jbond->dbond_index = btop_i; ibond->sym_index = btop_j; jbond->sym_index = btop_i; - + bo_ij = &( ibond->bo_data ); bo_ji = &( jbond->bo_data ); bo_ji->BO = bo_ij->BO = BO; bo_ji->BO_s = bo_ij->BO_s = BO_s; bo_ji->BO_pi = bo_ij->BO_pi = BO_pi; bo_ji->BO_pi2 = bo_ij->BO_pi2 = BO_pi2; - + /* Bond Order page2-3, derivative of total bond order prime */ Cln_BOp_s = twbp->p_bo2 * C12 * rr2; Cln_BOp_pi = twbp->p_bo4 * C34 * rr2; Cln_BOp_pi2 = twbp->p_bo6 * C56 * rr2; - + /* Only dln_BOp_xx wrt. dr_i is stored here, note that dln_BOp_xx/dr_i = -dln_BOp_xx/dr_j and all others are 0 */ rvec_Scale(bo_ij->dln_BOp_s,-bo_ij->BO_s*Cln_BOp_s,ibond->dvec); @@ -392,34 +392,34 @@ int BOp_OMP( storage *workspace, reax_list *bonds, double bo_cut, rvec_Scale(bo_ji->dln_BOp_s, -1., bo_ij->dln_BOp_s); rvec_Scale(bo_ji->dln_BOp_pi, -1., bo_ij->dln_BOp_pi ); rvec_Scale(bo_ji->dln_BOp_pi2, -1., bo_ij->dln_BOp_pi2 ); - + rvec_Scale( bo_ij->dBOp, -(bo_ij->BO_s * Cln_BOp_s + bo_ij->BO_pi * Cln_BOp_pi + bo_ij->BO_pi2 * Cln_BOp_pi2), ibond->dvec ); rvec_Scale( bo_ji->dBOp, -1., bo_ij->dBOp ); - + bo_ij->BO_s -= bo_cut; bo_ij->BO -= bo_cut; bo_ji->BO_s -= bo_cut; bo_ji->BO -= bo_cut; - + bo_ij->Cdbo = bo_ij->Cdbopi = bo_ij->Cdbopi2 = 0.0; bo_ji->Cdbo = bo_ji->Cdbopi = bo_ji->Cdbopi2 = 0.0; - + return 1; } /* ---------------------------------------------------------------------- */ void BOOMP( reax_system *system, control_params *control, simulation_data *data, - storage *workspace, reax_list **lists, output_controls *out_control ) + storage *workspace, reax_list **lists, output_controls *out_control ) { #ifdef OMP_TIMING double endTimeBase, startTimeBase; startTimeBase = MPI_Wtime(); #endif - + double p_lp1 = system->reax_param.gp.l[15]; int num_bonds = 0; double p_boc1 = system->reax_param.gp.l[0]; @@ -427,7 +427,7 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, reax_list *bonds = (*lists) + BONDS; int natoms = system->N; int nthreads = control->nthreads; - + #pragma omp parallel default(shared) { int i, j, pj, type_i, type_j; @@ -442,9 +442,9 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, single_body_parameters *sbp_i, *sbp_j; two_body_parameters *twbp; bond_order_data *bo_ij, *bo_ji; - + int tid = omp_get_thread_num(); - + /* Calculate Deltaprime, Deltaprime_boc values */ #pragma omp for schedule(static) for (i = 0; i < system->N; ++i) { @@ -460,7 +460,7 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, // Wait till initialization complete #pragma omp barrier - + /* Corrected Bond Order calculations */ //#pragma omp for schedule(dynamic,50) #pragma omp for schedule(guided) @@ -473,7 +473,7 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, Deltap_boc_i = workspace->Deltap_boc[i]; start_i = Start_Index(i, bonds); end_i = End_Index(i, bonds); - + for (pj = start_i; pj < end_i; ++pj) { j = bonds->select.bond_list[pj].nbr; type_j = system->my_atoms[j].type; @@ -487,23 +487,23 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, bo_ij->C1dbo = 1.000000; bo_ij->C2dbo = 0.000000; bo_ij->C3dbo = 0.000000; - + bo_ij->C1dbopi = bo_ij->BO_pi; bo_ij->C2dbopi = 0.000000; bo_ij->C3dbopi = 0.000000; bo_ij->C4dbopi = 0.000000; - + bo_ij->C1dbopi2 = bo_ij->BO_pi2; bo_ij->C2dbopi2 = 0.000000; bo_ij->C3dbopi2 = 0.000000; bo_ij->C4dbopi2 = 0.000000; - + } else { val_j = system->reax_param.sbp[type_j].valency; Deltap_j = workspace->Deltap[j]; Deltap_boc_j = workspace->Deltap_boc[j]; - + /* on page 1 */ if( twbp->ovc >= 0.001 ) { /* Correction for overcoordination */ @@ -511,12 +511,12 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, exp_p2i = exp( -p_boc2 * Deltap_i ); exp_p1j = exp( -p_boc1 * Deltap_j ); exp_p2j = exp( -p_boc2 * Deltap_j ); - + f2 = exp_p1i + exp_p1j; f3 = -1.0 / p_boc2 * log( 0.5 * ( exp_p2i + exp_p2j ) ); f1 = 0.5 * ( ( val_i + f2 )/( val_i + f2 + f3 ) + ( val_j + f2 )/( val_j + f2 + f3 ) ); - + /* Now come the derivates */ /* Bond Order pages 5-7, derivative of f1 */ temp = f2 + f3; @@ -526,7 +526,7 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, 1.0 / SQR( u1_ji )); Cf1B_ij = -0.5 * (( u1_ij - f3 ) / SQR( u1_ij ) + ( u1_ji - f3 ) / SQR( u1_ji )); - + Cf1_ij = 0.50 * ( -p_boc1 * exp_p1i / u1_ij - ((val_i+f2) / SQR(u1_ij)) * ( -p_boc1 * exp_p1i + @@ -535,8 +535,8 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, ((val_j+f2) / SQR(u1_ji)) * ( -p_boc1 * exp_p1i + exp_p2i / ( exp_p2i + exp_p2j ) )); - - + + Cf1_ji = -Cf1A_ij * p_boc1 * exp_p1j + Cf1B_ij * exp_p2j / ( exp_p2i + exp_p2j ); } @@ -552,11 +552,11 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, Deltap_boc_i) * twbp->p_boc3 + twbp->p_boc5); exp_f5 =exp(-(twbp->p_boc4 * SQR( bo_ij->BO ) - Deltap_boc_j) * twbp->p_boc3 + twbp->p_boc5); - + f4 = 1. / (1. + exp_f4); f5 = 1. / (1. + exp_f5); f4f5 = f4 * f5; - + /* Bond Order pages 8-9, derivative of f4 and f5 */ Cf45_ij = -f4 * exp_f4; Cf45_ji = -f5 * exp_f5; @@ -565,7 +565,7 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, f4 = f5 = f4f5 = 1.0; Cf45_ij = Cf45_ji = 0.0; } - + /* Bond Order page 10, derivative of total bond order */ A0_ij = f1 * f4f5; A1_ij = -2 * twbp->p_boc3 * twbp->p_boc4 * bo_ij->BO * @@ -574,28 +574,28 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, A2_ji = Cf1_ji / f1 + twbp->p_boc3 * Cf45_ji; A3_ij = A2_ij + Cf1_ij / f1; A3_ji = A2_ji + Cf1_ji / f1; - + /* find corrected bond orders and their derivative coef */ bo_ij->BO = bo_ij->BO * A0_ij; bo_ij->BO_pi = bo_ij->BO_pi * A0_ij *f1; bo_ij->BO_pi2= bo_ij->BO_pi2* A0_ij *f1; bo_ij->BO_s = bo_ij->BO - ( bo_ij->BO_pi + bo_ij->BO_pi2 ); - + bo_ij->C1dbo = A0_ij + bo_ij->BO * A1_ij; bo_ij->C2dbo = bo_ij->BO * A2_ij; bo_ij->C3dbo = bo_ij->BO * A2_ji; - + bo_ij->C1dbopi = f1*f1*f4*f5; bo_ij->C2dbopi = bo_ij->BO_pi * A1_ij; bo_ij->C3dbopi = bo_ij->BO_pi * A3_ij; bo_ij->C4dbopi = bo_ij->BO_pi * A3_ji; - + bo_ij->C1dbopi2 = f1*f1*f4*f5; bo_ij->C2dbopi2 = bo_ij->BO_pi2 * A1_ij; bo_ij->C3dbopi2 = bo_ij->BO_pi2 * A3_ij; bo_ij->C4dbopi2 = bo_ij->BO_pi2 * A3_ji; } - + /* neglect bonds that are < 1e-10 */ if( bo_ij->BO < 1e-10 ) bo_ij->BO = 0.0; @@ -605,7 +605,7 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, bo_ij->BO_pi = 0.0; if( bo_ij->BO_pi2 < 1e-10 ) bo_ij->BO_pi2 = 0.0; - + workspace->total_bond_order[i] += bo_ij->BO; //now keeps total_BO } // else { @@ -617,11 +617,11 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, // bo_ij->BO_s = bo_ji->BO_s; // bo_ij->BO_pi = bo_ji->BO_pi; // bo_ij->BO_pi2 = bo_ji->BO_pi2; - + // workspace->total_bond_order[i] += bo_ij->BO;// now keeps total_BO // } } - + } // Wait for bo_ij to be updated @@ -635,7 +635,7 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, if(type_i < 0) continue; start_i = Start_Index(i, bonds); end_i = End_Index(i, bonds); - + for (pj = start_i; pj < end_i; ++pj) { j = bonds->select.bond_list[pj].nbr; type_j = system->my_atoms[j].type; @@ -647,25 +647,25 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, /* We only need to update bond orders from bo_ji everything else is set in uncorrected_bo calculations */ sym_index = bonds->select.bond_list[pj].sym_index; - + bo_ij = &( bonds->select.bond_list[pj].bo_data ); bo_ji = &(bonds->select.bond_list[ sym_index ].bo_data); bo_ij->BO = bo_ji->BO; bo_ij->BO_s = bo_ji->BO_s; bo_ij->BO_pi = bo_ji->BO_pi; bo_ij->BO_pi2 = bo_ji->BO_pi2; - + workspace->total_bond_order[i] += bo_ij->BO;// now keeps total_BO } } - + } /*-------------------------*/ - + // Need to wait for total_bond_order to be accumulated. #pragma omp barrier - + /* Calculate some helper variables that are used at many places throughout force calculations */ #pragma omp for schedule(guided) @@ -673,14 +673,14 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, type_j = system->my_atoms[j].type; if(type_j < 0) continue; sbp_j = &(system->reax_param.sbp[ type_j ]); - + workspace->Delta[j] = workspace->total_bond_order[j] - sbp_j->valency; workspace->Delta_e[j] = workspace->total_bond_order[j] - sbp_j->valency_e; workspace->Delta_boc[j] = workspace->total_bond_order[j] - sbp_j->valency_boc; workspace->Delta_val[j] = workspace->total_bond_order[j] - sbp_j->valency_val; - + workspace->vlpex[j] = workspace->Delta_e[j] - 2.0 * (int)(workspace->Delta_e[j]/2.0); explp1 = exp(-p_lp1 * SQR(2.0 + workspace->vlpex[j])); @@ -688,7 +688,7 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, workspace->Delta_lp[j] = sbp_j->nlp_opt - workspace->nlp[j]; workspace->Clp[j] = 2.0 * p_lp1 * explp1 * (2.0 + workspace->vlpex[j]); workspace->dDelta_lp[j] = workspace->Clp[j]; - + if( sbp_j->mass > 21.0 ) { workspace->nlp_temp[j] = 0.5 * (sbp_j->valency_e - sbp_j->valency); workspace->Delta_lp_temp[j] = sbp_j->nlp_opt - workspace->nlp_temp[j]; @@ -700,7 +700,7 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, workspace->dDelta_lp_temp[j] = workspace->Clp[j]; } } - + } // parallel region #ifdef OMP_TIMING diff --git a/src/USER-OMP/reaxc_bonds_omp.cpp b/src/USER-OMP/reaxc_bonds_omp.cpp index 4dc666b3ee..19433ce2e3 100644 --- a/src/USER-OMP/reaxc_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_bonds_omp.cpp @@ -45,7 +45,7 @@ void BondsOMP( reax_system *system, control_params *control, double endTimeBase, startTimeBase; startTimeBase = MPI_Wtime(); #endif - + int natoms = system->n; int nthreads = control->nthreads; reax_list *bonds = (*lists) + BONDS; @@ -57,7 +57,7 @@ void BondsOMP( reax_system *system, control_params *control, double total_Ebond = 0.0; #pragma omp parallel default(shared) reduction(+: total_Ebond) - { + { int i, j, pj; int start_i, end_i; int type_i, type_j; @@ -70,31 +70,31 @@ void BondsOMP( reax_system *system, control_params *control, bond_order_data *bo_ij; int tid = omp_get_thread_num(); long reductionOffset = (system->N * tid); - + class PairReaxCOMP *pair_reax_ptr; pair_reax_ptr = static_cast(system->pair_ptr); class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, natoms, + + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, natoms, system->pair_ptr->eatom, system->pair_ptr->vatom, thr); - + #pragma omp for schedule(guided) for (i = 0; i < natoms; ++i) { start_i = Start_Index(i, bonds); end_i = End_Index(i, bonds); - + for (pj = start_i; pj < end_i; ++pj) { j = bonds->select.bond_list[pj].nbr; - + if( system->my_atoms[i].orig_id > system->my_atoms[j].orig_id ) continue; if( system->my_atoms[i].orig_id == system->my_atoms[j].orig_id ) { if (system->my_atoms[j].x[2] < system->my_atoms[i].x[2]) continue; - if (system->my_atoms[j].x[2] == system->my_atoms[i].x[2] && + if (system->my_atoms[j].x[2] == system->my_atoms[i].x[2] && system->my_atoms[j].x[1] < system->my_atoms[i].x[1]) continue; - if (system->my_atoms[j].x[2] == system->my_atoms[i].x[2] && - system->my_atoms[j].x[1] == system->my_atoms[i].x[1] && + if (system->my_atoms[j].x[2] == system->my_atoms[i].x[2] && + system->my_atoms[j].x[1] == system->my_atoms[i].x[1] && system->my_atoms[j].x[0] < system->my_atoms[i].x[0]) continue; } @@ -105,29 +105,29 @@ void BondsOMP( reax_system *system, control_params *control, sbp_j = &( system->reax_param.sbp[type_j] ); twbp = &( system->reax_param.tbp[type_i][type_j] ); bo_ij = &( bonds->select.bond_list[pj].bo_data ); - + /* calculate the constants */ pow_BOs_be2 = pow( bo_ij->BO_s, twbp->p_be2 ); exp_be12 = exp( twbp->p_be1 * ( 1.0 - pow_BOs_be2 ) ); CEbo = -twbp->De_s * exp_be12 * ( 1.0 - twbp->p_be1 * twbp->p_be2 * pow_BOs_be2 ); - - /* calculate the Bond Energy */ + + /* calculate the Bond Energy */ total_Ebond += ebond = -twbp->De_s * bo_ij->BO_s * exp_be12 -twbp->De_p * bo_ij->BO_pi -twbp->De_pp * bo_ij->BO_pi2; - + /* tally into per-atom energy */ if (system->pair_ptr->evflag) - pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, j, natoms, 1, + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, j, natoms, 1, ebond, 0.0, 0.0, 0.0, 0.0, 0.0, thr); - + /* calculate derivatives of Bond Orders */ bo_ij->Cdbo += CEbo; bo_ij->Cdbopi -= (CEbo + twbp->De_p); bo_ij->Cdbopi2 -= (CEbo + twbp->De_pp); - + /* Stabilisation terminal triple bond */ if (bo_ij->BO >= 1.00) { if (gp37 == 2 || @@ -138,22 +138,22 @@ void BondsOMP( reax_system *system, control_params *control, exphub1 = exp(-gp3 * (workspace->total_bond_order[j]-bo_ij->BO)); exphuov = exp(gp4 * (workspace->Delta[i] + workspace->Delta[j])); hulpov = 1.0 / (1.0 + 25.0 * exphuov); - + estriph = gp10 * exphu * hulpov * (exphua1 + exphub1); total_Ebond += estriph; - + decobdbo = gp10 * exphu * hulpov * (exphua1 + exphub1) * ( gp3 - 2.0 * gp7 * (bo_ij->BO-2.50) ); decobdboua = -gp10 * exphu * hulpov * (gp3*exphua1 + 25.0*gp4*exphuov*hulpov*(exphua1+exphub1)); decobdboub = -gp10 * exphu * hulpov * (gp3*exphub1 + 25.0*gp4*exphuov*hulpov*(exphua1+exphub1)); - + /* tally into per-atom energy */ if (system->pair_ptr->evflag) - pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, j, natoms, 1, + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, j, natoms, 1, estriph, 0.0, 0.0, 0.0, 0.0, 0.0, thr); - + bo_ij->Cdbo += decobdbo; workspace->CdDelta[i] += decobdboua; workspace->CdDeltaReduction[reductionOffset+j] += decobdboub; @@ -163,12 +163,12 @@ void BondsOMP( reax_system *system, control_params *control, } // for(i) } // omp - + data->my_en.e_bond += total_Ebond; - + #ifdef OMP_TIMING endTimeBase = MPI_Wtime(); - ompTimingData[COMPUTEBONDSINDEX] += (endTimeBase-startTimeBase); + ompTimingData[COMPUTEBONDSINDEX] += (endTimeBase-startTimeBase); #endif } diff --git a/src/USER-OMP/reaxc_forces_omp.cpp b/src/USER-OMP/reaxc_forces_omp.cpp index 1bf04129e0..47e439a3f7 100644 --- a/src/USER-OMP/reaxc_forces_omp.cpp +++ b/src/USER-OMP/reaxc_forces_omp.cpp @@ -77,7 +77,7 @@ void Compute_Bonded_ForcesOMP( reax_system *system, control_params *control, MPI_Comm comm ) { int i; - + #ifdef OMP_TIMING double startTimeBase, endTimeBase; startTimeBase = MPI_Wtime(); @@ -114,7 +114,7 @@ void Compute_NonBonded_ForcesOMP( reax_system *system, control_params *control, else Tabulated_vdW_Coulomb_Energy_OMP( system, control, data, workspace, lists, out_control ); - + #ifdef OMP_TIMING endTimeBase = MPI_Wtime(); ompTimingData[COMPUTENBFINDEX] += (endTimeBase-startTimeBase); @@ -129,48 +129,48 @@ void Compute_NonBonded_ForcesOMP( reax_system *system, control_params *control, void Compute_Total_ForceOMP( reax_system *system, control_params *control, simulation_data *data, storage *workspace, reax_list **lists, mpi_datatypes *mpi_data ) -{ +{ #ifdef OMP_TIMING double startTimeBase,endTimeBase; startTimeBase = MPI_Wtime(); #endif - + int natoms = system->N; int nthreads = control->nthreads; - long totalReductionSize = system->N * nthreads; + long totalReductionSize = system->N * nthreads; reax_list *bonds = (*lists) + BONDS; - -#pragma omp parallel default(shared) //default(none) + +#pragma omp parallel default(shared) //default(none) { int i, j, k, pj, pk, start_j, end_j; int tid = omp_get_thread_num(); bond_order_data *bo_jk; - + class PairReaxCOMP *pair_reax_ptr; pair_reax_ptr = static_cast(system->pair_ptr); class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - - pair_reax_ptr->ev_setup_thr_proxy(0, 1, natoms, system->pair_ptr->eatom, + + pair_reax_ptr->ev_setup_thr_proxy(0, 1, natoms, system->pair_ptr->eatom, system->pair_ptr->vatom, thr); - + #pragma omp for schedule(guided) for (i = 0; i < system->N; ++i) { for (j = 0; j < nthreads; ++j) workspace->CdDelta[i] += workspace->CdDeltaReduction[system->N*j+i]; } - + #pragma omp for schedule(dynamic,50) for (j = 0; j < system->N; ++j) { start_j = Start_Index(j, bonds); end_j = End_Index(j, bonds); - + for (pk = start_j; pk < end_j; ++pk) { bo_jk = &( bonds->select.bond_list[pk].bo_data ); for (k = 0; k < nthreads; ++k) bo_jk->Cdbo += bo_jk->CdboReduction[k]; } } - + // #pragma omp for schedule(guided) //(dynamic,50) // for (i = 0; i < system->N; ++i) // for (pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj) @@ -188,7 +188,7 @@ void Compute_Total_ForceOMP( reax_system *system, control_params *control, const int startj = Start_Index(i, bonds); const int endj = End_Index(i, bonds); for (pj = startj; pj < endj; ++pj) - if (i < bonds->select.bond_list[pj].nbr) + if (i < bonds->select.bond_list[pj].nbr) Add_dBond_to_ForcesOMP( system, i, pj, workspace, lists ); } @@ -199,7 +199,7 @@ void Compute_Total_ForceOMP( reax_system *system, control_params *control, const int startj = Start_Index(i, bonds); const int endj = End_Index(i, bonds); for (pj = startj; pj < endj; ++pj) - if (i < bonds->select.bond_list[pj].nbr) + if (i < bonds->select.bond_list[pj].nbr) Add_dBond_to_Forces_NPTOMP(system, i, pj, data, workspace, lists ); } @@ -213,8 +213,8 @@ void Compute_Total_ForceOMP( reax_system *system, control_params *control, rvec_Add( workspace->f[i], workspace->forceReduction[system->N*j+i] ); } - -#pragma omp for schedule(guided) + +#pragma omp for schedule(guided) for (i = 0; i < totalReductionSize; i++) { workspace->forceReduction[i][0] = 0; workspace->forceReduction[i][1] = 0; @@ -222,7 +222,7 @@ void Compute_Total_ForceOMP( reax_system *system, control_params *control, workspace->CdDeltaReduction[i] = 0; } } // parallel region - + if (control->virial) for (int i=0; i < nthreads; ++i) { rvec_Add(data->my_ext_press, workspace->my_ext_pressReduction[i]); @@ -249,7 +249,7 @@ void Validate_ListsOMP( reax_system *system, storage *workspace, reax_list **lis #pragma omp parallel default(shared) private(i, comp, Hindex) { - + /* bond list */ if( N > 0 ) { bonds = *lists + BONDS; @@ -269,8 +269,8 @@ void Validate_ListsOMP( reax_system *system, storage *workspace, reax_list **lis } } } - - + + /* hbonds list */ if( numH > 0 ) { hbonds = *lists + HBONDS; @@ -294,7 +294,7 @@ void Validate_ListsOMP( reax_system *system, storage *workspace, reax_list **lis } } } - + } // omp parallel } @@ -307,7 +307,7 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, double startTimeBase, endTimeBase; startTimeBase = MPI_Wtime(); #endif - + int i, j, pi, pj; int start_i, end_i, start_j, end_j; int type_i, type_j; @@ -338,7 +338,7 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, /* uncorrected bond orders */ cutoff = control->bond_cut; - + #pragma omp parallel default(shared) \ private(i, atom_i, type_i, pi, start_i, end_i, sbp_i, btop_i, ibond, ihb, ihb_top, \ j, atom_j, type_j, pj, start_j, end_j, sbp_j, nbr_pj, jbond, jhb, twbp) @@ -376,7 +376,7 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, // btop_i++; // Set_End_Index(i, btop_i, bonds); // } - + // } // Trying to minimize time spent in critical section by moving initial part of BOp() @@ -412,7 +412,7 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, if(BO >= bo_cut) { int btop_j; - + // Update indices in critical section #pragma omp critical { @@ -421,30 +421,30 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, Set_End_Index( j, btop_j+1, bonds ); Set_End_Index( i, btop_i+1, bonds ); } // omp critical - + // Finish remaining BOp() work BOp_OMP(workspace, bonds, bo_cut, i , btop_i, nbr_pj, sbp_i, sbp_j, twbp, btop_j, C12, C34, C56, BO, BO_s, BO_pi, BO_pi2); - + bond_data * ibond = &(bonds->select.bond_list[btop_i]); bond_order_data * bo_ij = &(ibond->bo_data); - + bond_data * jbond = &(bonds->select.bond_list[btop_j]); bond_order_data * bo_ji = &(jbond->bo_data); - + workspace->total_bond_order[i] += bo_ij->BO; tmp_bond_order[reductionOffset + j] += bo_ji->BO; - + rvec_Add(workspace->dDeltap_self[i], bo_ij->dBOp); rvec_Add(tmp_ddelta[reductionOffset + j], bo_ji->dBOp); - + btop_i++; num_bonds++; } // if(BO>=bo_cut) } // if(cutoff) - + } // for(pj) } // for(i) @@ -452,7 +452,7 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, #pragma omp barrier #pragma omp for schedule(dynamic,50) - for(i=0; iN; i++) + for(i=0; iN; i++) for(int t=0; tN + i; workspace->dDeltap_self[i][0] += tmp_ddelta[indx][0]; @@ -467,18 +467,18 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, // for (i = 0; i < system->N; ++i) { // start_i = Start_Index(i, bonds); // end_i = End_Index(i, bonds); - + // for (pi = start_i; pi < end_i; ++pi) { // ibond = &(bonds->select.bond_list[pi]); // j = ibond->nbr; - + // if (i < j) { // start_j = Start_Index(j, bonds); // end_j = End_Index(j, bonds); // for (pj = start_j; pj < end_j; ++pj) { // jbond = &(bonds->select.bond_list[pj]); - + // if (jbond->nbr == i) { // ibond->sym_index = pj; // jbond->sym_index = pi; @@ -488,13 +488,13 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, // } // } // } - + /* hydrogen bond list */ if (control->hbond_cut > 0) { cutoff = control->hbond_cut; -//#pragma omp for schedule(guided) reduction(+ : num_hbonds) -#pragma omp for schedule(dynamic,50) reduction(+ : num_hbonds) +//#pragma omp for schedule(guided) reduction(+ : num_hbonds) +#pragma omp for schedule(dynamic,50) reduction(+ : num_hbonds) for (i = 0; i < system->n; ++i) { atom_i = &(system->my_atoms[i]); type_i = atom_i->type; @@ -503,11 +503,11 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, #pragma omp critical { - + if (ihb == 1 || ihb == 2) { start_i = Start_Index(i, far_nbrs); end_i = End_Index(i, far_nbrs); - + for (pj = start_i; pj < end_i; ++pj) { nbr_pj = &( far_nbrs->select.far_nbr_list[pj] ); j = nbr_pj->nbr; @@ -520,12 +520,12 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, if (nbr_pj->d <= control->hbond_cut) { int iflag = 0; int jflag = 0; - + if(ihb==1 && jhb==2) iflag = 1; else if(jn && ihb == 2 && jhb == 1) jflag = 1; - + if(iflag || jflag) { - + // This critical section enforces H-bonds to be added by threads one at a time. // #pragma omp critical // { @@ -547,14 +547,14 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, hbonds->select.hbond_list[jhb_top].scl = -1; hbonds->select.hbond_list[jhb_top].ptr = nbr_pj; } - + num_hbonds++; } // if(iflag || jflag) } } } - + } // omp critical } @@ -592,8 +592,8 @@ void Compute_ForcesOMP( reax_system *system, control_params *control, { int qeq_flag; MPI_Comm comm = mpi_data->world; - - // Init Forces + + // Init Forces #if defined(LOG_PERFORMANCE) double t_start = 0; if( system->my_rank == MASTER_NODE ) @@ -602,13 +602,13 @@ void Compute_ForcesOMP( reax_system *system, control_params *control, Init_Forces_noQEq_OMP( system, control, data, workspace, lists, out_control, comm ); - + #if defined(LOG_PERFORMANCE) //MPI_Barrier( comm ); if( system->my_rank == MASTER_NODE ) Update_Timing_Info( &t_start, &(data->timing.init_forces) ); #endif - + // Bonded Interactions Compute_Bonded_ForcesOMP( system, control, data, workspace, lists, out_control, mpi_data->world ); @@ -617,19 +617,19 @@ void Compute_ForcesOMP( reax_system *system, control_params *control, if( system->my_rank == MASTER_NODE ) Update_Timing_Info( &t_start, &(data->timing.bonded) ); #endif - + // Nonbonded Interactions Compute_NonBonded_ForcesOMP( system, control, data, workspace, lists, out_control, mpi_data->world ); - + #if defined(LOG_PERFORMANCE) if( system->my_rank == MASTER_NODE ) Update_Timing_Info( &t_start, &(data->timing.nonb) ); #endif - + // Total Force Compute_Total_ForceOMP( system, control, data, workspace, lists, mpi_data ); - + #if defined(LOG_PERFORMANCE) if( system->my_rank == MASTER_NODE ) Update_Timing_Info( &t_start, &(data->timing.bonded) ); diff --git a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp index 5047e2775e..00ecb58de1 100644 --- a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp @@ -46,10 +46,10 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control, double endTimeBase, startTimeBase; startTimeBase = MPI_Wtime(); #endif - + const int nthreads = control->nthreads; long totalReductionSize = system->N; - + #pragma omp parallel default(shared) //default(none) { int i, j, k, pi, pk; @@ -92,11 +92,11 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control, class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, - natoms, system->pair_ptr->eatom, + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, + natoms, system->pair_ptr->eatom, system->pair_ptr->vatom, thr); - + /* loops below discover the Hydrogen bonds between i-j-k triplets. here j is H atom and there has to be some bond between i and j. Hydrogen bond is between j and k. @@ -113,7 +113,7 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control, hb_start_j = Start_Index( system->my_atoms[j].Hindex, hbonds ); hb_end_j = End_Index( system->my_atoms[j].Hindex, hbonds ); if(type_j < 0) continue; - + top = 0; for( pi = start_j; pi < end_j; ++pi ) { pbond_ij = &( bond_list[pi] ); @@ -230,8 +230,8 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control, { data->my_en.e_hb += e_hb_thr; } - - pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, + + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, system->pair_ptr->vflag_either, thr); } diff --git a/src/USER-OMP/reaxc_init_md_omp.cpp b/src/USER-OMP/reaxc_init_md_omp.cpp index 1584d5e53e..9e01280545 100644 --- a/src/USER-OMP/reaxc_init_md_omp.cpp +++ b/src/USER-OMP/reaxc_init_md_omp.cpp @@ -53,7 +53,7 @@ int Init_ListsOMP( reax_system *system, control_params *control, int i, total_hbonds, total_bonds, bond_cap, num_3body, cap_3body, Htop; int *hb_top, *bond_top; MPI_Comm comm; - + int TWICE = 2; int mincap = system->mincap; double safezone = system->safezone; @@ -96,9 +96,9 @@ int Init_ListsOMP( reax_system *system, control_params *control, int nthreads = control->nthreads; reax_list *bonds = (*lists)+BONDS; - + for (i = 0; i < bonds->num_intrs; ++i) - bonds->select.bond_list[i].bo_data.CdboReduction = + bonds->select.bond_list[i].bo_data.CdboReduction = (double*) smalloc(sizeof(double)*nthreads, "CdboReduction", comm); /* 3bodies list */ diff --git a/src/USER-OMP/reaxc_multi_body_omp.cpp b/src/USER-OMP/reaxc_multi_body_omp.cpp index a355ce8609..7922d7fd0d 100644 --- a/src/USER-OMP/reaxc_multi_body_omp.cpp +++ b/src/USER-OMP/reaxc_multi_body_omp.cpp @@ -45,7 +45,7 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, double endTimeBase, startTimeBase; startTimeBase = MPI_Wtime(); #endif - + /* Initialize parameters */ double p_lp1 = system->reax_param.gp.l[15]; double p_lp3 = system->reax_param.gp.l[5]; @@ -58,11 +58,11 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, int natoms = system->n; int nthreads = control->nthreads; reax_list *bonds = (*lists) + BONDS; - + double total_Elp = 0.0; double total_Eun = 0.0; double total_Eov = 0.0; - + #pragma omp parallel default(shared) reduction(+:total_Elp, total_Eun, total_Eov) { int i, j, pj, type_i, type_j; @@ -77,29 +77,29 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, double eng_tmp, f_tmp; double p_lp2, p_ovun2, p_ovun5; int numbonds; - + single_body_parameters *sbp_i, *sbp_j; two_body_parameters *twbp; bond_data *pbond; bond_order_data *bo_ij; - + int tid = omp_get_thread_num(); - + long reductionOffset = (system->N * tid); class PairReaxCOMP *pair_reax_ptr; pair_reax_ptr = static_cast(system->pair_ptr); class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, natoms, + + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, natoms, system->pair_ptr->eatom, system->pair_ptr->vatom, thr); - + #pragma omp for schedule(guided) for ( i = 0; i < system->n; ++i) { type_i = system->my_atoms[i].type; if(type_i < 0) continue; sbp_i = &(system->reax_param.sbp[ type_i ]); - + /* lone-pair Energy */ p_lp2 = sbp_i->p_lp2; expvd2 = exp( -75 * workspace->Delta_lp[i] ); @@ -111,21 +111,21 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, numbonds ++; /* calculate the energy */ - if(numbonds > 0) + if(numbonds > 0) total_Elp += e_lp = p_lp2 * workspace->Delta_lp[i] * inv_expvd2; - + dElp = p_lp2 * inv_expvd2 + 75 * p_lp2 * workspace->Delta_lp[i] * expvd2 * SQR(inv_expvd2); CElp = dElp * workspace->dDelta_lp[i]; - + if(numbonds > 0) workspace->CdDelta[i] += CElp; // lp - 1st term - + /* tally into per-atom energy */ if( system->pair_ptr->evflag) - pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, i, system->n, 1, + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, i, system->n, 1, e_lp, 0.0, 0.0, 0.0, 0.0, 0.0, thr); - + /* correction for C2 */ if( p_lp3 > 0.001 && !strcmp(system->reax_param.sbp[type_i].name, "C") ) for( pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj ) { @@ -138,19 +138,19 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, bo_ij = &( bonds->select.bond_list[pj].bo_data ); Di = workspace->Delta[i]; vov3 = bo_ij->BO - Di - 0.040*pow(Di, 4.); - + if( vov3 > 3. ) { total_Elp += e_lph = p_lp3 * SQR(vov3-3.0); deahu2dbo = 2.*p_lp3*(vov3 - 3.); deahu2dsbo = 2.*p_lp3*(vov3 - 3.)*(-1. - 0.16*pow(Di, 3.)); - + bo_ij->Cdbo += deahu2dbo; workspace->CdDelta[i] += deahu2dsbo; - + /* tally into per-atom energy */ if( system->pair_ptr->evflag) - pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, j, system->n, 1, + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, j, system->n, 1, e_lph, 0.0, 0.0, 0.0, 0.0, 0.0, thr); } } @@ -163,12 +163,12 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, type_i = system->my_atoms[i].type; if(type_i < 0) continue; sbp_i = &(system->reax_param.sbp[ type_i ]); - + /* over-coordination energy */ if( sbp_i->mass > 21.0 ) dfvl = 0.0; else dfvl = 1.0; // only for 1st-row elements - + p_ovun2 = sbp_i->p_ovun2; sum_ovun1 = sum_ovun2 = 0; for (pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj) { @@ -177,20 +177,20 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, if(type_j < 0) continue; bo_ij = &(bonds->select.bond_list[pj].bo_data); twbp = &(system->reax_param.tbp[ type_i ][ type_j ]); - + sum_ovun1 += twbp->p_ovun1 * twbp->De_s * bo_ij->BO; sum_ovun2 += (workspace->Delta[j] - dfvl*workspace->Delta_lp_temp[j])* ( bo_ij->BO_pi + bo_ij->BO_pi2 ); } - + exp_ovun1 = p_ovun3 * exp( p_ovun4 * sum_ovun2 ); inv_exp_ovun1 = 1.0 / (1 + exp_ovun1); Delta_lpcorr = workspace->Delta[i] - (dfvl * workspace->Delta_lp_temp[i]) * inv_exp_ovun1; - + exp_ovun2 = exp( p_ovun2 * Delta_lpcorr ); inv_exp_ovun2 = 1.0 / (1.0 + exp_ovun2); - + DlpVi = 1.0 / (Delta_lpcorr + sbp_i->valency + 1e-8); CEover1 = Delta_lpcorr * DlpVi * inv_exp_ovun2; @@ -198,17 +198,17 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, CEover2 = sum_ovun1 * DlpVi * inv_exp_ovun2 * (1.0 - Delta_lpcorr * ( DlpVi + p_ovun2 * exp_ovun2 * inv_exp_ovun2 )); - + CEover3 = CEover2 * (1.0 - dfvl * workspace->dDelta_lp[i] * inv_exp_ovun1 ); - + CEover4 = CEover2 * (dfvl * workspace->Delta_lp_temp[i]) * p_ovun4 * exp_ovun1 * SQR(inv_exp_ovun1); - - + + /* under-coordination potential */ p_ovun2 = sbp_i->p_ovun2; p_ovun5 = sbp_i->p_ovun5; - + exp_ovun2n = 1.0 / exp_ovun2; exp_ovun6 = exp( p_ovun6 * Delta_lpcorr ); exp_ovun8 = p_ovun7 * exp(p_ovun8 * sum_ovun2); @@ -222,7 +222,7 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, if(numbonds > 0) total_Eun += e_un = -p_ovun5 * (1.0 - exp_ovun6) * inv_exp_ovun2n * inv_exp_ovun8; - + CEunder1 = inv_exp_ovun2n * ( p_ovun5 * p_ovun6 * exp_ovun6 * inv_exp_ovun8 + p_ovun2 * e_un * exp_ovun2n ); @@ -230,15 +230,15 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, CEunder3 = CEunder1 * (1.0 - dfvl*workspace->dDelta_lp[i]*inv_exp_ovun1); CEunder4 = CEunder1 * (dfvl*workspace->Delta_lp_temp[i]) * p_ovun4 * exp_ovun1 * SQR(inv_exp_ovun1) + CEunder2; - + /* tally into per-atom energy */ if (system->pair_ptr->evflag) { eng_tmp = e_ov; if(numbonds > 0) eng_tmp+= e_un; - pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, i, system->n, 1, + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, i, system->n, 1, eng_tmp, 0.0, 0.0, 0.0, 0.0, 0.0, thr); } - + /* forces */ workspace->CdDelta[i] += CEover3; // OvCoor - 2nd term if(numbonds > 0) workspace->CdDelta[i] += CEunder3; // UnCoor - 1st term @@ -249,35 +249,35 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, bo_ij = &(pbond->bo_data); twbp = &(system->reax_param.tbp[ system->my_atoms[i].type ] [system->my_atoms[pbond->nbr].type]); - + bo_ij->Cdbo += CEover1 * twbp->p_ovun1 * twbp->De_s; // OvCoor-1st - workspace->CdDeltaReduction[reductionOffset+j] += + workspace->CdDeltaReduction[reductionOffset+j] += CEover4 * (1.0 - dfvl*workspace->dDelta_lp[j]) * (bo_ij->BO_pi + bo_ij->BO_pi2); // OvCoor-3a - + bo_ij->Cdbopi += CEover4 * (workspace->Delta[j] - dfvl*workspace->Delta_lp_temp[j]); // OvCoor-3b bo_ij->Cdbopi2 += CEover4 * (workspace->Delta[j] - dfvl*workspace->Delta_lp_temp[j]); // OvCoor-3b - - workspace->CdDeltaReduction[reductionOffset+j] += + + workspace->CdDeltaReduction[reductionOffset+j] += CEunder4 * (1.0 - dfvl*workspace->dDelta_lp[j]) * (bo_ij->BO_pi + bo_ij->BO_pi2); // UnCoor - 2a - + bo_ij->Cdbopi += CEunder4 * (workspace->Delta[j] - dfvl*workspace->Delta_lp_temp[j]); // UnCoor-2b bo_ij->Cdbopi2 += CEunder4 * (workspace->Delta[j] - dfvl*workspace->Delta_lp_temp[j]); // UnCoor-2b } } - - pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, + + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, system->pair_ptr->vflag_either, thr); - + } - + data->my_en.e_lp += total_Elp; data->my_en.e_ov += total_Eov; data->my_en.e_un += total_Eun; - + #ifdef OMP_TIMING endTimeBase = MPI_Wtime(); ompTimingData[COMPUTEATOMENERGYINDEX] += (endTimeBase-startTimeBase); diff --git a/src/USER-OMP/reaxc_nonbonded_omp.cpp b/src/USER-OMP/reaxc_nonbonded_omp.cpp index 73dbc1dda4..583c02bd08 100644 --- a/src/USER-OMP/reaxc_nonbonded_omp.cpp +++ b/src/USER-OMP/reaxc_nonbonded_omp.cpp @@ -44,7 +44,7 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, simulation_data *data, storage *workspace, reax_list **lists, output_controls *out_control ) { - int natoms = system->n; + int natoms = system->n; int nthreads = control->nthreads; long totalReductionSize = system->N * nthreads; reax_list *far_nbrs = (*lists) + FAR_NBRS; @@ -52,7 +52,7 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, double p_vdW1i = 1.0 / p_vdW1; double total_EvdW = 0.; double total_Eele = 0.; - + #pragma omp parallel default(shared) reduction(+: total_EvdW, total_Eele) //default(none) { int tid = omp_get_thread_num(); @@ -67,20 +67,20 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, rvec temp, ext_press; two_body_parameters *twbp; far_neighbor_data *nbr_pj; - + // Tallying variables: double pe_vdw, f_tmp, delij[3]; - + long reductionOffset = (system->N * tid); - + class PairReaxCOMP *pair_reax_ptr; pair_reax_ptr = static_cast(system->pair_ptr); class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, + + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, natoms, system->pair_ptr->eatom, - system->pair_ptr->vatom, thr); + system->pair_ptr->vatom, thr); e_core = 0; e_vdW = 0; e_vdW_thr = 0; @@ -94,12 +94,12 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, start_i = Start_Index(i, far_nbrs); end_i = End_Index(i, far_nbrs); orig_i = system->my_atoms[i].orig_id; - + for( pj = start_i; pj < end_i; ++pj ) { nbr_pj = &(far_nbrs->select.far_nbr_list[pj]); j = nbr_pj->nbr; orig_j = system->my_atoms[j].orig_id; - + flag = 0; if(nbr_pj->d <= control->nonb_cut) { if(j < natoms) flag = 1; @@ -113,7 +113,7 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, } } } - + if (flag) { r_ij = nbr_pj->d; @@ -142,14 +142,14 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, { // shielding powr_vdW1 = pow(r_ij, p_vdW1); powgi_vdW1 = pow( 1.0 / twbp->gamma_w, p_vdW1); - + fn13 = pow( powr_vdW1 + powgi_vdW1, p_vdW1i ); exp1 = exp( twbp->alpha * (1.0 - fn13 / twbp->r_vdW) ); exp2 = exp( 0.5 * twbp->alpha * (1.0 - fn13 / twbp->r_vdW) ); - + e_vdW = twbp->D * (exp1 - 2.0 * exp2); total_EvdW += Tap * e_vdW; - + dfn13 = pow( powr_vdW1 + powgi_vdW1, p_vdW1i - 1.0) * pow(r_ij, p_vdW1 - 2.0); @@ -159,10 +159,10 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, else{ // no shielding exp1 = exp( twbp->alpha * (1.0 - r_ij / twbp->r_vdW) ); exp2 = exp( 0.5 * twbp->alpha * (1.0 - r_ij / twbp->r_vdW) ); - + e_vdW = twbp->D * (exp1 - 2.0 * exp2); total_EvdW += Tap * e_vdW; - + CEvd = dTap * e_vdW - Tap * twbp->D * (twbp->alpha / twbp->r_vdW) * (exp1 - exp2) / r_ij; } @@ -171,23 +171,23 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, { // innner wall e_core = twbp->ecore * exp(twbp->acore * (1.0-(r_ij/twbp->rcore))); total_EvdW += Tap * e_core; - + de_core = -(twbp->acore/twbp->rcore) * e_core; CEvd += dTap * e_core + Tap * de_core / r_ij; - + // lg correction, only if lgvdw is yes if (control->lgflag) { r_ij5 = pow( r_ij, 5.0 ); r_ij6 = pow( r_ij, 6.0 ); re6 = pow( twbp->lgre, 6.0 ); - + e_lg = -(twbp->lgcij/( r_ij6 + re6 )); total_EvdW += Tap * e_lg; - + de_lg = -6.0 * e_lg * r_ij5 / ( r_ij6 + re6 ) ; CEvd += dTap * e_lg + Tap * de_lg / r_ij; } - + } /*Coulomb Calculations*/ @@ -207,44 +207,44 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, rvec_ScaledSum( delij, 1., system->my_atoms[i].x, -1., system->my_atoms[j].x ); f_tmp = -(CEvd + CEclmb); - pair_reax_ptr->ev_tally_thr_proxy( system->pair_ptr, i, j, natoms, - 1, pe_vdw, e_ele, f_tmp, + pair_reax_ptr->ev_tally_thr_proxy( system->pair_ptr, i, j, natoms, + 1, pe_vdw, e_ele, f_tmp, delij[0], delij[1], delij[2], thr); } - + if( control->virial == 0 ) { rvec_ScaledAdd( workspace->f[i], -(CEvd + CEclmb), nbr_pj->dvec ); - rvec_ScaledAdd( workspace->forceReduction[reductionOffset+j], + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+j], +(CEvd + CEclmb), nbr_pj->dvec ); } else { /* NPT, iNPT or sNPT */ /* for pressure coupling, terms not related to bond order derivatives are added directly into pressure vector/tensor */ - + rvec_Scale( temp, CEvd + CEclmb, nbr_pj->dvec ); rvec_ScaledAdd( workspace->f[reductionOffset+i], -1., temp ); rvec_Add( workspace->forceReduction[reductionOffset+j], temp); - + rvec_iMultiply( ext_press, nbr_pj->rel_box, temp ); - + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); } } } } - pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, thr); + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, thr); } // parallel region - + data->my_en.e_vdW = total_EvdW; data->my_en.e_ele = total_Eele; - + Compute_Polarization_Energy( system, data ); -} +} /* ---------------------------------------------------------------------- */ - + void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *control, simulation_data *data, storage *workspace, reax_list **lists, @@ -257,7 +257,7 @@ void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *contro long totalReductionSize = system->N * nthreads; double total_EvdW = 0.; double total_Eele = 0.; - + #pragma omp parallel default(shared) reduction(+:total_EvdW, total_Eele) { int i, j, pj, r; @@ -276,12 +276,12 @@ void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *contro class PairReaxCOMP *pair_reax_ptr; pair_reax_ptr = static_cast(system->pair_ptr); class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, + + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, natoms, system->pair_ptr->eatom, system->pair_ptr->vatom, thr); - + //#pragma omp for schedule(dynamic,50) #pragma omp for schedule(guided) for (i = 0; i < natoms; ++i) { @@ -290,7 +290,7 @@ void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *contro start_i = Start_Index(i,far_nbrs); end_i = End_Index(i,far_nbrs); orig_i = system->my_atoms[i].orig_id; - + for (pj = start_i; pj < end_i; ++pj) { nbr_pj = &(far_nbrs->select.far_nbr_list[pj]); j = nbr_pj->nbr; @@ -310,7 +310,7 @@ void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *contro flag = 1; } } - + } if (flag) { @@ -354,30 +354,30 @@ void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *contro if( control->virial == 0 ) { rvec_ScaledAdd( workspace->f[i], -(CEvd + CEclmb), nbr_pj->dvec ); - rvec_ScaledAdd( workspace->forceReduction[froffset+j], + rvec_ScaledAdd( workspace->forceReduction[froffset+j], +(CEvd + CEclmb), nbr_pj->dvec ); } else { // NPT, iNPT or sNPT /* for pressure coupling, terms not related to bond order derivatives are added directly into pressure vector/tensor */ rvec_Scale( temp, CEvd + CEclmb, nbr_pj->dvec ); - + rvec_ScaledAdd( workspace->f[i], -1., temp ); rvec_Add( workspace->forceReduction[froffset+j], temp ); - + rvec_iMultiply( ext_press, nbr_pj->rel_box, temp ); rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); } } } } - + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, thr); + system->pair_ptr->vflag_either, thr); } // end omp parallel - + data->my_en.e_vdW = total_EvdW; data->my_en.e_ele = total_Eele; - + Compute_Polarization_Energy( system, data ); } diff --git a/src/USER-OMP/reaxc_torsion_angles_omp.cpp b/src/USER-OMP/reaxc_torsion_angles_omp.cpp index 294eeb9544..bb8bbe1cd7 100644 --- a/src/USER-OMP/reaxc_torsion_angles_omp.cpp +++ b/src/USER-OMP/reaxc_torsion_angles_omp.cpp @@ -65,7 +65,7 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, double total_Etor = 0; double total_Econ = 0; int nthreads = control->nthreads; - + #pragma omp parallel default(shared) reduction(+: total_Etor, total_Econ) { int i, j, k, l, pi, pj, pk, pl, pij, plk; @@ -73,11 +73,11 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, int start_j, end_j, start_k, end_k; int start_pj, end_pj, start_pk, end_pk; int num_frb_intrs = 0; - + double Delta_j, Delta_k; double r_ij, r_jk, r_kl, r_li; double BOA_ij, BOA_jk, BOA_kl; - + double exp_tor2_ij, exp_tor2_jk, exp_tor2_kl; double exp_tor1, exp_tor3_DjDk, exp_tor4_DjDk, exp_tor34_inv; double exp_cot2_jk, exp_cot2_ij, exp_cot2_kl; @@ -102,7 +102,7 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, bond_data *pbond_ij, *pbond_jk, *pbond_kl; bond_order_data *bo_ij, *bo_jk, *bo_kl; three_body_interaction_data *p_ijk, *p_jkl; - + // Virial tallying variables double delil[3], deljl[3], delkl[3]; double eng_tmp, f_scaler, fi_tmp[3], fj_tmp[3], fk_tmp[3]; @@ -123,27 +123,27 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, for (j = 0; j < system->N; ++j) { start_j = Start_Index(j, bonds); end_j = End_Index(j, bonds); - + for (pk = start_j; pk < end_j; ++pk) { bo_jk = &( bonds->select.bond_list[pk].bo_data ); for (k = 0; k < nthreads; ++k) bo_jk->CdboReduction[k] = 0.; } } - + #pragma omp for schedule(dynamic,50) for (j = 0; j < natoms; ++j) { type_j = system->my_atoms[j].type; Delta_j = workspace->Delta_boc[j]; start_j = Start_Index(j, bonds); end_j = End_Index(j, bonds); - + for (pk = start_j; pk < end_j; ++pk) { pbond_jk = &( bonds->select.bond_list[pk] ); k = pbond_jk->nbr; bo_jk = &( pbond_jk->bo_data ); BOA_jk = bo_jk->BO - control->thb_cut; - + /* see if there are any 3-body interactions involving j&k where j is the central atom. Otherwise there is no point in trying to form a 4-body interaction out of this neighborhood */ @@ -160,27 +160,27 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, type_k = system->my_atoms[k].type; Delta_k = workspace->Delta_boc[k]; r_jk = pbond_jk->d; - + start_pk = Start_Index(pk, thb_intrs ); end_pk = End_Index(pk, thb_intrs ); start_pj = Start_Index(pj, thb_intrs ); end_pj = End_Index(pj, thb_intrs ); - + exp_tor2_jk = exp( -p_tor2 * BOA_jk ); exp_cot2_jk = exp( -p_cot2 * SQR(BOA_jk - 1.5) ); exp_tor3_DjDk = exp( -p_tor3 * (Delta_j + Delta_k) ); exp_tor4_DjDk = exp( p_tor4 * (Delta_j + Delta_k) ); exp_tor34_inv = 1.0 / (1.0 + exp_tor3_DjDk + exp_tor4_DjDk); f11_DjDk = (2.0 + exp_tor3_DjDk) * exp_tor34_inv; - - + + /* pick i up from j-k interaction where j is the central atom */ for (pi = start_pk; pi < end_pk; ++pi) { p_ijk = &( thb_intrs->select.three_body_list[pi] ); pij = p_ijk->pthb; // pij is pointer to i on j's bond_list pbond_ij = &( bonds->select.bond_list[pij] ); bo_ij = &( pbond_ij->bo_data ); - + if (bo_ij->BO > control->thb_cut/*0*/) { i = p_ijk->thb; type_i = system->my_atoms[i].type; @@ -219,13 +219,13 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, bo_ij->BO * bo_jk->BO * bo_kl->BO > control->thb_cut/*0*/) { ++num_frb_intrs; //fprintf(stderr, - // "%5d: %6d %6d %6d %6d\n", num_frb_intrs, + // "%5d: %6d %6d %6d %6d\n", num_frb_intrs, // system->my_atoms[i].orig_id,system->my_atoms[j].orig_id, // system->my_atoms[k].orig_id,system->my_atoms[l].orig_id); r_kl = pbond_kl->d; BOA_kl = bo_kl->BO - control->thb_cut; - + theta_jkl = p_jkl->theta; sin_jkl = sin( theta_jkl ); cos_jkl = cos( theta_jkl ); @@ -235,12 +235,12 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, else if( sin_jkl <= 0 && sin_jkl >= -MIN_SINE ) tan_jkl_i = cos_jkl / -MIN_SINE; else tan_jkl_i = cos_jkl /sin_jkl; - + rvec_ScaledSum( dvec_li, 1., system->my_atoms[i].x, -1., system->my_atoms[l].x ); r_li = rvec_Norm( dvec_li ); - - + + /* omega and its derivative */ omega = Calculate_Omega( pbond_ij->dvec, r_ij, pbond_jk->dvec, r_jk, @@ -255,7 +255,7 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, cos2omega = cos( 2. * omega ); cos3omega = cos( 3. * omega ); /* end omega calculations */ - + /* torsion energy */ exp_tor1 = exp( fbp->p_tor1 * SQR(2.0 - bo_jk->BO_pi - f11_DjDk) ); @@ -360,35 +360,35 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, } else { ivec_Sum(rel_box_jl, pbond_jk->rel_box, pbond_kl->rel_box); - + /* dcos_theta_ijk */ rvec_Scale( force, CEtors7 + CEconj4, p_ijk->dcos_dk ); rvec_Add( workspace->forceReduction[reductionOffset+i], force ); rvec_iMultiply( ext_press, pbond_ij->rel_box, force ); rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); - + rvec_ScaledAdd( workspace->f[j], CEtors7 + CEconj4, p_ijk->dcos_dj ); - + rvec_Scale( force, CEtors7 + CEconj4, p_ijk->dcos_di ); rvec_Add( workspace->forceReduction[reductionOffset+k], force ); rvec_iMultiply( ext_press, pbond_jk->rel_box, force ); rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); - + /* dcos_theta_jkl */ rvec_ScaledAdd( workspace->f[j], CEtors8 + CEconj5, p_jkl->dcos_di ); - + rvec_Scale( force, CEtors8 + CEconj5, p_jkl->dcos_dj ); rvec_Add( workspace->forceReduction[reductionOffset+k], force ); rvec_iMultiply( ext_press, pbond_jk->rel_box, force ); rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); - + rvec_Scale( force, CEtors8 + CEconj5, p_jkl->dcos_dk ); rvec_Add( workspace->forceReduction[reductionOffset+l], force ); rvec_iMultiply( ext_press, rel_box_jl, force ); - rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); - + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + /* dcos_omega */ rvec_Scale( force, CEtors9 + CEconj6, dcos_omega_di ); rvec_Add( workspace->forceReduction[reductionOffset+i], force ); @@ -411,7 +411,7 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, /* tally into per-atom virials */ if( system->pair_ptr->vflag_atom || system->pair_ptr->evflag) { - + // acquire vectors rvec_ScaledSum( delil, 1., system->my_atoms[l].x, -1., system->my_atoms[i].x ); @@ -423,21 +423,21 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, rvec_Scale( fi_tmp, CEtors7 + CEconj4, p_ijk->dcos_dk ); rvec_Scale( fj_tmp, CEtors7 + CEconj4, p_ijk->dcos_dj ); rvec_Scale( fk_tmp, CEtors7 + CEconj4, p_ijk->dcos_di ); - + // dcos_theta_jkl rvec_ScaledAdd( fj_tmp, CEtors8 + CEconj5, p_jkl->dcos_di ); rvec_ScaledAdd( fk_tmp, CEtors8 + CEconj5, p_jkl->dcos_dj ); - + // dcos_omega rvec_ScaledAdd( fi_tmp, CEtors9 + CEconj6, dcos_omega_di ); rvec_ScaledAdd( fj_tmp, CEtors9 + CEconj6, dcos_omega_dj ); rvec_ScaledAdd( fk_tmp, CEtors9 + CEconj6, dcos_omega_dk ); - + // tally eng_tmp = e_tor + e_con; - + if (system->pair_ptr->evflag) - pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, j, k, system->n, 1, + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, j, k, system->n, 1, eng_tmp, 0.0, 0.0, 0.0, 0.0, 0.0, thr); // NEED TO MAKE AN OMP VERSION OF THIS CALL! @@ -445,7 +445,7 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, system->pair_ptr->v_tally4(i, j, k, l, fi_tmp, fj_tmp, fk_tmp, delil, deljl, delkl ); } - + } // pl check ends } // pl loop ends } // pi check ends @@ -454,12 +454,12 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, } // jmy_en.e_tor = total_Etor; data->my_en.e_con = total_Econ; - + #ifdef OMP_TIMING endTimeBase = MPI_Wtime(); ompTimingData[COMPUTETORSIONANGLESBOINDEX] += (endTimeBase-startTimeBase); diff --git a/src/USER-OMP/reaxc_valence_angles_omp.cpp b/src/USER-OMP/reaxc_valence_angles_omp.cpp index 7c45db1493..c83e5de852 100644 --- a/src/USER-OMP/reaxc_valence_angles_omp.cpp +++ b/src/USER-OMP/reaxc_valence_angles_omp.cpp @@ -54,7 +54,7 @@ void Calculate_dCos_ThetaOMP( rvec dvec_ji, double d_ji, rvec dvec_jk, double d_ double csqr_jk = Cdot_inv3 * sqr_d_jk; double csqr_ji = Cdot_inv3 * sqr_d_ji; - + // Try to help compiler out by unrolling // x-component double dinv_jk = dvec_jk[0] * inv_dists; @@ -103,7 +103,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, double endTimeBase, startTimeBase; startTimeBase = MPI_Wtime(); #endif - + reax_list *bonds = (*lists) + BONDS; reax_list *thb_intrs = (*lists) + THREE_BODIES; @@ -118,20 +118,20 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, double total_Eang = 0; double total_Epen = 0; double total_Ecoa = 0; - + int per_atom = (thb_intrs->num_intrs / system->N); int nthreads = control->nthreads; int chunksize = system->N/(nthreads*10); int num_thb_intrs = 0; int TWICE = 2; -#pragma omp parallel default(shared) reduction(+:total_Eang, total_Epen, total_Ecoa, num_thb_intrs) +#pragma omp parallel default(shared) reduction(+:total_Eang, total_Epen, total_Ecoa, num_thb_intrs) { int i, j, pi, k, pk, t; int type_i, type_j, type_k; int start_j, end_j, start_pk, end_pk; int cnt, my_offset, mark; - + double temp, temp_bo_jt, pBOjt7; double p_val1, p_val2, p_val3, p_val4, p_val5, p_val7; double p_pen1, p_pen2, p_pen3, p_pen4; @@ -150,17 +150,17 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, double BOA_ij, BOA_jk; rvec force, ext_press; // rtensor temp_rtensor, total_rtensor; - + // Tallying variables double eng_tmp, f_scaler, fi_tmp[3], fj_tmp[3], fk_tmp[3]; double delij[3], delkj[3]; - + three_body_header *thbh; three_body_parameters *thbp; three_body_interaction_data *p_ijk, *p_kji; bond_data *pbond_ij, *pbond_jk, *pbond_jt; bond_order_data *bo_ij, *bo_jk, *bo_jt; - + int tid = omp_get_thread_num(); long reductionOffset = (system->N * tid); class PairReaxCOMP *pair_reax_ptr; @@ -174,7 +174,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, // Run through a minimal for(jnum_intrs / nthreads; #pragma omp for schedule(dynamic,50) @@ -188,7 +188,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, // Always point to start of workspace to count angles my_offset = tid * per_thread; - + for (pi = start_j; pi < end_j; ++pi) { Set_Start_Index( pi, my_offset, thb_intrs ); pbond_ij = &(bonds->select.bond_list[pi]); @@ -196,7 +196,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, BOA_ij = bo_ij->BO - control->thb_cut; if (BOA_ij > 0.0) { - i = pbond_ij->nbr; + i = pbond_ij->nbr; /* first copy 3-body intrs from previously computed ones where i>k. in the second for-loop below, @@ -204,13 +204,13 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, for (pk = start_j; pk < pi; ++pk) { start_pk = Start_Index( pk, thb_intrs ); end_pk = End_Index( pk, thb_intrs ); - + for (t = start_pk; t < end_pk; ++t) if (thb_intrs->select.three_body_list[t].thb == i) { p_ijk = &(thb_intrs->select.three_body_list[my_offset] ); p_ijk->thb = bonds->select.bond_list[pk].nbr; - + ++my_offset; break; } @@ -225,11 +225,11 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, p_ijk = &( thb_intrs->select.three_body_list[my_offset] ); p_ijk->thb = k; - + ++my_offset; // add this to the list of 3-body interactions } // for(pk) } // if() - + Set_End_Index(pi, my_offset, thb_intrs ); } // for(pi) @@ -246,7 +246,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, // Number of angles owned by this atom _my_offset[j] = my_offset - tid * per_thread; } // for(j) - + // Wait for all threads to finish counting angles #pragma omp barrier @@ -271,7 +271,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, // Original loop, but now using precomputed offsets // Safe to use all threads available, regardless of threads tasked above // We also now skip over atoms that have no angles assigned -#pragma omp for schedule(dynamic,50)//(dynamic,chunksize)//(guided) +#pragma omp for schedule(dynamic,50)//(dynamic,chunksize)//(guided) for (j = 0; j < system->N; ++j) { // Ray: the first one with system->N type_j = system->my_atoms[j].type; if(type_j < 0) continue; @@ -281,14 +281,14 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, start_j = Start_Index(j, bonds); end_j = End_Index(j, bonds); - + type_j = system->my_atoms[j].type; my_offset = _my_offset[j]; p_val3 = system->reax_param.sbp[ type_j ].p_val3; p_val5 = system->reax_param.sbp[ type_j ].p_val5; - + SBOp = 0, prod_SBO = 1; for (t = start_j; t < end_j; ++t) { bo_jt = &(bonds->select.bond_list[t].bo_data); @@ -298,7 +298,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, temp *= temp; prod_SBO *= exp( -temp ); } - + // modifications to match Adri's code - 09/01/09 if( workspace->vlpex[j] >= 0 ){ vlpadj = 0; @@ -308,10 +308,10 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, vlpadj = workspace->nlp[j]; dSBO2 = (prod_SBO - 1) * (1 - p_val8 * workspace->dDelta_lp[j]); } - + SBO = SBOp + (1 - prod_SBO) * (-workspace->Delta_boc[j] - p_val8 * vlpadj); dSBO1 = -8 * prod_SBO * ( workspace->Delta_boc[j] + p_val8 * vlpadj ); - + if( SBO <= 0 ) SBO2 = 0, CSBO2 = 0; else if( SBO > 0 && SBO <= 1 ) { @@ -324,16 +324,16 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, } else SBO2 = 2, CSBO2 = 0; - + expval6 = exp( p_val6 * workspace->Delta_boc[j] ); - + for (pi = start_j; pi < end_j; ++pi) { Set_Start_Index( pi, my_offset, thb_intrs ); pbond_ij = &(bonds->select.bond_list[pi]); bo_ij = &(pbond_ij->bo_data); BOA_ij = bo_ij->BO - control->thb_cut; - - + + if (BOA_ij > 0.0) { i = pbond_ij->nbr; r_ij = pbond_ij->d; @@ -346,19 +346,19 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, for (pk = start_j; pk < pi; ++pk) { start_pk = Start_Index( pk, thb_intrs ); end_pk = End_Index( pk, thb_intrs ); - + for (t = start_pk; t < end_pk; ++t) if (thb_intrs->select.three_body_list[t].thb == i) { p_ijk = &(thb_intrs->select.three_body_list[my_offset] ); p_kji = &(thb_intrs->select.three_body_list[t]); - + p_ijk->thb = bonds->select.bond_list[pk].nbr; p_ijk->pthb = pk; p_ijk->theta = p_kji->theta; rvec_Copy( p_ijk->dcos_di, p_kji->dcos_dk ); rvec_Copy( p_ijk->dcos_dj, p_kji->dcos_dj ); rvec_Copy( p_ijk->dcos_dk, p_kji->dcos_di ); - + ++my_offset; ++num_thb_intrs; break; @@ -374,15 +374,15 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, k = pbond_jk->nbr; type_k = system->my_atoms[k].type; p_ijk = &( thb_intrs->select.three_body_list[my_offset] ); - + // Fix by Sudhir // if (BOA_jk <= 0) continue; if (j >= system->n && i >= system->n && k >= system->n) continue; - + Calculate_Theta( pbond_ij->dvec, pbond_ij->d, pbond_jk->dvec, pbond_jk->d, &theta, &cos_theta ); - + Calculate_dCos_ThetaOMP( pbond_ij->dvec, pbond_ij->d, pbond_jk->dvec, pbond_jk->d, &(p_ijk->dcos_di), &(p_ijk->dcos_dj), @@ -390,23 +390,23 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, p_ijk->thb = k; p_ijk->pthb = pk; p_ijk->theta = theta; - + sin_theta = sin( theta ); if( sin_theta < 1.0e-5 ) sin_theta = 1.0e-5; - + ++my_offset; // add this to the list of 3-body interactions ++num_thb_intrs; - + if ((j < system->n) && (BOA_jk > 0.0) && (bo_ij->BO > control->thb_cut) && (bo_jk->BO > control->thb_cut) && (bo_ij->BO * bo_jk->BO > control->thb_cutsq)) { r_jk = pbond_jk->d; thbh = &( system->reax_param.thbp[ type_i ][ type_j ][ type_k ] ); - + for (cnt = 0; cnt < thbh->cnt; ++cnt) { - + if( fabs(thbh->prm[cnt].p_val1) > 0.001 ) { thbp = &( thbh->prm[cnt] ); @@ -456,7 +456,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, CEval7 = CEval5 * dSBO2; CEval8 = -CEval4 / sin_theta; - total_Eang += e_ang = + total_Eang += e_ang = f7_ij * f7_jk * f8_Dj * expval12theta; /* END ANGLE ENERGY*/ @@ -533,9 +533,9 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, if( control->virial == 0 ) { rvec_ScaledAdd( workspace->f[j], CEval8, p_ijk->dcos_dj ); - rvec_ScaledAdd( workspace->forceReduction[reductionOffset+i], + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+i], CEval8, p_ijk->dcos_di ); - rvec_ScaledAdd( workspace->forceReduction[reductionOffset+k], + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+k], CEval8, p_ijk->dcos_dk ); } else { @@ -543,36 +543,36 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, added directly into forces and pressure vector/tensor */ rvec_Scale( force, CEval8, p_ijk->dcos_di ); rvec_Add( workspace->forceReduction[reductionOffset+i], force ); - + rvec_iMultiply( ext_press, pbond_ij->rel_box, force ); rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); - + rvec_ScaledAdd( workspace->f[j], CEval8, p_ijk->dcos_dj ); - + rvec_Scale( force, CEval8, p_ijk->dcos_dk ); rvec_Add( workspace->forceReduction[reductionOffset+k], force ); - + rvec_iMultiply( ext_press, pbond_jk->rel_box, force ); rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); } /* tally into per-atom virials */ if( system->pair_ptr->vflag_atom || system->pair_ptr->evflag) { - + /* Acquire vectors */ rvec_ScaledSum( delij, 1., system->my_atoms[i].x, -1., system->my_atoms[j].x ); rvec_ScaledSum( delkj, 1., system->my_atoms[k].x, -1., system->my_atoms[j].x ); - + rvec_Scale( fi_tmp, -CEval8, p_ijk->dcos_di ); rvec_Scale( fj_tmp, -CEval8, p_ijk->dcos_dj ); rvec_Scale( fk_tmp, -CEval8, p_ijk->dcos_dk ); - + eng_tmp = e_ang + e_pen + e_coa; - + if( system->pair_ptr->evflag) - pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, j, j, system->N, 1, + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, j, j, system->N, 1, eng_tmp, 0.0, 0.0, 0.0, 0.0, 0.0, thr); if( system->pair_ptr->vflag_atom) // NEED TO MAKE AN OMP VERSION OF THIS CALL! @@ -588,7 +588,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, Set_End_Index(pi, my_offset, thb_intrs ); } // for(pi) } // for(j) - + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, system->pair_ptr->vflag_either, thr); } // end omp parallel diff --git a/src/USER-REAXC/pair_reaxc.cpp b/src/USER-REAXC/pair_reaxc.cpp index b520fc14c7..bf3b2e4467 100644 --- a/src/USER-REAXC/pair_reaxc.cpp +++ b/src/USER-REAXC/pair_reaxc.cpp @@ -230,7 +230,7 @@ void PairReaxC::settings(int narg, char **arg) system->mincap = MIN_CAP; system->safezone = SAFE_ZONE; system->saferzone = SAFER_ZONE; - + // process optional keywords int iarg = 1; diff --git a/src/USER-REAXC/reaxc_allocate.cpp b/src/USER-REAXC/reaxc_allocate.cpp index ac835e7ce3..0d9c51c878 100644 --- a/src/USER-REAXC/reaxc_allocate.cpp +++ b/src/USER-REAXC/reaxc_allocate.cpp @@ -199,7 +199,7 @@ void DeAllocate_Workspace( control_params *control, storage *workspace ) if(workspace->CdDeltaReduction) sfree( workspace->CdDeltaReduction, "cddelta_reduce" ); if(workspace->forceReduction) sfree( workspace->forceReduction, "f_reduce" ); if(workspace->valence_angle_atom_myoffset) sfree( workspace->valence_angle_atom_myoffset, "valence_angle_atom_myoffset"); - + if (control->virial && workspace->my_ext_pressReduction) sfree( workspace->my_ext_pressReduction, "ext_press_reduce"); #endif } @@ -297,12 +297,12 @@ int Allocate_Workspace( reax_system *system, control_params *control, workspace->f = (rvec*) scalloc( total_cap, sizeof(rvec), "f", comm ); workspace->CdDelta = (double*) scalloc( total_cap, sizeof(double), "CdDelta", comm ); - + // storage for reductions with multiple threads #ifdef LMP_USER_OMP workspace->CdDeltaReduction = (double *) scalloc(sizeof(double), total_cap*control->nthreads, "cddelta_reduce", comm); - + workspace->forceReduction = (rvec *) scalloc(sizeof(rvec), total_cap*control->nthreads, "forceReduction", comm); @@ -368,30 +368,30 @@ static int Reallocate_Bonds_List( reax_system *system, reax_list *bonds, *total_bonds += system->my_atoms[i].num_bonds; } *total_bonds = (int)(MAX( *total_bonds * safezone, mincap*MIN_BONDS )); - + #ifdef LMP_USER_OMP for (i = 0; i < bonds->num_intrs; ++i) sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); #endif - + Delete_List( bonds, comm ); if(!Make_List(system->total_cap, *total_bonds, TYP_BOND, bonds, comm)) { fprintf( stderr, "not enough space for bonds list. terminating!\n" ); MPI_Abort( comm, INSUFFICIENT_MEMORY ); } - + #ifdef LMP_USER_OMP #if defined(_OPENMP) int nthreads = omp_get_num_threads(); #else int nthreads = 1; #endif - + for (i = 0; i < bonds->num_intrs; ++i) - bonds->select.bond_list[i].bo_data.CdboReduction = + bonds->select.bond_list[i].bo_data.CdboReduction = (double*) smalloc(sizeof(double)*nthreads, "CdboReduction", comm); #endif - + return SUCCESS; } diff --git a/src/USER-REAXC/reaxc_types.h b/src/USER-REAXC/reaxc_types.h index 1b9ce63dc2..547602feb4 100644 --- a/src/USER-REAXC/reaxc_types.h +++ b/src/USER-REAXC/reaxc_types.h @@ -486,7 +486,7 @@ typedef struct int lgflag; int enobondsflag; - + } control_params; -- GitLab From 88d4150d2bf84fb5418d4ba14371081d03473a93 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 24 May 2017 16:29:56 -0400 Subject: [PATCH 198/593] remove trailing whitespace --- src/USER-OMP/fix_nve_sphere_omp.cpp | 48 +++++++++---------- src/USER-OMP/npair_full_bin_ghost_omp.h | 2 +- src/USER-OMP/npair_full_bin_omp.h | 2 +- src/USER-OMP/npair_full_multi_omp.h | 2 +- src/USER-OMP/npair_full_nsq_ghost_omp.h | 2 +- src/USER-OMP/npair_full_nsq_omp.h | 2 +- .../npair_half_bin_newtoff_ghost_omp.cpp | 2 +- .../npair_half_bin_newtoff_ghost_omp.h | 2 +- .../npair_half_multi_newton_tri_omp.cpp | 2 +- .../npair_half_nsq_newtoff_ghost_omp.cpp | 2 +- .../npair_half_nsq_newtoff_ghost_omp.h | 2 +- .../npair_half_respa_bin_newtoff_omp.cpp | 2 +- .../npair_half_respa_bin_newtoff_omp.h | 2 +- .../npair_half_respa_bin_newton_omp.cpp | 2 +- .../npair_half_respa_bin_newton_tri_omp.cpp | 2 +- .../npair_half_respa_nsq_newtoff_omp.cpp | 2 +- .../npair_half_respa_nsq_newtoff_omp.h | 2 +- .../npair_half_respa_nsq_newton_omp.cpp | 2 +- .../npair_half_respa_nsq_newton_omp.h | 2 +- .../npair_half_size_bin_newtoff_omp.cpp | 2 +- .../npair_half_size_bin_newtoff_omp.h | 2 +- .../npair_half_size_bin_newton_omp.cpp | 4 +- .../npair_half_size_bin_newton_tri_omp.cpp | 2 +- .../npair_half_size_nsq_newtoff_omp.cpp | 2 +- .../npair_half_size_nsq_newtoff_omp.h | 2 +- .../npair_half_size_nsq_newton_omp.cpp | 2 +- src/USER-OMP/npair_half_size_nsq_newton_omp.h | 2 +- src/USER-OMP/npair_halffull_newtoff_omp.h | 2 +- src/USER-OMP/npair_halffull_newton_omp.h | 2 +- src/USER-OMP/pair_airebo_omp.cpp | 2 +- src/USER-OMP/pair_lj_cut_thole_long_omp.cpp | 8 ++-- 31 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/USER-OMP/fix_nve_sphere_omp.cpp b/src/USER-OMP/fix_nve_sphere_omp.cpp index 2367e34878..43ecc99868 100644 --- a/src/USER-OMP/fix_nve_sphere_omp.cpp +++ b/src/USER-OMP/fix_nve_sphere_omp.cpp @@ -110,18 +110,18 @@ void FixNVESphereOMP::initial_integrate(int vflag) matrix Q, Q_temp, R; if (mask[i] & groupbit && mu[i][3] > 0.0) { - + // Construct Q from dipole: // Q is the rotation matrix from space frame to body frame // i.e. v_b = Q.v_s - + // Define mu to lie along the z axis in the body frame // We take the unit dipole to avoid getting a scaling matrix const double inv_len_mu = 1.0/mu[i][3]; a[0] = mu[i][0]*inv_len_mu; a[1] = mu[i][1]*inv_len_mu; a[2] = mu[i][2]*inv_len_mu; - + // v = a x [0 0 1] - cross product of mu in space and body frames // s = |v| // c = a.[0 0 1] = a[2] @@ -130,11 +130,11 @@ void FixNVESphereOMP::initial_integrate(int vflag) // -v[1] v[0] 0 ] // then // Q = I + vx + vx^2 * (1-c)/s^2 - + const double s2 = a[0]*a[0] + a[1]*a[1]; if (s2 != 0.0){ // i.e. the vectors are not parallel const double scale = (1.0 - a[2])/s2; - + Q[0][0] = 1.0 - scale*a[0]*a[0]; Q[0][1] = -scale*a[0]*a[1]; Q[0][2] = -a[0]; Q[1][0] = -scale*a[0]*a[1]; Q[1][1] = 1.0 - scale*a[1]*a[1]; Q[1][2] = -a[1]; Q[2][0] = a[0]; Q[2][1] = a[1]; Q[2][2] = 1.0 - scale*(a[0]*a[0] + a[1]*a[1]); @@ -143,62 +143,62 @@ void FixNVESphereOMP::initial_integrate(int vflag) Q[1][0] = 0.0; Q[1][1] = 1.0/a[2]; Q[1][2] = 0.0; Q[2][0] = 0.0; Q[2][1] = 0.0; Q[2][2] = 1.0/a[2]; } - + // Local copy of this particle's angular velocity (in space frame) w[0] = omega[i][0]; w[1] = omega[i][1]; w[2] = omega[i][2]; - + // Transform omega into body frame: w_temp= Q.w matvec(Q,w,w_temp); - + // Construct rotation R1 BuildRxMatrix(R, dtf/force->ftm2v*w_temp[0]); - + // Apply R1 to w: w = R.w_temp matvec(R,w_temp,w); - + // Apply R1 to Q: Q_temp = R^T.Q transpose_times3(R,Q,Q_temp); - + // Construct rotation R2 BuildRyMatrix(R, dtf/force->ftm2v*w[1]); - + // Apply R2 to w: w_temp = R.w matvec(R,w,w_temp); - + // Apply R2 to Q: Q = R^T.Q_temp transpose_times3(R,Q_temp,Q); - + // Construct rotation R3 BuildRzMatrix(R, 2.0*dtf/force->ftm2v*w_temp[2]); - + // Apply R3 to w: w = R.w_temp matvec(R,w_temp,w); - + // Apply R3 to Q: Q_temp = R^T.Q transpose_times3(R,Q,Q_temp); - + // Construct rotation R4 BuildRyMatrix(R, dtf/force->ftm2v*w[1]); - + // Apply R4 to w: w_temp = R.w matvec(R,w,w_temp); - + // Apply R4 to Q: Q = R^T.Q_temp transpose_times3(R,Q_temp,Q); - + // Construct rotation R5 BuildRxMatrix(R, dtf/force->ftm2v*w_temp[0]); - + // Apply R5 to w: w = R.w_temp matvec(R,w_temp,w); - + // Apply R5 to Q: Q_temp = R^T.Q transpose_times3(R,Q,Q_temp); - + // Transform w back into space frame w_temp = Q^T.w transpose_matvec(Q_temp,w,w_temp); omega[i][0] = w_temp[0]; omega[i][1] = w_temp[1]; omega[i][2] = w_temp[2]; - + // Set dipole according to updated Q: mu = Q^T.[0 0 1] * |mu| mu[i][0] = Q_temp[2][0] * mu[i][3]; mu[i][1] = Q_temp[2][1] * mu[i][3]; diff --git a/src/USER-OMP/npair_full_bin_ghost_omp.h b/src/USER-OMP/npair_full_bin_ghost_omp.h index ed1580ac3b..afc2eaef9d 100644 --- a/src/USER-OMP/npair_full_bin_ghost_omp.h +++ b/src/USER-OMP/npair_full_bin_ghost_omp.h @@ -15,7 +15,7 @@ NPairStyle(full/bin/ghost/omp, NPairFullBinGhostOmp, - NP_FULL | NP_BIN | NP_GHOST | NP_OMP | NP_NEWTON | NP_NEWTOFF | + NP_FULL | NP_BIN | NP_GHOST | NP_OMP | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_full_bin_omp.h b/src/USER-OMP/npair_full_bin_omp.h index 5aa17310e2..832fb82c49 100644 --- a/src/USER-OMP/npair_full_bin_omp.h +++ b/src/USER-OMP/npair_full_bin_omp.h @@ -15,7 +15,7 @@ NPairStyle(full/bin/omp, NPairFullBinOmp, - NP_FULL | NP_BIN | NP_OMP | NP_NEWTON | NP_NEWTOFF | + NP_FULL | NP_BIN | NP_OMP | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_full_multi_omp.h b/src/USER-OMP/npair_full_multi_omp.h index 36a8d02e28..882e649183 100644 --- a/src/USER-OMP/npair_full_multi_omp.h +++ b/src/USER-OMP/npair_full_multi_omp.h @@ -15,7 +15,7 @@ NPairStyle(full/multi/omp, NPairFullMultiOmp, - NP_FULL | NP_MULTI | NP_OMP | + NP_FULL | NP_MULTI | NP_OMP | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_full_nsq_ghost_omp.h b/src/USER-OMP/npair_full_nsq_ghost_omp.h index dbf7f81bcc..a080c17804 100644 --- a/src/USER-OMP/npair_full_nsq_ghost_omp.h +++ b/src/USER-OMP/npair_full_nsq_ghost_omp.h @@ -15,7 +15,7 @@ NPairStyle(full/nsq/ghost/omp, NPairFullNsqGhostOmp, - NP_FULL | NP_NSQ | NP_GHOST | NP_OMP | NP_NEWTON | NP_NEWTOFF | + NP_FULL | NP_NSQ | NP_GHOST | NP_OMP | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_full_nsq_omp.h b/src/USER-OMP/npair_full_nsq_omp.h index 2adcb8e1bd..251d059d1c 100644 --- a/src/USER-OMP/npair_full_nsq_omp.h +++ b/src/USER-OMP/npair_full_nsq_omp.h @@ -15,7 +15,7 @@ NPairStyle(full/nsq/omp, NPairFullNsqOmp, - NP_FULL | NP_NSQ | NP_OMP | NP_NEWTON | NP_NEWTOFF | + NP_FULL | NP_NSQ | NP_OMP | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp b/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp index 05763c3d68..24fe75ec55 100644 --- a/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp @@ -26,7 +26,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfBinNewtoffGhostOmp::NPairHalfBinNewtoffGhostOmp(LAMMPS *lmp) : +NPairHalfBinNewtoffGhostOmp::NPairHalfBinNewtoffGhostOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.h b/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.h index 4974c407eb..9b75abbb8b 100644 --- a/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.h +++ b/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.h @@ -15,7 +15,7 @@ NPairStyle(half/bin/newtoff/ghost/omp, NPairHalfBinNewtoffGhostOmp, - NP_HALF | NP_BIN | NP_NEWTOFF | NP_GHOST | NP_OMP | + NP_HALF | NP_BIN | NP_NEWTOFF | NP_GHOST | NP_OMP | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp b/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp index f66cf194e7..ce93e85485 100644 --- a/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp @@ -26,7 +26,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfMultiNewtonTriOmp::NPairHalfMultiNewtonTriOmp(LAMMPS *lmp) : +NPairHalfMultiNewtonTriOmp::NPairHalfMultiNewtonTriOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp b/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp index 0294658aa0..add4c44d9e 100644 --- a/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp +++ b/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp @@ -27,7 +27,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfNsqNewtoffGhostOmp::NPairHalfNsqNewtoffGhostOmp(LAMMPS *lmp) : +NPairHalfNsqNewtoffGhostOmp::NPairHalfNsqNewtoffGhostOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.h b/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.h index 6b565d9dd8..4294ab5f1f 100644 --- a/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.h +++ b/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.h @@ -15,7 +15,7 @@ NPairStyle(half/nsq/newtoff/ghost/omp, NPairHalfNsqNewtoffGhostOmp, - NP_HALF | NP_NSQ | NP_NEWTOFF | NP_GHOST | NP_OMP | + NP_HALF | NP_NSQ | NP_NEWTOFF | NP_GHOST | NP_OMP | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp index 12780fa4a3..45add87092 100644 --- a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp @@ -26,7 +26,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfRespaBinNewtoffOmp::NPairHalfRespaBinNewtoffOmp(LAMMPS *lmp) : +NPairHalfRespaBinNewtoffOmp::NPairHalfRespaBinNewtoffOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.h b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.h index 257aa8fdaa..f4c7c69355 100644 --- a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.h +++ b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.h @@ -15,7 +15,7 @@ NPairStyle(half/respa/bin/newtoff/omp, NPairHalfRespaBinNewtoffOmp, - NP_HALF | NP_RESPA | NP_BIN | NP_NEWTOFF | NP_OMP | + NP_HALF | NP_RESPA | NP_BIN | NP_NEWTOFF | NP_OMP | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp index b9a6364242..ee6b9b7501 100644 --- a/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp @@ -26,7 +26,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfRespaBinNewtonOmp::NPairHalfRespaBinNewtonOmp(LAMMPS *lmp) : +NPairHalfRespaBinNewtonOmp::NPairHalfRespaBinNewtonOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp index bc03972d85..fbb512ba64 100644 --- a/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp @@ -26,7 +26,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfRespaBinNewtonTriOmp::NPairHalfRespaBinNewtonTriOmp(LAMMPS *lmp) : +NPairHalfRespaBinNewtonTriOmp::NPairHalfRespaBinNewtonTriOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp b/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp index 80826ffa42..5ee71bebad 100644 --- a/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp @@ -27,7 +27,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfRespaNsqNewtoffOmp::NPairHalfRespaNsqNewtoffOmp(LAMMPS *lmp) : +NPairHalfRespaNsqNewtoffOmp::NPairHalfRespaNsqNewtoffOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.h b/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.h index ebd8691635..c1d8fbc91a 100644 --- a/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.h +++ b/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.h @@ -15,7 +15,7 @@ NPairStyle(half/respa/nsq/newtoff/omp, NPairHalfRespaNsqNewtoffOmp, - NP_HALF | NP_RESPA | NP_NSQ | NP_NEWTOFF | NP_OMP | + NP_HALF | NP_RESPA | NP_NSQ | NP_NEWTOFF | NP_OMP | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp b/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp index 18319dc1ae..89cff732c9 100644 --- a/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp +++ b/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp @@ -27,7 +27,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfRespaNsqNewtonOmp::NPairHalfRespaNsqNewtonOmp(LAMMPS *lmp) : +NPairHalfRespaNsqNewtonOmp::NPairHalfRespaNsqNewtonOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_respa_nsq_newton_omp.h b/src/USER-OMP/npair_half_respa_nsq_newton_omp.h index cf39ad8d6e..b3f06fb170 100644 --- a/src/USER-OMP/npair_half_respa_nsq_newton_omp.h +++ b/src/USER-OMP/npair_half_respa_nsq_newton_omp.h @@ -15,7 +15,7 @@ NPairStyle(half/respa/nsq/newton/omp, NPairHalfRespaNsqNewtonOmp, - NP_HALF | NP_RESPA | NP_NSQ | NP_NEWTON | NP_OMP | + NP_HALF | NP_RESPA | NP_NSQ | NP_NEWTON | NP_OMP | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp index dbb62e96ef..120658b714 100644 --- a/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp @@ -28,7 +28,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfSizeBinNewtoffOmp::NPairHalfSizeBinNewtoffOmp(LAMMPS *lmp) : +NPairHalfSizeBinNewtoffOmp::NPairHalfSizeBinNewtoffOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_size_bin_newtoff_omp.h b/src/USER-OMP/npair_half_size_bin_newtoff_omp.h index 7b71aa0ea7..891df55278 100644 --- a/src/USER-OMP/npair_half_size_bin_newtoff_omp.h +++ b/src/USER-OMP/npair_half_size_bin_newtoff_omp.h @@ -15,7 +15,7 @@ NPairStyle(half/size/bin/newtoff/omp, NPairHalfSizeBinNewtoffOmp, - NP_HALF | NP_SIZE | NP_BIN | NP_NEWTOFF | NP_OMP | + NP_HALF | NP_SIZE | NP_BIN | NP_NEWTOFF | NP_OMP | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_half_size_bin_newton_omp.cpp b/src/USER-OMP/npair_half_size_bin_newton_omp.cpp index 2c26c7952c..cf0c6d20fe 100644 --- a/src/USER-OMP/npair_half_size_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newton_omp.cpp @@ -28,7 +28,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfSizeBinNewtonOmp::NPairHalfSizeBinNewtonOmp(LAMMPS *lmp) : +NPairHalfSizeBinNewtonOmp::NPairHalfSizeBinNewtonOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- @@ -202,7 +202,7 @@ void NPairHalfSizeBinNewtonOmp::build(NeighList *list) nn += dnum; } } - + n++; } } diff --git a/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp index bf273f545f..da04eebd1e 100644 --- a/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp @@ -26,7 +26,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfSizeBinNewtonTriOmp::NPairHalfSizeBinNewtonTriOmp(LAMMPS *lmp) : +NPairHalfSizeBinNewtonTriOmp::NPairHalfSizeBinNewtonTriOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp b/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp index 70caa23527..f898ec3828 100644 --- a/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp @@ -29,7 +29,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfSizeNsqNewtoffOmp::NPairHalfSizeNsqNewtoffOmp(LAMMPS *lmp) : +NPairHalfSizeNsqNewtoffOmp::NPairHalfSizeNsqNewtoffOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_size_nsq_newtoff_omp.h b/src/USER-OMP/npair_half_size_nsq_newtoff_omp.h index 793c49335a..95eb5d0d7a 100644 --- a/src/USER-OMP/npair_half_size_nsq_newtoff_omp.h +++ b/src/USER-OMP/npair_half_size_nsq_newtoff_omp.h @@ -15,7 +15,7 @@ NPairStyle(half/size/nsq/newtoff/omp, NPairHalfSizeNsqNewtoffOmp, - NP_HALF | NP_SIZE | NP_NSQ | NP_NEWTOFF | NP_OMP | + NP_HALF | NP_SIZE | NP_NSQ | NP_NEWTOFF | NP_OMP | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp b/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp index f2aa807981..a7caac372a 100644 --- a/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp +++ b/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp @@ -29,7 +29,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfSizeNsqNewtonOmp::NPairHalfSizeNsqNewtonOmp(LAMMPS *lmp) : +NPairHalfSizeNsqNewtonOmp::NPairHalfSizeNsqNewtonOmp(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/npair_half_size_nsq_newton_omp.h b/src/USER-OMP/npair_half_size_nsq_newton_omp.h index 9abdb75db0..6f8343d260 100644 --- a/src/USER-OMP/npair_half_size_nsq_newton_omp.h +++ b/src/USER-OMP/npair_half_size_nsq_newton_omp.h @@ -15,7 +15,7 @@ NPairStyle(half/size/nsq/newton/omp, NPairHalfSizeNsqNewtonOmp, - NP_HALF | NP_SIZE | NP_NSQ | NP_NEWTON | NP_OMP | + NP_HALF | NP_SIZE | NP_NSQ | NP_NEWTON | NP_OMP | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_halffull_newtoff_omp.h b/src/USER-OMP/npair_halffull_newtoff_omp.h index 2df055af35..508efff277 100644 --- a/src/USER-OMP/npair_halffull_newtoff_omp.h +++ b/src/USER-OMP/npair_halffull_newtoff_omp.h @@ -15,7 +15,7 @@ NPairStyle(halffull/newtoff/omp, NPairHalffullNewtoffOmp, - NP_HALF_FULL | NP_NEWTOFF | NP_OMP | NP_HALF | + NP_HALF_FULL | NP_NEWTOFF | NP_OMP | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/npair_halffull_newton_omp.h b/src/USER-OMP/npair_halffull_newton_omp.h index 968aa53e14..87f05e2a40 100644 --- a/src/USER-OMP/npair_halffull_newton_omp.h +++ b/src/USER-OMP/npair_halffull_newton_omp.h @@ -15,7 +15,7 @@ NPairStyle(halffull/newton/omp, NPairHalffullNewtonOmp, - NP_HALF_FULL | NP_NEWTON | NP_OMP | NP_HALF | + NP_HALF_FULL | NP_NEWTON | NP_OMP | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI | NP_ORTHO | NP_TRI) #else diff --git a/src/USER-OMP/pair_airebo_omp.cpp b/src/USER-OMP/pair_airebo_omp.cpp index f3aa9986fe..95f9d8b401 100644 --- a/src/USER-OMP/pair_airebo_omp.cpp +++ b/src/USER-OMP/pair_airebo_omp.cpp @@ -1907,7 +1907,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag realrij[0] = x[atomi][0] - x[atomj][0]; realrij[1] = x[atomi][1] - x[atomj][1]; realrij[2] = x[atomi][2] - x[atomj][2]; - realrijmag = sqrt(realrij[0] * realrij[0] + realrij[1] * realrij[1] + realrijmag = sqrt(realrij[0] * realrij[0] + realrij[1] * realrij[1] + realrij[2] * realrij[2]); REBO_neighs = REBO_firstneigh[i]; diff --git a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp index 71791e3460..85c7e44f8c 100644 --- a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp @@ -44,7 +44,7 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -PairLJCutTholeLongOMP::PairLJCutTholeLongOMP(LAMMPS *lmp) : +PairLJCutTholeLongOMP::PairLJCutTholeLongOMP(LAMMPS *lmp) : PairLJCutTholeLong(lmp), ThrOMP(lmp, THR_PAIR) { suffix_flag |= Suffix::OMP; @@ -108,9 +108,9 @@ void PairLJCutTholeLongOMP::eval(int iifrom, int iito, ThrData * const thr) const tagint * _noalias const drudeid = fix_drude->drudeid; double xtmp,ytmp,ztmp,delx,dely,delz,fxtmp,fytmp,fztmp; - + const int nlocal = atom->nlocal; - + int j,jj,jnum,jtype,itable; double ecoul,fpair,evdwl; double r,rsq,r2inv,forcecoul,factor_coul,forcelj,factor_lj,r6inv; @@ -137,7 +137,7 @@ void PairLJCutTholeLongOMP::eval(int iifrom, int iito, ThrData * const thr) const double * _noalias const lj2i = lj2[itype]; const double * _noalias const lj3i = lj3[itype]; const double * _noalias const lj4i = lj4[itype]; - + xtmp = x[i].x; ytmp = x[i].y; ztmp = x[i].z; -- GitLab From 271431ab1834d6990a4137a1dcceef9d183b5eb1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 24 May 2017 17:25:57 -0400 Subject: [PATCH 199/593] clean up code so it can be compiled with and without OpenMP enabled regardless of whether the USER-OMP package is installed --- src/USER-OMP/fix_qeq_reax_omp.cpp | 403 +++++++++++----------- src/USER-OMP/pair_reaxc_omp.cpp | 38 +- src/USER-OMP/reaxc_bond_orders_omp.cpp | 39 ++- src/USER-OMP/reaxc_bonds_omp.cpp | 18 +- src/USER-OMP/reaxc_forces_omp.cpp | 88 +++-- src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp | 15 +- src/USER-OMP/reaxc_init_md_omp.cpp | 1 - src/USER-OMP/reaxc_multi_body_omp.cpp | 16 +- src/USER-OMP/reaxc_nonbonded_omp.cpp | 29 +- src/USER-OMP/reaxc_torsion_angles_omp.cpp | 11 +- src/USER-OMP/reaxc_valence_angles_omp.cpp | 11 +- 11 files changed, 400 insertions(+), 269 deletions(-) diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp index a43d6cfdd1..2603d649a3 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.cpp +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -18,10 +18,11 @@ Hybrid and sub-group capabilities: Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include "math.h" -#include "stdio.h" -#include "stdlib.h" -#include "string.h" +#include +#include +#include +#include + #include "fix_qeq_reax_omp.h" #include "pair_reaxc_omp.h" #include "atom.h" @@ -74,7 +75,7 @@ FixQEqReaxOMP::FixQEqReaxOMP(LAMMPS *lmp, int narg, char **arg) : s_hist = t_hist = NULL; grow_arrays(atom->nmax); atom->add_callback(0); - for( int i = 0; i < atom->nmax; i++ ) + for (int i = 0; i < atom->nmax; i++ ) for (int j = 0; j < nprev; ++j ) s_hist[i][j] = t_hist[i][j] = 0; @@ -208,7 +209,7 @@ void FixQEqReaxOMP::allocate_matrix() } m = 0; - for( ii = 0; ii < inum; ii++ ) { + for (ii = 0; ii < inum; ii++ ) { i = ilist[ii]; m += numneigh[i]; } @@ -321,7 +322,9 @@ void FixQEqReaxOMP::compute_H() // fill in the H matrix +#if defined(_OPENMP) #pragma omp parallel default(shared) +#endif { int i, j, ii, jj, mfill, jnum, flag; int *jlist; @@ -329,8 +332,9 @@ void FixQEqReaxOMP::compute_H() mfill = 0; - //#pragma omp for schedule(dynamic,50) +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for (ii = 0; ii < inum; ii++) { i = ilist[ii]; if(mask[i] & groupbit) { @@ -390,7 +394,9 @@ void FixQEqReaxOMP::init_storage() if(reaxc) NN = reaxc->list->inum + reaxc->list->gnum; else NN = list->inum + list->gnum; +#if defined(_OPENMP) #pragma omp parallel for schedule(static) +#endif for (int i = 0; i < NN; i++) { Hdia_inv[i] = 1. / eta[atom->type[i]]; b_s[i] = -chi[atom->type[i]]; @@ -514,7 +520,9 @@ void FixQEqReaxOMP::init_matvec() if(do_aspc) { double m_aspc_omega = 1.0 - aspc_omega; +#if defined(_OPENMP) #pragma omp parallel for schedule(dynamic,50) private(i) +#endif for(int ii = 0; ii < nn; ++ii ) { i = ilist[ii]; if(atom->mask[i] & groupbit) { @@ -540,7 +548,9 @@ void FixQEqReaxOMP::init_matvec() } else { +#if defined(_OPENMP) #pragma omp parallel for schedule(dynamic,50) private(i) +#endif for(int ii = 0; ii < nn; ++ii ) { i = ilist[ii]; if(atom->mask[i] & groupbit) { @@ -605,8 +615,10 @@ int FixQEqReaxOMP::CG( double *b, double *x ) double tmp1, tmp2; tmp1 = tmp2 = 0.0; +#if defined(_OPENMP) #pragma omp parallel for schedule(dynamic,50) private(i) reduction(+:tmp1,tmp2) - for( jj = 0; jj < nn; ++jj ) { +#endif + for (jj = 0; jj < nn; ++jj ) { i = ilist[jj]; if (atom->mask[i] & groupbit) { r[i] = b[i] - q[i]; @@ -625,42 +637,50 @@ int FixQEqReaxOMP::CG( double *b, double *x ) b_norm = sqrt(buf[0]); sig_new = buf[1]; - for( i = 1; i < imax && sqrt(sig_new) / b_norm > tolerance; ++i ) { + for (i = 1; i < imax && sqrt(sig_new) / b_norm > tolerance; ++i ) { comm->forward_comm_fix(this); //Dist_vector( d ); sparse_matvec( &H, d, q ); comm->reverse_comm_fix(this); //Coll_vector( q ); tmp1 = 0.0; +#if defined(_OPENMP) #pragma omp parallel +#endif { +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) private(ii) reduction(+:tmp1) - for( jj = 0; jj < nn; jj++) { - ii = ilist[jj]; - if(atom->mask[ii] & groupbit) tmp1 += d[ii] * q[ii]; +#endif + for (jj = 0; jj < nn; jj++) { + ii = ilist[jj]; + if(atom->mask[ii] & groupbit) tmp1 += d[ii] * q[ii]; } +#if defined(_OPENMP) #pragma omp barrier #pragma omp master +#endif { - MPI_Allreduce(&tmp1, &tmp2, 1, MPI_DOUBLE, MPI_SUM, world); + MPI_Allreduce(&tmp1, &tmp2, 1, MPI_DOUBLE, MPI_SUM, world); - alpha = sig_new / tmp2; - tmp1 = 0.0; + alpha = sig_new / tmp2; + tmp1 = 0.0; } +#if defined(_OPENMP) #pragma omp barrier #pragma omp for schedule(dynamic,50) private(ii) reduction(+:tmp1) - for( jj = 0; jj < nn; jj++) { - ii = ilist[jj]; - if(atom->mask[ii] & groupbit) { - x[ii] += alpha * d[ii]; - r[ii] -= alpha * q[ii]; +#endif + for (jj = 0; jj < nn; jj++) { + ii = ilist[jj]; + if(atom->mask[ii] & groupbit) { + x[ii] += alpha * d[ii]; + r[ii] -= alpha * q[ii]; - // pre-conditioning - p[ii] = r[ii] * Hdia_inv[ii]; - tmp1 += r[ii] * p[ii]; - } + // pre-conditioning + p[ii] = r[ii] * Hdia_inv[ii]; + tmp1 += r[ii] * p[ii]; + } } } // omp parallel @@ -671,8 +691,10 @@ int FixQEqReaxOMP::CG( double *b, double *x ) sig_new = tmp2; beta = sig_new / sig_old; +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) private(ii) - for( jj = 0; jj < nn; jj++) { +#endif + for (jj = 0; jj < nn; jj++) { ii = ilist[jj]; if(atom->mask[ii] & groupbit) d[ii] = p[ii] + beta * d[ii]; } @@ -692,13 +714,19 @@ int FixQEqReaxOMP::CG( double *b, double *x ) void FixQEqReaxOMP::sparse_matvec( sparse_matrix *A, double *x, double *b ) { +#if defined(_OPENMP) #pragma omp parallel default(shared) +#endif { int i, j, itr_j; int nn, NN, ii; int *ilist; int nthreads = comm->nthreads; +#if defined(_OPENMP) int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif if(reaxc) { nn = reaxc->list->inum; @@ -710,42 +738,50 @@ void FixQEqReaxOMP::sparse_matvec( sparse_matrix *A, double *x, double *b ) ilist = list->ilist; } +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) +#endif for (ii = 0; ii < nn; ++ii) { i = ilist[ii]; if(atom->mask[i] & groupbit) b[i] = eta[ atom->type[i] ] * x[i]; } +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) +#endif for (ii = nn; ii < NN; ++ii) { i = ilist[ii]; if(atom->mask[i] & groupbit) b[i] = 0; } +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) +#endif for (i = 0; i < NN; ++i) for(int t=0; tmask[i] & groupbit) { - for (itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { - j = A->jlist[itr_j]; - b[i] += A->val[itr_j] * x[j]; + for (itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { + j = A->jlist[itr_j]; + b[i] += A->val[itr_j] * x[j]; - b_temp[tid][j] += A->val[itr_j] * x[i]; - } + b_temp[tid][j] += A->val[itr_j] * x[i]; + } } } // Wait till b_temp accumulated +#if defined(_OPENMP) #pragma omp barrier - #pragma omp for schedule(dynamic,50) +#endif for (i = 0; i < NN; ++i) for (int t = 0; t < nthreads; ++t) b[i] += b_temp[t][i]; @@ -772,7 +808,9 @@ void FixQEqReaxOMP::calculate_Q() double tmp1, tmp2; tmp1 = tmp2 = 0.0; +#if defined(_OPENMP) #pragma omp parallel for schedule(dynamic,50) private(i) reduction(+:tmp1,tmp2) +#endif for(int ii = 0; ii < nn; ii++) { i = ilist[ii]; if(atom->mask[i] & groupbit) { @@ -792,7 +830,9 @@ void FixQEqReaxOMP::calculate_Q() double u = buf[0] / buf[1]; +#if defined(_OPENMP) #pragma omp parallel for schedule(static) private(i) +#endif for (int ii = 0; ii < nn; ++ii) { i = ilist[ii]; if(atom->mask[i] & groupbit) { @@ -800,8 +840,8 @@ void FixQEqReaxOMP::calculate_Q() // backup s & t for (int k = 4; k > 0; --k) { - s_hist[i][k] = s_hist[i][k-1]; - t_hist[i][k] = t_hist[i][k-1]; + s_hist[i][k] = s_hist[i][k-1]; + t_hist[i][k] = t_hist[i][k-1]; } s_hist[i][0] = s[i]; t_hist[i][0] = t[i]; @@ -814,84 +854,6 @@ void FixQEqReaxOMP::calculate_Q() /* ---------------------------------------------------------------------- */ -// double FixQEqReaxOMP::parallel_norm( double *v, int n ) -// { -// int i; -// double my_sum, norm_sqr; - -// int *ilist; - -// if (reaxc) ilist = reaxc->list->ilist; -// else ilist = list->ilist; - -// my_sum = 0.0; -// norm_sqr = 0.0; - -// #pragma omp parallel for schedule(static) private(i) reduction(+:my_sum) -// for (int ii = 0; ii < n; ++ii) { -// i = ilist[ii]; -// if(atom->mask[i] & groupbit) my_sum += SQR( v[i] ); -// } - -// MPI_Allreduce( &my_sum, &norm_sqr, 1, MPI_DOUBLE, MPI_SUM, world ); - -// return sqrt( norm_sqr ); -// } - -// /* ---------------------------------------------------------------------- */ - -// double FixQEqReaxOMP::parallel_dot( double *v1, double *v2, int n ) -// { -// int i; -// double my_dot, res; - -// int *ilist; - -// if (reaxc) ilist = reaxc->list->ilist; -// else ilist = list->ilist; - -// my_dot = 0.0; -// res = 0.0; - -// #pragma omp parallel for schedule(static) private(i) reduction(+:my_dot) -// for (int ii = 0; ii < n; ++ii) { -// i = ilist[ii]; -// if(atom->mask[i] & groupbit) my_dot += v1[i] * v2[i]; -// } - -// MPI_Allreduce( &my_dot, &res, 1, MPI_DOUBLE, MPI_SUM, world ); - -// return res; -// } - -// /* ---------------------------------------------------------------------- */ - -// double FixQEqReaxOMP::parallel_vector_acc( double *v, int n ) -// { -// int i; -// double my_acc, res; - -// int *ilist; - -// if (reaxc) ilist = reaxc->list->ilist; -// else ilist = list->ilist; - -// my_acc = 0.0; -// res = 0.0; - -// #pragma omp parallel for schedule(static) private(i) reduction(+:my_acc) -// for (int ii = 0; ii < n; ++ii) { -// i = ilist[ii]; -// if(atom->mask[i] & groupbit) my_acc += v[i]; -// } - -// MPI_Allreduce( &my_acc, &res, 1, MPI_DOUBLE, MPI_SUM, world ); - -// return res; -// } - -/* ---------------------------------------------------------------------- */ - void FixQEqReaxOMP::vector_sum( double* dest, double c, double* v, double d, double* y, int k ) { @@ -901,7 +863,9 @@ void FixQEqReaxOMP::vector_sum( double* dest, double c, double* v, if (reaxc) ilist = reaxc->list->ilist; else ilist = list->ilist; +#if defined(_OPENMP) #pragma omp parallel for schedule(static) private(i) +#endif for (int ii=0; iimask[i] & groupbit) dest[i] = c * v[i] + d * y[i]; @@ -918,7 +882,9 @@ void FixQEqReaxOMP::vector_add( double* dest, double c, double* v, int k ) if (reaxc) ilist = reaxc->list->ilist; else ilist = list->ilist; +#if defined(_OPENMP) #pragma omp parallel for schedule(static) private(i) +#endif for (int ii=0; iimask[i] & groupbit) dest[i] += c * v[i]; @@ -964,8 +930,10 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) double tmp1, tmp2, tmp3, tmp4; tmp1 = tmp2 = tmp3 = tmp4 = 0.0; +#if defined(_OPENMP) #pragma omp parallel for schedule(dynamic,50) private(i) reduction(+:tmp1,tmp2,tmp3,tmp4) - for( jj = 0; jj < nn; ++jj ) { +#endif + for (jj = 0; jj < nn; ++jj ) { i = ilist[jj]; if (atom->mask[i] & groupbit) { int indxI = 2 * i; @@ -996,58 +964,66 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) sig_new_s = buf[2]; sig_new_t = buf[3]; - for( i = 1; i < imax; ++i ) { + for (i = 1; i < imax; ++i ) { comm->forward_comm_fix(this); //Dist_vector( d ); dual_sparse_matvec( &H, d, q ); comm->reverse_comm_fix(this); //Coll_vector( q ); tmp1 = tmp2 = 0.0; +#if defined(_OPENMP) #pragma omp parallel +#endif { +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) private(ii) reduction(+:tmp1,tmp2) - for( jj = 0; jj < nn; jj++) { - ii = ilist[jj]; - if(atom->mask[ii] & groupbit) { - int indxI = 2 * ii; - tmp1 += d[indxI ] * q[indxI ]; - tmp2 += d[indxI+1] * q[indxI+1]; - } +#endif + for (jj = 0; jj < nn; jj++) { + ii = ilist[jj]; + if(atom->mask[ii] & groupbit) { + int indxI = 2 * ii; + tmp1 += d[indxI ] * q[indxI ]; + tmp2 += d[indxI+1] * q[indxI+1]; + } } +#if defined(_OPENMP) #pragma omp barrier #pragma omp master +#endif { - my_buf[0] = tmp1; - my_buf[1] = tmp2; + my_buf[0] = tmp1; + my_buf[1] = tmp2; - MPI_Allreduce(&my_buf, &buf, 2, MPI_DOUBLE, MPI_SUM, world); + MPI_Allreduce(&my_buf, &buf, 2, MPI_DOUBLE, MPI_SUM, world); - alpha_s = sig_new_s / buf[0]; - alpha_t = sig_new_t / buf[1]; + alpha_s = sig_new_s / buf[0]; + alpha_t = sig_new_t / buf[1]; - tmp1 = tmp2 = 0.0; + tmp1 = tmp2 = 0.0; } +#if defined(_OPENMP) #pragma omp barrier #pragma omp for schedule(dynamic,50) private(ii) reduction(+:tmp1,tmp2) - for( jj = 0; jj < nn; jj++) { - ii = ilist[jj]; - if(atom->mask[ii] & groupbit) { - int indxI = 2 * ii; - x1[ii] += alpha_s * d[indxI ]; - x2[ii] += alpha_t * d[indxI+1]; +#endif + for (jj = 0; jj < nn; jj++) { + ii = ilist[jj]; + if(atom->mask[ii] & groupbit) { + int indxI = 2 * ii; + x1[ii] += alpha_s * d[indxI ]; + x2[ii] += alpha_t * d[indxI+1]; - r[indxI ] -= alpha_s * q[indxI ]; - r[indxI+1] -= alpha_t * q[indxI+1]; + r[indxI ] -= alpha_s * q[indxI ]; + r[indxI+1] -= alpha_t * q[indxI+1]; - // pre-conditioning - p[indxI ] = r[indxI ] * Hdia_inv[ii]; - p[indxI+1] = r[indxI+1] * Hdia_inv[ii]; + // pre-conditioning + p[indxI ] = r[indxI ] * Hdia_inv[ii]; + p[indxI+1] = r[indxI+1] * Hdia_inv[ii]; - tmp1 += r[indxI ] * p[indxI ]; - tmp2 += r[indxI+1] * p[indxI+1]; - } + tmp1 += r[indxI ] * p[indxI ]; + tmp2 += r[indxI+1] * p[indxI+1]; + } } } // omp parallel @@ -1067,14 +1043,16 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) beta_s = sig_new_s / sig_old_s; beta_t = sig_new_t / sig_old_t; +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) private(ii) - for( jj = 0; jj < nn; jj++) { +#endif + for (jj = 0; jj < nn; jj++) { ii = ilist[jj]; if(atom->mask[ii] & groupbit) { - int indxI = 2 * ii; + int indxI = 2 * ii; - d[indxI ] = p[indxI ] + beta_s * d[indxI ]; - d[indxI+1] = p[indxI+1] + beta_t * d[indxI+1]; + d[indxI ] = p[indxI ] + beta_s * d[indxI ]; + d[indxI+1] = p[indxI+1] + beta_t * d[indxI+1]; } } } @@ -1110,11 +1088,11 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) // Timing info for remainder of s or t #ifdef OMP_TIMING - endTimeBase = MPI_Wtime(); - ompTimingData[COMPUTECG2INDEX] += (endTimeBase-startTimeBase); - ompTimingCount[COMPUTECG2INDEX]++; - ompTimingCGCount[COMPUTECG2INDEX]+= i - matvecs; - startTimeBase = endTimeBase; + endTimeBase = MPI_Wtime(); + ompTimingData[COMPUTECG2INDEX] += (endTimeBase-startTimeBase); + ompTimingCount[COMPUTECG2INDEX]++; + ompTimingCGCount[COMPUTECG2INDEX]+= i - matvecs; + startTimeBase = endTimeBase; #endif if ( i >= imax && comm->me == 0) { @@ -1131,7 +1109,9 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2, double *b ) { +#if defined(_OPENMP) #pragma omp parallel default(shared) +#endif { int i, j, itr_j; int nn, NN, ii; @@ -1139,7 +1119,11 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2 int indxI, indxJ; int nthreads = comm->nthreads; +#if defined(_OPENMP) int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif if (reaxc) { nn = reaxc->list->inum; @@ -1151,62 +1135,72 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2 ilist = list->ilist; } +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) - for( ii = 0; ii < nn; ++ii ) { +#endif + for (ii = 0; ii < nn; ++ii ) { i = ilist[ii]; if (atom->mask[i] & groupbit) { - indxI = 2 * i; - b[indxI ] = eta[ atom->type[i] ] * x1[i]; - b[indxI+1] = eta[ atom->type[i] ] * x2[i]; + indxI = 2 * i; + b[indxI ] = eta[ atom->type[i] ] * x1[i]; + b[indxI+1] = eta[ atom->type[i] ] * x2[i]; } } +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) - for( ii = nn; ii < NN; ++ii ) { +#endif + for (ii = nn; ii < NN; ++ii ) { i = ilist[ii]; if (atom->mask[i] & groupbit) { - indxI = 2 * i; - b[indxI] = 0; - b[indxI+1] = 0; + indxI = 2 * i; + b[indxI] = 0; + b[indxI+1] = 0; } } +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) +#endif for (i = 0; i < NN; ++i) { indxI = 2 * i; for(int t=0; tmask[i] & groupbit) { - indxI = 2 * i; - for( itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { - j = A->jlist[itr_j]; - indxJ = 2 * j; - b[indxI ] += A->val[itr_j] * x1[j]; - b[indxI+1] += A->val[itr_j] * x2[j]; - - b_temp[tid][indxJ ] += A->val[itr_j] * x1[i]; - b_temp[tid][indxJ+1] += A->val[itr_j] * x2[i]; - } + indxI = 2 * i; + for (itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { + j = A->jlist[itr_j]; + indxJ = 2 * j; + b[indxI ] += A->val[itr_j] * x1[j]; + b[indxI+1] += A->val[itr_j] * x2[j]; + + b_temp[tid][indxJ ] += A->val[itr_j] * x1[i]; + b_temp[tid][indxJ+1] += A->val[itr_j] * x2[i]; + } } } // Wait till b_temp accumulated +#if defined(_OPENMP) #pragma omp barrier #pragma omp for schedule(dynamic,50) +#endif for (i = 0; i < NN; ++i) { indxI = 2 * i; for (int t = 0; t < nthreads; ++t) { - b[indxI ] += b_temp[t][indxI ]; - b[indxI+1] += b_temp[t][indxI+1]; + b[indxI ] += b_temp[t][indxI ]; + b[indxI+1] += b_temp[t][indxI+1]; } } @@ -1217,7 +1211,9 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2 void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x, double *b ) { +#if defined(_OPENMP) #pragma omp parallel default(shared) +#endif { int i, j, itr_j; int nn, NN, ii; @@ -1225,7 +1221,11 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x, double *b ) int indxI, indxJ; int nthreads = comm->nthreads; +#if defined(_OPENMP) int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif if (reaxc) { nn = reaxc->list->inum; @@ -1237,64 +1237,73 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x, double *b ) ilist = list->ilist; } +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) - for( ii = 0; ii < nn; ++ii ) { +#endif + for (ii = 0; ii < nn; ++ii ) { i = ilist[ii]; if (atom->mask[i] & groupbit) { - indxI = 2 * i; - b[indxI ] = eta[ atom->type[i] ] * x[indxI ]; - b[indxI+1] = eta[ atom->type[i] ] * x[indxI+1]; + indxI = 2 * i; + b[indxI ] = eta[ atom->type[i] ] * x[indxI ]; + b[indxI+1] = eta[ atom->type[i] ] * x[indxI+1]; } } +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) - for( ii = nn; ii < NN; ++ii ) { +#endif + for (ii = nn; ii < NN; ++ii ) { i = ilist[ii]; if (atom->mask[i] & groupbit) { - indxI = 2 * i; - b[indxI] = 0; - b[indxI+1] = 0; + indxI = 2 * i; + b[indxI] = 0; + b[indxI+1] = 0; } } +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) +#endif for (i = 0; i < NN; ++i) { indxI = 2 * i; for(int t=0; tmask[i] & groupbit) { - indxI = 2 * i; - for( itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { - j = A->jlist[itr_j]; - indxJ = 2 * j; - b[indxI ] += A->val[itr_j] * x[indxJ ]; - b[indxI+1] += A->val[itr_j] * x[indxJ+1]; - - b_temp[tid][indxJ ] += A->val[itr_j] * x[indxI ]; - b_temp[tid][indxJ+1] += A->val[itr_j] * x[indxI+1]; - } + indxI = 2 * i; + for (itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { + j = A->jlist[itr_j]; + indxJ = 2 * j; + b[indxI ] += A->val[itr_j] * x[indxJ ]; + b[indxI+1] += A->val[itr_j] * x[indxJ+1]; + + b_temp[tid][indxJ ] += A->val[itr_j] * x[indxI ]; + b_temp[tid][indxJ+1] += A->val[itr_j] * x[indxI+1]; + } } } // Wait till b_temp accumulated +#if defined(_OPENMP) #pragma omp barrier #pragma omp for schedule(dynamic,50) +#endif for (i = 0; i < NN; ++i) { indxI = 2 * i; for (int t = 0; t < nthreads; ++t) { - b[indxI ] += b_temp[t][indxI ]; - b[indxI+1] += b_temp[t][indxI+1]; + b[indxI ] += b_temp[t][indxI ]; + b[indxI+1] += b_temp[t][indxI+1]; } } - } // omp parallel } diff --git a/src/USER-OMP/pair_reaxc_omp.cpp b/src/USER-OMP/pair_reaxc_omp.cpp index f216b47665..e716188949 100644 --- a/src/USER-OMP/pair_reaxc_omp.cpp +++ b/src/USER-OMP/pair_reaxc_omp.cpp @@ -49,6 +49,10 @@ #include "reaxc_vector.h" #include "fix_reaxc_bonds.h" +#if defined(_OPENMP) +#include +#endif + using namespace LAMMPS_NS; #ifdef OMP_TIMING @@ -206,7 +210,9 @@ void PairReaxCOMP::compute(int eflag, int vflag) ompTimingData[COMPUTEINDEX] += (endTimeBase-startTimeBase); #endif +#if defined(_OPENMP) #pragma omp parallel for schedule(static) +#endif for(int k = 0; k < system->N; ++k) { num_bonds[k] = system->my_atoms[k].num_bonds; num_hbonds[k] = system->my_atoms[k].num_hbonds; @@ -269,7 +275,9 @@ void PairReaxCOMP::compute(int eflag, int vflag) memory->create(tmpbo,nmax,MAXSPECBOND,"pair:tmpbo"); } +#if defined(_OPENMP) #pragma omp parallel for collapse(2) schedule(static) default(shared) +#endif for (i = 0; i < system->N; i ++) for (j = 0; j < MAXSPECBOND; j ++) { tmpbo[i][j] = 0.0; @@ -330,8 +338,11 @@ void PairReaxCOMP::init_style( ) fix_reax = (FixReaxC *) modify->fix[modify->nfix-1]; } -#pragma omp parallel - { control->nthreads = omp_get_num_threads(); } +#if defined(_OPENMP) + control->nthreads = omp_get_max_threads(); +#else + control->nthreads = 1; +#endif } /* ---------------------------------------------------------------------- */ @@ -418,7 +429,9 @@ void PairReaxCOMP::write_reax_atoms() if (system->N > system->total_cap) error->all(FLERR,"Too many ghost atoms"); +#if defined(_OPENMP) #pragma omp parallel for schedule(static) default(shared) +#endif for( int i = 0; i < system->N; ++i ){ system->my_atoms[i].orig_id = atom->tag[i]; system->my_atoms[i].type = map[atom->type[i]]; @@ -498,9 +511,10 @@ int PairReaxCOMP::write_reax_lists() num_nbrs += numneigh[i]; } -//#pragma omp parallel for schedule(guided) default(shared) -#pragma omp parallel for schedule(dynamic,50) default(shared) \ - private(itr_i, itr_j, i, j, jlist, cutoff_sqr, num_mynbrs, d_sqr, dvec, dist) +#if defined(_OPENMP) +#pragma omp parallel for schedule(dynamic,50) default(shared) \ + private(itr_i, itr_j, i, j, jlist, cutoff_sqr, num_mynbrs, d_sqr, dvec, dist) +#endif for (itr_i = 0; itr_i < numall; ++itr_i) { i = ilist[itr_i]; jlist = firstneigh[i]; @@ -539,7 +553,9 @@ int PairReaxCOMP::write_reax_lists() void PairReaxCOMP::read_reax_forces(int vflag) { +#if defined(_OPENMP) #pragma omp parallel for schedule(static) default(shared) +#endif for( int i = 0; i < system->N; ++i ) { system->my_atoms[i].f[0] = workspace->f[i][0]; system->my_atoms[i].f[1] = workspace->f[i][1]; @@ -561,8 +577,10 @@ void PairReaxCOMP::FindBond() bond_data *bo_ij; bo_cut = 0.10; -#pragma omp parallel for schedule(static) default(shared) \ +#if defined(_OPENMP) +#pragma omp parallel for schedule(static) default(shared) \ private(i, nj, pj, bo_ij, j, bo_tmp) +#endif for (i = 0; i < system->n; i++) { nj = 0; for( pj = Start_Index(i, lists); pj < End_Index(i, lists); ++pj ) { @@ -573,10 +591,10 @@ void PairReaxCOMP::FindBond() bo_tmp = bo_ij->bo_data.BO; if (bo_tmp >= bo_cut ) { - tmpid[i][nj] = j; - tmpbo[i][nj] = bo_tmp; - nj ++; - if (nj > MAXSPECBOND) error->all(FLERR,"Increase MAXSPECBOND in fix_reaxc_species.h"); + tmpid[i][nj] = j; + tmpbo[i][nj] = bo_tmp; + nj ++; + if (nj > MAXSPECBOND) error->all(FLERR,"Increase MAXSPECBOND in fix_reaxc_species.h"); } } } diff --git a/src/USER-OMP/reaxc_bond_orders_omp.cpp b/src/USER-OMP/reaxc_bond_orders_omp.cpp index aaa311640e..1000954f6e 100644 --- a/src/USER-OMP/reaxc_bond_orders_omp.cpp +++ b/src/USER-OMP/reaxc_bond_orders_omp.cpp @@ -24,13 +24,16 @@ . ----------------------------------------------------------------------*/ -#include #include "pair_reaxc_omp.h" #include "reaxc_types.h" #include "reaxc_bond_orders_omp.h" #include "reaxc_list.h" #include "reaxc_vector.h" +#if defined(_OPENMP) +#include +#endif + using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ @@ -45,7 +48,11 @@ void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj, PairReaxCOMP *pair_reax_ptr = static_cast(system->pair_ptr); +#if defined(_OPENMP) int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); long reductionOffset = (system->N * tid); @@ -226,7 +233,11 @@ void Add_dBond_to_Forces_NPTOMP( reax_system *system, int i, int pj, simulation_ PairReaxCOMP *pair_reax_ptr = static_cast(system->pair_ptr); +#if defined(_OPENMP) int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); long reductionOffset = (system->N * tid); @@ -428,7 +439,9 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, int natoms = system->N; int nthreads = control->nthreads; +#if defined(_OPENMP) #pragma omp parallel default(shared) +#endif { int i, j, pj, type_i, type_j; int start_i, end_i, sym_index; @@ -443,10 +456,15 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, two_body_parameters *twbp; bond_order_data *bo_ij, *bo_ji; +#if defined(_OPENMP) int tid = omp_get_thread_num(); - +#else + int tid = 0; +#endif /* Calculate Deltaprime, Deltaprime_boc values */ +#if defined(_OPENMP) #pragma omp for schedule(static) +#endif for (i = 0; i < system->N; ++i) { type_i = system->my_atoms[i].type; if(type_i < 0) continue; @@ -459,11 +477,14 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, } // Wait till initialization complete +#if defined(_OPENMP) #pragma omp barrier - +#endif + /* Corrected Bond Order calculations */ -//#pragma omp for schedule(dynamic,50) +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for (i = 0; i < system->N; ++i) { type_i = system->my_atoms[i].type; if(type_i < 0) continue; @@ -625,11 +646,14 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, } // Wait for bo_ij to be updated +#if defined(_OPENMP) #pragma omp barrier - +#endif // Try to combine the following for-loop back into the for-loop above /*-------------------------*/ +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for (i = 0; i < system->N; ++i) { type_i = system->my_atoms[i].type; if(type_i < 0) continue; @@ -664,11 +688,14 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, /*-------------------------*/ // Need to wait for total_bond_order to be accumulated. +#if defined(_OPENMP) #pragma omp barrier - +#endif /* Calculate some helper variables that are used at many places throughout force calculations */ +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for(j = 0; j < system->N; ++j ) { type_j = system->my_atoms[j].type; if(type_j < 0) continue; diff --git a/src/USER-OMP/reaxc_bonds_omp.cpp b/src/USER-OMP/reaxc_bonds_omp.cpp index 19433ce2e3..dcf788a79c 100644 --- a/src/USER-OMP/reaxc_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_bonds_omp.cpp @@ -25,7 +25,6 @@ ----------------------------------------------------------------------*/ #include "pair_reaxc_omp.h" -#include #include "reaxc_bonds_omp.h" #include "reaxc_bond_orders_omp.h" @@ -33,6 +32,10 @@ #include "reaxc_tool_box.h" #include "reaxc_vector.h" +#if defined(_OPENMP) +#include +#endif + using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ @@ -56,8 +59,10 @@ void BondsOMP( reax_system *system, control_params *control, double gp37 = (int) system->reax_param.gp.l[37]; double total_Ebond = 0.0; +#if defined(_OPENMP) #pragma omp parallel default(shared) reduction(+: total_Ebond) - { +#endif + { int i, j, pj; int start_i, end_i; int type_i, type_j; @@ -68,7 +73,12 @@ void BondsOMP( reax_system *system, control_params *control, single_body_parameters *sbp_i, *sbp_j; two_body_parameters *twbp; bond_order_data *bo_ij; - int tid = omp_get_thread_num(); + +#if defined(_OPENMP) + int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif long reductionOffset = (system->N * tid); class PairReaxCOMP *pair_reax_ptr; @@ -79,7 +89,9 @@ void BondsOMP( reax_system *system, control_params *control, system->pair_ptr->vflag_either, natoms, system->pair_ptr->eatom, system->pair_ptr->vatom, thr); +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for (i = 0; i < natoms; ++i) { start_i = Start_Index(i, bonds); end_i = End_Index(i, bonds); diff --git a/src/USER-OMP/reaxc_forces_omp.cpp b/src/USER-OMP/reaxc_forces_omp.cpp index 47e439a3f7..4e37dac38d 100644 --- a/src/USER-OMP/reaxc_forces_omp.cpp +++ b/src/USER-OMP/reaxc_forces_omp.cpp @@ -25,7 +25,6 @@ ----------------------------------------------------------------------*/ #include "pair_reaxc_omp.h" -#include "omp.h" #include "thr_data.h" #include "reaxc_forces_omp.h" @@ -42,6 +41,10 @@ #include "reaxc_valence_angles_omp.h" #include "reaxc_vector.h" +#if defined(_OPENMP) +#include +#endif + using namespace LAMMPS_NS; // Functions defined in reaxc_forces.cpp @@ -140,10 +143,16 @@ void Compute_Total_ForceOMP( reax_system *system, control_params *control, long totalReductionSize = system->N * nthreads; reax_list *bonds = (*lists) + BONDS; +#if defined(_OPENMP) #pragma omp parallel default(shared) //default(none) +#endif { int i, j, k, pj, pk, start_j, end_j; +#if defined(_OPENMP) int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif bond_order_data *bo_jk; class PairReaxCOMP *pair_reax_ptr; @@ -153,13 +162,17 @@ void Compute_Total_ForceOMP( reax_system *system, control_params *control, pair_reax_ptr->ev_setup_thr_proxy(0, 1, natoms, system->pair_ptr->eatom, system->pair_ptr->vatom, thr); +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for (i = 0; i < system->N; ++i) { for (j = 0; j < nthreads; ++j) workspace->CdDelta[i] += workspace->CdDeltaReduction[system->N*j+i]; } +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) +#endif for (j = 0; j < system->N; ++j) { start_j = Start_Index(j, bonds); end_j = End_Index(j, bonds); @@ -183,7 +196,9 @@ void Compute_Total_ForceOMP( reax_system *system, control_params *control, if(control->virial == 0) { +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) +#endif for (i = 0; i < system->N; ++i) { const int startj = Start_Index(i, bonds); const int endj = End_Index(i, bonds); @@ -194,7 +209,9 @@ void Compute_Total_ForceOMP( reax_system *system, control_params *control, } else { +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) +#endif for (i = 0; i < system->N; ++i) { const int startj = Start_Index(i, bonds); const int endj = End_Index(i, bonds); @@ -207,14 +224,18 @@ void Compute_Total_ForceOMP( reax_system *system, control_params *control, pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, 0, 1, thr); +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for (i = 0; i < system->N; ++i) { for (j = 0; j < nthreads; ++j) rvec_Add( workspace->f[i], workspace->forceReduction[system->N*j+i] ); } +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for (i = 0; i < totalReductionSize; i++) { workspace->forceReduction[i][0] = 0; workspace->forceReduction[i][1] = 0; @@ -247,14 +268,18 @@ void Validate_ListsOMP( reax_system *system, storage *workspace, reax_list **lis reallocate_data *realloc = &(workspace->realloc); double saferzone = system->saferzone; +#if defined(_OPENMP) #pragma omp parallel default(shared) private(i, comp, Hindex) +#endif { /* bond list */ if( N > 0 ) { bonds = *lists + BONDS; +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for( i = 0; i < N; ++i ) { system->my_atoms[i].num_bonds = MAX(Num_Entries(i,bonds)*2, MIN_BONDS); @@ -275,7 +300,9 @@ void Validate_ListsOMP( reax_system *system, storage *workspace, reax_list **lis if( numH > 0 ) { hbonds = *lists + HBONDS; +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for( i = 0; i < n; ++i ) { Hindex = system->my_atoms[i].Hindex; if( Hindex > -1 ) { @@ -339,18 +366,25 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, /* uncorrected bond orders */ cutoff = control->bond_cut; -#pragma omp parallel default(shared) \ +#if defined(_OPENMP) +#pragma omp parallel default(shared) \ private(i, atom_i, type_i, pi, start_i, end_i, sbp_i, btop_i, ibond, ihb, ihb_top, \ - j, atom_j, type_j, pj, start_j, end_j, sbp_j, nbr_pj, jbond, jhb, twbp) + j, atom_j, type_j, pj, start_j, end_j, sbp_j, nbr_pj, jbond, jhb, twbp) +#endif { int nthreads = control->nthreads; +#if defined(_OPENMP) int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif long reductionOffset = system->N * tid; long totalReductionSize = system->N * nthreads; +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) reduction(+ : num_bonds) -//#pragma omp for schedule(guided) reduction(+ : num_bonds) +#endif for (i = 0; i < system->N; ++i) { atom_i = &(system->my_atoms[i]); type_i = atom_i->type; @@ -414,7 +448,9 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, int btop_j; // Update indices in critical section +#if defined(_OPENMP) #pragma omp critical +#endif { btop_i = End_Index( i, bonds ); btop_j = End_Index( j, bonds ); @@ -449,9 +485,13 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, } // for(i) // Need to wait for all indices and tmp arrays accumulated. +#if defined(_OPENMP) #pragma omp barrier +#endif +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) +#endif for(i=0; iN; i++) for(int t=0; tN + i; @@ -461,47 +501,22 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, workspace->total_bond_order[i] += tmp_bond_order[indx]; } - // Not needed anymore with newest BOp_OMP()? - //#pragma omp for schedule(guided) -// #pragma omp for schedule(dynamic,50) -// for (i = 0; i < system->N; ++i) { -// start_i = Start_Index(i, bonds); -// end_i = End_Index(i, bonds); - -// for (pi = start_i; pi < end_i; ++pi) { -// ibond = &(bonds->select.bond_list[pi]); -// j = ibond->nbr; - -// if (i < j) { -// start_j = Start_Index(j, bonds); -// end_j = End_Index(j, bonds); - -// for (pj = start_j; pj < end_j; ++pj) { -// jbond = &(bonds->select.bond_list[pj]); - -// if (jbond->nbr == i) { -// ibond->sym_index = pj; -// jbond->sym_index = pi; -// break; -// } -// } -// } -// } -// } - /* hydrogen bond list */ if (control->hbond_cut > 0) { cutoff = control->hbond_cut; -//#pragma omp for schedule(guided) reduction(+ : num_hbonds) +#if defined(_OPENMP) #pragma omp for schedule(dynamic,50) reduction(+ : num_hbonds) +#endif for (i = 0; i < system->n; ++i) { atom_i = &(system->my_atoms[i]); type_i = atom_i->type; sbp_i = &(system->reax_param.sbp[type_i]); ihb = sbp_i->p_hbond; +#if defined(_OPENMP) #pragma omp critical +#endif { if (ihb == 1 || ihb == 2) { @@ -525,10 +540,6 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, else if(jn && ihb == 2 && jhb == 1) jflag = 1; if(iflag || jflag) { - - // This critical section enforces H-bonds to be added by threads one at a time. -// #pragma omp critical -// { if(iflag) { ihb_top = End_Index(atom_i->Hindex, hbonds); Set_End_Index(atom_i->Hindex, ihb_top+1, hbonds); @@ -536,7 +547,6 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, jhb_top = End_Index(atom_j->Hindex, hbonds); Set_End_Index(atom_j->Hindex, jhb_top+1, hbonds); } - // } // omp critical if(iflag) { hbonds->select.hbond_list[ihb_top].nbr = j; @@ -561,7 +571,9 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, } // if(control->hbond > 0) // Zero buffers for others to use as intended. +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for(i=0; i #include "reaxc_hydrogen_bonds_omp.h" #include "reaxc_bond_orders_omp.h" @@ -34,6 +33,10 @@ #include "reaxc_valence_angles_omp.h" // To access Calculate_dCos_ThetaOMP() #include "reaxc_vector.h" +#if defined(_OPENMP) +#include +#endif + using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ @@ -50,8 +53,10 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control, const int nthreads = control->nthreads; long totalReductionSize = system->N; +#if defined(_OPENMP) #pragma omp parallel default(shared) //default(none) - { +#endif + { int i, j, k, pi, pk; int type_i, type_j, type_k; int start_j, end_j, hb_start_j, hb_end_j; @@ -80,7 +85,11 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control, hbond_list = hbonds->select.hbond_list; int natoms = system->n; +#if defined(_OPENMP) int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif const int idelta = 1 + natoms/nthreads; int ifrom = tid*idelta; int ito = ((ifrom + idelta) > natoms) ? natoms : ifrom + idelta; @@ -226,7 +235,9 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control, } } +#if defined(_OPENMP) #pragma omp critical +#endif { data->my_en.e_hb += e_hb_thr; } diff --git a/src/USER-OMP/reaxc_init_md_omp.cpp b/src/USER-OMP/reaxc_init_md_omp.cpp index 9e01280545..3ccd2fff64 100644 --- a/src/USER-OMP/reaxc_init_md_omp.cpp +++ b/src/USER-OMP/reaxc_init_md_omp.cpp @@ -36,7 +36,6 @@ #include "reaxc_system_props.h" #include "reaxc_tool_box.h" #include "reaxc_vector.h" -#include "omp.h" // Functions definedd in reaxc_init_md.cpp extern int Init_MPI_Datatypes(reax_system*, storage*, mpi_datatypes*, MPI_Comm, char*); diff --git a/src/USER-OMP/reaxc_multi_body_omp.cpp b/src/USER-OMP/reaxc_multi_body_omp.cpp index 7922d7fd0d..acbe4ec268 100644 --- a/src/USER-OMP/reaxc_multi_body_omp.cpp +++ b/src/USER-OMP/reaxc_multi_body_omp.cpp @@ -25,7 +25,6 @@ ----------------------------------------------------------------------*/ #include "pair_reaxc_omp.h" -#include #include "thr_data.h" #include "reaxc_multi_body_omp.h" @@ -33,6 +32,10 @@ #include "reaxc_list.h" #include "reaxc_vector.h" +#if defined(_OPENMP) +#include +#endif + using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ @@ -63,7 +66,9 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, double total_Eun = 0.0; double total_Eov = 0.0; +#if defined(_OPENMP) #pragma omp parallel default(shared) reduction(+:total_Elp, total_Eun, total_Eov) +#endif { int i, j, pj, type_i, type_j; double Delta_lpcorr, dfvl; @@ -83,7 +88,11 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, bond_data *pbond; bond_order_data *bo_ij; +#if defined(_OPENMP) int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif long reductionOffset = (system->N * tid); class PairReaxCOMP *pair_reax_ptr; @@ -94,7 +103,9 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, system->pair_ptr->vflag_either, natoms, system->pair_ptr->eatom, system->pair_ptr->vatom, thr); +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for ( i = 0; i < system->n; ++i) { type_i = system->my_atoms[i].type; if(type_i < 0) continue; @@ -156,9 +167,10 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, } } } +#if defined(_OPENMP) #pragma omp barrier - #pragma omp for schedule(guided) +#endif for (i = 0; i < system->n; ++i) { type_i = system->my_atoms[i].type; if(type_i < 0) continue; diff --git a/src/USER-OMP/reaxc_nonbonded_omp.cpp b/src/USER-OMP/reaxc_nonbonded_omp.cpp index 583c02bd08..38a6d9e860 100644 --- a/src/USER-OMP/reaxc_nonbonded_omp.cpp +++ b/src/USER-OMP/reaxc_nonbonded_omp.cpp @@ -25,7 +25,6 @@ ----------------------------------------------------------------------*/ #include "pair_reaxc_omp.h" -#include #include "thr_data.h" #include "reaxc_types.h" @@ -36,6 +35,10 @@ #include "reaxc_list.h" #include "reaxc_vector.h" +#if defined(_OPENMP) +#include +#endif + using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ @@ -53,9 +56,15 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, double total_EvdW = 0.; double total_Eele = 0.; -#pragma omp parallel default(shared) reduction(+: total_EvdW, total_Eele) //default(none) +#if defined(_OPENMP) +#pragma omp parallel default(shared) reduction(+: total_EvdW, total_Eele) +#endif { - int tid = omp_get_thread_num(); +#if defined(_OPENMP) + int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif int i, j, pj; int start_i, end_i, orig_i, orig_j, flag; double powr_vdW1, powgi_vdW1; @@ -87,8 +96,9 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, e_lg = 0; de_lg = 0.0; -//#pragma omp for schedule(dynamic,50) +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for( i = 0; i < natoms; ++i ) { if(system->my_atoms[i].type < 0) continue; start_i = Start_Index(i, far_nbrs); @@ -258,7 +268,9 @@ void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *contro double total_EvdW = 0.; double total_Eele = 0.; +#if defined(_OPENMP) #pragma omp parallel default(shared) reduction(+:total_EvdW, total_Eele) +#endif { int i, j, pj, r; int type_i, type_j, tmin, tmax; @@ -270,7 +282,11 @@ void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *contro rvec temp, ext_press; far_neighbor_data *nbr_pj; LR_lookup_table *t; - int tid = omp_get_thread_num(); +#if defined(_OPENMP) + int tid = omp_get_thread_num(); + #else + int tid = 0; +#endif long froffset = (system->N * tid); class PairReaxCOMP *pair_reax_ptr; @@ -282,8 +298,9 @@ void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *contro natoms, system->pair_ptr->eatom, system->pair_ptr->vatom, thr); -//#pragma omp for schedule(dynamic,50) +#if defined(_OPENMP) #pragma omp for schedule(guided) +#endif for (i = 0; i < natoms; ++i) { type_i = system->my_atoms[i].type; if(type_i < 0) continue; diff --git a/src/USER-OMP/reaxc_torsion_angles_omp.cpp b/src/USER-OMP/reaxc_torsion_angles_omp.cpp index bb8bbe1cd7..a7b98f16b1 100644 --- a/src/USER-OMP/reaxc_torsion_angles_omp.cpp +++ b/src/USER-OMP/reaxc_torsion_angles_omp.cpp @@ -25,7 +25,6 @@ ----------------------------------------------------------------------*/ #include "pair_reaxc_omp.h" -#include #include "thr_data.h" #include "reaxc_types.h" @@ -35,6 +34,10 @@ #include "reaxc_tool_box.h" #include "reaxc_vector.h" +#if defined(_OPENMP) +#include +#endif + #define MIN_SINE 1e-10 using namespace LAMMPS_NS; @@ -107,7 +110,11 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, double delil[3], deljl[3], delkl[3]; double eng_tmp, f_scaler, fi_tmp[3], fj_tmp[3], fk_tmp[3]; - int tid = omp_get_thread_num(); +#if defined(_OPENMP) + int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif long reductionOffset = (system->N * tid); int num_thb_intrs = 0; class PairReaxCOMP *pair_reax_ptr; diff --git a/src/USER-OMP/reaxc_valence_angles_omp.cpp b/src/USER-OMP/reaxc_valence_angles_omp.cpp index c83e5de852..4ea1953fcf 100644 --- a/src/USER-OMP/reaxc_valence_angles_omp.cpp +++ b/src/USER-OMP/reaxc_valence_angles_omp.cpp @@ -25,7 +25,6 @@ ----------------------------------------------------------------------*/ #include "pair_reaxc_omp.h" -#include #include "thr_data.h" #include "reaxc_types.h" @@ -35,6 +34,10 @@ #include "reaxc_list.h" #include "reaxc_vector.h" +#if defined(_OPENMP) +#include +#endif + using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ @@ -161,7 +164,11 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, bond_data *pbond_ij, *pbond_jk, *pbond_jt; bond_order_data *bo_ij, *bo_jk, *bo_jt; - int tid = omp_get_thread_num(); +#if defined(_OPENMP) + int tid = omp_get_thread_num(); +#else + int tid = 0; +#endif long reductionOffset = (system->N * tid); class PairReaxCOMP *pair_reax_ptr; pair_reax_ptr = static_cast(system->pair_ptr); -- GitLab From 99a68e487f0770b0972b38010c354193b71027b8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 25 May 2017 02:01:04 -0400 Subject: [PATCH 200/593] fix suffix style handling bug for adding fixes and computes --- src/GRANULAR/pair_gran_hooke_history.cpp | 2 +- src/input.cpp | 4 ++-- src/modify.cpp | 28 +++++++++++++++++------- src/modify.h | 4 ++-- src/output.cpp | 6 ++--- 5 files changed, 28 insertions(+), 16 deletions(-) diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index 6f2d3d69ce..e9662c9e73 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -424,7 +424,7 @@ void PairGranHookeHistory::init_style() fixarg[1] = (char *) "all"; fixarg[2] = (char *) "SHEAR_HISTORY"; fixarg[3] = dnumstr; - modify->add_fix(4,fixarg,1); + modify->add_fix(4,fixarg); delete [] fixarg; fix_history = (FixShearHistory *) modify->fix[modify->nfix-1]; fix_history->pair = this; diff --git a/src/input.cpp b/src/input.cpp index 76aba3d87e..570560373a 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1478,7 +1478,7 @@ void Input::comm_style() void Input::compute() { - modify->add_compute(narg,arg,1); + modify->add_compute(narg,arg); } /* ---------------------------------------------------------------------- */ @@ -1556,7 +1556,7 @@ void Input::dump_modify() void Input::fix() { - modify->add_fix(narg,arg,1); + modify->add_fix(narg,arg); } /* ---------------------------------------------------------------------- */ diff --git a/src/modify.cpp b/src/modify.cpp index e24a2120ef..7af4576038 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -819,20 +819,26 @@ void Modify::add_fix(int narg, char **arg, int trysuffix) if (trysuffix && lmp->suffix_enable) { if (lmp->suffix) { - char estyle[256]; + int n = strlen(arg[2])+strlen(lmp->suffix)+2; + char *estyle = new char[n]; sprintf(estyle,"%s/%s",arg[2],lmp->suffix); if (fix_map->find(estyle) != fix_map->end()) { FixCreator fix_creator = (*fix_map)[estyle]; fix[ifix] = fix_creator(lmp,narg,arg); - } + delete[] fix[ifix]->style; + fix[ifix]->style = estyle; + } else delete[] estyle; } if (fix[ifix] == NULL && lmp->suffix2) { - char estyle[256]; + int n = strlen(arg[2])+strlen(lmp->suffix2)+2; + char *estyle = new char[n]; sprintf(estyle,"%s/%s",arg[2],lmp->suffix2); if (fix_map->find(estyle) != fix_map->end()) { FixCreator fix_creator = (*fix_map)[estyle]; fix[ifix] = fix_creator(lmp,narg,arg); - } + delete[] fix[ifix]->style; + fix[ifix]->style = estyle; + } else delete[] estyle; } } @@ -1018,20 +1024,26 @@ void Modify::add_compute(int narg, char **arg, int trysuffix) if (trysuffix && lmp->suffix_enable) { if (lmp->suffix) { - char estyle[256]; + int n = strlen(arg[2])+strlen(lmp->suffix)+2; + char *estyle = new char[n]; sprintf(estyle,"%s/%s",arg[2],lmp->suffix); if (compute_map->find(estyle) != compute_map->end()) { ComputeCreator compute_creator = (*compute_map)[estyle]; compute[ncompute] = compute_creator(lmp,narg,arg); - } + delete[] compute[ncompute]->style; + compute[ncompute]->style = estyle; + } else delete[] estyle; } if (compute[ncompute] == NULL && lmp->suffix2) { - char estyle[256]; + int n = strlen(arg[2])+strlen(lmp->suffix2)+2; + char *estyle = new char[n]; sprintf(estyle,"%s/%s",arg[2],lmp->suffix2); if (compute_map->find(estyle) != compute_map->end()) { ComputeCreator compute_creator = (*compute_map)[estyle]; compute[ncompute] = compute_creator(lmp,narg,arg); - } + delete[] compute[ncompute]->style; + compute[ncompute]->style = estyle; + } else delete[] estyle; } } diff --git a/src/modify.h b/src/modify.h index a1362241b6..3ded3cbab6 100644 --- a/src/modify.h +++ b/src/modify.h @@ -92,14 +92,14 @@ class Modify : protected Pointers { virtual int min_dof(); virtual int min_reset_ref(); - void add_fix(int, char **, int trysuffix=0); + void add_fix(int, char **, int trysuffix=1); void modify_fix(int, char **); void delete_fix(const char *); int find_fix(const char *); int find_fix_by_style(const char *); int check_package(const char *); - void add_compute(int, char **, int trysuffix=0); + void add_compute(int, char **, int trysuffix=1); void modify_compute(int, char **); void delete_compute(const char *); int find_compute(const char *); diff --git a/src/output.cpp b/src/output.cpp index 5e56ccfebc..ce7fcb7cca 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -49,18 +49,18 @@ Output::Output(LAMMPS *lmp) : Pointers(lmp) newarg[0] = (char *) "thermo_temp"; newarg[1] = (char *) "all"; newarg[2] = (char *) "temp"; - modify->add_compute(3,newarg,1); + modify->add_compute(3,newarg); newarg[0] = (char *) "thermo_press"; newarg[1] = (char *) "all"; newarg[2] = (char *) "pressure"; newarg[3] = (char *) "thermo_temp"; - modify->add_compute(4,newarg,1); + modify->add_compute(4,newarg); newarg[0] = (char *) "thermo_pe"; newarg[1] = (char *) "all"; newarg[2] = (char *) "pe"; - modify->add_compute(3,newarg,1); + modify->add_compute(3,newarg); delete [] newarg; -- GitLab From 5291f2ed6e8db047cb1195feb8e84afce2cd0d82 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 25 May 2017 10:11:24 -0400 Subject: [PATCH 201/593] fix bug in fix shear/history reported by kevin hanley. see #500 --- src/fix_shear_history.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fix_shear_history.cpp b/src/fix_shear_history.cpp index 21942d753f..17e78830f4 100644 --- a/src/fix_shear_history.cpp +++ b/src/fix_shear_history.cpp @@ -389,7 +389,7 @@ void FixShearHistory::pre_exchange_newton() maxtouch = 0; for (i = 0; i < nlocal_neigh; i++) maxtouch = MAX(maxtouch,npartner[i]); - comm->maxexchange_fix = MAX(comm->maxexchange_fix,4*maxtouch+1); + comm->maxexchange_fix = MAX(comm->maxexchange_fix,(dnum+1)*maxtouch+1); // zero npartner values from previous nlocal_neigh to current nlocal @@ -590,7 +590,7 @@ int FixShearHistory::pack_reverse_comm_size(int n, int first) last = first + n; for (i = first; i < last; i++) - m += 1 + 4*npartner[i]; + m += 1 + (dnum+1)*npartner[i]; return m; } -- GitLab From 0a2fe705114c3f7b54e74a4f2e84b128bbb97ebf Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 25 May 2017 16:31:31 -0400 Subject: [PATCH 202/593] remove redundant code from fix qeq/reax and qeq/reax/omp --- src/USER-OMP/fix_qeq_reax_omp.cpp | 292 ++++++++---------------------- src/USER-OMP/fix_qeq_reax_omp.h | 8 - src/USER-REAXC/fix_qeq_reax.cpp | 185 +++++++++---------- 3 files changed, 161 insertions(+), 324 deletions(-) diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp index 2603d649a3..3ca193be74 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.cpp +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -22,7 +22,6 @@ #include #include #include - #include "fix_qeq_reax_omp.h" #include "pair_reaxc_omp.h" #include "atom.h" @@ -56,38 +55,15 @@ using namespace FixConst; FixQEqReaxOMP::FixQEqReaxOMP(LAMMPS *lmp, int narg, char **arg) : FixQEqReax(lmp, narg, arg) { - if (narg < 8 || narg > 9) error->all(FLERR,"Illegal fix qeq/reax/omp command"); - - nevery = force->inumeric(FLERR,arg[3]); - swa = force->numeric(FLERR,arg[4]); - swb = force->numeric(FLERR,arg[5]); - tolerance = force->numeric(FLERR,arg[6]); - - // dual CG support - dual_enabled = 0; - if(narg == 9) - if(strcmp(arg[8],"dual") == 0) dual_enabled = 1; - else error->all(FLERR,"Unknown fix qeq/reax argument in location 9"); - - // perform initial allocation of atom-based arrays - // register with Atom class - - s_hist = t_hist = NULL; - grow_arrays(atom->nmax); - atom->add_callback(0); - for (int i = 0; i < atom->nmax; i++ ) - for (int j = 0; j < nprev; ++j ) - s_hist[i][j] = t_hist[i][j] = 0; - - reaxc = NULL; - reaxc = (PairReaxCOMP *) force->pair_match("reax/c/omp",1); + if (narg<8 || narg>9) error->all(FLERR,"Illegal fix qeq/reax/omp command"); b_temp = NULL; // ASPC: Kolafa, J. Comp. Chem., 25(3), 335 (2003) do_aspc = 0; aspc_order = 1; - aspc_order_max = nprev - 2; // Must be consistent with nprev to store history: nprev = aspc_order + 2 + // Must be consistent with nprev to store history: nprev = aspc_order + 2 + aspc_order_max = nprev - 2; aspc_omega = 0.0; aspc_b = NULL; } @@ -106,63 +82,13 @@ void FixQEqReaxOMP::post_constructor() /* ---------------------------------------------------------------------- */ -void FixQEqReaxOMP::pertype_parameters(char *arg) -{ - if (strcmp(arg,"reax/c") == 0) { - reaxflag = 1; - Pair *pair = force->pair_match("reax/c",0); - if (pair == NULL) error->all(FLERR,"No pair reax/c for fix qeq/reax/omp"); - int tmp; - chi = (double *) pair->extract("chi",tmp); - eta = (double *) pair->extract("eta",tmp); - gamma = (double *) pair->extract("gamma",tmp); - if (chi == NULL || eta == NULL || gamma == NULL) - error->all(FLERR, - "Fix qeq/reax/omp could not extract params from pair reax/c"); - return; - } - - int i,itype,ntypes; - double v1,v2,v3; - FILE *pf; - - reaxflag = 0; - ntypes = atom->ntypes; - - memory->create(chi,ntypes+1,"qeq/reax:chi"); - memory->create(eta,ntypes+1,"qeq/reax:eta"); - memory->create(gamma,ntypes+1,"qeq/reax:gamma"); - - if (comm->me == 0) { - if ((pf = fopen(arg,"r")) == NULL) - error->one(FLERR,"Fix qeq/reax/omp parameter file could not be found"); - - for (i = 1; i <= ntypes && !feof(pf); i++) { - fscanf(pf,"%d %lg %lg %lg",&itype,&v1,&v2,&v3); - if (itype < 1 || itype > ntypes) - error->one(FLERR,"Fix qeq/reax/omp invalid atom type in param file"); - chi[itype] = v1; - eta[itype] = v2; - gamma[itype] = v3; - } - if (i <= ntypes) error->one(FLERR,"Invalid param file for fix qeq/reax/omp"); - fclose(pf); - } - - MPI_Bcast(&chi[1],ntypes,MPI_DOUBLE,0,world); - MPI_Bcast(&eta[1],ntypes,MPI_DOUBLE,0,world); - MPI_Bcast(&gamma[1],ntypes,MPI_DOUBLE,0,world); -} - -/* ---------------------------------------------------------------------- */ - void FixQEqReaxOMP::allocate_storage() { FixQEqReax::allocate_storage(); // dual CG support int size = nmax; - if(dual_enabled) size*= 2; + if (dual_enabled) size*= 2; memory->create(b_temp, comm->nthreads, size, "qeq/reax/omp:b_temp"); } @@ -177,81 +103,12 @@ void FixQEqReaxOMP::deallocate_storage() /* ---------------------------------------------------------------------- */ -void FixQEqReaxOMP::allocate_matrix() -{ - int i,ii,inum,m; - int *ilist, *numneigh; - - int mincap; - double safezone; - - if( reaxflag ) { - mincap = reaxc->system->mincap; - safezone = reaxc->system->safezone; - } else { - mincap = MIN_CAP; - safezone = SAFE_ZONE; - } - - n = atom->nlocal; - n_cap = MAX( (int)(n * safezone), mincap ); - - // determine the total space for the H matrix - - if (reaxc) { - inum = reaxc->list->inum; - ilist = reaxc->list->ilist; - numneigh = reaxc->list->numneigh; - } else { - inum = list->inum; - ilist = list->ilist; - numneigh = list->numneigh; - } - - m = 0; - for (ii = 0; ii < inum; ii++ ) { - i = ilist[ii]; - m += numneigh[i]; - } - m_cap = MAX( (int)(m * safezone), mincap * MIN_NBRS ); - - H.n = n_cap; - H.m = m_cap; - memory->create(H.firstnbr,n_cap,"qeq:H.firstnbr"); - memory->create(H.numnbrs,n_cap,"qeq:H.numnbrs"); - memory->create(H.jlist,m_cap,"qeq:H.jlist"); - memory->create(H.val,m_cap,"qeq:H.val"); -} - -/* ---------------------------------------------------------------------- */ - void FixQEqReaxOMP::init() { - if (!atom->q_flag) error->all(FLERR,"Fix qeq/reax/omp requires atom attribute q"); - - ngroup = group->count(igroup); - if (ngroup == 0) error->all(FLERR,"Fix qeq/reax group has no atoms"); - - if (!force->pair_match("reax/c/omp",1)) - error->all(FLERR,"Must use pair_style reax/c/omp with fix qeq/reax/omp"); - - // need a half neighbor list w/ Newton off and ghost neighbors - // built whenever re-neighboring occurs - - int irequest = neighbor->request(this,instance_me); - neighbor->requests[irequest]->pair = 0; - neighbor->requests[irequest]->fix = 1; - neighbor->requests[irequest]->newton = 2; - neighbor->requests[irequest]->ghost = 1; - - init_shielding(); - init_taper(); - - if (strstr(update->integrate_style,"respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + FixQEqReax::init(); // APSC setup - if(do_aspc) { + if (do_aspc) { memory->create(aspc_b, aspc_order_max+2, "qeq/reax/aspc_b"); // Calculate damping factor @@ -267,7 +124,7 @@ void FixQEqReaxOMP::init() double s = -1.0; double f = 2.0; - for(int i=1; iall(FLERR,"Early Termination"); } } @@ -295,7 +148,7 @@ void FixQEqReaxOMP::compute_H() double **x = atom->x; int *mask = atom->mask; - if(reaxc) { + if (reaxc) { inum = reaxc->list->inum; ilist = reaxc->list->ilist; numneigh = reaxc->list->numneigh; @@ -337,7 +190,7 @@ void FixQEqReaxOMP::compute_H() #endif for (ii = 0; ii < inum; ii++) { i = ilist[ii]; - if(mask[i] & groupbit) { + if (mask[i] & groupbit) { jlist = firstneigh[i]; jnum = numneigh[i]; mfill = H.firstnbr[i]; @@ -363,7 +216,7 @@ void FixQEqReaxOMP::compute_H() } } - if( flag ) { + if (flag) { H.jlist[mfill] = j; H.val[mfill] = calculate_H( sqrt(r_sqr), shld[type[i]][type[j]] ); mfill++; @@ -377,7 +230,7 @@ void FixQEqReaxOMP::compute_H() if (mfill >= H.m) { char str[128]; sprintf(str,"H matrix size has been exceeded: mfill=%d H.m=%d\n", - mfill, H.m ); + mfill, H.m); error->warning(FLERR,str); error->all(FLERR,"Fix qeq/reax/omp has insufficient QEq matrix size"); } @@ -391,7 +244,7 @@ void FixQEqReaxOMP::init_storage() { int NN; - if(reaxc) NN = reaxc->list->inum + reaxc->list->gnum; + if (reaxc) NN = reaxc->list->inum + reaxc->list->gnum; else NN = list->inum + list->gnum; #if defined(_OPENMP) @@ -420,7 +273,7 @@ void FixQEqReaxOMP::pre_force(int vflag) double t_start, t_end; if (update->ntimestep % nevery) return; - if( comm->me == 0 ) t_start = MPI_Wtime(); + if (comm->me == 0) t_start = MPI_Wtime(); n = atom->nlocal; N = atom->nlocal + atom->nghost; @@ -428,8 +281,8 @@ void FixQEqReaxOMP::pre_force(int vflag) // grow arrays if necessary // need to be atom->nmax in length - if( atom->nmax > nmax ) reallocate_storage(); - if( n > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE ) + if (atom->nmax > nmax) reallocate_storage(); + if (n > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE) reallocate_matrix(); #ifdef OMP_TIMING @@ -444,9 +297,9 @@ void FixQEqReaxOMP::pre_force(int vflag) startTimeBase = endTimeBase; #endif - if(dual_enabled) matvecs = dual_CG(b_s, b_t, s, t); // OMP_TIMING inside dual_CG - else { - + if (dual_enabled) { + matvecs = dual_CG(b_s, b_t, s, t); // OMP_TIMING inside dual_CG + } else { matvecs_s = CG(b_s, s); // CG on s - parallel #ifdef OMP_TIMING @@ -467,9 +320,7 @@ void FixQEqReaxOMP::pre_force(int vflag) startTimeBase = endTimeBase; #endif - } // if(dual_enabled) - - // if(comm->me == 0) fprintf(stdout,"matvecs= %i %i\n",matvecs_s,matvecs_t); + } // if (dual_enabled) #ifdef OMP_TIMING startTimeBase = MPI_Wtime(); @@ -482,7 +333,7 @@ void FixQEqReaxOMP::pre_force(int vflag) ompTimingData[COMPUTECALCQINDEX] += (endTimeBase-startTimeBase); #endif - if( comm->me == 0 ) { + if (comm->me == 0) { t_end = MPI_Wtime(); qeq_time = t_end - t_start; } @@ -508,7 +359,7 @@ void FixQEqReaxOMP::init_matvec() int nn,i; int *ilist; - if(reaxc) { + if (reaxc) { nn = reaxc->list->inum; ilist = reaxc->list->ilist; } else { @@ -517,15 +368,15 @@ void FixQEqReaxOMP::init_matvec() } // Should really be more careful with initialization and first (aspc_order+2) MD steps - if(do_aspc) { + if (do_aspc) { double m_aspc_omega = 1.0 - aspc_omega; #if defined(_OPENMP) #pragma omp parallel for schedule(dynamic,50) private(i) #endif - for(int ii = 0; ii < nn; ++ii ) { + for (int ii = 0; ii < nn; ++ii) { i = ilist[ii]; - if(atom->mask[i] & groupbit) { + if (atom->mask[i] & groupbit) { /* init pre-conditioner for H and init solution vectors */ Hdia_inv[i] = 1. / eta[ atom->type[i] ]; @@ -535,7 +386,7 @@ void FixQEqReaxOMP::init_matvec() // Predictor Step double tp = 0.0; double sp = 0.0; - for(int j=0; jmask[i] & groupbit) { + if (atom->mask[i] & groupbit) { /* init pre-conditioner for H and init solution vectors */ Hdia_inv[i] = 1. / eta[ atom->type[i] ]; @@ -588,10 +439,10 @@ void FixQEqReaxOMP::init_matvec() /* ---------------------------------------------------------------------- */ -int FixQEqReaxOMP::CG( double *b, double *x ) +int FixQEqReaxOMP::CG( double *b, double *x) { - int i, ii, j, imax; - double tmp, alpha, beta, b_norm; + int i, ii, imax; + double alpha, beta, b_norm; double sig_old, sig_new; double my_buf[2], buf[2]; @@ -610,7 +461,7 @@ int FixQEqReaxOMP::CG( double *b, double *x ) pack_flag = 1; sparse_matvec( &H, x, q ); - comm->reverse_comm_fix( this ); //Coll_Vector( q ); + comm->reverse_comm_fix( this); //Coll_Vector( q ); double tmp1, tmp2; tmp1 = tmp2 = 0.0; @@ -618,7 +469,7 @@ int FixQEqReaxOMP::CG( double *b, double *x ) #if defined(_OPENMP) #pragma omp parallel for schedule(dynamic,50) private(i) reduction(+:tmp1,tmp2) #endif - for (jj = 0; jj < nn; ++jj ) { + for (jj = 0; jj < nn; ++jj) { i = ilist[jj]; if (atom->mask[i] & groupbit) { r[i] = b[i] - q[i]; @@ -637,7 +488,7 @@ int FixQEqReaxOMP::CG( double *b, double *x ) b_norm = sqrt(buf[0]); sig_new = buf[1]; - for (i = 1; i < imax && sqrt(sig_new) / b_norm > tolerance; ++i ) { + for (i = 1; i < imax && sqrt(sig_new) / b_norm > tolerance; ++i) { comm->forward_comm_fix(this); //Dist_vector( d ); sparse_matvec( &H, d, q ); comm->reverse_comm_fix(this); //Coll_vector( q ); @@ -653,7 +504,7 @@ int FixQEqReaxOMP::CG( double *b, double *x ) #endif for (jj = 0; jj < nn; jj++) { ii = ilist[jj]; - if(atom->mask[ii] & groupbit) tmp1 += d[ii] * q[ii]; + if (atom->mask[ii] & groupbit) tmp1 += d[ii] * q[ii]; } #if defined(_OPENMP) @@ -673,7 +524,7 @@ int FixQEqReaxOMP::CG( double *b, double *x ) #endif for (jj = 0; jj < nn; jj++) { ii = ilist[jj]; - if(atom->mask[ii] & groupbit) { + if (atom->mask[ii] & groupbit) { x[ii] += alpha * d[ii]; r[ii] -= alpha * q[ii]; @@ -696,7 +547,7 @@ int FixQEqReaxOMP::CG( double *b, double *x ) #endif for (jj = 0; jj < nn; jj++) { ii = ilist[jj]; - if(atom->mask[ii] & groupbit) d[ii] = p[ii] + beta * d[ii]; + if (atom->mask[ii] & groupbit) d[ii] = p[ii] + beta * d[ii]; } } @@ -712,7 +563,7 @@ int FixQEqReaxOMP::CG( double *b, double *x ) /* ---------------------------------------------------------------------- */ -void FixQEqReaxOMP::sparse_matvec( sparse_matrix *A, double *x, double *b ) +void FixQEqReaxOMP::sparse_matvec( sparse_matrix *A, double *x, double *b) { #if defined(_OPENMP) #pragma omp parallel default(shared) @@ -728,7 +579,7 @@ void FixQEqReaxOMP::sparse_matvec( sparse_matrix *A, double *x, double *b ) int tid = 0; #endif - if(reaxc) { + if (reaxc) { nn = reaxc->list->inum; NN = reaxc->list->inum + reaxc->list->gnum; ilist = reaxc->list->ilist; @@ -743,7 +594,7 @@ void FixQEqReaxOMP::sparse_matvec( sparse_matrix *A, double *x, double *b ) #endif for (ii = 0; ii < nn; ++ii) { i = ilist[ii]; - if(atom->mask[i] & groupbit) b[i] = eta[ atom->type[i] ] * x[i]; + if (atom->mask[i] & groupbit) b[i] = eta[ atom->type[i] ] * x[i]; } #if defined(_OPENMP) @@ -751,14 +602,14 @@ void FixQEqReaxOMP::sparse_matvec( sparse_matrix *A, double *x, double *b ) #endif for (ii = nn; ii < NN; ++ii) { i = ilist[ii]; - if(atom->mask[i] & groupbit) b[i] = 0; + if (atom->mask[i] & groupbit) b[i] = 0; } #if defined(_OPENMP) #pragma omp for schedule(dynamic,50) #endif for (i = 0; i < NN; ++i) - for(int t=0; tmask[i] & groupbit) { + if (atom->mask[i] & groupbit) { for (itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { j = A->jlist[itr_j]; b[i] += A->val[itr_j] * x[j]; @@ -811,9 +662,9 @@ void FixQEqReaxOMP::calculate_Q() #if defined(_OPENMP) #pragma omp parallel for schedule(dynamic,50) private(i) reduction(+:tmp1,tmp2) #endif - for(int ii = 0; ii < nn; ii++) { + for (int ii = 0; ii < nn; ii++) { i = ilist[ii]; - if(atom->mask[i] & groupbit) { + if (atom->mask[i] & groupbit) { tmp1 += s[i]; tmp2 += t[i]; } @@ -835,7 +686,7 @@ void FixQEqReaxOMP::calculate_Q() #endif for (int ii = 0; ii < nn; ++ii) { i = ilist[ii]; - if(atom->mask[i] & groupbit) { + if (atom->mask[i] & groupbit) { q[i] = s[i] - u * t[i]; // backup s & t @@ -849,13 +700,13 @@ void FixQEqReaxOMP::calculate_Q() } pack_flag = 4; - comm->forward_comm_fix( this ); //Dist_vector( atom->q ); + comm->forward_comm_fix( this); //Dist_vector( atom->q ); } /* ---------------------------------------------------------------------- */ void FixQEqReaxOMP::vector_sum( double* dest, double c, double* v, - double d, double* y, int k ) + double d, double* y, int k) { int i; int *ilist; @@ -868,13 +719,13 @@ void FixQEqReaxOMP::vector_sum( double* dest, double c, double* v, #endif for (int ii=0; iimask[i] & groupbit) dest[i] = c * v[i] + d * y[i]; + if (atom->mask[i] & groupbit) dest[i] = c * v[i] + d * y[i]; } } /* ---------------------------------------------------------------------- */ -void FixQEqReaxOMP::vector_add( double* dest, double c, double* v, int k ) +void FixQEqReaxOMP::vector_add( double* dest, double c, double* v, int k) { int i; int *ilist; @@ -887,7 +738,7 @@ void FixQEqReaxOMP::vector_add( double* dest, double c, double* v, int k ) #endif for (int ii=0; iimask[i] & groupbit) dest[i] += c * v[i]; + if (atom->mask[i] & groupbit) dest[i] += c * v[i]; } } @@ -897,7 +748,7 @@ void FixQEqReaxOMP::vector_add( double* dest, double c, double* v, int k ) /* dual CG support */ /* ---------------------------------------------------------------------- */ -int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) +int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2) { #ifdef OMP_TIMING @@ -905,8 +756,8 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) startTimeBase = MPI_Wtime(); #endif - int i, j, imax; - double tmp, alpha_s, alpha_t, beta_s, beta_t, b_norm_s, b_norm_t; + int i, imax; + double alpha_s, alpha_t, beta_s, beta_t, b_norm_s, b_norm_t; double sig_old_s, sig_old_t, sig_new_s, sig_new_t; double my_buf[4], buf[4]; @@ -925,7 +776,7 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) pack_flag = 5; // forward 2x d and reverse 2x q dual_sparse_matvec( &H, x1, x2, q ); - comm->reverse_comm_fix( this ); //Coll_Vector( q ); + comm->reverse_comm_fix( this); //Coll_Vector( q ); double tmp1, tmp2, tmp3, tmp4; tmp1 = tmp2 = tmp3 = tmp4 = 0.0; @@ -933,7 +784,7 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) #if defined(_OPENMP) #pragma omp parallel for schedule(dynamic,50) private(i) reduction(+:tmp1,tmp2,tmp3,tmp4) #endif - for (jj = 0; jj < nn; ++jj ) { + for (jj = 0; jj < nn; ++jj) { i = ilist[jj]; if (atom->mask[i] & groupbit) { int indxI = 2 * i; @@ -964,7 +815,7 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) sig_new_s = buf[2]; sig_new_t = buf[3]; - for (i = 1; i < imax; ++i ) { + for (i = 1; i < imax; ++i) { comm->forward_comm_fix(this); //Dist_vector( d ); dual_sparse_matvec( &H, d, q ); comm->reverse_comm_fix(this); //Coll_vector( q ); @@ -980,7 +831,7 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) #endif for (jj = 0; jj < nn; jj++) { ii = ilist[jj]; - if(atom->mask[ii] & groupbit) { + if (atom->mask[ii] & groupbit) { int indxI = 2 * ii; tmp1 += d[indxI ] * q[indxI ]; tmp2 += d[indxI+1] * q[indxI+1]; @@ -1009,7 +860,7 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) #endif for (jj = 0; jj < nn; jj++) { ii = ilist[jj]; - if(atom->mask[ii] & groupbit) { + if (atom->mask[ii] & groupbit) { int indxI = 2 * ii; x1[ii] += alpha_s * d[indxI ]; x2[ii] += alpha_t * d[indxI+1]; @@ -1038,7 +889,8 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) sig_new_s = buf[0]; sig_new_t = buf[1]; - if( sqrt(sig_new_s)/b_norm_s <= tolerance || sqrt(sig_new_t)/b_norm_t <= tolerance) break; + if (sqrt(sig_new_s)/b_norm_s <= tolerance + || sqrt(sig_new_t)/b_norm_t <= tolerance) break; beta_s = sig_new_s / sig_old_s; beta_t = sig_new_t / sig_old_t; @@ -1048,7 +900,7 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) #endif for (jj = 0; jj < nn; jj++) { ii = ilist[jj]; - if(atom->mask[ii] & groupbit) { + if (atom->mask[ii] & groupbit) { int indxI = 2 * ii; d[indxI ] = p[indxI ] + beta_s * d[indxI ]; @@ -1071,14 +923,14 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) #endif // If necessary, converge other system - if(sqrt(sig_new_s)/b_norm_s > tolerance) { + if (sqrt(sig_new_s)/b_norm_s > tolerance) { pack_flag = 2; comm->forward_comm_fix(this); // x1 => s i+= CG(b1, x1); matvecs_s = i; } - else if(sqrt(sig_new_t)/b_norm_t > tolerance) { + else if (sqrt(sig_new_t)/b_norm_t > tolerance) { pack_flag = 3; comm->forward_comm_fix(this); // x2 => t @@ -1107,7 +959,7 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2 ) /* ---------------------------------------------------------------------- */ -void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2, double *b ) +void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2, double *b) { #if defined(_OPENMP) #pragma omp parallel default(shared) @@ -1138,7 +990,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2 #if defined(_OPENMP) #pragma omp for schedule(dynamic,50) #endif - for (ii = 0; ii < nn; ++ii ) { + for (ii = 0; ii < nn; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) { indxI = 2 * i; @@ -1150,7 +1002,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2 #if defined(_OPENMP) #pragma omp for schedule(dynamic,50) #endif - for (ii = nn; ii < NN; ++ii ) { + for (ii = nn; ii < NN; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) { indxI = 2 * i; @@ -1164,7 +1016,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x1, double *x2 #endif for (i = 0; i < NN; ++i) { indxI = 2 * i; - for(int t=0; tmask[i] & groupbit) { indxI = 2 * i; @@ -1240,7 +1092,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x, double *b ) #if defined(_OPENMP) #pragma omp for schedule(dynamic,50) #endif - for (ii = 0; ii < nn; ++ii ) { + for (ii = 0; ii < nn; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) { indxI = 2 * i; @@ -1252,7 +1104,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x, double *b ) #if defined(_OPENMP) #pragma omp for schedule(dynamic,50) #endif - for (ii = nn; ii < NN; ++ii ) { + for (ii = nn; ii < NN; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) { indxI = 2 * i; @@ -1266,7 +1118,7 @@ void FixQEqReaxOMP::dual_sparse_matvec( sparse_matrix *A, double *x, double *b ) #endif for (i = 0; i < NN; ++i) { indxI = 2 * i; - for(int t=0; tmask[i] & groupbit) { indxI = 2 * i; diff --git a/src/USER-OMP/fix_qeq_reax_omp.h b/src/USER-OMP/fix_qeq_reax_omp.h index 6d8719857d..078ba3b9af 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.h +++ b/src/USER-OMP/fix_qeq_reax_omp.h @@ -47,17 +47,13 @@ class FixQEqReaxOMP : public FixQEqReax { protected: double **b_temp; - class PairReaxCOMP *reaxc; - int do_aspc; int aspc_order, aspc_order_max; double aspc_omega; double * aspc_b; - virtual void pertype_parameters(char*); virtual void allocate_storage(); virtual void deallocate_storage(); - virtual void allocate_matrix(); virtual void init_matvec(); virtual void compute_H(); @@ -65,10 +61,6 @@ class FixQEqReaxOMP : public FixQEqReax { virtual void sparse_matvec(sparse_matrix*,double*,double*); virtual void calculate_Q(); - /* virtual double parallel_norm( double*, int ); */ - /* virtual double parallel_dot( double*, double*, int ); */ - /* virtual double parallel_vector_acc( double*, int ); */ - virtual void vector_sum(double*,double,double*,double,double*,int); virtual void vector_add(double*, double, double*,int); diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index 5f171c8768..cf2e6612a2 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -68,7 +68,7 @@ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) : { if (lmp->citeme) lmp->citeme->add(cite_fix_qeq_reax); - if (narg < 8 || narg > 9) error->all(FLERR,"Illegal fix qeq/reax command"); + if (narg<8 || narg>9) error->all(FLERR,"Illegal fix qeq/reax command"); nevery = force->inumeric(FLERR,arg[3]); if (nevery <= 0) error->all(FLERR,"Illegal fix qeq/reax command"); @@ -81,8 +81,12 @@ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) : strcpy(pertype_option,arg[7]); // dual CG support only available for USER-OMP variant + // check for compatibility is in Fix::post_constructor() dual_enabled = 0; - + if (narg == 9) { + if (strcmp(arg[8],"dual") == 0) dual_enabled = 1; + else error->all(FLERR,"Illegal fix qeq/reax command"); + } shld = NULL; n = n_cap = 0; @@ -111,26 +115,25 @@ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) : H.jlist = NULL; H.val = NULL; - comm_forward = comm_reverse = 1; + // dual CG support + // Update comm sizes for this fix + if (dual_enabled) comm_forward = comm_reverse = 2; + else comm_forward = comm_reverse = 1; // perform initial allocation of atom-based arrays // register with Atom class reaxc = NULL; - reaxc = (PairReaxC *) force->pair_match("reax/c",1); + reaxc = (PairReaxC *) force->pair_match("reax/c",0); if (reaxc) { s_hist = t_hist = NULL; grow_arrays(atom->nmax); atom->add_callback(0); - for( int i = 0; i < atom->nmax; i++ ) - for (int j = 0; j < nprev; ++j ) + for (int i = 0; i < atom->nmax; i++) + for (int j = 0; j < nprev; ++j) s_hist[i][j] = t_hist[i][j] = 0; } - - // dual CG support - // Update comm sizes for this fix - if (dual_enabled) comm_forward = comm_reverse = 2; } /* ---------------------------------------------------------------------- */ @@ -165,6 +168,8 @@ FixQEqReax::~FixQEqReax() void FixQEqReax::post_constructor() { pertype_parameters(pertype_option); + if (dual_enabled) + error->all(FLERR,"Dual keyword only supported with fix qeq/reax/omp"); } /* ---------------------------------------------------------------------- */ @@ -184,11 +189,9 @@ void FixQEqReax::pertype_parameters(char *arg) { if (strcmp(arg,"reax/c") == 0) { reaxflag = 1; - Pair *pair = force->pair_match("reax/c",1); - if (pair == NULL) - pair = force->pair_match("reax/c/kk",1); - + Pair *pair = force->pair_match("reax/c",0); if (pair == NULL) error->all(FLERR,"No pair reax/c for fix qeq/reax"); + int tmp; chi = (double *) pair->extract("chi",tmp); eta = (double *) pair->extract("eta",tmp); @@ -199,10 +202,6 @@ void FixQEqReax::pertype_parameters(char *arg) return; } - // OMP style will use it's own pertype_parameters() - Pair * pair = force->pair_match("reax/c/omp",1); - if (pair) return; - int i,itype,ntypes; double v1,v2,v3; FILE *pf; @@ -298,7 +297,7 @@ void FixQEqReax::allocate_matrix() int mincap; double safezone; - if( reaxflag ) { + if (reaxflag) { mincap = reaxc->system->mincap; safezone = reaxc->system->safezone; } else { @@ -307,7 +306,7 @@ void FixQEqReax::allocate_matrix() } n = atom->nlocal; - n_cap = MAX( (int)(n * safezone), mincap ); + n_cap = MAX( (int)(n * safezone), mincap); // determine the total space for the H matrix @@ -322,11 +321,11 @@ void FixQEqReax::allocate_matrix() } m = 0; - for( ii = 0; ii < inum; ii++ ) { + for (ii = 0; ii < inum; ii++) { i = ilist[ii]; m += numneigh[i]; } - m_cap = MAX( (int)(m * safezone), mincap * MIN_NBRS ); + m_cap = MAX( (int)(m * safezone), mincap * MIN_NBRS); H.n = n_cap; H.m = m_cap; @@ -358,18 +357,12 @@ void FixQEqReax::reallocate_matrix() void FixQEqReax::init() { - if (!atom->q_flag) error->all(FLERR,"Fix qeq/reax requires atom attribute q"); + if (!atom->q_flag) + error->all(FLERR,"Fix qeq/reax requires atom attribute q"); ngroup = group->count(igroup); if (ngroup == 0) error->all(FLERR,"Fix qeq/reax group has no atoms"); - /* - if (reaxc) - if (ngroup != reaxc->ngroup) - error->all(FLERR,"Fix qeq/reax group and pair reax/c have " - "different numbers of atoms"); - */ - // need a half neighbor list w/ Newton off and ghost neighbors // built whenever re-neighboring occurs @@ -404,9 +397,9 @@ void FixQEqReax::init_shielding() if (shld == NULL) memory->create(shld,ntypes+1,ntypes+1,"qeq:shielding"); - for( i = 1; i <= ntypes; ++i ) - for( j = 1; j <= ntypes; ++j ) - shld[i][j] = pow( gamma[i] * gamma[j], -1.5 ); + for (i = 1; i <= ntypes; ++i) + for (j = 1; j <= ntypes; ++j) + shld[i][j] = pow( gamma[i] * gamma[j], -1.5); } /* ---------------------------------------------------------------------- */ @@ -422,21 +415,21 @@ void FixQEqReax::init_taper() else if (swb < 5 && comm->me == 0) error->warning(FLERR,"Fix qeq/reax has very low Taper radius cutoff"); - d7 = pow( swb - swa, 7 ); - swa2 = SQR( swa ); - swa3 = CUBE( swa ); - swb2 = SQR( swb ); - swb3 = CUBE( swb ); + d7 = pow( swb - swa, 7); + swa2 = SQR( swa); + swa3 = CUBE( swa); + swb2 = SQR( swb); + swb3 = CUBE( swb); Tap[7] = 20.0 / d7; Tap[6] = -70.0 * (swa + swb) / d7; Tap[5] = 84.0 * (swa2 + 3.0*swa*swb + swb2) / d7; - Tap[4] = -35.0 * (swa3 + 9.0*swa2*swb + 9.0*swa*swb2 + swb3 ) / d7; - Tap[3] = 140.0 * (swa3*swb + 3.0*swa2*swb2 + swa*swb3 ) / d7; + Tap[4] = -35.0 * (swa3 + 9.0*swa2*swb + 9.0*swa*swb2 + swb3) / d7; + Tap[3] = 140.0 * (swa3*swb + 3.0*swa2*swb2 + swa*swb3) / d7; Tap[2] =-210.0 * (swa3*swb2 + swa2*swb3) / d7; Tap[1] = 140.0 * swa3 * swb3 / d7; Tap[0] = (-35.0*swa3*swb2*swb2 + 21.0*swa2*swb3*swb2 + - 7.0*swa*swb3*swb3 + swb3*swb3*swb ) / d7; + 7.0*swa*swb3*swb3 + swb3*swb3*swb) / d7; } /* ---------------------------------------------------------------------- */ @@ -480,7 +473,7 @@ void FixQEqReax::init_storage() else NN = list->inum + list->gnum; - for( int i = 0; i < NN; i++ ) { + for (int i = 0; i < NN; i++) { Hdia_inv[i] = 1. / eta[atom->type[i]]; b_s[i] = -chi[atom->type[i]]; b_t[i] = -1.0; @@ -497,7 +490,7 @@ void FixQEqReax::pre_force(int vflag) double t_start, t_end; if (update->ntimestep % nevery) return; - if( comm->me == 0 ) t_start = MPI_Wtime(); + if (comm->me == 0) t_start = MPI_Wtime(); n = atom->nlocal; N = atom->nlocal + atom->nghost; @@ -505,8 +498,8 @@ void FixQEqReax::pre_force(int vflag) // grow arrays if necessary // need to be atom->nmax in length - if( atom->nmax > nmax ) reallocate_storage(); - if( n > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE ) + if (atom->nmax > nmax) reallocate_storage(); + if (n > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE) reallocate_matrix(); init_matvec(); @@ -555,7 +548,7 @@ void FixQEqReax::init_matvec() ilist = list->ilist; } - for( ii = 0; ii < nn; ++ii ) { + for (ii = 0; ii < nn; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) { @@ -570,7 +563,7 @@ void FixQEqReax::init_matvec() /* quadratic extrapolation for s & t from previous solutions */ //s[i] = s_hist[i][2] + 3 * ( s_hist[i][0] - s_hist[i][1] ); - t[i] = t_hist[i][2] + 3 * ( t_hist[i][0] - t_hist[i][1] ); + t[i] = t_hist[i][2] + 3 * ( t_hist[i][0] - t_hist[i][1]); /* cubic extrapolation for s & t from previous solutions */ s[i] = 4*(s_hist[i][0]+s_hist[i][2])-(6*s_hist[i][1]+s_hist[i][3]); @@ -590,12 +583,12 @@ void FixQEqReax::compute_H() { int inum, jnum, *ilist, *jlist, *numneigh, **firstneigh; int i, j, ii, jj, flag; - double **x, SMALL = 0.0001; double dx, dy, dz, r_sqr; + const double SMALL = 0.0001; int *type = atom->type; tagint *tag = atom->tag; - x = atom->x; + double **x = atom->x; int *mask = atom->mask; if (reaxc) { @@ -613,14 +606,14 @@ void FixQEqReax::compute_H() // fill in the H matrix m_fill = 0; r_sqr = 0; - for( ii = 0; ii < inum; ii++ ) { + for (ii = 0; ii < inum; ii++) { i = ilist[ii]; if (mask[i] & groupbit) { jlist = firstneigh[i]; jnum = numneigh[i]; H.firstnbr[i] = m_fill; - for( jj = 0; jj < jnum; jj++ ) { + for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; dx = x[j][0] - x[i][0]; @@ -642,9 +635,9 @@ void FixQEqReax::compute_H() } } - if( flag ) { + if (flag) { H.jlist[m_fill] = j; - H.val[m_fill] = calculate_H( sqrt(r_sqr), shld[type[i]][type[j]] ); + H.val[m_fill] = calculate_H( sqrt(r_sqr), shld[type[i]][type[j]]); m_fill++; } } @@ -655,7 +648,7 @@ void FixQEqReax::compute_H() if (m_fill >= H.m) { char str[128]; sprintf(str,"H matrix size has been exceeded: m_fill=%d H.m=%d\n", - m_fill, H.m ); + m_fill, H.m); error->warning(FLERR,str); error->all(FLERR,"Fix qeq/reax has insufficient QEq matrix size"); } @@ -663,7 +656,7 @@ void FixQEqReax::compute_H() /* ---------------------------------------------------------------------- */ -double FixQEqReax::calculate_H( double r, double gamma ) +double FixQEqReax::calculate_H( double r, double gamma) { double Taper, denom; @@ -683,7 +676,7 @@ double FixQEqReax::calculate_H( double r, double gamma ) /* ---------------------------------------------------------------------- */ -int FixQEqReax::CG( double *b, double *x ) +int FixQEqReax::CG( double *b, double *x) { int i, j, imax; double tmp, alpha, beta, b_norm; @@ -702,21 +695,21 @@ int FixQEqReax::CG( double *b, double *x ) imax = 200; pack_flag = 1; - sparse_matvec( &H, x, q ); - comm->reverse_comm_fix( this ); //Coll_Vector( q ); + sparse_matvec( &H, x, q); + comm->reverse_comm_fix(this); //Coll_Vector( q ); - vector_sum( r , 1., b, -1., q, nn ); + vector_sum( r , 1., b, -1., q, nn); - for( jj = 0; jj < nn; ++jj ) { + for (jj = 0; jj < nn; ++jj) { j = ilist[jj]; if (atom->mask[j] & groupbit) d[j] = r[j] * Hdia_inv[j]; //pre-condition } - b_norm = parallel_norm( b, nn ); + b_norm = parallel_norm( b, nn); sig_new = parallel_dot( r, d, nn); - for( i = 1; i < imax && sqrt(sig_new) / b_norm > tolerance; ++i ) { + for (i = 1; i < imax && sqrt(sig_new) / b_norm > tolerance; ++i) { comm->forward_comm_fix(this); //Dist_vector( d ); sparse_matvec( &H, d, q ); comm->reverse_comm_fix(this); //Coll_vector( q ); @@ -728,7 +721,7 @@ int FixQEqReax::CG( double *b, double *x ) vector_add( r, -alpha, q, nn ); // pre-conditioning - for( jj = 0; jj < nn; ++jj ) { + for (jj = 0; jj < nn; ++jj) { j = ilist[jj]; if (atom->mask[j] & groupbit) p[j] = r[j] * Hdia_inv[j]; @@ -754,7 +747,7 @@ int FixQEqReax::CG( double *b, double *x ) /* ---------------------------------------------------------------------- */ -void FixQEqReax::sparse_matvec( sparse_matrix *A, double *x, double *b ) +void FixQEqReax::sparse_matvec( sparse_matrix *A, double *x, double *b) { int i, j, itr_j; int nn, NN, ii; @@ -770,22 +763,22 @@ void FixQEqReax::sparse_matvec( sparse_matrix *A, double *x, double *b ) ilist = list->ilist; } - for( ii = 0; ii < nn; ++ii ) { + for (ii = 0; ii < nn; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) b[i] = eta[ atom->type[i] ] * x[i]; } - for( ii = nn; ii < NN; ++ii ) { + for (ii = nn; ii < NN; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) b[i] = 0; } - for( ii = 0; ii < nn; ++ii ) { + for (ii = 0; ii < nn; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) { - for( itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { + for (itr_j=A->firstnbr[i]; itr_jfirstnbr[i]+A->numnbrs[i]; itr_j++) { j = A->jlist[itr_j]; b[i] += A->val[itr_j] * x[j]; b[j] += A->val[itr_j] * x[i]; @@ -814,17 +807,17 @@ void FixQEqReax::calculate_Q() ilist = list->ilist; } - s_sum = parallel_vector_acc( s, nn ); + s_sum = parallel_vector_acc( s, nn); t_sum = parallel_vector_acc( t, nn); u = s_sum / t_sum; - for( ii = 0; ii < nn; ++ii ) { + for (ii = 0; ii < nn; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) { q[i] = s[i] - u * t[i]; /* backup s & t */ - for( k = 4; k > 0; --k ) { + for (k = 4; k > 0; --k) { s_hist[i][k] = s_hist[i][k-1]; t_hist[i][k] = t_hist[i][k-1]; } @@ -834,7 +827,7 @@ void FixQEqReax::calculate_Q() } pack_flag = 4; - comm->forward_comm_fix( this ); //Dist_vector( atom->q ); + comm->forward_comm_fix(this); //Dist_vector( atom->q ); } /* ---------------------------------------------------------------------- */ @@ -844,15 +837,15 @@ int FixQEqReax::pack_forward_comm(int n, int *list, double *buf, { int m; - if( pack_flag == 1) + if (pack_flag == 1) for(m = 0; m < n; m++) buf[m] = d[list[m]]; - else if( pack_flag == 2 ) + else if (pack_flag == 2) for(m = 0; m < n; m++) buf[m] = s[list[m]]; - else if( pack_flag == 3 ) + else if (pack_flag == 3) for(m = 0; m < n; m++) buf[m] = t[list[m]]; - else if( pack_flag == 4 ) + else if (pack_flag == 4) for(m = 0; m < n; m++) buf[m] = atom->q[list[m]]; - else if( pack_flag == 5) { + else if (pack_flag == 5) { m = 0; for(int i = 0; i < n; i++) { int j = 2 * list[i]; @@ -870,15 +863,15 @@ void FixQEqReax::unpack_forward_comm(int n, int first, double *buf) { int i, m; - if( pack_flag == 1) + if (pack_flag == 1) for(m = 0, i = first; m < n; m++, i++) d[i] = buf[m]; - else if( pack_flag == 2) + else if (pack_flag == 2) for(m = 0, i = first; m < n; m++, i++) s[i] = buf[m]; - else if( pack_flag == 3) + else if (pack_flag == 3) for(m = 0, i = first; m < n; m++, i++) t[i] = buf[m]; - else if( pack_flag == 4) + else if (pack_flag == 4) for(m = 0, i = first; m < n; m++, i++) atom->q[i] = buf[m]; - else if( pack_flag == 5) { + else if (pack_flag == 5) { int last = first + n; m = 0; for(i = first; i < last; i++) { @@ -991,7 +984,7 @@ int FixQEqReax::unpack_exchange(int nlocal, double *buf) /* ---------------------------------------------------------------------- */ -double FixQEqReax::parallel_norm( double *v, int n ) +double FixQEqReax::parallel_norm( double *v, int n) { int i; double my_sum, norm_sqr; @@ -1006,15 +999,15 @@ double FixQEqReax::parallel_norm( double *v, int n ) my_sum = 0.0; norm_sqr = 0.0; - for( ii = 0; ii < n; ++ii ) { + for (ii = 0; ii < n; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) - my_sum += SQR( v[i] ); + my_sum += SQR( v[i]); } - MPI_Allreduce( &my_sum, &norm_sqr, 1, MPI_DOUBLE, MPI_SUM, world ); + MPI_Allreduce( &my_sum, &norm_sqr, 1, MPI_DOUBLE, MPI_SUM, world); - return sqrt( norm_sqr ); + return sqrt( norm_sqr); } /* ---------------------------------------------------------------------- */ @@ -1034,20 +1027,20 @@ double FixQEqReax::parallel_dot( double *v1, double *v2, int n) my_dot = 0.0; res = 0.0; - for( ii = 0; ii < n; ++ii ) { + for (ii = 0; ii < n; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) my_dot += v1[i] * v2[i]; } - MPI_Allreduce( &my_dot, &res, 1, MPI_DOUBLE, MPI_SUM, world ); + MPI_Allreduce( &my_dot, &res, 1, MPI_DOUBLE, MPI_SUM, world); return res; } /* ---------------------------------------------------------------------- */ -double FixQEqReax::parallel_vector_acc( double *v, int n ) +double FixQEqReax::parallel_vector_acc( double *v, int n) { int i; double my_acc, res; @@ -1062,13 +1055,13 @@ double FixQEqReax::parallel_vector_acc( double *v, int n ) my_acc = 0.0; res = 0.0; - for( ii = 0; ii < n; ++ii ) { + for (ii = 0; ii < n; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) my_acc += v[i]; } - MPI_Allreduce( &my_acc, &res, 1, MPI_DOUBLE, MPI_SUM, world ); + MPI_Allreduce( &my_acc, &res, 1, MPI_DOUBLE, MPI_SUM, world); return res; } @@ -1076,7 +1069,7 @@ double FixQEqReax::parallel_vector_acc( double *v, int n ) /* ---------------------------------------------------------------------- */ void FixQEqReax::vector_sum( double* dest, double c, double* v, - double d, double* y, int k ) + double d, double* y, int k) { int kk; int *ilist; @@ -1086,7 +1079,7 @@ void FixQEqReax::vector_sum( double* dest, double c, double* v, else ilist = list->ilist; - for( --k; k>=0; --k ) { + for (--k; k>=0; --k) { kk = ilist[k]; if (atom->mask[kk] & groupbit) dest[kk] = c * v[kk] + d * y[kk]; @@ -1095,7 +1088,7 @@ void FixQEqReax::vector_sum( double* dest, double c, double* v, /* ---------------------------------------------------------------------- */ -void FixQEqReax::vector_add( double* dest, double c, double* v, int k ) +void FixQEqReax::vector_add( double* dest, double c, double* v, int k) { int kk; int *ilist; @@ -1105,7 +1098,7 @@ void FixQEqReax::vector_add( double* dest, double c, double* v, int k ) else ilist = list->ilist; - for( --k; k>=0; --k ) { + for (--k; k>=0; --k) { kk = ilist[k]; if (atom->mask[kk] & groupbit) dest[kk] += c * v[kk]; -- GitLab From c3f6e27bfe2e6c916f17f04da722cb0292e54121 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 25 May 2017 17:00:19 -0400 Subject: [PATCH 203/593] augment documentation for newly added multi-threaded reax/c styles --- doc/src/Section_commands.txt | 4 ++-- doc/src/fix_qeq_reax.txt | 10 ++++++++-- doc/src/pair_reaxc.txt | 1 + src/USER-OMP/pair_reaxc_omp.cpp | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index dc7ddebe58..4ed202ae2f 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -717,7 +717,7 @@ package"_Section_start.html#start_3. "phonon"_fix_phonon.html, "pimd"_fix_pimd.html, "qbmsst"_fix_qbmsst.html, -"qeq/reax"_fix_qeq_reax.html, +"qeq/reax (ko)"_fix_qeq_reax.html, "qmmm"_fix_qmmm.html, "qtb"_fix_qtb.html, "reax/c/bonds"_fix_reax_bonds.html, @@ -1057,7 +1057,7 @@ package"_Section_start.html#start_3. "oxdna2/excv"_pair_oxdna2.html, "oxdna2/stk"_pair_oxdna2.html, "quip"_pair_quip.html, -"reax/c (k)"_pair_reaxc.html, +"reax/c (ko)"_pair_reaxc.html, "smd/hertz"_pair_smd_hertz.html, "smd/tlsph"_pair_smd_tlsph.html, "smd/triangulated/surface"_pair_smd_triangulated_surface.html, diff --git a/doc/src/fix_qeq_reax.txt b/doc/src/fix_qeq_reax.txt index aed043f6c0..a1a19b7368 100644 --- a/doc/src/fix_qeq_reax.txt +++ b/doc/src/fix_qeq_reax.txt @@ -8,17 +8,19 @@ fix qeq/reax command :h3 fix qeq/reax/kk command :h3 +fix qeq/reax/omp command :h3 [Syntax:] -fix ID group-ID qeq/reax Nevery cutlo cuthi tolerance params :pre +fix ID group-ID qeq/reax Nevery cutlo cuthi tolerance params args :pre ID, group-ID are documented in "fix"_fix.html command qeq/reax = style name of this fix command Nevery = perform QEq every this many steps cutlo,cuthi = lo and hi cutoff for Taper radius tolerance = precision to which charges will be equilibrated -params = reax/c or a filename :ul +params = reax/c or a filename +args = {dual} (optional) :ul [Examples:] @@ -59,6 +61,10 @@ potential file, except that eta is defined here as twice the eta value in the ReaxFF file. Note that unlike the rest of LAMMPS, the units of this fix are hard-coded to be A, eV, and electronic charge. +The optional {dual} keyword allows to perform the optimization +of the S and T matrices in parallel. This is only supported for +the {qeq/reax/omp} style. Otherwise they are processed separately. + [Restart, fix_modify, output, run start/stop, minimize info:] No information about this fix is written to "binary restart diff --git a/doc/src/pair_reaxc.txt b/doc/src/pair_reaxc.txt index 76a8e6fd5c..cfa88673d7 100644 --- a/doc/src/pair_reaxc.txt +++ b/doc/src/pair_reaxc.txt @@ -8,6 +8,7 @@ pair_style reax/c command :h3 pair_style reax/c/kk command :h3 +pair_style reax/c/omp command :h3 [Syntax:] diff --git a/src/USER-OMP/pair_reaxc_omp.cpp b/src/USER-OMP/pair_reaxc_omp.cpp index e716188949..9dd968f0db 100644 --- a/src/USER-OMP/pair_reaxc_omp.cpp +++ b/src/USER-OMP/pair_reaxc_omp.cpp @@ -281,7 +281,7 @@ void PairReaxCOMP::compute(int eflag, int vflag) for (i = 0; i < system->N; i ++) for (j = 0; j < MAXSPECBOND; j ++) { tmpbo[i][j] = 0.0; - tmpid[i][j] = 0; + tmpid[i][j] = 0; } FindBond(); -- GitLab From f1ec6dc41aa4956ecf0f2aedb5f7749bb86e9b73 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 25 May 2017 18:55:07 -0400 Subject: [PATCH 204/593] dead code removal and reformatting --- src/USER-OMP/reaxc_bond_orders_omp.cpp | 4 +- src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp | 1 - src/USER-OMP/reaxc_init_md_omp.cpp | 1 - src/USER-OMP/reaxc_torsion_angles_omp.cpp | 7 +- src/USER-OMP/reaxc_valence_angles_omp.cpp | 774 +++++++++++----------- 5 files changed, 387 insertions(+), 400 deletions(-) diff --git a/src/USER-OMP/reaxc_bond_orders_omp.cpp b/src/USER-OMP/reaxc_bond_orders_omp.cpp index 1000954f6e..222c00980e 100644 --- a/src/USER-OMP/reaxc_bond_orders_omp.cpp +++ b/src/USER-OMP/reaxc_bond_orders_omp.cpp @@ -36,10 +36,8 @@ using namespace LAMMPS_NS; -/* ---------------------------------------------------------------------- */ - void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj, - storage *workspace, reax_list **lists ) { + storage *workspace, reax_list **lists ) { reax_list *bonds = (*lists) + BONDS; bond_data *nbr_j, *nbr_k; bond_order_data *bo_ij, *bo_ji; diff --git a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp index 8b3be84dc4..c446151150 100644 --- a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp @@ -51,7 +51,6 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control, #endif const int nthreads = control->nthreads; - long totalReductionSize = system->N; #if defined(_OPENMP) #pragma omp parallel default(shared) //default(none) diff --git a/src/USER-OMP/reaxc_init_md_omp.cpp b/src/USER-OMP/reaxc_init_md_omp.cpp index 3ccd2fff64..6cce08a041 100644 --- a/src/USER-OMP/reaxc_init_md_omp.cpp +++ b/src/USER-OMP/reaxc_init_md_omp.cpp @@ -53,7 +53,6 @@ int Init_ListsOMP( reax_system *system, control_params *control, int *hb_top, *bond_top; MPI_Comm comm; - int TWICE = 2; int mincap = system->mincap; double safezone = system->safezone; double saferzone = system->saferzone; diff --git a/src/USER-OMP/reaxc_torsion_angles_omp.cpp b/src/USER-OMP/reaxc_torsion_angles_omp.cpp index a7b98f16b1..7a7e42ea30 100644 --- a/src/USER-OMP/reaxc_torsion_angles_omp.cpp +++ b/src/USER-OMP/reaxc_torsion_angles_omp.cpp @@ -73,7 +73,7 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, { int i, j, k, l, pi, pj, pk, pl, pij, plk; int type_i, type_j, type_k, type_l; - int start_j, end_j, start_k, end_k; + int start_j, end_j; int start_pj, end_pj, start_pk, end_pk; int num_frb_intrs = 0; @@ -108,7 +108,7 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, // Virial tallying variables double delil[3], deljl[3], delkl[3]; - double eng_tmp, f_scaler, fi_tmp[3], fj_tmp[3], fk_tmp[3]; + double eng_tmp, fi_tmp[3], fj_tmp[3], fk_tmp[3]; #if defined(_OPENMP) int tid = omp_get_thread_num(); @@ -116,7 +116,6 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, int tid = 0; #endif long reductionOffset = (system->N * tid); - int num_thb_intrs = 0; class PairReaxCOMP *pair_reax_ptr; pair_reax_ptr = static_cast(system->pair_ptr); class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); @@ -156,8 +155,6 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, trying to form a 4-body interaction out of this neighborhood */ if (system->my_atoms[j].orig_id < system->my_atoms[k].orig_id && bo_jk->BO > control->thb_cut/*0*/ && Num_Entries(pk, thb_intrs)) { - start_k = Start_Index(k, bonds); - end_k = End_Index(k, bonds); pj = pbond_jk->sym_index; // pj points to j on k's list /* do the same check as above: diff --git a/src/USER-OMP/reaxc_valence_angles_omp.cpp b/src/USER-OMP/reaxc_valence_angles_omp.cpp index 4ea1953fcf..869a325d6e 100644 --- a/src/USER-OMP/reaxc_valence_angles_omp.cpp +++ b/src/USER-OMP/reaxc_valence_angles_omp.cpp @@ -47,7 +47,6 @@ void Calculate_dCos_ThetaOMP( rvec dvec_ji, double d_ji, rvec dvec_jk, double d_ rvec* dcos_theta_dj, rvec* dcos_theta_dk ) { - int t; double sqr_d_ji = SQR(d_ji); double sqr_d_jk = SQR(d_jk); double inv_dists = 1.0 / (d_ji * d_jk); @@ -98,8 +97,8 @@ void Calculate_dCos_ThetaOMP( rvec dvec_ji, double d_ji, rvec dvec_jk, double d_ /* this is a 3-body interaction in which the main role is played by j which sits in the middle of the other two. */ void Valence_AnglesOMP( reax_system *system, control_params *control, - simulation_data *data, storage *workspace, - reax_list **lists, output_controls *out_control ) + simulation_data *data, storage *workspace, + reax_list **lists, output_controls *out_control ) { #ifdef OMP_TIMING @@ -122,411 +121,406 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, double total_Epen = 0; double total_Ecoa = 0; - int per_atom = (thb_intrs->num_intrs / system->N); int nthreads = control->nthreads; - int chunksize = system->N/(nthreads*10); int num_thb_intrs = 0; int TWICE = 2; #pragma omp parallel default(shared) reduction(+:total_Eang, total_Epen, total_Ecoa, num_thb_intrs) - { - int i, j, pi, k, pk, t; - int type_i, type_j, type_k; - int start_j, end_j, start_pk, end_pk; - int cnt, my_offset, mark; - - double temp, temp_bo_jt, pBOjt7; - double p_val1, p_val2, p_val3, p_val4, p_val5, p_val7; - double p_pen1, p_pen2, p_pen3, p_pen4; - double p_coa1, p_coa2, p_coa3, p_coa4; - double trm8, expval6, expval7, expval2theta, expval12theta, exp3ij, exp3jk; - double exp_pen2ij, exp_pen2jk, exp_pen3, exp_pen4, trm_pen34, exp_coa2; - double dSBO1, dSBO2, SBO, SBO2, CSBO2, SBOp, prod_SBO, vlpadj; - double CEval1, CEval2, CEval3, CEval4, CEval5, CEval6, CEval7, CEval8; - double CEpen1, CEpen2, CEpen3; - double e_ang, e_coa, e_pen; - double CEcoa1, CEcoa2, CEcoa3, CEcoa4, CEcoa5; - double Cf7ij, Cf7jk, Cf8j, Cf9j; - double f7_ij, f7_jk, f8_Dj, f9_Dj; - double Ctheta_0, theta_0, theta_00, theta, cos_theta, sin_theta; - double r_ij, r_jk; - double BOA_ij, BOA_jk; - rvec force, ext_press; - // rtensor temp_rtensor, total_rtensor; - - // Tallying variables - double eng_tmp, f_scaler, fi_tmp[3], fj_tmp[3], fk_tmp[3]; - double delij[3], delkj[3]; - - three_body_header *thbh; - three_body_parameters *thbp; - three_body_interaction_data *p_ijk, *p_kji; - bond_data *pbond_ij, *pbond_jk, *pbond_jt; - bond_order_data *bo_ij, *bo_jk, *bo_jt; + { + int i, j, pi, k, pk, t; + int type_i, type_j, type_k; + int start_j, end_j, start_pk, end_pk; + int cnt, my_offset; + + double temp, temp_bo_jt, pBOjt7; + double p_val1, p_val2, p_val3, p_val4, p_val5, p_val7; + double p_pen1, p_pen2, p_pen3, p_pen4; + double p_coa1, p_coa2, p_coa3, p_coa4; + double trm8, expval6, expval7, expval2theta, expval12theta, exp3ij, exp3jk; + double exp_pen2ij, exp_pen2jk, exp_pen3, exp_pen4, trm_pen34, exp_coa2; + double dSBO1, dSBO2, SBO, SBO2, CSBO2, SBOp, prod_SBO, vlpadj; + double CEval1, CEval2, CEval3, CEval4, CEval5, CEval6, CEval7, CEval8; + double CEpen1, CEpen2, CEpen3; + double e_ang, e_coa, e_pen; + double CEcoa1, CEcoa2, CEcoa3, CEcoa4, CEcoa5; + double Cf7ij, Cf7jk, Cf8j, Cf9j; + double f7_ij, f7_jk, f8_Dj, f9_Dj; + double Ctheta_0, theta_0, theta_00, theta, cos_theta, sin_theta; + double BOA_ij, BOA_jk; + rvec force, ext_press; + // rtensor temp_rtensor, total_rtensor; + + // Tallying variables + double eng_tmp, fi_tmp[3], fj_tmp[3], fk_tmp[3]; + double delij[3], delkj[3]; + + three_body_header *thbh; + three_body_parameters *thbp; + three_body_interaction_data *p_ijk, *p_kji; + bond_data *pbond_ij, *pbond_jk, *pbond_jt; + bond_order_data *bo_ij, *bo_jk, *bo_jt; #if defined(_OPENMP) - int tid = omp_get_thread_num(); + int tid = omp_get_thread_num(); #else - int tid = 0; + int tid = 0; #endif - long reductionOffset = (system->N * tid); - class PairReaxCOMP *pair_reax_ptr; - pair_reax_ptr = static_cast(system->pair_ptr); - class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); + long reductionOffset = (system->N * tid); + class PairReaxCOMP *pair_reax_ptr; + pair_reax_ptr = static_cast(system->pair_ptr); + class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, - system->N, system->pair_ptr->eatom, - system->pair_ptr->vatom, thr); + pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, + system->N, system->pair_ptr->eatom, + system->pair_ptr->vatom, thr); - // Run through a minimal for(jnum_intrs / nthreads; + const int per_thread = thb_intrs->num_intrs / nthreads; #pragma omp for schedule(dynamic,50) - for (j = 0; j < system->N; ++j) { - type_j = system->my_atoms[j].type; - _my_offset[j] = 0; - if(type_j < 0) continue; + for (j = 0; j < system->N; ++j) { + type_j = system->my_atoms[j].type; + _my_offset[j] = 0; + if(type_j < 0) continue; - start_j = Start_Index(j, bonds); - end_j = End_Index(j, bonds); + start_j = Start_Index(j, bonds); + end_j = End_Index(j, bonds); - // Always point to start of workspace to count angles - my_offset = tid * per_thread; + // Always point to start of workspace to count angles + my_offset = tid * per_thread; - for (pi = start_j; pi < end_j; ++pi) { - Set_Start_Index( pi, my_offset, thb_intrs ); - pbond_ij = &(bonds->select.bond_list[pi]); - bo_ij = &(pbond_ij->bo_data); - BOA_ij = bo_ij->BO - control->thb_cut; + for (pi = start_j; pi < end_j; ++pi) { + Set_Start_Index( pi, my_offset, thb_intrs ); + pbond_ij = &(bonds->select.bond_list[pi]); + bo_ij = &(pbond_ij->bo_data); + BOA_ij = bo_ij->BO - control->thb_cut; - if (BOA_ij > 0.0) { - i = pbond_ij->nbr; + if (BOA_ij > 0.0) { + i = pbond_ij->nbr; - /* first copy 3-body intrs from previously computed ones where i>k. - in the second for-loop below, - we compute only new 3-body intrs where i < k */ - for (pk = start_j; pk < pi; ++pk) { - start_pk = Start_Index( pk, thb_intrs ); - end_pk = End_Index( pk, thb_intrs ); + /* first copy 3-body intrs from previously computed ones where i>k. + in the second for-loop below, + we compute only new 3-body intrs where i < k */ + for (pk = start_j; pk < pi; ++pk) { + start_pk = Start_Index( pk, thb_intrs ); + end_pk = End_Index( pk, thb_intrs ); - for (t = start_pk; t < end_pk; ++t) - if (thb_intrs->select.three_body_list[t].thb == i) { + for (t = start_pk; t < end_pk; ++t) + if (thb_intrs->select.three_body_list[t].thb == i) { - p_ijk = &(thb_intrs->select.three_body_list[my_offset] ); - p_ijk->thb = bonds->select.bond_list[pk].nbr; + p_ijk = &(thb_intrs->select.three_body_list[my_offset] ); + p_ijk->thb = bonds->select.bond_list[pk].nbr; - ++my_offset; - break; - } - } // for(pk) + ++my_offset; + break; + } + } // for(pk) - /* and this is the second for loop mentioned above */ - for (pk = pi+1; pk < end_j; ++pk) { - pbond_jk = &(bonds->select.bond_list[pk]); - k = pbond_jk->nbr; + /* and this is the second for loop mentioned above */ + for (pk = pi+1; pk < end_j; ++pk) { + pbond_jk = &(bonds->select.bond_list[pk]); + k = pbond_jk->nbr; - if (j >= system->n && i >= system->n && k >= system->n) continue; + if (j >= system->n && i >= system->n && k >= system->n) continue; - p_ijk = &( thb_intrs->select.three_body_list[my_offset] ); - p_ijk->thb = k; + p_ijk = &( thb_intrs->select.three_body_list[my_offset] ); + p_ijk->thb = k; - ++my_offset; // add this to the list of 3-body interactions - } // for(pk) - } // if() - - Set_End_Index(pi, my_offset, thb_intrs ); - } // for(pi) - - // Confirm that thb_intrs->num_intrs / nthreads is enough to hold all angles from a single atom - if(my_offset >= (tid+1)*per_thread) { - int me; - MPI_Comm_rank(MPI_COMM_WORLD,&me); - fprintf( stderr, "step%d-ran out of space on angle_list on proc %i for atom %i:", data->step, me, j); - fprintf( stderr, " nthreads= %d, tid=%d, my_offset=%d, per_thread=%d\n", nthreads, tid, my_offset, per_thread); - fprintf( stderr, " num_intrs= %i N= %i\n",thb_intrs->num_intrs , system->N); - MPI_Abort( MPI_COMM_WORLD, INSUFFICIENT_MEMORY ); - } - - // Number of angles owned by this atom - _my_offset[j] = my_offset - tid * per_thread; - } // for(j) - - // Wait for all threads to finish counting angles + ++my_offset; // add this to the list of 3-body interactions + } // for(pk) + } // if() + + Set_End_Index(pi, my_offset, thb_intrs ); + } // for(pi) + + // Confirm that thb_intrs->num_intrs / nthreads is enough to hold all angles from a single atom + if(my_offset >= (tid+1)*per_thread) { + int me; + MPI_Comm_rank(MPI_COMM_WORLD,&me); + fprintf( stderr, "step%d-ran out of space on angle_list on proc %i for atom %i:", data->step, me, j); + fprintf( stderr, " nthreads= %d, tid=%d, my_offset=%d, per_thread=%d\n", nthreads, tid, my_offset, per_thread); + fprintf( stderr, " num_intrs= %i N= %i\n",thb_intrs->num_intrs , system->N); + MPI_Abort( MPI_COMM_WORLD, INSUFFICIENT_MEMORY ); + } + + // Number of angles owned by this atom + _my_offset[j] = my_offset - tid * per_thread; + } // for(j) + + // Wait for all threads to finish counting angles #pragma omp barrier - // Master thread uses angle counts to compute offsets - // This can be threaded + // Master thread uses angle counts to compute offsets + // This can be threaded #pragma omp master - { - int current_count = 0; - int m = _my_offset[0]; - _my_offset[0] = current_count; - for(j=1; jN; j++) { - current_count+= m; - m = _my_offset[j]; - _my_offset[j] = current_count; + { + int current_count = 0; + int m = _my_offset[0]; + _my_offset[0] = current_count; + for(j=1; jN; j++) { + current_count+= m; + m = _my_offset[j]; + _my_offset[j] = current_count; + } + _my_offset[system->N] = current_count + m; // Used to test if last particle has any angles } - _my_offset[system->N] = current_count + m; // Used to test if last particle has any angles - } - // All threads wait till master thread finished computing offsets + // All threads wait till master thread finished computing offsets #pragma omp barrier - // Original loop, but now using precomputed offsets - // Safe to use all threads available, regardless of threads tasked above - // We also now skip over atoms that have no angles assigned + // Original loop, but now using precomputed offsets + // Safe to use all threads available, regardless of threads tasked above + // We also now skip over atoms that have no angles assigned #pragma omp for schedule(dynamic,50)//(dynamic,chunksize)//(guided) - for (j = 0; j < system->N; ++j) { // Ray: the first one with system->N - type_j = system->my_atoms[j].type; - if(type_j < 0) continue; - - // Skip if no angles for this atom - if(_my_offset[j] == _my_offset[j+1]) continue; - - start_j = Start_Index(j, bonds); - end_j = End_Index(j, bonds); - - type_j = system->my_atoms[j].type; - - my_offset = _my_offset[j]; - - p_val3 = system->reax_param.sbp[ type_j ].p_val3; - p_val5 = system->reax_param.sbp[ type_j ].p_val5; - - SBOp = 0, prod_SBO = 1; - for (t = start_j; t < end_j; ++t) { - bo_jt = &(bonds->select.bond_list[t].bo_data); - SBOp += (bo_jt->BO_pi + bo_jt->BO_pi2); - temp = SQR( bo_jt->BO ); - temp *= temp; - temp *= temp; - prod_SBO *= exp( -temp ); - } - - // modifications to match Adri's code - 09/01/09 - if( workspace->vlpex[j] >= 0 ){ - vlpadj = 0; - dSBO2 = prod_SBO - 1; - } - else{ - vlpadj = workspace->nlp[j]; - dSBO2 = (prod_SBO - 1) * (1 - p_val8 * workspace->dDelta_lp[j]); - } - - SBO = SBOp + (1 - prod_SBO) * (-workspace->Delta_boc[j] - p_val8 * vlpadj); - dSBO1 = -8 * prod_SBO * ( workspace->Delta_boc[j] + p_val8 * vlpadj ); - - if( SBO <= 0 ) - SBO2 = 0, CSBO2 = 0; - else if( SBO > 0 && SBO <= 1 ) { + for (j = 0; j < system->N; ++j) { // Ray: the first one with system->N + type_j = system->my_atoms[j].type; + if(type_j < 0) continue; + + // Skip if no angles for this atom + if(_my_offset[j] == _my_offset[j+1]) continue; + + start_j = Start_Index(j, bonds); + end_j = End_Index(j, bonds); + + type_j = system->my_atoms[j].type; + + my_offset = _my_offset[j]; + + p_val3 = system->reax_param.sbp[ type_j ].p_val3; + p_val5 = system->reax_param.sbp[ type_j ].p_val5; + + SBOp = 0, prod_SBO = 1; + for (t = start_j; t < end_j; ++t) { + bo_jt = &(bonds->select.bond_list[t].bo_data); + SBOp += (bo_jt->BO_pi + bo_jt->BO_pi2); + temp = SQR( bo_jt->BO ); + temp *= temp; + temp *= temp; + prod_SBO *= exp( -temp ); + } + + // modifications to match Adri's code - 09/01/09 + if( workspace->vlpex[j] >= 0 ){ + vlpadj = 0; + dSBO2 = prod_SBO - 1; + } + else{ + vlpadj = workspace->nlp[j]; + dSBO2 = (prod_SBO - 1) * (1 - p_val8 * workspace->dDelta_lp[j]); + } + + SBO = SBOp + (1 - prod_SBO) * (-workspace->Delta_boc[j] - p_val8 * vlpadj); + dSBO1 = -8 * prod_SBO * ( workspace->Delta_boc[j] + p_val8 * vlpadj ); + + if( SBO <= 0 ) + SBO2 = 0, CSBO2 = 0; + else if( SBO > 0 && SBO <= 1 ) { SBO2 = pow( SBO, p_val9 ); CSBO2 = p_val9 * pow( SBO, p_val9 - 1 ); - } - else if( SBO > 1 && SBO < 2 ) { - SBO2 = 2 - pow( 2-SBO, p_val9 ); - CSBO2 = p_val9 * pow( 2 - SBO, p_val9 - 1 ); - } - else - SBO2 = 2, CSBO2 = 0; - - expval6 = exp( p_val6 * workspace->Delta_boc[j] ); - - for (pi = start_j; pi < end_j; ++pi) { - Set_Start_Index( pi, my_offset, thb_intrs ); - pbond_ij = &(bonds->select.bond_list[pi]); - bo_ij = &(pbond_ij->bo_data); - BOA_ij = bo_ij->BO - control->thb_cut; - - - if (BOA_ij > 0.0) { - i = pbond_ij->nbr; - r_ij = pbond_ij->d; - type_i = system->my_atoms[i].type; + } + else if( SBO > 1 && SBO < 2 ) { + SBO2 = 2 - pow( 2-SBO, p_val9 ); + CSBO2 = p_val9 * pow( 2 - SBO, p_val9 - 1 ); + } + else + SBO2 = 2, CSBO2 = 0; + + expval6 = exp( p_val6 * workspace->Delta_boc[j] ); + + for (pi = start_j; pi < end_j; ++pi) { + Set_Start_Index( pi, my_offset, thb_intrs ); + pbond_ij = &(bonds->select.bond_list[pi]); + bo_ij = &(pbond_ij->bo_data); + BOA_ij = bo_ij->BO - control->thb_cut; + + + if (BOA_ij > 0.0) { + i = pbond_ij->nbr; + type_i = system->my_atoms[i].type; - /* first copy 3-body intrs from previously computed ones where i>k. - in the second for-loop below, - we compute only new 3-body intrs where i < k */ - for (pk = start_j; pk < pi; ++pk) { - start_pk = Start_Index( pk, thb_intrs ); - end_pk = End_Index( pk, thb_intrs ); + /* first copy 3-body intrs from previously computed ones where i>k. + in the second for-loop below, + we compute only new 3-body intrs where i < k */ + for (pk = start_j; pk < pi; ++pk) { + start_pk = Start_Index( pk, thb_intrs ); + end_pk = End_Index( pk, thb_intrs ); - for (t = start_pk; t < end_pk; ++t) - if (thb_intrs->select.three_body_list[t].thb == i) { - p_ijk = &(thb_intrs->select.three_body_list[my_offset] ); - p_kji = &(thb_intrs->select.three_body_list[t]); + for (t = start_pk; t < end_pk; ++t) + if (thb_intrs->select.three_body_list[t].thb == i) { + p_ijk = &(thb_intrs->select.three_body_list[my_offset] ); + p_kji = &(thb_intrs->select.three_body_list[t]); - p_ijk->thb = bonds->select.bond_list[pk].nbr; - p_ijk->pthb = pk; - p_ijk->theta = p_kji->theta; - rvec_Copy( p_ijk->dcos_di, p_kji->dcos_dk ); - rvec_Copy( p_ijk->dcos_dj, p_kji->dcos_dj ); - rvec_Copy( p_ijk->dcos_dk, p_kji->dcos_di ); + p_ijk->thb = bonds->select.bond_list[pk].nbr; + p_ijk->pthb = pk; + p_ijk->theta = p_kji->theta; + rvec_Copy( p_ijk->dcos_di, p_kji->dcos_dk ); + rvec_Copy( p_ijk->dcos_dj, p_kji->dcos_dj ); + rvec_Copy( p_ijk->dcos_dk, p_kji->dcos_di ); - ++my_offset; - ++num_thb_intrs; - break; - } - } // for(pk) + ++my_offset; + ++num_thb_intrs; + break; + } + } // for(pk) - /* and this is the second for loop mentioned above */ - for (pk = pi+1; pk < end_j; ++pk) { - pbond_jk = &(bonds->select.bond_list[pk]); - bo_jk = &(pbond_jk->bo_data); - BOA_jk = bo_jk->BO - control->thb_cut; - k = pbond_jk->nbr; - type_k = system->my_atoms[k].type; - p_ijk = &( thb_intrs->select.three_body_list[my_offset] ); + /* and this is the second for loop mentioned above */ + for (pk = pi+1; pk < end_j; ++pk) { + pbond_jk = &(bonds->select.bond_list[pk]); + bo_jk = &(pbond_jk->bo_data); + BOA_jk = bo_jk->BO - control->thb_cut; + k = pbond_jk->nbr; + type_k = system->my_atoms[k].type; + p_ijk = &( thb_intrs->select.three_body_list[my_offset] ); - // Fix by Sudhir - // if (BOA_jk <= 0) continue; - if (j >= system->n && i >= system->n && k >= system->n) continue; + // Fix by Sudhir + // if (BOA_jk <= 0) continue; + if (j >= system->n && i >= system->n && k >= system->n) continue; - Calculate_Theta( pbond_ij->dvec, pbond_ij->d, - pbond_jk->dvec, pbond_jk->d, - &theta, &cos_theta ); + Calculate_Theta( pbond_ij->dvec, pbond_ij->d, + pbond_jk->dvec, pbond_jk->d, + &theta, &cos_theta ); - Calculate_dCos_ThetaOMP( pbond_ij->dvec, pbond_ij->d, - pbond_jk->dvec, pbond_jk->d, - &(p_ijk->dcos_di), &(p_ijk->dcos_dj), - &(p_ijk->dcos_dk) ); - p_ijk->thb = k; - p_ijk->pthb = pk; - p_ijk->theta = theta; + Calculate_dCos_ThetaOMP( pbond_ij->dvec, pbond_ij->d, + pbond_jk->dvec, pbond_jk->d, + &(p_ijk->dcos_di), &(p_ijk->dcos_dj), + &(p_ijk->dcos_dk) ); + p_ijk->thb = k; + p_ijk->pthb = pk; + p_ijk->theta = theta; - sin_theta = sin( theta ); - if( sin_theta < 1.0e-5 ) - sin_theta = 1.0e-5; + sin_theta = sin( theta ); + if( sin_theta < 1.0e-5 ) + sin_theta = 1.0e-5; - ++my_offset; // add this to the list of 3-body interactions - ++num_thb_intrs; + ++my_offset; // add this to the list of 3-body interactions + ++num_thb_intrs; - if ((j < system->n) && (BOA_jk > 0.0) && - (bo_ij->BO > control->thb_cut) && - (bo_jk->BO > control->thb_cut) && - (bo_ij->BO * bo_jk->BO > control->thb_cutsq)) { - r_jk = pbond_jk->d; - thbh = &( system->reax_param.thbp[ type_i ][ type_j ][ type_k ] ); + if ((j < system->n) && (BOA_jk > 0.0) && + (bo_ij->BO > control->thb_cut) && + (bo_jk->BO > control->thb_cut) && + (bo_ij->BO * bo_jk->BO > control->thb_cutsq)) { + thbh = &( system->reax_param.thbp[ type_i ][ type_j ][ type_k ] ); - for (cnt = 0; cnt < thbh->cnt; ++cnt) { + for (cnt = 0; cnt < thbh->cnt; ++cnt) { - if( fabs(thbh->prm[cnt].p_val1) > 0.001 ) { - thbp = &( thbh->prm[cnt] ); + if( fabs(thbh->prm[cnt].p_val1) > 0.001 ) { + thbp = &( thbh->prm[cnt] ); - /* ANGLE ENERGY */ - p_val1 = thbp->p_val1; - p_val2 = thbp->p_val2; - p_val4 = thbp->p_val4; - p_val7 = thbp->p_val7; - theta_00 = thbp->theta_00; + /* ANGLE ENERGY */ + p_val1 = thbp->p_val1; + p_val2 = thbp->p_val2; + p_val4 = thbp->p_val4; + p_val7 = thbp->p_val7; + theta_00 = thbp->theta_00; - exp3ij = exp( -p_val3 * pow( BOA_ij, p_val4 ) ); - f7_ij = 1.0 - exp3ij; - Cf7ij = p_val3 * p_val4 * pow( BOA_ij, p_val4 - 1.0 ) * exp3ij; + exp3ij = exp( -p_val3 * pow( BOA_ij, p_val4 ) ); + f7_ij = 1.0 - exp3ij; + Cf7ij = p_val3 * p_val4 * pow( BOA_ij, p_val4 - 1.0 ) * exp3ij; - exp3jk = exp( -p_val3 * pow( BOA_jk, p_val4 ) ); - f7_jk = 1.0 - exp3jk; - Cf7jk = p_val3 * p_val4 * pow( BOA_jk, p_val4 - 1.0 ) * exp3jk; + exp3jk = exp( -p_val3 * pow( BOA_jk, p_val4 ) ); + f7_jk = 1.0 - exp3jk; + Cf7jk = p_val3 * p_val4 * pow( BOA_jk, p_val4 - 1.0 ) * exp3jk; - expval7 = exp( -p_val7 * workspace->Delta_boc[j] ); - trm8 = 1.0 + expval6 + expval7; - f8_Dj = p_val5 - ( (p_val5 - 1.0) * (2.0 + expval6) / trm8 ); - Cf8j = ( (1.0 - p_val5) / SQR(trm8) ) * - ( p_val6 * expval6 * trm8 - - (2.0 + expval6) * ( p_val6*expval6 - p_val7*expval7 ) ); + expval7 = exp( -p_val7 * workspace->Delta_boc[j] ); + trm8 = 1.0 + expval6 + expval7; + f8_Dj = p_val5 - ( (p_val5 - 1.0) * (2.0 + expval6) / trm8 ); + Cf8j = ( (1.0 - p_val5) / SQR(trm8) ) * + ( p_val6 * expval6 * trm8 - + (2.0 + expval6) * ( p_val6*expval6 - p_val7*expval7 ) ); - theta_0 = 180.0 - theta_00 * (1.0 - - exp(-p_val10 * (2.0 - SBO2))); - theta_0 = DEG2RAD( theta_0 ); + theta_0 = 180.0 - theta_00 * (1.0 - + exp(-p_val10 * (2.0 - SBO2))); + theta_0 = DEG2RAD( theta_0 ); - expval2theta = exp( -p_val2 * SQR(theta_0 - theta) ); - if (p_val1 >= 0) - expval12theta = p_val1 * (1.0 - expval2theta); - else // To avoid linear Me-H-Me angles (6/6/06) - expval12theta = p_val1 * -expval2theta; + expval2theta = exp( -p_val2 * SQR(theta_0 - theta) ); + if (p_val1 >= 0) + expval12theta = p_val1 * (1.0 - expval2theta); + else // To avoid linear Me-H-Me angles (6/6/06) + expval12theta = p_val1 * -expval2theta; - CEval1 = Cf7ij * f7_jk * f8_Dj * expval12theta; - CEval2 = Cf7jk * f7_ij * f8_Dj * expval12theta; - CEval3 = Cf8j * f7_ij * f7_jk * expval12theta; - CEval4 = -2.0 * p_val1 * p_val2 * f7_ij * f7_jk * f8_Dj * - expval2theta * (theta_0 - theta); + CEval1 = Cf7ij * f7_jk * f8_Dj * expval12theta; + CEval2 = Cf7jk * f7_ij * f8_Dj * expval12theta; + CEval3 = Cf8j * f7_ij * f7_jk * expval12theta; + CEval4 = -2.0 * p_val1 * p_val2 * f7_ij * f7_jk * f8_Dj * + expval2theta * (theta_0 - theta); - Ctheta_0 = p_val10 * DEG2RAD(theta_00) * - exp( -p_val10 * (2.0 - SBO2) ); + Ctheta_0 = p_val10 * DEG2RAD(theta_00) * + exp( -p_val10 * (2.0 - SBO2) ); - CEval5 = -CEval4 * Ctheta_0 * CSBO2; - CEval6 = CEval5 * dSBO1; - CEval7 = CEval5 * dSBO2; - CEval8 = -CEval4 / sin_theta; - - total_Eang += e_ang = - f7_ij * f7_jk * f8_Dj * expval12theta; - /* END ANGLE ENERGY*/ + CEval5 = -CEval4 * Ctheta_0 * CSBO2; + CEval6 = CEval5 * dSBO1; + CEval7 = CEval5 * dSBO2; + CEval8 = -CEval4 / sin_theta; + + total_Eang += e_ang = + f7_ij * f7_jk * f8_Dj * expval12theta; + /* END ANGLE ENERGY*/ - /* PENALTY ENERGY */ - p_pen1 = thbp->p_pen1; - p_pen2 = system->reax_param.gp.l[19]; - p_pen3 = system->reax_param.gp.l[20]; - p_pen4 = system->reax_param.gp.l[21]; - - exp_pen2ij = exp( -p_pen2 * SQR( BOA_ij - 2.0 ) ); - exp_pen2jk = exp( -p_pen2 * SQR( BOA_jk - 2.0 ) ); - exp_pen3 = exp( -p_pen3 * workspace->Delta[j] ); - exp_pen4 = exp( p_pen4 * workspace->Delta[j] ); - trm_pen34 = 1.0 + exp_pen3 + exp_pen4; - f9_Dj = ( 2.0 + exp_pen3 ) / trm_pen34; - Cf9j = ( -p_pen3 * exp_pen3 * trm_pen34 - - (2.0 + exp_pen3) * ( -p_pen3 * exp_pen3 + - p_pen4 * exp_pen4 ) ) / - SQR( trm_pen34 ); - - total_Epen += e_pen = - p_pen1 * f9_Dj * exp_pen2ij * exp_pen2jk; + /* PENALTY ENERGY */ + p_pen1 = thbp->p_pen1; + p_pen2 = system->reax_param.gp.l[19]; + p_pen3 = system->reax_param.gp.l[20]; + p_pen4 = system->reax_param.gp.l[21]; + + exp_pen2ij = exp( -p_pen2 * SQR( BOA_ij - 2.0 ) ); + exp_pen2jk = exp( -p_pen2 * SQR( BOA_jk - 2.0 ) ); + exp_pen3 = exp( -p_pen3 * workspace->Delta[j] ); + exp_pen4 = exp( p_pen4 * workspace->Delta[j] ); + trm_pen34 = 1.0 + exp_pen3 + exp_pen4; + f9_Dj = ( 2.0 + exp_pen3 ) / trm_pen34; + Cf9j = ( -p_pen3 * exp_pen3 * trm_pen34 - + (2.0 + exp_pen3) * ( -p_pen3 * exp_pen3 + + p_pen4 * exp_pen4 ) ) / + SQR( trm_pen34 ); + + total_Epen += e_pen = + p_pen1 * f9_Dj * exp_pen2ij * exp_pen2jk; - CEpen1 = e_pen * Cf9j / f9_Dj; - temp = -2.0 * p_pen2 * e_pen; - CEpen2 = temp * (BOA_ij - 2.0); - CEpen3 = temp * (BOA_jk - 2.0); - /* END PENALTY ENERGY */ + CEpen1 = e_pen * Cf9j / f9_Dj; + temp = -2.0 * p_pen2 * e_pen; + CEpen2 = temp * (BOA_ij - 2.0); + CEpen3 = temp * (BOA_jk - 2.0); + /* END PENALTY ENERGY */ - /* COALITION ENERGY */ - p_coa1 = thbp->p_coa1; - p_coa2 = system->reax_param.gp.l[2]; - p_coa3 = system->reax_param.gp.l[38]; - p_coa4 = system->reax_param.gp.l[30]; + /* COALITION ENERGY */ + p_coa1 = thbp->p_coa1; + p_coa2 = system->reax_param.gp.l[2]; + p_coa3 = system->reax_param.gp.l[38]; + p_coa4 = system->reax_param.gp.l[30]; - exp_coa2 = exp( p_coa2 * workspace->Delta_val[j] ); - total_Ecoa += e_coa = - p_coa1 / (1. + exp_coa2) * - exp( -p_coa3 * SQR(workspace->total_bond_order[i]-BOA_ij) ) * - exp( -p_coa3 * SQR(workspace->total_bond_order[k]-BOA_jk) ) * - exp( -p_coa4 * SQR(BOA_ij - 1.5) ) * - exp( -p_coa4 * SQR(BOA_jk - 1.5) ); + exp_coa2 = exp( p_coa2 * workspace->Delta_val[j] ); + total_Ecoa += e_coa = + p_coa1 / (1. + exp_coa2) * + exp( -p_coa3 * SQR(workspace->total_bond_order[i]-BOA_ij) ) * + exp( -p_coa3 * SQR(workspace->total_bond_order[k]-BOA_jk) ) * + exp( -p_coa4 * SQR(BOA_ij - 1.5) ) * + exp( -p_coa4 * SQR(BOA_jk - 1.5) ); - CEcoa1 = -2 * p_coa4 * (BOA_ij - 1.5) * e_coa; - CEcoa2 = -2 * p_coa4 * (BOA_jk - 1.5) * e_coa; - CEcoa3 = -p_coa2 * exp_coa2 * e_coa / (1 + exp_coa2); - CEcoa4 = -2 * p_coa3 * - (workspace->total_bond_order[i]-BOA_ij) * e_coa; - CEcoa5 = -2 * p_coa3 * - (workspace->total_bond_order[k]-BOA_jk) * e_coa; - /* END COALITION ENERGY */ + CEcoa1 = -2 * p_coa4 * (BOA_ij - 1.5) * e_coa; + CEcoa2 = -2 * p_coa4 * (BOA_jk - 1.5) * e_coa; + CEcoa3 = -p_coa2 * exp_coa2 * e_coa / (1 + exp_coa2); + CEcoa4 = -2 * p_coa3 * + (workspace->total_bond_order[i]-BOA_ij) * e_coa; + CEcoa5 = -2 * p_coa3 * + (workspace->total_bond_order[k]-BOA_jk) * e_coa; + /* END COALITION ENERGY */ - /* FORCES */ - bo_ij->Cdbo += (CEval1 + CEpen2 + (CEcoa1 - CEcoa4)); - bo_jk->Cdbo += (CEval2 + CEpen3 + (CEcoa2 - CEcoa5)); - workspace->CdDelta[j] += ((CEval3 + CEval7) + CEpen1 + CEcoa3); - workspace->CdDeltaReduction[reductionOffset+i] += CEcoa4; - workspace->CdDeltaReduction[reductionOffset+k] += CEcoa5; + /* FORCES */ + bo_ij->Cdbo += (CEval1 + CEpen2 + (CEcoa1 - CEcoa4)); + bo_jk->Cdbo += (CEval2 + CEpen3 + (CEcoa2 - CEcoa5)); + workspace->CdDelta[j] += ((CEval3 + CEval7) + CEpen1 + CEcoa3); + workspace->CdDeltaReduction[reductionOffset+i] += CEcoa4; + workspace->CdDeltaReduction[reductionOffset+k] += CEcoa5; - for (t = start_j; t < end_j; ++t) { + for (t = start_j; t < end_j; ++t) { pbond_jt = &( bonds->select.bond_list[t] ); bo_jt = &(pbond_jt->bo_data); temp_bo_jt = bo_jt->BO; @@ -536,69 +530,69 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, bo_jt->Cdbo += (CEval6 * pBOjt7); bo_jt->Cdbopi += CEval5; bo_jt->Cdbopi2 += CEval5; - } + } - if( control->virial == 0 ) { - rvec_ScaledAdd( workspace->f[j], CEval8, p_ijk->dcos_dj ); - rvec_ScaledAdd( workspace->forceReduction[reductionOffset+i], - CEval8, p_ijk->dcos_di ); - rvec_ScaledAdd( workspace->forceReduction[reductionOffset+k], - CEval8, p_ijk->dcos_dk ); - } - else { - /* terms not related to bond order derivatives are - added directly into forces and pressure vector/tensor */ - rvec_Scale( force, CEval8, p_ijk->dcos_di ); - rvec_Add( workspace->forceReduction[reductionOffset+i], force ); + if( control->virial == 0 ) { + rvec_ScaledAdd( workspace->f[j], CEval8, p_ijk->dcos_dj ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+i], + CEval8, p_ijk->dcos_di ); + rvec_ScaledAdd( workspace->forceReduction[reductionOffset+k], + CEval8, p_ijk->dcos_dk ); + } + else { + /* terms not related to bond order derivatives are + added directly into forces and pressure vector/tensor */ + rvec_Scale( force, CEval8, p_ijk->dcos_di ); + rvec_Add( workspace->forceReduction[reductionOffset+i], force ); - rvec_iMultiply( ext_press, pbond_ij->rel_box, force ); - rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + rvec_iMultiply( ext_press, pbond_ij->rel_box, force ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); - rvec_ScaledAdd( workspace->f[j], CEval8, p_ijk->dcos_dj ); + rvec_ScaledAdd( workspace->f[j], CEval8, p_ijk->dcos_dj ); - rvec_Scale( force, CEval8, p_ijk->dcos_dk ); - rvec_Add( workspace->forceReduction[reductionOffset+k], force ); + rvec_Scale( force, CEval8, p_ijk->dcos_dk ); + rvec_Add( workspace->forceReduction[reductionOffset+k], force ); - rvec_iMultiply( ext_press, pbond_jk->rel_box, force ); - rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); - } + rvec_iMultiply( ext_press, pbond_jk->rel_box, force ); + rvec_Add( workspace->my_ext_pressReduction[tid], ext_press ); + } - /* tally into per-atom virials */ - if( system->pair_ptr->vflag_atom || system->pair_ptr->evflag) { + /* tally into per-atom virials */ + if( system->pair_ptr->vflag_atom || system->pair_ptr->evflag) { - /* Acquire vectors */ - rvec_ScaledSum( delij, 1., system->my_atoms[i].x, - -1., system->my_atoms[j].x ); - rvec_ScaledSum( delkj, 1., system->my_atoms[k].x, - -1., system->my_atoms[j].x ); + /* Acquire vectors */ + rvec_ScaledSum( delij, 1., system->my_atoms[i].x, + -1., system->my_atoms[j].x ); + rvec_ScaledSum( delkj, 1., system->my_atoms[k].x, + -1., system->my_atoms[j].x ); - rvec_Scale( fi_tmp, -CEval8, p_ijk->dcos_di ); - rvec_Scale( fj_tmp, -CEval8, p_ijk->dcos_dj ); - rvec_Scale( fk_tmp, -CEval8, p_ijk->dcos_dk ); + rvec_Scale( fi_tmp, -CEval8, p_ijk->dcos_di ); + rvec_Scale( fj_tmp, -CEval8, p_ijk->dcos_dj ); + rvec_Scale( fk_tmp, -CEval8, p_ijk->dcos_dk ); - eng_tmp = e_ang + e_pen + e_coa; + eng_tmp = e_ang + e_pen + e_coa; - if( system->pair_ptr->evflag) - pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, j, j, system->N, 1, - eng_tmp, 0.0, 0.0, 0.0, 0.0, 0.0, thr); - if( system->pair_ptr->vflag_atom) - // NEED TO MAKE AN OMP VERSION OF THIS CALL! - system->pair_ptr->v_tally3( i, j, k, fi_tmp, fk_tmp, delij, delkj); - } - - } // if(p_val1>0.001) - } // for(cnt) - } // if(j0) - } // for(pk) - } // if(BOA_ij>0) - - Set_End_Index(pi, my_offset, thb_intrs ); - } // for(pi) - } // for(j) - - pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, thr); - } // end omp parallel + if( system->pair_ptr->evflag) + pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, j, j, system->N, 1, + eng_tmp, 0.0, 0.0, 0.0, 0.0, 0.0, thr); + if( system->pair_ptr->vflag_atom) + // NEED TO MAKE AN OMP VERSION OF THIS CALL! + system->pair_ptr->v_tally3( i, j, k, fi_tmp, fk_tmp, delij, delkj); + } + + } // if(p_val1>0.001) + } // for(cnt) + } // if(j0) + } // for(pk) + } // if(BOA_ij>0) + + Set_End_Index(pi, my_offset, thb_intrs ); + } // for(pi) + } // for(j) + + pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, + system->pair_ptr->vflag_either, thr); + } // end omp parallel data->my_en.e_ang = total_Eang; data->my_en.e_pen = total_Epen; -- GitLab From 5b1e582f037706789efd6b7093173b77468a09cc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 May 2017 10:52:20 -0400 Subject: [PATCH 205/593] prevent segfault when defining pair_style comb3 without arguments --- src/MANYBODY/pair_comb3.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index 428ad57cbe..51445cccdd 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -161,6 +161,8 @@ void PairComb3::allocate() void PairComb3::settings(int narg, char **arg) { + if (narg != 1) error->all(FLERR,"Illegal pair_style command"); + if (strcmp(arg[0],"polar_on") == 0) { pol_flag = 1; if (comm->me == 0 && screen) fprintf(screen, -- GitLab From 2055110e05d08ec443addba13216bb4528610613 Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Fri, 26 May 2017 17:38:21 -0400 Subject: [PATCH 206/593] Fixed typo in dox. --- doc/src/manifolds.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/manifolds.txt b/doc/src/manifolds.txt index 9f0082d5dc..eb3bd6d486 100644 --- a/doc/src/manifolds.txt +++ b/doc/src/manifolds.txt @@ -30,8 +30,8 @@ plane @ a b c x0 y0 z0 @ a*(x-x0) + b*(y-y0) + c*(z-z0) = 0 @ A plane with norma plane_wiggle @ a w @ z - a*sin(w*x) = 0 @ A plane with a sinusoidal modulation on z along x. sphere @ R @ x^2 + y^2 + z^2 - R^2 = 0 @ A sphere of radius R supersphere @ R q @ | x |^q + | y |^q + | z |^q - R^q = 0 @ A supersphere of hyperradius R -spine @ a, A, B, B2, c @ -(x^2 + y^2)*(a^2 - z^2/f(z)^2)*(1 + (A*sin(g(z)*z^2))^4), f(z) = c if z > 0, 1 otherwise; g(z) = B if z > 0, B2 otherwise @ An approximation to a dendtritic spine -spine_two @ a, A, B, B2, c @ -(x^2 + y^2)*(a^2 - z^2/f(z)^2)*(1 + (A*sin(g(z)*z^2))^2), f(z) = c if z > 0, 1 otherwise; g(z) = B if z > 0, B2 otherwise @ Another approximation to a dendtritic spine +spine @ a, A, B, B2, c @ -(x^2 + y^2) + (a^2 - z^2/f(z)^2)*(1 + (A*sin(g(z)*z^2))^4), f(z) = c if z > 0, 1 otherwise; g(z) = B if z > 0, B2 otherwise @ An approximation to a dendtritic spine +spine_two @ a, A, B, B2, c @ -(x^2 + y^2) + (a^2 - z^2/f(z)^2)*(1 + (A*sin(g(z)*z^2))^2), f(z) = c if z > 0, 1 otherwise; g(z) = B if z > 0, B2 otherwise @ Another approximation to a dendtritic spine thylakoid @ wB LB lB @ Various, see "(Paquay)"_#Paquay1 @ A model grana thylakoid consisting of two block-like compartments connected by a bridge of width wB, length LB and taper length lB torus @ R r @ (R - sqrt( x^2 + y^2 ) )^2 + z^2 - r^2 @ A torus with large radius R and small radius r, centered on (0,0,0) :tb(s=@) -- GitLab From 5a23d2d1da7559f904db9e2be82766d8b84ac462 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 May 2017 20:28:45 -0400 Subject: [PATCH 207/593] fix bug in computing mixed EAM potentials introduced by TI modifications --- src/MANYBODY/pair_eam.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp index a610ca1bf1..d3ac3951bf 100644 --- a/src/MANYBODY/pair_eam.cpp +++ b/src/MANYBODY/pair_eam.cpp @@ -429,6 +429,7 @@ double PairEAM::init_one(int i, int j) // for funcfl could be multiple files // for setfl or fs, just one file + if (setflag[i][j] == 0) scale[i][j] = 1.0; scale[j][i] = scale[i][j]; if (funcfl) { -- GitLab From c0339120d2a59b0df5b07eb9a39ceb8dc518538c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 May 2017 21:28:41 -0400 Subject: [PATCH 208/593] add missing neighbor list class definitions to USER-OMP --- src/USER-OMP/npair_halffull_newtoff_omp.h | 8 ++++++-- src/USER-OMP/npair_halffull_newton_omp.h | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/USER-OMP/npair_halffull_newtoff_omp.h b/src/USER-OMP/npair_halffull_newtoff_omp.h index 508efff277..961544a952 100644 --- a/src/USER-OMP/npair_halffull_newtoff_omp.h +++ b/src/USER-OMP/npair_halffull_newtoff_omp.h @@ -15,9 +15,13 @@ NPairStyle(halffull/newtoff/omp, NPairHalffullNewtoffOmp, - NP_HALF_FULL | NP_NEWTOFF | NP_OMP | NP_HALF | - NP_NSQ | NP_BIN | NP_MULTI | NP_ORTHO | NP_TRI) + NP_HALF_FULL | NP_NEWTOFF | NP_NSQ | NP_BIN | NP_MULTI | NP_HALF | + NP_ORTHO | NP_TRI |NP_OMP) +NPairStyle(halffull/newtoff/skip/omp, + NPairHalffullNewtoffOmp, + NP_HALF_FULL | NP_NEWTOFF | NP_NSQ | NP_BIN | NP_MULTI | NP_HALF | + NP_ORTHO | NP_TRI | NP_SKIP | NP_OMP) #else #ifndef LMP_NPAIR_HALFFULL_NEWTOFF_OMP_H diff --git a/src/USER-OMP/npair_halffull_newton_omp.h b/src/USER-OMP/npair_halffull_newton_omp.h index 87f05e2a40..ef8be32a74 100644 --- a/src/USER-OMP/npair_halffull_newton_omp.h +++ b/src/USER-OMP/npair_halffull_newton_omp.h @@ -15,8 +15,13 @@ NPairStyle(halffull/newton/omp, NPairHalffullNewtonOmp, - NP_HALF_FULL | NP_NEWTON | NP_OMP | NP_HALF | - NP_NSQ | NP_BIN | NP_MULTI | NP_ORTHO | NP_TRI) + NP_HALF_FULL | NP_NEWTON | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI | + NP_ORTHO | NP_TRI| NP_OMP) + +NPairStyle(halffull/newton/skip/omp, + NPairHalffullNewtonOmp, + NP_HALF_FULL | NP_NEWTON | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI | + NP_ORTHO | NP_TRI | NP_SKIP | NP_OMP) #else -- GitLab From ba0ddea5e1ff2d27fd77e3aa7263466705c64c2e Mon Sep 17 00:00:00 2001 From: Anders Hafreager Date: Sun, 28 May 2017 15:44:12 -0700 Subject: [PATCH 209/593] Using correct ndegree instead of nnn --- src/compute_hexorder_atom.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compute_hexorder_atom.cpp b/src/compute_hexorder_atom.cpp index 93b84080bc..013036f364 100644 --- a/src/compute_hexorder_atom.cpp +++ b/src/compute_hexorder_atom.cpp @@ -248,7 +248,7 @@ inline void ComputeHexOrderAtom::calc_qn_complex(double delx, double dely, doubl double x = delx*rinv; double y = dely*rinv; std::complex z(x, y); - std::complex zn = pow(z, nnn); + std::complex zn = pow(z, ndegree); u = real(zn); v = imag(zn); } @@ -259,9 +259,9 @@ inline void ComputeHexOrderAtom::calc_qn_complex(double delx, double dely, doubl inline void ComputeHexOrderAtom::calc_qn_trig(double delx, double dely, double &u, double &v) { double ntheta; if(fabs(delx) <= MY_EPSILON) { - if(dely > 0.0) ntheta = nnn * MY_PI / 2.0; - else ntheta = nnn * 3.0 * MY_PI / 2.0; - } else ntheta = nnn * atan(dely / delx); + if(dely > 0.0) ntheta = ndegree * MY_PI / 2.0; + else ntheta = ndegree * 3.0 * MY_PI / 2.0; + } else ntheta = ndegree * atan(dely / delx); u = cos(ntheta); v = sin(ntheta); } -- GitLab From 32c87f3131804f4702bb854884adff99e2012eab Mon Sep 17 00:00:00 2001 From: Emile Maras Date: Mon, 29 May 2017 14:00:13 +0200 Subject: [PATCH 210/593] removed a bug in fix_neb.cpp which prevented the freeend to work properly, plus added an example for the neb freeend --- examples/neb/in.neb.hop1freeend | 56 ++ examples/neb/initial.hop1freeend | 860 +++++++++++++++++++++++++++++++ 2 files changed, 916 insertions(+) create mode 100644 examples/neb/in.neb.hop1freeend create mode 100644 examples/neb/initial.hop1freeend diff --git a/examples/neb/in.neb.hop1freeend b/examples/neb/in.neb.hop1freeend new file mode 100644 index 0000000000..fc0677f30a --- /dev/null +++ b/examples/neb/in.neb.hop1freeend @@ -0,0 +1,56 @@ +# 2d NEB surface simulation, hop from surface to become adatom + +dimension 2 +boundary p s p + +atom_style atomic +neighbor 0.3 bin +neigh_modify delay 5 +atom_modify map array sort 0 0.0 + +variable u uloop 20 + +# create geometry with flat surface + +lattice hex 0.9 +region box block 0 20 0 10 -0.25 0.25 + +read_data initial.hop1freeend + +# LJ potentials + +pair_style lj/cut 2.5 +pair_coeff * * 1.0 1.0 2.5 +pair_modify shift yes + +# define groups + +region 1 block INF INF INF 1.25 INF INF +group lower region 1 +group mobile subtract all lower +set group lower type 2 + +timestep 0.05 + +# group of NEB atoms - either block or single atom ID 412 + +region surround block 10 18 17 20 0 0 units box +group nebatoms region surround +#group nebatoms id 412 +set group nebatoms type 3 +group nonneb subtract all nebatoms + +fix 1 lower setforce 0.0 0.0 0.0 +fix 2 nebatoms neb 1.0 freeend ini +fix 3 all enforce2d + +thermo 100 + +#dump 1 nebatoms atom 10 dump.neb.$u +#dump 2 nonneb atom 10 dump.nonneb.$u + +# run NEB for 2000 steps or to force tolerance + +min_style quickmin + +neb 0.0 0.1 1000 1000 100 final final.hop1 diff --git a/examples/neb/initial.hop1freeend b/examples/neb/initial.hop1freeend new file mode 100644 index 0000000000..0357431fda --- /dev/null +++ b/examples/neb/initial.hop1freeend @@ -0,0 +1,860 @@ +LAMMPS data file via write_data, version 4 May 2017, timestep = 155 + +420 atoms +3 atom types + +0.0000000000000000e+00 2.2653923264628304e+01 xlo xhi +2.1918578738841410e-01 1.9932852254455714e+01 ylo yhi +-2.8317404080785380e-01 2.8317404080785380e-01 zlo zhi + +Masses + +1 1 +2 1 +3 1 + +Atoms # atomic + +1 2 0.0000000000000000e+00 2.2114806707013038e-01 0.0000000000000000e+00 0 0 0 +2 2 5.6634808161570760e-01 1.1832938184587634e+00 0.0000000000000000e+00 0 0 0 +3 2 1.1326961632314152e+00 2.2114806707013018e-01 0.0000000000000000e+00 0 0 0 +4 2 1.6990442448471228e+00 1.1832938184587634e+00 0.0000000000000000e+00 0 0 0 +5 2 2.2653923264628304e+00 2.2114806707013032e-01 0.0000000000000000e+00 0 0 0 +6 2 2.8317404080785380e+00 1.1832938184587634e+00 0.0000000000000000e+00 0 0 0 +7 2 3.3980884896942456e+00 2.2114806707013024e-01 0.0000000000000000e+00 0 0 0 +8 2 3.9644365713099532e+00 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +9 2 4.5307846529256608e+00 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +10 2 5.0971327345413684e+00 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +11 2 5.6634808161570760e+00 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +12 2 6.2298288977727836e+00 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +13 2 6.7961769793884912e+00 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +14 2 7.3625250610041988e+00 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +15 2 7.9288731426199064e+00 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +16 2 8.4952212242356140e+00 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +17 2 9.0615693058513216e+00 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +18 2 9.6279173874670292e+00 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +19 2 1.0194265469082737e+01 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +20 2 1.0760613550698444e+01 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +21 2 1.1326961632314152e+01 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +22 2 1.1893309713929860e+01 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +23 2 1.2459657795545567e+01 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +24 2 1.3026005877161275e+01 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +25 2 1.3592353958776982e+01 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +26 2 1.4158702040392690e+01 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +27 2 1.4725050122008398e+01 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +28 2 1.5291398203624105e+01 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +29 2 1.5857746285239813e+01 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +30 2 1.6424094366855520e+01 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +31 2 1.6990442448471228e+01 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +32 2 1.7556790530086936e+01 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +33 2 1.8123138611702643e+01 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +34 2 1.8689486693318351e+01 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +35 2 1.9255834774934058e+01 2.2114806707013010e-01 0.0000000000000000e+00 0 0 0 +36 2 1.9822182856549766e+01 1.1832938184587636e+00 0.0000000000000000e+00 0 0 0 +37 2 2.0388530938165474e+01 2.2114806707013024e-01 0.0000000000000000e+00 0 0 0 +38 2 2.0954879019781181e+01 1.1832938184587634e+00 0.0000000000000000e+00 0 0 0 +39 2 2.1521227101396889e+01 2.2114806707013043e-01 0.0000000000000000e+00 0 0 0 +40 2 2.2087575183012596e+01 1.1832938184587634e+00 0.0000000000000000e+00 0 0 0 +41 2 5.5197595012095140e-17 2.1414943053865136e+00 0.0000000000000000e+00 0 0 0 +42 1 5.6653050195082300e-01 3.1000166664180786e+00 0.0000000000000000e+00 0 0 0 +43 2 1.1326961632314152e+00 2.1414943053865136e+00 0.0000000000000000e+00 0 0 0 +44 1 1.6992713312703549e+00 3.1000339212153092e+00 0.0000000000000000e+00 0 0 0 +45 2 2.2653923264628304e+00 2.1414943053865136e+00 0.0000000000000000e+00 0 0 0 +46 1 2.8319979330663916e+00 3.1000568858502824e+00 0.0000000000000000e+00 0 0 0 +47 2 3.3980884896942456e+00 2.1414943053865136e+00 0.0000000000000000e+00 0 0 0 +48 1 3.9647072056144004e+00 3.1000829051868171e+00 0.0000000000000000e+00 0 0 0 +49 2 4.5307846529256608e+00 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +50 1 5.0973978903306154e+00 3.1001089282984520e+00 0.0000000000000000e+00 0 0 0 +51 2 5.6634808161570760e+00 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +52 1 6.2300706856774344e+00 3.1001320005511488e+00 0.0000000000000000e+00 0 0 0 +53 2 6.7961769793884912e+00 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +54 1 7.3627281418365298e+00 3.1001497026412643e+00 0.0000000000000000e+00 0 0 0 +55 2 7.9288731426199064e+00 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +56 1 8.4953743353575657e+00 3.1001604410839558e+00 0.0000000000000000e+00 0 0 0 +57 2 9.0615693058513216e+00 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +58 1 9.6280143647524650e+00 3.1001635457640377e+00 0.0000000000000000e+00 0 0 0 +59 2 1.0194265469082737e+01 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +60 1 1.0760653757776259e+01 3.1001591904894030e+00 0.0000000000000000e+00 0 0 0 +61 2 1.1326961632314152e+01 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +62 1 1.1893297897551465e+01 3.1001481997229781e+00 0.0000000000000000e+00 0 0 0 +63 2 1.2459657795545567e+01 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +64 1 1.3025951551034638e+01 3.1001318239711781e+00 0.0000000000000000e+00 0 0 0 +65 2 1.3592353958776982e+01 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +66 1 1.4158618530491893e+01 3.1001115545681470e+00 0.0000000000000000e+00 0 0 0 +67 2 1.4725050122008398e+01 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +68 1 1.5291301468763761e+01 3.1000890162853869e+00 0.0000000000000000e+00 0 0 0 +69 2 1.5857746285239813e+01 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +70 1 1.6424001663467980e+01 3.1000659357603495e+00 0.0000000000000000e+00 0 0 0 +71 2 1.6990442448471228e+01 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +72 1 1.7556718955895743e+01 3.1000441476131195e+00 0.0000000000000000e+00 0 0 0 +73 2 1.8123138611702643e+01 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +74 1 1.8689451647636982e+01 3.1000255781755963e+00 0.0000000000000000e+00 0 0 0 +75 2 1.9255834774934058e+01 2.1414943053865132e+00 0.0000000000000000e+00 0 0 0 +76 1 1.9822196505112320e+01 3.1000121466922494e+00 0.0000000000000000e+00 0 0 0 +77 2 2.0388530938165474e+01 2.1414943053865136e+00 0.0000000000000000e+00 0 0 0 +78 1 2.0954948927196146e+01 3.1000055506449713e+00 0.0000000000000000e+00 0 0 0 +79 2 2.1521227101396889e+01 2.1414943053865141e+00 0.0000000000000000e+00 0 0 0 +80 1 2.2087703334137267e+01 3.1000069547492535e+00 0.0000000000000000e+00 0 0 0 +81 1 3.1056926716504509e-04 4.0585004644184055e+00 0.0000000000000000e+00 0 0 0 +82 1 5.6689331628382078e-01 5.0169857265632762e+00 0.0000000000000000e+00 0 0 0 +83 1 1.1331010876667682e+00 4.0585336877518543e+00 0.0000000000000000e+00 0 0 0 +84 1 1.6997107179473134e+00 5.0170595571637469e+00 0.0000000000000000e+00 0 0 0 +85 1 2.2658691471408239e+00 4.0585832735991989e+00 0.0000000000000000e+00 0 0 0 +86 1 2.8324913387275488e+00 5.0171576059016481e+00 0.0000000000000000e+00 0 0 0 +87 1 3.3986077265334802e+00 4.0586437183143182e+00 0.0000000000000000e+00 0 0 0 +88 1 3.9652274946581523e+00 5.0172690174612651e+00 0.0000000000000000e+00 0 0 0 +89 1 4.5313127263524615e+00 4.0587080892871539e+00 0.0000000000000000e+00 0 0 0 +90 1 5.0979153202534064e+00 5.0173813990872880e+00 0.0000000000000000e+00 0 0 0 +91 1 5.6639833195247755e+00 4.0587690704404489e+00 0.0000000000000000e+00 0 0 0 +92 1 6.2305551824295442e+00 5.0174824868813017e+00 0.0000000000000000e+00 0 0 0 +93 1 6.7966220748571669e+00 4.0588200390400129e+00 0.0000000000000000e+00 0 0 0 +94 1 7.3631519876339633e+00 5.0175617795367824e+00 0.0000000000000000e+00 0 0 0 +95 1 7.9292347620768062e+00 4.0588559557915787e+00 0.0000000000000000e+00 0 0 0 +96 1 8.4957150696300925e+00 5.0176118394895646e+00 0.0000000000000000e+00 0 0 0 +97 1 9.0618297669257259e+00 4.0588738859603266e+00 0.0000000000000000e+00 0 0 0 +98 1 9.6282574219214077e+00 5.0176289672989007e+00 0.0000000000000000e+00 0 0 0 +99 1 1.0194417159454611e+01 4.0588730767572860e+00 0.0000000000000000e+00 0 0 0 +100 1 1.0760794315385466e+01 5.0176131474245498e+00 0.0000000000000000e+00 0 0 0 +101 1 1.1327007580768864e+01 4.0588546552053515e+00 0.0000000000000000e+00 0 0 0 +102 1 1.1893341583868121e+01 5.0175674119454996e+00 0.0000000000000000e+00 0 0 0 +103 1 1.2459611156068675e+01 4.0588211205885418e+00 0.0000000000000000e+00 0 0 0 +104 1 1.3025913928919357e+01 5.0174969437432848e+00 0.0000000000000000e+00 0 0 0 +105 1 1.3592236588154931e+01 4.0587758328652299e+00 0.0000000000000000e+00 0 0 0 +106 1 1.4158523495745847e+01 5.0174082592346645e+00 0.0000000000000000e+00 0 0 0 +107 1 1.4724890484932756e+01 4.0587226477181808e+00 0.0000000000000000e+00 0 0 0 +108 1 1.5291178803597106e+01 5.0173086870307237e+00 0.0000000000000000e+00 0 0 0 +109 1 1.5857576888353359e+01 4.0586657476126140e+00 0.0000000000000000e+00 0 0 0 +110 1 1.6423884000624799e+01 5.0172061640888863e+00 0.0000000000000000e+00 0 0 0 +111 1 1.6990296946466405e+01 4.0586096139851531e+00 0.0000000000000000e+00 0 0 0 +112 1 1.7556638404998214e+01 5.0171091825602536e+00 0.0000000000000000e+00 0 0 0 +113 1 1.8123048711157228e+01 4.0585590083330025e+00 0.0000000000000000e+00 0 0 0 +114 1 1.8689436384449273e+01 5.0170266065355777e+00 0.0000000000000000e+00 0 0 0 +115 1 1.9255827121600600e+01 4.0585188068824696e+00 0.0000000000000000e+00 0 0 0 +116 1 1.9822267727126505e+01 5.0169670887341100e+00 0.0000000000000000e+00 0 0 0 +117 1 2.0388624292977298e+01 4.0584935738800203e+00 0.0000000000000000e+00 0 0 0 +118 1 2.0955118660666272e+01 5.0169379847636248e+00 0.0000000000000000e+00 0 0 0 +119 1 2.1521430213723754e+01 4.0584868720623906e+00 0.0000000000000000e+00 0 0 0 +120 1 2.2087973498256840e+01 5.0169439545250629e+00 0.0000000000000000e+00 0 0 0 +121 1 6.5693888433665819e-04 5.9753894955957820e+00 0.0000000000000000e+00 0 0 0 +122 1 5.6732815172745055e-01 6.9338399304063270e+00 0.0000000000000000e+00 0 0 0 +123 1 1.1335287178365945e+00 5.9754794631117711e+00 0.0000000000000000e+00 0 0 0 +124 1 1.7002170239497103e+00 6.9340002985609068e+00 0.0000000000000000e+00 0 0 0 +125 1 2.2663607603415961e+00 5.9756128140497200e+00 0.0000000000000000e+00 0 0 0 +126 1 2.8330530781363672e+00 6.9342120448719999e+00 0.0000000000000000e+00 0 0 0 +127 1 3.3991419489134609e+00 5.9757753571666763e+00 0.0000000000000000e+00 0 0 0 +128 1 3.9658260192240613e+00 6.9344537679961507e+00 0.0000000000000000e+00 0 0 0 +129 1 4.5318648361825700e+00 5.9759497256682410e+00 0.0000000000000000e+00 0 0 0 +130 1 5.0985283212441441e+00 6.9347011709619251e+00 0.0000000000000000e+00 0 0 0 +131 1 5.6645260085061278e+00 5.9761173336292988e+00 0.0000000000000000e+00 0 0 0 +132 1 6.2311560978848899e+00 6.9349290616610286e+00 0.0000000000000000e+00 0 0 0 +133 1 6.7971269443565747e+00 5.9762605495489280e+00 0.0000000000000000e+00 0 0 0 +134 1 7.3637111409380722e+00 6.9351139899270322e+00 0.0000000000000000e+00 0 0 0 +135 1 7.9296749255956041e+00 5.9763649377635293e+00 0.0000000000000000e+00 0 0 0 +136 1 8.4962030194710927e+00 6.9352373287964380e+00 0.0000000000000000e+00 0 0 0 +137 1 9.0621832354873675e+00 5.9764210443253543e+00 0.0000000000000000e+00 0 0 0 +138 1 9.6286498073427680e+00 6.9352878316174378e+00 0.0000000000000000e+00 0 0 0 +139 1 1.0194670187278859e+01 5.9764252099845692e+00 0.0000000000000000e+00 0 0 0 +140 1 1.0761076657788550e+01 6.9352626758233988e+00 0.0000000000000000e+00 0 0 0 +141 1 1.1327157075090911e+01 5.9763792530010624e+00 0.0000000000000000e+00 0 0 0 +142 1 1.1893512574619942e+01 6.9351667929726579e+00 0.0000000000000000e+00 0 0 0 +143 1 1.2459665575239395e+01 5.9762893326393627e+00 0.0000000000000000e+00 0 0 0 +144 1 1.3025986375565017e+01 6.9350110693313853e+00 0.0000000000000000e+00 0 0 0 +145 1 1.3592215193397568e+01 5.9761645662970668e+00 0.0000000000000000e+00 0 0 0 +146 1 1.4158522852873338e+01 6.9348103731164086e+00 0.0000000000000000e+00 0 0 0 +147 1 1.4724821146400661e+01 5.9760159211600943e+00 0.0000000000000000e+00 0 0 0 +148 1 1.5291139696354101e+01 6.9345821426564456e+00 0.0000000000000000e+00 0 0 0 +149 1 1.5857492801384174e+01 5.9758556179168476e+00 0.0000000000000000e+00 0 0 0 +150 1 1.6423845342403485e+01 6.9343457083902562e+00 0.0000000000000000e+00 0 0 0 +151 1 1.6990232659392920e+01 5.9756969240409656e+00 0.0000000000000000e+00 0 0 0 +152 1 1.7556637811168688e+01 6.9341219348234606e+00 0.0000000000000000e+00 0 0 0 +153 1 1.8123035927190724e+01 5.9755539362099377e+00 0.0000000000000000e+00 0 0 0 +154 1 1.8689504786395585e+01 6.9339324030079297e+00 0.0000000000000000e+00 0 0 0 +155 1 1.9255890870078105e+01 5.9754408656724385e+00 0.0000000000000000e+00 0 0 0 +156 1 1.9822425360651039e+01 6.9337974543626846e+00 0.0000000000000000e+00 0 0 0 +157 1 2.0388780199969101e+01 5.9753705251759808e+00 0.0000000000000000e+00 0 0 0 +158 1 2.0955373611320280e+01 6.9337330661143222e+00 0.0000000000000000e+00 0 0 0 +159 1 2.1521683507254988e+01 5.9753521824721574e+00 0.0000000000000000e+00 0 0 0 +160 1 2.2088323232189435e+01 6.9337475792566039e+00 0.0000000000000000e+00 0 0 0 +161 1 1.1151815023353693e-03 7.8921416571122727e+00 0.0000000000000000e+00 0 0 0 +162 1 5.6789887436851039e-01 8.8505576275120745e+00 0.0000000000000000e+00 0 0 0 +163 1 1.1340615020344891e+00 7.8923152028921146e+00 0.0000000000000000e+00 0 0 0 +164 1 1.7008494977197184e+00 8.8508369646616227e+00 0.0000000000000000e+00 0 0 0 +165 1 2.2669564852467339e+00 7.8925678787693965e+00 0.0000000000000000e+00 0 0 0 +166 1 2.8337429988374914e+00 8.8512007799959171e+00 0.0000000000000000e+00 0 0 0 +167 1 3.3997890834793392e+00 7.8928753791925752e+00 0.0000000000000000e+00 0 0 0 +168 1 3.9665700017177907e+00 8.8516188392723496e+00 0.0000000000000000e+00 0 0 0 +169 1 4.5325491541722158e+00 7.8932093579911635e+00 0.0000000000000000e+00 0 0 0 +170 1 5.0993179760197034e+00 8.8520570451664753e+00 0.0000000000000000e+00 0 0 0 +171 1 5.6652272696563086e+00 7.8935385042762318e+00 0.0000000000000000e+00 0 0 0 +172 1 6.2319722558852177e+00 8.8524768944511472e+00 0.0000000000000000e+00 0 0 0 +173 1 6.7978170214800082e+00 7.8938302754648539e+00 0.0000000000000000e+00 0 0 0 +174 1 7.3645207249719933e+00 8.8528366651387476e+00 0.0000000000000000e+00 0 0 0 +175 1 7.9303191911043118e+00 7.8940542651579788e+00 0.0000000000000000e+00 0 0 0 +176 1 8.4969615618418324e+00 8.8530963542120293e+00 0.0000000000000000e+00 0 0 0 +177 1 9.0627458585593441e+00 7.8941868850969135e+00 0.0000000000000000e+00 0 0 0 +178 1 9.6293104463590424e+00 8.8532254399208412e+00 0.0000000000000000e+00 0 0 0 +179 1 1.0195121730902658e+01 7.8942152485172352e+00 0.0000000000000000e+00 0 0 0 +180 1 1.0761602408503441e+01 8.8532092085980238e+00 0.0000000000000000e+00 0 0 0 +181 1 1.1327481649719793e+01 7.8941385508356099e+00 0.0000000000000000e+00 0 0 0 +182 1 1.1893886870241856e+01 8.8530505445055354e+00 0.0000000000000000e+00 0 0 0 +183 1 1.2459865179342737e+01 7.8939667557582798e+00 0.0000000000000000e+00 0 0 0 +184 1 1.3026218291904378e+01 8.8527674547956821e+00 0.0000000000000000e+00 0 0 0 +185 1 1.3592310202433307e+01 7.8937178025905181e+00 0.0000000000000000e+00 0 0 0 +186 1 1.4158645900042497e+01 8.8523887379317436e+00 0.0000000000000000e+00 0 0 0 +187 1 1.4724847145311326e+01 7.8934149070498600e+00 0.0000000000000000e+00 0 0 0 +188 1 1.5291205081244327e+01 8.8519503874602243e+00 0.0000000000000000e+00 0 0 0 +189 1 1.5857494607334019e+01 7.8930848995638652e+00 0.0000000000000000e+00 0 0 0 +190 1 1.6423911366860466e+01 8.8514936483282209e+00 0.0000000000000000e+00 0 0 0 +191 1 1.6990256625068444e+01 7.8927574412240151e+00 0.0000000000000000e+00 0 0 0 +192 1 1.7556757521848787e+01 8.8510636099500459e+00 0.0000000000000000e+00 0 0 0 +193 1 1.8123121878813144e+01 7.8924640508501298e+00 0.0000000000000000e+00 0 0 0 +194 1 1.8689714850348466e+01 8.8507060559423465e+00 0.0000000000000000e+00 0 0 0 +195 1 1.9256065579477248e+01 7.8922356001392169e+00 0.0000000000000000e+00 0 0 0 +196 1 1.9822740225596814e+01 8.8504608774193994e+00 0.0000000000000000e+00 0 0 0 +197 1 2.0389054599310764e+01 7.8920977743942782e+00 0.0000000000000000e+00 0 0 0 +198 1 2.0955788196198530e+01 8.8503534864083591e+00 0.0000000000000000e+00 0 0 0 +199 1 2.1522054950758765e+01 7.8920658349416701e+00 0.0000000000000000e+00 0 0 0 +200 1 2.2088823030833748e+01 8.8503894045591807e+00 0.0000000000000000e+00 0 0 0 +201 1 1.7402898961801966e-03 9.8087331458102049e+00 0.0000000000000000e+00 0 0 0 +202 1 5.6862550253253785e-01 1.0767129063577668e+01 0.0000000000000000e+00 0 0 0 +203 1 1.1347351125604563e+00 9.8090210312609756e+00 0.0000000000000000e+00 0 0 0 +204 1 1.7016010961270076e+00 1.0767553944884048e+01 0.0000000000000000e+00 0 0 0 +205 1 2.2676800733457139e+00 9.8094251915038573e+00 0.0000000000000000e+00 0 0 0 +206 1 2.8345388558320415e+00 1.0768094021206529e+01 0.0000000000000000e+00 0 0 0 +207 1 3.4005711921286008e+00 9.8099146303251388e+00 0.0000000000000000e+00 0 0 0 +208 1 3.9674359888022686e+00 1.0768719604543580e+01 0.0000000000000000e+00 0 0 0 +209 1 4.5333977826109315e+00 9.8104561733570019e+00 0.0000000000000000e+00 0 0 0 +210 1 5.1002760963180327e+00 1.0769398202643465e+01 0.0000000000000000e+00 0 0 0 +211 1 5.6661407887052828e+00 9.8110111848429966e+00 0.0000000000000000e+00 0 0 0 +212 1 6.2330282022400469e+00 1.0770087202120337e+01 0.0000000000000000e+00 0 0 0 +213 1 6.7987755062394477e+00 9.8115326503110527e+00 0.0000000000000000e+00 0 0 0 +214 1 7.3656514287550623e+00 1.0770727843890981e+01 0.0000000000000000e+00 0 0 0 +215 1 7.9312798141889260e+00 9.8119658218493768e+00 0.0000000000000000e+00 0 0 0 +216 1 8.4981076412551477e+00 1.0771244633836279e+01 0.0000000000000000e+00 0 0 0 +217 1 9.0636474998261161e+00 9.8122560909429151e+00 0.0000000000000000e+00 0 0 0 +218 1 9.6303843877347930e+00 1.0771559046035311e+01 0.0000000000000000e+00 0 0 0 +219 1 1.0195900672859819e+01 9.8123627359180627e+00 0.0000000000000000e+00 0 0 0 +220 1 1.0762516251278290e+01 1.0771614844517241e+01 0.0000000000000000e+00 0 0 0 +221 1 1.1328091472906591e+01 9.8122692653101016e+00 0.0000000000000000e+00 0 0 0 +222 1 1.1894584725285364e+01 1.0771394980275380e+01 0.0000000000000000e+00 0 0 0 +223 1 1.2460291956550108e+01 9.8119854743716211e+00 0.0000000000000000e+00 0 0 0 +224 1 1.3026697175518089e+01 1.0770922584297365e+01 0.0000000000000000e+00 0 0 0 +225 1 1.3592577560562113e+01 9.8115426529845742e+00 0.0000000000000000e+00 0 0 0 +226 1 1.4158957523975143e+01 1.0770251678533704e+01 0.0000000000000000e+00 0 0 0 +227 1 1.4725010595311739e+01 9.8109868569230709e+00 0.0000000000000000e+00 0 0 0 +228 1 1.5291439665423439e+01 1.0769456959141509e+01 0.0000000000000000e+00 0 0 0 +229 1 1.5857627568713173e+01 9.8103742214932304e+00 0.0000000000000000e+00 0 0 0 +230 1 1.6424169320270668e+01 1.0768628052568168e+01 0.0000000000000000e+00 0 0 0 +231 1 1.6990431516954079e+01 9.8097684628141781e+00 0.0000000000000000e+00 0 0 0 +232 1 1.7557116532362020e+01 1.0767864432631596e+01 0.0000000000000000e+00 0 0 0 +233 1 1.8123390991250901e+01 9.8092369760472078e+00 0.0000000000000000e+00 0 0 0 +234 1 1.8690204705628890e+01 1.0767262063551410e+01 0.0000000000000000e+00 0 0 0 +235 1 1.9256448808830498e+01 9.8088413825519911e+00 0.0000000000000000e+00 0 0 0 +236 1 1.9823340586830241e+01 1.0766888821404979e+01 0.0000000000000000e+00 0 0 0 +237 1 2.0389541413400988e+01 9.8086229912274785e+00 0.0000000000000000e+00 0 0 0 +238 1 2.0956458511796701e+01 1.0766759511236279e+01 0.0000000000000000e+00 0 0 0 +239 1 2.1522621458778595e+01 9.8085916713182311e+00 0.0000000000000000e+00 0 0 0 +240 1 2.2089529168272502e+01 1.0766851883618157e+01 0.0000000000000000e+00 0 0 0 +241 1 2.5440858595377333e-03 1.1725176449724485e+01 0.0000000000000000e+00 0 0 0 +242 1 5.6945959459694062e-01 1.2683596360703445e+01 0.0000000000000000e+00 0 0 0 +243 1 1.1355189649219313e+00 1.1725603142335736e+01 0.0000000000000000e+00 0 0 0 +244 1 1.7023827890664067e+00 1.2684167657575470e+01 0.0000000000000000e+00 0 0 0 +245 1 2.2684713496063051e+00 1.1726169790097240e+01 0.0000000000000000e+00 0 0 0 +246 1 2.8353214317297493e+00 1.2684869845626739e+01 0.0000000000000000e+00 0 0 0 +247 1 3.4014115221528614e+00 1.1726849793467629e+01 0.0000000000000000e+00 0 0 0 +248 1 3.9682847366436711e+00 1.2685690043118647e+01 0.0000000000000000e+00 0 0 0 +249 1 4.5343333925353440e+00 1.1727620546655658e+01 0.0000000000000000e+00 0 0 0 +250 1 5.1012595788864648e+00 1.2686617936467927e+01 0.0000000000000000e+00 0 0 0 +251 1 5.6672100999124009e+00 1.1728453321807010e+01 0.0000000000000000e+00 0 0 0 +252 1 6.2342050679378476e+00 1.2687631443781253e+01 0.0000000000000000e+00 0 0 0 +253 1 6.7999929539663801e+00 1.1729301393807379e+01 0.0000000000000000e+00 0 0 0 +254 1 7.3670487632296053e+00 1.2688678524169049e+01 0.0000000000000000e+00 0 0 0 +255 1 7.9326168577620031e+00 1.1730088752185795e+01 0.0000000000000000e+00 0 0 0 +256 1 8.4996909972151879e+00 1.2689657545646673e+01 0.0000000000000000e+00 0 0 0 +257 1 9.0650186324858186e+00 1.1730705889838760e+01 0.0000000000000000e+00 0 0 0 +258 1 9.6320279172941738e+00 1.2690401359419884e+01 0.0000000000000000e+00 0 0 0 +259 1 1.0197176988949883e+01 1.1731033591325737e+01 0.0000000000000000e+00 0 0 0 +260 1 1.0764025265158372e+01 1.2690719979755405e+01 0.0000000000000000e+00 0 0 0 +261 1 1.1329151471753224e+01 1.1730992082437087e+01 0.0000000000000000e+00 0 0 0 +262 1 1.1895793457864773e+01 1.2690499952724066e+01 0.0000000000000000e+00 0 0 0 +263 1 1.2461074954083520e+01 1.1730568008302011e+01 0.0000000000000000e+00 0 0 0 +264 1 1.3027557263784812e+01 1.2689744664661927e+01 0.0000000000000000e+00 0 0 0 +265 1 1.3593109813371450e+01 1.1729811224797992e+01 0.0000000000000000e+00 0 0 0 +266 1 1.4159562461497188e+01 1.2688557996910490e+01 0.0000000000000000e+00 0 0 0 +267 1 1.4725395146103379e+01 1.1728816806025771e+01 0.0000000000000000e+00 0 0 0 +268 1 1.5291979336937130e+01 1.2687112353846338e+01 0.0000000000000000e+00 0 0 0 +269 1 1.5858003969640130e+01 1.1727709969544065e+01 0.0000000000000000e+00 0 0 0 +270 1 1.6424834380846097e+01 1.2685627373535834e+01 0.0000000000000000e+00 0 0 0 +271 1 1.6990919595491782e+01 1.1726637864021814e+01 0.0000000000000000e+00 0 0 0 +272 1 1.7557997576834389e+01 1.2684345428666392e+01 0.0000000000000000e+00 0 0 0 +273 1 1.8124040077451223e+01 1.1725751812758334e+01 0.0000000000000000e+00 0 0 0 +274 1 1.8691233014266899e+01 1.2683475493290855e+01 0.0000000000000000e+00 0 0 0 +275 1 1.9257221467828444e+01 1.1725167602985902e+01 0.0000000000000000e+00 0 0 0 +276 1 1.9824402296022900e+01 1.2683041511515679e+01 0.0000000000000000e+00 0 0 0 +277 1 2.0390369399207284e+01 1.1724905550220807e+01 0.0000000000000000e+00 0 0 0 +278 1 2.0957468093457749e+01 1.2682973372169659e+01 0.0000000000000000e+00 0 0 0 +279 1 2.1523449818304549e+01 1.1724927159323300e+01 0.0000000000000000e+00 0 0 0 +280 1 2.2090449109149038e+01 1.2683182366055206e+01 0.0000000000000000e+00 0 0 0 +281 1 3.4599372752678664e-03 1.3641562113178441e+01 0.0000000000000000e+00 0 0 0 +282 1 5.7026645299712297e-01 1.4600072778762289e+01 0.0000000000000000e+00 0 0 0 +283 1 1.1363018176625184e+00 1.3642122621820601e+01 0.0000000000000000e+00 0 0 0 +284 1 1.7030304397851530e+00 1.4600744808517264e+01 0.0000000000000000e+00 0 0 0 +285 1 2.2691832178537314e+00 1.3642819174389231e+01 0.0000000000000000e+00 0 0 0 +286 1 2.8358920720180945e+00 1.4601540713388465e+01 0.0000000000000000e+00 0 0 0 +287 1 3.4021290160499604e+00 1.3643644649633430e+01 0.0000000000000000e+00 0 0 0 +288 1 3.9688713598453158e+00 1.4602477110803298e+01 0.0000000000000000e+00 0 0 0 +289 1 4.5351441054704758e+00 1.3644605343002951e+01 0.0000000000000000e+00 0 0 0 +290 1 5.1019693529741863e+00 1.4603583498422479e+01 0.0000000000000000e+00 0 0 0 +291 1 5.6682074099496385e+00 1.3645707993168530e+01 0.0000000000000000e+00 0 0 0 +292 1 6.2351598742721581e+00 1.4604888485699654e+01 0.0000000000000000e+00 0 0 0 +293 1 6.8012626955016664e+00 1.3646941178415421e+01 0.0000000000000000e+00 0 0 0 +294 1 7.3683745276621622e+00 1.4606397643582930e+01 0.0000000000000000e+00 0 0 0 +295 1 7.9342088141787288e+00 1.3648248663869856e+01 0.0000000000000000e+00 0 0 0 +296 1 8.5014805494154277e+00 1.4608055299059714e+01 0.0000000000000000e+00 0 0 0 +297 1 9.0668968877652869e+00 1.3649493406156790e+01 0.0000000000000000e+00 0 0 0 +298 1 9.6342620410232698e+00 1.4609684783907733e+01 0.0000000000000000e+00 0 0 0 +299 1 1.0199152905272882e+01 1.3650407439181874e+01 0.0000000000000000e+00 0 0 0 +300 1 1.0766413330496736e+01 1.4610836305969919e+01 0.0000000000000000e+00 0 0 0 +301 1 1.1330921232704116e+01 1.3650669393063648e+01 0.0000000000000000e+00 0 0 0 +302 1 1.1897841502623006e+01 1.4610930556808350e+01 0.0000000000000000e+00 0 0 0 +303 1 1.2462421601307861e+01 1.3650120591395567e+01 0.0000000000000000e+00 0 0 0 +304 1 1.3029018938638984e+01 1.4609761134444172e+01 0.0000000000000000e+00 0 0 0 +305 1 1.3594046992755665e+01 1.3648816127477271e+01 0.0000000000000000e+00 0 0 0 +306 1 1.4160647838817273e+01 1.4607529632893289e+01 0.0000000000000000e+00 0 0 0 +307 1 1.4726158301286814e+01 1.3646976680611393e+01 0.0000000000000000e+00 0 0 0 +308 1 1.5293172565463893e+01 1.4604737496674128e+01 0.0000000000000000e+00 0 0 0 +309 1 1.5858902039329786e+01 1.3644935977195637e+01 0.0000000000000000e+00 0 0 0 +310 1 1.6426542400228328e+01 1.4602024837155536e+01 0.0000000000000000e+00 0 0 0 +311 1 1.6992136000094352e+01 1.3643085312965626e+01 0.0000000000000000e+00 0 0 0 +312 1 1.7559955069272618e+01 1.4600235886953440e+01 0.0000000000000000e+00 0 0 0 +313 1 1.8125444003110619e+01 1.3641827838397322e+01 0.0000000000000000e+00 0 0 0 +314 1 1.8693119558449155e+01 1.4599324386000902e+01 0.0000000000000000e+00 0 0 0 +315 1 1.9258622464532973e+01 1.3641178402937728e+01 0.0000000000000000e+00 0 0 0 +316 1 1.9826034884164418e+01 1.4599040434292966e+01 0.0000000000000000e+00 0 0 0 +317 1 2.0391639577074734e+01 1.3641005830730871e+01 0.0000000000000000e+00 0 0 0 +318 1 2.0958793244869717e+01 1.4599158580846662e+01 0.0000000000000000e+00 0 0 0 +319 1 2.1524539566888354e+01 1.3641168546895004e+01 0.0000000000000000e+00 0 0 0 +320 1 2.2091487241099536e+01 1.4599530965127977e+01 0.0000000000000000e+00 0 0 0 +321 1 4.3165808837657372e-03 1.5558056864296654e+01 0.0000000000000000e+00 0 0 0 +322 1 5.7083714563799326e-01 1.6516708751979007e+01 0.0000000000000000e+00 0 0 0 +323 1 1.1369032012442155e+00 1.5558694023524415e+01 0.0000000000000000e+00 0 0 0 +324 1 1.7033478671452040e+00 1.6517390053019362e+01 0.0000000000000000e+00 0 0 0 +325 1 2.2696166894760093e+00 1.5559438272441989e+01 0.0000000000000000e+00 0 0 0 +326 1 2.8360390517176817e+00 1.6518173675862919e+01 0.0000000000000000e+00 0 0 0 +327 1 3.4024835472607537e+00 1.5560308985846410e+01 0.0000000000000000e+00 0 0 0 +328 1 3.9689280293273477e+00 1.6519102391285173e+01 0.0000000000000000e+00 0 0 0 +329 1 4.5355194771089229e+00 1.5561347597079759e+01 0.0000000000000000e+00 0 0 0 +330 1 5.1020300316691811e+00 1.6520241802728972e+01 0.0000000000000000e+00 0 0 0 +331 1 5.6687261068083830e+00 1.5562609975559823e+01 0.0000000000000000e+00 0 0 0 +332 1 6.2353553251066147e+00 1.6521676870813170e+01 0.0000000000000000e+00 0 0 0 +333 1 6.8020803209306022e+00 1.5564154380715671e+01 0.0000000000000000e+00 0 0 0 +334 1 7.3688969132482525e+00 1.6523504940606951e+01 0.0000000000000000e+00 0 0 0 +335 1 7.9355107433004930e+00 1.5566016713593251e+01 0.0000000000000000e+00 0 0 0 +336 1 8.5025988576228730e+00 1.6525815249413437e+01 0.0000000000000000e+00 0 0 0 +337 1 9.0688572861916743e+00 1.5568159644275148e+01 0.0000000000000000e+00 0 0 0 +338 1 9.6362867759002064e+00 1.6528628994685398e+01 0.0000000000000000e+00 0 0 0 +339 1 1.0201819017728946e+01 1.5570385216229328e+01 0.0000000000000000e+00 0 0 0 +340 1 1.0769583800973923e+01 1.6531845844888416e+01 0.0000000000000000e+00 0 0 0 +341 1 1.1333827071325254e+01 1.5571891707346142e+01 0.0000000000000000e+00 0 0 0 +342 1 1.1901384079738815e+01 1.6533906438348030e+01 0.0000000000000000e+00 0 0 0 +343 1 1.2464735369608531e+01 1.5571536667850689e+01 0.0000000000000000e+00 0 0 0 +344 1 1.3031616332415751e+01 1.6532264065445577e+01 0.0000000000000000e+00 0 0 0 +345 1 1.3595655007692846e+01 1.5569123466092078e+01 0.0000000000000000e+00 0 0 0 +346 1 1.4162673858547034e+01 1.6527452690896975e+01 0.0000000000000000e+00 0 0 0 +347 1 1.4727720485417455e+01 1.5565353830287787e+01 0.0000000000000000e+00 0 0 0 +348 1 1.5296922688141537e+01 1.6520776714395723e+01 0.0000000000000000e+00 0 0 0 +349 1 1.5861362778086731e+01 1.5561222799294468e+01 0.0000000000000000e+00 0 0 0 +350 1 1.6430601172841506e+01 1.6517208583528205e+01 0.0000000000000000e+00 0 0 0 +351 1 1.6994922716392164e+01 1.5558699760506759e+01 0.0000000000000000e+00 0 0 0 +352 1 1.7563499738678178e+01 1.6515675589984340e+01 0.0000000000000000e+00 0 0 0 +353 1 1.8128019408521833e+01 1.5557486534354460e+01 0.0000000000000000e+00 0 0 0 +354 1 1.8695872352982320e+01 1.6515215010141834e+01 0.0000000000000000e+00 0 0 0 +355 1 1.9260742856192188e+01 1.5557098710840322e+01 0.0000000000000000e+00 0 0 0 +356 1 1.9828039670247652e+01 1.6515278710047973e+01 0.0000000000000000e+00 0 0 0 +357 1 2.0393271644052639e+01 1.5557181842904438e+01 0.0000000000000000e+00 0 0 0 +358 1 2.0960186167839215e+01 1.6515618076673135e+01 0.0000000000000000e+00 0 0 0 +359 1 2.1525740973565441e+01 1.5557536533469163e+01 0.0000000000000000e+00 0 0 0 +360 1 2.2092409007659992e+01 1.6516113225524911e+01 0.0000000000000000e+00 0 0 0 +361 1 4.8529541639103424e-03 1.7474826118864232e+01 0.0000000000000000e+00 0 0 0 +362 1 5.7093835977538809e-01 1.8433654344787417e+01 0.0000000000000000e+00 0 0 0 +363 1 1.1371184592334547e+00 1.7475436697267657e+01 0.0000000000000000e+00 0 0 0 +364 1 1.7031721612449391e+00 1.8434245395923575e+01 0.0000000000000000e+00 0 0 0 +365 1 2.2695912343467985e+00 1.7476125500853652e+01 0.0000000000000000e+00 0 0 0 +366 1 2.8356286616018873e+00 1.8434926390559969e+01 0.0000000000000000e+00 0 0 0 +367 1 3.4022762478393873e+00 1.7476929029147396e+01 0.0000000000000000e+00 0 0 0 +368 1 3.9683006032101118e+00 1.8435747821965681e+01 0.0000000000000000e+00 0 0 0 +369 1 4.5351848152653442e+00 1.7477909278192492e+01 0.0000000000000000e+00 0 0 0 +370 1 5.1011966627212457e+00 1.8436786379097875e+01 0.0000000000000000e+00 0 0 0 +371 1 5.6683370882181823e+00 1.7479154484464996e+01 0.0000000000000000e+00 0 0 0 +372 1 6.2343468444568826e+00 1.8438149387991913e+01 0.0000000000000000e+00 0 0 0 +373 1 6.8017614989468314e+00 1.7480782103907771e+01 0.0000000000000000e+00 0 0 0 +374 1 7.3678106610096554e+00 1.8439986240742563e+01 0.0000000000000000e+00 0 0 0 +375 1 7.9354841298542631e+00 1.7482944033551004e+01 0.0000000000000000e+00 0 0 0 +376 1 8.5016878917981664e+00 1.8442513240991936e+01 0.0000000000000000e+00 0 0 0 +377 1 9.0694835466447152e+00 1.7485826099637269e+01 0.0000000000000000e+00 0 0 0 +378 1 9.6361298737773780e+00 1.8446058020412732e+01 0.0000000000000000e+00 0 0 0 +379 3 1.0203552137528503e+01 1.7489611887918201e+01 0.0000000000000000e+00 0 0 0 +380 3 1.0771411102042309e+01 1.8452757080501815e+01 0.0000000000000000e+00 0 0 0 +381 3 1.1337379036649208e+01 1.7494680029430171e+01 0.0000000000000000e+00 0 0 0 +382 3 1.1906745469447291e+01 1.8462022833637111e+01 0.0000000000000000e+00 0 0 0 +383 3 1.2469280552911147e+01 1.7497259990645460e+01 0.0000000000000000e+00 0 0 0 +384 3 1.3036336275216634e+01 1.8467761987124586e+01 0.0000000000000000e+00 0 0 0 +385 3 1.3598327635293121e+01 1.7492598542232617e+01 0.0000000000000000e+00 0 0 0 +386 3 1.4175415687021504e+01 1.8442378825657116e+01 0.0000000000000000e+00 0 0 0 +387 3 1.4734039006741700e+01 1.7480807237018496e+01 0.0000000000000000e+00 0 0 0 +388 3 1.5307067776131944e+01 1.8435324828663727e+01 0.0000000000000000e+00 0 0 0 +389 3 1.5867533841026015e+01 1.7475841850521086e+01 0.0000000000000000e+00 0 0 0 +390 3 1.6437492616293390e+01 1.8432690656917494e+01 0.0000000000000000e+00 0 0 0 +391 3 1.6999775067986949e+01 1.7473899503923125e+01 0.0000000000000000e+00 0 0 0 +392 3 1.7567888910690055e+01 1.8431965422256074e+01 0.0000000000000000e+00 0 0 0 +393 1 1.8131542880564929e+01 1.7473449678636637e+01 0.0000000000000000e+00 0 0 0 +394 1 1.8698655140485940e+01 1.8432031695013379e+01 0.0000000000000000e+00 0 0 0 +395 1 1.9263155459010161e+01 1.7473512474723787e+01 0.0000000000000000e+00 0 0 0 +396 1 1.9829735002682860e+01 1.8432284732233299e+01 0.0000000000000000e+00 0 0 0 +397 1 2.0394851027090610e+01 1.7473827778588312e+01 0.0000000000000000e+00 0 0 0 +398 1 2.0961149629160545e+01 1.8432663919612150e+01 0.0000000000000000e+00 0 0 0 +399 1 2.1526715232103822e+01 1.7474283624212315e+01 0.0000000000000000e+00 0 0 0 +400 1 2.2092870034810801e+01 1.8433127631588540e+01 0.0000000000000000e+00 0 0 0 +401 1 4.8013042136807321e-03 1.9396043340320471e+01 0.0000000000000000e+00 0 0 0 +402 1 1.1367941837037772e+00 1.9396530996055038e+01 0.0000000000000000e+00 0 0 0 +403 1 2.2690256110731926e+00 1.9397098404349112e+01 0.0000000000000000e+00 0 0 0 +404 1 3.4014603716469214e+00 1.9397780714315690e+01 0.0000000000000000e+00 0 0 0 +405 1 4.5340819027961929e+00 1.9398637844588755e+01 0.0000000000000000e+00 0 0 0 +406 1 5.6668967352607975e+00 1.9399756780683603e+01 0.0000000000000000e+00 0 0 0 +407 1 6.7999442980869498e+00 1.9401258783163115e+01 0.0000000000000000e+00 0 0 0 +408 1 7.9333186797521877e+00 1.9403316975932661e+01 0.0000000000000000e+00 0 0 0 +409 1 9.0672196895765094e+00 1.9406194727028712e+01 0.0000000000000000e+00 0 0 0 +410 3 1.0202094493927524e+01 1.9410357283161499e+01 0.0000000000000000e+00 0 0 0 +411 3 1.1344493619984819e+01 1.9424786980556338e+01 0.0000000000000000e+00 0 0 0 +412 3 1.2637742177785299e+01 1.9930889974773997e+01 0.0000000000000000e+00 0 0 0 +413 3 1.3631034994726834e+01 1.9413135103231994e+01 0.0000000000000000e+00 0 0 0 +414 3 1.4752642655140622e+01 1.9401337789912994e+01 0.0000000000000000e+00 0 0 0 +415 3 1.5877850085888255e+01 1.9396855373999653e+01 0.0000000000000000e+00 0 0 0 +416 3 1.7005401679016000e+01 1.9395287677046394e+01 0.0000000000000000e+00 0 0 0 +417 1 1.8134615217150579e+01 1.9394983390043944e+01 0.0000000000000000e+00 0 0 0 +418 1 1.9264825666738730e+01 1.9395059679793604e+01 0.0000000000000000e+00 0 0 0 +419 1 2.0395687437852093e+01 1.9395286212420899e+01 0.0000000000000000e+00 0 0 0 +420 1 2.1527023164623820e+01 1.9395624428209523e+01 0.0000000000000000e+00 0 0 0 + +Velocities + +1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +10 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +11 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +12 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +13 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +14 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +15 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +16 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +17 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +30 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +31 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +32 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +33 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +34 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +35 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +36 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +37 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +38 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +39 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +40 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +41 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +42 1.4582830912290846e-05 8.8846352819582645e-06 0.0000000000000000e+00 +43 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +44 1.7312859198533731e-05 8.9315474912415886e-06 0.0000000000000000e+00 +45 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +46 1.9675072488620216e-05 9.1850485538530490e-06 0.0000000000000000e+00 +47 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +48 2.1433074233334628e-05 9.6286706528260491e-06 0.0000000000000000e+00 +49 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +50 2.2405931370299284e-05 1.0203419110643709e-05 0.0000000000000000e+00 +51 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +52 2.2491059900157929e-05 1.0820884817441812e-05 0.0000000000000000e+00 +53 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +54 2.1681031416712071e-05 1.1392109985469690e-05 0.0000000000000000e+00 +55 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +56 2.0060641760669130e-05 1.1861625865799975e-05 0.0000000000000000e+00 +57 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +58 1.7796484401635950e-05 1.2218953480137158e-05 0.0000000000000000e+00 +59 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +60 1.5112094617093786e-05 1.2477438154365889e-05 0.0000000000000000e+00 +61 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +62 1.2267198630926124e-05 1.2639445999779870e-05 0.0000000000000000e+00 +63 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +64 9.5350822789358476e-06 1.2675742401072055e-05 0.0000000000000000e+00 +65 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +66 7.1824119616190063e-06 1.2539493069881058e-05 0.0000000000000000e+00 +67 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +68 5.4428729520064613e-06 1.2202930059423273e-05 0.0000000000000000e+00 +69 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +70 4.4916342132800272e-06 1.1686680302800539e-05 0.0000000000000000e+00 +71 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +72 4.4211188598874964e-06 1.1059784694772424e-05 0.0000000000000000e+00 +73 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +74 5.2335171901646275e-06 1.0413115381938121e-05 0.0000000000000000e+00 +75 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +76 6.8418345483267640e-06 9.8270961040952689e-06 0.0000000000000000e+00 +77 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +78 9.0862581078626780e-06 9.3562441357185347e-06 0.0000000000000000e+00 +79 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +80 1.1750898218046424e-05 9.0341536486321376e-06 0.0000000000000000e+00 +81 2.6507896911975861e-05 1.6371545140358991e-05 0.0000000000000000e+00 +82 4.4071318998573086e-05 2.1693750644120881e-05 0.0000000000000000e+00 +83 3.1968282279407066e-05 1.6236651087870452e-05 0.0000000000000000e+00 +84 5.1796828963389391e-05 2.2204255617741203e-05 0.0000000000000000e+00 +85 3.6954144790935994e-05 1.6513220966131449e-05 0.0000000000000000e+00 +86 5.8466837911599906e-05 2.3765145047455889e-05 0.0000000000000000e+00 +87 4.0988263449448856e-05 1.7195597287912591e-05 0.0000000000000000e+00 +88 6.3421700984930829e-05 2.6202560196158383e-05 0.0000000000000000e+00 +89 4.3676514981254302e-05 1.8262201659237366e-05 0.0000000000000000e+00 +90 6.6189231995872341e-05 2.9208208903089284e-05 0.0000000000000000e+00 +91 4.4757820844412710e-05 1.9680681285465242e-05 0.0000000000000000e+00 +92 6.6503049702947023e-05 3.2363912757959332e-05 0.0000000000000000e+00 +93 4.4112984955796063e-05 2.1371026788621213e-05 0.0000000000000000e+00 +94 6.4345177020566643e-05 3.5287785267920645e-05 0.0000000000000000e+00 +95 4.1787976800244936e-05 2.3162941413835267e-05 0.0000000000000000e+00 +96 5.9928744845970383e-05 3.7723007380205399e-05 0.0000000000000000e+00 +97 3.7995079634412303e-05 2.4792875906820557e-05 0.0000000000000000e+00 +98 5.3679482622744082e-05 3.9576112916242527e-05 0.0000000000000000e+00 +99 3.3102802347870566e-05 2.5962643816709875e-05 0.0000000000000000e+00 +100 4.6196928202386916e-05 4.0841431876258162e-05 0.0000000000000000e+00 +101 2.7604731797030090e-05 2.6452929465938663e-05 0.0000000000000000e+00 +102 3.8198605610544056e-05 4.1488731650403403e-05 0.0000000000000000e+00 +103 2.2062125644364829e-05 2.6211631192676194e-05 0.0000000000000000e+00 +104 3.0461532031511585e-05 4.1405446569862951e-05 0.0000000000000000e+00 +105 1.7036890410487144e-05 2.5367151114186193e-05 0.0000000000000000e+00 +106 2.3743747198513856e-05 4.0442707371844690e-05 0.0000000000000000e+00 +107 1.3025410253023063e-05 2.4148417954514280e-05 0.0000000000000000e+00 +108 1.8714618137705143e-05 3.8535713097978544e-05 0.0000000000000000e+00 +109 1.0408634299164180e-05 2.2777378345262281e-05 0.0000000000000000e+00 +110 1.5879886471080462e-05 3.5803991688099920e-05 0.0000000000000000e+00 +111 9.4236282619897256e-06 2.1395799353203516e-05 0.0000000000000000e+00 +112 1.5528508660313246e-05 3.2559849894401442e-05 0.0000000000000000e+00 +113 1.0151636970505765e-05 2.0069631778223131e-05 0.0000000000000000e+00 +114 1.7697076907652322e-05 2.9219489273322326e-05 0.0000000000000000e+00 +115 1.2515393741428794e-05 1.8835255026813244e-05 0.0000000000000000e+00 +116 2.2166639673992795e-05 2.6190973817683679e-05 0.0000000000000000e+00 +117 1.6287686218571795e-05 1.7749195377506077e-05 0.0000000000000000e+00 +118 2.8490182736201632e-05 2.3793837746782787e-05 0.0000000000000000e+00 +119 2.1107512829311378e-05 1.6897890319175769e-05 0.0000000000000000e+00 +120 3.6037837106045466e-05 2.2245603004594772e-05 0.0000000000000000e+00 +121 5.3754680927831089e-05 2.5818243561840512e-05 0.0000000000000000e+00 +122 7.3852984703953750e-05 2.7472934391924166e-05 0.0000000000000000e+00 +123 6.4028996009385391e-05 2.5673459200729887e-05 0.0000000000000000e+00 +124 8.5908169593167111e-05 2.8779655657983422e-05 0.0000000000000000e+00 +125 7.3452059594226324e-05 2.6972883064637495e-05 0.0000000000000000e+00 +126 9.6325597970378315e-05 3.2438649799599460e-05 0.0000000000000000e+00 +127 8.1100712408732978e-05 2.9661132010523619e-05 0.0000000000000000e+00 +128 1.0416393664254911e-04 3.7996059391476322e-05 0.0000000000000000e+00 +129 8.6279187735689372e-05 3.3655093070911189e-05 0.0000000000000000e+00 +130 1.0867812733907078e-04 4.4662561906767820e-05 0.0000000000000000e+00 +131 8.8474833676771911e-05 3.8743354165649700e-05 0.0000000000000000e+00 +132 1.0953332540892396e-04 5.1642519960343192e-05 0.0000000000000000e+00 +133 8.7489301482666931e-05 4.4565301821478113e-05 0.0000000000000000e+00 +134 1.0664519563149365e-04 5.8191926603172465e-05 0.0000000000000000e+00 +135 8.3386685919597045e-05 5.0496180582897816e-05 0.0000000000000000e+00 +136 1.0029664202627839e-04 6.3854180722835299e-05 0.0000000000000000e+00 +137 7.6554421387387345e-05 5.5724916856637890e-05 0.0000000000000000e+00 +138 9.1026233328924885e-05 6.8337584627018583e-05 0.0000000000000000e+00 +139 6.7636782318513533e-05 5.9415263115523977e-05 0.0000000000000000e+00 +140 7.9687801662836277e-05 7.1465060890868459e-05 0.0000000000000000e+00 +141 5.7497112140338785e-05 6.0967609586633220e-05 0.0000000000000000e+00 +142 6.7357844628560681e-05 7.3031410372387953e-05 0.0000000000000000e+00 +143 4.7129030804640708e-05 6.0212629249287861e-05 0.0000000000000000e+00 +144 5.5250218292995579e-05 7.2797466423152327e-05 0.0000000000000000e+00 +145 3.7563119690651669e-05 5.7436898093437411e-05 0.0000000000000000e+00 +146 4.4567659752612482e-05 7.0555413628180241e-05 0.0000000000000000e+00 +147 2.9761856381290211e-05 5.3240161725660877e-05 0.0000000000000000e+00 +148 3.6379968408071024e-05 6.6254587745984145e-05 0.0000000000000000e+00 +149 2.4507249328654254e-05 4.8297754292616488e-05 0.0000000000000000e+00 +150 3.1513287993668526e-05 6.0149614548130757e-05 0.0000000000000000e+00 +151 2.2321658045569226e-05 4.3171432510556026e-05 0.0000000000000000e+00 +152 3.0489149535510922e-05 5.2826430989590112e-05 0.0000000000000000e+00 +153 2.3406691442805219e-05 3.8251620084219645e-05 0.0000000000000000e+00 +154 3.3434005351227340e-05 4.5149642749209296e-05 0.0000000000000000e+00 +155 2.7646263937105427e-05 3.3806816567877322e-05 0.0000000000000000e+00 +156 4.0072022728543377e-05 3.8051851023877120e-05 0.0000000000000000e+00 +157 3.4612453095456479e-05 3.0084179504664271e-05 0.0000000000000000e+00 +158 4.9715995320497382e-05 3.2366348850974144e-05 0.0000000000000000e+00 +159 4.3610755492928814e-05 2.7338724794948033e-05 0.0000000000000000e+00 +160 6.1380291935873857e-05 2.8717537667974358e-05 0.0000000000000000e+00 +161 8.1494982491825407e-05 2.8148953219575557e-05 0.0000000000000000e+00 +162 1.0332280599497646e-04 2.6201503829225565e-05 0.0000000000000000e+00 +163 9.5761847160871774e-05 2.7946357434336516e-05 0.0000000000000000e+00 +164 1.1864695815872809e-04 2.8356135457834722e-05 0.0000000000000000e+00 +165 1.0885399470738391e-04 3.0748146450938071e-05 0.0000000000000000e+00 +166 1.3196232705661449e-04 3.4623883717438410e-05 0.0000000000000000e+00 +167 1.1960145227112585e-04 3.6566084099414615e-05 0.0000000000000000e+00 +168 1.4195026861275745e-04 4.3922046815628174e-05 0.0000000000000000e+00 +169 1.2694731664409029e-04 4.5104351462522260e-05 0.0000000000000000e+00 +170 1.4795217588335909e-04 5.5130340832613979e-05 0.0000000000000000e+00 +171 1.3031757484079781e-04 5.5906601170376687e-05 0.0000000000000000e+00 +172 1.4942385512754647e-04 6.7008660580344934e-05 0.0000000000000000e+00 +173 1.2933895493945637e-04 6.7959205844179285e-05 0.0000000000000000e+00 +174 1.4640862693120205e-04 7.8808347871067721e-05 0.0000000000000000e+00 +175 1.2418770632620368e-04 7.9948632905278019e-05 0.0000000000000000e+00 +176 1.3899686227644703e-04 8.9704374162949410e-05 0.0000000000000000e+00 +177 1.1530175670323509e-04 9.0294899930563893e-05 0.0000000000000000e+00 +178 1.2781482749801704e-04 9.8919094420893419e-05 0.0000000000000000e+00 +179 1.0353662297703481e-04 9.7655023731693666e-05 0.0000000000000000e+00 +180 1.1373191796318627e-04 1.0541969215504335e-04 0.0000000000000000e+00 +181 8.9924310567240939e-05 1.0107679026970171e-04 0.0000000000000000e+00 +182 9.8144155759054283e-05 1.0842945197242355e-04 0.0000000000000000e+00 +183 7.5715426026251240e-05 1.0020899633485792e-04 0.0000000000000000e+00 +184 8.2585472575644195e-05 1.0759497773947524e-04 0.0000000000000000e+00 +185 6.2273313315312773e-05 9.5280171371694988e-05 0.0000000000000000e+00 +186 6.8676150395344254e-05 1.0303784847881596e-04 0.0000000000000000e+00 +187 5.0970916505555661e-05 8.7088088473526171e-05 0.0000000000000000e+00 +188 5.7773431465618642e-05 9.5162943772818259e-05 0.0000000000000000e+00 +189 4.3046171895633206e-05 7.6794608467548045e-05 0.0000000000000000e+00 +190 5.1018825812688962e-05 8.4471826448580955e-05 0.0000000000000000e+00 +191 3.9350805046373119e-05 6.5685772521718177e-05 0.0000000000000000e+00 +192 4.9118794840322114e-05 7.1798478806600616e-05 0.0000000000000000e+00 +193 4.0296544731752153e-05 5.4848218154306130e-05 0.0000000000000000e+00 +194 5.2373823993379091e-05 5.8337807582076184e-05 0.0000000000000000e+00 +195 4.5754994278033105e-05 4.5116316024063770e-05 0.0000000000000000e+00 +196 6.0480102795976155e-05 4.5653533328626764e-05 0.0000000000000000e+00 +197 5.5147574075957093e-05 3.7092945765346277e-05 0.0000000000000000e+00 +198 7.2607642712602124e-05 3.5308098903458904e-05 0.0000000000000000e+00 +199 6.7490113431981086e-05 3.1302088338741595e-05 0.0000000000000000e+00 +200 8.7399794370653100e-05 2.8568976378293145e-05 0.0000000000000000e+00 +201 1.0893722215793989e-04 2.3548242675947018e-05 0.0000000000000000e+00 +202 1.3096734611020011e-04 1.8222479559561189e-05 0.0000000000000000e+00 +203 1.2587405764826476e-04 2.3075086083653581e-05 0.0000000000000000e+00 +204 1.4794813469964918e-04 2.1310741972757686e-05 0.0000000000000000e+00 +205 1.4140062010542452e-04 2.7813335553710658e-05 0.0000000000000000e+00 +206 1.6232505969042551e-04 3.0392445992766945e-05 0.0000000000000000e+00 +207 1.5397074924697088e-04 3.7554013992723016e-05 0.0000000000000000e+00 +208 1.7307084911688810e-04 4.3967269632201604e-05 0.0000000000000000e+00 +209 1.6265299884253917e-04 5.1975640619979227e-05 0.0000000000000000e+00 +210 1.7920198664424654e-04 6.0190020213309052e-05 0.0000000000000000e+00 +211 1.6652150024137926e-04 6.9718144800536699e-05 0.0000000000000000e+00 +212 1.8081789854731273e-04 7.8360099041392683e-05 0.0000000000000000e+00 +213 1.6556181720350750e-04 8.9018344965798718e-05 0.0000000000000000e+00 +214 1.7752817256212197e-04 9.7575999242155437e-05 0.0000000000000000e+00 +215 1.5977208852566740e-04 1.0737397867986304e-04 0.0000000000000000e+00 +216 1.6979140654165145e-04 1.1697357648400367e-04 0.0000000000000000e+00 +217 1.4991716557360079e-04 1.2288188040735228e-04 0.0000000000000000e+00 +218 1.5773246565703171e-04 1.3407831270088809e-04 0.0000000000000000e+00 +219 1.3669127604115129e-04 1.3409320273816903e-04 0.0000000000000000e+00 +220 1.4251229678068216e-04 1.4611735938454550e-04 0.0000000000000000e+00 +221 1.2122307334826826e-04 1.4035076438954076e-04 0.0000000000000000e+00 +222 1.2529950168048559e-04 1.5081786662543979e-04 0.0000000000000000e+00 +223 1.0469592755885001e-04 1.4095013503932427e-04 0.0000000000000000e+00 +224 1.0808583047877408e-04 1.4794462550140816e-04 0.0000000000000000e+00 +225 8.8627241500263001e-05 1.3548056521811501e-04 0.0000000000000000e+00 +226 9.2458332531887566e-05 1.3885968265358318e-04 0.0000000000000000e+00 +227 7.4741877098264211e-05 1.2401626995789950e-04 0.0000000000000000e+00 +228 8.0205883060811833e-05 1.2520982577425913e-04 0.0000000000000000e+00 +229 6.4625586397733592e-05 1.0787656142000266e-04 0.0000000000000000e+00 +230 7.2455365263725255e-05 1.0828209149006050e-04 0.0000000000000000e+00 +231 5.9588283630412220e-05 8.9170324651604443e-05 0.0000000000000000e+00 +232 7.0192628935414336e-05 8.8909581629389317e-05 0.0000000000000000e+00 +233 6.0204784194593798e-05 7.0300012127155753e-05 0.0000000000000000e+00 +234 7.3736654845263383e-05 6.8446290010432812e-05 0.0000000000000000e+00 +235 6.6430610182749772e-05 5.3155748135392397e-05 0.0000000000000000e+00 +236 8.2877314926921305e-05 4.8905829630990080e-05 0.0000000000000000e+00 +237 7.7513488386102286e-05 3.9091588598701160e-05 0.0000000000000000e+00 +238 9.6520171103331445e-05 3.2781173935459572e-05 0.0000000000000000e+00 +239 9.2232416915701703e-05 2.8983592081175541e-05 0.0000000000000000e+00 +240 1.1323768745207866e-04 2.2099480605147771e-05 0.0000000000000000e+00 +241 1.3459865563319741e-04 1.2703227752398906e-05 0.0000000000000000e+00 +242 1.5474472990034682e-04 4.9028952578147883e-06 0.0000000000000000e+00 +243 1.5215092550023015e-04 1.2097129719583488e-05 0.0000000000000000e+00 +244 1.7049283829256650e-04 9.1706083284784945e-06 0.0000000000000000e+00 +245 1.6776008627299133e-04 1.9099097427610624e-05 0.0000000000000000e+00 +246 1.8333367243371162e-04 2.1604042292807520e-05 0.0000000000000000e+00 +247 1.8008195062651708e-04 3.3615378061081087e-05 0.0000000000000000e+00 +248 1.9189650531499411e-04 3.9685789135164573e-05 0.0000000000000000e+00 +249 1.8783573502138761e-04 5.4407048131235179e-05 0.0000000000000000e+00 +250 1.9614236422538478e-04 6.1776442206818580e-05 0.0000000000000000e+00 +251 1.9089458289321614e-04 7.9516349638183995e-05 0.0000000000000000e+00 +252 1.9558796322159504e-04 8.6892146170328155e-05 0.0000000000000000e+00 +253 1.8874887732394583e-04 1.0500710476222600e-04 0.0000000000000000e+00 +254 1.9152092472987035e-04 1.1597519058197392e-04 0.0000000000000000e+00 +255 1.8256170726520249e-04 1.2813543516461412e-04 0.0000000000000000e+00 +256 1.8317412822647789e-04 1.4660018932962857e-04 0.0000000000000000e+00 +257 1.7255263462072589e-04 1.4676532692364173e-04 0.0000000000000000e+00 +258 1.7180488878385214e-04 1.7463142934331309e-04 0.0000000000000000e+00 +259 1.5968255923162790e-04 1.6112886872639011e-04 0.0000000000000000e+00 +260 1.5736418072846288e-04 1.9373036611985696e-04 0.0000000000000000e+00 +261 1.4438478717201006e-04 1.7104686393958903e-04 0.0000000000000000e+00 +262 1.4172732865070544e-04 1.9993397606046031e-04 0.0000000000000000e+00 +263 1.2780764883044244e-04 1.7581062997197168e-04 0.0000000000000000e+00 +264 1.2551429537422006e-04 1.9326020335803872e-04 0.0000000000000000e+00 +265 1.1143818436667695e-04 1.7279653463973672e-04 0.0000000000000000e+00 +266 1.1129339275113247e-04 1.7696772682632424e-04 0.0000000000000000e+00 +267 9.7026315827934351e-05 1.6059526683700199e-04 0.0000000000000000e+00 +268 1.0011077369688101e-04 1.5518094661065159e-04 0.0000000000000000e+00 +269 8.6522173578507114e-05 1.3949676203897713e-04 0.0000000000000000e+00 +270 9.3664351269599769e-05 1.3012327167812935e-04 0.0000000000000000e+00 +271 8.1291625785936272e-05 1.1272276579557331e-04 0.0000000000000000e+00 +272 9.2500602391673231e-05 1.0286100151558550e-04 0.0000000000000000e+00 +273 8.2174156364853157e-05 8.4321872533994066e-05 0.0000000000000000e+00 +274 9.7130125497925732e-05 7.4496044974704109e-05 0.0000000000000000e+00 +275 8.9034151680274584e-05 5.8030339746749375e-05 0.0000000000000000e+00 +276 1.0678389790186836e-04 4.7638087115883802e-05 0.0000000000000000e+00 +277 1.0119535639935181e-04 3.6303198355693708e-05 0.0000000000000000e+00 +278 1.2094537118731950e-04 2.5060744325496045e-05 0.0000000000000000e+00 +279 1.1693017924424426e-04 2.0976803055913763e-05 0.0000000000000000e+00 +280 1.3749539877318216e-04 1.0260590705305633e-05 0.0000000000000000e+00 +281 1.5664700963922696e-04 -2.3143582219387062e-06 0.0000000000000000e+00 +282 1.7213521099798126e-04 -1.0893217653461935e-05 0.0000000000000000e+00 +283 1.7163725578470403e-04 -2.7032144307298500e-06 0.0000000000000000e+00 +284 1.8302101438290170e-04 -4.7015876043674941e-06 0.0000000000000000e+00 +285 1.8408986700031230e-04 7.3762135624856621e-06 0.0000000000000000e+00 +286 1.9034465344562048e-04 1.1634737927368466e-05 0.0000000000000000e+00 +287 1.9261711656854316e-04 2.7002357232706195e-05 0.0000000000000000e+00 +288 1.9361558083412500e-04 3.5128829947321527e-05 0.0000000000000000e+00 +289 1.9675951681764233e-04 5.4504542291358708e-05 0.0000000000000000e+00 +290 1.9229119872704733e-04 6.3160704993402156e-05 0.0000000000000000e+00 +291 1.9589287639141945e-04 8.5624062570252574e-05 0.0000000000000000e+00 +292 1.8763172746254775e-04 9.5926064062507038e-05 0.0000000000000000e+00 +293 1.9144012028784324e-04 1.1574950605207010e-04 0.0000000000000000e+00 +294 1.7925388721026504e-04 1.3336630569376064e-04 0.0000000000000000e+00 +295 1.8325338492376081e-04 1.3941523897602475e-04 0.0000000000000000e+00 +296 1.7111384196688562e-04 1.7606151476373124e-04 0.0000000000000000e+00 +297 1.7441139798144990e-04 1.5854503282415543e-04 0.0000000000000000e+00 +298 1.6032326888461984e-04 2.1446583056531008e-04 0.0000000000000000e+00 +299 1.6387438500404321e-04 1.7460023770546828e-04 0.0000000000000000e+00 +300 1.5074052192984994e-04 2.4020838682409438e-04 0.0000000000000000e+00 +301 1.5148519378157811e-04 1.8980377776341359e-04 0.0000000000000000e+00 +302 1.3966552521236660e-04 2.4774151750977874e-04 0.0000000000000000e+00 +303 1.3793365457372421e-04 2.0064007271268226e-04 0.0000000000000000e+00 +304 1.2999175496236775e-04 2.3635880684653166e-04 0.0000000000000000e+00 +305 1.2445809284142433e-04 2.0319207617434042e-04 0.0000000000000000e+00 +306 1.2058479570330461e-04 2.1223162942725083e-04 0.0000000000000000e+00 +307 1.1335261202324864e-04 1.9202689248144918e-04 0.0000000000000000e+00 +308 1.1489966476687653e-04 1.8116775432026056e-04 0.0000000000000000e+00 +309 1.0607147008139182e-04 1.6763704556867280e-04 0.0000000000000000e+00 +310 1.1336585045824133e-04 1.4707143380834897e-04 0.0000000000000000e+00 +311 1.0344655043634243e-04 1.3351953844142965e-04 0.0000000000000000e+00 +312 1.1682664536528110e-04 1.1117223278055075e-04 0.0000000000000000e+00 +313 1.0584011765559926e-04 9.5633260364903774e-05 0.0000000000000000e+00 +314 1.2284574193182076e-04 7.5987122603626839e-05 0.0000000000000000e+00 +315 1.1395109003961985e-04 5.9134539871496392e-05 0.0000000000000000e+00 +316 1.3307867183720012e-04 4.1776312299002252e-05 0.0000000000000000e+00 +317 1.2588269209880162e-04 2.9470198058979825e-05 0.0000000000000000e+00 +318 1.4544292811228404e-04 1.3605886591663147e-05 0.0000000000000000e+00 +319 1.4084591944156649e-04 8.4739193403876596e-06 0.0000000000000000e+00 +320 1.5916834934516234e-04 -4.8366910892216897e-06 0.0000000000000000e+00 +321 1.7356992275325834e-04 -1.8042780077684453e-05 0.0000000000000000e+00 +322 1.8147503918697350e-04 -2.4540925551368165e-05 0.0000000000000000e+00 +323 1.8163463266840930e-04 -1.7130129888846129e-05 0.0000000000000000e+00 +324 1.8253898079463108e-04 -1.5598547575766951e-05 0.0000000000000000e+00 +325 1.8657806229653399e-04 -3.4133038182733444e-06 0.0000000000000000e+00 +326 1.8037702210949025e-04 5.3434050311440554e-06 0.0000000000000000e+00 +327 1.8771879764928681e-04 2.1715518823040016e-05 0.0000000000000000e+00 +328 1.7471074558026713e-04 3.4539745108762290e-05 0.0000000000000000e+00 +329 1.8460873128030577e-04 5.4984524671188725e-05 0.0000000000000000e+00 +330 1.6600292929781353e-04 6.9008728811924969e-05 0.0000000000000000e+00 +331 1.7796512641162431e-04 9.1385034689547154e-05 0.0000000000000000e+00 +332 1.5410918238014520e-04 1.0736588228516046e-04 0.0000000000000000e+00 +333 1.6795483683047752e-04 1.2318778434343078e-04 0.0000000000000000e+00 +334 1.4157775831030313e-04 1.5014040855437159e-04 0.0000000000000000e+00 +335 1.5785083269945281e-04 1.4650075439474400e-04 0.0000000000000000e+00 +336 1.2665633684184470e-04 1.9516493438247949e-04 0.0000000000000000e+00 +337 1.4652933492756114e-04 1.5825492457397368e-04 0.0000000000000000e+00 +338 1.2214547186144981e-04 2.4167794353872549e-04 0.0000000000000000e+00 +339 1.4180074826065196e-04 1.7604592446691659e-04 0.0000000000000000e+00 +340 1.1255092108513610e-04 2.7260123374319155e-04 0.0000000000000000e+00 +341 1.3761399094902802e-04 1.9706727165017120e-04 0.0000000000000000e+00 +342 1.1522842530577449e-04 2.7911375117613133e-04 0.0000000000000000e+00 +343 1.2918411829601699e-04 2.1803343236056900e-04 0.0000000000000000e+00 +344 1.1734351128622201e-04 2.6571681944023359e-04 0.0000000000000000e+00 +345 1.2254276275087787e-04 2.2432204295978476e-04 0.0000000000000000e+00 +346 1.1974443872507096e-04 2.3680090433102696e-04 0.0000000000000000e+00 +347 1.2071540692597284e-04 2.1269652219509870e-04 0.0000000000000000e+00 +348 1.2270101616137648e-04 1.9743779542515523e-04 0.0000000000000000e+00 +349 1.2264642729289398e-04 1.8508739809863369e-04 0.0000000000000000e+00 +350 1.3383017178927455e-04 1.5156768459346495e-04 0.0000000000000000e+00 +351 1.2577540617175406e-04 1.4740321111045147e-04 0.0000000000000000e+00 +352 1.4340773421068627e-04 1.1293118958385223e-04 0.0000000000000000e+00 +353 1.3341749813102418e-04 1.0072504549123244e-04 0.0000000000000000e+00 +354 1.5386164243670204e-04 7.2227623415051933e-05 0.0000000000000000e+00 +355 1.4204167491417043e-04 5.6498808092830119e-05 0.0000000000000000e+00 +356 1.6279824866213127e-04 3.3429940217178515e-05 0.0000000000000000e+00 +357 1.5267578941533281e-04 1.9709016910970241e-05 0.0000000000000000e+00 +358 1.7110318234027366e-04 1.1467794122178855e-06 0.0000000000000000e+00 +359 1.6340539277356244e-04 -5.5189289771696855e-06 0.0000000000000000e+00 +360 1.7740714701955653e-04 -1.8977834327990608e-05 0.0000000000000000e+00 +361 1.8452802730369313e-04 -2.8832061973687458e-05 0.0000000000000000e+00 +362 1.8186625712888205e-04 -2.9558136605260799e-05 0.0000000000000000e+00 +363 1.8024969476821697e-04 -2.5772260635909678e-05 0.0000000000000000e+00 +364 1.6761747789816595e-04 -1.7724478134172529e-05 0.0000000000000000e+00 +365 1.7295655435232461e-04 -8.2023972909357763e-06 0.0000000000000000e+00 +366 1.5167563906890865e-04 7.1136721706312189e-06 0.0000000000000000e+00 +367 1.6300729193455892e-04 2.1421261796460145e-05 0.0000000000000000e+00 +368 1.3513262146713916e-04 4.1132163185070293e-05 0.0000000000000000e+00 +369 1.5092813590493438e-04 5.9201618093873702e-05 0.0000000000000000e+00 +370 1.1841008358865480e-04 8.0419467894957835e-05 0.0000000000000000e+00 +371 1.3728404354778657e-04 9.8997396367778159e-05 0.0000000000000000e+00 +372 1.0207956567589023e-04 1.2179874114308306e-04 0.0000000000000000e+00 +373 1.2285830843381253e-04 1.3408468250307866e-04 0.0000000000000000e+00 +374 8.5374614775879387e-05 1.6300686953091837e-04 0.0000000000000000e+00 +375 1.0823800239604665e-04 1.5689628308888026e-04 0.0000000000000000e+00 +376 7.0794245443767117e-05 2.0076846781781206e-04 0.0000000000000000e+00 +377 9.4916240542002045e-05 1.6757505383186989e-04 0.0000000000000000e+00 +378 5.3305776376960658e-05 2.3409206018084466e-04 0.0000000000000000e+00 +379 9.7006448817647123e-05 1.6923635825827552e-04 0.0000000000000000e+00 +380 7.3465624650027872e-05 2.8247344576399282e-04 0.0000000000000000e+00 +381 1.0549927592481066e-04 2.0928780749128950e-04 0.0000000000000000e+00 +382 8.2435739649036618e-05 2.8810010190574649e-04 0.0000000000000000e+00 +383 1.0402453921892486e-04 2.4985200604758925e-04 0.0000000000000000e+00 +384 1.0698549586748876e-04 2.9499323828433428e-04 0.0000000000000000e+00 +385 1.0406074064549273e-04 2.4902814952768373e-04 0.0000000000000000e+00 +386 1.2548092418124016e-04 2.5651719838597350e-04 0.0000000000000000e+00 +387 1.2351646868146525e-04 2.1977784401163054e-04 0.0000000000000000e+00 +388 1.5004190410192569e-04 2.0137571208681400e-04 0.0000000000000000e+00 +389 1.3393580166351108e-04 1.9255393507981809e-04 0.0000000000000000e+00 +390 1.6295883087441844e-04 1.5199213302359484e-04 0.0000000000000000e+00 +391 1.5063751113547077e-04 1.4694859067203417e-04 0.0000000000000000e+00 +392 1.8000897081745795e-04 1.0619343548646192e-04 0.0000000000000000e+00 +393 1.6561309378602883e-04 9.7037670677296156e-05 0.0000000000000000e+00 +394 1.9382745100814531e-04 6.5648980655922534e-05 0.0000000000000000e+00 +395 1.7695741527044807e-04 4.9716511735790200e-05 0.0000000000000000e+00 +396 2.0065188597728214e-04 2.5746708320466968e-05 0.0000000000000000e+00 +397 1.8297867804266331e-04 1.0615003992406336e-05 0.0000000000000000e+00 +398 1.9982611540716595e-04 -6.5682876870518107e-06 0.0000000000000000e+00 +399 1.8556554896400902e-04 -1.6509803537161082e-05 0.0000000000000000e+00 +400 1.9312536581833663e-04 -2.5912353602364910e-05 0.0000000000000000e+00 +401 1.9023801410824606e-04 -2.7464462701394523e-05 0.0000000000000000e+00 +402 1.6698242474704196e-04 -2.2099770957974276e-05 0.0000000000000000e+00 +403 1.4243470745724796e-04 -2.3480099448894497e-06 0.0000000000000000e+00 +404 1.1876992118927330e-04 2.8893674554990122e-05 0.0000000000000000e+00 +405 9.7519654816455303e-05 6.7473438674861880e-05 0.0000000000000000e+00 +406 7.9406575250692843e-05 1.0857040090545463e-04 0.0000000000000000e+00 +407 6.4539515581651943e-05 1.4692649268945184e-04 0.0000000000000000e+00 +408 5.1587395282262643e-05 1.7813848972085620e-04 0.0000000000000000e+00 +409 3.9112490387149122e-05 1.9658956051422694e-04 0.0000000000000000e+00 +410 5.0646024795521216e-05 2.1400372314275622e-04 0.0000000000000000e+00 +411 5.0846759072495365e-05 2.4269431977691632e-04 0.0000000000000000e+00 +412 -1.1482904584733112e-04 -1.4373303263865990e-04 0.0000000000000000e+00 +413 1.5511043799162975e-04 2.5875085720661746e-04 0.0000000000000000e+00 +414 1.6626514293530906e-04 2.1735425519646309e-04 0.0000000000000000e+00 +415 1.8641734272053080e-04 1.7687638118890660e-04 0.0000000000000000e+00 +416 2.0380463041431767e-04 1.3085055646827544e-04 0.0000000000000000e+00 +417 2.1756044245783355e-04 8.4550353671555104e-05 0.0000000000000000e+00 +418 2.2486305540664193e-04 4.3653832482456800e-05 0.0000000000000000e+00 +419 2.2188236489361566e-04 7.6524745655054321e-06 0.0000000000000000e+00 +420 2.0949238720629205e-04 -1.7218568434280989e-05 0.0000000000000000e+00 -- GitLab From c904cfb8bc5fc62c5ba1db33fa5e98f6217cd8ee Mon Sep 17 00:00:00 2001 From: Emile Maras Date: Mon, 29 May 2017 15:49:04 +0200 Subject: [PATCH 211/593] removed a bug in fix_neb.cpp which prevented the freeend to work properly, plus added an example for the neb freeend --- examples/neb/README | 6 ++++++ src/REPLICA/fix_neb.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/neb/README b/examples/neb/README index 130d0fd2e3..0993c5fcdb 100644 --- a/examples/neb/README +++ b/examples/neb/README @@ -2,13 +2,19 @@ Run these examples as: mpirun -np 4 lmp_g++ -partition 4x1 -in in.neb.hop1 mpirun -np 4 lmp_g++ -partition 4x1 -in in.neb.hop2 +mpirun -np 4 lmp_g++ -partition 4x1 -in in.neb.hop1freeend mpirun -np 3 lmp_g++ -partition 3x1 -in in.neb.sivac mpirun -np 8 lmp_g++ -partition 4x2 -in in.neb.hop1 mpirun -np 8 lmp_g++ -partition 4x2 -in in.neb.hop2 +mpirun -np 8 lmp_g++ -partition 4x2 -in in.neb.hop1freeend mpirun -np 6 lmp_g++ -partition 3x2 -in in.neb.sivac mpirun -np 9 lmp_g++ -partition 3x3 -in in.neb.sivac + +Note that more than 4 replicas should be used for a precise estimate +of the activation energy corresponding to a transition. + If you uncomment the dump command lines in the input scripts, you can create dump files to do visualization from via Python tools: (see lammps/tools/README and lammps/tools/python/README for more info on diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index 726d300d66..f66167f2a2 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -461,7 +461,7 @@ void FixNEB::min_post_force(int vflag) if (ireplica < nreplica-1) dotgrad = dotgrad /(gradlen*gradnextlen); - dot = 0.0; + if (FreeEndIni && ireplica == 0) { if (tlen > 0.0) { double dotall; -- GitLab From d93938f7e17f8722d0d74952fa7347b742e23bfb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 May 2017 16:57:35 -0400 Subject: [PATCH 212/593] displace_atom rotate needs to operate on unwrapped coordinates with image flags set to zero --- src/displace_atoms.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 46f697f099..7db7e21839 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -271,9 +271,15 @@ void DisplaceAtoms::command(int narg, char **arg) int *body = atom->body; int *mask = atom->mask; int nlocal = atom->nlocal; + imageint *image = atom->image; for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { + // unwrap coordinate and reset image flags accordingly + domain->unmap(x[i],image[i]); + image[i] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; + d[0] = x[i][0] - point[0]; d[1] = x[i][1] - point[1]; d[2] = x[i][2] - point[2]; -- GitLab From 4b8d2e829c24ceeb6a6f6f7c89668218eaa7b255 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 30 May 2017 07:41:01 -0400 Subject: [PATCH 213/593] triclinic member variable is referenced in destructor and thus must be initialized in constructor --- src/KSPACE/pppm.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index 80328a2d6f..232cabe4ea 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -82,6 +82,7 @@ PPPM::PPPM(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg), pppmflag = 1; group_group_enable = 1; + triclinic = domain->triclinic; accuracy_relative = fabs(force->numeric(FLERR,arg[0])); -- GitLab From 4ae314731d995cae8d92279594662f6afc39acdc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 30 May 2017 07:42:10 -0400 Subject: [PATCH 214/593] must not use strtok() in library function as it is not re-entrant and may be used inside LAMMPS commands --- src/library.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/library.cpp b/src/library.cpp index 892818ff9c..87cc5d99d8 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -277,12 +277,24 @@ void lammps_commands_string(void *ptr, char *str) BEGIN_CAPTURE { - char *ptr = strtok(copy,"\n"); - if (ptr) concatenate_lines(ptr); - while (ptr) { - lmp->input->one(ptr); - ptr = strtok(NULL,"\n"); - if (ptr) concatenate_lines(ptr); + char *ptr = copy; + for (int i=0; i < n-1; ++i) { + + // handle continuation character as last character in line or string + if ((copy[i] == '&') && (copy[i+1] == '\n')) + copy[i+1] = copy[i] = ' '; + else if ((copy[i] == '&') && (copy[i+1] == '\0')) + copy[i] = ' '; + + if ((copy[i] == '\r') || (copy[i] == '\t')) + copy[i] = ' '; + + if (copy[i] == '\n') { + copy[i] = '\0'; + lmp->input->one(ptr); + ptr = copy + i+1; + } else if (copy[i+1] == '\0') + lmp->input->one(ptr); } } END_CAPTURE -- GitLab From 092806ad4fe146ac1503155fa694d90af23fda1d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 30 May 2017 07:55:48 -0400 Subject: [PATCH 215/593] no need for special whitespace handling in library interface --- src/library.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/library.cpp b/src/library.cpp index 87cc5d99d8..22b54f73a1 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -286,9 +286,6 @@ void lammps_commands_string(void *ptr, char *str) else if ((copy[i] == '&') && (copy[i+1] == '\0')) copy[i] = ' '; - if ((copy[i] == '\r') || (copy[i] == '\t')) - copy[i] = ' '; - if (copy[i] == '\n') { copy[i] = '\0'; lmp->input->one(ptr); -- GitLab From 412cb8f089bb9e3b2ae5cfc49bc310fa38425c32 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 30 May 2017 08:15:55 -0400 Subject: [PATCH 216/593] avoid hang in fix reax/c/species when multiple atoms have the exact same x-coordinate --- src/USER-REAXC/fix_reaxc_species.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/USER-REAXC/fix_reaxc_species.cpp b/src/USER-REAXC/fix_reaxc_species.cpp index fe74337128..4e57dd1c4b 100644 --- a/src/USER-REAXC/fix_reaxc_species.cpp +++ b/src/USER-REAXC/fix_reaxc_species.cpp @@ -500,8 +500,16 @@ void FixReaxCSpecies::Output_ReaxC_Bonds(bigint ntimestep, FILE *fp) AtomCoord FixReaxCSpecies::chAnchor(AtomCoord in1, AtomCoord in2) { - if (in1.x <= in2.x) + if (in1.x < in2.x) return in1; + else if (in1.x == in2.x) { + if (in1.y < in2.y) + return in1; + else if (in1.y == in2.y) { + if (in1.z < in2.z) + return in1; + } + } return in2; } -- GitLab From 22fdb1fc1407d4685e4773eec3f7f6670e6f4e69 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 30 May 2017 10:21:07 -0600 Subject: [PATCH 217/593] SNAP changes by Aidan --- doc/src/compute_sna_atom.txt | 11 +- doc/src/pair_snap.txt | 9 +- examples/COUPLE/simple/simple.cpp | 2 +- examples/snap/Ta06A.snapparam | 2 +- examples/snap/W_2940_2017_2.snap | 2 +- examples/snap/W_2940_2017_2.snapparam | 2 +- examples/snap/W_2940_2017_2_He_JW2013.snap | 2 +- src/SNAP/compute_sna_atom.cpp | 7 +- src/SNAP/compute_snad_atom.cpp | 25 +-- src/SNAP/compute_snad_atom.h | 2 +- src/SNAP/compute_snav_atom.cpp | 43 ++--- src/SNAP/compute_snav_atom.h | 2 +- src/SNAP/pair_snap.cpp | 194 +++++++++++++++------ src/SNAP/pair_snap.h | 6 +- src/npair_full_bin_atomonly.h | 2 +- 15 files changed, 209 insertions(+), 102 deletions(-) diff --git a/doc/src/compute_sna_atom.txt b/doc/src/compute_sna_atom.txt index f82df0d816..defd98d520 100644 --- a/doc/src/compute_sna_atom.txt +++ b/doc/src/compute_sna_atom.txt @@ -231,11 +231,12 @@ the numbers of columns are 930, 2790, and 5580, respectively. If the {quadratic} keyword value is set to 1, then additional columns are appended to each per-atom array, corresponding to -a matrix of quantities that are products of two bispectrum components. If the -number of bispectrum components is {K}, then the number of matrix elements -is {K}^2. These are output in subblocks of {K}^2 columns, using the same -ordering of columns and sub-blocks as was used for the bispectrum -components. +the products of all distinct pairs of bispectrum components. If the +number of bispectrum components is {K}, then the number of distinct pairs +is {K}({K}+1)/2. These are output in subblocks of {K}({K}+1)/2 columns, using the same +ordering of sub-blocks as was used for the bispectrum +components. Within each sub-block, the ordering is upper-triangular, +(1,1),(1,2)...(1,{K}),(2,1)...({K}-1,{K}-1),({K}-1,{K}),({K},{K}) These values can be accessed by any command that uses per-atom values from a compute as input. See "Section diff --git a/doc/src/pair_snap.txt b/doc/src/pair_snap.txt index ab7313832c..e612adceea 100644 --- a/doc/src/pair_snap.txt +++ b/doc/src/pair_snap.txt @@ -139,10 +139,15 @@ The default values for these keywords are {rmin0} = 0.0 {diagonalstyle} = 3 {switchflag} = 0 -{bzeroflag} = 1 :ul +{bzeroflag} = 1 +{quadraticflag} = 1 :ul -Detailed definitions of these keywords are given on the "compute +Detailed definitions for all the keywords are given on the "compute sna/atom"_compute_sna_atom.html doc page. +If {quadraticflag} is set to 1, then the SNAP energy expression includes the quadratic term, +0.5*B^t.alpha.B, where alpha is a symmetric {K} by {K} matrix. +The SNAP element file should contain {K}({K}+1)/2 additional coefficients +for each element, the upper-triangular elements of alpha. :line diff --git a/examples/COUPLE/simple/simple.cpp b/examples/COUPLE/simple/simple.cpp index b279ae704c..894c708978 100644 --- a/examples/COUPLE/simple/simple.cpp +++ b/examples/COUPLE/simple/simple.cpp @@ -153,7 +153,7 @@ int main(int narg, char **arg) for (int i = 0; i < natoms; i++) type[i] = 1; lmp->input->one("delete_atoms group all"); - lammps_create_atoms(lmp,natoms,NULL,type,x,v); + lammps_create_atoms(lmp,natoms,NULL,type,x,v,NULL,0); lmp->input->one("run 10"); } diff --git a/examples/snap/Ta06A.snapparam b/examples/snap/Ta06A.snapparam index 7b30312f59..283629d658 100644 --- a/examples/snap/Ta06A.snapparam +++ b/examples/snap/Ta06A.snapparam @@ -8,8 +8,8 @@ twojmax 6 # optional -gamma 1 rfac0 0.99363 rmin0 0 diagonalstyle 3 bzeroflag 0 +quadraticflag 0 diff --git a/examples/snap/W_2940_2017_2.snap b/examples/snap/W_2940_2017_2.snap index 51eee41a0a..04b8d58094 100644 --- a/examples/snap/W_2940_2017_2.snap +++ b/examples/snap/W_2940_2017_2.snap @@ -5,7 +5,7 @@ variable zblcutinner equal 4 variable zblcutouter equal 4.8 variable zblz equal 74 -# Specify hybrid with SNAP, ZBL, and long-range Coulomb +# Specify hybrid with SNAP and ZBL pair_style hybrid/overlay & zbl ${zblcutinner} ${zblcutouter} & diff --git a/examples/snap/W_2940_2017_2.snapparam b/examples/snap/W_2940_2017_2.snapparam index f17961bdd7..27ab61a266 100644 --- a/examples/snap/W_2940_2017_2.snapparam +++ b/examples/snap/W_2940_2017_2.snapparam @@ -6,8 +6,8 @@ twojmax 8 # optional -gamma 1 rfac0 0.99363 rmin0 0 diagonalstyle 3 bzeroflag 0 +quadraticflag 0 diff --git a/examples/snap/W_2940_2017_2_He_JW2013.snap b/examples/snap/W_2940_2017_2_He_JW2013.snap index 45a31955b3..cb70916ec4 100644 --- a/examples/snap/W_2940_2017_2_He_JW2013.snap +++ b/examples/snap/W_2940_2017_2_He_JW2013.snap @@ -5,7 +5,7 @@ variable zblcutinner equal 4 variable zblcutouter equal 4.8 variable zblz equal 74 -# Specify hybrid with SNAP, ZBL, and long-range Coulomb +# Specify hybrid with SNAP and ZBL pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap table spline 10000 table spline 10000 pair_coeff 1 1 zbl ${zblz} ${zblz} diff --git a/src/SNAP/compute_sna_atom.cpp b/src/SNAP/compute_sna_atom.cpp index cba6fae9b7..5341d16efa 100644 --- a/src/SNAP/compute_sna_atom.cpp +++ b/src/SNAP/compute_sna_atom.cpp @@ -129,7 +129,7 @@ ComputeSNAAtom::ComputeSNAAtom(LAMMPS *lmp, int narg, char **arg) : ncoeff = snaptr[0]->ncoeff; size_peratom_cols = ncoeff; - if (quadraticflag) size_peratom_cols += ncoeff*ncoeff; + if (quadraticflag) size_peratom_cols += (ncoeff*(ncoeff+1))/2; peratom_flag = 1; nmax = 0; @@ -275,7 +275,10 @@ void ComputeSNAAtom::compute_peratom() int ncount = ncoeff; for (int icoeff = 0; icoeff < ncoeff; icoeff++) { double bi = snaptr[tid]->bvec[icoeff]; - for (int jcoeff = 0; jcoeff < ncoeff; jcoeff++) + + // upper-triangular elements of quadratic matrix + + for (int jcoeff = icoeff; jcoeff < ncoeff; jcoeff++) sna[i][ncount++] = bi*snaptr[tid]->bvec[jcoeff]; } } diff --git a/src/SNAP/compute_snad_atom.cpp b/src/SNAP/compute_snad_atom.cpp index 39f34dd8cd..c2ac5f5afd 100644 --- a/src/SNAP/compute_snad_atom.cpp +++ b/src/SNAP/compute_snad_atom.cpp @@ -125,11 +125,11 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : threencoeff = 3*ncoeff; size_peratom_cols = threencoeff*atom->ntypes; if (quadraticflag) { - ncoeffsq = ncoeff*ncoeff; - twoncoeffsq = 2*ncoeffsq; - threencoeffsq = 3*ncoeffsq; + ncoeffq = (ncoeff*(ncoeff+1))/2; + twoncoeffq = 2*ncoeffq; + threencoeffq = 3*ncoeffq; size_peratom_cols += - threencoeffsq*atom->ntypes; + threencoeffq*atom->ntypes; } comm_reverse = size_peratom_cols; peratom_flag = 1; @@ -250,7 +250,7 @@ void ComputeSNADAtom::compute_peratom() const int typeoffset = threencoeff*(atom->type[i]-1); const int quadraticoffset = threencoeff*atom->ntypes + - threencoeffsq*(atom->type[i]-1); + threencoeffq*(atom->type[i]-1); // insure rij, inside, and typej are of size jnum @@ -320,7 +320,10 @@ void ComputeSNADAtom::compute_peratom() double bix = snaptr[tid]->dbvec[icoeff][0]; double biy = snaptr[tid]->dbvec[icoeff][1]; double biz = snaptr[tid]->dbvec[icoeff][2]; - for (int jcoeff = 0; jcoeff < ncoeff; jcoeff++) { + + // upper-triangular elements of quadratic matrix + + for (int jcoeff = icoeff; jcoeff < ncoeff; jcoeff++) { double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0] + bix*snaptr[tid]->bvec[jcoeff]; double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1] @@ -328,11 +331,11 @@ void ComputeSNADAtom::compute_peratom() double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2] + biz*snaptr[tid]->bvec[jcoeff]; snadi[ncount] += dbxtmp; - snadi[ncount+ncoeffsq] += dbytmp; - snadi[ncount+twoncoeffsq] += dbztmp; + snadi[ncount+ncoeffq] += dbytmp; + snadi[ncount+twoncoeffq] += dbztmp; snadj[ncount] -= dbxtmp; - snadj[ncount+ncoeffsq] -= dbytmp; - snadj[ncount+twoncoeffsq] -= dbztmp; + snadj[ncount+ncoeffq] -= dbytmp; + snadj[ncount+twoncoeffq] -= dbztmp; ncount++; } } @@ -385,7 +388,7 @@ double ComputeSNADAtom::memory_usage() bytes += 3*njmax*sizeof(double); bytes += njmax*sizeof(int); bytes += threencoeff*atom->ntypes; - if (quadraticflag) bytes += threencoeffsq*atom->ntypes; + if (quadraticflag) bytes += threencoeffq*atom->ntypes; bytes += snaptr[0]->memory_usage()*comm->nthreads; return bytes; } diff --git a/src/SNAP/compute_snad_atom.h b/src/SNAP/compute_snad_atom.h index 0d5a369ab6..8eaae2a67f 100644 --- a/src/SNAP/compute_snad_atom.h +++ b/src/SNAP/compute_snad_atom.h @@ -37,7 +37,7 @@ class ComputeSNADAtom : public Compute { private: int nmax, njmax, diagonalstyle; - int ncoeff, twoncoeff, threencoeff, ncoeffsq, twoncoeffsq, threencoeffsq; + int ncoeff, twoncoeff, threencoeff, ncoeffq, twoncoeffq, threencoeffq; double **cutsq; class NeighList *list; double **snad; diff --git a/src/SNAP/compute_snav_atom.cpp b/src/SNAP/compute_snav_atom.cpp index 0d21d16561..3b5383ddf4 100644 --- a/src/SNAP/compute_snav_atom.cpp +++ b/src/SNAP/compute_snav_atom.cpp @@ -124,14 +124,14 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : sixncoeff = 6*ncoeff; size_peratom_cols = sixncoeff*atom->ntypes; if (quadraticflag) { - ncoeffsq = ncoeff*ncoeff; - twoncoeffsq = 2*ncoeffsq; - threencoeffsq = 3*ncoeffsq; - fourncoeffsq = 4*ncoeffsq; - fivencoeffsq = 5*ncoeffsq; - sixncoeffsq = 6*ncoeffsq; + ncoeffq = ncoeff*ncoeff; + twoncoeffq = 2*ncoeffq; + threencoeffq = 3*ncoeffq; + fourncoeffq = 4*ncoeffq; + fivencoeffq = 5*ncoeffq; + sixncoeffq = 6*ncoeffq; size_peratom_cols += - sixncoeffsq*atom->ntypes; + sixncoeffq*atom->ntypes; } comm_reverse = size_peratom_cols; peratom_flag = 1; @@ -253,7 +253,7 @@ void ComputeSNAVAtom::compute_peratom() const int typeoffset = sixncoeff*(atom->type[i]-1); const int quadraticoffset = sixncoeff*atom->ntypes + - sixncoeffsq*(atom->type[i]-1); + sixncoeffq*(atom->type[i]-1); // insure rij, inside, and typej are of size jnum @@ -330,7 +330,10 @@ void ComputeSNAVAtom::compute_peratom() double bix = snaptr[tid]->dbvec[icoeff][0]; double biy = snaptr[tid]->dbvec[icoeff][1]; double biz = snaptr[tid]->dbvec[icoeff][2]; - for (int jcoeff = 0; jcoeff < ncoeff; jcoeff++) { + + // upper-triangular elements of quadratic matrix + + for (int jcoeff = icoeff; jcoeff < ncoeff; jcoeff++) { double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0] + bix*snaptr[tid]->bvec[jcoeff]; double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1] @@ -338,17 +341,17 @@ void ComputeSNAVAtom::compute_peratom() double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2] + biz*snaptr[tid]->bvec[jcoeff]; snavi[ncount] += dbxtmp*xtmp; - snavi[ncount+ncoeffsq] += dbytmp*ytmp; - snavi[ncount+twoncoeffsq] += dbztmp*ztmp; - snavi[ncount+threencoeffsq] += dbytmp*ztmp; - snavi[ncount+fourncoeffsq] += dbxtmp*ztmp; - snavi[ncount+fivencoeffsq] += dbxtmp*ytmp; + snavi[ncount+ncoeffq] += dbytmp*ytmp; + snavi[ncount+twoncoeffq] += dbztmp*ztmp; + snavi[ncount+threencoeffq] += dbytmp*ztmp; + snavi[ncount+fourncoeffq] += dbxtmp*ztmp; + snavi[ncount+fivencoeffq] += dbxtmp*ytmp; snavj[ncount] -= dbxtmp*x[j][0]; - snavj[ncount+ncoeffsq] -= dbytmp*x[j][1]; - snavj[ncount+twoncoeffsq] -= dbztmp*x[j][2]; - snavj[ncount+threencoeffsq] -= dbytmp*x[j][2]; - snavj[ncount+fourncoeffsq] -= dbxtmp*x[j][2]; - snavj[ncount+fivencoeffsq] -= dbxtmp*x[j][1]; + snavj[ncount+ncoeffq] -= dbytmp*x[j][1]; + snavj[ncount+twoncoeffq] -= dbztmp*x[j][2]; + snavj[ncount+threencoeffq] -= dbytmp*x[j][2]; + snavj[ncount+fourncoeffq] -= dbxtmp*x[j][2]; + snavj[ncount+fivencoeffq] -= dbxtmp*x[j][1]; ncount++; } } @@ -401,7 +404,7 @@ double ComputeSNAVAtom::memory_usage() bytes += 3*njmax*sizeof(double); bytes += njmax*sizeof(int); bytes += sixncoeff*atom->ntypes; - if (quadraticflag) bytes += sixncoeffsq*atom->ntypes; + if (quadraticflag) bytes += sixncoeffq*atom->ntypes; bytes += snaptr[0]->memory_usage()*comm->nthreads; return bytes; } diff --git a/src/SNAP/compute_snav_atom.h b/src/SNAP/compute_snav_atom.h index 33ae4f9217..35f1478393 100644 --- a/src/SNAP/compute_snav_atom.h +++ b/src/SNAP/compute_snav_atom.h @@ -38,7 +38,7 @@ class ComputeSNAVAtom : public Compute { private: int nmax, njmax, diagonalstyle; int ncoeff, twoncoeff, threencoeff, fourncoeff, fivencoeff, sixncoeff; - int ncoeffsq, twoncoeffsq, threencoeffsq, fourncoeffsq, fivencoeffsq, sixncoeffsq; + int ncoeffq, twoncoeffq, threencoeffq, fourncoeffq, fivencoeffq, sixncoeffq; double **cutsq; class NeighList *list; double **snav; diff --git a/src/SNAP/pair_snap.cpp b/src/SNAP/pair_snap.cpp index e4ed57b933..492e9ad643 100644 --- a/src/SNAP/pair_snap.cpp +++ b/src/SNAP/pair_snap.cpp @@ -35,6 +35,10 @@ using namespace LAMMPS_NS; #define MAXLINE 1024 #define MAXWORD 3 +// Outstanding issues with quadratic term +// 1. there seems to a problem with compute_optimized energy calc +// it does not match compute_regular, even when quadratic coeffs = 0 + /* ---------------------------------------------------------------------- */ PairSNAP::PairSNAP(LAMMPS *lmp) : Pair(lmp) @@ -232,10 +236,6 @@ void PairSNAP::compute_regular(int eflag, int vflag) snaptr->compute_ui(ninside); snaptr->compute_zi(); - if (!gammaoneflag) { - snaptr->compute_bi(); - snaptr->copy_bi2bvec(); - } // for neighbors of I within cutoff: // compute dUi/drj and dBi/drj @@ -255,17 +255,41 @@ void PairSNAP::compute_regular(int eflag, int vflag) fij[1] = 0.0; fij[2] = 0.0; + // linear contributions + for (int k = 1; k <= ncoeff; k++) { - double bgb; - if (gammaoneflag) - bgb = coeffi[k]; - else bgb = coeffi[k]* - gamma*pow(snaptr->bvec[k-1],gamma-1.0); + double bgb = coeffi[k]; fij[0] += bgb*snaptr->dbvec[k-1][0]; fij[1] += bgb*snaptr->dbvec[k-1][1]; fij[2] += bgb*snaptr->dbvec[k-1][2]; } + // quadratic contributions + + if (quadraticflag) { + snaptr->compute_bi(); + snaptr->copy_bi2bvec(); + int k = ncoeff+1; + for (int icoeff = 0; icoeff < ncoeff; icoeff++) { + double bveci = snaptr->bvec[icoeff]; + double fack = coeffi[k]*bveci; + double* dbveci = snaptr->dbvec[icoeff]; + fij[0] += fack*snaptr->dbvec[icoeff][0]; + fij[1] += fack*snaptr->dbvec[icoeff][1]; + fij[2] += fack*snaptr->dbvec[icoeff][2]; + k++; + for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) { + double facki = coeffi[k]*bveci; + double fackj = coeffi[k]*snaptr->bvec[jcoeff]; + double* dbvecj = snaptr->dbvec[jcoeff]; + fij[0] += facki*dbvecj[0]+fackj*dbveci[0]; + fij[1] += facki*dbvecj[1]+fackj*dbveci[1]; + fij[2] += facki*dbvecj[2]+fackj*dbveci[2]; + k++; + } + } + } + f[i][0] += fij[0]; f[i][1] += fij[1]; f[i][2] += fij[2]; @@ -285,14 +309,33 @@ void PairSNAP::compute_regular(int eflag, int vflag) // evdwl = energy of atom I, sum over coeffs_k * Bi_k evdwl = coeffi[0]; - if (gammaoneflag) { - snaptr->compute_bi(); - snaptr->copy_bi2bvec(); - for (int k = 1; k <= ncoeff; k++) - evdwl += coeffi[k]*snaptr->bvec[k-1]; - } else - for (int k = 1; k <= ncoeff; k++) - evdwl += coeffi[k]*pow(snaptr->bvec[k-1],gamma); + if (!quadraticflag) { + snaptr->compute_bi(); + snaptr->copy_bi2bvec(); + } + + // E = beta.B + 0.5*B^t.alpha.B + // coeff[k] = beta[k-1] or + // coeff[k] = alpha_ii or + // coeff[k] = alpha_ij = alpha_ji, j != i + + // linear contributions + + for (int k = 1; k <= ncoeff; k++) + evdwl += coeffi[k]*snaptr->bvec[k-1]; + + // quadratic contributions + + if (quadraticflag) { + int k = ncoeff+1; + for (int icoeff = 0; icoeff < ncoeff; icoeff++) { + double bveci = snaptr->bvec[icoeff]; + evdwl += 0.5*coeffi[k++]*bveci*bveci; + for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) { + evdwl += coeffi[k++]*bveci*snaptr->bvec[jcoeff]; + } + } + } ev_tally_full(i,2.0*evdwl,0.0,0.0,delx,dely,delz); } @@ -562,26 +605,46 @@ void PairSNAP::compute_optimized(int eflag, int vflag) sna[tid]->compute_dbidrj(); sna[tid]->copy_dbi2dbvec(); - if (!gammaoneflag) { - sna[tid]->compute_bi(); - sna[tid]->copy_bi2bvec(); - } fij[0] = 0.0; fij[1] = 0.0; fij[2] = 0.0; + // linear contributions + for (k = 1; k <= ncoeff; k++) { - double bgb; - if (gammaoneflag) - bgb = coeffi[k]; - else bgb = coeffi[k]* - gamma*pow(sna[tid]->bvec[k-1],gamma-1.0); + double bgb = coeffi[k]; fij[0] += bgb*sna[tid]->dbvec[k-1][0]; fij[1] += bgb*sna[tid]->dbvec[k-1][1]; fij[2] += bgb*sna[tid]->dbvec[k-1][2]; } + // quadratic contributions + + if (quadraticflag) { + sna[tid]->compute_bi(); + sna[tid]->copy_bi2bvec(); + int k = ncoeff+1; + for (int icoeff = 0; icoeff < ncoeff; icoeff++) { + double bveci = sna[tid]->bvec[icoeff]; + double fack = coeffi[k]*bveci; + double* dbveci = sna[tid]->dbvec[icoeff]; + fij[0] += fack*sna[tid]->dbvec[icoeff][0]; + fij[1] += fack*sna[tid]->dbvec[icoeff][1]; + fij[2] += fack*sna[tid]->dbvec[icoeff][2]; + k++; + for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) { + double facki = coeffi[k]*bveci; + double fackj = coeffi[k]*sna[tid]->bvec[jcoeff]; + double* dbvecj = sna[tid]->dbvec[jcoeff]; + fij[0] += facki*dbvecj[0]+fackj*dbveci[0]; + fij[1] += facki*dbvecj[1]+fackj*dbveci[1]; + fij[2] += facki*dbvecj[2]+fackj*dbveci[2]; + k++; + } + } + } + #if defined(_OPENMP) #pragma omp critical #endif @@ -606,15 +669,33 @@ void PairSNAP::compute_optimized(int eflag, int vflag) if (eflag&&pairs[iijj][1] == 0) { evdwl = coeffi[0]; - if (gammaoneflag) { - sna[tid]->compute_bi(); - sna[tid]->copy_bi2bvec(); - for (int k = 1; k <= ncoeff; k++) - evdwl += coeffi[k]*sna[tid]->bvec[k-1]; - } else - for (int k = 1; k <= ncoeff; k++) - evdwl += coeffi[k]*pow(sna[tid]->bvec[k-1],gamma); + sna[tid]->compute_bi(); + sna[tid]->copy_bi2bvec(); + + // E = beta.B + 0.5*B^t.alpha.B + // coeff[k] = beta[k-1] or + // coeff[k] = alpha_ii or + // coeff[k] = alpha_ij = alpha_ji, j != i + + // linear contributions + + for (int k = 1; k <= ncoeff; k++) + evdwl += coeffi[k]*sna[tid]->bvec[k-1]; + + // quadratic contributions + + if (quadraticflag) { + int k = ncoeff+1; + for (int icoeff = 0; icoeff < ncoeff; icoeff++) { + double bveci = sna[tid]->bvec[icoeff]; + evdwl += 0.5*coeffi[k++]*bveci*bveci; + for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) { + evdwl += coeffi[k++]*bveci*sna[tid]->bvec[jcoeff]; + } + } + } + #if defined(_OPENMP) #pragma omp critical #endif @@ -1363,6 +1444,22 @@ void PairSNAP::coeff(int narg, char **arg) read_files(coefffilename,paramfilename); + if (!quadraticflag) + ncoeff = ncoeffall - 1; + else { + + // ncoeffall should be (ncoeff+2)*(ncoeff+1)/2 + // so, ncoeff = floor(sqrt(2*ncoeffall))-1 + + ncoeff = sqrt(2*ncoeffall)-1; + ncoeffq = (ncoeff*(ncoeff+1))/2; + int ntmp = 1+ncoeff+ncoeffq; + if (ntmp != ncoeffall) { + printf("ncoeffall = %d ntmp = %d ncoeff = %d \n",ncoeffall,ntmp,ncoeff); + error->all(FLERR,"Incorrect SNAP coeff file"); + } + } + // read args that map atom types to SNAP elements // map[i] = which element the Ith atom type is, -1 if not mapped // map[0] is not used @@ -1416,6 +1513,7 @@ void PairSNAP::coeff(int narg, char **arg) sna[tid]->grow_rij(nmax); } + printf("ncoeff = %d snancoeff = %d \n",ncoeff,sna[0]->ncoeff); if (ncoeff != sna[0]->ncoeff) { printf("ncoeff = %d snancoeff = %d \n",ncoeff,sna[0]->ncoeff); error->all(FLERR,"Incorrect SNAP parameter file"); @@ -1470,7 +1568,7 @@ double PairSNAP::init_one(int i, int j) void PairSNAP::read_files(char *coefffilename, char *paramfilename) { - // open SNAP ceofficient file on proc 0 + // open SNAP coefficient file on proc 0 FILE *fpcoeff; if (comm->me == 0) { @@ -1518,13 +1616,13 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) words[iword] = strtok(NULL,"' \t\n\r\f"); int nelemfile = atoi(words[0]); - ncoeff = atoi(words[1])-1; - + ncoeffall = atoi(words[1]); + // Set up element lists memory->create(radelem,nelements,"pair:radelem"); memory->create(wjelem,nelements,"pair:wjelem"); - memory->create(coeffelem,nelements,ncoeff+1,"pair:coeffelem"); + memory->create(coeffelem,nelements,ncoeffall,"pair:coeffelem"); int *found = new int[nelements]; for (int ielem = 0; ielem < nelements; ielem++) @@ -1569,7 +1667,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) if (strcmp(elemtmp,elements[ielem]) == 0) break; if (ielem == nelements) { if (comm->me == 0) - for (int icoeff = 0; icoeff <= ncoeff; icoeff++) + for (int icoeff = 0; icoeff < ncoeffall; icoeff++) ptr = fgets(line,MAXLINE,fpcoeff); continue; } @@ -1578,7 +1676,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) if (found[ielem]) { if (comm->me == 0) - for (int icoeff = 0; icoeff <= ncoeff; icoeff++) + for (int icoeff = 0; icoeff < ncoeffall; icoeff++) ptr = fgets(line,MAXLINE,fpcoeff); continue; } @@ -1595,7 +1693,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) elements[ielem], radelem[ielem], wjelem[ielem]); } - for (int icoeff = 0; icoeff <= ncoeff; icoeff++) { + for (int icoeff = 0; icoeff < ncoeffall; icoeff++) { if (comm->me == 0) { ptr = fgets(line,MAXLINE,fpcoeff); if (ptr == NULL) { @@ -1629,13 +1727,12 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) // Set defaults for optional keywords - gamma = 1.0; - gammaoneflag = 1; rfac0 = 0.99363; rmin0 = 0.0; diagonalstyle = 3; switchflag = 1; bzeroflag = 1; + quadraticflag = 0; // open SNAP parameter file on proc 0 @@ -1689,9 +1786,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) } else if (strcmp(keywd,"twojmax") == 0) { twojmax = atoi(keyval); twojmaxflag = 1; - } else if (strcmp(keywd,"gamma") == 0) - gamma = atof(keyval); - else if (strcmp(keywd,"rfac0") == 0) + } else if (strcmp(keywd,"rfac0") == 0) rfac0 = atof(keyval); else if (strcmp(keywd,"rmin0") == 0) rmin0 = atof(keyval); @@ -1701,6 +1796,8 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) switchflag = atoi(keyval); else if (strcmp(keywd,"bzeroflag") == 0) bzeroflag = atoi(keyval); + else if (strcmp(keywd,"quadraticflag") == 0) + quadraticflag = atoi(keyval); else error->all(FLERR,"Incorrect SNAP parameter file"); } @@ -1708,9 +1805,6 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) if (rcutfacflag == 0 || twojmaxflag == 0) error->all(FLERR,"Incorrect SNAP parameter file"); - if (gamma == 1.0) gammaoneflag = 1; - else gammaoneflag = 0; - delete[] found; } @@ -1726,7 +1820,7 @@ double PairSNAP::memory_usage() bytes += n*n*sizeof(double); bytes += 3*nmax*sizeof(double); bytes += nmax*sizeof(int); - bytes += (2*ncoeff+1)*sizeof(double); + bytes += (2*ncoeffall)*sizeof(double); bytes += (ncoeff*3)*sizeof(double); bytes += sna[0]->memory_usage()*nthreads; return bytes; diff --git a/src/SNAP/pair_snap.h b/src/SNAP/pair_snap.h index 559d3ef571..9dec211e8e 100644 --- a/src/SNAP/pair_snap.h +++ b/src/SNAP/pair_snap.h @@ -38,7 +38,7 @@ public: double memory_usage(); protected: - int ncoeff; + int ncoeff, ncoeffq, ncoeffall; double **bvec, ***dbvec; class SNA** sna; int nmax; @@ -89,7 +89,6 @@ protected: // timespec starttime, endtime; double timers[4]; #endif - double gamma; double rcutmax; // max cutoff for all elements int nelements; // # of unique elements @@ -98,10 +97,9 @@ protected: double *wjelem; // elements weights double **coeffelem; // element bispectrum coefficients int *map; // mapping from atom types to elements - int twojmax, diagonalstyle, switchflag, bzeroflag; + int twojmax, diagonalstyle, switchflag, bzeroflag, quadraticflag; double rcutfac, rfac0, rmin0, wj1, wj2; int rcutfacflag, twojmaxflag; // flags for required parameters - int gammaoneflag; // 1 if parameter gamma is 1 }; } diff --git a/src/npair_full_bin_atomonly.h b/src/npair_full_bin_atomonly.h index 7ca5d667c7..f8c33d9558 100644 --- a/src/npair_full_bin_atomonly.h +++ b/src/npair_full_bin_atomonly.h @@ -14,7 +14,7 @@ #ifdef NPAIR_CLASS NPairStyle(full/bin/atomonly, - NPairFullBin, + NPairFullBinAtomonly, NP_FULL | NP_BIN | NP_ATOMONLY | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) -- GitLab From cace3e3530cbb6895a222f772fee2679d908614a Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Tue, 30 May 2017 16:08:32 -0400 Subject: [PATCH 218/593] Added missing :pre to doc/src/fix_adapt.txt --- doc/src/fix_adapt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/fix_adapt.txt b/doc/src/fix_adapt.txt index d7c32bef3d..19d1009b8a 100644 --- a/doc/src/fix_adapt.txt +++ b/doc/src/fix_adapt.txt @@ -47,7 +47,7 @@ keyword = {scale} or {reset} :l fix 1 all adapt 1 pair soft a 1 1 v_prefactor fix 1 all adapt 1 pair soft a 2* 3 v_prefactor fix 1 all adapt 1 pair lj/cut epsilon * * v_scale1 coul/cut scale 3 3 v_scale2 scale yes reset yes -fix 1 all adapt 10 atom diameter v_size +fix 1 all adapt 10 atom diameter v_size :pre variable ramp_up equal "ramp(0.01,0.5)" fix stretch all adapt 1 bond harmonic r0 1 v_ramp_up :pre -- GitLab From 75b567a457620106b80726dfa93d6c5d83c07a9f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 30 May 2017 16:50:38 -0400 Subject: [PATCH 219/593] add "atomonly" optimized neighbor list build styles to USER-OMP --- src/USER-OMP/npair_full_bin_atomonly_omp.cpp | 106 +++++++++++++++ src/USER-OMP/npair_full_bin_atomonly_omp.h | 44 ++++++ .../npair_half_bin_atomonly_newton_omp.cpp | 126 ++++++++++++++++++ .../npair_half_bin_atomonly_newton_omp.h | 43 ++++++ 4 files changed, 319 insertions(+) create mode 100644 src/USER-OMP/npair_full_bin_atomonly_omp.cpp create mode 100644 src/USER-OMP/npair_full_bin_atomonly_omp.h create mode 100644 src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp create mode 100644 src/USER-OMP/npair_half_bin_atomonly_newton_omp.h diff --git a/src/USER-OMP/npair_full_bin_atomonly_omp.cpp b/src/USER-OMP/npair_full_bin_atomonly_omp.cpp new file mode 100644 index 0000000000..d9e0fb9297 --- /dev/null +++ b/src/USER-OMP/npair_full_bin_atomonly_omp.cpp @@ -0,0 +1,106 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "npair_full_bin_atomonly_omp.h" +#include "npair_omp.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "atom.h" +#include "atom_vec.h" +#include "domain.h" +#include "my_page.h" +#include "error.h" + +using namespace LAMMPS_NS; +using namespace NeighConst; + +/* ---------------------------------------------------------------------- */ + +NPairFullBinAtomonlyOmp::NPairFullBinAtomonlyOmp(LAMMPS *lmp) : NPair(lmp) {} + +/* ---------------------------------------------------------------------- + binned neighbor list construction for all neighbors + every neighbor pair appears in list of both atoms i and j +------------------------------------------------------------------------- */ + +void NPairFullBinAtomonlyOmp::build(NeighList *list) +{ + const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal; + + NPAIR_OMP_INIT; +#if defined(_OPENMP) +#pragma omp parallel default(none) shared(list) +#endif + NPAIR_OMP_SETUP(nlocal); + + int i,j,k,n,itype,jtype,ibin; + double xtmp,ytmp,ztmp,delx,dely,delz,rsq; + int *neighptr; + + double **x = atom->x; + int *type = atom->type; + int *mask = atom->mask; + tagint *molecule = atom->molecule; + + int *ilist = list->ilist; + int *numneigh = list->numneigh; + int **firstneigh = list->firstneigh; + + // each thread has its own page allocator + MyPage &ipage = list->ipage[tid]; + ipage.reset(); + + // loop over owned atoms, storing neighbors + + for (i = ifrom; i < ito; i++) { + + n = 0; + neighptr = ipage.vget(); + + itype = type[i]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + + // loop over all atoms in surrounding bins in stencil including self + // skip i = j + + ibin = atom2bin[i]; + + for (k = 0; k < nstencil; k++) { + for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { + if (i == j) continue; + + jtype = type[j]; + if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue; + + delx = xtmp - x[j][0]; + dely = ytmp - x[j][1]; + delz = ztmp - x[j][2]; + rsq = delx*delx + dely*dely + delz*delz; + + if (rsq <= cutneighsq[itype][jtype]) neighptr[n++] = j; + } + } + + ilist[i] = i; + firstneigh[i] = neighptr; + numneigh[i] = n; + ipage.vgot(n); + if (ipage.status()) + error->one(FLERR,"Neighbor list overflow, boost neigh_modify one"); + } + NPAIR_OMP_CLOSE; + list->inum = nlocal; + list->gnum = 0; +} diff --git a/src/USER-OMP/npair_full_bin_atomonly_omp.h b/src/USER-OMP/npair_full_bin_atomonly_omp.h new file mode 100644 index 0000000000..643bf193a2 --- /dev/null +++ b/src/USER-OMP/npair_full_bin_atomonly_omp.h @@ -0,0 +1,44 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef NPAIR_CLASS + +NPairStyle(full/bin/atomonly/omp, + NPairFullBinAtomonlyOmp, + NP_FULL | NP_BIN | NP_ATOMONLY | NP_OMP | + NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) + +#else + +#ifndef LMP_NPAIR_FULL_BIN_ATOMONLY_OMP_H +#define LMP_NPAIR_FULL_BIN_ATOMONLY_OMP_H + +#include "npair.h" + +namespace LAMMPS_NS { + +class NPairFullBinAtomonlyOmp : public NPair { + public: + NPairFullBinAtomonlyOmp(class LAMMPS *); + ~NPairFullBinAtomonlyOmp() {} + void build(class NeighList *); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +*/ diff --git a/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp b/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp new file mode 100644 index 0000000000..02d98ff6ab --- /dev/null +++ b/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp @@ -0,0 +1,126 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "npair_half_bin_atomonly_newton_omp.h" +#include "npair_omp.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "atom.h" +#include "atom_vec.h" +#include "molecule.h" +#include "domain.h" +#include "my_page.h" +#include "error.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +NPairHalfBinAtomonlyNewtonOmp::NPairHalfBinAtomonlyNewtonOmp(LAMMPS *lmp) : NPair(lmp) {} + +/* ---------------------------------------------------------------------- + binned neighbor list construction with full Newton's 3rd law + each owned atom i checks its own bin and other bins in Newton stencil + every pair stored exactly once by some processor +------------------------------------------------------------------------- */ + +void NPairHalfBinAtomonlyNewtonOmp::build(NeighList *list) +{ + const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal; + + NPAIR_OMP_INIT; +#if defined(_OPENMP) +#pragma omp parallel default(none) shared(list) +#endif + NPAIR_OMP_SETUP(nlocal); + + int i,j,k,n,itype,jtype,ibin; + double xtmp,ytmp,ztmp,delx,dely,delz,rsq; + int *neighptr; + + // loop over each atom, storing neighbors + + double **x = atom->x; + int *type = atom->type; + int *mask = atom->mask; + tagint *molecule = atom->molecule; + + int *ilist = list->ilist; + int *numneigh = list->numneigh; + int **firstneigh = list->firstneigh; + + // each thread has its own page allocator + MyPage &ipage = list->ipage[tid]; + ipage.reset(); + + for (i = ifrom; i < ito; i++) { + + n = 0; + neighptr = ipage.vget(); + + itype = type[i]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + + // loop over rest of atoms in i's bin, ghosts are at end of linked list + // if j is owned atom, store it, since j is beyond i in linked list + // if j is ghost, only store if j coords are "above and to the right" of i + + for (j = bins[i]; j >= 0; j = bins[j]) { + if (j >= nlocal) { + if (x[j][2] < ztmp) continue; + if (x[j][2] == ztmp) { + if (x[j][1] < ytmp) continue; + if (x[j][1] == ytmp && x[j][0] < xtmp) continue; + } + } + + jtype = type[j]; + if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue; + + delx = xtmp - x[j][0]; + dely = ytmp - x[j][1]; + delz = ztmp - x[j][2]; + rsq = delx*delx + dely*dely + delz*delz; + + if (rsq <= cutneighsq[itype][jtype]) neighptr[n++] = j; + } + + // loop over all atoms in other bins in stencil, store every pair + + ibin = atom2bin[i]; + for (k = 0; k < nstencil; k++) { + for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) { + jtype = type[j]; + if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue; + + delx = xtmp - x[j][0]; + dely = ytmp - x[j][1]; + delz = ztmp - x[j][2]; + rsq = delx*delx + dely*dely + delz*delz; + + if (rsq <= cutneighsq[itype][jtype]) neighptr[n++] = j; + } + } + + ilist[i] = i; + firstneigh[i] = neighptr; + numneigh[i] = n; + ipage.vgot(n); + if (ipage.status()) + error->one(FLERR,"Neighbor list overflow, boost neigh_modify one"); + } + NPAIR_OMP_CLOSE; + list->inum = nlocal; +} diff --git a/src/USER-OMP/npair_half_bin_atomonly_newton_omp.h b/src/USER-OMP/npair_half_bin_atomonly_newton_omp.h new file mode 100644 index 0000000000..63223fd0bc --- /dev/null +++ b/src/USER-OMP/npair_half_bin_atomonly_newton_omp.h @@ -0,0 +1,43 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef NPAIR_CLASS + +NPairStyle(half/bin/atomonly/newton/omp, + NPairHalfBinAtomonlyNewtonOmp, + NP_HALF | NP_BIN | NP_ATOMONLY | NP_NEWTON | NP_OMP | NP_ORTHO) + +#else + +#ifndef LMP_NPAIR_HALF_BIN_ATOMONLY_NEWTON_OMP_H +#define LMP_NPAIR_HALF_BIN_ATOMONLY_NEWTON_OMP_H + +#include "npair.h" + +namespace LAMMPS_NS { + +class NPairHalfBinAtomonlyNewtonOmp : public NPair { + public: + NPairHalfBinAtomonlyNewtonOmp(class LAMMPS *); + ~NPairHalfBinAtomonlyNewtonOmp() {} + void build(class NeighList *); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +*/ -- GitLab From 03ab8d0f48aa432ac444adc49a1d92567f7010c3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 30 May 2017 17:04:48 -0400 Subject: [PATCH 220/593] major neighbor list style whitespace cleanup --- src/KOKKOS/npair_kokkos.cpp | 10 +- src/KOKKOS/npair_kokkos.h | 2 +- src/USER-INTEL/nbin_intel.cpp | 14 +- src/USER-INTEL/npair_full_bin_intel.cpp | 222 +++++------ src/USER-INTEL/npair_full_bin_intel.h | 4 +- .../npair_half_bin_newtoff_intel.cpp | 80 ++-- src/USER-INTEL/npair_half_bin_newtoff_intel.h | 2 +- .../npair_half_bin_newton_intel.cpp | 360 +++++++++--------- src/USER-INTEL/npair_half_bin_newton_intel.h | 4 +- .../npair_half_bin_newton_tri_intel.cpp | 180 ++++----- .../npair_half_bin_newton_tri_intel.h | 2 +- src/USER-INTEL/npair_intel.cpp | 2 +- src/npair.cpp | 12 +- src/npair.h | 2 +- src/npair_full_bin.h | 2 +- src/npair_full_bin_atomonly.h | 2 +- src/npair_full_bin_ghost.h | 2 +- src/npair_full_nsq_ghost.h | 2 +- src/npair_half_bin_atomonly_newton.cpp | 2 +- src/npair_half_respa_bin_newton_tri.cpp | 2 +- src/npair_half_size_bin_newton.cpp | 2 +- src/npair_half_size_bin_newton_tri.cpp | 2 +- src/npair_skip_respa.h | 4 +- src/npair_skip_size.cpp | 2 +- src/npair_skip_size.h | 2 +- src/npair_skip_size_off2on.cpp | 2 +- src/npair_skip_size_off2on.h | 4 +- src/npair_skip_size_off2on_oneside.cpp | 4 +- src/npair_skip_size_off2on_oneside.h | 4 +- src/nstencil_full_bin_2d.cpp | 2 +- src/nstencil_full_bin_2d.h | 2 +- src/nstencil_full_bin_3d.h | 2 +- src/nstencil_full_ghost_bin_2d.h | 2 +- src/nstencil_full_ghost_bin_3d.h | 2 +- src/nstencil_full_multi_2d.h | 2 +- src/nstencil_half_bin_2d_newtoff.cpp | 2 +- src/nstencil_half_bin_2d_newton_tri.cpp | 2 +- src/nstencil_half_bin_3d_newtoff.cpp | 2 +- src/nstencil_half_bin_3d_newton_tri.cpp | 2 +- src/nstencil_half_ghost_bin_2d_newtoff.h | 2 +- 40 files changed, 478 insertions(+), 478 deletions(-) diff --git a/src/KOKKOS/npair_kokkos.cpp b/src/KOKKOS/npair_kokkos.cpp index 3614a82cfe..b7b550369d 100644 --- a/src/KOKKOS/npair_kokkos.cpp +++ b/src/KOKKOS/npair_kokkos.cpp @@ -287,12 +287,12 @@ int NeighborKokkosExecute::exclusion(const int &i,const int &j, if (nex_mol) { for (m = 0; m < nex_mol; m++) - if (ex_mol_intra[m]) { // intra-chain: exclude i-j pair if on same molecule + if (ex_mol_intra[m]) { // intra-chain: exclude i-j pair if on same molecule if (mask[i] & ex_mol_bit[m] && mask[j] & ex_mol_bit[m] && - molecule[i] == molecule[j]) return 1; - } else // exclude i-j pair if on different molecules - if (mask[i] & ex_mol_bit[m] && mask[j] & ex_mol_bit[m] && - molecule[i] != molecule[j]) return 1; + molecule[i] == molecule[j]) return 1; + } else // exclude i-j pair if on different molecules + if (mask[i] & ex_mol_bit[m] && mask[j] & ex_mol_bit[m] && + molecule[i] != molecule[j]) return 1; } return 0; diff --git a/src/KOKKOS/npair_kokkos.h b/src/KOKKOS/npair_kokkos.h index 52cdfe0d53..8e81c57618 100644 --- a/src/KOKKOS/npair_kokkos.h +++ b/src/KOKKOS/npair_kokkos.h @@ -385,7 +385,7 @@ struct NPairKokkosBuildFunctor { } #ifdef KOKKOS_HAVE_CUDA __device__ inline - + void operator() (typename Kokkos::TeamPolicy::member_type dev) const { c.template build_ItemCuda(dev); } diff --git a/src/USER-INTEL/nbin_intel.cpp b/src/USER-INTEL/nbin_intel.cpp index 194b9a5f97..c3335b2c26 100644 --- a/src/USER-INTEL/nbin_intel.cpp +++ b/src/USER-INTEL/nbin_intel.cpp @@ -55,7 +55,7 @@ NBinIntel::~NBinIntel() { nocopy(binhead,bins,_atombin,_binpacked:alloc_if(0) free_if(1)) } #endif -} +} /* ---------------------------------------------------------------------- setup for bin_atoms() @@ -71,7 +71,7 @@ void NBinIntel::bin_atoms_setup(int nall) if (_offload_alloc) { const int * binhead = this->binhead; #pragma offload_transfer target(mic:_cop) \ - nocopy(binhead:alloc_if(0) free_if(1)) + nocopy(binhead:alloc_if(0) free_if(1)) } #endif @@ -99,7 +99,7 @@ void NBinIntel::bin_atoms_setup(int nall) const int * _atombin = this->_atombin; const int * _binpacked = this->_binpacked; #pragma offload_transfer target(mic:_cop) \ - nocopy(bins,_atombin,_binpacked:alloc_if(0) free_if(1)) + nocopy(bins,_atombin,_binpacked:alloc_if(0) free_if(1)) } #endif memory->destroy(bins); @@ -157,10 +157,10 @@ void NBinIntel::bin_atoms(IntelBuffers * buffers) { const flt_t dx = (INTEL_BIGP - bboxhi[0]); const flt_t dy = (INTEL_BIGP - bboxhi[1]); const flt_t dz = (INTEL_BIGP - bboxhi[2]); - if (dx * dx + dy * dy + dz * dz < - static_cast(neighbor->cutneighmaxsq)) + if (dx * dx + dy * dy + dz * dz < + static_cast(neighbor->cutneighmaxsq)) error->one(FLERR, - "Intel package expects no atoms within cutoff of {1e15,1e15,1e15}."); + "Intel package expects no atoms within cutoff of {1e15,1e15,1e15}."); } // ---------- Grow and cast/pack buffers ------------- @@ -181,7 +181,7 @@ void NBinIntel::bin_atoms(IntelBuffers * buffers) { { int ifrom, ito, tid; IP_PRE_omp_range_id_align(ifrom, ito, tid, nall, nthreads, - sizeof(ATOM_T)); + sizeof(ATOM_T)); buffers->thr_pack(ifrom, ito, 0); } _fix->stop_watch(TIME_PACK); diff --git a/src/USER-INTEL/npair_full_bin_intel.cpp b/src/USER-INTEL/npair_full_bin_intel.cpp index 1ec93bf113..7e0d2abdcb 100644 --- a/src/USER-INTEL/npair_full_bin_intel.cpp +++ b/src/USER-INTEL/npair_full_bin_intel.cpp @@ -70,12 +70,12 @@ fbi(NeighList *list, IntelBuffers *buffers) { #endif buffers->grow_list(list, atom->nlocal, comm->nthreads, off_end, - _fix->nbor_pack_width()); + _fix->nbor_pack_width()); int need_ic = 0; if (atom->molecular) dminimum_image_check(need_ic, neighbor->cutneighmax, neighbor->cutneighmax, - neighbor->cutneighmax); + neighbor->cutneighmax); #ifdef _LMP_INTEL_OFFLOAD if (need_ic) { @@ -167,7 +167,7 @@ fbi(const int offload, NeighList *list, IntelBuffers *buffers, overflow = _fix->get_off_overflow_flag(); _fix->stop_watch(TIME_HOST_NEIGHBOR); _fix->start_watch(TIME_OFFLOAD_LATENCY); - } else + } else #endif { tnum = comm->nthreads; @@ -255,8 +255,8 @@ fbi(const int offload, NeighList *list, IntelBuffers *buffers, ito += astart; int e_ito = ito; if (ito == num) { - int imod = ito % pack_width; - if (imod) e_ito += pack_width - imod; + int imod = ito % pack_width; + if (imod) e_ito += pack_width - imod; } const int list_size = (e_ito + tid * 2 + 2) * maxnbors; int which; @@ -276,91 +276,91 @@ fbi(const int offload, NeighList *list, IntelBuffers *buffers, const int ioffset = ntypes * itype; const int ibin = atombin[i]; - int raw_count = pack_offset; + int raw_count = pack_offset; // loop over all atoms in surrounding bins in stencil including self // skip i = j - if (exclude) { - for (int k = 0; k < nstencilp; k++) { - const int bstart = binhead[ibin + binstart[k]]; - const int bend = binhead[ibin + binend[k]]; + if (exclude) { + for (int k = 0; k < nstencilp; k++) { + const int bstart = binhead[ibin + binstart[k]]; + const int bend = binhead[ibin + binend[k]]; #ifndef _LMP_INTEL_OFFLOAD - #ifdef INTEL_VMASK + #ifdef INTEL_VMASK #pragma simd - #endif #endif - for (int jj = bstart; jj < bend; jj++) { - int j = binpacked[jj]; + #endif + for (int jj = bstart; jj < bend; jj++) { + int j = binpacked[jj]; + + if (i == j) j=e_nall; - if (i == j) j=e_nall; - #ifdef _LMP_INTEL_OFFLOAD - if (offload_noghost) { + if (offload_noghost) { if (j < nlocal) { if (i < offload_end) continue; } else if (offload) continue; } - #endif + #endif #ifndef _LMP_INTEL_OFFLOAD - const int jtype = x[j].w; - if (exclusion(i,j,itype,jtype,mask,molecule)) continue; - #endif + const int jtype = x[j].w; + if (exclusion(i,j,itype,jtype,mask,molecule)) continue; + #endif - neighptr[raw_count++] = j; + neighptr[raw_count++] = j; } } - } else { - for (int k = 0; k < nstencilp; k++) { - const int bstart = binhead[ibin + binstart[k]]; - const int bend = binhead[ibin + binend[k]]; + } else { + for (int k = 0; k < nstencilp; k++) { + const int bstart = binhead[ibin + binstart[k]]; + const int bend = binhead[ibin + binend[k]]; #ifndef _LMP_INTEL_OFFLOAD - #ifdef INTEL_VMASK + #ifdef INTEL_VMASK #pragma simd #endif #endif - for (int jj = bstart; jj < bend; jj++) { - int j = binpacked[jj]; + for (int jj = bstart; jj < bend; jj++) { + int j = binpacked[jj]; + + if (i == j) j=e_nall; - if (i == j) j=e_nall; - #ifdef _LMP_INTEL_OFFLOAD - if (offload_noghost) { + if (offload_noghost) { if (j < nlocal) { if (i < offload_end) continue; } else if (offload) continue; } - #endif + #endif - neighptr[raw_count++] = j; + neighptr[raw_count++] = j; } } - } + } - if (raw_count > obound) *overflow = 1; + if (raw_count > obound) *overflow = 1; #if defined(LMP_SIMD_COMPILER) - #ifdef _LMP_INTEL_OFFLOAD - int vlmin = lmin, vlmax = lmax, vgmin = gmin, vgmax = gmax; - #if __INTEL_COMPILER+0 > 1499 - #pragma vector aligned + #ifdef _LMP_INTEL_OFFLOAD + int vlmin = lmin, vlmax = lmax, vgmin = gmin, vgmax = gmax; + #if __INTEL_COMPILER+0 > 1499 + #pragma vector aligned #pragma simd reduction(max:vlmax,vgmax) reduction(min:vlmin, vgmin) - #endif - #else - #pragma vector aligned + #endif + #else + #pragma vector aligned #pragma simd - #endif - #endif - for (int u = pack_offset; u < raw_count; u++) { + #endif + #endif + for (int u = pack_offset; u < raw_count; u++) { int j = neighptr[u]; const flt_t delx = xtmp - x[j].x; const flt_t dely = ytmp - x[j].y; const flt_t delz = ztmp - x[j].z; const int jtype = x[j].w; const flt_t rsq = delx * delx + dely * dely + delz * delz; - if (rsq > cutneighsq[ioffset + jtype]) - neighptr[u] = e_nall; - else { + if (rsq > cutneighsq[ioffset + jtype]) + neighptr[u] = e_nall; + else { if (need_ic) { int no_special; ominimum_image_check(no_special, delx, dely, delz); @@ -376,73 +376,73 @@ fbi(const int offload, NeighList *list, IntelBuffers *buffers, if (j > vgmax) vgmax = j; } #endif - } - } + } + } #ifdef _LMP_INTEL_OFFLOAD - lmin = MIN(lmin,vlmin); - gmin = MIN(gmin,vgmin); - lmax = MAX(lmax,vlmax); - gmax = MAX(gmax,vgmax); + lmin = MIN(lmin,vlmin); + gmin = MIN(gmin,vgmin); + lmax = MAX(lmax,vlmax); + gmax = MAX(gmax,vgmax); #endif int n = lane, n2 = pack_offset; - for (int u = pack_offset; u < raw_count; u++) { - const int j = neighptr[u]; - int pj = j; - if (pj < e_nall) { - if (need_ic) - if (pj < 0) pj = -pj - 1; - - const int jtag = tag[pj]; - int flist = 0; - if (itag > jtag) { - if ((itag+jtag) % 2 == 0) flist = 1; - } else if (itag < jtag) { - if ((itag+jtag) % 2 == 1) flist = 1; - } else { + for (int u = pack_offset; u < raw_count; u++) { + const int j = neighptr[u]; + int pj = j; + if (pj < e_nall) { + if (need_ic) + if (pj < 0) pj = -pj - 1; + + const int jtag = tag[pj]; + int flist = 0; + if (itag > jtag) { + if ((itag+jtag) % 2 == 0) flist = 1; + } else if (itag < jtag) { + if ((itag+jtag) % 2 == 1) flist = 1; + } else { if (x[pj].z < ztmp) flist = 1; - else if (x[pj].z == ztmp && x[pj].y < ytmp) flist = 1; - else if (x[pj].z == ztmp && x[pj].y == ytmp && x[pj].x < xtmp) - flist = 1; - } - if (flist) { - neighptr[n2++] = j; - } else { - neighptr[n] = j; - n += pack_width; - } + else if (x[pj].z == ztmp && x[pj].y < ytmp) flist = 1; + else if (x[pj].z == ztmp && x[pj].y == ytmp && x[pj].x < xtmp) + flist = 1; + } + if (flist) { + neighptr[n2++] = j; + } else { + neighptr[n] = j; + n += pack_width; + } } } - int ns = (n - lane) / pack_width; - atombin[i] = ns; - for (int u = pack_offset; u < n2; u++) { - neighptr[n] = neighptr[u]; - n += pack_width; - } + int ns = (n - lane) / pack_width; + atombin[i] = ns; + for (int u = pack_offset; u < n2; u++) { + neighptr[n] = neighptr[u]; + n += pack_width; + } ilist[i] = i; cnumneigh[i] = ct + lane; - ns += n2 - pack_offset; + ns += n2 - pack_offset; numneigh[i] = ns; - if (ns > max_chunk) max_chunk = ns; - lane++; - if (lane == pack_width) { - ct += max_chunk * pack_width; - const int alignb = (INTEL_DATA_ALIGN / sizeof(int)); - const int edge = (ct % alignb); - if (edge) ct += alignb - edge; - neighptr = firstneigh + ct; - max_chunk = 0; - pack_offset = maxnbors * pack_width; - lane = 0; - if (ct + obound > list_size) { - if (i < ito - 1) { - *overflow = 1; - ct = (ifrom + tid * 2) * maxnbors; - } + if (ns > max_chunk) max_chunk = ns; + lane++; + if (lane == pack_width) { + ct += max_chunk * pack_width; + const int alignb = (INTEL_DATA_ALIGN / sizeof(int)); + const int edge = (ct % alignb); + if (edge) ct += alignb - edge; + neighptr = firstneigh + ct; + max_chunk = 0; + pack_offset = maxnbors * pack_width; + lane = 0; + if (ct + obound > list_size) { + if (i < ito - 1) { + *overflow = 1; + ct = (ifrom + tid * 2) * maxnbors; + } } - } + } } if (*overflow == 1) @@ -482,13 +482,13 @@ fbi(const int offload, NeighList *list, IntelBuffers *buffers, int * _noalias jlist = firstneigh + cnumneigh[i]; const int jnum = numneigh[i]; - const int trip = jnum * pack_width; + const int trip = jnum * pack_width; for (int jj = 0; jj < trip; jj+=pack_width) { const int j = jlist[jj]; - if (need_ic && j < 0) { - which = 0; - jlist[jj] = -j - 1; - } else + if (need_ic && j < 0) { + which = 0; + jlist[jj] = -j - 1; + } else ofind_special(which, special, nspecial, i, tag[j]); #ifdef _LMP_INTEL_OFFLOAD if (j >= nlocal) { @@ -511,9 +511,9 @@ fbi(const int offload, NeighList *list, IntelBuffers *buffers, int jj = 0; for (jj = 0; jj < jnum; jj++) { if (jlist[jj] >= nlocal) { - if (jlist[jj] == e_nall) jlist[jj] = nall_offset; - else jlist[jj] -= ghost_offset; - } + if (jlist[jj] == e_nall) jlist[jj] = nall_offset; + else jlist[jj] -= ghost_offset; + } } } } diff --git a/src/USER-INTEL/npair_full_bin_intel.h b/src/USER-INTEL/npair_full_bin_intel.h index 608bd0f5dd..f1be71abbc 100644 --- a/src/USER-INTEL/npair_full_bin_intel.h +++ b/src/USER-INTEL/npair_full_bin_intel.h @@ -15,7 +15,7 @@ NPairStyle(full/bin/intel, NPairFullBinIntel, - NP_FULL | NP_BIN | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | + NP_FULL | NP_BIN | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_INTEL) #else @@ -38,7 +38,7 @@ class NPairFullBinIntel : public NPairIntel { void fbi(NeighList *, IntelBuffers *); template void fbi(const int, NeighList *, IntelBuffers *, const int, - const int, const int offload_end = 0); + const int, const int offload_end = 0); }; } diff --git a/src/USER-INTEL/npair_half_bin_newtoff_intel.cpp b/src/USER-INTEL/npair_half_bin_newtoff_intel.cpp index 1fcc3f0759..9a40e2a07c 100644 --- a/src/USER-INTEL/npair_half_bin_newtoff_intel.cpp +++ b/src/USER-INTEL/npair_half_bin_newtoff_intel.cpp @@ -26,7 +26,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfBinNewtoffIntel::NPairHalfBinNewtoffIntel(LAMMPS *lmp) : +NPairHalfBinNewtoffIntel::NPairHalfBinNewtoffIntel(LAMMPS *lmp) : NPairIntel(lmp) {} /* ---------------------------------------------------------------------- @@ -75,7 +75,7 @@ hbnni(NeighList *list, IntelBuffers *buffers) { int need_ic = 0; if (atom->molecular) dminimum_image_check(need_ic, neighbor->cutneighmax, neighbor->cutneighmax, - neighbor->cutneighmax); + neighbor->cutneighmax); #ifdef _LMP_INTEL_OFFLOAD if (need_ic) { @@ -159,7 +159,7 @@ hbnni(const int offload, NeighList *list, IntelBuffers *buffers, overflow = _fix->get_off_overflow_flag(); _fix->stop_watch(TIME_HOST_NEIGHBOR); _fix->start_watch(TIME_OFFLOAD_LATENCY); - } else + } else #endif { tnum = comm->nthreads; @@ -294,13 +294,13 @@ hbnni(const int offload, NeighList *list, IntelBuffers *buffers, ominimum_image_check(no_special, delx, dely, delz); if (no_special) neighptr[n++] = -j - 1; - else + else neighptr[n++] = j; } else neighptr[n++] = j; #ifdef _LMP_INTEL_OFFLOAD - if (j < lmin) lmin = j; - if (j > lmax) lmax = j; + if (j < lmin) lmin = j; + if (j > lmax) lmax = j; #endif } else { if (need_ic) { @@ -308,16 +308,16 @@ hbnni(const int offload, NeighList *list, IntelBuffers *buffers, ominimum_image_check(no_special, delx, dely, delz); if (no_special) neighptr[n2++] = -j - 1; - else + else neighptr[n2++] = j; } else neighptr[n2++] = j; - #ifdef _LMP_INTEL_OFFLOAD - if (j < gmin) gmin = j; - if (j > gmax) gmax = j; + #ifdef _LMP_INTEL_OFFLOAD + if (j < gmin) gmin = j; + if (j > gmax) gmax = j; #endif - } - } + } + } } } ilist[i] = i; @@ -341,13 +341,13 @@ hbnni(const int offload, NeighList *list, IntelBuffers *buffers, neighptr += n; if (ct + n + maxnbors > list_size) { *overflow = 1; - ct = (ifrom + tid) * maxnbors; + ct = (ifrom + tid) * maxnbors; } } if (*overflow == 1) - for (int i = ifrom; i < ito; i++) - numneigh[i] = 0; + for (int i = ifrom; i < ito; i++) + numneigh[i] = 0; #ifdef _LMP_INTEL_OFFLOAD if (separate_buffers) { @@ -370,7 +370,7 @@ hbnni(const int offload, NeighList *list, IntelBuffers *buffers, if (offload) { ghost_offset = overflow[LMP_GHOST_MIN] - overflow[LMP_LOCAL_MAX] - 1; nall_offset = overflow[LMP_LOCAL_MAX] + 1 + nghost; - } else { + } else { ghost_offset = overflow[LMP_GHOST_MIN] - nlocal; nall_offset = nlocal + nghost; } @@ -383,38 +383,38 @@ hbnni(const int offload, NeighList *list, IntelBuffers *buffers, const int jnum = numneigh[i]; for (int jj = 0; jj < jnum; jj++) { const int j = jlist[jj]; - if (need_ic && j < 0) { - which = 0; - jlist[jj] = -j - 1; - } else + if (need_ic && j < 0) { + which = 0; + jlist[jj] = -j - 1; + } else ofind_special(which, special, nspecial, i, tag[j]); #ifdef _LMP_INTEL_OFFLOAD - if (j >= nlocal) { - if (j == nall) - jlist[jj] = nall_offset; - else if (which) - jlist[jj] = (j-ghost_offset) ^ (which << SBBITS); - else jlist[jj]-=ghost_offset; + if (j >= nlocal) { + if (j == nall) + jlist[jj] = nall_offset; + else if (which) + jlist[jj] = (j-ghost_offset) ^ (which << SBBITS); + else jlist[jj]-=ghost_offset; } else #endif - if (which) jlist[jj] = j ^ (which << SBBITS); + if (which) jlist[jj] = j ^ (which << SBBITS); } } } #ifdef _LMP_INTEL_OFFLOAD else if (separate_buffers) { - for (int i = ifrom; i < ito; ++i) { + for (int i = ifrom; i < ito; ++i) { int * _noalias jlist = firstneigh + cnumneigh[i]; const int jnum = numneigh[i]; - int jj = 0; - for (jj = 0; jj < jnum; jj++) - if (jlist[jj] >= nlocal) break; - while (jj < jnum) { - if (jlist[jj] == nall) jlist[jj] = nall_offset; - else jlist[jj] -= ghost_offset; - jj++; - } - } + int jj = 0; + for (jj = 0; jj < jnum; jj++) + if (jlist[jj] >= nlocal) break; + while (jj < jnum) { + if (jlist[jj] == nall) jlist[jj] = nall_offset; + else jlist[jj] -= ghost_offset; + jj++; + } + } } #endif } // end omp @@ -438,9 +438,9 @@ hbnni(const int offload, NeighList *list, IntelBuffers *buffers, _fix->start_watch(TIME_PACK); _fix->set_neighbor_host_sizes(); buffers->pack_sep_from_single(_fix->host_min_local(), - _fix->host_used_local(), - _fix->host_min_ghost(), - _fix->host_used_ghost()); + _fix->host_used_local(), + _fix->host_min_ghost(), + _fix->host_used_ghost()); _fix->stop_watch(TIME_PACK); } } diff --git a/src/USER-INTEL/npair_half_bin_newtoff_intel.h b/src/USER-INTEL/npair_half_bin_newtoff_intel.h index ccb4560909..49482f8b3e 100644 --- a/src/USER-INTEL/npair_half_bin_newtoff_intel.h +++ b/src/USER-INTEL/npair_half_bin_newtoff_intel.h @@ -38,7 +38,7 @@ class NPairHalfBinNewtoffIntel : public NPairIntel { void hbnni(NeighList *, IntelBuffers *); template void hbnni(const int, NeighList *, IntelBuffers *, const int, - const int); + const int); }; } diff --git a/src/USER-INTEL/npair_half_bin_newton_intel.cpp b/src/USER-INTEL/npair_half_bin_newton_intel.cpp index 5584f962e9..6313ab944f 100644 --- a/src/USER-INTEL/npair_half_bin_newton_intel.cpp +++ b/src/USER-INTEL/npair_half_bin_newton_intel.cpp @@ -26,7 +26,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfBinNewtonIntel::NPairHalfBinNewtonIntel(LAMMPS *lmp) : +NPairHalfBinNewtonIntel::NPairHalfBinNewtonIntel(LAMMPS *lmp) : NPairIntel(lmp) {} /* ---------------------------------------------------------------------- @@ -75,7 +75,7 @@ hbni(NeighList *list, IntelBuffers *buffers) { int need_ic = 0; if (atom->molecular) dminimum_image_check(need_ic, neighbor->cutneighmax, neighbor->cutneighmax, - neighbor->cutneighmax); + neighbor->cutneighmax); #ifdef _LMP_INTEL_OFFLOAD if (need_ic) { @@ -96,7 +96,7 @@ hbni(NeighList *list, IntelBuffers *buffers) { } } #else - if (need_ic) + if (need_ic) hbni(0, list, buffers, host_start, nlocal); else hbni(0, list, buffers, host_start, nlocal); @@ -119,7 +119,7 @@ hbni(const int offload, NeighList *list, IntelBuffers *buffers, if (offload) { if (INTEL_MIC_NBOR_PAD > 1) pad = INTEL_MIC_NBOR_PAD * sizeof(float) / sizeof(flt_t); - } else + } else #endif if (INTEL_NBOR_PAD > 1) pad = INTEL_NBOR_PAD * sizeof(float) / sizeof(flt_t); @@ -172,7 +172,7 @@ hbni(const int offload, NeighList *list, IntelBuffers *buffers, overflow = _fix->get_off_overflow_flag(); _fix->stop_watch(TIME_HOST_NEIGHBOR); _fix->start_watch(TIME_OFFLOAD_LATENCY); - } else + } else #endif { tnum = comm->nthreads; @@ -235,8 +235,8 @@ hbni(const int offload, NeighList *list, IntelBuffers *buffers, int end = stencil[k] + 1; for (int kk = k + 1; kk < nstencil; kk++) { if (stencil[kk-1]+1 == stencil[kk]) { - end++; - k++; + end++; + k++; } else break; } binend[nstencilp] = end; @@ -262,8 +262,8 @@ hbni(const int offload, NeighList *list, IntelBuffers *buffers, ito += astart; int e_ito = ito; if (ito == num) { - int imod = ito % swidth; - if (imod) e_ito += swidth - imod; + int imod = ito % swidth; + if (imod) e_ito += swidth - imod; } const int list_size = (e_ito + tid * 2 + 2) * maxnbors; #else @@ -294,118 +294,118 @@ hbni(const int offload, NeighList *list, IntelBuffers *buffers, // if j is owned atom, store it, since j is beyond i in linked list // if j is ghost, only store if j coords are "above/to the right" of i - int raw_count = pack_offset; + int raw_count = pack_offset; for (int j = bins[i]; j >= 0; j = bins[j]) { if (j >= nlocal) { - #ifdef _LMP_INTEL_OFFLOAD + #ifdef _LMP_INTEL_OFFLOAD if (offload_noghost && offload) continue; - #endif + #endif if (x[j].z < ztmp) continue; if (x[j].z == ztmp) { if (x[j].y < ytmp) continue; if (x[j].y == ytmp && x[j].x < xtmp) continue; } - } + } #ifdef _LMP_INTEL_OFFLOAD else if (offload_noghost && i < offload_end) continue; - #endif + #endif #ifndef _LMP_INTEL_OFFLOAD if (exclude) { - const int jtype = x[j].w; - if (exclusion(i,j,itype,jtype,mask,molecule)) continue; - } - #endif + const int jtype = x[j].w; + if (exclusion(i,j,itype,jtype,mask,molecule)) continue; + } + #endif - neighptr[raw_count++] = j; - } + neighptr[raw_count++] = j; + } // loop over all atoms in other bins in stencil, store every pair const int ibin = atombin[i]; - if (exclude) { - for (int k = 0; k < nstencilp; k++) { - const int bstart = binhead[ibin + binstart[k]]; - const int bend = binhead[ibin + binend[k]]; - #ifndef _LMP_INTEL_OFFLOAD - #ifdef INTEL_VMASK - #pragma simd - #endif - #endif - for (int jj = bstart; jj < bend; jj++) { - const int j = binpacked[jj]; - + if (exclude) { + for (int k = 0; k < nstencilp; k++) { + const int bstart = binhead[ibin + binstart[k]]; + const int bend = binhead[ibin + binend[k]]; + #ifndef _LMP_INTEL_OFFLOAD + #ifdef INTEL_VMASK + #pragma simd + #endif + #endif + for (int jj = bstart; jj < bend; jj++) { + const int j = binpacked[jj]; + #ifdef _LMP_INTEL_OFFLOAD if (offload_noghost) { if (j < nlocal) { if (i < offload_end) continue; } else if (offload) continue; } - #endif + #endif #ifndef _LMP_INTEL_OFFLOAD - const int jtype = x[j].w; - if (exclusion(i,j,itype,jtype,mask,molecule)) continue; - #endif - - neighptr[raw_count++] = j; - } - } - } else { - for (int k = 0; k < nstencilp; k++) { - const int bstart = binhead[ibin + binstart[k]]; - const int bend = binhead[ibin + binend[k]]; - #ifndef _LMP_INTEL_OFFLOAD - #ifdef INTEL_VMASK - #pragma simd - #endif - #endif - for (int jj = bstart; jj < bend; jj++) { - const int j = binpacked[jj]; - + const int jtype = x[j].w; + if (exclusion(i,j,itype,jtype,mask,molecule)) continue; + #endif + + neighptr[raw_count++] = j; + } + } + } else { + for (int k = 0; k < nstencilp; k++) { + const int bstart = binhead[ibin + binstart[k]]; + const int bend = binhead[ibin + binend[k]]; + #ifndef _LMP_INTEL_OFFLOAD + #ifdef INTEL_VMASK + #pragma simd + #endif + #endif + for (int jj = bstart; jj < bend; jj++) { + const int j = binpacked[jj]; + #ifdef _LMP_INTEL_OFFLOAD if (offload_noghost) { if (j < nlocal) { if (i < offload_end) continue; } else if (offload) continue; } - #endif + #endif - neighptr[raw_count++] = j; - } - } - } + neighptr[raw_count++] = j; + } + } + } - if (raw_count > obound) *overflow = 1; + if (raw_count > obound) *overflow = 1; #if defined(LMP_SIMD_COMPILER) - #ifdef _LMP_INTEL_OFFLOAD - int vlmin = lmin, vlmax = lmax, vgmin = gmin, vgmax = gmax; - #if __INTEL_COMPILER+0 > 1499 - #pragma vector aligned + #ifdef _LMP_INTEL_OFFLOAD + int vlmin = lmin, vlmax = lmax, vgmin = gmin, vgmax = gmax; + #if __INTEL_COMPILER+0 > 1499 + #pragma vector aligned #pragma simd reduction(max:vlmax,vgmax) reduction(min:vlmin, vgmin) - #endif - #else - #pragma vector aligned + #endif + #else + #pragma vector aligned #pragma simd - #endif - #endif - for (int u = pack_offset; u < raw_count; u++) { + #endif + #endif + for (int u = pack_offset; u < raw_count; u++) { int j = neighptr[u]; const flt_t delx = xtmp - x[j].x; const flt_t dely = ytmp - x[j].y; const flt_t delz = ztmp - x[j].z; - const int jtype = x[j].w; + const int jtype = x[j].w; const flt_t rsq = delx * delx + dely * dely + delz * delz; - if (rsq > cutneighsq[ioffset + jtype]) - neighptr[u] = e_nall; - else { - if (need_ic) { - int no_special; - ominimum_image_check(no_special, delx, dely, delz); - if (no_special) - neighptr[u] = -j - 1; - } + if (rsq > cutneighsq[ioffset + jtype]) + neighptr[u] = e_nall; + else { + if (need_ic) { + int no_special; + ominimum_image_check(no_special, delx, dely, delz); + if (no_special) + neighptr[u] = -j - 1; + } #ifdef _LMP_INTEL_OFFLOAD if (j < nlocal) { if (j < vlmin) vlmin = j; @@ -415,40 +415,40 @@ hbni(const int offload, NeighList *list, IntelBuffers *buffers, if (j > vgmax) vgmax = j; } #endif - } - } + } + } #ifdef _LMP_INTEL_OFFLOAD - lmin = MIN(lmin,vlmin); - gmin = MIN(gmin,vgmin); - lmax = MAX(lmax,vlmax); - gmax = MAX(gmax,vgmax); + lmin = MIN(lmin,vlmin); + gmin = MIN(gmin,vgmin); + lmax = MAX(lmax,vlmax); + gmax = MAX(gmax,vgmax); #endif int n = lane, n2 = pack_offset; - for (int u = pack_offset; u < raw_count; u++) { - const int j = neighptr[u]; - int pj = j; - if (pj < e_nall) { - if (need_ic) - if (pj < 0) pj = -pj - 1; - - if (pj < nlocal) { - neighptr[n] = j; - n += swidth; - } else - neighptr[n2++] = j; - } - } - int ns = (n - lane) / swidth; - for (int u = pack_offset; u < n2; u++) { - neighptr[n] = neighptr[u]; - n += swidth; - } + for (int u = pack_offset; u < raw_count; u++) { + const int j = neighptr[u]; + int pj = j; + if (pj < e_nall) { + if (need_ic) + if (pj < 0) pj = -pj - 1; + + if (pj < nlocal) { + neighptr[n] = j; + n += swidth; + } else + neighptr[n2++] = j; + } + } + int ns = (n - lane) / swidth; + for (int u = pack_offset; u < n2; u++) { + neighptr[n] = neighptr[u]; + n += swidth; + } ilist[i] = i; cnumneigh[i] = ct + lane; - ns += n2 - pack_offset; - #ifndef OUTER_CHUNK + ns += n2 - pack_offset; + #ifndef OUTER_CHUNK int edge = (ns % pad_width); if (edge) { const int pad_end = ns + (pad_width - edge); @@ -458,41 +458,41 @@ hbni(const int offload, NeighList *list, IntelBuffers *buffers, for ( ; ns < pad_end; ns++) neighptr[ns] = e_nall; } - #endif + #endif numneigh[i] = ns; - #ifdef OUTER_CHUNK - if (ns > max_chunk) max_chunk = ns; - lane++; - if (lane == swidth) { - ct += max_chunk * swidth; - const int alignb = (INTEL_DATA_ALIGN / sizeof(int)); - int edge = (ct % alignb); - if (edge) ct += alignb - edge; - neighptr = firstneigh + ct; - max_chunk = 0; - pack_offset = maxnbors * swidth; - lane = 0; - if (ct + obound > list_size) { + #ifdef OUTER_CHUNK + if (ns > max_chunk) max_chunk = ns; + lane++; + if (lane == swidth) { + ct += max_chunk * swidth; + const int alignb = (INTEL_DATA_ALIGN / sizeof(int)); + int edge = (ct % alignb); + if (edge) ct += alignb - edge; + neighptr = firstneigh + ct; + max_chunk = 0; + pack_offset = maxnbors * swidth; + lane = 0; + if (ct + obound > list_size) { if (i < ito - 1) { - *overflow = 1; - ct = (ifrom + tid * 2) * maxnbors; + *overflow = 1; + ct = (ifrom + tid * 2) * maxnbors; } - } - } - #else - ct += ns; - const int alignb = (INTEL_DATA_ALIGN / sizeof(int)); - edge = (ct % alignb); - if (edge) ct += alignb - edge; - neighptr = firstneigh + ct; - if (ct + obound > list_size) { - if (i < ito - 1) { - *overflow = 1; - ct = (ifrom + tid * 2) * maxnbors; - } - } - #endif + } + } + #else + ct += ns; + const int alignb = (INTEL_DATA_ALIGN / sizeof(int)); + edge = (ct % alignb); + if (edge) ct += alignb - edge; + neighptr = firstneigh + ct; + if (ct + obound > list_size) { + if (i < ito - 1) { + *overflow = 1; + ct = (ifrom + tid * 2) * maxnbors; + } + } + #endif } if (*overflow == 1) @@ -505,25 +505,25 @@ hbni(const int offload, NeighList *list, IntelBuffers *buffers, #pragma omp critical #endif { - if (lmin < overflow[LMP_LOCAL_MIN]) overflow[LMP_LOCAL_MIN] = lmin; - if (lmax > overflow[LMP_LOCAL_MAX]) overflow[LMP_LOCAL_MAX] = lmax; - if (gmin < overflow[LMP_GHOST_MIN]) overflow[LMP_GHOST_MIN] = gmin; - if (gmax > overflow[LMP_GHOST_MAX]) overflow[LMP_GHOST_MAX] = gmax; + if (lmin < overflow[LMP_LOCAL_MIN]) overflow[LMP_LOCAL_MIN] = lmin; + if (lmax > overflow[LMP_LOCAL_MAX]) overflow[LMP_LOCAL_MAX] = lmax; + if (gmin < overflow[LMP_GHOST_MIN]) overflow[LMP_GHOST_MIN] = gmin; + if (gmax > overflow[LMP_GHOST_MAX]) overflow[LMP_GHOST_MAX] = gmax; } - #pragma omp barrier + #pragma omp barrier } int ghost_offset = 0, nall_offset = e_nall; if (separate_buffers) { - int nghost = overflow[LMP_GHOST_MAX] + 1 - overflow[LMP_GHOST_MIN]; - if (nghost < 0) nghost = 0; - if (offload) { - ghost_offset = overflow[LMP_GHOST_MIN] - overflow[LMP_LOCAL_MAX] - 1; - nall_offset = overflow[LMP_LOCAL_MAX] + 1 + nghost; - } else { - ghost_offset = overflow[LMP_GHOST_MIN] - nlocal; - nall_offset = nlocal + nghost; - } + int nghost = overflow[LMP_GHOST_MAX] + 1 - overflow[LMP_GHOST_MIN]; + if (nghost < 0) nghost = 0; + if (offload) { + ghost_offset = overflow[LMP_GHOST_MIN] - overflow[LMP_LOCAL_MAX] - 1; + nall_offset = overflow[LMP_LOCAL_MAX] + 1 + nghost; + } else { + ghost_offset = overflow[LMP_GHOST_MIN] - nlocal; + nall_offset = nlocal + nghost; + } } #endif @@ -531,49 +531,49 @@ hbni(const int offload, NeighList *list, IntelBuffers *buffers, for (int i = ifrom; i < ito; ++i) { int * _noalias jlist = firstneigh + cnumneigh[i]; const int jnum = numneigh[i]; - #ifndef OUTER_CHUNK + #ifndef OUTER_CHUNK #if defined(LMP_SIMD_COMPILER) - #pragma vector aligned + #pragma vector aligned #pragma simd - #endif + #endif for (int jj = 0; jj < jnum; jj++) { - #else - const int trip = jnum * swidth; + #else + const int trip = jnum * swidth; for (int jj = 0; jj < trip; jj+= swidth) { - #endif + #endif const int j = jlist[jj]; - if (need_ic && j < 0) { - which = 0; - jlist[jj] = -j - 1; + if (need_ic && j < 0) { + which = 0; + jlist[jj] = -j - 1; } else ofind_special(which, special, nspecial, i, tag[j]); - #ifdef _LMP_INTEL_OFFLOAD - if (j >= nlocal) { - if (j == e_nall) - jlist[jj] = nall_offset; - else if (which) - jlist[jj] = (j-ghost_offset) ^ (which << SBBITS); - else jlist[jj]-=ghost_offset; + #ifdef _LMP_INTEL_OFFLOAD + if (j >= nlocal) { + if (j == e_nall) + jlist[jj] = nall_offset; + else if (which) + jlist[jj] = (j-ghost_offset) ^ (which << SBBITS); + else jlist[jj]-=ghost_offset; } else - #endif + #endif if (which) jlist[jj] = j ^ (which << SBBITS); } } } #ifdef _LMP_INTEL_OFFLOAD else if (separate_buffers) { - for (int i = ifrom; i < ito; ++i) { + for (int i = ifrom; i < ito; ++i) { int * _noalias jlist = firstneigh + cnumneigh[i]; const int jnum = numneigh[i]; - int jj = 0; - for (jj = 0; jj < jnum; jj++) - if (jlist[jj] >= nlocal) break; - while (jj < jnum) { - if (jlist[jj] == e_nall) jlist[jj] = nall_offset; - else jlist[jj] -= ghost_offset; - jj++; - } - } + int jj = 0; + for (jj = 0; jj < jnum; jj++) + if (jlist[jj] >= nlocal) break; + while (jj < jnum) { + if (jlist[jj] == e_nall) jlist[jj] = nall_offset; + else jlist[jj] -= ghost_offset; + jj++; + } + } } #endif } // end omp @@ -597,9 +597,9 @@ hbni(const int offload, NeighList *list, IntelBuffers *buffers, _fix->start_watch(TIME_PACK); _fix->set_neighbor_host_sizes(); buffers->pack_sep_from_single(_fix->host_min_local(), - _fix->host_used_local(), - _fix->host_min_ghost(), - _fix->host_used_ghost()); + _fix->host_used_local(), + _fix->host_min_ghost(), + _fix->host_used_ghost()); _fix->stop_watch(TIME_PACK); } } diff --git a/src/USER-INTEL/npair_half_bin_newton_intel.h b/src/USER-INTEL/npair_half_bin_newton_intel.h index 4e496986b4..9b5d0780a1 100644 --- a/src/USER-INTEL/npair_half_bin_newton_intel.h +++ b/src/USER-INTEL/npair_half_bin_newton_intel.h @@ -37,8 +37,8 @@ class NPairHalfBinNewtonIntel : public NPairIntel { template void hbni(NeighList *, IntelBuffers *); template - void hbni(const int, NeighList *, IntelBuffers *, const int, - const int, const int offload_end = 0); + void hbni(const int, NeighList *, IntelBuffers *, const int, + const int, const int offload_end = 0); }; } diff --git a/src/USER-INTEL/npair_half_bin_newton_tri_intel.cpp b/src/USER-INTEL/npair_half_bin_newton_tri_intel.cpp index 3b6d68d4de..5f191e0797 100644 --- a/src/USER-INTEL/npair_half_bin_newton_tri_intel.cpp +++ b/src/USER-INTEL/npair_half_bin_newton_tri_intel.cpp @@ -26,7 +26,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfBinNewtonTriIntel::NPairHalfBinNewtonTriIntel(LAMMPS *lmp) : +NPairHalfBinNewtonTriIntel::NPairHalfBinNewtonTriIntel(LAMMPS *lmp) : NPairIntel(lmp) {} /* ---------------------------------------------------------------------- @@ -75,7 +75,7 @@ hbnti(NeighList *list, IntelBuffers *buffers) { int need_ic = 0; if (atom->molecular) dminimum_image_check(need_ic, neighbor->cutneighmax, neighbor->cutneighmax, - neighbor->cutneighmax); + neighbor->cutneighmax); #ifdef _LMP_INTEL_OFFLOAD if (need_ic) { @@ -171,7 +171,7 @@ hbnti(const int offload, NeighList *list, IntelBuffers *buffers, overflow = _fix->get_off_overflow_flag(); _fix->stop_watch(TIME_HOST_NEIGHBOR); _fix->start_watch(TIME_OFFLOAD_LATENCY); - } else + } else #endif { tnum = comm->nthreads; @@ -279,20 +279,20 @@ hbnti(const int offload, NeighList *list, IntelBuffers *buffers, const int ibin = atombin[i]; - int raw_count = maxnbors; + int raw_count = maxnbors; for (int k = 0; k < nstencilp; k++) { const int bstart = binhead[ibin + binstart[k]]; const int bend = binhead[ibin + binend[k]]; for (int jj = bstart; jj < bend; jj++) { const int j = binpacked[jj]; - #ifdef _LMP_INTEL_OFFLOAD - if (offload_noghost) { + #ifdef _LMP_INTEL_OFFLOAD + if (offload_noghost) { if (j < nlocal) { if (i < offload_end) continue; } else if (offload) continue; } - #endif + #endif if (x[j].z < ztmp) continue; if (x[j].z == ztmp) { @@ -305,45 +305,45 @@ hbnti(const int offload, NeighList *list, IntelBuffers *buffers, #ifndef _LMP_INTEL_OFFLOAD if (exclude) { - const int jtype = x[j].w; - if (exclusion(i,j,itype,jtype,mask,molecule)) continue; - } - #endif + const int jtype = x[j].w; + if (exclusion(i,j,itype,jtype,mask,molecule)) continue; + } + #endif - neighptr[raw_count++] = j; - } - } - if (raw_count > obound) - *overflow = 1; + neighptr[raw_count++] = j; + } + } + if (raw_count > obound) + *overflow = 1; #if defined(LMP_SIMD_COMPILER) - #ifdef _LMP_INTEL_OFFLOAD - int vlmin = lmin, vlmax = lmax, vgmin = gmin, vgmax = gmax; - #if __INTEL_COMPILER+0 > 1499 - #pragma vector aligned + #ifdef _LMP_INTEL_OFFLOAD + int vlmin = lmin, vlmax = lmax, vgmin = gmin, vgmax = gmax; + #if __INTEL_COMPILER+0 > 1499 + #pragma vector aligned #pragma simd reduction(max:vlmax,vgmax) reduction(min:vlmin, vgmin) - #endif - #else - #pragma vector aligned + #endif + #else + #pragma vector aligned #pragma simd - #endif - #endif - for (int u = maxnbors; u < raw_count; u++) { + #endif + #endif + for (int u = maxnbors; u < raw_count; u++) { int j = neighptr[u]; const flt_t delx = xtmp - x[j].x; const flt_t dely = ytmp - x[j].y; const flt_t delz = ztmp - x[j].z; - const int jtype = x[j].w; + const int jtype = x[j].w; const flt_t rsq = delx * delx + dely * dely + delz * delz; - if (rsq > cutneighsq[ioffset + jtype]) - neighptr[u] = e_nall; - else { + if (rsq > cutneighsq[ioffset + jtype]) + neighptr[u] = e_nall; + else { if (need_ic) { - int no_special; - ominimum_image_check(no_special, delx, dely, delz); - if (no_special) - neighptr[u] = -j - 1; - } + int no_special; + ominimum_image_check(no_special, delx, dely, delz); + if (no_special) + neighptr[u] = -j - 1; + } #ifdef _LMP_INTEL_OFFLOAD if (j < nlocal) { @@ -358,26 +358,26 @@ hbnti(const int offload, NeighList *list, IntelBuffers *buffers, } int n = 0, n2 = maxnbors; - for (int u = maxnbors; u < raw_count; u++) { - const int j = neighptr[u]; - int pj = j; - if (pj < e_nall) { - if (need_ic) - if (pj < 0) pj = -pj - 1; - - if (pj < nlocal) - neighptr[n++] = j; - else - neighptr[n2++] = j; - } - } - int ns = n; - for (int u = maxnbors; u < n2; u++) - neighptr[n++] = neighptr[u]; + for (int u = maxnbors; u < raw_count; u++) { + const int j = neighptr[u]; + int pj = j; + if (pj < e_nall) { + if (need_ic) + if (pj < 0) pj = -pj - 1; + + if (pj < nlocal) + neighptr[n++] = j; + else + neighptr[n2++] = j; + } + } + int ns = n; + for (int u = maxnbors; u < n2; u++) + neighptr[n++] = neighptr[u]; ilist[i] = i; cnumneigh[i] = ct; - ns += n2 - maxnbors; + ns += n2 - maxnbors; int edge = (ns % pad_width); if (edge) { @@ -390,17 +390,17 @@ hbnti(const int offload, NeighList *list, IntelBuffers *buffers, } numneigh[i] = ns; - ct += ns; - const int alignb = (INTEL_DATA_ALIGN / sizeof(int)); - edge = (ct % alignb); - if (edge) ct += alignb - edge; - neighptr = firstneigh + ct; - if (ct + obound > list_size) { - if (i < ito - 1) { - *overflow = 1; - ct = (ifrom + tid * 2) * maxnbors; - } - } + ct += ns; + const int alignb = (INTEL_DATA_ALIGN / sizeof(int)); + edge = (ct % alignb); + if (edge) ct += alignb - edge; + neighptr = firstneigh + ct; + if (ct + obound > list_size) { + if (i < ito - 1) { + *overflow = 1; + ct = (ifrom + tid * 2) * maxnbors; + } + } } if (*overflow == 1) @@ -428,7 +428,7 @@ hbnti(const int offload, NeighList *list, IntelBuffers *buffers, if (offload) { ghost_offset = overflow[LMP_GHOST_MIN] - overflow[LMP_LOCAL_MAX] - 1; nall_offset = overflow[LMP_LOCAL_MAX] + 1 + nghost; - } else { + } else { ghost_offset = overflow[LMP_GHOST_MIN] - nlocal; nall_offset = nlocal + nghost; } @@ -440,43 +440,43 @@ hbnti(const int offload, NeighList *list, IntelBuffers *buffers, int * _noalias jlist = firstneigh + cnumneigh[i]; const int jnum = numneigh[i]; #if defined(LMP_SIMD_COMPILER) - #pragma vector aligned + #pragma vector aligned #pragma simd - #endif + #endif for (int jj = 0; jj < jnum; jj++) { const int j = jlist[jj]; - if (need_ic && j < 0) { - which = 0; - jlist[jj] = -j - 1; - } else + if (need_ic && j < 0) { + which = 0; + jlist[jj] = -j - 1; + } else ofind_special(which, special, nspecial, i, tag[j]); #ifdef _LMP_INTEL_OFFLOAD - if (j >= nlocal) { - if (j == e_nall) - jlist[jj] = nall_offset; - else if (which) - jlist[jj] = (j-ghost_offset) ^ (which << SBBITS); - else jlist[jj]-=ghost_offset; + if (j >= nlocal) { + if (j == e_nall) + jlist[jj] = nall_offset; + else if (which) + jlist[jj] = (j-ghost_offset) ^ (which << SBBITS); + else jlist[jj]-=ghost_offset; } else #endif - if (which) jlist[jj] = j ^ (which << SBBITS); + if (which) jlist[jj] = j ^ (which << SBBITS); } } } #ifdef _LMP_INTEL_OFFLOAD else if (separate_buffers) { - for (int i = ifrom; i < ito; ++i) { + for (int i = ifrom; i < ito; ++i) { int * _noalias jlist = firstneigh + cnumneigh[i]; const int jnum = numneigh[i]; - int jj = 0; - for (jj = 0; jj < jnum; jj++) - if (jlist[jj] >= nlocal) break; - while (jj < jnum) { - if (jlist[jj] == e_nall) jlist[jj] = nall_offset; - else jlist[jj] -= ghost_offset; - jj++; - } - } + int jj = 0; + for (jj = 0; jj < jnum; jj++) + if (jlist[jj] >= nlocal) break; + while (jj < jnum) { + if (jlist[jj] == e_nall) jlist[jj] = nall_offset; + else jlist[jj] -= ghost_offset; + jj++; + } + } } #endif } // end omp @@ -500,9 +500,9 @@ hbnti(const int offload, NeighList *list, IntelBuffers *buffers, _fix->start_watch(TIME_PACK); _fix->set_neighbor_host_sizes(); buffers->pack_sep_from_single(_fix->host_min_local(), - _fix->host_used_local(), - _fix->host_min_ghost(), - _fix->host_used_ghost()); + _fix->host_used_local(), + _fix->host_min_ghost(), + _fix->host_used_ghost()); _fix->stop_watch(TIME_PACK); } } diff --git a/src/USER-INTEL/npair_half_bin_newton_tri_intel.h b/src/USER-INTEL/npair_half_bin_newton_tri_intel.h index d1b9ee9cd1..d144c2fc52 100644 --- a/src/USER-INTEL/npair_half_bin_newton_tri_intel.h +++ b/src/USER-INTEL/npair_half_bin_newton_tri_intel.h @@ -38,7 +38,7 @@ class NPairHalfBinNewtonTriIntel : public NPairIntel { void hbnti(NeighList *, IntelBuffers *); template void hbnti(const int, NeighList *, IntelBuffers *, const int, - const int, const int offload_end = 0); + const int, const int offload_end = 0); }; } diff --git a/src/USER-INTEL/npair_intel.cpp b/src/USER-INTEL/npair_intel.cpp index bffb31b710..c92ed88774 100644 --- a/src/USER-INTEL/npair_intel.cpp +++ b/src/USER-INTEL/npair_intel.cpp @@ -62,6 +62,6 @@ void NPairIntel::grow_stencil() const int maxstencil = ns->get_maxstencil(); #pragma offload_transfer target(mic:_cop) \ in(stencil:length(maxstencil) alloc_if(1) free_if(0)) - } + } } #endif diff --git a/src/npair.cpp b/src/npair.cpp index 3451cd6eae..9fbb4d219d 100644 --- a/src/npair.cpp +++ b/src/npair.cpp @@ -123,7 +123,7 @@ void NPair::copy_bin_info() mbinxlo = nb->mbinxlo; mbinylo = nb->mbinylo; mbinzlo = nb->mbinzlo; - + bininvx = nb->bininvx; bininvy = nb->bininvy; bininvz = nb->bininvz; @@ -183,15 +183,15 @@ int NPair::exclusion(int i, int j, int itype, int jtype, if (nex_mol) { for (m = 0; m < nex_mol; m++) - // intra-chain: exclude i-j pair if in same molecule - // inter-chain: exclude i-j pair if in different molecules + // intra-chain: exclude i-j pair if in same molecule + // inter-chain: exclude i-j pair if in different molecules if (ex_mol_intra[m]) { if (mask[i] & ex_mol_bit[m] && mask[j] & ex_mol_bit[m] && - molecule[i] == molecule[j]) return 1; + molecule[i] == molecule[j]) return 1; } else { - if (mask[i] & ex_mol_bit[m] && mask[j] & ex_mol_bit[m] && - molecule[i] != molecule[j]) return 1; + if (mask[i] & ex_mol_bit[m] && mask[j] & ex_mol_bit[m] && + molecule[i] != molecule[j]) return 1; } } diff --git a/src/npair.h b/src/npair.h index 4e5e3f5dfd..6941b86164 100644 --- a/src/npair.h +++ b/src/npair.h @@ -79,7 +79,7 @@ class NPair : protected Pointers { double bininvx,bininvy,bininvz; int *atom2bin,*bins; int *binhead; - + // data from NStencil class int nstencil; diff --git a/src/npair_full_bin.h b/src/npair_full_bin.h index 432fb3cbf8..56c338e360 100644 --- a/src/npair_full_bin.h +++ b/src/npair_full_bin.h @@ -15,7 +15,7 @@ NPairStyle(full/bin, NPairFullBin, - NP_FULL | NP_BIN | NP_MOLONLY | + NP_FULL | NP_BIN | NP_MOLONLY | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/npair_full_bin_atomonly.h b/src/npair_full_bin_atomonly.h index f8c33d9558..0845d1ecef 100644 --- a/src/npair_full_bin_atomonly.h +++ b/src/npair_full_bin_atomonly.h @@ -16,7 +16,7 @@ NPairStyle(full/bin/atomonly, NPairFullBinAtomonly, NP_FULL | NP_BIN | NP_ATOMONLY | - NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) + NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/npair_full_bin_ghost.h b/src/npair_full_bin_ghost.h index a09aab8512..c5a86e68af 100644 --- a/src/npair_full_bin_ghost.h +++ b/src/npair_full_bin_ghost.h @@ -15,7 +15,7 @@ NPairStyle(full/bin/ghost, NPairFullBinGhost, - NP_FULL | NP_BIN | NP_GHOST | NP_NEWTON | NP_NEWTOFF | + NP_FULL | NP_BIN | NP_GHOST | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/npair_full_nsq_ghost.h b/src/npair_full_nsq_ghost.h index 3e259ed098..58cd73c392 100644 --- a/src/npair_full_nsq_ghost.h +++ b/src/npair_full_nsq_ghost.h @@ -15,7 +15,7 @@ NPairStyle(full/nsq/ghost, NPairFullNsqGhost, - NP_FULL | NP_NSQ | NP_GHOST | NP_NEWTON | NP_NEWTOFF | + NP_FULL | NP_NSQ | NP_GHOST | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/npair_half_bin_atomonly_newton.cpp b/src/npair_half_bin_atomonly_newton.cpp index 6bbef0700a..6da44b4a5c 100644 --- a/src/npair_half_bin_atomonly_newton.cpp +++ b/src/npair_half_bin_atomonly_newton.cpp @@ -25,7 +25,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfBinAtomonlyNewton::NPairHalfBinAtomonlyNewton(LAMMPS *lmp) : +NPairHalfBinAtomonlyNewton::NPairHalfBinAtomonlyNewton(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/npair_half_respa_bin_newton_tri.cpp b/src/npair_half_respa_bin_newton_tri.cpp index 38621224c4..4ec6685e1d 100644 --- a/src/npair_half_respa_bin_newton_tri.cpp +++ b/src/npair_half_respa_bin_newton_tri.cpp @@ -25,7 +25,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfRespaBinNewtonTri::NPairHalfRespaBinNewtonTri(LAMMPS *lmp) : +NPairHalfRespaBinNewtonTri::NPairHalfRespaBinNewtonTri(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/npair_half_size_bin_newton.cpp b/src/npair_half_size_bin_newton.cpp index a8be3ce691..4f4ecccb16 100644 --- a/src/npair_half_size_bin_newton.cpp +++ b/src/npair_half_size_bin_newton.cpp @@ -190,7 +190,7 @@ void NPairHalfSizeBinNewton::build(NeighList *list) nn += dnum; } } - + n++; } } diff --git a/src/npair_half_size_bin_newton_tri.cpp b/src/npair_half_size_bin_newton_tri.cpp index 1107f73026..559eb09a7a 100644 --- a/src/npair_half_size_bin_newton_tri.cpp +++ b/src/npair_half_size_bin_newton_tri.cpp @@ -27,7 +27,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairHalfSizeBinNewtonTri::NPairHalfSizeBinNewtonTri(LAMMPS *lmp) : +NPairHalfSizeBinNewtonTri::NPairHalfSizeBinNewtonTri(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/npair_skip_respa.h b/src/npair_skip_respa.h index 62077f85df..deff301909 100644 --- a/src/npair_skip_respa.h +++ b/src/npair_skip_respa.h @@ -15,8 +15,8 @@ NPairStyle(skip/half/respa, NPairSkipRespa, - NP_SKIP | NP_RESPA | NP_HALF | NP_FULL | - NP_NSQ | NP_BIN | NP_MULTI | + NP_SKIP | NP_RESPA | NP_HALF | NP_FULL | + NP_NSQ | NP_BIN | NP_MULTI | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/npair_skip_size.cpp b/src/npair_skip_size.cpp index 98e757e5c7..e8d19dedca 100644 --- a/src/npair_skip_size.cpp +++ b/src/npair_skip_size.cpp @@ -32,7 +32,7 @@ NPairSkipSize::NPairSkipSize(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- build skip list for subset of types from parent list iskip and ijskip flag which atom types and type pairs to skip - if list requests it, preserve shear history via fix shear/history + if list requests it, preserve shear history via fix shear/history ------------------------------------------------------------------------- */ void NPairSkipSize::build(NeighList *list) diff --git a/src/npair_skip_size.h b/src/npair_skip_size.h index 9573396641..b462c9dc97 100644 --- a/src/npair_skip_size.h +++ b/src/npair_skip_size.h @@ -15,7 +15,7 @@ NPairStyle(skip/half/size, NPairSkipSize, - NP_SKIP | NP_SIZE | NP_HALF | NP_FULL | NP_NSQ | NP_BIN | NP_MULTI | + NP_SKIP | NP_SIZE | NP_HALF | NP_FULL | NP_NSQ | NP_BIN | NP_MULTI | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/npair_skip_size_off2on.cpp b/src/npair_skip_size_off2on.cpp index 996e9939df..da9dd57047 100644 --- a/src/npair_skip_size_off2on.cpp +++ b/src/npair_skip_size_off2on.cpp @@ -33,7 +33,7 @@ NPairSkipSizeOff2on::NPairSkipSizeOff2on(LAMMPS *lmp) : NPair(lmp) {} build skip list for subset of types from parent list iskip and ijskip flag which atom types and type pairs to skip parent non-skip list used newton off, this skip list is newton on - if list requests it, preserve shear history via fix shear/history + if list requests it, preserve shear history via fix shear/history ------------------------------------------------------------------------- */ void NPairSkipSizeOff2on::build(NeighList *list) diff --git a/src/npair_skip_size_off2on.h b/src/npair_skip_size_off2on.h index 4b4e9a9c29..dab32f04ff 100644 --- a/src/npair_skip_size_off2on.h +++ b/src/npair_skip_size_off2on.h @@ -15,8 +15,8 @@ NPairStyle(skip/size/off2on, NPairSkipSizeOff2on, - NP_SKIP | NP_SIZE | NP_OFF2ON | NP_HALF | - NP_NSQ | NP_BIN | NP_MULTI | + NP_SKIP | NP_SIZE | NP_OFF2ON | NP_HALF | + NP_NSQ | NP_BIN | NP_MULTI | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/npair_skip_size_off2on_oneside.cpp b/src/npair_skip_size_off2on_oneside.cpp index a4c1625590..7377feec5b 100644 --- a/src/npair_skip_size_off2on_oneside.cpp +++ b/src/npair_skip_size_off2on_oneside.cpp @@ -27,7 +27,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NPairSkipSizeOff2onOneside::NPairSkipSizeOff2onOneside(LAMMPS *lmp) : +NPairSkipSizeOff2onOneside::NPairSkipSizeOff2onOneside(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- @@ -35,7 +35,7 @@ NPairSkipSizeOff2onOneside::NPairSkipSizeOff2onOneside(LAMMPS *lmp) : iskip and ijskip flag which atom types and type pairs to skip parent non-skip list used newton off and was not onesided, this skip list is newton on and onesided - if list requests it, preserve shear history via fix shear/history + if list requests it, preserve shear history via fix shear/history ------------------------------------------------------------------------- */ void NPairSkipSizeOff2onOneside::build(NeighList *list) diff --git a/src/npair_skip_size_off2on_oneside.h b/src/npair_skip_size_off2on_oneside.h index 9f3c06e7bc..73448ca279 100644 --- a/src/npair_skip_size_off2on_oneside.h +++ b/src/npair_skip_size_off2on_oneside.h @@ -15,8 +15,8 @@ NPairStyle(skip/size/off2on/oneside, NPairSkipSizeOff2onOneside, - NP_SKIP | NP_SIZE | NP_OFF2ON | NP_ONESIDE | NP_HALF | - NP_NSQ | NP_BIN | NP_MULTI | NP_NEWTON | NP_NEWTOFF | + NP_SKIP | NP_SIZE | NP_OFF2ON | NP_ONESIDE | NP_HALF | + NP_NSQ | NP_BIN | NP_MULTI | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) #else diff --git a/src/nstencil_full_bin_2d.cpp b/src/nstencil_full_bin_2d.cpp index 1f2b666dfb..0986c40dd4 100644 --- a/src/nstencil_full_bin_2d.cpp +++ b/src/nstencil_full_bin_2d.cpp @@ -28,7 +28,7 @@ NStencilFullBin2d::NStencilFullBin2d(LAMMPS *lmp) : NStencil(lmp) {} void NStencilFullBin2d::create() { int i,j; - + nstencil = 0; for (j = -sy; j <= sy; j++) diff --git a/src/nstencil_full_bin_2d.h b/src/nstencil_full_bin_2d.h index 18f848f275..d85063596f 100644 --- a/src/nstencil_full_bin_2d.h +++ b/src/nstencil_full_bin_2d.h @@ -15,7 +15,7 @@ NStencilStyle(full/bin/2d, NStencilFullBin2d, - NS_FULL | NS_BIN | NS_2D | + NS_FULL | NS_BIN | NS_2D | NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_full_bin_3d.h b/src/nstencil_full_bin_3d.h index d9acc9c535..facddd8ead 100644 --- a/src/nstencil_full_bin_3d.h +++ b/src/nstencil_full_bin_3d.h @@ -15,7 +15,7 @@ NStencilStyle(full/bin/3d, NStencilFullBin3d, - NS_FULL | NS_BIN | NS_3D | + NS_FULL | NS_BIN | NS_3D | NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_full_ghost_bin_2d.h b/src/nstencil_full_ghost_bin_2d.h index af47913e7f..531c7d2eb1 100644 --- a/src/nstencil_full_ghost_bin_2d.h +++ b/src/nstencil_full_ghost_bin_2d.h @@ -15,7 +15,7 @@ NStencilStyle(full/ghost/bin/2d, NStencilFullGhostBin2d, - NS_FULL | NS_GHOST | NS_BIN | NS_2D | + NS_FULL | NS_GHOST | NS_BIN | NS_2D | NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_full_ghost_bin_3d.h b/src/nstencil_full_ghost_bin_3d.h index beca6573de..ed4ca6c4d6 100644 --- a/src/nstencil_full_ghost_bin_3d.h +++ b/src/nstencil_full_ghost_bin_3d.h @@ -15,7 +15,7 @@ NStencilStyle(full/ghost/bin/3d, NStencilFullGhostBin3d, - NS_FULL | NS_GHOST | NS_BIN | NS_3D | + NS_FULL | NS_GHOST | NS_BIN | NS_3D | NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_full_multi_2d.h b/src/nstencil_full_multi_2d.h index 8154144eda..f78eecc55f 100644 --- a/src/nstencil_full_multi_2d.h +++ b/src/nstencil_full_multi_2d.h @@ -15,7 +15,7 @@ NStencilStyle(full/multi/2d, NStencilFullMulti2d, - NS_FULL | NS_MULTI | NS_2D | + NS_FULL | NS_MULTI | NS_2D | NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_half_bin_2d_newtoff.cpp b/src/nstencil_half_bin_2d_newtoff.cpp index be5bc81dbf..e51db6fe7a 100644 --- a/src/nstencil_half_bin_2d_newtoff.cpp +++ b/src/nstencil_half_bin_2d_newtoff.cpp @@ -19,7 +19,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfBin2dNewtoff::NStencilHalfBin2dNewtoff(LAMMPS *lmp) : +NStencilHalfBin2dNewtoff::NStencilHalfBin2dNewtoff(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/nstencil_half_bin_2d_newton_tri.cpp b/src/nstencil_half_bin_2d_newton_tri.cpp index 3a645a7434..4f89b1c326 100644 --- a/src/nstencil_half_bin_2d_newton_tri.cpp +++ b/src/nstencil_half_bin_2d_newton_tri.cpp @@ -19,7 +19,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfBin2dNewtonTri::NStencilHalfBin2dNewtonTri(LAMMPS *lmp) : +NStencilHalfBin2dNewtonTri::NStencilHalfBin2dNewtonTri(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/nstencil_half_bin_3d_newtoff.cpp b/src/nstencil_half_bin_3d_newtoff.cpp index 44678b05df..433de400c2 100644 --- a/src/nstencil_half_bin_3d_newtoff.cpp +++ b/src/nstencil_half_bin_3d_newtoff.cpp @@ -19,7 +19,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfBin3dNewtoff::NStencilHalfBin3dNewtoff(LAMMPS *lmp) : +NStencilHalfBin3dNewtoff::NStencilHalfBin3dNewtoff(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/nstencil_half_bin_3d_newton_tri.cpp b/src/nstencil_half_bin_3d_newton_tri.cpp index 9e8c41f97a..691ce0bb80 100644 --- a/src/nstencil_half_bin_3d_newton_tri.cpp +++ b/src/nstencil_half_bin_3d_newton_tri.cpp @@ -19,7 +19,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfBin3dNewtonTri::NStencilHalfBin3dNewtonTri(LAMMPS *lmp) : +NStencilHalfBin3dNewtonTri::NStencilHalfBin3dNewtonTri(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- diff --git a/src/nstencil_half_ghost_bin_2d_newtoff.h b/src/nstencil_half_ghost_bin_2d_newtoff.h index 3b70f0042a..3286810c1c 100644 --- a/src/nstencil_half_ghost_bin_2d_newtoff.h +++ b/src/nstencil_half_ghost_bin_2d_newtoff.h @@ -15,7 +15,7 @@ NStencilStyle(half/ghost/bin/2d/newtoff, NStencilHalfGhostBin2dNewtoff, - NS_HALF | NS_GHOST | NS_BIN | NS_2D | + NS_HALF | NS_GHOST | NS_BIN | NS_2D | NS_NEWTOFF | NS_ORTHO | NS_TRI) #else -- GitLab From 167a51538e1689c45d045afa457a3514c50e866b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 30 May 2017 21:52:32 -0400 Subject: [PATCH 221/593] support atom style variables for assigning image flags with the set command --- doc/src/set.txt | 1 + src/set.cpp | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/src/set.txt b/doc/src/set.txt index 6b59bf1332..0b428d56ed 100644 --- a/doc/src/set.txt +++ b/doc/src/set.txt @@ -80,6 +80,7 @@ keyword = {type} or {type/fraction} or {mol} or {x} or {y} or {z} or \ value can be an atom-style variable (see below) {image} nx ny nz nx,ny,nz = which periodic image of the simulation box the atom is in + any of nx,ny,nz can be an atom-style variable (see below) {bond} value = bond type for all bonds between selected atoms {angle} value = angle type for all angles between selected atoms {dihedral} value = dihedral type for all dihedrals between selected atoms diff --git a/src/set.cpp b/src/set.cpp index 4ed07d423b..b97a96167c 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -327,15 +327,18 @@ void Set::command(int narg, char **arg) ximageflag = yimageflag = zimageflag = 0; if (strcmp(arg[iarg+1],"NULL") != 0) { ximageflag = 1; - ximage = force->inumeric(FLERR,arg[iarg+1]); + if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1); + else ximage = force->inumeric(FLERR,arg[iarg+1]); } if (strcmp(arg[iarg+2],"NULL") != 0) { yimageflag = 1; - yimage = force->inumeric(FLERR,arg[iarg+2]); + if (strstr(arg[iarg+2],"v_") == arg[iarg+2]) varparse(arg[iarg+2],2); + else yimage = force->inumeric(FLERR,arg[iarg+2]); } if (strcmp(arg[iarg+3],"NULL") != 0) { zimageflag = 1; - zimage = force->inumeric(FLERR,arg[iarg+3]); + if (strstr(arg[iarg+3],"v_") == arg[iarg+3]) varparse(arg[iarg+3],3); + else zimage = force->inumeric(FLERR,arg[iarg+3]); } if (ximageflag && ximage && !domain->xperiodic) error->all(FLERR, @@ -789,6 +792,9 @@ void Set::set(int keyword) int xbox = (atom->image[i] & IMGMASK) - IMGMAX; int ybox = (atom->image[i] >> IMGBITS & IMGMASK) - IMGMAX; int zbox = (atom->image[i] >> IMG2BITS) - IMGMAX; + if (varflag1) ximage = static_cast(xvalue); + if (varflag2) yimage = static_cast(yvalue); + if (varflag3) zimage = static_cast(zvalue); if (ximageflag) xbox = ximage; if (yimageflag) ybox = yimage; if (zimageflag) zbox = zimage; -- GitLab From 066123007cd9277d4c03669707cf34ab6c05bc06 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 30 May 2017 21:54:16 -0400 Subject: [PATCH 222/593] avoid undesired negative forces for high particle velocities in granular models --- src/GRANULAR/pair_gran_hertz_history.cpp | 2 ++ src/GRANULAR/pair_gran_hooke.cpp | 2 ++ src/GRANULAR/pair_gran_hooke_history.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/GRANULAR/pair_gran_hertz_history.cpp b/src/GRANULAR/pair_gran_hertz_history.cpp index e52aac10db..14cbc8eb0a 100644 --- a/src/GRANULAR/pair_gran_hertz_history.cpp +++ b/src/GRANULAR/pair_gran_hertz_history.cpp @@ -183,6 +183,7 @@ void PairGranHertzHistory::compute(int eflag, int vflag) ccel = kn*(radsum-r)*rinv - damp; polyhertz = sqrt((radsum-r)*radi*radj / radsum); ccel *= polyhertz; + if (ccel < 0.0) ccel = 0.0; // relative velocities @@ -390,6 +391,7 @@ double PairGranHertzHistory::single(int i, int j, int itype, int jtype, ccel = kn*(radsum-r)*rinv - damp; polyhertz = sqrt((radsum-r)*radi*radj / radsum); ccel *= polyhertz; + if (ccel < 0.0) ccel = 0.0; // relative velocities diff --git a/src/GRANULAR/pair_gran_hooke.cpp b/src/GRANULAR/pair_gran_hooke.cpp index 66e1c3dd7a..2d6d113ab7 100644 --- a/src/GRANULAR/pair_gran_hooke.cpp +++ b/src/GRANULAR/pair_gran_hooke.cpp @@ -161,6 +161,7 @@ void PairGranHooke::compute(int eflag, int vflag) damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radsum-r)*rinv - damp; + if (ccel < 0.0) ccel = 0.0; // relative velocities @@ -302,6 +303,7 @@ double PairGranHooke::single(int i, int j, int itype, int jtype, double rsq, damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radsum-r)*rinv - damp; + if (ccel < 0.0) ccel = 0.0; // relative velocities diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index e9662c9e73..1378709cb5 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -223,6 +223,7 @@ void PairGranHookeHistory::compute(int eflag, int vflag) damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radsum-r)*rinv - damp; + if (ccel < 0.0) ccel = 0.0; // relative velocities @@ -687,6 +688,7 @@ double PairGranHookeHistory::single(int i, int j, int itype, int jtype, damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radsum-r)*rinv - damp; + if (ccel < 0.0) ccel = 0.0; // relative velocities -- GitLab From 0be2cd3d432dcfd122651ab7ac68f3f4e24d1fac Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 30 May 2017 23:58:56 -0400 Subject: [PATCH 223/593] fix bug reported on lammps-users, when not using the first molecule template --- src/MC/fix_gcmc.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index e0a269b88c..fbe6b6bb62 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -501,7 +501,7 @@ void FixGCMC::init() if (ifix < 0) error->all(FLERR,"Fix gcmc rigid fix does not exist"); fixrigid = modify->fix[ifix]; int tmp; - if (onemols != (Molecule **) fixrigid->extract("onemol",tmp)) + if (&onemols[imol] != (Molecule **) fixrigid->extract("onemol",tmp)) error->all(FLERR, "Fix gcmc and fix rigid/small not using " "same molecule template ID"); @@ -516,7 +516,7 @@ void FixGCMC::init() if (ifix < 0) error->all(FLERR,"Fix gcmc shake fix does not exist"); fixshake = modify->fix[ifix]; int tmp; - if (onemols != (Molecule **) fixshake->extract("onemol",tmp)) + if (&onemols[imol] != (Molecule **) fixshake->extract("onemol",tmp)) error->all(FLERR,"Fix gcmc and fix shake not using " "same molecule template ID"); } @@ -1397,12 +1397,13 @@ void FixGCMC::attempt_molecule_insertion() // FixRigidSmall::set_molecule stores rigid body attributes // FixShake::set_molecule stores shake info for molecule - - if (rigidflag) - fixrigid->set_molecule(nlocalprev,maxtag_all,imol,com_coord,vnew,quat); - else if (shakeflag) - fixshake->set_molecule(nlocalprev,maxtag_all,imol,com_coord,vnew,quat); + for (int submol = 0; submol < nmol; ++submol) { + if (rigidflag) + fixrigid->set_molecule(nlocalprev,maxtag_all,submol,com_coord,vnew,quat); + else if (shakeflag) + fixshake->set_molecule(nlocalprev,maxtag_all,submol,com_coord,vnew,quat); + } atom->natoms += natoms_per_molecule; if (atom->natoms < 0) error->all(FLERR,"Too many total atoms"); @@ -2058,11 +2059,12 @@ void FixGCMC::attempt_molecule_insertion_full() // FixRigidSmall::set_molecule stores rigid body attributes // FixShake::set_molecule stores shake info for molecule - if (rigidflag) - fixrigid->set_molecule(nlocalprev,maxtag_all,imol,com_coord,vnew,quat); - else if (shakeflag) - fixshake->set_molecule(nlocalprev,maxtag_all,imol,com_coord,vnew,quat); - + for (int submol = 0; submol < nmol; ++submol) { + if (rigidflag) + fixrigid->set_molecule(nlocalprev,maxtag_all,submol,com_coord,vnew,quat); + else if (shakeflag) + fixshake->set_molecule(nlocalprev,maxtag_all,submol,com_coord,vnew,quat); + } atom->natoms += natoms_per_molecule; if (atom->natoms < 0) error->all(FLERR,"Too many total atoms"); -- GitLab From 85e917ae5200887365235d93b705fb1bb2f1a164 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 31 May 2017 00:38:44 -0400 Subject: [PATCH 224/593] integrate compute cnp/atom contributed by Paulo Branicio (USC) --- doc/src/Eqs/cnp_cutoff.jpg | Bin 0 -> 13431 bytes doc/src/Eqs/cnp_cutoff.tex | 14 ++ doc/src/Eqs/cnp_cutoff2.jpg | Bin 0 -> 2518 bytes doc/src/Eqs/cnp_cutoff2.tex | 12 ++ doc/src/Eqs/cnp_eq.jpg | Bin 0 -> 23959 bytes doc/src/Eqs/cnp_eq.tex | 9 + doc/src/Section_commands.txt | 1 + doc/src/compute_cna_atom.txt | 4 +- doc/src/compute_cnp_atom.txt | 111 ++++++++++ doc/src/computes.txt | 1 + doc/src/lammps.book | 1 + src/.gitignore | 4 +- src/USER-MISC/README | 1 + src/USER-MISC/compute_cnp_atom.cpp | 311 +++++++++++++++++++++++++++++ src/USER-MISC/compute_cnp_atom.h | 92 +++++++++ 15 files changed, 557 insertions(+), 4 deletions(-) create mode 100644 doc/src/Eqs/cnp_cutoff.jpg create mode 100644 doc/src/Eqs/cnp_cutoff.tex create mode 100644 doc/src/Eqs/cnp_cutoff2.jpg create mode 100644 doc/src/Eqs/cnp_cutoff2.tex create mode 100644 doc/src/Eqs/cnp_eq.jpg create mode 100644 doc/src/Eqs/cnp_eq.tex create mode 100644 doc/src/compute_cnp_atom.txt create mode 100644 src/USER-MISC/compute_cnp_atom.cpp create mode 100644 src/USER-MISC/compute_cnp_atom.h diff --git a/doc/src/Eqs/cnp_cutoff.jpg b/doc/src/Eqs/cnp_cutoff.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fae5c6b636c0f818f8677fd7fce4f402cb03a95d GIT binary patch literal 13431 zcmex=$<%PwSRFvdYWaQ-K{vTlA=3scoIF*r6 zkm3Ik1{nrM24+SOV1NNuHg*Ci-{z52=9a0t*#Vqh4mVZiD+Wr$ zxl3zpT=tzwXIX;Xt0U&|9{#6hv3u4kS98P{&5KgCvbrd03brJma+|NP&=&KGo$eEM z7o{lfoFv82k-Iwic!3aq+vMXDr62JtnQ#i{uH{qIGh4Eji(#p!HH&;;{1&Y4t5k9+ zJyoP7pBW_O6!zFLVJ&B1fLF(7hAFGvuXp~C`nojbZp5r-sq>?%>{+jN6e-VM7VtPr zp@Sp9OF5@feEO0VWj0KEd9&VZyRECZY_@mqLPZTHw1M)f=6gt$P2M&2Y)v!WA@Sy`_$^n(@XZTiR!qvhta2d8_Ry zrO^D0W6l1>o8yle?Y{1@&R_S)Eh(QrmB&TA=5DoErRT`MT~q4R z)3(m~6UgZq)WN_zsa9L;TU24BRk7a6ldOKJ=Gz51(`y&F-S$z*KkZ_Z?HILF@2NhN@0zF0N-%M-3hmU6CI^-Fs{bF;pBJRvD-Yt7luvfG00?l?T-R=-M1=2W98eKr@$ z-1QD8{9KYXd7@F|w+%e=_ zUayL6XYV%6(j3s-Id<;B2&L*?b2;w zmpU1b6fw`@WWVQk{QjMgt(smzQ$Ky~-E`@0>5*->ghIBic%j1gWbzAbi36W`0_!eV zem;3pS9RuxHD?Z$Kh5~?WJjZlChzL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>c%v8QFE$z479oxL~h^)!9=I03oyCP5g_*2XNj4kGxo!y1_X;8>=4gJ*wFG zQJnwzrby|3bHY~&CM0&8x!L1mv?X)BuIz!@#>hnnFS@*(ZM-;fV#C(;y0T~4qZ$4+ Qyr}=6b5W2iQ2+lX08>=9$p8QV literal 0 HcmV?d00001 diff --git a/doc/src/Eqs/cnp_cutoff2.tex b/doc/src/Eqs/cnp_cutoff2.tex new file mode 100644 index 0000000000..fcec31fd24 --- /dev/null +++ b/doc/src/Eqs/cnp_cutoff2.tex @@ -0,0 +1,12 @@ +\documentclass[12pt,article]{article} + +\usepackage{indentfirst} +\usepackage{amsmath} + +\begin{document} + +$$ + Rc + Rs > 2*{\rm cutoff} +$$ + +\end{document} diff --git a/doc/src/Eqs/cnp_eq.jpg b/doc/src/Eqs/cnp_eq.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d4213144424331690936b0fd96014ba8ea8eaca0 GIT binary patch literal 23959 zcmex=Q# zzd*s+S;5G_&|E>oH!(Rg4;YY?gWIr-7!pvZ7V}hH_ zbqH#n2Q-Yp^#2?G-!kxkeHHKQ%fS5q9RnYj$B@zhQuqHhLkj~B2L}fy2M;GFk03V} zx1cCL4-dbngs`xvu&{(64;VlxFdKtlM9L;}a0!nNf*>Nsy6Qkn#Ur1{Mac|3?_@85kH@8NmSRL1qRJCWoZB9$H*tCVnaOQR=77Er&0cKK|^c zK4nSkmZ?XsJo&P8>(Q%EzlNoiwM|>L?bx+v-^|^^)63hZFW-Lr`t$FC3`|UnOe`#5 zH?gy^nu496Xeh+u7?@b7B+P2mI8g-Tf`dU9KNzbdJuGUPg0xoTsZYQfj2wq z;?|yI>9^TZS52q7N1Qp)rFqakch#!*rq*;5@<;~TX z-F9Pbn={*N>$I)6xmC~dZ7;k2pTX$-rC;?Aw^i9c6!r1HEwRmL_KnxtyRF_=Y`*g4 zy-XW+q`wFXHTA-84hV};knm&(P-|>>RtUeBy+dK zCU&n`*=rsi7yRwb*PHJaUrV<4I2K<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Vu2A;q1U+UMM`Sr(c?eBdt TuTRbW_1poph7hgB`hODucj-gp literal 0 HcmV?d00001 diff --git a/doc/src/Eqs/cnp_eq.tex b/doc/src/Eqs/cnp_eq.tex new file mode 100644 index 0000000000..e5f157e6ba --- /dev/null +++ b/doc/src/Eqs/cnp_eq.tex @@ -0,0 +1,9 @@ +\documentclass[12pt]{article} + +\begin{document} + +$$ + Q_{i} = \frac{1}{n_i}\sum_{j = 1}^{n_i} | \sum_{k = 1}^{n_{ij}} \vec{R}_{ik} + \vec{R}_{jk} |^2 +$$ + +\end{document} diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index dc7ddebe58..4895a0729c 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -831,6 +831,7 @@ package"_Section_start.html#start_3. "ackland/atom"_compute_ackland_atom.html, "basal/atom"_compute_basal_atom.html, +"cnp/atom"_compute_cnp_atom.html, "dpd"_compute_dpd.html, "dpd/atom"_compute_dpd_atom.html, "fep"_compute_fep.html, diff --git a/doc/src/compute_cna_atom.txt b/doc/src/compute_cna_atom.txt index 74240b515d..23289b0132 100644 --- a/doc/src/compute_cna_atom.txt +++ b/doc/src/compute_cna_atom.txt @@ -26,7 +26,7 @@ Define a computation that calculates the CNA (Common Neighbor Analysis) pattern for each atom in the group. In solid-state systems the CNA pattern is a useful measure of the local crystal structure around an atom. The CNA methodology is described in "(Faken)"_#Faken -and "(Tsuzuki)"_#Tsuzuki. +and "(Tsuzuki)"_#Tsuzuki1. Currently, there are five kinds of CNA patterns LAMMPS recognizes: @@ -93,5 +93,5 @@ above. :link(Faken) [(Faken)] Faken, Jonsson, Comput Mater Sci, 2, 279 (1994). -:link(Tsuzuki) +:link(Tsuzuki1) [(Tsuzuki)] Tsuzuki, Branicio, Rino, Comput Phys Comm, 177, 518 (2007). diff --git a/doc/src/compute_cnp_atom.txt b/doc/src/compute_cnp_atom.txt new file mode 100644 index 0000000000..2e9950b4c1 --- /dev/null +++ b/doc/src/compute_cnp_atom.txt @@ -0,0 +1,111 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +compute cnp/atom command :h3 + +[Syntax:] + +compute ID group-ID cnp/atom cutoff :pre + +ID, group-ID are documented in "compute"_compute.html command +cnp/atom = style name of this compute command +cutoff = cutoff distance for nearest neighbors (distance units) :ul + +[Examples:] + +compute 1 all cnp/atom 3.08 :pre + +[Description:] + +Define a computation that calculates the Common Neighborhood +Parameter (CNP) for each atom in the group. In solid-state systems +the CNP is a useful measure of the local crystal structure +around an atom and can be used to characterize whether the +atom is part of a perfect lattice, a local defect (e.g. a dislocation +or stacking fault), or at a surface. + +The value of the CNP parameter will be 0.0 for atoms not +in the specified compute group. Note that normally a CNP calculation should only be +performed on mono-component systems. + +This parameter is computed using the following formula from +"(Tsuzuki)"_#Tsuzuki2 + +:c,image(Eqs/cnp_eq.jpg) + +where the index {j} goes over the {n}i nearest neighbors of atom +{i}, and the index {k} goes over the {n}ij common nearest neighbors +between atom {i} and atom {j}. Rik and Rjk are the vectors connecting atom +{k} to atoms {i} and {j}. The quantity in the double sum is computed +for each atom. + +The CNP calculation is sensitive to the specified cutoff value. +You should ensure that the appropriate nearest neighbors of an atom are +found within the cutoff distance for the presumed crystal structure. +E.g. 12 nearest neighbor for perfect FCC and HCP crystals, 14 nearest +neighbors for perfect BCC crystals. These formulas can be used to +obtain a good cutoff distance: + +:c,image(Eqs/cnp_cutoff.jpg) + +where a is the lattice constant for the crystal structure concerned +and in the HCP case, x = (c/a) / 1.633, where 1.633 is the ideal c/a +for HCP crystals. + +Also note that since the CNP calculation in LAMMPS uses the neighbors +of an owned atom to find the nearest neighbors of a ghost atom, the +following relation should also be satisfied: + +:c,image(Eqs/cnp_cutoff2.jpg) + +where Rc is the cutoff distance of the potential, Rs is the skin +distance as specified by the "neighbor"_neighbor.html command, and +cutoff is the argument used with the compute cnp/atom command. LAMMPS +will issue a warning if this is not the case. + +The neighbor list needed to compute this quantity is constructed each +time the calculation is performed (e.g. each time a snapshot of atoms +is dumped). Thus it can be inefficient to compute/dump this quantity +too frequently or to have multiple compute/dump commands, each with a +{cnp/atom} style. + +[Output info:] + +This compute calculates a per-atom vector, which can be accessed by +any command that uses per-atom values from a compute as input. See +"Section 6.15"_Section_howto.html#howto_15 for an overview of +LAMMPS output options. + +The per-atom vector values will be real positive numbers. Some typical CNP +values: + +FCC lattice = 0.0 +BCC lattice = 0.0 +HCP lattice = 4.4 :pre + +FCC (111) surface ~ 13.0 +FCC (100) surface ~ 26.5 +FCC dislocation core ~ 11 :pre + +[Restrictions:] + +This compute is part of the USER-MISC package. It is only enabled if +LAMMPS was built with that package. See the "Making +LAMMPS"_Section_start.html#start_3 section for more info. + +[Related commands:] + +"compute cna/atom"_compute_cna_atom.html +"compute centro/atom"_compute_centro_atom.html + +[Default:] none + +:line + +:link(Tsuzuki2) +[(Tsuzuki)] Tsuzuki, Branicio, Rino, Comput Phys Comm, 177, 518 (2007). diff --git a/doc/src/computes.txt b/doc/src/computes.txt index 1d01798791..5a6ca66c46 100644 --- a/doc/src/computes.txt +++ b/doc/src/computes.txt @@ -17,6 +17,7 @@ Computes :h1 compute_chunk_atom compute_cluster_atom compute_cna_atom + compute_cnp_atom compute_com compute_com_chunk compute_contact_atom diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 1769f29825..79ff5b4a75 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -301,6 +301,7 @@ compute_centro_atom.html compute_chunk_atom.html compute_cluster_atom.html compute_cna_atom.html +compute_cnp_atom.html compute_com.html compute_com_chunk.html compute_contact_atom.html diff --git a/src/.gitignore b/src/.gitignore index 0cddfa6951..d6c535ebe9 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -177,8 +177,8 @@ /compute_basal_atom.h /compute_body_local.cpp /compute_body_local.h -/compute_cna_atom2.cpp -/compute_cna_atom2.h +/compute_cnp_atom.cpp +/compute_cnp_atom.h /compute_damage_atom.cpp /compute_damage_atom.h /compute_dilatation_atom.cpp diff --git a/src/USER-MISC/README b/src/USER-MISC/README index cacee41e0c..f501c81c17 100644 --- a/src/USER-MISC/README +++ b/src/USER-MISC/README @@ -28,6 +28,7 @@ bond_style harmonic/shift, Carsten Svaneborg, science at zqex.dk, 8 Aug 11 bond_style harmonic/shift/cut, Carsten Svaneborg, science at zqex.dk, 8 Aug 11 compute ackland/atom, Gerolf Ziegenhain, gerolf at ziegenhain.com, 4 Oct 2007 compute basal/atom, Christopher Barrett, cdb333 at cavs.msstate.edu, 3 Mar 2013 +compute cnp/atom, Paulo Branicio (USC), branicio at usc.edu, 31 May 2017 compute temp/rotate, Laurent Joly (U Lyon), ljoly.ulyon at gmail.com, 8 Aug 11 compute PRESSURE/GREM, David Stelter, dstelter@bu.edu, 22 Nov 16 dihedral_style cosine/shift/exp, Carsten Svaneborg, science at zqex.dk, 8 Aug 11 diff --git a/src/USER-MISC/compute_cnp_atom.cpp b/src/USER-MISC/compute_cnp_atom.cpp new file mode 100644 index 0000000000..6dce41291e --- /dev/null +++ b/src/USER-MISC/compute_cnp_atom.cpp @@ -0,0 +1,311 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. + + Common Neighbor Parameter as proposed in: + Tsuzuki, Branicio, Rino, Comput Phys Comm, 177, 518 (2007) + Cite: http://dx.doi.org/10.1063/1.2197987 + +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Paulo Branicio (University of Southern California) + branicio@usc.edu +------------------------------------------------------------------------- */ + +#include +#include +#include + +#include "compute_cnp_atom.h" +#include "atom.h" +#include "update.h" +#include "modify.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "force.h" +#include "pair.h" +#include "comm.h" +#include "memory.h" +#include "error.h" + +using namespace LAMMPS_NS; + +//define maximum values +#define MAXNEAR 24 +#define MAXCOMMON 12 + +enum{NCOMMON}; + +/* ---------------------------------------------------------------------- */ + +ComputeCNPAtom::ComputeCNPAtom(LAMMPS *lmp, int narg, char **arg) : + Compute(lmp, narg, arg), + nearest(NULL), nnearest(NULL), cnpv(NULL) +{ + if (narg != 4) error->all(FLERR,"Illegal compute cnp/atom command"); + + peratom_flag = 1; + size_peratom_cols = 0; + + double cutoff = force->numeric(FLERR,arg[3]); + if (cutoff < 0.0) error->all(FLERR,"Illegal compute cnp/atom command"); + cutsq = cutoff*cutoff; + + nmax = 0; +} + +/* ---------------------------------------------------------------------- */ + +ComputeCNPAtom::~ComputeCNPAtom() +{ + memory->destroy(nearest); + memory->destroy(nnearest); + memory->destroy(cnpv); +} + +/* ---------------------------------------------------------------------- */ + +void ComputeCNPAtom::init() +{ + if (force->pair == NULL) + error->all(FLERR,"Compute cnp/atom requires a pair style be defined"); + + if (sqrt(cutsq) > force->pair->cutforce) + error->all(FLERR,"Compute cnp/atom cutoff is longer than pairwise cutoff"); + + if (2.0*sqrt(cutsq) > force->pair->cutforce + neighbor->skin && + comm->me == 0) + error->warning(FLERR,"Compute cnp/atom cutoff may be too large to find " + "ghost atom neighbors"); + + int count = 0; + for (int i = 0; i < modify->ncompute; i++) + if (strcmp(modify->compute[i]->style,"cnp/atom") == 0) count++; + if (count > 1 && comm->me == 0) + error->warning(FLERR,"More than one compute cnp/atom defined"); + + // need an occasional full neighbor list + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->pair = 0; + neighbor->requests[irequest]->compute = 1; + neighbor->requests[irequest]->half = 0; + neighbor->requests[irequest]->full = 1; + neighbor->requests[irequest]->occasional = 1; +} + +/* ---------------------------------------------------------------------- */ + +void ComputeCNPAtom::init_list(int id, NeighList *ptr) +{ + list = ptr; +} + +/* ---------------------------------------------------------------------- */ + +void ComputeCNPAtom::compute_peratom() +{ + int i,j,k,ii,jj,kk,m,n,inum,jnum,inear,jnear; + int firstflag,ncommon; + int *ilist,*jlist,*numneigh,**firstneigh; + int cnp[MAXNEAR][4],onenearest[MAXNEAR]; + int common[MAXCOMMON]; + double xtmp,ytmp,ztmp,delx,dely,delz,rsq; + double xjtmp,yjtmp,zjtmp,rjkx,rjky,rjkz; + + invoked_peratom = update->ntimestep; + + // grow arrays if necessary + + if (atom->nmax > nmax) { + memory->destroy(nearest); + memory->destroy(nnearest); + memory->destroy(cnpv); + nmax = atom->nmax; + memory->create(nearest,nmax,MAXNEAR,"cnp:nearest"); + memory->create(nnearest,nmax,"cnp:nnearest"); + memory->create(cnpv,nmax,"cnp:cnp_cnpv"); + vector_atom = cnpv; + } + + // invoke full neighbor list (will copy or build if necessary) + + neighbor->build_one(list); + + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; + + // find the neigbors of each atom within cutoff using full neighbor list + // nearest[] = atom indices of nearest neighbors, up to MAXNEAR + // do this for all atoms, not just compute group + // since CNP calculation requires neighbors of neighbors + + double **x = atom->x; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + int nerror = 0; + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + + n = 0; + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + + delx = xtmp - x[j][0]; + dely = ytmp - x[j][1]; + delz = ztmp - x[j][2]; + rsq = delx*delx + dely*dely + delz*delz; + if (rsq < cutsq) { + if (n < MAXNEAR) nearest[i][n++] = j; + else { + nerror++; + break; + } + } + } + nnearest[i] = n; + } + + // warning message + + int nerrorall; + MPI_Allreduce(&nerror,&nerrorall,1,MPI_INT,MPI_SUM,world); + if (nerrorall && comm->me == 0) { + char str[128]; + sprintf(str,"Too many neighbors in CNP for %d atoms",nerrorall); + error->warning(FLERR,str,0); + } + + // compute CNP value for each atom in group + // only performed if # of nearest neighbors = 12 or 14 (fcc,hcp) + + nerror = 0; + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + // reset cnpv + cnpv[i] = 0.0; + + // loop over nearest neighbors of I to build cnp data structure + // cnp[k][NCOMMON] = # of common neighbors of I with each of its neighbors + for (m = 0; m < nnearest[i]; m++) { + j = nearest[i][m]; + xjtmp = x[j][0]; + yjtmp = x[j][1]; + zjtmp = x[j][2]; + + // common = list of neighbors common to atom I and atom J + // if J is an owned atom, use its near neighbor list to find them + // if J is a ghost atom, use full neighbor list of I to find them + // in latter case, must exclude J from I's neighbor list + + // find common neighbors of i and j using near neighbor list + if (j < nlocal) { + firstflag = 1; + ncommon = 0; + for (inear = 0; inear < nnearest[i]; inear++) + for (jnear = 0; jnear < nnearest[j]; jnear++) + if (nearest[i][inear] == nearest[j][jnear]) { + if (ncommon < MAXCOMMON) common[ncommon++] = nearest[i][inear]; + else if (firstflag) { + nerror++; + firstflag = 0; + } + } + + // find common neighbors of i and j using full neighbor list + } else { + jlist = firstneigh[i]; + jnum = numneigh[i]; + + n = 0; + for (kk = 0; kk < jnum; kk++) { + k = jlist[kk]; + k &= NEIGHMASK; + if (k == j) continue; + + delx = xjtmp - x[k][0]; + dely = yjtmp - x[k][1]; + delz = zjtmp - x[k][2]; + rsq = delx*delx + dely*dely + delz*delz; + if (rsq < cutsq) { + if (n < MAXNEAR) onenearest[n++] = k; + else break; + } + } + + firstflag = 1; + ncommon = 0; + for (inear = 0; inear < nnearest[i]; inear++) + for (jnear = 0; (jnear < n) && (n < MAXNEAR); jnear++) + if (nearest[i][inear] == onenearest[jnear]) { + if (ncommon < MAXCOMMON) common[ncommon++] = nearest[i][inear]; + else if (firstflag) { + nerror++; + firstflag = 0; + } + } + } + + // Calculate and update sum |Rik+Rjk|ˆ2 + rjkx = 0.0; + rjky = 0.0; + rjkz = 0.0; + for (kk = 0; kk < ncommon; kk++) { + k = common[kk]; + rjkx += 2.0*x[k][0] - xjtmp - xtmp; + rjky += 2.0*x[k][1] - yjtmp - ytmp; + rjkz += 2.0*x[k][2] - zjtmp - ztmp; + } + // update cnpv with summed (valuejk) + cnpv[i] += rjkx*rjkx + rjky*rjky + rjkz*rjkz; + + // end of loop over j atoms + } + + // normalize cnp by the number of nearest neighbors + cnpv[i] = cnpv[i] / nnearest[i]; + + // end of loop over i atoms + } + + // warning message + MPI_Allreduce(&nerror,&nerrorall,1,MPI_INT,MPI_SUM,world); + if (nerrorall && comm->me == 0) { + char str[128]; + sprintf(str,"Too many common neighbors in CNP %d times",nerrorall); + error->warning(FLERR,str); + } +} + +/* ---------------------------------------------------------------------- + memory usage of local atom-based array +------------------------------------------------------------------------- */ + +double ComputeCNPAtom::memory_usage() +{ + double bytes = nmax * sizeof(int); + bytes += nmax * MAXNEAR * sizeof(int); + bytes += nmax * sizeof(double); + return bytes; +} diff --git a/src/USER-MISC/compute_cnp_atom.h b/src/USER-MISC/compute_cnp_atom.h new file mode 100644 index 0000000000..4fdb3954f2 --- /dev/null +++ b/src/USER-MISC/compute_cnp_atom.h @@ -0,0 +1,92 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef COMPUTE_CLASS + +ComputeStyle(cnp/atom,ComputeCNPAtom) + +#else + +#ifndef LMP_COMPUTE_CNP_ATOM_H +#define LMP_COMPUTE_CNP_ATOM_H + +#include "compute.h" + +namespace LAMMPS_NS { + +class ComputeCNPAtom : public Compute { + public: + ComputeCNPAtom(class LAMMPS *, int, char **); + ~ComputeCNPAtom(); + void init(); + void init_list(int, class NeighList *); + void compute_peratom(); + double memory_usage(); + + private: +//revise + int nmax; + double cutsq; + class NeighList *list; + int **nearest; + int *nnearest; + double *cnpv; +// int nmax; +// double cutsq; +// class NeighList *list; +// int **nearest; +// int *nnearest; +// double *pattern; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +E: Compute cnp/atom requires a pair style be defined + +Self-explanatory. + +E: Compute cnp/atom cutoff is longer than pairwise cutoff + +Self-explanatory. + +W: Compute cnp/atom cutoff may be too large to find ghost atom neighbors + +The neighbor cutoff used may not encompass enough ghost atoms +to perform this operation correctly. + +W: More than one compute cnp/atom defined + +It is not efficient to use compute cnp/atom more than once. + +W: Too many neighbors in CNP for %d atoms + +More than the maximum # of neighbors was found multiple times. This +was unexpected. + +W: Too many common neighbors in CNP %d times + +More than the maximum # of neighbors was found multiple times. This +was unexpected. + +*/ -- GitLab From 2b3c124e61d761ebcd6a87662cf19c1d644600a1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 31 May 2017 00:43:53 -0400 Subject: [PATCH 225/593] add example input for compute cnp/atom --- examples/USER/misc/cnp/Cu_Mishin1.eam | 30009 +++++++++++++++++ examples/USER/misc/cnp/in.cnp | 51 + examples/USER/misc/cnp/log.31May17.cnp.g++.4 | 185 + 3 files changed, 30245 insertions(+) create mode 100644 examples/USER/misc/cnp/Cu_Mishin1.eam create mode 100644 examples/USER/misc/cnp/in.cnp create mode 100644 examples/USER/misc/cnp/log.31May17.cnp.g++.4 diff --git a/examples/USER/misc/cnp/Cu_Mishin1.eam b/examples/USER/misc/cnp/Cu_Mishin1.eam new file mode 100644 index 0000000000..8ea788b16d --- /dev/null +++ b/examples/USER/misc/cnp/Cu_Mishin1.eam @@ -0,0 +1,30009 @@ +#-> LAMMPS Potential File in DYNAMO 86 setfl Format <-# +# Mishin Cu EAM1 PRB(2001)63:224106 +# Implemented by G. Ziegenhain (2007) gerolf@ziegenhain.com +1 Cu +10001 0.00016401626143851118 10001 0.00089991000899910004 5.50678999999999962967 +1 63.54999999999999715783 3.61500000000000021316 FCC +0.00000499999999981071 +-0.00174266214468410396 +-0.00348892099090747365 +-0.00523377758263166015 +-0.00697723296321983710 +-0.00871928817543166090 +-0.01045994426141616529 +-0.01219920226272552810 +-0.01393706322030219269 +-0.01567352817448997016 +-0.01740859816502871027 +-0.01914227423105074877 +-0.02087455741109200957 +-0.02260544874308356711 +-0.02433494926435164629 +-0.02606306001162250752 +-0.02778978202102377892 +-0.02951511632807468644 +-0.03123906396769937643 +-0.03296162597421536944 +-0.03468280338134377416 +-0.03640259722220395844 +-0.03812100852931310513 +-0.03983803833458932075 +-0.04155368766935163549 +-0.04326795756431689455 +-0.04498084904960464314 +-0.04669236315473579424 +-0.04840250090862818766 +-0.05011126333960413959 +-0.05181865147538822214 +-0.05352466634310193427 +-0.05522930896927480404 +-0.05693258037983239817 +-0.05863448160010564791 +-0.06033501365483040502 +-0.06203417756813944806 +-0.06373197436357269652 +-0.06542840506407321399 +-0.06712347069198454363 +-0.06881717226905648133 +-0.07050951081644374341 +-0.07220048735470019352 +-0.07389010290379038892 +-0.07557835848307803417 +-0.07726525511133397472 +-0.07895079380673530878 +-0.08063497558686139044 +-0.08231780146869960291 +-0.08399927246864269392 +-0.08567938960248699942 +-0.08735815388543688442 +-0.08903556633210474303 +-0.09071162795650611343 +-0.09238633977206633929 +-0.09405970279161346426 +-0.09573171802738844605 +-0.09740238649103627466 +-0.09907170919360996919 +-0.10073968714557102189 +-0.10240632135679028636 +-0.10407161283654442485 +-0.10573556259352034914 +-0.10739817163581522053 +-0.10905944097092978851 +-0.11071937160578260162 +-0.11237796454669402024 +-0.11403522079939731881 +-0.11569114136903824175 +-0.11734572726016789801 +-0.11899897947674986654 +-0.12065089902216152851 +-0.12230148689918429739 +-0.12395074411001827386 +-0.12559867165626981134 +-0.12724527053895817730 +-0.12889054175851422102 +-0.13053448631478437036 +-0.13217710520701952959 +-0.13381839943389151060 +-0.13545836999347882212 +-0.13709701788327555150 +-0.13873434410018958829 +-0.14037034964053995978 +-0.14200503550005993958 +-0.14363840267389926808 +-0.14527045215661704702 +-0.14690118494219106537 +-0.14853060202401202616 +-0.15015870439488265831 +-0.15178549304702659839 +-0.15341096897207551208 +-0.15503513316108197273 +-0.15665798660451368818 +-0.15827953029225039216 +-0.15989976521359050565 +-0.16151869235725069274 +-0.16313631271136053158 +-0.16475262726346739939 +-0.16636763700053824877 +-0.16798134290895339049 +-0.16959374597451315481 +-0.17120484718243256239 +-0.17281464751734887386 +-0.17442314796331537252 +-0.17603034950380180845 +-0.17763625312169928350 +-0.17924085979931758672 +-0.18084417051838252988 +-0.18244618626004083239 +-0.18404690800486056546 +-0.18564633673282804338 +-0.18724447342334737954 +-0.18884131905524670358 +-0.19043687460677061196 +-0.19203114105558904967 +-0.19362411937878576396 +-0.19521581055287207107 +-0.19680621555377975085 +-0.19839533535685704990 +-0.19998317093687756341 +-0.20156972326803979101 +-0.20315499332395736687 +-0.20473898207767149415 +-0.20632169050164517188 +-0.20790311956776186264 +-0.20948327024733215396 +-0.21106214351108310012 +-0.21263974032917376533 +-0.21421606167118145692 +-0.21579110850610705441 +-0.21736488180237900636 +-0.21893738252784844533 +-0.22050861164979007611 +-0.22207857013490395204 +-0.22364725894931680727 +-0.22521467905857761593 +-0.22678083142766558566 +-0.22834571702097905543 +-0.22990933680234793002 +-0.23147169173502746276 +-0.23303278278169470283 +-0.23459261090445959752 +-0.23615117706485522220 +-0.23770848222384177717 +-0.23926452734180747584 +-0.24081931337856987696 +-0.24237284129336922334 +-0.24392511204488043219 +-0.24547612659119977252 +-0.24702588588985685547 +-0.24857439089780886121 +-0.25012164257143965074 +-0.25166764186656376268 +-0.25321238973842685738 +-0.25475588714169949967 +-0.25629813503048559653 +-0.25783913435831928851 +-0.25937888607816184106 +-0.26091739114240741770 +-0.26245465050287997144 +-0.26399066511083368880 +-0.26552543591695609848 +-0.26705896387136363046 +-0.26859124992360339235 +-0.27012229502265938663 +-0.27165210011694096437 +-0.27318066615429437149 +-0.27470799408199608749 +-0.27623408484675460173 +-0.27775893939471263394 +-0.27928255867144802238 +-0.28080494362196617431 +-0.28232609519071205639 +-0.28384601432155998069 +-0.28536470195781937775 +-0.28688215904223701713 +-0.28839838651698812555 +-0.28991338532368748915 +-0.29142715640338368033 +-0.29293970069655772548 +-0.29445101914312798996 +-0.29596111268245062220 +-0.29746998225331244825 +-0.29897762879394029767 +-0.30048405324199434219 +-0.30198925653457253659 +-0.30349323960821239510 +-0.30499600339888122136 +-0.30649754884198898708 +-0.30799787687238255884 +-0.30949698842434347767 +-0.31099488443159151174 +-0.31249156582728909726 +-0.31398703354402890398 +-0.31548128851384849014 +-0.31697433166822186479 +-0.31846616393806082002 +-0.31995678625371759551 +-0.32144619954498221404 +-0.32293440474108559002 +-0.32442140277069952958 +-0.32590719456193006920 +-0.32739178104233035427 +-0.32887516313889042507 +-0.33035734177804076950 +-0.33183831788565321119 +-0.33331809238704224185 +-0.33479666620695880397 +-0.33627404026960228123 +-0.33775021549860539949 +-0.33922519281705065808 +-0.34069897314745967165 +-0.34217155741179272610 +-0.34364294653145810443 +-0.34511314142730631360 +-0.34658214301962564363 +-0.34804995222815282574 +-0.34951656997206770328 +-0.35098199716999012310 +-0.35244623473998837326 +-0.35390928359957030125 +-0.35537114466569219573 +-0.35683181885475256934 +-0.35829130708259526727 +-0.35974961026450769097 +-0.36120672931522657123 +-0.36266266514892819828 +-0.36411741867923907989 +-0.36557099081923016826 +-0.36702338248141774812 +-0.36847459457776565728 +-0.36992462801968262198 +-0.37137348371802536562 +-0.37282116258309905277 +-0.37426766552465062787 +-0.37571299345187991747 +-0.37715714727343430113 +-0.37860012789740338235 +-0.38004193623133053492 +-0.38148257318220668566 +-0.38292203965646720576 +-0.38436033656000123671 +-0.38579746479814236437 +-0.38723342527567661264 +-0.38866821889683933477 +-0.39010184656531077252 +-0.39153430918422804652 +-0.39296560765617449817 +-0.39439574288318146600 +-0.39582471576673539104 +-0.39725252720777071147 +-0.39867917810667208300 +-0.40010466936327881982 +-0.40152900187687645683 +-0.40295217654620607561 +-0.40437419426945986345 +-0.40579505594427933701 +-0.40721476246776200369 +-0.40863331473645647662 +-0.41005071364636069831 +-0.41146696009293082241 +-0.41288205497107366426 +-0.41429599917514670082 +-0.41570879359896562022 +-0.41712043913579721632 +-0.41853093667836116509 +-0.41994028711883579774 +-0.42134849134884655442 +-0.42275555025948019505 +-0.42416146474127680577 +-0.42556623568422757842 +-0.42696986397778324829 +-0.42837235051084965320 +-0.42977369617178595718 +-0.43117390184840864720 +-0.43257296842799108916 +-0.43397089679725908695 +-0.43536768784240109653 +-0.43676334244905978821 +-0.43815786150233115848 +-0.43955124588677385589 +-0.44094349648640029926 +-0.44233461418468200677 +-0.44372459986454959591 +-0.44511345440838834264 +-0.44650117869804484272 +-0.44788777361482345896 +-0.44927324003948587716 +-0.45065757885225421475 +-0.45204079093281057666 +-0.45342287716029394673 +-0.45480383841330462857 +-0.45618367556990069289 +-0.45756238950760419470 +-0.45893998110339406793 +-0.46031645123370923400 +-0.46169180077445215460 +-0.46306603060098527891 +-0.46443914158813104365 +-0.46581113461017276123 +-0.46718201054085817248 +-0.46855177025339234120 +-0.46992041462044742417 +-0.47128794451415378930 +-0.47265436080610534475 +-0.47401966436735998300 +-0.47538385606843602815 +-0.47674693677931756497 +-0.47810890736945044210 +-0.47946976870774227208 +-0.48082952166256776039 +-0.48218816710176337637 +-0.48354570589263046188 +-0.48490213890193478719 +-0.48625746699590566280 +-0.48761169104023815990 +-0.48896481190009355444 +-0.49031683044009444217 +-0.49166774752433273221 +-0.49301756401636431804 +-0.49436628077921129787 +-0.49571389867536153062 +-0.49706041856676952406 +-0.49840584131485510255 +-0.49975016778050784794 +-0.50109339882407955002 +-0.50243553530539442065 +-0.50377657808374021187 +-0.50511652801787265687 +-0.50645538596601724635 +-0.50779315278586700799 +-0.50912982933458073020 +-0.51046541646878829113 +-0.51179991504458843821 +-0.51313332591754612366 +-0.51446564994269738946 +-0.51579688797454759097 +-0.51712704086707050877 +-0.51845610947371145727 +-0.51978409464738239976 +-0.52111099724046949788 +-0.52243681810482778261 +-0.52376155809178026601 +-0.52508521805212549083 +-0.52640779883612909273 +-0.52772930129352957351 +-0.52904972627353608061 +-0.53036907462483195985 +-0.53168734719556765000 +-0.53300454483337089684 +-0.53432066838533831543 +-0.53563571869803894288 +-0.53694969661751823509 +-0.53826260298929007320 +-0.53957443865834386898 +-0.54088520446914323259 +-0.54219490126562197574 +-0.54350352989119077307 +-0.54481109118873494168 +-0.54611758600061044433 +-0.54742301516864966260 +-0.54872737953416228507 +-0.55003067993792686963 +-0.55133291722020327796 +-0.55263409222072201743 +-0.55393420577869179056 +-0.55523325873279683051 +-0.55653125192119468068 +-0.55782818618152241186 +-0.55912406235089351370 +-0.56041888126589345376 +-0.56171264376258900342 +-0.56300535067652468513 +-0.56429700284271699928 +-0.56558760109566508234 +-0.56687714626934182505 +-0.56816563919720142195 +-0.56945308071217493051 +-0.57073947164666982701 +-0.57202481283257444744 +-0.57330910510125532298 +-0.57459234928355584771 +-0.57587454620980160769 +-0.57715569670979682826 +-0.57843580161282304175 +-0.57971486174764530475 +-0.58099287794250331629 +-0.58226985102512207604 +-0.58354578182270655518 +-0.58482067116193858780 +-0.58609451986898353226 +-0.58736732876948938298 +-0.58863909868858099728 +-0.58990983045086831105 +-0.59117952488044189785 +-0.59244818280087430118 +-0.59371580503521959038 +-0.59498239240601469291 +-0.59624794573527784003 +-0.59751246584451433996 +-0.59877595355470614180 +-0.60003840968632227160 +-0.60129983505931594578 +-0.60256023049311990825 +-0.60381959680665509005 +-0.60507793481832550242 +-0.60633524534601579425 +-0.60759152920709968981 +-0.60884678721843243920 +-0.61010102019635503723 +-0.61135422895669599974 +-0.61260641431476559049 +-0.61385757708536048405 +-0.61510771808276465400 +-0.61635683812074715249 +-0.61760493801256166613 +-0.61885201857095162303 +-0.62009808060814330943 +-0.62134312493585119874 +-0.62258715236527772952 +-0.62383016370711130705 +-0.62507215977152896791 +-0.62631314136819438154 +-0.62755310930625851640 +-0.62879206439436230447 +-0.63003000744063264449 +-0.63126693925268773100 +-0.63250286063763105915 +-0.63373777240205786399 +-0.63497167535205112365 +-0.63620457029318266962 +-0.63743645803051407484 +-0.63866733936859865217 +-0.63989721511147834576 +-0.64112608606268373101 +-0.64235395302523756733 +-0.64358081680165168947 +-0.64480667819393122642 +-0.64603153800357060454 +-0.64725539703155376969 +-0.64847825607836062645 +-0.64970011594395837839 +-0.65092097742780707925 +-0.65214084132886074308 +-0.65335970844556445769 +-0.65457757957585460673 +-0.65579445551716286644 +-0.65701033706641043253 +-0.65822522502001490352 +-0.65943912017388583990 +-0.66065202332342476410 +-0.66186393526352982342 +-0.66307485678859134914 +-0.66428478869249341088 +-0.66549373176861470469 +-0.66670168680983232790 +-0.66790865460851045476 +-0.66911463595651565761 +-0.67031963164520491638 +-0.67152364246543294612 +-0.67272666920755086473 +-0.67392871266140152997 +-0.67512977361632775519 +-0.67632985286116875656 +-0.67752895118425726650 +-0.67872706937342464073 +-0.67992420821599930392 +-0.68112036849880541745 +-0.68231555100816598802 +-0.68350975652989998110 +-0.68470298584932565156 +-0.68589523975125876731 +-0.68708651902001127709 +-0.68827682443939619539 +-0.68946615679272427180 +-0.69065451686280354693 +-0.69184190543194290512 +-0.69302832328195052014 +-0.69421377119413141266 +-0.69539824994929366753 +-0.69658176032774266062 +-0.69776430310928261314 +-0.69894587907322391906 +-0.70012648899837093275 +-0.70130613366303062861 +-0.70248481384501326730 +-0.70366253032162640046 +-0.70483928386968108804 +-0.70601507526549078797 +-0.70718990528486713742 +-0.70836377470312816840 +-0.70953668429508920390 +-0.71070863483507262792 +-0.71187962709689966978 +-0.71304966185389617728 +-0.71421873987889084034 +-0.71538686194421430287 +-0.71655402882170116108 +-0.71772024128269085175 +-0.71888550009802543173 +-0.72004980603804979999 +-0.72121315987261480629 +-0.72237556237107569679 +-0.72353701430229033775 +-0.72469751643462454460 +-0.72585706953594675284 +-0.72701567437363001645 +-0.72817333171455689289 +-0.72933004232510945108 +-0.73048580697118081773 +-0.73164062641816896004 +-0.73279450143097513148 +-0.73394743277401186532 +-0.73509942121119387082 +-0.73625046750594536071 +-0.73740057242119738667 +-0.73854973671938717317 +-0.73969796116246100404 +-0.74084524651187178002 +-0.74199159352857990690 +-0.74313700297305507192 +-0.74428147560527668780 +-0.74542501218472767555 +-0.74656761347040490051 +-0.74770928022081095676 +-0.74885001319395994024 +-0.74998981314737345194 +-0.75112868083808481678 +-0.75226661702263375453 +-0.75340362245707326316 +-0.75453969789696473391 +-0.75567484409737972761 +-0.75680906181290308332 +-0.75794235179762670107 +-0.75907471480515664730 +-0.76020615158860804783 +-0.76133666290060886261 +-0.76246624949329699916 +-0.76359491211832519753 +-0.76472265152685525713 +-0.76584946846956292177 +-0.76697536369663454892 +-0.76810033795777221677 +-0.76922439200218883926 +-0.77034752657861038649 +-0.77146974243527677295 +-0.77259104031994030315 +-0.77371142097986944641 +-0.77483088516184306371 +-0.77594943361215862332 +-0.77706706707662220879 +-0.77818378630056028733 +-0.77929959202880905167 +-0.78041448500572241365 +-0.78152846597517156013 +-0.78264153568053695942 +-0.78375369486471968550 +-0.78486494427013497877 +-0.78597528463871402238 +-0.78708471671190349817 +-0.78819324123066869525 +-0.78930085893548884712 +-0.79040757056636090638 +-0.79151337686279932271 +-0.79261827856383559876 +-0.79372227640801895632 +-0.79482537113341500401 +-0.79592756347760862390 +-0.79702885417770130694 +-0.79812924397031381751 +-0.79922873359158530526 +-0.80032732377717308303 +-0.80142501526225307096 +-0.80252180878152268306 +-0.80361770506919327772 +-0.80471270485900170399 +-0.80580680888420075370 +-0.80690001787756360230 +-0.80799233257138536324 +-0.80908375369747931316 +-0.81017428198717977850 +-0.81126391817134169138 +-0.81235266298034392030 +-0.81344051714407883402 +-0.81452748139196939903 +-0.81561355645295208205 +-0.81669874305549083893 +-0.81778304192756934299 +-0.81886645379669209532 +-0.81994897938988731134 +-0.82103061943370736486 +-0.82211137465422345905 +-0.82319124577703295387 +-0.82427023352725514727 +-0.82534833862953282946 +-0.82642556180803228294 +-0.82750190378644350453 +-0.82857736528798020537 +-0.82965194703538136523 +-0.83072564975090834594 +-0.83179847415634977637 +-0.83287042097301666743 +-0.83394149092174574278 +-0.83501168472289899469 +-0.83608100309636546044 +-0.83714944676155589320 +-0.83821701643741097776 +-0.83928371284239378092 +-0.84034953669449663494 +-0.84141448871123669662 +-0.84247856960965838979 +-0.84354178010633074081 +-0.84460412091735403983 +-0.84566559275835184728 +-0.84672619634447676695 +-0.84778593239040955787 +-0.84884480161035757995 +-0.84990280471805745854 +-0.85095994242677175379 +-0.85201621544929539986 +-0.85307162449794771142 +-0.85412617028458059920 +-0.85517985352057146464 +-0.85623267491682941710 +-0.85728463518379238728 +-0.85833573503142845951 +-0.85938597516923365127 +-0.86043535630623679822 +-0.86148387915099400303 +-0.86253154441159596288 +-0.86357835279565886566 +-0.86462430501033260555 +-0.86566940176230011694 +-0.86671364375777071309 +-0.86775703170249007812 +-0.86879956630173271748 +-0.86984124826030440047 +-0.87088207828254660114 +-0.87192205707232894873 +-0.87296118533305588905 +-0.87399946376766446399 +-0.87503689307862275726 +-0.87607347396793455729 +-0.87710920713713691477 +-0.87814409328729681192 +-0.87917813311902004436 +-0.88021132733244056290 +-0.88124367662723068761 +-0.88227518170259733310 +-0.88330584325727823369 +-0.88433566198954860482 +-0.88536463859721981073 +-0.88639277377763292520 +-0.88742006822767161012 +-0.88844652264374968098 +-0.88947213772181732416 +-0.89049691415736376143 +-0.89152085264541103271 +-0.89254395388051888105 +-0.89356621855678364241 +-0.89458764736783757954 +-0.89560824100685065829 +-0.89662800016653032564 +-0.89764692553911995532 +-0.89866501781640195645 +-0.89968227768969533109 +-0.90069870584985767259 +-0.90171430298728494357 +-0.90272906979190992161 +-0.90374300695320575194 +-0.90475611516018417113 +-0.90576839510139395273 +-0.90677984746492468204 +-0.90779047293840609001 +-0.90880027220900538865 +-0.90980924596342926947 +-0.91081739488792790027 +-0.91182471966828693155 +-0.91283122098983682235 +-0.91383689953744418055 +-0.91484175599552020053 +-0.91584579104801511207 +-0.91684900537841951262 +-0.91785139966976747594 +-0.91885297460463344343 +-0.91985373086513311236 +-0.92085366913292521218 +-0.92185279008921039434 +-0.92285109441473034408 +-0.92384858278977177726 +-0.92484525589416155533 +-0.92584111440727046016 +-0.92683615900801430421 +-0.92783039037484882350 +-0.92882380918577545081 +-0.92981641611833953931 +-0.93080821184962925230 +-0.93179919705627756166 +-0.93278937241446224782 +-0.93377873859990412342 +-0.93476729628787058601 +-0.93575504615317117718 +-0.93674198887016491000 +-0.93772812511275271952 +-0.93871345555438256980 +-0.93969798086804590120 +-0.94068170172628473580 +-0.94166461880118190741 +-0.94264673276436994342 +-0.94362804428702773407 +-0.94460855403987920020 +-0.94558826269319662394 +-0.94656717091679909437 +-0.94754527938005250753 +-0.94852258875187089870 +-0.94949909970071733056 +-0.95047481289459923026 +-0.95144972900107571689 +-0.95242384868725227243 +-0.95339717261978340623 +-0.95436970146487265509 +-0.95534143588827213911 +-0.95631237655528322783 +-0.95728252413075676230 +-0.95825187927909261099 +-0.95922044266424077996 +-0.96018821494970230113 +-0.96115519679852501334 +-0.96212138887331155601 +-0.96308679183621048736 +-0.96405140634892450002 +-0.96501523307270731245 +-0.96597827266835922799 +-0.96694052579623845922 +-0.96790199311624980361 +-0.96886267528785152692 +-0.96982257297005358687 +-0.97078168682141896539 +-0.97174001750006078204 +-0.97269756566364762307 +-0.97365433196939710214 +-0.97461031707408296576 +-0.97556552163403087441 +-0.97651994630511951279 +-0.97747359174278058980 +-0.97842645860200216923 +-0.97937854753732289659 +-0.98032985920283599590 +-0.98128039425219149017 +-0.98223015333859153841 +-0.98317913711479443251 +-0.98412734623311037829 +-0.98507478134540926717 +-0.98602144310311290454 +-0.98696733215719900656 +-0.98791244915820186634 +-0.98885679475621213186 +-0.98980036960087414144 +-0.99074317434139014260 +-0.99168520962652007000 +-0.99262647610457777070 +-0.99356697442343566706 +-0.99450670523052253635 +-0.99544566917282528706 +-0.99638386689688651643 +-0.99732129904880939542 +-0.99825796627425189556 +-0.99919386921843167393 +-1.00012900852612385272 +-1.00106338484166190739 +-1.00199699880894010917 +-1.00292985107140819601 +-1.00386194227207781182 +-1.00479327305351673338 +-1.00572384405785530959 +-1.00665365592678179851 +-1.00758270930154525402 +-1.00851100482295241711 +-1.00943854313137393319 +-1.01036532486673724662 +-1.01129135066853215186 +-1.01221662117580946116 +-1.01314113702718056054 +-1.01406489886081785379 +-1.01498790731445454050 +-1.01591016302538661442 +-1.01683166663047175327 +-1.01775241876612843051 +-1.01867242006833813583 +-1.01959167117264537517 +-1.02051017271415478405 +-1.02142792532753645673 +-1.02234492964702261553 +-1.02326118630640672258 +-1.02417669593904858694 +-1.02509145917787036772 +-1.02600547665535568598 +-1.02691874900355628597 +-1.02783127685408559593 +-1.02874306083812050439 +-1.02965410158640446880 +-1.03056439972924418491 +-1.03147395589651091896 +-1.03238277071764361636 +-1.03329084482164379466 +-1.03419817883707976236 +-1.03510477339208462055 +-1.03601062911435803926 +-1.03691574663116536925 +-1.03782012656933986250 +-1.03872376955527800924 +-1.03962667621494664338 +-1.04052884717387539304 +-1.04143028305716378590 +-1.04233098448947902881 +-1.04323095209505400938 +-1.04413018649768996049 +-1.04502868832075446193 +-1.04592645818718676942 +-1.04682349671949070924 +-1.04771980453974045133 +-1.04861538226957784481 +-1.04951023053021419429 +-1.05040434994242914968 +-1.05129774112657203844 +-1.05219040470256186559 +-1.05308234128988620348 +-1.05397355150760385634 +-1.05486403597434152957 +-1.05575379530829738250 +-1.05664283012724036226 +-1.05753114104850975963 +-1.05841872868901476501 +-1.05930559366523602272 +-1.06019173659322496484 +-1.06107715808860492146 +-1.06196185876657134273 +-1.06284583924188891224 +-1.06372910012889687614 +-1.06461164204150571244 +-1.06549346559319757510 +-1.06637457139702651610 +-1.06725496006562270424 +-1.06813463221118487567 +-1.06901358844548788340 +-1.06989182937987781230 +-1.07076935562527508772 +-1.07164616779217447551 +-1.07252226649064374975 +-1.07339765233032502501 +-1.07427232592043364612 +-1.07514628786976085273 +-1.07601953878667178088 +-1.07689207927910657325 +-1.07776390995457971300 +-1.07863503142018291037 +-1.07950544428257977358 +-1.08037514914801291432 +-1.08124414662229817452 +-1.08211243731083084363 +-1.08298002181857677684 +-1.08384690075008416343 +-1.08471307470947375684 +-1.08557854430044420369 +-1.08644331012627159971 +-1.08730737278980904570 +-1.08817073289348642540 +-1.08903339103931062759 +-1.08989534782886798858 +-1.09075660386332140561 +-1.09161715974341255730 +-1.09247701606946057140 +-1.09333617344136424521 +-1.09419463245859915901 +-1.09505239372022211697 +-1.09590945782486692828 +-1.09676582537074795987 +-1.09762149695565902618 +-1.09847647317697227898 +-1.09933075463164042773 +-1.10018434191619696172 +-1.10103723562675526182 +-1.10188943635900749030 +-1.10274094470822903169 +-1.10359176126927360784 +-1.10444188663657771876 +-1.10529132140415775609 +-1.10614006616561266760 +-1.10698812151412129268 +-1.10783548804244635910 +-1.10868216634293026424 +-1.10952815700749973793 +-1.11037346062766251187 +-1.11121807779450820775 +-1.11206200909871166793 +-1.11290525513052673823 +-1.11374781647979470556 +-1.11458969373593630436 +-1.11543088748795837795 +-1.11627139832445143597 +-1.11711122683358587970 +-1.11795037360312177199 +-1.11878883922039973342 +-1.11962662427234649343 +-1.12046372934547266986 +-1.12130015502587365717 +-1.12213590189922896023 +-1.12297097055080530303 +-1.12380536156545374205 +-1.12463907552761077646 +-1.12547211302129945842 +-1.12630447463012650644 +-1.12713616093728741241 +-1.12796717252556311095 +-1.12879750997732131168 +-1.12962717387451494488 +-1.13045616479868638038 +-1.13128448333096254252 +-1.13211213005205890703 +-1.13293910554227950094 +-1.13376541038151290586 +-1.13459104514923869722 +-1.13541601042452344750 +-1.13624030678602117028 +-1.13706393481197509665 +-1.13788689508021745311 +-1.13870918816816790731 +-1.13953081465283689866 +-1.14035177511082186363 +-1.14117207011831189867 +-1.14199170025108442950 +-1.14281066608450676547 +-1.14362896819353587752 +-1.14444660715272039653 +-1.14526358353619661656 +-1.14607989791769449006 +-1.14689555087053163263 +-1.14771054296761909619 +-1.14852487478145715016 +-1.14933854688413883416 +-1.15015155984734662731 +-1.15096391424235733325 +-1.15177561064003852742 +-1.15258664961084811296 +-1.15339703172483876159 +-1.15420675755165325072 +-1.15501582766053001450 +-1.15582424262029714868 +-1.15663200299937707349 +-1.15743910936578608961 +-1.15824556228713149153 +-1.15905136233061734075 +-1.15985651006303935873 +-1.16066100605078759145 +-1.16146485085984685348 +-1.16226804505579539573 +-1.16307058920380512745 +-1.16387248386864472494 +-1.16467372961467807713 +-1.16547432700586073295 +-1.16627427660574722879 +-1.16707357897748509323 +-1.16787223468381795577 +-1.16867024428708687900 +-1.16946760834922702799 +-1.17026432743177055684 +-1.17106040209584638667 +-1.17185583290217820718 +-1.17265062041108847346 +-1.17344476518249707375 +-1.17423826777591822079 +-1.17503112875046622499 +-1.17582334866485105351 +-1.17661492807738099486 +-1.17740586754596265884 +-1.17819616762810186472 +-1.17898582888089897835 +-1.17977485186105668369 +-1.18056323712487398758 +-1.18135098522824932843 +-1.18213809672668168638 +-1.18292457217526636448 +-1.18371041212870076187 +-1.18449561714127926670 +-1.18528018776689858527 +-1.18606412455905418923 +-1.18684742807084187000 +-1.18763009885495751661 +-1.18841213746369733784 +-1.18919354444895919443 +-1.18997432036224060070 +-1.19075446575464205523 +-1.19153398117686237789 +-1.19231286717920559326 +-1.19309112431157360312 +-1.19386875312347262579 +-1.19464575416401008745 +-1.19542212798189662060 +-1.19619787512544295538 +-1.19697299614256480460 +-1.19774749158077886690 +-1.19852136198720615745 +-1.19929460790857111974 +-1.20006722989119873901 +-1.20083922848102120362 +-1.20161060422357190980 +-1.20238135766398879234 +-1.20315148934701410255 +-1.20392099981699551847 +-1.20468988961788237013 +-1.20545815929323074656 +-1.20622580938620060920 +-1.20699284043955823442 +-1.20775925299567354898 +-1.20852504759652301658 +-1.20929022478368719540 +-1.21005478509835473488 +-1.21081872908131815691 +-1.21158205727297629828 +-1.21234477021333697522 +-1.21310686844200987800 +-1.21386835249821567473 +-1.21462922292077935005 +-1.21538948024813420190 +-1.21614912501832006519 +-1.21690815776898464406 +-1.21766657903738328983 +-1.21842438936037922304 +-1.21918158927444308937 +-1.21993817931565429191 +-1.22069416001969965890 +-1.22144953192187655233 +-1.22220429555708909319 +-1.22295845145985193625 +-1.22371200016428627322 +-1.22446494220412560594 +-1.22521727811271197162 +-1.22596900842299616485 +-1.22672013366753929198 +-1.22747065437851277103 +-1.22822057108769788769 +-1.22896988432648712752 +-1.22971859462588239964 +-1.23046670251649792327 +-1.23121420852855623096 +-1.23196111319189505195 +-1.23270741703595865246 +-1.23345312058980760561 +-1.23419822438211079785 +-1.23494272894115031391 +-1.23568663479482010459 +-1.23642994247062554258 +-1.23717265249568697527 +-1.23791476539673528379 +-1.23865628170011365938 +-1.23939720193177960184 +-1.24013752661730425331 +-1.24087725628187039995 +-1.24161639145027624664 +-1.24235493264693186433 +-1.24309288039586318675 +-1.24383023522070823574 +-1.24456699764472089598 +-1.24530316819076958268 +-1.24603874738133590938 +-1.24677373573851735244 +-1.24750813378402680698 +-1.24824194203919103252 +-1.24897516102495487189 +-1.24970779126187525598 +-1.25043983327012653284 +-1.25117128756950091173 +-1.25190215467940291205 +-1.25263243511885535852 +-1.25336212940649982528 +-1.25409123806058997452 +-1.25481976159899999423 +-1.25554770053921904704 +-1.25627505539835482296 +-1.25700182669313220707 +-1.25772801493989350163 +-1.25845362065459775991 +-1.25917864435282389479 +-1.25990308654976823632 +-1.26062694776024497578 +-1.26135022849868771999 +-1.26207292927914682679 +-1.26279505061529517818 +-1.26351659302042085287 +-1.26423755700743356556 +-1.26495794308886200241 +-1.26567775177685470922 +-1.26639698358317742688 +-1.26711563901922108499 +-1.26783371859599225395 +-1.26855122282411958423 +-1.26926815221385291821 +-1.26998450727506106972 +-1.27070028851723448859 +-1.27141549644948659292 +-1.27213013158054888407 +-1.27284419441877694190 +-1.27355768547214687203 +-1.27427060524825597199 +-1.27498295425432583983 +-1.27569473299719637893 +-1.27640594198333401366 +-1.27711658171882547208 +-1.27782665270938156077 +-1.27853615546033383410 +-1.27924509047663903516 +-1.27995345826287576507 +-1.28066125932324736958 +-1.28136849416158038473 +-1.28207516328132475891 +-1.28278126718555540720 +-1.28348680637696999085 +-1.28419178135789113782 +-1.28489619263026710883 +-1.28560004069567046514 +-1.28630332605529718037 +-1.28700604920997041525 +-1.28770821066013652079 +-1.28840981090586970126 +-1.28911085044686934964 +-1.28981132978245760512 +-1.29051124941158756876 +-1.29121060983283397761 +-1.29190941154440097627 +-1.29260765504411789806 +-1.29330534082944259566 +-1.29400246939745655617 +-1.29469904124487156238 +-1.29539505686802502993 +-1.29609051676288222765 +-1.29678542142503672174 +-1.29747977134970904345 +-1.29817356703174713317 +-1.29886680896562944909 +-1.29955949764545986014 +-1.30025163356497408529 +-1.30094321721753436449 +-1.30163424909613190117 +-1.30232472969338797242 +-1.30301465950155215268 +-1.30370403901250475620 +-1.30439286871775483867 +-1.30508114910844086332 +-1.30576888067533314342 +-1.30645606390882962344 +-1.30714269929896031996 +-1.30782878733538643345 +-1.30851432850739790581 +-1.30919932330391675102 +-1.30988377221349683310 +-1.31056767572432164570 +-1.31125103432420742067 +-1.31193384850060068558 +-1.31261611874058115035 +-1.31329784553086170718 +-1.31397902935778310152 +-1.31465967070732214772 +-1.31533977006508751018 +-1.31601932791632103559 +-1.31669834474589508844 +-1.31737682103831810210 +-1.31805475727772902772 +-1.31873215394790221922 +-1.31940901153224632303 +-1.32008533051380050338 +-1.32076111137524243588 +-1.32143635459887875960 +-1.32211106066665484704 +-1.32278523006014880892 +-1.32345886326057393667 +-1.32413196074877759223 +-1.32480452300524320641 +-1.32547655051008783644 +-1.32614804374306638479 +-1.32681900318356782442 +-1.32748942931061675310 +-1.32815932260287450362 +-1.32882868353863781152 +-1.32949751259584081353 +-1.33016581025205349320 +-1.33083357698448168094 +-1.33150081326996927444 +-1.33216751958499757258 +-1.33283369640568349901 +-1.33349934420778293287 +-1.33416446346668804424 +-1.33482905465743018070 +-1.33549311825467631465 +-1.33615665473273548258 +-1.33681966456555012535 +-1.33748214822670519197 +-1.33814410618942258857 +-1.33880553892656228854 +-1.33946644691062544119 +-1.34012683061375059701 +-1.34078669050771592808 +-1.34144602706393967217 +-1.34210484075348013278 +-1.34276313204703412474 +-1.34342090141494052702 +-1.34407814932717650791 +-1.34473487625336041162 +-1.34539108266275242443 +-1.34604676902425079987 +-1.34670193580639807607 +-1.34735658347737574658 +-1.34801071250500648091 +-1.34866432335675634491 +-1.34931741649973124808 +-1.34996999240067983017 +-1.35062205152599279501 +-1.35127359434170246644 +-1.35192462131348412058 +-1.35257513290665620787 +-1.35322512958617857670 +-1.35387461181665536003 +-1.35452358006233186671 +-1.35517203478709880038 +-1.35581997645448959489 +-1.35646740552768130250 +-1.35711432246949437186 +-1.35776072774239442431 +-1.35840662180848981144 +-1.35905200512953427960 +-1.35969687816692541560 +-1.36034124138170575691 +-1.36098509523456456805 +-1.36162844018583184535 +-1.36227127669548675470 +-1.36291360522315319059 +-1.36355542622810022024 +-1.36419674016924075133 +-1.36483754750513730514 +-1.36547784869399579932 +-1.36611764419366932266 +-1.36675693446165880118 +-1.36739571995510900138 +-1.36803400113081385925 +-1.36867177844521270558 +-1.36930905235439404066 +-1.36994582331409198162 +-1.37058209177968892689 +-1.37121785820621577834 +-1.37185312304834949870 +-1.37248788676041533208 +-1.37312214979638946843 +-1.37375591260989393660 +-1.37438917565419949085 +-1.37502193938222738723 +-1.37565420424654538678 +-1.37628597069937308461 +-1.37691723919257769104 +-1.37754801017767603000 +-1.37817828410583476106 +-1.37880806142787104562 +-1.37943734259425054844 +-1.38006612805509165653 +-1.38069441826016126029 +-1.38132221365887608577 +-1.38194951470030513718 +-1.38257632183316792052 +-1.38320263550583577583 +-1.38382845616632899066 +-1.38445378426232235114 +-1.38507862024113936883 +-1.38570296454975805389 +-1.38632681763480558601 +-1.38695017994256319938 +-1.38757305191896485042 +-1.38819543400959499735 +-1.38881732665969170881 +-1.38943873031414799613 +-1.39005964541750559604 +-1.39068007241396229823 +-1.39130001174736994685 +-1.39191946386123177604 +-1.39253842919870640671 +-1.39315690820260451588 +-1.39377490131539305551 +-1.39439240897919169981 +-1.39500943163577506567 +-1.39562596972657271266 +-1.39624202369266825485 +-1.39685759397480024901 +-1.39747268101336308277 +-1.39808728524840630847 +-1.39870140711963486524 +-1.39931504706640907898 +-1.39992820552774355214 +-1.40054088294231293688 +-1.40115307974844416350 +-1.40176479638412310180 +-1.40237603328699012017 +-1.40298679089434408240 +-1.40359706964313901700 +-1.40420686996998744789 +-1.40481619231115839597 +-1.40542503710257804528 +-1.40603340477983174139 +-1.40664129577816021666 +-1.40724871053246269881 +-1.40785564947729913143 +-1.40846211304688395671 +-1.40906810167509233267 +-1.40967361579545746864 +-1.41027865584117151343 +-1.41088322224508511127 +-1.41148731543970917812 +-1.41209093585721245923 +-1.41269408392942374952 +-1.41329676008783233776 +-1.41389896476358645216 +-1.41450069838749392659 +-1.41510196139002397686 +-1.41570275420130498034 +-1.41630307725112780659 +-1.41690293096894137648 +-1.41750231578385732512 +-1.41810123212464778142 +-1.41869968041974625628 +-1.41929766109724719847 +-1.41989517458490732693 +-1.42049222131014474257 +-1.42108880170003892829 +-1.42168491618133296939 +-1.42228056518043066703 +-1.42287574912339898070 +-1.42347046843596780619 +-1.42406472354352864329 +-1.42465851487113726037 +-1.42525184284351214004 +-1.42584470788503425709 +-1.42643711041974863285 +-1.42702905087136544537 +-1.42762052966325603265 +-1.42821154721845822166 +-1.42880210395967122139 +-1.42939220030926139593 +-1.42998183668925826773 +-1.43057101352135562777 +-1.43115973122691375607 +-1.43174799022695609096 +-1.43233579094217233774 +-1.43292313379291691433 +-1.43351001919921072769 +-1.43409644758074072968 +-1.43468241935685791866 +-1.43526793494658000405 +-1.43585299476859251655 +-1.43643759924124569949 +-1.43702174878255695134 +-1.43760544381021082572 +-1.43818868474155747705 +-1.43877147199361621333 +-1.43935380598307194333 +-1.43993568712627739714 +-1.44051711583925357019 +-1.44109809253768883508 +-1.44167861763693894162 +-1.44225869155202901517 +-1.44283831469765155830 +-1.44341748748816778303 +-1.44399621033760805489 +-1.44457448365966989456 +-1.44515230786772219673 +-1.44572968337480212142 +-1.44630661059361464993 +-1.44688308993653680368 +-1.44745912181561386944 +-1.44803470664256028755 +-1.44860984482876253843 +-1.44918453678527470174 +-1.44975878292282445159 +-1.45033258365180683924 +-1.45090593938229073245 +-1.45147885052401237616 +-1.45205131748638183176 +-1.45262334067847875829 +-1.45319492050905596514 +-1.45376605738653719158 +-1.45433675171901599654 +-1.45490700391425997751 +-1.45547681437970855001 +-1.45604618352247250357 +-1.45661511174933555601 +-1.45718359946675568573 +-1.45775164708086002463 +-1.45831925499745196362 +-1.45888642362200515734 +-1.45945315335966974146 +-1.46001944461526722563 +-1.46058529779329271392 +-1.46115071329791579302 +-1.46171569153297942201 +-1.46228023290200193074 +-1.46284433780817391124 +-1.46340800665436332473 +-1.46397123984310884026 +-1.46453403777662782836 +-1.46509640085681014376 +-1.46565832948522167811 +-1.46621982406310413793 +-1.46678088499137415646 +-1.46734151267062307156 +-1.46790170750112025644 +-1.46846146988280845669 +-1.46902080021530934140 +-1.46957969889791995044 +-1.47013816632961180630 +-1.47069620290903579907 +-1.47125380903451929981 +-1.47181098510406460633 +-1.47236773151535427218 +-1.47292404866574599964 +-1.47347993695227508226 +-1.47403539677165618116 +-1.47459042852028021642 +-1.47514503259421614345 +-1.47569920938921317344 +-1.47625295930069633243 +-1.47680628272377090227 +-1.47735918005321953395 +-1.47791165168350469017 +-1.47846369800876886735 +-1.47901531942283126497 +-1.47956651631919289258 +-1.48011728909103235097 +-1.48066763813120938487 +-1.48121756383226399478 +-1.48176706658641466063 +-1.48231614678556056219 +-1.48286480482128313341 +-1.48341304108484051127 +-1.48396085596717641764 +-1.48450824985891149943 +-1.48505522315034954595 +-1.48560177623147593451 +-1.48614790949195607617 +-1.48669362332113630387 +-1.48723891810804875746 +-1.48778379424140183573 +-1.48832825210959107665 +-1.48887229210069071961 +-1.48941591460245970069 +-1.48995912000233854400 +-1.49050190868745113804 +-1.49104428104460295934 +-1.49158623746028418111 +-1.49212777832066834094 +-1.49266890401161056445 +-1.49320961491865089599 +-1.49374991142701429858 +-1.49428979392160687922 +-1.49482926278702166201 +-1.49536831840753348111 +-1.49590696116710364372 +-1.49644519144937770960 +-1.49698300963768504701 +-1.49752041611504038698 +-1.49805741126414471154 +-1.49859399546738192299 +-1.49913016910682395100 +-1.49966593256422742186 +-1.50020128622103410265 +-1.50073623045837223344 +-1.50127076565705630529 +-1.50180489219758639408 +-1.50233861046015038099 +-1.50287192082462262022 +-1.50340482367056216262 +-1.50393731937721764069 +-1.50446940832352371586 +-1.50500109088810152258 +-1.50553236744926133284 +-1.50606323838500055778 +-1.50659370407300419181 +-1.50712376489064325824 +-1.50765342121498124861 +-1.50818267342276612908 +-1.50871152189043700176 +-1.50923996699411944178 +-1.50976800910962882796 +-1.51029564861246901053 +-1.51082288587783430955 +-1.51134972128060773855 +-1.51187615519536056041 +-1.51240218799635517399 +-1.51292782005754289365 +-1.51345305175256616970 +-1.51397788345475636795 +-1.51450231553713554611 +-1.51502634837241600962 +-1.51554998233300297628 +-1.51607321779098791481 +-1.51659605511815698264 +-1.51711849468598680701 +-1.51764053686564448498 +-1.51816218202798913772 +-1.51868343054357102240 +-1.51920428278263219823 +-1.51972473911510919109 +-1.52024479991062722029 +-1.52076446553850486154 +-1.52128373636775338085 +-1.52180261276707740059 +-1.52232109510487356729 +-1.52283918374923166184 +-1.52335687906793459945 +-1.52387418142845865177 +-1.52439109119797322478 +-1.52490760874334174702 +-1.52542373443112166953 +-1.52593946862756402183 +-1.52645481169861296777 +-1.52696976400991024647 +-1.52748432592678784481 +-1.52799849781427532491 +-1.52851228003709582737 +-1.52902567295966784755 +-1.52953867694610501360 +-1.53005129236021542027 +-1.53056351956550340532 +-1.53107535892517043763 +-1.53158681080211067638 +-1.53209787555891518984 +-1.53260855355787350973 +-1.53311884516096830211 +-1.53362875072988069647 +-1.53413827062598717710 +-1.53464740521036224763 +-1.53515615484377576649 +-1.53566451988669627760 +-1.53617250069928923395 +-1.53668009764141633156 +-1.53718731107263861801 +-1.53769414135221316187 +-1.53820058883909727143 +-1.53870665389194294370 +-1.53921233686910441385 +-1.53971763812863082777 +-1.54022255802827201521 +-1.54072709692547693550 +-1.54123125517739056889 +-1.54173503314085991178 +-1.54223843117243042400 +-1.54274144962834691697 +-1.54324408886455244350 +-1.54374634923669251663 +-1.54424823110011000260 +-1.54474973480984889562 +-1.54525086072065365173 +-1.54575160918696941081 +-1.54625198056293977622 +-1.54675197520241169968 +-1.54725159345893148455 +-1.54775083568574700621 +-1.54824970223580749007 +-1.54874819346176284540 +-1.54924630971596566376 +-1.54974405135046877646 +-1.55024141871702791917 +-1.55073841216710039959 +-1.55123503205184687381 +-1.55173127872212868184 +-1.55222715252850940182 +-1.55272265382125795874 +-1.55321778295034418349 +-1.55371254026544036719 +-1.55420692611592370369 +-1.55470094085087362501 +-1.55519458481907202341 +-1.55568785836900769226 +-1.55618076184886988678 +-1.55667329560655387510 +-1.55716545998965871789 +-1.55765725534548682418 +-1.55814868202104572781 +-1.55863974036304786530 +-1.55913043071791057592 +-1.55962075343175587960 +-1.56011070885041047696 +-1.56060029731940685949 +-1.56108951918398286551 +-1.56157837478908234630 +-1.56206686447935449991 +-1.56255498859915475940 +-1.56304274749254390464 +-1.56353014150328939458 +-1.56401717097486581132 +-1.56450383625045397196 +-1.56499013767294092858 +-1.56547607558492107849 +-1.56596165032869527600 +-1.56644686224627283089 +-1.56693171167936995403 +-1.56741619896940997947 +-1.56790032445752380852 +-1.56838408848455101996 +-1.56886749139103898187 +-1.56935053351724329573 +-1.56983321520312779640 +-1.57031553678836521826 +-1.57079749861233586294 +-1.57127910101412981980 +-1.57176034433254674383 +-1.57224122890609452341 +-1.57272175507299105668 +-1.57320192317116269720 +-1.57368173353824736260 +-1.57416118651158987163 +-1.57464028242824882753 +-1.57511902162498884650 +-1.57559740443828899537 +-1.57607543120433568617 +-1.57655310225902689503 +-1.57703041793797238412 +-1.57750737857649170337 +-1.57798398450961574468 +-1.57846023607208674200 +-1.57893613359835982557 +-1.57941167742259858109 +-1.57988686787868126693 +-1.58036170530019681735 +-1.58083619002044595270 +-1.58131032237244273375 +-1.58178410268891322943 +-1.58225753130229462862 +-1.58273060854473990311 +-1.58320333474811136831 +-1.58367571024398756663 +-1.58414773536365771633 +-1.58461941043812637453 +-1.58509073579811055055 +-1.58556171177404126027 +-1.58603233869606352613 +-1.58650261689403593302 +-1.58697254669753107237 +-1.58744212843583754058 +-1.58791136243795594218 +-1.58838024903260310872 +-1.58884878854821098848 +-1.58931698131292575837 +-1.58978482765460871207 +-1.59025232790083670409 +-1.59071948237890170574 +-1.59118629141581191533 +-1.59165275533829198018 +-1.59211887447277922192 +-1.59258464914543074187 +-1.59305007968211809199 +-1.59351516640843060557 +-1.59397990964967273264 +-1.59444430973086603842 +-1.59490836697674898126 +-1.59537208171177757876 +-1.59583545426012474167 +-1.59629848494568049588 +-1.59676117409205353681 +-1.59722352202256767661 +-1.59768552906026783944 +-1.59814719552791517643 +-1.59860852174798884207 +-1.59906950804268710442 +-1.59953015473392667900 +-1.59999046214334184057 +-1.60045043059228708771 +-1.60091006040183470027 +-1.60136935189277762603 +-1.60182830538562681610 +-1.60228692120061300130 +-1.60274519965768580398 +-1.60320314107651595847 +-1.60366074577649442290 +-1.60411801407673015873 +-1.60457494629605479375 +-1.60503154275301751497 +-1.60548780376589039776 +-1.60594372965266618536 +-1.60639932073105740074 +-1.60685457731849812291 +-1.60730949973214309878 +-1.60776408828886996361 +-1.60821834330527568824 +-1.60867226509768057596 +-1.60912585398212715226 +-1.60957911027437794438 +-1.61003203428991836788 +-1.61048462634395717075 +-1.61093688675142487909 +-1.61138881582697468531 +-1.61184041388498222602 +-1.61229168123954713643 +-1.61274261820449016369 +-1.61319322509335760785 +-1.61364350221941799113 +-1.61409344989566339024 +-1.61454306843480965838 +-1.61499235814929664734 +-1.61544131935128798538 +-1.61588995235267285366 +-1.61633825746506332166 +-1.61678623499979545741 +-1.61723388526793177000 +-1.61768120858025854503 +-1.61812820524728806504 +-1.61857487557925594501 +-1.61902121988612535120 +-1.61946723847758144998 +-1.61991293166303984563 +-1.62035829975163814254 +-1.62080334305224083025 +-1.62124806187344017161 +-1.62169245652355220599 +-1.62213652731062096812 +-1.62258027454241604559 +-1.62302369852643391113 +-1.62346679956990014304 +-1.62390957797976343002 +-1.62435203406270356474 +-1.62479416812512433843 +-1.62523598047315931403 +-1.62567747141266849553 +-1.62611864124924143660 +-1.62655949028819257762 +-1.62700001883456812912 +-1.62744022719313963243 +-1.62788011566840884470 +-1.62831968456460507433 +-1.62875893418568828963 +-1.62919786483534423382 +-1.62963647681699042025 +-1.63007477043377213555 +-1.63051274598856488218 +-1.63095040378397326819 +-1.63138774412233233946 +-1.63182476730570491519 +-1.63226147363588669492 +-1.63269786341440159561 +-1.63313393694250463817 +-1.63356969452118128139 +-1.63400513645114697781 +-1.63444026303284850599 +-1.63487507456646374848 +-1.63530957135190191387 +-1.63574375368880287063 +-1.63617762187653714712 +-1.63661117621420926227 +-1.63704441700065306264 +-1.63747734453443483105 +-1.63790995911385439676 +-1.63834226103694335919 +-1.63877425060146264535 +-1.63920592810490939328 +-1.63963729384451140092 +-1.64006834811723134493 +-1.64049909121976278392 +-1.64092952344853260094 +-1.64135964509970233571 +-1.64178945646916485401 +-1.64221895785254923261 +-1.64264814954521609636 +-1.64307703184226094884 +-1.64350560503851417238 +-1.64393386942853769739 +-1.64436182530663099755 +-1.64478947296682598278 +-1.64521681270289077403 +-1.64564384480832659463 +-1.64607056957637043482 +-1.64649698729999505176 +-1.64692309827190785931 +-1.64734890278455203827 +-1.64777440113010631428 +-1.64819959360048473584 +-1.64862448048733756245 +-1.64904906208205126461 +-1.64947333867574852384 +-1.64989731055928845471 +-1.65032097802326704894 +-1.65074434135801606516 +-1.65116740085360436119 +-1.65159015679983833813 +-1.65201260948626149627 +-1.65243475920215399100 +-1.65285660623653440915 +-1.65327815087815821471 +-1.65369939341551885903 +-1.65412033413684711469 +-1.65454097333011329596 +-1.65496131128302526037 +-1.65538134828302929691 +-1.65580108461730879377 +-1.65622052057278801307 +-1.65663965643612876022 +-1.65705849249373260434 +-1.65747702903173999012 +-1.65789526633603045980 +-1.65831320469222309733 +-1.65873084438567652832 +-1.65914818570149069643 +-1.65956522892450242246 +-1.65998197433929117750 +-1.66039842223017530820 +-1.66081457288121403515 +-1.66123042657620811902 +-1.66164598359869697397 +-1.66206124423196199835 +-1.66247620875902635262 +-1.66289087746265251688 +-1.66330525062534584357 +-1.66371932852935255909 +-1.66413311145666109603 +-1.66454659968899987277 +-1.66495979350784173434 +-1.66537269319439884541 +-1.66578529902962846343 +-1.66619761129422894186 +-1.66660963026863973013 +-1.66702135623304537049 +-1.66743278946737261137 +-1.66784393025128974131 +-1.66825477886420925344 +-1.66866533558528784553 +-1.66907560069342464359 +-1.66948557446726164599 +-1.66989525718518638797 +-1.67030464912532816690 +-1.67071375056556337135 +-1.67112256178350904179 +-1.67153108305652930987 +-1.67193931466173162370 +-1.67234725687596874621 +-1.67275490997583720088 +-1.67316227423767949212 +-1.67356934993758299512 +-1.67397613735137973379 +-1.67438263675464882319 +-1.67478884842271225075 +-1.67519477263064087147 +-1.67560040965324907880 +-1.67600575976509880149 +-1.67641082324049639496 +-1.67681560035349663806 +-1.67722009137789962452 +-1.67762429658725231718 +-1.67802821625484854806 +-1.67843185065372813014 +-1.67883520005667974395 +-1.67923826473623849509 +-1.67964104496468680239 +-1.68004354101405439792 +-1.68044575315611899313 +-1.68084768166240627885 +-1.68124932680419014730 +-1.68165068885249224806 +-1.68205176807808287620 +-1.68245256475147964004 +-1.68285307914295101384 +-1.68325331152251234101 +-1.68365326215992827663 +-1.68405293132471300943 +-1.68445231928613003980 +-1.68485142631319195772 +-1.68525025267465955459 +-1.68564879863904604207 +-1.68604706447461194507 +-1.68644505044937043081 +-1.68684275683108131361 +-1.68724018388725749418 +-1.68763733188516096284 +-1.68803420109180457587 +-1.68843079177395316570 +-1.68882710419811998825 +-1.68922313863057205197 +-1.68961889533732434465 +-1.69001437458414649484 +-1.69040957663655699861 +-1.69080450175982877070 +-1.69119915021898292729 +-1.69159352227879589137 +-1.69198761820379384169 +-1.69238143825825582134 +-1.69277498270621462595 +-1.69316825181145413914 +-1.69356124583751110890 +-1.69395396504767470347 +-1.69434640970498850976 +-1.69473858007224786881 +-1.69513047641200231830 +-1.69552209898655381615 +-1.69591344805795918305 +-1.69630452388802810404 +-1.69669532673832423875 +-1.69708585687016588750 +-1.69747611454462465908 +-1.69786610002252658091 +-1.69825581356445298731 +-1.69864525543073940916 +-1.69903442588147579606 +-1.69942332517650762647 +-1.69981195357543501956 +-1.70020031133761317932 +-1.70058839872215372679 +-1.70097621598792203557 +-1.70136376339354078446 +-1.70175104119738818120 +-1.70213804965759796239 +-1.70252478903205961558 +-1.70291125957841993355 +-1.70329746155408123798 +-1.70368339521620404398 +-1.70406906082170284122 +-1.70445445862725120101 +-1.70483958888927866759 +-1.70522445186397320072 +-1.70560904780727895513 +-1.70599337697489672472 +-1.70637743962228727312 +-1.70676123600466689290 +-1.70714476637701162431 +-1.70752803099405414677 +-1.70791103011028577718 +-1.70829376397995735815 +-1.70867623285707637137 +-1.70905843699540938019 +-1.70944037664848291769 +-1.70982205206958126631 +-1.71020346351174845623 +-1.71058461122778782126 +-1.71096549547026155480 +-1.71134611649149137591 +-1.71172647454355897345 +-1.71210656987830711628 +-1.71248640274733587852 +-1.71286597340200819062 +-1.71324528209344495444 +-1.71362432907252859593 +-1.71400311458990306512 +-1.71438163889597161571 +-1.71475990224089902547 +-1.71513790487460959788 +-1.71551564704679182505 +-1.71589312900689372476 +-1.71627035100412372870 +-1.71664731328745423511 +-1.71702401610561694589 +-1.71740045970710841772 +-1.71777664434018384476 +-1.71815257025286349801 +-1.71852823769292850642 +-1.71890364690792263325 +-1.71927879814515360835 +-1.71965369165168979748 +-1.72002832767436331096 +-1.72040270645977044772 +-1.72077682825427014102 +-1.72115069330398418046 +-1.72152430185479743407 +-1.72189765415236051282 +-1.72227075044208532972 +-1.72264359096914954073 +-1.72301617597849521246 +-1.72338850571482637974 +-1.72376058042261348646 +-1.72413240034609183127 +-1.72450396572925912508 +-1.72487527681588082018 +-1.72524633384948522519 +-1.72561713707336616963 +-1.72598768673058411416 +-1.72635798306396281987 +-1.72672802631609378921 +-1.72709781672933271324 +-1.72746735454580191416 +-1.72783664000738967914 +-1.72820567335574915013 +-1.72857445483230276473 +-1.72894298467823648302 +-1.72931126313450467258 +-1.72967929044182722187 +-1.73004706684069131661 +-1.73041459257135166183 +-1.73078186787383025980 +-1.73114889298791529981 +-1.73151566815316448888 +-1.73188219360889972265 +-1.73224846959421485693 +-1.73261449634796860231 +-1.73298027410878940913 +-1.73334580311507324701 +-1.73371108360498382694 +-1.73407611581645482168 +-1.73444089998718742329 +-1.73480543635465234154 +-1.73516972515608847161 +-1.73553376662850489254 +-1.73589756100867820265 +-1.73626110853315607230 +-1.73662440943825502337 +-1.73698746396006131754 +-1.73735027233443117822 +-1.73771283479698990249 +-1.73807515158313341530 +-1.73843722292802937979 +-1.73879904906661364450 +-1.73916063023359379613 +-1.73952196666344782727 +-1.73988305859042391432 +-1.74024390624854241594 +-1.74060450987159454073 +-1.74096486969314145909 +-1.74132498594651785595 +-1.74168485886482837799 +-1.74204448868094941005 +-1.74240387562753062944 +-1.74276301993699167525 +-1.74312192184152636720 +-1.74348058157309915295 +-1.74383899936344755055 +-1.74419717544408214849 +-1.74455511004628416316 +-1.74491280340111210023 +-1.74527025573939176262 +-1.74562746729172668658 +-1.74598443828849125836 +-1.74634116895983382278 +-1.74669765953567757144 +-1.74705391024571698999 +-1.74740992131942318721 +-1.74776569298603789981 +-1.74812122547458081989 +-1.74847651901384337769 +-1.74883157383239229432 +-1.74918639015856847152 +-1.74954096822048832394 +-1.74989530824604200276 +-1.75024941046289561619 +-1.75060327509849011918 +-1.75095690238004220163 +-1.75131029253454295613 +-1.75166344578876009841 +-1.75201636236923663503 +-1.75236904250229130753 +-1.75272148641401903646 +-1.75307369433029136552 +-1.75342566647675579539 +-1.75377740307883533966 +-1.75412890436173052322 +-1.75448017055042027046 +-1.75483120186965679821 +-1.75518199854397227710 +-1.75553256079767461273 +-1.75588288885484922197 +-1.75623298293935925507 +-1.75658284327484603971 +-1.75693247008472686055 +-1.75728186359219940016 +-1.75763102402023663196 +-1.75797995159159192724 +-1.75832864652879594658 +-1.75867710905415775002 +-1.75902533938976524119 +-1.75937333775748494524 +-1.75972110437896267499 +-1.76006863947562264272 +-1.76041594326866857045 +-1.76076301597908391194 +-1.76110985782763029839 +-1.76145646903484998091 +-1.76180284982106538649 +-1.76214900040637778567 +-1.76249492101066929095 +-1.76284061185360041435 +-1.76318607315461450824 +-1.76353130513293399062 +-1.76387630800756189942 +-1.76422108199728233657 +-1.76456562732066046806 +-1.76490994419604141363 +-1.76525403284155202321 +-1.76559789347510109891 +-1.76594152631437939505 +-1.76628493157685650949 +-1.76662810947978599074 +-1.76697106024020289539 +-1.76731378407492445426 +-1.76765628120054940631 +-1.76799855183345977494 +-1.76834059618981820350 +-1.76868241448557217410 +-1.76902400693645067697 +-1.76936537375796509863 +-1.76970651516541077619 +-1.77004743137386566509 +-1.77038812259819211548 +-1.77072858905303354149 +-1.77106883095281952833 +-1.77140884851176116932 +-1.77174864194385506266 +-1.77208821146288153514 +-1.77242755728240397595 +-1.77276667961577061305 +-1.77310557867611562344 +-1.77344425467635469218 +-1.77378270782919078563 +-1.77412093834711059870 +-1.77445894644238566507 +-1.77479673232707302333 +-1.77513429621301543904 +-1.77547163831184007243 +-1.77580875883496025480 +-1.77614565799357526643 +-1.77648233599866833821 +-1.77681879306101153659 +-1.77715502939116154479 +-1.77749104519946077296 +-1.77782684069603891253 +-1.77816241609081138186 +-1.77849777159348154676 +-1.77883290741353805586 +-1.77916782376025728318 +-1.77950252084270332809 +-1.77983699886972712711 +-1.78017125804996467764 +-1.78050529859184303305 +-1.78083912070357541779 +-1.78117272459316211553 +-1.78150611046839202345 +-1.78183927853684243026 +-1.78217222900587857204 +-1.78250496208265341025 +-1.78283747797410940805 +-1.78316977688697653193 +-1.78350185902777558233 +-1.78383372460281308669 +-1.78416537381818685049 +-1.78449680687978351479 +-1.78482802399327944443 +-1.78515902536413939572 +-1.78548981119761851488 +-1.78582038169876033962 +-1.78615073707240079592 +-1.78648087752316397925 +-1.78681080325546415288 +-1.78714051447350685820 +-1.78747001138128691622 +-1.78779929418259131424 +-1.78812836308099543103 +-1.78845721827986792185 +-1.78878585998236694365 +-1.78911428839144215353 +-1.78944250370983470866 +-1.78977050614007748841 +-1.79009829588449309590 +-1.79042587314519807684 +-1.79075323812410047708 +-1.79108039102289851030 +-1.79140733204308411075 +-1.79173406138594160097 +-1.79206057925254635954 +-1.79238688584376815172 +-1.79271298136026691061 +-1.79303886600249740013 +-1.79336453997070743860 +-1.79369000346493612241 +-1.79401525668501782285 +-1.79434029983057863333 +-1.79466513310103881196 +-1.79498975669561167123 +-1.79531417081330624264 +-1.79563837565292283571 +-1.79596237141305747897 +-1.79628615829210014354 +-1.79660973648823452109 +-1.79693310619943891204 +-1.79725626762348689169 +-1.79757922095794664408 +-1.79790196640018073992 +-1.79822450414734613666 +-1.79854683439639684295 +-1.79886895734407925573 +-1.79919087318693926569 +-1.79951258212131448566 +-1.79983408434334091197 +-1.80015538004894803947 +-1.80047646943386308038 +-1.80079735269360852179 +-1.80111803002350479019 +-1.80143850161866536652 +-1.80175876767400278133 +-1.80207882838422617233 +-1.80239868394384106232 +-1.80271833454714935918 +-1.80303778038824980001 +-1.80335702166104017152 +-1.80367605855921420144 +-1.80399489127626244667 +-1.80431352000547517989 +-1.80463194493993861478 +-1.80495016627253734853 +-1.80526818419595413978 +-1.80558599890267035271 +-1.80590361058496484681 +-1.80622101943491508713 +-1.80653822564439892062 +-1.80685522940508902501 +-1.80717203090846023628 +-1.80748863034578555187 +-1.80780502790813635272 +-1.80812122378638506781 +-1.80843721817120051121 +-1.80875301125305432137 +-1.80906860322221541004 +-1.80938399426875395903 +-1.80969918458253942184 +-1.81001417435324074567 +-1.81032896377032881396 +-1.81064355302307333773 +-1.81095794230054396579 +-1.81127213179161405954 +-1.81158612168495536388 +-1.81189991216903867333 +-1.81221350343214071543 +-1.81252689566233549101 +-1.81284008904749871505 +-1.81315308377531003714 +-1.81346588003324837857 +-1.81377847800859370864 +-1.81409087788843037536 +-1.81440307985964310866 +-1.81471508410891857466 +-1.81502689082274781818 +-1.81533850018742093368 +-1.81564991238903328252 +-1.81596112761348105202 +-1.81627214604646525231 +-1.81658296787348705337 +-1.81689359327985400228 +-1.81720402245067380598 +-1.81751425557085921625 +-1.81782429282512647539 +-1.81813413439799487215 +-1.81844378047378718577 +-1.81875323123663079627 +-1.81906248687045657420 +-1.81937154755900065695 +-1.81968041348580111816 +-1.81998908483420263060 +-1.82029756178735402372 +-1.82060584452820872770 +-1.82091393323952321914 +-1.82122182810386212815 +-1.82152952930359268713 +-1.82183703702088828358 +-1.82214435143772779391 +-1.82245147273589624959 +-1.82275840109698150648 +-1.82306513670238001801 +-1.82337167973329372650 +-1.82367803037072984118 +-1.82398418879550194838 +-1.82429015518823001152 +-1.82459592972934059318 +-1.82490151259906685510 +-1.82520690397744833611 +-1.82551210404433073009 +-1.82581711297936966076 +-1.82612193096202313214 +-1.82642655817156152054 +-1.82673099478705780463 +-1.82703524098739711334 +-1.82733929695126828818 +-1.82764316285716965638 +-1.82794683888340792066 +-1.82825032520809704906 +-1.82855362200915894100 +-1.82885672946432542574 +-1.82915964775113426555 +-1.82946237704693381865 +-1.82976491752888059672 +-1.83006726937393948695 +-1.83036943275888486227 +-1.83067140786030058131 +-1.83097319485457910027 +-1.83127479391792169494 +-1.83157620522634090321 +-1.83187742895565719436 +-1.83217846528150185570 +-1.83247931437931632637 +-1.83277997642435042103 +-1.83308045159166632665 +-1.83338074005613416162 +-1.83368084199243708277 +-1.83398075757506773265 +-1.83428048697832779546 +-1.83458003037633288201 +-1.83487938794300675660 +-1.83517855985208666603 +-1.83547754627712000897 +-1.83577634739146500209 +-1.83607496336829090211 +-1.83637339438058178054 +-1.83667164060112986235 +-1.83696970220254174322 +-1.83726757935723439275 +-1.83756527223743781896 +-1.83786278101519462425 +-1.83816010586235933921 +-1.83845724695059775655 +-1.83875420445139181602 +-1.83905097853603316516 +-1.83934756937562782220 +-1.83964397714109439974 +-1.83994020200316410474 +-1.84023624413238429121 +-1.84053210369911224298 +-1.84082778087352161300 +-1.84112327582559753836 +-1.84141858872514130319 +-1.84171371974176634190 +-1.84200866904490179188 +-1.84230343680379005100 +-1.84259802318748766581 +-1.84289242836486666377 +-1.84318665250461410920 +-1.84348069577523032692 +-1.84377455834503201082 +-1.84406824038214955941 +-1.84436174205452974029 +-1.84465506352993480199 +-1.84494820497594202990 +-1.84524116655994374625 +-1.84553394844914886441 +-1.84582655081058155666 +-1.84611897381108258642 +-1.84641121761730842010 +-1.84670328239573189322 +-1.84699516831264221040 +-1.84728687553414561151 +-1.84757840422616448350 +-1.84786975455443736038 +-1.84816092668452136571 +-1.84845192078178888195 +-1.84874273701143154724 +-1.84903337553845537045 +-1.84932383652768672633 +-1.84961412014376791468 +-1.84990422655116026895 +-1.85019415591414082556 +-1.85048390839680609865 +-1.85077348416307119194 +-1.85106288337666757826 +-1.85135210620114709634 +-1.85164115279987950835 +-1.85193002333605205578 +-1.85221871797267123583 +-1.85250723687256368954 +-1.85279558019837375937 +-1.85308374811256548753 +-1.85337174077742172784 +-1.85365955835504481186 +-1.85394720100735721502 +-1.85423466889610066843 +-1.85452196218283593687 +-1.85480908102894570533 +-1.85509602559563058222 +-1.85538279604391243005 +-1.85566939253463325521 +-1.85595581522845542999 +-1.85624206428586235873 +-1.85652813986715781169 +-1.85681404213246592505 +-1.85709977124173231111 +-1.85738532735472272606 +-1.85767071063102662265 +-1.85795592123005248730 +-1.85824095931103050461 +-1.85852582503301411165 +-1.85881051855487577917 +-1.85909504003531234062 +-1.85937938963284232763 +-1.85966356750580374957 +-1.85994757381236142102 +-1.86023140871049807998 +-1.86051507235802104923 +-1.86079856491256090401 +-1.86108188653157013981 +-1.86136503737232406053 +-1.86164801759192188868 +-1.86193082734728410088 +-1.86221346679515642464 +-1.86249593609210695178 +-1.86277823539452791479 +-1.86306036485863502072 +-1.86334232464046745115 +-1.86362411489588852831 +-1.86390573578058660331 +-1.86418718745007239157 +-1.86446847005968141531 +-1.86474958376457622400 +-1.86503052871973928895 +-1.86531130507998166301 +-1.86559191299993765156 +-1.86587235263406681085 +-1.86615262413665394803 +-1.86643272766180867706 +-1.86671266336346564074 +-1.86699243139538628711 +-1.86727203191115687098 +-1.86755146506418867602 +-1.86783073100772067932 +-1.86810982989481577654 +-1.86838876187836411269 +-1.86866752711108152774 +-1.86894612574551199913 +-1.86922455793402342294 +-1.86950282382881161070 +-1.86978092358189940114 +-1.87005885734513643825 +-1.87033662527019872712 +-1.87061422750858930009 +-1.87089166421164021514 +-1.87116893553050833710 +-1.87144604161618000049 +-1.87172298261946856712 +-1.87199975869101553627 +-1.87227636998128987855 +-1.87255281664058759183 +-1.87282909881903547600 +-1.87310521666658669204 +-1.87338117033302298253 +-1.87365695996795400546 +-1.87393258572082133107 +-1.87420804774089022615 +-1.87448334617725897999 +-1.87475848117885335320 +-1.87503345289442879817 +-1.87530826147256979297 +-1.87558290706168939721 +-1.87585738981003191661 +-1.87613170986567046050 +-1.87640586737650805205 +-1.87667986249027674006 +-1.87695369535454026355 +-1.87722736611669183127 +-1.87750087492395478783 +-1.87777422192338283580 +-1.87804740726186070177 +-1.87832043108610391435 +-1.87859329354265747192 +-1.87886599477789983936 +-1.87913853493803784112 +-1.87941091416911199019 +-1.87968313261699271344 +-1.87995519042738057358 +-1.88022708774581115421 +-1.88049882471764884251 +-1.88077040148809104814 +-1.88104181820216664889 +-1.88131307500473821115 +-1.88158417204049754901 +-1.88185510945397194149 +-1.88212588738951924761 +-1.88239650599132968267 +-1.88266696540342759469 +-1.88293726576966968800 +-1.88320740723374524528 +-1.88347738993917634964 +-1.88374721402931966097 +-1.88401687964736352932 +-1.88428638693633110357 +-1.88455573603907788893 +-1.88482492709829552169 +-1.88509396025650555195 +-1.88536283565606721524 +-1.88563155343917276952 +-1.88590011374784727316 +-1.88616851672395169359 +-1.88643676250918046478 +-1.88670485124506392971 +-1.88697278307296589794 +-1.88724055813408586602 +-1.88750817656945768519 +-1.88777563851995089372 +-1.88804294412627005073 +-1.88831009352895429210 +-1.88857708686837999501 +-1.88884392428475700321 +-1.88911060591813262377 +-1.88937713190838918464 +-1.88964350239524514485 +-1.88990971751825553859 +-1.89017577741681064296 +-1.89044168223013819841 +-1.89070743209730118828 +-1.89097302715719983723 +-1.89123846754857138919 +-1.89150375340999077345 +-1.89176888487986816223 +-1.89203386209645008087 +-1.89229868519782384872 +-1.89256335432191025170 +-1.89282786960647131380 +-1.89309223118910185946 +-1.89335643920724017164 +-1.89362049379815644556 +-1.89388439509896455704 +-1.89414814324661229250 +-1.89441173837788756629 +-1.89467518062941620016 +-1.89493847013766170129 +-1.89520160703892792675 +-1.89546459146935575291 +-1.89572742356492618399 +-1.89599010346145835371 +-1.89625263129461130163 +-1.89651500719988130861 +-1.89677723131260700384 +-1.89703930376796425783 +-1.89730122470096884690 +-1.89756299424647689733 +-1.89782461253918333099 +-1.89808607971362519606 +-1.89834739590417722610 +-1.89860856124505561482 +-1.89886957587031557360 +-1.89913043991385466214 +-1.89939115350941012395 +-1.89965171679055933041 +-1.89991212989072133510 +-1.90017239294315576359 +-1.90043250608096347953 +-1.90069246943708569653 +-1.90095228314430619854 +-1.90121194733524978560 +-1.90147146214238249584 +-1.90173082769801182756 +-1.90199004413428784943 +-1.90224911158320209026 +-1.90250803017658820515 +-1.90276680004612197550 +-1.90302542132332175306 +-1.90328389413954801590 +-1.90354221862600292425 +-1.90380039491373342919 +-1.90405842313362771989 +-1.90431630341641744408 +-1.90457403589267615374 +-1.90483162069282241369 +-1.90508905794711624893 +-1.90534634778566269731 +-1.90560349033840892297 +-1.90586048573514710291 +-1.90611733410551154044 +-1.90637403557898221784 +-1.90663059028488146573 +-1.90688699835237596147 +-1.90714325991047917164 +-1.90739937508804557886 +-1.90765534401377534479 +-1.90791116681621386597 +-1.90816684362375044159 +-1.90842237456461960576 +-1.90867775976690179363 +-1.90893299935852089888 +-1.90918809346724693832 +-1.90944304222069449750 +-1.90969784574632539531 +-1.90995250417144446509 +-1.91020701762320532779 +-1.91046138622860439682 +-1.91071561011448620704 +-1.91096968940753964006 +-1.91122362423430192102 +-1.91147741472115506589 +-1.91173106099432832394 +-1.91198456317989573527 +-1.91223792140377990556 +-1.91249113579175000766 +-1.91274420646942133750 +-1.91299713356225753458 +-1.91324991719556791736 +-1.91350255749450992582 +-1.91375505458408756709 +-1.91400740858915430209 +-1.91425961963440882663 +-1.91451168784439884618 +-1.91476361334352151999 +-1.91501539625601813199 +-1.91526703670598164031 +-1.91551853481735223639 +-1.91576989071391712294 +-1.91602110451931340052 +-1.91627217635702717935 +-1.91652310635039202502 +-1.91677389462259051278 +-1.91702454129665600391 +-1.91727504649546798277 +-1.91752541034175827406 +-1.91777563295810482558 +-1.91802571446693770341 +-1.91827565499053620535 +-1.91852545465102730660 +-1.91877511357039098883 +-1.91902463187045291271 +-1.91927400967289307765 +-1.91952324709923982660 +-1.91977234427087095625 +-1.92002130130901571547 +-1.92027011833475413916 +-1.92051879546901682616 +-1.92076733283258405116 +-1.92101573054608820712 +-1.92126398873001225098 +-1.92151210750469014776 +-1.92176008699030753668 +-1.92200792730690062093 +-1.92225562857435816611 +-1.92250319091241994585 +-1.92275061444067740801 +-1.92299789927857389671 +-1.92324504554540487433 +-1.92349205336031880975 +-1.92373892284231362559 +-1.92398565411024335958 +-1.92423224728281150320 +-1.92447870247857455439 +-1.92472501981594334985 +-1.92497119941317995639 +-1.92521724138839989138 +-1.92546314585957234478 +-1.92570891294451862485 +-1.92595454276091326840 +-1.92620003542628426274 +-1.92644539105801571033 +-1.92669060977334138940 +-1.92693569168935119329 +-1.92718063692298779976 +-1.92742544559104955759 +-1.92767011781018693384 +-1.92791465369690517839 +-1.92815905336756543420 +-1.92840331693838096250 +-1.92864744452542113962 +-1.92889143624460945858 +-1.92913529221172486139 +-1.92937901254240062876 +-1.92962259735212504630 +-1.92986604675624207061 +-1.93010936086995088523 +-1.93035253980830567855 +-1.93059558368621564384 +-1.93083849261844830991 +-1.93108126671962332388 +-1.93132390610421866839 +-1.93156641088656666483 +-1.93180878118085863626 +-1.93205101710113846813 +-1.93229311876130926962 +-1.93253508627512893270 +-1.93277691975621301879 +-1.93301861931803231620 +-1.93326018507391705903 +-1.93350161713705159805 +-1.93374291562047928572 +-1.93398408063709892346 +-1.93422511229966831436 +-1.93446601072080293093 +-1.93470677601297347259 +-1.93494740828851052861 +-1.93518790765960146949 +-1.93542827423829111311 +-1.93566850813648350105 +-1.93590860946594012226 +-1.93614857833828080125 +-1.93638841486498347599 +-1.93662811915738464208 +-1.93686769132668046289 +-1.93710713148392366101 +-1.93734643974002751499 +-1.93758561620576386098 +-1.93782466099176331475 +-1.93806357420851504969 +-1.93830235596636946127 +-1.93854100637553483644 +-1.93877952554607957403 +-1.93901791358793085251 +-1.93925617061087640636 +-1.93949429672456385987 +-1.93973229203850050517 +-1.93997015666205441242 +-1.94020789070445287550 +-1.94044549427478374426 +-1.94068296748199675683 +-1.94092031043489909869 +-1.94115752324216273017 +-1.94139460601231705894 +-1.94163155885375360299 +-1.94186838187472554651 +-1.94210507518334685173 +-1.94234163888759159278 +-1.94257807309529728634 +-1.94281437791416089489 +-1.94305055345174304549 +-1.94328659981546403301 +-1.94352251711260715084 +-1.94375830545031802465 +-1.94399396493560372434 +-1.94422949567533431825 +-1.94446489777623954254 +-1.94470017134491479638 +-1.94493531648781758925 +-1.94517033331126643070 +-1.94540522192144305080 +-1.94563998242439306630 +-1.94587461492602420421 +-1.94610911953210807823 +-1.94634349634827841236 +-1.94657774548003370541 +-1.94681186703273456651 +-1.94704586111160660167 +-1.94727972782173730515 +-1.94751346726807961218 +-1.94774707955544945648 +-1.94798056478852776863 +-1.94821392307185847770 +-1.94844715450985050964 +-1.94868025920677712115 +-1.94891323726677478945 +-1.94914608879384787521 +-1.94937881389186218328 +-1.94961141266454962562 +-1.94984388521550711104 +-1.95007623164819587913 +-1.95030845206594372065 +-1.95054054657194386735 +-1.95077251526925299352 +-1.95100435826079410262 +-1.95123607564935630521 +-1.95146766753759570712 +-1.95169913402803230085 +-1.95193047522305196395 +-1.95216169122490779131 +-1.95239278213571987308 +-1.95262374805747196405 +-1.95285458909201703470 +-1.95308530534107327448 +-1.95331589690622520195 +-1.95354636388892410892 +-1.95377670639049050294 +-1.95400692451210833411 +-1.95423701835483099032 +-1.95446698801957996494 +-1.95469683360714130416 +-1.95492655521817093600 +-1.95515615295319045153 +-1.95538562691258976933 +-1.95561497719662935602 +-1.95584420390543289869 +-1.95607330713899507657 +-1.95630228699717889640 +-1.95653114357971436021 +-1.95675987698620046373 +-1.95698848731610408613 +-1.95721697466876176641 +-1.95744533914337903724 +-1.95767358083902798249 +-1.95790169985465167812 +-1.95812969628906241581 +-1.95835757024094037071 +-1.95858532180883626594 +-1.95881295109116848607 +-1.95904045818622640773 +-1.95926784319216951147 +-1.95949510620702582742 +-1.95972224732869282349 +-1.95994926665494006990 +-1.96017616428340479828 +-1.96040294031159567645 +-1.96062959483689236428 +-1.96085612795654351537 +-1.96108253976766855331 +-1.96130883036725833790 +-1.96153499985217383283 +-1.96176104831914810411 +-1.96198697586478254529 +-1.96221278258555287266 +-1.96243846857780379622 +-1.96266403393775146213 +-1.96288947876148500704 +-1.96311480314496322741 +-1.96334000718401813224 +-1.96356509097435272260 +-1.96379005461154121370 +-1.96401489819103192147 +-1.96423962180814326572 +-1.96446422555806599064 +-1.96468870953586516315 +-1.96491307383647617613 +-1.96513731855470630272 +-1.96536144378523980336 +-1.96558544962262815581 +-1.96580933616129960306 +-1.96603310349555404635 +-1.96625675171956482146 +-1.96648028092737758854 +-1.96670369121291255254 +-1.96692698266996268686 +-1.96715015539219528762 +-1.96737320947314953123 +-1.96759614500624113731 +-1.96781896208475681753 +-1.96804166080185893861 +-1.96826424125058441206 +-1.96848670352384313986 +-1.96870904771441956882 +-1.96893127391497402279 +-1.96915338221803937202 +-1.96937537271602458588 +-1.96959724550121251241 +-1.96981900066576098851 +-1.97004063830170417226 +-1.97026215850094965631 +-1.97048356135528179855 +-1.97070484695635816941 +-1.97092601539571399272 +-1.97114706676475925917 +-1.97136800115477828221 +-1.97158881865693413893 +-1.97180951936226311894 +-1.97203010336167849914 +-1.97225057074597032170 +-1.97247092160580272946 +-1.97269115603171885098 +-1.97291127411413746984 +-1.97313127594335191439 +-1.97335116160953538689 +-1.97357093120273541231 +-1.97379058481287739113 +-1.97401012252976326700 +-1.97422954444307374722 +-1.97444885064236475003 +-1.97466804121706940300 +-1.97488711625649937531 +-1.97510607584984443363 +-1.97532492008617133195 +-1.97554364905442336742 +-1.97576226284342371109 +-1.97598076154187141107 +-1.97619914523834605546 +-1.97641741402130399763 +-1.97663556797908013252 +-1.97685360719988700851 +-1.97707153177181726988 +-1.97728934178284121437 +-1.97750703732080790331 +-1.97772461847344560582 +-1.97794208532836224279 +-1.97815943797304294449 +-1.97837667649485338117 +-1.97859380098103865286 +-1.97881081151872173507 +-1.97902770819490791965 +-1.97924449109647992984 +-1.97946116031020036274 +-1.97967771592271235548 +-1.97989415802053847493 +-1.98011048669008227208 +-1.98032670201762561746 +-1.98054280408933425228 +-1.98075879299124957278 +-1.98097466880929706790 +-1.98119043162928165636 +-1.98140608153688835280 +-1.98162161861768426618 +-1.98183704295711660137 +-1.98205235464051376937 +-1.98226755375308538731 +-1.98248264037992294462 +-1.98269761460599780456 +-1.98291247651616431291 +-1.98312722619515779954 +-1.98334186372759480044 +-1.98355638919797483410 +-1.98377080269067906926 +-1.98398510428996921462 +-1.98419929407999062754 +-1.98441337214477120376 +-1.98462733856821915701 +-1.98484119343412834802 +-1.98505493682617228934 +-1.98526856882790814218 +-1.98548208952277605022 +-1.98569549899409913962 +-1.98590879732508351907 +-1.98612198459881805768 +-1.98633506089827482910 +-1.98654802630631044380 +-1.98676088090566294042 +-1.98697362477895445032 +-1.98718625800869319598 +-1.98739878067726705169 +-1.98761119286695087105 +-1.98782349465990226811 +-1.98803568613816361577 +-1.98824776738366026940 +-1.98845973847820345348 +-1.98867159950348781905 +-1.98888335054109188782 +-1.98909499167248049467 +-1.98930652297900145697 +-1.98951794454188868322 +-1.98972925644226128483 +-1.98994045876112135574 +-1.99015155157935863528 +-1.99036253497774606736 +-1.99057340903694424128 +-1.99078417383749628478 +-1.99099482945983385918 +-1.99120537598427183035 +-1.99141581349101270959 +-1.99162614206014398910 +-1.99183636177163969627 +-1.99204647270535883941 +-1.99225647494104829427 +-1.99246636855834013957 +-1.99267615363675254514 +-1.99288583025569154827 +-1.99309539849444949944 +-1.99330485843220439612 +-1.99351421014802188125 +-1.99372345372085457704 +-1.99393258922954319523 +-1.99414161675281276231 +-1.99435053636927839271 +-1.99455934815744218014 +-1.99476805219569208738 +-1.99497664856230505492 +-1.99518513733544522459 +-1.99539351859316549387 +-1.99560179241340507339 +-1.99580995887399281763 +-1.99601801805264433831 +-1.99622597002696466895 +-1.99643381487444604439 +-1.99664155267247012127 +-1.99684918349830686779 +-1.99705670742911411963 +-1.99726412454194002244 +-1.99747143491371970114 +-1.99767863862127970087 +-1.99788573574133332400 +-1.99809272635048440492 +-1.99829961052522464549 +-1.99850638834193805593 +-1.99871305987689429351 +-1.99891962520625598998 +-1.99912608440607342253 +-1.99933243755228784444 +-1.99953868472072948670 +-1.99974482598711889025 +-1.99995086142706801624 +-2.00015679111607758145 +-2.00036261512953839059 +-2.00056833354273333470 +-2.00077394643083472658 +-2.00097945386890563313 +-2.00118485593189987526 +-2.00139015269466247204 +-2.00159534423192964070 +-2.00180043061832746432 +-2.00200541192837411231 +-2.00221028823648072859 +-2.00241505961694565841 +-2.00261972614396288606 +-2.00282428789161537352 +-2.00302874493387905730 +-2.00323309734462151610 +-2.00343734519760197088 +-2.00364148856647306118 +-2.00384552752477640425 +-2.00404946214594836817 +-2.00425329250331740738 +-2.00445701867010450670 +-2.00466064071942184910 +-2.00486415872427548024 +-2.00506757275756442027 +-2.00527088289207977567 +-2.00547408920050518333 +-2.00567719175541947507 +-2.00588019062929223679 +-2.00608308589448780523 +-2.00628587762326260346 +-2.00648856588776824950 +-2.00669115076004933584 +-2.00689363231204342952 +-2.00709601061558196022 +-2.00729828574239110850 +-2.00750045776409091758 +-2.00770252675219396110 +-2.00790449277811022810 +-2.00810635591314046167 +-2.00830811622848193210 +-2.00850977379522666055 +-2.00871132868436008678 +-2.00891278096676195730 +-2.00911413071320898993 +-2.00931537799437132108 +-2.00951652288081383801 +-2.00971756544299795522 +-2.00991850575127894984 +-2.01011934387590907036 +-2.01032007988703353973 +-2.01052071385469544040 +-2.01072124584883304976 +-2.01092167593927850788 +-2.01112200419576225841 +-2.01132223068791082810 +-2.01152235548524327413 +-2.01172237865717917771 +-2.01192230027303153861 +-2.01212212040201166019 +-2.01232183911322604075 +-2.01252145647567726172 +-2.01272097255826709628 +-2.01292038742979029209 +-2.01311970115894256494 +-2.01331891381431304922 +-2.01351802546439140329 +-2.01371703617756070415 +-2.01391594602210588505 +-2.01411475506620352149 +-2.01431346337793382162 +-2.01451207102526907988 +-2.01471057807608389112 +-2.01490898459814804511 +-2.01510729065912919111 +-2.01530549632659372605 +-2.01550360166800768269 +-2.01570160675073184464 +-2.01589951164202840772 +-2.01609731640905609495 +-2.01629502111887193294 +-2.01649262583843480456 +-2.01669013063459789947 +-2.01688753557411626360 +-2.01708484072364324646 +-2.01728204614972916886 +-2.01747915191882798425 +-2.01767615809728795284 +-2.01787306475135963524 +-2.01806987194719189560 +-2.01826657975083367802 +-2.01846318822823267425 +-2.01865969744523887641 +-2.01885610746759880385 +-2.01905241836096038810 +-2.01924863019087208471 +-2.01944474302278198508 +-2.01964075692203781642 +-2.01983667195388916227 +-2.02003248818348435378 +-2.02022820567587357843 +-2.02042382449600754768 +-2.02061934470873616476 +-2.02081476637881340963 +-2.02101008957088934537 +-2.02120531434952033223 +-2.02140044077916103404 +-2.02159546892416708275 +-2.02179039884879729883 +-2.02198523061720969451 +-2.02217996429346635878 +-2.02237459994152724008 +-2.02256913762526036038 +-2.02276357740842893662 +-2.02295791935470159473 +-2.02315216352764837282 +-2.02334630999074160940 +-2.02354035880735549924 +-2.02373431004076786976 +-2.02392816375415707242 +-2.02412192001060597946 +-2.02431557887309798716 +-2.02450914040452056852 +-2.02470260466766438512 +-2.02489597172522239887 +-2.02508924163978987210 +-2.02528241447386836427 +-2.02547549028985818254 +-2.02566846915006637531 +-2.02586135111670273545 +-2.02605413625187935622 +-2.02624682461761373986 +-2.02643941627582568898 +-2.02663191128833908294 +-2.02682430971688321009 +-2.02701661162309010322 +-2.02720881706849498372 +-2.02740092611454070237 +-2.02759293882257018993 +-2.02778485525383489474 +-2.02797667546948767736 +-2.02816839953058680734 +-2.02836002749809729551 +-2.02855155943288645304 +-2.02874299539572833240 +-2.02893433544729973050 +-2.02912557964818640599 +-2.02931672805887552968 +-2.02950778073976101368 +-2.02969873775114306724 +-2.02988959915322642047 +-2.03008036500612298880 +-2.03027103536984787624 +-2.03046161030432381622 +-2.03065208986937939528 +-2.03084247412474816485 +-2.03103276313007130582 +-2.03122295694489540807 +-2.03141305562867335865 +-2.03160305924076389772 +-2.03179296784043428303 +-2.03198278148685629318 +-2.03217250023910978030 +-2.03236212415618044957 +-2.03255165329696252385 +-2.03274108772025474678 +-2.03293042748476437964 +-2.03311967264910675723 +-2.03330882327180351155 +-2.03349787941128301583 +-2.03368684112588393731 +-2.03387570847384813177 +-2.03406448151332908125 +-2.03425316030238745313 +-2.03444174489898887970 +-2.03463023536101017541 +-2.03481863174623622825 +-2.03500693411235777930 +-2.03519514251697586360 +-2.03538325701759870157 +-2.03557127767164436349 +-2.03575920453643766095 +-2.03594703766921369947 +-2.03613477712711610224 +-2.03632242296719701002 +-2.03650997524641708125 +-2.03669743402164771240 +-2.03688479934966748530 +-2.03707207128716483169 +-2.03725924989073847726 +-2.03744633521689566535 +-2.03763332732205482145 +-2.03782022626254066822 +-2.03800703209459088683 +-2.03819374487435167609 +-2.03838036465787952878 +-2.03856689150114078757 +-2.03875332546001253320 +-2.03893966659028080812 +-2.03912591494764328104 +-2.03931207058770702645 +-2.03949813356599074510 +-2.03968410393792254354 +-2.03986998175884304274 +-2.04005576708400138131 +-2.04024145996855876817 +-2.04042706046758892668 +-2.04061256863607365375 +-2.04079798452890814886 +-2.04098330820089834958 +-2.04116853970676137564 +-2.04135367910112686118 +-2.04153872643853340207 +-2.04172368177343477313 +-2.04190854516019326681 +-2.04209331665308679860 +-2.04227799630630180161 +-2.04246258417393722340 +-2.04264708031000630228 +-2.04283148476843301466 +-2.04301579760305473954 +-2.04320001886761870580 +-2.04338414861578776538 +-2.04356818690113595238 +-2.04375213377715159169 +-2.04393598929723285806 +-2.04411975351469266116 +-2.04430342648275775730 +-2.04448700825456652908 +-2.04467049888317164985 +-2.04485389842153786333 +-2.04503720692254553626 +-2.04522042443898488528 +-2.04540355102356485872 +-2.04558658672890292252 +-2.04576953160753438610 +-2.04595238571190440879 +-2.04613514909437732570 +-2.04631782180722687770 +-2.04650040390264376100 +-2.04668289543273074216 +-2.04686529644950709894 +-2.04704760700490551173 +-2.04722982715077339577 +-2.04741195693887378937 +-2.04759399642088180116 +-2.04777594564838949509 +-2.04795780467290500226 +-2.04813957354584852411 +-2.04832125231855677328 +-2.04850284104228252957 +-2.04868433976819286357 +-2.04886574854737002482 +-2.04904706743081321818 +-2.04922829646943505111 +-2.04940943571406641865 +-2.04959048521545161847 +-2.04977144502425279171 +-2.04995231519104592621 +-2.05013309576632485332 +-2.05031378680050035967 +-2.05049438834389574637 +-2.05067490044675526661 +-2.05085532315923613211 +-2.05103565653141384217 +-2.05121590061327951915 +-2.05139605545474212889 +-2.05157612110562848073 +-2.05175609761567834255 +-2.05193598503455199022 +-2.05211578341182621088 +-2.05229549279699341469 +-2.05247511323946518758 +-2.05265464478856962671 +-2.05283408749355311684 +-2.05301344140357810986 +-2.05319270656772490113 +-2.05337188303499340591 +-2.05355097085429960657 +-2.05372997007447910534 +-2.05390888074428268339 +-2.05408770291238385042 +-2.05426643662736818641 +-2.05444508193774577620 +-2.05462363889194055133 +-2.05480210753829828363 +-2.05498048792507992388 +-2.05515878010046826319 +-2.05533698411256349203 +-2.05551510000938497669 +-2.05569312783887081508 +-2.05587106764887739274 +-2.05604891948718337957 +-2.05622668340148218036 +-2.05640435943938948427 +-2.05658194764844104441 +-2.05675944807608912512 +-2.05693686076970783105 +-2.05711418577659133078 +-2.05729142314395208047 +-2.05746857291892348840 +-2.05764563514855858273 +-2.05782260987983089962 +-2.05799949715963270691 +-2.05817629703477900094 +-2.05835300955200350970 +-2.05852963475796046922 +-2.05870617269922506765 +-2.05888262342229300117 +-2.05905898697358002991 +-2.05923526339942464247 +-2.05941145274608450322 +-2.05958755505973822864 +-2.05976357038648671960 +-2.05993949877235182910 +-2.06011534026327591818 +-2.06029109490512318814 +-2.06046676274367923654 +-2.06064234382465238937 +-2.06081783819366970434 +-2.06099324589628318805 +-2.06116856697796491105 +-2.06134380148410878419 +-2.06151894946003189091 +-2.06169401095097315491 +-2.06186898600209289611 +-2.06204387465847371885 +-2.06221867696512228818 +-2.06239339296696577719 +-2.06256802270885453154 +-2.06274256623556251355 +-2.06291702359178508175 +-2.06309139482214165540 +-2.06326567997117304998 +-2.06343987908334458581 +-2.06361399220304475577 +-2.06378801937458389304 +-2.06396196064219683564 +-2.06413581605004070596 +-2.06430958564219846352 +-2.06448326946267313176 +-2.06465686755539445940 +-2.06483037996421403548 +-2.06500380673290928613 +-2.06517714790517947776 +-2.06535040352464793756 +-2.06552357363486516206 +-2.06569665827930082358 +-2.06586965750135398423 +-2.06604257134434510235 +-2.06621539985151958518 +-2.06638814306604867710 +-2.06656080103102590684 +-2.06673337378947197251 +-2.06690586138433163299 +-2.06707826385847326378 +-2.06725058125469196568 +-2.06742281361570778841 +-2.06759496098416484244 +-2.06776702340263396351 +-2.06793900091361004812 +-2.06811089355951471802 +-2.06828270138269321166 +-2.06845442442541926908 +-2.06862606272989024703 +-2.06879761633823067157 +-2.06896908529248868547 +-2.06914046963464137718 +-2.06931176940659122820 +-2.06948298465016433667 +-2.06965411540711663463 +-2.06982516171912811487 +-2.06999612362780682773 +-2.07016700117468532838 +-2.07033779440122511772 +-2.07050850334881220149 +-2.07067912805876197524 +-2.07084966857231478343 +-2.07102012493063769583 +-2.07119049717482672790 +-2.07136078534590417632 +-2.07153098948481861896 +-2.07170110963244713531 +-2.07187114582959530651 +-2.07204109811699321853 +-2.07221096653529990306 +-2.07238075112510422571 +-2.07255045192692044509 +-2.07272006898119220963 +-2.07288960232828811669 +-2.07305905200850926207 +-2.07322841806208213455 +-2.07339770052916083642 +-2.07356689944983196838 +-2.07373601486410441552 +-2.07390504681192133773 +-2.07407399533314906748 +-2.07424286046758910018 +-2.07441164225496521567 +-2.07458034073493413629 +-2.07474895594708153013 +-2.07491748793091801417 +-2.07508593672588892431 +-2.07525430237136632172 +-2.07542258490664943693 +-2.07559078437096955483 +-2.07575890080348868239 +-2.07592693424329421958 +-2.07609488472940606485 +-2.07626275230077528278 +-2.07643053699627877506 +-2.07659823885472594185 +-2.07676585791485646126 +-2.07693339421533762490 +-2.07710084779477099914 +-2.07726821869168487567 +-2.07743550694453960048 +-2.07760271259172490943 +-2.07776983567156214860 +-2.07793687622230338619 +-2.07810383428212919199 +-2.07827070988915396654 +-2.07843750308142150018 +-2.07860421389690763760 +-2.07877084237351583695 +-2.07893738854908605163 +-2.07910385246138496029 +-2.07927023414811351643 +-2.07943653364690161922 +-2.07960275099531344267 +-2.07976888623084255059 +-2.07993493939091411704 +-2.08010091051288625863 +-2.08026679963404959040 +-2.08043260679162456128 +-2.08059833202276589503 +-2.08076397536455770521 +-2.08092953685401882424 +-2.08109501652810013894 +-2.08126041442368237000 +-2.08142573057758140109 +-2.08159096502654605843 +-2.08175611780725455802 +-2.08192118895632116704 +-2.08208617851029131884 +-2.08225108650564338930 +-2.08241591297878869682 +-2.08258065796607327869 +-2.08274532150377345019 +-2.08290990362810068959 +-2.08307440437520119403 +-2.08323882378115010638 +-2.08340316188196084113 +-2.08356741871357620255 +-2.08373159431187771062 +-2.08389568871267538697 +-2.08405970195171663661 +-2.08422363406468047486 +-2.08438748508718330044 +-2.08455125505477090186 +-2.08471494400292733928 +-2.08487855196706828309 +-2.08504207898254723119 +-2.08520552508464662722 +-2.08536889030858763050 +-2.08553217468952567515 +-2.08569537826255002599 +-2.08585850106268422266 +-2.08602154312488785592 +-2.08618450448405567954 +-2.08634738517501538979 +-2.08651018523253251047 +-2.08667290469130639607 +-2.08683554358597112000 +-2.08699810195109680677 +-2.08716057982119007619 +-2.08732297723069137874 +-2.08748529421397766015 +-2.08764753080536102914 +-2.08780968703909142192 +-2.08797176294935127316 +-2.08813375857026217730 +-2.08829567393588044766 +-2.08845750908019800463 +-2.08861926403714370792 +-2.08878093884058291252 +-2.08894253352431746862 +-2.08910404812208527758 +-2.08926548266755984784 +-2.08942683719435340350 +-2.08958811173601466393 +-2.08974930632602751146 +-2.08991042099781276775 +-2.09007145578473085834 +-2.09023241072007692765 +-2.09039328583708394760 +-2.09055408116892316173 +-2.09071479674870008836 +-2.09087543260946340240 +-2.09103598878419072449 +-2.09119646530580638455 +-2.09135686220716676686 +-2.09151717952106741549 +-2.09167741728024170200 +-2.09183757551736126956 +-2.09199765426503558885 +-2.09215765355581195806 +-2.09231757342217683515 +-2.09247741389655184108 +-2.09263717501130219745 +-2.09279685679872784476 +-2.09295645929106655103 +-2.09311598252049835267 +-2.09327542651913844907 +-2.09343479131904297574 +-2.09359407695220500756 +-2.09375328345055944368 +-2.09391241084597634625 +-2.09407145917026893400 +-2.09423042845518647681 +-2.09438931873241873660 +-2.09454813003359507917 +-2.09470686239028447417 +-2.09486551583399416288 +-2.09502409039617276676 +-2.09518258610820629073 +-2.09534100300142300810 +-2.09549934110708946378 +-2.09565760045641313880 +-2.09581578108054022991 +-2.09597388301055786997 +-2.09613190627749323980 +-2.09628985091231445637 +-2.09644771694592924050 +-2.09660550440918491688 +-2.09676321333287107862 +-2.09692084374771781086 +-2.09707839568439435851 +-2.09723586917351179082 +-2.09739326424562166906 +-2.09755058093121693474 +-2.09770781926073102142 +-2.09786497926453829876 +-2.09802206097295629306 +-2.09817906441624035807 +-2.09833598962458989234 +-2.09849283662814567464 +-2.09864960545698764349 +-2.09880629614114022630 +-2.09896290871056745431 +-2.09911944319517607127 +-2.09927589962481464525 +-2.09943227802927312453 +-2.09958857843828416989 +-2.09974480088152137824 +-2.09990094538860239126 +-2.10005701198908534266 +-2.10021300071247196684 +-2.10036891158820449022 +-2.10052474464567096035 +-2.10068049991419769640 +-2.10083617742305728271 +-2.10099177720146457204 +-2.10114729927857535330 +-2.10130274368348901604 +-2.10145811044524855049 +-2.10161339959284054757 +-2.10176861115519297840 +-2.10192374516117874705 +-2.10207880163961302600 +-2.10223378061925458837 +-2.10238868212880580799 +-2.10254350619691265933 +-2.10269825285216471755 +-2.10285292212309604665 +-2.10300751403818164675 +-2.10316202862584500366 +-2.10331646591444920702 +-2.10347082593230449987 +-2.10362510870766206139 +-2.10377931426872111231 +-2.10393344264362225360 +-2.10408749386045146323 +-2.10424146794723965215 +-2.10439536493196177602 +-2.10454918484253639122 +-2.10470292770682876338 +-2.10485659355264642656 +-2.10501018240774451229 +-2.10516369429982130868 +-2.10531712925652136903 +-2.10547048730543195916 +-2.10562376847408838643 +-2.10577697278997044705 +-2.10593010028050064975 +-2.10608315097305132113 +-2.10623612489493616806 +-2.10638902207341738304 +-2.10654184253570120333 +-2.10669458630894013140 +-2.10684725342023293493 +-2.10699984389662331452 +-2.10715235776510256827 +-2.10730479505260470674 +-2.10745715578601444662 +-2.10760943999215832889 +-2.10776164769781315655 +-2.10791377892969888919 +-2.10806583371448352793 +-2.10821781207878089504 +-2.10836971404915329842 +-2.10852153965210709075 +-2.10867328891409666625 +-2.10882496186152268436 +-2.10897655852073473426 +-2.10912807891802689397 +-2.10927952307964172718 +-2.10943089103176761867 +-2.10958218280054277116 +-2.10973339841204987621 +-2.10988453789232099922 +-2.11003560126733535895 +-2.11018658856301755122 +-2.11033749980524376610 +-2.11048833501983468253 +-2.11063909423255946507 +-2.11078977746913754032 +-2.11094038475523193554 +-2.11109091611645771636 +-2.11124137157837576950 +-2.11139175116649635555 +-2.11154205490627733255 +-2.11169228282312415601 +-2.11184243494239387573 +-2.11199251128938803035 +-2.11214251188935930870 +-2.11229243676750799708 +-2.11244228594898419971 +-2.11259205945888561828 +-2.11274175732225888424 +-2.11289137956410044694 +-2.11304092620935657365 +-2.11319039728291979685 +-2.11333979280963557557 +-2.11348911281429518993 +-2.11363835732164062620 +-2.11378752635636590895 +-2.11393661994310955166 +-2.11408563810646432657 +-2.11423458087096882707 +-2.11438344826111501717 +-2.11453224030134201428 +-2.11468095701604053005 +-2.11482959842955020591 +-2.11497816456616094527 +-2.11512665545011335766 +-2.11527507110559831460 +-2.11542341155675606146 +-2.11557167682767843786 +-2.11571986694240621318 +-2.11586798192493219517 +-2.11601602179919900948 +-2.11616398658910043196 +-2.11631187631848094455 +-2.11645969101113484712 +-2.11660743069081025425 +-2.11675509538120198982 +-2.11690268510595869245 +-2.11705019988868148317 +-2.11719763975291952462 +-2.11734500472217446188 +-2.11749229481990086654 +-2.11763951006950223999 +-2.11778665049433589829 +-2.11793371611771030771 +-2.11808070696288330836 +-2.11822762305306788733 +-2.11837446441142729370 +-2.11852123106107592676 +-2.11866792302508200052 +-2.11881454032646443508 +-2.11896108298819507709 +-2.11910755103319692338 +-2.11925394448434678552 +-2.11940026336447351341 +-2.11954650769635755125 +-2.11969267750273315798 +-2.11983877280628441042 +-2.11998479362965230877 +-2.12013073999542722703 +-2.12027661192615468622 +-2.12042240944433180161 +-2.12056813257240772685 +-2.12071378133278720668 +-2.12085935574782702417 +-2.12100485583983777715 +-2.12115028163108032544 +-2.12129563314377289629 +-2.12144091040008486715 +-2.12158611342214120654 +-2.12173124223201714500 +-2.12187629685174483640 +-2.12202127730330891708 +-2.12216618360864739401 +-2.12231101578965386523 +-2.12245577386817307897 +-2.12260045786600670681 +-2.12274506780490890279 +-2.12288960370658941201 +-2.12303406559271090615 +-2.12317845348488987156 +-2.12332276740469927390 +-2.12346700737366633760 +-2.12361117341327076957 +-2.12375526554494964415 +-2.12389928379009251813 +-2.12404322817004498347 +-2.12418709870610777912 +-2.12433089541953545876 +-2.12447461833153905530 +-2.12461826746328386051 +-2.12476184283588986901 +-2.12490534447043355470 +-2.12504877238794609440 +-2.12519212660941336779 +-2.12533540715577906610 +-2.12547861404794025120 +-2.12562174730675046419 +-2.12576480695301794910 +-2.12590779300750876146 +-2.12605070549094365973 +-2.12619354442399854932 +-2.12633630982730670311 +-2.12647900172145787323 +-2.12662162012699473834 +-2.12676416506442134136 +-2.12690663655419331945 +-2.12704903461672589771 +-2.12719135927238900408 +-2.12733361054151037806 +-2.12747578844437201795 +-2.12761789300121639812 +-2.12775992423223980765 +-2.12790188215759590307 +-2.12804376679739482014 +-2.12818557817170628255 +-2.12832731630055471683 +-2.12846898120392102882 +-2.12861057290174571222 +-2.12875209141392440770 +-2.12889353676031145568 +-2.12903490896071856397 +-2.12917620803491436376 +-2.12931743400262574184 +-2.12945858688353562016 +-2.12959966669728739674 +-2.12974067346347917251 +-2.12988160720166996853 +-2.13002246793137395287 +-2.13016325567206576963 +-2.13030397044317654220 +-2.13044461226409520549 +-2.13058518115417117045 +-2.13072567713270943912 +-2.13086610021897637779 +-2.13100645043219394381 +-2.13114672779154323834 +-2.13128693231616628267 +-2.13142706402516157738 +-2.13156712293758587862 +-2.13170710907245686272 +-2.13184702244874868526 +-2.13198686308539775425 +-2.13212663100129651284 +-2.13226632621529788025 +-2.13240594874621258725 +-2.13254549861281361700 +-2.13268497583382954375 +-2.13282438042795208233 +-2.13296371241382853867 +-2.13310297181006935929 +-2.13324215863524235814 +-2.13338127290787671342 +-2.13352031464645852665 +-2.13365928386943703998 +-2.13379818059522019524 +-2.13393700484217463398 +-2.13407575662862969423 +-2.13421443597287208149 +-2.13435304289315030957 +-2.13449157740767336833 +-2.13463003953460850326 +-2.13476842929208698862 +-2.13490674669819657794 +-2.13504499177098905349 +-2.13518316452847489728 +-2.13532126498862551145 +-2.13545929316937321829 +-2.13559724908861170434 +-2.13573513276419557627 +-2.13587294421393902866 +-2.13601068345561850848 +-2.13614835050697271512 +-2.13628594538569860362 +-2.13642346810945715774 +-2.13656091869586850507 +-2.13669829716251680196 +-2.13683560352694534856 +-2.13697283780666102970 +-2.13711000001912987400 +-2.13724709018178193887 +-2.13738410831200731366 +-2.13752105442715967243 +-2.13765792854455360938 +-2.13779473068146552706 +-2.13793146085513496857 +-2.13806811908276150902 +-2.13820470538151008455 +-2.13834121976850388691 +-2.13847766226083280117 +-2.13861403287554585617 +-2.13875033162965655364 +-2.13888655854013931545 +-2.13902271362393348042 +-2.13915879689793797525 +-2.13929480837901708767 +-2.13943074808399735787 +-2.13956661602966802249 +-2.13970241223277968245 +-2.13983813671005007606 +-2.13997378947815608541 +-2.14010937055373862137 +-2.14024487995340439994 +-2.14038031769372061319 +-2.14051568379121848196 +-2.14065097826239547629 +-2.14078620112370687778 +-2.14092135239157688176 +-2.14105643208239149189 +-2.14119144021249985244 +-2.14132637679821602461 +-2.14146124185581676613 +-2.14159603540154508394 +-2.14173075745160579331 +-2.14186540802216773827 +-2.14199998712936556799 +-2.14213449478929707226 +-2.14226893101802540187 +-2.14240329583157640414 +-2.14253758924594217561 +-2.14267181127707750932 +-2.14280596194090389162 +-2.14294004125330639354 +-2.14307404923013367082 +-2.14320798588720151656 +-2.14334185124028842040 +-2.14347564530514089753 +-2.14360936809746682741 +-2.14374301963294078277 +-2.14387659992720358559 +-2.14401010899585964253 +-2.14414354685447827720 +-2.14427691351859639468 +-2.14441020900371537294 +-2.14454343332530106281 +-2.14467658649878645249 +-2.14480966853956811491 +-2.14494267946301109262 +-2.14507561928444356880 +-2.14520848801916130810 +-2.14534128568242543622 +-2.14547401228946243990 +-2.14560666785546549917 +-2.14573925239559581968 +-2.14587176592497641536 +-2.14600420845870010211 +-2.14613658001182594504 +-2.14626888059937659392 +-2.14640111023634405640 +-2.14653326893768614525 +-2.14666535671832470200 +-2.14679737359315403467 +-2.14692931957702937140 +-2.14706119468477485412 +-2.14719299893118398259 +-2.14732473233101250898 +-2.14745639489898554331 +-2.14758798664979755344 +-2.14771950759810703602 +-2.14785095775853873690 +-2.14798233714568942432 +-2.14811364577411900711 +-2.14824488365835586379 +-2.14837605081289773068 +-2.14850714725220637291 +-2.14863817299071424571 +-2.14876912804282049763 +-2.14890001242289230277 +-2.14903082614526352856 +-2.14916156922423740028 +-2.14929224167408428059 +-2.14942284350904255774 +-2.14955337474331908965 +-2.14968383539108875979 +-2.14981422546649492133 +-2.14994454498364895301 +-2.15007479395663025912 +-2.15020497239948760182 +-2.15033508032623688067 +-2.15046511775086468532 +-2.15059508468732341058 +-2.15072498114953658543 +-2.15085480715139576446 +-2.15098456270676097191 +-2.15111424782946158984 +-2.15124386253329547003 +-2.15137340683202982206 +-2.15150288073940165745 +-2.15163228426911556923 +-2.15176161743484728461 +-2.15189088025023966821 +-2.15202007272890716294 +-2.15214919488443179318 +-2.15227824673036716163 +-2.15240722828023356428 +-2.15253613954752420767 +-2.15266498054569899168 +-2.15279375128818983853 +-2.15292245178839714015 +-2.15305108205969375490 +-2.15317964211541656994 +-2.15330813196888071204 +-2.15343655163336489267 +-2.15356490112211984567 +-2.15369318044836877135 +-2.15382138962530067516 +-2.15394952866608058173 +-2.15407759758383932081 +-2.15420559639168107680 +-2.15433352510267717150 +-2.15446138372987405774 +-2.15458917228628532570 +-2.15471689078489792024 +-2.15484453923866814407 +-2.15497211766052298998 +-2.15509962606335925273 +-2.15522706446004930214 +-2.15535443286343220137 +-2.15548173128631992412 +-2.15560895974149557830 +-2.15573611824171251783 +-2.15586320679969656311 +-2.15599022542814555692 +-2.15611717413972714397 +-2.15624405294708276770 +-2.15637086186282189715 +-2.15649760089952957642 +-2.15662427006976020749 +-2.15675086938604154696 +-2.15687739886087115337 +-2.15700385850672038401 +-2.15713024833603261854 +-2.15725656836122148263 +-2.15738281859467484480 +-2.15750899904875170776 +-2.15763510973578398477 +-2.15776115066807472331 +-2.15788712185789943732 +-2.15801302331750965990 +-2.15813885505912361751 +-2.15826461709493688801 +-2.15839030943711485122 +-2.15851593209779757387 +-2.15864148508909625690 +-2.15876696842309634405 +-2.15889238211185574556 +-2.15901772616740439403 +-2.15914300060174690898 +-2.15926820542685948823 +-2.15939334065469257240 +-2.15951840629716995679 +-2.15964340236618657087 +-2.15976832887361425151 +-2.15989318583129685791 +-2.16001797325104982761 +-2.16014269114466328503 +-2.16026733952390204152 +-2.16039191840050470717 +-2.16051642778618235852 +-2.16064086769261987087 +-2.16076523813147680642 +-2.16088953911438608202 +-2.16101377065295574553 +-2.16113793275876586719 +-2.16126202544337342459 +-2.16138604871830608545 +-2.16151000259506975709 +-2.16163388708514148107 +-2.16175770219997387400 +-2.16188144795099379536 +-2.16200512434960367969 +-2.16212873140717931619 +-2.16225226913507073689 +-2.16237573754460488118 +-2.16249913664708071082 +-2.16262246645377453902 +-2.16274572697593558956 +-2.16286891822478910541 +-2.16299204021153412825 +-2.16311509294734705122 +-2.16323807644337806622 +-2.16336099071075205202 +-2.16348383576056901845 +-2.16360661160390632674 +-2.16372931825181513688 +-2.16385195571532173986 +-2.16397452400542977813 +-2.16409702313311669286 +-2.16421945310933550033 +-2.16434181394501612417 +-2.16446410565106361901 +-2.16458632823835994685 +-2.16470848171776042435 +-2.16483056610009905185 +-2.16495258139618451665 +-2.16507452761680152520 +-2.16519640477271213541 +-2.16531821287465264803 +-2.16543995193333715932 +-2.16556162195945578475 +-2.16568322296367465896 +-2.16580475495663682395 +-2.16592621794896222909 +-2.16604761195124595474 +-2.16616893697406043273 +-2.16629019302795500224 +-2.16641138012345768615 +-2.16653249827106941794 +-2.16665354748127025886 +-2.16677452776451762162 +-2.16689543913124449404 +-2.16701628159186299172 +-2.16713705515676080537 +-2.16725775983630164490 +-2.16737839564083056842 +-2.16749896258066510057 +-2.16761946066610411421 +-2.16773988990742116911 +-2.16786025031486984105 +-2.16798054189867794861 +-2.16810076466905510273 +-2.16822091863618426899 +-2.16834100381023064941 +-2.16846102020133235655 +-2.16858096781960973942 +-2.16870084667515961030 +-2.16882065677805480064 +-2.16894039813834904606 +-2.16906007076607343365 +-2.16917967467123551373 +-2.16929920986382285264 +-2.16941867635380214452 +-2.16953807415111477042 +-2.16965740326568656826 +-2.16977666370741495427 +-2.16989585548618046928 +-2.17001497861184144966 +-2.17013403309423402732 +-2.17025301894317301787 +-2.17037193616845369704 +-2.17049078477984780378 +-2.17060956478710842532 +-2.17072827619996511217 +-2.17084691902812831898 +-2.17096549328128762824 +-2.17108399896911041793 +-2.17120243610124408207 +-2.17132080468731558653 +-2.17143910473693102503 +-2.17155733625967517497 +-2.17167549926511327385 +-2.17179359376278968696 +-2.17191161976222790742 +-2.17202957727293277657 +-2.17214746630438515496 +-2.17226528686605080409 +-2.17238303896737061649 +-2.17250072261776727700 +-2.17261833782664481873 +-2.17273588460338551442 +-2.17285336295735032053 +-2.17297077289788509447 +-2.17308811443430949240 +-2.17320538757592940371 +-2.17332259233202629289 +-2.17343972871186652540 +-2.17355679672469115360 +-2.17367379637972835127 +-2.17379072768618053502 +-2.17390759065323502242 +-2.17402438529005825885 +-2.17414111160579759385 +-2.17425776960957994888 +-2.17437435931051536997 +-2.17449088071769303099 +-2.17460733384018389813 +-2.17472371868703939768 +-2.17484003526729230416 +-2.17495628358995585216 +-2.17507246366402684501 +-2.17518857549848032562 +-2.17530461910227401745 +-2.17542059448434610403 +-2.17553650165361789348 +-2.17565234061899159812 +-2.17576811138935033441 +-2.17588381397355767888 +-2.17599944838046210904 +-2.17611501461889123021 +-2.17623051269765399596 +-2.17634594262554514899 +-2.17646130441133456301 +-2.17657659806378234180 +-2.17669182359162327600 +-2.17680698100357750135 +-2.17692207030834739001 +-2.17703709151461755056 +-2.17715204463105305166 +-2.17726692966630386294 +-2.17738174662900085821 +-2.17749649552775670358 +-2.17761117637116718981 +-2.17772578916781123226 +-2.17784033392624998271 +-2.17795481065502682938 +-2.17806921936266828510 +-2.17818356005768265504 +-2.17829783274856181308 +-2.17841203744378120177 +-2.17852617415179850013 +-2.17864024288105406768 +-2.17875424363997183264 +-2.17886817643695884783 +-2.17898204128040395844 +-2.17909583817868091060 +-2.17920956714014790734 +-2.17932322817314183538 +-2.17943682128598759107 +-2.17955034648699186306 +-2.17966380378444357646 +-2.17977719318661788961 +-2.17989051470177130909 +-2.18000376833814524247 +-2.18011695410396422190 +-2.18023007200743634826 +-2.18034312205675462337 +-2.18045610426009606186 +-2.18056901862561725025 +-2.18068186516146722553 +-2.18079464387577148798 +-2.18090735477664265929 +-2.18101999787217781801 +-2.18113257317045894368 +-2.18124508067954936408 +-2.18135752040749819614 +-2.18146989236234167819 +-2.18158219655209739685 +-2.18169443298476695148 +-2.18180660166834083924 +-2.18191870261078690874 +-2.18203073582006501496 +-2.18214270130411680526 +-2.18225459907086660749 +-2.18236642912822853546 +-2.18247819148409627488 +-2.18258988614635240921 +-2.18270151312286264655 +-2.18281307242147892822 +-2.18292456405003632014 +-2.18303598801635878601 +-2.18314734432824986143 +-2.18325863299350508839 +-2.18336985401990046896 +-2.18348100741519823842 +-2.18359209318714819759 +-2.18370311134348460413 +-2.18381406189192617262 +-2.18392494484017829492 +-2.18403576019593215207 +-2.18414650796686382606 +-2.18425718816063652028 +-2.18436780078489922730 +-2.18447834584728539653 +-2.18458882335541515474 +-2.18469923331689530599 +-2.18480957573931799942 +-2.18491985063026206149 +-2.18503005799729210779 +-2.18514019784795987533 +-2.18525027018980155802 +-2.18536027503034135933 +-2.18547021237708971597 +-2.18558008223754285382 +-2.18568988461918323196 +-2.18579961952948220727 +-2.18590928697589514940 +-2.18601888696586499350 +-2.18612841950682268433 +-2.18623788460618317941 +-2.18634728227135122225 +-2.18645661250971690137 +-2.18656587532865698265 +-2.18667507073553668562 +-2.18678419873770746307 +-2.18689325934250655692 +-2.18700225255726188323 +-2.18711117838928492674 +-2.18722003684587651406 +-2.18732882793432414914 +-2.18743755166190334549 +-2.18754620803587629396 +-2.18765479706349275091 +-2.18776331875199092636 +-2.18787177310859703994 +-2.18798016014052132405 +-2.18808847985496646160 +-2.18819673225912003645 +-2.18830491736015897430 +-2.18841303516524732231 +-2.18852108568153713719 +-2.18862906891616804117 +-2.18873698487626855425 +-2.18884483356895520600 +-2.18895261500133253563 +-2.18906032918049220370 +-2.18916797611351654496 +-2.18927555580747323916 +-2.18938306826942197247 +-2.18949051350640688796 +-2.18959789152546280278 +-2.18970520233361432005 +-2.18981244593787094388 +-2.18991962234523374065 +-2.19002673156269311860 +-2.19013377359722483106 +-2.19024074845579663773 +-2.19034765614536297562 +-2.19045449667286939999 +-2.19056127004524858748 +-2.19066797626942166843 +-2.19077461535230222367 +-2.19088118730078962315 +-2.19098769212177302279 +-2.19109412982213180854 +-2.19120050040873426411 +-2.19130680388843801509 +-2.19141304026808958483 +-2.19151920955452483852 +-2.19162531175457031551 +-2.19173134687504100881 +-2.19183731492274214148 +-2.19194321590446872250 +-2.19204904982700377047 +-2.19215481669712231039 +-2.19226051652158826499 +-2.19236614930715534300 +-2.19247171506056570678 +-2.19257721378855485739 +-2.19268264549784541728 +-2.19278801019515112714 +-2.19289330788717595766 +-2.19299853858061366552 +-2.19310370228214868149 +-2.19320879899845522232 +-2.19331382873619773477 +-2.19341879150203222792 +-2.19352368730260494090 +-2.19362851614454967830 +-2.19373327803449447160 +-2.19383797297905669410 +-2.19394260098484394916 +-2.19404716205845407018 +-2.19415165620647689693 +-2.19425608343549249923 +-2.19436044375207206514 +-2.19446473716277790089 +-2.19456896367416076643 +-2.19467312329276564853 +-2.19477721602512820809 +-2.19488124187777255969 +-2.19498520085721837702 +-2.19508909296997023475 +-2.19519291822253048707 +-2.19529667662138994189 +-2.19540036817302919303 +-2.19550399288392172892 +-2.19560755076053482071 +-2.19571104180932374916 +-2.19581446603673580142 +-2.19591782344921249148 +-2.19602111405318467519 +-2.19612433785507432660 +-2.19622749486129720253 +-2.19633058507826062211 +-2.19643360851236169040 +-2.19653656516999262749 +-2.19663945505753410714 +-2.19674227818136280632 +-2.19684503454784341159 +-2.19694772416333528042 +-2.19705034703418933262 +-2.19715290316674893845 +-2.19725539256734858640 +-2.19735781524231654771 +-2.19746017119797310002 +-2.19756246044063052736 +-2.19766468297659400832 +-2.19776683881216028382 +-2.19786892795361943342 +-2.19797095040725531945 +-2.19807290617934159016 +-2.19817479527614834112 +-2.19827661770393500973 +-2.19837837346895526025 +-2.19848006257745565151 +-2.19858168503567696916 +-2.19868324084985067302 +-2.19878473002620156151 +-2.19888615257094910405 +-2.19898750849030522048 +-2.19908879779047383707 +-2.19919002047765310692 +-2.19929117655803540998 +-2.19939226603780468849 +-2.19949328892313866746 +-2.19959424522020885462 +-2.19969513493518187275 +-2.19979595807421413056 +-2.19989671464345803997 +-2.19999740464906023973 +-2.20009802809715848682 +-2.20019858499388742956 +-2.20029907534537239044 +-2.20039949915773469513 +-2.20049985643708945204 +-2.20060014718954377599 +-2.20070037142120078499 +-2.20080052913815693572 +-2.20090062034650202349 +-2.20100064505232095868 +-2.20110060326169287848 +-2.20120049498068892646 +-2.20130032021537891396 +-2.20140007897182199414 +-2.20149977125607554385 +-2.20159939707418805810 +-2.20169895643220581150 +-2.20179844933616797320 +-2.20189787579210660695 +-2.20199723580605200013 +-2.20209652938402511424 +-2.20219575653204602261 +-2.20229491725612458453 +-2.20239401156226977108 +-2.20249303945648211567 +-2.20259200094475993126 +-2.20269089603309398129 +-2.20278972472747192057 +-2.20288848703387429850 +-2.20298718295827988811 +-2.20308581250665946882 +-2.20318437568497982326 +-2.20328287249920551361 +-2.20338130295529133207 +-2.20347966705919251496 +-2.20357796481685674905 +-2.20367619623422816844 +-2.20377436131724557811 +-2.20387246007184334218 +-2.20397049250395227205 +-2.20406845861949829413 +-2.20416635842440289395 +-2.20426419192458400431 +-2.20436195912595422897 +-2.20445966003442217485 +-2.20455729465589200800 +-2.20465486299626522992 +-2.20475236506143890125 +-2.20484980085730386534 +-2.20494717038974918921 +-2.20504447366465994307 +-2.20514171068791631214 +-2.20523888146539492894 +-2.20533598600297020553 +-2.20543302430651033674 +-2.20552999638188085285 +-2.20562690223494461961 +-2.20572374187155961778 +-2.20582051529758071950 +-2.20591722251885968831 +-2.20601386354124384681 +-2.20611043837057829720 +-2.20620694701270414484 +-2.20630338947345805423 +-2.20639976575867624575 +-2.20649607587419005483 +-2.20659231982582682008 +-2.20668849761941165966 +-2.20678460926076613902 +-2.20688065475571093543 +-2.20697663411006095302 +-2.20707254732962931953 +-2.20716839442022561002 +-2.20726417538765717907 +-2.20735989023772960493 +-2.20745553897624402495 +-2.20755112160899891194 +-2.20764663814179140644 +-2.20774208858041509629 +-2.20783747293066046069 +-2.20793279119831620250 +-2.20802804338916969229 +-2.20812322950900341567 +-2.20821834956359897006 +-2.20831340355873617654 +-2.20840839150019041526 +-2.20850331339373706641 +-2.20859816924514795744 +-2.20869295906019269538 +-2.20878768284464044314 +-2.20888234060425547867 +-2.20897693234480296809 +-2.20907145807204408072 +-2.20916591779173998589 +-2.20926031150964741201 +-2.20935463923152264343 +-2.20944890096312063221 +-2.20954309671019366590 +-2.20963722647849225567 +-2.20973129027376735678 +-2.20982528810176459544 +-2.20991921996823181829 +-2.21001308587891243107 +-2.21010688583954939546 +-2.21020061985588611719 +-2.21029428793366111705 +-2.21038789007861247171 +-2.21048142629648047830 +-2.21057489659300010487 +-2.21066830097390543131 +-2.21076163944493275793 +-2.21085491201181305598 +-2.21094811868027907309 +-2.21104125945606133641 +-2.21113433434488859675 +-2.21122734335249093718 +-2.21132028648459622033 +-2.21141316374693008839 +-2.21150597514521995990 +-2.21159872068519192112 +-2.21169140037256939380 +-2.21178401421307668784 +-2.21187656221243722499 +-2.21196904437637442697 +-2.21206146071060993918 +-2.21215381122086540699 +-2.21224609591286247579 +-2.21233831479232323503 +-2.21243046786496577738 +-2.21252255513651219232 +-2.21261457661268101660 +-2.21270653229919300742 +-2.21279842220176758971 +-2.21289024632612374432 +-2.21298200467798089619 +-2.21307369726305669388 +-2.21316532408707233870 +-2.21325688515574725557 +-2.21334838047479776080 +-2.21343981004994594386 +-2.21353117388690989742 +-2.21362247199141037868 +-2.21371370436916636848 +-2.21380487102589817994 +-2.21389597196732657025 +-2.21398700719917274071 +-2.21407797672715744852 +-2.21416888055700189497 +-2.21425971869442905771 +-2.21435049114516147029 +-2.21444119791492388671 +-2.21453183900943839646 +-2.21462241443442930944 +-2.21471292419562493237 +-2.21480336829874868698 +-2.21489374674952799182 +-2.21498405955369159770 +-2.21507430671696647906 +-2.21516448824508405124 +-2.21525460414377395324 +-2.21534465441876760039 +-2.21543463907579862848 +-2.21552455812059934104 +-2.21561441155890515020 +-2.21570419939645280039 +-2.21579392163897814783 +-2.21588357829222060147 +-2.21597316936192001435 +-2.21606269485381801587 +-2.21615215477365623542 +-2.21624154912717852284 +-2.21633087792013183659 +-2.21642014115826135878 +-2.21650933884731671242 +-2.21659847099304752049 +-2.21668753760120695873 +-2.21677653867754642647 +-2.21686547422782265215 +-2.21695434425779280829 +-2.21704314877321451149 +-2.21713188777984893107 +-2.21722056128345945680 +-2.21730916928980903435 +-2.21739771180466505029 +-2.21748618883379622346 +-2.21757460038297349314 +-2.21766294645796824270 +-2.21775122706455629640 +-2.21783944220851303442 +-2.21792759189562005417 +-2.21801567613165717674 +-2.21810369492240866407 +-2.21819164827366144266 +-2.21827953619120243900 +-2.21836735868082479683 +-2.21845511574831943946 +-2.21854280739948439560 +-2.21863043364011769398 +-2.21871799447601958377 +-2.21880548991299475503 +-2.21889291995684967418 +-2.21898028461339347217 +-2.21906758388843705632 +-2.21915481778779621891 +-2.21924198631728852860 +-2.21932908948273466265 +-2.21941612728995618653 +-2.21950309974478221520 +-2.21959000685303964318 +-2.21967684862056335859 +-2.21976362505318647322 +-2.21985033615674964835 +-2.21993698193709265709 +-2.22002356240006148980 +-2.22011007755150480136 +-2.22019652739727391122 +-2.22028291194322369151 +-2.22036923119521167891 +-2.22045548515910029508 +-2.22054167384075462621 +-2.22062779724604286713 +-2.22071385538083765354 +-2.22079984825101339752 +-2.22088577586245117246 +-2.22097163822103293995 +-2.22105743533264554657 +-2.22114316720317939158 +-2.22122883383852887107 +-2.22131443524459148975 +-2.22139997142726786095 +-2.22148544239246659160 +-2.22157084814609540047 +-2.22165618869406733538 +-2.22174146404230166141 +-2.22182667419671897591 +-2.22191181916324476120 +-2.22199689894780982868 +-2.22208191355634721020 +-2.22216686299479615485 +-2.22225174726909768808 +-2.22233656638520082893 +-2.22242132034905370830 +-2.22250600916661378292 +-2.22259063284384028591 +-2.22267519138669733536 +-2.22275968480115437842 +-2.22284411309318352679 +-2.22292847626876355349 +-2.22301277433387678428 +-2.22309700729450909762 +-2.22318117515665436557 +-2.22326527792630734837 +-2.22334931560946991169 +-2.22343328821214658575 +-2.22351719574035078253 +-2.22360103820009635811 +-2.22368481559740427400 +-2.22376852793829993260 +-2.22385217522881362129 +-2.22393575747498184469 +-2.22401927468284377198 +-2.22410272685844656593 +-2.22418611400784049792 +-2.22426943613708072434 +-2.22435269325222861880 +-2.22443588535935177219 +-2.22451901246452088401 +-2.22460207457381331508 +-2.22468507169331131124 +-2.22476800382910333553 +-2.22485087098728229194 +-2.22493367317394596938 +-2.22501641039520103860 +-2.22509908265715417031 +-2.22518168996592313746 +-2.22526423232762793347 +-2.22534670974839521307 +-2.22542912223435829233 +-2.22551146979165448414 +-2.22559375242642820680 +-2.22567597014482965179 +-2.22575812295301211918 +-2.22584021085714001131 +-2.22592223386337861868 +-2.22600419197790300174 +-2.22608608520689177368 +-2.22616791355652976492 +-2.22624967703300935540 +-2.22633137564252825413 +-2.22641300939129038738 +-2.22649457828550456640 +-2.22657608233138804010 +-2.22665752153516249834 +-2.22673889590305806863 +-2.22682020544130887529 +-2.22690145015615659219 +-2.22698263005384911040 +-2.22706374514064142645 +-2.22714479542279386592 +-2.22722578090657252758 +-2.22730670159825372423 +-2.22738755750411643319 +-2.22746834863044851360 +-2.22754907498354315365 +-2.22762973656970242331 +-2.22771033339523150119 +-2.22779086546644622402 +-2.22787133278966642536 +-2.22795173537122037644 +-2.22803207321744300984 +-2.22811234633467503130 +-2.22819255472926514017 +-2.22827269840756914121 +-2.22835277737594950054 +-2.22843279164077623378 +-2.22851274120842646198 +-2.22859262608528219118 +-2.22867244627773564147 +-2.22875220179218569427 +-2.22883189263503789235 +-2.22891151881270310753 +-2.22899108033160375797 +-2.22907057719816581454 +-2.22915000941882546215 +-2.22922937700002421479 +-2.22930867994821158007 +-2.22938791826984550326 +-2.22946709197139103509 +-2.22954620105931944352 +-2.22962524554011132238 +-2.22970422542025437096 +-2.22978314070624428211 +-2.22986199140458385415 +-2.22994077752178387897 +-2.23001949906436269799 +-2.23009815603884709034 +-2.23017674845177138465 +-2.23025527630967701498 +-2.23033373961911385308 +-2.23041213838664154068 +-2.23049047261882549265 +-2.23056874232223822929 +-2.23064694750346426133 +-2.23072508816909209628 +-2.23080316432572089980 +-2.23088117597995694297 +-2.23095912313841493457 +-2.23103700580771802109 +-2.23111482399449778669 +-2.23119257770539292096 +-2.23127026694705232757 +-2.23134789172613112740 +-2.23142545204929554359 +-2.23150294792321712833 +-2.23158037935457853607 +-2.23165774635006997073 +-2.23173504891639096215 +-2.23181228706024592512 +-2.23188946078835348530 +-2.23196657010743670924 +-2.23204361502423020980 +-2.23212059554547614937 +-2.23219751167792246349 +-2.23227436342833218674 +-2.23235115080347146232 +-2.23242787381011753567 +-2.23250453245505831035 +-2.23258112674508701900 +-2.23265765668700888469 +-2.23273412228763579179 +-2.23281052355379072694 +-2.23288686049230467034 +-2.23296313311001703994 +-2.23303934141377746769 +-2.23311548541044535554 +-2.23319156510688721085 +-2.23326758050997975502 +-2.23334353162661081171 +-2.23341941846367486590 +-2.23349524102807661663 +-2.23357099932673053289 +-2.23364669336655996545 +-2.23372232315449759099 +-2.23379788869748630020 +-2.23387339000247875376 +-2.23394882707643471775 +-2.23402419992632683687 +-2.23409950855913574941 +-2.23417475298185008725 +-2.23424993320147269316 +-2.23432504922500951849 +-2.23440010105948339003 +-2.23447508871192113133 +-2.23455001218936244456 +-2.23462487149885591364 +-2.23469966664746166884 +-2.23477439764224650176 +-2.23484906449028919440 +-2.23492366719867785463 +-2.23499820577451213666 +-2.23507268022490013237 +-2.23514709055695925954 +-2.23522143677781892634 +-2.23529571889461786682 +-2.23536993691450414090 +-2.23544409084463824300 +-2.23551818069218777296 +-2.23559220646433320923 +-2.23566616816826435610 +-2.23574006581118212011 +-2.23581389940029362506 +-2.23588766894282420239 +-2.23596137444600229216 +-2.23603501591707054530 +-2.23610859336328005043 +-2.23618210679189477474 +-2.23625555621018801133 +-2.23632894162544237915 +-2.23640226304495381981 +-2.23647552047602538039 +-2.23654871392597387469 +-2.23662184340212633060 +-2.23669490891181865777 +-2.23676791046240008853 +-2.23684084806122784883 +-2.23691372171567248728 +-2.23698653143311343428 +-2.23705927722094299881 +-2.23713195908656237165 +-2.23720457703738517807 +-2.23727713108083614557 +-2.23734962122434932752 +-2.23742204747537121179 +-2.23749440984135938848 +-2.23756670832978210584 +-2.23763894294811827024 +-2.23771111370386011075 +-2.23778322060450696185 +-2.23785526365757414524 +-2.23792724287058408805 +-2.23799915825107476053 +-2.23807100980659123834 +-2.23814279754469236394 +-2.23821452147294852608 +-2.23828618159893988349 +-2.23835777793025991755 +-2.23842931047451099147 +-2.23850077923931056745 +-2.23857218423228498949 +-2.23864352546107392428 +-2.23871480293332547618 +-2.23878601665670284859 +-2.23885716663887945899 +-2.23892825288754027113 +-2.23899927541038357148 +-2.23907023421511608419 +-2.23914112930945918833 +-2.23921196070114669752 +-2.23928272839792041893 +-2.23935343240753770289 +-2.23942407273776478149 +-2.23949464939638387406 +-2.23956516239118563760 +-2.23963561172997449589 +-2.23970599742056508674 +-2.23977631947078625885 +-2.23984657788847751902 +-2.23991677268149214086 +-2.23998690385769272382 +-2.24005697142495607821 +-2.24012697539117144885 +-2.24019691576423918278 +-2.24026679255207294972 +-2.24033660576259707753 +-2.24040635540375010493 +-2.24047604148348122877 +-2.24054566400975385676 +-2.24061522299054294294 +-2.24068471843383454356 +-2.24075415034762981392 +-2.24082351873994012337 +-2.24089282361879016392 +-2.24096206499221706210 +-2.24103124286827171119 +-2.24110035725501477444 +-2.24116940816052379049 +-2.24123839559288562384 +-2.24130731956020001761 +-2.24137618007058048164 +-2.24144497713215384849 +-2.24151371075305760883 +-2.24158238094144435237 +-2.24165098770547821516 +-2.24171953105333709999 +-2.24178801099321001189 +-2.24185642753330105492 +-2.24192478068182543538 +-2.24199307044701345859 +-2.24206129683710653211 +-2.24212945986035894208 +-2.24219755952504007368 +-2.24226559583943130249 +-2.24233356881182599452 +-2.24240147845053261477 +-2.24246932476387250688 +-2.24253710776017767259 +-2.24260482744779743314 +-2.24267248383509087972 +-2.24274007693043264666 +-2.24280760674220935869 +-2.24287507327882140729 +-2.24294247654868295072 +-2.24300981656022146993 +-2.24307709332187732443 +-2.24314430684210375233 +-2.24321145712937042305 +-2.24327854419215677595 +-2.24334556803895868171 +-2.24341252867828311324 +-2.24347942611865303064 +-2.24354626036860382854 +-2.24361303143668555649 +-2.24367973933145847809 +-2.24374638406150239689 +-2.24381296563540422184 +-2.24387948406177084593 +-2.24394593934921893208 +-2.24401233150638113045 +-2.24407866054190074934 +-2.24414492646444019286 +-2.24421112928266985875 +-2.24427726900527924059 +-2.24434334564096893416 +-2.24440935919845374613 +-2.24447530968646358218 +-2.24454119711374078250 +-2.24460702148904278630 +-2.24467278282114168775 +-2.24473848111882334777 +-2.24480411639088606179 +-2.24486968864614455654 +-2.24493519789342688142 +-2.24500064414157485260 +-2.24506602739944582936 +-2.24513134767590960550 +-2.24519660497985196201 +-2.24526179932017200258 +-2.24532693070578437400 +-2.24539199914561571347 +-2.24545700464860997769 +-2.24552194722372355784 +-2.24558682687992883231 +-2.24565164362621016991 +-2.24571639747156925893 +-2.24578108842502111031 +-2.24584571649559494588 +-2.24591028169233508649 +-2.24597478402430095201 +-2.24603922350056484092 +-2.24610360013021681524 +-2.24616791392235715108 +-2.24623216488610566444 +-2.24629635303059371765 +-2.24636047836496821617 +-2.24642454089839072040 +-2.24648854064003966613 +-2.24655247759910503547 +-2.24661635178479413000 +-2.24668016320632801808 +-2.24674391187294286709 +-2.24680759779389038755 +-2.24687122097843561264 +-2.24693478143586178319 +-2.24699827917546368639 +-2.24706171420655342885 +-2.24712508653845599582 +-2.24718839618051458018 +-2.24725164314208525340 +-2.24731482743253918599 +-2.24737794906126486794 +-2.24744100803766277963 +-2.24750400437115116503 +-2.24756693807116336714 +-2.24762980914714693981 +-2.24769261760856453591 +-2.24775536346489479556 +-2.24781804672563234604 +-2.24788066740028602553 +-2.24794322549838110348 +-2.24800572102945706021 +-2.24806815400307025143 +-2.24813052442879168780 +-2.24819283231620747898 +-2.24825507767491972189 +-2.24831726051454783288 +-2.24837938084472321876 +-2.24844143867509504986 +-2.24850343401532848375 +-2.24856536687510333294 +-2.24862723726411539715 +-2.24868904519207690740 +-2.24875079066871386146 +-2.24881247370377090888 +-2.24887409430700513369 +-2.24893565248819182756 +-2.24899714825712271349 +-2.24905858162360194896 +-2.24911995259745234321 +-2.24918126118851269268 +-2.24924250740663644876 +-2.24930369126169349414 +-2.24936481276356881054 +-2.24942587192216558734 +-2.24948686874740166886 +-2.24954780324920955437 +-2.24960867543754039488 +-2.24966948532236044045 +-2.24973023291365059606 +-2.24979091822140953028 +-2.24985154125565189887 +-2.24991210202640790072 +-2.24997260054372505422 +-2.25003303681766686495 +-2.25009341085831060525 +-2.25015372267575308740 +-2.25021397228010622271 +-2.25027415968149835379 +-2.25033428489007247819 +-2.25039434791598980112 +-2.25045434876942973546 +-2.25051428746058235220 +-2.25057416399966081499 +-2.25063397839688983382 +-2.25069373066251365856 +-2.25075342080679074996 +-2.25081304883999777644 +-2.25087261477242739360 +-2.25093211861438691201 +-2.25099156037620407034 +-2.25105094006822037400 +-2.25111025770079509201 +-2.25116951328430348056 +-2.25122870682913855944 +-2.25128783834570800337 +-2.25134690784443858291 +-2.25140591533577305583 +-2.25146486083016972302 +-2.25152374433810509302 +-2.25158256587007121752 +-2.25164132543657879992 +-2.25170002304815364269 +-2.25175865871534020002 +-2.25181723244869802514 +-2.25187574425880443485 +-2.25193419415625362134 +-2.25199258215165665220 +-2.25205090825564147039 +-2.25210917247885378245 +-2.25216737483195572622 +-2.25222551532562631493 +-2.25228359397056143720 +-2.25234161077747652158 +-2.25239956575709943110 +-2.25245745892017890100 +-2.25251529027748054190 +-2.25257305983978506347 +-2.25263076761789315938 +-2.25268841362262062233 +-2.25274599786480056451 +-2.25280352035528474985 +-2.25286098110494092950 +-2.25291838012465595042 +-2.25297571742533131456 +-2.25303299301788806375 +-2.25309020691326322705 +-2.25314735912241248528 +-2.25320444965630839462 +-2.25326147852594083076 +-2.25331844574231610068 +-2.25337535131646093944 +-2.25343219525941629300 +-2.25348897758224220311 +-2.25354569829601736330 +-2.25360235741183512204 +-2.25365895494080925587 +-2.25371549089406952859 +-2.25377196528276346754 +-2.25382837811805725181 +-2.25388472941113349179 +-2.25394101917319300554 +-2.25399724741545481876 +-2.25405341414915438847 +-2.25410951938554759977 +-2.25416556313590410454 +-2.25422154541151442686 +-2.25427746622368596618 +-2.25433332558374299737 +-2.25438912350303066745 +-2.25444485999290833433 +-2.25450053506475578402 +-2.25455614872996923381 +-2.25461170099996266458 +-2.25466719188617004122 +-2.25472262140004131581 +-2.25477798955304553630 +-2.25483329635666862600 +-2.25488854182241649227 +-2.25494372596181058555 +-2.25499884878639145214 +-2.25505391030771917826 +-2.25510891053737028145 +-2.25516384948694037504 +-2.25521872716804150372 +-2.25527354359230525205 +-2.25532829877138230046 +-2.25538299271694020476 +-2.25543762544066428433 +-2.25549219695425984256 +-2.25554670726944817005 +-2.25560115639797231779 +-2.25565554435158865942 +-2.25570987114207621715 +-2.25576413678123177675 +-2.25581834128086722302 +-2.25587248465281708931 +-2.25592656690893100802 +-2.25598058806107903962 +-2.25603454812114945227 +-2.25608844710104738951 +-2.25614228501269931115 +-2.25619606186804633197 +-2.25624977767905132708 +-2.25630343245769493521 +-2.25635702621597555861 +-2.25641055896591025132 +-2.25646403071953693953 +-2.25651744148890731623 +-2.25657079128609661112 +-2.25662408012319648520 +-2.25667730801231680715 +-2.25673047496558698555 +-2.25678358099515685709 +-2.25683662611318958113 +-2.25688961033187318606 +-2.25694253366341079925 +-2.25699539612002597622 +-2.25704819771395959194 +-2.25710093845747206132 +-2.25715361836284378327 +-2.25720623744237203212 +-2.25725879570837406618 +-2.25731129317318712779 +-2.25736372984916355833 +-2.25741610574867879180 +-2.25746842088412469352 +-2.25752067526791355689 +-2.25757286891247588301 +-2.25762500183026082468 +-2.25767707403373663055 +-2.25772908553539108922 +-2.25778103634773197328 +-2.25783292648328481889 +-2.25788475595459292578 +-2.25793652477422090996 +-2.25798823295475248329 +-2.25803988050878867710 +-2.25809146744895139491 +-2.25814299378788119199 +-2.25819445953823638717 +-2.25824586471269661558 +-2.25829720932396016408 +-2.25834849338474397129 +-2.25839971690778451574 +-2.25845087990583825999 +-2.25850198239167854197 +-2.25855302437810090410 +-2.25860400587791865235 +-2.25865492690396463260 +-2.25870578746909211887 +-2.25875658758617081645 +-2.25880732726809396738 +-2.25885800652776991271 +-2.25890862537813097433 +-2.25895918383212412905 +-2.25900968190271944636 +-2.25906011960290431517 +-2.25911049694568744073 +-2.25916081394409440364 +-2.25921107061117387715 +-2.25926126695999140992 +-2.25931140300363209050 +-2.25936147875520143558 +-2.25941149422782538991 +-2.25946144943464721777 +-2.25951134438883149969 +-2.25956117910356235612 +-2.25961095359204255928 +-2.25966066786749664175 +-2.25971032194316467923 +-2.25975991583231206050 +-2.25980944954821838522 +-2.25985892310418767792 +-2.25990833651353906220 +-2.25995768978961608653 +-2.26000698294578006298 +-2.26005621599540917899 +-2.26010538895190737918 +-2.26015450182869281903 +-2.26020355463920763484 +-2.26025254739691039418 +-2.26030148011528275731 +-2.26035035280782281575 +-2.26039916548805308594 +-2.26044791816951029517 +-2.26049661086575603974 +-2.26054524359036967951 +-2.26059381635695055834 +-2.26064232917911800413 +-2.26069078207051221696 +-2.26073917504479249274 +-2.26078750811563811141 +-2.26083578129674833690 +-2.26088399460184330536 +-2.26093214804466358103 +-2.26098024163896704763 +-2.26102827539853601380 +-2.26107624933716744309 +-2.26112416346868405626 +-2.26117201780692411717 +-2.26121981236574942642 +-2.26126754715903999227 +-2.26131522220069669515 +-2.26136283750464084363 +-2.26141039308481239800 +-2.26145788895517307893 +-2.26150532512970547927 +-2.26155270162240995546 +-2.26160001844730995657 +-2.26164727561844713932 +-2.26169447314988403264 +-2.26174161105570403762 +-2.26178868935001009532 +-2.26183570804692601897 +-2.26188266716059649397 +-2.26192956670518485751 +-2.26197640669487620713 +-2.26202318714387562437 +-2.26206990806640906300 +-2.26211656947672201667 +-2.26216317138908129536 +-2.26220971381777280484 +-2.26225619677710465538 +-2.26230262028140449715 +-2.26234898434502129660 +-2.26239528898232311604 +-2.26244153420769844587 +-2.26248772003555886911 +-2.26253384648033284421 +-2.26257991355647325449 +-2.26262592127845030276 +-2.26267186966075639631 +-2.26271775871790392642 +-2.26276358846442704476 +-2.26280935891487855471 +-2.26285507008383390826 +-2.26290072198588765318 +-2.26294631463565654172 +-2.26299184804777597790 +-2.26303732223690357017 +-2.26308273721771779918 +-2.26312809300491712960 +-2.26317338961322045421 +-2.26321862705736842614 +-2.26326380535212123846 +-2.26330892451226128870 +-2.26335398455259140249 +-2.26339898548793350130 +-2.26344392733313171107 +-2.26348881010305280626 +-2.26353363381257999265 +-2.26357839847662090094 +-2.26362310411010314581 +-2.26366775072797477009 +-2.26371233834520424466 +-2.26375686697678224490 +-2.26380133663771987429 +-2.26384574734304910848 +-2.26389009910782057489 +-2.26393439194711110218 +-2.26397862587601395035 +-2.26402280090964413972 +-2.26406691706313889512 +-2.26411097435165631353 +-2.26415497279037447598 +-2.26419891239449233566 +-2.26424279317923105026 +-2.26428661515983309371 +-2.26433037835156092399 +-2.26437408276969698306 +-2.26441772842954769374 +-2.26446131534643768646 +-2.26450484353571646068 +-2.26454831301274861488 +-2.26459172379292628108 +-2.26463507589165846667 +-2.26467836932437727171 +-2.26472160410653433615 +-2.26476478025360572488 +-2.26480789778108482224 +-2.26485095670448766114 +-2.26489395703935292303 +-2.26493689880123927338 +-2.26497978200572491758 +-2.26502260666841248593 +-2.26506537280492326047 +-2.26510808043090161590 +-2.26515072956201235499 +-2.26519332021394159682 +-2.26523585240239677674 +-2.26527832614310664638 +-2.26532074145182082958 +-2.26536309834431159871 +-2.26540539683637032198 +-2.26544763694381279251 +-2.26548981868247301108 +-2.26553194206820807111 +-2.26557400711689682637 +-2.26561601384443811469 +-2.26565796226675253422 +-2.26569985239978333169 +-2.26574168425949418193 +-2.26578345786186918787 +-2.26582517322291643325 +-2.26586683035866309766 +-2.26590842928515856514 +-2.26594997001847442419 +-2.26599145257470313553 +-2.26603287696995803202 +-2.26607424322037598330 +-2.26611555134211206664 +-2.26615680135134489603 +-2.26619799326427662223 +-2.26623912709712715952 +-2.26628020286613907075 +-2.26632122058757934369 +-2.26636218027773184147 +-2.26640308195290574034 +-2.26644392562943020053 +-2.26648471132365569858 +-2.26652543905195580365 +-2.26656610883072362483 +-2.26660672067637580795 +-2.26664727460534942693 +-2.26668777063410464834 +-2.26672820877912073456 +-2.26676858905690137291 +-2.26680891148397023471 +-2.26684917607687230756 +-2.26688938285217700397 +-2.26692953182647238819 +-2.26696962301636961712 +-2.26700965643850160802 +-2.26704963210952215036 +-2.26708955004610723805 +-2.26712941026495551355 +-2.26716921278278649154 +-2.26720895761634100296 +-2.26724864478238252730 +-2.26728827429769719259 +-2.26732784617908933456 +-2.26736736044338904605 +-2.26740681710744773625 +-2.26744621618813502195 +-2.26748555770234760942 +-2.26752484166699863621 +-2.26756406809902788524 +-2.26760323701539423524 +-2.26764234843307832534 +-2.26768140236908521956 +-2.26772039884043863367 +-2.26775933786418582017 +-2.26779821945739579192 +-2.26783704363716021035 +-2.26787581042059116498 +-2.26791451982482339389 +-2.26795317186701295142 +-2.26799176656433898458 +-2.26803030393400240072 +-2.26806878399322497941 +-2.26810720675925159284 +-2.26814557224934709723 +-2.26818388048080255004 +-2.26822213147092677232 +-2.26826032523705167776 +-2.26829846179653271676 +-2.26833654116674487966 +-2.26837456336508802579 +-2.26841252840898111032 +-2.26845043631586751331 +-2.26848828710321148705 +-2.26852608078849948825 +-2.26856381738923973401 +-2.26860149692296353408 +-2.26863911940722351446 +-2.26867668485959317337 +-2.26871419329767087802 +-2.26875164473907497964 +-2.26878903920144647799 +-2.26882637670244902139 +-2.26886365725976624219 +-2.26890088089110752989 +-2.26893804761420092575 +-2.26897515744679845184 +-2.26901221040667522288 +-2.26904920651162456124 +-2.26908614577946732282 +-2.26912302822804168301 +-2.26915985387521024208 +-2.26919662273885824888 +-2.26923333483689360079 +-2.26926999018724329105 +-2.26930658880785873777 +-2.26934313071671311945 +-2.26937961593180315134 +-2.26941604447114642085 +-2.26945241635278271985 +-2.26948873159477271244 +-2.26952499021520281985 +-2.26956119223217855918 +-2.26959733766383076059 +-2.26963342652830801782 +-2.26966945884378512588 +-2.26970543462845819604 +-2.26974135390054421180 +-2.26977721667828413743 +-2.26981302297994069761 +-2.26984877282379748920 +-2.26988446622816342213 +-2.26992010321136650219 +-2.26995568379175916007 +-2.26999120798771558682 +-2.27002667581763128979 +-2.27006208729992575712 +-2.27009744245304023735 +-2.27013274129543685120 +-2.27016798384560303248 +-2.27020317012204575491 +-2.27023830014329552895 +-2.27027337392790506954 +-2.27030839149444974012 +-2.27034335286152710864 +-2.27037825804775739158 +-2.27041310707178300987 +-2.27044789995226725665 +-2.27048263670789784996 +-2.27051731735738515638 +-2.27055194191945908244 +-2.27058651041287573591 +-2.27062102285641120858 +-2.27065547926886512897 +-2.27068987966905755371 +-2.27072422407583340842 +-2.27075851250805893500 +-2.27079274498462213572 +-2.27082692152443632594 +-2.27086104214643302868 +-2.27089510686956996821 +-2.27092911571282440875 +-2.27096306869519759530 +-2.27099696583571475372 +-2.27103080715342064977 +-2.27106459266738225367 +-2.27109832239669362508 +-2.27113199636046569907 +-2.27116561457783561195 +-2.27119917706796226042 +-2.27123268385002496927 +-2.27126613494322837639 +-2.27129953036679799183 +-2.27133287013998286241 +-2.27136615428205290712 +-2.27139938281230158168 +-2.27143255575004632263 +-2.27146567311462410643 +-2.27149873492539722264 +-2.27153174120174883299 +-2.27156469196308430369 +-2.27159758722883253768 +-2.27163042701844553051 +-2.27166321135139703813 +-2.27169594024718302094 +-2.27172861372532208790 +-2.27176123180535594059 +-2.27179379450684848507 +-2.27182630184938716411 +-2.27185875385257984860 +-2.27189115053605883432 +-2.27192349191947862153 +-2.27195577802251591493 +-2.27198800886486962369 +-2.27202018446626308190 +-2.27205230484644005173 +-2.27208437002516783210 +-2.27211638002223637045 +-2.27214833485745870689 +-2.27218023455066919780 +-2.27221207912172573629 +-2.27224386859050886400 +-2.27227560297692088298 +-2.27230728230088763198 +-2.27233890658235759830 +-2.27237047584130102962 +-2.27240199009771215444 +-2.27243344937160607344 +-2.27246485368302186814 +-2.27249620305202082449 +-2.27252749749868643292 +-2.27255873704312616468 +-2.27258992170546836320 +-2.27262105150586579683 +-2.27265212646449166201 +-2.27268314660154535645 +-2.27271411193724448552 +-2.27274502249183196767 +-2.27277587828557381400 +-2.27280667933875690778 +-2.27283742567169255722 +-2.27286811730471338677 +-2.27289875425817511356 +-2.27292933655245654734 +-2.27295986420795870231 +-2.27299033724510479715 +-2.27302075568434247543 +-2.27305111954614025294 +-2.27308142885098929398 +-2.27311168361940607596 +-2.27314188387192528396 +-2.27317202962910913655 +-2.27320212091153850409 +-2.27323215773981957000 +-2.27326214013457983398 +-2.27329206811646988839 +-2.27332194170616430640 +-2.27335176092435764517 +-2.27338152579176977497 +-2.27341123632914099417 +-2.27344089255723647014 +-2.27347049449684179834 +-2.27350004216876833141 +-2.27352953559384696192 +-2.27355897479293256325 +-2.27358835978690354551 +-2.27361769059666052328 +-2.27364696724312542742 +-2.27367618974724416958 +-2.27370535812998664227 +-2.27373447241234316607 +-2.27376353261532715422 +-2.27379253875997600076 +-2.27382149086734886012 +-2.27385038895852797936 +-2.27387923305461780998 +-2.27390802317674545208 +-2.27393675934606287470 +-2.27396544158374114275 +-2.27399406991097663422 +-2.27402264434898748746 +-2.27405116491901537756 +-2.27407963164232329589 +-2.27410804454019865872 +-2.27413640363395019861 +-2.27416470894491107302 +-2.27419296049443397933 +-2.27422115830389737212 +-2.27424930239470191040 +-2.27427739278827045766 +-2.27430542950604763774 +-2.27433341256950205533 +-2.27436134200012540774 +-2.27438921781943204081 +-2.27441704004895584035 +-2.27444480871025911384 +-2.27447252382492237643 +-2.27450018541455012411 +-2.27452779350077083365 +-2.27455534810523340994 +-2.27458284924961073870 +-2.27461029695559968644 +-2.27463769124491754781 +-2.27466503213930604232 +-2.27469231966052731764 +-2.27471955383036972265 +-2.27474673467064203436 +-2.27477386220317567833 +-2.27480093644982561685 +-2.27482795743246901665 +-2.27485492517300613713 +-2.27488183969335944212 +-2.27490870101547582038 +-2.27493550916132170059 +-2.27496226415288793632 +-2.27498896601218980607 +-2.27501561476126346051 +-2.27504221042216681070 +-2.27506875301698263669 +-2.27509524256781503482 +-2.27512167909679119404 +-2.27514806262606095189 +-2.27517439317779857078 +-2.27520067077419652080 +-2.27522689543747480556 +-2.27525306718987474497 +-2.27527918605365808702 +-2.27530525205111189280 +-2.27533126520454587194 +-2.27535722553628971809 +-2.27538313306869977026 +-2.27540898782415057511 +-2.27543478982504421282 +-2.27546053909380185942 +-2.27548623565286867176 +-2.27551187952471334341 +-2.27553747073182410787 +-2.27556300929671673217 +-2.27558849524192519098 +-2.27561392859000832800 +-2.27563930936354763546 +-2.27566463758514769822 +-2.27568991327743264108 +-2.27571513646305412237 +-2.27574030716468378444 +-2.27576542540501458589 +-2.27579049120676568663 +-2.27581550459267489828 +-2.27584046558550623374 +-2.27586537420804546628 +-2.27589023048309879727 +-2.27591503443349729707 +-2.27593978608209468462 +-2.27596448545176688327 +-2.27598913256541202088 +-2.27601372744595042974 +-2.27603827011632819932 +-2.27606276059950918267 +-2.27608719891848387817 +-2.27611158509626365642 +-2.27613591915588253656 +-2.27616020112039851853 +-2.27618443101289003039 +-2.27620860885646081329 +-2.27623273467423414829 +-2.27625680848935685319 +-2.27628083032500150296 +-2.27630480020436021249 +-2.27632871815064641297 +-2.27635258418709973682 +-2.27637639833698024461 +-2.27640016062357108950 +-2.27642387107017851733 +-2.27644752970012964610 +-2.27647113653677690692 +-2.27649469160349271490 +-2.27651819492367302189 +-2.27654164652073776054 +-2.27656504641812640344 +-2.27658839463930506852 +-2.27661169120775852548 +-2.27663493614699552481 +-2.27665812948054924192 +-2.27668127123197194805 +-2.27670436142484122755 +-2.27672740008275686918 +-2.27675038722933864577 +-2.27677332288823386364 +-2.27679620708310626043 +-2.27681903983764755139 +-2.27684182117556810354 +-2.27686455112060359696 +-2.27688722969651058392 +-2.27690985692706870935 +-2.27693243283607849037 +-2.27695495744736664534 +-2.27697743078477898848 +-2.27699985287218531482 +-2.27702222373347851203 +-2.27704454339257100770 +-2.27706681187340276296 +-2.27708902919993061431 +-2.27711119539613759954 +-2.27713331048602896090 +-2.27715537449363081279 +-2.27717738744299236231 +-2.27719934935818635324 +-2.27722126026330640158 +-2.27724312018246966005 +-2.27726492913981592991 +-2.27728668715950544055 +-2.27730839426572417850 +-2.27733005048267678205 +-2.27735165583459409078 +-2.27737321034572648415 +-2.27739471404034832247 +-2.27741616694275528232 +-2.27743756907726657701 +-2.27745892046822318022 +-2.27748022113998827010 +-2.27750147111694900559 +-2.27752267042351208559 +-2.27754381908410863389 +-2.27756491712319197873 +-2.27758596456523809692 +-2.27760696143474339337 +-2.27762790775622958606 +-2.27764880355423748881 +-2.27766964885333367263 +-2.27769044367810424845 +-2.27771118805315841982 +-2.27773188200312981522 +-2.27775252555267071486 +-2.27777311872645915614 +-2.27779366154919316045 +-2.27781415404559384186 +-2.27783459624040540703 +-2.27785498815839293485 +-2.27787532982434504092 +-2.27789562126307210121 +-2.27791586249940625208 +-2.27793605355820227842 +-2.27795619446433761368 +-2.27797628524271233985 +-2.27799632591824741112 +-2.27801631651588731842 +-2.27803625706059831302 +-2.27805614757736751841 +-2.27807598809120781524 +-2.27809577862715073593 +-2.27811551921025134959 +-2.27813520986558737391 +-2.27815485061825873103 +-2.27817444149338621528 +-2.27819398251611460182 +-2.27821347371160998208 +-2.27823291510506020785 +-2.27825230672167622359 +-2.27827164858668984593 +-2.27829094072535687232 +-2.27831018316295397241 +-2.27832937592478090849 +-2.27834851903615698276 +-2.27836761252242681053 +-2.27838665640895587927 +-2.27840565072113232503 +-2.27842459548436471195 +-2.27844349072408602908 +-2.27846233646574969356 +-2.27848113273483177110 +-2.27849987955683008778 +-2.27851857695726556230 +-2.27853722496167909739 +-2.27855582359563646477 +-2.27857437288472297610 +-2.27859287285454836791 +-2.27861132353074147261 +-2.27862972493895510340 +-2.27864807710486516612 +-2.27866638005416577428 +-2.27868463381257768674 +-2.27870283840584031410 +-2.27872099385971660368 +-2.27873910019999037502 +-2.27875715745246898436 +-2.27877516564297977197 +-2.27879312479737361485 +-2.27881103494152315037 +-2.27882889610132233216 +-2.27884670830268820652 +-2.27886447157155691556 +-2.27888218593389080269 +-2.27889985141566997484 +-2.27891746804289896389 +-2.27893503584160495024 +-2.27895255483783287787 +-2.27897002505765522429 +-2.27898744652716045422 +-2.27900481927246412184 +-2.27902214331969998895 +-2.27903941869502579820 +-2.27905664542461972033 +-2.27907382353468257463 +-2.27909095305143694077 +-2.27910803400112671468 +-2.27912506641001888497 +-2.27914205030439953603 +-2.27915898571058006539 +-2.27917587265489052228 +-2.27919271116368538088 +-2.27920950126333776709 +-2.27922624298024567580 +-2.27924293634082753002 +-2.27925958137152262495 +-2.27927617809879334843 +-2.27929272654912251639 +-2.27930922674901692560 +-2.27932567872500158046 +-2.27934208250362724257 +-2.27935843811146154891 +-2.27937474557509833772 +-2.27939100492115098717 +-2.27940721617625463580 +-2.27942337936706573842 +-2.27943949452026295432 +-2.27945556166254714725 +-2.27947158082063916495 +-2.27948755202128205966 +-2.27950347529124108803 +-2.27951935065730326713 +-2.27953517814627648619 +-2.27955095778499039483 +-2.27956668960029507076 +-2.27958237361906501661 +-2.27959800986819249857 +-2.27961359837459420774 +-2.27962913916520859559 +-2.27964463226699232123 +-2.27966007770692691281 +-2.27967547551201343836 +-2.27969082570927517040 +-2.27970612832575714179 +-2.27972138338852481354 +-2.27973659092466629517 +-2.27975175096129056840 +-2.27976686352552659898 +-2.27978192864452866573 +-2.27979694634546747878 +-2.27981191665553861725 +-2.27982683960195808837 +-2.27984171521196321564 +-2.27985654351281130658 +-2.27987132453178453773 +-2.27988605829618284915 +-2.27990074483332882949 +-2.27991538417056682775 +-2.27992997633526162105 +-2.27994452135480019095 +-2.27995901925659039122 +-2.27997347006806005965 +-2.27998787381666057072 +-2.28000223052986372707 +-2.28001654023516175940 +-2.28003080296006777061 +-2.28004501873211884444 +-2.28005918757887027226 +-2.28007330952789910583 +-2.28008738460680504545 +-2.28010141284320777544 +-2.28011539426474829639 +-2.28012932889908892520 +-2.28014321677391329501 +-2.28015705791692457893 +-2.28017085235584948677 +-2.28018460011843471236 +-2.28019830123244737763 +-2.28021195572567680898 +-2.28022556362593187274 +-2.28023912496104497194 +-2.28025263975886716139 +-2.28026610804727125625 +-2.28027952985415183207 +-2.28029290520742344839 +-2.28030623413502242514 +-2.28031951666490551034 +-2.28033275282505076831 +-2.28034594264345624737 +-2.28035908614814308848 +-2.28037218336715019618 +-2.28038523432854134398 +-2.28039823906039806900 +-2.28041119759082322460 +-2.28042410994794142454 +-2.28043697615989904293 +-2.28044979625486066155 +-2.28046257026101351073 +-2.28047529820656569299 +-2.28048798011974529487 +-2.28050061602880127509 +-2.28051320596200524093 +-2.28052574994764611915 +-2.28053824801403681732 +-2.28055070018950889477 +-2.28056310650241611526 +-2.28057546698113311479 +-2.28058778165405229288 +-2.28060005054959091808 +-2.28061227369618313432 +-2.28062445112228839861 +-2.28063658285638126699 +-2.28064866892696027634 +-2.28066070936254439161 +-2.28067270419167344997 +-2.28068465344290549623 +-2.28069655714482255604 +-2.28070841532602441859 +-2.28072022801513396573 +-2.28073199524079228695 +-2.28074371703166223213 +-2.28075539341642663516 +-2.28076702442378964619 +-2.28077861008247584351 +-2.28079015042122890122 +-2.28080164546881469789 +-2.28081309525401776384 +-2.28082449980564572201 +-2.28083585915252395893 +-2.28084717332349917740 +-2.28085844234743939651 +-2.28086966625323173119 +-2.28088084506978550081 +-2.28089197882602734424 +-2.28090306755090654889 +-2.28091411127339327436 +-2.28092511002247499974 +-2.28093606382716318492 +-2.28094697271648705339 +-2.28095783671949714488 +-2.28096865586526353908 +-2.28097943018287763195 +-2.28099015970145080345 +-2.28100084445011308532 +-2.28101148445801671372 +-2.28102207975433302067 +-2.28103263036825376631 +-2.28104313632899158293 +-2.28105359766577819869 +-2.28106401440786576984 +-2.28107438658452732483 +-2.28108471422505321158 +-2.28109499735875820292 +-2.28110523601497483526 +-2.28111543022305518491 +-2.28112558001237131222 +-2.28113568541231659381 +-2.28114574645230394623 +-2.28115576316176671412 +-2.28116573557015689389 +-2.28117566370694735411 +-2.28118554760163094741 +-2.28119538728371962222 +-2.28120518278274664326 +-2.28121493412826392699 +-2.28122464134984470618 +-2.28123430447707997715 +-2.28124392353958249657 +-2.28125349856698367290 +-2.28126302958893578676 +-2.28127251663511110280 +-2.28128195973519964923 +-2.28129135891891277055 +-2.28130071421598090708 +-2.28131002565615625954 +-2.28131929326920879220 +-2.28132851708492756515 +-2.28133769713312251071 +-2.28134683344362443336 +-2.28135592604628101299 +-2.28136497497096168985 +-2.28137398024755588821 +-2.28138294190596990774 +-2.28139185997613269663 +-2.28140073448799007849 +-2.28140956547151185774 +-2.28141835295668160555 +-2.28142709697350642983 +-2.28143579755201120207 +-2.28144445472224077776 +-2.28145306851426132866 +-2.28146163895815545786 +-2.28147016608402619653 +-2.28147864992199744805 +-2.28148709050221176753 +-2.28149548785482858548 +-2.28150384201003220142 +-2.28151215299802068159 +-2.28152042084901562902 +-2.28152864559325418981 +-2.28153682726099660272 +-2.28154496588251953781 +-2.28155306148812053735 +-2.28156111410811623941 +-2.28156912377284282201 +-2.28157709051265378264 +-2.28158501435792393508 +-2.28159289533904674485 +-2.28160073348643432922 +-2.28160852883051923357 +-2.28161628140175176682 +-2.28162399123060222195 +-2.28163165834755776729 +-2.28163928278312999609 +-2.28164686456784338020 +-2.28165440373224592818 +-2.28166190030690163582 +-2.28166935432239625925 +-2.28167676580933331820 +-2.28168413479833454005 +-2.28169146132004074801 +-2.28169874540511408156 +-2.28170598708423311152 +-2.28171318638809639268 +-2.28172034334741979933 +-2.28172745799294052205 +-2.28173453035541440315 +-2.28174156046561371625 +-2.28174854835433249534 +-2.28175549405238076162 +-2.28176239759059029666 +-2.28176925899980886925 +-2.28177607831090512036 +-2.28178285555476589863 +-2.28178959076229492808 +-2.28179628396441858129 +-2.28180293519207788577 +-2.28180954447623429715 +-2.28181611184787014324 +-2.28182263733798063043 +-2.28182912097758494596 +-2.28183556279771959652 +-2.28184196282943885237 +-2.28184832110381430326 +-2.28185463765193929930 +-2.28186091250492273375 +-2.28186714569389392793 +-2.28187333724999996676 +-2.28187948720440614281 +-2.28188559558829817675 +-2.28189166243287644420 +-2.28189768776936263706 +-2.28190367162899576670 +-2.28190961404303394033 +-2.28191551504275347284 +-2.28192137465944844266 +-2.28192719292443157997 +-2.28193296986903337853 +-2.28193870552460342793 +-2.28194439992250952542 +-2.28195005309413812000 +-2.28195566507089253605 +-2.28196123588419341743 +-2.28196676556548405657 +-2.28197225414622106854 +-2.28197770165788149654 +-2.28198310813196059144 +-2.28198847359997136763 +-2.28199379809344460313 +-2.28199908164392928356 +-2.28200432428299215815 +-2.28200952604221907194 +-2.28201468695321363356 +-2.28201980704759588292 +-2.28202488635700451169 +-2.28202992491309863965 +-2.28203492274755204150 +-2.28203987989205714371 +-2.28204479637832546857 +-2.28204967223808585786 +-2.28205450750308402874 +-2.28205930220508523831 +-2.28206405637587117496 +-2.28206877004724129065 +-2.28207344325101368909 +-2.28207807601902423755 +-2.28208266838312567870 +-2.28208722037518851877 +-2.28209173202710147166 +-2.28209620337077145891 +-2.28210063443812183337 +-2.28210502526109415555 +-2.28210937587164730544 +-2.28211368630175881478 +-2.28211795658342131432 +-2.28212218674864741885 +-2.28212637682946617446 +-2.28213052685792527896 +-2.28213463686608841741 +-2.28213870688603615022 +-2.28214273694986946595 +-2.28214672708970400805 +-2.28215067733767451585 +-2.28215458772593127179 +-2.28215845828664232187 +-2.28216228905199569610 +-2.28216608005419407945 +-2.28216983132545658819 +-2.28217354289802321077 +-2.28217721480414770241 +-2.28218084707610247008 +-2.28218443974617768433 +-2.28218799284667950289 +-2.28219150640993184709 +-2.28219498046827551363 +-2.28219841505406995097 +-2.28220181019968926250 +-2.28220516593752575929 +-2.28220848229998907186 +-2.28221175931950481797 +-2.28221499702851726710 +-2.28221819545948667596 +-2.28222135464488973255 +-2.28222447461722222073 +-2.28222755540899280291 +-2.28223059705273190190 +-2.28223359958098370726 +-2.28223656302630928394 +-2.28223948742128879275 +-2.28224237279851571714 +-2.28224521919060441277 +-2.28224802663018166982 +-2.28225079514989470653 +-2.28225352478240584020 +-2.28225621556039470761 +-2.28225886751655560047 +-2.28226148068360190635 +-2.28226405509426300000 +-2.28226659078128424341 +-2.28226908777742742984 +-2.28227154611547300433 +-2.28227396582821429050 +-2.28227634694846548413 +-2.28227868950905232737 +-2.28228099354282143452 +-2.28228325908263451893 +-2.28228548616136839300 +-2.28228767481191718858 +-2.28228982506719235701 +-2.28229193696011956050 +-2.28229401052364222480 +-2.28229604579072065107 +-2.28229804279433068359 +-2.28230000156746282158 +-2.28230192214312710419 +-2.28230380455434733733 +-2.28230564883416509048 +-2.28230745501563614397 +-2.28230922313183404171 +-2.28231095321584742663 +-2.28231264530078270525 +-2.28231429941976005082 +-2.28231591560591740020 +-2.28231749389240823334 +-2.28231903431240157332 +-2.28232053689908376271 +-2.28232200168565491083 +-2.28232342870533289059 +-2.28232481799135156209 +-2.28232616957695944038 +-2.28232748349542058364 +-2.28232875978001681361 +-2.28232999846404549515 +-2.28233119958081731582 +-2.28233236316366117080 +-2.28233348924592149842 +-2.28233457786095739195 +-2.28233562904214482003 +-2.28233664282287351810 +-2.28233761923655098514 +-2.28233855831659981916 +-2.28233946009645682906 +-2.28234032460957658728 +-2.28234115188942698893 +-2.28234194196949369271 +-2.28234269488327567998 +-2.28234341066428880751 +-2.28234408934606358699 +-2.28234473096214696142 +-2.28234533554610097283 +-2.28234590313150231822 +-2.28234643375194279358 +-2.28234692744103062623 +-2.28234738423239003069 +-2.28234780415965765599 +-2.28234818725648880289 +-2.28234853355655120666 +-2.28234884309352858978 +-2.28234911590112155011 +-2.28234935201304356411 +-2.28234955146302276319 +-2.28234971428480726274 +-2.28234984051215405998 +-2.28234993017883880384 +-2.28234998331865046595 +-2.28234999996539489331 +-2.28234998014945666966 +-2.28234992388917534711 +-2.28234983120024015335 +-2.28234970209833232246 +-2.28234953659912864765 +-2.28234933471829704033 +-2.28234909647149919465 +-2.28234882187438925527 +-2.28234851094261559368 +-2.28234816369181814366 +-2.28234778013763195403 +-2.28234736029568274773 +-2.28234690418159047454 +-2.28234641181096931106 +-2.28234588319942455215 +-2.28234531836255483128 +-2.28234471731595478516 +-2.28234408007520794825 +-2.28234340665589252595 +-2.28234269707358228274 +-2.28234195134384032499 +-2.28234116948222487409 +-2.28234035150428704597 +-2.28233949742557085116 +-2.28233860726161275068 +-2.28233768102794565280 +-2.28233671874009047542 +-2.28233572041356413962 +-2.28233468606387779332 +-2.28233361570653325856 +-2.28233250935702658424 +-2.28233136703084671382 +-2.28233018874347681759 +-2.28232897451039162817 +-2.28232772434705921683 +-2.28232643826894232575 +-2.28232511629149525945 +-2.28232375843016699335 +-2.28232236470039762111 +-2.28232093511762101912 +-2.28231946969726662289 +-2.28231796845475409796 +-2.28231643140549600446 +-2.28231485856490090569 +-2.28231324994836937137 +-2.28231160557129308941 +-2.28230992544906063912 +-2.28230820959704994166 +-2.28230645803063492139 +-2.28230467076518195313 +-2.28230284781604852995 +-2.28230098919859036855 +-2.28229909492814941885 +-2.28229716502006718670 +-2.28229519948967540799 +-2.28229319835229871316 +-2.28229116162325595951 +-2.28228908931785845482 +-2.28228698145141217779 +-2.28228483803921422535 +-2.28228265909655636534 +-2.28228044463872326020 +-2.28227819468099291100 +-2.28227590923863532524 +-2.28227358832691651358 +-2.28227123196109227266 +-2.28226884015641484638 +-2.28226641292812670869 +-2.28226395029146678084 +-2.28226145226166465818 +-2.28225891885394327474 +-2.28225635008352067956 +-2.28225374596560692808 +-2.28225110651540497031 +-2.28224843174811242719 +-2.28224572167891937013 +-2.28224297632300698879 +-2.28224019569555469644 +-2.28223737981172947187 +-2.28223452868669696159 +-2.28223164233561304215 +-2.28222872077362515242 +-2.28222576401587762263 +-2.28222277207750723349 +-2.28221974497364366030 +-2.28221668271940769657 +-2.28221358532991658308 +-2.28221045282028045520 +-2.28220728520560012242 +-2.28220408250097328562 +-2.28220084472148831978 +-2.28219757188222738264 +-2.28219426399826685881 +-2.28219092108467558333 +-2.28218754315651661813 +-2.28218413022884547559 +-2.28218068231671056267 +-2.28217719943515495729 +-2.28217368159921463189 +-2.28217012882391756534 +-2.28216654112428818379 +-2.28216291851533936708 +-2.28215926101208221866 +-2.28215556862951807204 +-2.28215184138264381986 +-2.28214807928644658475 +-2.28214428235591126892 +-2.28214045060601167236 +-2.28213658405171759824 +-2.28213268270799174431 +-2.28212874658978881470 +-2.28212477571205951676 +-2.28212077008974567605 +-2.28211672973778334494 +-2.28211265467110058225 +-2.28210854490462189403 +-2.28210440045326157232 +-2.28210022133192991234 +-2.28209600755553010387 +-2.28209175913895645493 +-2.28208747609710016491 +-2.28208315844484355139 +-2.28207880619706315883 +-2.28207441936862798215 +-2.28206999797440124311 +-2.28206554202923950214 +-2.28206105154799310242 +-2.28205652654550394942 +-2.28205196703661039592 +-2.28204737303614058064 +-2.28204274455891997775 +-2.28203808161976340330 +-2.28203338423348256470 +-2.28202865241487984349 +-2.28202388617875362442 +-2.28201908553989474271 +-2.28201425051308426362 +-2.28200938111310280831 +-2.28200447735471989574 +-2.28199953925269971577 +-2.28199456682180024103 +-2.28198956007677145053 +-2.28198451903235888238 +-2.28197944370330008113 +-2.28197433410432681811 +-2.28196919025016287108 +-2.28196401215552890918 +-2.28195879983513316702 +-2.28195355330368387925 +-2.28194827257587817826 +-2.28194295766640875556 +-2.28193760858996075314 +-2.28193222536121398392 +-2.28192680799483937903 +-2.28192135650550431691 +-2.28191587090786729419 +-2.28191035121658236662 +-2.28190479744629426406 +-2.28189920961164416369 +-2.28189358772726569313 +-2.28188793180778448644 +-2.28188224186782129266 +-2.28187651792198931133 +-2.28187075998489730111 +-2.28186496807114469476 +-2.28185914219532648417 +-2.28185328237202966761 +-2.28184738861583635838 +-2.28184146094132156435 +-2.28183549936305141159 +-2.28182950389559069393 +-2.28182347455349310295 +-2.28181741135130700115 +-2.28181131430357542200 +-2.28180518342483473759 +-2.28179901872961288234 +-2.28179282023243334976 +-2.28178658794781297203 +-2.28178032189026147591 +-2.28177402207428281500 +-2.28176768851437250518 +-2.28176132122502250965 +-2.28175492022071590981 +-2.28174848551593090207 +-2.28174201712513902152 +-2.28173551506280380963 +-2.28172897934338481107 +-2.28172240998133313283 +-2.28171580699109322055 +-2.28170917038710641123 +-2.28170250018380249557 +-2.28169579639560948792 +-2.28168905903694563264 +-2.28168228812222517732 +-2.28167548366585348774 +-2.28166864568223237697 +-2.28166177418575522040 +-2.28165486919080917616 +-2.28164793071177518513 +-2.28164095876302708277 +-2.28163395335893426363 +-2.28162691451385901686 +-2.28161984224215519390 +-2.28161273655817220529 +-2.28160559747625280025 +-2.28159842501073262255 +-2.28159121917594287510 +-2.28158397998620499081 +-2.28157670745583729399 +-2.28156940159914878308 +-2.28156206243044534787 +-2.28155468996402310822 +-2.28154728421417463124 +-2.28153984519518493457 +-2.28153237292133104219 +-2.28152486740688642541 +-2.28151732866611700601 +-2.28150975671328160033 +-2.28150215156263458383 +-2.28149451322842011791 +-2.28148684172488103172 +-2.28147913706624994035 +-2.28147139926675501798 +-2.28146362834061688929 +-2.28145582430205084989 +-2.28144798716526553406 +-2.28144011694446291472 +-2.28143221365383874755 +-2.28142427730758257098 +-2.28141630791987681803 +-2.28140830550490036899 +-2.28140027007682100191 +-2.28139220164980427441 +-2.28138410023800819459 +-2.28137596585558233286 +-2.28136779851667315100 +-2.28135959823542000535 +-2.28135136502595470276 +-2.28134309890240194463 +-2.28133479987888332374 +-2.28132646796951199519 +-2.28131810318839489682 +-2.28130970554963186103 +-2.28130127506731827935 +-2.28129281175554199379 +-2.28128431562838507318 +-2.28127578669992381322 +-2.28126722498422607188 +-2.28125863049535526628 +-2.28125000324736859625 +-2.28124134325431482395 +-2.28123265053024049109 +-2.28122392508918148124 +-2.28121516694516923707 +-2.28120637611223076036 +-2.28119755260438195066 +-2.28118869643563870753 +-2.28117980762000449602 +-2.28117088617148056073 +-2.28116193210406192904 +-2.28115294543173341424 +-2.28114392616847894146 +-2.28113487432827133361 +-2.28112578992507941678 +-2.28111667297286668799 +-2.28110752348558865066 +-2.28109834147719592323 +-2.28108912696163024236 +-2.28107987995283201244 +-2.28107060046472964743 +-2.28106128851124889678 +-2.28105194410630884860 +-2.28104256726382104148 +-2.28103315799769212902 +-2.28102371632182121530 +-2.28101424225010340763 +-2.28100473579642448740 +-2.28099519697466712742 +-2.28098562579870467459 +-2.28097602228240647904 +-2.28096638643963567361 +-2.28095671828424695349 +-2.28094701783009234930 +-2.28093728509101367763 +-2.28092752008084920234 +-2.28091772281343141415 +-2.28090789330258347789 +-2.28089803156212544977 +-2.28088813760586939239 +-2.28087821144762292747 +-2.28086825310118568311 +-2.28085826258035151426 +-2.28084823989890761453 +-2.28083818507063806891 +-2.28082809810931497196 +-2.28081797902871041828 +-2.28080782784258673246 +-2.28079764456470002187 +-2.28078742920880195300 +-2.28077718178863575460 +-2.28076690231794110275 +-2.28075659081044923582 +-2.28074624727988695128 +-2.28073587173997394117 +-2.28072546420442279214 +-2.28071502468694209398 +-2.28070455320123288701 +-2.28069404976098955018 +-2.28068351437990157748 +-2.28067294707165135748 +-2.28066234784991683782 +-2.28065171672836619621 +-2.28064105372066627808 +-2.28063035884047282664 +-2.28061963210143892056 +-2.28060887351721142124 +-2.28059808310142786425 +-2.28058726086772356467 +-2.28057640682972495583 +-2.28056552100105358605 +-2.28055460339532434233 +-2.28054365402614678260 +-2.28053267290712247117 +-2.28052166005184941966 +-2.28051061547391809015 +-2.28049953918691228338 +-2.28048843120441047105 +-2.28047729153998490759 +-2.28046612020720207425 +-2.28045491721962045872 +-2.28044368259079632821 +-2.28043241633427573589 +-2.28042111846359940586 +-2.28040978899230450949 +-2.28039842793391978049 +-2.28038703530196862346 +-2.28037561110996822578 +-2.28036415537142911347 +-2.28035266809985737169 +-2.28034114930875020377 +-2.28032959901160214855 +-2.28031801722189797488 +-2.28030640395312023117 +-2.28029475921874125177 +-2.28028308303223115061 +-2.28027137540705160390 +-2.28025963635665895879 +-2.28024786589450378926 +-2.28023606403402867571 +-2.28022423078867308988 +-2.28021236617186895401 +-2.28020047019704019675 +-2.28018854287760852628 +-2.28017658422698632492 +-2.28016459425858286636 +-2.28015257298579809841 +-2.28014052042202886028 +-2.28012843658066266528 +-2.28011632147508525037 +-2.28010417511867258256 +-2.28009199752479485568 +-2.28007978870682004313 +-2.28006754867810501608 +-2.28005527745200309298 +-2.28004297504186315138 +-2.28003064146102429888 +-2.28001827672282209036 +-2.28000588084058586347 +-2.27999345382763829448 +-2.27998099569729539837 +-2.27996850646286919329 +-2.27995598613766414786 +-2.27994343473497851349 +-2.27993085226810610067 +-2.27991823875033228219 +-2.27990559419493976634 +-2.27989291861520060323 +-2.27988021202438551072 +-2.27986747443575632488 +-2.27985470586256866454 +-2.27984190631807592808 +-2.27982907581551996756 +-2.27981621436813997050 +-2.27980332198916979536 +-2.27979039869183530698 +-2.27977744448935659705 +-2.27976445939494887227 +-2.27975144342182067803 +-2.27973839658317434242 +-2.27972531889220686452 +-2.27971221036210724975 +-2.27969907100606317130 +-2.27968590083725075601 +-2.27967269986884346622 +-2.27965946811400765881 +-2.27964620558590436161 +-2.27963291229768749702 +-2.27961958826250787880 +-2.27960623349350566258 +-2.27959284800381967173 +-2.27957943180657940374 +-2.27956598491490991520 +-2.27955250734192960138 +-2.27953899910075330482 +-2.27952546020448609809 +-2.27951189066622950108 +-2.27949829049907881640 +-2.27948465971612268532 +-2.27947099833044486417 +-2.27945730635512155970 +-2.27944358380322453783 +-2.27942983068781934719 +-2.27941604702196443100 +-2.27940223281871334748 +-2.27938838809111432582 +-2.27937451285220848973 +-2.27936060711503163390 +-2.27934667089261155937 +-2.27933270419797473494 +-2.27931870704413652717 +-2.27930467944411052628 +-2.27929062141090144067 +-2.27927653295750864970 +-2.27926241409692842410 +-2.27924826484214726463 +-2.27923408520614767525 +-2.27921987520190549859 +-2.27920563484239080410 +-2.27919136414057010853 +-2.27917706310939971459 +-2.27916273176183326044 +-2.27914837011081727880 +-2.27913397816929208517 +-2.27911955595019355414 +-2.27910510346644956670 +-2.27909062073098445111 +-2.27907610775671365388 +-2.27906156455654995696 +-2.27904699114339814869 +-2.27903238753015857654 +-2.27901775372972315026 +-2.27900308975498155917 +-2.27898839561881461080 +-2.27897367133409778361 +-2.27895891691370211518 +-2.27894413237049020537 +-2.27892931771732243362 +-2.27891447296705029757 +-2.27889959813252085397 +-2.27888469322657361005 +-2.27886975826204407625 +-2.27885479325176154575 +-2.27883979820854865039 +-2.27882477314522180478 +-2.27880971807459431488 +-2.27879463300947016080 +-2.27877951796265021400 +-2.27876437294692602009 +-2.27874919797508779240 +-2.27873399305991641839 +-2.27871875821418790053 +-2.27870349345067380042 +-2.27868819878213813013 +-2.27867287422133824037 +-2.27865751978102881736 +-2.27864213547395610959 +-2.27862672131286014832 +-2.27861127731047830025 +-2.27859580347953860624 +-2.27858029983276466623 +-2.27856476638287563929 +-2.27854920314258180269 +-2.27853361012458988100 +-2.27851798734160038151 +-2.27850233480630759431 +-2.27848665253140092446 +-2.27847094052956178345 +-2.27845519881346847413 +-2.27843942739579219392 +-2.27842362628919747891 +-2.27840779550634353612 +-2.27839193505988601984 +-2.27837604496247081443 +-2.27836012522674113967 +-2.27834417586533310995 +-2.27832819689087795467 +-2.27831218831599935370 +-2.27829615015331699013 +-2.27828008241544299750 +-2.27826398511498595667 +-2.27824785826454689897 +-2.27823170187672063847 +-2.27821551596409888063 +-2.27819930053926489322 +-2.27818305561479705901 +-2.27816678120326754353 +-2.27815047731724362734 +-2.27813414396928681782 +-2.27811778117195196103 +-2.27810138893778812985 +-2.27808496727933906811 +-2.27806851620914407874 +-2.27805203573973358289 +-2.27803552588363444897 +-2.27801898665336732819 +-2.27800241806144754264 +-2.27798582012038375311 +-2.27796919284267973538 +-2.27795253624083215982 +-2.27793585032733369999 +-2.27791913511466992404 +-2.27790239061532151510 +-2.27788561684176160682 +-2.27786881380646155648 +-2.27785198152188250731 +-2.27783512000048249391 +-2.27781822925471288954 +-2.27780130929701973841 +-2.27778436013984109110 +-2.27776738179561499820 +-2.27775037427676574353 +-2.27773333759571983137 +-2.27771627176489310784 +-2.27769917679669609001 +-2.27768205270353574221 +-2.27766489949781059110 +-2.27764771719191605470 +-2.27763050579824000152 +-2.27761326532916452692 +-2.27759599579706861761 +-2.27757869721432149035 +-2.27756136959329058556 +-2.27754401294633312958 +-2.27752662728580590468 +-2.27750921262405636725 +-2.27749176897342708870 +-2.27747429634625531136 +-2.27745679475487161625 +-2.27743926421160169937 +-2.27742170472876725995 +-2.27740411631868022724 +-2.27738649899364986595 +-2.27736885276597966765 +-2.27735117764796601847 +-2.27733347365189997547 +-2.27731574079006859890 +-2.27729797907475051133 +-2.27728018851822033852 +-2.27726236913274737717 +-2.27724452093059426261 +-2.27722664392401741296 +-2.27720873812526924951 +-2.27719080354659597631 +-2.27717284020023669200 +-2.27715484809842694247 +-2.27713682725339561230 +-2.27711877767736492473 +-2.27710069938255310618 +-2.27708259238117216583 +-2.27706445668542789562 +-2.27704629230752120250 +-2.27702809925964633209 +-2.27700987755399353318 +-2.27699162720274461691 +-2.27697334821807961802 +-2.27695504061216880132 +-2.27693670439717932297 +-2.27691833958527301007 +-2.27689994618860369613 +-2.27688152421932255010 +-2.27686307368957230324 +-2.27684459461149169002 +-2.27682608699721278356 +-2.27680755085886410427 +-2.27678898620856529078 +-2.27677039305843287309 +-2.27675177142057716395 +-2.27673312130710181478 +-2.27671444273010692427 +-2.27669573570168459753 +-2.27667700023392205466 +-2.27665823633890296307 +-2.27663944402870166428 +-2.27662062331539072346 +-2.27660177421103293582 +-2.27658289672768932022 +-2.27656399087741423415 +-2.27654505667225448562 +-2.27652609412425288582 +-2.27650710324544647278 +-2.27648808404786784365 +-2.27646903654354071378 +-2.27644996074448613399 +-2.27643085666271893786 +-2.27641172431024685352 +-2.27639256369907494459 +-2.27637337484119983699 +-2.27635415774861327165 +-2.27633491243330210452 +-2.27631563890724830657 +-2.27629633718242496698 +-2.27627700727080384269 +-2.27625764918434825290 +-2.27623826293501574369 +-2.27621884853476164068 +-2.27619940599553016725 +-2.27617993532926643496 +-2.27616043654790312090 +-2.27614090966337334621 +-2.27612135468760179435 +-2.27610177163250648746 +-2.27608216051000278313 +-2.27606252133199804533 +-2.27604285411039564124 +-2.27602315885709183263 +-2.27600343558397888444 +-2.27598368430294284437 +-2.27596390502586265470 +-2.27594409776461548134 +-2.27592426253106872025 +-2.27590439933708710285 +-2.27588450819452869922 +-2.27586458911524580628 +-2.27584464211108494780 +-2.27582466719388865073 +-2.27580466437549189251 +-2.27578463366772609788 +-2.27576457508241514205 +-2.27574448863137890342 +-2.27572437432643015498 +-2.27570423217937811700 +-2.27568406220202534840 +-2.27566386440616819087 +-2.27564363880359898928 +-2.27562338540610253901 +-2.27560310422546141496 +-2.27558279527344886617 +-2.27556245856183503307 +-2.27554209410238295064 +-2.27552170190685165707 +-2.27550128198699308513 +-2.27548083435455605894 +-2.27546035902128140904 +-2.27543985599890552507 +-2.27541932529915902350 +-2.27539876693376630357 +-2.27537818091444821178 +-2.27535756725291804514 +-2.27533692596088554794 +-2.27531625705005291493 +-2.27529556053211790001 +-2.27527483641877292797 +-2.27525408472170465046 +-2.27523330545259261370 +-2.27521249862311369938 +-2.27519166424493857193 +-2.27517080232972990217 +-2.27514991288914858458 +-2.27512899593484796412 +-2.27510805147847516849 +-2.27508707953167288451 +-2.27506608010607758175 +-2.27504505321332350931 +-2.27502399886503337001 +-2.27500291707283031073 +-2.27498180784832726431 +-2.27496067120313583132 +-2.27493950714885917463 +-2.27491831569709601624 +-2.27489709685943930495 +-2.27487585064747666053 +-2.27485457707279081774 +-2.27483327614695873820 +-2.27481194788155027808 +-2.27479059228813218496 +-2.27476920937826498914 +-2.27474779916350255959 +-2.27472636165539565667 +-2.27470489686548749120 +-2.27468340480531550085 +-2.27466188548641401468 +-2.27464033892030981221 +-2.27461876511852434390 +-2.27459716409257595160 +-2.27457553585397453944 +-2.27455388041422557066 +-2.27453219778483006763 +-2.27451048797728150319 +-2.27448875100307112973 +-2.27446698687368131786 +-2.27444519560058955321 +-2.27442337719527110096 +-2.27440153166919190042 +-2.27437965903381522637 +-2.27435775930059680405 +-2.27433583248098747376 +-2.27431387858643319078 +-2.27429189762837546951 +-2.27426988961824738666 +-2.27424785456747935442 +-2.27422579248749556768 +-2.27420370338971311597 +-2.27418158728554731240 +-2.27415944418640414426 +-2.27413727410368737836 +-2.27411507704879101155 +-2.27409285303310992887 +-2.27407060206802880131 +-2.27404832416492652669 +-2.27402601933518111466 +-2.27400368759016036080 +-2.27398132894122984027 +-2.27395894339974757870 +-2.27393653097706627264 +-2.27391409168453639822 +-2.27389162553349866158 +-2.27386913253529110435 +-2.27384661270124555088 +-2.27382406604268805239 +-2.27380149257093977511 +-2.27377889229731611209 +-2.27375626523312934779 +-2.27373361138968155259 +-2.27371093077827390871 +-2.27368822341019916067 +-2.27366548929674738844 +-2.27364272844920067840 +-2.27361994087883756421 +-2.27359712659693080639 +-2.27357428561474650408 +-2.27355141794354809193 +-2.27352852359458879050 +-2.27350560257912270856 +-2.27348265490839507308 +-2.27345968059364400560 +-2.27343667964610629539 +-2.27341365207700940587 +-2.27339059789757946817 +-2.27336751711903417572 +-2.27334440975258722517 +-2.27332127580944609591 +-2.27329811530081205007 +-2.27327492823788546161 +-2.27325171463185604637 +-2.27322847449390996744 +-2.27320520783522894703 +-2.27318191466698982239 +-2.27315859500036054897 +-2.27313524884650863811 +-2.27311187621659138713 +-2.27308847712176476108 +-2.27306505157317717547 +-2.27304159958197260494 +-2.27301812115928836278 +-2.27299461631625776548 +-2.27297108506400880046 +-2.27294752741366279380 +-2.27292394337633840706 +-2.27290033296314453182 +-2.27287669618518828329 +-2.27285303305357189174 +-2.27282934357938914971 +-2.27280562777373118521 +-2.27278188564768202085 +-2.27275811721232168239 +-2.27273432247872309020 +-2.27271050145795694419 +-2.27268665416108550659 +-2.27266278059916748688 +-2.27263888078325493325 +-2.27261495472439589705 +-2.27259100243363265648 +-2.27256702392200082841 +-2.27254301920053380925 +-2.27251898828025611365 +-2.27249493117218914762 +-2.27247084788734943217 +-2.27244673843674593883 +-2.27242260283138408639 +-2.27239844108226352049 +-2.27237425320037811360 +-2.27235003919671685324 +-2.27232579908226428600 +-2.27230153286799740897 +-2.27227724056489055471 +-2.27225292218391095034 +-2.27222857773602049392 +-2.27220420723217708669 +-2.27217981068333285677 +-2.27215538810043193862 +-2.27213093949441935493 +-2.27210646487622813794 +-2.27208196425679087582 +-2.27205743764703038678 +-2.27203288505786948903 +-2.27200830650022167490 +-2.27198370198499599582 +-2.27195907152309661825 +-2.27193441512542460003 +-2.27190973280287122904 +-2.27188502456632512860 +-2.27186029042667048117 +-2.27183553039478391966 +-2.27181074448153896839 +-2.27178593269780160213 +-2.27176109505443513115 +-2.27173623156229442799 +-2.27171134223223347703 +-2.27168642707509649270 +-2.27166148610172413669 +-2.27163651932295307390 +-2.27161152674961330789 +-2.27158650839252995723 +-2.27156146426252236736 +-2.27153639437040544280 +-2.27151129872698787082 +-2.27148617734307434191 +-2.27146103022946288519 +-2.27143585739694797709 +-2.27141065885631832089 +-2.27138543461835462622 +-2.27136018469383582641 +-2.27133490909353508158 +-2.27130960782821844646 +-2.27128428090864797895 +-2.27125892834558218425 +-2.27123355014977024169 +-2.27120814633195955423 +-2.27118271690289086351 +-2.27115726187329958208 +-2.27113178125391668161 +-2.27110627505546736060 +-2.27108074328867193259 +-2.27105518596424404976 +-2.27102960309289514385 +-2.27100399468532732072 +-2.27097836075224090990 +-2.27095270130433002365 +-2.27092701635228211288 +-2.27090130590678240807 +-2.27087556997850725793 +-2.27084980857812990251 +-2.27082402171631914101 +-2.27079820940373711124 +-2.27077237165104062200 +-2.27074650846888204114 +-2.27072061986790707522 +-2.27069470585875921032 +-2.27066876645207305074 +-2.27064280165848186854 +-2.27061681148860960988 +-2.27059079595307888866 +-2.27056475506250343699 +-2.27053868882749387836 +-2.27051259725865728356 +-2.27048648036659139748 +-2.27046033816189174459 +-2.27043417065514763209 +-2.27040797785694348221 +-2.27038175977785883219 +-2.27035551642846744613 +-2.27032924781933731495 +-2.27030295396103287686 +-2.27027663486411190874 +-2.27025029053912730248 +-2.27022392099662750908 +-2.27019752624715565048 +-2.27017110630124907544 +-2.27014466116943935958 +-2.27011819086225408171 +-2.27009169539021593565 +-2.27006517476384050980 +-2.27003862899364028394 +-2.27001205809012152059 +-2.26998546206378515322 +-2.26995884092512767438 +-2.26993219468463980348 +-2.26990552335280737495 +-2.26987882694011133822 +-2.26985210545702642548 +-2.26982535891402292805 +-2.26979858732156580814 +-2.26977179069011514301 +-2.26974496903012656901 +-2.26971812235204772890 +-2.26969125066632360088 +-2.26966435398339472229 +-2.26963743231369408093 +-2.26961048566765022372 +-2.26958351405568770076 +-2.26955651748822351266 +-2.26952949597567288365 +-2.26950244952844348845 +-2.26947537815693767271 +-2.26944828187155467347 +-2.26942116068268573414 +-2.26939401460071987771 +-2.26936684363603857761 +-2.26933964779901975461 +-2.26931242710003555629 +-2.26928518154945324525 +-2.26925791115763431094 +-2.26923061593493446964 +-2.26920329589170766127 +-2.26917595103829849990 +-2.26914858138504849094 +-2.26912118694229425486 +-2.26909376772036752712 +-2.26906632372959338184 +-2.26903885498029245227 +-2.26901136148278048665 +-2.26898384324736879236 +-2.26895630028436157133 +-2.26892873260405991687 +-2.26890114021675826095 +-2.26887352313274748283 +-2.26884588136231180044 +-2.26881821491573187899 +-2.26879052380328127825 +-2.26876280803522956120 +-2.26873506762184140584 +-2.26870730257337616109 +-2.26867951290008784682 +-2.26865169861222559788 +-2.26862385972003366419 +-2.26859599623375007837 +-2.26856810816360843219 +-2.26854019551983876468 +-2.26851225831266356536 +-2.26848429655230177104 +-2.26845631024896521311 +-2.26842829941286305839 +-2.26840026405419870059 +-2.26837220418316976023 +-2.26834411980996852876 +-2.26831601094478330083 +-2.26828787759779615385 +-2.26825971977918605660 +-2.26823153749912398425 +-2.26820333076777780335 +-2.26817509959531005137 +-2.26814684399187793673 +-2.26811856396763200650 +-2.26809025953272191956 +-2.26806193069728712075 +-2.26803357747146616674 +-2.26800519986539006467 +-2.26797679788918449262 +-2.26794837155297290820 +-2.26791992086686944319 +-2.26789144584098822932 +-2.26786294648543407249 +-2.26783442281030778176 +-2.26780587482570572533 +-2.26777730254172027458 +-2.26774870596843580728 +-2.26772008511593448077 +-2.26769143999429090286 +-2.26766277061357657274 +-2.26763407698385721645 +-2.26760535911519323093 +-2.26757661701764057227 +-2.26754785070124986746 +-2.26751906017606552624 +-2.26749024545212884973 +-2.26746140653947492183 +-2.26743254344813394141 +-2.26740365618813122239 +-2.26737474476948630553 +-2.26734580920221562295 +-2.26731684949632850135 +-2.26728786566182893836 +-2.26725885770871782299 +-2.26722982564698938290 +-2.26720076948663429306 +-2.26717168923763745525 +-2.26714258490997755402 +-2.26711345651362972120 +-2.26708430405856375955 +-2.26705512755474281050 +-2.26702592701212912729 +-2.26699670244067519320 +-2.26696745385033038289 +-2.26693818125103963013 +-2.26690888465274298369 +-2.26687956406537294285 +-2.26685021949886111869 +-2.26682085096312979644 +-2.26679145846809859677 +-2.26676204202368314355 +-2.26673260163979017889 +-2.26670313732632644488 +-2.26667364909318802546 +-2.26664413695027233686 +-2.26661460090746613716 +-2.26658504097465351990 +-2.26655545716171413773 +-2.26652584947852142605 +-2.26649621793494482347 +-2.26646656254084799542 +-2.26643688330608972237 +-2.26640718024052478796 +-2.26637745335400087043 +-2.26634770265636165121 +-2.26631792815744681491 +-2.26628812986708982891 +-2.26625830779512016377 +-2.26622846195136018466 +-2.26619859234562959216 +-2.26616869898774231373 +-2.26613878188750694775 +-2.26610884105472631944 +-2.26607887649920014539 +-2.26604888823072281312 +-2.26601887625908204882 +-2.26598884059406069369 +-2.26595878124543936849 +-2.26592869822299114446 +-2.26589859153648420786 +-2.26586846119568319224 +-2.26583830721034562572 +-2.26580812959022681596 +-2.26577792834507407704 +-2.26574770348463205849 +-2.26571745501863963668 +-2.26568718295682947073 +-2.26565688730893111114 +-2.26562656808466922342 +-2.26559622529376136768 +-2.26556585894592155128 +-2.26553546905085889662 +-2.26550505561827764112 +-2.26547461865787536084 +-2.26544415817934741142 +-2.26541367419238248715 +-2.26538316670666350916 +-2.26535263573187073405 +-2.26532208127767775707 +-2.26529150335375284442 +-2.26526090196976070956 +-2.26523027713536029282 +-2.26519962886020609361 +-2.26516895715394639410 +-2.26513826202622592376 +-2.26510754348668497116 +-2.26507680154495494307 +-2.26504603621066813446 +-2.26501524749344662624 +-2.26498443540291116705 +-2.26495359994867584419 +-2.26492274114034852772 +-2.26489185898753575543 +-2.26486095349983651559 +-2.26483002468684491149 +-2.26479907255815060552 +-2.26476809712333881919 +-2.26473709839198766858 +-2.26470607637367349341 +-2.26467503107796597206 +-2.26464396251442900976 +-2.26461287069262295901 +-2.26458175562210239917 +-2.26455061731241746870 +-2.26451945577311430924 +-2.26448827101373151294 +-2.26445706304380500740 +-2.26442583187286494706 +-2.26439457751043615730 +-2.26436329996603857850 +-2.26433199924918948653 +-2.26430067536939771955 +-2.26426932833616856300 +-2.26423795815900374961 +-2.26420656484739790670 +-2.26417514841084299704 +-2.26414370885882298978 +-2.26411224620082007775 +-2.26408076044630934831 +-2.26404925160476366841 +-2.26401771968564702320 +-2.26398616469842028920 +-2.26395458665254167840 +-2.26392298555746140920 +-2.26389136142262481499 +-2.26385971425747545283 +-2.26382804407144888614 +-2.26379635087397534932 +-2.26376463467448374445 +-2.26373289548239453595 +-2.26370113330712507960 +-2.26366934815808695802 +-2.26363754004468731296 +-2.26360570897632795706 +-2.26357385496240670619 +-2.26354197801231604714 +-2.26351007813544224945 +-2.26347815534116847402 +-2.26344620963887255272 +-2.26341424103792610012 +-2.26338224954769851038 +-2.26335023517755073996 +-2.26331819793684196895 +-2.26328613783492471612 +-2.26325405488114794750 +-2.26322194908485441189 +-2.26318982045538241721 +-2.26315766900206449819 +-2.26312549473423008095 +-2.26309329766120326255 +-2.26306107779230236687 +-2.26302883513684083283 +-2.26299656970412810253 +-2.26296428150346828900 +-2.26293197054416062031 +-2.26289963683549988360 +-2.26286728038677376063 +-2.26283490120726904493 +-2.26280249930626320420 +-2.26277007469303192977 +-2.26273762737684602797 +-2.26270515736697008791 +-2.26267266467266336960 +-2.26264014930318158036 +-2.26260761126777465435 +-2.26257505057568941709 +-2.26254246723616514458 +-2.26250986125843889241 +-2.26247723265173972251 +-2.26244458142529536460 +-2.26241190758832555474 +-2.26237921115004692041 +-2.26234649211967164817 +-2.26231375050640570734 +-2.26228098631945062635 +-2.26224819956800393683 +-2.26221539026125562089 +-2.26218255840839477244 +-2.26214970401860249183 +-2.26211682710105721483 +-2.26208392766492982773 +-2.26205100571938855225 +-2.26201806127359672516 +-2.26198509433671191005 +-2.26195210491788678553 +-2.26191909302626958933 +-2.26188605867100456237 +-2.26185300186122884014 +-2.26181992260607644951 +-2.26178682091467697646 +-2.26175369679615378971 +-2.26172055025962537300 +-2.26168738131420576920 +-2.26165418996900635662 +-2.26162097623313007588 +-2.26158774011567631490 +-2.26155448162574135296 +-2.26152120077241258755 +-2.26148789756477830437 +-2.26145457201191701913 +-2.26142122412290502709 +-2.26138785390681151810 +-2.26135446137270390565 +-2.26132104652964205371 +-2.26128760938668316172 +-2.26125414995287776776 +-2.26122066823727196905 +-2.26118716424890919825 +-2.26115363799682356216 +-2.26112008949004872349 +-2.26108651873761168360 +-2.26105292574853500298 +-2.26101931053183458076 +-2.26098567309652498381 +-2.26095201345161411766 +-2.26091833160610278242 +-2.26088462756899133410 +-2.26085090134927213512 +-2.26081715295593399517 +-2.26078338239796083897 +-2.26074958968433126216 +-2.26071577482401897541 +-2.26068193782599413666 +-2.26064807869922068662 +-2.26061419745265856918 +-2.26058029409526239917 +-2.26054636863598190644 +-2.26051242108376282403 +-2.26047845144754555591 +-2.26044445973626562107 +-2.26041044595885320945 +-2.26037641012423495823 +-2.26034235224133128739 +-2.26030827231905995234 +-2.26027417036633115899 +-2.26024004639205289280 +-2.26020590040512603380 +-2.26017173241444746523 +-2.26013754242891140578 +-2.26010333045740274827 +-2.26006909650880682960 +-2.26003484059200099310 +-2.26000056271585725298 +-2.25996626288924407078 +-2.25993194112102591120 +-2.25989759742006146581 +-2.25986323179520498527 +-2.25982884425530494710 +-2.25979443480920627607 +-2.25976000346574856792 +-2.25972555023376564520 +-2.25969107512208911004 +-2.25965657813954345912 +-2.25962205929494919232 +-2.25958751859712192456 +-2.25955295605487371802 +-2.25951837167700864129 +-2.25948376547232987477 +-2.25944913744963349345 +-2.25941448761771113141 +-2.25937981598534953775 +-2.25934512256133146479 +-2.25931040735443433576 +-2.25927567037343068890 +-2.25924091162708817748 +-2.25920613112417001389 +-2.25917132887343585779 +-2.25913650488363781932 +-2.25910165916352490001 +-2.25906679172184254867 +-2.25903190256732866459 +-2.25899699170871848253 +-2.25896205915474146408 +-2.25892710491412307405 +-2.25889212899558300407 +-2.25885713140783650488 +-2.25882211215959527451 +-2.25878707125956523782 +-2.25875200871644654654 +-2.25871692453893713193 +-2.25868181873572693164 +-2.25864669131550499515 +-2.25861154228695193424 +-2.25857637165874614027 +-2.25854117943955889913 +-2.25850596563805927630 +-2.25847073026291145226 +-2.25843547332277205797 +-2.25840019482629550396 +-2.25836489478213042759 +-2.25832957319892191350 +-2.25829423008530838501 +-2.25825886544992560090 +-2.25822347930140221450 +-2.25818807164836465873 +-2.25815264249943270514 +-2.25811719186322168440 +-2.25808171974834470674 +-2.25804622616340555652 +-2.25801071111700668581 +-2.25797517461774521763 +-2.25793961667421294592 +-2.25790403729499677965 +-2.25786843648868051915 +-2.25783281426384085933 +-2.25779717062905138647 +-2.25776150559288080188 +-2.25772581916389158962 +-2.25769011135064401330 +-2.25765438216169167518 +-2.25761863160558373664 +-2.25758285969086625045 +-2.25754706642607771983 +-2.25751125181975398348 +-2.25747541588042555105 +-2.25743955861661849127 +-2.25740368003685398790 +-2.25736778014964922789 +-2.25733185896351384869 +-2.25729591648695748773 +-2.25725995272848001250 +-2.25722396769657951410 +-2.25718796139975008685 +-2.25715193384647916375 +-2.25711588504524884868 +-2.25707981500453991330 +-2.25704372373282557973 +-2.25700761123857462920 +-2.25697147753025229022 +-2.25693532261631757407 +-2.25689914650522682749 +-2.25686294920542884768 +-2.25682673072537198777 +-2.25679049107349438685 +-2.25675423025823507217 +-2.25671794828802241284 +-2.25668164517128655433 +-2.25664532091644831624 +-2.25660897553192496545 +-2.25657260902612932796 +-2.25653622140747023295 +-2.25649981268435118054 +-2.25646338286516945359 +-2.25642693195832144681 +-2.25639045997219422901 +-2.25635396691517353673 +-2.25631745279563977746 +-2.25628091762196802961 +-2.25624436140252759841 +-2.25620778414568645687 +-2.25617118585980414025 +-2.25613456655323751932 +-2.25609792623433857983 +-2.25606126491145575486 +-2.25602458259292948384 +-2.25598787928709842987 +-2.25595115500229548289 +-2.25591440974684953602 +-2.25587764352908415333 +-2.25584085635731845798 +-2.25580404823986624407 +-2.25576721918503819708 +-2.25573036920113834114 +-2.25569349829646847994 +-2.25565660647932242355 +-2.25561969375799220572 +-2.25558276014076408700 +-2.25554580563592033116 +-2.25550883025173654062 +-2.25547183399648698554 +-2.25543481687843705430 +-2.25539777890585124709 +-2.25536072008698740277 +-2.25532364043009980747 +-2.25528653994343653011 +-2.25524941863524208685 +-2.25521227651375610890 +-2.25517511358721467474 +-2.25513792986384720152 +-2.25510072535187910958 +-2.25506350005953137838 +-2.25502625399502187875 +-2.25498898716656004382 +-2.25495169958235486263 +-2.25491439125060821880 +-2.25487706217951711096 +-2.25483971237727542913 +-2.25480234185207129016 +-2.25476495061208837001 +-2.25472753866550545965 +-2.25469010602049824143 +-2.25465265268523484821 +-2.25461517866788208053 +-2.25457768397659963355 +-2.25454016861954409379 +-2.25450263260486538641 +-2.25446507594071121616 +-2.25442749863522395870 +-2.25438990069653932835 +-2.25435228213279170717 +-2.25431464295210659543 +-2.25427698316261126976 +-2.25423930277242101639 +-2.25420160178965156561 +-2.25416388022241243050 +-2.25412613807880735095 +-2.25408837536693829051 +-2.25405059209489921912 +-2.25401278827078099809 +-2.25397496390267182420 +-2.25393711899865190063 +-2.25389925356679832191 +-2.25386136761518374172 +-2.25382346115187592872 +-2.25378553418493821070 +-2.25374758672242947455 +-2.25370961877240194582 +-2.25367163034290607371 +-2.25363362144198786652 +-2.25359559207768489486 +-2.25355754225803428525 +-2.25351947199106650288 +-2.25348138128480623976 +-2.25344327014727685565 +-2.25340513858649504897 +-2.25336698661047263315 +-2.25332881422721786890 +-2.25329062144473279972 +-2.25325240827101724861 +-2.25321417471406393318 +-2.25317592078186246241 +-2.25313764648239711619 +-2.25309935182364862172 +-2.25306103681359193303 +-2.25302270146019933961 +-2.25298434577143380508 +-2.25294596975526006943 +-2.25290757341963310267 +-2.25286915677250654255 +-2.25283071982182736548 +-2.25279226257553855106 +-2.25275378504157997028 +-2.25271528722788438870 +-2.25267676914238101915 +-2.25263823079299552177 +-2.25259967218764822761 +-2.25256109333425325048 +-2.25252249424072248374 +-2.25248387491496249169 +-2.25244523536487362136 +-2.25240657559835577572 +-2.25236789562329908776 +-2.25232919544759280228 +-2.25229047507911905868 +-2.25225173452575866406 +-2.25221297379538398786 +-2.25217419289586473496 +-2.25213539183506705754 +-2.25209657062085089052 +-2.25205772926107217202 +-2.25201886776358106701 +-2.25197998613622640818 +-2.25194108438684814644 +-2.25190216252328623270 +-2.25186322055337084791 +-2.25182425848493217302 +-2.25178527632579328355 +-2.25174627408377414639 +-2.25170725176668806711 +-2.25166820938234524263 +-2.25162914693855320536 +-2.25159006444311016182 +-2.25155096190381431853 +-2.25151183932845677660 +-2.25147269672482375213 +-2.25143353410069968490 +-2.25139435146386102105 +-2.25135514882208154219 +-2.25131592618313058907 +-2.25127668355477217332 +-2.25123742094476675391 +-2.25119813836086768433 +-2.25115883581082698583 +-2.25111951330239135061 +-2.25108017084330036539 +-2.25104080844129272876 +-2.25100142610409958976 +-2.25096202383944943293 +-2.25092260165506452552 +-2.25088315955866447027 +-2.25084369755796309676 +-2.25080421566067068184 +-2.25076471387449039696 +-2.25072519220712408128 +-2.25068565066626735671 +-2.25064608925961184838 +-2.25060650799484340823 +-2.25056690687964477959 +-2.25052728592169382082 +-2.25048764512866350529 +-2.25044798450822236546 +-2.25040830406803449293 +-2.25036860381575909429 +-2.25032888375905137934 +-2.25028914390556167291 +-2.25024938426293541482 +-2.25020960483881449221 +-2.25016980564083546312 +-2.25012998667662955654 +-2.25009014795382533691 +-2.25005028948004648370 +-2.25001041126291045913 +-2.24997051331003161678 +-2.24993059562901942527 +-2.24989065822747935641 +-2.24985070111301155293 +-2.24981072429321082851 +-2.24977072777567066453 +-2.24973071156797566061 +-2.24969067567770864002 +-2.24965062011244842921 +-2.24961054487976763738 +-2.24957044998723398876 +-2.24953033544241343122 +-2.24949020125286436311 +-2.24945004742614207416 +-2.24940987396979652502 +-2.24936968089137456772 +-2.24932946819841772523 +-2.24928923589846263553 +-2.24924898399904238389 +-2.24920871250768383831 +-2.24916842143191075820 +-2.24912811077924157388 +-2.24908778055719205113 +-2.24904743077327129441 +-2.24900706143498441136 +-2.24896667254983251283 +-2.24892626412531138058 +-2.24888583616891279959 +-2.24884538868812544621 +-2.24880492169043000317 +-2.24876443518330582094 +-2.24872392917422603276 +-2.24868340367066110730 +-2.24864285868007440783 +-2.24860229420992618898 +-2.24856171026767359677 +-2.24852110686076578361 +-2.24848048399665012553 +-2.24843984168276822544 +-2.24839917992655990986 +-2.24835849873545612354 +-2.24831779811688603488 +-2.24827707807827437136 +-2.24823633862704008735 +-2.24819557977059858445 +-2.24815480151635904704 +-2.24811400387172977133 +-2.24807318684411194809 +-2.24803235044090232719 +-2.24799149466949277354 +-2.24795061953727159931 +-2.24790972505162400807 +-2.24786881121992720978 +-2.24782787804955619393 +-2.24778692554788328550 +-2.24774595372227015133 +-2.24770496258008156687 +-2.24766395212867298170 +-2.24762292237539540452 +-2.24758187332759762356 +-2.24754080499262309800 +-2.24749971737781040204 +-2.24745861049049233671 +-2.24741748433800081486 +-2.24737633892765886756 +-2.24733517426678952589 +-2.24729399036270782730 +-2.24725278722272570064 +-2.24721156485414930160 +-2.24717032326428434175 +-2.24712906246042631864 +-2.24708778244987028572 +-2.24704648323990552328 +-2.24700516483781775889 +-2.24696382725088605881 +-2.24692247048638726881 +-2.24688109455159246153 +-2.24683969945376871280 +-2.24679828520017910165 +-2.24675685179808048986 +-2.24671539925472796284 +-2.24667392757736950060 +-2.24663243677324953040 +-2.24659092684960937092 +-2.24654939781368501173 +-2.24650784967270578107 +-2.24646628243390056312 +-2.24642469610448980433 +-2.24638309069169306298 +-2.24634146620272234784 +-2.24629982264478700316 +-2.24625816002509237634 +-2.24621647835083670941 +-2.24617477762921780027 +-2.24613305786742412096 +-2.24609131907264414352 +-2.24604956125206056683 +-2.24600778441284898435 +-2.24596598856218365725 +-2.24592417370723307357 +-2.24588233985516305680 +-2.24584048701313143681 +-2.24579861518829515532 +-2.24575672438780449269 +-2.24571481461880528840 +-2.24567288588844116148 +-2.24563093820384818144 +-2.24558897157216152962 +-2.24554698600050750557 +-2.24550498149601196474 +-2.24546295806579454535 +-2.24542091571697044472 +-2.24537885445664997519 +-2.24533677429194034048 +-2.24529467522994385931 +-2.24525255727775752135 +-2.24521042044247431946 +-2.24516826473118324969 +-2.24512609015096931131 +-2.24508389670891128631 +-2.24504168441208529217 +-2.24499945326756167319 +-2.24495720328240810915 +-2.24491493446368428621 +-2.24487264681845077874 +-2.24483034035375883519 +-2.24478801507665881587 +-2.24474567099419308747 +-2.24470330811340312849 +-2.24466092644132375611 +-2.24461852598498623479 +-2.24457610675141738810 +-2.24453366874763871053 +-2.24449121198066903204 +-2.24444873645752052127 +-2.24440624218520357047 +-2.24436372917072057831 +-2.24432119742107349936 +-2.24427864694325718276 +-2.24423607774426292494 +-2.24419348983107802553 +-2.24415088321068401100 +-2.24410825789005885511 +-2.24406561387617742298 +-2.24402295117600791841 +-2.24398026979651410429 +-2.24393756974465752307 +-2.24389485102739438815 +-2.24385211365167513975 +-2.24380935762444666537 +-2.24376658295265141163 +-2.24372378964322960471 +-2.24368097770311303307 +-2.24363814713923215294 +-2.24359529795851120326 +-2.24355243016787087029 +-2.24350954377422784347 +-2.24346663878449348317 +-2.24342371520557470888 +-2.24338077304437577553 +-2.24333781230779338856 +-2.24329483300272292112 +-2.24325183513605397323 +-2.24320881871467125990 +-2.24316578374545683161 +-2.24312273023528563343 +-2.24307965819103083405 +-2.24303656761956071719 +-2.24299345852773646115 +-2.24295033092241924422 +-2.24290718481046180699 +-2.24286402019871555780 +-2.24282083709402568772 +-2.24277763550323339103 +-2.24273441543317630931 +-2.24269117689068542276 +-2.24264791988259037936 +-2.24260464441571460981 +-2.24256135049687710392 +-2.24251803813289285472 +-2.24247470733057285841 +-2.24243135809672278214 +-2.24238799043814429623 +-2.24234460436163596242 +-2.24230119987398923698 +-2.24225777698199468801 +-2.24221433569243400186 +-2.24217087601208930892 +-2.24212739794773474600 +-2.24208390150614222947 +-2.24204038669407834661 +-2.24199685351830435565 +-2.24195330198558018253 +-2.24190973210265731552 +-2.24186614387628679879 +-2.24182253731321168289 +-2.24177891242017457429 +-2.24173526920390919770 +-2.24169160767114927779 +-2.24164792782862054565 +-2.24160422968304651192 +-2.24156051324114669043 +-2.24151677850963348959 +-2.24147302549521842963 +-2.24142925420460548125 +-2.24138546464449728290 +-2.24134165682158847943 +-2.24129783074257415976 +-2.24125398641414008694 +-2.24121012384297069175 +-2.24116624303574596411 +-2.24112234399913923255 +-2.24107842673982116111 +-2.24103449126445974926 +-2.24099053757971455880 +-2.24094656569224381926 +-2.24090257560870176334 +-2.24085856733573640653 +-2.24081454087999087932 +-2.24077049624810609174 +-2.24072643344671806886 +-2.24068235248245795077 +-2.24063825336195243665 +-2.24059413609182378480 +-2.24055000067869070079 +-2.24050584712916656116 +-2.24046167544986163378 +-2.24041748564737996929 +-2.24037327772832384198 +-2.24032905169928886480 +-2.24028480756686532160 +-2.24024054533764438446 +-2.24019626501820834363 +-2.24015196661513460441 +-2.24010765013499968390 +-2.24006331558437299378 +-2.24001896296982083712 +-2.23997459229790552016 +-2.23993020357518357599 +-2.23988579680820754092 +-2.23984137200352684260 +-2.23979692916768602373 +-2.23975246830722429792 +-2.23970798942867732606 +-2.23966349253857721635 +-2.23961897764345030382 +-2.23957444474981937077 +-2.23952989386420231455 +-2.23948532499311392385 +-2.23944073814306277015 +-2.23939613332055431627 +-2.23935151053209002825 +-2.23930686978416648714 +-2.23926221108327538900 +-2.23921753443590576538 +-2.23917283984853998646 +-2.23912812732765731383 +-2.23908339687973345633 +-2.23903864851123923785 +-2.23899388222864015319 +-2.23894909803839814444 +-2.23890429594697160098 +-2.23885947596081358313 +-2.23881463808637226620 +-2.23876978233009404917 +-2.23872490869841733740 +-2.23868001719777920400 +-2.23863510783461183706 +-2.23859018061534165156 +-2.23854523554639150973 +-2.23850027263418072110 +-2.23845529188512415431 +-2.23841029330563090483 +-2.23836527690210829178 +-2.23832024268095652886 +-2.23827519064857272113 +-2.23823012081135042095 +-2.23818503317567740751 +-2.23813992774793923957 +-2.23809480453451392634 +-2.23804966354177903298 +-2.23800450477610413103 +-2.23795932824385657156 +-2.23791413395140059706 +-2.23786892190509245637 +-2.23782369211128839837 +-2.23777844457633534603 +-2.23773317930658199870 +-2.23768789630836772986 +-2.23764259558802880434 +-2.23759727715189793429 +-2.23755194100630472320 +-2.23750658715757300143 +-2.23746121561202038208 +-2.23741582637596447825 +-2.23737041945571579760 +-2.23732499485757951874 +-2.23727955258785948800 +-2.23723409265285377856 +-2.23718861505885691088 +-2.23714311981215629999 +-2.23709760691903936092 +-2.23705207638578640328 +-2.23700652821867329578 +-2.23696096242397324261 +-2.23691537900795411886 +-2.23686977797688069103 +-2.23682415933701062016 +-2.23677852309460023505 +-2.23673286925590053542 +-2.23668719782715808009 +-2.23664150881461409881 +-2.23659580222450848908 +-2.23655007806307448703 +-2.23650433633654088794 +-2.23645857705113337843 +-2.23641280021307320425 +-2.23636700582857672615 +-2.23632119390385586399 +-2.23627536444511987312 +-2.23622951745857179162 +-2.23618365295041154894 +-2.23613777092683285730 +-2.23609187139402898481 +-2.23604595435818520599 +-2.23600001982548501900 +-2.23595406780210437248 +-2.23590809829422143551 +-2.23586211130800105451 +-2.23581610684961074043 +-2.23577008492521223104 +-2.23572404554096149099 +-2.23567798870301004399 +-2.23563191441750808153 +-2.23558582269059913372 +-2.23553971352842140163 +-2.23549358693711264223 +-2.23544744292280217479 +-2.23540128149161843041 +-2.23535510264968229066 +-2.23530890640311374895 +-2.23526269275802524916 +-2.23521646172052923518 +-2.23517021329672926910 +-2.23512394749272669259 +-2.23507766431461973866 +-2.23503136376850042311 +-2.23498504586045809717 +-2.23493871059657545075 +-2.23489235798293472968 +-2.23484598802560929798 +-2.23479960073067340787 +-2.23475319610419198568 +-2.23470677415222951367 +-2.23466033488084381275 +-2.23461387829609048339 +-2.23456740440401890879 +-2.23452091321067536356 +-2.23447440472210212548 +-2.23442787894433569917 +-2.23438133588341036884 +-2.23433477554535420140 +-2.23428819793619304335 +-2.23424160306194696801 +-2.23419499092863205192 +-2.23414836154226081888 +-2.23410171490884001955 +-2.23405505103437507231 +-2.23400836992486340193 +-2.23396167158630110094 +-2.23391495602467893278 +-2.23386822324598277589 +-2.23382147325619673239 +-2.23377470606129646669 +-2.23372792166725764318 +-2.23368112008005015312 +-2.23363430130563855869 +-2.23358746534998253708 +-2.23354061221904220957 +-2.23349374191876837159 +-2.23344685445510959809 +-2.23339994983401135542 +-2.23335302806141111631 +-2.23330608914324768577 +-2.23325913308545009883 +-2.23321215989394694645 +-2.23316516957466149051 +-2.23311816213351166382 +-2.23307113757641362284 +-2.23302409590927553040 +-2.23297703713800554937 +-2.23292996126850473715 +-2.23288286830667148664 +-2.23283575825839841755 +-2.23278863112957592918 +-2.23274148692608731537 +-2.23269432565381542588 +-2.23264714731863511687 +-2.23259995192641991224 +-2.23255273948303845089 +-2.23250550999435359856 +-2.23245826346622511238 +-2.23241099990450964086 +-2.23236371931505761523 +-2.23231642170371680223 +-2.23226910707632830722 +-2.23222177543873412375 +-2.23217442679676603134 +-2.23212706115625447723 +-2.23207967852302591183 +-2.23203227890290278879 +-2.23198486230170267675 +-2.23193742872523870346 +-2.23188997817931955581 +-2.23184251066975081201 +-2.23179502620233272125 +-2.23174752478286242408 +-2.23170000641713217604 +-2.23165247111093068000 +-2.23160491887004086564 +-2.23155734970024299813 +-2.23150976360731334580 +-2.23146216059702240386 +-2.23141454067513755888 +-2.23136690384742220061 +-2.23131925011963438976 +-2.23127157949752863431 +-2.23122389198685677769 +-2.23117618759336355794 +-2.23112846632279104853 +-2.23108072818087821432 +-2.23103297317335780292 +-2.23098520130595812105 +-2.23093741258440703135 +-2.23088960701442395873 +-2.23084178460172521952 +-2.23079394535202446548 +-2.23074608927103001932 +-2.23069821636444576285 +-2.23065032663797246926 +-2.23060242009730469448 +-2.23055449674813521810 +-2.23050655659615193471 +-2.23045859964703785394 +-2.23041062590647154451 +-2.23036263538012846652 +-2.23031462807367875101 +-2.23026660399279030855 +-2.23021856314312483249 +-2.23017050553033957527 +-2.23012243116009045707 +-2.23007434003802673672 +-2.23002623216979323217 +-2.22997810756103298502 +-2.22992996621738148733 +-2.22988180814447423117 +-2.22983363334793782684 +-2.22978544183339888463 +-2.22973723360647779757 +-2.22968900867278918554 +-2.22964076703794855661 +-2.22959250870756209295 +-2.22954423368723331222 +-2.22949594198256395572 +-2.22944763359914777112 +-2.22939930854257672976 +-2.22935096681843880617 +-2.22930260843231708989 +-2.22925423338978934140 +-2.22920584169643198891 +-2.22915743335781435519 +-2.22910900837950354259 +-2.22906056676706221253 +-2.22901210852604769741 +-2.22896363366201510914 +-2.22891514218051378649 +-2.22886663408708862733 +-2.22881810938728230909 +-2.22876956808663084786 +-2.22872101019066892746 +-2.22867243570492501448 +-2.22862384463492313458 +-2.22857523698618553709 +-2.22852661276422781000 +-2.22847797197456332086 +-2.22842931462269921994 +-2.22838064071414043710 +-2.22833195025438612902 +-2.22828324324893278785 +-2.22823451970327335303 +-2.22818577962289232630 +-2.22813702301327554167 +-2.22808824987990128363 +-2.22803946022824383988 +-2.22799065406377616583 +-2.22794183139196411148 +-2.22789299221826908592 +-2.22784413654815161010 +-2.22779526438706598768 +-2.22774637574046074917 +-2.22769747061378264874 +-2.22764854901247444374 +-2.22759961094197311837 +-2.22755065640771343638 +-2.22750168541512261200 +-2.22745269796962874764 +-2.22740369407665061985 +-2.22735467374160789333 +-2.22730563696991223921 +-2.22725658376697133178 +-2.22720751413819195719 +-2.22715842808897424021 +-2.22710932562471430884 +-2.22706020675080385018 +-2.22701107147263188679 +-2.22696191979558255625 +-2.22691275172503555524 +-2.22686356726636658365 +-2.22681436642494734457 +-2.22676514920614510018 +-2.22671591561532489223 +-2.22666666565784332477 +-2.22661739933905744593 +-2.22656811666431853070 +-2.22651881763897296906 +-2.22646950226836315423 +-2.22642017055782792667 +-2.22637082251270213007 +-2.22632145813831616721 +-2.22627207743999644407 +-2.22622268042306581393 +-2.22617326709284135688 +-2.22612383745463704443 +-2.22607439151376329534 +-2.22602492927552519930 +-2.22597545074522606967 +-2.22592595592816122618 +-2.22587644482962554449 +-2.22582691745490812707 +-2.22577737380929363553 +-2.22572781389806317875 +-2.22567823772649520109 +-2.22562864529986015327 +-2.22557903662342893014 +-2.22552941170246443292 +-2.22547977054222911875 +-2.22543011314797789524 +-2.22538043952496300548 +-2.22533074967843402803 +-2.22528104361363388008 +-2.22523132133580370251 +-2.22518158285017841891 +-2.22513182816198984426 +-2.22508205727646624084 +-2.22503227019883143001 +-2.22498246693430479226 +-2.22493264748810082310 +-2.22488281186543224166 +-2.22483296007150510576 +-2.22478309211152325275 +-2.22473320799068607911 +-2.22468330771418720815 +-2.22463339128721804272 +-2.22458345871496598889 +-2.22453351000261401182 +-2.22448354515533930353 +-2.22443356417831727967 +-2.22438356707671802681 +-2.22433355385570852292 +-2.22428352452044997278 +-2.22423347907610091667 +-2.22418341752781545395 +-2.22413333988074457537 +-2.22408324614003216624 +-2.22403313631082122370 +-2.22398301039824985992 +-2.22393286840745041388 +-2.22388271034355300415 +-2.22383253621168419656 +-2.22378234601696389561 +-2.22373213976451022944 +-2.22368191745943599713 +-2.22363167910685177731 +-2.22358142471185971090 +-2.22353115427956371519 +-2.22348086781505838161 +-2.22343056532343874565 +-2.22338024680979273739 +-2.22332991227920384603 +-2.22327956173675467255 +-2.22322919518752026846 +-2.22317881263657435298 +-2.22312841408898487217 +-2.22307799954981488710 +-2.22302756902412701479 +-2.22297712251697499042 +-2.22292666003341432557 +-2.22287618157848987366 +-2.22282568715724648811 +-2.22277517677472502555 +-2.22272465043596101353 +-2.22267410814598553870 +-2.22262354990982702319 +-2.22257297573250989231 +-2.22252238561905279823 +-2.22247177957447128449 +-2.22242115760377734190 +-2.22237051971197807632 +-2.22231986590407704085 +-2.22226919618507334775 +-2.22221851055996300062 +-2.22216780903373711809 +-2.22211709161138237789 +-2.22206635829788101688 +-2.22201560909821438372 +-2.22196484401735672165 +-2.22191406306027738893 +-2.22186326623194618790 +-2.22181245353732226278 +-2.22176162498136786638 +-2.22171078056903681386 +-2.22165992030527892354 +-2.22160904419504179330 +-2.22155815224326769197 +-2.22150724445489444747 +-2.22145632083485899955 +-2.22140538138808851798 +-2.22135442611951239300 +-2.22130345503405202123 +-2.22125246813662480250 +-2.22120146543214680435 +-2.22115044692552743300 +-2.22109941262167254195 +-2.22104836252548532016 +-2.22099729664186318345 +-2.22094621497570043900 +-2.22089511753188739718 +-2.22084400431531081566 +-2.22079287533085123485 +-2.22074173058338786291 +-2.22069057007779369073 +-2.22063939381893993286 +-2.22058820181169158658 +-2.22053699406091054058 +-2.22048577057145557490 +-2.22043453134817925232 +-2.22038327639593191520 +-2.22033200571955990910 +-2.22028071932390380638 +-2.22022941721380284719 +-2.22017809939408916620 +-2.22012676586959356584 +-2.22007541664514151947 +-2.22002405172555361546 +-2.21997267111564955400 +-2.21992127482024059759 +-2.21986986284413800874 +-2.21981843519214594451 +-2.21976699186906722971 +-2.21971553287969936008 +-2.21966405822883494636 +-2.21961256792126349069 +-2.21956106196177094247 +-2.21950954035513881024 +-2.21945800310614460571 +-2.21940645021956139971 +-2.21935488170015871034 +-2.21930329755270161485 +-2.21925169778195252590 +-2.21920008239266808303 +-2.21914845138960048487 +-2.21909680477750104188 +-2.21904514256111484727 +-2.21899346474518210925 +-2.21894177133444170380 +-2.21889006233362584553 +-2.21883833774746319634 +-2.21878659758068108587 +-2.21873484183799929426 +-2.21868307052413626934 +-2.21863128364380424173 +-2.21857948120171277751 +-2.21852766320256744592 +-2.21847582965106981945 +-2.21842398055191658557 +-2.21837211590980221132 +-2.21832023572941494649 +-2.21826834001544082042 +-2.21821642877255964521 +-2.21816450200545078886 +-2.21811255971878740212 +-2.21806060191723686259 +-2.21800862860546654787 +-2.21795663978813717421 +-2.21790463546990634924 +-2.21785261565542679563 +-2.21780058034934857147 +-2.21774852955631684992 +-2.21769646328097325139 +-2.21764438152795539949 +-2.21759228430189558878 +-2.21754017160742566972 +-2.21748804344916861098 +-2.21743589983174693714 +-2.21738374075977917599 +-2.21733156623787630579 +-2.21727937627065152526 +-2.21722717086270737497 +-2.21717495001864595139 +-2.21712271374306624239 +-2.21707046204056146266 +-2.21701819491571994192 +-2.21696591237312912170 +-2.21691361441736978222 +-2.21686130105302048321 +-2.21680897228465401128 +-2.21675662811683960030 +-2.21670426855414515188 +-2.21665189360113190631 +-2.21659950326235621887 +-2.21654709754237400077 +-2.21649467644573361369 +-2.21644223997698208706 +-2.21638978814066156531 +-2.21633732094130930790 +-2.21628483838345990975 +-2.21623234047164308080 +-2.21617982721038542238 +-2.21612729860420909489 +-2.21607475465763181788 +-2.21602219537516864634 +-2.21596962076132930619 +-2.21591703082061997065 +-2.21586442555754370431 +-2.21581180497659957496 +-2.21575916908227998903 +-2.21570651787907735297 +-2.21565385137147696781 +-2.21560116956396191412 +-2.21554847246101083158 +-2.21549576006709925124 +-2.21544303238669737510 +-2.21539028942427140834 +-2.21533753118428355933 +-2.21528475767119514828 +-2.21523196888945905769 +-2.21517916484352817008 +-2.21512634553784737435 +-2.21507351097686067121 +-2.21502066116500762050 +-2.21496779610672289706 +-2.21491491580643806714 +-2.21486202026858070013 +-2.21480910949757348050 +-2.21475618349783642813 +-2.21470324227378467796 +-2.21465028582983025629 +-2.21459731417038030443 +-2.21454432729983885508 +-2.21449132522260550004 +-2.21443830794307627841 +-2.21438527546564190018 +-2.21433222779469218722 +-2.21427916493460941183 +-2.21422608688977451408 +-2.21417299366456399312 +-2.21411988526334857497 +-2.21406676169049898562 +-2.21401362295037662520 +-2.21396046904734378202 +-2.21390729998575652715 +-2.21385411576996782301 +-2.21380091640432574707 +-2.21374770189317437996 +-2.21369447224085558190 +-2.21364122745170632811 +-2.21358796753005782065 +-2.21353469248024037341 +-2.21348140230657985938 +-2.21342809701339549022 +-2.21337477660500647758 +-2.21332144108572448360 +-2.21326809045985939406 +-2.21321472473171709794 +-2.21316134390559904332 +-2.21310794798580179332 +-2.21305453697662102286 +-2.21300111088234441326 +-2.21294766970726008992 +-2.21289421345564774057 +-2.21284074213178705293 +-2.21278725573995105336 +-2.21273375428441143598 +-2.21268023776943367764 +-2.21262670619927881432 +-2.21257315957820788199 +-2.21251959791047347892 +-2.21246602120032775929 +-2.21241242945201621595 +-2.21235882266978300947 +-2.21230520085786608320 +-2.21225156402050027182 +-2.21219791216191818961 +-2.21214424528634578948 +-2.21209056339800680391 +-2.21203686650112141265 +-2.21198315459990357823 +-2.21192942769856681906 +-2.21187568580131665996 +-2.21182192891235951393 +-2.21176815703589424444 +-2.21171437017611527409 +-2.21166056833721835773 +-2.21160675152338814797 +-2.21155291973881062972 +-2.21149907298766690289 +-2.21144521127413273831 +-2.21139133460238124229 +-2.21133744297657974798 +-2.21128353640089603260 +-2.21122961487948943571 +-2.21117567841651663230 +-2.21112172701613163284 +-2.21106776068248356282 +-2.21101377941971843910 +-2.21095978323197694948 +-2.21090577212339800539 +-2.21085174609811430102 +-2.21079770516025631011 +-2.21074364931395006550 +-2.21068957856331849143 +-2.21063549291247829487 +-2.21058139236554529461 +-2.21052727692662953629 +-2.21047314659983751284 +-2.21041900138927260855 +-2.21036484129903332274 +-2.21031066633321460202 +-2.21025647649590917254 +-2.21020227179120132277 +-2.21014805222317711753 +-2.21009381779591551620 +-2.21003956851349148138 +-2.20998530437997642295 +-2.20993102539944130669 +-2.20987673157594644024 +-2.20982242291355390762 +-2.20976809941632001966 +-2.20971376108829797857 +-2.20965940793353476934 +-2.20960503995607604466 +-2.20955065715996257225 +-2.20949625954923156712 +-2.20944184712791624747 +-2.20938741990004539062 +-2.20933297786964510934 +-2.20927852104073707551 +-2.20922404941733896422 +-2.20916956300346312148 +-2.20911506180312189329 +-2.20906054582032007616 +-2.20900601505905980204 +-2.20895146952334098245 +-2.20889690921715686756 +-2.20884233414449848709 +-2.20878774430935376216 +-2.20873313971570395253 +-2.20867852036752987388 +-2.20862388626880568054 +-2.20856923742350463868 +-2.20851457383559202086 +-2.20845989550903265553 +-2.20840520244778781844 +-2.20835049465581256811 +-2.20829577213705796623 +-2.20824103489547418633 +-2.20818628293500518467 +-2.20813151625959269708 +-2.20807673487317224215 +-2.20802193877967711799 +-2.20796712798303795822 +-2.20791230248717784690 +-2.20785746229601986812 +-2.20780260741348177689 +-2.20774773784347777550 +-2.20769285358991673718 +-2.20763795465670487062 +-2.20758304104774571996 +-2.20752811276693750031 +-2.20747316981817442993 +-2.20741821220534806258 +-2.20736323993234506702 +-2.20730825300304811520 +-2.20725325142133765866 +-2.20719823519108926391 +-2.20714320431617405660 +-2.20708815880046049784 +-2.20703309864781171967 +-2.20697802386208907777 +-2.20692293444714859874 +-2.20686783040684364465 +-2.20681271174502180443 +-2.20675757846552844654 +-2.20670243057220494265 +-2.20664726806888955579 +-2.20659209095941477585 +-2.20653689924760998409 +-2.20648169293730234131 +-2.20642647203231279107 +-2.20637123653646005650 +-2.20631598645355886390 +-2.20626072178741949870 +-2.20620544254184913768 +-2.20615014872065007268 +-2.20609484032762281913 +-2.20603951736656123117 +-2.20598417984125783065 +-2.20592882775550114260 +-2.20587346111307436303 +-2.20581807991775624700 +-2.20576268417332599370 +-2.20570727388355480869 +-2.20565184905221034484 +-2.20559640968306025499 +-2.20554095577986331023 +-2.20548548734637783753 +-2.20543000438635683480 +-2.20537450690355063543 +-2.20531899490170602007 +-2.20526346838456355215 +-2.20520792735586201871 +-2.20515237181933665411 +-2.20509680177871869589 +-2.20504121723773360841 +-2.20498561820010552381 +-2.20493000466955324512 +-2.20487437664979379903 +-2.20481873414453710680 +-2.20476307715749308969 +-2.20470740569236411943 +-2.20465171975285167960 +-2.20459601934265325696 +-2.20454030446546056510 +-2.20448457512496309718 +-2.20442883132484634956 +-2.20437307306879048951 +-2.20431730036047612842 +-2.20426151320357410768 +-2.20420571160175660097 +-2.20414989555868956472 +-2.20409406507803584674 +-2.20403822016345340984 +-2.20398236081859799640 +-2.20392648704712135199 +-2.20387059885267078130 +-2.20381469623888959219 +-2.20375877920941709576 +-2.20370284776789082670 +-2.20364690191794343477 +-2.20359094166320224062 +-2.20353496700729278857 +-2.20347897795383662611 +-2.20342297450645085988 +-2.20336695666874948785 +-2.20331092444434073485 +-2.20325487783683149345 +-2.20319881684982510350 +-2.20314274148691913169 +-2.20308665175170803607 +-2.20303054764778361019 +-2.20297442917873276258 +-2.20291829634813884908 +-2.20286214915958167282 +-2.20280598761663748419 +-2.20274981172287809272 +-2.20269362148187219930 +-2.20263741689718406391 +-2.20258119797237528203 +-2.20252496471100256414 +-2.20246871711661951210 +-2.20241245519277573095 +-2.20235617894301638486 +-2.20229988837088530573 +-2.20224358347992010820 +-2.20218726427365485421 +-2.20213093075562182932 +-2.20207458292934665778 +-2.20201822079835407564 +-2.20196184436616215763 +-2.20190545363628809028 +-2.20184904861224461925 +-2.20179262929753871703 +-2.20173619569567646792 +-2.20167974781015729491 +-2.20162328564447928869 +-2.20156680920213609909 +-2.20151031848661782320 +-2.20145381350140967314 +-2.20139729424999375240 +-2.20134076073585038813 +-2.20128421296245146976 +-2.20122765093327021901 +-2.20117107465177275216 +-2.20111448412142429731 +-2.20105787934568342123 +-2.20100126032800647025 +-2.20094462707184579386 +-2.20088797958064974480 +-2.20083131785786445533 +-2.20077464190693072865 +-2.20071795173128492706 +-2.20066124733436208061 +-2.20060452871959189025 +-2.20054779589040006016 +-2.20049104885021007405 +-2.20043428760244053066 +-2.20037751215050647602 +-2.20032072249781984752 +-2.20026391864778725349 +-2.20020710060381352591 +-2.20015026836929905585 +-2.20009342194763979350 +-2.20003656134222946861 +-2.19997968655645603775 +-2.19992279759370568115 +-2.19986589445736013815 +-2.19980897715079715127 +-2.19975204567739135442 +-2.19969510004051294061 +-2.19963814024352855014 +-2.19958116628980171470 +-2.19952417818269241323 +-2.19946717592555529563 +-2.19941015952174323544 +-2.19935312897460422121 +-2.19929608428748313287 +-2.19923902546372040945 +-2.19918195250665338136 +-2.19912486541961582631 +-2.19906776420593752519 +-2.19901064886894470618 +-2.19895351941195960066 +-2.19889637583830133138 +-2.19883921815128413613 +-2.19878204635421958812 +-2.19872486045041570790 +-2.19866766044317651918 +-2.19861044633580204888 +-2.19855321813158832711 +-2.19849597583382916355 +-2.19843871944581259470 +-2.19838144897082621299 +-2.19832416441214828495 +-2.19826686577306107395 +-2.19820955305683574110 +-2.19815222626674433570 +-2.19809488540605446616 +-2.19803753047802796772 +-2.19798016148592623153 +-2.19792277843300354334 +-2.19786538132251374478 +-2.19780797015770534841 +-2.19775054494182153775 +-2.19769310567810594037 +-2.19763565236979374617 +-2.19757818502012192141 +-2.19752070363231810646 +-2.19746320820960949760 +-2.19740569875522018251 +-2.19734817527236803159 +-2.19729063776426913890 +-2.19723308623413604579 +-2.19717552068517552044 +-2.19711794112059211059 +-2.19706034754358858763 +-2.19700273995736106158 +-2.19694511836510208980 +-2.19688748277000334141 +-2.19682983317524893607 +-2.19677216958402432567 +-2.19671449199950608033 +-2.19665680042487032608 +-2.19659909486328741579 +-2.19654137531792681415 +-2.19648364179195265677 +-2.19642589428852419431 +-2.19636813281079978921 +-2.19631035736193158669 +-2.19625256794506995561 +-2.19619476456336082393 +-2.19613694721994612280 +-2.19607911591796467476 +-2.19602127066055130555 +-2.19596341145083817636 +-2.19590553829195211932 +-2.19584765118701730202 +-2.19578975013915433934 +-2.19573183515147984934 +-2.19567390622710689740 +-2.19561596336914544025 +-2.19555800658070099374 +-2.19550003586487507690 +-2.19544205122476743242 +-2.19538405266347158573 +-2.19532604018408017410 +-2.19526801378967961753 +-2.19520997348335500376 +-2.19515191926818520329 +-2.19509385114724908661 +-2.19503576912361708651 +-2.19497767320036096805 +-2.19491956338054494680 +-2.19486143966723235010 +-2.19480330206348073219 +-2.19474515057234587090 +-2.19468698519687777093 +-2.19462880594012510471 +-2.19457061280513165968 +-2.19451240579493767058 +-2.19445418491257937532 +-2.19439595016109123549 +-2.19433770154350238357 +-2.19427943906283706710 +-2.19422116272212042176 +-2.19416287252436781330 +-2.19410456847259638380 +-2.19404625056981705811 +-2.19398791881903854062 +-2.19392957322326287439 +-2.19387121378549210249 +-2.19381284050872205071 +-2.19375445339594765670 +-2.19369605245015764083 +-2.19363763767433761487 +-2.19357920907147097012 +-2.19352076664453576882 +-2.19346231039650829686 +-2.19340384033035862288 +-2.19334535644905637142 +-2.19328685875556494977 +-2.19322834725284510071 +-2.19316982194385534655 +-2.19311128283154710417 +-2.19305272991887223455 +-2.19299416320877638142 +-2.19293558270420207990 +-2.19287698840808920053 +-2.19281838032337317301 +-2.19275975845298587430 +-2.19270112279985518455 +-2.19264247336690587531 +-2.19258381015706005357 +-2.19252513317323449726 +-2.19246644241834420797 +-2.19240773789529797000 +-2.19234901960700456769 +-2.19229028755636523584 +-2.19223154174628120927 +-2.19217278217964750553 +-2.19211400885935692173 +-2.19205522178829870228 +-2.19199642096935809477 +-2.19193760640541546181 +-2.19187877809935027784 +-2.19181993605403713232 +-2.19176108027234572972 +-2.19170221075714533043 +-2.19164332751129808941 +-2.19158443053766438524 +-2.19152551983910148792 +-2.19146659541846222652 +-2.19140765727859632150 +-2.19134870542234860835 +-2.19128973985256170209 +-2.19123076057207688550 +-2.19117176758372478318 +-2.19111276089034001657 +-2.19105374049475010167 +-2.19099470639978033404 +-2.19093565860824934788 +-2.19087659712297622150 +-2.19081752194677337187 +-2.19075843308245277186 +-2.19069933053281928892 +-2.19064021430067734642 +-2.19058108438882603863 +-2.19052194080006001897 +-2.19046278353717305265 +-2.19040361260295401991 +-2.19034442800018780417 +-2.19028522973165484800 +-2.19022601780013470574 +-2.19016679220840115860 +-2.19010755295922709962 +-2.19004830005537831639 +-2.18998903349961748788 +-2.18992975329470729307 +-2.18987045944340419368 +-2.18981115194846021055 +-2.18975183081262558815 +-2.18969249603864657416 +-2.18963314762926586354 +-2.18957378558722259854 +-2.18951440991525148050 +-2.18945502061608543443 +-2.18939561769245250034 +-2.18933620114707716553 +-2.18927677098268169686 +-2.18921732720198303213 +-2.18915786980769500047 +-2.18909839880252965472 +-2.18903891418919416267 +-2.18897941597038991901 +-2.18891990414881920657 +-2.18886037872717809094 +-2.18880083970815952910 +-2.18874128709445248120 +-2.18868172088874324288 +-2.18862214109371455706 +-2.18856254771204472576 +-2.18850294074640938646 +-2.18844332019948062396 +-2.18838368607392741438 +-2.18832403837241207256 +-2.18826437709759913375 +-2.18820470225214425142 +-2.18814501383870130269 +-2.18808531185992150014 +-2.18802559631845250365 +-2.18796586721693842037 +-2.18790612455801758429 +-2.18784636834432832941 +-2.18778659857850232839 +-2.18772681526317080980 +-2.18766701840095834086 +-2.18760720799448771245 +-2.18754738404637860683 +-2.18748754655924582124 +-2.18742769553570193253 +-2.18736783097835507661 +-2.18730795288981072488 +-2.18724806127266946376 +-2.18718815612952965921 +-2.18712823746298612448 +-2.18706830527562967603 +-2.18700835957004713350 +-2.18694840034882309610 +-2.18688842761453816621 +-2.18682844136976850535 +-2.18676844161708849867 +-2.18670842835906764634 +-2.18664840159827189581 +-2.18658836133726497408 +-2.18652830757860572319 +-2.18646824032485032063 +-2.18640815957855139118 +-2.18634806534225756280 +-2.18628795761851479895 +-2.18622783640986506626 +-2.18616770171884544638 +-2.18610755354799302097 +-2.18604739189983776626 +-2.18598721677690877030 +-2.18592702818172979207 +-2.18586682611682192601 +-2.18580661058470360203 +-2.18574638158788792097 +-2.18568613912888531914 +-2.18562588321020356830 +-2.18556561383434688750 +-2.18550533100381416673 +-2.18544503472110207554 +-2.18538472498870550709 +-2.18532440180911224914 +-2.18526406518481008945 +-2.18520371511827971034 +-2.18514335161200312641 +-2.18508297466845391455 +-2.18502258429010653984 +-2.18496218047942791785 +-2.18490176323888274368 +-2.18484133257093615654 +-2.18478088847804530204 +-2.18472043096266377304 +-2.18465996002724427427 +-2.18459947567423462544 +-2.18453897790607998175 +-2.18447846672522150158 +-2.18441794213409590242 +-2.18435740413513812541 +-2.18429685273077955898 +-2.18423628792344626248 +-2.18417570971556207482 +-2.18411511810954905854 +-2.18405451310782261487 +-2.18399389471279725683 +-2.18393326292688172430 +-2.18387261775248431306 +-2.18381195919200621347 +-2.18375128724784905998 +-2.18369060192240782570 +-2.18362990321807570737 +-2.18356919113724279313 +-2.18350846568229428613 +-2.18344772685561139269 +-2.18338697465957531918 +-2.18332620909656061059 +-2.18326543016893914739 +-2.18320463787908014552 +-2.18314383222934926820 +-2.18308301322210773776 +-2.18302218085971277972 +-2.18296133514452161961 +-2.18290047607888393344 +-2.18283960366514939722 +-2.18277871790566102561 +-2.18271781880276138921 +-2.18265690635878684134 +-2.18259598057607373534 +-2.18253504145695087502 +-2.18247408900374662011 +-2.18241312321878622171 +-2.18235214410438782551 +-2.18229115166287046534 +-2.18223014589654829010 +-2.18216912680773056366 +-2.18210809439872388538 +-2.18204704867183307826 +-2.18198598962935719214 +-2.18192491727359350051 +-2.18186383160683483595 +-2.18180273263137181061 +-2.18174162034949015165 +-2.18168049476347292170 +-2.18161935587560051886 +-2.18155820368814845622 +-2.18149703820338869420 +-2.18143585942359230501 +-2.18137466735102414361 +-2.18131346198794773272 +-2.18125224333662037779 +-2.18119101139929982835 +-2.18112976617823761671 +-2.18106850767568216654 +-2.18100723589388012513 +-2.18094595083507281075 +-2.18088465250149976526 +-2.18082334089539520150 +-2.18076201601899155591 +-2.18070067787451771224 +-2.18063932646419855743 +-2.18057796179025586980 +-2.18051658385490654268 +-2.18045519266036835759 +-2.18039378820885065835 +-2.18033237050256278877 +-2.18027093954370876361 +-2.18020949533449082125 +-2.18014803787710631511 +-2.18008656717374993406 +-2.18002508322661325835 +-2.17996358603788387143 +-2.17990207560974624812 +-2.17984055194438175462 +-2.17977901504396731625 +-2.17971746491067852602 +-2.17965590154668475975 +-2.17959432495415406095 +-2.17953273513525180860 +-2.17947113209213805263 +-2.17940951582696973432 +-2.17934788634190113044 +-2.17928624363908385320 +-2.17922458772066418575 +-2.17916291858878530263 +-2.17910123624559037836 +-2.17903954069321370568 +-2.17897783193379179778 +-2.17891610996945317424 +-2.17885437480232591057 +-2.17879262643453275317 +-2.17873086486819511620 +-2.17866909010543041703 +-2.17860730214835074392 +-2.17854550099906774108 +-2.17848368665968683544 +-2.17842185913231389804 +-2.17836001841904725040 +-2.17829816452198388177 +-2.17823629744321811685 +-2.17817441718483983948 +-2.17811252374893626893 +-2.17805061713758973951 +-2.17798869735288080918 +-2.17792676439688737133 +-2.17786481827168110215 +-2.17780285897933278960 +-2.17774088652191011306 +-2.17767890090147409055 +-2.17761690212008662826 +-2.17755489017980474742 +-2.17749286508268014018 +-2.17743082683076449868 +-2.17736877542610329783 +-2.17730671087074068026 +-2.17724463316671590363 +-2.17718254231606511695 +-2.17712043832082313699 +-2.17705832118301856326 +-2.17699619090467910709 +-2.17693404748782848301 +-2.17687189093448463240 +-2.17680972124666594070 +-2.17674753842638502022 +-2.17668534247565226281 +-2.17662313339647450761 +-2.17656091119085415286 +-2.17649867586079182047 +-2.17643642740828502369 +-2.17637416583532594672 +-2.17631189114390455330 +-2.17624960333600858675 +-2.17618730241362046129 +-2.17612498837872125890 +-2.17606266123328717654 +-2.17600032097929174668 +-2.17593796761870494905 +-2.17587560115349409884 +-2.17581322158562162628 +-2.17575082891704951749 +-2.17568842314973354135 +-2.17562600428562724630 +-2.17556357232668107216 +-2.17550112727484323827 +-2.17543866913205485858 +-2.17537619790025837929 +-2.17531371358139047345 +-2.17525121617738470547 +-2.17518870569017064298 +-2.17512618212167696541 +-2.17506364547382702312 +-2.17500109574854105787 +-2.17493853294773709095 +-2.17487595707332781458 +-2.17481336812722547691 +-2.17475076611133610882 +-2.17468815102756485302 +-2.17462552287781196725 +-2.17456288166397548878 +-2.17450022738794856991 +-2.17443756005162303069 +-2.17437487965688625025 +-2.17431218620562249910 +-2.17424947969971382733 +-2.17418676014103651184 +-2.17412402753146638545 +-2.17406128187287350784 +-2.17399852316712660638 +-2.17393575141609085577 +-2.17387296662162654570 +-2.17381016878559307770 +-2.17374735790984363604 +-2.17368453399623096089 +-2.17362169704660290748 +-2.17355884706280555463 +-2.17349598404667920803 +-2.17343310800006284111 +-2.17337021892479231866 +-2.17330731682269906457 +-2.17324440169561183822 +-2.17318147354535629034 +-2.17311853237375363079 +-2.17305557818262373715 +-2.17299261097378249019 +-2.17292963074904177390 +-2.17286663751021080770 +-2.17280363125909481425 +-2.17274061199749768392 +-2.17267757972721708981 +-2.17261453445005114915 +-2.17255147616779131781 +-2.17248840488222727529 +-2.17242532059514603660 +-2.17236222330832973171 +-2.17229911302355871427 +-2.17223598974261022931 +-2.17217285346725708095 +-2.17210970419926852060 +-2.17204654194041246740 +-2.17198336669245284369 +-2.17192017845714824276 +-2.17185697723625814604 +-2.17179376303153448546 +-2.17173053584472919297 +-2.17166729567758798325 +-2.17160404253185745915 +-2.17154077640927667403 +-2.17147749731158468123 +-2.17141420524051387275 +-2.17135090019779886106 +-2.17128758218516360046 +-2.17122425120433648615 +-2.17116090725703614339 +-2.17109755034498341786 +-2.17103418046989204981 +-2.17097079763347355907 +-2.17090740183743768910 +-2.17084399308348885427 +-2.17078057137333013671 +-2.17071713670865928947 +-2.17065368909117317742 +-2.17059022852256422453 +-2.17052675500452130208 +-2.17046326853873106089 +-2.17039976912687659905 +-2.17033625677063657378 +-2.17027273147168742184 +-2.17020919323170424775 +-2.17014564205235505057 +-2.17008207793530782936 +-2.17001850088222525414 +-2.16995491089476910673 +-2.16989130797459539579 +-2.16982769212335835363 +-2.16976406334270954801 +-2.16970042163429566173 +-2.16963676699976204532 +-2.16957309944074916430 +-2.16950941895889481970 +-2.16944572555583459206 +-2.16938201923319962106 +-2.16931829999261882591 +-2.16925456783571757313 +-2.16919082276411590016 +-2.16912706477943473260 +-2.16906329388328966701 +-2.16899951007729230312 +-2.16893571336305246433 +-2.16887190374217508904 +-2.16880808121626555973 +-2.16874424578692082122 +-2.16868039745573915056 +-2.16861653622431305166 +-2.16855266209423369617 +-2.16848877506708692664 +-2.16842487514445769747 +-2.16836096232792563399 +-2.16829703661906814105 +-2.16823309801946040309 +-2.16816914653067316365 +-2.16810518215427405764 +-2.16804120489182805542 +-2.16797721474489701876 +-2.16791321171503925669 +-2.16784919580380952553 +-2.16778516701276036116 +-2.16772112534344119084 +-2.16765707079739611274 +-2.16759300337616922505 +-2.16752892308130018506 +-2.16746482991432465326 +-2.16740072387677518151 +-2.16733660497018254532 +-2.16727247319607352338 +-2.16720832855597178579 +-2.16714417105139656172 +-2.16708000068386663628 +-2.16701581745489679776 +-2.16695162136599561720 +-2.16688741241867344201 +-2.16682319061443307007 +-2.16675895595477818745 +-2.16669470844120493069 +-2.16663044807521032453 +-2.16656617485828562053 +-2.16650188879192029390 +-2.16643758987760026713 +-2.16637327811680791001 +-2.16630895351102292778 +-2.16624461606172102890 +-2.16618026577037658953 +-2.16611590263846043314 +-2.16605152666743716594 +-2.16598713785877317051 +-2.16592273621392772398 +-2.16585832173435877124 +-2.16579389442152203671 +-2.16572945427686702757 +-2.16566500130184325101 +-2.16560053549789577332 +-2.16553605686646477579 +-2.16547156540899177202 +-2.16540706112691072605 +-2.16534254402165604603 +-2.16527801409465503468 +-2.16521347134733499473 +-2.16514891578112056436 +-2.16508434739743016451 +-2.16501976619768088383 +-2.16495517218328759057 +-2.16489056535566071204 +-2.16482594571620801105 +-2.16476131326633369767 +-2.16469666800744020563 +-2.16463200994092463958 +-2.16456733906818321600 +-2.16450265539060771047 +-2.16443795890958723405 +-2.16437324962650823323 +-2.16430852754275315775 +-2.16424379265970090458 +-2.16417904497872948255 +-2.16411428450121201550 +-2.16404951122851896272 +-2.16398472516201723082 +-2.16391992630307195000 +-2.16385511465304292145 +-2.16379029021328994631 +-2.16372545298516705259 +-2.16366060297002604784 +-2.16359574016921563100 +-2.16353086458408361281 +-2.16346597621596936634 +-2.16340107506621404099 +-2.16333616113615523346 +-2.16327123442712387913 +-2.16320629494045224561 +-2.16314134267746638329 +-2.16307637763949101029 +-2.16301139982784773608 +-2.16294640924385328518 +-2.16288140588882349391 +-2.16281638976407064590 +-2.16275136087090169568 +-2.16268631921062448598 +-2.16262126478453975409 +-2.16255619759394823731 +-2.16249111764014712023 +-2.16242602492442781426 +-2.16236091944808128673 +-2.16229580121239628454 +-2.16223067021865578141 +-2.16216552646814186289 +-2.16210036996213039728 +-2.16203520070189902924 +-2.16197001868871874208 +-2.16190482392385874277 +-2.16183961640858468556 +-2.16177439614415911606 +-2.16170916313184147128 +-2.16164391737288941187 +-2.16157865886855660165 +-2.16151338762009270766 +-2.16144810362874739695 +-2.16138280689576278704 +-2.16131749742238188361 +-2.16125217520984147512 +-2.16118684025937879412 +-2.16112149257222485588 +-2.16105613214961067570 +-2.16099075899276149570 +-2.16092537310289900532 +-2.16085997448124578213 +-2.16079456312901818649 +-2.16072913904743035829 +-2.16066370223769377290 +-2.16059825270101502070 +-2.16053279043860024800 +-2.16046731545165204835 +-2.16040182774136813038 +-2.16033632730894575857 +-2.16027081415557686839 +-2.16020528828245117481 +-2.16013974969075572830 +-2.16007419838167535886 +-2.16000863435639001153 +-2.15994305761607829908 +-2.15987746816191394927 +-2.15981186599506891355 +-2.15974625111671247879 +-2.15968062352801082326 +-2.15961498323012524025 +-2.15954933022421702304 +-2.15948366451144124767 +-2.15941798609295299016 +-2.15935229496990332976 +-2.15928659114343757253 +-2.15922087461470280090 +-2.15915514538483943596 +-2.15908940345498701063 +-2.15902364882627972875 +-2.15895788149985268234 +-2.15889210147683385799 +-2.15882630875835035411 +-2.15876050334552482823 +-2.15869468523947993788 +-2.15862885444133167923 +-2.15856301095219604846 +-2.15849715477318415680 +-2.15843128590540356271 +-2.15836540434996182469 +-2.15829951010796117217 +-2.15823360318050072593 +-2.15816768356867916268 +-2.15810175127358716551 +-2.15803580629631763799 +-2.15796984863795815457 +-2.15790387829959318111 +-2.15783789528230540711 +-2.15777189958717308116 +-2.15770589121527178733 +-2.15763987016767444516 +-2.15757383644545219781 +-2.15750779004966997121 +-2.15744173098139491174 +-2.15737565924168483988 +-2.15730957483159935251 +-2.15724347775219404966 +-2.15717736800451964641 +-2.15711124558962685782 +-2.15704511050856018173 +-2.15697896276236544821 +-2.15691280235208049376 +-2.15684662927874359895 +-2.15678044354338949162 +-2.15671424514704845876 +-2.15664803409075034324 +-2.15658181037551965886 +-2.15651557400237958717 +-2.15644932497234975699 +-2.15638306328644624443 +-2.15631678894568290517 +-2.15625050195107137441 +-2.15618420230361795831 +-2.15611789000432807484 +-2.15605156505420447743 +-2.15598522745424636682 +-2.15591887720544850282 +-2.15585251430880431300 +-2.15578613876530411630 +-2.15571975057593467895 +-2.15565334974168143489 +-2.15558693626352537720 +-2.15552051014244394622 +-2.15545407137941325004 +-2.15538761997540673221 +-2.15532115593139250720 +-2.15525467924833824540 +-2.15518818992720717631 +-2.15512168796896030898 +-2.15505517337455643201 +-2.15498864614494944902 +-2.15492210628109237547 +-2.15485555378393245363 +-2.15478898865441736987 +-2.15472241089349036969 +-2.15465582050209247811 +-2.15458921748116027928 +-2.15452260183162769280 +-2.15445597355442819421 +-2.15438933265048948584 +-2.15432267912073704963 +-2.15425601296609414703 +-2.15418933418748137498 +-2.15412264278581488952 +-2.15405593876200995851 +-2.15398922211697652074 +-2.15392249285162451500 +-2.15385575096685855101 +-2.15378899646358146214 +-2.15372222934269297312 +-2.15365544960508925598 +-2.15358865725166515048 +-2.15352185228331105549 +-2.15345503470091514941 +-2.15338820450536294615 +-2.15332136169753729504 +-2.15325450627831571637 +-2.15318763824857750677 +-2.15312075760919396927 +-2.15305386436103773917 +-2.15298695850497479043 +-2.15292004004187109700 +-2.15285310897258952423 +-2.15278616529798894064 +-2.15271920901892466205 +-2.15265224013625244837 +-2.15258525865081962181 +-2.15251826456347705729 +-2.15245125787506852433 +-2.15238423858643557196 +-2.15231720669841752880 +-2.15225016221185061482 +-2.15218310512756882957 +-2.15211603544640261987 +-2.15204895316917932391 +-2.15198185829672317126 +-2.15191475082985750333 +-2.15184763076940033244 +-2.15178049811616833864 +-2.15171335287097509337 +-2.15164619503463061534 +-2.15157902460794225874 +-2.15151184159171515731 +-2.15144464598675178024 +-2.15137743779385015586 +-2.15131021701380742428 +-2.15124298364741761702 +-2.15117573769546943652 +-2.15110847915875202929 +-2.15104120803804965689 +-2.15097392433414391633 +-2.15090662804781507234 +-2.15083931917983894877 +-2.15077199773098870494 +-2.15070466370203527973 +-2.15063731709374694745 +-2.15056995790688709747 +-2.15050258614221911913 +-2.15043520180050284907 +-2.15036780488249368304 +-2.15030039538894568452 +-2.15023297332060936427 +-2.15016553867823301260 +-2.15009809146256269941 +-2.15003063167433872138 +-2.14996315931430181934 +-2.14989567438318918136 +-2.14982817688173311055 +-2.14976066681066635411 +-2.14969314417071544199 +-2.14962560896260779231 +-2.14955806118706460595 +-2.14949050084480441924 +-2.14942292793654798899 +-2.14935534246300585792 +-2.14928774442489078922 +-2.14922013382291243744 +-2.14915251065777468398 +-2.14908487493018096615 +-2.14901722664083161263 +-2.14894956579042428757 +-2.14888189237965177014 +-2.14881420640920861587 +-2.14874650787978183075 +-2.14867879679205797672 +-2.14861107314672095114 +-2.14854333694445021052 +-2.14847558818592432317 +-2.14840782687181741650 +-2.14834005300280184159 +-2.14827226657954772904 +-2.14820446760272076858 +-2.14813665607298531768 +-2.14806883199100218107 +-2.14800099535742905488 +-2.14793314617292230295 +-2.14786528443813384825 +-2.14779741015371383739 +-2.14772952332030930833 +-2.14766162393856507862 +-2.14759371200912196898 +-2.14752578753261946787 +-2.14745785050969217878 +-2.14738990094097470518 +-2.14732193882709676558 +-2.14725396416868674621 +-2.14718597696636859240 +-2.14711797722076536132 +-2.14704996493249522516 +-2.14698194010217635608 +-2.14691390273042115311 +-2.14684585281784201527 +-2.14677779036504645660 +-2.14670971537263888251 +-2.14664162784122503069 +-2.14657352777140264521 +-2.14650541516377035833 +-2.14643729001892147323 +-2.14636915233744884901 +-2.14630100211994090387 +-2.14623283936698472374 +-2.14616466407916162140 +-2.14609647625705513008 +-2.14602827590124256574 +-2.14596006301229813573 +-2.14589183759079560332 +-2.14582359963730429087 +-2.14575534915239085620 +-2.14568708613662062490 +-2.14561881059055536980 +-2.14555052251475197878 +-2.14548222190976956014 +-2.14541390877615922861 +-2.14534558311447298706 +-2.14527724492525750932 +-2.14520889420905902512 +-2.14514053096642021146 +-2.14507215519788019265 +-2.14500376690397676072 +-2.14493536608524326681 +-2.14486695274221128571 +-2.14479852687541150402 +-2.14473008848536794702 +-2.14466163757260508405 +-2.14459317413764338767 +-2.14452469818100199817 +-2.14445620970319472676 +-2.14438770870473538466 +-2.14431919518613200992 +-2.14425066914789397288 +-2.14418213059052487068 +-2.14411357951452608006 +-2.14404501592039764546 +-2.14397643980863472635 +-2.14390785117973159402 +-2.14383925003418029931 +-2.14377063637246667582 +-2.14370201019507833351 +-2.14363337150249755325 +-2.14356472029520439548 +-2.14349605657367670020 +-2.14342738033838831058 +-2.14335869158981218163 +-2.14328999032841815975 +-2.14322127655467253859 +-2.14315255026903850322 +-2.14308381147197879457 +-2.14301506016395126863 +-2.14294629634541244911 +-2.14287752001681441882 +-2.14280873117860970467 +-2.14273992983124506040 +-2.14267111597516590749 +-2.14260228961081544696 +-2.14253345073863243897 +-2.14246459935905519956 +-2.14239573547251760388 +-2.14232685907945308301 +-2.14225797018028929486 +-2.14218906877545345324 +-2.14212015486536877518 +-2.14205122845045758950 +-2.14198228953113778417 +-2.14191333810782591485 +-2.14184437418093454042 +-2.14177539775087533158 +-2.14170640881805507405 +-2.14163740738288010945 +-2.14156839344575233852 +-2.14149936700707321791 +-2.14143032806723754291 +-2.14136127662664188520 +-2.14129221268567793146 +-2.14122313624473425975 +-2.14115404730420033630 +-2.14108494586445718966 +-2.14101583192588851290 +-2.14094670548887133776 +-2.14087756655378269599 +-2.14080841512099739887 +-2.14073925119088404045 +-2.14067007476381210296 +-2.14060088584014840407 +-2.14053168442025354423 +-2.14046247050448945615 +-2.14039324409321451981 +-2.14032400518678223023 +-2.14025475378554652650 +-2.14018548988985646275 +-2.14011621350005931674 +-2.14004692461650103397 +-2.13997762323952178676 +-2.13990830936946263563 +-2.13983898300665886794 +-2.13976964415144532694 +-2.13970029280415419137 +-2.13963092896511453134 +-2.13956155263465142014 +-2.13949216381308904289 +-2.13942276250074936428 +-2.13935334869794946400 +-2.13928392240500686583 +-2.13921448362223376449 +-2.13914503234994102243 +-2.13907556858843772574 +-2.13900609233802718734 +-2.13893660359901449652 +-2.13886710237169985760 +-2.13879758865637947807 +-2.13872806245335000952 +-2.13865852376290277448 +-2.13858897258532820729 +-2.13851940892091407775 +-2.13844983276994415888 +-2.13838024413270177959 +-2.13831064300946538381 +-2.13824102940051297139 +-2.13817140330611854537 +-2.13810176472655388835 +-2.13803211366208811839 +-2.13796245011298857719 +-2.13789277407951860965 +-2.13782308556194022842 +-2.13775338456051100522 +-2.13768367107549028816 +-2.13761394510712898764 +-2.13754420665567979043 +-2.13747445572139138648 +-2.13740469230450891303 +-2.13733491640527617506 +-2.13726512802393564527 +-2.13719532716072446732 +-2.13712551381587756438 +-2.13705568798962985966 +-2.13698584968221139135 +-2.13691599889385086541 +-2.13684613562477343507 +-2.13677625987520247719 +-2.13670637164535737185 +-2.13663647093545838729 +-2.13656655774571824224 +-2.13649663207635187590 +-2.13642669392756845426 +-2.13635674329957625517 +-2.13628678019258044785 +-2.13621680460678353697 +-2.13614681654238580677 +-2.13607681599958532104 +-2.13600680297857659085 +-2.13593677747955190682 +-2.13586673950270222733 +-2.13579668904821406983 +-2.13572662611627306362 +-2.13565655070706172936 +-2.13558646282075903500 +-2.13551636245754261623 +-2.13544624961758788828 +-2.13537612430106715777 +-2.13530598650814917860 +-2.13523583623900270467 +-2.13516567349379160490 +-2.13509549827267752775 +-2.13502531057582123353 +-2.13495511040337948572 +-2.13488489775550727146 +-2.13481467263235646925 +-2.13474443503407629308 +-2.13467418496081462465 +-2.13460392241271579294 +-2.13453364738992190652 +-2.13446335989257329757 +-2.13439305992080541330 +-2.13432274747475503318 +-2.13425242255455227536 +-2.13418208516032814615 +-2.13411173529220965506 +-2.13404137295032025889 +-2.13397099813478385855 +-2.13390061084571813765 +-2.13383021108324122395 +-2.13375979884746813653 +-2.13368937413851034179 +-2.13361893695647841795 +-2.13354848730147894642 +-2.13347802517361673225 +-2.13340755057299436004 +-2.13333706349971130578 +-2.13326656395386393683 +-2.13319605193554773237 +-2.13312552744485595113 +-2.13305499048187652278 +-2.13298444104669959742 +-2.13291387913940688748 +-2.13284330476008276989 +-2.13277271790880718072 +-2.13270211858565650331 +-2.13263150679070712101 +-2.13256088252403053218 +-2.13249024578569690291 +-2.13241959657577506704 +-2.13234893489432852931 +-2.13227826074142123858 +-2.13220757411711270279 +-2.13213687502146109765 +-2.13206616345452149019 +-2.13199543941634761524 +-2.13192470290698787849 +-2.13185395392649335022 +-2.13178319247490666299 +-2.13171241855227266981 +-2.13164163215863133871 +-2.13157083329402086136 +-2.13150002195847720898 +-2.13142919815203368827 +-2.13135836187472138548 +-2.13128751312656872230 +-2.13121665190760056774 +-2.13114577821784223488 +-2.13107489205731370774 +-2.13100399342603408215 +-2.13093308232401978941 +-2.13086215875128415220 +-2.13079122270783916093 +-2.13072027419369369738 +-2.13064931320885397881 +-2.13057833975332444609 +-2.13050735382710776378 +-2.13043635543020171141 +-2.13036534456260273629 +-2.13029432122430728569 +-2.13022328541530692192 +-2.13015223713559009866 +-2.13008117638514526959 +-2.13001010316395644750 +-2.12993901747200720109 +-2.12986791930927576999 +-2.12979680867574128200 +-2.12972568557137842404 +-2.12965454999615966258 +-2.12958340195005613182 +-2.12951224143303541325 +-2.12944106844506242382 +-2.12936988298610208048 +-2.12929868505611352703 +-2.12922747465505590725 +-2.12915625178288481223 +-2.12908501643955494487 +-2.12901376862501656717 +-2.12894250833921816479 +-2.12887123558210733520 +-2.12879995035362723499 +-2.12872865265372057664 +-2.12865734248232563175 +-2.12858601983937978375 +-2.12851468472481775152 +-2.12844333713857114532 +-2.12837197708057068724 +-2.12830060455074310255 +-2.12822921954901378427 +-2.12815782207530501680 +-2.12808641212953775224 +-2.12801498971162850182 +-2.12794355482149510905 +-2.12787210745904964426 +-2.12780064762420284552 +-2.12772917531686278636 +-2.12765769053693665214 +-2.12758619328432674322 +-2.12751468355893669226 +-2.12744316136066302647 +-2.12737162668940449350 +-2.12730007954505495604 +-2.12722851992750605632 +-2.12715694783664677203 +-2.12708536327236608088 +-2.12701376623454718739 +-2.12694215672307418430 +-2.12687053473782627933 +-2.12679890027868268021 +-2.12672725334551726561 +-2.12665559393820480238 +-2.12658392205661606056 +-2.12651223770061781337 +-2.12644054087007861042 +-2.12636883156486122814 +-2.12629710978482844297 +-2.12622537552983725817 +-2.12615362879974600929 +-2.12608186959440947916 +-2.12601009791367934199 +-2.12593831375740682788 +-2.12586651712543739379 +-2.12579470801761738485 +-2.12572288643379003759 +-2.12565105237379770031 +-2.12557920583747472776 +-2.12550734682466124781 +-2.12543547533518761838 +-2.12536359136888775012 +-2.12529169492558978050 +-2.12521978600512007063 +-2.12514786460730409345 +-2.12507593073196288103 +-2.12500398437891835357 +-2.12493202554798576998 +-2.12486005423898127731 +-2.12478807045171835810 +-2.12471607418600783035 +-2.12464406544165740343 +-2.12457204421847301035 +-2.12450001051625880777 +-2.12442796433481717600 +-2.12435590567394516626 +-2.12428383453344293841 +-2.12421175091310221461 +-2.12413965481271693747 +-2.12406754623207660870 +-2.12399542517096939775 +-2.12392329162918036545 +-2.12385114560649324034 +-2.12377898710268908644 +-2.12370681611754585916 +-2.12363463265084106979 +-2.12356243670234734466 +-2.12349022827183864237 +-2.12341800735908181608 +-2.12334577396384727166 +-2.12327352808589875366 +-2.12320126972499911844 +-2.12312899888090811373 +-2.12305671555338504319 +-2.12298441974218610184 +-2.12291211144706437608 +-2.12283979066777117595 +-2.12276745740405692331 +-2.12269511165566804323 +-2.12262275342234918440 +-2.12255038270384233101 +-2.12247799949988857904 +-2.12240560381022635994 +-2.12233319563459055246 +-2.12226077497271514716 +-2.12218834182433102598 +-2.12211589618916729449 +-2.12204343806695128194 +-2.12197096745740676482 +-2.12189848436025751965 +-2.12182598877522199388 +-2.12175348070201907902 +-2.12168096014036322572 +-2.12160842708996932870 +-2.12153588155054784181 +-2.12146332352180833070 +-2.12139075300345680830 +-2.12131816999519839939 +-2.12124557449673423193 +-2.12117296650776587796 +-2.12110034602799046866 +-2.12102771305710335881 +-2.12095506759479812686 +-2.12088240964076613082 +-2.12080973919469606415 +-2.12073705625627528804 +-2.12066436082518894324 +-2.12059165290111728552 +-2.12051893248374279111 +-2.12044619957274127486 +-2.12037345416779032803 +-2.12030069626856265685 +-2.12022792587472963532 +-2.12015514298596086107 +-2.12008234760192193491 +-2.12000953972227934585 +-2.11993671934669514201 +-2.11986388647483003922 +-2.11979104110633986835 +-2.11971818324088401297 +-2.11964531287811386306 +-2.11957243001768302904 +-2.11949953465923845997 +-2.11942662680242976947 +-2.11935370644690124209 +-2.11928077359229449783 +-2.11920782823825204488 +-2.11913487038441195054 +-2.11906190003041006165 +-2.11898891717588133687 +-2.11891592182045762627 +-2.11884291396376811534 +-2.11876989360544154550 +-2.11869686074510221729 +-2.11862381538237443124 +-2.11855075751687982333 +-2.11847768714823558867 +-2.11840460427606069871 +-2.11833150889996835176 +-2.11825840101957174610 +-2.11818528063448185961 +-2.11811214774430611740 +-2.11803900234865105645 +-2.11796584444711966100 +-2.11789267403931535938 +-2.11781949112483669495 +-2.11774629570328176698 +-2.11767308777424601018 +-2.11759986733732175068 +-2.11752663439210042640 +-2.11745338893817214299 +-2.11738013097512167704 +-2.11730686050253602559 +-2.11723357751999552434 +-2.11716028202708228534 +-2.11708697402337353566 +-2.11701365350844605828 +-2.11694032048187485984 +-2.11686697494322917379 +-2.11679361689208045405 +-2.11672024632799571364 +-2.11664686325054196558 +-2.11657346765928133792 +-2.11650005955377507050 +-2.11642663893358262683 +-2.11635320579826080589 +-2.11627976014736551846 +-2.11620630198044823445 +-2.11613283129706042374 +-2.11605934809675133579 +-2.11598585237906666734 +-2.11591234414355122695 +-2.11583882338974627046 +-2.11576529011719349782 +-2.11569174432543016806 +-2.11561818601399176387 +-2.11554461518241287976 +-2.11547103183022633388 +-2.11539743595696005940 +-2.11532382756214287767 +-2.11525020664530005732 +-2.11517657320595420245 +-2.11510292724362747308 +-2.11502926875783936467 +-2.11495559774810759635 +-2.11488191421394500225 +-2.11480821815486663695 +-2.11473450957038311415 +-2.11466078846000282709 +-2.11458705482323239266 +-2.11451330865957709548 +-2.11443954996853999972 +-2.11436577874962017276 +-2.11429199500231757014 +-2.11421819872612815061 +-2.11414438992054565247 +-2.11407056858506425812 +-2.11399673471917148859 +-2.11392288832235797358 +-2.11384902939410856959 +-2.11377515793390768906 +-2.11370127394123752396 +-2.11362737741557671356 +-2.11355346835640522940 +-2.11347954676319682576 +-2.11340561263542747739 +-2.11333166597256694175 +-2.11325770677408630860 +-2.11318373503945267089 +-2.11310975076813267748 +-2.11303575395958764815 +-2.11296174461328112315 +-2.11288772272867131363 +-2.11281368830521643076 +-2.11273964134237157708 +-2.11266558183959096695 +-2.11259150979632481793 +-2.11251742521202334757 +-2.11244332808613322072 +-2.11236921841809976996 +-2.11229509620736610742 +-2.11222096145337401296 +-2.11214681415556215782 +-2.11207265431336832506 +-2.11199848192622718912 +-2.11192429699357253625 +-2.11185009951483415591 +-2.11177588948944183755 +-2.11170166691682359428 +-2.11162743179640344238 +-2.11155318412760495406 +-2.11147892390984859290 +-2.11140465114255349022 +-2.11133036582513788915 +-2.11125606795701603602 +-2.11118175753760084490 +-2.11110743456630300940 +-2.11103309904253277907 +-2.11095875096569596252 +-2.11088439033519836840 +-2.11081001715044269673 +-2.11073563141083075934 +-2.11066123311576081534 +-2.11058682226463067977 +-2.11051239885683417086 +-2.11043796289176599501 +-2.11036351436881641774 +-2.11028905328737526048 +-2.11021457964682879194 +-2.11014009344656328082 +-2.11006559468596011087 +-2.10999108336440333034 +-2.10991655948127032616 +-2.10984202303593848526 +-2.10976747402778386231 +-2.10969291245617940334 +-2.10961833832049627802 +-2.10954375162010521194 +-2.10946915235437160163 +-2.10939454052266306405 +-2.10931991612434144301 +-2.10924527915876991457 +-2.10917062962530721393 +-2.10909596752331029990 +-2.10902129285213701948 +-2.10894660561113944652 +-2.10887190579966965487 +-2.10879719341707794200 +-2.10872246846271194087 +-2.10864773093591839626 +-2.10857298083604050021 +-2.10849821816242055661 +-2.10842344291439864890 +-2.10834865509131352823 +-2.10827385469250083716 +-2.10819904171729621822 +-2.10812421616502998489 +-2.10804937803503422700 +-2.10797452732663703756 +-2.10789966403916562143 +-2.10782478817194318665 +-2.10774989972429427354 +-2.10767499869553942560 +-2.10760008508499607771 +-2.10752515889198255294 +-2.10745022011581450982 +-2.10737526875580449826 +-2.10730030481126240360 +-2.10722532828150033168 +-2.10715033916582328288 +-2.10707533746353758985 +-2.10700032317394780890 +-2.10692529629635449950 +-2.10685025683005777708 +1.64032663064655026552 +1.63919755783538723115 +1.63806880064274751341 +1.63694035948710014949 +1.63581223478635995328 +1.63468442695788840346 +1.63355693641848720432 +1.63242976358440672335 +1.63130290887133977407 +1.63017637269442339232 +1.62905015546824016859 +1.62792425760681602753 +1.62679867952362022798 +1.62567342163156713930 +1.62454848434301624138 +1.62342386806976723967 +1.62229957322306694856 +1.62117560021360529454 +1.62005194945151442809 +1.61892862134637094407 +1.61780561630719565969 +1.61668293474245117203 +1.61556057706004385643 +1.61443854366732586492 +1.61331683497108735459 +1.61219545137756692377 +1.61107439329244339632 +1.60995366112083848620 +1.60883325526731724153 +1.60771317613588871076 +1.60659342413000283400 +1.60547399965255332965 +1.60435490310587702822 +1.60323613489175098579 +1.60211769541139759099 +1.60099958506548056825 +1.59988180425410453367 +1.59876435337681876980 +1.59764723283261433906 +1.59653044301992275145 +1.59541398433661929523 +1.59429785718002170469 +1.59318206194688749555 +1.59206659903341862794 +1.59095146883525795367 +1.58983667174748966033 +1.58872220816463993742 +1.58760807848067808656 +1.58649428308901274676 +1.58538082238249589118 +1.58426769675342127286 +1.58315490659352242631 +1.58204245229397666428 +1.58093033424539997078 +1.57981855283785299626 +1.57870710846083572854 +1.57759600150328838097 +1.57648523235359516725 +1.57537480139958030456 +1.57426470902850779154 +1.57315495562708473898 +1.57204554158145937137 +1.57093646727721880652 +1.56982773309939260820 +1.56871933943245300824 +1.56761128666030891132 +1.56650357516631366650 +1.56539620533326151453 +1.56428917754338425716 +1.56318249217835725240 +1.56207614961929719399 +1.56097015024675855877 +1.55986449444073893567 +1.55875918258067636124 +1.55765421504544776532 +1.55654959221337163555 +1.55544531446220846149 +1.55434138216915718189 +1.55323779571085784923 +1.55213455546339140767 +1.55103166180227902693 +1.54992911510248165818 +1.54882691573840247656 +1.54772506408388266230 +1.54662356051220473141 +1.54552240539609275771 +1.54442159910770904219 +1.54332114201865677749 +1.54222103449998138025 +1.54112127692216493990 +1.54002186965513288008 +1.53892281306824996179 +1.53782410753031961725 +1.53672575340958661450 +1.53562775107373794548 +1.53453010088989616477 +1.53343280322462804932 +1.53233585844393882525 +1.53123926691327327809 +1.53014302899751730713 +1.52904714506099725924 +1.52795161546747726433 +1.52685644058016389835 +1.52576162076170351867 +1.52466715637418137597 +1.52357304777912294647 +1.52247929533749526421 +1.52138589940970336833 +1.52029286035559318968 +1.51920017853445199485 +1.51810785430500372328 +1.51701588802541653678 +1.51592428005329526997 +1.51483303074568653734 +1.51374214045907562465 +1.51265160954938981952 +1.51156143837199463675 +1.51047162728169626078 +1.50938217663274110159 +1.50829308677881512857 +1.50720435807304453668 +1.50611599086799619052 +1.50502798551567584795 +1.50394034236752993650 +1.50285306177444599740 +1.50176614408674935497 +1.50067958965420711337 +1.49959339882602660232 +1.49850757195085382278 +1.49742210937677588944 +1.49633701145132103072 +1.49525227852145503604 +1.49416791093358614084 +1.49308390903356236201 +1.49200027316667038768 +1.49091700367763912993 +1.48983410091063772640 +1.48875156520927265369 +1.48766939691659372258 +1.48658759637509074736 +1.48550616392669176946 +1.48442509991276794246 +1.48334440467412775888 +1.48226407855102326749 +1.48118412188314407807 +1.48010453500962291251 +1.47902531826902960965 +1.47794647199937889681 +1.47686799653812106392 +1.47578989222215062327 +1.47471215938780120247 +1.47363479837084798696 +1.47255780950650505545 +1.47148119312942871062 +1.47040494957371481455 +1.46932907917290078714 +1.46825358225996449590 +1.46717845916732536615 +1.46610371022684149445 +1.46502933576981453356 +1.46395533612698436343 +1.46288171162853419816 +1.46180846260408725534 +1.46073558938270720020 +1.45966309229289925575 +1.45859097166260975875 +1.45751922781922638173 +1.45644786108957768889 +1.45537687179993313613 +1.45430626027600373718 +1.45323602684294206355 +1.45216617182534246666 +1.45109669554723841323 +1.45002759833210759233 +1.44895888050286836268 +1.44789054238187886448 +1.44682258429094123819 +1.44575500655129873806 +1.44468780948363373362 +1.44362099340807414904 +1.44255455864418813405 +1.44148850551098361983 +1.44042283432691364808 +1.43935754540987148609 +1.43829263907719262505 +1.43722811564565433606 +1.43616397543147744642 +1.43510021875032234284 +1.43403684591729385644 +1.43297385724693926434 +1.43191125305324562511 +1.43084903364964466377 +1.42978719934901055133 +1.42872575046365835050 +1.42766468730534734632 +1.42660401018527926986 +1.42554371941409674385 +1.42448381530188750155 +1.42342429815818105610 +1.42236516829194981071 +1.42130642601160883665 +1.42024807162501764957 +1.41919010543947599068 +1.41813252776173071013 +1.41707533889796888360 +1.41601853915382136506 +1.41496212883436323082 +1.41390610824411289137 +1.41285047768703098114 +1.41179523746652413330 +1.41074038788544053880 +1.40968592924607283301 +1.40863186185015720753 +1.40757818599887496447 +1.40652490199284896377 +1.40547201013214873022 +1.40441951071628667869 +1.40336740404421900230 +1.40231569041434678269 +1.40126437012451598996 +1.40021344347201548430 +1.39916291075358012463 +1.39811277226538899221 +1.39706302830306472451 +1.39601367916167706795 +1.39496472513573865903 +1.39391616651920702274 +1.39286800360548634892 +1.39182023668742460565 +1.39077286605731531566 +1.38972589200689733424 +1.38867931482735462723 +1.38763313480931693711 +1.38658735224285956100 +1.38554196741750401678 +1.38449698062221582262 +1.38345239214540827177 +1.38240820227493976802 +1.38136441129811382567 +1.38032101950168129001 +1.37927802717184011527 +1.37823543459423181190 +1.37719324205394699767 +1.37615144983552029068 +1.37511005822293541634 +1.37406906749962054448 +1.37302847794845339635 +1.37198828985175502737 +1.37094850349129715461 +1.36990911914829505136 +1.36887013710341398642 +1.36783155763676500527 +1.36679338102790826071 +1.36575560755584857198 +1.36471823749904119794 +1.36368127113538739614 +1.36264470874223686536 +1.36160855059638663533 +1.36057279697408373131 +1.35953744815102051113 +1.35850250440234043836 +1.35746796600263230914 +1.35643383322593558127 +1.35540010634573859782 +1.35436678563497614469 +1.35333387136603455758 +1.35230136381074683705 +1.35126926324039642324 +1.35023756992571475344 +1.34920628413688437064 +1.34817540614353492678 +1.34714493621474740159 +1.34611487461905210417 +1.34508522162442756276 +1.34405597749830407750 +1.34302714250756149994 +1.34199871691852878897 +1.34097070099698623125 +1.33994309500816366487 +1.33891589921674203367 +1.33788911388685205495 +1.33686273928207688400 +1.33583677566544811732 +1.33481122329944978944 +1.33378608244601792876 +1.33276135336653656083 +1.33173703632184481371 +1.33071313157223092283 +1.32968963937743533954 +1.32866655999664984300 +1.32764389368852020468 +1.32662164071114041519 +1.32559980132205956771 +1.32457837577827830522 +1.32355736433624882054 +1.32253676725187663266 +1.32151658478052058676 +1.32049681717699041172 +1.31947746469554982873 +1.31845852758991610720 +1.31744000611325917660 +1.31642190051820118235 +1.31540421105682048264 +1.31438693798064565321 +1.31337008154066192667 +1.31235364198730763974 +1.31133761957047334512 +1.31032201453950625236 +1.30930682714320667515 +1.30829205762982847538 +1.30727770624708239389 +1.30626377324213227560 +1.30525025886159662392 +1.30423716335155015500 +1.30322448695752246550 +1.30221222992449670031 +1.30120039249691465955 +1.30018897491867102545 +1.29917797743311691505 +1.29816740028306032428 +1.29715724371076546184 +1.29614750795794919647 +1.29513819326579038282 +1.29412929987492009154 +1.29312082802542738236 +1.29211277795685819392 +1.29110514990821623194 +1.29009794411796052671 +1.28909116082400876380 +1.28808480026373595173 +1.28707886267397419999 +1.28607334829101338514 +1.28506825735060159488 +1.28406359008794423993 +1.28305934673770627441 +1.28205552753401108568 +1.28105213271043805179 +1.28004916250002853673 +1.27904661713527989519 +1.27804449684815080168 +1.27704280187005791980 +1.27604153243187790068 +1.27504068876394516252 +1.27404027109605699764 +1.27304027965746757722 +1.27204071467689172614 +1.27104157638250558904 +1.27004286500194574216 +1.26904458076230697294 +1.26804672389014694289 +1.26704929461148307901 +1.26605229315179457217 +1.26505571973602104485 +1.26405957458856499365 +1.26306385793328734835 +1.26206856999351479942 +1.26107371099203180442 +1.26007928115108813749 +1.25908528069239289415 +1.25809170983712159675 +1.25709856880590797878 +1.25610585781885131240 +1.25511357709551196749 +1.25412172685491474233 +1.25313030731554708730 +1.25213931869536132524 +1.25114876121177043267 +1.25015863508165425699 +1.24916894052135396542 +1.24817967774667715197 +1.24719084697289472885 +1.24620244841474181463 +1.24521448228641862244 +1.24422694880159134811 +1.24323984817338861752 +1.24225318061440659356 +1.24126694633670697776 +1.24028114555181501188 +1.23929577847072303065 +1.23831084530389068377 +1.23732634626124160526 +1.23634228155216652212 +1.23535865138552347631 +1.23437545596963627048 +1.23339269551229624433 +1.23241037022076160845 +1.23142848030175833252 +1.23044702596147903506 +1.22946600740558542597 +1.22848542483920497581 +1.22750527846693513467 +1.22652556849284199991 +1.22554629512045742956 +1.22456745855278481550 +1.22358905899229575276 +1.22261109664092915139 +1.22163357170009545527 +1.22065648437067375554 +1.21967983485301134650 +1.21870362334692794448 +1.21772785005171235717 +1.21675251516612181746 +1.21577761888838709048 +1.21480316141620781067 +1.21382914294675403610 +1.21285556367666780275 +1.21188242380206290250 +1.21090972351852332878 +1.20993746302110460888 +1.20896564250433669052 +1.20799426216221772457 +1.20702332218822117049 +1.20605282277529290980 +1.20508276411584880350 +1.20411314640178046531 +1.20314396982445170892 +1.20217523457469832593 +1.20120694084283186065 +1.20023908881863672349 +1.19927167869137019096 +1.19830471064976573636 +1.19733818488202969910 +1.19637210157584261694 +1.19540646091836189058 +1.19444126309621778681 +1.19347650829551699125 +1.19251219670184083199 +1.19154832850024772206 +1.19058490387526960674 +1.18962192301091729263 +1.18865938609067578469 +1.18769729329750672875 +1.18673564481385040992 +1.18577444082162131167 +1.18481368150221300084 +1.18385336703649568513 +1.18289349760481865559 +1.18193407338700651188 +1.18097509456236382519 +1.18001656130967158553 +1.17905847380719142059 +1.17810083223266315322 +1.17714363676330457942 +1.17618688757581302262 +1.17523058484636599985 +1.17427472875061900126 +1.17331931946370859876 +1.17236435716025177989 +1.17140984201434505962 +1.17045577419956492449 +1.16950215388897094115 +1.16854898125509976126 +1.16759625646997267090 +1.16664397970509114977 +1.16569215113143864748 +1.16474077091947947338 +1.16378983923916168308 +1.16283935625991352580 +1.16188932215064810727 +1.16093973707976005905 +1.15999060121512775900 +1.15904191472411177699 +1.15809367777355709528 +1.15714589052979222039 +1.15619855315862918310 +1.15525166582536531479 +1.15430522869478147108 +1.15335924193114380820 +1.15241370569820289482 +1.15146862015919415612 +1.15052398547683898400 +1.14957980181334540326 +1.14863606933040496294 +1.14769278818919695517 +1.14674995855038752701 +1.14580758057412768203 +1.14486565442005616688 +1.14392418024729969339 +1.14298315821447005192 +1.14204258847966899637 +1.14110247120048535763 +1.14016280653399482148 +1.13922359463676259317 +1.13828483566484273126 +1.13734652977377659333 +1.13640867711859550049 +1.13547127785382095944 +1.13453433213346221997 +1.13359784011101938361 +1.13266180193948273747 +1.13172621777133142196 +1.13079108775853698354 +1.12985641205256115427 +1.12892219080435607381 +1.12798842416436451153 +1.12705511228252364120 +1.12612225530825926789 +1.12518985339049049088 +1.12425790667762925956 +1.12332641531757926323 +1.12239537945773704131 +1.12146479924499331560 +1.12053467482572921554 +1.11960500634582271751 +1.11867579395064442593 +1.11774703778505801743 +1.11681873799342246123 +1.11589089471959179711 +1.11496350810691335909 +1.11403657829823066194 +1.11311010543588340127 +1.11218408966170412278 +1.11125853111702421749 +1.11033342994266970294 +1.10940878627896277742 +1.10848460026572315229 +1.10756087204226760790 +1.10663760174740821718 +1.10571478951945656455 +1.10479243549622219156 +1.10387053981500971034 +1.10294910261262502083 +1.10202812402537175807 +1.10110760418905062608 +1.10018754323896361669 +1.09926794130991134502 +1.09834879853619260537 +1.09743011505160792396 +1.09651189098945711642 +1.09559412648253995393 +1.09467682166315727343 +1.09375997666311142176 +1.09284359161370425717 +1.09192766664574092417 +1.09101220188952696688 +1.09009719747487010544 +1.08918265353108134619 +1.08826857018697342738 +1.08735494757086104123 +1.08644178581056372046 +1.08552908503340250768 +1.08461684536620395214 +1.08370506693529655706 +1.08279374986651499846 +1.08188289428519635038 +1.08097250031618452581 +1.08006256808382583579 +1.07915309771197409638 +1.07824408932398796424 +1.07733554304273204671 +1.07642745899057579173 +1.07551983728939704044 +1.07461267806057958474 +1.07370598142501250116 +1.07279974750309436970 +1.07189397641473060929 +1.07098866827933347778 +1.07008382321582451446 +1.06917944134263254163 +1.06827552277769544098 +1.06737206763846037560 +1.06646907604188379004 +1.06556654810443030001 +1.06466448394207602313 +1.06376288367030547022 +1.06286174740411420991 +1.06196107525800864657 +1.06106086734600646437 +1.06016112378163551710 +1.05926184467793538246 +1.05836303014745714002 +1.05746468030226492552 +1.05656679525393415453 +1.05566937511355418700 +1.05477241999172499654 +1.05387592999856249953 +1.05297990524369344811 +1.05208434583626031511 +1.05118925188491885159 +1.05029462349783941910 +1.04940046078270676766 +1.04850676384672092389 +1.04761353279659608084 +1.04672076773856326248 +1.04582846877836876942 +1.04493663602127528911 +1.04404526957206167381 +1.04315436953502294060 +1.04226393601397182564 +1.04137396911223834017 +1.04048446893266977042 +1.03959543557763156585 +1.03870686914900622888 +1.03781876974819753379 +1.03693113747612386533 +1.03604397243322665645 +1.03515727471946483718 +1.03427104443431572278 +1.03338528167677945468 +1.03249998654537522569 +1.03161515913814105794 +1.03073079955263868790 +1.02984690788594934752 +1.02896348423467576261 +1.02808052869494237491 +1.02719804136239734049 +1.02631602233220875497 +1.02543447169906842831 +1.02455338955719166272 +1.02367277600031658658 +1.02279263112170459848 +1.02191295501414169955 +1.02103374776993716111 +1.02015500948092552314 +1.01927674023846592810 +1.01839894013344256507 +1.01752160925626466970 +1.01664474769686785649 +1.01576835554471323064 +1.01489243288878872029 +1.01401697981760885447 +1.01314199641921454109 +1.01226748278117417712 +1.01139343899058387066 +1.01051986513406744095 +1.00964676129777797264 +1.00877412756739515132 +1.00790196402812881615 +1.00703027076471784973 +1.00615904786142928984 +1.00528829540206188220 +1.00441801346994274979 +1.00354820214793094557 +1.00267886151841434383 +1.00180999166331363703 +1.00094159266407922715 +1.00007366460169477840 +0.99920620755667410862 +0.99833922160906529708 +0.99747270683844702077 +0.99660666332393210709 +0.99574109114416597954 +0.99487599037732776797 +0.99401136110113075262 +0.99314720339282236417 +0.99228351732918373962 +0.99142030298653172071 +0.99055756044071741062 +0.98969528976712739521 +0.98883349104068529734 +0.98797216433584977846 +0.98711130972661531580 +0.98625092728651475582 +0.98539101708861609463 +0.98453157920552569760 +0.98367261370938774423 +0.98281412067188456128 +0.98195610016423540145 +0.98109855225719988514 +0.98024147702107533586 +0.97938487452569866765 +0.97852874484044705117 +0.97767308803423802477 +0.97681790417552649686 +0.97596319333231162929 +0.97510895557213028706 +0.97425519096206347758 +0.97340189956873135468 +0.97254908145829799260 +0.97169673669646761116 +0.97084486534848879469 +0.96999346747915171640 +0.96914254315279013685 +0.96829209243328162593 +0.96744211538404800699 +0.96659261206805369149 +0.96574358254780945376 +0.96489502688536921138 +0.96404694514233335578 +0.96319933737984697597 +0.96235220365860230096 +0.96150554403883525811 +0.96065935858033091321 +0.95981364734241947367 +0.95896841038397850898 +0.95812364776343372785 +0.95727935953875853414 +0.95643554576747369378 +0.95559220650664977725 +0.95474934181290405100 +0.95390695174240547338 +0.95306503635087136406 +0.95222359569356784803 +0.95138262982531274226 +0.95054213880047400131 +0.94970212267296949538 +0.94886258149626934166 +0.94802351532339523832 +0.94718492420691902112 +0.94634680819896677129 +0.94550916735121648404 +0.94467200171489784655 +0.94383531134079490243 +0.94299909627924560773 +0.94216335658014016552 +0.94132809229292435660 +0.94049330346659865132 +0.93965899014971676628 +0.93882515239038932808 +0.93799179023628209695 +0.93715890373461585572 +0.93632649293216874131 +0.93549455787527502348 +0.93466309860982554891 +0.93383211518126907347 +0.93300160763461248425 +0.93217157601441835713 +0.93134202036481039677 +0.93051294072946832969 +0.92968433715163256714 +0.92885620967410276183 +0.92802855833923836304 +0.92720138318895706231 +0.92637468426473901228 +0.92554846160762394014 +0.92472271525821270188 +0.92389744525666861463 +0.92307265164271534719 +0.92224833445563947354 +0.92142449373428947368 +0.92060112951707673279 +0.91977824184197642943 +0.91895583074652620326 +0.91813389626782893060 +0.91731243844254928277 +0.91649145730691961020 +0.91567095289673394731 +0.91485092524735389663 +0.91403137439370518713 +0.91321230037028100490 +0.91239370321113910656 +0.91157558294990492787 +0.91075793961977025148 +0.90994077325349465024 +0.90912408388340515408 +0.90830787154139758233 +0.90749213625893399016 +0.90667687806704810871 +0.90586209699633990500 +0.90504779307698102198 +0.90423396633871155892 +0.90342061681084262492 +0.90260774452225478459 +0.90179534950140005645 +0.90098343177630191292 +0.90017199137455483626 +0.89936102832332542878 +0.89855054264935330099 +0.89774053437894907326 +0.89693100353799770641 +0.89612195015195672543 +0.89531337424585766271 +0.89450527584430628014 +0.89369765497148268008 +0.89289051165114097230 +0.89208384590661193858 +0.89127765776079981297 +0.89047194723618605661 +0.88966671435482791441 +0.88886195913835974736 +0.88805768160799181121 +0.88725388178451236598 +0.88645055968828623261 +0.88564771533925790159 +0.88484534875694886846 +0.88404345996046018730 +0.88324204896847124946 +0.88244111579924133792 +0.88164066047060896114 +0.88084068299999307428 +0.88004118340439374535 +0.87924216170039148910 +0.87844361790414704494 +0.87764555203140492967 +0.87684796409748877455 +0.87605085411730665435 +0.87525422210534931100 +0.87445806807568970953 +0.87366239204198370416 +0.87286719401747225877 +0.87207247401497933748 +0.87127823204691479120 +0.87048446812527191518 +0.86969118226162922536 +0.86889837446715234570 +0.86810604475259123269 +0.86731419312828239576 +0.86652281960415045159 +0.86573192418970545958 +0.86494150689404514232 +0.86415156772585599576 +0.86336210669341162394 +0.86257312380457429324 +0.86178461906679559856 +0.86099659248711624127 +0.86020904407216580712 +0.85942197382816531981 +0.85863538176092535359 +0.85784926787584603325 +0.85706363217792080889 +0.85627847467173368035 +0.85549379536145897518 +0.85470959425086567851 +0.85392587134331332521 +0.85314262664175610773 +0.85235986014873998950 +0.85157757186640592462 +0.85079576179648730427 +0.85001442994031362055 +0.84923357629880824593 +0.84845320087248965457 +0.84767330366147242149 +0.84689388466546666745 +0.84611494388377828102 +0.84533648131531080594 +0.84455849695856410886 +0.84378099081163515649 +0.84300396287221979197 +0.84222741313761151360 +0.84145134160470169693 +0.84067574826998114901 +0.83990063312953933128 +0.83912599617906680205 +0.83835183741385221889 +0.83757815682878633545 +0.83680495441835933690 +0.83603223017666350447 +0.83525998409739132811 +0.83448821617383894811 +0.83371692639890304655 +0.83294611476508495507 +0.83217578126448632503 +0.83140592588881445657 +0.83063654862937874590 +0.82986764947709423801 +0.82909922842247940622 +0.82833128545565859469 +0.82756382056635990896 +0.82679683374391876871 +0.82603032497727468808 +0.82526429425497582759 +0.82449874156517510837 +0.82373366689563465304 +0.82296907023372145584 +0.82220495156641282275 +0.82144131088029270771 +0.82067814816155493229 +0.81991546339600140936 +0.81915325656904469653 +0.81839152766570544273 +0.81763027667061582981 +0.81686950356801790729 +0.81610920834176503558 +0.81534939097532121988 +0.81459005145176421880 +0.81383118975378021531 +0.81307280586367169928 +0.81231489976335147229 +0.81155747143434631141 +0.81080052085779652504 +0.81004404801445772932 +0.80928805288469729540 +0.80853253544849934542 +0.80777749568546219905 +0.80702293357480048286 +0.80626884909534335399 +0.80551524222553860799 +0.80476211294344812686 +0.80400946122675209793 +0.80325728705274834773 +0.80250559039835134278 +0.80175437124009529821 +0.80100362955413240140 +0.80025336531623292302 +0.79950357850178765950 +0.79875426908580660079 +0.79800543704291948544 +0.79725708234737779900 +0.79650920497305222057 +0.79576180489343606439 +0.79501488208164383664 +0.79426843651041179051 +0.79352246815209859232 +0.79277697697868698690 +0.79203196296178113300 +0.79128742607260937891 +0.79054336628202481752 +0.78979978356050350996 +0.78905667787814759428 +0.78831404920468373110 +0.78757189750946365869 +0.78683022276146585838 +0.78608902492929499939 +0.78534830398118138373 +0.78460805988498349972 +0.78386829260818724485 +0.78312900211790537064 +0.78239018838087970309 +0.78165185136348080963 +0.78091399103170744400 +0.78017660735118832260 +0.77943970028718245757 +0.77870326980457726940 +0.77796731586789313884 +0.77723183844127918807 +0.77649683748851694443 +0.77576231297301978529 +0.77502826485783316013 +0.77429469310563392437 +0.77356159767873367006 +0.77282897853907572827 +0.77209683564823738955 +0.77136516896743079208 +0.77063397845750214454 +0.76990326407893183713 +0.76917302579183643996 +0.76844326355596748179 +0.76771397733071244929 +0.76698516707509589718 +0.76625683274777933729 +0.76552897430705979520 +0.76480159171087391812 +0.76407468491679486622 +0.76334825388203475516 +0.76262229856344476708 +0.76189681891751492859 +0.76117181490037422176 +0.76044728646779280457 +0.75972323357517956843 +0.75899965617758569092 +0.75827655422970219323 +0.75755392768586293784 +0.75683177650004207493 +0.75611010062585792824 +0.75538890001656877615 +0.75466817462507906900 +0.75394792440393454402 +0.75322814930532655531 +0.75250884928108863203 +0.75179002428270036429 +0.75107167426128595977 +0.75035379916761535402 +0.74963639895210387731 +0.74891947356481358700 +0.74820302295545249027 +0.74748704707337676467 +0.74677154586758787147 +0.74605651928673744067 +0.74534196727912416236 +0.74462788979269556311 +0.74391428677504767286 +0.74320115817342657927 +0.74248850393472765052 +0.74177632400549653457 +0.74106461833192938116 +0.74035338685987439611 +0.73964262953482895480 +0.73893234630194470913 +0.73822253710602281362 +0.73751320189151914342 +0.73680434060254174078 +0.73609595318285248045 +0.73538803957586484916 +0.73468059972464994090 +0.73397363357193035061 +0.73326714106008517025 +0.73256112213114832343 +0.73185557672680989771 +0.73115050478841514536 +0.73044590625696725894 +0.72974178107312503982 +0.72903812917720489661 +0.72833495050918151126 +0.72763224500868750599 +0.72693001261501322130 +0.72622825326710915839 +0.72552696690358386977 +0.72482615346270629075 +0.72412581288240607247 +0.72342594510027158350 +0.72272655005355368463 +0.72202762767916428555 +0.72132917791367590077 +0.72063120069332431417 +0.71993369595400813488 +0.71923666363128679890 +0.71854010366038501001 +0.71784401597619085234 +0.71714840051325534631 +0.71645325720579533524 +0.71575858598769226404 +0.71506438679249162416 +0.71437065955340595114 +0.71367740420331415852 +0.71298462067475965043 +0.71229230889995520659 +0.71160046881077954062 +0.71090910033877818819 +0.71021820341516661568 +0.70952777797082766664 +0.70883782393631300511 +0.70814834124184444786 +0.70745932981731252109 +0.70677078959227812582 +0.70608272049597331499 +0.70539512245729940609 +0.70470799540483064494 +0.70402133926681220721 +0.70333515397116208590 +0.70264943944546898180 +0.70196419561699685552 +0.70127942241268070855 +0.70059511975913058013 +0.69991128758263021492 +0.69922792580913850635 +0.69854503436428738716 +0.69786261317338660337 +0.69718066216141949543 +0.69649918125304621785 +0.69581817037260373926 +0.69513762944410584232 +0.69445755839124323483 +0.69377795713738454886 +0.69309882560557645181 +0.69242016371854420154 +0.69174197139869142426 +0.69106424856810233504 +0.69038699514853940631 +0.68971021106144636548 +0.68903389622794575242 +0.68835805056884336040 +0.68768267400462457228 +0.68700776645545780230 +0.68633332784119183145 +0.68565935808135980434 +0.68498585709517567643 +0.68431282480153898806 +0.68364026111903164473 +0.68296816596592069271 +0.68229653926015554344 +0.68162538091937363571 +0.68095469086089510657 +0.68028446900172723222 +0.67961471525856265163 +0.67894542954778192012 +0.67827661178545062270 +0.67760826188732314890 +0.67694037976884058327 +0.67627296534513325899 +0.67560601853101964753 +0.67493953924100669184 +0.67427352738929080544 +0.67360798288975920478 +0.67294290565598779974 +0.67227829560124408026 +0.67161415263848611712 +0.67095047668036367217 +0.67028726763921764320 +0.66962452542708184033 +0.66896224995568209781 +0.66830044113643760628 +0.66763909888046091279 +0.66697822309855847589 +0.66631781370123033259 +0.66565787059867231878 +0.66499839370077329370 +0.66433938291711980284 +0.66368083815699274730 +0.66302275932936993730 +0.66236514634292498194 +0.66170799910603017580 +0.66105131752675261314 +0.66039510151285962802 +0.65973935097181590770 +0.65908406581078526898 +0.65842924593662888189 +0.65777489125590971053 +0.65712100167488840530 +0.65646757709952752169 +0.65581461743548996601 +0.65516212258813877334 +0.65451009246253932794 +0.65385852696345880819 +0.65320742599536607553 +0.65255678946243345084 +0.65190661726853615932 +0.65125690931725188637 +0.65060766551186399731 +0.64995888575535887277 +0.64931056995042790714 +0.64866271799946728649 +0.64801532980457987598 +0.64736840526757277736 +0.64672194428996088167 +0.64607594677296498187 +0.64543041261751266102 +0.64478534172424040172 +0.64414073399349147664 +0.64349658932531750288 +0.64285290761947944116 +0.64220968877544737374 +0.64156693269239983834 +0.64092463926922649264 +0.64028280840452733713 +0.63964143999661249307 +0.63900053394350397884 +0.63836009014293404462 +0.63772010849234828100 +0.63708058888890439775 +0.63644153122947244583 +0.63580293541063626073 +0.63516480132869279629 +0.63452712887965256883 +0.63388991795924132244 +0.63325316846289991801 +0.63261688028578300091 +0.63198105332276199864 +0.63134568746842456566 +0.63071078261707325119 +0.63007633866272882983 +0.62944235549912863625 +0.62880883301972856358 +0.62817577111770128706 +0.62754316968593870651 +0.62691102861705094718 +0.62627934780336802500 +0.62564812713693962465 +0.62501736650953509944 +0.62438706581264402651 +0.62375722493747798314 +0.62312784377496799326 +0.62249892221576874629 +0.62187046015025537748 +0.62124245746852702066 +0.62061491406040392160 +0.61998782981543132387 +0.61936120462287680422 +0.61873503837173293718 +0.61810933095071607379 +0.61748408224826889512 +0.61685929215255741465 +0.61623496055147497508 +0.61561108733263947279 +0.61498767238339702157 +0.61436471559081939908 +0.61374221684170693347 +0.61312017602258594984 +0.61249859301971276704 +0.61187746771907025600 +0.61125680000637250266 +0.61063658976706103321 +0.61001683688630825575 +0.60939754124901568400 +0.60877870273981693483 +0.60816032124307528584 +0.60754239664288500755 +0.60692492882307391699 +0.60630791766720093516 +0.60569136305855675317 +0.60507526488016705191 +0.60445962301478850520 +0.60384443734491322076 +0.60322970775276751887 +0.60261543412031159939 +0.60200161632924076294 +0.60138825426098574400 +0.60077534779671304399 +0.60016289681732593042 +0.59955090120346332672 +0.59893936083550225469 +0.59832827559355650227 +0.59771764535747695657 +0.59710747000685415742 +0.59649774942101607689 +0.59588848347903078384 +0.59527967205970522269 +0.59467131504158576849 +0.59406341230295933720 +0.59345596372185349665 +0.59284896917603724376 +0.59224242854302033834 +0.59163634170005541257 +0.59103070852413575054 +0.59042552889199817479 +0.58982080268012293534 +0.58921652976473293251 +0.58861271002179571532 +0.58800934332702292640 +0.58740642955586974683 +0.58680396858353767175 +0.58620196028497317808 +0.58560040453486850165 +0.58499930120766285846 +0.58439865017754155652 +0.58379845131843643991 +0.58319870450402744311 +0.58259940960774236896 +0.58200056650275733272 +0.58140217506199687314 +0.58080423515813539570 +0.58020674666359539629 +0.57960970945054968162 +0.57901312339092181336 +0.57841698835638655218 +0.57782130421836819245 +0.57722607084804378186 +0.57663128811634167814 +0.57603695589394232623 +0.57544307405127947952 +0.57484964245853942266 +0.57425666098566230389 +0.57366412950234257906 +0.57307204787802767942 +0.57248041598192012103 +0.57188923368297861494 +0.57129850084991629089 +0.57070821735120236262 +0.57011838305506257196 +0.56952899782947941087 +0.56894006154219156635 +0.56835157406069658492 +0.56776353525224887431 +0.56717594498386181279 +0.56658880312230652798 +0.56600210953411456138 +0.56541586408557531485 +0.56483006664273971431 +0.56424471707141754528 +0.56365981523718078350 +0.56307536100536115242 +0.56249135424105234371 +0.56190779480910979515 +0.56132468257415191193 +0.56074201740055884535 +0.56015979915247449128 +0.55957802769380560193 +0.55899670288822367326 +0.55841582459916327963 +0.55783539268982507142 +0.55725540702317355457 +0.55667586746193986613 +0.55609677386861955384 +0.55551812610547601778 +0.55493992403453773488 +0.55436216751760158949 +0.55378485641623131919 +0.55320799059175873591 +0.55263156990528339296 +0.55205559421767469441 +0.55148006338956923056 +0.55090497728137466371 +0.55033033575326795184 +0.54975613866519634776 +0.54918238587687739916 +0.54860907724780094696 +0.54803621263722590573 +0.54746379190418514860 +0.54689181490748306480 +0.54632028150569700298 +0.54574919155717627195 +0.54517854492004513833 +0.54460834145220038405 +0.54403858101131330471 +0.54346926345483059784 +0.54290038863997358565 +0.54233195642373843715 +0.54176396666289705628 +0.54119641921399863627 +0.54062931393336788322 +0.54006265067710745864 +0.53949642930109653616 +0.53893064966099257784 +0.53836531161223044606 +0.53780041501002484594 +0.53723595970936843802 +0.53667194556503383662 +0.53610837243157316578 +0.53554524016331894742 +0.53498254861438332419 +0.53442029763866027992 +0.53385848708982519550 +0.53329711682133462691 +0.53273618668642785945 +0.53217569653812646369 +0.53161564622923429546 +0.53105603561233916121 +0.53049686453981270695 +0.52993813286381064032 +0.52937984043627261954 +0.52882198710892380777 +0.52826457273327398489 +0.52770759716061910183 +0.52715106024204105850 +0.52659496182840814793 +0.52603930177037605542 +0.52548407991838708142 +0.52492929612267047457 +0.52437495023324542931 +0.52382104209991753319 +0.52326757157228298567 +0.52271453849972593364 +0.52216194273142080284 +0.52160978411633118768 +0.52105806250321218265 +0.52050677774060860603 +0.51995592967685722030 +0.51940551816008662112 +0.51885554303821590505 +0.51830600415895755617 +0.51775690136981689093 +0.51720823451809172511 +0.51666000345087448320 +0.51611220801505042211 +0.51556484805729929644 +0.51501792342409569159 +0.51447143396170924579 +0.51392537951620520520 +0.51337975993344497905 +0.51283457505908536245 +0.51228982473858075686 +0.51174550881718128270 +0.51120162713993555492 +0.51065817955169034992 +0.51011516589708949532 +0.50957258602057564634 +0.50903043976639172907 +0.50848872697857838698 +0.50794744750097631236 +0.50740660117722757860 +0.50686618785077319771 +0.50632620736485633994 +0.50578665956252077951 +0.50524754428661211580 +0.50470886137977788444 +0.50417061068446911154 +0.50363279204293842639 +0.50309540529724194879 +0.50255845028923995521 +0.50202192686059632365 +0.50148583485277942184 +0.50095017410706299543 +0.50041494446452527978 +0.49988014576604977712 +0.49934577785232736602 +0.49881184056385363679 +0.49827833374093177810 +0.49774525722367202185 +0.49721261085199230934 +0.49668039446561806916 +0.49614860790408321645 +0.49561725100673009736 +0.49508632361271054378 +0.49455582556098548475 +0.49402575669032605665 +0.49349611683931282613 +0.49296690584633806598 +0.49243812354960392330 +0.49190976978712436241 +0.49138184439672571990 +0.49085434721604576103 +0.49032727808253451229 +0.48980063683345576031 +0.48927442330588555297 +0.48874863733671441990 +0.48822327876264720592 +0.48769834742020218288 +0.48717384314571332560 +0.48664976577532892410 +0.48612611514501358201 +0.48560289109054760592 +0.48508009344752800462 +0.48455772205136871111 +0.48403577673729930586 +0.48351425734036829196 +0.48299316369544154082 +0.48247249563720356891 +0.48195225300015714920 +0.48143243561862447688 +0.48091304332674650324 +0.48039407595848437893 +0.47987553334761950952 +0.47935741532775366647 +0.47883972173231020841 +0.47832245239453302643 +0.47780560714748776530 +0.47728918582406215654 +0.47677318825696674010 +0.47625761427873486431 +0.47574246372172290798 +0.47522773641811144607 +0.47471343219990391749 +0.47419955089892840139 +0.47368609234683872744 +0.47317305637511247740 +0.47266044281505420477 +0.47214825149779321434 +0.47163648225428517202 +0.47112513491531260446 +0.47061420931148528757 +0.47010370527323980250 +0.46959362263084142297 +0.46908396121438250548 +0.46857472085378498727 +0.46806590137879822144 +0.46755750261900264064 +0.46704952440380692602 +0.46654196656245050523 +0.46603482892400344140 +0.46552811131736560046 +0.46502181357126892713 +0.46451593551427639017 +0.46401047697478298160 +0.46350543778101671588 +0.46300081776103724218 +0.46249661674273778722 +0.46199283455384437813 +0.46148947102191756331 +0.46098652597435224587 +0.46048399923837740610 +0.45998189064105649004 +0.45948020000928929685 +0.45897892716981031347 +0.45847807194919065754 +0.45797763417383807738 +0.45747761366999645238 +0.45697801026374701427 +0.45647882378100940182 +0.45598005404753949588 +0.45548170088893263907 +0.45498376413062285861 +0.45448624359788336591 +0.45398913911582539082 +0.45349245050940173440 +0.45299617760340410433 +0.45250032022246505781 +0.45200487819105866771 +0.45150985133349991196 +0.45101523947394422942 +0.45052104243639140568 +0.45002726004468113219 +0.44953389212249761364 +0.44904093849336779165 +0.44854839898066156678 +0.44805627340759318633 +0.44756456159722118882 +0.44707326337244801540 +0.44658237855602200828 +0.44609190697053641150 +0.44560184843843020364 +0.44511220278198815326 +0.44462296982334248430 +0.44413414938447076663 +0.44364574128719880264 +0.44315774535319990557 +0.44267016140399528812 +0.44218298926095395140 +0.44169622874529390621 +0.44120987967808228403 +0.44072394188023517048 +0.44023841517251915967 +0.43975329937555107662 +0.43926859430979658949 +0.43878429979557437290 +0.43830041565305288831 +0.43781694170225282647 +0.43733387776304694095 +0.43685122365515993703 +0.43636897919816919345 +0.43588714421150548395 +0.43540571851445281082 +0.43492470192614912650 +0.43444409426558633358 +0.43396389535161133955 +0.43348410500292539060 +0.43300472303808479335 +0.43252574927550219153 +0.43204718353344589987 +0.43156902563004090334 +0.43109127538326813545 +0.43061393261096653218 +0.43013699713083125564 +0.42966046876041641411 +0.42918434731713384078 +0.42870863261825409296 +0.42823332448090634106 +0.42775842272207925676 +0.42728392715862056894 +0.42680983760723878451 +0.42633615388450230022 +0.42586287580684017984 +0.42539000319054320887 +0.42491753585176261776 +0.42444547360651141421 +0.42397381627066571541 +0.42350256365996369334 +0.42303171559000629642 +0.42256127187625763808 +0.42209123233404571840 +0.42162159677856153595 +0.42115236502486197434 +0.42068353688786730427 +0.42021511218236323737 +0.41974709072300137036 +0.41927947232429807478 +0.41881225680063627337 +0.41834544396626555107 +0.41787903363530193301 +0.41741302562172910573 +0.41694741973939813962 +0.41648221580202771097 +0.41601741362320426854 +0.41555301301638425393 +0.41508901379489193673 +0.41462541577192141284 +0.41416221876053638251 +0.41369942257367048333 +0.41323702702412734578 +0.41277503192458186998 +0.41231343708758028122 +0.41185224232553985235 +0.41139144745074929244 +0.41093105227537035651 +0.41047105661143640232 +0.41001146027085422219 +0.40955226306540387649 +0.40909346480673902668 +0.40863506530638643577 +0.40817706437574868827 +0.40771946182610097065 +0.40726225746859529009 +0.40680545111425825411 +0.40634904257399251382 +0.40589303165857570921 +0.40543741817866318922 +0.40498220194478634637 +0.40452738276735361600 +0.40407296045665158646 +0.40361893482284411094 +0.40316530567597275159 +0.40271207282595877786 +0.40225923608260116815 +0.40180679525557855269 +0.40135475015444926905 +0.40090310058865186171 +0.40045184636750408291 +0.40000098730020516857 +0.39955052319583528320 +0.39910045386335535333 +0.39865077911160828883 +0.39820149874931959344 +0.39775261258509553297 +0.39730412042742713208 +0.39685602208468673258 +0.39640831736513099104 +0.39596100607689993511 +0.39551408802801818476 +0.39506756302639400857 +0.39462143087982148870 +0.39417569139597841144 +0.39373034438242943134 +0.39328538964662429489 +0.39284082699589911725 +0.39239665623747643775 +0.39195287717846610809 +0.39150948962586418212 +0.39106649338655508075 +0.39062388826731098135 +0.39018167407479265041 +0.38973985061554844433 +0.38929841769601636337 +0.38885737512252344095 +0.38841672270128685396 +0.38797646023841281249 +0.38753658753989905783 +0.38709710441163258654 +0.38665801065939209291 +0.38621930608884785796 +0.38578099050556130534 +0.38534306371498600052 +0.38490552552246865003 +0.38446837573324726955 +0.38403161415245351540 +0.38359524058511285105 +0.38315925483614421410 +0.38272365671036029378 +0.38228844601246880774 +0.38185362254707133634 +0.38141918611866515443 +0.38098513653164273185 +0.38055147359029239951 +0.38011819709879857143 +0.37968530686124257745 +0.37925280268160160846 +0.37882068436375004872 +0.37838895171146058605 +0.37795760452840299060 +0.37752664261814528057 +0.37709606578415449940 +0.37666587382979571652 +0.37623606655833313761 +0.37580664377293088174 +0.37537760527665303689 +0.37494895087246304932 +0.37452068036322605504 +0.37409279355170677039 +0.37366529024057160147 +0.37323817023238836654 +0.37281143332962696224 +0.37238507933465930799 +0.37195910804975962360 +0.37153351927710509539 +0.37110831281877615373 +0.37068348847675647306 +0.37025904605293380456 +0.36983498534910014266 +0.36941130616695155853 +0.36898800830808947682 +0.36856509157401984300 +0.36814255576615451115 +0.36772040068581146599 +0.36729862613421437878 +0.36687723191249310695 +0.36645621782168552594 +0.36603558366273486469 +0.36561532923649370241 +0.36519545434372102655 +0.36477595878508500826 +0.36435684236116122614 +0.36393810487243510865 +0.36351974611930026882 +0.36310176590206039160 +0.36268416402092917838 +0.36226694027602962533 +0.36185009446739563321 +0.36143362639497222943 +0.36101753585861451334 +0.36060182265809020974 +0.36018648659307794802 +0.35977152746316931609 +0.35935694506786680646 +0.35894273920658753552 +0.35852890967866007932 +0.35811545628332719371 +0.35770237881974525918 +0.35728967708698500250 +0.35687735088403077510 +0.35646540000978221840 +0.35605382426305348664 +0.35564262344257457915 +0.35523179734699084076 +0.35482134577486418303 +0.35441126852467164099 +0.35400156539480859275 +0.35359223618358531782 +0.35318328068923110497 +0.35277469870989208722 +0.35236649004363240767 +0.35195865448843471901 +0.35155119184219985051 +0.35114410190274775170 +0.35073738446781727029 +0.35033103933506737349 +0.34992506630207687035 +0.34951946516634402329 +0.34911423572528826886 +0.34870937777624938514 +0.34830489111648865741 +0.34790077554318893371 +0.34749703085345440279 +0.34709365684431187082 +0.34669065331270970676 +0.34628802005552000720 +0.34588575686953743071 +0.34548386355148008597 +0.34508233989798992036 +0.34468118570563255343 +0.34428040077089799853 +0.34387998489020116244 +0.34347993785988195636 +0.34308025947620512941 +0.34268094953536160086 +0.34228200783346757197 +0.34188343416656608031 +0.34148522833062600057 +0.34108739012154387638 +0.34068991933514286563 +0.34029281576717407276 +0.33989607921331582707 +0.33949970946917479298 +0.33910370633028619203 +0.33870806959211391396 +0.33831279905005084974 +0.33791789449941989076 +0.33752335573547254111 +0.33712918255339058282 +0.33673537474828674210 +0.33634193211520374556 +0.33594885444911565253 +0.33555614154492752199 +0.33516379319747624521 +0.33477180920152971311 +0.33438018935178909219 +0.33398893344288738128 +0.33359804126939091029 +0.33320751262579867413 +0.33281734730654310983 +0.33242754510599031859 +0.33203810581844067640 +0.33164902923812888957 +0.33126031515922416126 +0.33087196337583091310 +0.33048397368198889623 +0.33009634587167235864 +0.32970907973879276520 +0.32932217507719757643 +0.32893563168067019298 +0.32854944934293078829 +0.32816362785763764087 +0.32777816701838508040 +0.32739306661870631876 +0.32700832645207184024 +0.32662394631189095584 +0.32623992599151124816 +0.32585626528421962611 +0.32547296398324165878 +0.32509002188174312975 +0.32470743877282937095 +0.32432521444954587331 +0.32394334870487867528 +0.32356184133175436290 +0.32318069212304084692 +0.32279990087154736278 +0.32241946737002480372 +0.32203939141116610934 +0.32165967278760609904 +0.32128031129192285986 +0.32090130671663691375 +0.32052265885421193925 +0.32014436749705504903 +0.31976643243751790013 +0.31938885346789519515 +0.31901163038042662512 +0.31863476296729614790 +0.31825825102063309835 +0.31788209433251218838 +0.31750629269495350693 +0.31713084589992279749 +0.31675575373933240186 +0.31638101600504042743 +0.31600663248885302314 +0.31563260298252210356 +0.31525892727774784685 +0.31488560516617747354 +0.31451263643940685633 +0.31414002088897929887 +0.31376775830638709008 +0.31339584848307172615 +0.31302429121042346649 +0.31265308627978172229 +0.31228223348243633328 +0.31191173260962640201 +0.31154158345254184814 +0.31117178580232335294 +0.31080233945006241481 +0.31043324418680123822 +0.31006449980353378848 +0.30969610609120618028 +0.30932806284071640013 +0.30896036984291486149 +0.30859302688860440478 +0.30822603376854118551 +0.30785939027343411922 +0.30749309619394604720 +0.30712715132069362545 +0.30676155544424765775 +0.30639630835513359530 +0.30603140984383075951 +0.30566685970077417389 +0.30530265771635417549 +0.30493880368091613731 +0.30457529738476191161 +0.30421213861814966339 +0.30384932717129292667 +0.30348686283436260291 +0.30312474539748712754 +0.30276297465075147075 +0.30240155038419846978 +0.30204047238782899543 +0.30167974045160189656 +0.30131935436543438867 +0.30095931391920260900 +0.30059961890274167207 +0.30024026910584605821 +0.29988126431827016871 +0.29952260432972749316 +0.29916428892989194166 +0.29880631790839834450 +0.29844869105484195249 +0.29809140815877904762 +0.29773446900972727613 +0.29737787339716598156 +0.29702162111053553861 +0.29666571193923974015 +0.29631014567264424286 +0.29595492210007712242 +0.29560004101083020567 +0.29524550219415790497 +0.29489130543927799533 +0.29453745053537294663 +0.29418393727158892448 +0.29383076543703656736 +0.29347793482079104210 +0.29312544521189276558 +0.29277329639934679406 +0.29242148817212443301 +0.29207002031916240448 +0.29171889262936395726 +0.29136810489159781223 +0.29101765689470016074 +0.29066754842747377641 +0.29031777927868845923 +0.28996834923708181275 +0.28961925809135941057 +0.28927050563019413021 +0.28892209164222765194 +0.28857401591606995916 +0.28822627824030006005 +0.28787887840346615409 +0.28753181619408602065 +0.28718509140064640839 +0.28683870381160486707 +0.28649265321538847084 +0.28614693940039526154 +0.28580156215499386008 +0.28545652126752407707 +0.28511181652629680183 +0.28476744771959516811 +0.28442341463567288873 +0.28407971706275703117 +0.28373635478904690732 +0.28339332760271412903 +0.28305063529190316318 +0.28270827764473221988 +0.28236625444929264184 +0.28202456549364962601 +0.28168321056584266771 +0.28134218945388522748 +0.28100150194576506424 +0.28066114782944584505 +0.28032112689286525775 +0.27998143892393689836 +0.27964208371054999347 +0.27930306104056984440 +0.27896437070183732754 +0.27862601248217044869 +0.27828798616936373245 +0.27795029155118866626 +0.27761292841539381149 +0.27727589654970569155 +0.27693919574182818133 +0.27660282577944372839 +0.27626678645021240932 +0.27593107754177353952 +0.27559569884174489607 +0.27526065013772382795 +0.27492593121728653438 +0.27459154186798900854 +0.27425748187736742612 +0.27392375103293786776 +0.27359034912219704072 +0.27325727593262244541 +0.27292453125167209782 +0.27259211486678558423 +0.27226002656538417224 +0.27192826613487047771 +0.27159683336262924191 +0.27126572803602783113 +0.27093494994241584806 +0.27060449886912529838 +0.27027437460347197851 +0.26994457693275480947 +0.26961510564425600345 +0.26928596052524206295 +0.26895714136296322572 +0.26862864794465390883 +0.26830048005753365237 +0.26797263748880684187 +0.26764512002566248627 +0.26731792745527566124 +0.26699105956480650992 +0.26666451614140124216 +0.26633829697219235655 +0.26601240184429891800 +0.26568683054482639117 +0.26536158286086719560 +0.26503665857950120532 +0.26471205748779519373 +0.26438777937280422137 +0.26406382402157091427 +0.26374019122112640767 +0.26341688075849029049 +0.26309389242067054981 +0.26277122599466418151 +0.26244888126745763435 +0.26212685802602675444 +0.26180515605733734041 +0.26148377514834469926 +0.26116271508599486761 +0.26084197565722389012 +0.26052155664895859655 +0.26020145784811743450 +0.25988167904160941468 +0.25956222001633560970 +0.25924308055918826588 +0.25892426045705152493 +0.25860575949680253416 +0.25828757746531044726 +0.25796971414943725698 +0.25765216933603773963 +0.25733494281196023223 +0.25701803436404629943 +0.25670144377913128864 +0.25638517084404499613 +0.25606921534561077891 +0.25575357707064660939 +0.25543825580596551950 +0.25512325133837515656 +0.25480856345467861601 +0.25449419194167427483 +0.25418013658615673522 +0.25386639717491560342 +0.25355297349473765456 +0.25323986533240533392 +0.25292707247469820020 +0.25261459470839275898 +0.25230243182026279580 +0.25199058359707893207 +0.25167904982561034588 +0.25136783029262299571 +0.25105692478488206287 +0.25074633308915045271 +0.25043605499219012689 +0.25012609028076165929 +0.24981643874162490215 +0.24950710016153862525 +0.24919807432726176488 +0.24888936102555284102 +0.24858096004317081773 +0.24827287116687410395 +0.24796509418342266295 +0.24765762887957665228 +0.24735047504209733971 +0.24704363245774746405 +0.24673710091329145722 +0.24643088019549472256 +0.24612497009112552226 +0.24581937038695381159 +0.24551408086975221035 +0.24520910132629608613 +0.24490443154336402620 +0.24460007130773678274 +0.24429602040619985415 +0.24399227862554126456 +0.24368884575255356228 +0.24338572157403334795 +0.24308290587678155203 +0.24278039844760340715 +0.24247819907330925293 +0.24217630754071450827 +0.24187472363663967134 +0.24157344714791118001 +0.24127247786136069019 +0.24097181556382638035 +0.24067146004215195232 +0.24037141108318840765 +0.24007166847379282637 +0.23977223200082944943 +0.23947310145116987301 +0.23917427661169274322 +0.23887575726928420017 +0.23857754321083846083 +0.23827963422325798559 +0.23798203009345328396 +0.23768473060834383048 +0.23738773555485709332 +0.23709104471992994978 +0.23679465789050860303 +0.23649857485354866538 +0.23620279539601529706 +0.23590731930488387236 +0.23561214636713950776 +0.23531727636977756157 +0.23502270909980457758 +0.23472844434423753568 +0.23443448189010443472 +0.23414082152444484763 +0.23384746303430972714 +0.23355440620676098940 +0.23326165082887365121 +0.23296919668773419243 +0.23267704357044186048 +0.23238519126410833726 +0.23209363955585773920 +0.23180238823282800498 +0.23151143708216995187 +0.23122078589104816393 +0.23093043444664035357 +0.23064038253613888818 +0.23035062994675006842 +0.23006117646569432256 +0.22977202188020698359 +0.22948316597753823376 +0.22919460854495332658 +0.22890634936973272562 +0.22861838823917221553 +0.22833072494058340163 +0.22804335926129440382 +0.22775629098864857980 +0.22746951991000666227 +0.22718304581274448295 +0.22689686848425683063 +0.22661098771195345436 +0.22632540328326256063 +0.22604011498562953664 +0.22575512260651747765 +0.22547042593340776984 +0.22518602475379881356 +0.22490191885520835480 +0.22461810802517237495 +0.22433459205124584024 +0.22405137072100239637 +0.22376844382203464612 +0.22348581114195575914 +0.22320347246839733479 +0.22292142758901103972 +0.22263967629146927396 +0.22235821836346383873 +0.22207705359270793477 +0.22179618176693469134 +0.22151560267389822090 +0.22123531610137422976 +0.22095532183715957397 +0.22067561966907273119 +0.22039620938495313451 +0.22011709077266394807 +0.21983826362008856981 +0.21955972771513390662 +0.21928148284572948623 +0.21900352879982729060 +0.21872586536540253310 +0.21844849233045346426 +0.21817140948300173253 +0.21789461661109313373 +0.21761811350279686161 +0.21734189994620659037 +0.21706597572943950314 +0.21679034064063837373 +0.21651499446796970694 +0.21623993699962529291 +0.21596516802382223488 +0.21569068732880264383 +0.21541649470283447121 +0.21514258993421089827 +0.21486897281125136305 +0.21459564312230139382 +0.21432260065573313645 +0.21404984519994518788 +0.21377737654336209649 +0.21350519447443644383 +0.21323329878164742901 +0.21296168925350200674 +0.21269036567853416564 +0.21241932784530603850 +0.21214857554240784676 +0.21187810855845759517 +0.21160792668210162693 +0.21133802970201545635 +0.21106841740690288067 +0.21079908958549711806 +0.21053004602655975286 +0.21026128651888259524 +0.20999281085128657098 +0.20972461881262291494 +0.20945671019177228289 +0.20918908477764561193 +0.20892174235918478664 +0.20865468272536116801 +0.20838790566517811920 +0.20812141096766909043 +0.20785519842189909001 +0.20758926781696510067 +0.20732361894199408114 +0.20705825158614610260 +0.20679316553861301631 +0.20652836058861837043 +0.20626383652541868674 +0.20599959313830257246 +0.20573563021659169170 +0.20547194754964004382 +0.20520854492683557324 +0.20494542213759897598 +0.20468257897138503187 +0.20442001521768196626 +0.20415773066601136665 +0.20389572510592995913 +0.20363399832702791525 +0.20337255011893060064 +0.20311138027129763128 +0.20285048857382362297 +0.20258987481623838556 +0.20232953878830645111 +0.20206948027982862826 +0.20180969908064089191 +0.20155019498061507721 +0.20129096776965949012 +0.20103201723771776943 +0.20077334317477069092 +0.20051494537083555669 +0.20025682361596613967 +0.19999897770025390487 +0.19974140741382598319 +0.19948411254684919602 +0.19922709288952539231 +0.19897034823209600041 +0.19871387836483944689 +0.19845768307807257202 +0.19820176216215096288 +0.19794611540746731571 +0.19769074260445437807 +0.19743564354358325574 +0.19718081801536402331 +0.19692626581034633482 +0.19667198671911825802 +0.19641798053230907772 +0.19616424704058640915 +0.19591078603465841845 +0.19565759730527357285 +0.19540468064322027986 +0.19515203583932830278 +0.19489966268446670683 +0.19464756096954630160 +0.19439573048551922474 +0.19414417102337852561 +0.19389288237415860938 +0.19364186432893498724 +0.19339111667882660783 +0.19314063921499249887 +0.19289043172863493125 +0.19264049401099828107 +0.19239082585336936271 +0.19214142704707806719 +0.19189229738349633525 +0.19164343665403985040 +0.19139484465016720627 +0.19114652116338085031 +0.19089846598522652865 +0.19065067890729309186 +0.19040315972121515942 +0.19015590821866926174 +0.18990892419137764269 +0.18966220743110681624 +0.18941575772966764979 +0.18916957487891622458 +0.18892365867075305852 +0.18867800889712435519 +0.18843262535002155977 +0.18818750782148166434 +0.18794265610358748542 +0.18769806998846719215 +0.18745374926829555529 +0.18720969373529344759 +0.18696590318172798262 +0.18672237739991331962 +0.18647911618220988639 +0.18623611932102523969 +0.18599338660881387097 +0.18575091783807759493 +0.18550871280136596586 +0.18526677129127605559 +0.18502509310045242574 +0.18478367802158768285 +0.18454252584742278365 +0.18430163637074678529 +0.18406100938439748371 +0.18382064468126099732 +0.18358054205427243311 +0.18334070129641605318 +0.18310112220072458089 +0.18286180456028069963 +0.18262274816821663648 +0.18238395281771380141 +0.18214541830200403627 +0.18190714441436833804 +0.18166913094813852414 +0.18143137769669653858 +0.18119388445347506256 +0.18095665101195687607 +0.18071967716567613471 +0.18048296270821795328 +0.18024650743321790625 +0.18001031113436369302 +0.17977437360539427758 +0.17953869464010011048 +0.17930327403232376726 +0.17906811157595925454 +0.17883320706495331454 +0.17859856029330450911 +0.17836417105506441327 +0.17813003914433686581 +0.17789616435527838556 +0.17766254648209911515 +0.17742918531906137769 +0.17719608066048131434 +0.17696323230072869004 +0.17673064003422639390 +0.17649830365545177147 +0.17626622295893495940 +0.17603439773926171652 +0.17580282779107050950 +0.17557151290905531615 +0.17534045288796440420 +0.17510964752260010924 +0.17487909660782099963 +0.17464879993853921203 +0.17441875730972308811 +0.17418896851639611989 +0.17395943335363692195 +0.17373015161658067473 +0.17350112310041701513 +0.17327234760039328387 +0.17304382491181130588 +0.17281555483003022133 +0.17258753715046587507 +0.17235977166858928999 +0.17213225817993019207 +0.17190499648007354083 +0.17167798636466252704 +0.17145122762939699057 +0.17122472007003444738 +0.17099846348238997851 +0.17077245766233578594 +0.17054670240580280249 +0.17032119750877935949 +0.17009594276731229701 +0.16987093797750679736 +0.16964618293552558015 +0.16942167743759184440 +0.16919742127998557701 +0.16897341425904696677 +0.16874965617117501648 +0.16852614681282712672 +0.16830288598052173255 +0.16807987347083527818 +0.16785710908040449296 +0.16763459260592600275 +0.16741232384415624668 +0.16719030259191214327 +0.16696852864606989697 +0.16674700180356763490 +0.16652572186140265909 +0.16630468861663391666 +0.16608390186638100072 +0.16586336140782365067 +0.16564306703820469435 +0.16542301855482624551 +0.16520321575505303446 +0.16498365843631124239 +0.16476434639608852906 +0.16454527943193480999 +0.16432645734146134053 +0.16410787992234274202 +0.16388954697231475355 +0.16367145828917636918 +0.16345361367078906079 +0.16323601291507652822 +0.16301865582002647570 +0.16280154218368847463 +0.16258467180417612852 +0.16236804447966601828 +0.16215166000839817406 +0.16193551818867685244 +0.16171961881886876000 +0.16150396169740627306 +0.16128854662278424570 +0.16107337339356267436 +0.16085844180836569861 +0.16064375166588137911 +0.16042930276486361274 +0.16021509490412966237 +0.16000112788256251606 +0.15978740149911010993 +0.15957391555278530038 +0.15936066984266694657 +0.15914766416789802306 +0.15893489832768870063 +0.15872237212131359851 +0.15851008534811392159 +0.15829803780749698849 +0.15808622929893506592 +0.15787465962196881031 +0.15766332857620315999 +0.15745223596131086019 +0.15724138157703110297 +0.15703076522316991581 +0.15682038669960018940 +0.15661024580626156655 +0.15640034234316205208 +0.15619067611037570908 +0.15598124690804487935 +0.15577205453637962829 +0.15556309879565688448 +0.15535437948622304871 +0.15514589640849094088 +0.15493764936294257550 +0.15472963815012785727 +0.15452186257066549691 +0.15431432242524245613 +0.15410701751461414188 +0.15389994763960601620 +0.15369311260111084838 +0.15348651220009165708 +0.15328014623758071111 +0.15307401451467847475 +0.15286811683255668859 +0.15266245299245517764 +0.15245702279568429383 +0.15225182604362422212 +0.15204686253772484172 +0.15184213207950691960 +0.15163763447056022304 +0.15143336951254651734 +0.15122933700719659589 +0.15102553675631302799 +0.15082196856176866007 +0.15061863222550697650 +0.15041552754954357063 +0.15021265433596386885 +0.15001001238692573958 +0.14980760150465774472 +0.14960542149146000002 +0.14940347214970509104 +0.14920175328183646335 +0.14900026469037011556 +0.14879900617789371120 +0.14859797754706738360 +0.14839717860062359711 +0.14819660914136650876 +0.14799626897217435517 +0.14779615789599648279 +0.14759627571585579031 +0.14739662223484814585 +0.14719719725614197059 +0.14699800058297990413 +0.14679903201867650075 +0.14660029136662081073 +0.14640177843027479820 +0.14620349301317450696 +0.14600543491892967185 +0.14580760395122333017 +0.14560999991381379237 +0.14541262261053217175 +0.14521547184528477148 +0.14501854742205202986 +0.14482184914488838157 +0.14462537681792400623 +0.14442913024536249700 +0.14423310923148335849 +0.14403731358064061907 +0.14384174309726349694 +0.14364639758585656670 +0.14345127685099900994 +0.14325638069734680791 +0.14306170892963035457 +0.14286726135265609416 +0.14267303777130665998 +0.14247903799053956986 +0.14228526181539000173 +0.14209170905096774051 +0.14189837950245967613 +0.14170527297512894305 +0.14151238927431497583 +0.14131972820543431402 +0.14112728957397921437 +0.14093507318552031538 +0.14074307884570386173 +0.14055130636025359170 +0.14035975553497115342 +0.14016842617573396779 +0.13997731808849867008 +0.13978643107929789036 +0.13959576495424286247 +0.13940531951952217504 +0.13921509458140235438 +0.13902508994622828076 +0.13883530542042177292 +0.13864574081048464116 +0.13845639592299521792 +0.13826727056461149412 +0.13807836454206959265 +0.13788967766218379607 +0.13770120973184837854 +0.13751296055803494123 +0.13732492994779532669 +0.13713711770825975922 +0.13694952364663798283 +0.13676214757021903923 +0.13657498928637082369 +0.13638804860254175044 +0.13620132532625897626 +0.13601481926512976051 +0.13582853022684154842 +0.13564245801916055556 +0.13545660244993493193 +0.13527096332709112603 +0.13508554045863682691 +0.13490033365266010379 +0.13471534271732929500 +0.13453056746089361861 +0.13434600769168195122 +0.13416166321810579776 +0.13397753384865584980 +0.13379361939190465014 +0.13360991965650589886 +0.13342643445119378720 +0.13324316358478510702 +0.13306010686617672500 +0.13287726410434783086 +0.13269463510835913245 +0.13251221968735285572 +0.13233001765055349419 +0.13214802880726672640 +0.13196625296688127560 +0.13178468993886705007 +0.13160333953277669750 +0.13142220155824552164 +0.13124127582499006683 +0.13106056214281125438 +0.13088006032159102410 +0.13069977017129474905 +0.13051969150197095804 +0.13033982412375011428 +0.13016016784684719676 +0.12998072248155892461 +0.12980148783826603309 +0.12962246372743252421 +0.12944364995960577769 +0.12926504634541674532 +0.12908665269557950683 +0.12890846882089304626 +0.12873049453223897598 +0.12855272964058345186 +0.12837517395697684019 +0.12819782729255291276 +0.12802068945853056769 +0.12784376026621219191 +0.12766703952698513214 +0.12749052705232100102 +0.12731422265377631553 +0.12713812614299199732 +0.12696223733169348380 +0.12678655603169206034 +0.12661108205488294520 +0.12643581521324706585 +0.12626075531885061487 +0.12608590218384418957 +0.12591125562046506792 +0.12573681544103476604 +0.12556258145796106440 +0.12538855348373709186 +0.12521473133094199182 +0.12504111481224053359 +0.12486770374038300147 +0.12469449792820683220 +0.12452149718863426975 +0.12434870133467444686 +0.12417611017942298268 +0.12400372353606090026 +0.12383154121785712454 +0.12365956303816570683 +0.12348778881042822564 +0.12331621834817273198 +0.12314485146501426283 +0.12297368797465459134 +0.12280272769088229623 +0.12263197042757371935 +0.12246141599869160566 +0.12229106421828636608 +0.12212091490049604980 +0.12195096785954516461 +0.12178122290974720265 +0.12161167986550192044 +0.12144233854129750372 +0.12127319875170990138 +0.12110426031140261727 +0.12093552303512770940 +0.12076698673772422177 +0.12059865123412077947 +0.12043051633933304911 +0.12026258186846541798 +0.12009484763671104957 +0.11992731345935062071 +0.11975997915175459752 +0.11959284452938104271 +0.11942590940777732256 +0.11925917360257951017 +0.11909263692951255198 +0.11892629920439055924 +0.11876016024311593366 +0.11859421986168165730 +0.11842847787616843369 +0.11826293410274729689 +0.11809758835767832086 +0.11793244045731089698 +0.11776749021808446960 +0.11760273745652749522 +0.11743818198925864982 +0.11727382363298630152 +0.11710966220450860775 +0.11694569752071384827 +0.11678192939857974519 +0.11661835765517546137 +0.11645498210765881097 +0.11629180257327897952 +0.11612881886937530262 +0.11596603081337686358 +0.11580343822280457500 +0.11564104091526875018 +0.11547883870847085175 +0.11531683142020335286 +0.11515501886834898781 +0.11499340087088213980 +0.11483197724586721722 +0.11467074781146092965 +0.11450971238590992862 +0.11434887078755279211 +0.11418822283481934454 +0.11402776834623025437 +0.11386750714039867161 +0.11370743903602820168 +0.11354756385191466794 +0.11338788140694550099 +0.11322839152009936403 +0.11306909401044784591 +0.11290998869715335173 +0.11275107539947067103 +0.11259235393674689452 +0.11243382412842080342 +0.11227548579402392426 +0.11211733875317908549 +0.11195938282560283228 +0.11180161783110283136 +0.11164404358958006369 +0.11148665992102797795 +0.11132946664553186600 +0.11117246358327122213 +0.11101565055451670383 +0.11085902737963296283 +0.11070259387907713244 +0.11054634987339932717 +0.11039029518324303125 +0.11023442962934409950 +0.11007875303253278343 +0.10992326521373146919 +0.10976796599395662046 +0.10961285519431784863 +0.10945793263601792666 +0.10930319814035421855 +0.10914865152871637555 +0.10899429262258872320 +0.10884012124354891515 +0.10868613721326857158 +0.10853234035351337627 +0.10837873048614225790 +0.10822530743310934676 +0.10807207101646176817 +0.10791902105834144665 +0.10776615738098450914 +0.10761347980672081315 +0.10746098815797561210 +0.10730868225726758469 +0.10715656192721050022 +0.10700462699051246918 +0.10685287726997638735 +0.10670131258849981093 +0.10654993276907465116 +0.10639873763478858992 +0.10624772700882310905 +0.10609690071445532222 +0.10594625857505740596 +0.10579580041409594737 +0.10564552605513374828 +0.10549543532182774352 +0.10534552803793094389 +0.10519580402729113155 +0.10504626311385192872 +0.10489690512165240899 +0.10474772987482643127 +0.10459873719760476307 +0.10444992691431254084 +0.10430129884937144880 +0.10415285282729860872 +0.10400458867270671870 +0.10385650621030530216 +0.10370860526489873721 +0.10356088566138803297 +0.10341334722477026065 +0.10326598978013841468 +0.10311881315268205117 +0.10297181716768628867 +0.10282500165053357066 +0.10267836642670177816 +0.10253191132176567302 +0.10238563616139681467 +0.10223954077136240826 +0.10209362497752734467 +0.10194788860585242418 +0.10180233148239546670 +0.10165695343331118683 +0.10151175428485087471 +0.10136673386336300662 +0.10122189199529255110 +0.10107722850718237062 +0.10093274322567140355 +0.10078843597749627403 +0.10064430658949091724 +0.10050035488858584387 +0.10035658070180983326 +0.10021298385628815697 +0.10006956417924385561 +0.09992632149799754449 +0.09978325563996721936 +0.09964036643266853399 +0.09949765370371441153 +0.09935511728081616867 +0.09921275699178219720 +0.09907057266451893551 +0.09892856412703092406 +0.09878673120741986169 +0.09864507373388645139 +0.09850359153472845741 +0.09836228443834220403 +0.09822115227322228415 +0.09808019486796057396 +0.09793941205124842564 +0.09779880365187441915 +0.09765836949872594430 +0.09751810942078878441 +0.09737802324714681101 +0.09723811080698298304 +0.09709837192957791741 +0.09695880644431165152 +0.09681941418066236649 +0.09668019496820692837 +0.09654114863662138779 +0.09640227501567967539 +0.09626357393525568351 +0.09612504522532122619 +0.09598668871594759344 +0.09584850423730476021 +0.09571049161966196928 +0.09557265069338755081 +0.09543498128894824239 +0.09529748323691122902 +0.09516015636794179777 +0.09502300051280501703 +0.09488601550236522297 +0.09474920116758572819 +0.09461255733953018165 +0.09447608384936051484 +0.09433978052833902339 +0.09420364720782714585 +0.09406768371928607431 +0.09393188989427676827 +0.09379626556445923302 +0.09366081056159422658 +0.09352552471754130292 +0.09339040786426044960 +0.09325545983381143544 +0.09312068045835347752 +0.09298606957014660113 +0.09285162700155000226 +0.09271735258502333821 +0.09258324615312632511 +0.09244930753851880734 +0.09231553657396085466 +0.09218193309231234589 +0.09204849692653421789 +0.09191522790968685575 +0.09178212587493163321 +0.09164919065553002453 +0.09151642208484381258 +0.09138381999633579666 +0.09125138422356871004 +0.09111911460020603870 +0.09098701096001195199 +0.09085507313685131647 +0.09072330096468957106 +0.09059169427759258819 +0.09046025290972785349 +0.09032897669536277263 +0.09019786546886603140 +0.09006691906470729037 +0.08993613731745647710 +0.08980552006178563196 +0.08967506713246670147 +0.08954477836437331473 +0.08941465359248003397 +0.08928469265186241011 +0.08915489537769748229 +0.08902526160526294530 +0.08889579116993856500 +0.08876648390720440207 +0.08863733965264262993 +0.08850835824193646617 +0.08837953951087020033 +0.08825088329533049836 +0.08812238943130429325 +0.08799405775488099157 +0.08786588810225103019 +0.08773788030970651464 +0.08761003421364142729 +0.08748234965055078083 +0.08735482645703224192 +0.08722746446978411894 +0.08710026352560730489 +0.08697322346140420879 +0.08684634411417872790 +0.08671962532103734411 +0.08659306691918775001 +0.08646666874593998686 +0.08634043063870593115 +0.08621435243499947498 +0.08608843397243659545 +0.08596267508873506324 +0.08583707562171535854 +0.08571163540929940816 +0.08558635428951168189 +0.08546123210047906760 +0.08533626868042987201 +0.08521146386769590242 +0.08508681750071005190 +0.08496232941800836713 +0.08483799945822899369 +0.08471382746011218989 +0.08458981326250139543 +0.08446595670434163539 +0.08434225762468096355 +0.08421871586266986565 +0.08409533125756137040 +0.08397210364871118826 +0.08384903287557710083 +0.08372611877772062616 +0.08360336119480482608 +0.08348075996659617970 +0.08335831493296369521 +0.08323602593387884052 +0.08311389280941662572 +0.08299191539975413201 +0.08287009354517173298 +0.08274842708605262276 +0.08262691586288271883 +0.08250555971625128659 +0.08238435848684978746 +0.08226331201547389116 +0.08214242014302101935 +0.08202168271049245507 +0.08190109955899242677 +0.08178067052972787243 +0.08166039546400968852 +0.08154027420325099529 +0.08142030658896869111 +0.08130049246278281405 +0.08118083166641644477 +0.08106132404169631711 +0.08094196943055181892 +0.08082276767501657411 +0.08070371861722658302 +0.08058482209942197105 +0.08046607796394592005 +0.08034748605324490422 +0.08022904620986941182 +0.08011075827647272385 +0.07999262209581206595 +0.07987463751074808105 +0.07975680436424492648 +0.07963912249937041277 +0.07952159175929569834 +0.07940421198729603891 +0.07928698302674978826 +0.07916990472113934196 +0.07905297691405080429 +0.07893619944917351638 +0.07881957217030141627 +0.07870309492133130413 +0.07858676754626429950 +0.07847058988920518896 +0.07835456179436255109 +0.07823868310604907561 +0.07812295366868057811 +0.07800737332677797065 +0.07789194192496487479 +0.07777665930796962002 +0.07766152532062428615 +0.07754653980786459233 +0.07743170261473097948 +0.07731701358636720867 +0.07720247256802144353 +0.07708807940504579237 +0.07697383394289661340 +0.07685973602713420949 +0.07674578550342273098 +0.07663198221753117489 +0.07651832601533210820 +0.07640481674280238944 +0.07629145424602333525 +0.07617823837117997099 +0.07606516896456233523 +0.07595224587256384219 +0.07583946894168275277 +0.07572683801852146679 +0.07561435294978662014 +0.07550201358228951498 +0.07538981976294496790 +0.07527777133877333604 +0.07516586815689826895 +0.07505411006454842937 +0.07494249690905688266 +0.07483102853786059716 +0.07471970479850184588 +0.07460852553862645786 +0.07449749060598535866 +0.07438659984843379314 +0.07427585311393143652 +0.07416525025054265807 +0.07405479110643597984 +0.07394447552988511752 +0.07383430336926775917 +0.07372427447306650894 +0.07361438868986856787 +0.07350464586836541470 +0.07339504585735373565 +0.07328558850573427264 +0.07317627366251287790 +0.07306710117679986183 +0.07295807089781009003 +0.07284918267486363563 +0.07274043635738462743 +0.07263183179490234620 +0.07252336883705078063 +0.07241504733356851631 +0.07230686713429912427 +0.07219882808919056427 +0.07209093004829623952 +0.07198317286177358110 +0.07187555637988539414 +0.07176808045299924721 +0.07166074493158712533 +0.07155354966622658186 +0.07144649450759936460 +0.07133957930649242885 +0.07123280391379752108 +0.07112616818051144263 +0.07101967195773575825 +0.07091331509667671285 +0.07080709744864620292 +0.07070101886506023614 +0.07059507919744029136 +0.07048927829741265250 +0.07038361601670840850 +0.07027809220716409178 +0.07017270672072069282 +0.07006745940942449291 +0.06996235012542677267 +0.06985737872098372880 +0.06975254504845677939 +0.06964784896031193939 +0.06954329030912087539 +0.06943886894755976757 +0.06933458472841023956 +0.06923043750455880330 +0.06912642712899683128 +0.06902255345482133375 +0.06891881633523398720 +0.06881521562354162014 +0.06871175117315622694 +0.06860842283759500948 +0.06850523047048023839 +0.06840217392553889220 +0.06829925305660398960 +0.06819646771761275761 +0.06809381776260810260 +0.06799130304573805517 +0.06788892342125536772 +0.06778667874351873568 +0.06768456886699125707 +0.06758259364624166765 +0.06748075293594367474 +0.06737904659087633197 +0.06727747446592374780 +0.06717603641607515497 +0.06707473229642546553 +0.06697356196217400803 +0.06687252526862610957 +0.06677162207119177739 +0.06667085222538628175 +0.06657021558683065554 +0.06646971201125038975 +0.06636934135447672412 +0.06626910347244596711 +0.06616899822119966246 +0.06606902545688476958 +0.06596918503575301129 +0.06586947681416205347 +0.06576990064857415885 +0.06567045639555725567 +0.06557114391178445190 +0.06547196305403378547 +0.06537291367918919571 +0.06527399564423928824 +0.06517520880627819535 +0.06507655302250522911 +0.06497802815022518663 +0.06487963404684786439 +0.06478137056988832188 +0.06468323757696720078 +0.06458523492581003111 +0.06448736247424791124 +0.06438962008021713312 +0.06429200760175890483 +0.06419452489702047460 +0.06409717182425365978 +0.06399994824181580444 +0.06390285400816962669 +0.06380588898188295499 +0.06370905302162915840 +0.06361234598618627223 +0.06351576773443845525 +0.06341931812537443536 +0.06332299701808853654 +0.06322680427178035967 +0.06313073974575450498 +0.06303480329942130755 +0.06293899479229590754 +0.06284331408399899954 +0.06274776103425647178 +0.06265233550289921183 +0.06255703734986389764 +0.06246186643519190812 +0.06236682261903024604 +0.06227190576163110780 +0.06217711572335179321 +0.06208245236465500388 +0.06198791554610838528 +0.06189350512838542179 +0.06179922097226416000 +0.06170506293862821484 +0.06161103088846661691 +0.06151712468287299368 +0.06142334418304706140 +0.06132968925029300827 +0.06123615974602044515 +0.06114275553174453731 +0.06104947646908515796 +0.06095632241976779025 +0.06086329324562267384 +0.06077038880858577630 +0.06067760897069777309 +0.06058495359410476927 +0.06049242254105798022 +0.06040001567391369008 +0.06030773285513376519 +0.06021557394728462714 +0.06012353881303823810 +0.06003162731517158041 +0.05993983931656686470 +0.05984817468021143977 +0.05975663326919743168 +0.05966521494672279158 +0.05957391957608983157 +0.05948274702070651537 +0.05939169714408568113 +0.05930076980984501367 +0.05920996488170803679 +0.05911928222350245482 +0.05902872169916167228 +0.05893828317272387096 +0.05884796650833239856 +0.05875777157023564373 +0.05866769822278681407 +0.05857774633044470630 +0.05848791575777247120 +0.05839820636943868909 +0.05830861803021694656 +0.05821915060498540628 +0.05812980395872795886 +0.05804057795653280033 +0.05795147246359334814 +0.05786248734520803988 +0.05777362246678022922 +0.05768487769381833163 +0.05759625289193517211 +0.05750774792684939379 +0.05741936266438368852 +0.05733109697046606668 +0.05724295071112959349 +0.05715492375251165352 +0.05706701596085524825 +0.05697922720250754580 +0.05689155734392099817 +0.05680400625165274442 +0.05671657379236477725 +0.05662925983282403319 +0.05654206423990183056 +0.05645498688057502823 +0.05636802762192444360 +0.05628118633113619873 +0.05619446287550111663 +0.05610785712241452006 +0.05602136893937682827 +0.05593499819399277290 +0.05584874475397225840 +0.05576260848712942531 +0.05567658926138350367 +0.05559068694475824413 +0.05550490140538177214 +0.05541923251148752477 +0.05533368013141289066 +0.05524824413360027164 +0.05516292438659670117 +0.05507772075905343484 +0.05499263311972682478 +0.05490766133747743832 +0.05482280528127052299 +0.05473806482017577746 +0.05465343982336761525 +0.05456893016012484554 +0.05448453569983058298 +0.05440025631197297623 +0.05431609186614395901 +0.05423204223204049906 +0.05414810727946366836 +0.05406428687831889290 +0.05398058089861657027 +0.05389698921047077901 +0.05381351168410041658 +0.05373014818982873447 +0.05364689859808298433 +0.05356376277939529917 +0.05348074060440164562 +0.05339783194384247617 +0.05331503666856259732 +0.05323235464951107249 +0.05314978575774117336 +0.05306732986441022037 +0.05298498684078027654 +0.05290275655821700951 +0.05282063888819057973 +0.05273863370227548780 +0.05265674087214990140 +0.05257496026959668223 +0.05249329176650233131 +0.05241173523485774532 +0.05233029054675780722 +0.05224895757440151112 +0.05216773619009196228 +0.05208662626623598163 +0.05200562767534494535 +0.05192474029003360525 +0.05184396398302114350 +0.05176329862713067997 +0.05168274409528885588 +0.05160230026052688851 +0.05152196699597923202 +0.05144174417488472928 +0.05136163167058584167 +0.05128162935652895438 +0.05120173710626434171 +0.05112195479344574384 +0.05104228229183133125 +0.05096271947528242113 +0.05088326621776436548 +0.05080392239334631521 +0.05072468787620081770 +0.05064556254060461477 +0.05056654626093758098 +0.05048763891168363271 +0.05040884036743013136 +0.05033015050286809844 +0.05025156919279218093 +0.05017309631210038756 +0.05009473173579473415 +0.05001647533898021664 +0.04993832699686569232 +0.04986028658476348435 +0.04978235397808904866 +0.04970452905236187602 +0.04962681168320428465 +0.04954920174634235008 +0.04947169911760544714 +0.04939430367292623608 +0.04931701528834090548 +0.04923983383998847829 +0.04916275920411204703 +0.04908579125705717777 +0.04900892987527320777 +0.04893217493531259316 +0.04885552631383063837 +0.04877898388758643983 +0.04870254753344178261 +0.04862621712836165400 +0.04854999254941439607 +0.04847387367377112982 +0.04839786037870631719 +0.04832195254159712267 +0.04824615003992412110 +0.04817045275127061071 +0.04809486055332289067 +0.04801937332387044843 +0.04794399094080514095 +0.04786871328212252003 +0.04779354022592022244 +0.04771847165039927452 +0.04764350743386329412 +0.04756864745471876127 +0.04749389159147500428 +0.04741923972274376953 +0.04734469172724012354 +0.04727024748378119701 +0.04719590687128728812 +0.04712166976878120334 +0.04704753605538810474 +0.04697350561033627331 +0.04689957831295609586 +0.04682575404268070340 +0.04675203267904584625 +0.04667841410168958871 +0.04660489819035268377 +0.04653148482487811516 +0.04645817388521140262 +0.04638496525140046317 +0.04631185880359553475 +0.04623885442204943991 +0.04616595198711675313 +0.04609315137925508454 +0.04602045247902367825 +0.04594785516708431439 +0.04587535932420114954 +0.04580296483123996731 +0.04573067156916942044 +0.04565847941905974011 +0.04558638826208345762 +0.04551439797951525174 +0.04544250845273172662 +0.04537071956321171023 +0.04529903119253560206 +0.04522744322238634457 +0.04515595553454834071 +0.04508456801090814092 +0.04501328053345418634 +0.04494209298427650351 +0.04487100524556745379 +0.04480001719962067169 +0.04472912872883185592 +0.04465833971569839467 +0.04458765004281940725 +0.04451705959289567471 +0.04444656824872943862 +0.04437617589322508799 +0.04430588240938798661 +0.04423568768032550697 +0.04416559158924641265 +0.04409559401946083063 +0.04402569485438075775 +0.04395589397751922811 +0.04388619127249094448 +0.04381658662301190360 +0.04374707991289951414 +0.04367767102607257590 +0.04360835984655088426 +0.04353914625845603514 +0.04347003014601038412 +0.04340101139353770565 +0.04333208988546302654 +0.04326326550631227202 +0.04319453814071288339 +0.04312590767339299219 +0.04305737398918198927 +0.04298893697301033046 +0.04292059650990938391 +0.04285235248501154809 +0.04278420478354996725 +0.04271615329085912127 +0.04264819789237381947 +0.04258033847363017904 +0.04251257492026486173 +0.04244490711801530980 +0.04237733495271997497 +0.04230985831031765926 +0.04224247707684809783 +0.04217519113845161205 +0.04210800038136918583 +0.04204090469194235458 +0.04197390395661304563 +0.04190699806192415416 +0.04184018689451850931 +0.04177347034113984559 +0.04170684828863215066 +0.04164032062393970002 +0.04157388723410739007 +0.04150754800628019686 +0.04144130282770355084 +0.04137515158572306617 +0.04130909416778467957 +0.04124313046143445599 +0.04117726035431843595 +0.04111148373418328783 +0.04104580048887526700 +0.04098021050634095830 +0.04091471367462703318 +0.04084930988187979867 +0.04078399901634603697 +0.04071878096637202710 +0.04065365562040416936 +0.04058862286698865229 +0.04052368259477149431 +0.04045883469249864084 +0.04039407904901545082 +0.04032941555326750166 +0.04026484409429956918 +0.04020036456125640478 +0.04013597684338233301 +0.04007168083002105030 +0.04000747641061616622 +0.03994336347471044713 +0.03987934191194641292 +0.03981541161206584439 +0.03975157246491003299 +0.03968782436041973921 +0.03962416718863477627 +0.03956060083969446112 +0.03949712520383743403 +0.03943374017140145044 +0.03937044563282353360 +0.03930724147863974560 +0.03924412759948553431 +0.03918110388609512273 +0.03911817022930199478 +0.03905532652003866623 +0.03899257264933641415 +0.03892990850832581118 +0.03886733398823599694 +0.03880484898039522623 +0.03874245337623044572 +0.03868014706726748825 +0.03861792994513103122 +0.03855580190154409698 +0.03849376282832903118 +0.03843181261740622606 +0.03836995116079502943 +0.03830817835061334220 +0.03824649407907736165 +0.03818489823850220594 +0.03812339072130113693 +0.03806197141998592798 +0.03800064022716679452 +0.03793939703555228998 +0.03787824173794934746 +0.03781717422726296046 +0.03775619439649668951 +0.03769530213875204455 +0.03763449734722879025 +0.03757377991522487665 +0.03751314973613616849 +0.03745260670345688936 +0.03739215071077898328 +0.03733178165179252411 +0.03727149942028548657 +0.03721130391014374622 +0.03715119501535112806 +0.03709117262998899711 +0.03703123664823695232 +0.03697138696437192451 +0.03691162347276880085 +0.03685194606790007099 +0.03679235464433567443 +0.03673284909674356946 +0.03667342931988884502 +0.03661409520863429662 +0.03655484665794014182 +0.03649568356286411741 +0.03643660581856127817 +0.03637761332028396216 +0.03631870596338202667 +0.03625988364330241798 +0.03620114625558937954 +0.03614249369588445893 +0.03608392585992607066 +0.03602544264355018316 +0.03596704394268944449 +0.03590872965337370271 +0.03585049967172981161 +0.03579235389398162381 +0.03573429221644981724 +0.03567631453555187432 +0.03561842074780240813 +0.03556061074981250320 +0.03550288443829015261 +0.03544524171004015400 +0.03538768246196365846 +0.03533020659105889222 +0.03527281399442029619 +0.03521550456923906031 +0.03515827821280283205 +0.03510113482249576505 +0.03504407429579840111 +0.03498709653028753142 +0.03493020142363668229 +0.03487338887361528250 +0.03481665877808917675 +0.03476001103502054934 +0.03470344554246748009 +0.03464696219858456189 +0.03459056090162214436 +0.03453424154992679185 +0.03447800404194109603 +0.03442184827620352328 +0.03436577415134867836 +0.03430978156610670765 +0.03425387041930396531 +0.03419804060986234712 +0.03414229203679965130 +0.03408662459922941201 +0.03403103819636062871 +0.03397553272749827963 +0.03392010809204257932 +0.03386476418948953376 +0.03380950091943060037 +0.03375431818155263247 +0.03369921587563805970 +0.03364419390156443701 +0.03358925215930484709 +0.03353439054892767140 +0.03347960897059645141 +0.03342490732457004815 +0.03337028551120223285 +0.03331574343094229063 +0.03326128098433427799 +0.03320689807201735594 +0.03315259459472578996 +0.03309837045328852673 +0.03304422554862982558 +0.03299015978176843278 +0.03293617305381805332 +0.03288226526598723304 +0.03282843631957911568 +0.03277468611599172049 +0.03272101455671737325 +0.03266742154334340703 +0.03261390697755140594 +0.03256047076111760058 +0.03250711279591267377 +0.03245383298390162874 +0.03240063122714405275 +0.03234750742779366611 +0.03229446148809856504 +0.03224149331040111754 +0.03218860279713779693 +0.03213578985083940381 +0.03208305437413051103 +0.03203039626973024079 +0.03197781544045133484 +0.03192531178920066104 +0.03187288521897909538 +0.03182053563288117504 +0.03176826293409563268 +0.03171606702590461235 +0.03166394781168425238 +0.03161190519490432449 +0.03155993907912825469 +0.03150804936801320649 +0.03145623596530962296 +0.03140449877486189978 +0.03135283770060747627 +0.03130125264657748763 +0.03124974351689646310 +0.03119831021578207270 +0.03114695264754557477 +0.03109567071659122967 +0.03104446432741660503 +0.03099333338461248213 +0.03094227779286263386 +0.03089129745694410220 +0.03084039228172662239 +0.03078956217217332370 +0.03073880703333988981 +0.03068812677037507930 +0.03063752128852056250 +0.03058699049311055379 +0.03053653428957231464 +0.03048615258342551176 +0.03043584528028267164 +0.03038561228584886822 +0.03033545350592174034 +0.03028536884639145693 +0.03023535821324051243 +0.03018542151254411873 +0.03013555865046951485 +0.03008576953327653583 +0.03003605406731718955 +0.02998641215903562890 +0.02993684371496847102 +0.02988734864174414502 +0.02983792684608336729 +0.02978857823479883621 +0.02973930271479528764 +0.02969010019306943249 +0.02964097057670971383 +0.02959191377289667468 +0.02954292968890250698 +0.02949401823209118340 +0.02944517930991851634 +0.02939641282993170346 +0.02934771869976992090 +0.02929909682716363983 +0.02925054711993495607 +0.02920206948599748942 +0.02915366383335621023 +0.02910533007010752959 +0.02905706810443908425 +0.02900887784462997249 +0.02896075919905035517 +0.02891271207616167779 +0.02886473638451656637 +0.02881683203275854643 +0.02876899892962246977 +0.02872123698393392460 +0.02867354610460962419 +0.02862592620065711885 +0.02857837718117468145 +0.02853089895535175155 +0.02848349143246807491 +0.02843615452189442172 +0.02838888813309211820 +0.02834169217561301884 +0.02829456655909974583 +0.02824751119328511306 +0.02820052598799280621 +0.02815361085313655351 +0.02810676569872064268 +0.02805999043483969890 +0.02801328497167840034 +0.02796664921951200200 +0.02792008308870559327 +0.02787358648971452121 +0.02782715933308424483 +0.02778080152945015119 +0.02773451298953775665 +0.02768829362416218298 +0.02764214334422888941 +0.02759606206073273935 +0.02755004968475859711 +0.02750410612748103653 +0.02745823130016410846 +0.02741242511416188896 +0.02736668748091763276 +0.02732101831196434572 +0.02727541751892445521 +0.02722988501350978932 +0.02718442070752164971 +0.02713902451285045425 +0.02709369634147626438 +0.02704843610546797325 +0.02700324371698391984 +0.02695811908827148995 +0.02691306213166706762 +0.02686807275959630578 +0.02682315088457350866 +0.02677829641920219730 +0.02673350927617461348 +0.02668878936827187923 +0.02664413660836395178 +0.02659955090940929051 +0.02655503218445540506 +0.02651058034663810944 +0.02646619530918190022 +0.02642187698539990096 +0.02637762528869348755 +0.02633344013255280169 +0.02628932143055597720 +0.02624526909636972979 +0.02620128304374900671 +0.02615736318653692424 +0.02611350943866481977 +0.02606972171415203668 +0.02602599992710625740 +0.02598234399172287198 +0.02593875382228542567 +0.02589522933316539335 +0.02585177043882191938 +0.02580837705380229982 +0.02576504909274129548 +0.02572178647036148583 +0.02567858910147315793 +0.02563545690097417465 +0.02559238978385003360 +0.02554938766517349247 +0.02550645046010516920 +0.02546357808389269547 +0.02542077045187132039 +0.02537802747946354617 +0.02533534908217894080 +0.02529273517561460294 +0.02525018567545450968 +0.02520770049746985306 +0.02516527955751887008 +0.02512292277154677331 +0.02508063005558576822 +0.02503840132575479993 +0.02499623649825990709 +0.02495413548939365983 +0.02491209821553553097 +0.02487012459315169483 +0.02482821453879472534 +0.02478636796910416856 +0.02474458480080570302 +0.02470286495071175731 +0.02466120833572107290 +0.02461961487281878400 +0.02457808447907637583 +0.02453661707165149045 +0.02449521256778822154 +0.02445387088481656285 +0.02441259194015277592 +0.02437137565129920275 +0.02433022193584402637 +0.02428913071146163866 +0.02424810189591208864 +0.02420713540704142255 +0.02416623116278153807 +0.02412538908114980271 +0.02408460908024970260 +0.02404389107826998204 +0.02400323499348513967 +0.02396264074425525498 +0.02392210824902578359 +0.02388163742632778974 +0.02384122819477739463 +0.02380088047307642174 +0.02376059418001172027 +0.02372036923445542886 +0.02368020555536489574 +0.02364010306178248796 +0.02360006167283580300 +0.02356008130773723855 +0.02352016188578431866 +0.02348030332635936412 +0.02344050554892961394 +0.02340076847304714547 +0.02336109201834857263 +0.02332147610455551079 +0.02328192065147391063 +0.02324242557899452652 +0.02320299080709260081 +0.02316361625582768341 +0.02312430184534407587 +0.02308504749587013405 +0.02304585312771871217 +0.02300671866128688528 +0.02296764401705595274 +0.02292862911559140002 +0.02288967387754268709 +0.02285077822364353986 +0.02281194207471150606 +0.02277316535164813222 +0.02273444797543894974 +0.02269578986715309332 +0.02265719094794384214 +0.02261865113904785660 +0.02258017036178568138 +0.02254174853756140198 +0.02250338558786274187 +0.02246508143426092716 +0.02242683599841050618 +0.02238864920204973463 +0.02235052096699989208 +0.02231245121516577112 +0.02227443986853539989 +0.02223648684917984772 +0.02219859207925361372 +0.02216075548099395026 +0.02212297697672138685 +0.02208525648883931727 +0.02204759393983407936 +0.02200998925227495157 +0.02197244234881390312 +0.02193495315218580918 +0.02189752158520813161 +0.02186014757078104387 +0.02182283103188737555 +0.02178557189159231397 +0.02174837007304382744 +0.02171122549947207547 +0.02167413809418966900 +0.02163710778059164605 +0.02160013448215520118 +0.02156321812243985891 +0.02152635862508712680 +0.02148955591382086666 +0.02145280991244685395 +0.02141612054485284022 +0.02137948773500866415 +0.02134291140696590108 +0.02130639148485811984 +0.02126992789290054961 +0.02123352055539021524 +0.02119716939670582279 +0.02116087434130767275 +0.02112463531373768785 +0.02108845223861916668 +0.02105232504065711677 +0.02101625364463766479 +0.02098023797542847638 +0.02094427795797850628 +0.02090837351731776594 +0.02087252457855775373 +0.02083673106689084079 +0.02080099290759059374 +0.02076531002601155265 +0.02072968234758929343 +0.02069410979784027521 +0.02065859230236169117 +0.02062312978683178422 +0.02058772217700931273 +0.02055236939873383850 +0.02051707137792559837 +0.02048182804058523709 +0.02044663931279422017 +0.02041150512071416429 +0.02037642539058730565 +0.02034140004873625021 +0.02030642902156370999 +0.02027151223555295409 +0.02023664961726719808 +0.02020184109334990583 +0.02016708659052462299 +0.02013238603559490761 +0.02009773935544433010 +0.02006314647703628939 +0.02002860732741423497 +0.01999412183370121582 +0.01995968992310016843 +0.01992531152289373983 +0.01989098656044406208 +0.01985671496319312349 +0.01982249665866222046 +0.01978833157445219343 +0.01975421963824337476 +0.01972016077779537371 +0.01968615492094722558 +0.01965220199561702741 +0.01961830192980234047 +0.01958445465157965595 +0.01955066008910466904 +0.01951691817061209505 +0.01948322882441557574 +0.01944959197890778688 +0.01941600756256015373 +0.01938247550392300025 +0.01934899573162539299 +0.01931556817437504736 +0.01928219276095847687 +0.01924886942024051778 +0.01921559808116489465 +0.01918237867275348132 +0.01914921112410677626 +0.01911609536440365270 +0.01908303132290111934 +0.01905001892893468801 +0.01901705811191788456 +0.01898414880134246391 +0.01895129092677826088 +0.01891848441787313123 +0.01888572920435300020 +0.01885302521602150519 +0.01882037238276043634 +0.01878777063452913634 +0.01875521990136487169 +0.01872272011338258976 +0.01869027120077471765 +0.01865787309381159581 +0.01862552572284076682 +0.01859322901828744726 +0.01856098291065421887 +0.01852878733052101129 +0.01849664220854515401 +0.01846454747546104683 +0.01843250306208053454 +0.01840050889929235878 +0.01836856491806253960 +0.01833667104943405637 +0.01830482722452676445 +0.01827303337453766927 +0.01824128943074039208 +0.01820959532448552728 +0.01817795098720033017 +0.01814635635038880021 +0.01811481134563159082 +0.01808331590458582896 +0.01805186995898533375 +0.01802047344064024864 +0.01798912628143720799 +0.01795782841333919480 +0.01792657976838542278 +0.01789538027869152365 +0.01786422987644909963 +0.01783312849392607383 +0.01780207606346632596 +0.01777107251748979294 +0.01774011778849246199 +0.01770921180904601322 +0.01767835451179826031 +0.01764754582947257108 +0.01761678569486820056 +0.01758607404086004120 +0.01755541080039854998 +0.01752479590650992888 +0.01749422929229566687 +0.01746371089093288684 +0.01743324063567405768 +0.01740281845984699427 +0.01737244429685481928 +0.01734211808017576545 +0.01731183974336350864 +0.01728160922004657110 +0.01725142644392868574 +0.01722129134878861226 +0.01719120386847989429 +0.01716116393693122022 +0.01713117148814589583 +0.01710122645620215653 +0.01707132877525290374 +0.01704147837952565622 +0.01701167520332269589 +0.01698191918102071041 +0.01695221024707095625 +0.01692254833599915465 +0.01689293338240537706 +0.01686336532096406604 +0.01683384408642381314 +0.01680436961360766771 +0.01677494183741260955 +0.01674556069280983689 +0.01671622611484462062 +0.01668693803863608924 +0.01665769639937751331 +0.01662850113233584753 +0.01659935217285195969 +0.01657024945634052310 +0.01654119291828985705 +0.01651218249426196841 +0.01648321811989238855 +0.01645429973089033646 +0.01642542726303837172 +0.01639660065219255766 +0.01636781983428233986 +0.01633908474531034841 +0.01631039532135271711 +0.01628175149855853529 +0.01625315321315017741 +0.01622460040142307755 +0.01619609299974566693 +0.01616763094455942601 +0.01613921417237862768 +0.01611084261979056978 +0.01608251622345524545 +0.01605423492010541603 +0.01602599864654657286 +0.01599780733965674648 +0.01596966093638671133 +0.01594155937375961105 +0.01591350258887112498 +0.01588549051888933292 +0.01585752310105465607 +0.01582960027267987443 +0.01580172197114987701 +0.01577388813392189074 +0.01574609869852513361 +0.01571835360256097075 +0.01569065278370279995 +0.01566299617969585389 +0.01563538372835747772 +0.01560781536757662770 +0.01558029103531416784 +0.01555281066960269819 +0.01552537420854647500 +0.01549798159032138474 +0.01547063275317477234 +0.01544332763542567016 +0.01541606617546439212 +0.01538884831175273311 +0.01536167398282381469 +0.01533454312728193755 +0.01530745568380281231 +0.01528041159113312231 +0.01525341078809075608 +0.01522645321356465298 +0.01519953880651469906 +0.01517266750597179130 +0.01514583925103758083 +0.01511905398088471408 +0.01509231163475645288 +0.01506561215196682881 +0.01503895547190058253 +0.01501234153401289836 +0.01498577027782969397 +0.01495924164294723351 +0.01493275556903222827 +0.01490631199582180544 +0.01487991086312339534 +0.01485355211081465857 +0.01482723567884341488 +0.01480096150722776983 +0.01477472953605575567 +0.01474853970548554126 +0.01472239195574523256 +0.01469628622713278591 +0.01467022246001620234 +0.01464420059483307300 +0.01461822057209084640 +0.01459228233236666700 +0.01456638581630726598 +0.01454053096462902886 +0.01451471771811771276 +0.01448894601762873782 +0.01446321580408675006 +0.01443752701848584168 +0.01441187960188939840 +0.01438627349542997633 +0.01436070864030943722 +0.01433518497779859291 +0.01430970244923746720 +0.01428426099603504265 +0.01425886055966917726 +0.01423350108168685429 +0.01420818250370361677 +0.01418290476740393345 +0.01415766781454103583 +0.01413247158693674808 +0.01410731602648156342 +0.01408220107513442898 +0.01405712667492296265 +0.01403209276794304371 +0.01400709929635908860 +0.01398214620240376474 +0.01395723342837796796 +0.01393236091665097168 +0.01390752860966004527 +0.01388273644991062580 +0.01385798437997622437 +0.01383327234249829250 +0.01380860028018627422 +0.01378396813581739440 +0.01375937585223684784 +0.01373482337235741937 +0.01371031063915973715 +0.01368583759569204882 +0.01366140418507009666 +0.01363701035047733615 +0.01361265603516457166 +0.01358834118245005884 +0.01356406573571945079 +0.01353982963842569227 +0.01351563283408899890 +0.01349147526629674264 +0.01346735687870353158 +0.01344327761503092897 +0.01341923741906759018 +0.01339523623466921942 +0.01337127400575825742 +0.01334735067632424055 +0.01332346619042324397 +0.01329962049217831010 +0.01327581352577907395 +0.01325204523548178560 +0.01322831556560933632 +0.01320462446055102081 +0.01318097186476279922 +0.01315735772276684611 +0.01313378197915175856 +0.01311024457857247298 +0.01308674546575003435 +0.01306328458547185295 +0.01303986188259130194 +0.01301647730202791682 +0.01299313078876719596 +0.01296982228786063528 +0.01294655174442561028 +0.01292331910364528762 +0.01290012431076875687 +0.01287696731111066806 +0.01285384805005148311 +0.01283076647303720876 +0.01280772252557939479 +0.01278471615325522254 +0.01276174730170713881 +0.01273881591664311266 +0.01271592194383640642 +0.01269306532912557045 +0.01267024601841440154 +0.01264746395767175034 +0.01262471909293177465 +0.01260201137029349355 +0.01257934073592101819 +0.01255670713604343028 +0.01253411051695456704 +0.01251155082501330222 +0.01248902800664306208 +0.01246654200833210123 +0.01244409277663337948 +0.01242168025816435366 +0.01239930439960711291 +0.01237696514770813411 +0.01235466244927848831 +0.01233239625119348336 +0.01231016650039279230 +0.01228797314388041344 +0.01226581612872441884 +0.01224369540205722841 +0.01222161091107516750 +0.01219956260303873066 +0.01217755042527234044 +0.01215557432516436998 +0.01213363425016709615 +0.01211173014779650357 +0.01208986196563251007 +0.01206802965131854172 +0.01204623315256183116 +0.01202447241713315226 +0.01200274739286675933 +0.01198105802766049124 +0.01195940426947554591 +0.01193778606633647162 +0.01191620336633119129 +0.01189465611761082210 +0.01187314426838976568 +0.01185166776694547563 +0.01183022656161853044 +0.01180882060081257096 +0.01178744983299417383 +0.01176611420669286534 +0.01174481367050099131 +0.01172354817307378998 +0.01170231766312914909 +0.01168112208944772391 +0.01165996140087281578 +0.01163883554631022117 +0.01161774447472842080 +0.01159668813515822398 +0.01157566647669291265 +0.01155467944848814765 +0.01153372699976188895 +0.01151280907979434359 +0.01149192563792783735 +0.01147107662356700898 +0.01145026198617838872 +0.01142948167529066542 +0.01140873564049444885 +0.01138802383144223163 +0.01136734619784847238 +0.01134670268948931651 +0.01132609325620270377 +0.01130551784788826758 +0.01128497641450730039 +0.01126446890608266867 +0.01124399527269868797 +0.01122355546450126002 +0.01120314943169761941 +0.01118277712455640997 +0.01116243849340753727 +0.01114213348864213915 +0.01112186206071264123 +0.01110162416013249498 +0.01108141973747629218 +0.01106124874337962270 +0.01104111112853907797 +0.01102100684371215382 +0.01100093583971714466 +0.01098089806743325798 +0.01096089347780033335 +0.01094092202181896900 +0.01092098365055042992 +0.01090107831511645184 +0.01088120596669943374 +0.01086136655654210137 +0.01084156003594772058 +0.01082178635627984234 +0.01080204546896233568 +0.01078233732547935995 +0.01076266187737516013 +0.01074301907625427842 +0.01072340887378120042 +0.01070383122168047825 +0.01068428607173669415 +0.01066477337579423319 +0.01064529308575749671 +0.01062584515359051365 +0.01060642953131720433 +0.01058704617102112361 +0.01056769502484549220 +0.01054837604499307170 +0.01052908918372617679 +0.01050983439336664743 +0.01049061162629565461 +0.01047142083495378878 +0.01045226197184094714 +0.01043313498951622953 +0.01041403984059803382 +0.01039497647776380790 +0.01037594485375012941 +0.01035694492135260519 +0.01033797663342582093 +0.01031903994288330302 +0.01030013480269736936 +0.01028126116589929591 +0.01026241898557894716 +0.01024360821488503291 +0.01022482880702483936 +0.01020608071526423084 +0.01018736389292769842 +0.01016867829339809098 +0.01015002387011681301 +0.01013140057658353660 +0.01011280836635635068 +0.01009424719305154240 +0.01007571701034357115 +0.01005721777196520381 +0.01003874943170711756 +0.01002031194341818088 +0.01000190526100518812 +0.00998352933843282483 +0.00996518412972380654 +0.00994686958895849536 +0.00992858567027516542 +0.00991033232786971835 +0.00989210951599574402 +0.00987391718896449798 +0.00985575530114467246 +0.00983762380696256294 +0.00981952266090184607 +0.00980145181750363172 +0.00978341123136635543 +0.00976540085714564313 +0.00974742064955451577 +0.00972947056336300603 +0.00971155055339836121 +0.00969366057454487326 +0.00967580058174376083 +0.00965797052999333404 +0.00964017037434868225 +0.00962240006992180590 +0.00960465957188146036 +0.00958694883545315769 +0.00956926781591911461 +0.00955161646861805991 +0.00953399474894546343 +0.00951640261235317877 +0.00949884001434959935 +0.00948130691049949015 +0.00946380325642395305 +0.00944632900780047711 +0.00942888412036268532 +0.00941146854990048375 +0.00939408225225986208 +0.00937672518334292313 +0.00935939729910779082 +0.00934209855556852702 +0.00932482890879522686 +0.00930758831491370654 +0.00929037673010570976 +0.00927319411060867349 +0.00925604041271575577 +0.00923891559277582007 +0.00922181960719323235 +0.00920475241242797032 +0.00918771396499546734 +0.00917070422146662803 +0.00915372313846771028 +0.00913677067268028539 +0.00911984678084125366 +0.00910295141974267613 +0.00908608454623180233 +0.00906924611721101823 +0.00905243608963770575 +0.00903565442052433124 +0.00901890106693824939 +0.00900217598600172066 +0.00898547913489189387 +0.00896881047084066053 +0.00895216995113466349 +0.00893555753311520498 +0.00891897317417828482 +0.00890241683177438355 +0.00888588846340855956 +0.00886938802664035894 +0.00885291547908365409 +0.00883647077840679467 +0.00882005388233234218 +0.00880366474863714457 +0.00878730333515226336 +0.00877096959976287477 +0.00875466350040830787 +0.00873838499508181564 +0.00872213404183080389 +0.00870591059875644793 +0.00868971462401390594 +0.00867354607581211946 +0.00865740491241378043 +0.00864129109213538846 +0.00862520457334699751 +0.00860914531447234781 +0.00859311327398871311 +0.00857710841042688167 +0.00856113068237108858 +0.00854518004845894984 +0.00852925646738147969 +0.00851335989788293453 +0.00849749029876081807 +0.00848164762886585710 +0.00846583184710185226 +0.00845004291242574916 +0.00843428078384746496 +0.00841854542042990914 +0.00840283678128894707 +0.00838715482559327166 +0.00837149951256441378 +0.00835587080147661213 +0.00834026865165691036 +0.00832469302248492644 +0.00830914387339291849 +0.00829362116386570675 +0.00827812485344053654 +0.00826265490170722920 +0.00824721126830784898 +0.00823179391293692164 +0.00821640279534118986 +0.00820103787531960803 +0.00818569911272343416 +0.00817038646745590728 +0.00815509989947243996 +0.00813983936878040840 +0.00812460483543920448 +0.00810939625956012648 +0.00809421360130627328 +0.00807905682089269696 +0.00806392587858604550 +0.00804882073470479173 +0.00803374134961903734 +0.00801868768375041223 +0.00800365969757221331 +0.00798865735160915469 +0.00797368060643741279 +0.00795872942268456215 +0.00794380376102952514 +0.00792890358220250252 +0.00791402884698490586 +0.00789917951620938176 +0.00788435555075965577 +0.00786955691157055666 +0.00785478355962795048 +0.00784003545596864172 +0.00782531256168040625 +0.00781061483790181695 +0.00779594224582234787 +0.00778129474668215991 +0.00776667230177219454 +0.00775207487243401421 +0.00773750242005976849 +0.00772295490609223225 +0.00770843229202461139 +0.00769393453940061828 +0.00767946160981434079 +0.00766501346491018504 +0.00765059006638294826 +0.00763619137597756036 +0.00762181735548920353 +0.00760746796676320652 +0.00759314317169494830 +0.00757884293222988413 +0.00756456721036340846 +0.00755031596814092869 +0.00753608916765762579 +0.00752188677105858957 +0.00750770874053866694 +0.00749355503834241155 +0.00747942562676409597 +0.00746532046814756510 +0.00745123952488625004 +0.00743718275942312473 +0.00742315013425059577 +0.00740914161191054670 +0.00739515715499410899 +0.00738119672614187799 +0.00736726028804358425 +0.00735334780343822967 +0.00733945923511397907 +0.00732559454590804744 +0.00731175369870679624 +0.00729793665644550352 +0.00728414338210845152 +0.00727037383872881308 +0.00725662798938859176 +0.00724290579721864353 +0.00722920722539847904 +0.00721553223715642230 +0.00720188079576933229 +0.00718825286456273478 +0.00717464840691067491 +0.00716106738623566250 +0.00714750976600872067 +0.00713397550974916722 +0.00712046458102473263 +0.00710697694345140824 +0.00709351256069340550 +0.00708007139646315165 +0.00706665341452116999 +0.00705325857867611806 +0.00703988685278463498 +0.00702653820075136836 +0.00701321258652891528 +0.00699990997411765840 +0.00698663032756596369 +0.00697337361096982047 +0.00696013978847304093 +0.00694692882426706758 +0.00693374068259101049 +0.00692057532773152767 +0.00690743272402277644 +0.00689431283584642472 +0.00688121562763155652 +0.00686814106385460338 +0.00685508910903936692 +0.00684205972775684800 +0.00682905288462534732 +0.00681606854431025724 +0.00680310667152415633 +0.00679016723102666021 +0.00677725018762436165 +0.00676435550617092343 +0.00675148315156681375 +0.00673863308875943638 +0.00672580528274299878 +0.00671299969855845922 +0.00670021630129351460 +0.00668745505608247127 +0.00667471592810633604 +0.00666199888259260027 +0.00664930388481533088 +0.00663663090009502382 +0.00662397989379856587 +0.00661135083133929363 +0.00659874367817675153 +0.00658615839981681328 +0.00657359496181155866 +0.00656105332975920504 +0.00654853346930412035 +0.00653603534613667568 +0.00652355892599334932 +0.00651110417465648132 +0.00649867105795438361 +0.00648625954176122819 +0.00647386959199695074 +0.00646150117462734527 +0.00644915425566382206 +0.00643682880116350740 +0.00642452477722913612 +0.00641224215000898382 +0.00639998088569688345 +0.00638774095053206824 +0.00637552231079926805 +0.00636332493282850634 +0.00635114878299514705 +0.00633899382771984689 +0.00632686003346840786 +0.00631474736675190045 +0.00630265579412642336 +0.00629058528219316945 +0.00627853579759836584 +0.00626650730703320977 +0.00625449977723379399 +0.00624251317498107552 +0.00623054746710088696 +0.00621860262046375952 +0.00620667860198498809 +0.00619477537862454970 +0.00618289291738697254 +0.00617103118532147735 +0.00615919014952169726 +0.00614736977712579229 +0.00613557003531634178 +0.00612379089132030884 +0.00611203231240897270 +0.00610029426589787840 +0.00608857671914683589 +0.00607687963955979692 +0.00606520299458486543 +0.00605354675171422899 +0.00604191087848407818 +0.00603029534247465429 +0.00601870011131004027 +0.00600712515265828563 +0.00599557043423122951 +0.00598403592378451976 +0.00597252158911754788 +0.00596102739807335361 +0.00594955331853870215 +0.00593809931844384818 +0.00592666536576266518 +0.00591525142851250050 +0.00590385747475411643 +0.00589248347259174743 +0.00588112939017290063 +0.00586979519568840962 +0.00585848085737237633 +0.00584718634350209644 +0.00583591162239800818 +0.00582465666242365076 +0.00581342143198567383 +0.00580220589953365541 +0.00579101003356019203 +0.00577983380260078863 +0.00576867717523375356 +0.00575754012008031918 +0.00574642260580437991 +0.00573532460111259718 +0.00572424607475430398 +0.00571318699552144683 +0.00570214733224854581 +0.00569112705381263906 +0.00568012612913325419 +0.00566914452717234233 +0.00565818221693423565 +0.00564723916746560656 +0.00563631534785537670 +0.00562541072723476976 +0.00561452527477712942 +0.00560365895969798349 +0.00559281175125493895 +0.00558198361874761868 +0.00557117453151771257 +0.00556038445894877636 +0.00554961337046632440 +0.00553886123553769087 +0.00552812802367203763 +0.00551741370442027871 +0.00550671824737499708 +0.00549604162217051315 +0.00548538379848268441 +0.00547474474602897398 +0.00546412443456838030 +0.00545352283390130102 +0.00544293991386964656 +0.00543237564435662852 +0.00542182999528682472 +0.00541130293662608723 +0.00540079443838148519 +0.00539030447060130213 +0.00537983300337489725 +0.00536938000683281121 +0.00535894545114653544 +0.00534852930652861529 +0.00533813154323252523 +0.00532775213155262019 +0.00531739104182414775 +0.00530704824442311887 +0.00529672370976633222 +0.00528641740831127700 +0.00527612931055611127 +0.00526585938703963505 +0.00525560760834115157 +0.00524537394508056698 +0.00523515836791819955 +0.00522496084755480917 +0.00521478135473157391 +0.00520461986022993737 +0.00519447633487168936 +0.00518435074951881410 +0.00517424307507352403 +0.00516415328247815143 +0.00515408134271513451 +0.00514402722680696624 +0.00513399090581612150 +0.00512397235084507963 +0.00511397153303617350 +0.00510398842357163811 +0.00509402299367351253 +0.00508407521460357836 +0.00507414505766341437 +0.00506423249419418915 +0.00505433749557675314 +0.00504446003323152058 +0.00503460007861845742 +0.00502475760323699370 +0.00501493257862601748 +0.00500512497636382454 +0.00499533476806803250 +0.00498556192539557821 +0.00497580642004267441 +0.00496606822374467960 +0.00495634730827620648 +0.00494664364545090683 +0.00493695720712154524 +0.00492728796517989155 +0.00491763589155670873 +0.00490800095822168259 +0.00489838313718336370 +0.00488878240048919600 +0.00487919872022536151 +0.00486963206851680815 +0.00486008241752720980 +0.00485054973945882317 +0.00484103400655260755 +0.00483153519108800444 +0.00482205326538301393 +0.00481258820179409318 +0.00480313997271611740 +0.00479370855058236338 +0.00478429390786439326 +0.00477489601707210658 +0.00476551485075359799 +0.00475615038149518679 +0.00474680258192132325 +0.00473747142469455561 +0.00472815688251552145 +0.00471885892812281150 +0.00470957753429303034 +0.00470031267384067065 +0.00469106431961812016 +0.00468183244451558355 +0.00467261702146102957 +0.00466341802342018236 +0.00465423542339645467 +0.00464506919443089580 +0.00463591930960215864 +0.00462678574202644854 +0.00461766846485747381 +0.00460856745128640066 +0.00459948267454181846 +0.00459041410788969730 +0.00458136172463331250 +0.00457232549811322896 +0.00456330540170723966 +0.00455430140883033262 +0.00454531349293463196 +0.00453634162750937448 +0.00452738578608083073 +0.00451844594221230671 +0.00450952206950402858 +0.00450061414159316775 +0.00449172213215377498 +0.00448284601489669452 +0.00447398576356959100 +0.00446514135195684534 +0.00445631275387950443 +0.00444749994319530717 +0.00443870289379856824 +0.00442992157962016769 +0.00442115597462747634 +0.00441240605282436360 +0.00440367178825107602 +0.00439495315498427287 +0.00438625012713693679 +0.00437756267885832263 +0.00436889078433393054 +0.00436023441778548432 +0.00435159355347080300 +0.00434296816568385726 +0.00433435822875466361 +0.00432576371704926008 +0.00431718460496964985 +0.00430862086695378392 +0.00430007247747545961 +0.00429153941104433011 +0.00428302164220585851 +0.00427451914554123104 +0.00426603189566735711 +0.00425755986723679904 +0.00424910303493771652 +0.00424066137349385971 +0.00423223485766450677 +0.00422382346224440229 +0.00421542716206375120 +0.00420704593198811642 +0.00419867974691843625 +0.00419032858179094105 +0.00418199241157712551 +0.00417367121128370093 +0.00416536495595254668 +0.00415707362066065206 +0.00414879718052011369 +0.00414053561067805834 +0.00413228888631659956 +0.00412405698265280209 +0.00411583987493865239 +0.00410763753846096150 +0.00409944994854139193 +0.00409127708053636224 +0.00408311890983702880 +0.00407497541186922514 +0.00406684656209343586 +0.00405873233600471776 +0.00405063270913270414 +0.00404254765704153453 +0.00403447715532979836 +0.00402642117963052104 +0.00401837970561110501 +0.00401035270897326986 +0.00400234016545303415 +0.00399434205082066507 +0.00398635834088062729 +0.00397838901147154912 +0.00397043403846616960 +0.00396249339777128042 +0.00395456706532772411 +0.00394665501711031867 +0.00393875722912782281 +0.00393087367742287613 +0.00392300433807199998 +0.00391514918718548991 +0.00390730820090742000 +0.00389948135541560168 +0.00389166862692149739 +0.00388386999167021759 +0.00387608542594047867 +0.00386831490604450578 +0.00386055840832805761 +0.00385281590917034046 +0.00384508738498398617 +0.00383737281221500220 +0.00382967216734270794 +0.00382198542687973335 +0.00381431256737192834 +0.00380665356539836020 +0.00379900839757124935 +0.00379137704053592690 +0.00378375947097080167 +0.00377615566558729687 +0.00376856560112983057 +0.00376098925437576238 +0.00375342660213534183 +0.00374587762125168236 +0.00373834228860070580 +0.00373082058109109379 +0.00372331247566426741 +0.00371581794929432517 +0.00370833697898800309 +0.00370086954178463308 +0.00369341561475611604 +0.00368597517500683473 +0.00367854819967366282 +0.00367113466592588903 +0.00366373455096519847 +0.00365634783202559068 +0.00364897448637339699 +0.00364161449130715733 +0.00363426782415765797 +0.00362693446228784392 +0.00361961438309277902 +0.00361230756399961821 +0.00360501398246756239 +0.00359773361598778561 +0.00359046644208343502 +0.00358321243830957365 +0.00357597158225312186 +0.00356874385153284129 +0.00356152922379926462 +0.00355432767673466779 +0.00354713918805303575 +0.00353996373550000002 +0.00353280129685281307 +0.00352565184992029807 +0.00351851537254281414 +0.00351139184259218742 +0.00350428123797170976 +0.00349718353661607065 +0.00349009871649131080 +0.00348302675559480262 +0.00347596763195518518 +0.00346892132363232734 +0.00346188780871729569 +0.00345486706533230156 +0.00344785907163067205 +0.00344086380579679361 +0.00343388124604606000 +0.00342691137062486580 +0.00341995415781053526 +0.00341300958591128720 +0.00340607763326619814 +0.00339915827824515846 +0.00339225149924881481 +0.00338535727470855004 +0.00337847558308643952 +0.00337160640287518815 +0.00336474971259811398 +0.00335790549080909866 +0.00335107371609251730 +0.00334425436706324228 +0.00333744742236657954 +0.00333065286067821568 +0.00332387066070420319 +0.00331710080118088804 +0.00331034326087488841 +0.00330359801858304530 +0.00329686505313238733 +0.00329014434338008224 +0.00328343586821339779 +0.00327673960654966453 +0.00327005553733621546 +0.00326338363955036657 +0.00325672389219937297 +0.00325007627432036912 +0.00324344076498035011 +0.00323681734327611621 +0.00323020598833422424 +0.00322360667931096724 +0.00321701939539232023 +0.00321044411579389424 +0.00320388081976091333 +0.00319732948656814868 +0.00319079009551989168 +0.00318426262594990453 +0.00317774705722140413 +0.00317124336872698061 +0.00316475153988857779 +0.00315827155015747279 +0.00315180337901417714 +0.00314534700596845159 +0.00313890241055924182 +0.00313246957235464168 +0.00312604847095183805 +0.00311963908597710001 +0.00311324139708569255 +0.00310685538396187916 +0.00310048102631885984 +0.00309411830389873114 +0.00308776719647244503 +0.00308142768383978544 +0.00307509974582927895 +0.00306878336229821167 +0.00306247851313255727 +0.00305618517824693837 +0.00304990333758459360 +0.00304363297111732945 +0.00303737405884546520 +0.00303112658079783418 +0.00302489051703169406 +0.00301866584763273160 +0.00301245255271497935 +0.00300625061242080875 +0.00300006000692084728 +0.00299388071641399755 +0.00298771272112734665 +0.00298155600131614533 +0.00297541053726376944 +0.00296927630928166915 +0.00296315329770932556 +0.00295704148291423257 +0.00295094084529182827 +0.00294485136526547895 +0.00293877302328641142 +0.00293270579983371258 +0.00292664967541423097 +0.00292060463056258808 +0.00291457064584111801 +0.00290854770183982978 +0.00290253577917634880 +0.00289653485849591594 +0.00289054492047129477 +0.00288456594580277980 +0.00287859791521813098 +0.00287264080947252816 +0.00286669460934855505 +0.00286075929565614111 +0.00285483484923250213 +0.00284892125094214719 +0.00284301848167680402 +0.00283712652235538262 +0.00283124535392394964 +0.00282537495735566292 +0.00281951531365075454 +0.00281366640383648708 +0.00280782820896709889 +0.00280200071012377729 +0.00279618388841461557 +0.00279037772497456749 +0.00278458220096540953 +0.00277879729757570968 +0.00277302299602077062 +0.00276725927754261150 +0.00276150612340990463 +0.00275576351491794123 +0.00275003143338859975 +0.00274430986017031421 +0.00273859877663800355 +0.00273289816419306246 +0.00272720800426330505 +0.00272152827830291410 +0.00271585896779243758 +0.00271020005423871103 +0.00270455151917484539 +0.00269891334416015767 +0.00269328551078017089 +0.00268766800064651869 +0.00268206079539696704 +0.00267646387669533614 +0.00267087722623146184 +0.00266530082572117178 +0.00265973465690624291 +0.00265417870155433338 +0.00264863294145898558 +0.00264309735843956195 +0.00263757193434120945 +0.00263205665103481310 +0.00262655149041697523 +0.00262105643440994863 +0.00261557146496162098 +0.00261009656404546367 +0.00260463171366049490 +0.00259917689583123810 +0.00259373209260768895 +0.00258829728606525550 +0.00258287245830475130 +0.00257745759145232333 +0.00257205266765943991 +0.00256665766910283300 +0.00256127257798446223 +0.00255589737653147235 +0.00255053204699617073 +0.00254517657165596618 +0.00253983093281333989 +0.00253449511279581034 +0.00252916909395589249 +0.00252385285867102929 +0.00251854638934360551 +0.00251324966840087453 +0.00250796267829490969 +0.00250268540150259868 +0.00249741782052557851 +0.00249215991789019471 +0.00248691167614748226 +0.00248167307787310661 +0.00247644410566733942 +0.00247122474215500645 +0.00246601496998546509 +0.00246081477183253232 +0.00245562413039448427 +0.00245044302839400032 +0.00244527144857811579 +0.00244010937371819895 +0.00243495678660990466 +0.00242981367007311187 +0.00242468000695193883 +0.00241955578011465505 +0.00241444097245366090 +0.00240933556688545120 +0.00240423954635056924 +0.00239915289381356384 +0.00239407559226297115 +0.00238900762471124656 +0.00238394897419475817 +0.00237889962377371613 +0.00237385955653215443 +0.00236882875557787925 +0.00236380720404244689 +0.00235879488508110519 +0.00235379178187277100 +0.00234879787761997855 +0.00234381315554885606 +0.00233883759890906283 +0.00233387119097377017 +0.00232891391503962800 +0.00232396575442670155 +0.00231902669247845356 +0.00231409671256170265 +0.00230917579806656607 +0.00230426393240644976 +0.00229936109901799539 +0.00229446728136102791 +0.00228958246291854732 +0.00228470662719666489 +0.00227983975772457371 +0.00227498183805450917 +0.00227013285176171737 +0.00226529278244440432 +0.00226046161372370517 +0.00225563932924364129 +0.00225082591267108901 +0.00224602134769573240 +0.00224122561803003330 +0.00223643870740918276 +0.00223166059959108458 +0.00222689127835627157 +0.00222213072750791947 +0.00221737893087178058 +0.00221263587229615253 +0.00220790153565183014 +0.00220317590483208679 +0.00219845896375261063 +0.00219375069635149118 +0.00218905108658916121 +0.00218436011844837762 +0.00217967777593416337 +0.00217500404307379141 +0.00217033890391671877 +0.00216568234253456792 +0.00216103434302109421 +0.00215639488949213214 +0.00215176396608555845 +0.00214714155696126962 +0.00214252764630111893 +0.00213792221830890567 +0.00213332525721032047 +0.00212873674725290929 +0.00212415667270603788 +0.00211958501786085407 +0.00211502176703024913 +0.00211046690454881917 +0.00210592041477282834 +0.00210138228208017405 +0.00209685249087034151 +0.00209233102556437853 +0.00208781787060483221 +0.00208331301045574374 +0.00207881642960259507 +0.00207432811255226250 +0.00206984804383299930 +0.00206537620799438848 +0.00206091258960728035 +0.00205645717326380850 +0.00205200994357730487 +0.00204757088518228193 +0.00204313998273440191 +0.00203871722091041822 +0.00203430258440815337 +0.00202989605794646122 +0.00202549762626518404 +0.00202110727412511655 +0.00201672498630797769 +0.00201235074761635683 +0.00200798454287368089 +0.00200362635692418953 +0.00199927617463289140 +0.00199493398088551599 +0.00199059976058849151 +0.00198627349866890585 +0.00198195518007444763 +0.00197764478977340355 +0.00197334231275460336 +0.00196904773402737212 +0.00196476103862151851 +0.00196048221158728019 +0.00195621123799527997 +0.00195194810293651435 +0.00194769279152229541 +0.00194344528888422234 +0.00193920558017413752 +0.00193497365056411320 +0.00193074948524636940 +0.00192653306943328054 +0.00192232438835732307 +0.00191812342727103072 +0.00191393017144697499 +0.00190974460617771295 +0.00190556671677575293 +0.00190139648857352741 +0.00189723390692334601 +0.00189307895719737353 +0.00188893162478757427 +0.00188479189510568838 +0.00188065975358318459 +0.00187653518567124371 +0.00187241817684070250 +0.00186830871258202740 +0.00186420677840527381 +0.00186011235984005719 +0.00185602544243550108 +0.00185194601176021751 +0.00184787405340226720 +0.00184380955296911935 +0.00183975249608761722 +0.00183570286840393734 +0.00183166065558356523 +0.00182762584331124900 +0.00182359841729096963 +0.00181957836324590392 +0.00181556566691838759 +0.00181156031406987019 +0.00180756229048089994 +0.00180357158195107361 +0.00179958817429900272 +0.00179561205336228164 +0.00179164320499745357 +0.00178768161507995545 +0.00178372726950411925 +0.00177978015418310152 +0.00177584025504887145 +0.00177190755805215990 +0.00176798204916243560 +0.00176406371436785953 +0.00176015253967525876 +0.00175624851111009193 +0.00175235161471640373 +0.00174846183655679843 +0.00174457916271240974 +0.00174070357928284535 +0.00173683507238617816 +0.00173297362815889042 +0.00172911923275585657 +0.00172527187235029552 +0.00172143153313374011 +0.00171759820131599824 +0.00171377186312513191 +0.00170995250480740642 +0.00170614011262726719 +0.00170233467286730073 +0.00169853617182820515 +0.00169474459582874180 +0.00169095993120571639 +0.00168718216431394067 +0.00168341128152620003 +0.00167964726923321107 +0.00167589011384360422 +0.00167213980178385980 +0.00166839631949831078 +0.00166465965344908605 +0.00166092979011608325 +0.00165720671599693583 +0.00165349041760697664 +0.00164978088147920148 +0.00164607809416425044 +0.00164238204223035524 +0.00163869271226332121 +0.00163501009086648719 +0.00163133416466069645 +0.00162766492028424336 +0.00162400234439288296 +0.00162034642365975283 +0.00161669714477537555 +0.00161305449444759858 +0.00160941845940158236 +0.00160578902637974956 +0.00160216618214177294 +0.00159854991346452201 +0.00159494020714205220 +0.00159133704998555081 +0.00158774042882332475 +0.00158415033050075013 +0.00158056674188025150 +0.00157698964984127237 +0.00157341904128023504 +0.00156985490311051701 +0.00156629722226240978 +0.00156274598568308869 +0.00155920118033659621 +0.00155566279320379277 +0.00155213081128233415 +0.00154860522158663683 +0.00154508601114785715 +0.00154157316701383535 +0.00153806667624909496 +0.00153456652593479573 +0.00153107270316870194 +0.00152758519506516013 +0.00152410398875506238 +0.00152062907138581253 +0.00151716043012130992 +0.00151369805214190381 +0.00151024192464437480 +0.00150679203484189658 +0.00150334836996401325 +0.00149991091725660088 +0.00149647966398184628 +0.00149305459741821381 +0.00148963570486042177 +0.00148622297361939836 +0.00148281639102227627 +0.00147941594441233196 +0.00147602162114898977 +0.00147263340860777077 +0.00146925129418027387 +0.00146587526527415198 +0.00146250530931306194 +0.00145914141373666099 +0.00145578356600057084 +0.00145243175357634316 +0.00144908596395143942 +0.00144574618462920139 +0.00144241240312881431 +0.00143908460698530033 +0.00143576278374947237 +0.00143244692098791460 +0.00142913700628295465 +0.00142583302723264219 +0.00142253497145070355 +0.00141924282656654094 +0.00141595658022519049 +0.00141267622008730176 +0.00140940173382910340 +0.00140613310914239321 +0.00140287033373449194 +0.00139961339532823636 +0.00139636228166194415 +0.00139311698048939130 +0.00138987747957978504 +0.00138664376671774887 +0.00138341582970327379 +0.00138019365635172562 +0.00137697723449379931 +0.00137376655197549722 +0.00137056159665811675 +0.00136736235641821374 +0.00136416881914758073 +0.00136098097275323031 +0.00135779880515736885 +0.00135462230429737678 +0.00135145145812577130 +0.00134828625461021071 +0.00134512668173343976 +0.00134197272749329096 +0.00133882437990265790 +0.00133568162698947121 +0.00133254445679667531 +0.00132941285738220959 +0.00132628681681898212 +0.00132316632319486082 +0.00132005136461264263 +0.00131694192919003619 +0.00131383800505964119 +0.00131073958036893347 +0.00130764664328022898 +0.00130455918197068836 +0.00130147718463227875 +0.00129840063947176581 +0.00129532953471068568 +0.00129226385858534267 +0.00128920359934676259 +0.00128614874526070534 +0.00128309928460762848 +0.00128005520568268269 +0.00127701649679568051 +0.00127398314627108944 +0.00127095514244800634 +0.00126793247368015352 +0.00126491512833585770 +0.00126190309479802770 +0.00125889636146414314 +0.00125589491674624946 +0.00125289874907091956 +0.00124990784687926157 +0.00124692219862689740 +0.00124394179278394280 +0.00124096661783500172 +0.00123799666227915176 +0.00123503191462992078 +0.00123207236341528535 +0.00122911799717766038 +0.00122616880447387567 +0.00122322477387517550 +0.00122028589396719930 +0.00121735215334996629 +0.00121442354063788088 +0.00121150004445970969 +0.00120858165345857373 +0.00120566835629194063 +0.00120276014163161614 +0.00119985699816372465 +0.00119695891458871631 +0.00119406587962134756 +0.00119117788199068217 +0.00118829491044007132 +0.00118541695372716333 +0.00118254400062387183 +0.00117967603991639522 +0.00117681306040520088 +0.00117395505090501346 +0.00117110200024481766 +0.00116825389726785372 +0.00116541073083159552 +0.00116257248980778131 +0.00115973916308237434 +0.00115691073955558272 +0.00115408720814184950 +0.00115126855776984485 +0.00114845477738247082 +0.00114564585593686223 +0.00114284178240437991 +0.00114004254577061248 +0.00113724813503538304 +0.00113445853921272295 +0.00113167374733091301 +0.00112889374843245702 +0.00112611853157409394 +0.00112334808582679243 +0.00112058240027576475 +0.00111782146402045353 +0.00111506526617456041 +0.00111231379586602540 +0.00110956704223705077 +0.00110682499444408975 +0.00110408764165787474 +0.00110135497306338781 +0.00109862697785991122 +0.00109590364526100420 +0.00109318496449452144 +0.00109047092480261975 +0.00108776151544177782 +0.00108505672568277867 +0.00108235654481075275 +0.00107966096212516694 +0.00107696996693984991 +0.00107428354858299336 +0.00107160169639716730 +0.00106892439973933382 +0.00106625164798086780 +0.00106358343050756286 +0.00106091973671964992 +0.00105826055603181466 +0.00105560587787320820 +0.00105295569168746897 +0.00105030998693273945 +0.00104766875308168628 +0.00104503197962151962 +0.00104239965605400415 +0.00103977177189549467 +0.00103714831667694194 +0.00103452927994392477 +0.00103191465125666653 +0.00102930442019006610 +0.00102669857633371463 +0.00102409710929192281 +0.00102150000868373846 +0.00101890726414299447 +0.00101631886531830615 +0.00101373480187312657 +0.00101115506348575606 +0.00100857963984937933 +0.00100600852067209254 +0.00100344169567693803 +0.00100087915460193118 +0.00099832088720009662 +0.00099576688323949861 +0.00099321713250327855 +0.00099067162478968097 +0.00098813034991210259 +0.00098559329769911893 +0.00098306045799452491 +0.00098053182065737298 +0.00097800737556201435 +0.00097548711259813105 +0.00097297102167078441 +0.00097045909270045735 +0.00096795131562309514 +0.00096544768039014226 +0.00096294817696860127 +0.00096045279534106296 +0.00095796152550576121 +0.00095547435747662349 +0.00095299128128330777 +0.00095051228697126395 +0.00094803736460178061 +0.00094556650425202447 +0.00094309969601510946 +0.00094063693000014602 +0.00093817819633228530 +0.00093572348515278824 +0.00093327278661907312 +0.00093082609090476976 +0.00092838338819978879 +0.00092594466871037738 +0.00092350992265917496 +0.00092107914028527829 +0.00091865231184430727 +0.00091622942760845847 +0.00091381047786658434 +0.00091139545292425058 +0.00090898434310380410 +0.00090657713874444637 +0.00090417383020229209 +0.00090177440785045332 +0.00089937886207910325 +0.00089698718329555205 +0.00089459936192432064 +0.00089221538840721906 +0.00088983525320341067 +0.00088745894678951011 +0.00088508645965964985 +0.00088271778232556347 +0.00088035290531666489 +0.00087799181918014099 +0.00087563451448101695 +0.00087328098180226561 +0.00087093121174488055 +0.00086858519492796380 +0.00086624292198881920 +0.00086390438358304985 +0.00086156957038463207 +0.00085923847308602870 +0.00085691108239827573 +0.00085458738905108114 +0.00085226738379291767 +0.00084995105739112944 +0.00084763840063202252 +0.00084532940432098470 +0.00084302405928257207 +0.00084072235636062213 +0.00083842428641835870 +0.00083612984033850832 +0.00083383900902338757 +0.00083155178339504191 +0.00082926815439534176 +0.00082698811298610145 +0.00082471165014919435 +0.00082243875688667301 +0.00082016942422088025 +0.00081790364319458183 +0.00081564140487107599 +0.00081338270033433314 +0.00081112752068910232 +0.00080887585706105507 +0.00080662770059690251 +0.00080438304246453155 +0.00080214187385313864 +0.00079990418597335980 +0.00079766997005740906 +0.00079543921735921342 +0.00079321191915454733 +0.00079098806674118881 +0.00078876765143904464 +0.00078655066459030684 +0.00078433709755959394 +0.00078212694173409865 +0.00077992018852373376 +0.00077771682936129266 +0.00077551685570260054 +0.00077332025902666262 +0.00077112703083582861 +0.00076893716265594993 +0.00076675064603653467 +0.00076456747255091969 +0.00076238763379643353 +0.00076021112139455641 +0.00075803792699109438 +0.00075586804225635080 +0.00075370145888529029 +0.00075153816859772579 +0.00074937816313848632 +0.00074722143427759789 +0.00074506797381046551 +0.00074291777355805014 +0.00074077082536706113 +0.00073862712111013543 +0.00073648665268603365 +0.00073434941201982063 +0.00073221539106307367 +0.00073008458179406050 +0.00072795697621794511 +0.00072583256636698634 +0.00072371134430074128 +0.00072159330210626088 +0.00071947843189830646 +0.00071736672581954736 +0.00071525817604077395 +0.00071315277476111626 +0.00071105051420824854 +0.00070895138663861000 +0.00070685538433762764 +0.00070476249961993142 +0.00070267272482957516 +0.00070058605234026993 +0.00069850247455561078 +0.00069642198390929987 +0.00069434457286538410 +0.00069227023391849095 +0.00069019895959405552 +0.00068813074244857811 +0.00068606557506984572 +0.00068400345007718969 +0.00068194436012172755 +0.00067988829788660668 +0.00067783525608726457 +0.00067578522747167565 +0.00067373820482060894 +0.00067169418094788615 +0.00066965314870064076 +0.00066761510095957944 +0.00066558003063925386 +0.00066354793068832232 +0.00066151879408982216 +0.00065949261386143859 +0.00065746938305578852 +0.00065544909476068184 +0.00065343174209942022 +0.00065141731823106829 +0.00064940581635073639 +0.00064739722968987657 +0.00064539155151656499 +0.00064338877513579100 +0.00064138889388976451 +0.00063939190115819939 +0.00063739779035862278 +0.00063540655494666873 +0.00063341818841638976 +0.00063143268430055364 +0.00062945003617096806 +0.00062747023763877832 +0.00062549328235478709 +0.00062351916400977538 +0.00062154787633481089 +0.00061957941310157897 +0.00061761376812270394 +0.00061565093525207558 +0.00061369090838517780 +0.00061173368145942041 +0.00060977924845447614 +0.00060782760339260554 +0.00060587874033901298 +0.00060393265340217672 +0.00060198933673419634 +0.00060004878453113369 +0.00059811099103337538 +0.00059617595052596241 +0.00059424365733896098 +0.00059231410584781763 +0.00059038729047370601 +0.00058846320568389614 +0.00058654184599211978 +0.00058462320595892314 +0.00058270728019205100 +0.00058079406334680711 +0.00057888355012642703 +0.00057697573528245382 +0.00057507061361511934 +0.00057316817997371593 +0.00057126842925698076 +0.00056937135641348493 +0.00056747695644201535 +0.00056558522439195712 +0.00056369615536369828 +0.00056180974450900526 +0.00055992598703143127 +0.00055804487818671069 +0.00055616641328315008 +0.00055429058768203838 +0.00055241739679804834 +0.00055054683609963415 +0.00054867890110945055 +0.00054681358740475369 +0.00054495089061781560 +0.00054309080643633544 +0.00054123333060385821 +0.00053937845892018340 +0.00053752618724179550 +0.00053567651148227343 +0.00053382942761272018 +0.00053198493166218414 +0.00053014301971808704 +0.00052830368792664137 +0.00052646693249329532 +0.00052463274968315326 +0.00052280113582140820 +0.00052097208729377700 +0.00051914560054694013 +0.00051732167208896473 +0.00051550029848976004 +0.00051368147638150259 +0.00051186520245908554 +0.00051005147348055335 +0.00050824028626755304 +0.00050643163770576623 +0.00050462552474536660 +0.00050282194440145838 +0.00050102089375452853 +0.00049922236995088916 +0.00049742637020313164 +0.00049563289179056910 +0.00049384193205969621 +0.00049205348842463385 +0.00049026755836758282 +0.00048848413943927672 +0.00048670322925942910 +0.00048492482551719596 +0.00048314892597162276 +0.00048137552845209912 +0.00047960463085881409 +0.00047783623116321122 +0.00047607032740843423 +0.00047430691770979544 +0.00047254600025521660 +0.00047078757330569395 +0.00046903163519574015 +0.00046727818433384930 +0.00046552721920293584 +0.00046377873836080276 +0.00046203274044058056 +0.00046028922415118563 +0.00045854818827776797 +0.00045680963168216054 +0.00045507355330332250 +0.00045333995215779941 +0.00045160882734015791 +0.00044988017802343383 +0.00044815400345957971 +0.00044643030297990223 +0.00044470907599550015 +0.00044299032199771418 +0.00044127404055855333 +0.00043956023133113543 +0.00043784889405011819 +0.00043614002853213538 +0.00043443363467621568 +0.00043272971246421878 +0.00043102826196125691 +0.00042932928331611465 +0.00042763277676167137 +0.00042593874261531500 +0.00042424718127934992 +0.00042255809324141883 +0.00042087147907490178 +0.00041918733943932144 +0.00041750567508074384 +0.00041582648683217434 +0.00041414977561394926 +0.00041247554243412706 +0.00041080378838887659 +0.00040913451466284919 +0.00040746772252956407 +0.00040580341335177527 +0.00040414158858183974 +0.00040248224976208364 +0.00040082539852515678 +0.00039917103659438890 +0.00039751916578413597 +0.00039586978800012275 +0.00039422290523977562 +0.00039257851959256524 +0.00039093663324032084 +0.00038929724845755865 +0.00038766036761178635 +0.00038602599316382241 +0.00038439412766808290 +0.00038276477377288828 +0.00038113793422074420 +0.00037951361184862656 +0.00037789180958824805 +0.00037627253046633284 +0.00037465577760486645 +0.00037304155422135496 +0.00037142986362906572 +0.00036982070923725923 +0.00036821409455142020 +0.00036661002317347655 +0.00036500849880200203 +0.00036340952523242979 +0.00036181310635723725 +0.00036021924616612947 +0.00035862794874621655 +0.00035703921828217865 +0.00035545305905641263 +0.00035386947544918998 +0.00035228847193878441 +0.00035071005310159621 +0.00034913422361227076 +0.00034756098824379947 +0.00034599035186761123 +0.00034442231945365867 +0.00034285689607048788 +0.00034129408688529482 +0.00033973389716397516 +0.00033817633227116288 +0.00033662139767024542 +0.00033506909892338583 +0.00033351944169151578 +0.00033197243173432536 +0.00033042807491023368 +0.00032888637717635359 +0.00032734734458843268 +0.00032581098330079636 +0.00032427729956626230 +0.00032274629973604832 +0.00032121799025966962 +0.00031969237768480558 +0.00031816946865717783 +0.00031664926992039150 +0.00031513178831577221 +0.00031361703078218456 +0.00031210500435583971 +0.00031059571617007576 +0.00030908917345514312 +0.00030758538353795398 +0.00030608435384182653 +0.00030458609188620771 +0.00030309060528638894 +0.00030159790175318646 +0.00030010798909262863 +0.00029862087520561033 +0.00029713656808753175 +0.00029565507582792616 +0.00029417640661006685 +0.00029270056871054753 +0.00029122757049886605 +0.00028975742043697015 +0.00028829012707879157 +0.00028682569906976366 +0.00028536414514632224 +0.00028390547413537548 +0.00028244969495377437 +0.00028099681660774707 +0.00027954684819232186 +0.00027809979889073121 +0.00027665567797379272 +0.00027521449479926663 +0.00027377625881121122 +0.00027234097953929504 +0.00027090866659810336 +0.00026947932968642111 +0.00026805297858649511 +0.00026662962316327104 +0.00026520927336362116 +0.00026379193921553980 +0.00026237763082732370 +0.00026096635838672802 +0.00025955813216010665 +0.00025815296249152213 +0.00025675085980184510 +0.00025535183458782448 +0.00025395589742113934 +0.00025256305894742499 +0.00025117332988528683 +0.00024978672102527632 +0.00024840324322886436 +0.00024702290742738042 +0.00024564572462092881 +0.00024427170587728962 +0.00024290086233079398 +0.00024153320518117510 +0.00024016874569240254 +0.00023880749519149109 +0.00023744946506728458 +0.00023609466676922187 +0.00023474311180608201 +0.00023339481174469433 +0.00023204977820864901 +0.00023070802287696265 +0.00022936955748273475 +0.00022803439381177784 +0.00022670254370122682 +0.00022537401903812047 +0.00022404883175797266 +0.00022272699384330929 +0.00022140851732218987 +0.00022009341426670491 +0.00021878169679145334 +0.00021747337705199180 +0.00021616846724327452 +0.00021486697959805965 +0.00021356892638529803 +0.00021227431990850418 +0.00021098317250410086 +0.00020969549653974254 +0.00020841130441262543 +0.00020713060854776722 +0.00020585342139626986 +0.00020457975543356424 +0.00020330962315763114 +0.00020204303708719958 +0.00020078000975993625 +0.00019952055373060248 +0.00019826468156919718 +0.00019701240585908093 +0.00019576373919508234 +0.00019451869418157656 +0.00019327728343056024 +0.00019203951955969501 +0.00019080541519033841 +0.00018957498294555776 +0.00018834823544812394 +0.00018712518531848604 +0.00018590584517273840 +0.00018469022762055985 +0.00018347834526314424 +0.00018227021069111028 +0.00018106583648239621 +0.00017986523520014603 +0.00017866841939057139 +0.00017747540158080395 +0.00017628619427673283 +0.00017510080996082936 +0.00017391926108995291 +0.00017274156009315346 +0.00017156771936945386 +0.00017039775128562226 +0.00016923166817393216 +0.00016806948232991488 +0.00016691120601009183 +0.00016575685142971135 +0.00016460643076046178 +0.00016345995612818110 +0.00016231743961055842 +0.00016117889323482624 +0.00016004432897543912 +0.00015891375875175761 +0.00015778719442571256 +0.00015666464779947077 +0.00015554613061308982 +0.00015443165454217376 +0.00015332123119551395 +0.00015221487211273922 +0.00015111258876195096 +0.00015001439253736109 +0.00014892029475692444 +0.00014783030665997283 +0.00014674443940484002 +0.00014566270406650035 +0.00014458511163419142 +0.00014351167300904666 +0.00014244239900172652 +0.00014137730033005207 +0.00014031638761663633 +0.00013925967138652860 +0.00013820716206485221 +0.00013715886997445079 +0.00013611480533354034 +0.00013507497825336579 +0.00013403939873586003 +0.00013300807667131781 +0.00013198102183607048 +0.00013095824389017051 +0.00012993975237508596 +0.00012892555671140286 +0.00012791566619653726 +0.00012691009000246207 +0.00012590883717344099 +0.00012491191662377510 +0.00012391933713556402 +0.00012293110735648102 +0.00012194723579755565 +0.00012096773083098366 +0.00011999260068793976 +0.00011902185345641399 +0.00011805549707906165 +0.00011709353935107408 +0.00011613598791806021 +0.00011518285027395829 +0.00011423413375895662 +0.00011328984555744068 +0.00011234999269595689 +0.00011141458204120259 +0.00011048362029803099 +0.00010955711400748957 +0.00010863506954487006 +0.00010771749311779088 +0.00010680439076430042 +0.00010589576835100762 +0.00010499163157123387 +0.00010409198594320032 +0.00010319683680823301 +0.00010230618932900173 +0.00010142004848778428 +0.00010053841908476233 +0.00009966130573634098 +0.00009878871287350876 +0.00009792064474021815 +0.00009705710539180302 +0.00009619809869342526 +0.00009534362831855720 +0.00009449369774749003 +0.00009364831026588584 +0.00009280746896335510 +0.00009197117673207145 +0.00009113943626542206 +0.00009031225005669428 +0.00008948962039779276 +0.00008867154937800208 +0.00008785803888277903 +0.00008704909059258394 +0.00008624470598175084 +0.00008544488631739589 +0.00008464963265836112 +0.00008385894585420282 +0.00008307282654421436 +0.00008229127515649126 +0.00008151429190703497 +0.00008074187679889607 +0.00007997402962136396 +0.00007921074994918931 +0.00007845203714185478 +0.00007769789034288226 +0.00007694830847918706 +0.00007620329026046763 +0.00007546283417864649 +0.00007472693850734542 +0.00007399560130140877 +0.00007326882039646755 +0.00007254659340854837 +0.00007182891773372154 +0.00007111579054780104 +0.00007040720880607996 +0.00006970316924311348 +0.00006900366837254568 +0.00006830870248698106 +0.00006761826765789567 +0.00006693235973560079 +0.00006625097434924249 +0.00006557410690685042 +0.00006490175259542856 +0.00006423390638109204 +0.00006357056300924453 +0.00006291171700480662 +0.00006225736267248095 +0.00006160749409706569 +0.00006096210514381129 +0.00006032118945882083 +0.00005968474046949159 +0.00005905275138500751 +0.00005842521519686650 +0.00005780212467945706 +0.00005718347239067491 +0.00005656925067258489 +0.00005595945165212168 +0.00005535406724183958 +0.00005475308914069832 +0.00005415650883489387 +0.00005356431759873060 +0.00005297650649553491 +0.00005239306637860843 +0.00005181398789222634 +0.00005123926147267150 +0.00005066887734931090 +0.00005010282554571235 +0.00004954109588080025 +0.00004898367797004783 +0.00004843056122671436 +0.00004788173486311390 +0.00004733718789192601 +0.00004679690912754181 +0.00004626088718744920 +0.00004572911049365049 +0.00004520156727412210 +0.00004467824556430446 +0.00004415913320862963 +0.00004364421786208276 +0.00004313348699179797 +0.00004262692787868560 +0.00004212452761909734 +0.00004162627312651888 +0.00004113215113329622 +0.00004064214819239368 +0.00004015625067918300 +0.00003967444479325917 +0.00003919671656029207 +0.00003872305183390125 +0.00003825343629756171 +0.00003778785546653699 +0.00003732629468983973 +0.00003686873915221652 +0.00003641517387616299 +0.00003596558372395931 +0.00003551995339973329 +0.00003507826745154608 +0.00003464051027350154 +0.00003420666610787687 +0.00003377671904727831 +0.00003335065303681454 +0.00003292845187629214 +0.00003251009922243104 +0.00003209557859109932 +0.00003168487335956411 +0.00003127796676876486 +0.00003087484192559915 +0.00003047548180522744 +0.00003007986925339238 +0.00002968798698875439 +0.00002929981760523876 +0.00002891534357440082 +0.00002853454724779964 +0.00002815741085938625 +0.00002778391652790322 +0.00002741404625929296 +0.00002704778194912029 +0.00002668510538500004 +0.00002632599824903585 +0.00002597044212026597 +0.00002561841847711761 +0.00002526990869986501 +0.00002492489407309813 +0.00002458335578819186 +0.00002424527494578295 +0.00002391063255824903 +0.00002357940955219246 +0.00002325158677092413 +0.00002292714497695307 +0.00002260606485447356 +0.00002228832701185480 +0.00002197391198413001 +0.00002166280023548498 +0.00002135497216174414 +0.00002105040809285716 +0.00002074908829538038 +0.00002045099297495611 +0.00002015610227878796 +0.00001986439629811220 +0.00001957585507066212 +0.00001929045858313014 +0.00001900818677362025 +0.00001872901953409570 +0.00001845293671281841 +0.00001817991811678108 +0.00001790994351412923 +0.00001764299263657701 +0.00001737904518181073 +0.00001711808081588327 +0.00001686007917559819 +0.00001660501987088228 +0.00001635288248714554 +0.00001610364658763157 +0.00001585729171575246 +0.00001561379739741215 +0.00001537314314331576 +0.00001513530845126507 +0.00001490027280843841 +0.00001466801569365813 +0.00001443851657963970 +0.00001421175493522709 +0.00001398771022761099 +0.00001376636192453095 +0.00001354768949645947 +0.00001333167241877061 +0.00001311829017388911 +0.00001290752225342203 +0.00001269934816027206 +0.00001249374741073204 +0.00001229069953655943 +0.00001209018408703322 +0.00001189218063098919 +0.00001169666875883610 +0.00001150362808455129 +0.00001131303824765573 +0.00001112487891516740 +0.00001093912978353534 +0.00001075577058055027 +0.00001057478106723465 +0.00001039614103971062 +0.00001021983033104593 +0.00001004582881307678 +0.00000987411639820984 +0.00000970467304119977 +0.00000953747874090482 +0.00000937251354201913 +0.00000920975753678193 +0.00000904919086666259 +0.00000889079372402380 +0.00000873454635375948 +0.00000858042905490958 +0.00000842842218225094 +0.00000827850614786440 +0.00000813066142267675 +0.00000798486853798033 +0.00000784110808692664 +0.00000769936072599646 +0.00000755960717644533 +0.00000742182822572486 +0.00000728600472887876 +0.00000715211760991561 +0.00000702014786315592 +0.00000689007655455510 +0.00000676188482300175 +0.00000663555388159154 +0.00000651106501887576 +0.00000638839960008658 +0.00000626753906833648 +0.00000614846494579379 +0.00000603115883483353 +0.00000591560241916396 +0.00000580177746492804 +0.00000568966582178178 +0.00000557924942394700 +0.00000547051029124053 +0.00000536343053007917 +0.00000525799233445998 +0.00000515417798691779 +0.00000505196985945748 +0.00000495135041446324 +0.00000485230220558377 +0.00000475480787859418 +0.00000465885017223371 +0.00000456441191902126 +0.00000447147604604650 +0.00000438002557573850 +0.00000429004362661122 +0.00000420151341398622 +0.00000411441825069232 +0.00000402874154774348 +0.00000394446681499353 +0.00000386157766176898 +0.00000378005779747980 +0.00000369989103220823 +0.00000362106127727558 +0.00000354355254578819 +0.00000346734895316124 +0.00000339243471762174 +0.00000331879416069041 +0.00000324641170764281 +0.00000317527188794950 +0.00000310535933569641 +0.00000303665878998425 +0.00000296915509530826 +0.00000290283320191803 +0.00000283767816615768 +0.00000277367515078635 +0.00000271080942528005 +0.00000264906636611388 +0.00000258843145702569 +0.00000252889028926120 +0.00000247042856180067 +0.00000241303208156721 +0.00000235668676361770 +0.00000230137863131540 +0.00000224709381648532 +0.00000219381855955238 +0.00000214153920966238 +0.00000209024222478610 +0.00000203991417180713 +0.00000199054172659297 +0.00000194211167405008 +0.00000189461090816317 +0.00000184802643201864 +0.00000180234535781251 +0.00000175755490684345 +0.00000171364240949048 +0.00000167059530517602 +0.00000162840114231447 +0.00000158704757824644 +0.00000154652237915873 +0.00000150681341999093 +0.00000146790868432795 +0.00000142979626427932 +0.00000139246436034547 +0.00000135590128127092 +0.00000132009544388473 +0.00000128503537292880 +0.00000125070970087358 +0.00000121710716772192 +0.00000118421662080116 +0.00000115202701454361 +0.00000112052741025560 +0.00000108970697587568 +0.00000105955498572167 +0.00000103006082022713 +0.00000100121396566739 +0.00000097300401387535 +0.00000094542066194718 +0.00000091845371193836 +0.00000089209307055004 +0.00000086632874880603 +0.00000084115086172062 +0.00000081654962795755 +0.00000079251536948002 +0.00000076903851119244 +0.00000074610958057368 +0.00000072371920730217 +0.00000070185812287317 +0.00000068051716020834 +0.00000065968725325755 +0.00000063935943659376 +0.00000061952484500041 +0.00000060017471305203 +0.00000058130037468812 +0.00000056289326278040 +0.00000054494490869372 +0.00000052744694184084 +0.00000051039108923112 +0.00000049376917501348 +0.00000047757312001364 +0.00000046179494126599 +0.00000044642675154007 +0.00000043146075886206 +0.00000041688926603128 +0.00000040270467013187 +0.00000038889946203999 +0.00000037546622592643 +0.00000036239763875514 +0.00000034968646977753 +0.00000033732558002280 +0.00000032530792178459 +0.00000031362653810391 +0.00000030227456224860 +0.00000029124521718949 +0.00000028053181507340 +0.00000027012775669300 +0.00000026002653095392 +0.00000025022171433899 +0.00000024070697036996 +0.00000023147604906671 +0.00000022252278640417 +0.00000021384110376696 +0.00000020542500740208 +0.00000019726858786956 +0.00000018936601949134 +0.00000018171155979855 +0.00000017429954897704 +0.00000016712440931172 +0.00000016018064462933 +0.00000015346283974026 +0.00000014696565987903 +0.00000014068385014403 +0.00000013461223493628 +0.00000012874571739742 +0.00000012307927884713 +0.00000011760797821998 +0.00000011232695150180 +0.00000010723141116583 +0.00000010231664560849 +0.00000009757801858513 +0.00000009301096864570 +0.00000008861100857040 +0.00000008437372480561 +0.00000008029477689993 +0.00000007636989694061 +0.00000007259488899033 +0.00000006896562852451 +0.00000006547806186922 +0.00000006212820563961 +0.00000005891214617924 +0.00000005582603900006 +0.00000005286610822341 +0.00000005002864602183 +0.00000004731001206203 +0.00000004470663294883 +0.00000004221500167036 +0.00000003983167704441 +0.00000003755328316614 +0.00000003537650885708 +0.00000003329810711556 +0.00000003131489456865 +0.00000002942375092561 +0.00000002762161843286 +0.00000002590550133074 +0.00000002427246531179 +0.00000002271963698091 +0.00000002124420331725 +0.00000001984341113796 +0.00000001851456656381 +0.00000001725503448680 +0.00000001606223803967 +0.00000001493365806750 +0.00000001386683260132 +0.00000001285935633389 +0.00000001190888009753 +0.00000001101311034420 +0.00000001016980862774 +0.00000000937679108844 +0.00000000863192793977 +0.00000000793314295749 +0.00000000727841297114 +0.00000000666576735781 +0.00000000609328753836 +0.00000000555910647606 +0.00000000506140817769 +0.00000000459842719706 +0.00000000416844814110 +0.00000000376980517843 +0.00000000340088155045 +0.00000000306010908504 +0.00000000274596771278 +0.00000000245698498584 +0.00000000219173559937 +0.00000000194884091563 +0.00000000172696849069 +0.00000000152483160381 +0.00000000134118878948 +0.00000000117484337213 +0.00000000102464300354 +0.00000000088947920294 +0.00000000076828689983 +0.00000000066004397945 +0.00000000056377083107 +0.00000000047852989894 +0.00000000040342523597 +0.00000000033760206013 +0.00000000028024631366 +0.00000000023058422497 +0.00000000018788187322 +0.00000000015144475576 +0.00000000012061735824 +0.00000000009478272745 +0.00000000007336204696 +0.00000000005581421541 +0.00000000004163542763 +0.00000000003035875840 +0.00000000002155374902 +0.00000000001482599650 +0.00000000000981674556 +0.00000000000620248330 +0.00000000000369453654 +0.00000000000203867190 +0.00000000000101469855 +0.00000000000043607361 +0.00000000000014951028 +0.00000000000003458852 +0.00000000000000336852 +0.00000000000000000666 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +25.30325876473197865835 +50.33068723221295925896 +75.08452989996564497233 +99.56701517655753264080 +123.78035548904902896084 +147.72674738975246100381 +171.40837166230983257265 +194.82739342708941876481 +217.98596224590846759384 +240.88621222608529137688 +263.53026212382513904231 +285.92021544694233625705 +308.05816055692667987387 +329.94617077035269403495 +351.58630445964155342153 +372.98060515317575891459 +394.13110163477034575408 +415.03980804251074232525 +435.70872396695193629057 +456.13983454868861144860 +476.33511057530165544449 +496.29650857768081095855 +516.02597092572648307396 +535.52542592344275362848 +554.79678790341586136492 +573.84195732068417328264 +592.66282084601164115156 +611.26125145855405662587 +629.63910853793697697256 +647.79823795573702227557 +665.74047216637734436517 +683.46763029743556216999 +700.98151823937803328590 +718.28392873470716040174 +735.37664146654287833371 +752.26142314663343313441 +768.94002760279340691341 +785.41419586578740563709 +801.68565625564951915294 +817.75612446744332828530 +833.62730365648098995734 +849.30088452298264201090 +864.77854539619420393137 +880.06195231796402822511 +895.15275912578044881229 +910.05260753526692951709 +924.76312722216368911177 +939.28593590375908206624 +953.62263941980756953853 +967.77483181292609515367 +981.74409540847000243957 +995.53200089388099058851 +1009.14010739755019585573 +1022.56996256714887749695 +1035.82310264745615313586 +1048.90105255769708492153 +1061.80532596836610537139 +1074.53742537756261299364 +1087.09884218683282597340 +1099.49105677651778023574 +1111.71553858061292885395 +1123.77374616115298522345 +1135.66712728210723071243 +1147.39711898279392698896 +1158.96514765083020392922 +1170.37262909460582704924 +1181.62096861527970759198 +1192.71156107832348425291 +1203.64579098459012129751 +1214.42503254092798670172 +1225.05064973034200193069 +1235.52399638168913043046 +1245.84641623892980533128 +1256.01924302993165838416 +1266.04380053481736467802 +1275.92140265388024999993 +1285.65335347505970275961 +1295.24094734096343017882 +1304.68546891547634913877 +1313.98819324992132351326 +1323.15038584879380323400 +1332.17330273507604943006 +1341.05819051512116857339 +1349.80628644311491370900 +1358.41881848512298347487 +1366.89700538271949881164 +1375.24205671620484281448 +1383.45517296740581514314 +1391.53754558207174341078 +1399.49035703187087165134 +1407.31478087597315607127 +1415.01198182223402000091 +1422.58311578798998198181 +1430.02932996044251012790 +1437.35176285666352669068 +1444.55154438320346343971 +1451.62979589530868906877 +1458.58763025575808569556 +1465.42615189331172587117 +1472.14645686078711150913 +1478.74963289274455746636 +1485.23675946280513926467 +1491.60890784059483848978 +1497.86714114830760991026 +1504.01251441691556465230 +1510.04607464199739297328 +1515.96886083921026511234 +1521.78190409939566052344 +1527.48622764333299528516 +1533.08284687612376728794 +1538.57276944122941131354 +1543.95699527415149532317 +1549.23651665576403502200 +1554.41231826529792670044 +1559.48537723297181400994 +1564.45666319229280816216 +1569.32713833198931752122 +1574.09775744764328919700 +1578.76946799293909862172 +1583.34321013062162819551 +1587.81991678307872462028 +1592.20051368263148106053 +1596.48591942145731081837 +1600.67704550122221007769 +1604.77479638235899983556 +1608.78006953304065973498 +1612.69375547781714885787 +1616.51673784595186589286 +1620.24989341942409737385 +1623.89409218062860418286 +1627.45019735975347430212 +1630.91906548185124847805 +1634.30154641359854394977 +1637.59848340975872815761 +1640.81071315931603749050 +1643.93906583133525600715 +1646.98436512050216151692 +1649.94742829236633951950 +1652.82906622829091247695 +1655.63008347010691068135 +1658.35127826446046128694 +1660.99344260689667862607 +1663.55736228562614087423 +1666.04381692501033285225 +1668.45358002877378567064 +1670.78741902291585574858 +1673.04609529833646774932 +1675.23036425320833586738 +1677.34097533504177590657 +1679.37867208247644157382 +1681.34419216681885700382 +1683.23826743327208532719 +1685.06162394192392639525 +1686.81498200844930579478 +1688.49905624454936514667 +1690.11455559810906379425 +1691.66218339311876661668 +1693.14263736930934101110 +1694.55660972151827081689 +1695.90478713883021555375 +1697.18785084342448499228 +1698.40647662917444904451 +1699.56133490000684105325 +1700.65309070799366963911 +1701.68240379117764859984 +1702.64992861119321787555 +1703.55631439058652176755 +1704.40220514992029166024 +1705.18823974462111436878 +1705.91505190159159610630 +1706.58327025555581712979 +1707.19351838520697128843 +1707.74641484906987898285 +1708.24257322115522583772 +1708.68260212637187578366 +1709.06710527568202451221 +1709.39668150106058419624 +1709.67192479019627171510 +1709.89342432096395896224 +1710.06176449568079078745 +1710.17752497512537956936 +1710.24128071233235459658 +1710.25360198615453555249 +1710.21505443462228868157 +1710.12619908806300372817 +1709.98759240200661224662 +1709.79978628986873445683 +1709.56332815542600656045 +1709.27876092505675842403 +1708.94662307978933313279 +1708.56744868712189600046 +1708.14176743263442403986 +1707.67010465138650943118 +1707.15298135911712051893 +1706.59091428321698913351 +1705.98441589351796210394 +1705.33399443285543384263 +1704.64015394744478726352 +1703.90339431703455375100 +1703.12421128487858368317 +1702.30309648750085216307 +1701.44053748425380945264 +1700.53701778668664701399 +1699.59301688772188754228 +1698.60901029062029010674 +1697.58546953777567978250 +1696.52286223929036168556 +1695.42165210138000475126 +1694.28229895458684950427 +1693.10525878178896164172 +1691.89098374603349839163 +1690.63992221818057259952 +1689.35251880437203908514 +1688.02921437329200671229 +1686.67044608327114474378 +1685.27664740919158248289 +1683.84824816921968704264 +1682.38567455134625561186 +1680.88934913977936957963 +1679.35969094112010679964 +1677.79711541039364419703 +1676.20203447689141285082 +1674.57485656983044464141 +1672.91598664387038297718 +1671.22582620442722145526 +1669.50477333283492953342 +1667.75322271132722562470 +1665.97156564786291710334 +1664.16019010077457096486 +1662.31948070324938271369 +1660.44981878765702276723 +1658.55158240970536098757 +1656.62514637242702519870 +1654.67088225002339640923 +1652.68915841152806933678 +1650.68034004431069661223 +1648.64478917744872887852 +1646.58286470490929787047 +1644.49492240859035518952 +1642.38131498120378637395 +1640.24239204900868571713 +1638.07850019437023547653 +1635.88998297820148764004 +1633.67718096222392887285 +1631.44043173108229893842 +1629.18006991432798713504 +1626.89642720822439514450 +1624.58983239742724435928 +1622.26061137651640819968 +1619.90908717137290295796 +1617.53557996040285615891 +1615.14040709564869757742 +1612.72388312372822838370 +1610.28631980663089962036 +1607.82802614240245020483 +1605.34930838565878730151 +1602.85047006797003632528 +1600.33181201811134997115 +1597.79363238217570142297 +1595.23622664352933497867 +1592.65988764267262922658 +1590.06490559692565511796 +1587.45156811999868295970 +1584.82016024143285903847 +1582.17096442589559046610 +1579.50426059234678177745 +1576.82032613309365842724 +1574.11943593268961194553 +1571.40186238671935825550 +1568.66787542044562542287 +1565.91774250735034001991 +1563.15172868751142232213 +1560.37009658590022809221 +1557.57310643051164333883 +1554.76101607039981900016 +1551.93408099357861829048 +1549.09255434479587165697 +1546.23668694319212590926 +1543.36672729984093166422 +1540.48292163516975961102 +1537.58551389624426519731 +1534.67474577395819324011 +1531.75085672009436166263 +1528.81408396425945284136 +1525.86466253072217114095 +1522.90282525512679967505 +1519.92880280108306578768 +1516.94282367665846322780 +1513.94511425073937971320 +1510.93589876930241189257 +1507.91539937154902872862 +1504.88383610595292338985 +1501.84142694617867164197 +1498.78838780689216036990 +1495.72493255948347723461 +1492.65127304765155713540 +1489.56761910290379091748 +1486.47417855993671764736 +1483.37115727191871883406 +1480.25875912566175429674 +1477.13718605668805139430 +1474.00663806419834145345 +1470.86731322593254844833 +1467.71940771293157013133 +1464.56311580418991979968 +1461.39862990121059738158 +1458.22614054247037529422 +1455.04583641776048352767 +1451.85790438245408040530 +1448.66252947166117337474 +1445.45989491428599649225 +1442.25018214699025520531 +1439.03357082805382560764 +1435.81023885115496341314 +1432.58036235903250599222 +1429.34411575707326846896 +1426.10167172679393843282 +1422.85320123922451784892 +1419.59887356822218862362 +1416.33885630366444274841 +1413.07331536456695175730 +1409.80241501210502974573 +1406.52631786255415136111 +1403.24518490012133042910 +1399.95917548969669041981 +1396.66844738953409432725 +1393.37315676381012963247 +1390.07345819511715490080 +1386.76950469687221811910 +1383.46144772562342950550 +1380.14943719327175131184 +1376.83362147923344309675 +1373.51414744249018440314 +1370.19116043355461442843 +1366.86480430637379868131 +1363.53522143013287859503 +1360.20255270097004540730 +1356.86693755363876334741 +1353.52851397305539649096 +1350.18741850578385310655 +1346.84378627143087214790 +1343.49775097397787249065 +1340.14944491300730078365 +1336.79899899487691072864 +1333.44654274379604430578 +1330.09220431283256402821 +1326.73611049484452450997 +1323.37838673333430961065 +1320.01915713320636314165 +1316.65854447149240513681 +1313.29667020796000542759 +1309.93365449566385905200 +1306.56961619142612107680 +1303.20467286623625113862 +1299.83894081556718447246 +1296.47253506965307678911 +1293.10556940365677291993 +1289.73815634778361527424 +1286.37040719732226534688 +1283.00243202261958685995 +1279.63433967895957721339 +1276.26623781641683308408 +1272.89823288960360514466 +1269.53043016735523451644 +1266.16293374235533519823 +1262.79584654069708449242 +1259.42927033135129022412 +1256.06330573560148877732 +1252.69805223638491042948 +1249.33360818758387722482 +1245.97007082323466420348 +1242.60753626669998084253 +1239.24609953973185838549 +1235.88585457151589253044 +1232.52689420762635563733 +1229.16931021891718955885 +1225.81319331035706454713 +1222.45863312980577575217 +1219.10571827670105449215 +1215.75453631073105498217 +1212.40517376040088493028 +1209.05771613155684462981 +1205.71224791584972990677 +1202.36885259913810841681 +1199.02761266982111010293 +1195.68860962712869877578 +1192.35192398933986623888 +1189.01763530194648410543 +1185.68582214575440048066 +1182.35656214493178595148 +1179.02993197500268252043 +1175.70600737077552366827 +1172.38486313421162776649 +1169.06657314225481059111 +1165.75121035458391816064 +1162.43884682132579655445 +1159.12955369069504740764 +1155.82340121660513432289 +1152.52045876620104536414 +1149.22079482734284283652 +1145.92447701604783105722 +1142.63157208385655394522 +1139.34214592517150776985 +1136.05626358452582280734 +1132.77398926380078592047 +1129.49538632939925264509 +1126.22051731935607676860 +1122.94944395041261486767 +1119.68222712501665228046 +1116.41892693830027383228 +1113.15960268498520235880 +1109.90431286624675522035 +1106.65311519652459537610 +1103.40606661028823509696 +1100.16322326875592807482 +1096.92464056654762316612 +1093.69037313831859137281 +1090.46047486531551840017 +1087.23499888190576712077 +1084.01399758203888268326 +1080.79752262569263621117 +1077.58562494523607711017 +1074.37835475176962063415 +1071.17576154141374900064 +1067.97789410154859979230 +1064.78480051699830255529 +1061.59652817620326459291 +1058.41312377730946536758 +1055.23463333423205767758 +1052.06110218267417621973 +1048.89257498609981666959 +1045.72909574165146295854 +1042.57070778605293526198 +1039.41745380143697730091 +1036.26937582115192526544 +1033.12651523550880483526 +1029.98891279750819194305 +1026.85660862849726981949 +1023.72964222381494892034 +1020.60805245836627364042 +1017.49187759218114024407 +1014.38115527591321551881 +1011.27592255631441275909 +1008.17621588164320201031 +1005.08207110707110132353 +1001.99352350001606737351 +998.91060774545053391194 +995.83335795116818189854 +992.76180765301626252040 +989.69598982007153153972 +986.63593685980697500781 +983.58168062319566615770 +980.53325240978506371903 +977.49068297273527150537 +974.45400252382046346611 +971.42324073837960440869 +968.39842676025818946073 +965.37958920668620521610 +962.36675617313221664517 +959.35995523811527618818 +956.35921346799557341001 +953.36455742170255689416 +950.37601315546032765269 +947.39360622744504780712 +944.41736170243711967487 +941.44730415641697618412 +938.48345768113688336598 +935.52584588864783654572 +932.57449191581633840542 +929.62941842877773979126 +926.69064762737650653435 +923.75820124956146628392 +920.83210057576025064918 +917.91236643319848553801 +914.99901920022057311144 +912.09207881054635436158 +909.19156475750946810876 +906.29749609826365031040 +903.40989145795936110517 +900.52876903387164020387 +897.65414659952659803821 +894.78604150877231404593 +891.92447069982790708309 +889.06945069929724922986 +886.22099762616346652067 +883.37912719573841968668 +880.54385472358933384385 +877.71519512944087182404 +874.89316294103889504186 +872.07777229798784901504 +869.26903695555154172325 +866.46697028844755550381 +863.67158529458515658916 +860.88289459879126752639 +858.10091045650233354536 +855.32564475742890408583 +852.55710902919747695705 +849.79531444094413927814 +847.04027180691559806291 +844.29199159001007046754 +841.55048390530748747551 +838.81575852356900213636 +836.08782487470170963206 +833.36669205121654613322 +830.65236881164071292005 +827.94486358390850000433 +825.24418446872857657581 +822.55033924292763458652 +819.86333536276242739405 +817.18317996720566043223 +814.50987988121164562472 +811.84344161895830893627 +809.18387138705395500438 +806.53117508772982091614 +803.88535832199306696566 +801.24642639278204114817 +798.61438430806583710364 +795.98923678394100988953 +793.37098824769498150999 +790.75964284085137023794 +788.15520442217302843346 +785.55767657068463449832 +782.96706258861365768098 +780.38336550435610661225 +777.80658807539771260053 +775.23673279120862389391 +772.67380187612980080303 +770.11779729222860169102 +767.56872074212333245669 +765.02657367180779601767 +762.49135727342888912972 +759.96307248806147072173 +757.44172000844616832183 +754.92730028172195488878 +752.41981351211802575563 +749.91925966364237865491 +747.42563846273878880311 +744.93894940091854550701 +742.45919173738900553872 +739.98636450163814970438 +737.52046649602061734186 +735.06149629830497360672 +732.60945226421324605326 +730.16433252993067526404 +727.72613501460705265345 +725.29485742282145110948 +722.87049724704661457508 +720.45305177007844577020 +718.04251806745321573544 +715.63889300983873908990 +713.24217326541997863387 +710.85235530224736066884 +708.46943539058167971234 +706.09340960521240049275 +703.72427382775413207128 +701.36202374893707656156 +699.00665487086234861636 +696.65816250925161057239 +694.31654179567715345911 +691.98178767976503422688 +689.65389493139264232013 +687.33285814285420656233 +685.01867173102550623298 +682.71132993949356659868 +680.41082684068408070743 +678.11715633796040947345 +675.83031216771485105710 +673.55028790142705474864 +671.27707694773005187017 +669.01067255443297199236 +666.75106781054807925102 +664.49825564828961432795 +662.25222884505956244539 +660.01298002541170717450 +657.78050166301500212285 +655.55478608257863015751 +653.33582546178195116227 +651.12361183317113955127 +648.91813708605684496433 +646.71939296837695110298 +644.52737108856399572687 +642.34206291737962146726 +640.16345978974629815639 +637.99155290655710359715 +635.82633333647277140699 +633.66779201769759310992 +631.51591975975702553114 +629.37070724523550779850 +627.23214503152576071443 +625.10022355254477588460 +622.97493312043866353633 +620.85626392728352129780 +618.74420604676026869129 +616.63874943581606657972 +614.53988393632198494743 +612.44759927670781962661 +610.36188507357792332186 +608.28273083333010617935 +606.21012595374804732273 +604.14405972557528912148 +602.08452133409741691139 +600.03149986068206089840 +597.98498428433413209859 +595.94496348321160894557 +593.91142623615246520785 +591.88436122416510443145 +589.86375703192845776357 +587.84960214926218213805 +585.84188497258867300843 +583.84059380639041592076 +581.84571686464448703191 +579.85724227224602600472 +577.87515806642772986379 +575.89945219815831478627 +573.93011253352790390636 +571.96712685513284668559 +570.01048286343223026051 +568.06016817810746033501 +566.11617033940069632081 +564.17847680944464627828 +562.24707497357667307369 +560.32195214165324159694 +558.40309554933401159360 +556.49049235937422963616 +554.58412966289290579880 +552.68399448062814371951 +550.79007376419781394361 +548.90235439732646227640 +547.02082319707790247776 +545.14546691507337072835 +543.27627223869308181747 +541.41322579227301048377 +539.55631413828461973026 +537.70552377851697656297 +535.86084115522817228339 +534.02225265230754303047 +532.18974459641185603687 +530.36330325809967689565 +528.54291485294754693314 +526.72856554267002593406 +524.92024143621006260219 +523.11792859083971052314 +521.32161301323503721505 +519.53128066055080580554 +517.74691744147617100680 +515.96850921729560468521 +514.19604180291969441896 +512.42950096792947078939 +510.66887243758685599460 +508.91414189386046018626 +507.16529497641829493659 +505.42231728363145748517 +503.68519437355178069993 +501.95391176489607687472 +500.22845493800735994228 +498.50880933581629506079 +496.79496036478553833149 +495.08689339585845345937 +493.38459376538042988614 +491.68804677603037589506 +489.99723769772930381805 +488.31215176854897208614 +486.63277419560262160303 +484.95909015594213542499 +483.29108479742876625096 +481.62874323961153777418 +479.97205057458558030703 +478.32099186785058009264 +476.67555215915183453035 +475.03571646332585487471 +473.40146977112294734980 +471.77279705003678600406 +470.14968324511221453577 +468.53211327975770927878 +466.92007205653652590627 +465.31354445796677055114 +463.71251534729424292891 +462.11696956927630708378 +460.52689195094478691317 +458.94226730236829325804 +457.36308041740142016351 +455.78931607443581697225 +454.22095903713102416077 +452.65799405515099351760 +451.10040586488412373001 +449.54817919016119276421 +448.00129874295885201718 +446.45974922410971430509 +444.92351532398777180788 +443.39258172320518269771 +441.86693309328632039978 +440.34655409734159547952 +438.83142939073843535880 +437.32154362176004269713 +435.81688143225352405352 +434.31742745828489660198 +432.82316633077130063612 +431.33408267612082909181 +429.85016111685303030754 +428.37138627222611830803 +426.89774275884258258884 +425.42921519126446128212 +423.96578818261144760982 +422.50744634515126563201 +421.05417429089578718049 +419.60595663217986839300 +418.16277798223319450699 +416.72462295575815005577 +415.29147616949029497846 +413.86332224275145108550 +412.44014579801074660281 +411.02193146142496971152 +409.60866386337721678501 +408.20032763901593853006 +406.79690742878165110596 +405.39838787892557547821 +404.00475364203492745219 +402.61598937753467453149 +401.23207975220191201515 +399.85300944065852490894 +398.47876312587391112174 +397.10932549964428517342 +395.74468126308664750468 +394.38481512710706056168 +393.02971181288182833669 +391.67935605232082707516 +390.33373258853146126057 +388.99282617627119407189 +387.65662158240746748561 +386.32510358635539660099 +384.99825698052728739640 +383.67606657076328247058 +382.35851717676746375218 +381.04559363252718640069 +379.73728078674378139112 +378.43356350323983861017 +377.13442666137831338347 +375.83985515646469366402 +374.54983390015235045212 +373.26434782083327945656 +371.98338186403992722262 +370.70692099282291565032 +369.43495018814354580172 +368.16745444924367802741 +366.90441879402709446367 +365.64582825942073895931 +364.39166790174851939810 +363.14192279708237265368 +361.89657804160532350579 +360.65561875195953689399 +359.41903006559385858054 +358.18679714110396616888 +356.95890515857666969168 +355.73533931991659073901 +354.51608484918187969015 +353.30112699290737054980 +352.09045102042671260278 +350.88404222418563449537 +349.68188592006322323869 +348.48396744767148902611 +347.29027217066840194093 +346.10078547705433038573 +344.91549277947132168265 +343.73437951549186664124 +342.55743114791505377070 +341.38463316504419253761 +340.21597108097569162055 +339.05143043586872408923 +337.89099679622682970148 +336.73465575516019043789 +335.58239293265955893730 +334.43419397585086016988 +333.29004455926138916766 +332.14993038507009259774 +331.01383718336154515782 +329.88175071237077418118 +328.75365675873342752311 +327.62954113771866104798 +326.50938969347487272898 +325.39318829925787213142 +324.28092285766462055108 +323.17257930085543193854 +322.06814359078441611928 +320.96760171941321004851 +319.87093970893266714484 +318.77814361197454218200 +317.68919951182209615581 +316.60409352261439153153 +315.52281178955627183313 +314.44534048911265244897 +313.37166582920821156222 +312.30177404942514840513 +311.23565142118729909271 +310.17328424795465480202 +309.11465886540617020728 +308.05976164161785391116 +307.00857897724824852048 +305.96109730571083673567 +304.91730309334406001653 +303.87718283958741949391 +302.84072307714541238965 +301.80791037214845573544 +300.77873132432006286763 +299.75317256713242386468 +298.73122076795897328338 +297.71286262823258539356 +296.69808488359331022366 +295.68687430403161897630 +294.67921769403932330533 +293.67510189274844378815 +292.67451377406655410596 +291.67744024682031067641 +290.68386825488192926059 +289.69378477730657550637 +288.70717682845469198583 +287.72403145812387492697 +286.74433575166580112636 +285.76807683011395511130 +284.79524185029447380657 +283.82581800494767776399 +282.85979252283891582920 +281.89715266886946665181 +280.93788574418306325242 +279.98197908627656715908 +279.02942006909705696671 +278.08019610314852343436 +277.13429463558856014060 +276.19170315032431517466 +275.25240916810491853539 +274.31640024661868437761 +273.38366398057547712597 +272.45418800180033258584 +271.52795997931497140598 +270.60496761942232524234 +269.68519866578344590380 +268.76864089950186098577 +267.85528213919383233588 +266.94511024106793684041 +266.03811309899128900724 +265.13427864456537008664 +264.23359484718770318068 +263.33604971412364648131 +262.44163129056391881022 +261.55032765969144747942 +260.66212694273787064958 +259.77701729904305238961 +258.89498692610629859701 +258.01602405964700892582 +257.14011697364861674941 +256.26725398041548942274 +255.39742343061507767743 +254.53061371332827889091 +253.66681325608746533362 +252.80601052492636426905 +251.94819402441302713669 +251.09335229769334318917 +250.24147392652560029092 +249.39254753131575625957 +248.54656177114802062533 +247.70350534382188811833 +246.86336698587399496319 +246.02613547261344706385 +245.19179961814123203112 +244.36034827538017566440 +243.53177033609199497732 +242.70605473090446935203 +241.88319042932380398270 +241.06316643975830515956 +240.24597180953094266442 +239.43159562489515224115 +238.62002701104478319394 +237.81125513213055455708 +237.00526919126301095275 +236.20205843052656291547 +235.40161213098255643672 +234.60391961267538363245 +233.80897023463325012926 +233.01675339487513838321 +232.22725853040540755501 +231.44047511721728938028 +230.65639267028913650392 +229.87500074357691914884 +229.09628893001479355007 +228.32024686150165848630 +227.54686420889942155554 +226.77613068201691248760 +226.00803602960465354954 +225.24257003933652754313 +224.47972253780088180974 +223.71948339048350362646 +222.96184250174854923898 +222.20678981482527092339 +221.45431531178618911326 +220.70440901352424134529 +219.95706097973672399348 +219.21226130889800742807 +218.47000013823475228492 +217.73026764370345631505 +216.99305403996194741012 +216.25834958033902921670 +215.52614455680966898399 +214.79642929996151679006 +214.06919417896236268462 +213.34442960153049284600 +212.62212601389836663657 +211.90227390077617997122 +211.18486378531946456860 +210.46988622908617116991 +209.75733183200375719935 +209.04719123232399624612 +208.33945510658659827641 +207.63411416957305277720 +206.93115917426777627952 +206.23058091180917017482 +205.53237021144914820070 +204.83651794050351213627 +204.14301500430650548878 +203.45185234615919966927 +202.76302094728532665613 +202.07651182677500401041 +201.39231604153792432044 +200.71042468624887078477 +200.03082889329454019389 +199.35351983271743847581 +198.67848871216409634144 +198.00572677682458788695 +197.33522530937869987611 +196.66697562993590508995 +196.00096909597678518367 +195.33719710229064503437 +194.67565108091901038279 +194.01632250108860944238 +193.35920286915356314239 +192.70428372852592247000 +192.05155665961723343571 +191.40101327976745437809 +190.75264524318353664967 +190.10644424086734716184 +189.46240200055200375573 +188.82051028663059355495 +188.18076090008770506756 +187.54314567842587280211 +186.90765649559963890169 +186.27428526193727975624 +185.64302392407338970770 +185.01386446487148873530 +184.38679890335225763920 +183.76181929461367303702 +183.13891772976165839282 +182.51808633582618313085 +181.89931727569040731396 +181.28260274800823026453 +180.66793498712462451294 +180.05530626300068774981 +179.44470888112692819050 +178.83613518244840179250 +178.22957754327657653448 +177.62502837521270748766 +177.02248012506134955402 +176.42192527474512075969 +175.82335634122497936005 +175.22676587640864909190 +174.63214646707086785682 +174.03949073476272246808 +173.44879133572680984798 +172.86004096080611702746 +172.27323233536077395911 +171.68835821917278394722 +171.10541140636203749636 +170.52438472529257751376 +169.94527103848324145474 +169.36806324251338651266 +168.79275426793600445308 +168.21933707917861511305 +167.64780467445584122288 +167.07815008567271775064 +166.51036637832874021115 +165.94444665142762573851 +165.38038403737576231833 +164.81817170189245302936 +164.25780284390739893752 +163.69927069546875486594 +163.14256852164223232649 +162.58768962041256145312 +162.03462732258864775758 +161.48337499169869602156 +160.93392602389582179967 +160.38627384785533536160 +159.84041192467279302036 +159.29633374776577170451 +158.75403284277101079169 +158.21350276743990548312 +157.67473711154016768887 +157.13772949675015411231 +156.60247357655424593759 +156.06896303614209386978 +155.53719159230243462844 +155.00715299331631058521 +154.47884101885563268297 +153.95224947987543373529 +153.42737221850575224380 +152.90420310794971214818 +152.38273605237100127852 +151.86296498679189426184 +151.34488387698038991402 +150.82848671934667095229 +150.31376754082953084435 +149.80072039879212297819 +149.28933938091006439208 +148.77961860506036373408 +148.27155221921449879119 +147.76513440132623600221 +147.26035935921885311473 +146.75722133047818829255 +146.25571458233605426358 +145.75583341156234951086 +145.25757214435063247038 +144.76092513620648105643 +144.26588677183184472597 +143.77245146501616090973 +143.28061365851780806224 +142.79036782395434102000 +142.30170846168573461910 +141.81463010069910524180 +141.32912729849689981165 +140.84519464097684249282 +140.36282674232191425290 +139.88201824487904900707 +139.40276381904686786584 +138.92505816315843958364 +138.44889600336111357137 +137.97427209350550469935 +137.50118121502151780078 +137.02961817680636613659 +136.55957781510332438302 +136.09105499338525646635 +135.62404460223336855051 +135.15854155922318113880 +134.69454080880032620371 +134.23203732216575190250 +133.77102609715379344379 +133.31150215811371140262 +132.85346055578705204425 +132.39689636719182885827 +131.94180469549746703706 +131.48818066990801867178 +131.03601944553960834128 +130.58531620329719658002 +130.13606614975799402600 +129.68826451704447322300 +129.24190656270766908165 +128.79698756960033279029 +128.35350284575886803395 +127.91144772427934128700 +127.47081756319226997221 +127.03160774534519816825 +126.59381367827356257294 +126.15743079408274240905 +125.72245454932165387163 +125.28888042486030940381 +124.85670392576408005425 +124.42592058117324427258 +123.99652594417480599986 +123.56851559168180187953 +123.14188512430652622243 +122.71663016623710973363 +122.29274636511028973018 +121.87022939189068893029 +121.44907494074067244583 +121.02927872889925708932 +120.61083649655498106767 +120.19374400671821945252 +119.77799704509997980040 +119.36359141998079280711 +118.95052296208957898216 +118.53878752447276667681 +118.12838098237220663123 +117.71929923309598109427 +117.31153819589160036685 +116.90509381182205572713 +116.49996204363461060893 +116.09613887563828882321 +115.69362031357397313514 +115.29240238448812760907 +114.89248113660387673463 +114.49385263919691624324 +114.09651298246323847252 +113.70045827739600952100 +113.30568465565558256003 +112.91218826944009379076 +112.51996529136044955521 +112.12901191431089387152 +111.73932435133929175208 +111.35089883552136313938 +110.96373161983125044117 +110.57781897701181605953 +110.19315719944684417442 +109.80974259903410938932 +109.42757150705313051731 +109.04664027403941872763 +108.66694526965460454448 +108.28848288255515797118 +107.91124952026721928178 +107.53524160905512019326 +107.16045559379080032159 +106.78688793782788479803 +106.41453512287047544760 +106.04339364884187091320 +105.67346003375872953711 +105.30473081359949105718 +104.93720254217338094804 +104.57087179099346485600 +104.20573514914565294021 +103.84178922315851423264 +103.47903063687319047403 +103.11745603131384996232 +102.75706206455868141347 +102.39784541160902620049 +102.03980276425792794726 +101.68293083096286011369 +101.32722633671245660025 +100.97268602289982197817 +100.61930664718798311696 +100.26708498338349784262 +99.91601782130517506175 +99.56610196665086220946 +99.21733424087156549831 +98.86971148103667417217 +98.52323053970729915818 +98.17788828480331630999 +97.83368159947411868416 +97.49060738196641295872 +97.14866254549615121050 +96.80784401811526151960 +96.46814874258357974668 +96.12957367623650384303 +95.79211579085547612067 +95.45577207253539597787 +95.12053952155697800208 +94.78641515225243097120 +94.45339599287862597521 +94.12147908548379859894 +93.79066148577663852848 +93.46094026299810764158 +93.13231249978707637638 +92.80477529205360553988 +92.47832574884434109208 +92.15296099221450276673 +91.82867815709688841253 +91.50547439116876091703 +91.18334685472470368950 +90.86229272054197281250 +90.54230917375367937439 +90.22339341171507953732 +89.90554264387496630206 +89.58875409164238590165 +89.27302498825906695856 +88.95835257866583845043 +88.64473411937406410743 +88.33216687833429148213 +88.02064813480552629699 +87.71017517922331308000 +87.40074531307199379171 +87.09235584875112579084 +86.78500410944714360539 +86.47868742900185168310 +86.17340315178122978068 +85.86914863254547469751 +85.56592123631993729305 +85.26371833826128465716 +84.96253732353073928607 +84.66237558716133548842 +84.36323053392860060740 +84.06509957821872092154 +83.76798014389945024050 +83.47186966418983899985 +83.17676558153003441021 +82.88266534745005742479 +82.58956642244055501578 +82.29746627582154872016 +82.00636238561278901216 +81.71625223840464968816 +81.42713332922680535830 +81.13900316141860002972 +80.85185924649904620765 +80.56569910403634082741 +80.28052026151821962685 +79.99632025422278047699 +79.71309662508851090479 +79.43084692458268136761 +79.14956871057428600125 +78.86925954820154061053 +78.58991700974554817094 +78.31153867449641836629 +78.03412212862777153077 +77.75766496506514613429 +77.48216478335658052856 +77.20761918954302416296 +76.93402579602933144542 +76.66138222145539771191 +76.38968609056622938169 +76.11893503408272465549 +75.84912668857280948487 +75.58025869632162141443 +75.31232870520243238843 +75.04533436854916317316 +74.77927334502578560205 +74.51414329849802697936 +74.24994189790440657362 +73.98666681712714421337 +73.72431573486323941324 +73.46288633449709948309 +73.20237630397099337642 +72.94278333565559080398 +72.68410512622342878331 +72.42633937651791598000 +72.16948379142844771650 +71.91353607975752026960 +71.65849395409689748249 +71.40435513069675721454 +71.15111732933850419158 +70.89877827320584913195 +70.64733568875703895174 +70.39678730559826647095 +70.14713085635406741858 +69.89836407654090066899 +69.65048470443714734301 +69.40349048095842476869 +69.15737914952694609383 +68.91214845594690530106 +68.66779614827447630887 +68.42431997669261534156 +68.18171769338090371093 +67.93998705239147284374 +67.69912580951863390055 +67.45913172217474595982 +67.22000254926146567414 +66.98173605104189221038 +66.74432998901642122291 +66.50778212579284343065 +66.27209022496090540244 +66.03725205096672823402 +65.80326536898419931276 +65.57012794479007311566 +65.33783754463529191980 +65.10639193512143663156 +64.87578888307153590631 +64.64602615540636065816 +64.41710151901621372872 +64.18901274063662754088 +63.96175758671982691794 +63.73533382331184782288 +63.50973921592348148124 +63.28497152940758496698 +63.06102852783090639832 +62.83790797435012365213 +62.61560763108433746993 +62.39412525899203387780 +62.17345861774303017455 +61.95360546559619052687 +61.73456355927048377907 +61.51633065382369380814 +61.29890450252383260477 +61.08228285672691981745 +60.86646346574967481047 +60.65144407674694093657 +60.43722243458505261060 +60.22379628171862009367 +60.01116335806393919938 +59.79932140087704084408 +59.58826814462648968629 +59.37800132087168236694 +59.16851865813670485750 +58.95981788178721672011 +58.75189671390509005278 +58.54475287316520848435 +58.33838407471186116027 +58.13278803003441908004 +57.92796244684359407984 +57.72390502894780439647 +57.52061347612891495373 +57.31808548401941294514 +57.11631874397912866925 +56.91531094297207005184 +56.71505976344127475386 +56.51556288318843712659 +56.31681797524785793030 +56.11882270776663972356 +55.92157474387813209660 +55.72507174158241838313 +55.52931135362169356995 +55.33429122735816463319 +55.14000900465069321399 +54.94646232173311517499 +54.75364880909176434898 +54.56156609134313839604 +54.37021178711137281425 +54.17958350890626206819 +53.98967886300078333761 +53.80049544930927396535 +53.61203086126625549923 +53.42428268570412797089 +53.23724850273107733756 +53.05092588561016242465 +52.86531240063676051477 +52.68040560701775376629 +52.49620305675043141491 +52.31270229450142750238 +52.12990085748371882346 +51.94779627533795718364 +51.76638607000909075850 +51.58566775562819373135 +51.40563883838826342298 +51.22629681642651888751 +51.04763917970213782382 +50.86966340987623169667 +50.69236698019049214281 +50.51574735534754267974 +50.33980199139088540505 +50.16452833558428636707 +49.98992382629159436647 +49.81598589285688660766 +49.64271195548386828023 +49.47009942511645164132 +49.29814570331990353225 +49.12684818215959126064 +48.95620424408270565664 +48.78621126179712064186 +48.61686659815408262375 +48.44816760602657979007 +48.28011162819275625679 +48.11269599721354239819 +47.94591803531707796537 +47.77977505434974148102 +47.61426436030226483354 +47.44938326622619229056 +47.28512909616733139728 +47.12149918517034308252 +46.95849087924214160239 +46.79610153531388760939 +46.63432852120588734124 +46.47316921558874014409 +46.31262100794856451103 +46.15268129854887746433 +45.99334749839513136749 +45.83461702919673541601 +45.67648732333272931783 +45.51895582381340688016 +45.36201998424598258453 +45.20567726879712466825 +45.04992515215796800021 +44.89476111950691006314 +44.74018266647521357982 +44.58618729910980960085 +44.43277253383953251387 +44.27993589743691416061 +44.12767492698573335019 +43.97598716984266786767 +43.82487018360454555932 +43.67432153607089162506 +43.52433880521073916725 +43.37491957912624229721 +43.22606145601890403896 +43.07776204415264231784 +42.93001896182171606142 +42.78282983731357802526 +42.63619230887618272163 +42.49010402468241665019 +42.34456264279611303891 +42.19956583113673076468 +42.05511126744711702941 +41.91119663925665861370 +41.76781964384998957485 +41.62497798823090988662 +41.48266938908996337432 +41.34089157276900294846 +41.19964227522859090413 +41.05891924201452525267 +40.91872022822411025800 +40.77904299847148195113 +40.63988532685638688235 +40.50124499692867630074 +40.36311980165736912340 +40.22550754339489031963 +40.08840603384647494067 +39.95181309403624680954 +39.81572655427422802177 +39.68014425412317081054 +39.54506404236671102126 +39.41048377697643445572 +39.27640132507964665365 +39.14281456292645344774 +39.00972137585783627856 +38.87711965827271143326 +38.74500731359629668304 +38.61338225424835712829 +38.48224240161076181721 +38.35158568599567985302 +38.22141004661358465455 +38.09171343154149980137 +37.96249379769139409291 +37.83374911077925872860 +37.70547734529222339006 +37.57767648445877028962 +37.45034452021639737040 +37.32347945318034021511 +37.19707929261260659359 +37.07114205639138759807 +36.94566577097954507281 +36.82064847139394458964 +36.69608820117456815524 +36.57198301235333559589 +36.44833096542399886175 +36.32513012931172369235 +36.20237858134226627271 +36.08007440721176806164 +35.95821570095625929753 +35.83680056492121224210 +35.71582710973162733126 +35.59529345426237512129 +35.47519772560780637605 +35.35553805905213664573 +35.23631259803831738964 +35.11751949414078666223 +34.99915690703301152098 +34.88122300446068635438 +34.76371596220937476573 +34.64663396407794238030 +34.52997520184670321441 +34.41373787525032668100 +34.29792019194658792003 +34.18252036748936717458 +34.06753662529808224235 +33.95296719662977125154 +33.83881032054888748917 +33.72506424390055457252 +33.61172722127966494554 +33.49879751500436952938 +33.38627339508597913209 +33.27415313920153039362 +33.16243503266429826226 +33.05111736839712932579 +32.94019844690222242889 +32.82967657623511570364 +32.71955007197500719940 +32.60981725719793899998 +32.50047646244758681178 +32.39152602570899119883 +32.28296429237932585465 +32.17478961524188463272 +32.06700035443648033606 +31.95959487743414584315 +31.85257155900787751079 +31.74592878120652272855 +31.63966493332641860547 +31.53377841188559571606 +31.42826762059530665283 +31.32313097033411963821 +31.21836687911967445075 +31.11397377208324499520 +31.00995008144147746521 +30.90629424647120870873 +30.80300471348151702955 +30.70007993578819593949 +30.59751837368570548392 +30.49531849442290720731 +30.39347877217439375386 +30.29199768801645475946 +30.19087372989909923149 +30.09010539262118300030 +29.98969117780305637666 +29.88962959386213213975 +29.78991915598573569923 +29.69055838610549713508 +29.59154581287248930721 +29.49287997163080632390 +29.39455940439161452105 +29.29658265980816267415 +29.19894829315043693896 +29.10165486627961684007 +29.00470094762269113176 +28.90808511214726905791 +28.81180594133612871133 +28.71586202316242619759 +28.62025195206481598120 +28.52497432892248596659 +28.43002776103000073249 +28.33541086207270254249 +28.24112225210164695000 +28.14716055750911039013 +28.05352441100453830813 +27.96021245158949852794 +27.86722332453348371928 +27.77455568134860186547 +27.68220817976714087649 +27.59017948371532114038 +27.49846826329078908202 +27.40707319473711933711 +27.31599296042109870086 +27.22522624880804542613 +27.13477175443770761376 +27.04462817790082596048 +26.95479422581555795091 +26.86526861080366046508 +26.77605005146668304405 +26.68713727236277222232 +26.59852900398254504921 +26.51022398272636237948 +26.42222095088086319947 +26.33451865659567303624 +26.24711585386030066047 +26.16001130248066175454 +26.07320376805612482940 +25.98669202195664951205 +25.90047484130004917802 +25.81455100892899778842 +25.72891931338833515497 +25.64357854890126375835 +25.55852751534885669571 +25.47376501824525618645 +25.38928986871692572436 +25.30510088347852715174 +25.22119688481228294563 +25.13757670054450699126 +25.05423916402323314401 +24.97118311409653657051 +24.88840739509069877045 +24.80591085678731388953 +24.72369235440210388788 +24.64175074856195735151 +24.56008490528433085842 +24.47869369595421318309 +24.39757599730345560829 +24.31673069138841469794 +24.23615666556882430882 +24.15585281248532467657 +24.07581803003941445240 +23.99605122137037227503 +23.91655129483559960590 +23.83731716398797928491 +23.75834774755560019344 +23.67964196941952792486 +23.60119875859395577322 +23.52301704920383329522 +23.44509578046549691521 +23.36743389666375136926 +23.29003034713316822035 +23.21288408623530585828 +23.13599407333955682020 +23.05935927280120978367 +22.98297865394201622280 +22.90685119102856504014 +22.83097586325288830267 +22.75535165471064402709 +22.67997755438216245238 +22.60485255611097699102 +22.52997565858463246968 +22.45534586531354293015 +22.38096218461183894988 +22.30682362957593412034 +22.23292921806610777935 +22.15927797268507504214 +22.08586892075944874136 +22.01270109431903421182 +21.93977353007683106512 +21.86708526941069408167 +21.79463535834159770843 +21.72242284751629526340 +21.65044679218575396362 +21.57870625218719240479 +21.50720029192404680884 +21.43592798034608648550 +21.36488839093130565061 +21.29408060166526439616 +21.22350369502323985671 +21.15315675795033101281 +21.08303888184257601779 +21.01314916252748332681 +20.94348670024567482528 +20.87405059963178999283 +20.80483996969570625879 +20.73585392380362080189 +20.66709157965911813903 +20.59855205928473864674 +20.53023448900308878251 +20.46213799941875421950 +20.39426172539945980589 +20.32660480605775532581 +20.25916638473176334401 +20.19194560896845658249 +20.12494163050359929912 +20.05815360524501400619 +19.99158069325298470176 +19.92522205872349871925 +19.85907686996920773481 +19.79314429940156827570 +19.72742352351281880374 +19.66191372285851812762 +19.59661408203928090188 +19.53152378968299984763 +19.46664203842717100201 +19.40196802490081040560 +19.33750094970717370302 +19.27324001740620573742 +19.20918443649675921847 +19.14533341939927524322 +19.08168618243819736335 +19.01824194582424709665 +18.95499993363764090759 +18.89195937381044032577 +18.82911949810976892650 +18.76647954212016600195 +18.70403874522585851992 +18.64179635059531037200 +18.57975160516241786013 +18.51790375961096302149 +18.45625206835622833523 +18.39479578952963123584 +18.33353418496087172684 +18.27246652016118133588 +18.21159206430680299604 +18.15091009022244605831 +18.09041987436447840309 +18.03012069680442763797 +17.97001184121180017428 +17.91009259483877258390 +17.85036224850227526417 +17.79082009656920604357 +17.73146543693870214042 +17.67229757102674980729 +17.61331580374914196341 +17.55451944350607718093 +17.49590780216510665923 +17.43748019504608848251 +17.37923594090425893910 +17.32117436191430215331 +17.26329478365510894378 +17.20559653509252484582 +17.14807894856511083503 +17.09074135976673858295 +17.03358310773184314257 +16.97660353481965600508 +16.91980198669748602924 +16.86317781232654766654 +16.80673036394488306655 +16.75045899705314766948 +16.69436307039816114184 +16.63844194595804992787 +16.58269498892606819140 +16.52712156769623064179 +16.47172105384681017881 +16.41649282212636506983 +16.36143625043737515057 +16.30655071982189596724 +16.25183561444548985264 +16.19729032158305770395 +16.14291423160304006501 +16.08870673795299310882 +16.03466723714439368109 +15.98079512873708907250 +15.92708981532582690477 +15.87355070252360711436 +15.82017719894874829833 +15.76696871620847240081 +15.71392466888532801761 +15.66104447452220682635 +15.60832755360723389515 +15.55577332955996183728 +15.50338122871606394426 +15.45115068031363136924 +15.39908111647791599808 +15.34717197220775020128 +15.29542268536014759661 +15.24383269663702122898 +15.19240144956993177061 +15.14112839050673287034 +15.09001296859686291896 +15.03905463577716261625 +14.98825284675780267207 +14.93760705900810847879 +14.88711673274297631053 +14.83678133090830364438 +14.78660031916758654802 +14.73657316588691479353 +14.68669934212278604946 +14.63697832160647571698 +14.58740958073171611886 +14.53799259853974668033 +14.48872685670651883072 +14.43961183952866633717 +14.39064703390945254569 +14.34183192934566442034 +14.29316601791399499177 +14.24464879425748620179 +14.19627975557195043166 +14.14805840159260341693 +14.09998423458029748190 +14.05205675930868913781 +14.00427548305060199141 +13.95663991556495453494 +13.90914956908329891405 +13.86180395829665101814 +13.81460260034216958047 +13.76754501478999692665 +13.72063072363071967175 +13.67385925126164991639 +13.62723012447436232719 +13.58074287244071420844 +13.53439702670080535540 +13.48819212115028243204 +13.44212769202608726005 +13.39620327789511300409 +13.35041841964064701642 +13.30477266044970363623 +13.25926554580005856110 +13.21389662344788717974 +13.16866544341509026594 +13.12357155797656282914 +13.07861452164755000638 +13.03379389117123388075 +12.98910922550588864510 +12.94456008581259354173 +12.90014603544306659444 +12.85586663992686418112 +12.81172146695925206927 +12.76771008638832682891 +12.72383207020356366002 +12.68008699252260385038 +12.63647442957995892243 +12.59299395971407875550 +12.54964516335525637203 +12.50642762301411003989 +12.46334092326842402088 +12.42038465075223818701 +12.37755839414279002142 +12.33486174414917968534 +12.29229429350034052959 +12.24985563693253709516 +12.20754537117821314496 +12.16536309495338663567 +12.12330840894665939800 +12.08138091580655881785 +12.03958022013054574018 +11.99790592845237569009 +11.95635764923133947946 +11.91493499283977897107 +11.87363757155208965344 +11.83246499953275154837 +11.79141689282494454005 +11.75049286933852954462 +11.70969254883932109124 +11.66901555293676828740 +11.62846150507332332324 +11.58803003051247593191 +11.54772075632717331928 +11.50753331138946222723 +11.46746732635771337527 +11.42752243366685860337 +11.38769826751585867441 +11.34799446385714816188 +11.30841066038559894480 +11.26894649652642499404 +11.22960161342528628836 +11.19037565393592714713 +11.15126826261032455534 +11.11227908568660183164 +11.07340777107880569474 +11.03465396836517165013 +10.99601732877788151654 +10.95749750519143361771 +10.91909415211253886469 +10.88080692566858154180 +10.84263548359723827730 +10.80457948523523192819 +10.76663859150771784812 +10.72881246491787621267 +10.69110076953577248560 +10.65350317098798882398 +10.61601933644642237198 +10.57864893461802680008 +10.54139163573473503277 +10.50424711154151324877 +10.46721503528724817045 +10.43029508171343167078 +10.39348692704386678543 +10.35679024897399536087 +10.32020472666075150414 +10.28373004071205620846 +10.24736587317652869444 +10.21111190753290109967 +10.17496782868001403699 +10.13893332292598969957 +10.10300807797845124014 +10.06719178293418970327 +10.03148412826892688088 +9.99588480582706040423 +9.96039350881153140449 +9.92500993177359802644 +9.88973377060275105066 +9.85456472251688531117 +9.81950248605217801412 +9.78454676105256915264 +9.74969724866047648959 +9.71495365130618182548 +9.68031567269857617930 +9.64578301781432756457 +9.61135539288891571630 +9.57703250540628836518 +9.54281406408902377336 +9.50869977888848261216 +9.47468936097505576299 +9.44078252272860396488 +9.40697897772853508513 +9.37327844074409988195 +9.33968062772465934529 +9.30618525579000355208 +9.27279204322080907730 +9.23950070944900581082 +9.20631097504825568478 +9.17322256172422889620 +9.14023519230520520296 +9.10734859073229507942 +9.07456248205018667363 +9.04187659239774532693 +9.00929064899855625015 +8.97680438015105686134 +8.94441751521991434970 +8.91212978462575300398 +8.87994091983676625546 +8.84785065335858433855 +8.81585871872540671745 +8.78396485049084319030 +8.75216878421804267418 +8.72047025647126794468 +8.68886900480589652318 +8.65736476776005225986 +8.62595728484475010589 +8.59464629653532341536 +8.56343154426165931170 +8.53231277039987467958 +8.50128971826251955690 +8.47036213209016608516 +8.43952975704201513452 +8.40879233918707491569 +8.37814962549483333021 +8.34760136382694817314 +8.31714730292758197550 +8.28678719241522010464 +8.25652078277331114009 +8.22634782534128561338 +8.19626807230642562274 +8.16628127669416237211 +8.13638719235975393929 +8.10658557397975165770 +8.07687617704266003216 +8.04725875784081168263 +8.01773307346088515146 +7.98829888177617863931 +7.95895594143695994660 +7.92970401186277840111 +7.90054285323308214117 +7.87147222647914279747 +7.84249189327493834156 +7.81360161602920300083 +7.78480115787626214541 +7.75609028266817279729 +7.72746875496568552677 +7.69893634003021709589 +7.67049280381476883406 +7.64213791295626965194 +7.61387143476643579731 +7.58569313722407567724 +7.55760278896597537113 +7.52960015927931181068 +7.50168501809252852297 +7.47385713596797796043 +7.44611628409241887994 +7.41846223426991713268 +7.39089475891295855092 +7.36341363103434876081 +7.33601862423889272691 +7.30870951271533009219 +7.28148607122818969373 +7.25434807510966450650 +7.22729530025127608894 +7.20032752309605861285 +7.17344452063001902786 +7.14664607037442234372 +7.11993195037771364753 +7.09330193920742946290 +7.06675581594214019532 +7.04029336016347695448 +7.01391435194803669617 +6.98761857185952628413 +6.96140580094091632191 +6.93527582070653814128 +6.90922841313373936600 +6.88326336065562927047 +6.85738044615259934034 +6.83157945294510060563 +6.80586016478512156880 +6.78022236584899218315 +6.75466584072930853466 +6.72919037442714085273 +6.70379575234422464547 +6.67848176027529039089 +6.65324818440049536861 +6.62809481127747890383 +6.60302142783385281888 +6.57802782135940677932 +6.55311377949839712898 +6.52827909024202757138 +6.50352354192092629859 +6.47884692319739841082 +6.45424902305781067469 +6.42972963080527737390 +6.40528853605165693352 +6.38092552871034968121 +6.35664039898878918677 +6.33243293738106771684 +6.30830293465987335111 +6.28425018186973005641 +6.26027447031907957609 +6.23637559157296639256 +6.21255333744590743095 +6.18880749999402812733 +6.16513787150815328886 +6.14154424450582325790 +6.11802641172475336617 +6.09458416611468045687 +6.07121730083077260076 +6.04792560922579891525 +6.02470888484323996437 +6.00156692140958547554 +5.97849951282755753823 +5.95550645316841542609 +5.93258753666522320458 +5.90974255770523093645 +5.88697131082305435967 +5.86427359069299036776 +5.84164919212249600378 +5.81909791004442844553 +5.79661953951059860657 +5.77421387568387167732 +5.75188071383186727559 +5.72961984931922962971 +5.70743107760103818293 +5.68531419421539041537 +5.66326899477674405858 +5.64129527496852567481 +5.61939283053656346567 +5.59756145728145337870 +5.57580095105238093822 +5.55411110773941363306 +5.53249172326721350146 +5.51094259358762350587 +5.48946351467313586880 +5.46805428250948999391 +5.44671469308945610521 +5.42544454240523421618 +5.40424362644235145581 +5.38311174117221646895 +5.36204868254571298536 +5.34105424648595494830 +5.32012822888201863947 +5.29927042558162586516 +5.27848063238497111627 +5.25775864503717649256 +5.23710425922250077946 +5.21651727055678193778 +5.19599747458128735644 +5.17554466675557378608 +5.15515864245124966203 +5.13483919694497537023 +5.11458612541205592805 +5.09439922291944480293 +5.07427828441942985194 +5.05422310474293823290 +5.03423347859298964124 +5.01430920053793371949 +4.99445006500510757519 +4.97465586627397904351 +4.95492639846981841600 +4.93526145555716677649 +4.91566083133328746158 +4.89612431942163262022 +4.87665171326536128760 +4.85724280612072334407 +4.83789739105076854742 +4.81861526091889658119 +4.79939620838244085377 +4.78024002588592189511 +4.76114650565510100222 +4.74211543969009863275 +4.72314661975954841466 +4.70423983739356188494 +4.68539488387796154711 +4.66661155024767460020 +4.64788962728035315308 +4.62922890549002552518 +4.61062917514020753629 +4.59209022663705734857 +4.57361185114222568160 +4.55519384066701071845 +4.53683598806882315557 +4.51853808704783332928 +4.50029993214360324316 +4.48212131873169106200 +4.46400204302031600179 +4.44594190204681005696 +4.42794069367450848773 +4.40999821658904878063 +4.39211427029530998567 +4.37428865511413711431 +4.35652117217868184440 +4.33881162343158699457 +4.32115981162132278826 +4.30356554029891924529 +4.28602861381483890568 +4.26854883731575718286 +4.25112601674120060835 +4.23375995882040356832 +4.21645047106900605627 +4.19919736178581715080 +4.18200044004960247435 +4.16485951571620738321 +4.14777439941494918685 +4.13074490254580073412 +4.11377083727588388484 +4.09685201653668684685 +4.07998825402062337275 +4.06317936417819591810 +4.04642516221464010329 +4.02972546408708254262 +4.01308008650106629034 +3.99648884690794803376 +3.97995156350134271506 +3.96346805521462597355 +3.94703814171723355031 +3.93066164341228230228 +3.91433838143302592627 +3.89806817764023350037 +3.88185085461871937085 +3.86568623567496372218 +3.84957414483366155977 +3.83351440683490052308 +3.81750684713114818436 +3.80155129188450358058 +3.78564756796326129518 +3.76979550293976650721 +3.75399492508676724256 +3.73824566337486929868 +3.72254754746950533573 +3.70690040772821305382 +3.69130407519738401589 +3.67575838160998769055 +3.66026315938213198109 +3.64481824161056877642 +3.62942346206962040966 +3.61407865520867588316 +3.59878365614883088952 +3.58353830068085166261 +3.56834242526148059937 +3.55319586701142142715 +3.53809846371210445781 +3.52305005380314728569 +3.50805047637920619508 +3.49309957118790581632 +3.47819717862642985295 +3.46334313973919227791 +3.44853729621486682078 +3.43377949038392538128 +3.41906956521554139528 +3.40440736431544843654 +3.38979273192279340066 +3.37522551290764560861 +3.36070555276831139935 +3.34623269762852126874 +3.33180679423504999548 +3.31742768995507253393 +3.30309523277318595191 +3.28880927128913658208 +3.27456965471505290211 +3.26037623287272149142 +3.24622885619139189828 +3.23212737570472352644 +3.21807164304855142234 +3.20406151045813736289 +3.19009683076566785687 +3.17617745739761048185 +3.16230324437229226575 +3.14847404629747007476 +3.13468971836748266924 +3.12095011636097785512 +3.10725509663837140550 +3.09360451613915499181 +3.07999823237970105083 +3.06643610345069017598 +3.05291798801451275125 +3.03944374530283978331 +3.02601323511433095703 +3.01262631781184930801 +2.99928285432041441538 +2.98598270612453697836 +2.97272573526585226489 +2.95951180434068339409 +2.94634077649766634721 +2.93321251543517336202 +2.92012688539923459530 +2.90708375118108364177 +2.89408297811452941417 +2.88112443207374191445 +2.86820797947108729886 +2.85533348725429103609 +2.84250082290470018620 +2.82970985443447808905 +2.81696045038452380638 +2.80425247982200964714 +2.79158581233818514633 +2.77896031804590348813 +2.76637586757753739519 +2.75383233208263566993 +2.74132958322552466868 +2.72886749318308741152 +2.71644593464259775928 +2.70406478079921042124 +2.69172390535415706481 +2.67942318251197519885 +2.66716248697868207884 +2.65494169395926915556 +2.64276067915576362566 +2.63061931876456966961 +2.61851748947485685193 +2.60645506846588848049 +2.59443193340502542554 +2.58244796244547014652 +2.57050303422421055899 +2.55859702785956555360 +2.54672982294951033566 +2.53490129956898524455 +2.52311133826816647030 +2.51135982007002578342 +2.49964662646846402794 +2.48797163942581001095 +2.47633474137119069525 +2.46473581519807138918 +2.45317474426220405448 +2.44165141237957339371 +2.43016570382437402387 +2.41871750332662127647 +2.40730669607066571913 +2.39593316769243136477 +2.38459680427784492807 +2.37329749236053766381 +2.36203511891993533922 +2.35080957137897694764 +2.33962073760247912801 +2.32846850589471099369 +2.31735276499759867974 +2.30627340408855285858 +2.29523031277870881439 +2.28422338111049860743 +2.27325249955613850616 +2.26231755901529840713 +2.25141845081328284550 +2.24055506669896198346 +2.22972729884288023428 +2.21893503983507978106 +2.20817818268354981726 +2.19745662081191106552 +2.18677024805753283943 +2.17611895866978866110 +2.16550264730784869371 +2.15492120903892159234 +2.14437453933634047942 +2.13386253407759829415 +2.12338508954243465610 +2.11294210241095781200 +2.10253346976164179338 +2.09215908906957848146 +2.08181885820468215442 +2.07151267542953654299 +2.06124043939760737132 +2.05100204915159878283 +2.04079740412120314019 +2.03062640412165684722 +2.02048894935161715836 +2.01038494039141379943 +2.00031427820122376104 +1.99027686411919546572 +1.98027259985959358524 +1.97030138751108419015 +1.96036312953494529232 +1.95045772876311973576 +1.94058508839641286059 +1.93074511200292708857 +1.92093770351588966072 +1.91116276723226841128 +1.90142020781075071767 +1.89170993027001510534 +1.88203183998705636526 +1.87238584269527397197 +1.86277184448273191997 +1.85318975179055267510 +1.84363947141113526662 +1.83412091048631231693 +1.82463397650560144037 +1.81517857730469578392 +1.80575462106338546775 +1.79636201630420533348 +1.78700067189054823125 +1.77767049702493151742 +1.76837140124735503477 +1.75910329443359714219 +1.74986608679341504313 +1.74065968886904598456 +1.73148401153352171633 +1.72233896598879043793 +1.71322446376413539681 +1.70414041671469851380 +1.69508673701949108548 +1.68606333717999401500 +1.67707013001846383382 +1.66810702867622473455 +1.65917394661199990580 +1.65027079760044181889 +1.64139749573032767138 +1.63255395540302039592 +1.62374009133083840872 +1.61495581853546421591 +1.60620105234627330582 +1.59747570839881780635 +1.58877970263314005628 +1.58011295129221873701 +1.57147537092039635276 +1.56286687836183113554 +1.55428739075876776177 +1.54573682555014113582 +1.53721510046991416409 +1.52872213354547925590 +1.52025784309623257506 +1.51182214773189538271 +1.50341496635100058121 +1.49503621813931708573 +1.48668582256841652622 +1.47836369939402945128 +1.47006976865454674908 +1.46180395066952550920 +1.45356616603808941335 +1.44535633563751497732 +1.43717438062162128354 +1.42902022241934067992 +1.42089378273317823442 +1.41279498353768517838 +1.40472374707803537852 +1.39667999586845836824 +1.38866365269085800804 +1.38067464059317535074 +1.37271288288808657185 +1.36477830315138271011 +1.35687082522062851808 +1.34899037319362280485 +1.34113687142691473397 +1.33331024453445112776 +1.32551041738603569975 +1.31773731510593083982 +1.30999086307141920926 +1.30227098691126830232 +1.29457761250450964496 +1.28691066597876235811 +1.27927007370901235639 +1.27165576231605936819 +1.26406765866518533414 +1.25650568986469868271 +1.24896978326451413288 +1.24145986645482642174 +1.23397586726463770468 +1.22651771376034535166 +1.21908533424447917959 +1.21167865725410606181 +1.20429761155973547027 +1.19694212616361972401 +1.18961213029863821511 +1.18230755342678017783 +1.17502832523783196095 +1.16777437564805741665 +1.16054563479871553078 +1.15334203305484495061 +1.14616350100384067900 +1.13900996945408339300 +1.13188136943371553400 +1.12477763218910653542 +1.11769868918377812683 +1.11064447209679428852 +1.10361491282167967221 +1.09660994346492679519 +1.08962949634477701544 +1.08267350398986650362 +1.07574189913789197703 +1.06883461473434415723 +1.06195158393124877705 +1.05509274008572528913 +1.04825801675883778508 +1.04144734771417746266 +1.03466066691672908817 +1.02789790853141926874 +1.02115900692196315269 +1.01444389664950085361 +1.00775251247139419064 +1.00108478933990907578 +0.99444066240094930453 +0.98782006699283797513 +0.98122293864503296046 +0.97464921307683927143 +0.96809882619617182442 +0.96157171409840669352 +0.95506781306495758255 +0.94858705956219147026 +0.94212939024011499445 +0.93569474193113832960 +0.92928305164888735934 +0.92289425658694790311 +0.91652829411762581913 +0.91018510179079237243 +0.90386461733252509987 +0.89756677864414657897 +0.89129152380072285133 +0.88503879105007021710 +0.87880851881144506077 +0.87260064567438710981 +0.86641511039754504075 +0.86025185190739528185 +0.85411080929715310628 +0.84799192182553773112 +0.84189512891556694818 +0.83582037015346000164 +0.82976758528733707276 +0.82373671422620298177 +0.81772769703860670454 +0.81174047395161841312 +0.80577498534958547083 +0.79983117177300588896 +0.79390897391737536015 +0.78800833263197334055 +0.78212918891879468219 +0.77627148393139688842 +0.77043515897365399958 +0.76462015549876305442 +0.75882641510797066431 +0.75305387954955094187 +0.74730249071757604007 +0.74157219065090762555 +0.73586292153191912302 +0.73017462568551061430 +0.72450724557788859226 +0.71886072381555321531 +0.71323500314409893353 +0.70763002644711081590 +0.70204573674512216197 +0.69648207719443289143 +0.69093899108606715576 +0.68541642184467743704 +0.67991431302734151032 +0.67443260832266649363 +0.66897125154948278158 +0.66353018665595009384 +0.65810935771832990149 +0.65270870893999721751 +0.64732818465031349842 +0.64196772930356504894 +0.63662728747791175188 +0.63130680387430915257 +0.62600622331538857690 +0.62072549074449956397 +0.61546455122451737552 +0.61022334993696414340 +0.60500183218075576086 +0.59979994337128783588 +0.59461762903933801372 +0.58945483483001104297 +0.58431150650175722738 +0.57918758992521701678 +0.57408303108230540612 +0.56899777606510193451 +0.56393177107482228561 +0.55888496242086282972 +0.55385729651964199505 +0.54884871989368855250 +0.54385917917059034554 +0.53888862108196466938 +0.53393699246242709577 +0.52900424024861358863 +0.52409031147815476892 +0.51919515328863630188 +0.51431871291666575452 +0.50946093769677991414 +0.50462177506054473053 +0.49980117253544098510 +0.49499907774399420912 +0.49021543840265607850 +0.48545020232094249213 +0.48070331740034394352 +0.47597473163337389312 +0.47126439310261208915 +0.46657224997968954616 +0.46189825052433541863 +0.45724234308338790322 +0.45260447608980386436 +0.44798459806177093334 +0.44338265760159528694 +0.43879860339490395216 +0.43423238420953458316 +0.42968394889468874975 +0.42515324637991480650 +0.42064022567412684417 +0.41614483586475065069 +0.41166702611668548606 +0.40720674567135267674 +0.40276394384584079944 +0.39833857003182343570 +0.39393057369480499741 +0.38953990437297092431 +0.38516651167641718922 +0.38081034528610835377 +0.37647135495306194297 +0.37214949049728890396 +0.36784470180693601415 +0.36355693883737844052 +0.35928615161027105396 +0.35503229021261462073 +0.35079530479585468994 +0.34657514557494945029 +0.34237176282754006040 +0.33818510689289132953 +0.33401512817111589371 +0.32986177712218645031 +0.32572500426509526372 +0.32160476017688544026 +0.31750099549182708714 +0.31341366090041961057 +0.30934270714861605844 +0.30528808503683646514 +0.30124974541910048975 +0.29722763920215905520 +0.29322171734462348924 +0.28923193085601067720 +0.28525823079593842779 +0.28130056827316807233 +0.27735889444484157496 +0.27343316051546306955 +0.26952331773614501831 +0.26562931740366507727 +0.26175111085960772739 +0.25788864948954270950 +0.25404188472211586269 +0.25021076802817870943 +0.24639525091996333783 +0.24259528495018267691 +0.23881082171119830115 +0.23504181283420824689 +0.23128820998829366373 +0.22754996487962880769 +0.22382702925064526522 +0.22011935487918735110 +0.21642689357759026247 +0.21274959719190841834 +0.20908741760109805785 +0.20544030671609270211 +0.20180821647903146587 +0.19819109886240146579 +0.19458890586818811119 +0.19100158952712262272 +0.18742910189771386231 +0.18387139506558175528 +0.18032842114247765730 +0.17680013226560251094 +0.17328648059666129644 +0.16978741832112848043 +0.16630289764739022984 +0.16283287080595698626 +0.15937729004861825310 +0.15593610764765009069 +0.15250927589498011749 +0.14909674710142983844 +0.14569847359588250502 +0.14231440772443651466 +0.13894450184964590722 +0.13558870834975594866 +0.13224697961780521038 +0.12891926806418882445 +0.12560552617021522592 +0.12230570656116336592 +0.11901976201549462064 +0.11574764546443649937 +0.11248930999139464260 +0.10924470883149571543 +0.10601379537111199625 +0.10279652314728171536 +0.09959284584731471768 +0.09640271730819173490 +0.09322609151612935852 +0.09006292260612240586 +0.08691316486130810925 +0.08377677271271159742 +0.08065370073848945887 +0.07754390366367849841 +0.07444733635955638751 +0.07136395384321385371 +0.06829371127712473288 +0.06523656396854136952 +0.06219246736916411028 +0.05916137707454408728 +0.05614324882366601016 +0.05313803849850472216 +0.05014570212346302486 +0.04716619586502609346 +0.04419947603113642126 +0.04124549907091006051 +0.03830422157401116440 +0.03537560027031150245 +0.03245959202934081689 +0.02955615385985960533 +0.02666524290943977221 +0.02378681646396064997 +0.02092083194715501845 +0.01806724692017725592 +0.01522601908113094087 +0.01239710626466902950 +0.00958046644147678324 +0.00677605771786358307 +0.00398383833530616821 +0.00120376667004638100 +-0.00156419876744263520 +-0.00432009933278203542 +-0.00706397624823543006 +-0.00979587060305073948 +-0.01251582335397210741 +-0.01522387532563447034 +-0.01792006721099659305 +-0.02060443957180051189 +-0.02327703283894178021 +-0.02593788731297356695 +-0.02858704316449516697 +-0.03122454043455262854 +-0.03385041903509006939 +-0.03646471874939912622 +-0.03906747923250309534 +-0.04165874001155958628 +-0.04423854048632793606 +-0.04680691992956353964 +-0.04936391748739366730 +-0.05190957217982962446 +-0.05444392290106098153 +-0.05696700841995743642 +-0.05947886738040953497 +-0.06197953830180393670 +-0.06446905957939044751 +-0.06694746948468353887 +-0.06941480616585349317 +-0.07187110764819920616 +-0.07431641183446550947 +-0.07675075650530546745 +-0.07917417931960950284 +-0.08158671781497751907 +-0.08398840940807239530 +-0.08637929139502827092 +-0.08875940095180953615 +-0.09112877513466594026 +-0.09348745088044209395 +-0.09583546500706885407 +-0.09817285421382720978 +-0.10049965508184756369 +-0.10281590407442217638 +-0.10512163753742814754 +-0.10741689169966583961 +-0.10970170267329171221 +-0.11197610645416224140 +-0.11424013892222927014 +-0.11649383584190589613 +-0.11873723286242815478 +-0.12097036551826791106 +-0.12319326922949774827 +-0.12540597930210645172 +-0.12760853092845811374 +-0.12980095918756545670 +-0.13198329904556924119 +-0.13415558535598773315 +-0.13631785286017905623 +-0.13847013618761275233 +-0.14061246985633521489 +-0.14274488827326337059 +-0.14486742573452937588 +-0.14698011642592240245 +-0.14908299442314557059 +-0.15117609369225687432 +-0.15325944808998118174 +-0.15533309136404252482 +-0.15739705715360799432 +-0.15945137898951941557 +-0.16149609029474054633 +-0.16353122438464182120 +-0.16555681446739253793 +-0.16757289364429872602 +-0.16957949491010682053 +-0.17157665115342835005 +-0.17356439515698604548 +-0.17554275959805210050 +-0.17751177704872680985 +-0.17947147997628587479 +-0.18142190074354788698 +-0.18336307160916195946 +-0.18529502472803049962 +-0.18721779215153122600 +-0.18913140582794707445 +-0.19103589760273467779 +-0.19293129921890370126 +-0.19481764231732984216 +-0.19669495843704906668 +-0.19856327901566192540 +-0.20042263538956769930 +-0.20227305879440529712 +-0.20411458036525056969 +-0.20594723113703702899 +-0.20777104204484417305 +-0.20958604392420171481 +-0.21139226751144571392 +-0.21318974344401100951 +-0.21497850226076295477 +-0.21675857440232867979 +-0.21852999021136415569 +-0.22029277993293666649 +-0.22204697371475282108 +-0.22379260160759861797 +-0.22552969356551105795 +-0.22725827944619389487 +-0.22897838901125933120 +-0.23069005192658134651 +-0.23239329776260334026 +-0.23408815599460125467 +-0.23577465600302294213 +-0.23745282707380005460 +-0.23912269839864266907 +-0.24078429907533391297 +-0.24243765810802209160 +-0.24408280440755494856 +-0.24571976679175877578 +-0.24734857398574316978 +-0.24896925462216304425 +-0.25058183724160032479 +-0.25218635029275199289 +-0.25378282213281466717 +-0.25537128102774170335 +-0.25695175515250689990 +-0.25852427259146554261 +-0.26008886133857000988 +-0.26164554929771965952 +-0.26319436428302539488 +-0.26473533401906462759 +-0.26626848614125603332 +-0.26779384819603885282 +-0.26931144764124426150 +-0.27082131184630986453 +-0.27232346809262492071 +-0.27381794357379035665 +-0.27530476539586473672 +-0.27678396057768550609 +-0.27825555605114415947 +-0.27971957866145158444 +-0.28117605516742993910 +-0.28262501224175445858 +-0.28406647647127730716 +-0.28550047435727277101 +-0.28692703231571697886 +-0.28834617667756068382 +-0.28975793368898583591 +-0.29116232951171738819 +-0.29255939022326388210 +-0.29394914181716502721 +-0.29533161020331738511 +-0.29670682120817393201 +-0.29807480057509455618 +-0.29943557396451581099 +-0.30078916695428548067 +-0.30213560503991160333 +-0.30347491363478723558 +-0.30480711807051258377 +-0.30613224359710716760 +-0.30745031538329886667 +-0.30876135851677649624 +-0.31006539800442711741 +-0.31136245877263807325 +-0.31265256566748467204 +-0.31393574345508573620 +-0.31521201682176597236 +-0.31648141037435584266 +-0.31774394864041449749 +-0.31899965606852659361 +-0.32024855702853638473 +-0.32149067581176415942 +-0.32272603663130966511 +-0.32395466362225028290 +-0.32517658084195605328 +-0.32639181227025237941 +-0.32760038180974154765 +-0.32880231328599379692 +-0.32999763044783342325 +-0.33118635696757131592 +-0.33236851644121445659 +-0.33354413238877494985 +-0.33471322825443605709 +-0.33587582740685795191 +-0.33703195313939265931 +-0.33818162867028311869 +-0.33932487714301817761 +-0.34046172162639154468 +-0.34159218511493211201 +-0.34271629052899305057 +-0.34383406071505984158 +-0.34494551844597987067 +-0.34605068642115610622 +-0.34714958726684025381 +-0.34824224353630184314 +-0.34932867771011111291 +-0.35040891219635977860 +-0.35148296933085226845 +-0.35255087137738905234 +-0.35361264052794638690 +-0.35466829890297124628 +-0.35571786855151082962 +-0.35676137145153813401 +-0.35779882951010105741 +-0.35883026456359862211 +-0.35985569837798464521 +-0.36087515264898434308 +-0.36188864900231482169 +-0.36289620899393654208 +-0.36389785411024871964 +-0.36489360576832025052 +-0.36588348531608178016 +-0.36686751403258704984 +-0.36784571312821834344 +-0.36881810374488571691 +-0.36978470695624826581 +-0.37074554376795654242 +-0.37170063511782552856 +-0.37265000187609986781 +-0.37359366484561479238 +-0.37453164476204964251 +-0.37546396229413336876 +-0.37639063804382189016 +-0.37731169254656488077 +-0.37822714627148151800 +-0.37913701962154966463 +-0.38004133293388925319 +-0.38094010647988368889 +-0.38183336046544991138 +-0.38272111503120048726 +-0.38360339025269624136 +-0.38448020614062433653 +-0.38535158264099039771 +-0.38621753963534621867 +-0.38707809694099759579 +-0.38793327431118890258 +-0.38878309143531092351 +-0.38962756793911523800 +-0.39046672338488153109 +-0.39130057727166678294 +-0.39212914903547002599 +-0.39295245804943729206 +-0.39377052362405651209 +-0.39458336500737778429 +-0.39539100138519800431 +-0.39619345188122867540 +-0.39699073555734065710 +-0.39778287141372803415 +-0.39856987838911567268 +-0.39935177536094706996 +-0.40012858114556548728 +-0.40090031449844165667 +-0.40166699411432016387 +-0.40242863862746380832 +-0.40318526661178499815 +-0.40393689658108511420 +-0.40468354698922315293 +-0.40542523623031084812 +-0.40616198263887842712 +-0.40689380449010048579 +-0.40762071999995713734 +-0.40834274732542868991 +-0.40905990456467244965 +-0.40977220975721628804 +-0.41047968088414815702 +-0.41118233586830243986 +-0.41188019257441033094 +-0.41257326880933270496 +-0.41326158232219201150 +-0.41394515080461852241 +-0.41462399189084719886 +-0.41529812315797964839 +-0.41596756212609836689 +-0.41663232625849411228 +-0.41729243296182866318 +-0.41794789958629241511 +-0.41859874342581943063 +-0.41924498171822782711 +-0.41988663164542311401 +-0.42052371033357272001 +-0.42115623485324521491 +-0.42178422221965744532 +-0.42240768939274103699 +-0.42302665327745014867 +-0.42364113072380904512 +-0.42425113852716350715 +-0.42485669342833048967 +-0.42545781211375061082 +-0.42605451121569604123 +-0.42664680731239812417 +-0.42723471692825720769 +-0.42781825653399807585 +-0.42839744254681200175 +-0.42897229133056963279 +-0.42954281919594600181 +-0.43010904240063752013 +-0.43067097714946617204 +-0.43122863959460294714 +-0.43178204583569207431 +-0.43233121192003914901 +-0.43287615384277644548 +-0.43341688754700724573 +-0.43395342892397670287 +-0.43448579381325469484 +-0.43501399800287154918 +-0.43553805722950134083 +-0.43605798717859278746 +-0.43657380348456331642 +-0.43708552173094472604 +-0.43759315745054477853 +-0.43809672612559197313 +-0.43859624318792461706 +-0.43909172401911306105 +-0.43958318395065287820 +-0.44007063826409348328 +-0.44055410219120733073 +-0.44103359091415172966 +-0.44150911956560617844 +-0.44198070322895793849 +-0.44244835693841066959 +-0.44291209567918060630 +-0.44337193438764294084 +-0.44382788795145122762 +-0.44427997120974493939 +-0.44472819895324494643 +-0.44517258592445341225 +-0.44561314681778102509 +-0.44604989627968066879 +-0.44648284890884815113 +-0.44691201925630785752 +-0.44733742182563152046 +-0.44775907107302170829 +-0.44817698140750450442 +-0.44859116719105174287 +-0.44900164273874859644 +-0.44940842231892957903 +-0.44981152015332087624 +-0.45021095041718550700 +-0.45060672723949102281 +-0.45099886470302480435 +-0.45138737684456248234 +-0.45177227765498612078 +-0.45215358107945818888 +-0.45253130101754390768 +-0.45290545132335952028 +-0.45327604580571001502 +-0.45364309822824883112 +-0.45400662230958621635 +-0.45436663172347097062 +-0.45472314009889064357 +-0.45507616102024422977 +-0.45542570802746329406 +-0.45577179461615996425 +-0.45611443423775055450 +-0.45645364029961343899 +-0.45678942616522150155 +-0.45712180515427164318 +-0.45745079054282217212 +-0.45777639556343119320 +-0.45809863340530965203 +-0.45841751721443085854 +-0.45873306009367464942 +-0.45904527510297438164 +-0.45935417525942279227 +-0.45965977353745468559 +-0.45996208286891704375 +-0.46026111614326059573 +-0.46055688620762114116 +-0.46084940586700318121 +-0.46113868788437750723 +-0.46142474498080798817 +-0.46170758983561499544 +-0.46198723508646799552 +-0.46226369332954619917 +-0.46253697711966129669 +-0.46280709897035537947 +-0.46307407135409872634 +-0.46333790670232466447 +-0.46359861740565400101 +-0.46385621581394725910 +-0.46411071423647515255 +-0.46436212494203649159 +-0.46461046015906093398 +-0.46485573207577601806 +-0.46509795284029464835 +-0.46533713456076541970 +-0.46557328930549385371 +-0.46580642910304986826 +-0.46603656594241427147 +-0.46626371177307424087 +-0.46648787850519624065 +-0.46670907800968691737 +-0.46692732211836363021 +-0.46714262262404415704 +-0.46735499128069657448 +-0.46756443980354428502 +-0.46777097986918653172 +-0.46797462311571591531 +-0.46817538114285200956 +-0.46837326551206664993 +-0.46856828774666753334 +-0.46876045933195303883 +-0.46894979171532108486 +-0.46913629630637043721 +-0.46931998447705475241 +-0.46950086756175568592 +-0.46967895685743793477 +-0.46985426362374999032 +-0.47002679908313305113 +-0.47019657442095291744 +-0.47036360078560063291 +-0.47052788928863370499 +-0.47068945100485137800 +-0.47084829697244584557 +-0.47100443819308956961 +-0.47115788563207083861 +-0.47130865021840029350 +-0.47145674284491373429 +-0.47160217436838913763 +-0.47174495560967377727 +-0.47188509735378103560 +-0.47202261035001163991 +-0.47215750531204808693 +-0.47228979291809181085 +-0.47241948381094156506 +-0.47254658859814957506 +-0.47267111785207671648 +-0.47279308211004950069 +-0.47291249187443595847 +-0.47302935761277403737 +-0.47314368975788084759 +-0.47325549870794164642 +-0.47336479482664300944 +-0.47347158844325676341 +-0.47357588985277088156 +-0.47367770931598046635 +-0.47377705705958661486 +-0.47387394327633963753 +-0.47396837812509506893 +-0.47406037173096343684 +-0.47414993418537720871 +-0.47423707554623328875 +-0.47432180583796962337 +-0.47440413505168138597 +-0.47448407314521828804 +-0.47456163004330176314 +-0.47463681563761089821 +-0.47470963978690666751 +-0.47478011231710287587 +-0.47484824302140266061 +-0.47491404166038025947 +-0.47497751796209353170 +-0.47503868162216950077 +-0.47509754230391942897 +-0.47515410963844101344 +-0.47520839322471580823 +-0.47526040262969321271 +-0.47531014738842336520 +-0.47535763700411698407 +-0.47540288094829052934 +-0.47544588866081849421 +-0.47548666955006413382 +-0.47552523299297116965 +-0.47556158833514261541 +-0.47559574489097145022 +-0.47562771194370540018 +-0.47565749874557111676 +-0.47568511451785361333 +-0.47571056845099579657 +-0.47573386970470410429 +-0.47575502740802211310 +-0.47577405065946304363 +-0.47579094852707071173 +-0.47580573004852522168 +-0.47581840423123850092 +-0.47582898005245644057 +-0.47583746645934860142 +-0.47584387236908509689 +-0.47584820666896210373 +-0.47585047821645848343 +-0.47585069583937444904 +-0.47584886833587092259 +-0.47584500447460470474 +-0.47583911299479608736 +-0.47583120260633354759 +-0.47582128198986578527 +-0.47580935979687410953 +-0.47579544464979250940 +-0.47577954514206799441 +-0.47576166983827783419 +-0.47574182727420827321 +-0.47572002595692736149 +-0.47569627436492173400 +-0.47567058094811509594 +-0.47564295412803581087 +-0.47561340229784154765 +-0.47558193382244146052 +-0.47554855703858306404 +-0.47551328025491845786 +-0.47547611175212195489 +-0.47543705978294714676 +-0.47539613257234064614 +-0.47535333831751608313 +-0.47530868518803287559 +-0.47526218132590325460 +-0.47521383484565077326 +-0.47516365383443487369 +-0.47511164635208907869 +-0.47505782043124683556 +-0.47500218407739747128 +-0.47494474526899393974 +-0.47488551195752265466 +-0.47482449206758936544 +-0.47476169349700308997 +-0.47469712411686620923 +-0.47463079177165629075 +-0.47456270427930252742 +-0.47449286943126839367 +-0.47442129499264434900 +-0.47434798870222166789 +-0.47427295827258042493 +-0.47419621139015977196 +-0.47411775571535830220 +-0.47403759888259067168 +-0.47395574850039667858 +-0.47387221215150554521 +-0.47378699739290780490 +-0.47370011175596299369 +-0.47361156274644666819 +-0.47352135784466198309 +-0.47342950450550042030 +-0.47333601015851273219 +-0.47324088220802551508 +-0.47314412803316996392 +-0.47304575498800310873 +-0.47294577040155338921 +-0.47284418157792751369 +-0.47274099579637135493 +-0.47263622031134638890 +-0.47252986235261174031 +-0.47242192912530622806 +-0.47231242781001969711 +-0.47220136556286845808 +-0.47208874951557683319 +-0.47197458677554166018 +-0.47185888442592721637 +-0.47174164952572827936 +-0.47162288910984379031 +-0.47150261018915690103 +-0.47138081975061141282 +-0.47125752475728410751 +-0.47113273214846695947 +-0.47100644883971809485 +-0.47087868172296482028 +-0.47074943766656379696 +-0.47061872351537614723 +-0.47048654609083068179 +-0.47035291219102315363 +-0.47021782859075650363 +-0.47008130204164411126 +-0.46994333927215808933 +-0.46980394698771887896 +-0.46966313187075742208 +-0.46952090058079598567 +-0.46937725975450123039 +-0.46923221600577880164 +-0.46908577592583017291 +-0.46893794608323408069 +-0.46878873302399903800 +-0.46863814327165143059 +-0.46848618332730218583 +-0.46833285966971555103 +-0.46817817875537159900 +-0.46802214701855071599 +-0.46786477087138261810 +-0.46770605670394760356 +-0.46754601088430791656 +-0.46738463975860378152 +-0.46722194965110680487 +-0.46705794686430107676 +-0.46689263767894167989 +-0.46672602835412346778 +-0.46655812512735667097 +-0.46638893421462312983 +-0.46621846181045462076 +-0.46604671408799291932 +-0.46587369719905219467 +-0.46569941727421354516 +-0.46552388042283704417 +-0.46534709273319452283 +-0.46516906027248117184 +-0.46498978908691085410 +-0.46480928520177622332 +-0.46462755462150556740 +-0.46444460332974102368 +-0.46426043728938942712 +-0.46407506244270291251 +-0.46388848471133425910 +-0.46370070999639712017 +-0.46351174417854718035 +-0.46332159311801940360 +-0.46313026265472828635 +-0.46293775860829433633 +-0.46274408677813477775 +-0.46254925294350646148 +-0.46235326286359129666 +-0.46215612227754226948 +-0.46195783690454950143 +-0.46175841244390236628 +-0.46155785457505954517 +-0.46135616895770542589 +-0.46115336123181183137 +-0.46094943701769680588 +-0.46074440191609250528 +-0.46053826150820631469 +-0.46033102135577991243 +-0.46012268700114244968 +-0.45991326396729220738 +-0.45970275775793195683 +-0.45949117385755006149 +-0.45927851773147176928 +-0.45906479482591527885 +-0.45885001056806518083 +-0.45863417036611087152 +-0.45841727960933620345 +-0.45819934366814729643 +-0.45798036789415291770 +-0.45776035762021782816 +-0.45753931816051418568 +-0.45731725481059731786 +-0.45709417284744041643 +-0.45687007752951686035 +-0.45664497409684556839 +-0.45641886777104628825 +-0.45619176375540976265 +-0.45596366723493497730 +-0.45573458337641836735 +-0.45550451732847530018 +-0.45527347422162472990 +-0.45504145916832550167 +-0.45480847726305251300 +-0.45457453358234090057 +-0.45433963318484255067 +-0.45410378111138516299 +-0.45386698238503225822 +-0.45362924201113130618 +-0.45339056497737867391 +-0.45315095625386253575 +-0.45291042079312787694 +-0.45266896353023322597 +-0.45242658938279933789 +-0.45218330325106148582 +-0.45193911001793940496 +-0.45169401454907043281 +-0.45144802169288478222 +-0.45120113628064201228 +-0.45095336312649764166 +-0.45070470702755299763 +-0.45045517276390933947 +-0.45020476509871204529 +-0.44995348877822310962 +-0.44970134853185700363 +-0.44944834907224689990 +-0.44919449509528330822 +-0.44893979128017602598 +-0.44868424228951020449 +-0.44842785276929281180 +-0.44817062734899887344 +-0.44791257064164391455 +-0.44765368724380399934 +-0.44739398173570754658 +-0.44713345868124781957 +-0.44687212262806491614 +-0.44660997810757258053 +-0.44634702963503064543 +-0.44608328170958372327 +-0.44581873881431122175 +-0.44555340541628735140 +-0.44528728596661970585 +-0.44502038490051176733 +-0.44475270663730492871 +-0.44448425558052490070 +-0.44421503611795420952 +-0.44394505262164168924 +-0.44367430944799868264 +-0.44340281093780831156 +-0.44313056141630285945 +-0.44285756519319824376 +-0.44258382656274591893 +-0.44230934980378550092 +-0.44203413917978601200 +-0.44175819893890444501 +-0.44148153331402861799 +-0.44120414652282036183 +-0.44092604276777574990 +-0.44064722623625862674 +-0.44036770110056838723 +-0.44008747151796123731 +-0.43980654163072374629 +-0.43952491556619893709 +-0.43924259743685034607 +-0.43895959134029988169 +-0.43867590135937506446 +-0.43839153156215726614 +-0.43810648600202800607 +-0.43782076871772546145 +-0.43753438373336922540 +-0.43724733505852664273 +-0.43695962668824428476 +-0.43667126260310945574 +-0.43638224676928449863 +-0.43609258313854953881 +-0.43580227564836154786 +-0.43551132822188981519 +-0.43521974476806152277 +-0.43492752918161292630 +-0.43463468534312182934 +-0.43434121711907536234 +-0.43404712836188663605 +-0.43375242290996252059 +-0.43345710458773201168 +-0.43316117720569985439 +-0.43286464456049222882 +-0.43256751043488778086 +-0.43226977859787901748 +-0.43197145280470178319 +-0.43167253679688771806 +-0.43137303430230566903 +-0.43107294903519921547 +-0.43077228469624134766 +-0.43047104497256344358 +-0.43016923353781594264 +-0.42986685405219254852 +-0.42956391016248574033 +-0.42926040550212263280 +-0.42895634369121332652 +-0.42865172833659020979 +-0.42834656303184376336 +-0.42804085135738140222 +-0.42773459688044773719 +-0.42742780315518547063 +-0.42712047372266792600 +-0.42681261211093601826 +-0.42650422183505781737 +-0.42619530639714497955 +-0.42588586928641442020 +-0.42557591397921767928 +-0.42526544393908854991 +-0.42495446261678249122 +-0.42464297345031143394 +-0.42433097986499013210 +-0.42401848527347890672 +-0.42370549307581778509 +-0.42339200665947335223 +-0.42307802939936772768 +-0.42276356465793152317 +-0.42244861578513753786 +-0.42213318611854161455 +-0.42181727898331744520 +-0.42150089769230209003 +-0.42118404554603477985 +-0.42086672583279693960 +-0.42054894182864305252 +-0.42023069679745178595 +-0.41991199399095258116 +-0.41959283664878083142 +-0.41927322799849514601 +-0.41895317125563480420 +-0.41863266962375006441 +-0.41831172629443552635 +-0.41799034444738042415 +-0.41766852725039582683 +-0.41734627785945832557 +-0.41702359941874839189 +-0.41670049506068174150 +-0.41637696790595457585 +-0.41605302106357788805 +-0.41572865763091315650 +-0.41540388069371525503 +-0.41507869332615954239 +-0.41475309859088760334 +-0.41442709953904238729 +-0.41410069921030701057 +-0.41377390063293068012 +-0.41344670682378370508 +-0.41311912078837093043 +-0.41279114552089590795 +-0.41246278400426833466 +-0.41213403921016378284 +-0.41180491409904235178 +-0.41147541162019585226 +-0.41114553471178211241 +-0.41081528630085240028 +-0.41048466930340021808 +-0.41015368662438261849 +-0.40982234115776877692 +-0.40949063578656630380 +-0.40915857338285671618 +-0.40882615680784323287 +-0.40849338891185799083 +-0.40816027253443404321 +-0.40782681050430708014 +-0.40749300563946933007 +-0.40715886074719803700 +-0.40682437862408676876 +-0.40648956205608927084 +-0.40615441381854033853 +-0.40581893667620366761 +-0.40548313338329761146 +-0.40514700668352843227 +-0.40481055931013043558 +-0.40447379398588956256 +-0.40413671342319462676 +-0.40379932032404824982 +-0.40346161738011848685 +-0.40312360727275969863 +-0.40278529267305612782 +-0.40244667624185065380 +-0.40210776062977288126 +-0.40176854847727722087 +-0.40142904241467741722 +-0.40108924506217702444 +-0.40074915902990071448 +-0.40040878691792464172 +-0.40006813131631840941 +-0.39972719480516322177 +-0.39938597995460178858 +-0.39904448932485214740 +-0.39870272546625090682 +-0.39836069091928183461 +-0.39801838821460983064 +-0.39767581987311090286 +-0.39733298840589997836 +-0.39698989631437286985 +-0.39664654609022342857 +-0.39630294021548939654 +-0.39595908116257527709 +-0.39561497139427997949 +-0.39527061336384333723 +-0.39492600951495643313 +-0.39458116228180983853 +-0.39423607408911059968 +-0.39389074735212675771 +-0.39354518447670827630 +-0.39319938785931812797 +-0.39285335988706560073 +-0.39250710293773610760 +-0.39216061937982249486 +-0.39181391157255140989 +-0.39146698186591827318 +-0.39111983260070948276 +-0.39077246610854315945 +-0.39042488471189051857 +-0.39007709072410728934 +-0.38972908644946369083 +-0.38938087418317651744 +-0.38903245621143567323 +-0.38868383481143570224 +-0.38833501225139832602 +-0.38798599079061218964 +-0.38763677267945395588 +-0.38728736015942155646 +-0.38693775546315750669 +-0.38658796081448759674 +-0.38623797842843504702 +-0.38588781051126674893 +-0.38553745926050553283 +-0.38518692686496830424 +-0.38483621550479263362 +-0.38448532735146440098 +-0.38413426456784210972 +-0.38378302930819097050 +-0.38343162371821026824 +-0.38308004993505756497 +-0.38272831008737789871 +-0.38237640629533131698 +-0.38202434067062424061 +-0.38167211531653333356 +-0.38131973232793248130 +-0.38096719379132298888 +-0.38061450178485645157 +-0.38026165837837105910 +-0.37990866563340602857 +-0.37955552560324135047 +-0.37920224033291222154 +-0.37884881185924784708 +-0.37849524221089286824 +-0.37814153340833051020 +-0.37778768746391733213 +-0.37743370638190026911 +-0.37707959215845460177 +-0.37672534678170027655 +-0.37637097223172999438 +-0.37601647048064695822 +-0.37566184349256703801 +-0.37530709322367439285 +-0.37495222162222247020 +-0.37459723062857525067 +-0.37424212217522684343 +-0.37388689818682713240 +-0.37353156058021019792 +-0.37317611126441802005 +-0.37282055214072712390 +-0.37246488510267478089 +-0.37210911203607877074 +-0.37175323481907329715 +-0.37139725532212003456 +-0.37104117540805231501 +-0.37068499693207834778 +-0.37032872174182501768 +-0.36997235167734843220 +-0.36961588857117133600 +-0.36925933424829893159 +-0.36890269052624607982 +-0.36854595921506294598 +-0.36818914211735886965 +-0.36783224102832817737 +-0.36747525773577388586 +-0.36711819402012724201 +-0.36676105165448230627 +-0.36640383240460766556 +-0.36604653802898595716 +-0.36568917027881991944 +-0.36533173089807113865 +-0.36497422162347487040 +-0.36461664418456984915 +-0.36425900030372043714 +-0.36390129169613388838 +-0.36354352006989704149 +-0.36318568712598392478 +-0.36282779455829616833 +-0.36246984405367166371 +-0.36211183729191492864 +-0.36175377594582303065 +-0.36139566168120029754 +-0.36103749615688984775 +-0.36067928102479096530 +-0.36032101792988580069 +-0.35996270851026024307 +-0.35960435439712573613 +-0.35924595721484703370 +-0.35888751858095518932 +-0.35852904010618469322 +-0.35817052339448024467 +-0.35781197004303150200 +-0.35745338164228701583 +-0.35709475977598309493 +-0.35673610602116334611 +-0.35637742194819754804 +-0.35601870912080962883 +-0.35565996909609653986 +-0.35530120342455112636 +-0.35494241365008499800 +-0.35458360131004568183 +-0.35422476793524498850 +-0.35386591504997694235 +-0.35350704417204131813 +-0.35314815681276068293 +-0.35278925447701059426 +-0.35243033866322992509 +-0.35207141086345428160 +-0.35171247256332649478 +-0.35135352524212581926 +-0.35099457037278480875 +-0.35063560942191324132 +-0.35027664384981410661 +-0.34991767511051224959 +-0.34955870465176924755 +-0.34919973391510800154 +-0.34884076433582916765 +-0.34848179734303669219 +-0.34812283435965524214 +-0.34776387680245524070 +-0.34740492608206591241 +-0.34704598360300364934 +-0.34668705076368572238 +-0.34632812895645981310 +-0.34596921956761106376 +-0.34561032397739593902 +-0.34525144356005177393 +-0.34489257968382452946 +-0.34453373371098494626 +-0.34417490699784786257 +-0.34381610089479625048 +-0.34345731674629553787 +-0.34309855589091953210 +-0.34273981966136612964 +-0.34238110938447391396 +-0.34202242638125640584 +-0.34166377196689690088 +-0.34130514745079459926 +-0.34094655413656521636 +-0.34058799332206762811 +-0.34022946629942618646 +-0.33987097435504115550 +-0.33951251876961685561 +-0.33915410081817443100 +-0.33879572177007655220 +-0.33843738288904218203 +-0.33807908543316594896 +-0.33772083065494018506 +-0.33736261980126908133 +-0.33700445411349455593 +-0.33664633482740558001 +-0.33628826317326582229 +-0.33593024037582552843 +-0.33557226765434533533 +-0.33521434622261148117 +-0.33485647728895645558 +-0.33449866205627321047 +-0.33414090172203991802 +-0.33378319747833418152 +-0.33342555051185174264 +-0.33306796200392452256 +-0.33271043313053921819 +-0.33235296506235706415 +-0.33199555896472954242 +-0.33163821599771470261 +-0.33128093731610314121 +-0.33092372406942216490 +-0.33056657740196915274 +-0.33020949845281805102 +-0.32985248835584030092 +-0.32949554823972593276 +-0.32913867922799633359 +-0.32878188243902267685 +-0.32842515898604623947 +-0.32806850997719277929 +-0.32771193651549385129 +-0.32735543969889741023 +-0.32699902062029273520 +-0.32664268036752019952 +-0.32628642002339736106 +-0.32593024066572712227 +-0.32557414336731976823 +-0.32521812919600845415 +-0.32486219921466724658 +-0.32450635448122755466 +-0.32415059604869472798 +-0.32379492496516448785 +-0.32343934227383963620 +-0.32308384901304876280 +-0.32272844621626106676 +-0.32237313491210189964 +-0.32201791612437208334 +-0.32166279087206112175 +-0.32130776016936951622 +-0.32095282502571687022 +-0.32059798644576398274 +-0.32024324542942950167 +-0.31988860297190191417 +-0.31953406006365903114 +-0.31917961769048308618 +-0.31882527683347849923 +-0.31847103846908486613 +-0.31811690356909455568 +-0.31776287310066902991 +-0.31740894802635366556 +-0.31705512930409679440 +-0.31670141788725980625 +-0.31634781472463813223 +-0.31599432076047284657 +-0.31564093693447159428 +-0.31528766418181791709 +-0.31493450343319190354 +-0.31458145561478162433 +-0.31422852164830195054 +-0.31387570245100948618 +-0.31352299893571539124 +-0.31317041201080303425 +-0.31281794258024236965 +-0.31246559154360603605 +-0.31211335979608439972 +-0.31176124822849710094 +-0.31140925772731697929 +-0.31105738917467146143 +-0.31070564344837359183 +-0.31035402142192286545 +-0.31000252396452870896 +-0.30965115194112319275 +-0.30929990621237335446 +-0.30894878763470012828 +-0.30859779706028861446 +-0.30824693533710673110 +-0.30789620330891809274 +-0.30754560181529561058 +-0.30719513169163747968 +-0.30684479376918111226 +-0.30649458887501862536 +-0.30614451783210888669 +-0.30579458145929483415 +-0.30544478057131363435 +-0.30509511597881666667 +-0.30474558848837962621 +-0.30439619890251651269 +-0.30404694801969550655 +-0.30369783663435195864 +-0.30334886553690609823 +-0.30300003551376958333 +-0.30265134734736676148 +-0.30230280181614321844 +-0.30195439969458526264 +-0.30160614175322775221 +-0.30125802875867130348 +-0.30091006147359727896 +-0.30056224065677555890 +-0.30021456706308674578 +-0.29986704144352865908 +-0.29951966454523176742 +-0.29917243711147745167 +-0.29882535988170283447 +-0.29847843359152215204 +-0.29813165897273385951 +-0.29778503675334161427 +-0.29743856765755849469 +-0.29709225240582781691 +-0.29674609171483123937 +-0.29640008629750552727 +-0.29605423686305426534 +-0.29570854411696051445 +-0.29536300876100046731 +-0.29501763149325666014 +-0.29467241300812935245 +-0.29432735399635395757 +-0.29398245514500720432 +-0.29363771713752639947 +-0.29329314065371675513 +-0.29294872636977070668 +-0.29260447495827351938 +-0.29226038708822099643 +-0.29191646342502935996 +-0.29157270463054990595 +-0.29122911136308193836 +-0.29088568427738242805 +-0.29054242402467961304 +-0.29019933125268798646 +-0.28985640660561784454 +-0.28951365072418988600 +-0.28917106424564342770 +-0.28882864780375649971 +-0.28848640202884728856 +-0.28814432754779817358 +-0.28780242498405850249 +-0.28746069495766157775 +-0.28711913808523603642 +-0.28677775498001756294 +-0.28643654625186026896 +-0.28609551250724885030 +-0.28575465434931346387 +-0.28541397237783716623 +-0.28507346718927090157 +-0.28473313937674366025 +-0.28439298953007563497 +-0.28405301823579076625 +-0.28371322607712479158 +-0.28337361363404095504 +-0.28303418148323938874 +-0.28269493019817021340 +-0.28235586034904497366 +-0.28201697250284601948 +-0.28167826722333988432 +-0.28133974507108966412 +-0.28100140660346645261 +-0.28066325237465700182 +-0.28032528293567987587 +-0.27998749883439333352 +-0.27964990061551048273 +-0.27931248882060577543 +-0.27897526398813005111 +-0.27863822665342141693 +-0.27830137734871163158 +-0.27796471660314564511 +-0.27762824494278554033 +-0.27729196289062396641 +-0.27695587096659790571 +-0.27661996968759450244 +-0.27628425956746643921 +-0.27594874111703915354 +-0.27561341484412688052 +-0.27527828125353814848 +-0.27494334084708971222 +-0.27460859412361537935 +-0.27427404157897955495 +-0.27393968370608573482 +-0.27360552099488827382 +-0.27327155393240121217 +-0.27293778300271143156 +-0.27260420868698859165 +-0.27227083146349495557 +-0.27193765180759499334 +-0.27160467019176870451 +-0.27127188708561894570 +-0.27093930295588580792 +-0.27060691826645272284 +-0.27027473347835923034 +-0.26994274904981008234 +-0.26961096543618884303 +-0.26927938309006260731 +-0.26894800246119676679 +-0.26861682399656466869 +-0.26828584814035388861 +-0.26795507533398271738 +-0.26762450601610510148 +-0.26729414062262174534 +-0.26696397958669343398 +-0.26663402333874697270 +-0.26630427230648645587 +-0.26597472691490325891 +-0.26564538758628875037 +-0.26531625474023856626 +-0.26498732879366776460 +-0.26465861016081682067 +-0.26433009925326400591 +-0.26400179647993438081 +-0.26367370224710950932 +-0.26334581695843545246 +-0.26301814101493564690 +-0.26269067481501889860 +-0.26236341875448865313 +-0.26203637322655209951 +-0.26170953862183210514 +-0.26138291532837343301 +-0.26105650373165650846 +-0.26073030421460219319 +-0.26040431715758466380 +-0.26007854293843840621 +-0.25975298193246948442 +-0.25942763451246481088 +-0.25910250104870002907 +-0.25877758190895022716 +-0.25845287745849632177 +-0.25812838806013999049 +-0.25780411407420728009 +-0.25748005585855948674 +-0.25715621376860497982 +-0.25683258815730319879 +-0.25650917937517869749 +-0.25618598777032752789 +-0.25586301368842545578 +-0.25554025747274111691 +-0.25521771946413956966 +-0.25489540000109528473 +-0.25457329941969830678 +-0.25425141805366663350 +-0.25392975623435087851 +-0.25360831429074653931 +-0.25328709254949938190 +-0.25296609133491809729 +-0.25264531096898101836 +-0.25232475177134422450 +-0.25200441405935097849 +-0.25168429814804027522 +-0.25136440435015700023 +-0.25104473297615748084 +-0.25072528433421997773 +-0.25040605873025356676 +-0.25008705646790496679 +-0.24976827784857003056 +-0.24944972317139826878 +-0.24913139273330456303 +-0.24881328682897513316 +-0.24849540575087905592 +-0.24817774978927281682 +-0.24786031923221141238 +-0.24754311436555634374 +-0.24722613547298130654 +-0.24690938283598490299 +-0.24659285673389488847 +-0.24627655744387777492 +-0.24596048524094898946 +-0.24564464039797717643 +-0.24532902318569549394 +-0.24501363387270710947 +-0.24469847272549738459 +-0.24438354000843673375 +-0.24406883598379236489 +-0.24375436091173446895 +-0.24344011505034499065 +-0.24312609865562620493 +-0.24281231198150676764 +-0.24249875527985109702 +-0.24218542880046639576 +-0.24187233279111167161 +-0.24155946749750462077 +-0.24124683316332856675 +-0.24093443003024250793 +-0.24062225833788616902 +-0.24031031832389154745 +-0.23999861022388574439 +-0.23968713427150278861 +-0.23937589069838757783 +-0.23906487973420836868 +-0.23875410160665927473 +-0.23844355654147048051 +-0.23813324476241701233 +-0.23782316649132148600 +-0.23751332194806806797 +-0.23720371135060486223 +-0.23689433491495254236 +-0.23658519285521484310 +-0.23627628538358086407 +-0.23596761271033681040 +-0.23565917504387010051 +-0.23535097259068027409 +-0.23504300555538240602 +-0.23473527414071723718 +-0.23442777854755686429 +-0.23412051897491251151 +-0.23381349561994260733 +-0.23350670867795852992 +-0.23320015834243246200 +-0.23289384480500396890 +-0.23258776825548874156 +-0.23228192888188364806 +-0.23197632687037550436 +-0.23167096240534607032 +-0.23136583566938148659 +-0.23106094684327835309 +-0.23075629610604989073 +-0.23045188363493337991 +-0.23014770960539795985 +-0.22984377419114970786 +-0.22954007756414168684 +-0.22923661989457677635 +-0.22893340135091785892 +-0.22863042209989184461 +-0.22832768230650041241 +-0.22802518213402209191 +-0.22772292174402206100 +-0.22742090129635927909 +-0.22711912094918951244 +-0.22681758085897721355 +-0.22651628118049829674 +-0.22621522206684741008 +-0.22591440366944715024 +-0.22561382613805075481 +-0.22531348962075201103 +-0.22501339426398919707 +-0.22471354021255490752 +-0.22441392760959871788 +-0.22411455659663653828 +-0.22381542731355549836 +-0.22351653989862146910 +-0.22321789448848528004 +-0.22291949121818890878 +-0.22262133022117108760 +-0.22232341162927524159 +-0.22202573557275531724 +-0.22172830218028166671 +-0.22143111157894698748 +-0.22113416389427409392 +-0.22083745925022058021 +-0.22054099776918723030 +-0.22024477957202134859 +-0.21994880477802536412 +-0.21965307350496113270 +-0.21935758586905915180 +-0.21906234198502078092 +-0.21876734196602667937 +-0.21847258592374330100 +-0.21817807396832814004 +-0.21788380620843475488 +-0.21758978275122117796 +-0.21729600370235369056 +-0.21700246916601539926 +-0.21670917924490920581 +-0.21641613404026652234 +-0.21612333365185026901 +-0.21583077817796503250 +-0.21553846771545831507 +-0.21524640235972994362 +-0.21495458220473578903 +-0.21466300734299459396 +-0.21437167786559468974 +-0.21408059386219760456 +-0.21378975542104552976 +-0.21349916262896653785 +-0.21320881557138091078 +-0.21291871433230599719 +-0.21262885899436204107 +-0.21233924963877989778 +-0.21204988634540239412 +-0.21176076919269534726 +-0.21147189825774839744 +-0.21118327361628411176 +-0.21089489534266206427 +-0.21060676350988419281 +-0.21031887818960151582 +-0.21003123945211826795 +-0.20974384736639783977 +-0.20945670200007054929 +-0.20916980341943547383 +-0.20888315168946777756 +-0.20859674687382556701 +-0.20831058903485213940 +-0.20802467823358491983 +-0.20773901452975587767 +-0.20745359798180509903 +-0.20716842864687767811 +-0.20688350658083237699 +-0.20659883183825009101 +-0.20631440447243462599 +-0.20603022453541861014 +-0.20574629207797107133 +-0.20546260714960309923 +-0.20517916979856848370 +-0.20489598007187403983 +-0.20461303801528163415 +-0.20433034367331592840 +-0.20404789708926723835 +-0.20376569830519727922 +-0.20348374736194621559 +-0.20320204429913482636 +-0.20292058915517147133 +-0.20263938196725747587 +-0.20235842277139090561 +-0.20207771160237258945 +-0.20179724849380939466 +-0.20151703347812385814 +-0.20123706658655426960 +-0.20095734784916027826 +-0.20067787729483099746 +-0.20039865495128747486 +-0.20011968084508857668 +-0.19984095500163434611 +-0.19956247744517427445 +-0.19928424819880807828 +-0.19900626728449352654 +-0.19872853472305085365 +-0.19845105053416667307 +-0.19817381473639908429 +-0.19789682734718214152 +-0.19762008838283329215 +-0.19734359785855512537 +-0.19706735578843903589 +-0.19679136218547610415 +-0.19651561706155512566 +-0.19624012042747018825 +-0.19596487229292505750 +-0.19568987266654105928 +-0.19541512155585424870 +-0.19514061896732790014 +-0.19486636490635175778 +-0.19459235937725080645 +-0.19431860238328627077 +-0.19404509392666219325 +-0.19377183400853026374 +-0.19349882262899306684 +-0.19322605978710896690 +-0.19295354548089857505 +-0.19268127970734605370 +-0.19240926246240663833 +-0.19213749374100738687 +-0.19186597353705797664 +-0.19159470184344831734 +-0.19132367865205640589 +-0.19105290395375204571 +-0.19078237773840406311 +-0.19051209999487889180 +-0.19024207071104928812 +-0.18997228987379966014 +-0.18970275746902534597 +-0.18943347348164241151 +-0.18916443789558798350 +-0.18889565069382810436 +-0.18862711185835859262 +-0.18835882137021106586 +-0.18809077920945829754 +-0.18782298535521604887 +-0.18755543978564859220 +-0.18728814247797387349 +-0.18702109340846542751 +-0.18675429255245931670 +-0.18648773988435402016 +-0.18622143537762200771 +-0.18595537900480585414 +-0.18568957073752689890 +-0.18542401054648768866 +-0.18515869840147955450 +-0.18489363427138044704 +-0.18462881812416467864 +-0.18436424992690381153 +-0.18409992964577320818 +-0.18383585724605316924 +-0.18357203269213515084 +-0.18330845594752520622 +-0.18304512697484806583 +-0.18278204573584980186 +-0.18251921219140493369 +-0.18225662630151667765 +-0.18199428802532408023 +-0.18173219732110226787 +-0.18147035414627230021 +-0.18120875845739883858 +-0.18094741021019611349 +-0.18068630935953519656 +-0.18042545585944325115 +-0.18016484966310847282 +-0.17990449072288555721 +-0.17964437899030008539 +-0.17938451441604841285 +-0.17912489695000535783 +-0.17886552654122633843 +-0.17860640313795195233 +-0.17834752668761069683 +-0.17808889713682282685 +-0.17783051443140623915 +-0.17757237851637694415 +-0.17731448933595478357 +-0.17705684683356742726 +-0.17679945095185256587 +-0.17654230163266310116 +-0.17628539881706858927 +-0.17602874244536287351 +-0.17577233245706416764 +-0.17551616879091883061 +-0.17526025138490677890 +-0.17500458017624578866 +-0.17474915510139119035 +-0.17449397609604283543 +-0.17423904309514864908 +-0.17398435603290596241 +-0.17372991484276667506 +-0.17347571945744114097 +-0.17322176980890049980 +-0.17296806582838078481 +-0.17271460744638547635 +-0.17246139459269196892 +-0.17220842719635173768 +-0.17195570518569369689 +-0.17170322848833199925 +-0.17145099703116417622 +-0.17119901074037732758 +-0.17094726954145059161 +-0.17069577335916133465 +-0.17044452211758340243 +-0.17019351574009483619 +-0.16994275414937892732 +-0.16969223726742979630 +-0.16944196501555303103 +-0.16919193731437037753 +-0.16894215408382423638 +-0.16869261524317846757 +-0.16844332071102349757 +-0.16819427040527928918 +-0.16794546424319839462 +-0.16769690214136906414 +-0.16744858401571804940 +-0.16720050978151621002 +-0.16695267935337923526 +-0.16670509264527072490 +-0.16645774957050729626 +-0.16621065004176174829 +-0.16596379397106356124 +-0.16571718126980417019 +-0.16547081184874209980 +-0.16522468561800071618 +-0.16497880248707649797 +-0.16473316236483909192 +-0.16448776515953678068 +-0.16424261077879745430 +-0.16399769912963263474 +-0.16375303011844116741 +-0.16350860365101113625 +-0.16326441963252344425 +-0.16302047796755556042 +-0.16277677856008329615 +-0.16253332131348507961 +-0.16229010613054264955 +-0.16204713291344899351 +-0.16180440156380576644 +-0.16156191198262895292 +-0.16131966407035155942 +-0.16107765772682863803 +-0.16083589285133514935 +-0.16059436934257434459 +-0.16035308709867690524 +-0.16011204601720688268 +-0.15987124599516180923 +-0.15963068692897727785 +-0.15939036871452996746 +-0.15915029124713950259 +-0.15891045442157175627 +-0.15867085813204276357 +-0.15843150227221983184 +-0.15819238673522578731 +-0.15795351141363986325 +-0.15771487619950463888 +-0.15747648098432417973 +-0.15723832565906839531 +-0.15700041011417853465 +-0.15676273423956629816 +-0.15652529792461761238 +-0.15628810105819643250 +-0.15605114352864812854 +-0.15581442522379926330 +-0.15557794603096275488 +-0.15534170583694037471 +-0.15510570452802488473 +-0.15486994199000306272 +-0.15463441810815772848 +-0.15439913276727235125 +-0.15416408585163113298 +-0.15392927724502344922 +-0.15369470683074651363 +-0.15346037449160698785 +-0.15322628010992470071 +-0.15299242356753367522 +-0.15275880474578792945 +-0.15252542352556086591 +-0.15229227978724865777 +-0.15205937341077385705 +-0.15182670427558853099 +-0.15159427226067387351 +-0.15136207724454517343 +-0.15113011910525567250 +-0.15089839772039484456 +-0.15066691296709477932 +-0.15043566472203095952 +-0.15020465286142592465 +-0.14997387726105060324 +-0.14974333779622639451 +-0.14951303434183085828 +-0.14928296677229632716 +-0.14905313496161345932 +-0.14882353878333640096 +-0.14859417811058198144 +-0.14836505281603246109 +-0.14813616277193999982 +-0.14790750785012868329 +-0.14767908792199455070 +-0.14745090285851064626 +-0.14722295253022843475 +-0.14699523680728035502 +-0.14676775555938223472 +-0.14654050865583509444 +-0.14631349596552908898 +-0.14608671735694386817 +-0.14586017269815224062 +-0.14563386185682269947 +-0.14540778470022075464 +-0.14518194109521229129 +-0.14495633090826418043 +-0.14473095400545016309 +-0.14450581025244921274 +-0.14428089951454958761 +-0.14405622165665110668 +-0.14383177654326886885 +-0.14360756403853189300 +-0.14338358400618850252 +-0.14315983630960879558 +-0.14293632081178375692 +-0.14271303737533094780 +-0.14248998586249450593 +-0.14226716613514928111 +-0.14204457805480091848 +-0.14182222148258971650 +-0.14160009627929220910 +-0.14137820230532358035 +-0.14115653942073932980 +-0.14093510748523849219 +-0.14071390635816469206 +-0.14049293589850928021 +-0.14027219596491180553 +-0.14005168641566573262 +-0.13983140710871638790 +-0.13961135790166537274 +-0.13939153865177225655 +-0.13917194921595821278 +-0.13895258945080454782 +-0.13873345921255816893 +-0.13851455835713213927 +-0.13829588674010862004 +-0.13807744421674009172 +-0.13785923064195151899 +-0.13764124587034348712 +-0.13742348975619303464 +-0.13720596215345587376 +-0.13698866291576974885 +-0.13677159189645449189 +-0.13655474894851538092 +-0.13633813392464522174 +-0.13612174667722570787 +-0.13590558705832997410 +-0.13568965491972317938 +-0.13547395011286789135 +-0.13525847248892239327 +-0.13504322189874415350 +-0.13482819819289182384 +-0.13461340122162862576 +-0.13439883083492104587 +-0.13418448688244358213 +-0.13397036921357946548 +-0.13375647767742346317 +-0.13354281212278271140 +-0.13332937239817915787 +-0.13311615835185217072 +-0.13290316983175920473 +-0.13269040668557832707 +-0.13247786876071071527 +-0.13226555590428132336 +-0.13205346796314199054 +-0.13184160478387146886 +-0.13162996621278058584 +-0.13141855209591080111 +-0.13120736227903692650 +-0.13099639660767090077 +-0.13078565492706140105 +-0.13057513708219589676 +-0.13036484291780350842 +-0.13015477227835725582 +-0.12994492500807361401 +-0.12973530095091623249 +-0.12952589995059743400 +-0.12931672185057965785 +-0.12910776649407743055 +-0.12889903372405894788 +-0.12869052338324848961 +-0.12848223531412761300 +-0.12827416935893601324 +-0.12806632535967618636 +-0.12785870315811243003 +-0.12765130259577295302 +-0.12744412351395248417 +-0.12723716575371488147 +-0.12703042915589207729 +-0.12682391356108813074 +-0.12661761880968003258 +-0.12641154474182011991 +-0.12620569119743663133 +-0.12600005801623612167 +-0.12579464503770582118 +-0.12558945210111366331 +-0.12538447904551133782 +-0.12517972570973565083 +-0.12497519193240991253 +-0.12477087755194582464 +-0.12456678240654436851 +-0.12436290633419966323 +-0.12415924917269817451 +-0.12395581075962058826 +-0.12375259093234584895 +-0.12354958952805017436 +-0.12334680638370898453 +-0.12314424133609984391 +-0.12294189422180405724 +-0.12273976487720614226 +-0.12253785313849768768 +-0.12233615884167778343 +-0.12213468182255537986 +-0.12193342191675009267 +-0.12173237895969402089 +-0.12153155278663395344 +-0.12133094323263177161 +-0.12113055013256683601 +-0.12093037332113766580 +-0.12073041263286277136 +-0.12053066790208280534 +-0.12033113896296118717 +-0.12013182564948771125 +-0.11993272779547771434 +-0.11973384523457430983 +-0.11953517780025040007 +-0.11933672532581107717 +-0.11913848764439219363 +-0.11894046458896435914 +-0.11874265599233460589 +-0.11854506168714562531 +-0.11834768150587929303 +-0.11815051528085727950 +-0.11795356284424306226 +-0.11775682402804266147 +-0.11756029866410645790 +-0.11736398658413103868 +-0.11716788761965990506 +-0.11697200160208527653 +-0.11677632836264982552 +-0.11658086773244763501 +-0.11638561954242584995 +-0.11619058362338542667 +-0.11599575980598456071 +-0.11580114792073782637 +-0.11560674779801810574 +-0.11541255926805869814 +-0.11521858216095538785 +-0.11502481630666511192 +-0.11483126153501019284 +-0.11463791767567797775 +-0.11444478455822351681 +-0.11425186201206954939 +-0.11405914986650879384 +-0.11386664795070522427 +-0.11367435609369516691 +-0.11348227412438853523 +-0.11329040187157078667 +-0.11309873916390367210 +-0.11290728582992688722 +-0.11271604169805858608 +-0.11252500659659872562 +-0.11233418035372826072 +-0.11214356279751075407 +-0.11195315375589545703 +-0.11176295305671669900 +-0.11157296052769549721 +-0.11138317599644151357 +-0.11119359929045480317 +-0.11100423023712506498 +-0.11081506866373494469 +-0.11062611439746035391 +-0.11043736726537220494 +-0.11024882709443721562 +-0.11006049371151924166 +-0.10987236694338115006 +-0.10968444661668529105 +-0.10949673255799496907 +-0.10930922459377614975 +-0.10912192255039801503 +-0.10893482625413486442 +-0.10874793553116610112 +-0.10856125020758002064 +-0.10837477010937177080 +-0.10818849506244700154 +-0.10800242489262192047 +-0.10781655942562530515 +-0.10763089848709871121 +-0.10744544190259840144 +-0.10726018949759659471 +-0.10707514109748202114 +-0.10689029652756154576 +-0.10670565561306173674 +-0.10652121817912897639 +-0.10633698405083201466 +-0.10615295305316120589 +-0.10596912501103231130 +-0.10578549974928551369 +-0.10560207709268663867 +-0.10541885686593033267 +-0.10523583889363898047 +-0.10505302300036446772 +-0.10487040901058977682 +-0.10468799674873076333 +-0.10450578603913505960 +-0.10432377670608525277 +-0.10414196857379920402 +-0.10396036146643153342 +-0.10377895520807417507 +-0.10359774962275779264 +-0.10341674453445326431 +-0.10323593976707201580 +-0.10305533514446758858 +-0.10287493049043702764 +-0.10269472562872117294 +-0.10251472038300660228 +-0.10233491457692552029 +-0.10215530803405878379 +-0.10197590057793524954 +-0.10179669203203296768 +-0.10161768221978111082 +-0.10143887096456127850 +-0.10126025808970667841 +-0.10108184341850499910 +-0.10090362677419950632 +-0.10072560797998823812 +-0.10054778685902711344 +-0.10037016323442975174 +-0.10019273692926930486 +-0.10001550776657865127 +-0.09983847556935200596 +-0.09966164016054600283 +-0.09948500136308026376 +-0.09930855899983860591 +-0.09913231289367051280 +-0.09895626286739134247 +-0.09878040874378413161 +-0.09860475034559938734 +-0.09842928749555822365 +-0.09825402001635125115 +-0.09807894773064014526 +-0.09790407046105915889 +-0.09772938803021649634 +-0.09755490026069345288 +-0.09738060697504716257 +-0.09720650799581095902 +-0.09703260314549534693 +-0.09685889224658898733 +-0.09668537512155947478 +-0.09651205159285483615 +-0.09633892148290390534 +-0.09616598461411737797 +-0.09599324080888939348 +-0.09582068988959749345 +-0.09564833167860453678 +-0.09547616599825828332 +-0.09530419267089453028 +-0.09513241151883598812 +-0.09496082236439351565 +-0.09478942502986863194 +-0.09461821933755265590 +-0.09444720510972809402 +-0.09427638216866984777 +-0.09410575033664687894 +-0.09393530943592109939 +-0.09376505928874999396 +-0.09359499971738705071 +-0.09342513054408262130 +-0.09325545159108457327 +-0.09308596268063962231 +-0.09291666363499402614 +-0.09274755427639443106 +-0.09257863442708873236 +-0.09240990390932721232 +-0.09224136254536316470 +-0.09207301015745389394 +-0.09190484656786107598 +-0.09173687159885302034 +-0.09156908507270421216 +-0.09140148681169614486 +-0.09123407663811899937 +-0.09106685437427251839 +-0.09089981984246614521 +-0.09073297286501989800 +-0.09056631326426604900 +-0.09039984086254919393 +-0.09023355548222763978 +-0.09006745694567344640 +-0.08990154507527498007 +-0.08973581969343492892 +-0.08957028062257378631 +-0.08940492768512990629 +-0.08923976070355967016 +-0.08907477950033870773 +-0.08890998389796302137 +-0.08874537371894931914 +-0.08858094878583623599 +-0.08841670892118473624 +-0.08825265394757983439 +-0.08808878368763010946 +-0.08792509796396937027 +-0.08776159659925714118 +-0.08759827941617977232 +-0.08743514623745071712 +-0.08727219688581211443 +-0.08710943118403444152 +-0.08694684895491923415 +-0.08678445002129665797 +-0.08662223420603021307 +-0.08646020133201451352 +-0.08629835122217734134 +-0.08613668369948028480 +-0.08597519858691941852 +-0.08581389570752596951 +-0.08565277488436734421 +-0.08549183594054762803 +-0.08533107869920897315 +-0.08517050298353139037 +-0.08501010861673430341 +-0.08484989542207670155 +-0.08468986322285844415 +-0.08453001184242082966 +-0.08437034110414698418 +-0.08421085083146358230 +-0.08405154084784065283 +-0.08389241097679180081 +-0.08373346104187713579 +-0.08357469086670174518 +-0.08341610027491767887 +-0.08325768909022430997 +-0.08309945713636904263 +-0.08294140423714797816 +-0.08278353021640690035 +-0.08262583489804227466 +-0.08246831810600092905 +-0.08231097966428195523 +-0.08215381939693640334 +-0.08199683712806879465 +-0.08184003268183764890 +-0.08168340588245584510 +-0.08152695655419160692 +-0.08137068452136987651 +-0.08121458960837095453 +-0.08105867163963394184 +-0.08090293043965546271 +-0.08074736583299105264 +-0.08059197764425587995 +-0.08043676569812542587 +-0.08028172981933595631 +-0.08012686983268554886 +-0.07997218556303443970 +-0.07981767683530641144 +-0.07966334347448848774 +-0.07950918530563219622 +-0.07935520215385420684 +-0.07920139384433703966 +-0.07904776020232957834 +-0.07889430105314779174 +-0.07874101622217594132 +-0.07858790553486641461 +-0.07843496881674065502 +-0.07828220589339017488 +-0.07812961659047697183 +-0.07797720073373429206 +-0.07782495814896714381 +-0.07767288866205322717 +-0.07752099209894312837 +-0.07736926828566140224 +-0.07721771704830758531 +-0.07706633821305577947 +-0.07691513160615617850 +-0.07676409705393549832 +-0.07661323438279743492 +-0.07646254341922362197 +-0.07631202398977388057 +-0.07616167592108785689 +-0.07601149903988414780 +-0.07586149317296213279 +-0.07571165814720200171 +-0.07556199378956583723 +-0.07541249992709800343 +-0.07526317638692571477 +-0.07511402299625971613 +-0.07496503958239579546 +-0.07481622597271311847 +-0.07466758199467775359 +-0.07451910747584121475 +-0.07437080224384201577 +-0.07422266612640590622 +-0.07407469895134692617 +-0.07392690054656742005 +-0.07377927074005941055 +-0.07363180935990439047 +-0.07348451623427504353 +-0.07333739119143461993 +-0.07319043405973850447 +-0.07304364466763414721 +-0.07289702284366224305 +-0.07275056841645723138 +-0.07260428121474737928 +-0.07245816106735653017 +-0.07231220780320363195 +-0.07216642125130304231 +-0.07202080124076712386 +-0.07187534760080464824 +-0.07173006016072260016 +-0.07158493874992652439 +-0.07143998319792112250 +-0.07129519333431061368 +-0.07115056898879960900 +-0.07100610999119423561 +-0.07086181617140152600 +-0.07071768735943088913 +-0.07057372338539463774 +-0.07042992407950809941 +-0.07028628927209086552 +-0.07014281879356702720 +-0.06999951247446560554 +-0.06985637014542185608 +-0.06971339163717708842 +-0.06957057678057938788 +-0.06942792540658455913 +-0.06928543734625652872 +-0.06914311243076795566 +-0.06900095049140056447 +-0.06885895135954679669 +-0.06871711486670827040 +-0.06857544084449852806 +-0.06843392912464286992 +-0.06829257953897849287 +-0.06815139191945546182 +-0.06801036609813748690 +-0.06786950190720193732 +-0.06772879917894104873 +-0.06758825774576197876 +-0.06744787744018811149 +-0.06730765809485894646 +-0.06716759954253012643 +-0.06702770161607608801 +-0.06688796414848860450 +-0.06674838697287810430 +-0.06660896992247447579 +-0.06646971283062744207 +-0.06633061553080674133 +-0.06619167785660337588 +-0.06605289964173005623 +-0.06591428072002136762 +-0.06577582092543461656 +-0.06563752009205042759 +-0.06549937805407317348 +-0.06536139464583182179 +-0.06522356970178024016 +-0.06508590305649768204 +-0.06494839454469011897 +-0.06481104400118975484 +-0.06467385126095606673 +-0.06453681615907655433 +-0.06439993853076717012 +-0.06426321821137283286 +-0.06412665503636783004 +-0.06399024884135738611 +-0.06385399946207623301 +-0.06371790673439113595 +-0.06358197049430090730 +-0.06344619057793632333 +-0.06331056682156138704 +-0.06317509906157370292 +-0.06303978713450478222 +-0.06290463087702109768 +-0.06276963012592422231 +-0.06263478471815195348 +-0.06250009449077810475 +-0.06236555928101371327 +-0.06223117892620721320 +-0.06209695326384525454 +-0.06196288213155328600 +-0.06182896536709589497 +-0.06169520280837745979 +-0.06156159429344333633 +-0.06142813966047876162 +-0.06129483874781162245 +-0.06116169139391138682 +-0.06102869743739029740 +-0.06089585671700393360 +-0.06076316907165168341 +-0.06063063434037722910 +-0.06049825236236942849 +-0.06036602297696242597 +-0.06023394602363698475 +-0.06010202134202006358 +-0.05997024877188619069 +-0.05983862815315749845 +-0.05970715932590467401 +-0.05957584213034742421 +-0.05944467640685485721 +-0.05931366199594657190 +-0.05918279873829275506 +-0.05905208647471424377 +-0.05892152504618473202 +-0.05879111429382972986 +-0.05866085405892798588 +-0.05853074418291179248 +-0.05840078450736764515 +-0.05827097487403661707 +-0.05814131512481521269 +-0.05801180510175613786 +-0.05788244464706822356 +-0.05775323360311745285 +-0.05762417181242758535 +-0.05749525911768037928 +-0.05736649536171661151 +-0.05723788038753638285 +-0.05710941403829969398 +-0.05698109615732745159 +-0.05685292658810143368 +-0.05672490517426508755 +-0.05659703175962436938 +-0.05646930618814805652 +-0.05634172830396851767 +-0.05621429795138208757 +-0.05608701497485026055 +-0.05595987921899896189 +-0.05583289052862049073 +-0.05570604874867384620 +-0.05557935372428474824 +-0.05545280530074656045 +-0.05532640332352116441 +-0.05520014763823895970 +-0.05507403809070002265 +-0.05494807452687430066 +-0.05482225679290280568 +-0.05469658473509754482 +-0.05457105819994192974 +-0.05444567703409267795 +-0.05432044108437907026 +-0.05419535019780414437 +-0.05407040422154530540 +-0.05394560300295488109 +-0.05382094638956047561 +-0.05369643422906596186 +-0.05357206636935218924 +-0.05344784265847705301 +-0.05332376294467648659 +-0.05319982707636512764 +-0.05307603490213654018 +-0.05295238627076444271 +-0.05282888103120283313 +-0.05270551903258673815 +-0.05258230012423317085 +-0.05245922415564125557 +-0.05233629097649292877 +-0.05221350043665400065 +-0.05209085238617436331 +-0.05196834667528880958 +-0.05184598315441747707 +-0.05172376167416719434 +-0.05160168208533062739 +-0.05147974423888845852 +-0.05135794798600951117 +-0.05123629317805106220 +-0.05111477966655969540 +-0.05099340730327225207 +-0.05087217594011586574 +-0.05075108542920920424 +-0.05063013562286274721 +-0.05050932637357986865 +-0.05038865753405692011 +-0.05026812895718429930 +-0.05014774049604683176 +-0.05002749200392479084 +-0.04990738333429432794 +-0.04978741434082811085 +-0.04966758487739604544 +-0.04954789479806642749 +-0.04942834395710517942 +-0.04930893220897850093 +-0.04918965940835205025 +-0.04907052541009225555 +-0.04895153006926689088 +-0.04883267324114578395 +-0.04871395478120126021 +-0.04859537454510928084 +-0.04847693238874974109 +-0.04835862816820764298 +-0.04824046173977311613 +-0.04812243295994271530 +-0.04800454168541968408 +-0.04788678777311503043 +-0.04776917108014808178 +-0.04765169146384704707 +-0.04753434878175022416 +-0.04741714289160620099 +-0.04730007365137419567 +-0.04718314091922629072 +-0.04706634455354661434 +-0.04694968441293278366 +-0.04683316035619651541 +-0.04671677224236444465 +-0.04660051993067852033 +-0.04648440328059718490 +-0.04636842215179608206 +-0.04625257640416841759 +-0.04613686589782600017 +-0.04602129049310007408 +-0.04590585005054169387 +-0.04579054443092293175 +-0.04567537349523739104 +-0.04556033710470094866 +-0.04544543512075285147 +-0.04533066740505604236 +-0.04521603381949800687 +-0.04510153422619190416 +-0.04498716848747705277 +-0.04487293646591972857 +-0.04475883802431399050 +-0.04464487302568295041 +-0.04453104133327822484 +-0.04441734281058226652 +-0.04430377732130857255 +-0.04419034472940213537 +-0.04407704489904072653 +-0.04396387769463557665 +-0.04385084298083197912 +-0.04373794062251048359 +-0.04362517048478741638 +-0.04351253243301611562 +-0.04340002633278711858 +-0.04328765204992966048 +-0.04317540945051191043 +-0.04306329840084240079 +-0.04295131876747047828 +-0.04283947041718731696 +-0.04272775321702688978 +-0.04261616703426630154 +-0.04250471173642730166 +-0.04239338719127706823 +-0.04228219326682863127 +-0.04217112983134203852 +-0.04206019675332543784 +-0.04194939390153546582 +-0.04183872114497866335 +-0.04172817835291208616 +-0.04161776539484412368 +-0.04150748214053585905 +-0.04139732846000147154 +-0.04128730422350920803 +-0.04117740930158258345 +-0.04106764356500127583 +-0.04095800688480174395 +-0.04084849913227835833 +-0.04073912017898482368 +-0.04062986989673380428 +-0.04052074815759922066 +-0.04041175483391680479 +-0.04030288979828471063 +-0.04019415292356479791 +-0.04008554408288353410 +-0.03997706314963277857 +-0.03986870999747119809 +-0.03976048450032473869 +-0.03965238653238822852 +-0.03954441596812567628 +-0.03943657268227182544 +-0.03932885654983266088 +-0.03922126744608699783 +-0.03911380524658708557 +-0.03900646982715972461 +-0.03889926106390731442 +-0.03879217883320924820 +-0.03868522301172176020 +-0.03857839347638071514 +-0.03847169010440122661 +-0.03836511277327939173 +-0.03825866136079317942 +-0.03815233574500363767 +-0.03804613580425555280 +-0.03794006141717907316 +-0.03783411246269044459 +-0.03772828881999341216 +-0.03762259036857987932 +-0.03751701698823135811 +-0.03741156855901991291 +-0.03730624496130931916 +-0.03720104607575630551 +-0.03709597178331147660 +-0.03699102196522075642 +-0.03688619650302624869 +-0.03678149527856704182 +-0.03667691817398148479 +-0.03657246507170724276 +-0.03646813585448302475 +-0.03636393040534955517 +-0.03625984860765086443 +-0.03615589034503535748 +-0.03605205550145708371 +-0.03594834396117720793 +-0.03584475560876465572 +-0.03574129032909776488 +-0.03563794800736545115 +-0.03553472852906810336 +-0.03543163178001939445 +-0.03532865764634708639 +-0.03522580601449437632 +-0.03512307677122144395 +-0.03502046980360629808 +-0.03491798499904612968 +-0.03481562224525891480 +-0.03471338143028441375 +-0.03461126244248557970 +-0.03450926517054975218 +-0.03440738950349039177 +-0.03430563533064751036 +-0.03420400254168991933 +-0.03410249102661633974 +-0.03400110067575635303 +-0.03389983137977214955 +-0.03379868302965984006 +-0.03369765551675051041 +-0.03359674873271210199 +-0.03349596256955036933 +-0.03339529691961069108 +-0.03329475167557898602 +-0.03319432673048359345 +-0.03309402197769622384 +-0.03299383731093386701 +-0.03289377262425990239 +-0.03279382781208575043 +-0.03269400276917204529 +-0.03259429739063077203 +-0.03249471157192544007 +-0.03239524520887415715 +-0.03229589819764999703 +-0.03219667043478294244 +-0.03209756181716132833 +-0.03199857224203317418 +-0.03189970160700811991 +-0.03180094981005859855 +-0.03170231674952150858 +-0.03160380232409999018 +-0.03150540643286457720 +-0.03140712897525493180 +-0.03130896985108167635 +-0.03121092896052767365 +-0.03111300620414981372 +-0.03101520148288047091 +-0.03091751469802963767 +-0.03081994575128547270 +-0.03072249454471712854 +-0.03062516098077587914 +-0.03052794496229674012 +-0.03043084639250023468 +-0.03033386517499411794 +-0.03023700121377495553 +-0.03014025441323000057 +-0.03004362467813874102 +-0.02994711191367495015 +-0.02985071602540794941 +-0.02975443691930480111 +-0.02965827450173163377 +-0.02956222867945590069 +-0.02946629935964784064 +-0.02937048644988240337 +-0.02927478985814089413 +-0.02917920949281333984 +-0.02908374526269914134 +-0.02898839707701042143 +-0.02889316484537276034 +-0.02879804847782750643 +-0.02870304788483359071 +-0.02860816297726945234 +-0.02851339366643472484 +-0.02841873986405253280 +-0.02832420148227098380 +-0.02822977843366564210 +-0.02813547063124088865 +-0.02804127798843228381 +-0.02794720041910826042 +-0.02785323783757240670 +-0.02775939015856530856 +-0.02766565729726647160 +-0.02757203916929662837 +-0.02747853569071959101 +-0.02738514677804382638 +-0.02729187234822567573 +-0.02719871231867031225 +-0.02710566660723443336 +-0.02701273513222812728 +-0.02691991781241714551 +-0.02682721456702475207 +-0.02673462531573415901 +-0.02664214997869073995 +-0.02654978847650378213 +-0.02645754073024903993 +-0.02636540666147084086 +-0.02627338619218409083 +-0.02618147924487683464 +-0.02608968574251230646 +-0.02599800560853110856 +-0.02590643876685377878 +-0.02581498514188269172 +-0.02572364465850445620 +-0.02563241724209246869 +-0.02554130281850895343 +-0.02545030131410745688 +-0.02535941265573505438 +-0.02526863677073512907 +-0.02517797358694887078 +-0.02508742303271862054 +-0.02499698503688992449 +-0.02490665952881380291 +-0.02481644643834933495 +-0.02472634569586621214 +-0.02463635723224683743 +-0.02454648097888934358 +-0.02445671686770968523 +-0.02436706483114443877 +-0.02427752480215307831 +-0.02418809671422074772 +-0.02409878050136053662 +-0.02400957609811641899 +-0.02392048343956569220 +-0.02383150246132149583 +-0.02374263309953553169 +-0.02365387529090099555 +-0.02356522897265435346 +-0.02347669408257923793 +-0.02338827055900820004 +-0.02329995834082585621 +-0.02321175736747146598 +-0.02312366757894184291 +-0.02303568891579379357 +-0.02294782131914727824 +-0.02286006473068799213 +-0.02277241909267029366 +-0.02268488434791996258 +-0.02259746043983688196 +-0.02251014731239828898 +-0.02242294491016138397 +-0.02233585317826634539 +-0.02224887206243909496 +-0.02216200150899469423 +-0.02207524146483942282 +-0.02198859187747462945 +-0.02190205269499948329 +-0.02181562386611369392 +-0.02172930534012078654 +-0.02164309706693120020 +-0.02155699899706505634 +-0.02147101108165563182 +-0.02138513327245213091 +-0.02129936552182318948 +-0.02121370778275958463 +-0.02112816000887768678 +-0.02104272215442241564 +-0.02095739417427072357 +-0.02087217602393461394 +-0.02078706765956446489 +-0.02070206903795215880 +-0.02061718011653470781 +-0.02053240085339683857 +-0.02044773120727522847 +-0.02036317113756115973 +-0.02027872060430415541 +-0.02019437956821528227 +-0.02011014799067065151 +-0.02002602583371455164 +-0.01994201306006327182 +-0.01985810963310829375 +-0.01977431551691998315 +-0.01969063067625079211 +-0.01960705507653909621 +-0.01952358868391239344 +-0.01944023146519120379 +-0.01935698338789251793 +-0.01927384442023326316 +-0.01919081453113427593 +-0.01910789369022363252 +-0.01902508186784014621 +-0.01894237903503772844 +-0.01885978516358848348 +-0.01877730022598669835 +-0.01869492419545254122 +-0.01861265704593590559 +-0.01853049875211998029 +-0.01844844928942534351 +-0.01836650863401380340 +-0.01828467676279202717 +-0.01820295365341556212 +-0.01812133928429281865 +-0.01803983363458875819 +-0.01795843668422917455 +-0.01787714841390441664 +-0.01779596880507346851 +-0.01771489783996808148 +-0.01763393550159665646 +-0.01755308177374820255 +-0.01747233664099679187 +-0.01739170008870537590 +-0.01731117210303007026 +-0.01723075267092415153 +-0.01715044178014260567 +-0.01707023941924561486 +-0.01699014557760357078 +-0.01691016024540099513 +-0.01683028341364072381 +-0.01675051507414829569 +-0.01667085521957637276 +-0.01659130384340878547 +-0.01651186093996530324 +-0.01643252650440571450 +-0.01635330053273451045 +-0.01627418302180502069 +-0.01619517396932415934 +-0.01611627337385660233 +-0.01603748123482968621 +-0.01595879755253765131 +-0.01588022232814632895 +-0.01580175556369766907 +-0.01572339726211457317 +-0.01564514742720489460 +-0.01556700606366699137 +-0.01548897317709376636 +-0.01541104877397759046 +-0.01533323286171499843 +-0.01525552544861154616 +-0.01517792654388634699 +-0.01510043615767716653 +-0.01502305430104507525 +-0.01494578098597947567 +-0.01486861622540271502 +-0.01479156003317529111 +-0.01471461242410042856 +-0.01463777341392941481 +-0.01456104301936637924 +-0.01448442125807325974 +-0.01440790814867513002 +-0.01433150371076462835 +-0.01425520796490770473 +-0.01417902093264849193 +-0.01410294263651431027 +-0.01402697310002091850 +-0.01395111234767778749 +-0.01387536040499300072 +-0.01379971729847890606 +-0.01372418305565704759 +-0.01364875770506369414 +-0.01357344127625487867 +-0.01349823379981195809 +-0.01342313530734674625 +-0.01334814583150715009 +-0.01327326540598240158 +-0.01319849406550855503 +-0.01312383184587388209 +-0.01304927878392462409 +-0.01297483491756979378 +-0.01290050028578766314 +-0.01282627492863059118 +-0.01275215888723093410 +-0.01267815220380654438 +-0.01260425492166649189 +-0.01253046708521646409 +-0.01245678873996483929 +-0.01238321993252806605 +-0.01230976071063662712 +-0.01223641112314057845 +-0.01216317122001548713 +-0.01209004105236802934 +-0.01201702067244211393 +-0.01194411013362451854 +-0.01187130949045076683 +-0.01179861879861123126 +-0.01172603811495682991 +-0.01165356749750480134 +-0.01158120700544530007 +-0.01150895669914675686 +-0.01143681664016227284 +-0.01136478689123540838 +-0.01129286751630651474 +-0.01122105858051844138 +-0.01114936015022306021 +-0.01107777229298721050 +-0.01100629507759874788 +-0.01093492857407288993 +-0.01086367285365837272 +-0.01079252798884350502 +-0.01072149405336267694 +-0.01065057112220249222 +-0.01057975927160800279 +-0.01050905857908917759 +-0.01043846912342708683 +-0.01036799098468018689 +-0.01029762424419090883 +-0.01022736898459193980 +-0.01015722528981261204 +-0.01008719324508533521 +-0.01001727293695225257 +-0.00994746445327114245 +-0.00987776788322270415 +-0.00980818331731647328 +-0.00973871084739758204 +-0.00966935056665327135 +-0.00960010256961951400 +-0.00953096695218737765 +-0.00946194381160997758 +-0.00939303324650883099 +-0.00932423535688065193 +-0.00925555024410388075 +-0.00918697801094547559 +-0.00911851876156739329 +-0.00905017260153360460 +-0.00898193963781659249 +-0.00891381997880416263 +-0.00884581373430614465 +-0.00877792101556138654 +-0.00871014193524395110 +-0.00864247660747070531 +-0.00857492514780755326 +-0.00850748767327643741 +-0.00844016430236220645 +-0.00837295515501946044 +-0.00830586035267922435 +-0.00823888001825609333 +-0.00817201427615503635 +-0.00810526325227814599 +-0.00803862707403167273 +-0.00797210587033293262 +-0.00790569977161708487 +-0.00783940890984427541 +-0.00777323341850644656 +-0.00770717343263426988 +-0.00764122908880432265 +-0.00757540052514547087 +-0.00750968788134660260 +-0.00744409129866303084 +-0.00737861091992370217 +-0.00731324688953810965 +-0.00724799935350336350 +-0.00718286845941092534 +-0.00711785435645396342 +-0.00705295719543403820 +-0.00698817712876834748 +-0.00692351431049642758 +-0.00685896889628745052 +-0.00679454104344684104 +-0.00673023091092365879 +-0.00666603865931738281 +-0.00660196445088485732 +-0.00653800844954742152 +-0.00647417082089777988 +-0.00641045173220677975 +-0.00634685135243086198 +-0.00628336985221858348 +-0.00622000740391774089 +-0.00615676418158226605 +-0.00609364036097922394 +-0.00603063611959552080 +-0.00596775163664507897 +-0.00590498709307568214 +-0.00584234267157565049 +-0.00577981855658091757 +-0.00571741493428184946 +-0.00565513199262986967 +-0.00559296992134466087 +-0.00553092891192062328 +-0.00546900915763381783 +-0.00540721085354876289 +-0.00534553419652507300 +-0.00528397938522410203 +-0.00522254662011587076 +-0.00516123610348561551 +-0.00510004803944035662 +-0.00503898263391564828 +-0.00497804009468220173 +-0.00491722063135209466 +-0.00485652445538574829 +-0.00479595178009828167 +-0.00473550282066582517 +-0.00467517779413211682 +-0.00461497691941487129 +-0.00455490041731197986 +-0.00449494851050813264 +-0.00443512142358081906 +-0.00437541938300679053 +-0.00431584261716807041 +-0.00425639135635826928 +-0.00419706583278846822 +-0.00413786628059359309 +-0.00407879293583821457 +-0.00401984603652259364 +-0.00396102582258852764 +-0.00390233253592543738 +-0.00384376642037566026 +-0.00378532772174088516 +-0.00372701668778736969 +-0.00366883356825170375 +-0.00361077861484645482 +-0.00355285208126563312 +-0.00349505422319002857 +-0.00343738529829280522 +-0.00337984556624468116 +-0.00332243528871926062 +-0.00326515472939810239 +-0.00320800415397591880 +-0.00315098383016546458 +-0.00309409402770270117 +-0.00303733501835150733 +-0.00298070707590849734 +-0.00292421047620781234 +-0.00286784549712569125 +-0.00281161241858477167 +-0.00275551152255904897 +-0.00269954309307779633 +-0.00264370741622999830 +-0.00258800478016850671 +-0.00253243547511413205 +-0.00247699979335945161 +-0.00242169802927292817 +-0.00236653047930257153 +-0.00231149744197950988 +-0.00225659921792162538 +-0.00220183610983702748 +-0.00214720842252720187 +-0.00209271646289043269 +-0.00203836053992480963 +-0.00198414096473112844 +-0.00193005805051586028 +-0.00187611211259380069 +-0.00182230346839052835 +-0.00176863243744515108 +-0.00171509934141242989 +-0.00166170450406498763 +-0.00160844825129547743 +-0.00155533091111822769 +-0.00150235281367133407 +-0.00144951429121801222 +-0.00139681567814826067 +-0.00134425731097999887 +-0.00129183952836036276 +-0.00123956267106650341 +-0.00118742708200668227 +-0.00113543310622076779 +-0.00108358109088076138 +-0.00103187138529117653 +-0.00098030434088921072 +-0.00092888031124441499 +-0.00087759965205905634 +-0.00082646272116725257 +-0.00077546987853459705 +-0.00072462148625736895 +-0.00067391790856158242 +-0.00062335951180172273 +-0.00057294666445956871 +-0.00052267973714255833 +-0.00047255910258195400 +-0.00042258513563093938 +-0.00037275821326244107 +-0.00032307871456658144 +-0.00027354702074823854 +-0.00022416351512409208 +-0.00017492858311950459 +-0.00012584261226533024 +-0.00007690599219422538 +-0.00002811911463682659 +0.00002051762658208678 +0.00006900383554804056 +0.00011733911426135711 +0.00016552306264196211 +0.00021355527853431807 +0.00026143535771304643 +0.00030916289388815250 +0.00035673747871101959 +0.00040415870178057349 +0.00045142615064967193 +0.00049853941083171933 +0.00054549806580782528 +0.00059230169703383499 +0.00063894988394805059 +0.00068544220397902104 +0.00073177823255379706 +0.00077795754310628999 +0.00082397970708624412 +0.00086984429396813254 +0.00091555087126070887 +0.00096109900451675403 +0.00100648825734316982 +0.00105171819141126671 +0.00109678836646789858 +0.00114169834034607816 +0.00118644766897676632 +0.00123103590640059293 +0.00127546260478002271 +0.00131972731441184327 +0.00136382958374022347 +0.00140776895936975117 +0.00145154498607928607 +0.00149515720683581995 +0.00153860516280905179 +0.00158188839338607680 +0.00162500643618673736 +0.00166795882707903567 +0.00171074510019528290 +0.00175336478794848628 +0.00179581742104914358 +0.00183810252852256630 +0.00188021963772666339 +0.00192216827436976576 +0.00196394796252942743 +0.00200555822467135547 +0.00204699858166882331 +0.00208826855282253027 +0.00212936765588111945 +0.00217029540706174025 +0.00221105132107143106 +0.00225163491112892033 +0.00229204568898675300 +0.00233228316495403144 +0.00237234684791965550 +0.00241223624537586362 +0.00245195086344250678 +0.00249149020689172756 +0.00253085377917306028 +0.00257004108243917605 +0.00260905161757219806 +0.00264788488421022726 +0.00268654038077470632 +0.00272501760449824762 +0.00276331605145289190 +0.00280143521657894327 +0.00283937459371459656 +0.00287713367562564010 +0.00291471195403606364 +0.00295210891965925560 +0.00298932406222950564 +0.00302635687053440109 +0.00306320683244743668 +0.00309987343496153419 +0.00313635616422296148 +0.00317265450556589688 +0.00320876794354757857 +0.00324469596198421421 +0.00328043804398706323 +0.00331599367199963708 +0.00335136232783523214 +0.00338654349271511187 +0.00342153664730736762 +0.00345634127176643957 +0.00349095684577312377 +0.00352538284857531036 +0.00355961875902945915 +0.00359366405564255772 +0.00362751821661478962 +0.00366118071988296269 +0.00369465104316436853 +0.00372792866400152318 +0.00376101305980749458 +0.00379390370791183587 +0.00382660008560731799 +0.00385910167019734096 +0.00389140793904379839 +0.00392351836961593071 +0.00395543243953971023 +0.00398714962664794680 +0.00401866940903101121 +0.00404999126508856153 +0.00408111467358150508 +0.00411203911368498900 +0.00414276406504210902 +0.00417328900781816382 +0.00420361342275571859 +0.00423373679123046059 +0.00426365859530754808 +0.00429337831779894302 +0.00432289544232127877 +0.00435220945335460310 +0.00438131983630170828 +0.00441022607754834855 +0.00443892766452402138 +0.00446742408576358396 +0.00449571483096963126 +0.00452379939107557753 +0.00455167725830935184 +0.00457934792625821086 +0.00460681088993374326 +0.00463406564583809799 +0.00466111169203071475 +0.00468794852819584638 +0.00471457565571083408 +0.00474099257771516680 +0.00476719879918016502 +0.00479319382697952507 +0.00481897716996053382 +0.00484454833901611526 +0.00486990684715749803 +0.00489505220958774776 +0.00491998394377589701 +0.00494470156953194257 +0.00496920460908252884 +0.00499349258714731469 +0.00501756503101614612 +0.00504142147062705201 +0.00506506143864459291 +0.00508848447053940594 +0.00511169010466816596 +0.00513467788235436474 +0.00515744734796977442 +0.00517999804901670378 +0.00520232953621081219 +0.00522444136356473368 +0.00524633308847239320 +0.00526800427179399938 +0.00528945447794169389 +0.00531068327496596326 +0.00533169023464259706 +0.00535247493256046404 +0.00537303694820985209 +0.00539337586507148119 +0.00541349127070622771 +0.00543338275684545659 +0.00545304991948191483 +0.00547249235896140034 +0.00549170968007490698 +0.00551070149215152419 +0.00552946740915175473 +0.00554800704976174137 +0.00556632003748764453 +0.00558440600075096188 +0.00560226457298428331 +0.00561989539272756463 +0.00563729810372499539 +0.00565447235502242879 +0.00567141780106523042 +0.00568813410179677768 +0.00570462092275731466 +0.00572087793518342297 +0.00573690481610796259 +0.00575270124846027821 +0.00576826692116714449 +0.00578360152925392994 +0.00579870477394628988 +0.00581357636277222024 +0.00582821600966452504 +0.00584262343506365429 +0.00585679836602086192 +0.00587074053630180781 +0.00588444968649040612 +0.00589792556409297723 +0.00591116792364279782 +0.00592417652680477316 +0.00593695114248051804 +0.00594949154691360241 +0.00596179752379498440 +0.00597386886436877644 +0.00598570536753807378 +0.00599730683997097384 +0.00600867309620679076 +0.00601980395876235749 +0.00603069925823841897 +0.00604135883342611039 +0.00605178253141358449 +0.00606197020769252883 +0.00607192172626477237 +0.00608163695974894402 +0.00609111578948701680 +0.00610035810565079471 +0.00610936380734843076 +0.00611813280273069103 +0.00612666500909721159 +0.00613496035300253092 +0.00614301877036202773 +0.00615084020655756302 +0.00615842461654295906 +0.00616577196494917310 +0.00617288222618926023 +0.00617975538456294344 +0.00618639143436092252 +0.00619279037996872412 +0.00619895223597033331 +0.00620487702725115633 +0.00621056478910074657 +0.00621601556731498413 +0.00622122941829765606 +0.00622620640916166177 +0.00623094661782951000 +0.00623545013313328306 +0.00623971705491396973 +0.00624374749412010856 +0.00624754157290576592 +0.00625109942472777680 +0.00625442119444223621 +0.00625750703840019431 +0.00626035712454253886 +0.00626297163249402416 +0.00626535075365638496 +0.00626749469130061590 +0.00626940366065820934 +0.00627107788901140346 +0.00627251761578251008 +0.00627372309262208983 +0.00627469458349610119 +0.00627543236477187249 +0.00627593672530298453 +0.00627620796651290423 +0.00627624640247742040 +0.00627605236000583662 +0.00627562617872083183 +0.00627496821113703029 +0.00627407882273814214 +0.00627295839205282285 +0.00627160731072896882 +0.00627002598360661915 +0.00626821482878932561 +0.00626617427771401780 +0.00626390477521922024 +0.00626140677961176031 +0.00625868076273173018 +0.00625572721001583804 +0.00625254662055901075 +0.00624913950717423308 +0.00624550639645067834 +0.00624164782880990646 +0.00623756435856027275 +0.00623325655394946828 +0.00622872499721507673 +0.00622397028463322292 +0.00621899302656514844 +0.00621379384750190850 +0.00620837338610687357 +0.00620273229525615446 +0.00619687124207700217 +0.00619079090798393961 +0.00618449198871271789 +0.00617797519435211821 +0.00617124124937343168 +0.00616429089265766762 +0.00615712487752046508 +0.00614974397173458608 +0.00614214895755017549 +0.00613434063171241443 +0.00612631980547692027 +0.00611808730462254022 +0.00610964396946174753 +0.00610099065484840612 +0.00609212823018312130 +0.00608305757941587574 +0.00607377960104616733 +0.00606429520812040192 +0.00605460532822676371 +0.00604471090348725551 +0.00603461289054719584 +0.00602431226056182427 +0.00601380999918027254 +0.00600310710652670124 +0.00599220459717864345 +0.00598110350014255041 +0.00596980485882651728 +0.00595830973101008510 +0.00594661918881124549 +0.00593473431865048327 +0.00592265622121197766 +0.00591038601140177807 +0.00589792481830317579 +0.00588527378512901291 +0.00587243406917102931 +0.00585940684174628829 +0.00584619328814056215 +0.00583279460754867075 +0.00581921201301194291 +0.00580544673135250603 +0.00579150000310460749 +0.00577737308244291505 +0.00576306723710772687 +0.00574858374832713879 +0.00573392391073620274 +0.00571908903229298264 +0.00570408043419155363 +0.00568889945077193353 +0.00567354742942701405 +0.00565802573050628102 +0.00564233572721670271 +0.00562647880552035948 +0.00561045636402911826 +0.00559426981389624794 +0.00557792057870500589 +0.00556141009435410019 +0.00554473980894032784 +0.00552791118263799407 +0.00551092568757543654 +0.00549378480770853963 +0.00547649003869127900 +0.00545904288774323124 +0.00544144487351430010 +0.00542369752594634019 +0.00540580238613196790 +0.00538776100617042748 +0.00536957494902065222 +0.00535124578835132880 +0.00533277510838837000 +0.00531416450375934296 +0.00529541557933525028 +0.00527652995006952768 +0.00525750924083430611 +0.00523835508625392510 +0.00521906913053592474 +0.00519965302729922824 +0.00518010843939981352 +0.00516043703875376531 +0.00514064050615785622 +0.00512072053110745017 +0.00510067881161220711 +0.00508051705400909548 +0.00506023697277315811 +0.00503984029032585913 +0.00501932873684116359 +0.00499870405004923437 +0.00497796797503810215 +0.00495712226405292493 +0.00493616867629324049 +0.00491510897770807472 +0.00489394494078901864 +0.00487267834436120369 +0.00485131097337254593 +0.00482984461868082859 +0.00480828107683907695 +0.00478662214987909170 +0.00476486964509324675 +0.00474302537481446820 +0.00472109115619479599 +0.00469906881098215191 +0.00467696016529563913 +0.00465476704939935069 +0.00463249129747479640 +0.00461013474739183863 +0.00458769924047851187 +0.00456518662128942241 +0.00454259873737301433 +0.00451993743903774618 +0.00449720457911705063 +0.00447440201273352923 +0.00445153159706197094 +0.00442859519109159178 +0.00440559465538741587 +0.00438253185185096417 +0.00435940864348006475 +0.00433622689412832898 +0.00431298846826376654 +0.00428969523072706728 +0.00426634904648937486 +0.00424295178040974292 +0.00421950529699214628 +0.00419601146014250519 +0.00417247213292526713 +0.00414888917732003128 +0.00412526445397807216 +0.00410159982197895630 +0.00407789713858706417 +0.00405415825900856501 +0.00403038503614834911 +0.00400657932036736081 +0.00398274295924028361 +0.00395887779731365994 +0.00393498567586436816 +0.00391106843265892276 +0.00388712790171311367 +0.00386316591305249776 +0.00383918429247357687 +0.00381518486130583406 +0.00379116943617453838 +0.00376713982876471492 +0.00374309784558591501 +0.00371904528773814606 +0.00369498395067893465 +0.00367091562399161908 +0.00364684209115477553 +0.00362276512931319645 +0.00359868650905005279 +0.00357460799416058463 +0.00355053134142730440 +0.00352645830039676747 +0.00350239061315787102 +0.00347833001412207413 +0.00345427822980509842 +0.00343023697861059374 +0.00340620797061558104 +0.00338219290735788675 +0.00335819348162537694 +0.00333421137724748120 +0.00331024826888854772 +0.00328630582184343120 +0.00326238569183523886 +0.00323848952481533810 +0.00321461895676552123 +0.00319077561350271030 +0.00316696111048583645 +0.00314317705262522670 +0.00311942503409445068 +0.00309570663814469176 +0.00307202343692155851 +0.00304837699128473767 +0.00302476885063003489 +0.00300120055271421151 +0.00297767362348253265 +0.00295418957689908782 +0.00293074991477976915 +0.00290735612662834566 +0.00288400968947514699 +0.00286071206771875254 +0.00283746471297061965 +0.00281426906390266126 +0.00279112654609773008 +0.00276803857190332939 +0.00274500654028814878 +0.00272203183670180699 +0.00269911583293764743 +0.00267625988699868962 +0.00265346534296662323 +0.00263073353087418501 +0.00260806576658050883 +0.00258546335164977319 +0.00256292757323310118 +0.00254045970395367238 +0.00251806100179501318 +0.00249573270999276994 +0.00247347605692956182 +0.00245129225603322055 +0.00242918250567832712 +0.00240714798909109212 +0.00238518987425745052 +0.00236330931383469962 +0.00234150744506626514 +0.00231978538969991946 +0.00229814425390935167 +0.00227658512821895306 +0.00225510908743220898 +0.00223371719056318857 +0.00221241048077151217 +0.00219118998530062588 +0.00217005671541946202 +0.00214901166636731348 +0.00212805581730225561 +0.00210719013125268287 +0.00208641555507227188 +0.00206573301939822667 +0.00204514343861283455 +0.00202464771080822746 +0.00200424671775459914 +0.00198394132487149421 +0.00196373238120243218 +0.00194362071939275941 +0.00192360715567072471 +0.00190369248983165399 +0.00188387750522550049 +0.00186416296874737436 +0.00184454963083129043 +0.00182503822544702364 +0.00180562947010009427 +0.00178632406583471024 +0.00176712269723997418 +0.00174802603245891074 +0.00172903472320060634 +0.00171014940475529612 +0.00169137069601242801 +0.00167269919948154536 +0.00165413550131627055 +0.00163568017134095209 +0.00161733376308024015 +0.00159909681379147273 +0.00158096984449983225 +0.00156295336003616728 +0.00154504784907770780 +0.00152725378419128277 +0.00150957162187927152 +0.00149200180262815747 +0.00147454475095966332 +0.00145720087548437583 +0.00143997056895802246 +0.00142285420834006708 +0.00140585215485483227 +0.00138896475405499956 +0.00137219233588749723 +0.00135553521476163854 +0.00133899368961970587 +0.00132256804400963956 +0.00130625854616000701 +0.00129006544905715232 +0.00127398899052448707 +0.00125802939330380763 +0.00124218686513883464 +0.00122646159886060984 +0.00121085377247496313 +0.00119536354925189946 +0.00117999107781690963 +0.00116473649224406255 +0.00114959991215108498 +0.00113458144279605716 +0.00111968117517593840 +0.00110489918612677904 +0.00109023553842560808 +0.00107569028089387047 +0.00106126344850259141 +0.00104695506247894435 +0.00103276513041438193 +0.00101869364637422583 +0.00100474059100868107 +0.00099090593166517279 +0.00097718962250215816 +0.00096359160460409983 +0.00095011180609777556 +0.00093675014226979184 +0.00092350651568529876 +0.00091038081630777747 +0.00089737292162007075 +0.00088448269674634217 +0.00087170999457512985 +0.00085905465588338042 +0.00084651650946143860 +0.00083409537223889680 +0.00082179104941143349 +0.00080960333456837647 +0.00079753200982111885 +0.00078557684593229325 +0.00077373760244568181 +0.00076201402781676168 +0.00075040585954401647 +0.00073891282430075926 +0.00072753463806759144 +0.00071627100626540246 +0.00070512162388889547 +0.00069408617564053728 +0.00068316433606506921 +0.00067235576968431620 +0.00066166013113243738 +0.00065107706529151993 +0.00064060620742743964 +0.00063024718332610854 +0.00061999960942987048 +0.00060986309297417446 +0.00059983723212442286 +0.00058992161611299697 +0.00058011582537636098 +0.00057041943169236823 +0.00056083199831754335 +0.00055135308012445891 +0.00054198222373911642 +0.00053271896767833509 +0.00052356284248704582 +0.00051451337087562597 +0.00050557006785704507 +0.00049673244088394345 +0.00048799998998556502 +0.00047937220790452887 +0.00047084858023337470 +0.00046242858555097671 +0.00045411169555864176 +0.00044589737521598719 +0.00043778508287653208 +0.00042977427042299596 +0.00042186438340223052 +0.00041405486115989011 +0.00040634513697465532 +0.00039873463819211535 +0.00039122278635823454 +0.00038380899735240766 +0.00037649268152003374 +0.00036927324380470742 +0.00036215008387985710 +0.00035512259627992889 +0.00034819017053105251 +0.00034135219128118556 +0.00033460803842968469 +0.00032795708725638574 +0.00032139870855004522 +0.00031493226873622763 +0.00030855713000458928 +0.00030227265043555125 +0.00029607818412631833 +0.00028997308131631778 +0.00028395668851192882 +0.00027802834861057735 +0.00027218740102415243 +0.00026643318180174364 +0.00026076502375165482 +0.00025518225656277017 +0.00024968420692514826 +0.00024427019864992240 +0.00023893955278846149 +0.00023369158775079612 +0.00022852561942327118 +0.00022344096128549241 +0.00021843692452645934 +0.00021351281815995335 +0.00020866794913914532 +0.00020390162247042350 +0.00019921314132641238 +0.00019460180715824267 +0.00019006691980697862 +0.00018560777761426325 +0.00018122367753215345 +0.00017691391523214813 +0.00017267778521337987 +0.00016851458091003216 +0.00016442359479789176 +0.00016040411850010134 +0.00015645544289207949 +0.00015257685820561977 +0.00014876765413213852 +0.00014502711992513335 +0.00014135454450176860 +0.00013774921654364957 +0.00013421042459675967 +0.00013073745717056653 +0.00012732960283627930 +0.00012398615032430663 +0.00012070638862084818 +0.00011748960706367170 +0.00011433509543705691 +0.00011124214406591244 +0.00010821004390905095 +0.00010523808665166882 +0.00010232556479697123 +0.00009947177175699164 +0.00009667600194258920 +0.00009393755085263230 +0.00009125571516235576 +0.00008862979281093456 +0.00008605908308822327 +0.00008354288672070636 +0.00008108050595664496 +0.00007867124465043090 +0.00007631440834613650 +0.00007400930436030073 +0.00007175524186390800 +0.00006955153196360009 +0.00006739748778211389 +0.00006529242453793922 +0.00006323565962423341 +0.00006122651268695581 +0.00005926430570225884 +0.00005734836305312869 +0.00005547801160528469 +0.00005365258078233247 +0.00005187140264020413 +0.00005013381194085406 +0.00004843914622524493 +0.00004678674588561793 +0.00004517595423705786 +0.00004360611758834899 +0.00004207658531215262 +0.00004058670991448058 +0.00003913584710349550 +0.00003772335585763454 +0.00003634859849306667 +0.00003501094073048208 +0.00003370975176124071 +0.00003244440431286012 +0.00003121427471386971 +0.00003001874295803045 +0.00002885719276792973 +0.00002772901165795149 +0.00002663359099664633 +0.00002557032606848550 +0.00002453861613502384 +0.00002353786449547162 +0.00002256747854668510 +0.00002162686984257741 +0.00002071545415297148 +0.00001983265152188321 +0.00001897788632525714 +0.00001815058732815587 +0.00001735018774141286 +0.00001657612527775123 +0.00001582784220738795 +0.00001510478541311512 +0.00001440640644487779 +0.00001373216157385117 +0.00001308151184602594 +0.00001245392313530567 +0.00001184886619613321 +0.00001126581671564079 +0.00001070425536534102 +0.00001016366785236234 +0.00000964354497023746 +0.00000914338264924924 +0.00000866268200634905 +0.00000820094939464464 +0.00000775769645247272 +0.00000733244015206028 +0.00000692470284778296 +0.00000653401232402526 +0.00000615990184265578 +0.00000580191019011655 +0.00000545958172413972 +0.00000513246642009613 +0.00000482011991698345 +0.00000452210356305917 +0.00000423798446112975 +0.00000396733551349670 +0.00000370973546657108 +0.00000346476895516112 +0.00000323202654644036 +0.00000301110478360136 +0.00000280160622920510 +0.00000260313950822784 +0.00000241531935081538 +0.00000223776663474958 +0.00000207010842763393 +0.00000191197802880317 +0.00000176301501096574 +0.00000162286526158168 +0.00000149118102398443 +0.00000136762093825140 +0.00000125185008182945 +0.00000114354000992020 +0.00000104236879563259 +0.00000094802106990583 +0.00000086018806121006 +0.00000077856763502926 +0.00000070286433313185 +0.00000063278941263383 +0.00000056806088486051 +0.00000050840355401046 +0.00000045354905562748 +0.00000040323589488517 +0.00000035720948468869 +0.00000031522218359818 +0.00000027703333357882 +0.00000024240929758123 +0.00000021112349695691 +0.00000018295644871280 +0.00000015769580260895 +0.00000013513637810321 +0.00000011508020114699 +0.00000009733654083554 +0.00000008172194591643 +0.00000006806028115990 +0.00000005618276359412 +0.00000004592799860902 +0.00000003714201593145 +0.00000002967830547495 +0.00000002339785306689 +0.00000001816917605582 +0.00000001386835880167 +0.00000001037908805133 +0.00000000759268820197 +0.00000000540815645445 +0.00000000373219785892 +0.00000000247926025467 +0.00000000157156910601 +0.00000000093916223615 +0.00000000051992446044 +0.00000000025962212071 +0.00000000011193752186 +0.00000000003850327215 +0.00000000000893652797 +0.00000000000087314440 +0.00000000000000173200 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 +0.00000000000000000000 diff --git a/examples/USER/misc/cnp/in.cnp b/examples/USER/misc/cnp/in.cnp new file mode 100644 index 0000000000..2c71441483 --- /dev/null +++ b/examples/USER/misc/cnp/in.cnp @@ -0,0 +1,51 @@ +# Generation and relaxation of a partial dislocation in Cu perfect FCC crystal + +# Initialization +units metal +boundary p p p +atom_style atomic + +# create simulation box and system +lattice fcc 3.615 origin 0.01 0.01 0.01 orient x -1 -1 2 orient y 1 1 1 orient z -1 1 0 +region mdbox block 0 3 0.0 14.0 0 84 units lattice +region system block 0 3 1.1 13.1 0 84 units lattice +create_box 2 mdbox +create_atoms 1 region system + +# Define atoms mass and force field +mass * 63.54 +pair_style eam/alloy +pair_coeff * * Cu_Mishin1.eam Cu Cu + +# Delete a plane of atoms along the z direction to generate a partial dislocation +region dislocation_atoms block 0 3 7 14 41.9 42.1 units lattice +delete_atoms region dislocation_atoms +region quarter_up block 0 3 7 11 0 84 units lattice +group middle region quarter_up + +# specify simulation parameters +timestep 0.004 + +# Relax configuration using conjugate gradient +#min_style cg +#minimize 1.0e-4 1.0e-6 100 1000 + +# Setup calculations +compute 1 all cnp/atom 3.086 +compute 2 all cna/atom 3.086 +compute 3 all centro/atom fcc +compute 4 all coord/atom cutoff 3.086 +dump 1 all custom 100 dump.lammpstrj id type xu yu zu c_1 c_2 c_3 c_4 + +### Set up thermo display +thermo 10 +thermo_style custom step atoms temp press pe ke etotal + +# Relax the system performing a langevin dynamics (freeze motion along y 111 direction) +fix 1 all nve +fix 2 all langevin 50 1 0.1 699483 +fix 3 all setforce NULL 0.0 NULL +fix 4 middle setforce 0.0 0.0 0.0 +run 100 +unfix 4 +run 200 diff --git a/examples/USER/misc/cnp/log.31May17.cnp.g++.4 b/examples/USER/misc/cnp/log.31May17.cnp.g++.4 new file mode 100644 index 0000000000..d86d0b5600 --- /dev/null +++ b/examples/USER/misc/cnp/log.31May17.cnp.g++.4 @@ -0,0 +1,185 @@ +LAMMPS (19 May 2017) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# Generation and relaxation of a partial dislocation in Cu perfect FCC crystal + +# Initialization +units metal +boundary p p p +atom_style atomic + +# create simulation box and system +lattice fcc 3.615 origin 0.01 0.01 0.01 orient x -1 -1 2 orient y 1 1 1 orient z -1 1 0 +Lattice spacing in x,y,z = 5.90327 6.26136 5.11238 +region mdbox block 0 3 0.0 14.0 0 84 units lattice +region system block 0 3 1.1 13.1 0 84 units lattice +create_box 2 mdbox +Created orthogonal box = (0 0 0) to (17.7098 87.6591 429.44) + 1 by 1 by 4 MPI processor grid +create_atoms 1 region system +Created 48384 atoms + +# Define atoms mass and force field +mass * 63.54 +pair_style eam/alloy +pair_coeff * * Cu_Mishin1.eam Cu Cu + +# Delete a plane of atoms along the z direction to generate a partial dislocation +region dislocation_atoms block 0 3 7 14 41.9 42.1 units lattice +delete_atoms region dislocation_atoms +Deleted 76 atoms, new total = 48308 +region quarter_up block 0 3 7 11 0 84 units lattice +group middle region quarter_up +16080 atoms in group middle + +# specify simulation parameters +timestep 0.004 + +# Relax configuration using conjugate gradient +#min_style cg +#minimize 1.0e-4 1.0e-6 100 1000 + +# Setup calculations +compute 1 all cnp/atom 3.086 +compute 2 all cna/atom 3.086 +compute 3 all centro/atom fcc +compute 4 all coord/atom cutoff 3.086 +dump 1 all custom 100 dump.lammpstrj id type xu yu zu c_1 c_2 c_3 c_4 + +### Set up thermo display +thermo 10 +thermo_style custom step atoms temp press pe ke etotal + +# Relax the system performing a langevin dynamics (freeze motion along y 111 direction) +fix 1 all nve +fix 2 all langevin 50 1 0.1 699483 +fix 3 all setforce NULL 0.0 NULL +fix 4 middle setforce 0.0 0.0 0.0 +run 100 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7.50679 + ghost atom cutoff = 7.50679 + binsize = 3.75339, bins = 5 24 115 + 5 neighbor lists, perpetual/occasional/extra = 1 4 0 + (1) pair eam/alloy, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + (2) compute cnp/atom, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (3) compute cna/atom, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (4) compute centro/atom, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (5) compute coord/atom, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 45.41 | 45.41 | 45.41 Mbytes +Step Atoms Temp Press PotEng KinEng TotEng + 0 48308 0 -3388.0911 -169746.07 0 -169746.07 + 10 48308 7.35092 -3091.0864 -169715.96 45.900393 -169670.05 + 20 48308 9.9162268 -2822.7045 -169678.51 61.918604 -169616.59 + 30 48308 12.351316 -2726.7195 -169666.35 77.123716 -169589.23 + 40 48308 13.302856 -2703.586 -169662.9 83.06529 -169579.83 + 50 48308 12.782228 -2706.8662 -169662.36 79.814401 -169582.55 + 60 48308 12.198179 -2772.4206 -169670.02 76.167503 -169593.86 + 70 48308 10.663322 -2841.3384 -169677.48 66.583595 -169610.9 + 80 48308 9.1169804 -2932.3896 -169687.85 56.927974 -169630.92 + 90 48308 7.2905076 -3029.9433 -169699.09 45.523167 -169653.56 + 100 48308 5.4063635 -3139.4496 -169711.65 33.758252 -169677.89 +Loop time of 10.9003 on 4 procs for 100 steps with 48308 atoms + +Performance: 3.171 ns/day, 7.570 hours/ns, 9.174 timesteps/s +31.8% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 9.8764 | 9.9587 | 10.021 | 1.6 | 91.36 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.1232 | 0.18385 | 0.26683 | 12.1 | 1.69 +Output | 0.45385 | 0.45451 | 0.45634 | 0.2 | 4.17 +Modify | 0.25026 | 0.2537 | 0.25744 | 0.5 | 2.33 +Other | | 0.04949 | | | 0.45 + +Nlocal: 12077 ave 12096 max 12020 min +Histogram: 1 0 0 0 0 0 0 0 0 3 +Nghost: 14204 ave 14261 max 14109 min +Histogram: 1 0 0 0 0 1 0 0 0 2 +Neighs: 814050 ave 818584 max 809212 min +Histogram: 1 0 0 0 0 2 0 0 0 1 +FullNghs: 1.6281e+06 ave 1.63296e+06 max 1.61808e+06 min +Histogram: 1 0 0 0 0 0 1 0 0 2 + +Total # of neighbors = 6512400 +Ave neighs/atom = 134.81 +Neighbor list builds = 0 +Dangerous builds = 0 +unfix 4 +run 200 +Per MPI rank memory allocation (min/avg/max) = 45.41 | 45.41 | 45.41 Mbytes +Step Atoms Temp Press PotEng KinEng TotEng + 100 48308 5.4063635 -3139.4496 -169711.65 33.758252 -169677.89 + 110 48308 15.260795 -2793.119 -169677.24 95.290993 -169581.95 + 120 48308 18.548656 -2433.1584 -169624.79 115.82096 -169508.97 + 130 48308 22.15831 -2276.626 -169604.28 138.36025 -169465.92 + 140 48308 24.393841 -2208.1771 -169596.16 152.31929 -169443.84 + 150 48308 24.797558 -2173.3145 -169591.43 154.84016 -169436.59 + 160 48308 24.73371 -2188.909 -169593.08 154.44148 -169438.64 + 170 48308 24.128467 -2220.3404 -169596.96 150.66225 -169446.29 + 180 48308 22.975708 -2275.1244 -169602.72 143.46422 -169459.26 + 190 48308 21.936324 -2348.3762 -169610.59 136.97413 -169473.61 + 200 48308 20.516249 -2432.8447 -169619.98 128.10694 -169491.87 + 210 48308 19.000566 -2510.2915 -169628.58 118.64276 -169509.93 + 220 48308 17.490407 -2597.299 -169638.24 109.21307 -169529.03 + 230 48308 16.062482 -2684.1203 -169648.31 100.29687 -169548.01 + 240 48308 14.360342 -2768.2313 -169657.7 89.668411 -169568.03 + 250 48308 12.802315 -2852.6965 -169666.99 79.939831 -169587.05 + 260 48308 11.258205 -2944.4533 -169677.52 70.298142 -169607.23 + 270 48308 9.6159129 -3038.6304 -169688.06 60.043393 -169628.02 + 280 48308 7.972425 -3129.0826 -169698.03 49.781176 -169648.25 + 290 48308 6.3752377 -3219.2054 -169708.23 39.808067 -169668.42 + 300 48308 4.7374688 -3306.1468 -169718.27 29.58156 -169688.69 +Loop time of 23.0164 on 4 procs for 200 steps with 48308 atoms + +Performance: 3.003 ns/day, 7.992 hours/ns, 8.689 timesteps/s +31.8% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 20.221 | 20.423 | 20.57 | 3.1 | 88.73 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.27748 | 0.42603 | 0.62832 | 21.4 | 1.85 +Output | 1.5454 | 1.5473 | 1.5529 | 0.3 | 6.72 +Modify | 0.48886 | 0.49773 | 0.50842 | 1.1 | 2.16 +Other | | 0.1221 | | | 0.53 + +Nlocal: 12077 ave 12096 max 12020 min +Histogram: 1 0 0 0 0 0 0 0 0 3 +Nghost: 14204 ave 14261 max 14109 min +Histogram: 1 0 0 0 0 1 0 0 0 2 +Neighs: 814094 ave 818584 max 809212 min +Histogram: 1 0 0 0 0 2 0 0 0 1 +FullNghs: 1.62852e+06 ave 1.63296e+06 max 1.61892e+06 min +Histogram: 1 0 0 0 0 0 0 1 0 2 + +Total # of neighbors = 6514094 +Ave neighs/atom = 134.845 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:35 -- GitLab From f57f1efdff0cea43fcad22b4061a3c944fa91110 Mon Sep 17 00:00:00 2001 From: Anders Hafreager Date: Wed, 31 May 2017 00:34:26 -0700 Subject: [PATCH 226/593] Setting lattice to NULL before creating --- src/domain.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/domain.cpp b/src/domain.cpp index 8ead12cd4e..aadd1b751f 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -1697,6 +1697,7 @@ int Domain::ownatom(int id, double *x, imageint *image, int shrinkexceed) void Domain::set_lattice(int narg, char **arg) { if (lattice) delete lattice; + lattice = NULL; lattice = new Lattice(lmp,narg,arg); } -- GitLab From 937cf0b996e5a31ebaeecbe412f03a4abaa508e0 Mon Sep 17 00:00:00 2001 From: Markus Hoehnerbach Date: Wed, 31 May 2017 12:20:12 +0200 Subject: [PATCH 227/593] Bugfix: Kronecker term ignored in spline forces. The code ignored the kronecker(ktype, 0) or kronecker(ltype, 0) terms in the contributing terms to NconjtmpI and NconjtmpJ. The issue was present both in ::bondorder and ::bondorderLJ and led to energy conservation issues. It has been fixed by checking for the atom type before entering the offending calculations and adding clarifying comments. --- src/MANYBODY/pair_airebo.cpp | 32 ++++++++++++++++++++++++++++++++ src/USER-OMP/pair_airebo_omp.cpp | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index cc7efbcaa6..d83f5a39a8 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -1615,6 +1615,10 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], if (vflag_atom) v_tally2(atomi,atomk,-tmp2,rik); + // due to kronecker(ktype, 0) term in contribution + // to NconjtmpI and later Nijconj + if (ktype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpI*dwik*SpN)/rikmag; f[atomi][0] -= tmp2*rik[0]; f[atomi][1] -= tmp2*rik[1]; @@ -1678,6 +1682,10 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], if (vflag_atom) v_tally2(atomj,atoml,-tmp2,rjl); + // due to kronecker(ltype, 0) term in contribution + // to NconjtmpJ and later Nijconj + if (ltype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpJ*dwjl*SpN)/rjlmag; f[atomj][0] -= tmp2*rjl[0]; f[atomj][1] -= tmp2*rjl[1]; @@ -1960,6 +1968,10 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], if (vflag_atom) v_tally2(atomi,atomk,-tmp2,rik); + // due to kronecker(ktype, 0) term in contribution + // to NconjtmpI and later Nijconj + if (ktype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpI*dwik*SpN)*Etmp/rikmag; f[atomi][0] -= tmp2*rik[0]; f[atomi][1] -= tmp2*rik[1]; @@ -2023,6 +2035,10 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], if (vflag_atom) v_tally2(atomj,atoml,-tmp2,rjl); + // due to kronecker(ltype, 0) term in contribution + // to NconjtmpJ and later Nijconj + if (ltype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpJ*dwjl*SpN)*Etmp/rjlmag; f[atomj][0] -= tmp2*rjl[0]; f[atomj][1] -= tmp2*rjl[1]; @@ -2560,6 +2576,10 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, if (vflag_atom) v_tally2(atomi,atomk,-tmp2,rik); + // due to kronecker(ktype, 0) term in contribution + // to NconjtmpI and later Nijconj + if (ktype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpI*dwik*SpN)/rikmag; f[atomi][0] -= tmp2*rik[0]; f[atomi][1] -= tmp2*rik[1]; @@ -2623,6 +2643,10 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, if (vflag_atom) v_tally2(atomj,atoml,-tmp2,rjl); + // due to kronecker(ltype, 0) term in contribution + // to NconjtmpJ and later Nijconj + if (ltype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpJ*dwjl*SpN)/rjlmag; f[atomj][0] -= tmp2*rjl[0]; f[atomj][1] -= tmp2*rjl[1]; @@ -2895,6 +2919,10 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, if (vflag_atom) v_tally2(atomi,atomk,-tmp2,rik); + // due to kronecker(ktype, 0) term in contribution + // to NconjtmpI and later Nijconj + if (ktype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpI*dwik*SpN)*Etmp/rikmag; f[atomi][0] -= tmp2*rik[0]; f[atomi][1] -= tmp2*rik[1]; @@ -2958,6 +2986,10 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, if (vflag_atom) v_tally2(atomj,atoml,-tmp2,rjl); + // due to kronecker(ltype, 0) term in contribution + // to NconjtmpJ and later Nijconj + if (ltype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpJ*dwjl*SpN)*Etmp/rjlmag; f[atomj][0] -= tmp2*rjl[0]; f[atomj][1] -= tmp2*rjl[1]; diff --git a/src/USER-OMP/pair_airebo_omp.cpp b/src/USER-OMP/pair_airebo_omp.cpp index 95f9d8b401..206e8e86e6 100644 --- a/src/USER-OMP/pair_airebo_omp.cpp +++ b/src/USER-OMP/pair_airebo_omp.cpp @@ -1387,6 +1387,10 @@ double PairAIREBOOMP::bondorder_thr(int i, int j, double rij[3], double rijmag, if (vflag_atom) v_tally2_thr(atomi,atomk,-tmp2,rik,thr); + // due to kronecker(ktype, 0) term in contribution + // to NconjtmpI and later Nijconj + if (ktype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpI*dwik*SpN)/rikmag; f[atomi][0] -= tmp2*rik[0]; f[atomi][1] -= tmp2*rik[1]; @@ -1450,6 +1454,10 @@ double PairAIREBOOMP::bondorder_thr(int i, int j, double rij[3], double rijmag, if (vflag_atom) v_tally2_thr(atomj,atoml,-tmp2,rjl,thr); + // due to kronecker(ltype, 0) term in contribution + // to NconjtmpJ and later Nijconj + if (ltype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpJ*dwjl*SpN)/rjlmag; f[atomj][0] -= tmp2*rjl[0]; f[atomj][1] -= tmp2*rjl[1]; @@ -1732,6 +1740,10 @@ double PairAIREBOOMP::bondorder_thr(int i, int j, double rij[3], double rijmag, if (vflag_atom) v_tally2_thr(atomi,atomk,-tmp2,rik,thr); + // due to kronecker(ktype, 0) term in contribution + // to NconjtmpI and later Nijconj + if (ktype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpI*dwik*SpN)*Etmp/rikmag; f[atomi][0] -= tmp2*rik[0]; f[atomi][1] -= tmp2*rik[1]; @@ -1795,6 +1807,10 @@ double PairAIREBOOMP::bondorder_thr(int i, int j, double rij[3], double rijmag, if (vflag_atom) v_tally2_thr(atomj,atoml,-tmp2,rjl,thr); + // due to kronecker(ltype, 0) term in contribution + // to NconjtmpJ and later Nijconj + if (ltype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpJ*dwjl*SpN)*Etmp/rjlmag; f[atomj][0] -= tmp2*rjl[0]; f[atomj][1] -= tmp2*rjl[1]; @@ -2332,6 +2348,10 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag if (vflag_atom) v_tally2_thr(atomi,atomk,-tmp2,rik,thr); + // due to kronecker(ktype, 0) term in contribution + // to NconjtmpI and later Nijconj + if (ktype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpI*dwik*SpN)/rikmag; f[atomi][0] -= tmp2*rik[0]; f[atomi][1] -= tmp2*rik[1]; @@ -2395,6 +2415,10 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag if (vflag_atom) v_tally2_thr(atomj,atoml,-tmp2,rjl,thr); + // due to kronecker(ltype, 0) term in contribution + // to NconjtmpJ and later Nijconj + if (ltype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpJ*dwjl*SpN)/rjlmag; f[atomj][0] -= tmp2*rjl[0]; f[atomj][1] -= tmp2*rjl[1]; @@ -2667,6 +2691,10 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag if (vflag_atom) v_tally2_thr(atomi,atomk,-tmp2,rik,thr); + // due to kronecker(ktype, 0) term in contribution + // to NconjtmpI and later Nijconj + if (ktype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpI*dwik*SpN)*Etmp/rikmag; f[atomi][0] -= tmp2*rik[0]; f[atomi][1] -= tmp2*rik[1]; @@ -2730,6 +2758,10 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag if (vflag_atom) v_tally2_thr(atomj,atoml,-tmp2,rjl,thr); + // due to kronecker(ltype, 0) term in contribution + // to NconjtmpJ and later Nijconj + if (ltype != 0) continue; + tmp2 = VA*dN3[2]*(2.0*NconjtmpJ*dwjl*SpN)*Etmp/rjlmag; f[atomj][0] -= tmp2*rjl[0]; f[atomj][1] -= tmp2*rjl[1]; -- GitLab From d2b65590392e5782ebb2217129d78d555a7dd3c8 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 31 May 2017 10:52:03 -0600 Subject: [PATCH 228/593] Fixing issue in fix_qeq_reax --- src/USER-REAXC/fix_qeq_reax.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index cf2e6612a2..9d165f3fd3 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -140,12 +140,12 @@ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) : FixQEqReax::~FixQEqReax() { + if (copymode) return; + delete[] pertype_option; // unregister callbacks to this fix from Atom class - if (copymode) return; - atom->delete_callback(id,0); memory->destroy(s_hist); -- GitLab From af5f19604cceb62f547132c723de6ea49d9aaf6e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 31 May 2017 23:36:39 -0400 Subject: [PATCH 229/593] remove no longer correct sentence from set command docs --- doc/src/set.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/src/set.txt b/doc/src/set.txt index 0b428d56ed..14460c9741 100644 --- a/doc/src/set.txt +++ b/doc/src/set.txt @@ -364,9 +364,8 @@ A value of -1 means subtract 1 box length to get the true value. LAMMPS updates these flags as atoms cross periodic boundaries during the simulation. The flags can be output with atom snapshots via the "dump"_dump.html command. If a value of NULL is specified for any of -nx,ny,nz, then the current image value for that dimension is -unchanged. For non-periodic dimensions only a value of 0 can be -specified. This keyword does not allow use of atom-style variables. +nx,ny,nz, then the current image value for that dimension is unchanged. +For non-periodic dimensions only a value of 0 can be specified. This command can be useful after a system has been equilibrated and atoms have diffused one or more box lengths in various directions. This command can then reset the image values for atoms so that they -- GitLab From f59ee5bd62c7a830991ae63c54c9b45cab5ef4a2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 2 Jun 2017 08:45:15 -0400 Subject: [PATCH 230/593] enable support for dynamic groups in fix planeforce and fix lineforce --- src/fix_lineforce.cpp | 2 ++ src/fix_planeforce.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/fix_lineforce.cpp b/src/fix_lineforce.cpp index f82ed957f7..1e78bf3ec3 100644 --- a/src/fix_lineforce.cpp +++ b/src/fix_lineforce.cpp @@ -29,6 +29,8 @@ using namespace FixConst; FixLineForce::FixLineForce(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { + dynamic_group_allow = 1; + if (narg != 6) error->all(FLERR,"Illegal fix lineforce command"); xdir = force->numeric(FLERR,arg[3]); ydir = force->numeric(FLERR,arg[4]); diff --git a/src/fix_planeforce.cpp b/src/fix_planeforce.cpp index 872bd98716..5e999c888c 100644 --- a/src/fix_planeforce.cpp +++ b/src/fix_planeforce.cpp @@ -29,6 +29,8 @@ using namespace FixConst; FixPlaneForce::FixPlaneForce(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { + dynamic_group_allow = 1; + if (narg != 6) error->all(FLERR,"Illegal fix planeforce command"); xdir = force->numeric(FLERR,arg[3]); ydir = force->numeric(FLERR,arg[4]); -- GitLab From e03cc994673e6b43ef41368f772d46f9ba3b7086 Mon Sep 17 00:00:00 2001 From: Emile Maras Date: Fri, 2 Jun 2017 23:42:16 +0200 Subject: [PATCH 231/593] made the command options more lammps standard style --- doc/src/fix_neb.txt | 54 +++++++++++++++++++++------------ examples/neb/in.neb.hop1 | 2 +- examples/neb/in.neb.hop1freeend | 2 +- examples/neb/in.neb.hop2 | 2 +- examples/neb/in.neb.sivac | 2 +- src/REPLICA/fix_neb.cpp | 49 +++++++++++++++++------------- src/REPLICA/fix_neb.h | 2 +- 7 files changed, 67 insertions(+), 46 deletions(-) diff --git a/doc/src/fix_neb.txt b/doc/src/fix_neb.txt index a5c4bf4396..cd0fa23e85 100644 --- a/doc/src/fix_neb.txt +++ b/doc/src/fix_neb.txt @@ -12,22 +12,33 @@ fix neb command :h3 fix ID group-ID neb Kspring keyword value :pre -ID, group-ID are documented in "fix"_fix.html command -neb = style name of this fix command -Kspring = parallel spring constant (force/distance units) -keyword = {idealpos} or {neigh} or {perp} or {freeend} :ul - {idealpos} = each replica is attached with a spring to its interpolated ideal position (default) - {neigh} = each replica is connected with spring to the previous and next replica. - {perp} value = set spring constant for the perpendicular spring to {value} - {freeend} flag = set behavior for the end points - flag = {ini} or {final} or {finaleini} or {final2eini} +ID, group-ID are documented in "fix"_fix.html command :ulb,l +neb = style name of this fix command :l +Kspring = parallel spring constant (force/distance units or force units) :l +zero or more keyword/value pairs may be appended :l +keyword = {nudg_style} or {perp} or {freend} or {freend_k_spring} :l + {nudg_style} value = {neigh} or {idealpos} + {neigh} = the parallel nudging force is calculated from the distance to neighbouring replicas (in this case, Kspring is in force/distance units) + {idealpos} = the parallel nudging force is proportional to the distance between the replica and its interpolated ideal position (in this case Kspring is in force units) + {perp} value {none} or kspring2 + {none} = no perpendicular spring force is applied + {freeend} value = {none} or {ini} or {final} or {finaleini} or {final2eini} + {none} = no nudging force is apply to the first and last replicas + {ini} = set the first replica to be a free end + {final} = set the last replica to be a free end + {finaleini} = set the last replica to be a free end and set its target energy as that of the first replica + {final2eini} = same as {finaleini} plus prevent intermediate replicas to have a lower energy than the first replica + {freeend_kspring} value = kspring2 + kspring2 = spring constant of the perpendicular spring force (per distance units) +flag = set behavior for the end points + flag = :pre [Examples:] fix 1 active neb 10.0 fix 2 all neb 1.0 perp 1.0 freeend final -fix 1 all neb 1.0 neigh freeend final2eini :pre +fix 1 all neb 1.0 nudg_style idealpos freeend final2eini freend_kspring 1:pre [Description:] @@ -109,11 +120,11 @@ replica, a free end neb calculation with the value {finaleini} or :line -The keywords {idealpos} and {neigh} allow to specify how to parallel -spring force is computed. If the keyword {idealpos} is used or by -default, the spring force is computed as suggested in "(E)"_#E : +The keyword {nudg_style} allow to specify how to parallel +nudging force is computed. With a value of idealpos, the spring +force is computed as suggested in "(E)"_#E : -Fspringparallel=-{Kspring}* (RD-RDideal)/(2 meanDist) :pre +Fnudgparallel=-{Kspring}* (RD-RDideal)/(2 meanDist) :pre where RD is the "reaction coordinate" see "neb"_neb.html section, and RDideal is the ideal RD for which all the images are equally spaced @@ -121,13 +132,14 @@ RDideal is the ideal RD for which all the images are equally spaced is the replica number). The meanDist is the average distance between replicas. -If the keyword {neigh} is used, the parallel spring force is computed -as in "(Henkelman1)"_#Henkelman1 by connecting each intermediate -replica with the previous and the next image: +When {nudg_style} has a value of neigh (or by default), the parallel +nudging force is computed as in "(Henkelman1)"_#Henkelman1 by +connecting each intermediate replica with the previous and the next +image: -Fspringparallel= {Kspring}* (|Ri+1 - Ri| - |Ri - Ri-1|) :pre +Fnudgparallel= {Kspring}* (|Ri+1 - Ri| - |Ri - Ri-1|) :pre -The parallel spring force associated with the key word idealpos should +The parallel nudging force associated with the key word idealpos should usually be more efficient at keeping the images equally spaced. :line @@ -172,7 +184,9 @@ for more info on packages. [Default:] -none +The option defaults are nudg_style = neigh, perp = none, freeend = none and freend_kspring = 1. + +:line :link(Henkelman1) [(Henkelman1)] Henkelman and Jonsson, J Chem Phys, 113, 9978-9985 (2000). diff --git a/examples/neb/in.neb.hop1 b/examples/neb/in.neb.hop1 index 495b2faa93..b874d1ba32 100644 --- a/examples/neb/in.neb.hop1 +++ b/examples/neb/in.neb.hop1 @@ -51,7 +51,7 @@ set group nebatoms type 3 group nonneb subtract all nebatoms fix 1 lower setforce 0.0 0.0 0.0 -fix 2 nebatoms neb 1.0 neigh +fix 2 nebatoms neb 1.0 nudg_style idealpos fix 3 all enforce2d thermo 100 diff --git a/examples/neb/in.neb.hop1freeend b/examples/neb/in.neb.hop1freeend index fc0677f30a..fa90e9a98c 100644 --- a/examples/neb/in.neb.hop1freeend +++ b/examples/neb/in.neb.hop1freeend @@ -41,7 +41,7 @@ set group nebatoms type 3 group nonneb subtract all nebatoms fix 1 lower setforce 0.0 0.0 0.0 -fix 2 nebatoms neb 1.0 freeend ini +fix 2 nebatoms neb 1.0 nudg_style idealpos freeend ini fix 3 all enforce2d thermo 100 diff --git a/examples/neb/in.neb.hop2 b/examples/neb/in.neb.hop2 index 9a8986f454..242de759fa 100644 --- a/examples/neb/in.neb.hop2 +++ b/examples/neb/in.neb.hop2 @@ -53,7 +53,7 @@ set group nebatoms type 3 group nonneb subtract all nebatoms fix 1 lower setforce 0.0 0.0 0.0 -fix 2 nebatoms neb 1.0 neigh +fix 2 nebatoms neb 1.0 fix 3 all enforce2d thermo 100 diff --git a/examples/neb/in.neb.sivac b/examples/neb/in.neb.sivac index 2fdf46f9d5..941d063b90 100644 --- a/examples/neb/in.neb.sivac +++ b/examples/neb/in.neb.sivac @@ -66,7 +66,7 @@ minimize 1.0e-6 1.0e-4 1000 10000 reset_timestep 0 -fix 1 all neb 1.0 neigh +fix 1 all neb 1.0 thermo 100 diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index f66167f2a2..b17315ca0d 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -46,12 +46,13 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : displacements(NULL) { - NEBLongRange=true; - StandardNEB=PerpSpring=FreeEndIni=FreeEndFinal=false; + NEBLongRange=false; + StandardNEB=true; + PerpSpring=FreeEndIni=FreeEndFinal=false; FreeEndFinalWithRespToEIni=FinalAndInterWithRespToEIni=false; kspringPerp=0.0; - + kspring2=1.0; if (narg < 4) error->all(FLERR,"Illegal fix neb command, argument missing"); @@ -62,21 +63,23 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : int iarg =4; while (iarg < narg) { - if (strcmp (arg[iarg],"idealpos")==0) { - NEBLongRange = true; - iarg+=1; - } else if (strcmp (arg[iarg],"neigh")==0) { - NEBLongRange = false; - StandardNEB = true; - iarg+=1; - } else if (strcmp (arg[iarg],"perp")==0) { + if (strcmp (arg[iarg],"nudg_style")==0) { + if (strcmp (arg[iarg+1],"idealpos")==0) { + NEBLongRange = true; + iarg+=2;} + else if (strcmp (arg[iarg+1],"neigh")==0) { + NEBLongRange = false; + StandardNEB = true; + iarg+=2;} + else error->all(FLERR,"Illegal fix neb command. Unknown keyword");} + else if (strcmp (arg[iarg],"perp")==0) { PerpSpring=true; kspringPerp = force->numeric(FLERR,arg[iarg+1]); if (kspringPerp < 0.0) error->all(FLERR,"Illegal fix neb command. " "The perpendicular spring force was not provided properly"); - iarg+=2; - } else if (strcmp (arg[iarg],"freeend")==0) { + iarg+=2;} + else if (strcmp (arg[iarg],"freeend")==0) { if (strcmp (arg[iarg+1],"ini")==0) FreeEndIni=true; else if (strcmp (arg[iarg+1],"final")==0) @@ -86,8 +89,12 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : else if (strcmp (arg[iarg+1],"final2eini")==0) { FinalAndInterWithRespToEIni=true; FreeEndFinalWithRespToEIni=true;} - iarg+=2; - } else error->all(FLERR,"Illegal fix neb command. Unknown keyword"); + else if (strcmp (arg[iarg+1],"none")!=0) error->all(FLERR,"Illegal fix neb command. Unknown keyword"); + iarg+=2;} + else if (strcmp (arg[iarg],"freeend_kspring")==0) { + kspring2=force->numeric(FLERR,arg[iarg+1]); + iarg+=2; } + else error->all(FLERR,"Illegal fix neb command. Unknown keyword"); } // nreplica = number of partitions @@ -468,8 +475,8 @@ void FixNEB::min_post_force(int vflag) MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); dot=dotall/tlen; - if (dot<0) prefactor = -dot - (veng-EIniIni); - else prefactor = -dot + (veng-EIniIni); + if (dot<0) prefactor = -dot - kspring2*(veng-EIniIni); + else prefactor = -dot + kspring2*(veng-EIniIni); for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -486,8 +493,8 @@ void FixNEB::min_post_force(int vflag) MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); dot=dotall/tlen; - if (dot<0) prefactor = -dot - (veng-EFinalIni); - else prefactor = -dot + (veng-EFinalIni); + if (dot<0) prefactor = -dot - kspring2*(veng-EFinalIni); + else prefactor = -dot + kspring2*(veng-EFinalIni); for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -504,8 +511,8 @@ void FixNEB::min_post_force(int vflag) MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); dot=dotall/tlen; - if (dot<0) prefactor = -dot - (veng-vIni); - else prefactor = -dot + (veng-vIni); + if (dot<0) prefactor = -dot - kspring2*(veng-vIni); + else prefactor = -dot + kspring2*(veng-vIni); for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { diff --git a/src/REPLICA/fix_neb.h b/src/REPLICA/fix_neb.h index 1582912dac..7e9e6db865 100644 --- a/src/REPLICA/fix_neb.h +++ b/src/REPLICA/fix_neb.h @@ -38,7 +38,7 @@ class FixNEB : public Fix { private: int me,nprocs,nprocs_universe; - double kspring,kspringPerp,EIniIni,EFinalIni; + double kspring,kspring2,kspringPerp,EIniIni,EFinalIni; bool StandardNEB,NEBLongRange,PerpSpring,FreeEndIni,FreeEndFinal; bool FreeEndFinalWithRespToEIni,FinalAndInterWithRespToEIni; int ireplica,nreplica; -- GitLab From ff58ccac2870341b1ca911f056853c150d510394 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 4 Jun 2017 21:21:32 -0400 Subject: [PATCH 232/593] add clarification to impact of special bonds to manybody potentials --- doc/src/special_bonds.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/src/special_bonds.txt b/doc/src/special_bonds.txt index 6924b321a0..6a661015bd 100644 --- a/doc/src/special_bonds.txt +++ b/doc/src/special_bonds.txt @@ -65,7 +65,13 @@ sense to define permanent bonds between atoms that interact via these potentials, though such bonds may exist elsewhere in your system, e.g. when using the "pair_style hybrid"_pair_hybrid.html command. Thus LAMMPS ignores special_bonds settings when manybody potentials -are calculated. +are calculated. Please note, that the existence of explicit bonds +for atoms that are described by a manybody potential will alter the +neigborlist and thus can render the computation of those interactions +invalid, since those pairs are not only used to determine direct +pairwise interactions but also neighbors of neighbors and more. +The recommended course of action is to remove such bonds, or - if +that is not possible - use a special bonds setting of 1.0 1.0 1.0. NOTE: Unlike some commands in LAMMPS, you cannot use this command multiple times in an incremental fashion: e.g. to first set the LJ -- GitLab From 95d6f05a764ef646e733818301f0fd8c0d1e08bb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Jun 2017 12:41:37 -0400 Subject: [PATCH 233/593] add 3 APIs to Modify for checking if atoms overlap with any rigid fixes --- src/modify.cpp | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/modify.h | 3 ++ 2 files changed, 95 insertions(+) diff --git a/src/modify.cpp b/src/modify.cpp index 7af4576038..4422ee6890 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -23,6 +23,7 @@ #include "group.h" #include "update.h" #include "domain.h" +#include "region.h" #include "input.h" #include "variable.h" #include "memory.h" @@ -995,6 +996,97 @@ int Modify::check_package(const char *package_fix_name) return 1; } + +/* ---------------------------------------------------------------------- + check if the group indicated by groupbit overlaps with any + currently existing rigid fixes. return 1 in this case otherwise 0 +------------------------------------------------------------------------- */ + +int Modify::check_rigid_group_overlap(int groupbit) +{ + const int * const mask = atom->mask; + const int nlocal = atom->nlocal; + + int n = 0; + for (int ifix = 0; ifix < nfix; ifix++) { + if (strncmp("rigid",fix[ifix]->style,5) == 0) { + const int bothbits = groupbit | fix[ifix]->groupbit; + for (int i=0; i < nlocal; ++i) + if (mask[i] & bothbits) {++n; break;} + if (n > 0) break; + } + } + + int n_all = 0; + MPI_Allreduce(&n,&n_all,1,MPI_INT,MPI_SUM,world); + + if (n_all > 0) return 1; + return 0; +} + +/* ---------------------------------------------------------------------- + check if the atoms in the region indicated by regionid overlap with any + currently existing rigid fixes. return 1 in this case otherwise 0 +------------------------------------------------------------------------- */ + +int Modify::check_rigid_region_overlap(Region *reg) +{ + const int * const mask = atom->mask; + const double * const * const x = atom->x; + const int nlocal = atom->nlocal; + + int n = 0; + reg->prematch(); + for (int ifix = 0; ifix < nfix; ifix++) { + if (strncmp("rigid",fix[ifix]->style,5) == 0) { + const int groupbit = fix[ifix]->groupbit; + for (int i=0; i < nlocal; ++i) + if ((mask[i] & groupbit) && reg->match(x[i][0],x[i][1],x[i][2])) { + ++n; + break; + } + if (n > 0) break; + } + } + + int n_all = 0; + MPI_Allreduce(&n,&n_all,1,MPI_INT,MPI_SUM,world); + + if (n_all > 0) return 1; + return 0; +} + +/* ---------------------------------------------------------------------- + check if the atoms in the selection list (length atom->nlocal, + content: 1 if atom is contained, 0 if not) overlap with currently + existing rigid fixes. return 1 in this case otherwise 0 +------------------------------------------------------------------------- */ + +int Modify::check_rigid_list_overlap(int *select) +{ + const int * const mask = atom->mask; + const int nlocal = atom->nlocal; + + int n = 0; + for (int ifix = 0; ifix < nfix; ifix++) { + if (strncmp("rigid",fix[ifix]->style,5) == 0) { + const int groupbit = fix[ifix]->groupbit; + for (int i=0; i < nlocal; ++i) + if ((mask[i] & groupbit) && select[i]) { + ++n; + break; + } + if (n > 0) break; + } + } + + int n_all = 0; + MPI_Allreduce(&n,&n_all,1,MPI_INT,MPI_SUM,world); + + if (n_all > 0) return 1; + return 0; +} + /* ---------------------------------------------------------------------- add a new compute ------------------------------------------------------------------------- */ diff --git a/src/modify.h b/src/modify.h index 3ded3cbab6..2ad244f8fb 100644 --- a/src/modify.h +++ b/src/modify.h @@ -98,6 +98,9 @@ class Modify : protected Pointers { int find_fix(const char *); int find_fix_by_style(const char *); int check_package(const char *); + int check_rigid_group_overlap(int); + int check_rigid_region_overlap(class Region *); + int check_rigid_list_overlap(int *); void add_compute(int, char **, int trysuffix=1); void modify_compute(int, char **); -- GitLab From 968de8548c1aca6782a465578c0297783a87d3ce Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Jun 2017 13:06:53 -0400 Subject: [PATCH 234/593] apply test for overlap with rigid bodies to set and velocity command --- src/set.cpp | 22 ++++++++++++++++++++++ src/velocity.cpp | 6 ++++++ 2 files changed, 28 insertions(+) diff --git a/src/set.cpp b/src/set.cpp index 4ed07d423b..629f325d35 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -585,6 +585,28 @@ void Set::set(int keyword) } } + // check if properties of atoms in rigid bodies are updated + // that are cached as per-body data. + switch (keyword) { + case X: + case Y: + case Z: + case MOLECULE: + case MASS: + case ANGMOM: + case SHAPE: + case DIAMETER: + case DENSITY: + case QUAT: + case IMAGE: + if (modify->check_rigid_list_overlap(select)) + error->warning(FLERR,"Changing a property of atoms in rigid bodies " + "that has no effect unless rigid bodies are rebuild"); + break; + default: // assume no conflict for all other properties + break; + } + // loop over selected atoms AtomVecEllipsoid *avec_ellipsoid = diff --git a/src/velocity.cpp b/src/velocity.cpp index 82b6efbe1b..260a11bb4e 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -68,6 +68,12 @@ void Velocity::command(int narg, char **arg) if (igroup == -1) error->all(FLERR,"Could not find velocity group ID"); groupbit = group->bitmask[igroup]; + // check if velocities of atoms in rigid bodies are updated + + if (modify->check_rigid_group_overlap(groupbit)) + error->warning(FLERR,"Changing velocities of atoms in rigid bodies. " + "This has no effect unless rigid bodies are rebuild"); + // identify style if (strcmp(arg[1],"create") == 0) style = CREATE; -- GitLab From 90ca0852c798243e3217e2395cf4acaa7c2fc145 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Jun 2017 15:48:23 -0400 Subject: [PATCH 235/593] use "body" list via Fix::extract() to correctly identify atoms in bodies --- src/modify.cpp | 36 +++++++++++++++++++++++++++--------- src/modify.h | 2 +- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/modify.cpp b/src/modify.cpp index 4422ee6890..b390b7f89a 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -1006,13 +1006,20 @@ int Modify::check_rigid_group_overlap(int groupbit) { const int * const mask = atom->mask; const int nlocal = atom->nlocal; + int dim; int n = 0; for (int ifix = 0; ifix < nfix; ifix++) { if (strncmp("rigid",fix[ifix]->style,5) == 0) { const int bothbits = groupbit | fix[ifix]->groupbit; - for (int i=0; i < nlocal; ++i) - if (mask[i] & bothbits) {++n; break;} + const int * const body = (const int *)fix[ifix]->extract("body",dim); + if ((body == NULL) || (dim != 1)) break; + + for (int i=0; i < nlocal; ++i) { + if (((mask[i] & bothbits) == bothbits) && (body[i] >= 0)) { + ++n; break; + } + } if (n > 0) break; } } @@ -1025,23 +1032,29 @@ int Modify::check_rigid_group_overlap(int groupbit) } /* ---------------------------------------------------------------------- - check if the atoms in the region indicated by regionid overlap with any - currently existing rigid fixes. return 1 in this case otherwise 0 + check if the atoms in the group indicated by groupbit _and_ region + indicated by regionid overlap with any currently existing rigid fixes. + return 1 in this case, otherwise 0 ------------------------------------------------------------------------- */ -int Modify::check_rigid_region_overlap(Region *reg) +int Modify::check_rigid_region_overlap(int groupbit, Region *reg) { const int * const mask = atom->mask; const double * const * const x = atom->x; const int nlocal = atom->nlocal; + int dim; int n = 0; reg->prematch(); for (int ifix = 0; ifix < nfix; ifix++) { if (strncmp("rigid",fix[ifix]->style,5) == 0) { - const int groupbit = fix[ifix]->groupbit; + const int bothbits = groupbit | fix[ifix]->groupbit; + const int * const body = (const int *)fix[ifix]->extract("body",dim); + if ((body == NULL) || (dim != 1)) break; + for (int i=0; i < nlocal; ++i) - if ((mask[i] & groupbit) && reg->match(x[i][0],x[i][1],x[i][2])) { + if (((mask[i] & bothbits) == bothbits) && (body[i] >= 0) + && reg->match(x[i][0],x[i][1],x[i][2])) { ++n; break; } @@ -1066,16 +1079,21 @@ int Modify::check_rigid_list_overlap(int *select) { const int * const mask = atom->mask; const int nlocal = atom->nlocal; + int dim; int n = 0; for (int ifix = 0; ifix < nfix; ifix++) { if (strncmp("rigid",fix[ifix]->style,5) == 0) { const int groupbit = fix[ifix]->groupbit; - for (int i=0; i < nlocal; ++i) - if ((mask[i] & groupbit) && select[i]) { + const int * const body = (const int *)fix[ifix]->extract("body",dim); + if ((body == NULL) || (dim != 1)) break; + + for (int i=0; i < nlocal; ++i) { + if ((mask[i] & groupbit) && (body[i] >= 0) && select[i]) { ++n; break; } + } if (n > 0) break; } } diff --git a/src/modify.h b/src/modify.h index 2ad244f8fb..d825d5c4ef 100644 --- a/src/modify.h +++ b/src/modify.h @@ -99,7 +99,7 @@ class Modify : protected Pointers { int find_fix_by_style(const char *); int check_package(const char *); int check_rigid_group_overlap(int); - int check_rigid_region_overlap(class Region *); + int check_rigid_region_overlap(int, class Region *); int check_rigid_list_overlap(int *); void add_compute(int, char **, int trysuffix=1); -- GitLab From ed50bd225494d05a9caf05a0e935ac6f81ec7d2f Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Mon, 5 Jun 2017 13:54:13 -0600 Subject: [PATCH 236/593] Removing unnecessary fences --- src/KOKKOS/angle_charmm_kokkos.cpp | 1 - src/KOKKOS/bond_class2_kokkos.cpp | 1 - src/KOKKOS/bond_fene_kokkos.cpp | 1 - src/KOKKOS/bond_harmonic_kokkos.cpp | 1 - src/KOKKOS/compute_temp_kokkos.cpp | 2 - src/KOKKOS/dihedral_charmm_kokkos.cpp | 1 - src/KOKKOS/dihedral_class2_kokkos.cpp | 1 - src/KOKKOS/dihedral_opls_kokkos.cpp | 1 - src/KOKKOS/fix_langevin_kokkos.cpp | 4 -- src/KOKKOS/fix_nh_kokkos.cpp | 4 -- src/KOKKOS/fix_nve_kokkos.cpp | 2 - src/KOKKOS/fix_qeq_reax_kokkos.cpp | 38 ------------------ src/KOKKOS/fix_setforce_kokkos.cpp | 2 - src/KOKKOS/fix_wall_reflect_kokkos.cpp | 1 - src/KOKKOS/improper_class2_kokkos.cpp | 2 - src/KOKKOS/improper_harmonic_kokkos.cpp | 1 - src/KOKKOS/pair_eam_alloy_kokkos.cpp | 2 - src/KOKKOS/pair_eam_fs_kokkos.cpp | 7 ---- src/KOKKOS/pair_eam_kokkos.cpp | 2 - src/KOKKOS/pair_reaxc_kokkos.cpp | 31 --------------- src/KOKKOS/pppm_kokkos.cpp | 51 ------------------------- 21 files changed, 156 deletions(-) diff --git a/src/KOKKOS/angle_charmm_kokkos.cpp b/src/KOKKOS/angle_charmm_kokkos.cpp index 346077e071..8dd22022d8 100644 --- a/src/KOKKOS/angle_charmm_kokkos.cpp +++ b/src/KOKKOS/angle_charmm_kokkos.cpp @@ -111,7 +111,6 @@ void AngleCharmmKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,nanglelist),*this); } } - DeviceType::fence(); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/KOKKOS/bond_class2_kokkos.cpp b/src/KOKKOS/bond_class2_kokkos.cpp index b01af92b5f..b3c11c9a06 100644 --- a/src/KOKKOS/bond_class2_kokkos.cpp +++ b/src/KOKKOS/bond_class2_kokkos.cpp @@ -110,7 +110,6 @@ void BondClass2Kokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,nbondlist),*this); } } - //DeviceType::fence(); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/KOKKOS/bond_fene_kokkos.cpp b/src/KOKKOS/bond_fene_kokkos.cpp index cfc37bfa9f..025838340b 100644 --- a/src/KOKKOS/bond_fene_kokkos.cpp +++ b/src/KOKKOS/bond_fene_kokkos.cpp @@ -125,7 +125,6 @@ void BondFENEKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,nbondlist),*this); } } - DeviceType::fence(); k_warning_flag.template modify(); k_warning_flag.template sync(); diff --git a/src/KOKKOS/bond_harmonic_kokkos.cpp b/src/KOKKOS/bond_harmonic_kokkos.cpp index 408f59c563..da45c70d6c 100644 --- a/src/KOKKOS/bond_harmonic_kokkos.cpp +++ b/src/KOKKOS/bond_harmonic_kokkos.cpp @@ -111,7 +111,6 @@ void BondHarmonicKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,nbondlist),*this); } } - //DeviceType::fence(); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/KOKKOS/compute_temp_kokkos.cpp b/src/KOKKOS/compute_temp_kokkos.cpp index 6a24591d6c..2ea67a1fb1 100644 --- a/src/KOKKOS/compute_temp_kokkos.cpp +++ b/src/KOKKOS/compute_temp_kokkos.cpp @@ -63,7 +63,6 @@ double ComputeTempKokkos::compute_scalar() Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,nlocal),*this,t_kk); else Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,nlocal),*this,t_kk); - DeviceType::fence(); copymode = 0; t = t_kk.t0; // could make this more efficient @@ -118,7 +117,6 @@ void ComputeTempKokkos::compute_vector() Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,nlocal),*this,t_kk); else Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,nlocal),*this,t_kk); - DeviceType::fence(); copymode = 0; t[0] = t_kk.t0; diff --git a/src/KOKKOS/dihedral_charmm_kokkos.cpp b/src/KOKKOS/dihedral_charmm_kokkos.cpp index ee9e3d1244..a8a8aade60 100644 --- a/src/KOKKOS/dihedral_charmm_kokkos.cpp +++ b/src/KOKKOS/dihedral_charmm_kokkos.cpp @@ -132,7 +132,6 @@ void DihedralCharmmKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,ndihedrallist),*this); } } - DeviceType::fence(); // error check diff --git a/src/KOKKOS/dihedral_class2_kokkos.cpp b/src/KOKKOS/dihedral_class2_kokkos.cpp index edfd1b3395..89e42c6f83 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.cpp +++ b/src/KOKKOS/dihedral_class2_kokkos.cpp @@ -159,7 +159,6 @@ void DihedralClass2Kokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,ndihedrallist),*this); } } - DeviceType::fence(); // error check diff --git a/src/KOKKOS/dihedral_opls_kokkos.cpp b/src/KOKKOS/dihedral_opls_kokkos.cpp index 8e222ad860..e37d4d2ef5 100644 --- a/src/KOKKOS/dihedral_opls_kokkos.cpp +++ b/src/KOKKOS/dihedral_opls_kokkos.cpp @@ -121,7 +121,6 @@ void DihedralOPLSKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,ndihedrallist),*this); } } - DeviceType::fence(); // error check diff --git a/src/KOKKOS/fix_langevin_kokkos.cpp b/src/KOKKOS/fix_langevin_kokkos.cpp index 0572dcedbe..fb0f329a91 100644 --- a/src/KOKKOS/fix_langevin_kokkos.cpp +++ b/src/KOKKOS/fix_langevin_kokkos.cpp @@ -506,7 +506,6 @@ void FixLangevinKokkos::post_force(int vflag) Kokkos::parallel_for(nlocal,post_functor); } - DeviceType::fence(); if(tbiasflag == BIAS){ atomKK->sync(temperature->execution_space,temperature->datamask_read); @@ -531,7 +530,6 @@ void FixLangevinKokkos::post_force(int vflag) // set total force zero in parallel on the device FixLangevinKokkosZeroForceFunctor zero_functor(this); Kokkos::parallel_for(nlocal,zero_functor); - DeviceType::fence(); } // f is modified by both post_force and zero_force functors atomKK->modified(execution_space,datamask_modify); @@ -726,7 +724,6 @@ double FixLangevinKokkos::compute_scalar() k_flangevin.template sync(); FixLangevinKokkosTallyEnergyFunctor scalar_functor(this); Kokkos::parallel_reduce(nlocal,scalar_functor,energy_onestep); - DeviceType::fence(); energy = 0.5*energy_onestep*update->dt; } @@ -770,7 +767,6 @@ void FixLangevinKokkos::end_of_step() k_flangevin.template sync(); FixLangevinKokkosTallyEnergyFunctor tally_functor(this); Kokkos::parallel_reduce(nlocal,tally_functor,energy_onestep); - DeviceType::fence(); energy += energy_onestep*update->dt; } diff --git a/src/KOKKOS/fix_nh_kokkos.cpp b/src/KOKKOS/fix_nh_kokkos.cpp index 2b55259365..fb03bf68c6 100644 --- a/src/KOKKOS/fix_nh_kokkos.cpp +++ b/src/KOKKOS/fix_nh_kokkos.cpp @@ -495,7 +495,6 @@ void FixNHKokkos::nh_v_press() Kokkos::parallel_for(Kokkos::RangePolicy >(0,nlocal),*this); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,nlocal),*this); - DeviceType::fence(); copymode = 0; atomKK->modified(execution_space,V_MASK); @@ -550,7 +549,6 @@ void FixNHKokkos::nve_v() Kokkos::parallel_for(Kokkos::RangePolicy >(0,nlocal),*this); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,nlocal),*this); - DeviceType::fence(); copymode = 0; } @@ -595,7 +593,6 @@ void FixNHKokkos::nve_x() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); copymode = 0; } @@ -631,7 +628,6 @@ void FixNHKokkos::nh_v_temp() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); copymode = 0; atomKK->modified(execution_space,V_MASK); diff --git a/src/KOKKOS/fix_nve_kokkos.cpp b/src/KOKKOS/fix_nve_kokkos.cpp index 4c041f85b0..eb41443bab 100644 --- a/src/KOKKOS/fix_nve_kokkos.cpp +++ b/src/KOKKOS/fix_nve_kokkos.cpp @@ -76,7 +76,6 @@ void FixNVEKokkos::initial_integrate(int vflag) FixNVEKokkosInitialIntegrateFunctor functor(this); Kokkos::parallel_for(nlocal,functor); } - DeviceType::fence(); } template @@ -133,7 +132,6 @@ void FixNVEKokkos::final_integrate() FixNVEKokkosFinalIntegrateFunctor functor(this); Kokkos::parallel_for(nlocal,functor); } - DeviceType::fence(); // debug //atomKK->sync(Host,datamask_read); diff --git a/src/KOKKOS/fix_qeq_reax_kokkos.cpp b/src/KOKKOS/fix_qeq_reax_kokkos.cpp index 2e46b85fd2..5cafbd2ef3 100644 --- a/src/KOKKOS/fix_qeq_reax_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reax_kokkos.cpp @@ -234,12 +234,10 @@ void FixQEqReaxKokkos::pre_force(int vflag) // compute_H FixQEqReaxKokkosComputeHFunctor computeH_functor(this); Kokkos::parallel_scan(inum,computeH_functor); - DeviceType::fence(); // init_matvec FixQEqReaxKokkosMatVecFunctor matvec_functor(this); Kokkos::parallel_for(inum,matvec_functor); - DeviceType::fence(); // comm->forward_comm_fix(this); //Dist_vector( s ); pack_flag = 2; @@ -259,15 +257,12 @@ void FixQEqReaxKokkos::pre_force(int vflag) // 1st cg solve over b_s, s cg_solve1(); - DeviceType::fence(); // 2nd cg solve over b_t, t cg_solve2(); - DeviceType::fence(); // calculate_Q(); calculate_q(); - DeviceType::fence(); copymode = 0; @@ -354,7 +349,6 @@ void FixQEqReaxKokkos::allocate_array() const int ignum = atom->nlocal + atom->nghost; FixQEqReaxKokkosZeroFunctor zero_functor(this); Kokkos::parallel_for(ignum,zero_functor); - DeviceType::fence(); } /* ---------------------------------------------------------------------- */ @@ -499,10 +493,8 @@ void FixQEqReaxKokkos::cg_solve1() // sparse_matvec( &H, x, q ); FixQEqReaxKokkosSparse12Functor sparse12_functor(this); Kokkos::parallel_for(inum,sparse12_functor); - DeviceType::fence(); if (neighflag != FULL) { Kokkos::parallel_for(Kokkos::RangePolicy(nlocal,nlocal+atom->nghost),*this); - DeviceType::fence(); if (neighflag == HALF) { FixQEqReaxKokkosSparse13Functor sparse13_functor(this); Kokkos::parallel_for(inum,sparse13_functor); @@ -513,7 +505,6 @@ void FixQEqReaxKokkos::cg_solve1() } else { Kokkos::parallel_for(Kokkos::TeamPolicy (inum, teamsize), *this); } - DeviceType::fence(); if (neighflag != FULL) { k_o.template modify(); @@ -529,21 +520,17 @@ void FixQEqReaxKokkos::cg_solve1() F_FLOAT my_norm = 0.0; FixQEqReaxKokkosNorm1Functor norm1_functor(this); Kokkos::parallel_reduce(inum,norm1_functor,my_norm); - DeviceType::fence(); F_FLOAT norm_sqr = 0.0; MPI_Allreduce( &my_norm, &norm_sqr, 1, MPI_DOUBLE, MPI_SUM, world ); b_norm = sqrt(norm_sqr); - DeviceType::fence(); // sig_new = parallel_dot( r, d, nn); F_FLOAT my_dot = 0.0; FixQEqReaxKokkosDot1Functor dot1_functor(this); Kokkos::parallel_reduce(inum,dot1_functor,my_dot); - DeviceType::fence(); F_FLOAT dot_sqr = 0.0; MPI_Allreduce( &my_dot, &dot_sqr, 1, MPI_DOUBLE, MPI_SUM, world ); F_FLOAT sig_new = dot_sqr; - DeviceType::fence(); int loop; const int loopmax = 200; @@ -560,10 +547,8 @@ void FixQEqReaxKokkos::cg_solve1() // sparse_matvec( &H, d, q ); FixQEqReaxKokkosSparse22Functor sparse22_functor(this); Kokkos::parallel_for(inum,sparse22_functor); - DeviceType::fence(); if (neighflag != FULL) { Kokkos::parallel_for(Kokkos::RangePolicy(nlocal,nlocal+atom->nghost),*this); - DeviceType::fence(); if (neighflag == HALF) { FixQEqReaxKokkosSparse23Functor sparse23_functor(this); Kokkos::parallel_for(inum,sparse23_functor); @@ -574,7 +559,6 @@ void FixQEqReaxKokkos::cg_solve1() } else { Kokkos::parallel_for(Kokkos::TeamPolicy (inum, teamsize), *this); } - DeviceType::fence(); if (neighflag != FULL) { @@ -589,7 +573,6 @@ void FixQEqReaxKokkos::cg_solve1() my_dot = dot_sqr = 0.0; FixQEqReaxKokkosDot2Functor dot2_functor(this); Kokkos::parallel_reduce(inum,dot2_functor,my_dot); - DeviceType::fence(); MPI_Allreduce( &my_dot, &dot_sqr, 1, MPI_DOUBLE, MPI_SUM, world ); tmp = dot_sqr; @@ -602,12 +585,10 @@ void FixQEqReaxKokkos::cg_solve1() my_dot = dot_sqr = 0.0; FixQEqReaxKokkosPrecon1Functor precon1_functor(this); Kokkos::parallel_for(inum,precon1_functor); - DeviceType::fence(); // preconditioning: p[j] = r[j] * Hdia_inv[j]; // sig_new = parallel_dot( r, p, nn); FixQEqReaxKokkosPreconFunctor precon_functor(this); Kokkos::parallel_reduce(inum,precon_functor,my_dot); - DeviceType::fence(); MPI_Allreduce( &my_dot, &dot_sqr, 1, MPI_DOUBLE, MPI_SUM, world ); sig_new = dot_sqr; @@ -616,7 +597,6 @@ void FixQEqReaxKokkos::cg_solve1() // vector_sum( d, 1., p, beta, d, nn ); FixQEqReaxKokkosVecSum2Functor vecsum2_functor(this); Kokkos::parallel_for(inum,vecsum2_functor); - DeviceType::fence(); } if (loop >= loopmax && comm->me == 0) { @@ -644,10 +624,8 @@ void FixQEqReaxKokkos::cg_solve2() // sparse_matvec( &H, x, q ); FixQEqReaxKokkosSparse32Functor sparse32_functor(this); Kokkos::parallel_for(inum,sparse32_functor); - DeviceType::fence(); if (neighflag != FULL) { Kokkos::parallel_for(Kokkos::RangePolicy(nlocal,nlocal+atom->nghost),*this); - DeviceType::fence(); if (neighflag == HALF) { FixQEqReaxKokkosSparse33Functor sparse33_functor(this); Kokkos::parallel_for(inum,sparse33_functor); @@ -658,7 +636,6 @@ void FixQEqReaxKokkos::cg_solve2() } else { Kokkos::parallel_for(Kokkos::TeamPolicy (inum, teamsize), *this); } - DeviceType::fence(); if (neighflag != FULL) { k_o.template modify(); @@ -674,21 +651,17 @@ void FixQEqReaxKokkos::cg_solve2() F_FLOAT my_norm = 0.0; FixQEqReaxKokkosNorm2Functor norm2_functor(this); Kokkos::parallel_reduce(inum,norm2_functor,my_norm); - DeviceType::fence(); F_FLOAT norm_sqr = 0.0; MPI_Allreduce( &my_norm, &norm_sqr, 1, MPI_DOUBLE, MPI_SUM, world ); b_norm = sqrt(norm_sqr); - DeviceType::fence(); // sig_new = parallel_dot( r, d, nn); F_FLOAT my_dot = 0.0; FixQEqReaxKokkosDot1Functor dot1_functor(this); Kokkos::parallel_reduce(inum,dot1_functor,my_dot); - DeviceType::fence(); F_FLOAT dot_sqr = 0.0; MPI_Allreduce( &my_dot, &dot_sqr, 1, MPI_DOUBLE, MPI_SUM, world ); F_FLOAT sig_new = dot_sqr; - DeviceType::fence(); int loop; const int loopmax = 200; @@ -705,10 +678,8 @@ void FixQEqReaxKokkos::cg_solve2() // sparse_matvec( &H, d, q ); FixQEqReaxKokkosSparse22Functor sparse22_functor(this); Kokkos::parallel_for(inum,sparse22_functor); - DeviceType::fence(); if (neighflag != FULL) { Kokkos::parallel_for(Kokkos::RangePolicy(nlocal,nlocal+atom->nghost),*this); - DeviceType::fence(); if (neighflag == HALF) { FixQEqReaxKokkosSparse23Functor sparse23_functor(this); Kokkos::parallel_for(inum,sparse23_functor); @@ -719,7 +690,6 @@ void FixQEqReaxKokkos::cg_solve2() } else { Kokkos::parallel_for(Kokkos::TeamPolicy (inum, teamsize), *this); } - DeviceType::fence(); if (neighflag != FULL) { k_o.template modify(); @@ -733,10 +703,8 @@ void FixQEqReaxKokkos::cg_solve2() my_dot = dot_sqr = 0.0; FixQEqReaxKokkosDot2Functor dot2_functor(this); Kokkos::parallel_reduce(inum,dot2_functor,my_dot); - DeviceType::fence(); MPI_Allreduce( &my_dot, &dot_sqr, 1, MPI_DOUBLE, MPI_SUM, world ); tmp = dot_sqr; - DeviceType::fence(); alpha = sig_new / tmp; @@ -747,12 +715,10 @@ void FixQEqReaxKokkos::cg_solve2() my_dot = dot_sqr = 0.0; FixQEqReaxKokkosPrecon2Functor precon2_functor(this); Kokkos::parallel_for(inum,precon2_functor); - DeviceType::fence(); // preconditioning: p[j] = r[j] * Hdia_inv[j]; // sig_new = parallel_dot( r, p, nn); FixQEqReaxKokkosPreconFunctor precon_functor(this); Kokkos::parallel_reduce(inum,precon_functor,my_dot); - DeviceType::fence(); MPI_Allreduce( &my_dot, &dot_sqr, 1, MPI_DOUBLE, MPI_SUM, world ); sig_new = dot_sqr; @@ -761,7 +727,6 @@ void FixQEqReaxKokkos::cg_solve2() // vector_sum( d, 1., p, beta, d, nn ); FixQEqReaxKokkosVecSum2Functor vecsum2_functor(this); Kokkos::parallel_for(inum,vecsum2_functor); - DeviceType::fence(); } if (loop >= loopmax && comm->me == 0) { @@ -786,7 +751,6 @@ void FixQEqReaxKokkos::calculate_q() sum = sum_all = 0.0; FixQEqReaxKokkosVecAcc1Functor vecacc1_functor(this); Kokkos::parallel_reduce(inum,vecacc1_functor,sum); - DeviceType::fence(); MPI_Allreduce(&sum, &sum_all, 1, MPI_DOUBLE, MPI_SUM, world ); const F_FLOAT s_sum = sum_all; @@ -794,7 +758,6 @@ void FixQEqReaxKokkos::calculate_q() sum = sum_all = 0.0; FixQEqReaxKokkosVecAcc2Functor vecacc2_functor(this); Kokkos::parallel_reduce(inum,vecacc2_functor,sum); - DeviceType::fence(); MPI_Allreduce(&sum, &sum_all, 1, MPI_DOUBLE, MPI_SUM, world ); const F_FLOAT t_sum = sum_all; @@ -804,7 +767,6 @@ void FixQEqReaxKokkos::calculate_q() // q[i] = s[i] - u * t[i]; FixQEqReaxKokkosCalculateQFunctor calculateQ_functor(this); Kokkos::parallel_for(inum,calculateQ_functor); - DeviceType::fence(); pack_flag = 4; //comm->forward_comm_fix( this ); //Dist_vector( atom->q ); diff --git a/src/KOKKOS/fix_setforce_kokkos.cpp b/src/KOKKOS/fix_setforce_kokkos.cpp index 27f7d100fa..5e26ef3610 100644 --- a/src/KOKKOS/fix_setforce_kokkos.cpp +++ b/src/KOKKOS/fix_setforce_kokkos.cpp @@ -108,7 +108,6 @@ void FixSetForceKokkos::post_force(int vflag) if (varflag == CONSTANT) { copymode = 1; Kokkos::parallel_reduce(Kokkos::RangePolicy(0,nlocal),*this,foriginal_kk); - DeviceType::fence(); copymode = 0; // variable force, wrap with clear/add @@ -138,7 +137,6 @@ void FixSetForceKokkos::post_force(int vflag) copymode = 1; Kokkos::parallel_reduce(Kokkos::RangePolicy(0,nlocal),*this,foriginal_kk); - DeviceType::fence(); copymode = 0; } diff --git a/src/KOKKOS/fix_wall_reflect_kokkos.cpp b/src/KOKKOS/fix_wall_reflect_kokkos.cpp index 55be7e5cd7..cd7a2c59b7 100644 --- a/src/KOKKOS/fix_wall_reflect_kokkos.cpp +++ b/src/KOKKOS/fix_wall_reflect_kokkos.cpp @@ -79,7 +79,6 @@ void FixWallReflectKokkos::post_integrate() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); copymode = 0; } diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index 25bd2c732f..c2cb7dfe2b 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -140,7 +140,6 @@ void ImproperClass2Kokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,nimproperlist),*this); } } - DeviceType::fence(); if (eflag_global) energy += ev.evdwl; // error check @@ -165,7 +164,6 @@ void ImproperClass2Kokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,nimproperlist),*this); } } - DeviceType::fence(); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/KOKKOS/improper_harmonic_kokkos.cpp b/src/KOKKOS/improper_harmonic_kokkos.cpp index 9c99b35bd9..1e58e18c51 100644 --- a/src/KOKKOS/improper_harmonic_kokkos.cpp +++ b/src/KOKKOS/improper_harmonic_kokkos.cpp @@ -128,7 +128,6 @@ void ImproperHarmonicKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,nimproperlist),*this); } } - //DeviceType::fence(); // error check diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.cpp b/src/KOKKOS/pair_eam_alloy_kokkos.cpp index 45c320bc51..76c701213d 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.cpp +++ b/src/KOKKOS/pair_eam_alloy_kokkos.cpp @@ -409,7 +409,6 @@ int PairEAMAlloyKokkos::pack_forward_comm_kokkos(int n, DAT::tdual_i iswap = iswap_in; v_buf = buf.view(); Kokkos::parallel_for(Kokkos::RangePolicy(0,n),*this); - DeviceType::fence(); return n; } @@ -428,7 +427,6 @@ void PairEAMAlloyKokkos::unpack_forward_comm_kokkos(int n, int first first = first_in; v_buf = buf.view(); Kokkos::parallel_for(Kokkos::RangePolicy(0,n),*this); - DeviceType::fence(); } template diff --git a/src/KOKKOS/pair_eam_fs_kokkos.cpp b/src/KOKKOS/pair_eam_fs_kokkos.cpp index b9fa82740a..9b565f8ede 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.cpp +++ b/src/KOKKOS/pair_eam_fs_kokkos.cpp @@ -133,7 +133,6 @@ void PairEAMFSKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy(0,nall),*this); else Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); // loop over neighbors of my atoms @@ -156,7 +155,6 @@ void PairEAMFSKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); } } - DeviceType::fence(); // communicate and sum densities (on the host) @@ -174,7 +172,6 @@ void PairEAMFSKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); } else if (neighflag == FULL) { @@ -184,7 +181,6 @@ void PairEAMFSKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); } if (eflag) { @@ -239,7 +235,6 @@ void PairEAMFSKokkos::compute(int eflag_in, int vflag_in) } } } - DeviceType::fence(); if (eflag_global) eng_vdwl += ev.evdwl; if (vflag_global) { @@ -414,7 +409,6 @@ int PairEAMFSKokkos::pack_forward_comm_kokkos(int n, DAT::tdual_int_ iswap = iswap_in; v_buf = buf.view(); Kokkos::parallel_for(Kokkos::RangePolicy(0,n),*this); - DeviceType::fence(); return n; } @@ -433,7 +427,6 @@ void PairEAMFSKokkos::unpack_forward_comm_kokkos(int n, int first_in first = first_in; v_buf = buf.view(); Kokkos::parallel_for(Kokkos::RangePolicy(0,n),*this); - DeviceType::fence(); } template diff --git a/src/KOKKOS/pair_eam_kokkos.cpp b/src/KOKKOS/pair_eam_kokkos.cpp index e4128de722..7be8e54605 100644 --- a/src/KOKKOS/pair_eam_kokkos.cpp +++ b/src/KOKKOS/pair_eam_kokkos.cpp @@ -409,7 +409,6 @@ int PairEAMKokkos::pack_forward_comm_kokkos(int n, DAT::tdual_int_2d iswap = iswap_in; v_buf = buf.view(); Kokkos::parallel_for(Kokkos::RangePolicy(0,n),*this); - DeviceType::fence(); return n; } @@ -428,7 +427,6 @@ void PairEAMKokkos::unpack_forward_comm_kokkos(int n, int first_in, first = first_in; v_buf = buf.view(); Kokkos::parallel_for(Kokkos::RangePolicy(0,n),*this); - DeviceType::fence(); } template diff --git a/src/KOKKOS/pair_reaxc_kokkos.cpp b/src/KOKKOS/pair_reaxc_kokkos.cpp index 59369b5e08..6082c93287 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.cpp +++ b/src/KOKKOS/pair_reaxc_kokkos.cpp @@ -731,7 +731,6 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); } - DeviceType::fence(); ev_all += ev; pvector[13] = ev.ecoul; @@ -771,7 +770,6 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); } } - DeviceType::fence(); ev_all += ev; pvector[10] = ev.evdwl; pvector[11] = ev.ecoul; @@ -800,7 +798,6 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) // zero Kokkos::parallel_for(Kokkos::RangePolicy(0,nmax),*this); - DeviceType::fence(); if (neighflag == HALF) Kokkos::parallel_for(Kokkos::RangePolicy >(0,ignum),*this); @@ -808,7 +805,6 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_for(Kokkos::RangePolicy >(0,ignum),*this); else //(neighflag == FULL) Kokkos::parallel_for(Kokkos::RangePolicy(0,ignum),*this); - DeviceType::fence(); k_resize_bo.modify(); k_resize_bo.sync(); @@ -827,15 +823,11 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) // Bond order if (neighflag == HALF) { Kokkos::parallel_for(Kokkos::RangePolicy(0,ignum),*this); - DeviceType::fence(); } else if (neighflag == HALFTHREAD) { Kokkos::parallel_for(Kokkos::RangePolicy(0,ignum),*this); - DeviceType::fence(); } Kokkos::parallel_for(Kokkos::RangePolicy(0,ignum),*this); - DeviceType::fence(); Kokkos::parallel_for(Kokkos::RangePolicy(0,ignum),*this); - DeviceType::fence(); // Bond energy if (neighflag == HALF) { @@ -843,7 +835,6 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); ev_all += ev; pvector[0] = ev.evdwl; } else { //if (neighflag == HALFTHREAD) { @@ -851,7 +842,6 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); ev_all += ev; pvector[0] = ev.evdwl; } @@ -859,21 +849,17 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) // Multi-body corrections if (neighflag == HALF) { Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); if (evflag) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); ev_all += ev; } else { //if (neighflag == HALFTHREAD) { Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); if (evflag) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); ev_all += ev; } pvector[2] = ev.ereax[0]; @@ -887,14 +873,12 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); ev_all += ev; } else { //if (neighflag == HALFTHREAD) { if (evflag) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); ev_all += ev; } pvector[4] = ev.ereax[3]; @@ -908,14 +892,12 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); ev_all += ev; } else { //if (neighflag == HALFTHREAD) { if (evflag) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); ev_all += ev; } pvector[8] = ev.ereax[6]; @@ -929,14 +911,12 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); ev_all += ev; } else { //if (neighflag == HALFTHREAD) { if (evflag) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); - DeviceType::fence(); ev_all += ev; } } @@ -946,22 +926,18 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) // Bond force if (neighflag == HALF) { Kokkos::parallel_for(Kokkos::RangePolicy >(0,ignum),*this); - DeviceType::fence(); if (evflag) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,ignum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,ignum),*this); - DeviceType::fence(); ev_all += ev; pvector[0] += ev.evdwl; } else { //if (neighflag == HALFTHREAD) { Kokkos::parallel_for(Kokkos::RangePolicy >(0,ignum),*this); - DeviceType::fence(); if (evflag) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,ignum),*this,ev); else Kokkos::parallel_for(Kokkos::RangePolicy >(0,ignum),*this); - DeviceType::fence(); ev_all += ev; pvector[0] += ev.evdwl; } @@ -3945,11 +3921,9 @@ void PairReaxCKokkos::ev_setup(int eflag, int vflag) if (vflag_global) for (i = 0; i < 6; i++) virial[i] = 0.0; if (eflag_atom) { Kokkos::parallel_for(Kokkos::RangePolicy(0,maxeatom),*this); - DeviceType::fence(); } if (vflag_atom) { Kokkos::parallel_for(Kokkos::RangePolicy(0,maxvatom),*this); - DeviceType::fence(); } // if vflag_global = 2 and pair::compute() calls virial_fdotr_compute() @@ -4002,7 +3976,6 @@ void PairReaxCKokkos::FindBond(int &numbonds) { copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nmax),*this); - DeviceType::fence(); bo_cut_bond = control->bg_cut; @@ -4017,7 +3990,6 @@ void PairReaxCKokkos::FindBond(int &numbonds) numbonds = 0; PairReaxCKokkosFindBondFunctor find_bond_functor(this); Kokkos::parallel_reduce(inum,find_bond_functor,numbonds); - DeviceType::fence(); copymode = 0; } @@ -4076,7 +4048,6 @@ void PairReaxCKokkos::PackBondBuffer(DAT::tdual_ffloat_1d k_buf, int nlocal = atomKK->nlocal; PairReaxCKokkosPackBondBufferFunctor pack_bond_buffer_functor(this); Kokkos::parallel_scan(nlocal,pack_bond_buffer_functor); - DeviceType::fence(); copymode = 0; k_buf.modify(); @@ -4135,11 +4106,9 @@ void PairReaxCKokkos::FindBondSpecies() { copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nmax),*this); - DeviceType::fence(); nlocal = atomKK->nlocal; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); copymode = 0; // NOTE: Could improve performance if a Kokkos version of ComputeSpecAtom is added diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 3ad7334d2f..bd3ed3644f 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -403,17 +403,14 @@ void PPPMKokkos::setup() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(nxlo_fft,nxhi_fft+1),*this); - DeviceType::fence(); copymode = 0; copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(nylo_fft,nyhi_fft+1),*this); - DeviceType::fence(); copymode = 0; copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(nzlo_fft,nzhi_fft+1),*this); - DeviceType::fence(); copymode = 0; // merge three outer loops into one for better threading @@ -425,7 +422,6 @@ void PPPMKokkos::setup() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_fft),*this); - DeviceType::fence(); copymode = 0; compute_gf_ik(); @@ -753,7 +749,6 @@ void PPPMKokkos::compute(int eflag, int vflag) if (eflag_atom) { copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); copymode = 0; //for (i = nlocal; i < ntotal; i++) d_eatom[i] *= 0.5*qscale; } @@ -761,7 +756,6 @@ void PPPMKokkos::compute(int eflag, int vflag) if (vflag_atom) { copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,ntotal),*this); - DeviceType::fence(); copymode = 0; } } @@ -1415,7 +1409,6 @@ void PPPMKokkos::compute_gf_ik() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_fft),*this); - DeviceType::fence(); copymode = 0; } @@ -1495,7 +1488,6 @@ void PPPMKokkos::compute_gf_ik_triclinic() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(nzlo_fft,nzhi_fft+1),*this); - DeviceType::fence(); copymode = 0; } @@ -1588,7 +1580,6 @@ void PPPMKokkos::particle_map() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); copymode = 0; k_flag.template modify(); @@ -1641,7 +1632,6 @@ void PPPMKokkos::make_rho() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_out),*this); - DeviceType::fence(); copymode = 0; // loop over my charges, add their contribution to nearby grid points @@ -1654,7 +1644,6 @@ void PPPMKokkos::make_rho() #ifdef KOKKOS_HAVE_CUDA copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); copymode = 0; #else ix = nxhi_out-nxlo_out + 1; @@ -1663,7 +1652,6 @@ void PPPMKokkos::make_rho() copymode = 1; Kokkos::TeamPolicy config(lmp->kokkos->num_threads,1); Kokkos::parallel_for(config,*this); - DeviceType::fence(); copymode = 0; #endif } @@ -1794,7 +1782,6 @@ void PPPMKokkos::brick2fft() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_inout),*this); - DeviceType::fence(); copymode = 0; k_density_fft.template modify(); @@ -1842,7 +1829,6 @@ void PPPMKokkos::poisson_ik() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nfft),*this); - DeviceType::fence(); copymode = 0; k_work1.template modify(); @@ -1862,14 +1848,12 @@ void PPPMKokkos::poisson_ik() if (vflag_global) { copymode = 1; Kokkos::parallel_reduce(Kokkos::RangePolicy(0,nfft),*this,ev); - DeviceType::fence(); copymode = 0; for (j = 0; j < 6; j++) virial[j] += ev.v[j]; energy += ev.ecoul; } else { copymode = 1; Kokkos::parallel_reduce(Kokkos::RangePolicy(0,nfft),*this,ev); - DeviceType::fence(); copymode = 0; energy += ev.ecoul; } @@ -1880,7 +1864,6 @@ void PPPMKokkos::poisson_ik() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nfft),*this); - DeviceType::fence(); copymode = 0; // extra FFTs for per-atomKK energy/virial @@ -1914,7 +1897,6 @@ void PPPMKokkos::poisson_ik() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_fft),*this); - DeviceType::fence(); copymode = 0; k_work2.template modify(); @@ -1926,7 +1908,6 @@ void PPPMKokkos::poisson_ik() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_inout),*this); - DeviceType::fence(); copymode = 0; @@ -1934,7 +1915,6 @@ void PPPMKokkos::poisson_ik() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_fft),*this); - DeviceType::fence(); copymode = 0; k_work2.template modify(); @@ -1946,14 +1926,12 @@ void PPPMKokkos::poisson_ik() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_inout),*this); - DeviceType::fence(); copymode = 0; // z direction gradient copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_fft),*this); - DeviceType::fence(); copymode = 0; k_work2.template modify(); @@ -1965,7 +1943,6 @@ void PPPMKokkos::poisson_ik() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_inout),*this); - DeviceType::fence(); copymode = 0; } @@ -2215,7 +2192,6 @@ void PPPMKokkos::poisson_peratom() if (eflag_atom) { copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nfft),*this); - DeviceType::fence(); copymode = 0; k_work2.template modify(); @@ -2227,7 +2203,6 @@ void PPPMKokkos::poisson_peratom() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_inout),*this); - DeviceType::fence(); copymode = 0; } @@ -2238,7 +2213,6 @@ void PPPMKokkos::poisson_peratom() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nfft),*this); - DeviceType::fence(); copymode = 0; k_work2.template modify(); @@ -2250,13 +2224,11 @@ void PPPMKokkos::poisson_peratom() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_inout),*this); - DeviceType::fence(); copymode = 0; copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nfft),*this); - DeviceType::fence(); copymode = 0; k_work2.template modify(); @@ -2268,13 +2240,11 @@ void PPPMKokkos::poisson_peratom() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_inout),*this); - DeviceType::fence(); copymode = 0; copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nfft),*this); - DeviceType::fence(); copymode = 0; k_work2.template modify(); @@ -2286,12 +2256,10 @@ void PPPMKokkos::poisson_peratom() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_inout),*this); - DeviceType::fence(); copymode = 0; copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nfft),*this); - DeviceType::fence(); copymode = 0; k_work2.template modify(); @@ -2303,13 +2271,11 @@ void PPPMKokkos::poisson_peratom() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_inout),*this); - DeviceType::fence(); copymode = 0; copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nfft),*this); - DeviceType::fence(); copymode = 0; k_work2.template modify(); @@ -2321,13 +2287,11 @@ void PPPMKokkos::poisson_peratom() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_inout),*this); - DeviceType::fence(); copymode = 0; copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nfft),*this); - DeviceType::fence(); copymode = 0; k_work2.template modify(); @@ -2339,7 +2303,6 @@ void PPPMKokkos::poisson_peratom() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_inout),*this); - DeviceType::fence(); copymode = 0; } @@ -2545,7 +2508,6 @@ void PPPMKokkos::fieldforce_ik() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); copymode = 0; } @@ -2606,7 +2568,6 @@ void PPPMKokkos::fieldforce_peratom() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); copymode = 0; } @@ -2682,12 +2643,10 @@ void PPPMKokkos::pack_forward_kokkos(int flag, Kokkos::DualView(0,nlist),*this); - DeviceType::fence(); copymode = 0; } else if (flag == FORWARD_IK_PERATOM) { copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlist),*this); - DeviceType::fence(); copymode = 0; } } @@ -2740,12 +2699,10 @@ void PPPMKokkos::unpack_forward_kokkos(int flag, Kokkos::DualView(0,nlist),*this); - DeviceType::fence(); copymode = 0; } else if (flag == FORWARD_IK_PERATOM) { copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlist),*this); - DeviceType::fence(); copymode = 0; } } @@ -2798,7 +2755,6 @@ void PPPMKokkos::pack_reverse_kokkos(int flag, Kokkos::DualView(0,nlist),*this); - DeviceType::fence(); copymode = 0; } @@ -2829,7 +2785,6 @@ void PPPMKokkos::unpack_reverse_kokkos(int flag, Kokkos::DualView(0,nlist),*this); - DeviceType::fence(); copymode = 0; } @@ -2989,7 +2944,6 @@ void PPPMKokkos::slabcorr() double dipole = 0.0; copymode = 1; Kokkos::parallel_reduce(Kokkos::RangePolicy(0,nlocal),*this,dipole); - DeviceType::fence(); copymode = 0; // sum local contributions to get global dipole moment @@ -3003,7 +2957,6 @@ void PPPMKokkos::slabcorr() if (eflag_atom || fabs(qsum) > SMALL) { copymode = 1; Kokkos::parallel_reduce(Kokkos::RangePolicy(0,nlocal),*this,dipole_r2); - DeviceType::fence(); copymode = 0; // sum local contributions @@ -3027,7 +2980,6 @@ void PPPMKokkos::slabcorr() efact = qscale * MY_2PI/volume; copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); copymode = 0; } @@ -3037,7 +2989,6 @@ void PPPMKokkos::slabcorr() copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); - DeviceType::fence(); copymode = 0; } @@ -3081,7 +3032,6 @@ int PPPMKokkos::timing_1d(int n, double &time1d) copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,2*nfft_both),*this); - DeviceType::fence(); copymode = 0; MPI_Barrier(world); @@ -3119,7 +3069,6 @@ int PPPMKokkos::timing_3d(int n, double &time3d) copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,2*nfft_both),*this); - DeviceType::fence(); copymode = 0; MPI_Barrier(world); -- GitLab From 0034d2db35b1e3c7ef28bce5a5bad09ffcb1e72b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Jun 2017 16:30:30 -0400 Subject: [PATCH 237/593] apply the rigid body checks to some more example codes --- src/fix_heat.cpp | 6 +++++- src/fix_temp_berendsen.cpp | 3 +++ src/fix_temp_csld.cpp | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/fix_heat.cpp b/src/fix_heat.cpp index d41aa4abea..97e0ed6a7f 100644 --- a/src/fix_heat.cpp +++ b/src/fix_heat.cpp @@ -64,7 +64,7 @@ idregion(NULL), hstr(NULL), vheat(NULL), vscale(NULL) // optional args iregion = -1; - + int iarg = 5; while (iarg < narg) { if (strcmp(arg[iarg],"region") == 0) { @@ -126,6 +126,10 @@ void FixHeat::init() else error->all(FLERR,"Variable for fix heat is invalid style"); } + // check for rigid bodies in region (done here for performance reasons) + if (modify->check_rigid_region_overlap(groupbit,domain->regions[iregion])) + error->warning(FLERR,"Cannot apply fix heat to atoms in rigid bodies"); + // cannot have 0 atoms in group if (group->count(igroup) == 0) diff --git a/src/fix_temp_berendsen.cpp b/src/fix_temp_berendsen.cpp index aff9a44977..7b312cfb5f 100644 --- a/src/fix_temp_berendsen.cpp +++ b/src/fix_temp_berendsen.cpp @@ -128,6 +128,9 @@ void FixTempBerendsen::init() error->all(FLERR,"Temperature ID for fix temp/berendsen does not exist"); temperature = modify->compute[icompute]; + if (modify->check_rigid_group_overlap(groupbit)) + error->warning(FLERR,"Cannot thermostat atoms in rigid bodies"); + if (temperature->tempbias) which = BIAS; else which = NOBIAS; } diff --git a/src/fix_temp_csld.cpp b/src/fix_temp_csld.cpp index f24314ac80..63f27cdecb 100644 --- a/src/fix_temp_csld.cpp +++ b/src/fix_temp_csld.cpp @@ -155,6 +155,9 @@ void FixTempCSLD::init() error->all(FLERR,"Temperature ID for fix temp/csld does not exist"); temperature = modify->compute[icompute]; + if (modify->check_rigid_group_overlap(groupbit)) + error->warning(FLERR,"Cannot thermostat atoms in rigid bodies"); + if (temperature->tempbias) which = BIAS; else which = NOBIAS; } -- GitLab From 3a018363254afff4a95f2369eac3210d4f43aa40 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Jun 2017 16:39:17 -0400 Subject: [PATCH 238/593] simplify code for rigid body overlap checks --- src/modify.cpp | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/src/modify.cpp b/src/modify.cpp index b390b7f89a..01de6b5928 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -1011,16 +1011,11 @@ int Modify::check_rigid_group_overlap(int groupbit) int n = 0; for (int ifix = 0; ifix < nfix; ifix++) { if (strncmp("rigid",fix[ifix]->style,5) == 0) { - const int bothbits = groupbit | fix[ifix]->groupbit; const int * const body = (const int *)fix[ifix]->extract("body",dim); if ((body == NULL) || (dim != 1)) break; - for (int i=0; i < nlocal; ++i) { - if (((mask[i] & bothbits) == bothbits) && (body[i] >= 0)) { - ++n; break; - } - } - if (n > 0) break; + for (int i=0; (i < nlocal) && (n == 0); ++i) + if ((mask[i] & groupbit) && (body[i] >= 0)) ++n; } } @@ -1048,17 +1043,12 @@ int Modify::check_rigid_region_overlap(int groupbit, Region *reg) reg->prematch(); for (int ifix = 0; ifix < nfix; ifix++) { if (strncmp("rigid",fix[ifix]->style,5) == 0) { - const int bothbits = groupbit | fix[ifix]->groupbit; const int * const body = (const int *)fix[ifix]->extract("body",dim); if ((body == NULL) || (dim != 1)) break; - for (int i=0; i < nlocal; ++i) - if (((mask[i] & bothbits) == bothbits) && (body[i] >= 0) - && reg->match(x[i][0],x[i][1],x[i][2])) { - ++n; - break; - } - if (n > 0) break; + for (int i=0; (i < nlocal) && (n == 0); ++i) + if ((mask[i] & groupbit) && (body[i] >= 0) + && reg->match(x[i][0],x[i][1],x[i][2])) ++n; } } @@ -1084,17 +1074,11 @@ int Modify::check_rigid_list_overlap(int *select) int n = 0; for (int ifix = 0; ifix < nfix; ifix++) { if (strncmp("rigid",fix[ifix]->style,5) == 0) { - const int groupbit = fix[ifix]->groupbit; const int * const body = (const int *)fix[ifix]->extract("body",dim); if ((body == NULL) || (dim != 1)) break; - for (int i=0; i < nlocal; ++i) { - if ((mask[i] & groupbit) && (body[i] >= 0) && select[i]) { - ++n; - break; - } - } - if (n > 0) break; + for (int i=0; (i < nlocal) && (n == 0); ++i) + if ((body[i] >= 0) && select[i]) ++n; } } -- GitLab From deff6c666eaf6f9025bc9051d3112807d69fc6fb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Jun 2017 17:31:43 -0400 Subject: [PATCH 239/593] add flag "reinit" with args "yes" / "no" to fixes rigid & rigid/small --- src/RIGID/fix_rigid.cpp | 24 ++++++++++++++++------- src/RIGID/fix_rigid.h | 1 + src/RIGID/fix_rigid_small.cpp | 36 +++++++++++++++++++++++++---------- src/RIGID/fix_rigid_small.h | 1 + 4 files changed, 45 insertions(+), 17 deletions(-) diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index e9c06dee5c..83022cbcba 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -267,6 +267,8 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : int seed; langflag = 0; + reinitflag = 1; + tstat_flag = 0; pstat_flag = 0; allremap = 1; @@ -501,6 +503,14 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : infile = new char[n]; strcpy(infile,arg[iarg+1]); restart_file = 1; + reinitflag = 0; + iarg += 2; + + } else if (strcmp(arg[iarg],"reinit") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix rigid/small command"); + if (strcmp("yes",arg[iarg+1]) == 0) reinitflag = 1; + else if (strcmp("no",arg[iarg+1]) == 0) reinitflag = 0; + else error->all(FLERR,"Illegal fix rigid command"); iarg += 2; } else error->all(FLERR,"Illegal fix rigid command"); @@ -679,15 +689,15 @@ void FixRigid::init() if (strstr(update->integrate_style,"respa")) step_respa = ((Respa *) update->integrate)->step; - // setup rigid bodies, using current atom info - // only do initialization once, b/c properties may not be re-computable - // especially if overlapping particles - // do not do dynamic init if read body properties from infile - // this is b/c the infile defines the static and dynamic properties - // and may not be computable if contain overlapping particles + // setup rigid bodies, using current atom info. if reinitflag is not set, + // do the initialization only once, b/c properties may not be re-computable + // especially if overlapping particles. + // do not do dynamic init if read body properties from infile. + // this is b/c the infile defines the static and dynamic properties and may + // not be computable if contain overlapping particles. // setup_bodies_static() reads infile itself - if (!setupflag) { + if (reinitflag || !setupflag) { setup_bodies_static(); if (!infile) setup_bodies_dynamic(); setupflag = 1; diff --git a/src/RIGID/fix_rigid.h b/src/RIGID/fix_rigid.h index a6d1f65e1c..12439d42cf 100644 --- a/src/RIGID/fix_rigid.h +++ b/src/RIGID/fix_rigid.h @@ -104,6 +104,7 @@ class FixRigid : public Fix { int extended; // 1 if any particles have extended attributes int orientflag; // 1 if particles store spatial orientation int dorientflag; // 1 if particles store dipole orientation + int reinitflag; // 1 if re-initialize rigid bodies between runs imageint *xcmimage; // internal image flags for atoms in rigid bodies // set relative to in-box xcm of each body diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index 2d8e736a1e..f40b52e162 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -138,6 +138,7 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : langflag = 0; infile = NULL; onemols = NULL; + reinitflag = 1; tstat_flag = 0; pstat_flag = 0; @@ -173,6 +174,7 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Fix rigid/small langevin period must be > 0.0"); if (seed <= 0) error->all(FLERR,"Illegal fix rigid/small command"); iarg += 5; + } else if (strcmp(arg[iarg],"infile") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix rigid/small command"); delete [] infile; @@ -180,7 +182,16 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : infile = new char[n]; strcpy(infile,arg[iarg+1]); restart_file = 1; + reinitflag = 0; + iarg += 2; + + } else if (strcmp(arg[iarg],"reinit") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix rigid/small command"); + if (strcmp("yes",arg[iarg+1]) == 0) reinitflag = 1; + else if (strcmp("no",arg[iarg+1]) == 0) reinitflag = 0; + else error->all(FLERR,"Illegal fix rigid/small command"); iarg += 2; + } else if (strcmp(arg[iarg],"mol") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix rigid/small command"); int imol = atom->find_molecule(arg[iarg+1]); @@ -520,14 +531,15 @@ void FixRigidSmall::init() } /* ---------------------------------------------------------------------- - setup static/dynamic properties of rigid bodies, using current atom info - only do initialization once, b/c properties may not be re-computable - especially if overlapping particles or bodies inserted from mol template - do not do dynamic init if read body properties from infile - this is b/c the infile defines the static and dynamic properties - and may not be computable if contain overlapping particles - setup_bodies_static() reads infile itself - cannot do this until now, b/c requires comm->setup() to have setup stencil + setup static/dynamic properties of rigid bodies, using current atom info. + if reinitflag is not set, do the initialization only once, b/c properties + may not be re-computable especially if overlapping particles or bodies + are inserted from mol template. + do not do dynamic init if read body properties from infile. this + is b/c the infile defines the static and dynamic properties and may not + be computable if contain overlapping particles setup_bodies_static() + reads infile itself. + cannot do this until now, b/c requires comm->setup() to have setup stencil invoke pre_neighbor() to insure body xcmimage flags are reset needed if Verlet::setup::pbc() has remapped/migrated atoms for 2nd run setup_bodies_static() invokes pre_neighbor itself @@ -535,9 +547,13 @@ void FixRigidSmall::init() void FixRigidSmall::setup_pre_neighbor() { - if (!setupflag) setup_bodies_static(); + if (reinitflag || !setupflag) + setup_bodies_static(); else pre_neighbor(); - if (!setupflag && !infile) setup_bodies_dynamic(); + + if ((reinitflag || !setupflag) && !infile) + setup_bodies_dynamic(); + setupflag = 1; } diff --git a/src/RIGID/fix_rigid_small.h b/src/RIGID/fix_rigid_small.h index 9c89bab885..72e32719c0 100644 --- a/src/RIGID/fix_rigid_small.h +++ b/src/RIGID/fix_rigid_small.h @@ -131,6 +131,7 @@ class FixRigidSmall : public Fix { int extended; // 1 if any particles have extended attributes int orientflag; // 1 if particles store spatial orientation int dorientflag; // 1 if particles store dipole orientation + int reinitflag; // 1 if re-initialize rigid bodies between runs int POINT,SPHERE,ELLIPSOID,LINE,TRIANGLE,DIPOLE; // bitmasks for eflags int OMEGA,ANGMOM,TORQUE; -- GitLab From 46c5cbae8f3a5016f6e3327b5a23bc2f42c7d258 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 5 Jun 2017 18:04:09 -0400 Subject: [PATCH 240/593] update rigid fix documentation for added `reinit` keyword --- doc/src/fix_rigid.txt | 65 ++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/doc/src/fix_rigid.txt b/doc/src/fix_rigid.txt index 03edf61ed8..dbadd3fa63 100644 --- a/doc/src/fix_rigid.txt +++ b/doc/src/fix_rigid.txt @@ -31,11 +31,12 @@ bodystyle = {single} or {molecule} or {group} :l groupID1, groupID2, ... = list of N group IDs :pre zero or more keyword/value pairs may be appended :l -keyword = {langevin} or {temp} or {iso} or {aniso} or {x} or {y} or {z} or {couple} or {tparam} or {pchain} or {dilate} or {force} or {torque} or {infile} :l +keyword = {langevin} or {reinit} or {temp} or {iso} or {aniso} or {x} or {y} or {z} or {couple} or {tparam} or {pchain} or {dilate} or {force} or {torque} or {infile} :l {langevin} values = Tstart Tstop Tperiod seed Tstart,Tstop = desired temperature at start/stop of run (temperature units) Tdamp = temperature damping parameter (time units) seed = random number seed to use for white noise (positive integer) + {reinit} = {yes} or {no} {temp} values = Tstart Tstop Tdamp Tstart,Tstop = desired temperature at start/stop of run (temperature units) Tdamp = temperature damping parameter (time units) @@ -68,10 +69,10 @@ keyword = {langevin} or {temp} or {iso} or {aniso} or {x} or {y} or {z} or {coup [Examples:] -fix 1 clump rigid single +fix 1 clump rigid single reinit yes fix 1 clump rigid/small molecule fix 1 clump rigid single force 1 off off on langevin 1.0 1.0 1.0 428984 -fix 1 polychains rigid/nvt molecule temp 1.0 1.0 5.0 +fix 1 polychains rigid/nvt molecule temp 1.0 1.0 5.0 reinit no fix 1 polychains rigid molecule force 1*5 off off off force 6*10 off off on fix 1 polychains rigid/small molecule langevin 1.0 1.0 1.0 428984 fix 2 fluid rigid group 3 clump1 clump2 clump3 torque * off off off @@ -87,7 +88,12 @@ means that each timestep the total force and torque on each rigid body is computed as the sum of the forces and torques on its constituent particles. The coordinates, velocities, and orientations of the atoms in each body are then updated so that the body moves and rotates as a -single entity. +single entity. This is implemented by creating internal data structures +for each rigid body and performing time integration on these data +structures. Positions, velocities, and orientations of the constituent +particles are regenerated from the rigid body data structures in every +time step. This restricts which operations and fixes can be applied to +rigid bodies. See below for a detailed discussion. Examples of large rigid bodies are a colloidal particle, or portions of a biomolecule such as a protein. @@ -148,8 +154,9 @@ differences may accumulate to produce divergent trajectories. NOTE: You should not update the atoms in rigid bodies via other time-integration fixes (e.g. "fix nve"_fix_nve.html, "fix -nvt"_fix_nh.html, "fix npt"_fix_nh.html), or you will be integrating -their motion more than once each timestep. When performing a hybrid +nvt"_fix_nh.html, "fix npt"_fix_nh.html, "fix move"_fix_move.html), +or you will have conflicting updates to positions and velocities +resulting in unphysical behavior in most cases. When performing a hybrid simulation with some atoms in rigid bodies, and some not, a separate time integration fix like "fix nve"_fix_nve.html or "fix nvt"_fix_nh.html should be used for the non-rigid particles. @@ -165,23 +172,29 @@ setting the force on them to 0.0 (via the "fix setforce"_fix_setforce.html command), and integrating them as usual (e.g. via the "fix nve"_fix_nve.html command). -NOTE: The aggregate properties of each rigid body are calculated one -time at the start of the first simulation run after these fixes are -specified. The properties include the position and velocity of the -center-of-mass of the body, its moments of inertia, and its angular -momentum. This is done using the properties of the constituent atoms -of the body at that point in time (or see the {infile} keyword -option). Thereafter, changing properties of individual atoms in the -body will have no effect on a rigid body's dynamics, unless they -affect the "pair_style"_pair_style.html interactions that individual -particles are part of. For example, you might think you could -displace the atoms in a body or add a large velocity to each atom in a -body to make it move in a desired direction before a 2nd run is +IMPORTANT NOTE: The aggregate properties of each rigid body are +calculated at the start of a simulation run and are maintained in +internal data structures. The properties include the position and +velocity of the center-of-mass of the body, its moments of inertia, and +its angular momentum. This is done using the properties of the +constituent atoms of the body at that point in time (or see the {infile} +keyword option). Thereafter, changing these properties of individual +atoms in the body will have no effect on a rigid body's dynamics, unless +they effect any computation of per-atom forces or torques. If the +keyword {reinit} is set to {yes} (the default), the rigid body data +structures will be recreated at the beginning of each {run} command; +if the keyword {reinit} is set to {no}, the rigid body data structures +will be built only at the very first {run} command and maintained for +as long as the rigid fix is defined. For example, you might think you +could displace the atoms in a body or add a large velocity to each atom +in a body to make it move in a desired direction before a 2nd run is performed, using the "set"_set.html or "displace_atoms"_displace_atoms.html or "velocity"_velocity.html -command. But these commands will not affect the internal attributes -of the body, and the position and velocity of individual atoms in the -body will be reset when time integration starts. +commands. But these commands will not affect the internal attributes +of the body unless {reinit} is set to {yes}. With {reinit} set to {no} +(or using the {infile} option, which implies {reinit} {no}) the position +and velocity of individual atoms in the body will be reset when time +integration starts again. :line @@ -401,6 +414,14 @@ couple none :pre The keyword/value option pairs are used in the following ways. +The {reinit} keyword determines, whether the rigid body properties +are reinitialized between run commands. With the option {yes} (the +default) this is done, with the option {no} this is not done. Turning +off the reinitialization can be helpful to protect rigid bodies against +unphysical manipulations between runs or when properties cannot be +easily recomputed (e.g. when read from a file). When using the {infile} +keyword, the {reinit} option is automatically set to {no}. + The {langevin} and {temp} and {tparam} keywords perform thermostatting of the rigid bodies, altering both their translational and rotational degrees of freedom. What is meant by "temperature" of a collection of @@ -778,7 +799,7 @@ exclude, "fix shake"_fix_shake.html The option defaults are force * on on on and torque * on on on, meaning all rigid bodies are acted on by center-of-mass force and -torque. Also Tchain = Pchain = 10, Titer = 1, Torder = 3. +torque. Also Tchain = Pchain = 10, Titer = 1, Torder = 3, reinit = yes. :line -- GitLab From d437650c776f218c139c2900e7fa8efcad6a2750 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Jun 2017 08:08:10 -0400 Subject: [PATCH 241/593] make certain Domain::box_change is initialized before use --- src/domain.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/domain.cpp b/src/domain.cpp index aadd1b751f..427f7785e8 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -60,6 +60,7 @@ enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files Domain::Domain(LAMMPS *lmp) : Pointers(lmp) { box_exist = 0; + box_change = 0; dimension = 3; nonperiodic = 0; -- GitLab From 06c8e95774cc1d42a49d9ca2419cbbbaf42d3cac Mon Sep 17 00:00:00 2001 From: Emile Maras Date: Tue, 6 Jun 2017 14:20:54 +0200 Subject: [PATCH 242/593] corrected the fix_neb documentation --- doc/src/fix_neb.txt | 98 +++++++++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/doc/src/fix_neb.txt b/doc/src/fix_neb.txt index cd0fa23e85..94c6ee84fd 100644 --- a/doc/src/fix_neb.txt +++ b/doc/src/fix_neb.txt @@ -18,20 +18,19 @@ Kspring = parallel spring constant (force/distance units or force units) :l zero or more keyword/value pairs may be appended :l keyword = {nudg_style} or {perp} or {freend} or {freend_k_spring} :l {nudg_style} value = {neigh} or {idealpos} - {neigh} = the parallel nudging force is calculated from the distance to neighbouring replicas (in this case, Kspring is in force/distance units) + {neigh} = the parallel nudging force is calculated from the distances to neighbouring replicas (in this case, Kspring is in force/distance units) {idealpos} = the parallel nudging force is proportional to the distance between the replica and its interpolated ideal position (in this case Kspring is in force units) {perp} value {none} or kspring2 {none} = no perpendicular spring force is applied + {kspring2} = spring constant for the perpendicular nudging force (in force/distance units) {freeend} value = {none} or {ini} or {final} or {finaleini} or {final2eini} - {none} = no nudging force is apply to the first and last replicas + {none} = no nudging force is applied to the first and last replicas {ini} = set the first replica to be a free end {final} = set the last replica to be a free end {finaleini} = set the last replica to be a free end and set its target energy as that of the first replica {final2eini} = same as {finaleini} plus prevent intermediate replicas to have a lower energy than the first replica - {freeend_kspring} value = kspring2 - kspring2 = spring constant of the perpendicular spring force (per distance units) -flag = set behavior for the end points - flag = + {freeend_kspring} value = kspring3 + kspring3 = spring constant of the perpendicular spring force (per distance units) :pre [Examples:] @@ -58,10 +57,10 @@ highest energy along the MEP). One purpose of the nudging forces is to keep the replicas equally spaced. During the NEB, the 3N-length vector of interatomic force Fi = -Grad(V) of replicas i is altered. For all intermediate replicas -(i.e. for 1 0 +Fi = -Grad(V)+ (Grad(V) dot That + (E-ETarget)*kspring3) That, {when} Grad(V) dot That < 0 +Fi = -Grad(V)+ (Grad(V) dot That + (ETarget- E)*kspring3) That, {when} Grad(V) dot That > 0 :pre where E is the energy of the free end replica and ETarget is the @@ -120,44 +152,14 @@ replica, a free end neb calculation with the value {finaleini} or :line -The keyword {nudg_style} allow to specify how to parallel -nudging force is computed. With a value of idealpos, the spring -force is computed as suggested in "(E)"_#E : - -Fnudgparallel=-{Kspring}* (RD-RDideal)/(2 meanDist) :pre -where RD is the "reaction coordinate" see "neb"_neb.html section, and -RDideal is the ideal RD for which all the images are equally spaced -(i.e. RDideal = (i-1)*meanDist when the climbing image is off, where i -is the replica number). The meanDist is the average distance between -replicas. -When {nudg_style} has a value of neigh (or by default), the parallel -nudging force is computed as in "(Henkelman1)"_#Henkelman1 by -connecting each intermediate replica with the previous and the next -image: - -Fnudgparallel= {Kspring}* (|Ri+1 - Ri| - |Ri - Ri-1|) :pre - -The parallel nudging force associated with the key word idealpos should -usually be more efficient at keeping the images equally spaced. - -:line - -The keyword {perp} allows to add a spring force perpendicular to the -path in order to prevent the path from becoming too kinky. It can -improve significantly the convergence of the NEB when the resolution -is poor (i.e. when too few images are used) (see "(Maras)"_#Maras1). -The perpendicular spring force is given by +In the second stage of the NEB, the interatomic force Fi for the +climbing replica (which is the replica of highest energy) becomes: -Fspringperp = {Kspringperp} * f(Ri-1,Ri,Ri+1) (Ri+1 + Ri-1 - 2 Ri) :pre +Fi = -Grad(V) + 2 (Grad(V) dot That) That :pre -f(Ri-1 Ri R+1) is a smooth scalar function of the angle Ri-1 Ri -Ri+1. It is equal to 0 when the path is straight and is equal to 1 -when the angle Ri-1 Ri Ri+1 is accute. f(Ri-1 Ri R+1) is defined in -"(Jonsson)"_#Jonsson -:line [Restart, fix_modify, output, run start/stop, minimize info:] -- GitLab From 18dee3f78ed2537f3044d757691b526f4778ca7e Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Tue, 6 Jun 2017 16:03:09 -0400 Subject: [PATCH 243/593] Added Gaussian bump. Updated e-mail address. --- doc/src/manifolds.txt | 7 ++++--- src/USER-MANIFOLD/manifold.h | 2 +- src/USER-MANIFOLD/manifold_gaussian_bump.h | 5 ++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/src/manifolds.txt b/doc/src/manifolds.txt index 9f0082d5dc..c9bb1ce57f 100644 --- a/doc/src/manifolds.txt +++ b/doc/src/manifolds.txt @@ -24,14 +24,15 @@ to the relevant fixes. {manifold} @ {parameters} @ {equation} @ {description} cylinder @ R @ x^2 + y^2 - R^2 = 0 @ Cylinder along z-axis, axis going through (0,0,0) cylinder_dent @ R l a @ x^2 + y^2 - r(z)^2 = 0, r(x) = R if | z | > l, r(z) = R - a*(1 + cos(z/l))/2 otherwise @ A cylinder with a dent around z = 0 -dumbbell @ a A B c @ -( x^2 + y^2 ) * (a^2 - z^2/c^2) * ( 1 + (A*sin(B*z^2))^4) = 0 @ A dumbbell @ +dumbbell @ a A B c @ -( x^2 + y^2 ) + (a^2 - z^2/c^2) * ( 1 + (A*sin(B*z^2))^4) = 0 @ A dumbbell ellipsoid @ a b c @ (x/a)^2 + (y/b)^2 + (z/c)^2 = 0 @ An ellipsoid +gaussian_bump @ A l rc1 rc2 @ if( x < rc1) -z + A * exp( -x^2 / (2 l^2) ); else if( x < rc2 ) -z + a + b*x + c*x^2 + d*x^3; else z @ A Gaussian bump at x = y = 0, smoothly tapered to a flat plane z = 0. plane @ a b c x0 y0 z0 @ a*(x-x0) + b*(y-y0) + c*(z-z0) = 0 @ A plane with normal (a,b,c) going through point (x0,y0,z0) plane_wiggle @ a w @ z - a*sin(w*x) = 0 @ A plane with a sinusoidal modulation on z along x. sphere @ R @ x^2 + y^2 + z^2 - R^2 = 0 @ A sphere of radius R supersphere @ R q @ | x |^q + | y |^q + | z |^q - R^q = 0 @ A supersphere of hyperradius R -spine @ a, A, B, B2, c @ -(x^2 + y^2)*(a^2 - z^2/f(z)^2)*(1 + (A*sin(g(z)*z^2))^4), f(z) = c if z > 0, 1 otherwise; g(z) = B if z > 0, B2 otherwise @ An approximation to a dendtritic spine -spine_two @ a, A, B, B2, c @ -(x^2 + y^2)*(a^2 - z^2/f(z)^2)*(1 + (A*sin(g(z)*z^2))^2), f(z) = c if z > 0, 1 otherwise; g(z) = B if z > 0, B2 otherwise @ Another approximation to a dendtritic spine +spine @ a, A, B, B2, c @ -(x^2 + y^2) + (a^2 - z^2/f(z)^2)*(1 + (A*sin(g(z)*z^2))^4), f(z) = c if z > 0, 1 otherwise; g(z) = B if z > 0, B2 otherwise @ An approximation to a dendtritic spine +spine_two @ a, A, B, B2, c @ -(x^2 + y^2) + (a^2 - z^2/f(z)^2)*(1 + (A*sin(g(z)*z^2))^2), f(z) = c if z > 0, 1 otherwise; g(z) = B if z > 0, B2 otherwise @ Another approximation to a dendtritic spine thylakoid @ wB LB lB @ Various, see "(Paquay)"_#Paquay1 @ A model grana thylakoid consisting of two block-like compartments connected by a bridge of width wB, length LB and taper length lB torus @ R r @ (R - sqrt( x^2 + y^2 ) )^2 + z^2 - r^2 @ A torus with large radius R and small radius r, centered on (0,0,0) :tb(s=@) diff --git a/src/USER-MANIFOLD/manifold.h b/src/USER-MANIFOLD/manifold.h index d0ffa214ac..b89e765a6e 100644 --- a/src/USER-MANIFOLD/manifold.h +++ b/src/USER-MANIFOLD/manifold.h @@ -24,7 +24,7 @@ testing purposes) and a wave-y plane. See the README file for more info. - Stefan Paquay, s.paquay@tue.nl + Stefan Paquay, stefanpaquay@gmail.com Applied Physics/Theory of Polymers and Soft Matter, Eindhoven University of Technology (TU/e), The Netherlands diff --git a/src/USER-MANIFOLD/manifold_gaussian_bump.h b/src/USER-MANIFOLD/manifold_gaussian_bump.h index 43f69fba18..f3401a4a33 100644 --- a/src/USER-MANIFOLD/manifold_gaussian_bump.h +++ b/src/USER-MANIFOLD/manifold_gaussian_bump.h @@ -24,7 +24,10 @@ testing purposes) and a wave-y plane. See the README file for more info. - Stefan Paquay, s.paquay@tue.nl + Stefan Paquay, spaquay@brandeis.edu + Brandeis University, Waltham, MA, USA. + + This package was mainly developed at Applied Physics/Theory of Polymers and Soft Matter, Eindhoven University of Technology (TU/e), The Netherlands -- GitLab From cd67eaa5f42a4b6506dd95b871de872689757e17 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Jun 2017 16:26:57 -0400 Subject: [PATCH 244/593] update e-mail and affiliation for stefan paquay in USER-MANIFOLD related files --- doc/src/Section_packages.txt | 4 ++-- src/USER-MANIFOLD/README | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index cc44c05906..d4276fdf82 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -2027,8 +2027,8 @@ algorithm to formulate single-particle constraint functions g(xi,yi,zi) = 0 and their derivative (i.e. the normal of the manifold) n = grad(g). -[Author:] Stefan Paquay (Eindhoven University of Technology (TU/e), The -Netherlands) +[Author:] Stefan Paquay (until 2017: Eindhoven University of Technology (TU/e), The +Netherlands; since 2017: Brandeis University, Waltham, MA, USA) [Install or un-install:] diff --git a/src/USER-MANIFOLD/README b/src/USER-MANIFOLD/README index f55a9bb8e3..eb83cfc5ab 100644 --- a/src/USER-MANIFOLD/README +++ b/src/USER-MANIFOLD/README @@ -7,10 +7,14 @@ box). It achieves this using the RATTLE constraint algorithm applied to single-particle constraint functions g(xi,yi,zi) = 0 and their derivative (i.e. the normal of the manifold) n = grad(g). -Stefan Paquay, s.paquay@tue.nl -Applied Physics/Theory of Polymers and Soft Matter, +Stefan Paquay, stefanpaquay@gmail.com + +until 2017: Applied Physics/Theory of Polymers and Soft Matter, Eindhoven University of Technology (TU/e), The Netherlands +since 2017: Brandeis University, Waltham, MA, USA. + + Thanks to Remy Kusters at TU/e for testing. This software is distributed under the GNU General Public License. -- GitLab From 5cb56796a22fcc615d613a612a0d9edc2a248026 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Jun 2017 17:26:06 -0400 Subject: [PATCH 245/593] alias pair style lj/sf to lj/smooth/linear and remove/update related files --- doc/src/Eqs/pair_lj_sf.jpg | Bin 15535 -> 0 bytes doc/src/Eqs/pair_lj_sf.tex | 11 - doc/src/Section_commands.txt | 1 - doc/src/pair_lj_sf.txt | 114 -------- doc/src/pair_lj_smooth_linear.txt | 31 +- src/Purge.list | 5 + src/USER-MISC/pair_lj_sf.cpp | 355 ----------------------- src/USER-MISC/pair_lj_sf.h | 53 ---- src/USER-OMP/pair_lj_sf_omp.cpp | 164 ----------- src/USER-OMP/pair_lj_sf_omp.h | 48 --- src/USER-OMP/pair_lj_smooth_linear_omp.h | 1 + src/pair_lj_smooth_linear.h | 1 + 12 files changed, 23 insertions(+), 761 deletions(-) delete mode 100644 doc/src/Eqs/pair_lj_sf.jpg delete mode 100644 doc/src/Eqs/pair_lj_sf.tex delete mode 100644 doc/src/pair_lj_sf.txt delete mode 100644 src/USER-MISC/pair_lj_sf.cpp delete mode 100644 src/USER-MISC/pair_lj_sf.h delete mode 100644 src/USER-OMP/pair_lj_sf_omp.cpp delete mode 100644 src/USER-OMP/pair_lj_sf_omp.h diff --git a/doc/src/Eqs/pair_lj_sf.jpg b/doc/src/Eqs/pair_lj_sf.jpg deleted file mode 100644 index a702240003cd4e1bd5043fc5e6a523998fadf8de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15535 zcmex=$<%PwSRFvdYWaQ-K{vTlA=3rRBEXBwu z$ngINgA4;B12ZECFu(vS8#@a#6C=m}BMboo42&#Hj7%)dEG%4X>}>1|j0{Z7EUbcT zLW=CdhK?difgDDOg~~yV6Gg?u&76|T7H+)~8dlUaX_|_$NpN_|MOAa>DT_8IZ`^Y5 z$mI|JZ!vH%GBPmOGyFU4LIDVfSv=!op5BYuCpKR(Ov|mT7uHA*JJ%rnYeGoveW4wq zQtvjGPkpTIaDT7Lr7tFRDc{0oT|S()B`o{I&BUpVAN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zp_=*NMcwk|Y4}gSFhkjuiXxeg*ROu~I_uFRPuX2h%I3VS zVmoHP$aCW&B_*ZLo0T7}SJ`+_<$boNpj(v8=P$A@y#G>IC;q4pp8JuXZOMVqhuc%1 z=uB5s&Aq$ghSbZqzB+lue=a#NxxM#QPiWj9dh^jW;n|<&na+DS;c@nPuP;}UkEcj$ zODT1(@BF;)eDJUC<{5uEZj^D?EsvVACS~I;&4}w8A8b8aaHGI(LI0wL2NkpDR0~zS z=`~9Jc*MPDL&__?wf7gP=kE_mD9L$axv=lv>E;}*o%0UgJom{bVW&htf7i_I4X@v4 zonUd}kn8DB{rflm;<~feVBdgZ41v*e!|S<6D(2fCtLT<^dF*^lk|ke%#smFV>r?ud z1X-Rf{FZXgt|v2Be(X4rnNcqJMEN;JQnnXtS#Cvz2M%wi--Lb zpKaZL)#%j6f6pImwNUKZqtnDOQzUSUX-~3q)CF4x<_kLSk68GdKAX|U$?(~*;^)KD zpTsk!i5+|J>Z<=nBae%Ua%Z~t-;=%w8Wt-)vd`dL;-O6v@*So*r>>p$yYO{wnmMQ9 zl={ueQS|~G-{bemelq_QXDqsV>QS4uh|LB{i(y`a|WSyO6+x^|G|1+s|fA`$A^Ak5!Gwrm|e)OqOPBdIR z?{IF))0*iirI!)be_zHybgaO%)W<%tW=R(o7z0nJ1%{&7x!$O{3UMlLdbiVU>Pcnc3~U%KCZRQa2_oakDBs;n=mY?C_K1((iXnE -#include -#include -#include "pair_lj_sf.h" -#include "atom.h" -#include "comm.h" -#include "force.h" -#include "neigh_list.h" -#include "memory.h" -#include "error.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -PairLJShiftedForce::PairLJShiftedForce(LAMMPS *lmp) : Pair(lmp) -{ - respa_enable = 0; -} - -/* ---------------------------------------------------------------------- */ - -PairLJShiftedForce::~PairLJShiftedForce() -{ - if (allocated) { - memory->destroy(setflag); - memory->destroy(cutsq); - - memory->destroy(cut); - memory->destroy(epsilon); - memory->destroy(sigma); - memory->destroy(lj1); - memory->destroy(lj2); - memory->destroy(lj3); - memory->destroy(lj4); - memory->destroy(foffset); - memory->destroy(offset); - } -} - -/* ---------------------------------------------------------------------- */ - -void PairLJShiftedForce::compute(int eflag, int vflag) -{ - int i,j,ii,jj,inum,jnum,itype,jtype; - double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; - double rsq,r2inv,r6inv,forcelj,factor_lj; - double r,t; - int *ilist,*jlist,*numneigh,**firstneigh; - - evdwl = 0.0; - if (eflag || vflag) ev_setup(eflag,vflag); - else evflag = vflag_fdotr = 0; - - double **x = atom->x; - double **f = atom->f; - int *type = atom->type; - int nlocal = atom->nlocal; - double *special_lj = force->special_lj; - int newton_pair = force->newton_pair; - - inum = list->inum; - ilist = list->ilist; - numneigh = list->numneigh; - firstneigh = list->firstneigh; - - // loop over neighbors of my atoms - - for (ii = 0; ii < inum; ii++) { - i = ilist[ii]; - xtmp = x[i][0]; - ytmp = x[i][1]; - ztmp = x[i][2]; - itype = type[i]; - jlist = firstneigh[i]; - jnum = numneigh[i]; - - for (jj = 0; jj < jnum; jj++) { - j = jlist[jj]; - factor_lj = special_lj[sbmask(j)]; - j &= NEIGHMASK; - - delx = xtmp - x[j][0]; - dely = ytmp - x[j][1]; - delz = ztmp - x[j][2]; - rsq = delx*delx + dely*dely + delz*delz; - jtype = type[j]; - - if (rsq < cutsq[itype][jtype]) { - r2inv = 1.0/rsq; - r6inv = r2inv*r2inv*r2inv; - r = sqrt(rsq); - t = r/cut[itype][jtype]; - forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]) - - t*foffset[itype][jtype]; - fpair = factor_lj*forcelj*r2inv; - - f[i][0] += delx*fpair; - f[i][1] += dely*fpair; - f[i][2] += delz*fpair; - if (newton_pair || j < nlocal) { - f[j][0] -= delx*fpair; - f[j][1] -= dely*fpair; - f[j][2] -= delz*fpair; - } - - if (eflag) { - evdwl = r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]) + - (t-1.0)*foffset[itype][jtype] - offset[itype][jtype]; - evdwl *= factor_lj; - } - - if (evflag) ev_tally(i,j,nlocal,newton_pair, - evdwl,0.0,fpair,delx,dely,delz); - } - } - } - - if (vflag_fdotr) virial_fdotr_compute(); -} - -/* ---------------------------------------------------------------------- - allocate all arrays -------------------------------------------------------------------------- */ - -void PairLJShiftedForce::allocate() -{ - allocated = 1; - int n = atom->ntypes; - - memory->create(setflag,n+1,n+1,"pair:setflag"); - for (int i = 1; i <= n; i++) - for (int j = i; j <= n; j++) - setflag[i][j] = 0; - - memory->create(cutsq,n+1,n+1,"pair:cutsq"); - - memory->create(cut,n+1,n+1,"pair:cut"); - memory->create(epsilon,n+1,n+1,"pair:epsilon"); - memory->create(sigma,n+1,n+1,"pair:sigma"); - memory->create(lj1,n+1,n+1,"pair:lj1"); - memory->create(lj2,n+1,n+1,"pair:lj2"); - memory->create(lj3,n+1,n+1,"pair:lj3"); - memory->create(lj4,n+1,n+1,"pair:lj4"); - memory->create(foffset,n+1,n+1,"pair:foffset"); - memory->create(offset,n+1,n+1,"pair:offset"); -} - -/* ---------------------------------------------------------------------- - global settings -------------------------------------------------------------------------- */ - -void PairLJShiftedForce::settings(int narg, char **arg) -{ - if (narg != 1) error->all(FLERR,"Illegal pair_style command"); - - cut_global = force->numeric(FLERR,arg[0]); - - if (cut_global <= 0.0) - error->all(FLERR,"Illegal pair_style command"); - - // reset cutoffs that have been explicitly set - - if (allocated) { - int i,j; - for (i = 1; i <= atom->ntypes; i++) - for (j = i; j <= atom->ntypes; j++) - if (setflag[i][j]) cut[i][j] = cut_global; - } -} - -/* ---------------------------------------------------------------------- - set coeffs for one or more type pairs -------------------------------------------------------------------------- */ - -void PairLJShiftedForce::coeff(int narg, char **arg) -{ - if (narg < 4 || narg > 5) - error->all(FLERR,"Incorrect args for pair coefficients"); - if (!allocated) allocate(); - - int ilo,ihi,jlo,jhi; - force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi); - force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi); - - double epsilon_one = force->numeric(FLERR,arg[2]); - double sigma_one = force->numeric(FLERR,arg[3]); - - double cut_one = cut_global; - if (narg == 5) cut_one = force->numeric(FLERR,arg[4]); - - if (cut_one <= 0.0) - error->all(FLERR,"Incorrect args for pair coefficients"); - - int count = 0; - for (int i = ilo; i <= ihi; i++) { - for (int j = MAX(jlo,i); j <= jhi; j++) { - epsilon[i][j] = epsilon_one; - sigma[i][j] = sigma_one; - cut[i][j] = cut_one; - setflag[i][j] = 1; - count++; - } - } - - if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); -} - -/* ---------------------------------------------------------------------- - init for one type pair i,j and corresponding j,i -------------------------------------------------------------------------- */ - -double PairLJShiftedForce::init_one(int i, int j) -{ - if (setflag[i][j] == 0) { - epsilon[i][j] = mix_energy(epsilon[i][i],epsilon[j][j], - sigma[i][i],sigma[j][j]); - sigma[i][j] = mix_distance(sigma[i][i],sigma[j][j]); - cut[i][j] = mix_distance(cut[i][i],cut[j][j]); - } - - lj1[i][j] = 48.0 * epsilon[i][j] * pow(sigma[i][j],12.0); - lj2[i][j] = 24.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); - lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - - double ratio = sigma[i][j] / cut[i][j]; - foffset[i][j] = 4.0 * epsilon[i][j] * (12.0 * pow(ratio,12.0) - - 6.0 * pow(ratio,6.0)); - offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); - - cut[j][i] = cut[i][j]; - lj1[j][i] = lj1[i][j]; - lj2[j][i] = lj2[i][j]; - lj3[j][i] = lj3[i][j]; - lj4[j][i] = lj4[i][j]; - foffset[j][i] = foffset[i][j]; - offset[j][i] = offset[i][j]; - - return cut[i][j]; -} - -/* ---------------------------------------------------------------------- - proc 0 writes to restart file -------------------------------------------------------------------------- */ - -void PairLJShiftedForce::write_restart(FILE *fp) -{ - write_restart_settings(fp); - - int i,j; - for (i = 1; i <= atom->ntypes; i++) - for (j = i; j <= atom->ntypes; j++) { - fwrite(&setflag[i][j],sizeof(int),1,fp); - if (setflag[i][j]) { - fwrite(&epsilon[i][j],sizeof(double),1,fp); - fwrite(&sigma[i][j],sizeof(double),1,fp); - fwrite(&cut[i][j],sizeof(double),1,fp); - } - } -} - -/* ---------------------------------------------------------------------- - proc 0 reads from restart file, bcasts -------------------------------------------------------------------------- */ - -void PairLJShiftedForce::read_restart(FILE *fp) -{ - read_restart_settings(fp); - allocate(); - - int i,j; - int me = comm->me; - for (i = 1; i <= atom->ntypes; i++) - for (j = i; j <= atom->ntypes; j++) { - if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); - MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); - if (setflag[i][j]) { - if (me == 0) { - fread(&epsilon[i][j],sizeof(double),1,fp); - fread(&sigma[i][j],sizeof(double),1,fp); - fread(&cut[i][j],sizeof(double),1,fp); - } - MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world); - } - } -} - -/* ---------------------------------------------------------------------- - proc 0 writes to restart file -------------------------------------------------------------------------- */ - -void PairLJShiftedForce::write_restart_settings(FILE *fp) -{ - fwrite(&cut_global,sizeof(double),1,fp); - fwrite(&offset_flag,sizeof(int),1,fp); - fwrite(&mix_flag,sizeof(int),1,fp); -} - -/* ---------------------------------------------------------------------- - proc 0 reads from restart file, bcasts -------------------------------------------------------------------------- */ - -void PairLJShiftedForce::read_restart_settings(FILE *fp) -{ - int me = comm->me; - if (me == 0) { - fread(&cut_global,sizeof(double),1,fp); - fread(&offset_flag,sizeof(int),1,fp); - fread(&mix_flag,sizeof(int),1,fp); - } - MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); - MPI_Bcast(&offset_flag,1,MPI_INT,0,world); - MPI_Bcast(&mix_flag,1,MPI_INT,0,world); -} - -/* ---------------------------------------------------------------------- */ - -double PairLJShiftedForce::single(int i, int j, int itype, int jtype, double rsq, - double factor_coul, double factor_lj, - double &fforce) -{ - double r2inv,r6inv,forcelj,philj,r,t; - - r2inv = 1.0/rsq; - r6inv = r2inv*r2inv*r2inv; - r = sqrt(rsq); - t = r/cut[itype][jtype]; - forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]) - - t*foffset[itype][jtype]; - fforce = factor_lj*forcelj*r2inv; - - philj = r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]) + - (t-1.0)*foffset[itype][jtype] - offset[itype][jtype]; - return factor_lj*philj; -} diff --git a/src/USER-MISC/pair_lj_sf.h b/src/USER-MISC/pair_lj_sf.h deleted file mode 100644 index 1a4106b782..0000000000 --- a/src/USER-MISC/pair_lj_sf.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifdef PAIR_CLASS - -PairStyle(lj/sf,PairLJShiftedForce) - -#else - -#ifndef LMP_PAIR_LJ_SF_H -#define LMP_PAIR_LJ_SF_H - -#include "pair.h" - -namespace LAMMPS_NS { - -class PairLJShiftedForce : public Pair { - public: - PairLJShiftedForce(class LAMMPS *); - virtual ~PairLJShiftedForce(); - virtual void compute(int, int); - void settings(int, char **); - void coeff(int, char **); - double init_one(int, int); - void write_restart(FILE *); - void read_restart(FILE *); - void write_restart_settings(FILE *); - void read_restart_settings(FILE *); - double single(int, int, int, int, double, double, double, double &); - - protected: - double cut_global; - double **cut; - double **epsilon,**sigma; - double **lj1,**lj2,**lj3,**lj4,**foffset,**offset; - - void allocate(); -}; - -} - -#endif -#endif diff --git a/src/USER-OMP/pair_lj_sf_omp.cpp b/src/USER-OMP/pair_lj_sf_omp.cpp deleted file mode 100644 index bd9d5220b8..0000000000 --- a/src/USER-OMP/pair_lj_sf_omp.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - This software is distributed under the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -/* ---------------------------------------------------------------------- - Contributing author: Axel Kohlmeyer (Temple U) -------------------------------------------------------------------------- */ - -#include -#include "pair_lj_sf_omp.h" -#include "atom.h" -#include "comm.h" -#include "force.h" -#include "neighbor.h" -#include "neigh_list.h" - -#include "suffix.h" -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -PairLJShiftedForceOMP::PairLJShiftedForceOMP(LAMMPS *lmp) : - PairLJShiftedForce(lmp), ThrOMP(lmp, THR_PAIR) -{ - suffix_flag |= Suffix::OMP; - respa_enable = 0; -} - -/* ---------------------------------------------------------------------- */ - -void PairLJShiftedForceOMP::compute(int eflag, int vflag) -{ - if (eflag || vflag) { - ev_setup(eflag,vflag); - } else evflag = vflag_fdotr = 0; - - const int nall = atom->nlocal + atom->nghost; - const int nthreads = comm->nthreads; - const int inum = list->inum; - -#if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) -#endif - { - int ifrom, ito, tid; - - loop_setup_thr(ifrom, ito, tid, inum, nthreads); - ThrData *thr = fix->get_thr(tid); - thr->timer(Timer::START); - ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr); - - if (evflag) { - if (eflag) { - if (force->newton_pair) eval<1,1,1>(ifrom, ito, thr); - else eval<1,1,0>(ifrom, ito, thr); - } else { - if (force->newton_pair) eval<1,0,1>(ifrom, ito, thr); - else eval<1,0,0>(ifrom, ito, thr); - } - } else { - if (force->newton_pair) eval<0,0,1>(ifrom, ito, thr); - else eval<0,0,0>(ifrom, ito, thr); - } - - thr->timer(Timer::PAIR); - reduce_thr(this, eflag, vflag, thr); - } // end of omp parallel region -} - -template -void PairLJShiftedForceOMP::eval(int iifrom, int iito, ThrData * const thr) -{ - int i,j,ii,jj,jnum,itype,jtype; - double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; - double t,rsq,r2inv,r6inv,forcelj,factor_lj; - int *ilist,*jlist,*numneigh,**firstneigh; - - evdwl = 0.0; - - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; - const int * _noalias const type = atom->type; - const int nlocal = atom->nlocal; - const double * _noalias const special_lj = force->special_lj; - double fxtmp,fytmp,fztmp; - - ilist = list->ilist; - numneigh = list->numneigh; - firstneigh = list->firstneigh; - - // loop over neighbors of my atoms - - for (ii = iifrom; ii < iito; ++ii) { - - i = ilist[ii]; - xtmp = x[i].x; - ytmp = x[i].y; - ztmp = x[i].z; - itype = type[i]; - jlist = firstneigh[i]; - jnum = numneigh[i]; - fxtmp=fytmp=fztmp=0.0; - - for (jj = 0; jj < jnum; jj++) { - j = jlist[jj]; - factor_lj = special_lj[sbmask(j)]; - j &= NEIGHMASK; - - delx = xtmp - x[j].x; - dely = ytmp - x[j].y; - delz = ztmp - x[j].z; - rsq = delx*delx + dely*dely + delz*delz; - jtype = type[j]; - - if (rsq < cutsq[itype][jtype]) { - r2inv = 1.0/rsq; - r6inv = r2inv*r2inv*r2inv; - t = sqrt(rsq)/cut[itype][jtype]; - - forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]) - - t*foffset[itype][jtype]; - - fpair = factor_lj*forcelj*r2inv; - - fxtmp += delx*fpair; - fytmp += dely*fpair; - fztmp += delz*fpair; - if (NEWTON_PAIR || j < nlocal) { - f[j].x -= delx*fpair; - f[j].y -= dely*fpair; - f[j].z -= delz*fpair; - } - - if (EFLAG) { - evdwl = r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]) + - (t-1.0)*foffset[itype][jtype] - offset[itype][jtype]; - evdwl *= factor_lj; - } - - if (EVFLAG) ev_tally_thr(this,i,j,nlocal,NEWTON_PAIR, - evdwl,0.0,fpair,delx,dely,delz,thr); - } - } - f[i].x += fxtmp; - f[i].y += fytmp; - f[i].z += fztmp; - } -} - -/* ---------------------------------------------------------------------- */ - -double PairLJShiftedForceOMP::memory_usage() -{ - double bytes = memory_usage_thr(); - bytes += PairLJShiftedForce::memory_usage(); - - return bytes; -} diff --git a/src/USER-OMP/pair_lj_sf_omp.h b/src/USER-OMP/pair_lj_sf_omp.h deleted file mode 100644 index 92db973b3d..0000000000 --- a/src/USER-OMP/pair_lj_sf_omp.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -/* ---------------------------------------------------------------------- - Contributing author: Axel Kohlmeyer (Temple U) -------------------------------------------------------------------------- */ - -#ifdef PAIR_CLASS - -PairStyle(lj/sf/omp,PairLJShiftedForceOMP) - -#else - -#ifndef LMP_PAIR_LJ_SF_OMP_H -#define LMP_PAIR_LJ_SF_OMP_H - -#include "pair_lj_sf.h" -#include "thr_omp.h" - -namespace LAMMPS_NS { - -class PairLJShiftedForceOMP : public PairLJShiftedForce, public ThrOMP { - - public: - PairLJShiftedForceOMP(class LAMMPS *); - - virtual void compute(int, int); - virtual double memory_usage(); - - private: - template - void eval(int ifrom, int ito, ThrData * const thr); -}; - -} - -#endif -#endif diff --git a/src/USER-OMP/pair_lj_smooth_linear_omp.h b/src/USER-OMP/pair_lj_smooth_linear_omp.h index 940c0ea707..874e42eb9f 100644 --- a/src/USER-OMP/pair_lj_smooth_linear_omp.h +++ b/src/USER-OMP/pair_lj_smooth_linear_omp.h @@ -18,6 +18,7 @@ #ifdef PAIR_CLASS PairStyle(lj/smooth/linear/omp,PairLJSmoothLinearOMP) +PairStyle(lj/sf/omp,PairLJSmoothLinearOMP) #else diff --git a/src/pair_lj_smooth_linear.h b/src/pair_lj_smooth_linear.h index 0e3376b789..c18c442a18 100644 --- a/src/pair_lj_smooth_linear.h +++ b/src/pair_lj_smooth_linear.h @@ -14,6 +14,7 @@ #ifdef PAIR_CLASS PairStyle(lj/smooth/linear,PairLJSmoothLinear) +PairStyle(lj/sf,PairLJSmoothLinear) #else -- GitLab From 04ebd81ac5d01c4ed615856e52f1156bd4820699 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Jun 2017 17:26:18 -0400 Subject: [PATCH 246/593] minor whitespace cleanup --- src/write_restart.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/write_restart.cpp b/src/write_restart.cpp index 77e2cb05d9..ad6c756558 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -185,7 +185,7 @@ void WriteRestart::multiproc_options(int multiproc_caller, int mpiioflag_caller, if (strcmp(arg[iarg],"fileper") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal write_restart command"); if (!multiproc) - error->all(FLERR,"Cannot use write_restart fileper " + error->all(FLERR,"Cannot use write_restart fileper " "without % in restart file name"); int nper = force->inumeric(FLERR,arg[iarg+1]); if (nper <= 0) error->all(FLERR,"Illegal write_restart command"); @@ -203,7 +203,7 @@ void WriteRestart::multiproc_options(int multiproc_caller, int mpiioflag_caller, } else if (strcmp(arg[iarg],"nfile") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal write_restart command"); if (!multiproc) - error->all(FLERR,"Cannot use write_restart nfile " + error->all(FLERR,"Cannot use write_restart nfile " "without % in restart file name"); int nfile = force->inumeric(FLERR,arg[iarg+1]); if (nfile <= 0) error->all(FLERR,"Illegal write_restart command"); -- GitLab From 1f9504c54622f4b1c5eb2a8bd6526a1c7a475583 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Jun 2017 17:31:45 -0400 Subject: [PATCH 247/593] some more bookkeeping updates triggered by the lj/sf style removal --- doc/src/lammps.book | 1 - doc/src/pairs.txt | 1 - src/.gitignore | 2 -- src/USER-MISC/README | 1 - 4 files changed, 5 deletions(-) diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 1769f29825..69c215a2b9 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -446,7 +446,6 @@ pair_lj96.html pair_lj_cubic.html pair_lj_expand.html pair_lj_long.html -pair_lj_sf.html pair_lj_smooth.html pair_lj_smooth_linear.html pair_lj_soft.html diff --git a/doc/src/pairs.txt b/doc/src/pairs.txt index 538e2a7268..2c1b20f4d3 100644 --- a/doc/src/pairs.txt +++ b/doc/src/pairs.txt @@ -49,7 +49,6 @@ Pair Styles :h1 pair_lj_cubic pair_lj_expand pair_lj_long - pair_lj_sf pair_lj_smooth pair_lj_smooth_linear pair_lj_soft diff --git a/src/.gitignore b/src/.gitignore index 0cddfa6951..e8649c59b0 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -740,8 +740,6 @@ /pair_lj_sdk_coul_long.h /pair_lj_sdk_coul_msm.cpp /pair_lj_sdk_coul_msm.h -/pair_lj_sf.cpp -/pair_lj_sf.h /pair_lj_sf_dipole_sf.cpp /pair_lj_sf_dipole_sf.h /pair_lubricateU.cpp diff --git a/src/USER-MISC/README b/src/USER-MISC/README index cacee41e0c..3b69fd1dec 100644 --- a/src/USER-MISC/README +++ b/src/USER-MISC/README @@ -63,7 +63,6 @@ pair_style gauss/cut, Axel Kohlmeyer, akohlmey at gmail.com, 1 Dec 11 pair_style lennard/mdf, Paolo Raiteri, p.raiteri at curtin.edu.au, 2 Dec 15 pair_style list, Axel Kohlmeyer (Temple U), akohlmey at gmail.com, 1 Jun 13 pair_style lj/mdf, Paolo Raiteri, p.raiteri at curtin.edu.au, 2 Dec 15 -pair_style lj/sf, Laurent Joly (U Lyon), ljoly.ulyon at gmail.com, 8 Aug 11 pair_style kolmogorov/crespi/z, Jaap Kroes (Radboud U), jaapkroes at gmail dot com, 28 Feb 17 pair_style meam/spline, Alexander Stukowski (LLNL), alex at stukowski.com, 1 Feb 12 pair_style meam/sw/spline, Robert Rudd (LLNL), robert.rudd at llnl.gov, 1 Oct 12 -- GitLab From a2edef7c9c3e8b10f72f0d0031129b15392fef39 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 7 Jun 2017 00:23:53 -0400 Subject: [PATCH 248/593] local variable fp in pair style eam/cd was shadowing class member. renamed local variable to fptr --- src/USER-MISC/pair_cdeam.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/USER-MISC/pair_cdeam.cpp b/src/USER-MISC/pair_cdeam.cpp index 91ef598de8..b5607012ce 100644 --- a/src/USER-MISC/pair_cdeam.cpp +++ b/src/USER-MISC/pair_cdeam.cpp @@ -456,11 +456,11 @@ void PairCDEAM::read_h_coeff(char *filename) { if(comm->me == 0) { // Open potential file - FILE *fp; + FILE *fptr; char line[MAXLINE]; char nextline[MAXLINE]; - fp = force->open_potential(filename); - if (fp == NULL) { + fptr = force->open_potential(filename); + if (fptr == NULL) { char str[128]; sprintf(str,"Cannot open EAM potential file %s", filename); error->one(FLERR,str); @@ -468,7 +468,7 @@ void PairCDEAM::read_h_coeff(char *filename) // h coefficients are stored at the end of the file. // Skip to last line of file. - while(fgets(nextline, MAXLINE, fp) != NULL) { + while(fgets(nextline, MAXLINE, fptr) != NULL) { strcpy(line, nextline); } char* ptr = strtok(line, " \t\n\r\f"); @@ -483,7 +483,7 @@ void PairCDEAM::read_h_coeff(char *filename) error->one(FLERR,"Failed to read h(x) function coefficients from EAM file."); // Close the potential file. - fclose(fp); + fclose(fptr); } MPI_Bcast(&nhcoeff, 1, MPI_INT, 0, world); -- GitLab From 99ef36f4405014b057c2c3e9fe5d1178b3e3f8f1 Mon Sep 17 00:00:00 2001 From: Lars Pastewka Date: Wed, 7 Jun 2017 13:52:33 +0200 Subject: [PATCH 249/593] MAINT: Switched NetCDF from 64BIT_OFFSET to 64BIT_DATA which can handle frames (of unlimited dimension) > 2 GB. This becomes important for system sizes 100 Mio atoms and upwards. --- src/USER-NETCDF/dump_netcdf.cpp | 2 +- src/USER-NETCDF/dump_netcdf_mpiio.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/USER-NETCDF/dump_netcdf.cpp b/src/USER-NETCDF/dump_netcdf.cpp index bad90bdef3..c09a131e0a 100644 --- a/src/USER-NETCDF/dump_netcdf.cpp +++ b/src/USER-NETCDF/dump_netcdf.cpp @@ -354,7 +354,7 @@ void DumpNetCDF::openfile() if (singlefile_opened) return; singlefile_opened = 1; - NCERRX( nc_create(filename, NC_64BIT_OFFSET, &ncid), + NCERRX( nc_create(filename, NC_64BIT_DATA, &ncid), filename ); // dimensions diff --git a/src/USER-NETCDF/dump_netcdf_mpiio.cpp b/src/USER-NETCDF/dump_netcdf_mpiio.cpp index 2e9ec274a5..85a1f347f0 100644 --- a/src/USER-NETCDF/dump_netcdf_mpiio.cpp +++ b/src/USER-NETCDF/dump_netcdf_mpiio.cpp @@ -350,7 +350,7 @@ void DumpNetCDFMPIIO::openfile() if (singlefile_opened) return; singlefile_opened = 1; - NCERRX( ncmpi_create(MPI_COMM_WORLD, filename, NC_64BIT_OFFSET, + NCERRX( ncmpi_create(MPI_COMM_WORLD, filename, NC_64BIT_DATA, MPI_INFO_NULL, &ncid), filename ); // dimensions -- GitLab From 36c8b26fef94a67f4cecc796475a6855f21274cf Mon Sep 17 00:00:00 2001 From: Lars Pastewka Date: Wed, 7 Jun 2017 14:01:36 +0200 Subject: [PATCH 250/593] BUG: DumpNCMPIIO is now called DumpNetCDFMPIIO --- src/USER-NETCDF/dump_netcdf_mpiio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-NETCDF/dump_netcdf_mpiio.h b/src/USER-NETCDF/dump_netcdf_mpiio.h index 6f5b00b033..f7904b6960 100644 --- a/src/USER-NETCDF/dump_netcdf_mpiio.h +++ b/src/USER-NETCDF/dump_netcdf_mpiio.h @@ -66,7 +66,7 @@ class DumpNetCDFMPIIO : public DumpCustom { int var; // NetCDF variable }; - typedef void (DumpNCMPIIO::*funcptr_t)(void *); + typedef void (DumpNetCDFMPIIO::*funcptr_t)(void *); // per-frame quantities (variables, fixes or computes) struct nc_perframe_t { -- GitLab From 2e728972e21efc9f1666c29badc9d1aef15794fb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 7 Jun 2017 17:09:45 -0400 Subject: [PATCH 251/593] make pair styles lj/cut/tip4p/long/omp, lj/long/tip4p/long and lj/long/tip4p/long/omp consistent with the reset of tip4p styles --- src/KSPACE/pair_lj_long_tip4p_long.cpp | 753 +++++------ src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp | 29 +- src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp | 1196 +++++++++--------- 3 files changed, 1033 insertions(+), 945 deletions(-) diff --git a/src/KSPACE/pair_lj_long_tip4p_long.cpp b/src/KSPACE/pair_lj_long_tip4p_long.cpp index fd318fd75b..d2a6b801fc 100644 --- a/src/KSPACE/pair_lj_long_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_long_tip4p_long.cpp @@ -126,7 +126,7 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag) int order1 = ewald_order&(1<<1), order6 = ewald_order&(1<<6); int ni; - double *lj1i, *lj2i, *lj3i, *lj4i, *offseti; + double *lj1i, *lj2i, *lj3i, *lj4i, *offseti; double g2 = g_ewald_6*g_ewald_6, g6 = g2*g2*g2, g8 = g6*g2; inum = list->inum; @@ -158,7 +158,6 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag) hneigh[i][0] = iH1; hneigh[i][1] = iH2; hneigh[i][2] = 1; - } else { iH1 = hneigh[i][0]; iH2 = hneigh[i][1]; @@ -191,22 +190,22 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag) r2inv = 1.0/rsq; if (order6) { // long-range lj if (!ndisptablebits || rsq <= tabinnerdispsq) { - register double rn = r2inv*r2inv*r2inv; - register double x2 = g2*rsq, a2 = 1.0/x2; - x2 = a2*exp(-x2)*lj4i[jtype]; - if (ni == 0) { - forcelj = - (rn*=rn)*lj1i[jtype]-g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq; - if (eflag) - evdwl = rn*lj3i[jtype]-g6*((a2+1.0)*a2+0.5)*x2; - } - else { // special case - register double f = special_lj[ni], t = rn*(1.0-f); - forcelj = f*(rn *= rn)*lj1i[jtype]- - g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq+t*lj2i[jtype]; - if (eflag) - evdwl = f*rn*lj3i[jtype]-g6*((a2+1.0)*a2+0.5)*x2+t*lj4i[jtype]; - } + register double rn = r2inv*r2inv*r2inv; + register double x2 = g2*rsq, a2 = 1.0/x2; + x2 = a2*exp(-x2)*lj4i[jtype]; + if (ni == 0) { + forcelj = + (rn*=rn)*lj1i[jtype]-g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq; + if (eflag) + evdwl = rn*lj3i[jtype]-g6*((a2+1.0)*a2+0.5)*x2; + } + else { // special case + register double f = special_lj[ni], t = rn*(1.0-f); + forcelj = f*(rn *= rn)*lj1i[jtype]- + g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq+t*lj2i[jtype]; + if (eflag) + evdwl = f*rn*lj3i[jtype]-g6*((a2+1.0)*a2+0.5)*x2+t*lj4i[jtype]; + } } else { // table real space register union_int_float_t disp_t; @@ -224,31 +223,31 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag) if (eflag) evdwl = f*rn*lj3i[jtype]-(edisptable[disp_k]+f_disp*dedisptable[disp_k])*lj4i[jtype]+t*lj4i[jtype]; } } - } - else { // cut lj - register double rn = r2inv*r2inv*r2inv; - if (ni == 0) { - forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); - if (eflag) evdwl = rn*(rn*lj3i[jtype]-lj4i[jtype])-offseti[jtype]; - } - else { // special case - register double f = special_lj[ni]; - forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); - if (eflag) - evdwl = f * (rn*(rn*lj3i[jtype]-lj4i[jtype])-offseti[jtype]); - } + } + else { // cut lj + register double rn = r2inv*r2inv*r2inv; + if (ni == 0) { + forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); + if (eflag) evdwl = rn*(rn*lj3i[jtype]-lj4i[jtype])-offseti[jtype]; + } + else { // special case + register double f = special_lj[ni]; + forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); + if (eflag) + evdwl = f * (rn*(rn*lj3i[jtype]-lj4i[jtype])-offseti[jtype]); + } } forcelj *= r2inv; - f[i][0] += delx*forcelj; - f[i][1] += dely*forcelj; - f[i][2] += delz*forcelj; - f[j][0] -= delx*forcelj; - f[j][1] -= dely*forcelj; - f[j][2] -= delz*forcelj; + f[i][0] += delx*forcelj; + f[i][1] += dely*forcelj; + f[i][2] += delz*forcelj; + f[j][0] -= delx*forcelj; + f[j][1] -= dely*forcelj; + f[j][2] -= delz*forcelj; if (evflag) ev_tally(i,j,nlocal,newton_pair, - evdwl,0.0,forcelj,delx,dely,delz); + evdwl,0.0,forcelj,delx,dely,delz); } @@ -257,7 +256,7 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag) if (rsq < cut_coulsqplus) { if (itype == typeO || jtype == typeO) { - if (jtype == typeO) { + if (jtype == typeO) { if (hneigh[j][0] < 0) { jH1 = atom->map(tag[j] + 1); jH2 = atom->map(tag[j] + 2); @@ -272,7 +271,6 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag) hneigh[j][0] = jH1; hneigh[j][1] = jH2; hneigh[j][2] = 1; - } else { jH1 = hneigh[j][0]; jH2 = hneigh[j][1]; @@ -282,63 +280,63 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag) } } x2 = newsite[j]; - } else x2 = x[j]; - delx = x1[0] - x2[0]; - dely = x1[1] - x2[1]; - delz = x1[2] - x2[2]; - rsq = delx*delx + dely*dely + delz*delz; + } else x2 = x[j]; + delx = x1[0] - x2[0]; + dely = x1[1] - x2[1]; + delz = x1[2] - x2[2]; + rsq = delx*delx + dely*dely + delz*delz; } - // test current rsq against cutoff and compute Coulombic force + // test current rsq against cutoff and compute Coulombic force if (rsq < cut_coulsq && order1) { - r2inv = 1.0 / rsq; - if (!ncoultablebits || rsq <= tabinnersq) { - r = sqrt(rsq); - grij = g_ewald * r; - expm2 = exp(-grij*grij); - t = 1.0 / (1.0 + EWALD_P*grij); - erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; - prefactor = qqrd2e * qtmp*q[j]/r; - forcecoul = prefactor * (erfc + EWALD_F*grij*expm2); - if (factor_coul < 1.0) { - forcecoul -= (1.0-factor_coul)*prefactor; - } - } else { - union_int_float_t rsq_lookup; - rsq_lookup.f = rsq; - itable = rsq_lookup.i & ncoulmask; - itable >>= ncoulshiftbits; - fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable]; - table = ftable[itable] + fraction*dftable[itable]; - forcecoul = qtmp*q[j] * table; - if (factor_coul < 1.0) { - table = ctable[itable] + fraction*dctable[itable]; - prefactor = qtmp*q[j] * table; - forcecoul -= (1.0-factor_coul)*prefactor; - } - } - - cforce = forcecoul * r2inv; - - //if (evflag) ev_tally(i,j,nlocal,newton_pair, - // evdwl,0.0,cforce,delx,dely,delz); + r2inv = 1.0 / rsq; + if (!ncoultablebits || rsq <= tabinnersq) { + r = sqrt(rsq); + grij = g_ewald * r; + expm2 = exp(-grij*grij); + t = 1.0 / (1.0 + EWALD_P*grij); + erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; + prefactor = qqrd2e * qtmp*q[j]/r; + forcecoul = prefactor * (erfc + EWALD_F*grij*expm2); + if (factor_coul < 1.0) { + forcecoul -= (1.0-factor_coul)*prefactor; + } + } else { + union_int_float_t rsq_lookup; + rsq_lookup.f = rsq; + itable = rsq_lookup.i & ncoulmask; + itable >>= ncoulshiftbits; + fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable]; + table = ftable[itable] + fraction*dftable[itable]; + forcecoul = qtmp*q[j] * table; + if (factor_coul < 1.0) { + table = ctable[itable] + fraction*dctable[itable]; + prefactor = qtmp*q[j] * table; + forcecoul -= (1.0-factor_coul)*prefactor; + } + } + + cforce = forcecoul * r2inv; - // if i,j are not O atoms, force is applied directly - // if i or j are O atoms, force is on fictitious atom & partitioned - // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) - // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f - // preserves total force and torque on water molecule - // virial = sum(r x F) where each water's atoms are near xi and xj - // vlist stores 2,4,6 atoms whose forces contribute to virial + //if (evflag) ev_tally(i,j,nlocal,newton_pair, + // evdwl,0.0,cforce,delx,dely,delz); - n = 0; + // if i,j are not O atoms, force is applied directly + // if i or j are O atoms, force is on fictitious atom & partitioned + // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) + // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f + // preserves total force and torque on water molecule + // virial = sum(r x F) where each water's atoms are near xi and xj + // vlist stores 2,4,6 atoms whose forces contribute to virial + + n = 0; key = 0; - if (itype != typeO) { - f[i][0] += delx * cforce; - f[i][1] += dely * cforce; - f[i][2] += delz * cforce; + if (itype != typeO) { + f[i][0] += delx * cforce; + f[i][1] += dely * cforce; + f[i][2] += delz * cforce; if (vflag) { v[0] = x[i][0] * delx * cforce; @@ -348,9 +346,9 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag) v[4] = x[i][0] * delz * cforce; v[5] = x[i][1] * delz * cforce; } - vlist[n++] = i; + vlist[n++] = i; - } else { + } else { key += 1; fd[0] = delx*cforce; fd[1] = dely*cforce; @@ -376,42 +374,42 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag) f[iH2][1] += fH[1]; f[iH2][2] += fH[2]; - if (vflag) { + if (vflag) { xH1 = x[iH1]; xH2 = x[iH2]; - v[0] = x[i][0]*fO[0] + xH1[0]*fH[0] + xH2[0]*fH[0]; - v[1] = x[i][1]*fO[1] + xH1[1]*fH[1] + xH2[1]*fH[1]; - v[2] = x[i][2]*fO[2] + xH1[2]*fH[2] + xH2[2]*fH[2]; - v[3] = x[i][0]*fO[1] + xH1[0]*fH[1] + xH2[0]*fH[1]; - v[4] = x[i][0]*fO[2] + xH1[0]*fH[2] + xH2[0]*fH[2]; - v[5] = x[i][1]*fO[2] + xH1[1]*fH[2] + xH2[1]*fH[2]; - } - vlist[n++] = i; - vlist[n++] = iH1; - vlist[n++] = iH2; - } - - if (jtype != typeO) { - f[j][0] -= delx * cforce; - f[j][1] -= dely * cforce; - f[j][2] -= delz * cforce; - - if (vflag) { - v[0] -= x[j][0] * delx * cforce; - v[1] -= x[j][1] * dely * cforce; - v[2] -= x[j][2] * delz * cforce; - v[3] -= x[j][0] * dely * cforce; - v[4] -= x[j][0] * delz * cforce; - v[5] -= x[j][1] * delz * cforce; + v[0] = x[i][0]*fO[0] + xH1[0]*fH[0] + xH2[0]*fH[0]; + v[1] = x[i][1]*fO[1] + xH1[1]*fH[1] + xH2[1]*fH[1]; + v[2] = x[i][2]*fO[2] + xH1[2]*fH[2] + xH2[2]*fH[2]; + v[3] = x[i][0]*fO[1] + xH1[0]*fH[1] + xH2[0]*fH[1]; + v[4] = x[i][0]*fO[2] + xH1[0]*fH[2] + xH2[0]*fH[2]; + v[5] = x[i][1]*fO[2] + xH1[1]*fH[2] + xH2[1]*fH[2]; + } + vlist[n++] = i; + vlist[n++] = iH1; + vlist[n++] = iH2; + } + + if (jtype != typeO) { + f[j][0] -= delx * cforce; + f[j][1] -= dely * cforce; + f[j][2] -= delz * cforce; + + if (vflag) { + v[0] -= x[j][0] * delx * cforce; + v[1] -= x[j][1] * dely * cforce; + v[2] -= x[j][2] * delz * cforce; + v[3] -= x[j][0] * dely * cforce; + v[4] -= x[j][0] * delz * cforce; + v[5] -= x[j][1] * delz * cforce; } - vlist[n++] = j; + vlist[n++] = j; - } else { + } else { key += 2; - fd[0] = -delx*cforce; - fd[1] = -dely*cforce; - fd[2] = -delz*cforce; + fd[0] = -delx*cforce; + fd[1] = -dely*cforce; + fd[2] = -delz*cforce; fO[0] = fd[0]*(1 - alpha); fO[1] = fd[1]*(1 - alpha); @@ -421,45 +419,45 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag) fH[1] = 0.5 * alpha * fd[1]; fH[2] = 0.5 * alpha * fd[2]; - f[j][0] += fO[0]; - f[j][1] += fO[1]; - f[j][2] += fO[2]; + f[j][0] += fO[0]; + f[j][1] += fO[1]; + f[j][2] += fO[2]; - f[jH1][0] += fH[0]; - f[jH1][1] += fH[1]; - f[jH1][2] += fH[2]; + f[jH1][0] += fH[0]; + f[jH1][1] += fH[1]; + f[jH1][2] += fH[2]; - f[jH2][0] += fH[0]; - f[jH2][1] += fH[1]; - f[jH2][2] += fH[2]; + f[jH2][0] += fH[0]; + f[jH2][1] += fH[1]; + f[jH2][2] += fH[2]; - if (vflag) { + if (vflag) { xH1 = x[jH1]; xH2 = x[jH2]; - v[0] += x[j][0]*fO[0] + xH1[0]*fH[0] + xH2[0]*fH[0]; - v[1] += x[j][1]*fO[1] + xH1[1]*fH[1] + xH2[1]*fH[1]; - v[2] += x[j][2]*fO[2] + xH1[2]*fH[2] + xH2[2]*fH[2]; - v[3] += x[j][0]*fO[1] + xH1[0]*fH[1] + xH2[0]*fH[1]; - v[4] += x[j][0]*fO[2] + xH1[0]*fH[2] + xH2[0]*fH[2]; - v[5] += x[j][1]*fO[2] + xH1[1]*fH[2] + xH2[1]*fH[2]; + v[0] += x[j][0]*fO[0] + xH1[0]*fH[0] + xH2[0]*fH[0]; + v[1] += x[j][1]*fO[1] + xH1[1]*fH[1] + xH2[1]*fH[1]; + v[2] += x[j][2]*fO[2] + xH1[2]*fH[2] + xH2[2]*fH[2]; + v[3] += x[j][0]*fO[1] + xH1[0]*fH[1] + xH2[0]*fH[1]; + v[4] += x[j][0]*fO[2] + xH1[0]*fH[2] + xH2[0]*fH[2]; + v[5] += x[j][1]*fO[2] + xH1[1]*fH[2] + xH2[1]*fH[2]; } vlist[n++] = j; - vlist[n++] = jH1; - vlist[n++] = jH2; - } - - if (eflag) { - if (!ncoultablebits || rsq <= tabinnersq) - ecoul = prefactor*erfc; - else { - table = etable[itable] + fraction*detable[itable]; - ecoul = qtmp*q[j] * table; - } - if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor; + vlist[n++] = jH1; + vlist[n++] = jH2; + } + + if (eflag) { + if (!ncoultablebits || rsq <= tabinnersq) + ecoul = prefactor*erfc; + else { + table = etable[itable] + fraction*detable[itable]; + ecoul = qtmp*q[j] * table; + } + if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor; } else ecoul = 0.0; if (evflag) ev_tally_tip4p(key,vlist,v,ecoul,alpha); - } + } } } } @@ -473,7 +471,7 @@ void PairLJLongTIP4PLong::compute_inner() int iH1,iH2,jH1,jH2; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz; double r2inv,forcecoul,forcelj,cforce; - double fO[3],fH[3],fd[3];// f1[3]; + double fO[3],fH[3],fd[3]; double *x1,*x2; int *ilist,*jlist,*numneigh,**firstneigh; double rsq, qri; @@ -534,14 +532,19 @@ void PairLJLongTIP4PLong::compute_inner() itype = type[i]; if (itype == typeO && order1) { if (hneigh[i][0] < 0) { - hneigh[i][0] = iH1 = atom->map(tag[i] + 1); - hneigh[i][1] = iH2 = atom->map(tag[i] + 2); - hneigh[i][2] = 1; + iH1 = atom->map(tag[i] + 1); + iH2 = atom->map(tag[i] + 2); if (iH1 == -1 || iH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); if (atom->type[iH1] != typeH || atom->type[iH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set iH1,iH2 to closest image to O + iH1 = domain->closest_image(i,iH1); + iH2 = domain->closest_image(i,iH2); compute_newsite(x[i],x[iH1],x[iH2],newsite[i]); + hneigh[i][0] = iH1; + hneigh[i][1] = iH2; + hneigh[i][2] = 1; } else { iH1 = hneigh[i][0]; iH2 = hneigh[i][1]; @@ -570,12 +573,12 @@ void PairLJLongTIP4PLong::compute_inner() if (rsq < cut_ljsq[itype][jtype] && rsq < cut_out_off_sq ) { // lj r2inv = 1.0/rsq; - register double rn = r2inv*r2inv*r2inv; - if (ni == 0) forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); - else { // special case - register double f = special_lj[ni]; - forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); - } + register double rn = r2inv*r2inv*r2inv; + if (ni == 0) forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); + else { // special case + register double f = special_lj[ni]; + forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); + } if (rsq > cut_out_on_sq) { // switching register double rsw = (sqrt(rsq) - cut_out_on)/cut_out_diff; @@ -583,12 +586,12 @@ void PairLJLongTIP4PLong::compute_inner() } forcelj *= r2inv; - f[i][0] += delx*forcelj; - f[i][1] += dely*forcelj; - f[i][2] += delz*forcelj; - f[j][0] -= delx*forcelj; - f[j][1] -= dely*forcelj; - f[j][2] -= delz*forcelj; + f[i][0] += delx*forcelj; + f[i][1] += dely*forcelj; + f[i][2] += delz*forcelj; + f[j][0] -= delx*forcelj; + f[j][1] -= dely*forcelj; + f[j][2] -= delz*forcelj; } @@ -597,16 +600,21 @@ void PairLJLongTIP4PLong::compute_inner() if (rsq < cut_coulsqplus && order1) { if (itype == typeO || jtype == typeO) { - if (jtype == typeO) { + if (jtype == typeO) { if (hneigh[j][0] < 0) { - hneigh[j][0] = jH1 = atom->map(tag[j] + 1); - hneigh[j][1] = jH2 = atom->map(tag[j] + 2); - hneigh[j][2] = 1; + jH1 = atom->map(tag[j] + 1); + jH2 = atom->map(tag[j] + 2); if (jH1 == -1 || jH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); if (atom->type[jH1] != typeH || atom->type[jH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set jH1,jH2 to closest image to O + jH1 = domain->closest_image(j,jH1); + jH2 = domain->closest_image(j,jH2); compute_newsite(x[j],x[jH1],x[jH2],newsite[j]); + hneigh[j][0] = jH1; + hneigh[j][1] = jH2; + hneigh[j][2] = 1; } else { jH1 = hneigh[j][0]; jH2 = hneigh[j][1]; @@ -616,17 +624,17 @@ void PairLJLongTIP4PLong::compute_inner() } } x2 = newsite[j]; - } else x2 = x[j]; - delx = x1[0] - x2[0]; - dely = x1[1] - x2[1]; - delz = x1[2] - x2[2]; - rsq = delx*delx + dely*dely + delz*delz; + } else x2 = x[j]; + delx = x1[0] - x2[0]; + dely = x1[1] - x2[1]; + delz = x1[2] - x2[2]; + rsq = delx*delx + dely*dely + delz*delz; } - // test current rsq against cutoff and compute Coulombic force + // test current rsq against cutoff and compute Coulombic force if (rsq < cut_coulsq && rsq < cut_out_off_sq) { - r2inv = 1.0 / rsq; + r2inv = 1.0 / rsq; qri = qqrd2e*qtmp; if (ni == 0) forcecoul = qri*q[j]*sqrt(r2inv); else { @@ -638,25 +646,25 @@ void PairLJLongTIP4PLong::compute_inner() forcecoul *= 1.0 + rsw*rsw*(2.0*rsw-3.0); } - cforce = forcecoul * r2inv; + cforce = forcecoul * r2inv; - //if (evflag) ev_tally(i,j,nlocal,newton_pair, + //if (evflag) ev_tally(i,j,nlocal,newton_pair, // evdwl,0.0,cforce,delx,dely,delz); - // if i,j are not O atoms, force is applied directly - // if i or j are O atoms, force is on fictitious atom & partitioned - // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) - // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f - // preserves total force and torque on water molecule - // virial = sum(r x F) where each water's atoms are near xi and xj - // vlist stores 2,4,6 atoms whose forces contribute to virial - - if (itype != typeO) { - f[i][0] += delx * cforce; - f[i][1] += dely * cforce; - f[i][2] += delz * cforce; + // if i,j are not O atoms, force is applied directly + // if i or j are O atoms, force is on fictitious atom & partitioned + // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) + // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f + // preserves total force and torque on water molecule + // virial = sum(r x F) where each water's atoms are near xi and xj + // vlist stores 2,4,6 atoms whose forces contribute to virial + + if (itype != typeO) { + f[i][0] += delx * cforce; + f[i][1] += dely * cforce; + f[i][2] += delz * cforce; - } else { + } else { fd[0] = delx*cforce; fd[1] = dely*cforce; fd[2] = delz*cforce; @@ -682,15 +690,15 @@ void PairLJLongTIP4PLong::compute_inner() f[iH2][2] += fH[2]; } - if (jtype != typeO) { - f[j][0] -= delx * cforce; - f[j][1] -= dely * cforce; - f[j][2] -= delz * cforce; + if (jtype != typeO) { + f[j][0] -= delx * cforce; + f[j][1] -= dely * cforce; + f[j][2] -= delz * cforce; - } else { - fd[0] = -delx*cforce; - fd[1] = -dely*cforce; - fd[2] = -delz*cforce; + } else { + fd[0] = -delx*cforce; + fd[1] = -dely*cforce; + fd[2] = -delz*cforce; fO[0] = fd[0]*(1 - alpha); fO[1] = fd[1]*(1 - alpha); @@ -700,19 +708,19 @@ void PairLJLongTIP4PLong::compute_inner() fH[1] = 0.5 * alpha * fd[1]; fH[2] = 0.5 * alpha * fd[2]; - f[j][0] += fO[0]; - f[j][1] += fO[1]; - f[j][2] += fO[2]; + f[j][0] += fO[0]; + f[j][1] += fO[1]; + f[j][2] += fO[2]; - f[jH1][0] += fH[0]; - f[jH1][1] += fH[1]; - f[jH1][2] += fH[2]; + f[jH1][0] += fH[0]; + f[jH1][1] += fH[1]; + f[jH1][2] += fH[2]; - f[jH2][0] += fH[0]; - f[jH2][1] += fH[1]; - f[jH2][2] += fH[2]; + f[jH2][0] += fH[0]; + f[jH2][1] += fH[1]; + f[jH2][2] += fH[2]; } - } + } } } } @@ -777,14 +785,19 @@ void PairLJLongTIP4PLong::compute_middle() itype = type[i]; if (itype == typeO && order1) { if (hneigh[i][0] < 0) { - hneigh[i][0] = iH1 = atom->map(tag[i] + 1); - hneigh[i][1] = iH2 = atom->map(tag[i] + 2); - hneigh[i][2] = 1; + iH1 = atom->map(tag[i] + 1); + iH2 = atom->map(tag[i] + 2); if (iH1 == -1 || iH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); if (atom->type[iH1] != typeH || atom->type[iH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set iH1,iH2 to closest image to O + iH1 = domain->closest_image(i,iH1); + iH2 = domain->closest_image(i,iH2); compute_newsite(x[i],x[iH1],x[iH2],newsite[i]); + hneigh[i][0] = iH1; + hneigh[i][1] = iH2; + hneigh[i][2] = 1; } else { iH1 = hneigh[i][0]; iH2 = hneigh[i][1]; @@ -813,12 +826,12 @@ void PairLJLongTIP4PLong::compute_middle() if (rsq < cut_ljsq[itype][jtype] && rsq >= cut_in_off_sq && rsq <= cut_out_off_sq ) { // lj r2inv = 1.0/rsq; - register double rn = r2inv*r2inv*r2inv; - if (ni == 0) forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); - else { // special case - register double f = special_lj[ni]; - forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); - } + register double rn = r2inv*r2inv*r2inv; + if (ni == 0) forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); + else { // special case + register double f = special_lj[ni]; + forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); + } if (rsq < cut_in_on_sq) { // switching register double rsw = (sqrt(rsq) - cut_in_off)/cut_in_diff; @@ -830,12 +843,12 @@ void PairLJLongTIP4PLong::compute_middle() } forcelj *= r2inv; - f[i][0] += delx*forcelj; - f[i][1] += dely*forcelj; - f[i][2] += delz*forcelj; - f[j][0] -= delx*forcelj; - f[j][1] -= dely*forcelj; - f[j][2] -= delz*forcelj; + f[i][0] += delx*forcelj; + f[i][1] += dely*forcelj; + f[i][2] += delz*forcelj; + f[j][0] -= delx*forcelj; + f[j][1] -= dely*forcelj; + f[j][2] -= delz*forcelj; } @@ -844,16 +857,21 @@ void PairLJLongTIP4PLong::compute_middle() if (rsq < cut_coulsqplus && order1) { if (itype == typeO || jtype == typeO) { - if (jtype == typeO) { + if (jtype == typeO) { if (hneigh[j][0] < 0) { - hneigh[j][0] = jH1 = atom->map(tag[j] + 1); - hneigh[j][1] = jH2 = atom->map(tag[j] + 2); - hneigh[j][2] = 1; + jH1 = atom->map(tag[j] + 1); + jH2 = atom->map(tag[j] + 2); if (jH1 == -1 || jH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); if (atom->type[jH1] != typeH || atom->type[jH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set jH1,jH2 to closest image to O + jH1 = domain->closest_image(j,jH1); + jH2 = domain->closest_image(j,jH2); compute_newsite(x[j],x[jH1],x[jH2],newsite[j]); + hneigh[j][0] = jH1; + hneigh[j][1] = jH2; + hneigh[j][2] = 1; } else { jH1 = hneigh[j][0]; jH2 = hneigh[j][1]; @@ -863,17 +881,17 @@ void PairLJLongTIP4PLong::compute_middle() } } x2 = newsite[j]; - } else x2 = x[j]; - delx = x1[0] - x2[0]; - dely = x1[1] - x2[1]; - delz = x1[2] - x2[2]; - rsq = delx*delx + dely*dely + delz*delz; + } else x2 = x[j]; + delx = x1[0] - x2[0]; + dely = x1[1] - x2[1]; + delz = x1[2] - x2[2]; + rsq = delx*delx + dely*dely + delz*delz; } - // test current rsq against cutoff and compute Coulombic force + // test current rsq against cutoff and compute Coulombic force if (rsq < cut_coulsq && rsq >= cut_in_off_sq && rsq <= cut_out_off_sq) { - r2inv = 1.0 / rsq; + r2inv = 1.0 / rsq; qri = qqrd2e*qtmp; if (ni == 0) forcecoul = qri*q[j]*sqrt(r2inv); else { @@ -889,25 +907,25 @@ void PairLJLongTIP4PLong::compute_middle() forcecoul *= 1.0 + rsw*rsw*(2.0*rsw-3.0); } - cforce = forcecoul * r2inv; + cforce = forcecoul * r2inv; - //if (evflag) ev_tally(i,j,nlocal,newton_pair, + //if (evflag) ev_tally(i,j,nlocal,newton_pair, // evdwl,0.0,cforce,delx,dely,delz); - // if i,j are not O atoms, force is applied directly - // if i or j are O atoms, force is on fictitious atom & partitioned - // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) - // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f - // preserves total force and torque on water molecule - // virial = sum(r x F) where each water's atoms are near xi and xj - // vlist stores 2,4,6 atoms whose forces contribute to virial - - if (itype != typeO) { - f[i][0] += delx * cforce; - f[i][1] += dely * cforce; - f[i][2] += delz * cforce; + // if i,j are not O atoms, force is applied directly + // if i or j are O atoms, force is on fictitious atom & partitioned + // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) + // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f + // preserves total force and torque on water molecule + // virial = sum(r x F) where each water's atoms are near xi and xj + // vlist stores 2,4,6 atoms whose forces contribute to virial + + if (itype != typeO) { + f[i][0] += delx * cforce; + f[i][1] += dely * cforce; + f[i][2] += delz * cforce; - } else { + } else { fd[0] = delx*cforce; fd[1] = dely*cforce; fd[2] = delz*cforce; @@ -933,15 +951,15 @@ void PairLJLongTIP4PLong::compute_middle() f[iH2][2] += fH[2]; } - if (jtype != typeO) { - f[j][0] -= delx * cforce; - f[j][1] -= dely * cforce; - f[j][2] -= delz * cforce; + if (jtype != typeO) { + f[j][0] -= delx * cforce; + f[j][1] -= dely * cforce; + f[j][2] -= delz * cforce; - } else { - fd[0] = -delx*cforce; - fd[1] = -dely*cforce; - fd[2] = -delz*cforce; + } else { + fd[0] = -delx*cforce; + fd[1] = -dely*cforce; + fd[2] = -delz*cforce; fO[0] = fd[0]*(1 - alpha); fO[1] = fd[1]*(1 - alpha); @@ -951,19 +969,19 @@ void PairLJLongTIP4PLong::compute_middle() fH[1] = 0.5 * alpha * fd[1]; fH[2] = 0.5 * alpha * fd[2]; - f[j][0] += fO[0]; - f[j][1] += fO[1]; - f[j][2] += fO[2]; + f[j][0] += fO[0]; + f[j][1] += fO[1]; + f[j][2] += fO[2]; - f[jH1][0] += fH[0]; - f[jH1][1] += fH[1]; - f[jH1][2] += fH[2]; + f[jH1][0] += fH[0]; + f[jH1][1] += fH[1]; + f[jH1][2] += fH[2]; - f[jH2][0] += fH[0]; - f[jH2][1] += fH[1]; - f[jH2][2] += fH[2]; + f[jH2][0] += fH[0]; + f[jH2][1] += fH[1]; + f[jH2][2] += fH[2]; } - } + } } } } @@ -979,8 +997,8 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) int iH1,iH2,jH1,jH2; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul; double r2inv,forcecoul,forcelj,cforce, respa_coul, respa_lj, frespa,fvirial; - double fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];// f1[3]; - double *x1,*x2; + double fO[3],fH[3],fd[3],v[6]; + double *x1,*x2,*xH1,*xH2; int *ilist,*jlist,*numneigh,**firstneigh; double rsq,qri; int respa_flag; @@ -1048,14 +1066,19 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) itype = type[i]; if (itype == typeO) { if (hneigh[i][0] < 0) { - hneigh[i][0] = iH1 = atom->map(tag[i] + 1); - hneigh[i][1] = iH2 = atom->map(tag[i] + 2); - hneigh[i][2] = 1; + iH1 = atom->map(tag[i] + 1); + iH2 = atom->map(tag[i] + 2); if (iH1 == -1 || iH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); if (atom->type[iH1] != typeH || atom->type[iH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set iH1,iH2 to closest image to O + iH1 = domain->closest_image(i,iH1); + iH2 = domain->closest_image(i,iH2); compute_newsite(x[i],x[iH1],x[iH2],newsite[i]); + hneigh[i][0] = iH1; + hneigh[i][1] = iH2; + hneigh[i][2] = 1; } else { iH1 = hneigh[i][0]; iH2 = hneigh[i][1]; @@ -1096,8 +1119,8 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) r2inv = 1.0/rsq; register double rn = r2inv*r2inv*r2inv; if (respa_flag) respa_lj = ni == 0 ? // correct for respa - frespa*rn*(rn*lj1i[jtype]-lj2i[jtype]) : - frespa*rn*(rn*lj1i[jtype]-lj2i[jtype])*special_lj[ni]; + frespa*rn*(rn*lj1i[jtype]-lj2i[jtype]) : + frespa*rn*(rn*lj1i[jtype]-lj2i[jtype])*special_lj[ni]; if (order6) { // long-range form if (!ndisptablebits || rsq <= tabinnerdispsq) { register double x2 = g2*rsq, a2 = 1.0/x2; @@ -1145,17 +1168,17 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) } forcelj *= r2inv; - f[i][0] += delx*forcelj; - f[i][1] += dely*forcelj; - f[i][2] += delz*forcelj; - f[j][0] -= delx*forcelj; - f[j][1] -= dely*forcelj; - f[j][2] -= delz*forcelj; + f[i][0] += delx*forcelj; + f[i][1] += dely*forcelj; + f[i][2] += delz*forcelj; + f[j][0] -= delx*forcelj; + f[j][1] -= dely*forcelj; + f[j][2] -= delz*forcelj; if (evflag) { fvirial = forcelj + respa_lj*r2inv; ev_tally(i,j,nlocal,newton_pair, - evdwl,0.0,fvirial,delx,dely,delz); + evdwl,0.0,fvirial,delx,dely,delz); } } @@ -1165,16 +1188,21 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) if (rsq < cut_coulsqplus) { if (itype == typeO || jtype == typeO) { - if (jtype == typeO) { + if (jtype == typeO) { if (hneigh[j][0] < 0) { - hneigh[j][0] = jH1 = atom->map(tag[j] + 1); - hneigh[j][1] = jH2 = atom->map(tag[j] + 2); - hneigh[j][2] = 1; + jH1 = atom->map(tag[j] + 1); + jH2 = atom->map(tag[j] + 2); if (jH1 == -1 || jH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); if (atom->type[jH1] != typeH || atom->type[jH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set jH1,jH2 to closest image to O + jH1 = domain->closest_image(j,jH1); + jH2 = domain->closest_image(j,jH2); compute_newsite(x[j],x[jH1],x[jH2],newsite[j]); + hneigh[j][0] = jH1; + hneigh[j][1] = jH2; + hneigh[j][2] = 1; } else { jH1 = hneigh[j][0]; jH2 = hneigh[j][1]; @@ -1184,14 +1212,14 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) } } x2 = newsite[j]; - } else x2 = x[j]; - delx = x1[0] - x2[0]; - dely = x1[1] - x2[1]; - delz = x1[2] - x2[2]; - rsq = delx*delx + dely*dely + delz*delz; + } else x2 = x[j]; + delx = x1[0] - x2[0]; + dely = x1[1] - x2[1]; + delz = x1[2] - x2[2]; + rsq = delx*delx + dely*dely + delz*delz; } - // test current rsq against cutoff and compute Coulombic force + // test current rsq against cutoff and compute Coulombic force if ((rsq < cut_coulsq) && order1) { frespa = 1.0; // check whether and how to compute respa corrections @@ -1245,20 +1273,20 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) fvirial = (forcecoul + respa_coul) * r2inv; // if i,j are not O atoms, force is applied directly - // if i or j are O atoms, force is on fictitious atom & partitioned - // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) - // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f - // preserves total force and torque on water molecule - // virial = sum(r x F) where each water's atoms are near xi and xj - // vlist stores 2,4,6 atoms whose forces contribute to virial - - n = 0; + // if i or j are O atoms, force is on fictitious atom & partitioned + // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) + // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f + // preserves total force and torque on water molecule + // virial = sum(r x F) where each water's atoms are near xi and xj + // vlist stores 2,4,6 atoms whose forces contribute to virial + + n = 0; key = 0; - if (itype != typeO) { - f[i][0] += delx * cforce; + if (itype != typeO) { + f[i][0] += delx * cforce; f[i][1] += dely * cforce; - f[i][2] += delz * cforce; + f[i][2] += delz * cforce; if (vflag) { v[0] = x[i][0] * delx * fvirial; @@ -1268,9 +1296,9 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) v[4] = x[i][0] * delz * fvirial; v[5] = x[i][1] * delz * fvirial; } - vlist[n++] = i; + vlist[n++] = i; - } else { + } else { key += 1; fd[0] = delx*cforce; fd[1] = dely*cforce; @@ -1296,7 +1324,7 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) f[iH2][1] += fH[1]; f[iH2][2] += fH[2]; - if (vflag) { + if (vflag) { fd[0] = delx*fvirial; fd[1] = dely*fvirial; fd[2] = delz*fvirial; @@ -1309,42 +1337,41 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) fH[1] = 0.5 * alpha * fd[1]; fH[2] = 0.5 * alpha * fd[2]; - domain->closest_image(x[i],x[iH1],xH1); - domain->closest_image(x[i],x[iH2],xH2); - - v[0] = x[i][0]*fO[0] + xH1[0]*fH[0] + xH2[0]*fH[0]; - v[1] = x[i][1]*fO[1] + xH1[1]*fH[1] + xH2[1]*fH[1]; - v[2] = x[i][2]*fO[2] + xH1[2]*fH[2] + xH2[2]*fH[2]; - v[3] = x[i][0]*fO[1] + xH1[0]*fH[1] + xH2[0]*fH[1]; - v[4] = x[i][0]*fO[2] + xH1[0]*fH[2] + xH2[0]*fH[2]; - v[5] = x[i][1]*fO[2] + xH1[1]*fH[2] + xH2[1]*fH[2]; - } - vlist[n++] = i; - vlist[n++] = iH1; - vlist[n++] = iH2; - } - - if (jtype != typeO) { - f[j][0] -= delx * cforce; - f[j][1] -= dely * cforce; - f[j][2] -= delz * cforce; - - if (vflag) { - v[0] -= x[j][0] * delx * fvirial; - v[1] -= x[j][1] * dely * fvirial; - v[2] -= x[j][2] * delz * fvirial; - v[3] -= x[j][0] * dely * fvirial; - v[4] -= x[j][0] * delz * fvirial; - v[5] -= x[j][1] * delz * fvirial; + xH1 = x[jH1]; + xH2 = x[jH2]; + v[0] = x[i][0]*fO[0] + xH1[0]*fH[0] + xH2[0]*fH[0]; + v[1] = x[i][1]*fO[1] + xH1[1]*fH[1] + xH2[1]*fH[1]; + v[2] = x[i][2]*fO[2] + xH1[2]*fH[2] + xH2[2]*fH[2]; + v[3] = x[i][0]*fO[1] + xH1[0]*fH[1] + xH2[0]*fH[1]; + v[4] = x[i][0]*fO[2] + xH1[0]*fH[2] + xH2[0]*fH[2]; + v[5] = x[i][1]*fO[2] + xH1[1]*fH[2] + xH2[1]*fH[2]; + } + vlist[n++] = i; + vlist[n++] = iH1; + vlist[n++] = iH2; + } + + if (jtype != typeO) { + f[j][0] -= delx * cforce; + f[j][1] -= dely * cforce; + f[j][2] -= delz * cforce; + + if (vflag) { + v[0] -= x[j][0] * delx * fvirial; + v[1] -= x[j][1] * dely * fvirial; + v[2] -= x[j][2] * delz * fvirial; + v[3] -= x[j][0] * dely * fvirial; + v[4] -= x[j][0] * delz * fvirial; + v[5] -= x[j][1] * delz * fvirial; } - vlist[n++] = j; + vlist[n++] = j; - } else { + } else { key += 2; - fd[0] = -delx*cforce; - fd[1] = -dely*cforce; - fd[2] = -delz*cforce; + fd[0] = -delx*cforce; + fd[1] = -dely*cforce; + fd[2] = -delz*cforce; fO[0] = fd[0]*(1 - alpha); fO[1] = fd[1]*(1 - alpha); @@ -1354,23 +1381,23 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) fH[1] = 0.5 * alpha * fd[1]; fH[2] = 0.5 * alpha * fd[2]; - f[j][0] += fO[0]; - f[j][1] += fO[1]; - f[j][2] += fO[2]; + f[j][0] += fO[0]; + f[j][1] += fO[1]; + f[j][2] += fO[2]; - f[jH1][0] += fH[0]; - f[jH1][1] += fH[1]; - f[jH1][2] += fH[2]; + f[jH1][0] += fH[0]; + f[jH1][1] += fH[1]; + f[jH1][2] += fH[2]; - f[jH2][0] += fH[0]; - f[jH2][1] += fH[1]; - f[jH2][2] += fH[2]; + f[jH2][0] += fH[0]; + f[jH2][1] += fH[1]; + f[jH2][2] += fH[2]; - if (vflag) { + if (vflag) { - fd[0] = -delx*fvirial; - fd[1] = -dely*fvirial; - fd[2] = -delz*fvirial; + fd[0] = -delx*fvirial; + fd[1] = -dely*fvirial; + fd[2] = -delz*fvirial; fO[0] = fd[0]*(1 - alpha); fO[1] = fd[1]*(1 - alpha); @@ -1380,20 +1407,20 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) fH[1] = 0.5 * alpha * fd[1]; fH[2] = 0.5 * alpha * fd[2]; - domain->closest_image(x[j],x[jH1],xH1); - domain->closest_image(x[j],x[jH2],xH2); + xH1 = x[jH1]; + xH2 = x[jH2]; - v[0] += x[j][0]*fO[0] + xH1[0]*fH[0] + xH2[0]*fH[0]; - v[1] += x[j][1]*fO[1] + xH1[1]*fH[1] + xH2[1]*fH[1]; - v[2] += x[j][2]*fO[2] + xH1[2]*fH[2] + xH2[2]*fH[2]; - v[3] += x[j][0]*fO[1] + xH1[0]*fH[1] + xH2[0]*fH[1]; - v[4] += x[j][0]*fO[2] + xH1[0]*fH[2] + xH2[0]*fH[2]; - v[5] += x[j][1]*fO[2] + xH1[1]*fH[2] + xH2[1]*fH[2]; + v[0] += x[j][0]*fO[0] + xH1[0]*fH[0] + xH2[0]*fH[0]; + v[1] += x[j][1]*fO[1] + xH1[1]*fH[1] + xH2[1]*fH[1]; + v[2] += x[j][2]*fO[2] + xH1[2]*fH[2] + xH2[2]*fH[2]; + v[3] += x[j][0]*fO[1] + xH1[0]*fH[1] + xH2[0]*fH[1]; + v[4] += x[j][0]*fO[2] + xH1[0]*fH[2] + xH2[0]*fH[2]; + v[5] += x[j][1]*fO[2] + xH1[1]*fH[2] + xH2[1]*fH[2]; } vlist[n++] = j; - vlist[n++] = jH1; - vlist[n++] = jH2; - } + vlist[n++] = jH1; + vlist[n++] = jH2; + } if (evflag) ev_tally_tip4p(key,vlist,v,ecoul,alpha); } diff --git a/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp b/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp index 2f1b98fc4f..d05b13cd10 100644 --- a/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp @@ -104,7 +104,7 @@ void PairLJCutTIP4PLongOMP::compute(int eflag, int vflag) thr->timer(Timer::START); ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr); - if (!ncoultablebits) { + if (ncoultablebits) { if (evflag) { if (eflag) { if (vflag) eval<1,1,1,1>(ifrom, ito, thr); @@ -156,6 +156,7 @@ void PairLJCutTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; + const tagint * _noalias const tag = atom->tag; const int nlocal = atom->nlocal; const double * _noalias const special_coul = force->special_coul; const double * _noalias const special_lj = force->special_lj; @@ -187,8 +188,8 @@ void PairLJCutTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) // will be the same, there is no race condition. if (itype == typeO) { if (hneigh_thr[i].a < 0) { - iH1 = atom->map(atom->tag[i] + 1); - iH2 = atom->map(atom->tag[i] + 2); + iH1 = atom->map(tag[i] + 1); + iH2 = atom->map(tag[i] + 2); if (iH1 == -1 || iH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); if (atom->type[iH1] != typeH || atom->type[iH2] != typeH) @@ -267,8 +268,8 @@ void PairLJCutTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) if (jtype == typeO) { if (hneigh_thr[j].a < 0) { - jH1 = atom->map(atom->tag[j] + 1); - jH2 = atom->map(atom->tag[j] + 2); + jH1 = atom->map(tag[j] + 1); + jH2 = atom->map(tag[j] + 2); if (jH1 == -1 || jH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); if (atom->type[jH1] != typeH || atom->type[jH2] != typeH) @@ -301,7 +302,7 @@ void PairLJCutTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) if (rsq < cut_coulsq) { r2inv = 1 / rsq; - if (CTABLE || rsq <= tabinnersq) { + if (!CTABLE || rsq <= tabinnersq) { r = sqrt(rsq); grij = g_ewald * r; expm2 = exp(-grij*grij); @@ -337,7 +338,7 @@ void PairLJCutTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) // virial = sum(r x F) where each water's atoms are near xi and xj // vlist stores 2,4,6 atoms whose forces contribute to virial - if (EVFLAG) { + if (VFLAG) { n = 0; key = 0; } @@ -354,11 +355,11 @@ void PairLJCutTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) v[3] = x[i].x * dely * cforce; v[4] = x[i].x * delz * cforce; v[5] = x[i].y * delz * cforce; + vlist[n++] = i; } - if (EVFLAG) vlist[n++] = i; } else { - if (EVFLAG) key++; + if (VFLAG) key++; fdx = delx*cforce; fdy = dely*cforce; @@ -393,8 +394,6 @@ void PairLJCutTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) v[3] = x[i].x*fOy + xH1.x*fHy + xH2.x*fHy; v[4] = x[i].x*fOz + xH1.x*fHz + xH2.x*fHz; v[5] = x[i].y*fOz + xH1.y*fHz + xH2.y*fHz; - } - if (EVFLAG) { vlist[n++] = i; vlist[n++] = iH1; vlist[n++] = iH2; @@ -413,11 +412,11 @@ void PairLJCutTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) v[3] -= x[j].x * dely * cforce; v[4] -= x[j].x * delz * cforce; v[5] -= x[j].y * delz * cforce; + vlist[n++] = j; } - if (EVFLAG) vlist[n++] = j; } else { - if (EVFLAG) key += 2; + if (VFLAG) key += 2; fdx = -delx*cforce; fdy = -dely*cforce; @@ -452,8 +451,6 @@ void PairLJCutTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) v[3] += x[j].x*fOy + xH1.x*fHy + xH2.x*fHy; v[4] += x[j].x*fOz + xH1.x*fHz + xH2.x*fHz; v[5] += x[j].y*fOz + xH1.y*fHz + xH2.y*fHz; - } - if (EVFLAG) { vlist[n++] = j; vlist[n++] = jH1; vlist[n++] = jH2; @@ -461,7 +458,7 @@ void PairLJCutTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) } if (EFLAG) { - if (CTABLE || rsq <= tabinnersq) + if (!CTABLE || rsq <= tabinnersq) ecoul = prefactor*erfc; else { table = etable[itable] + fraction*detable[itable]; diff --git a/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp b/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp index 5072496cc6..1c8f60d7dc 100644 --- a/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp +++ b/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp @@ -15,13 +15,14 @@ #include #include "pair_lj_long_tip4p_long_omp.h" #include "atom.h" +#include "domain.h" #include "comm.h" #include "math_vector.h" #include "force.h" #include "neighbor.h" -#include "neigh_list.h" +#include "error.h" #include "memory.h" -#include "domain.h" +#include "neigh_list.h" #include "suffix.h" using namespace LAMMPS_NS; @@ -719,25 +720,27 @@ template < const int EVFLAG, const int EFLAG, void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) { const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - double * const * const f = thr->get_f(); - const double * const q = atom->q; - const int * const type = atom->type; + dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const double * _noalias const q = atom->q; + const int * _noalias const type = atom->type; + const tagint * _noalias const tag = atom->tag; const int nlocal = atom->nlocal; - const double * const special_coul = force->special_coul; - const double * const special_lj = force->special_lj; + const double * _noalias const special_coul = force->special_coul; + const double * _noalias const special_lj = force->special_lj; const double qqrd2e = force->qqrd2e; const double cut_coulsqplus = (cut_coul+2.0*qdist)*(cut_coul+2.0*qdist); + const int vflag = vflag_global || vflag_atom; int i,j,ii,jj,jnum,itype,jtype,itable; int n,vlist[6]; int key; int iH1,iH2,jH1,jH2; - double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul; + double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,fxtmp,fytmp,fztmp,evdwl,ecoul; double fraction,table; double r,r2inv,forcecoul,forcelj,cforce; double factor_coul; double grij,expm2,prefactor,t,erfc; - double fO[3],fH[3],fd[3],v[6]; + double fOx,fOy,fOz,fHx,fHy,fHz,fdx,fdy,fdz,v[6]; dbl3_t x1,x2,xH1,xH2; int *ilist,*jlist,*numneigh,**firstneigh; double rsq; @@ -763,26 +766,25 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) itype = type[i]; if (itype == typeO) { if (hneigh_thr[i].a < 0) { - iH1 = atom->map(atom->tag[i] + 1); - iH2 = atom->map(atom->tag[i] + 2); + iH1 = atom->map(tag[i] + 1); + iH2 = atom->map(tag[i] + 2); if (iH1 == -1 || iH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); - if (atom->type[iH1] != typeH || atom->type[iH2] != typeH) + if (type[iH1] != typeH || type[iH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); - // set iH1,iH2 to index of closest image to O + // set iH1,iH2 to closest image to O iH1 = domain->closest_image(i,iH1); iH2 = domain->closest_image(i,iH2); compute_newsite_thr(x[i],x[iH1],x[iH2],newsite_thr[i]); - hneigh_thr[i].a = iH1; - hneigh_thr[i].b = iH2; hneigh_thr[i].t = 1; - + hneigh_thr[i].b = iH2; + hneigh_thr[i].a = iH1; } else { iH1 = hneigh_thr[i].a; iH2 = hneigh_thr[i].b; if (hneigh_thr[i].t == 0) { - hneigh_thr[i].t = 1; compute_newsite_thr(x[i],x[iH1],x[iH2],newsite_thr[i]); + hneigh_thr[i].t = 1; } } x1 = newsite_thr[i]; @@ -790,13 +792,14 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) jlist = firstneigh[i]; jnum = numneigh[i]; + fxtmp=fytmp=fztmp=0.0; offseti = offset[itype]; lj1i = lj1[itype]; lj2i = lj2[itype]; lj3i = lj3[itype]; lj4i = lj4[itype]; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; ni = sbmask(j); - factor_coul = special_coul[sbmask(j)]; + factor_coul = special_coul[ni]; j &= NEIGHMASK; delx = xtmp - x[j].x; @@ -809,22 +812,22 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) r2inv = 1.0/rsq; if (ORDER6) { // long-range lj if (!LJTABLE || rsq <= tabinnerdispsq) { - register double rn = r2inv*r2inv*r2inv; - register double x2 = g2*rsq, a2 = 1.0/x2; - x2 = a2*exp(-x2)*lj4i[jtype]; - if (ni == 0) { - forcelj = - (rn*=rn)*lj1i[jtype]-g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq; - if (EFLAG) - evdwl = rn*lj3i[jtype]-g6*((a2+1.0)*a2+0.5)*x2; - } - else { // special case - register double f = special_lj[ni], t = rn*(1.0-f); - forcelj = f*(rn *= rn)*lj1i[jtype]- - g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq+t*lj2i[jtype]; - if (EFLAG) - evdwl = f*rn*lj3i[jtype]-g6*((a2+1.0)*a2+0.5)*x2+t*lj4i[jtype]; - } + register double rn = r2inv*r2inv*r2inv; + register double x2 = g2*rsq, a2 = 1.0/x2; + x2 = a2*exp(-x2)*lj4i[jtype]; + if (ni == 0) { + forcelj = + (rn*=rn)*lj1i[jtype]-g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq; + if (EFLAG) + evdwl = rn*lj3i[jtype]-g6*((a2+1.0)*a2+0.5)*x2; + } + else { // special case + register double f = special_lj[ni], t = rn*(1.0-f); + forcelj = f*(rn *= rn)*lj1i[jtype]- + g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq+t*lj2i[jtype]; + if (EFLAG) + evdwl = f*rn*lj3i[jtype]-g6*((a2+1.0)*a2+0.5)*x2+t*lj4i[jtype]; + } } else { // table real space register union_int_float_t disp_t; @@ -842,31 +845,31 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) if (EFLAG) evdwl = f*rn*lj3i[jtype]-(edisptable[disp_k]+f_disp*dedisptable[disp_k])*lj4i[jtype]+t*lj4i[jtype]; } } - } - else { // cut lj - register double rn = r2inv*r2inv*r2inv; - if (ni == 0) { - forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); - if (EFLAG) evdwl = rn*(rn*lj3i[jtype]-lj4i[jtype])-offseti[jtype]; - } - else { // special case - register double f = special_lj[ni]; - forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); - if (EFLAG) - evdwl = f * (rn*(rn*lj3i[jtype]-lj4i[jtype])-offseti[jtype]); - } + } + else { // cut lj + register double rn = r2inv*r2inv*r2inv; + if (ni == 0) { + forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); + if (EFLAG) evdwl = rn*(rn*lj3i[jtype]-lj4i[jtype])-offseti[jtype]; + } + else { // special case + register double f = special_lj[ni]; + forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); + if (EFLAG) + evdwl = f * (rn*(rn*lj3i[jtype]-lj4i[jtype])-offseti[jtype]); + } } forcelj *= r2inv; - f[i][0] += delx*forcelj; - f[i][1] += dely*forcelj; - f[i][2] += delz*forcelj; - f[j][0] -= delx*forcelj; - f[j][1] -= dely*forcelj; - f[j][2] -= delz*forcelj; + fxtmp += delx*forcelj; + fytmp += dely*forcelj; + fztmp += delz*forcelj; + f[j].x -= delx*forcelj; + f[j].y -= dely*forcelj; + f[j].z -= delz*forcelj; if (EVFLAG) ev_tally_thr(this,i,j,nlocal, /* newton_pair = */ 1, - evdwl,0.0,forcelj,delx,dely,delz,thr); + evdwl,0.0,forcelj,delx,dely,delz,thr); } @@ -875,211 +878,215 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) if (rsq < cut_coulsqplus) { if (itype == typeO || jtype == typeO) { - if (jtype == typeO) { + if (jtype == typeO) { if (hneigh_thr[j].a < 0) { - jH1 = atom->map(atom->tag[j] + 1); - jH2 = atom->map(atom->tag[j] + 2); + jH1 = atom->map(tag[j] + 1); + jH2 = atom->map(tag[j] + 2); if (jH1 == -1 || jH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); - if (atom->type[jH1] != typeH || atom->type[jH2] != typeH) + if (type[jH1] != typeH || type[jH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); // set jH1,jH2 to closest image to O jH1 = domain->closest_image(j,jH1); jH2 = domain->closest_image(j,jH2); compute_newsite_thr(x[j],x[jH1],x[jH2],newsite_thr[j]); - hneigh_thr[j].a = jH1; - hneigh_thr[j].b = jH2; hneigh_thr[j].t = 1; - + hneigh_thr[j].b = jH2; + hneigh_thr[j].a = jH1; } else { jH1 = hneigh_thr[j].a; jH2 = hneigh_thr[j].b; if (hneigh_thr[j].t == 0) { - hneigh_thr[j].t = 1; compute_newsite_thr(x[j],x[jH1],x[jH2],newsite_thr[j]); + hneigh_thr[j].t = 1; } } x2 = newsite_thr[j]; - } else x2 = x[j]; - delx = x1.x - x2.x; - dely = x1.y - x2.y; - delz = x1.z - x2.z; - rsq = delx*delx + dely*dely + delz*delz; + } else x2 = x[j]; + delx = x1.x - x2.x; + dely = x1.y - x2.y; + delz = x1.z - x2.z; + rsq = delx*delx + dely*dely + delz*delz; } - // test current rsq against cutoff and compute Coulombic force + // test current rsq against cutoff and compute Coulombic force if (rsq < cut_coulsq && ORDER1) { - r2inv = 1.0 / rsq; - if (!CTABLE || rsq <= tabinnersq) { - r = sqrt(rsq); - grij = g_ewald * r; - expm2 = exp(-grij*grij); - t = 1.0 / (1.0 + EWALD_P*grij); - erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; - prefactor = qqrd2e * qtmp*q[j]/r; - forcecoul = prefactor * (erfc + EWALD_F*grij*expm2); - if (factor_coul < 1.0) { - forcecoul -= (1.0-factor_coul)*prefactor; - } - } else { - union_int_float_t rsq_lookup; - rsq_lookup.f = rsq; - itable = rsq_lookup.i & ncoulmask; - itable >>= ncoulshiftbits; - fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable]; - table = ftable[itable] + fraction*dftable[itable]; - forcecoul = qtmp*q[j] * table; - if (factor_coul < 1.0) { - table = ctable[itable] + fraction*dctable[itable]; - prefactor = qtmp*q[j] * table; - forcecoul -= (1.0-factor_coul)*prefactor; - } - } - - cforce = forcecoul * r2inv; - - //if (evflag) ev_tally(i,j,nlocal,newton_pair, - // evdwl,0.0,cforce,delx,dely,delz); + r2inv = 1.0 / rsq; + if (!CTABLE || rsq <= tabinnersq) { + r = sqrt(rsq); + grij = g_ewald * r; + expm2 = exp(-grij*grij); + t = 1.0 / (1.0 + EWALD_P*grij); + erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; + prefactor = qqrd2e * qtmp*q[j]/r; + forcecoul = prefactor * (erfc + EWALD_F*grij*expm2); + if (factor_coul < 1.0) { + forcecoul -= (1.0-factor_coul)*prefactor; + } + } else { + union_int_float_t rsq_lookup; + rsq_lookup.f = rsq; + itable = rsq_lookup.i & ncoulmask; + itable >>= ncoulshiftbits; + fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable]; + table = ftable[itable] + fraction*dftable[itable]; + forcecoul = qtmp*q[j] * table; + if (factor_coul < 1.0) { + table = ctable[itable] + fraction*dctable[itable]; + prefactor = qtmp*q[j] * table; + forcecoul -= (1.0-factor_coul)*prefactor; + } + } - // if i,j are not O atoms, force is applied directly - // if i or j are O atoms, force is on fictitious atom & partitioned - // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) - // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f - // preserves total force and torque on water molecule - // virial = sum(r x F) where each water's atoms are near xi and xj - // vlist stores 2,4,6 atoms whose forces contribute to virial + cforce = forcecoul * r2inv; - n = 0; - key = 0; + //if (evflag) ev_tally(i,j,nlocal,newton_pair, + // evdwl,0.0,cforce,delx,dely,delz); - if (itype != typeO) { - f[i][0] += delx * cforce; - f[i][1] += dely * cforce; - f[i][2] += delz * cforce; + // if i,j are not O atoms, force is applied directly + // if i or j are O atoms, force is on fictitious atom & partitioned + // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) + // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f + // preserves total force and torque on water molecule + // virial = sum(r x F) where each water's atoms are near xi and xj + // vlist stores 2,4,6 atoms whose forces contribute to virial + + if (EVFLAG && vflag) { + n = 0; + key = 0; + } - if (EVFLAG) { + if (itype != typeO) { + fxtmp += delx * cforce; + fytmp += dely * cforce; + fztmp += delz * cforce; + + if (EVFLAG && vflag) { v[0] = x[i].x * delx * cforce; v[1] = x[i].y * dely * cforce; v[2] = x[i].z * delz * cforce; v[3] = x[i].x * dely * cforce; v[4] = x[i].x * delz * cforce; v[5] = x[i].y * delz * cforce; + vlist[n++] = i; } - vlist[n++] = i; - } else { - key += 1; - fd[0] = delx*cforce; - fd[1] = dely*cforce; - fd[2] = delz*cforce; + } else { + if (EVFLAG && vflag) key++; + fdx = delx*cforce; + fdy = dely*cforce; + fdz = delz*cforce; - fO[0] = fd[0]*(1 - alpha); - fO[1] = fd[1]*(1 - alpha); - fO[2] = fd[2]*(1 - alpha); + fOx = fdx*(1 - alpha); + fOy = fdy*(1 - alpha); + fOz = fdz*(1 - alpha); - fH[0] = 0.5 * alpha * fd[0]; - fH[1] = 0.5 * alpha * fd[1]; - fH[2] = 0.5 * alpha * fd[2]; + fHx = 0.5 * alpha * fdx; + fHy = 0.5 * alpha * fdy; + fHz = 0.5 * alpha * fdz; - f[i][0] += fO[0]; - f[i][1] += fO[1]; - f[i][2] += fO[2]; + fxtmp += fOx; + fytmp += fOy; + fztmp += fOz; - f[iH1][0] += fH[0]; - f[iH1][1] += fH[1]; - f[iH1][2] += fH[2]; + f[iH1].x += fHx; + f[iH1].y += fHy; + f[iH1].z += fHz; - f[iH2][0] += fH[0]; - f[iH2][1] += fH[1]; - f[iH2][2] += fH[2]; + f[iH2].x += fHx; + f[iH2].y += fHy; + f[iH2].z += fHz; - if (EVFLAG) { + if (EVFLAG && vflag) { xH1 = x[iH1]; xH2 = x[iH2]; - v[0] = x[i].x*fO[0] + xH1.x*fH[0] + xH2.x*fH[0]; - v[1] = x[i].y*fO[1] + xH1.y*fH[1] + xH2.y*fH[1]; - v[2] = x[i].z*fO[2] + xH1.z*fH[2] + xH2.z*fH[2]; - v[3] = x[i].x*fO[1] + xH1.x*fH[1] + xH2.x*fH[1]; - v[4] = x[i].x*fO[2] + xH1.x*fH[2] + xH2.x*fH[2]; - v[5] = x[i].y*fO[2] + xH1.y*fH[2] + xH2.y*fH[2]; - } - vlist[n++] = i; - vlist[n++] = iH1; - vlist[n++] = iH2; - } - - if (jtype != typeO) { - f[j][0] -= delx * cforce; - f[j][1] -= dely * cforce; - f[j][2] -= delz * cforce; - - if (EVFLAG) { - v[0] -= x[j].x * delx * cforce; - v[1] -= x[j].y * dely * cforce; - v[2] -= x[j].z * delz * cforce; - v[3] -= x[j].x * dely * cforce; - v[4] -= x[j].x * delz * cforce; - v[5] -= x[j].y * delz * cforce; + v[0] = x[i].x*fOx + xH1.x*fHx + xH2.x*fHx; + v[1] = x[i].y*fOy + xH1.y*fHy + xH2.y*fHy; + v[2] = x[i].z*fOz + xH1.z*fHz + xH2.z*fHz; + v[3] = x[i].x*fOy + xH1.x*fHy + xH2.x*fHy; + v[4] = x[i].x*fOz + xH1.x*fHz + xH2.x*fHz; + v[5] = x[i].y*fOz + xH1.y*fHz + xH2.y*fHz; + vlist[n++] = i; + vlist[n++] = iH1; + vlist[n++] = iH2; } - vlist[n++] = j; + } - } else { - key += 2; + if (jtype != typeO) { + f[j].x -= delx * cforce; + f[j].y -= dely * cforce; + f[j].z -= delz * cforce; + + if (EVFLAG && vflag) { + v[0] -= x[j].x * delx * cforce; + v[1] -= x[j].y * dely * cforce; + v[2] -= x[j].z * delz * cforce; + v[3] -= x[j].x * dely * cforce; + v[4] -= x[j].x * delz * cforce; + v[5] -= x[j].y * delz * cforce; + vlist[n++] = j; + } - fd[0] = -delx*cforce; - fd[1] = -dely*cforce; - fd[2] = -delz*cforce; + } else { + if (EVFLAG && vflag) key += 2; - fO[0] = fd[0]*(1 - alpha); - fO[1] = fd[1]*(1 - alpha); - fO[2] = fd[2]*(1 - alpha); + fdx = -delx*cforce; + fdy = -dely*cforce; + fdz = -delz*cforce; - fH[0] = 0.5 * alpha * fd[0]; - fH[1] = 0.5 * alpha * fd[1]; - fH[2] = 0.5 * alpha * fd[2]; + fOx = fdx*(1 - alpha); + fOy = fdy*(1 - alpha); + fOz = fdz*(1 - alpha); - f[j][0] += fO[0]; - f[j][1] += fO[1]; - f[j][2] += fO[2]; + fHx = 0.5 * alpha * fdx; + fHy = 0.5 * alpha * fdy; + fHz = 0.5 * alpha * fdz; - f[jH1][0] += fH[0]; - f[jH1][1] += fH[1]; - f[jH1][2] += fH[2]; + f[j].x += fOx; + f[j].y += fOy; + f[j].z += fOz; - f[jH2][0] += fH[0]; - f[jH2][1] += fH[1]; - f[jH2][2] += fH[2]; + f[jH1].x += fHx; + f[jH1].y += fHy; + f[jH1].z += fHz; - if (EVFLAG) { + f[jH2].x += fHx; + f[jH2].y += fHy; + f[jH2].z += fHz; + + if (EVFLAG && vflag) { xH1 = x[jH1]; xH2 = x[jH2]; - v[0] += x[j].x*fO[0] + xH1.x*fH[0] + xH2.x*fH[0]; - v[1] += x[j].y*fO[1] + xH1.y*fH[1] + xH2.y*fH[1]; - v[2] += x[j].z*fO[2] + xH1.z*fH[2] + xH2.z*fH[2]; - v[3] += x[j].x*fO[1] + xH1.x*fH[1] + xH2.x*fH[1]; - v[4] += x[j].x*fO[2] + xH1.x*fH[2] + xH2.x*fH[2]; - v[5] += x[j].y*fO[2] + xH1.y*fH[2] + xH2.y*fH[2]; + v[0] += x[j].x*fOx + xH1.x*fHx + xH2.x*fHx; + v[1] += x[j].y*fOy + xH1.y*fHy + xH2.y*fHy; + v[2] += x[j].z*fOz + xH1.z*fHz + xH2.z*fHz; + v[3] += x[j].x*fOy + xH1.x*fHy + xH2.x*fHy; + v[4] += x[j].x*fOz + xH1.x*fHz + xH2.x*fHz; + v[5] += x[j].y*fOz + xH1.y*fHz + xH2.y*fHz; + vlist[n++] = j; + vlist[n++] = jH1; + vlist[n++] = jH2; } - vlist[n++] = j; - vlist[n++] = jH1; - vlist[n++] = jH2; - } - - if (EFLAG) { - if (!CTABLE || rsq <= tabinnersq) - ecoul = prefactor*erfc; - else { - table = etable[itable] + fraction*detable[itable]; - ecoul = qtmp*q[j] * table; - } - if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor; + } + + if (EFLAG) { + if (!CTABLE || rsq <= tabinnersq) + ecoul = prefactor*erfc; + else { + table = etable[itable] + fraction*detable[itable]; + ecoul = qtmp*q[j] * table; + } + if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor; } else ecoul = 0.0; if (EVFLAG) ev_tally_list_thr(this,key,vlist,v,ecoul,alpha,thr); - } + } } } + f[i].x += fxtmp; + f[i].y += fytmp; + f[i].z += fztmp; } } @@ -1090,11 +1097,12 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th double rsq, r2inv, forcecoul = 0.0, forcelj, cforce; const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - double * const * const f = thr->get_f(); - const double * const q = atom->q; - const int * const type = atom->type; - const double * const special_coul = force->special_coul; - const double * const special_lj = force->special_lj; + dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const double * _noalias const q = atom->q; + const int * _noalias const type = atom->type; + const tagint * _noalias const tag = atom->tag; + const double * _noalias const special_coul = force->special_coul; + const double * _noalias const special_lj = force->special_lj; const double qqrd2e = force->qqrd2e; const double cut_coulsqplus = (cut_coul+2.0*qdist)*(cut_coul+2.0*qdist); @@ -1111,8 +1119,8 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th int i,j,ii,jj,jnum,itype,jtype; int iH1,iH2,jH1,jH2; - double qtmp,xtmp,ytmp,ztmp,delx,dely,delz; - double fO[3],fH[3],fd[3]; + double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,fxtmp,fytmp,fztmp; + double fOx,fOy,fOz,fHx,fHy,fHz,fdx,fdy,fdz; dbl3_t x1,x2; int *ilist,*jlist,*numneigh,**firstneigh; @@ -1131,22 +1139,35 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th ytmp = x[i].y; ztmp = x[i].z; itype = type[i]; + + // if atom I = water O, set x1 = offset charge site + // else x1 = x of atom I + // NOTE: to make this part thread safe, we need to + // make sure that the hneigh_thr[][] entries only get + // updated, when all data is in place. worst case, + // some calculation is repeated, but since the results + // will be the same, there is no race condition. if (itype == typeO) { if (hneigh_thr[i].a < 0) { - hneigh_thr[i].a = iH1 = atom->map(atom->tag[i] + 1); - hneigh_thr[i].b = iH2 = atom->map(atom->tag[i] + 2); - hneigh_thr[i].t = 1; + iH1 = atom->map(tag[i] + 1); + iH2 = atom->map(tag[i] + 2); if (iH1 == -1 || iH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); - if (atom->type[iH1] != typeH || atom->type[iH2] != typeH) + if (type[iH1] != typeH || type[iH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set iH1,iH2 to index of closest image to O + iH1 = domain->closest_image(i,iH1); + iH2 = domain->closest_image(i,iH2); compute_newsite_thr(x[i],x[iH1],x[iH2],newsite_thr[i]); + hneigh_thr[i].t = 1; + hneigh_thr[i].b = iH2; + hneigh_thr[i].a = iH1; } else { iH1 = hneigh_thr[i].a; iH2 = hneigh_thr[i].b; if (hneigh_thr[i].t == 0) { - hneigh_thr[i].t = 1; compute_newsite_thr(x[i],x[iH1],x[iH2],newsite_thr[i]); + hneigh_thr[i].t = 1; } } x1 = newsite_thr[i]; @@ -1155,6 +1176,7 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th jlist = firstneigh[i]; jnum = numneigh[i]; lj1i = lj1[itype]; lj2i = lj2[itype]; + fxtmp=fytmp=fztmp=0.0; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; @@ -1169,12 +1191,12 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th if (rsq < cut_ljsq[itype][jtype] && rsq < cut_out_off_sq ) { // lj r2inv = 1.0/rsq; - register double rn = r2inv*r2inv*r2inv; - if (ni == 0) forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); - else { // special case - register double f = special_lj[ni]; - forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); - } + register double rn = r2inv*r2inv*r2inv; + if (ni == 0) forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); + else { // special case + register double f = special_lj[ni]; + forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); + } if (rsq > cut_out_on_sq) { // switching register double rsw = (sqrt(rsq) - cut_out_on)/cut_out_diff; @@ -1182,12 +1204,12 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th } forcelj *= r2inv; - f[i][0] += delx*forcelj; - f[i][1] += dely*forcelj; - f[i][2] += delz*forcelj; - f[j][0] -= delx*forcelj; - f[j][1] -= dely*forcelj; - f[j][2] -= delz*forcelj; + fxtmp += delx*forcelj; + fytmp += dely*forcelj; + fztmp += delz*forcelj; + f[j].x -= delx*forcelj; + f[j].y -= dely*forcelj; + f[j].z -= delz*forcelj; } @@ -1196,36 +1218,41 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th if (rsq < cut_coulsqplus && order1) { if (itype == typeO || jtype == typeO) { - if (jtype == typeO) { + if (jtype == typeO) { if (hneigh_thr[j].a < 0) { - hneigh_thr[j].a = jH1 = atom->map(atom->tag[j] + 1); - hneigh_thr[j].b = jH2 = atom->map(atom->tag[j] + 2); - hneigh_thr[j].t = 1; + jH1 = atom->map(tag[j] + 1); + jH2 = atom->map(tag[j] + 2); if (jH1 == -1 || jH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); - if (atom->type[jH1] != typeH || atom->type[jH2] != typeH) + if (type[jH1] != typeH || type[jH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set jH1,jH2 to closest image to O + jH1 = domain->closest_image(j,jH1); + jH2 = domain->closest_image(j,jH2); compute_newsite_thr(x[j],x[jH1],x[jH2],newsite_thr[j]); + hneigh_thr[j].t = 1; + hneigh_thr[j].b = jH2; + hneigh_thr[j].a = jH1; } else { jH1 = hneigh_thr[j].a; jH2 = hneigh_thr[j].b; if (hneigh_thr[j].t == 0) { - hneigh_thr[j].t = 1; compute_newsite_thr(x[j],x[jH1],x[jH2],newsite_thr[j]); + hneigh_thr[j].t = 1; } } x2 = newsite_thr[j]; - } else x2 = x[j]; - delx = x1.x - x2.x; - dely = x1.y - x2.y; - delz = x1.z - x2.z; - rsq = delx*delx + dely*dely + delz*delz; + } else x2 = x[j]; + delx = x1.x - x2.x; + dely = x1.y - x2.y; + delz = x1.z - x2.z; + rsq = delx*delx + dely*dely + delz*delz; } - // test current rsq against cutoff and compute Coulombic force + // test current rsq against cutoff and compute Coulombic force if (rsq < cut_coulsq && rsq < cut_out_off_sq) { - r2inv = 1.0 / rsq; + r2inv = 1.0 / rsq; qri = qqrd2e*qtmp; if (ni == 0) forcecoul = qri*q[j]*sqrt(r2inv); else { @@ -1237,83 +1264,86 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th forcecoul *= 1.0 + rsw*rsw*(2.0*rsw-3.0); } - cforce = forcecoul * r2inv; + cforce = forcecoul * r2inv; - //if (evflag) ev_tally(i,j,nlocal,newton_pair, + //if (evflag) ev_tally(i,j,nlocal,newton_pair, // evdwl,0.0,cforce,delx,dely,delz); - // if i,j are not O atoms, force is applied directly - // if i or j are O atoms, force is on fictitious atom & partitioned - // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) - // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f - // preserves total force and torque on water molecule - // virial = sum(r x F) where each water's atoms are near xi and xj - // vlist stores 2,4,6 atoms whose forces contribute to virial - - if (itype != typeO) { - f[i][0] += delx * cforce; - f[i][1] += dely * cforce; - f[i][2] += delz * cforce; - - } else { - fd[0] = delx*cforce; - fd[1] = dely*cforce; - fd[2] = delz*cforce; - - fO[0] = fd[0]*(1 - alpha); - fO[1] = fd[1]*(1 - alpha); - fO[2] = fd[2]*(1 - alpha); - - fH[0] = 0.5 * alpha * fd[0]; - fH[1] = 0.5 * alpha * fd[1]; - fH[2] = 0.5 * alpha * fd[2]; - - f[i][0] += fO[0]; - f[i][1] += fO[1]; - f[i][2] += fO[2]; - - f[iH1][0] += fH[0]; - f[iH1][1] += fH[1]; - f[iH1][2] += fH[2]; - - f[iH2][0] += fH[0]; - f[iH2][1] += fH[1]; - f[iH2][2] += fH[2]; + // if i,j are not O atoms, force is applied directly + // if i or j are O atoms, force is on fictitious atom & partitioned + // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) + // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f + // preserves total force and torque on water molecule + // virial = sum(r x F) where each water's atoms are near xi and xj + // vlist stores 2,4,6 atoms whose forces contribute to virial + + if (itype != typeO) { + fxtmp += delx * cforce; + fytmp += dely * cforce; + fztmp += delz * cforce; + + } else { + fdx = delx*cforce; + fdy = dely*cforce; + fdz = delz*cforce; + + fOx = fdx*(1 - alpha); + fOy = fdy*(1 - alpha); + fOz = fdz*(1 - alpha); + + fHx = 0.5 * alpha * fdx; + fHy = 0.5 * alpha * fdy; + fHz = 0.5 * alpha * fdz; + + fxtmp += fOx; + fytmp += fOy; + fztmp += fOz; + + f[iH1].x += fHx; + f[iH1].y += fHy; + f[iH1].z += fHz; + + f[iH2].x += fHx; + f[iH2].y += fHy; + f[iH2].z += fHz; } - if (jtype != typeO) { - f[j][0] -= delx * cforce; - f[j][1] -= dely * cforce; - f[j][2] -= delz * cforce; + if (jtype != typeO) { + f[j].x -= delx * cforce; + f[j].y -= dely * cforce; + f[j].z -= delz * cforce; - } else { - fd[0] = -delx*cforce; - fd[1] = -dely*cforce; - fd[2] = -delz*cforce; + } else { + fdx = -delx*cforce; + fdy = -dely*cforce; + fdz = -delz*cforce; - fO[0] = fd[0]*(1 - alpha); - fO[1] = fd[1]*(1 - alpha); - fO[2] = fd[2]*(1 - alpha); + fOx = fdx*(1 - alpha); + fOy = fdy*(1 - alpha); + fOz = fdz*(1 - alpha); - fH[0] = 0.5 * alpha * fd[0]; - fH[1] = 0.5 * alpha * fd[1]; - fH[2] = 0.5 * alpha * fd[2]; + fHx = 0.5 * alpha * fdx; + fHy = 0.5 * alpha * fdy; + fHz = 0.5 * alpha * fdz; - f[j][0] += fO[0]; - f[j][1] += fO[1]; - f[j][2] += fO[2]; + f[j].x += fOx; + f[j].y += fOy; + f[j].z += fOz; - f[jH1][0] += fH[0]; - f[jH1][1] += fH[1]; - f[jH1][2] += fH[2]; + f[jH1].x += fHx; + f[jH1].y += fHy; + f[jH1].z += fHz; - f[jH2][0] += fH[0]; - f[jH2][1] += fH[1]; - f[jH2][2] += fH[2]; + f[jH2].x += fHx; + f[jH2].y += fHy; + f[jH2].z += fHz; } - } + } } } + f[i].x += fxtmp; + f[i].y += fytmp; + f[i].z += fztmp; } } @@ -1324,11 +1354,12 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t double rsq, r2inv, forcecoul,forcelj, cforce; const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - double * const * const f = thr->get_f(); - const double * const q = atom->q; - const int * const type = atom->type; - const double * const special_coul = force->special_coul; - const double * const special_lj = force->special_lj; + dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const double * _noalias const q = atom->q; + const int * _noalias const type = atom->type; + const tagint * _noalias const tag = atom->tag; + const double * _noalias const special_coul = force->special_coul; + const double * _noalias const special_lj = force->special_lj; const double qqrd2e = force->qqrd2e; const double cut_coulsqplus = (cut_coul+2.0*qdist)*(cut_coul+2.0*qdist); @@ -1348,8 +1379,8 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t int i,j,ii,jj,jnum,itype,jtype; int iH1,iH2,jH1,jH2; - double qtmp,xtmp,ytmp,ztmp,delx,dely,delz; - double fO[3],fH[3],fd[3]; + double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,fxtmp,fytmp,fztmp; + double fOx,fOy,fOz,fHx,fHy,fHz,fdx,fdy,fdz; dbl3_t x1,x2; int *ilist,*jlist,*numneigh,**firstneigh; double qri; @@ -1372,20 +1403,25 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t itype = type[i]; if (itype == typeO) { if (hneigh_thr[i].a < 0) { - hneigh_thr[i].a = iH1 = atom->map(atom->tag[i] + 1); - hneigh_thr[i].b = iH2 = atom->map(atom->tag[i] + 2); - hneigh_thr[i].t = 1; + iH1 = atom->map(tag[i] + 1); + iH2 = atom->map(tag[i] + 2); if (iH1 == -1 || iH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); - if (atom->type[iH1] != typeH || atom->type[iH2] != typeH) + if (type[iH1] != typeH || type[iH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set iH1,iH2 to index of closest image to O + iH1 = domain->closest_image(i,iH1); + iH2 = domain->closest_image(i,iH2); compute_newsite_thr(x[i],x[iH1],x[iH2],newsite_thr[i]); + hneigh_thr[i].t = 1; + hneigh_thr[i].b = iH2; + hneigh_thr[i].a = iH1; } else { iH1 = hneigh_thr[i].a; iH2 = hneigh_thr[i].b; if (hneigh_thr[i].t == 0) { - hneigh_thr[i].t = 1; compute_newsite_thr(x[i],x[iH1],x[iH2],newsite_thr[i]); + hneigh_thr[i].t = 1; } } x1 = newsite_thr[i]; @@ -1394,6 +1430,7 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t jlist = firstneigh[i]; jnum = numneigh[i]; lj1i = lj1[itype]; lj2i = lj2[itype]; + fxtmp = fytmp = fztmp = 0.0; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; @@ -1408,12 +1445,12 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t if (rsq < cut_ljsq[itype][jtype] && rsq >= cut_in_off_sq && rsq <= cut_out_off_sq ) { // lj r2inv = 1.0/rsq; - register double rn = r2inv*r2inv*r2inv; - if (ni == 0) forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); - else { // special case - register double f = special_lj[ni]; - forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); - } + register double rn = r2inv*r2inv*r2inv; + if (ni == 0) forcelj = rn*(rn*lj1i[jtype]-lj2i[jtype]); + else { // special case + register double f = special_lj[ni]; + forcelj = f*rn*(rn*lj1i[jtype]-lj2i[jtype]); + } if (rsq < cut_in_on_sq) { // switching register double rsw = (sqrt(rsq) - cut_in_off)/cut_in_diff; @@ -1425,12 +1462,12 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t } forcelj *= r2inv; - f[i][0] += delx*forcelj; - f[i][1] += dely*forcelj; - f[i][2] += delz*forcelj; - f[j][0] -= delx*forcelj; - f[j][1] -= dely*forcelj; - f[j][2] -= delz*forcelj; + fxtmp += delx*forcelj; + fytmp += dely*forcelj; + fztmp += delz*forcelj; + f[j].x -= delx*forcelj; + f[j].y -= dely*forcelj; + f[j].z -= delz*forcelj; } @@ -1439,36 +1476,41 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t if (rsq < cut_coulsqplus && order1) { if (itype == typeO || jtype == typeO) { - if (jtype == typeO) { + if (jtype == typeO) { if (hneigh_thr[j].a < 0) { - hneigh_thr[j].a = jH1 = atom->map(atom->tag[j] + 1); - hneigh_thr[j].b = jH2 = atom->map(atom->tag[j] + 2); - hneigh_thr[j].t = 1; + jH1 = atom->map(tag[j] + 1); + jH2 = atom->map(tag[j] + 2); if (jH1 == -1 || jH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); - if (atom->type[jH1] != typeH || atom->type[jH2] != typeH) + if (type[jH1] != typeH || type[jH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set jH1,jH2 to closest image to O + jH1 = domain->closest_image(j,jH1); + jH2 = domain->closest_image(j,jH2); compute_newsite_thr(x[j],x[jH1],x[jH2],newsite_thr[j]); + hneigh_thr[j].t = 1; + hneigh_thr[j].b = jH2; + hneigh_thr[j].a = jH1; } else { jH1 = hneigh_thr[j].a; jH2 = hneigh_thr[j].b; if (hneigh_thr[j].t == 0) { - hneigh_thr[j].t = 1; compute_newsite_thr(x[j],x[jH1],x[jH2],newsite_thr[j]); + hneigh_thr[j].t = 1; } } x2 = newsite_thr[j]; - } else x2 = x[j]; - delx = x1.x - x2.x; - dely = x1.y - x2.y; - delz = x1.z - x2.z; - rsq = delx*delx + dely*dely + delz*delz; + } else x2 = x[j]; + delx = x1.x - x2.x; + dely = x1.y - x2.y; + delz = x1.z - x2.z; + rsq = delx*delx + dely*dely + delz*delz; } - // test current rsq against cutoff and compute Coulombic force + // test current rsq against cutoff and compute Coulombic force if (rsq < cut_coulsq && rsq >= cut_in_off_sq && rsq <= cut_out_off_sq) { - r2inv = 1.0 / rsq; + r2inv = 1.0 / rsq; qri = qqrd2e*qtmp; if (ni == 0) forcecoul = qri*q[j]*sqrt(r2inv); else { @@ -1484,83 +1526,86 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t forcecoul *= 1.0 + rsw*rsw*(2.0*rsw-3.0); } - cforce = forcecoul * r2inv; + cforce = forcecoul * r2inv; - //if (evflag) ev_tally(i,j,nlocal,newton_pair, + //if (evflag) ev_tally(i,j,nlocal,newton_pair, // evdwl,0.0,cforce,delx,dely,delz); - // if i,j are not O atoms, force is applied directly - // if i or j are O atoms, force is on fictitious atom & partitioned - // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) - // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f - // preserves total force and torque on water molecule - // virial = sum(r x F) where each water's atoms are near xi and xj - // vlist stores 2,4,6 atoms whose forces contribute to virial - - if (itype != typeO) { - f[i][0] += delx * cforce; - f[i][1] += dely * cforce; - f[i][2] += delz * cforce; - - } else { - fd[0] = delx*cforce; - fd[1] = dely*cforce; - fd[2] = delz*cforce; - - fO[0] = fd[0]*(1 - alpha); - fO[1] = fd[1]*(1 - alpha); - fO[2] = fd[2]*(1 - alpha); - - fH[0] = 0.5 * alpha * fd[0]; - fH[1] = 0.5 * alpha * fd[1]; - fH[2] = 0.5 * alpha * fd[2]; - - f[i][0] += fO[0]; - f[i][1] += fO[1]; - f[i][2] += fO[2]; - - f[iH1][0] += fH[0]; - f[iH1][1] += fH[1]; - f[iH1][2] += fH[2]; - - f[iH2][0] += fH[0]; - f[iH2][1] += fH[1]; - f[iH2][2] += fH[2]; + // if i,j are not O atoms, force is applied directly + // if i or j are O atoms, force is on fictitious atom & partitioned + // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) + // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f + // preserves total force and torque on water molecule + // virial = sum(r x F) where each water's atoms are near xi and xj + // vlist stores 2,4,6 atoms whose forces contribute to virial + + if (itype != typeO) { + fxtmp += delx * cforce; + fytmp += dely * cforce; + fztmp += delz * cforce; + + } else { + fdx = delx*cforce; + fdy = dely*cforce; + fdz = delz*cforce; + + fOx = fdx*(1 - alpha); + fOy = fdy*(1 - alpha); + fOz = fdz*(1 - alpha); + + fHx = 0.5 * alpha * fdx; + fHy = 0.5 * alpha * fdy; + fHz = 0.5 * alpha * fdz; + + fxtmp += fOx; + fytmp += fOy; + fztmp += fOz; + + f[iH1].x += fHx; + f[iH1].y += fHy; + f[iH1].z += fHz; + + f[iH2].x += fHx; + f[iH2].y += fHy; + f[iH2].z += fHz; } - if (jtype != typeO) { - f[j][0] -= delx * cforce; - f[j][1] -= dely * cforce; - f[j][2] -= delz * cforce; + if (jtype != typeO) { + f[j].x -= delx * cforce; + f[j].y -= dely * cforce; + f[j].z -= delz * cforce; - } else { - fd[0] = -delx*cforce; - fd[1] = -dely*cforce; - fd[2] = -delz*cforce; + } else { + fdx = -delx*cforce; + fdy = -dely*cforce; + fdz = -delz*cforce; - fO[0] = fd[0]*(1 - alpha); - fO[1] = fd[1]*(1 - alpha); - fO[2] = fd[2]*(1 - alpha); + fOx = fdx*(1 - alpha); + fOy = fdy*(1 - alpha); + fOz = fdz*(1 - alpha); - fH[0] = 0.5 * alpha * fd[0]; - fH[1] = 0.5 * alpha * fd[1]; - fH[2] = 0.5 * alpha * fd[2]; + fHx = 0.5 * alpha * fdx; + fHy = 0.5 * alpha * fdy; + fHz = 0.5 * alpha * fdz; - f[j][0] += fO[0]; - f[j][1] += fO[1]; - f[j][2] += fO[2]; + f[j].x += fOx; + f[j].y += fOy; + f[j].z += fOz; - f[jH1][0] += fH[0]; - f[jH1][1] += fH[1]; - f[jH1][2] += fH[2]; + f[jH1].x += fHx; + f[jH1].y += fHy; + f[jH1].z += fHz; - f[jH2][0] += fH[0]; - f[jH2][1] += fH[1]; - f[jH2][2] += fH[2]; + f[jH2].x += fHx; + f[jH2].y += fHy; + f[jH2].z += fHz; } - } + } } } + f[i].x += fxtmp; + f[i].y += fytmp; + f[i].z += fztmp; } } @@ -1572,25 +1617,28 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th { double evdwl,ecoul,fvirial; evdwl = ecoul = 0.0; + double qtmp,xtmp,ytmp,ztmp,delx,dely,delz; + double r2inv,forcecoul,forcelj,cforce, respa_coul, respa_lj, frespa; + double fdx,fdy,fdz,fOx,fOy,fOz,fHx,fHy,fHz; + double v[6]; + dbl3_t x1,x2,xH1,xH2; const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - double * const * const f = thr->get_f(); - const double * const q = atom->q; - const int * const type = atom->type; + dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const double * _noalias const q = atom->q; + const int * _noalias const type = atom->type; + const tagint * _noalias const tag = atom->tag; const int nlocal = atom->nlocal; - const double * const special_coul = force->special_coul; - const double * const special_lj = force->special_lj; + const double * _noalias const special_coul = force->special_coul; + const double * _noalias const special_lj = force->special_lj; const double qqrd2e = force->qqrd2e; const double cut_coulsqplus = (cut_coul+2.0*qdist)*(cut_coul+2.0*qdist); - + const int vflag = vflag_atom || vflag_global; + int i,j,ii,jj,jnum,itype,jtype; int n,vlist[6]; int key; int iH1,iH2,jH1,jH2; - double qtmp,xtmp,ytmp,ztmp,delx,dely,delz; - double r2inv,forcecoul,forcelj,cforce, respa_coul, respa_lj, frespa; - double fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3]; - dbl3_t x1,x2; int *ilist,*jlist,*numneigh,**firstneigh; double rsq,qri; int respa_flag; @@ -1606,6 +1654,8 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th const double cut_in_off_sq = cut_in_off*cut_in_off; const double cut_in_on_sq = cut_in_on*cut_in_on; + double fxtmp,fytmp,fztmp; + ilist = listouter->ilist; numneigh = listouter->numneigh; firstneigh = listouter->firstneigh; @@ -1622,20 +1672,25 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th itype = type[i]; if (itype == typeO) { if (hneigh_thr[i].a < 0) { - hneigh_thr[i].a = iH1 = atom->map(atom->tag[i] + 1); - hneigh_thr[i].b = iH2 = atom->map(atom->tag[i] + 2); - hneigh_thr[i].t = 1; + iH1 = atom->map(tag[i] + 1); + iH2 = atom->map(tag[i] + 2); if (iH1 == -1 || iH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); - if (atom->type[iH1] != typeH || atom->type[iH2] != typeH) + if (type[iH1] != typeH || type[iH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set iH1,iH2 to closest image to O + iH1 = domain->closest_image(i,iH1); + iH2 = domain->closest_image(i,iH2); + hneigh_thr[i].t = 1; + hneigh_thr[i].b = iH2; + hneigh_thr[i].a = iH1; compute_newsite_thr(x[i],x[iH1],x[iH2],newsite_thr[i]); } else { iH1 = hneigh_thr[i].a; iH2 = hneigh_thr[i].b; if (hneigh_thr[i].t == 0) { - hneigh_thr[i].t = 1; compute_newsite_thr(x[i],x[iH1],x[iH2],newsite_thr[i]); + hneigh_thr[i].t = 1; } } x1 = newsite_thr[i]; @@ -1670,8 +1725,8 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th r2inv = 1.0/rsq; register double rn = r2inv*r2inv*r2inv; if (respa_flag) respa_lj = ni == 0 ? // correct for respa - frespa*rn*(rn*lj1i[jtype]-lj2i[jtype]) : - frespa*rn*(rn*lj1i[jtype]-lj2i[jtype])*special_lj[ni]; + frespa*rn*(rn*lj1i[jtype]-lj2i[jtype]) : + frespa*rn*(rn*lj1i[jtype]-lj2i[jtype])*special_lj[ni]; if (ORDER6) { // long-range form if (!ndisptablebits || rsq <= tabinnerdispsq) { register double x2 = g2*rsq, a2 = 1.0/x2; @@ -1719,17 +1774,17 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th } forcelj *= r2inv; - f[i][0] += delx*forcelj; - f[i][1] += dely*forcelj; - f[i][2] += delz*forcelj; - f[j][0] -= delx*forcelj; - f[j][1] -= dely*forcelj; - f[j][2] -= delz*forcelj; + fxtmp += delx*forcelj; + fytmp += dely*forcelj; + fztmp += delz*forcelj; + f[j].x -= delx*forcelj; + f[j].y -= dely*forcelj; + f[j].z -= delz*forcelj; if (EVFLAG) { fvirial = forcelj + respa_lj*r2inv; ev_tally_thr(this,i,j,nlocal,/*newton_pair = */ 1, - evdwl,0.0,fvirial,delx,dely,delz, thr); + evdwl,0.0,fvirial,delx,dely,delz, thr); } } @@ -1739,33 +1794,38 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th if (rsq < cut_coulsqplus) { if (itype == typeO || jtype == typeO) { - if (jtype == typeO) { + if (jtype == typeO) { if (hneigh_thr[j].a < 0) { - hneigh_thr[j].a = jH1 = atom->map(atom->tag[j] + 1); - hneigh_thr[j].b = jH2 = atom->map(atom->tag[j] + 2); - hneigh_thr[j].t = 1; + jH1 = atom->map(tag[j] + 1); + jH2 = atom->map(tag[j] + 2); if (jH1 == -1 || jH2 == -1) error->one(FLERR,"TIP4P hydrogen is missing"); - if (atom->type[jH1] != typeH || atom->type[jH2] != typeH) + if (type[jH1] != typeH || type[jH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + // set jH1,jH2 to closest image to O + jH1 = domain->closest_image(j,jH1); + jH2 = domain->closest_image(j,jH2); compute_newsite_thr(x[j],x[jH1],x[jH2],newsite_thr[j]); + hneigh_thr[j].t = 1; + hneigh_thr[j].b = jH2; + hneigh_thr[j].a = jH1; } else { jH1 = hneigh_thr[j].a; jH2 = hneigh_thr[j].b; if (hneigh_thr[j].t == 0) { - hneigh_thr[j].t = 1; compute_newsite_thr(x[j],x[jH1],x[jH2],newsite_thr[j]); + hneigh_thr[j].t = 1; } } x2 = newsite_thr[j]; - } else x2 = x[j]; - delx = x1.x - x2.x; - dely = x1.y - x2.y; - delz = x1.z - x2.z; - rsq = delx*delx + dely*dely + delz*delz; + } else x2 = x[j]; + delx = x1.x - x2.x; + dely = x1.y - x2.y; + delz = x1.z - x2.z; + rsq = delx*delx + dely*dely + delz*delz; } - // test current rsq against cutoff and compute Coulombic force + // test current rsq against cutoff and compute Coulombic force if ((rsq < cut_coulsq) && ORDER1) { frespa = 1.0; // check whether and how to compute respa corrections @@ -1819,161 +1879,165 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th fvirial = (forcecoul + respa_coul) * r2inv; // if i,j are not O atoms, force is applied directly - // if i or j are O atoms, force is on fictitious atom & partitioned - // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) - // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f - // preserves total force and torque on water molecule - // virial = sum(r x F) where each water's atoms are near xi and xj - // vlist stores 2,4,6 atoms whose forces contribute to virial - - n = 0; - key = 0; - - if (itype != typeO) { - f[i][0] += delx * cforce; - f[i][1] += dely * cforce; - f[i][2] += delz * cforce; - - if (EVFLAG) { + // if i or j are O atoms, force is on fictitious atom & partitioned + // force partitioning due to Feenstra, J Comp Chem, 20, 786 (1999) + // f_f = fictitious force, fO = f_f (1 - 2 alpha), fH = alpha f_f + // preserves total force and torque on water molecule + // virial = sum(r x F) where each water's atoms are near xi and xj + // vlist stores 2,4,6 atoms whose forces contribute to virial + + if (EVFLAG && vflag) { + n = 0; + key = 0; + } + + if (itype != typeO) { + fxtmp += delx * cforce; + fytmp += dely * cforce; + fztmp += delz * cforce; + + if (EVFLAG && vflag) { v[0] = x[i].x * delx * fvirial; v[1] = x[i].y * dely * fvirial; v[2] = x[i].z * delz * fvirial; v[3] = x[i].x * dely * fvirial; v[4] = x[i].x * delz * fvirial; v[5] = x[i].y * delz * fvirial; + vlist[n++] = i; } - vlist[n++] = i; - - } else { - key += 1; - fd[0] = delx*cforce; - fd[1] = dely*cforce; - fd[2] = delz*cforce; - - fO[0] = fd[0]*(1 - alpha); - fO[1] = fd[1]*(1 - alpha); - fO[2] = fd[2]*(1 - alpha); - - fH[0] = 0.5 * alpha * fd[0]; - fH[1] = 0.5 * alpha * fd[1]; - fH[2] = 0.5 * alpha * fd[2]; - - f[i][0] += fO[0]; - f[i][1] += fO[1]; - f[i][2] += fO[2]; - - f[iH1][0] += fH[0]; - f[iH1][1] += fH[1]; - f[iH1][2] += fH[2]; - - f[iH2][0] += fH[0]; - f[iH2][1] += fH[1]; - f[iH2][2] += fH[2]; - - if (EVFLAG) { - - fd[0] = delx*fvirial; - fd[1] = dely*fvirial; - fd[2] = delz*fvirial; - - fO[0] = fd[0]*(1 - alpha); - fO[1] = fd[1]*(1 - alpha); - fO[2] = fd[2]*(1 - alpha); - - fH[0] = 0.5 * alpha * fd[0]; - fH[1] = 0.5 * alpha * fd[1]; - fH[2] = 0.5 * alpha * fd[2]; - - domain->closest_image(&x[i].x,&x[iH1].x,xH1); - domain->closest_image(&x[i].x,&x[iH2].x,xH2); - - v[0] = x[i].x*fO[0] + xH1[0]*fH[0] + xH2[0]*fH[0]; - v[1] = x[i].y*fO[1] + xH1[1]*fH[1] + xH2[1]*fH[1]; - v[2] = x[i].z*fO[2] + xH1[2]*fH[2] + xH2[2]*fH[2]; - v[3] = x[i].x*fO[1] + xH1[0]*fH[1] + xH2[0]*fH[1]; - v[4] = x[i].x*fO[2] + xH1[0]*fH[2] + xH2[0]*fH[2]; - v[5] = x[i].y*fO[2] + xH1[1]*fH[2] + xH2[1]*fH[2]; - } - vlist[n++] = i; - vlist[n++] = iH1; - vlist[n++] = iH2; - } - - if (jtype != typeO) { - f[j][0] -= delx * cforce; - f[j][1] -= dely * cforce; - f[j][2] -= delz * cforce; - - if (EVFLAG) { - v[0] -= x[j].x * delx * fvirial; - v[1] -= x[j].y * dely * fvirial; - v[2] -= x[j].z * delz * fvirial; - v[3] -= x[j].x * dely * fvirial; - v[4] -= x[j].x * delz * fvirial; - v[5] -= x[j].y * delz * fvirial; - } - vlist[n++] = j; - } else { - key += 2; + } else { + if (EVFLAG && vflag) key += 1; - fd[0] = -delx*cforce; - fd[1] = -dely*cforce; - fd[2] = -delz*cforce; + fdx = delx*cforce; + fdy = dely*cforce; + fdz = delz*cforce; - fO[0] = fd[0]*(1 - alpha); - fO[1] = fd[1]*(1 - alpha); - fO[2] = fd[2]*(1 - alpha); + fOx = fdx*(1 - alpha); + fOy = fdy*(1 - alpha); + fOz = fdz*(1 - alpha); - fH[0] = 0.5 * alpha * fd[0]; - fH[1] = 0.5 * alpha * fd[1]; - fH[2] = 0.5 * alpha * fd[2]; + fHx = 0.5*alpha * fdx; + fHy = 0.5*alpha * fdy; + fHz = 0.5*alpha * fdz; - f[j][0] += fO[0]; - f[j][1] += fO[1]; - f[j][2] += fO[2]; + fxtmp += fOx; + fytmp += fOy; + fztmp += fOz; - f[jH1][0] += fH[0]; - f[jH1][1] += fH[1]; - f[jH1][2] += fH[2]; + f[iH1].x += fHx; + f[iH1].y += fHy; + f[iH1].z += fHz; - f[jH2][0] += fH[0]; - f[jH2][1] += fH[1]; - f[jH2][2] += fH[2]; + f[iH2].x += fHx; + f[iH2].y += fHy; + f[iH2].z += fHz; - if (EVFLAG) { + if (EVFLAG && vflag) { + xH1 = x[iH1]; + xH2 = x[iH2]; - fd[0] = -delx*fvirial; - fd[1] = -dely*fvirial; - fd[2] = -delz*fvirial; + fdx = delx*fvirial; + fdy = dely*fvirial; + fdz = delz*fvirial; + + fOx = fdx*(1 - alpha); + fOy = fdy*(1 - alpha); + fOz = fdz*(1 - alpha); + + fHx = 0.5 * alpha * fdx; + fHy = 0.5 * alpha * fdy; + fHz = 0.5 * alpha * fdz; + + v[0] = x[i].x*fOx + xH1.x*fHx + xH2.x*fHx; + v[1] = x[i].y*fOy + xH1.y*fHy + xH2.y*fHy; + v[2] = x[i].z*fOz + xH1.z*fHz + xH2.z*fHz; + v[3] = x[i].x*fOy + xH1.x*fHy + xH2.x*fHy; + v[4] = x[i].x*fOz + xH1.x*fHz + xH2.x*fHz; + v[5] = x[i].y*fOz + xH1.y*fHz + xH2.y*fHz; + vlist[n++] = i; + vlist[n++] = iH1; + vlist[n++] = iH2; + } + } - fO[0] = fd[0]*(1 - alpha); - fO[1] = fd[1]*(1 - alpha); - fO[2] = fd[2]*(1 - alpha); + if (jtype != typeO) { + f[j].x -= delx * cforce; + f[j].y -= dely * cforce; + f[j].z -= delz * cforce; + + if (EVFLAG && vflag) { + v[0] -= x[j].x * delx * fvirial; + v[1] -= x[j].y * dely * fvirial; + v[2] -= x[j].z * delz * fvirial; + v[3] -= x[j].x * dely * fvirial; + v[4] -= x[j].x * delz * fvirial; + v[5] -= x[j].y * delz * fvirial; + vlist[n++] = j; + } - fH[0] = 0.5 * alpha * fd[0]; - fH[1] = 0.5 * alpha * fd[1]; - fH[2] = 0.5 * alpha * fd[2]; + } else { + if (EVFLAG && vflag) key += 2; + + fdx = -delx*cforce; + fdy = -dely*cforce; + fdz = -delz*cforce; + + fOx = fdx*(1 - alpha); + fOy = fdy*(1 - alpha); + fOz = fdz*(1 - alpha); + + fHx = 0.5 * alpha * fdx; + fHy = 0.5 * alpha * fdy; + fHz = 0.5 * alpha * fdz; + + f[j].x += fOx; + f[j].y += fOy; + f[j].z += fOz; - domain->closest_image(&x[j].x,&x[jH1].x,xH1); - domain->closest_image(&x[j].x,&x[jH2].x,xH2); + f[jH1].x += fHx; + f[jH1].y += fHy; + f[jH1].z += fHz; - v[0] += x[j].x*fO[0] + xH1[0]*fH[0] + xH2[0]*fH[0]; - v[1] += x[j].y*fO[1] + xH1[1]*fH[1] + xH2[1]*fH[1]; - v[2] += x[j].z*fO[2] + xH1[2]*fH[2] + xH2[2]*fH[2]; - v[3] += x[j].x*fO[1] + xH1[0]*fH[1] + xH2[0]*fH[1]; - v[4] += x[j].x*fO[2] + xH1[0]*fH[2] + xH2[0]*fH[2]; - v[5] += x[j].y*fO[2] + xH1[1]*fH[2] + xH2[1]*fH[2]; + f[jH2].x += fHx; + f[jH2].y += fHy; + f[jH2].z += fHz; + + if (EVFLAG && vflag) { + xH1 = x[jH1]; + xH2 = x[jH2]; + + fdx = -delx*fvirial; + fdy = -dely*fvirial; + fdz = -delz*fvirial; + + fOx = fdx*(1 - alpha); + fOy = fdy*(1 - alpha); + fOz = fdz*(1 - alpha); + + fHx = 0.5 * alpha * fdx; + fHy = 0.5 * alpha * fdy; + fHz = 0.5 * alpha * fdz; + + v[0] += x[j].x*fOx + xH1.x*fHx + xH2.x*fHx; + v[1] += x[j].y*fOy + xH1.y*fHy + xH2.y*fHy; + v[2] += x[j].z*fOz + xH1.z*fHz + xH2.z*fHz; + v[3] += x[j].x*fOy + xH1.x*fHy + xH2.x*fHy; + v[4] += x[j].x*fOz + xH1.x*fHz + xH2.x*fHz; + v[5] += x[j].y*fOz + xH1.y*fHz + xH2.y*fHz; + vlist[n++] = j; + vlist[n++] = jH1; + vlist[n++] = jH2; } - vlist[n++] = j; - vlist[n++] = jH1; - vlist[n++] = jH2; - } + } if (EVFLAG) ev_tally_list_thr(this,key,vlist,v,ecoul,alpha,thr); } } } + f[i].x += fxtmp; + f[i].y += fytmp; + f[i].z += fztmp; } } -- GitLab From 31a734b03d620c9aef0ecacb53f2d251ca13e55e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 7 Jun 2017 17:10:33 -0400 Subject: [PATCH 252/593] sbmask function should be flagged as const indicating no side effects --- src/compute.h | 2 +- src/create_bonds.h | 2 +- src/delete_atoms.h | 2 +- src/pair.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compute.h b/src/compute.h index 7f12cd97e2..279f71829b 100644 --- a/src/compute.h +++ b/src/compute.h @@ -152,7 +152,7 @@ class Compute : protected Pointers { double **vbiasall; // stored velocity bias for all atoms int maxbias; // size of vbiasall array - inline int sbmask(int j) { + inline int sbmask(int j) const { return j >> SBBITS & 3; } diff --git a/src/create_bonds.h b/src/create_bonds.h index 2936506b3f..24b1596e37 100644 --- a/src/create_bonds.h +++ b/src/create_bonds.h @@ -30,7 +30,7 @@ class CreateBonds : protected Pointers { void command(int, char **); private: - inline int sbmask(int j) { + inline int sbmask(int j) const { return j >> SBBITS & 3; } }; diff --git a/src/delete_atoms.h b/src/delete_atoms.h index 62ba47d715..72cf44285f 100644 --- a/src/delete_atoms.h +++ b/src/delete_atoms.h @@ -45,7 +45,7 @@ class DeleteAtoms : protected Pointers { void recount_topology(); void options(int, char **); - inline int sbmask(int j) { + inline int sbmask(int j) const { return j >> SBBITS & 3; } diff --git a/src/pair.h b/src/pair.h index dd859e5f2a..b57004d965 100644 --- a/src/pair.h +++ b/src/pair.h @@ -245,7 +245,7 @@ class Pair : protected Pointers { ubuf(int arg) : i(arg) {} }; - inline int sbmask(int j) { + inline int sbmask(int j) const { return j >> SBBITS & 3; } }; -- GitLab From 5c1d17d1c031f78fbe08d0500bb3396087464b4b Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Thu, 8 Jun 2017 10:42:08 -0600 Subject: [PATCH 253/593] Updating Kokkos lib to v2.03.05 --- lib/kokkos/CHANGELOG.md | 48 + lib/kokkos/CMakeLists.txt | 46 +- lib/kokkos/Makefile.kokkos | 362 +- lib/kokkos/Makefile.targets | 13 +- .../algorithms/src/KokkosAlgorithms_dummy.cpp | 1 + lib/kokkos/algorithms/src/Kokkos_Random.hpp | 6 +- lib/kokkos/algorithms/unit_tests/Makefile | 19 +- lib/kokkos/algorithms/unit_tests/TestCuda.cpp | 18 +- .../algorithms/unit_tests/TestOpenMP.cpp | 18 +- .../algorithms/unit_tests/TestRandom.hpp | 6 +- .../algorithms/unit_tests/TestSerial.cpp | 16 +- lib/kokkos/algorithms/unit_tests/TestSort.hpp | 21 +- .../algorithms/unit_tests/TestThreads.cpp | 16 +- .../benchmarks/bytes_and_flops/Makefile | 6 +- lib/kokkos/benchmarks/gather/Makefile | 8 +- lib/kokkos/cmake/KokkosConfig.cmake.in | 18 + lib/kokkos/cmake/Modules/FindHWLOC.cmake | 20 + lib/kokkos/cmake/Modules/FindMemkind.cmake | 20 + lib/kokkos/cmake/Modules/FindQthreads.cmake | 20 + lib/kokkos/cmake/kokkos.cmake | 1198 + .../kokkos-trilinos-integration-procedure.txt | 44 +- .../config/kokkos_dev/config-core-all.sh | 2 +- .../kokkos_dev/config-core-cuda-omp-hwloc.sh | 2 +- .../config/kokkos_dev/config-core-cuda.sh | 2 +- lib/kokkos/config/master_history.txt | 3 +- lib/kokkos/config/snapshot.py | 68 +- lib/kokkos/config/test_all_sandia | 17 +- .../testing_scripts/jenkins_test_driver | 2 +- .../config/trilinos-integration/checkin-test | 4 + .../prepare_trilinos_repos.sh | 25 +- .../shepard_jenkins_run_script_pthread_intel | 60 + .../shepard_jenkins_run_script_serial_intel | 60 + .../white_run_jenkins_script_cuda | 63 + .../white_run_jenkins_script_omp | 58 + .../containers/performance_tests/Makefile | 11 +- .../containers/performance_tests/TestCuda.cpp | 20 +- .../performance_tests/TestDynRankView.hpp | 9 +- .../performance_tests/TestOpenMP.cpp | 16 +- .../performance_tests/TestThreads.cpp | 16 +- lib/kokkos/containers/src/Kokkos_Bitset.hpp | 9 +- lib/kokkos/containers/src/Kokkos_DualView.hpp | 12 + .../containers/src/Kokkos_DynRankView.hpp | 289 +- .../containers/src/Kokkos_DynamicView.hpp | 10 +- .../containers/src/Kokkos_ErrorReporter.hpp | 11 +- .../containers/src/Kokkos_Functional.hpp | 9 +- .../containers/src/Kokkos_UnorderedMap.hpp | 11 +- lib/kokkos/containers/src/Kokkos_Vector.hpp | 9 +- .../src/impl/Kokkos_Bitset_impl.hpp | 2 +- .../src/impl/Kokkos_Functional_impl.hpp | 11 +- .../src/impl/Kokkos_UnorderedMap_impl.hpp | 11 +- lib/kokkos/containers/unit_tests/Makefile | 19 +- .../containers/unit_tests/TestComplex.hpp | 263 - lib/kokkos/containers/unit_tests/TestCuda.cpp | 16 +- .../containers/unit_tests/TestDualView.hpp | 9 +- .../containers/unit_tests/TestDynamicView.hpp | 9 +- .../unit_tests/TestErrorReporter.hpp | 9 +- .../containers/unit_tests/TestOpenMP.cpp | 23 +- .../containers/unit_tests/TestSerial.cpp | 24 +- .../unit_tests/TestStaticCrsGraph.hpp | 9 +- .../containers/unit_tests/TestThreads.cpp | 18 +- .../unit_tests/TestUnorderedMap.hpp | 9 +- .../containers/unit_tests/TestVector.hpp | 9 +- lib/kokkos/core/cmake/KokkosCore_config.h.in | 93 +- lib/kokkos/core/perf_test/CMakeLists.txt | 13 +- lib/kokkos/core/perf_test/Makefile | 53 +- lib/kokkos/core/perf_test/PerfTestCuda.cpp | 199 - lib/kokkos/core/perf_test/PerfTestDriver.hpp | 86 - ...ramSchmidt.hpp => PerfTestGramSchmidt.cpp} | 61 +- ...erfTestHexGrad.hpp => PerfTestHexGrad.cpp} | 57 + lib/kokkos/core/perf_test/PerfTestHost.cpp | 125 - lib/kokkos/core/perf_test/PerfTestMain.cpp | 31 +- .../PerfTest_Category.hpp} | 26 +- .../perf_test/PerfTest_CustomReduction.cpp | 115 + lib/kokkos/core/perf_test/run_mempool.sh | 25 + lib/kokkos/core/perf_test/run_mempool_fill.sh | 21 + lib/kokkos/core/perf_test/run_taskdag.sh | 21 + lib/kokkos/core/perf_test/test_mempool.cpp | 357 + lib/kokkos/core/perf_test/test_taskdag.cpp | 284 + .../src/Cuda/KokkosExp_Cuda_IterateTile.hpp | 11 +- lib/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp | 16 +- lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp | 15 +- .../core/src/Cuda/Kokkos_Cuda_Alloc.hpp | 12 +- .../core/src/Cuda/Kokkos_Cuda_Error.hpp | 11 +- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Impl.cpp | 41 +- .../core/src/Cuda/Kokkos_Cuda_Internal.hpp | 13 +- .../core/src/Cuda/Kokkos_Cuda_Parallel.hpp | 1012 +- .../core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp | 282 +- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp | 21 +- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp | 54 +- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Team.hpp | 982 + .../src/Cuda/Kokkos_Cuda_Vectorization.hpp | 11 +- lib/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp | 10 +- .../core/src/Cuda/Kokkos_Cuda_abort.hpp | 12 +- .../core/src/KokkosExp_MDRangePolicy.hpp | 4 +- lib/kokkos/core/src/Kokkos_Complex.hpp | 124 +- lib/kokkos/core/src/Kokkos_Concepts.hpp | 9 +- lib/kokkos/core/src/Kokkos_Core.hpp | 10 +- lib/kokkos/core/src/Kokkos_Core_fwd.hpp | 33 +- lib/kokkos/core/src/Kokkos_Cuda.hpp | 12 +- lib/kokkos/core/src/Kokkos_CudaSpace.hpp | 15 +- lib/kokkos/core/src/Kokkos_ExecPolicy.hpp | 2 - lib/kokkos/core/src/Kokkos_HBWSpace.hpp | 11 +- lib/kokkos/core/src/Kokkos_HostSpace.hpp | 5 +- lib/kokkos/core/src/Kokkos_Layout.hpp | 18 +- lib/kokkos/core/src/Kokkos_Macros.hpp | 22 +- lib/kokkos/core/src/Kokkos_MemoryPool.hpp | 1831 +- lib/kokkos/core/src/Kokkos_NumericTraits.hpp | 217 + lib/kokkos/core/src/Kokkos_OpenMP.hpp | 34 +- lib/kokkos/core/src/Kokkos_OpenMPTarget.hpp | 186 + .../core/src/Kokkos_OpenMPTargetSpace.hpp | 265 + .../core/src/Kokkos_Parallel_Reduce.hpp | 888 +- lib/kokkos/core/src/Kokkos_Qthreads.hpp | 9 +- lib/kokkos/core/src/Kokkos_ScratchSpace.hpp | 17 +- lib/kokkos/core/src/Kokkos_Serial.hpp | 11 +- lib/kokkos/core/src/Kokkos_TaskScheduler.hpp | 103 +- lib/kokkos/core/src/Kokkos_Threads.hpp | 10 +- lib/kokkos/core/src/Kokkos_Timer.hpp | 11 +- lib/kokkos/core/src/Kokkos_Vectorization.hpp | 9 +- lib/kokkos/core/src/Kokkos_View.hpp | 178 +- lib/kokkos/core/src/Makefile | 20 +- ..._OpenMPexec.cpp => Kokkos_OpenMP_Exec.cpp} | 67 +- ..._OpenMPexec.hpp => Kokkos_OpenMP_Exec.hpp} | 15 +- .../src/OpenMP/Kokkos_OpenMP_Parallel.hpp | 98 +- .../core/src/OpenMP/Kokkos_OpenMP_Task.cpp | 33 +- .../core/src/OpenMP/Kokkos_OpenMP_Task.hpp | 9 +- .../OpenMPTarget/Kokkos_OpenMPTargetSpace.cpp | 306 + .../OpenMPTarget/Kokkos_OpenMPTarget_Exec.cpp | 273 + .../OpenMPTarget/Kokkos_OpenMPTarget_Exec.hpp | 727 + .../Kokkos_OpenMPTarget_Parallel.hpp | 767 + .../OpenMPTarget/Kokkos_OpenMPTarget_Task.cpp | 329 + .../OpenMPTarget/Kokkos_OpenMPTarget_Task.hpp | 356 + .../core/src/Qthreads/Kokkos_QthreadsExec.cpp | 14 +- .../core/src/Qthreads/Kokkos_QthreadsExec.hpp | 5 + .../src/Qthreads/Kokkos_Qthreads_Parallel.hpp | 5 + .../src/Qthreads/Kokkos_Qthreads_Task.cpp | 8 +- .../src/Qthreads/Kokkos_Qthreads_Task.hpp | 3 +- .../Kokkos_Qthreads_TaskPolicy.cpp.old | 21 +- .../Kokkos_Qthreads_TaskPolicy.hpp.old | 16 +- .../Qthreads/Kokkos_Qthreads_TaskQueue.hpp | 10 +- .../Kokkos_Qthreads_TaskQueue_impl.hpp | 7 +- .../core/src/Threads/Kokkos_ThreadsExec.cpp | 18 +- .../core/src/Threads/Kokkos_ThreadsExec.hpp | 7 +- .../src/Threads/Kokkos_ThreadsExec_base.cpp | 22 +- .../core/src/Threads/Kokkos_ThreadsTeam.hpp | 95 +- .../src/Threads/Kokkos_Threads_Parallel.hpp | 32 +- .../src/impl/KokkosExp_Host_IterateTile.hpp | 138 +- .../core/src/impl/Kokkos_AnalyzePolicy.hpp | 1 + .../core/src/impl/Kokkos_Atomic_Assembly.hpp | 11 +- .../Kokkos_Atomic_Compare_Exchange_Strong.hpp | 1 + .../core/src/impl/Kokkos_Atomic_Decrement.hpp | 2 + .../core/src/impl/Kokkos_Atomic_Exchange.hpp | 3 +- .../core/src/impl/Kokkos_Atomic_Fetch_Add.hpp | 3 + .../core/src/impl/Kokkos_Atomic_Fetch_And.hpp | 10 +- .../core/src/impl/Kokkos_Atomic_Fetch_Or.hpp | 10 +- .../core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp | 10 +- .../core/src/impl/Kokkos_Atomic_Generic.hpp | 14 +- .../core/src/impl/Kokkos_Atomic_Increment.hpp | 2 + .../core/src/impl/Kokkos_Atomic_View.hpp | 9 +- .../core/src/impl/Kokkos_Atomic_Windows.hpp | 9 +- lib/kokkos/core/src/impl/Kokkos_BitOps.hpp | 37 +- .../core/src/impl/Kokkos_CPUDiscovery.cpp | 1 + lib/kokkos/core/src/impl/Kokkos_ClockTic.hpp | 106 + .../core/src/impl/Kokkos_ConcurrentBitset.hpp | 357 + lib/kokkos/core/src/impl/Kokkos_Core.cpp | 177 +- lib/kokkos/core/src/impl/Kokkos_Error.cpp | 17 +- lib/kokkos/core/src/impl/Kokkos_Error.hpp | 4 +- .../core/src/impl/Kokkos_ExecPolicy.cpp | 44 + .../core/src/impl/Kokkos_FunctorAdapter.hpp | 55 + .../core/src/impl/Kokkos_FunctorAnalysis.hpp | 350 +- lib/kokkos/core/src/impl/Kokkos_HBWSpace.cpp | 10 +- lib/kokkos/core/src/impl/Kokkos_HostSpace.cpp | 47 +- .../core/src/impl/Kokkos_HostThreadTeam.hpp | 75 +- .../core/src/impl/Kokkos_Memory_Fence.hpp | 2 +- lib/kokkos/core/src/impl/Kokkos_OldMacros.hpp | 12 + .../core/src/impl/Kokkos_PhysicalLayout.hpp | 13 +- .../src/impl/Kokkos_Profiling_DeviceInfo.hpp | 8 +- .../src/impl/Kokkos_Profiling_Interface.cpp | 336 +- .../src/impl/Kokkos_Profiling_Interface.hpp | 136 +- lib/kokkos/core/src/impl/Kokkos_Reducer.hpp | 317 - lib/kokkos/core/src/impl/Kokkos_Serial.cpp | 11 +- .../core/src/impl/Kokkos_Serial_Task.cpp | 24 +- .../core/src/impl/Kokkos_Serial_Task.hpp | 1 + .../core/src/impl/Kokkos_SharedAlloc.cpp | 29 +- .../core/src/impl/Kokkos_SharedAlloc.hpp | 21 +- .../core/src/impl/Kokkos_StaticAssert.hpp | 9 +- lib/kokkos/core/src/impl/Kokkos_TaskQueue.hpp | 14 +- .../core/src/impl/Kokkos_TaskQueue_impl.hpp | 13 +- lib/kokkos/core/src/impl/Kokkos_Traits.hpp | 16 +- lib/kokkos/core/src/impl/Kokkos_Utilities.hpp | 3 +- .../core/src/impl/Kokkos_ViewMapping.hpp | 33 +- .../core/src/impl/Kokkos_Volatile_Load.hpp | 2 - lib/kokkos/core/src/impl/Kokkos_hwloc.cpp | 1 - lib/kokkos/core/src/impl/Kokkos_spinwait.cpp | 8 +- lib/kokkos/core/unit_test/CMakeLists.txt | 101 +- lib/kokkos/core/unit_test/Makefile | 182 +- lib/kokkos/core/unit_test/TestAggregate.hpp | 5 + lib/kokkos/core/unit_test/TestAtomic.hpp | 49 + .../core/unit_test/TestAtomicOperations.hpp | 83 +- lib/kokkos/core/unit_test/TestAtomicViews.hpp | 36 + lib/kokkos/core/unit_test/TestCXX11.hpp | 14 + .../core/unit_test/TestCXX11Deduction.hpp | 7 + .../core/unit_test/TestCompilerMacros.hpp | 7 + lib/kokkos/core/unit_test/TestComplex.hpp | 243 + .../core/unit_test/TestConcurrentBitset.hpp | 177 + .../unit_test/TestDefaultDeviceType_d.cpp | 237 - .../core/unit_test/TestFunctorAnalysis.hpp | 153 + lib/kokkos/core/unit_test/TestInit.hpp | 76 + lib/kokkos/core/unit_test/TestMDRange.hpp | 17 +- lib/kokkos/core/unit_test/TestMemoryPool.hpp | 869 +- .../core/unit_test/TestPolicyConstruction.hpp | 9 + lib/kokkos/core/unit_test/TestRange.hpp | 116 +- lib/kokkos/core/unit_test/TestReduce.hpp | 1002 +- .../unit_test/TestReduceCombinatorical.hpp | 597 + lib/kokkos/core/unit_test/TestScan.hpp | 28 +- .../core/unit_test/TestTaskScheduler.hpp | 146 +- lib/kokkos/core/unit_test/TestTeam.hpp | 12 +- lib/kokkos/core/unit_test/TestTeamVector.hpp | 187 +- .../unit_test/TestTemplateMetaFunctions.hpp | 8 + lib/kokkos/core/unit_test/TestTile.hpp | 27 + lib/kokkos/core/unit_test/TestViewAPI.hpp | 140 +- ...tViewMapping.hpp => TestViewMapping_a.hpp} | 384 +- .../core/unit_test/TestViewMapping_b.hpp | 186 + .../unit_test/TestViewMapping_subview.hpp | 211 + lib/kokkos/core/unit_test/TestViewOfClass.hpp | 5 + lib/kokkos/core/unit_test/TestViewSubview.hpp | 9 +- .../core/unit_test/UnitTestMainInit.cpp | 54 + ..._a.cpp => TestCudaHostPinned_Category.hpp} | 27 +- .../cuda/TestCudaHostPinned_SharedAlloc.cpp | 55 + .../cuda/TestCudaHostPinned_ViewAPI.cpp | 45 + .../cuda/TestCudaHostPinned_ViewMapping_a.cpp | 46 + .../cuda/TestCudaHostPinned_ViewMapping_b.cpp | 46 + ...TestCudaHostPinned_ViewMapping_subview.cpp | 46 + ...uctions_a.cpp => TestCudaUVM_Category.hpp} | 25 +- .../cuda/TestCudaUVM_SharedAlloc.cpp | 55 + .../unit_test/cuda/TestCudaUVM_ViewAPI.cpp | 45 + .../cuda/TestCudaUVM_ViewMapping_a.cpp | 46 + .../cuda/TestCudaUVM_ViewMapping_b.cpp | 46 + .../cuda/TestCudaUVM_ViewMapping_subview.cpp | 46 + .../cuda/TestCuda_AtomicOperations.cpp | 46 + .../unit_test/cuda/TestCuda_AtomicViews.cpp | 47 + .../core/unit_test/cuda/TestCuda_Atomics.cpp | 161 +- .../core/unit_test/cuda/TestCuda_Category.hpp | 65 + .../core/unit_test/cuda/TestCuda_Complex.cpp | 47 + ...stCuda_ViewAPI_g.cpp => TestCuda_Init.cpp} | 13 +- .../core/unit_test/cuda/TestCuda_MDRange.cpp | 47 + .../core/unit_test/cuda/TestCuda_Other.cpp | 158 +- .../unit_test/cuda/TestCuda_RangePolicy.cpp | 47 + .../unit_test/cuda/TestCuda_Reductions.cpp | 48 + .../unit_test/cuda/TestCuda_Reductions_b.cpp | 138 - .../core/unit_test/cuda/TestCuda_Scan.cpp | 47 + .../unit_test/cuda/TestCuda_SharedAlloc.cpp | 55 + .../core/unit_test/cuda/TestCuda_Spaces.cpp | 3 +- .../unit_test/cuda/TestCuda_SubView_a.cpp | 47 +- .../unit_test/cuda/TestCuda_SubView_b.cpp | 19 +- .../unit_test/cuda/TestCuda_SubView_c01.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c02.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c03.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c04.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c05.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c06.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c07.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c08.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c09.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c10.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c11.cpp | 7 +- .../unit_test/cuda/TestCuda_SubView_c12.cpp | 7 +- .../core/unit_test/cuda/TestCuda_Task.cpp | 47 + .../core/unit_test/cuda/TestCuda_Team.cpp | 85 +- .../cuda/TestCuda_TeamReductionScan.cpp | 82 + .../TestCuda_TeamScratch.cpp} | 78 +- .../unit_test/cuda/TestCuda_ViewAPI_b.cpp | 13 +- .../unit_test/cuda/TestCuda_ViewMapping_a.cpp | 46 + .../unit_test/cuda/TestCuda_ViewMapping_b.cpp | 46 + .../cuda/TestCuda_ViewMapping_subview.cpp | 46 + .../unit_test/cuda/TestCuda_ViewOfClass.cpp | 46 + .../{ => default}/TestDefaultDeviceType.cpp | 31 +- .../TestDefaultDeviceTypeInit_1.cpp | 0 .../TestDefaultDeviceTypeInit_10.cpp | 0 .../TestDefaultDeviceTypeInit_11.cpp | 0 .../TestDefaultDeviceTypeInit_12.cpp | 0 .../TestDefaultDeviceTypeInit_13.cpp | 0 .../TestDefaultDeviceTypeInit_14.cpp | 0 .../TestDefaultDeviceTypeInit_15.cpp | 0 .../TestDefaultDeviceTypeInit_16.cpp | 0 .../TestDefaultDeviceTypeInit_2.cpp | 0 .../TestDefaultDeviceTypeInit_3.cpp | 0 .../TestDefaultDeviceTypeInit_4.cpp | 0 .../TestDefaultDeviceTypeInit_5.cpp | 0 .../TestDefaultDeviceTypeInit_6.cpp | 0 .../TestDefaultDeviceTypeInit_7.cpp | 0 .../TestDefaultDeviceTypeInit_8.cpp | 0 .../TestDefaultDeviceTypeInit_9.cpp | 0 .../TestDefaultDeviceType_Category.hpp | 67 + .../{ => default}/TestDefaultDeviceType_a.cpp | 15 +- .../{ => default}/TestDefaultDeviceType_b.cpp | 16 +- .../{ => default}/TestDefaultDeviceType_c.cpp | 16 +- .../default/TestDefaultDeviceType_d.cpp | 73 + .../core/unit_test/openmp/TestOpenMP.hpp | 1 + .../openmp/TestOpenMP_AtomicOperations.cpp | 46 + .../openmp/TestOpenMP_AtomicViews.cpp | 47 + .../unit_test/openmp/TestOpenMP_Atomics.cpp | 159 +- .../unit_test/openmp/TestOpenMP_Category.hpp | 65 + .../unit_test/openmp/TestOpenMP_Complex.cpp | 47 + .../TestOpenMP_Init.cpp} | 13 +- .../unit_test/openmp/TestOpenMP_MDRange.cpp | 47 + .../unit_test/openmp/TestOpenMP_Other.cpp | 176 +- .../openmp/TestOpenMP_RangePolicy.cpp | 47 + .../openmp/TestOpenMP_Reductions.cpp | 105 +- .../core/unit_test/openmp/TestOpenMP_Scan.cpp | 47 + .../TestOpenMP_SharedAlloc.cpp} | 9 +- .../unit_test/openmp/TestOpenMP_SubView_a.cpp | 47 +- .../unit_test/openmp/TestOpenMP_SubView_b.cpp | 19 +- .../openmp/TestOpenMP_SubView_c01.cpp | 7 +- .../openmp/TestOpenMP_SubView_c02.cpp | 7 +- .../openmp/TestOpenMP_SubView_c03.cpp | 7 +- .../openmp/TestOpenMP_SubView_c04.cpp | 7 +- .../openmp/TestOpenMP_SubView_c05.cpp | 5 +- .../openmp/TestOpenMP_SubView_c06.cpp | 7 +- .../openmp/TestOpenMP_SubView_c07.cpp | 7 +- .../openmp/TestOpenMP_SubView_c08.cpp | 7 +- .../openmp/TestOpenMP_SubView_c09.cpp | 7 +- .../openmp/TestOpenMP_SubView_c10.cpp | 7 +- .../openmp/TestOpenMP_SubView_c11.cpp | 7 +- .../openmp/TestOpenMP_SubView_c12.cpp | 7 +- .../core/unit_test/openmp/TestOpenMP_Task.cpp | 47 + .../core/unit_test/openmp/TestOpenMP_Team.cpp | 86 +- .../TestOpenMP_TeamReductionScan.cpp} | 83 +- .../openmp/TestOpenMP_TeamScratch.cpp | 83 + .../unit_test/openmp/TestOpenMP_ViewAPI_b.cpp | 83 +- .../openmp/TestOpenMP_ViewMapping_a.cpp | 46 + .../openmp/TestOpenMP_ViewMapping_b.cpp | 46 + .../openmp/TestOpenMP_ViewMapping_subview.cpp | 46 + .../openmp/TestOpenMP_ViewOfClass.cpp | 46 + .../TestOpenMPTarget.hpp} | 90 +- .../TestOpenMPTarget_AtomicOperations.cpp | 46 + .../TestOpenMPTarget_AtomicViews.cpp | 47 + .../openmptarget/TestOpenMPTarget_Atomics.cpp | 46 + .../TestOpenMPTarget_Category.hpp | 65 + .../openmptarget/TestOpenMPTarget_Complex.cpp | 47 + .../TestOpenMPTarget_Init.cpp} | 14 +- .../openmptarget/TestOpenMPTarget_MDRange.cpp | 47 + .../openmptarget/TestOpenMPTarget_Other.cpp | 50 + .../TestOpenMPTarget_RangePolicy.cpp | 47 + .../TestOpenMPTarget_Reductions.cpp | 46 + .../openmptarget/TestOpenMPTarget_Scan.cpp | 47 + .../TestOpenMPTarget_SharedAlloc.cpp | 55 + .../TestOpenMPTarget_SubView_a.cpp | 104 + .../TestOpenMPTarget_SubView_b.cpp} | 22 +- .../TestOpenMPTarget_SubView_c01.cpp | 54 + .../TestOpenMPTarget_SubView_c02.cpp | 54 + .../TestOpenMPTarget_SubView_c03.cpp | 54 + .../TestOpenMPTarget_SubView_c04.cpp | 54 + .../TestOpenMPTarget_SubView_c05.cpp | 54 + .../TestOpenMPTarget_SubView_c06.cpp | 54 + .../TestOpenMPTarget_SubView_c07.cpp} | 8 +- .../TestOpenMPTarget_SubView_c08.cpp | 54 + .../TestOpenMPTarget_SubView_c09.cpp | 54 + .../TestOpenMPTarget_SubView_c10.cpp | 54 + .../TestOpenMPTarget_SubView_c11.cpp | 54 + .../TestOpenMPTarget_SubView_c12.cpp | 54 + .../openmptarget/TestOpenMPTarget_Team.cpp | 75 + .../TestOpenMPTarget_TeamReductionScan.cpp | 81 + .../TestOpenMPTarget_TeamScratch.cpp | 83 + .../TestOpenMPTarget_ViewAPI_b.cpp | 45 + .../TestOpenMPTarget_ViewMapping_a.cpp | 46 + .../TestOpenMPTarget_ViewMapping_b.cpp | 46 + .../TestOpenMPTarget_ViewMapping_subview.cpp | 46 + .../TestOpenMPTarget_ViewOfClass.cpp | 46 + .../qthreads/TestQthreads_Category.hpp | 65 + .../qthreads/TestQthreads_Complex.cpp | 3 + .../unit_test/qthreads/TestQthreads_Other.cpp | 8 +- .../serial/TestSerial_AtomicOperations.cpp | 46 + .../serial/TestSerial_AtomicViews.cpp | 47 + .../unit_test/serial/TestSerial_Atomics.cpp | 162 +- .../unit_test/serial/TestSerial_Category.hpp | 65 + .../unit_test/serial/TestSerial_Complex.cpp | 47 + .../core/unit_test/serial/TestSerial_Init.cpp | 50 + .../unit_test/serial/TestSerial_MDRange.cpp | 47 + .../unit_test/serial/TestSerial_Other.cpp | 136 +- .../serial/TestSerial_RangePolicy.cpp | 47 + .../serial/TestSerial_Reductions.cpp | 88 +- .../core/unit_test/serial/TestSerial_Scan.cpp | 47 + .../TestSerial_SharedAlloc.cpp} | 9 +- .../unit_test/serial/TestSerial_SubView_a.cpp | 47 +- .../unit_test/serial/TestSerial_SubView_b.cpp | 19 +- .../serial/TestSerial_SubView_c01.cpp | 7 +- .../serial/TestSerial_SubView_c02.cpp | 7 +- .../serial/TestSerial_SubView_c03.cpp | 7 +- .../serial/TestSerial_SubView_c04.cpp | 7 +- .../serial/TestSerial_SubView_c05.cpp | 5 +- .../serial/TestSerial_SubView_c06.cpp | 7 +- .../serial/TestSerial_SubView_c07.cpp | 7 +- .../serial/TestSerial_SubView_c08.cpp | 7 +- .../serial/TestSerial_SubView_c09.cpp | 7 +- .../serial/TestSerial_SubView_c10.cpp | 7 +- .../serial/TestSerial_SubView_c11.cpp | 7 +- .../serial/TestSerial_SubView_c12.cpp | 7 +- .../core/unit_test/serial/TestSerial_Task.cpp | 47 + .../core/unit_test/serial/TestSerial_Team.cpp | 81 +- .../serial/TestSerial_TeamReductionScan.cpp | 81 + .../serial/TestSerial_TeamScratch.cpp | 83 + .../unit_test/serial/TestSerial_ViewAPI_b.cpp | 83 +- .../serial/TestSerial_ViewMapping_a.cpp | 46 + .../serial/TestSerial_ViewMapping_b.cpp | 46 + .../serial/TestSerial_ViewMapping_subview.cpp | 46 + .../serial/TestSerial_ViewOfClass.cpp | 46 + .../core/unit_test/threads/TestThreads.hpp | 40 +- .../threads/TestThreads_AtomicOperations.cpp | 46 + .../threads/TestThreads_AtomicViews.cpp | 47 + .../unit_test/threads/TestThreads_Atomics.cpp | 158 +- .../threads/TestThreads_Category.hpp | 65 + .../unit_test/threads/TestThreads_Complex.cpp | 47 + .../unit_test/threads/TestThreads_Init.cpp | 50 + .../unit_test/threads/TestThreads_MDRange.cpp | 47 + .../unit_test/threads/TestThreads_Other.cpp | 160 +- .../threads/TestThreads_RangePolicy.cpp | 47 + .../threads/TestThreads_Reductions.cpp | 106 +- .../unit_test/threads/TestThreads_Scan.cpp | 47 + .../threads/TestThreads_SharedAlloc.cpp | 55 + .../threads/TestThreads_SubView_a.cpp | 47 +- .../threads/TestThreads_SubView_b.cpp | 19 +- .../threads/TestThreads_SubView_c01.cpp | 7 +- .../threads/TestThreads_SubView_c02.cpp | 7 +- .../threads/TestThreads_SubView_c03.cpp | 7 +- .../threads/TestThreads_SubView_c04.cpp | 7 +- .../threads/TestThreads_SubView_c05.cpp | 5 +- .../threads/TestThreads_SubView_c06.cpp | 7 +- .../threads/TestThreads_SubView_c07.cpp | 7 +- .../threads/TestThreads_SubView_c08.cpp | 7 +- .../threads/TestThreads_SubView_c09.cpp | 7 +- .../threads/TestThreads_SubView_c10.cpp | 7 +- .../threads/TestThreads_SubView_c11.cpp | 7 +- .../threads/TestThreads_SubView_c12.cpp | 7 +- .../unit_test/threads/TestThreads_Team.cpp | 86 +- .../threads/TestThreads_TeamReductionScan.cpp | 81 + .../threads/TestThreads_TeamScratch.cpp | 83 + .../threads/TestThreads_ViewAPI_a.cpp | 54 - .../threads/TestThreads_ViewAPI_b.cpp | 83 +- .../threads/TestThreads_ViewMapping_a.cpp | 46 + .../threads/TestThreads_ViewMapping_b.cpp | 46 + .../TestThreads_ViewMapping_subview.cpp | 46 + .../threads/TestThreads_ViewOfClass.cpp | 46 + lib/kokkos/example/cmake_build/CMakeLists.txt | 44 + .../example/cmake_build/cmake_example.cpp | 87 + lib/kokkos/example/feint/ElemFunctor.hpp | 10 +- lib/kokkos/example/feint/feint_threads.cpp | 13 +- lib/kokkos/example/feint/main.cpp | 10 +- lib/kokkos/example/fenl/CGSolve.hpp | 4 +- lib/kokkos/example/fenl/fenl.cpp | 2 +- lib/kokkos/example/fenl/fenl.hpp | 10 +- lib/kokkos/example/fenl/fenl_functors.hpp | 14 +- lib/kokkos/example/fenl/fenl_impl.hpp | 16 +- lib/kokkos/example/fenl/main.cpp | 19 +- lib/kokkos/example/fixture/BoxElemFixture.hpp | 16 +- .../example/global_2_local_ids/G2L_Main.cpp | 12 +- lib/kokkos/example/grow_array/grow_array.hpp | 10 +- lib/kokkos/example/grow_array/main.cpp | 10 +- lib/kokkos/example/md_skeleton/main.cpp | 10 +- .../example/multi_fem/ExplicitFunctors.hpp | 18 +- .../multi_fem/HexExplicitFunctions.hpp | 10 +- lib/kokkos/example/multi_fem/Nonlinear.hpp | 4 +- .../multi_fem/NonlinearElement_Cuda.hpp | 22 +- .../example/multi_fem/ParallelMachine.cpp | 14 +- .../example/multi_fem/SparseLinearSystem.hpp | 4 +- .../example/multi_fem/TestBoxMeshFixture.hpp | 10 +- lib/kokkos/example/sort_array/main.cpp | 16 +- lib/kokkos/example/sort_array/sort_array.hpp | 10 +- .../05_simple_atomics/simple_atomics.cpp | 2 +- lib/kokkos/generate_makefile.bash | 19 +- lib/kokkos/tpls/gtest/gtest/LICENSE | 28 + lib/kokkos/tpls/gtest/gtest/README | 13 + lib/kokkos/tpls/gtest/gtest/gtest-all.cc | 9594 ++++++++ lib/kokkos/tpls/gtest/gtest/gtest-test-part.h | 1 + lib/kokkos/tpls/gtest/gtest/gtest.h | 20065 ++++++++++++++++ 474 files changed, 50746 insertions(+), 10671 deletions(-) create mode 100644 lib/kokkos/cmake/KokkosConfig.cmake.in create mode 100644 lib/kokkos/cmake/Modules/FindHWLOC.cmake create mode 100644 lib/kokkos/cmake/Modules/FindMemkind.cmake create mode 100644 lib/kokkos/cmake/Modules/FindQthreads.cmake create mode 100644 lib/kokkos/cmake/kokkos.cmake create mode 100644 lib/kokkos/config/trilinos-integration/checkin-test create mode 100755 lib/kokkos/config/trilinos-integration/shepard_jenkins_run_script_pthread_intel create mode 100755 lib/kokkos/config/trilinos-integration/shepard_jenkins_run_script_serial_intel create mode 100755 lib/kokkos/config/trilinos-integration/white_run_jenkins_script_cuda create mode 100755 lib/kokkos/config/trilinos-integration/white_run_jenkins_script_omp delete mode 100644 lib/kokkos/containers/unit_tests/TestComplex.hpp delete mode 100644 lib/kokkos/core/perf_test/PerfTestCuda.cpp rename lib/kokkos/core/perf_test/{PerfTestGramSchmidt.hpp => PerfTestGramSchmidt.cpp} (78%) rename lib/kokkos/core/perf_test/{PerfTestHexGrad.hpp => PerfTestHexGrad.cpp} (83%) delete mode 100644 lib/kokkos/core/perf_test/PerfTestHost.cpp rename lib/kokkos/core/{unit_test/cuda/TestCuda_ViewAPI_f.cpp => perf_test/PerfTest_Category.hpp} (82%) create mode 100644 lib/kokkos/core/perf_test/PerfTest_CustomReduction.cpp create mode 100755 lib/kokkos/core/perf_test/run_mempool.sh create mode 100755 lib/kokkos/core/perf_test/run_mempool_fill.sh create mode 100755 lib/kokkos/core/perf_test/run_taskdag.sh create mode 100644 lib/kokkos/core/perf_test/test_mempool.cpp create mode 100644 lib/kokkos/core/perf_test/test_taskdag.cpp create mode 100644 lib/kokkos/core/src/Cuda/Kokkos_Cuda_Team.hpp create mode 100644 lib/kokkos/core/src/Kokkos_NumericTraits.hpp create mode 100644 lib/kokkos/core/src/Kokkos_OpenMPTarget.hpp create mode 100644 lib/kokkos/core/src/Kokkos_OpenMPTargetSpace.hpp rename lib/kokkos/core/src/OpenMP/{Kokkos_OpenMPexec.cpp => Kokkos_OpenMP_Exec.cpp} (87%) rename lib/kokkos/core/src/OpenMP/{Kokkos_OpenMPexec.hpp => Kokkos_OpenMP_Exec.hpp} (97%) create mode 100644 lib/kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTargetSpace.cpp create mode 100644 lib/kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Exec.cpp create mode 100644 lib/kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Exec.hpp create mode 100644 lib/kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Parallel.hpp create mode 100644 lib/kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Task.cpp create mode 100644 lib/kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Task.hpp create mode 100644 lib/kokkos/core/src/impl/Kokkos_ClockTic.hpp create mode 100644 lib/kokkos/core/src/impl/Kokkos_ConcurrentBitset.hpp delete mode 100644 lib/kokkos/core/src/impl/Kokkos_Reducer.hpp create mode 100644 lib/kokkos/core/unit_test/TestComplex.hpp create mode 100644 lib/kokkos/core/unit_test/TestConcurrentBitset.hpp delete mode 100644 lib/kokkos/core/unit_test/TestDefaultDeviceType_d.cpp create mode 100644 lib/kokkos/core/unit_test/TestFunctorAnalysis.hpp create mode 100644 lib/kokkos/core/unit_test/TestInit.hpp create mode 100644 lib/kokkos/core/unit_test/TestReduceCombinatorical.hpp rename lib/kokkos/core/unit_test/{TestViewMapping.hpp => TestViewMapping_a.hpp} (77%) create mode 100644 lib/kokkos/core/unit_test/TestViewMapping_b.hpp create mode 100644 lib/kokkos/core/unit_test/TestViewMapping_subview.hpp create mode 100644 lib/kokkos/core/unit_test/UnitTestMainInit.cpp rename lib/kokkos/core/unit_test/cuda/{TestCuda_ViewAPI_a.cpp => TestCudaHostPinned_Category.hpp} (86%) create mode 100644 lib/kokkos/core/unit_test/cuda/TestCudaHostPinned_SharedAlloc.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCudaHostPinned_ViewAPI.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCudaHostPinned_ViewMapping_a.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCudaHostPinned_ViewMapping_b.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCudaHostPinned_ViewMapping_subview.cpp rename lib/kokkos/core/unit_test/cuda/{TestCuda_Reductions_a.cpp => TestCudaUVM_Category.hpp} (86%) create mode 100644 lib/kokkos/core/unit_test/cuda/TestCudaUVM_SharedAlloc.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCudaUVM_ViewAPI.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCudaUVM_ViewMapping_a.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCudaUVM_ViewMapping_b.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCudaUVM_ViewMapping_subview.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_AtomicOperations.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_AtomicViews.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_Category.hpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_Complex.cpp rename lib/kokkos/core/unit_test/cuda/{TestCuda_ViewAPI_g.cpp => TestCuda_Init.cpp} (93%) create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_MDRange.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_RangePolicy.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_Reductions.cpp delete mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_Reductions_b.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_Scan.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_SharedAlloc.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_Task.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_TeamReductionScan.cpp rename lib/kokkos/core/unit_test/{serial/TestSerial.hpp => cuda/TestCuda_TeamScratch.cpp} (64%) create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_ViewMapping_a.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_ViewMapping_b.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_ViewMapping_subview.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_ViewOfClass.cpp rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceType.cpp (81%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_1.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_10.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_11.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_12.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_13.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_14.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_15.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_16.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_2.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_3.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_4.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_5.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_6.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_7.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_8.cpp (100%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceTypeInit_9.cpp (100%) create mode 100644 lib/kokkos/core/unit_test/default/TestDefaultDeviceType_Category.hpp rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceType_a.cpp (91%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceType_b.cpp (90%) rename lib/kokkos/core/unit_test/{ => default}/TestDefaultDeviceType_c.cpp (90%) create mode 100644 lib/kokkos/core/unit_test/default/TestDefaultDeviceType_d.cpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_AtomicOperations.cpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_AtomicViews.cpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_Category.hpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_Complex.cpp rename lib/kokkos/core/unit_test/{cuda/TestCuda_ViewAPI_h.cpp => openmp/TestOpenMP_Init.cpp} (92%) create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_MDRange.cpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_RangePolicy.cpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_Scan.cpp rename lib/kokkos/core/unit_test/{cuda/TestCuda_ViewAPI_c.cpp => openmp/TestOpenMP_SharedAlloc.cpp} (91%) create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_Task.cpp rename lib/kokkos/core/unit_test/{cuda/TestCuda_ViewAPI_d.cpp => openmp/TestOpenMP_TeamReductionScan.cpp} (55%) create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_TeamScratch.cpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewMapping_a.cpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewMapping_b.cpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewMapping_subview.cpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewOfClass.cpp rename lib/kokkos/core/unit_test/{cuda/TestCuda.hpp => openmptarget/TestOpenMPTarget.hpp} (60%) create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_AtomicOperations.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_AtomicViews.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_Atomics.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_Category.hpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_Complex.cpp rename lib/kokkos/core/unit_test/{serial/TestSerial_ViewAPI_a.cpp => openmptarget/TestOpenMPTarget_Init.cpp} (90%) create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_MDRange.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_Other.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_RangePolicy.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_Reductions.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_Scan.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SharedAlloc.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_a.cpp rename lib/kokkos/core/unit_test/{cuda/TestCuda_ViewAPI_e.cpp => openmptarget/TestOpenMPTarget_SubView_b.cpp} (71%) create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_c01.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_c02.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_c03.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_c04.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_c05.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_c06.cpp rename lib/kokkos/core/unit_test/{cuda/TestCuda_ViewAPI_s.cpp => openmptarget/TestOpenMPTarget_SubView_c07.cpp} (90%) create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_c08.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_c09.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_c10.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_c11.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_c12.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_Team.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_TeamReductionScan.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_TeamScratch.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_ViewAPI_b.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_ViewMapping_a.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_ViewMapping_b.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_ViewMapping_subview.cpp create mode 100644 lib/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_ViewOfClass.cpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_Category.hpp create mode 100644 lib/kokkos/core/unit_test/qthreads/TestQthreads_Complex.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_AtomicOperations.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_AtomicViews.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_Category.hpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_Complex.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_Init.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_MDRange.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_RangePolicy.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_Scan.cpp rename lib/kokkos/core/unit_test/{openmp/TestOpenMP_ViewAPI_a.cpp => serial/TestSerial_SharedAlloc.cpp} (91%) create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_Task.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_TeamReductionScan.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_TeamScratch.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_ViewMapping_a.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_ViewMapping_b.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_ViewMapping_subview.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_ViewOfClass.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_AtomicOperations.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_AtomicViews.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_Category.hpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_Complex.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_Init.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_MDRange.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_RangePolicy.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_Scan.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_SharedAlloc.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_TeamReductionScan.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_TeamScratch.cpp delete mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_ViewAPI_a.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_ViewMapping_a.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_ViewMapping_b.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_ViewMapping_subview.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_ViewOfClass.cpp create mode 100644 lib/kokkos/example/cmake_build/CMakeLists.txt create mode 100644 lib/kokkos/example/cmake_build/cmake_example.cpp create mode 100644 lib/kokkos/tpls/gtest/gtest/LICENSE create mode 100644 lib/kokkos/tpls/gtest/gtest/README create mode 100644 lib/kokkos/tpls/gtest/gtest/gtest-all.cc create mode 120000 lib/kokkos/tpls/gtest/gtest/gtest-test-part.h create mode 100644 lib/kokkos/tpls/gtest/gtest/gtest.h diff --git a/lib/kokkos/CHANGELOG.md b/lib/kokkos/CHANGELOG.md index c6fe991b97..acb54ff22f 100644 --- a/lib/kokkos/CHANGELOG.md +++ b/lib/kokkos/CHANGELOG.md @@ -1,5 +1,53 @@ # Change Log + +## [2.03.05](https://github.com/kokkos/kokkos/tree/2.03.05) (2017-05-27) +[Full Changelog](https://github.com/kokkos/kokkos/compare/2.03.00...2.03.05) + +**Implemented enhancements:** + +- Harmonize Custom Reductions over nesting levels [\#802](https://github.com/kokkos/kokkos/issues/802) +- Prevent users directly including KokkosCore\_config.h [\#815](https://github.com/kokkos/kokkos/issues/815) +- DualView aborts on concurrent host/device modify \(in debug mode\) [\#814](https://github.com/kokkos/kokkos/issues/814) +- Abort when running on a NVIDIA CC5.0 or higher architecture with code compiled for CC \< 5.0 [\#813](https://github.com/kokkos/kokkos/issues/813) +- Add "name" function to ExecSpaces [\#806](https://github.com/kokkos/kokkos/issues/806) +- Allow null Future in task spawn dependences [\#795](https://github.com/kokkos/kokkos/issues/795) +- Add Unit Tests for Kokkos::complex [\#785](https://github.com/kokkos/kokkos/issues/785) +- Add pow function for Kokkos::complex [\#784](https://github.com/kokkos/kokkos/issues/784) +- Square root of a complex [\#729](https://github.com/kokkos/kokkos/issues/729) +- Command line processing of --threads argument prevents users from having any commandline arguments starting with --threads [\#760](https://github.com/kokkos/kokkos/issues/760) +- Protected deprecated API with appropriate macro [\#756](https://github.com/kokkos/kokkos/issues/756) +- Allow task scheduler memory pool to be used by tasks [\#747](https://github.com/kokkos/kokkos/issues/747) +- View bounds checking on host-side performance: constructing a std::string [\#723](https://github.com/kokkos/kokkos/issues/723) +- Add check for AppleClang as compiler distinct from check for Clang. [\#705](https://github.com/kokkos/kokkos/issues/705) +- Uninclude source files for specific configurations to prevent link warning. [\#701](https://github.com/kokkos/kokkos/issues/701) +- Add --small option to snapshot script [\#697](https://github.com/kokkos/kokkos/issues/697) +- CMake Standalone Support [\#674](https://github.com/kokkos/kokkos/issues/674) +- CMake build unit test and install [\#808](https://github.com/kokkos/kokkos/issues/808) +- CMake: Fix having kokkos as a subdirectory in a pure cmake project [\#629](https://github.com/kokkos/kokkos/issues/629) +- Tribits macro assumes build directory is in top level source directory [\#654](https://github.com/kokkos/kokkos/issues/654) +- Use bin/nvcc\_wrapper, not config/nvcc\_wrapper [\#562](https://github.com/kokkos/kokkos/issues/562) +- Allow MemoryPool::allocate\(\) to be called from multiple threads per warp. [\#487](https://github.com/kokkos/kokkos/issues/487) +- Allow MemoryPool::allocate\\(\\) to be called from multiple threads per warp. [\#487](https://github.com/kokkos/kokkos/issues/487) +- Move OpenMP 4.5 OpenMPTarget backend into Develop [\#456](https://github.com/kokkos/kokkos/issues/456) +- Testing on ARM testbed [\#288](https://github.com/kokkos/kokkos/issues/288) + +**Fixed bugs:** + +- Fix label in OpenMP parallel\_reduce verify\_initialized [\#834](https://github.com/kokkos/kokkos/issues/834) +- TeamScratch Level 1 on Cuda hangs [\#820](https://github.com/kokkos/kokkos/issues/820) +- \[bug\] memory pool. [\#786](https://github.com/kokkos/kokkos/issues/786) +- Some Reduction Tests fail on Intel 18 with aggressive vectorization on [\#774](https://github.com/kokkos/kokkos/issues/774) +- Error copying dynamic view on copy of memory pool [\#773](https://github.com/kokkos/kokkos/issues/773) +- CUDA stack overflow with TaskDAG test [\#758](https://github.com/kokkos/kokkos/issues/758) +- ThreadVectorRange Customized Reduction Bug [\#739](https://github.com/kokkos/kokkos/issues/739) +- set\_scratch\_size overflows [\#726](https://github.com/kokkos/kokkos/issues/726) +- Get wrong results for compiler checks in Makefile on OS X. [\#706](https://github.com/kokkos/kokkos/issues/706) +- Fix check if multiple host architectures enabled. [\#702](https://github.com/kokkos/kokkos/issues/702) +- Threads Backend Does not Pass on Cray Compilers [\#609](https://github.com/kokkos/kokkos/issues/609) +- Rare bug in memory pool where allocation can finish on superblock in empty state [\#452](https://github.com/kokkos/kokkos/issues/452) +- LDFLAGS in core/unit\_test/Makefile: potential "undefined reference" to pthread lib [\#148](https://github.com/kokkos/kokkos/issues/148) + ## [2.03.00](https://github.com/kokkos/kokkos/tree/2.03.00) (2017-04-25) [Full Changelog](https://github.com/kokkos/kokkos/compare/2.02.15...2.03.00) diff --git a/lib/kokkos/CMakeLists.txt b/lib/kokkos/CMakeLists.txt index 1c820660ae..b2771ed527 100644 --- a/lib/kokkos/CMakeLists.txt +++ b/lib/kokkos/CMakeLists.txt @@ -5,11 +5,12 @@ ELSE() ENDIF() IF(NOT KOKKOS_HAS_TRILINOS) - CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR) - INCLUDE(cmake/tribits.cmake) - SET(CMAKE_CXX_STANDARD 11) -ENDIF() + cmake_minimum_required(VERSION 3.1 FATAL_ERROR) + project(Kokkos CXX) + INCLUDE(cmake/kokkos.cmake) +ELSE() +#------------------------------------------------------------------------------ # # A) Forward delcare the package so that certain options are also defined for # subpackages @@ -17,14 +18,13 @@ ENDIF() TRIBITS_PACKAGE_DECL(Kokkos) # ENABLE_SHADOWING_WARNINGS) + #------------------------------------------------------------------------------ # # B) Define the common options for Kokkos first so they can be used by # subpackages as well. # - - # mfh 01 Aug 2016: See Issue #61: # # https://github.com/kokkos/kokkos/issues/61 @@ -83,10 +83,10 @@ TRIBITS_ADD_OPTION_AND_DEFINE( ) ASSERT_DEFINED(TPL_ENABLE_Pthread) -IF (Kokkos_ENABLE_Pthread AND NOT TPL_ENABLE_Pthread) +IF(Kokkos_ENABLE_Pthread AND NOT TPL_ENABLE_Pthread) MESSAGE(FATAL_ERROR "You set Kokkos_ENABLE_Pthread=ON, but Trilinos' support for Pthread(s) is not enabled (TPL_ENABLE_Pthread=OFF). This is not allowed. Please enable Pthreads in Trilinos before attempting to enable Kokkos' support for Pthreads.") -ENDIF () -IF (NOT TPL_ENABLE_Pthread) +ENDIF() +IF(NOT TPL_ENABLE_Pthread) ADD_DEFINITIONS(-DGTEST_HAS_PTHREAD=0) ENDIF() @@ -98,12 +98,13 @@ TRIBITS_ADD_OPTION_AND_DEFINE( ) TRIBITS_ADD_OPTION_AND_DEFINE( - Kokkos_ENABLE_Qthreads + Kokkos_ENABLE_QTHREAD KOKKOS_HAVE_QTHREADS "Enable Qthreads support in Kokkos." - "${TPL_ENABLE_QTHREADS}" + "${TPL_ENABLE_QTHREAD}" ) +# TODO: No longer an option in Kokkos. Needs to be removed. TRIBITS_ADD_OPTION_AND_DEFINE( Kokkos_ENABLE_CXX11 KOKKOS_HAVE_CXX11 @@ -118,6 +119,7 @@ TRIBITS_ADD_OPTION_AND_DEFINE( "${TPL_ENABLE_HWLOC}" ) +# TODO: This is currently not used in Kokkos. Should it be removed? TRIBITS_ADD_OPTION_AND_DEFINE( Kokkos_ENABLE_MPI KOKKOS_HAVE_MPI @@ -154,13 +156,27 @@ TRIBITS_ADD_OPTION_AND_DEFINE( "${Kokkos_ENABLE_Debug_Bounds_Check_DEFAULT}" ) +TRIBITS_ADD_OPTION_AND_DEFINE( + Kokkos_ENABLE_Debug_DualView_Modify_Check + KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK + "Enable abort when Kokkos::DualView modified on host and device without sync." + "${Kokkos_ENABLE_DEBUG}" + ) + TRIBITS_ADD_OPTION_AND_DEFINE( Kokkos_ENABLE_Profiling - KOKKOS_ENABLE_PROFILING_INTERNAL + KOKKOS_ENABLE_PROFILING "Enable KokkosP profiling support for kernel data collections." "${TPL_ENABLE_DLlib}" ) +TRIBITS_ADD_OPTION_AND_DEFINE( + Kokkos_ENABLE_Profiling_Load_Print + KOKKOS_ENABLE_PROFILING_LOAD_PRINT + "Print to standard output which profiling library was loaded." + OFF + ) + # placeholder for future device... TRIBITS_ADD_OPTION_AND_DEFINE( Kokkos_ENABLE_Winthread @@ -169,6 +185,7 @@ TRIBITS_ADD_OPTION_AND_DEFINE( "${TPL_ENABLE_Winthread}" ) +# TODO: No longer an option in Kokkos. Needs to be removed. # use new/old View TRIBITS_ADD_OPTION_AND_DEFINE( Kokkos_USING_DEPRECATED_VIEW @@ -177,12 +194,12 @@ TRIBITS_ADD_OPTION_AND_DEFINE( OFF ) + #------------------------------------------------------------------------------ # # C) Install Kokkos' executable scripts # - # nvcc_wrapper is Kokkos' wrapper for NVIDIA's NVCC CUDA compiler. # Kokkos needs nvcc_wrapper in order to build. Other libraries and # executables also need nvcc_wrapper. Thus, we need to install it. @@ -199,6 +216,8 @@ INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bin/nvcc_wrapper DESTINATION bin) TRIBITS_PROCESS_SUBPACKAGES() + +#------------------------------------------------------------------------------ # # E) If Kokkos itself is enabled, process the Kokkos package # @@ -213,3 +232,4 @@ TRIBITS_EXCLUDE_FILES( ) TRIBITS_PACKAGE_POSTPROCESS() +ENDIF() diff --git a/lib/kokkos/Makefile.kokkos b/lib/kokkos/Makefile.kokkos index 5b094dba8c..24cd772e00 100644 --- a/lib/kokkos/Makefile.kokkos +++ b/lib/kokkos/Makefile.kokkos @@ -35,23 +35,26 @@ KOKKOS_INTERNAL_USE_MEMKIND := $(strip $(shell echo $(KOKKOS_USE_TPLS) | grep "e # Check for advanced settings. KOKKOS_INTERNAL_OPT_RANGE_AGGRESSIVE_VECTORIZATION := $(strip $(shell echo $(KOKKOS_OPTIONS) | grep "aggressive_vectorization" | wc -l)) KOKKOS_INTERNAL_DISABLE_PROFILING := $(strip $(shell echo $(KOKKOS_OPTIONS) | grep "disable_profiling" | wc -l)) +KOKKOS_INTERNAL_DISABLE_DUALVIEW_MODIFY_CHECK := $(strip $(shell echo $(KOKKOS_OPTIONS) | grep "disable_dualview_modify_check" | wc -l)) +KOKKOS_INTERNAL_ENABLE_PROFILING_LOAD_PRINT := $(strip $(shell echo $(KOKKOS_OPTIONS) | grep "enable_profile_load_print" | wc -l)) KOKKOS_INTERNAL_CUDA_USE_LDG := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | grep "use_ldg" | wc -l)) KOKKOS_INTERNAL_CUDA_USE_UVM := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | grep "force_uvm" | wc -l)) KOKKOS_INTERNAL_CUDA_USE_RELOC := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | grep "rdc" | wc -l)) KOKKOS_INTERNAL_CUDA_USE_LAMBDA := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | grep "enable_lambda" | wc -l)) # Check for Kokkos Host Execution Spaces one of which must be on. -KOKKOS_INTERNAL_USE_OPENMP := $(strip $(shell echo $(KOKKOS_DEVICES) | grep OpenMP | wc -l)) +KOKKOS_INTERNAL_USE_OPENMPTARGET := $(strip $(shell echo $(KOKKOS_DEVICES) | grep OpenMPTarget | wc -l)) +KOKKOS_INTERNAL_USE_OPENMP := $(strip $(shell echo $(subst OpenMPTarget,,$(KOKKOS_DEVICES)) | grep OpenMP | wc -l)) KOKKOS_INTERNAL_USE_PTHREADS := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Pthread | wc -l)) KOKKOS_INTERNAL_USE_QTHREADS := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Qthreads | wc -l)) KOKKOS_INTERNAL_USE_SERIAL := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Serial | wc -l)) ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 0) -ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 0) -ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 0) - KOKKOS_INTERNAL_USE_SERIAL := 1 -endif -endif + ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 0) + ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 0) + KOKKOS_INTERNAL_USE_SERIAL := 1 + endif + endif endif # Check for other Execution Spaces. @@ -64,24 +67,25 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) endif # Check OS. -KOKKOS_OS := $(shell uname -s) -KOKKOS_INTERNAL_OS_CYGWIN := $(shell uname -s | grep CYGWIN | wc -l) -KOKKOS_INTERNAL_OS_LINUX := $(shell uname -s | grep Linux | wc -l) -KOKKOS_INTERNAL_OS_DARWIN := $(shell uname -s | grep Darwin | wc -l) +KOKKOS_OS := $(strip $(shell uname -s)) +KOKKOS_INTERNAL_OS_CYGWIN := $(strip $(shell uname -s | grep CYGWIN | wc -l)) +KOKKOS_INTERNAL_OS_LINUX := $(strip $(shell uname -s | grep Linux | wc -l)) +KOKKOS_INTERNAL_OS_DARWIN := $(strip $(shell uname -s | grep Darwin | wc -l)) # Check compiler. -KOKKOS_INTERNAL_COMPILER_INTEL := $(shell $(CXX) --version 2>&1 | grep "Intel Corporation" | wc -l) -KOKKOS_INTERNAL_COMPILER_PGI := $(shell $(CXX) --version 2>&1 | grep PGI | wc -l) -KOKKOS_INTERNAL_COMPILER_XL := $(shell $(CXX) -qversion 2>&1 | grep XL | wc -l) -KOKKOS_INTERNAL_COMPILER_CRAY := $(shell $(CXX) -craype-verbose 2>&1 | grep "CC-" | wc -l) -KOKKOS_INTERNAL_COMPILER_NVCC := $(shell $(CXX) --version 2>&1 | grep "nvcc" | wc -l) +KOKKOS_INTERNAL_COMPILER_INTEL := $(strip $(shell $(CXX) --version 2>&1 | grep "Intel Corporation" | wc -l)) +KOKKOS_INTERNAL_COMPILER_PGI := $(strip $(shell $(CXX) --version 2>&1 | grep PGI | wc -l)) +KOKKOS_INTERNAL_COMPILER_XL := $(strip $(shell $(CXX) -qversion 2>&1 | grep XL | wc -l)) +KOKKOS_INTERNAL_COMPILER_CRAY := $(strip $(shell $(CXX) -craype-verbose 2>&1 | grep "CC-" | wc -l)) +KOKKOS_INTERNAL_COMPILER_NVCC := $(strip $(shell $(CXX) --version 2>&1 | grep nvcc | wc -l)) +KOKKOS_INTERNAL_COMPILER_CLANG := $(strip $(shell $(CXX) --version 2>&1 | grep clang | wc -l)) +KOKKOS_INTERNAL_COMPILER_APPLE_CLANG := $(strip $(shell $(CXX) --version 2>&1 | grep "apple-darwin" | wc -l)) ifneq ($(OMPI_CXX),) - KOKKOS_INTERNAL_COMPILER_NVCC := $(shell $(OMPI_CXX) --version 2>&1 | grep "nvcc" | wc -l) + KOKKOS_INTERNAL_COMPILER_NVCC := $(strip $(shell $(OMPI_CXX) --version 2>&1 | grep "nvcc" | wc -l)) endif ifneq ($(MPICH_CXX),) - KOKKOS_INTERNAL_COMPILER_NVCC := $(shell $(MPICH_CXX) --version 2>&1 | grep "nvcc" | wc -l) + KOKKOS_INTERNAL_COMPILER_NVCC := $(strip $(shell $(MPICH_CXX) --version 2>&1 | grep "nvcc" | wc -l)) endif -KOKKOS_INTERNAL_COMPILER_CLANG := $(shell $(CXX) --version 2>&1 | grep "clang" | wc -l) ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 2) KOKKOS_INTERNAL_COMPILER_CLANG = 1 @@ -90,6 +94,11 @@ ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 2) KOKKOS_INTERNAL_COMPILER_XL = 1 endif +# Apple Clang passes both clang and apple clang tests, so turn off clang. +ifeq ($(KOKKOS_INTERNAL_COMPILER_APPLE_CLANG), 1) + KOKKOS_INTERNAL_COMPILER_CLANG = 0 +endif + ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) KOKKOS_INTERNAL_COMPILER_CLANG_VERSION := $(shell clang --version | grep version | cut -d ' ' -f3 | tr -d '.') @@ -97,29 +106,43 @@ ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) ifeq ($(shell test $(KOKKOS_INTERNAL_COMPILER_CLANG_VERSION) -lt 400; echo $$?),0) $(error Compiling Cuda code directly with Clang requires version 4.0.0 or higher) endif + KOKKOS_INTERNAL_CUDA_USE_LAMBDA := 1 endif endif +# Set OpenMP flags. ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) KOKKOS_INTERNAL_OPENMP_FLAG := -mp else ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp=libomp else - ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1) - KOKKOS_INTERNAL_OPENMP_FLAG := -qsmp=omp + ifeq ($(KOKKOS_INTERNAL_COMPILER_APPLE_CLANG), 1) + KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp=libomp else - ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) - # OpenMP is turned on by default in Cray compiler environment. - KOKKOS_INTERNAL_OPENMP_FLAG := + ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1) + KOKKOS_INTERNAL_OPENMP_FLAG := -qsmp=omp else - KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp + ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) + # OpenMP is turned on by default in Cray compiler environment. + KOKKOS_INTERNAL_OPENMP_FLAG := + else + KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp + endif endif endif endif endif +ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1) + KOKKOS_INTERNAL_OPENMPTARGET_FLAG := -DKOKKOS_IBM_XL_OMP45_WORKAROUND -qsmp=omp -qoffload -qnoeh +else + ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) + KOKKOS_INTERNAL_OPENMPTARGET_FLAG := -DKOKKOS_BUG_WORKAROUND_IBM_CLANG_OMP45_VIEW_INIT -fopenmp-implicit-declare-target -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp -fopenmp=libomp + endif +endif +# Set C++11 flags. ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) KOKKOS_INTERNAL_CXX11_FLAG := --c++11 else @@ -146,7 +169,7 @@ KOKKOS_INTERNAL_USE_ARCH_SKX := $(strip $(shell echo $(KOKKOS_ARCH) | grep SKX | KOKKOS_INTERNAL_USE_ARCH_KNL := $(strip $(shell echo $(KOKKOS_ARCH) | grep KNL | wc -l)) # NVIDIA based. -NVCC_WRAPPER := $(KOKKOS_PATH)/config/nvcc_wrapper +NVCC_WRAPPER := $(KOKKOS_PATH)/bin/nvcc_wrapper KOKKOS_INTERNAL_USE_ARCH_KEPLER30 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler30 | wc -l)) KOKKOS_INTERNAL_USE_ARCH_KEPLER32 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler32 | wc -l)) KOKKOS_INTERNAL_USE_ARCH_KEPLER35 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler35 | wc -l)) @@ -180,10 +203,20 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_NVIDIA), 0) + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53) | bc)) endif +ifeq ($(KOKKOS_INTERNAL_USE_ARCH_NVIDIA), 1) + ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1) + ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) + KOKKOS_INTERNAL_NVCC_PATH := $(shell which nvcc) + CUDA_PATH ?= $(KOKKOS_INTERNAL_NVCC_PATH:/bin/nvcc=) + KOKKOS_INTERNAL_OPENMPTARGET_FLAG := $(KOKKOS_INTERNAL_OPENMPTARGET_FLAG) --cuda-path=$(CUDA_PATH) + endif + endif +endif # ARM based. KOKKOS_INTERNAL_USE_ARCH_ARMV80 := $(strip $(shell echo $(KOKKOS_ARCH) | grep ARMv80 | wc -l)) KOKKOS_INTERNAL_USE_ARCH_ARMV81 := $(strip $(shell echo $(KOKKOS_ARCH) | grep ARMv81 | wc -l)) KOKKOS_INTERNAL_USE_ARCH_ARMV8_THUNDERX := $(strip $(shell echo $(KOKKOS_ARCH) | grep ARMv8-ThunderX | wc -l)) +KOKKOS_INTERNAL_USE_ARCH_ARM := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_ARMV80)+$(KOKKOS_INTERNAL_USE_ARCH_ARMV81)+$(KOKKOS_INTERNAL_USE_ARCH_ARMV8_THUNDERX) | bc)) # IBM based. KOKKOS_INTERNAL_USE_ARCH_BGQ := $(strip $(shell echo $(KOKKOS_ARCH) | grep BGQ | wc -l)) @@ -206,8 +239,11 @@ KOKKOS_INTERNAL_USE_ISA_X86_64 := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ KOKKOS_INTERNAL_USE_ISA_KNC := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_KNC) | bc )) KOKKOS_INTERNAL_USE_ISA_POWERPCLE := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_POWER8)+$(KOKKOS_INTERNAL_USE_ARCH_POWER9) | bc )) +# Decide whether we can support transactional memory +KOKKOS_INTERNAL_USE_TM := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_BDW)+$(KOKKOS_INTERNAL_USE_ARCH_SKX) | bc )) + # Incompatible flags? -KOKKOS_INTERNAL_USE_ARCH_MULTIHOST := $(strip $(shell echo "$(KOKKOS_INTERNAL_USE_ARCH_AVX)+$(KOKKOS_INTERNAL_USE_ARCH_AVX2)+$(KOKKOS_INTERNAL_USE_ARCH_KNC)+$(KOKKOS_INTERNAL_USE_ARCH_IBM)+$(KOKKOS_INTERNAL_USE_ARCH_AMDAVX)+$(KOKKOS_INTERNAL_USE_ARCH_ARMV80)+$(KOKKOS_INTERNAL_USE_ARCH_ARMV81)+$(KOKKOS_INTERNAL_USE_ARCH_ARMV8_THUNDERX)>1" | bc )) +KOKKOS_INTERNAL_USE_ARCH_MULTIHOST := $(strip $(shell echo "$(KOKKOS_INTERNAL_USE_ARCH_AVX)+$(KOKKOS_INTERNAL_USE_ARCH_AVX2)+$(KOKKOS_INTERNAL_USE_ARCH_AVX512MIC)+$(KOKKOS_INTERNAL_USE_ARCH_AVX512XEON)+$(KOKKOS_INTERNAL_USE_ARCH_KNC)+$(KOKKOS_INTERNAL_USE_ARCH_IBM)+$(KOKKOS_INTERNAL_USE_ARCH_ARM)>1" | bc )) KOKKOS_INTERNAL_USE_ARCH_MULTIGPU := $(strip $(shell echo "$(KOKKOS_INTERNAL_USE_ARCH_NVIDIA)>1" | bc)) ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MULTIHOST), 1) @@ -240,12 +276,22 @@ tmp := $(shell echo "Makefile constructed configuration:" >> KokkosCore_config.t tmp := $(shell date >> KokkosCore_config.tmp) tmp := $(shell echo "----------------------------------------------*/" >> KokkosCore_config.tmp) +tmp := $(shell echo '\#if !defined(KOKKOS_MACROS_HPP) || defined(KOKKOS_CORE_CONFIG_H)' >> KokkosCore_config.tmp) +tmp := $(shell echo '\#error "Do not include KokkosCore_config.h directly; include Kokkos_Macros.hpp instead."' >> KokkosCore_config.tmp) +tmp := $(shell echo '\#else' >> KokkosCore_config.tmp) +tmp := $(shell echo '\#define KOKKOS_CORE_CONFIG_H' >> KokkosCore_config.tmp) +tmp := $(shell echo '\#endif' >> KokkosCore_config.tmp) + tmp := $(shell echo "/* Execution Spaces */" >> KokkosCore_config.tmp) ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) tmp := $(shell echo "\#define KOKKOS_HAVE_CUDA 1" >> KokkosCore_config.tmp ) endif +ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1) + tmp := $(shell echo '\#define KOKKOS_ENABLE_OPENMPTARGET 1' >> KokkosCore_config.tmp) +endif + ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1) tmp := $(shell echo '\#define KOKKOS_HAVE_OPENMP 1' >> KokkosCore_config.tmp) endif @@ -262,6 +308,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1) tmp := $(shell echo "\#define KOKKOS_HAVE_SERIAL 1" >> KokkosCore_config.tmp ) endif +ifeq ($(KOKKOS_INTERNAL_USE_TM), 1) + tmp := $(shell echo "\#ifndef __CUDA_ARCH__" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ENABLE_TM" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#endif" >> KokkosCore_config.tmp ) +endif + ifeq ($(KOKKOS_INTERNAL_USE_ISA_X86_64), 1) tmp := $(shell echo "\#ifndef __CUDA_ARCH__" >> KokkosCore_config.tmp ) tmp := $(shell echo "\#define KOKKOS_USE_ISA_X86_64" >> KokkosCore_config.tmp ) @@ -293,13 +345,21 @@ ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX1Z), 1) endif ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1) -ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) - KOKKOS_CXXFLAGS += -lineinfo -endif + ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) + KOKKOS_CXXFLAGS += -lineinfo + endif + KOKKOS_CXXFLAGS += -g KOKKOS_LDFLAGS += -g -ldl tmp := $(shell echo "\#define KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK 1" >> KokkosCore_config.tmp ) tmp := $(shell echo "\#define KOKKOS_HAVE_DEBUG 1" >> KokkosCore_config.tmp ) + ifeq ($(KOKKOS_INTERNAL_DISABLE_DUALVIEW_MODIFY_CHECK), 0) + tmp := $(shell echo "\#define KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK 1" >> KokkosCore_config.tmp ) + endif +endif + +ifeq ($(KOKKOS_INTERNAL_ENABLE_PROFILING_LOAD_PRINT), 1) + tmp := $(shell echo "\#define KOKKOS_ENABLE_PROFILING_LOAD_PRINT 1" >> KokkosCore_config.tmp ) endif ifeq ($(KOKKOS_INTERNAL_USE_HWLOC), 1) @@ -311,8 +371,6 @@ endif ifeq ($(KOKKOS_INTERNAL_USE_LIBRT), 1) tmp := $(shell echo "\#define KOKKOS_USE_LIBRT 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define PREC_TIMER 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOSP_ENABLE_RTLIB 1" >> KokkosCore_config.tmp ) KOKKOS_LIBS += -lrt endif @@ -323,8 +381,8 @@ ifeq ($(KOKKOS_INTERNAL_USE_MEMKIND), 1) tmp := $(shell echo "\#define KOKKOS_HAVE_HBWSPACE 1" >> KokkosCore_config.tmp ) endif -ifeq ($(KOKKOS_INTERNAL_DISABLE_PROFILING), 1) - tmp := $(shell echo "\#define KOKKOS_ENABLE_PROFILING 0" >> KokkosCore_config.tmp ) +ifeq ($(KOKKOS_INTERNAL_DISABLE_PROFILING), 0) + tmp := $(shell echo "\#define KOKKOS_ENABLE_PROFILING" >> KokkosCore_config.tmp ) endif tmp := $(shell echo "/* Optimization Settings */" >> KokkosCore_config.tmp) @@ -336,39 +394,44 @@ endif tmp := $(shell echo "/* Cuda Settings */" >> KokkosCore_config.tmp) ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) + ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LDG), 1) + tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LDG_INTRINSIC 1" >> KokkosCore_config.tmp ) + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) + tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LDG_INTRINSIC 1" >> KokkosCore_config.tmp ) + endif + endif -ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LDG), 1) - tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LDG_INTRINSIC 1" >> KokkosCore_config.tmp ) -endif + ifeq ($(KOKKOS_INTERNAL_CUDA_USE_UVM), 1) + tmp := $(shell echo "\#define KOKKOS_CUDA_USE_UVM 1" >> KokkosCore_config.tmp ) + endif -ifeq ($(KOKKOS_INTERNAL_CUDA_USE_UVM), 1) - tmp := $(shell echo "\#define KOKKOS_CUDA_USE_UVM 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_USE_CUDA_UVM 1" >> KokkosCore_config.tmp ) -endif + ifeq ($(KOKKOS_INTERNAL_CUDA_USE_RELOC), 1) + tmp := $(shell echo "\#define KOKKOS_CUDA_USE_RELOCATABLE_DEVICE_CODE 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += --relocatable-device-code=true + KOKKOS_LDFLAGS += --relocatable-device-code=true + endif -ifeq ($(KOKKOS_INTERNAL_CUDA_USE_RELOC), 1) - tmp := $(shell echo "\#define KOKKOS_CUDA_USE_RELOCATABLE_DEVICE_CODE 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += --relocatable-device-code=true - KOKKOS_LDFLAGS += --relocatable-device-code=true -endif + ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LAMBDA), 1) + ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) + ifeq ($(shell test $(KOKKOS_INTERNAL_COMPILER_NVCC_VERSION) -gt 70; echo $$?),0) + tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LAMBDA 1" >> KokkosCore_config.tmp ) + KOKKOS_CXXFLAGS += -expt-extended-lambda + else + $(warning Warning: Cuda Lambda support was requested but NVCC version is too low. This requires NVCC for Cuda version 7.5 or higher. Disabling Lambda support now.) + endif + endif -ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LAMBDA), 1) - ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) - ifeq ($(shell test $(KOKKOS_INTERNAL_COMPILER_NVCC_VERSION) -gt 70; echo $$?),0) + ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LAMBDA 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += -expt-extended-lambda - else - $(warning Warning: Cuda Lambda support was requested but NVCC version is too low. This requires NVCC for Cuda version 7.5 or higher. Disabling Lambda support now.) endif endif ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) - tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LAMBDA 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_CUDA_CLANG_WORKAROUND" >> KokkosCore_config.tmp ) endif endif -endif - # Add Architecture flags. ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV80), 1) @@ -469,7 +532,7 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_POWER9), 1) endif endif -ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX2), 1) +ifeq ($(KOKKOS_INTERNAL_USE_ARCH_HSW), 1) tmp := $(shell echo "\#define KOKKOS_ARCH_AVX2 1" >> KokkosCore_config.tmp ) ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1) @@ -491,6 +554,28 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX2), 1) endif endif +ifeq ($(KOKKOS_INTERNAL_USE_ARCH_BDW), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_AVX2 1" >> KokkosCore_config.tmp ) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1) + KOKKOS_CXXFLAGS += -xCORE-AVX2 + KOKKOS_LDFLAGS += -xCORE-AVX2 + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) + + else + ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) + KOKKOS_CXXFLAGS += -tp=haswell + KOKKOS_LDFLAGS += -tp=haswell + else + # Assume that this is a really a GNU compiler. + KOKKOS_CXXFLAGS += -march=core-avx2 -mtune=core-avx2 -mrtm + KOKKOS_LDFLAGS += -march=core-avx2 -mtune=core-avx2 -mrtm + endif + endif + endif +endif + ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX512MIC), 1) tmp := $(shell echo "\#define KOKKOS_ARCH_AVX512MIC 1" >> KokkosCore_config.tmp ) @@ -501,12 +586,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX512MIC), 1) ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1) else - ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) + ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1) else # Asssume that this is really a GNU compiler. - KOKKOS_CXXFLAGS += -march=knl - KOKKOS_LDFLAGS += -march=knl + KOKKOS_CXXFLAGS += -march=knl -mtune=knl + KOKKOS_LDFLAGS += -march=knl -mtune=knl endif endif endif @@ -526,8 +611,8 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX512XEON), 1) else # Nothing here yet. - KOKKOS_CXXFLAGS += -march=skylake-avx512 - KOKKOS_LDFLAGS += -march=skylake-avx512 + KOKKOS_CXXFLAGS += -march=skylake-avx512 -mtune=skylake-avx512 -mrtm + KOKKOS_LDFLAGS += -march=skylake-avx512 -mtune=skylake-avx512 -mrtm endif endif endif @@ -541,70 +626,67 @@ endif # Figure out the architecture flag for Cuda. ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) + ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) + KOKKOS_INTERNAL_CUDA_ARCH_FLAG=-arch + endif + ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) + KOKKOS_INTERNAL_CUDA_ARCH_FLAG=--cuda-gpu-arch + KOKKOS_CXXFLAGS += -x cuda + endif -ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) - KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG=-arch -endif -ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) - KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG=--cuda-gpu-arch - KOKKOS_CXXFLAGS += -x cuda -endif - -ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER30), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER30 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_30 - KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_30 -endif -ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER32), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER32 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_32 - KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_32 -endif -ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER35), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER35 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_35 - KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_35 -endif -ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER37), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER37 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_37 - KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_37 -endif -ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL50), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL50 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_50 - KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_50 -endif -ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL52), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL52 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_52 - KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_52 -endif -ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL53 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_53 - KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_53 -endif -ifeq ($(KOKKOS_INTERNAL_USE_ARCH_PASCAL61), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL61 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_61 - KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_61 -endif -ifeq ($(KOKKOS_INTERNAL_USE_ARCH_PASCAL60), 1) - tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL 1" >> KokkosCore_config.tmp ) - tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL60 1" >> KokkosCore_config.tmp ) - KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_60 - KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_COMPILER_CUDA_ARCH_FLAG)=sm_60 -endif + ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER30), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER30 1" >> KokkosCore_config.tmp ) + KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_30 + endif + ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER32), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER32 1" >> KokkosCore_config.tmp ) + KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_32 + endif + ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER35), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER35 1" >> KokkosCore_config.tmp ) + KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_35 + endif + ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER37), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_KEPLER37 1" >> KokkosCore_config.tmp ) + KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_37 + endif + ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL50), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL50 1" >> KokkosCore_config.tmp ) + KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_50 + endif + ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL52), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL52 1" >> KokkosCore_config.tmp ) + KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_52 + endif + ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_MAXWELL53 1" >> KokkosCore_config.tmp ) + KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_53 + endif + ifeq ($(KOKKOS_INTERNAL_USE_ARCH_PASCAL60), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL60 1" >> KokkosCore_config.tmp ) + KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_60 + endif + ifeq ($(KOKKOS_INTERNAL_USE_ARCH_PASCAL61), 1) + tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL 1" >> KokkosCore_config.tmp ) + tmp := $(shell echo "\#define KOKKOS_ARCH_PASCAL61 1" >> KokkosCore_config.tmp ) + KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_61 + endif + ifneq ($(KOKKOS_INTERNAL_USE_ARCH_NVIDIA), 0) + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG) + + ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG) + endif + endif endif KOKKOS_INTERNAL_LS_CONFIG := $(shell ls KokkosCore_config.h) @@ -630,9 +712,24 @@ KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/containers/src/impl/*.cpp) ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.cpp) KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.hpp) - KOKKOS_CXXFLAGS += -I$(CUDA_PATH)/include + KOKKOS_CPPFLAGS += -I$(CUDA_PATH)/include KOKKOS_LDFLAGS += -L$(CUDA_PATH)/lib64 KOKKOS_LIBS += -lcudart -lcuda + + ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) + KOKKOS_CXXFLAGS += --cuda-path=$(CUDA_PATH) + endif +endif + +ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1) + KOKKOS_SRC += $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Exec.cpp $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTargetSpace.cpp + KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/OpenMPTarget/*.hpp) + ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) + KOKKOS_CXXFLAGS += -Xcompiler $(KOKKOS_INTERNAL_OPENMPTARGET_FLAG) + else + KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_OPENMPTARGET_FLAG) + endif + KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_OPENMPTARGET_FLAG) endif ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1) @@ -666,10 +763,27 @@ endif ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) KOKKOS_INTERNAL_GCC_PATH = $(shell which g++) KOKKOS_INTERNAL_GCC_TOOLCHAIN = $(KOKKOS_INTERNAL_GCC_PATH:/bin/g++=) - KOKKOS_CXXFLAGS += --gcc-toolchain=$(KOKKOS_INTERNAL_GCC_TOOLCHAIN) -DKOKKOS_CUDA_CLANG_WORKAROUND -DKOKKOS_CUDA_USE_LDG_INTRINSIC + KOKKOS_CXXFLAGS += --gcc-toolchain=$(KOKKOS_INTERNAL_GCC_TOOLCHAIN) KOKKOS_LDFLAGS += --gcc-toolchain=$(KOKKOS_INTERNAL_GCC_TOOLCHAIN) endif +# Don't include Kokkos_HBWSpace.cpp if not using MEMKIND to avoid a link warning. +ifneq ($(KOKKOS_INTERNAL_USE_MEMKIND), 1) + KOKKOS_SRC := $(filter-out $(KOKKOS_PATH)/core/src/impl/Kokkos_HBWSpace.cpp,$(KOKKOS_SRC)) +endif + +# Don't include Kokkos_Profiling_Interface.cpp if not using profiling to avoid a link warning. +ifeq ($(KOKKOS_INTERNAL_DISABLE_PROFILING), 1) + KOKKOS_SRC := $(filter-out $(KOKKOS_PATH)/core/src/impl/Kokkos_Profiling_Interface.cpp,$(KOKKOS_SRC)) +endif + +# Don't include Kokkos_Serial.cpp or Kokkos_Serial_Task.cpp if not using Serial +# device to avoid a link warning. +ifneq ($(KOKKOS_INTERNAL_USE_SERIAL), 1) + KOKKOS_SRC := $(filter-out $(KOKKOS_PATH)/core/src/impl/Kokkos_Serial.cpp,$(KOKKOS_SRC)) + KOKKOS_SRC := $(filter-out $(KOKKOS_PATH)/core/src/impl/Kokkos_Serial_Task.cpp,$(KOKKOS_SRC)) +endif + # With Cygwin functions such as fdopen and fileno are not defined # when strict ansi is enabled. strict ansi gets enabled with --std=c++11 # though. So we hard undefine it here. Not sure if that has any bad side effects diff --git a/lib/kokkos/Makefile.targets b/lib/kokkos/Makefile.targets index 54cacb741b..3cb52a04cd 100644 --- a/lib/kokkos/Makefile.targets +++ b/lib/kokkos/Makefile.targets @@ -53,11 +53,20 @@ Kokkos_Qthreads_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Qthreads/K endif ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1) -Kokkos_OpenMPexec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMPexec.cpp - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMPexec.cpp +Kokkos_OpenMP_Exec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Exec.cpp + $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Exec.cpp Kokkos_OpenMP_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Task.cpp $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Task.cpp endif +ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1) +Kokkos_OpenMPTarget_Exec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Exec.cpp + $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Exec.cpp +Kokkos_OpenMPTargetSpace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTargetSpace.cpp + $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTargetSpace.cpp +#Kokkos_OpenMPTarget_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Task.cpp +# $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Task.cpp +endif + Kokkos_HBWSpace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_HBWSpace.cpp $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_HBWSpace.cpp diff --git a/lib/kokkos/algorithms/src/KokkosAlgorithms_dummy.cpp b/lib/kokkos/algorithms/src/KokkosAlgorithms_dummy.cpp index e69de29bb2..9c08a088b0 100644 --- a/lib/kokkos/algorithms/src/KokkosAlgorithms_dummy.cpp +++ b/lib/kokkos/algorithms/src/KokkosAlgorithms_dummy.cpp @@ -0,0 +1 @@ +void KOKKOS_ALGORITHMS_SRC_DUMMY_PREVENT_LINK_ERROR() {} diff --git a/lib/kokkos/algorithms/src/Kokkos_Random.hpp b/lib/kokkos/algorithms/src/Kokkos_Random.hpp index bd73582362..42c115b7a5 100644 --- a/lib/kokkos/algorithms/src/Kokkos_Random.hpp +++ b/lib/kokkos/algorithms/src/Kokkos_Random.hpp @@ -674,7 +674,7 @@ namespace Kokkos { const double V = 2.0*drand() - 1.0; S = U*U+V*V; } - return U*sqrt(-2.0*log(S)/S); + return U*std::sqrt(-2.0*log(S)/S); } KOKKOS_INLINE_FUNCTION @@ -917,7 +917,7 @@ namespace Kokkos { const double V = 2.0*drand() - 1.0; S = U*U+V*V; } - return U*sqrt(-2.0*log(S)/S); + return U*std::sqrt(-2.0*log(S)/S); } KOKKOS_INLINE_FUNCTION @@ -1171,7 +1171,7 @@ namespace Kokkos { const double V = 2.0*drand() - 1.0; S = U*U+V*V; } - return U*sqrt(-2.0*log(S)/S); + return U*std::sqrt(-2.0*log(S)/S); } KOKKOS_INLINE_FUNCTION diff --git a/lib/kokkos/algorithms/unit_tests/Makefile b/lib/kokkos/algorithms/unit_tests/Makefile index 3027c6a94b..b74192ef18 100644 --- a/lib/kokkos/algorithms/unit_tests/Makefile +++ b/lib/kokkos/algorithms/unit_tests/Makefile @@ -8,7 +8,7 @@ default: build_all echo "End Build" ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES))) - CXX = $(KOKKOS_PATH)/config/nvcc_wrapper + CXX = $(KOKKOS_PATH)/bin/nvcc_wrapper else CXX = g++ endif @@ -21,8 +21,8 @@ include $(KOKKOS_PATH)/Makefile.kokkos KOKKOS_CXXFLAGS += -I$(GTEST_PATH) -I${KOKKOS_PATH}/algorithms/unit_tests -TEST_TARGETS = -TARGETS = +TEST_TARGETS = +TARGETS = ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) OBJ_CUDA = TestCuda.o UnitTestMain.o gtest-all.o @@ -49,16 +49,16 @@ ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1) endif KokkosAlgorithms_UnitTest_Cuda: $(OBJ_CUDA) $(KOKKOS_LINK_DEPENDS) - $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_CUDA) $(KOKKOS_LIBS) $(LIB) -o KokkosAlgorithms_UnitTest_Cuda + $(LINK) $(EXTRA_PATH) $(OBJ_CUDA) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosAlgorithms_UnitTest_Cuda KokkosAlgorithms_UnitTest_Threads: $(OBJ_THREADS) $(KOKKOS_LINK_DEPENDS) - $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_THREADS) $(KOKKOS_LIBS) $(LIB) -o KokkosAlgorithms_UnitTest_Threads + $(LINK) $(EXTRA_PATH) $(OBJ_THREADS) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosAlgorithms_UnitTest_Threads KokkosAlgorithms_UnitTest_OpenMP: $(OBJ_OPENMP) $(KOKKOS_LINK_DEPENDS) - $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_OPENMP) $(KOKKOS_LIBS) $(LIB) -o KokkosAlgorithms_UnitTest_OpenMP + $(LINK) $(EXTRA_PATH) $(OBJ_OPENMP) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosAlgorithms_UnitTest_OpenMP KokkosAlgorithms_UnitTest_Serial: $(OBJ_SERIAL) $(KOKKOS_LINK_DEPENDS) - $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_SERIAL) $(KOKKOS_LIBS) $(LIB) -o KokkosAlgorithms_UnitTest_Serial + $(LINK) $(EXTRA_PATH) $(OBJ_SERIAL) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosAlgorithms_UnitTest_Serial test-cuda: KokkosAlgorithms_UnitTest_Cuda ./KokkosAlgorithms_UnitTest_Cuda @@ -76,7 +76,7 @@ build_all: $(TARGETS) test: $(TEST_TARGETS) -clean: kokkos-clean +clean: kokkos-clean rm -f *.o $(TARGETS) # Compilation rules @@ -84,6 +84,5 @@ clean: kokkos-clean %.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $< -gtest-all.o:$(GTEST_PATH)/gtest/gtest-all.cc +gtest-all.o:$(GTEST_PATH)/gtest/gtest-all.cc $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $(GTEST_PATH)/gtest/gtest-all.cc - diff --git a/lib/kokkos/algorithms/unit_tests/TestCuda.cpp b/lib/kokkos/algorithms/unit_tests/TestCuda.cpp index ba3938f497..710eeb8ada 100644 --- a/lib/kokkos/algorithms/unit_tests/TestCuda.cpp +++ b/lib/kokkos/algorithms/unit_tests/TestCuda.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,12 +36,15 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ -#include +#include +#ifdef KOKKOS_ENABLE_CUDA + +#include #include #include @@ -49,8 +52,6 @@ #include -#ifdef KOKKOS_ENABLE_CUDA - #include #include @@ -105,6 +106,7 @@ CUDA_SORT_UNSIGNED(171) #undef CUDA_RANDOM_XORSHIFT1024 #undef CUDA_SORT_UNSIGNED } - +#else +void KOKKOS_ALGORITHMS_UNITTESTS_TESTCUDA_PREVENT_LINK_ERROR() {} #endif /* #ifdef KOKKOS_ENABLE_CUDA */ diff --git a/lib/kokkos/algorithms/unit_tests/TestOpenMP.cpp b/lib/kokkos/algorithms/unit_tests/TestOpenMP.cpp index f4d582d0bb..1e7ee68549 100644 --- a/lib/kokkos/algorithms/unit_tests/TestOpenMP.cpp +++ b/lib/kokkos/algorithms/unit_tests/TestOpenMP.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,13 +36,16 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ -#include +#include +#ifdef KOKKOS_ENABLE_OPENMP + +#include #include //---------------------------------------------------------------------------- @@ -52,7 +55,6 @@ namespace Test { -#ifdef KOKKOS_ENABLE_OPENMP class openmp : public ::testing::Test { protected: static void SetUpTestCase() @@ -97,6 +99,8 @@ OPENMP_SORT_UNSIGNED(171) #undef OPENMP_RANDOM_XORSHIFT64 #undef OPENMP_RANDOM_XORSHIFT1024 #undef OPENMP_SORT_UNSIGNED -#endif } // namespace test +#else +void KOKKOS_ALGORITHMS_UNITTESTS_TESTOPENMP_PREVENT_LINK_ERROR() {} +#endif diff --git a/lib/kokkos/algorithms/unit_tests/TestRandom.hpp b/lib/kokkos/algorithms/unit_tests/TestRandom.hpp index c906b9f2cd..9cf02f74b4 100644 --- a/lib/kokkos/algorithms/unit_tests/TestRandom.hpp +++ b/lib/kokkos/algorithms/unit_tests/TestRandom.hpp @@ -295,7 +295,7 @@ struct test_random_scalar { parallel_reduce (num_draws/1024, functor_type (pool, density_1d, density_3d), result); //printf("Result: %lf %lf %lf\n",result.mean/num_draws/3,result.variance/num_draws/3,result.covariance/num_draws/2); - double tolerance = 1.6*sqrt(1.0/num_draws); + double tolerance = 1.6*std::sqrt(1.0/num_draws); double mean_expect = 0.5*Kokkos::rand::max(); double variance_expect = 1.0/3.0*mean_expect*mean_expect; double mean_eps = mean_expect/(result.mean/num_draws/3)-1.0; @@ -321,7 +321,7 @@ struct test_random_scalar { typedef test_histogram1d_functor functor_type; parallel_reduce (HIST_DIM1D, functor_type (density_1d, num_draws), result); - double tolerance = 6*sqrt(1.0/HIST_DIM1D); + double tolerance = 6*std::sqrt(1.0/HIST_DIM1D); double mean_expect = 1.0*num_draws*3/HIST_DIM1D; double variance_expect = 1.0*num_draws*3/HIST_DIM1D*(1.0-1.0/HIST_DIM1D); double covariance_expect = -1.0*num_draws*3/HIST_DIM1D/HIST_DIM1D; @@ -354,7 +354,7 @@ struct test_random_scalar { typedef test_histogram3d_functor functor_type; parallel_reduce (HIST_DIM1D, functor_type (density_3d, num_draws), result); - double tolerance = 6*sqrt(1.0/HIST_DIM1D); + double tolerance = 6*std::sqrt(1.0/HIST_DIM1D); double mean_expect = 1.0*num_draws/HIST_DIM1D; double variance_expect = 1.0*num_draws/HIST_DIM1D*(1.0-1.0/HIST_DIM1D); double covariance_expect = -1.0*num_draws/HIST_DIM1D/HIST_DIM1D; diff --git a/lib/kokkos/algorithms/unit_tests/TestSerial.cpp b/lib/kokkos/algorithms/unit_tests/TestSerial.cpp index 6ac80cf73a..a1df93e07b 100644 --- a/lib/kokkos/algorithms/unit_tests/TestSerial.cpp +++ b/lib/kokkos/algorithms/unit_tests/TestSerial.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,11 +36,14 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ +#include +#ifdef KOKKOS_ENABLE_SERIAL + #include #include @@ -55,7 +58,6 @@ namespace Test { -#ifdef KOKKOS_ENABLE_SERIAL class serial : public ::testing::Test { protected: static void SetUpTestCase() @@ -93,7 +95,9 @@ SERIAL_SORT_UNSIGNED(171) #undef SERIAL_RANDOM_XORSHIFT1024 #undef SERIAL_SORT_UNSIGNED -#endif // KOKKOS_ENABLE_SERIAL } // namespace Test +#else +void KOKKOS_ALGORITHMS_UNITTESTS_TESTSERIAL_PREVENT_LINK_ERROR() {} +#endif // KOKKOS_ENABLE_SERIAL diff --git a/lib/kokkos/algorithms/unit_tests/TestSort.hpp b/lib/kokkos/algorithms/unit_tests/TestSort.hpp index 61ffa6f43a..04be98f1cc 100644 --- a/lib/kokkos/algorithms/unit_tests/TestSort.hpp +++ b/lib/kokkos/algorithms/unit_tests/TestSort.hpp @@ -1,12 +1,12 @@ //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -35,12 +35,12 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER -#ifndef TESTSORT_HPP_ -#define TESTSORT_HPP_ +#ifndef KOKKOS_ALGORITHMS_UNITTESTS_TESTSORT_HPP +#define KOKKOS_ALGORITHMS_UNITTESTS_TESTSORT_HPP #include #include @@ -212,7 +212,12 @@ void test_dynamic_view_sort(unsigned int n ) const size_t upper_bound = 2 * n ; typename KeyDynamicViewType::memory_pool - pool( memory_space() , 2 * n * sizeof(KeyType) ); + pool( memory_space() + , n * sizeof(KeyType) * 1.2 + , 500 /* min block size in bytes */ + , 30000 /* max block size in bytes */ + , 1000000 /* min superblock size in bytes */ + ); KeyDynamicViewType keys("Keys",pool,upper_bound); @@ -272,4 +277,4 @@ void test_sort(unsigned int N) } } -#endif /* TESTSORT_HPP_ */ +#endif /* KOKKOS_ALGORITHMS_UNITTESTS_TESTSORT_HPP */ diff --git a/lib/kokkos/algorithms/unit_tests/TestThreads.cpp b/lib/kokkos/algorithms/unit_tests/TestThreads.cpp index 36d438b643..08749779ff 100644 --- a/lib/kokkos/algorithms/unit_tests/TestThreads.cpp +++ b/lib/kokkos/algorithms/unit_tests/TestThreads.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,11 +36,14 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ +#include +#ifdef KOKKOS_ENABLE_THREADS + #include #include @@ -55,7 +58,6 @@ namespace Test { -#ifdef KOKKOS_ENABLE_PTHREAD class threads : public ::testing::Test { protected: static void SetUpTestCase() @@ -107,7 +109,9 @@ THREADS_SORT_UNSIGNED(171) #undef THREADS_RANDOM_XORSHIFT1024 #undef THREADS_SORT_UNSIGNED -#endif } // namespace Test +#else +void KOKKOS_ALGORITHMS_UNITTESTS_TESTTHREADS_PREVENT_LINK_ERROR() {} +#endif diff --git a/lib/kokkos/benchmarks/bytes_and_flops/Makefile b/lib/kokkos/benchmarks/bytes_and_flops/Makefile index 6a1917a523..5ddf78f28e 100644 --- a/lib/kokkos/benchmarks/bytes_and_flops/Makefile +++ b/lib/kokkos/benchmarks/bytes_and_flops/Makefile @@ -7,7 +7,7 @@ default: build echo "Start Build" ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES))) -CXX = ${KOKKOS_PATH}/config/nvcc_wrapper +CXX = ${KOKKOS_PATH}/bin/nvcc_wrapper EXE = bytes_and_flops.cuda KOKKOS_DEVICES = "Cuda,OpenMP" KOKKOS_ARCH = "SNB,Kepler35" @@ -22,7 +22,7 @@ CXXFLAGS = -O3 -g DEPFLAGS = -M LINK = ${CXX} -LINKFLAGS = +LINKFLAGS = OBJ = $(SRC:.cpp=.o) LIB = @@ -34,7 +34,7 @@ build: $(EXE) $(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS) $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE) -clean: kokkos-clean +clean: kokkos-clean rm -f *.o *.cuda *.host # Compilation rules diff --git a/lib/kokkos/benchmarks/gather/Makefile b/lib/kokkos/benchmarks/gather/Makefile index fd1feab6fa..0ea9fb1dd2 100644 --- a/lib/kokkos/benchmarks/gather/Makefile +++ b/lib/kokkos/benchmarks/gather/Makefile @@ -7,7 +7,7 @@ default: build echo "Start Build" ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES))) -CXX = ${KOKKOS_PATH}/config/nvcc_wrapper +CXX = ${KOKKOS_PATH}/bin/nvcc_wrapper EXE = gather.cuda KOKKOS_DEVICES = "Cuda,OpenMP" KOKKOS_ARCH = "SNB,Kepler35" @@ -22,7 +22,7 @@ CXXFLAGS = -O3 -g DEPFLAGS = -M LINK = ${CXX} -LINKFLAGS = +LINKFLAGS = OBJ = $(SRC:.cpp=.o) LIB = @@ -35,10 +35,10 @@ build: $(EXE) $(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS) $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE) -clean: kokkos-clean +clean: kokkos-clean rm -f *.o *.cuda *.host # Compilation rules -%.o:%.cpp $(KOKKOS_CPP_DEPENDS) gather_unroll.hpp gather.hpp +%.o:%.cpp $(KOKKOS_CPP_DEPENDS) gather_unroll.hpp gather.hpp $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $< diff --git a/lib/kokkos/cmake/KokkosConfig.cmake.in b/lib/kokkos/cmake/KokkosConfig.cmake.in new file mode 100644 index 0000000000..fc099a494c --- /dev/null +++ b/lib/kokkos/cmake/KokkosConfig.cmake.in @@ -0,0 +1,18 @@ +# - Config file for the Kokkos package +# It defines the following variables +# Kokkos_INCLUDE_DIRS - include directories for Kokkos +# Kokkos_LIBRARIES - libraries to link against + +# Compute paths +GET_FILENAME_COMPONENT(Kokkos_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +SET(Kokkos_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") + +# Our library dependencies (contains definitions for IMPORTED targets) +IF(NOT TARGET kokkos AND NOT Kokkos_BINARY_DIR) + INCLUDE("${Kokkos_CMAKE_DIR}/KokkosTargets.cmake") +ENDIF() + +# These are IMPORTED targets created by KokkosTargets.cmake +SET(Kokkos_LIBRARY_DIRS @INSTALL_LIB_DIR@) +SET(Kokkos_LIBRARIES @Kokkos_LIBRARIES_NAMES@) +SET(Kokkos_TPL_LIBRARIES @KOKKOS_LIBS@) diff --git a/lib/kokkos/cmake/Modules/FindHWLOC.cmake b/lib/kokkos/cmake/Modules/FindHWLOC.cmake new file mode 100644 index 0000000000..273dcb5c8a --- /dev/null +++ b/lib/kokkos/cmake/Modules/FindHWLOC.cmake @@ -0,0 +1,20 @@ +#.rst: +# FindHWLOC +# ---------- +# +# Try to find HWLOC. +# +# The following variables are defined: +# +# HWLOC_FOUND - System has HWLOC +# HWLOC_INCLUDE_DIR - HWLOC include directory +# HWLOC_LIBRARIES - Libraries needed to use HWLOC + +find_path(HWLOC_INCLUDE_DIR hwloc.h) +find_library(HWLOC_LIBRARIES hwloc) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(HWLOC DEFAULT_MSG + HWLOC_INCLUDE_DIR HWLOC_LIBRARIES) + +mark_as_advanced(HWLOC_INCLUDE_DIR HWLOC_LIBRARIES) diff --git a/lib/kokkos/cmake/Modules/FindMemkind.cmake b/lib/kokkos/cmake/Modules/FindMemkind.cmake new file mode 100644 index 0000000000..245fb44c19 --- /dev/null +++ b/lib/kokkos/cmake/Modules/FindMemkind.cmake @@ -0,0 +1,20 @@ +#.rst: +# FindMemkind +# ---------- +# +# Try to find Memkind. +# +# The following variables are defined: +# +# MEMKIND_FOUND - System has Memkind +# MEMKIND_INCLUDE_DIR - Memkind include directory +# MEMKIND_LIBRARIES - Libraries needed to use Memkind + +find_path(MEMKIND_INCLUDE_DIR memkind.h) +find_library(MEMKIND_LIBRARIES memkind) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Memkind DEFAULT_MSG + MEMKIND_INCLUDE_DIR MEMKIND_LIBRARIES) + +mark_as_advanced(MEMKIND_INCLUDE_DIR MEMKIND_LIBRARIES) diff --git a/lib/kokkos/cmake/Modules/FindQthreads.cmake b/lib/kokkos/cmake/Modules/FindQthreads.cmake new file mode 100644 index 0000000000..a254b0e996 --- /dev/null +++ b/lib/kokkos/cmake/Modules/FindQthreads.cmake @@ -0,0 +1,20 @@ +#.rst: +# FindQthreads +# ---------- +# +# Try to find Qthreads. +# +# The following variables are defined: +# +# QTHREADS_FOUND - System has Qthreads +# QTHREADS_INCLUDE_DIR - Qthreads include directory +# QTHREADS_LIBRARIES - Libraries needed to use Qthreads + +find_path(QTHREADS_INCLUDE_DIR qthread.h) +find_library(QTHREADS_LIBRARIES qthread) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Qthreads DEFAULT_MSG + QTHREADS_INCLUDE_DIR QTHREADS_LIBRARIES) + +mark_as_advanced(QTHREADS_INCLUDE_DIR QTHREADS_LIBRARIES) diff --git a/lib/kokkos/cmake/kokkos.cmake b/lib/kokkos/cmake/kokkos.cmake new file mode 100644 index 0000000000..235b7eaba4 --- /dev/null +++ b/lib/kokkos/cmake/kokkos.cmake @@ -0,0 +1,1198 @@ + + +# Set which Kokkos backend to use. +set(KOKKOS_ENABLE_CUDA OFF CACHE BOOL "Use Kokkos CUDA backend") +set(KOKKOS_ENABLE_OPENMP ON CACHE BOOL "Use Kokkos OpenMP backend") +set(KOKKOS_ENABLE_PTHREAD OFF CACHE BOOL "Use Kokkos Pthreads backend") +set(KOKKOS_ENABLE_QTHREADS OFF CACHE BOOL "Use Kokkos Qthreads backend") +set(KOKKOS_ENABLE_SERIAL ON CACHE BOOL "Use Kokkos Serial backend") + +# List of possible host architectures. +list(APPEND KOKKOS_HOST_ARCH_LIST + None # No architecture optimization + AMDAVX # AMD chip + ARMv80 # ARMv8.0 Compatible CPU + ARMv81 # ARMv8.1 Compatible CPU + ARMv8-ThunderX # ARMv8 Cavium ThunderX CPU + SNB # Intel Sandy/Ivy Bridge CPUs + HSW # Intel Haswell CPUs + BDW # Intel Broadwell Xeon E-class CPUs + SKX # Intel Sky Lake Xeon E-class HPC CPUs (AVX512) + KNC # Intel Knights Corner Xeon Phi + KNL # Intel Knights Landing Xeon Phi + BGQ # IBM Blue Gene Q + Power7 # IBM POWER7 CPUs + Power8 # IBM POWER8 CPUs + Power9 # IBM POWER9 CPUs + ) + +# Setting this variable to a value other than "None" can improve host +# performance by turning on architecture specific code. +set(KOKKOS_HOST_ARCH "None" CACHE STRING "Optimize for specific host architecture.") +set_property(CACHE KOKKOS_HOST_ARCH PROPERTY STRINGS ${KOKKOS_HOST_ARCH_LIST}) + +# List of possible GPU architectures. +list(APPEND KOKKOS_GPU_ARCH_LIST + None # No architecture optimization + Kepler # NVIDIA Kepler default (generation CC 3.5) + Kepler30 # NVIDIA Kepler generation CC 3.0 + Kepler32 # NVIDIA Kepler generation CC 3.2 + Kepler35 # NVIDIA Kepler generation CC 3.5 + Kepler37 # NVIDIA Kepler generation CC 3.7 + Maxwell # NVIDIA Maxwell default (generation CC 5.0) + Maxwell50 # NVIDIA Maxwell generation CC 5.0 + Maxwell52 # NVIDIA Maxwell generation CC 5.2 + Maxwell53 # NVIDIA Maxwell generation CC 5.3 + Pascal60 # NVIDIA Pascal generation CC 6.0 + Pascal61 # NVIDIA Pascal generation CC 6.1 + ) + +# Setting this variable to a value other than "None" can improve GPU +# performance by turning on architecture specific code. +set(KOKKOS_GPU_ARCH "None" CACHE STRING "Optimize for specific GPU architecture.") +set_property(CACHE KOKKOS_GPU_ARCH PROPERTY STRINGS ${KOKKOS_GPU_ARCH_LIST}) + +set(KOKKOS_SEPARATE_LIBS OFF CACHE BOOL "OFF = kokkos. ON = kokkoscore, kokkoscontainers, and kokkosalgorithms.") + +# Enable hwloc library. +set(KOKKOS_ENABLE_HWLOC OFF CACHE BOOL "Enable hwloc for better process placement.") +set(KOKKOS_HWLOC_DIR "" CACHE PATH "Location of hwloc library.") + +# Enable memkind library. +set(KOKKOS_ENABLE_MEMKIND OFF CACHE BOOL "Enable memkind.") +set(KOKKOS_MEMKIND_DIR "" CACHE PATH "Location of memkind library.") + +set(KOKKOS_ENABLE_LIBRT OFF CACHE BOOL "Enable librt for more precise timer.") + +# Enable debugging. +set(KOKKOS_DEBUG OFF CACHE BOOL "Enable debugging in Kokkos.") + +# Enable profiling. +set(KOKKOS_ENABLE_PROFILING ON CACHE BOOL "Enable profiling.") + +# Enable aggressive vectorization. +set(KOKKOS_ENABLE_AGGRESSIVE_VECTORIZATION OFF CACHE BOOL "Enable aggressive vectorization.") + +# Qthreads options. +set(KOKKOS_QTHREADS_DIR "" CACHE PATH "Location of Qthreads library.") + +# CUDA options. +set(KOKKOS_CUDA_DIR "" CACHE PATH "Location of CUDA library. Defaults to where nvcc installed.") +set(KOKKOS_ENABLE_CUDA_LDG_INTRINSIC OFF CACHE BOOL "Enable CUDA LDG.") +set(KOKKOS_ENABLE_CUDA_UVM OFF CACHE BOOL "Enable CUDA unified virtual memory.") +set(KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE OFF CACHE BOOL "Enable relocatable device code for CUDA.") +set(KOKKOS_ENABLE_CUDA_LAMBDA ON CACHE BOOL "Enable lambdas for CUDA.") + +################################### FUNCTIONS ################################## + +# Sets the following compiler variables that are analogous to the CMAKE_* +# versions. We add the ability to detect NVCC (really nvcc_wrapper). +# KOKKOS_CXX_COMPILER +# KOKKOS_CXX_COMPILER_ID +# KOKKOS_CXX_COMPILER_VERSION +# +# Also verifies the compiler version meets the minimum required by Kokkos. +function(set_kokkos_cxx_compiler) + # Since CMake doesn't recognize the nvcc compiler until 3.8, we use our own + # version of the CMake variables and detect nvcc ourselves. Initially set to + # the CMake variable values. + set(INTERNAL_CXX_COMPILER ${CMAKE_CXX_COMPILER}) + set(INTERNAL_CXX_COMPILER_ID ${CMAKE_CXX_COMPILER_ID}) + set(INTERNAL_CXX_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION}) + + # Check if the compiler is nvcc (which really means nvcc_wrapper). + execute_process(COMMAND ${INTERNAL_CXX_COMPILER} --version + COMMAND grep nvcc + COMMAND wc -l + OUTPUT_VARIABLE INTERNAL_HAVE_COMPILER_NVCC + OUTPUT_STRIP_TRAILING_WHITESPACE) + + string(REGEX REPLACE "^ +" "" + INTERNAL_HAVE_COMPILER_NVCC ${INTERNAL_HAVE_COMPILER_NVCC}) + + if(INTERNAL_HAVE_COMPILER_NVCC) + # Set the compiler id to nvcc. We use the value used by CMake 3.8. + set(INTERNAL_CXX_COMPILER_ID NVIDIA) + + # Set nvcc's compiler version. + execute_process(COMMAND ${INTERNAL_CXX_COMPILER} --version + COMMAND grep release + OUTPUT_VARIABLE INTERNAL_CXX_COMPILER_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) + + string(REGEX MATCH "[0-9]+\.[0-9]+\.[0-9]+$" + INTERNAL_CXX_COMPILER_VERSION ${INTERNAL_CXX_COMPILER_VERSION}) + endif() + + # Enforce the minimum compilers supported by Kokkos. + set(KOKKOS_MESSAGE_TEXT "Compiler not supported by Kokkos. Required compiler versions:") + set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n Clang 3.5.2 or higher") + set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n GCC 4.7.2 or higher") + set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n Intel 14.0.4 or higher") + set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n NVCC 7.0.28 or higher") + set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n PGI 17.1 or higher\n") + + if(INTERNAL_CXX_COMPILER_ID STREQUAL Clang) + if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 3.5.2) + message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") + endif() + elseif(INTERNAL_CXX_COMPILER_ID STREQUAL GNU) + if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 4.7.2) + message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") + endif() + elseif(INTERNAL_CXX_COMPILER_ID STREQUAL Intel) + if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 14.0.4) + message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") + endif() + elseif(INTERNAL_CXX_COMPILER_ID STREQUAL NVIDIA) + if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 7.0.28) + message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") + endif() + elseif(INTERNAL_CXX_COMPILER_ID STREQUAL PGI) + if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 17.1) + message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") + endif() + endif() + + # Enforce that extensions are turned off for nvcc_wrapper. + if(INTERNAL_CXX_COMPILER_ID STREQUAL NVIDIA) + if(NOT DEFINED CMAKE_CXX_EXTENSIONS OR CMAKE_CXX_EXTENSIONS STREQUAL ON) + message(FATAL_ERROR "NVCC doesn't support C++ extensions. Set CMAKE_CXX_EXTENSIONS to OFF in your CMakeLists.txt.") + endif() + endif() + + if(KOKKOS_ENABLE_CUDA) + # Enforce that the compiler can compile CUDA code. + if(INTERNAL_CXX_COMPILER_ID STREQUAL Clang) + if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 4.0.0) + message(FATAL_ERROR "Compiling CUDA code directly with Clang requires version 4.0.0 or higher.") + endif() + elseif(NOT INTERNAL_CXX_COMPILER_ID STREQUAL NVIDIA) + message(FATAL_ERROR "Invalid compiler for CUDA. The compiler must be nvcc_wrapper or Clang.") + endif() + endif() + + set(KOKKOS_CXX_COMPILER ${INTERNAL_CXX_COMPILER} PARENT_SCOPE) + set(KOKKOS_CXX_COMPILER_ID ${INTERNAL_CXX_COMPILER_ID} PARENT_SCOPE) + set(KOKKOS_CXX_COMPILER_VERSION ${INTERNAL_CXX_COMPILER_VERSION} PARENT_SCOPE) +endfunction() + +# Transitively enforces that the appropriate CXX standard compile flags (C++11 +# or above) are added to targets that use the Kokkos library. Compile features +# are used if possible. Otherwise, the appropriate flags are added to +# KOKKOS_CXX_FLAGS. Values set by the user to CMAKE_CXX_STANDARD and +# CMAKE_CXX_EXTENSIONS are honored. +function(set_kokkos_compiler_standard) + # The following table lists the versions of CMake that supports CXX_STANDARD + # and the CXX compile features for different compilers. The versions are + # based on CMake documentation, looking at CMake code, and verifying by + # testing with specific CMake versions. + # + # COMPILER CXX_STANDARD Compile Features + # --------------------------------------------------------------- + # Clang 3.1 3.1 + # GNU 3.1 3.2 + # AppleClang 3.2 3.2 + # Intel 3.6 3.6 + # Cray No No + # PGI No No + # XL No No + # + # For compiling CUDA code using nvcc_wrapper, we will use the host compiler's + # flags for turning on C++11. Since for compiler ID and versioning purposes + # CMake recognizes the host compiler when calling nvcc_wrapper, this just + # works. Both NVCC and nvcc_wrapper only recognize '-std=c++11' which means + # that we can only use host compilers for CUDA builds that use those flags. + # It also means that extensions (gnu++11) can't be turned on for CUDA builds. + + # Check if we can use compile features. + if(NOT KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + if(CMAKE_CXX_COMPILER_ID STREQUAL Clang) + if(NOT CMAKE_VERSION VERSION_LESS 3.1) + set(INTERNAL_USE_COMPILE_FEATURES ON) + endif() + elseif(CMAKE_CXX_COMPILER_ID STREQUAL AppleClang OR CMAKE_CXX_COMPILER_ID STREQUAL GNU) + if(NOT CMAKE_VERSION VERSION_LESS 3.2) + set(INTERNAL_USE_COMPILE_FEATURES ON) + endif() + elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel) + if(NOT CMAKE_VERSION VERSION_LESS 3.6) + set(INTERNAL_USE_COMPILE_FEATURES ON) + endif() + endif() + endif() + + if(INTERNAL_USE_COMPILE_FEATURES) + # Use the compile features aspect of CMake to transitively cause C++ flags + # to populate to user code. + + # I'm using a hack by requiring features that I know force the lowest version + # of the compilers we want to support. Clang 3.3 and later support all of + # the C++11 standard. With CMake 3.8 and higher, we could switch to using + # cxx_std_11. + set(KOKKOS_CXX11_FEATURES + cxx_nonstatic_member_init # Forces GCC 4.7 or later and Intel 14.0 or later. + PARENT_SCOPE + ) + else() + # CXX compile features are not yet implemented for this combination of + # compiler and version of CMake. + + if(CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) + # Versions of CMAKE before 3.2 don't support CXX_STANDARD or C++ compile + # features for the AppleClang compiler. Set compiler flags transitively + # here such that they trickle down to a call to target_compile_options(). + + # The following two blocks of code were copied from + # /Modules/Compiler/AppleClang-CXX.cmake from CMake 3.7.2 and then + # modified. + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) + set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") + set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") + endif() + + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1) + set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "-std=c++14") + set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14") + elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) + # AppleClang 5.0 knows this flag, but does not set a __cplusplus macro + # greater than 201103L. + set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y") + set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") + endif() + elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel) + # Versions of CMAKE before 3.6 don't support CXX_STANDARD or C++ compile + # features for the Intel compiler. Set compiler flags transitively here + # such that they trickle down to a call to target_compile_options(). + + # The following three blocks of code were copied from + # /Modules/Compiler/Intel-CXX.cmake from CMake 3.7.2 and then modified. + if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + set(_std -Qstd) + set(_ext c++) + else() + set(_std -std) + set(_ext gnu++) + endif() + + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2) + set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "${_std}=c++14") + # TODO: There is no gnu++14 value supported; figure out what to do. + set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "${_std}=c++14") + elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.0) + set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "${_std}=c++1y") + # TODO: There is no gnu++14 value supported; figure out what to do. + set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "${_std}=c++1y") + endif() + + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0) + set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "${_std}=c++11") + set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}11") + elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) + set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "${_std}=c++0x") + set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}0x") + endif() + elseif(CMAKE_CXX_COMPILER_ID STREQUAL Cray) + # CMAKE doesn't support CXX_STANDARD or C++ compile features for the Cray + # compiler. Set compiler options transitively here such that they trickle + # down to a call to target_compile_options(). + set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "-hstd=c++11") + set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "-hstd=c++11") + set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "-hstd=c++11") + set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "-hstd=c++11") + elseif(CMAKE_CXX_COMPILER_ID STREQUAL PGI) + # CMAKE doesn't support CXX_STANDARD or C++ compile features for the PGI + # compiler. Set compiler options transitively here such that they trickle + # down to a call to target_compile_options(). + set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "--c++11") + set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "--c++11") + set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "--c++11") + set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "--c++11") + elseif(CMAKE_CXX_COMPILER_ID STREQUAL XL) + # CMAKE doesn't support CXX_STANDARD or C++ compile features for the XL + # compiler. Set compiler options transitively here such that they trickle + # down to a call to target_compile_options(). + set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") + set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "-std=c++11") + set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "-std=c++11") + set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "-std=c++11") + else() + # Assume GNU. CMAKE_CXX_STANDARD is handled correctly by CMake 3.1 and + # above for this compiler. If the user explicitly requests a C++ + # standard, CMake takes care of it. If not, transitively require C++11. + if(NOT CMAKE_CXX_STANDARD) + set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION ${CMAKE_CXX11_STANDARD_COMPILE_OPTION}) + set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION ${CMAKE_CXX11_EXTENSION_COMPILE_OPTION}) + endif() + endif() + + # Set the C++ standard info for Kokkos respecting user set values for + # CMAKE_CXX_STANDARD and CMAKE_CXX_EXTENSIONS. + if(CMAKE_CXX_STANDARD EQUAL 14) + if(DEFINED CMAKE_CXX_EXTENSIONS AND CMAKE_CXX_EXTENSIONS STREQUAL OFF) + set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX14_STANDARD_COMPILE_OPTION}) + else() + set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX14_EXTENSION_COMPILE_OPTION}) + endif() + elseif(CMAKE_CXX_STANDARD EQUAL 11) + if(DEFINED CMAKE_CXX_EXTENSIONS AND CMAKE_CXX_EXTENSIONS STREQUAL OFF) + set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX11_STANDARD_COMPILE_OPTION}) + else() + set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX11_EXTENSION_COMPILE_OPTION}) + endif() + else() + # The user didn't explicitly request a standard, transitively require + # C++11 respecting CMAKE_CXX_EXTENSIONS. + if(DEFINED CMAKE_CXX_EXTENSIONS AND CMAKE_CXX_EXTENSIONS STREQUAL OFF) + set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX11_STANDARD_COMPILE_OPTION}) + else() + set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX11_EXTENSION_COMPILE_OPTION}) + endif() + endif() + + set(KOKKOS_CXX_FLAGS ${INTERNAL_CXX_FLAGS} PARENT_SCOPE) + endif() +endfunction() + +########################## COMPILER AND FEATURE CHECKS ######################### + +# TODO: We are assuming that nvcc_wrapper is using g++ as the host compiler. +# Should we allow the user the option to change this? The host compiler +# for nvcc_wrapper can be set via the NVCC_WRAPPER_DEFAULT_COMPILER +# environment variable or by passing a different host compiler with the +# -ccbin flag. + +# TODO: Fully add CUDA support for Clang. +set_kokkos_cxx_compiler() + +set_kokkos_compiler_standard() + +######################### INITIALIZE INTERNAL VARIABLES ######################## + +# Add Kokkos' modules to CMake's module path. +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${Kokkos_SOURCE_DIR}/cmake/Modules/") + +# Start with all global variables set to false. This guarantees correct +# results with changes and multiple configures. +set(KOKKOS_HAVE_CUDA OFF CACHE INTERNAL "") +set(KOKKOS_USE_CUDA_UVM OFF CACHE INTERNAL "") +set(KOKKOS_HAVE_CUDA_RDC OFF CACHE INTERNAL "") +set(KOKKOS_HAVE_CUDA_LAMBDA OFF CACHE INTERNAL "") +set(KOKKOS_CUDA_CLANG_WORKAROUND OFF CACHE INTERNAL "") +set(KOKKOS_HAVE_OPENMP OFF CACHE INTERNAL "") +set(KOKKOS_HAVE_PTHREAD OFF CACHE INTERNAL "") +set(KOKKOS_HAVE_QTHREADS OFF CACHE INTERNAL "") +set(KOKKOS_HAVE_SERIAL OFF CACHE INTERNAL "") +set(KOKKOS_HAVE_HWLOC OFF CACHE INTERNAL "") +set(KOKKOS_ENABLE_HBWSPACE OFF CACHE INTERNAL "") +set(KOKKOS_HAVE_DEBUG OFF CACHE INTERNAL "") +set(KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK OFF CACHE INTERNAL "") +set(KOKKOS_ENABLE_ISA_X86_64 OFF CACHE INTERNAL "") +set(KOKKOS_ENABLE_ISA_KNC OFF CACHE INTERNAL "") +set(KOKKOS_ENABLE_ISA_POWERPCLE OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_ARMV80 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_ARMV81 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_ARMV8_THUNDERX OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_AVX OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_AVX2 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_AVX512MIC OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_AVX512XEON OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_KNC OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_POWER8 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_POWER9 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_KEPLER OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_KEPLER30 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_KEPLER32 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_KEPLER35 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_KEPLER37 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_MAXWELL OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_MAXWELL50 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_MAXWELL52 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_MAXWELL53 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_PASCAL OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_PASCAL60 OFF CACHE INTERNAL "") +set(KOKKOS_ARCH_PASCAL61 OFF CACHE INTERNAL "") + +############################## SET BACKEND OPTIONS ############################# + +# Make sure at least one backend is selected. +if(NOT KOKKOS_ENABLE_CUDA AND NOT KOKKOS_ENABLE_OPENMP AND NOT KOKKOS_ENABLE_PTHREAD AND NOT KOKKOS_ENABLE_QTHREADS AND NOT KOKKOS_ENABLE_SERIAL) + message(FATAL_ERROR "Must set one of KOKKOS_ENABLE_CUDA, KOKKOS_ENABLE_OPENMP, KOKKOS_ENABLE_PTHREAD, KOKKOS_ENABLE_QTHREADS, or KOKKOS_ENABLE_SERIAL") +endif() + +# Only one of OpenMP, Pthreads, and Qthreads can be set. +set(KOKKOS_MESSAGE_TEXT "Only one of KOKKOS_ENABLE_OPENMP, KOKKOS_ENABLE_PTHREAD, and KOKKOS_ENABLE_QTHREADS can be selected") +if(KOKKOS_ENABLE_OPENMP AND KOKKOS_ENABLE_PTHREAD) + message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") +elseif(KOKKOS_ENABLE_OPENMP AND KOKKOS_ENABLE_QTHREADS) + message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") +elseif(KOKKOS_ENABLE_PTHREAD AND KOKKOS_ENABLE_QTHREADS) + message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") +endif() + +# Get source files. +file(GLOB KOKKOS_CORE_SRCS core/src/impl/*.cpp) +file(GLOB KOKKOS_CONTAINERS_SRCS containers/src/impl/*.cpp) + +# Set options if using CUDA backend. +if(KOKKOS_ENABLE_CUDA) + if(KOKKOS_CUDA_DIR) + set(CUDA_TOOLKIT_ROOT_DIR ${KOKKOS_CUDA_DIR}) + endif() + + find_package(CUDA) + + if(NOT CUDA_FOUND) + if(KOKKOS_CUDA_DIR) + message(FATAL_ERROR "Couldn't find CUDA in default locations, and KOKKOS_CUDA_DIR points to an invalid installation.") + else() + message(FATAL_ERROR "Couldn't find CUDA in default locations. Set KOKKOS_CUDA_DIR.") + endif() + endif() + + list(APPEND KOKKOS_INCLUDE_DIRS ${CUDA_INCLUDE_DIRS}) + list(APPEND KOKKOS_LD_FLAGS -L${CUDA_TOOLKIT_ROOT_DIR}/lib64) + list(APPEND KOKKOS_LIBS cudart cuda) + + set(KOKKOS_HAVE_CUDA ON CACHE INTERNAL "") + file(GLOB KOKKOS_CUDA_SRCS core/src/Cuda/*.cpp) + list(APPEND KOKKOS_CORE_SRCS ${KOKKOS_CUDA_SRCS}) + + # Set CUDA UVM if requested. + if(KOKKOS_ENABLE_CUDA_UVM) + set(KOKKOS_USE_CUDA_UVM ON CACHE INTERNAL "") + endif() + + # Set CUDA relocatable device code if requested. + if(KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE) + set(KOKKOS_HAVE_CUDA_RDC ON CACHE INTERNAL "") + list(APPEND KOKKOS_CXX_FLAGS --relocatable-device-code=true) + list(APPEND KOKKOS_LD_FLAGS --relocatable-device-code=true) + endif() + + # Set CUDA lambda if requested. + if(KOKKOS_ENABLE_CUDA_LAMBDA) + set(KOKKOS_HAVE_CUDA_LAMBDA ON CACHE INTERNAL "") + + if(KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + if(KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 7.5) + message(FATAL_ERROR "CUDA lambda support requires CUDA 7.5 or higher. Disable it or use a 7.5 or later compiler.") + else() + list(APPEND KOKKOS_CXX_FLAGS -expt-extended-lambda) + endif() + endif() + endif() + + # Set Clang specific options. + if(KOKKOS_CXX_COMPILER_ID STREQUAL Clang) + list(APPEND KOKKOS_CXX_FLAGS --cuda-path=${CUDA_TOOLKIT_ROOT_DIR}) + + set(KOKKOS_CUDA_CLANG_WORKAROUND ON CACHE INTERNAL "") + + # Force CUDA_LDG_INTRINSIC on when using Clang. + set(KOKKOS_ENABLE_CUDA_LDG_INTRINSIC ON CACHE BOOL "Enable CUDA LDG." FORCE) + endif() +endif() + +# Set options if using OpenMP backend. +if(KOKKOS_ENABLE_OPENMP) + find_package(OpenMP REQUIRED) + + if(OPENMP_FOUND) + if(KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + list(APPEND KOKKOS_CXX_FLAGS -Xcompiler) + endif() + + list(APPEND KOKKOS_CXX_FLAGS ${OpenMP_CXX_FLAGS}) + list(APPEND KOKKOS_LD_FLAGS ${OpenMP_CXX_FLAGS}) + endif() + + set(KOKKOS_HAVE_OPENMP ON CACHE INTERNAL "") + file(GLOB KOKKOS_OPENMP_SRCS core/src/OpenMP/*.cpp) + list(APPEND KOKKOS_CORE_SRCS ${KOKKOS_OPENMP_SRCS}) +endif() + +# Set options if using Pthreads backend. +if(KOKKOS_ENABLE_PTHREAD) + find_package(Threads REQUIRED) + + list(APPEND KOKKOS_LIBS Threads::Threads) + + set(KOKKOS_HAVE_PTHREAD ON CACHE INTERNAL "") + file(GLOB KOKKOS_PTHREAD_SRCS core/src/Threads/*.cpp) + list(APPEND KOKKOS_CORE_SRCS ${KOKKOS_PTHREAD_SRCS}) +endif() + +# Set options if using Qthreads backend. +if(KOKKOS_ENABLE_QTHREADS) + if(KOKKOS_QTHREADS_DIR) + list(APPEND CMAKE_PREFIX_PATH ${KOKKOS_QTHREADS_DIR}) + endif() + + find_package(Qthreads) + + if(NOT QTHREADS_FOUND) + if(KOKKOS_QTHREADS_DIR) + message(FATAL_ERROR "Couldn't find Qthreads in default locations, and KOKKOS_QTHREADS_DIR points to an invalid installation.") + else() + message(FATAL_ERROR "Couldn't find Qthreads in default locations. Set KOKKOS_QTHREADS_DIR.") + endif() + endif() + + list(APPEND KOKKOS_INCLUDE_DIRS ${QTHREADS_INCLUDE_DIR}) + list(APPEND KOKKOS_LIBS ${QTHREADS_LIBRARIES}) + + set(KOKKOS_HAVE_QTHREADS ON CACHE INTERNAL "") + file(GLOB KOKKOS_QTHREADS_SRCS core/src/Threads/*.cpp) + list(APPEND KOKKOS_CORE_SRCS ${KOKKOS_QTHREADS_SRCS}) + + if(KOKKOS_QTHREADS_DIR) + list(REMOVE_AT CMAKE_PREFIX_PATH -1) + endif() +endif() + +# Set options if using Serial backend. +if(KOKKOS_ENABLE_SERIAL) + set(KOKKOS_HAVE_SERIAL ON CACHE INTERNAL "") +else() + # Remove serial source files. + list(REMOVE_ITEM KOKKOS_CORE_SRCS + "${Kokkos_SOURCE_DIR}/core/src/impl/Kokkos_Serial.cpp" + "${Kokkos_SOURCE_DIR}/core/src/impl/Kokkos_Serial_Task.cpp") +endif() + +########################### SET ARCHITECTURE OPTIONS ########################### + +# Make sure the host architecture option is valid. Need to verify in case user +# passes the option via the command line. +list(FIND KOKKOS_HOST_ARCH_LIST "${KOKKOS_HOST_ARCH}" KOKKOS_VALID_HOST_ARCH) +if(KOKKOS_VALID_HOST_ARCH EQUAL -1) + set(KOKKOS_ARCH_TEXT "\n ${KOKKOS_HOST_ARCH_LIST}") + string(REPLACE ";" "\n " KOKKOS_ARCH_TEXT "${KOKKOS_ARCH_TEXT}") + set(KOKKOS_MESSAGE_TEXT "Invalid architecture for KOKKOS_HOST_ARCH: '${KOKKOS_HOST_ARCH}'") + set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n Choices:${KOKKOS_ARCH_TEXT}\n") + message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") +endif() + +# Make sure the GPU architecture option is valid. Need to verify in case user +# passes the option via the command line. +list(FIND KOKKOS_GPU_ARCH_LIST "${KOKKOS_GPU_ARCH}" KOKKOS_VALID_GPU_ARCH) +if(KOKKOS_VALID_GPU_ARCH EQUAL -1) + set(KOKKOS_ARCH_TEXT "\n ${KOKKOS_GPU_ARCH_LIST}") + string(REPLACE ";" "\n " KOKKOS_ARCH_TEXT "${KOKKOS_ARCH_TEXT}") + set(KOKKOS_MESSAGE_TEXT "Invalid architecture for KOKKOS_GPU_ARCH: '${KOKKOS_GPU_ARCH}'") + set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n Choices:${KOKKOS_ARCH_TEXT}\n") + message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") +endif() + +# Decide what ISA level we are able to support. +if(KOKKOS_HOST_ARCH STREQUAL SNB OR KOKKOS_HOST_ARCH STREQUAL HSW OR KOKKOS_HOST_ARCH STREQUAL BDW OR + KOKKOS_HOST_ARCH STREQUAL SKX OR KOKKOS_HOST_ARCH STREQUAL KNL) + set(KOKKOS_ENABLE_ISA_X86_64 ON CACHE INTERNAL "") +endif() + +if(KOKKOS_HOST_ARCH STREQUAL KNC) + set(KOKKOS_ENABLE_ISA_KNC ON CACHE INTERNAL "") +endif() + +if(KOKKOS_HOST_ARCH STREQUAL Power8 OR KOKKOS_HOST_ARCH STREQUAL Power9) + set(KOKKOS_ENABLE_ISA_POWERPCLE ON CACHE INTERNAL "") +endif() + +# Add host architecture options. +if(KOKKOS_HOST_ARCH STREQUAL ARMv80) + set(KOKKOS_ARCH_ARMV80 ON CACHE INTERNAL "") + + if(KOKKOS_CXX_COMPILER_ID STREQUAL Cray) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL PGI) + else() + list(APPEND KOKKOS_CXX_FLAGS -march=armv8-a) + list(APPEND KOKKOS_LD_FLAGS -march=armv8-a) + endif() +elseif(KOKKOS_HOST_ARCH STREQUAL ARMv81) + set(KOKKOS_ARCH_ARMV81 ON CACHE INTERNAL "") + + if(KOKKOS_CXX_COMPILER_ID STREQUAL Cray) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL PGI) + else() + list(APPEND KOKKOS_CXX_FLAGS -march=armv8.1-a) + list(APPEND KOKKOS_LD_FLAGS -march=armv8.1-a) + endif() +elseif(KOKKOS_HOST_ARCH STREQUAL ARMv8-ThunderX) + set(KOKKOS_ARCH_ARMV80 ON CACHE INTERNAL "") + set(KOKKOS_ARCH_ARMV8_THUNDERX ON CACHE INTERNAL "") + + if(KOKKOS_CXX_COMPILER_ID STREQUAL Cray) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL PGI) + else() + list(APPEND KOKKOS_CXX_FLAGS -march=armv8-a -mtune=thunderx) + list(APPEND KOKKOS_LD_FLAGS -march=armv8-a -mtune=thunderx) + endif() +elseif(KOKKOS_HOST_ARCH STREQUAL SNB OR KOKKOS_HOST_ARCH STREQUAL AMDAVX) + set(KOKKOS_ARCH_AVX ON CACHE INTERNAL "") + + if(KOKKOS_CXX_COMPILER_ID STREQUAL Intel) + list(APPEND KOKKOS_CXX_FLAGS -mavx) + list(APPEND KOKKOS_LD_FLAGS -mavx) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL Cray) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL PGI) + list(APPEND KOKKOS_CXX_FLAGS -tp=sandybridge) + list(APPEND KOKKOS_LD_FLAGS -tp=sandybridge) + else() + list(APPEND KOKKOS_CXX_FLAGS -mavx) + list(APPEND KOKKOS_LD_FLAGS -mavx) + endif() +elseif(KOKKOS_HOST_ARCH STREQUAL HSW OR KOKKOS_HOST_ARCH STREQUAL BDW) + set(KOKKOS_ARCH_AVX2 ON CACHE INTERNAL "") + + if(KOKKOS_CXX_COMPILER_ID STREQUAL Intel) + list(APPEND KOKKOS_CXX_FLAGS -xCORE-AVX2) + list(APPEND KOKKOS_LD_FLAGS -xCORE-AVX2) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL Cray) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL PGI) + list(APPEND KOKKOS_CXX_FLAGS -tp=haswell) + list(APPEND KOKKOS_LD_FLAGS -tp=haswell) + else() + list(APPEND KOKKOS_CXX_FLAGS -march=core-avx2 -mtune=core-avx2) + list(APPEND KOKKOS_LD_FLAGS -march=core-avx2 -mtune=core-avx2) + endif() +elseif(KOKKOS_HOST_ARCH STREQUAL KNL) + set(KOKKOS_ARCH_AVX512MIC ON CACHE INTERNAL "") + + if(KOKKOS_CXX_COMPILER_ID STREQUAL Intel) + list(APPEND KOKKOS_CXX_FLAGS -xMIC-AVX512) + list(APPEND KOKKOS_LD_FLAGS -xMIC-AVX512) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL Cray) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL PGI) + else() + list(APPEND KOKKOS_CXX_FLAGS -march=knl) + list(APPEND KOKKOS_LD_FLAGS -march=knl) + endif() +elseif(KOKKOS_HOST_ARCH STREQUAL SKX) + set(KOKKOS_ARCH_AVX512XEON ON CACHE INTERNAL "") + + if(KOKKOS_CXX_COMPILER_ID STREQUAL Intel) + list(APPEND KOKKOS_CXX_FLAGS -xCORE-AVX512) + list(APPEND KOKKOS_LD_FLAGS -xCORE-AVX512) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL Cray) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL PGI) + else() + list(APPEND KOKKOS_CXX_FLAGS -march=skylake-avx512) + list(APPEND KOKKOS_LD_FLAGS -march=skylake-avx512) + endif() +elseif(KOKKOS_HOST_ARCH STREQUAL KNC) + set(KOKKOS_ARCH_KNC ON CACHE INTERNAL "") + list(APPEND KOKKOS_CXX_FLAGS -mmic) + list(APPEND KOKKOS_LD_FLAGS -mmic) +elseif(KOKKOS_HOST_ARCH STREQUAL Power8) + set(KOKKOS_ARCH_POWER8 ON CACHE INTERNAL "") + + if(KOKKOS_CXX_COMPILER_ID STREQUAL PGI) + else() + list(APPEND KOKKOS_CXX_FLAGS -mcpu=power8 -mtune=power8) + list(APPEND KOKKOS_LD_FLAGS -mcpu=power8 -mtune=power8) + endif() +elseif(KOKKOS_HOST_ARCH STREQUAL Power9) + set(KOKKOS_ARCH_POWER9 ON CACHE INTERNAL "") + + if(KOKKOS_CXX_COMPILER_ID STREQUAL PGI) + else() + list(APPEND KOKKOS_CXX_FLAGS -mcpu=power9 -mtune=power9) + list(APPEND KOKKOS_LD_FLAGS -mcpu=power9 -mtune=power9) + endif() +endif() + +# Add GPU architecture options. +if(KOKKOS_ENABLE_CUDA) + if(KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + set(KOKKOS_GPU_ARCH_FLAG -arch) + elseif(KOKKOS_CXX_COMPILER_ID STREQUAL Clang) + list(APPEND KOKKOS_CXX_FLAGS -x cuda) + set(KOKKOS_GPU_ARCH_FLAG --cuda-gpu-arch) + endif() + + if(KOKKOS_GPU_ARCH STREQUAL Kepler30) + set(KOKKOS_ARCH_KEPLER ON CACHE INTERNAL "") + set(KOKKOS_ARCH_KEPLER30 ON CACHE INTERNAL "") + set(KOKKOS_GPU_ARCH_FLAG ${KOKKOS_GPU_ARCH_FLAG}=sm_30) + elseif(KOKKOS_GPU_ARCH STREQUAL Kepler32) + set(KOKKOS_ARCH_KEPLER ON CACHE INTERNAL "") + set(KOKKOS_ARCH_KEPLER32 ON CACHE INTERNAL "") + set(KOKKOS_GPU_ARCH_FLAG ${KOKKOS_GPU_ARCH_FLAG}=sm_32) + elseif(KOKKOS_GPU_ARCH STREQUAL Kepler35 OR KOKKOS_GPU_ARCH STREQUAL Kepler) + set(KOKKOS_ARCH_KEPLER ON CACHE INTERNAL "") + set(KOKKOS_ARCH_KEPLER35 ON CACHE INTERNAL "") + set(KOKKOS_GPU_ARCH_FLAG ${KOKKOS_GPU_ARCH_FLAG}=sm_35) + elseif(KOKKOS_GPU_ARCH STREQUAL Kepler37) + set(KOKKOS_ARCH_KEPLER ON CACHE INTERNAL "") + set(KOKKOS_ARCH_KEPLER37 ON CACHE INTERNAL "") + set(KOKKOS_GPU_ARCH_FLAG ${KOKKOS_GPU_ARCH_FLAG}=sm_37) + elseif(KOKKOS_GPU_ARCH STREQUAL Maxwell50 OR KOKKOS_GPU_ARCH STREQUAL Maxwell) + set(KOKKOS_ARCH_MAXWELL ON CACHE INTERNAL "") + set(KOKKOS_ARCH_MAXWELL50 ON CACHE INTERNAL "") + set(KOKKOS_GPU_ARCH_FLAG ${KOKKOS_GPU_ARCH_FLAG}=sm_50) + elseif(KOKKOS_GPU_ARCH STREQUAL Maxwell52) + set(KOKKOS_ARCH_MAXWELL ON CACHE INTERNAL "") + set(KOKKOS_ARCH_MAXWELL52 ON CACHE INTERNAL "") + set(KOKKOS_GPU_ARCH_FLAG ${KOKKOS_GPU_ARCH_FLAG}=sm_52) + elseif(KOKKOS_GPU_ARCH STREQUAL Maxwell53) + set(KOKKOS_ARCH_MAXWELL ON CACHE INTERNAL "") + set(KOKKOS_ARCH_MAXWELL53 ON CACHE INTERNAL "") + set(KOKKOS_GPU_ARCH_FLAG ${KOKKOS_GPU_ARCH_FLAG}=sm_53) + elseif(KOKKOS_GPU_ARCH STREQUAL Pascal60) + set(KOKKOS_ARCH_PASCAL ON CACHE INTERNAL "") + set(KOKKOS_ARCH_PASCAL60 ON CACHE INTERNAL "") + set(KOKKOS_GPU_ARCH_FLAG ${KOKKOS_GPU_ARCH_FLAG}=sm_60) + elseif(KOKKOS_GPU_ARCH STREQUAL Pascal61) + set(KOKKOS_ARCH_PASCAL ON CACHE INTERNAL "") + set(KOKKOS_ARCH_PASCAL61 ON CACHE INTERNAL "") + set(KOKKOS_GPU_ARCH_FLAG ${KOKKOS_GPU_ARCH_FLAG}=sm_61) + endif() + + if(NOT KOKKOS_GPU_ARCH STREQUAL None) + list(APPEND KOKKOS_CXX_FLAGS ${KOKKOS_GPU_ARCH_FLAG}) + + if(KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + list(APPEND KOKKOS_LD_FLAGS ${KOKKOS_GPU_ARCH_FLAG}) + endif() + endif() +endif() + +############################### SET OTHER OPTIONS ############################## + +# Set options if using hwloc. +if(KOKKOS_ENABLE_HWLOC) + if(KOKKOS_HWLOC_DIR) + list(APPEND CMAKE_PREFIX_PATH ${KOKKOS_HWLOC_DIR}) + endif() + + find_package(HWLOC) + + if(NOT HWLOC_FOUND) + if(KOKKOS_HWLOC_DIR) + message(FATAL_ERROR "Couldn't find HWLOC in default locations, and KOKKOS_HWLOC_DIR points to an invalid installation.") + else() + message(FATAL_ERROR "Couldn't find HWLOC in default locations. Set KOKKOS_HWLOC_DIR.") + endif() + endif() + + list(APPEND KOKKOS_INCLUDE_DIRS ${HWLOC_INCLUDE_DIR}) + list(APPEND KOKKOS_LIBS ${HWLOC_LIBRARIES}) + + set(KOKKOS_HAVE_HWLOC ON CACHE INTERNAL "") + + if(KOKKOS_HWLOC_DIR) + list(REMOVE_AT CMAKE_PREFIX_PATH -1) + endif() +endif() + +# Set options if using memkind. +if(KOKKOS_ENABLE_MEMKIND) + if(KOKKOS_MEMKIND_DIR) + list(APPEND CMAKE_PREFIX_PATH ${KOKKOS_MEMKIND_DIR}) + endif() + + find_package(Memkind) + + if(NOT MEMKIND_FOUND) + if(KOKKOS_MEMKIND_DIR) + message(FATAL_ERROR "Couldn't find Memkind in default locations, and KOKKOS_MEMKIND_DIR points to an invalid installation.") + else() + message(FATAL_ERROR "Couldn't find Memkind in default locations. Set KOKKOS_MEMKIND_DIR.") + endif() + endif() + + set(KOKKOS_ENABLE_HBWSPACE ON CACHE INTERNAL "") + list(APPEND KOKKOS_INCLUDE_DIRS ${MEMKIND_INCLUDE_DIR}) + list(APPEND KOKKOS_LIBS ${MEMKIND_LIBRARIES}) + + if(KOKKOS_MEMKIND_DIR) + list(REMOVE_AT CMAKE_PREFIX_PATH -1) + endif() +else() + # Remove HBW source file. + list(REMOVE_ITEM KOKKOS_CORE_SRCS + "${Kokkos_SOURCE_DIR}/core/src/impl/Kokkos_HBWSpace.cpp") +endif() + +# Set options if using librt. +if(KOKKOS_ENABLE_LIBRT) + list(APPEND KOKKOS_LIBS rt) +endif() + +# Set debugging if requested. +if(KOKKOS_DEBUG) + set(KOKKOS_HAVE_DEBUG ON CACHE INTERNAL "") + set(KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK ON CACHE INTERNAL "") + + if(KOKKOS_CXX_COVIDIA) + list(APPEND KOKKOS_CXX_FLAGS -lineinfo) + endif() + + list(APPEND KOKKOS_CXX_FLAGS -g) + list(APPEND KOKKOS_LD_FLAGS -g) +endif() + +# Set profiling if requested. +if(KOKKOS_ENABLE_PROFILING) + list(APPEND KOKKOS_LIBS dl) +else() + # Remove profiling source file. + list(REMOVE_ITEM KOKKOS_CORE_SRCS + "${Kokkos_SOURCE_DIR}/core/src/impl/Kokkos_Profiling_Interface.cpp") +endif() + +# Use GCC toolchain with Clang. +if(KOKKOS_CXX_COMPILER_ID STREQUAL Clang AND NOT APPLE) + find_program(KOKKOS_GCC_PATH g++) + if(NOT KOKKOS_GCC_PATH) + message(FATAL_ERROR "Can't find GCC path to get toolchain for Clang.") + endif() + string(REPLACE "/bin/g++" "" KOKKOS_GCC_PATH ${KOKKOS_GCC_PATH}) + + list(APPEND KOKKOS_CXX_FLAGS --gcc-toolchain=${KOKKOS_GCC_PATH}) + list(APPEND KOKKOS_LD_FLAGS --gcc-toolchain=${KOKKOS_GCC_PATH}) +endif() + +############################ Detect if submodule ############################### +# +# With thanks to StackOverflow: +# http://stackoverflow.com/questions/25199677/how-to-detect-if-current-scope-has-a-parent-in-cmake +# +get_directory_property(HAS_PARENT PARENT_DIRECTORY) +if(HAS_PARENT) + message(STATUS "Submodule build") + SET(KOKKOS_HEADER_DIR "include/kokkos") +else() + message(STATUS "Standalone build") + SET(KOKKOS_HEADER_DIR "include") +endif() + +############################ PRINT CONFIGURE STATUS ############################ + +message(STATUS "") +message(STATUS "****************** Kokkos Settings ******************") +message(STATUS "Execution Spaces") + +if(KOKKOS_ENABLE_CUDA) + message(STATUS " Device Parallel: Cuda") +else() + message(STATUS " Device Parallel: None") +endif() + +if(KOKKOS_ENABLE_OPENMP) + message(STATUS " Host Parallel: OpenMP") +elseif(KOKKOS_ENABLE_PTHREAD) + message(STATUS " Host Parallel: Pthread") +elseif(KOKKOS_ENABLE_QTHREADS) + message(STATUS " Host Parallel: Qthreads") +else() + message(STATUS " Host Parallel: None") +endif() + +if(KOKKOS_ENABLE_SERIAL) + message(STATUS " Host Serial: Serial") +else() + message(STATUS " Host Serial: None") +endif() + +message(STATUS "") +message(STATUS "Architectures") +message(STATUS " Host Architecture: ${KOKKOS_HOST_ARCH}") +message(STATUS " Device Architecture: ${KOKKOS_GPU_ARCH}") + +message(STATUS "") +message(STATUS "Enabled options") + +if(KOKKOS_SEPARATE_LIBS) + message(STATUS " KOKKOS_SEPARATE_LIBS") +endif() + +if(KOKKOS_ENABLE_HWLOC) + message(STATUS " KOKKOS_ENABLE_HWLOC") +endif() + +if(KOKKOS_ENABLE_MEMKIND) + message(STATUS " KOKKOS_ENABLE_MEMKIND") +endif() + +if(KOKKOS_DEBUG) + message(STATUS " KOKKOS_DEBUG") +endif() + +if(KOKKOS_ENABLE_PROFILING) + message(STATUS " KOKKOS_ENABLE_PROFILING") +endif() + +if(KOKKOS_ENABLE_AGGRESSIVE_VECTORIZATION) + message(STATUS " KOKKOS_ENABLE_AGGRESSIVE_VECTORIZATION") +endif() + +if(KOKKOS_ENABLE_CUDA) + if(KOKKOS_ENABLE_CUDA_LDG_INTRINSIC) + message(STATUS " KOKKOS_ENABLE_CUDA_LDG_INTRINSIC") + endif() + + if(KOKKOS_ENABLE_CUDA_UVM) + message(STATUS " KOKKOS_ENABLE_CUDA_UVM") + endif() + + if(KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE) + message(STATUS " KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE") + endif() + + if(KOKKOS_ENABLE_CUDA_LAMBDA) + message(STATUS " KOKKOS_ENABLE_CUDA_LAMBDA") + endif() + + if(KOKKOS_CUDA_DIR) + message(STATUS " KOKKOS_CUDA_DIR: ${KOKKOS_CUDA_DIR}") + endif() +endif() + +if(KOKKOS_QTHREADS_DIR) + message(STATUS " KOKKOS_QTHREADS_DIR: ${KOKKOS_QTHREADS_DIR}") +endif() + +if(KOKKOS_HWLOC_DIR) + message(STATUS " KOKKOS_HWLOC_DIR: ${KOKKOS_HWLOC_DIR}") +endif() + +if(KOKKOS_MEMKIND_DIR) + message(STATUS " KOKKOS_MEMKIND_DIR: ${KOKKOS_MEMKIND_DIR}") +endif() + +message(STATUS "*****************************************************") +message(STATUS "") + +################################ SET UP PROJECT ################################ + +configure_file( + ${Kokkos_SOURCE_DIR}/core/cmake/KokkosCore_config.h.in + ${Kokkos_BINARY_DIR}/KokkosCore_config.h +) + +SET(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries") +SET(INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables") +SET(INSTALL_INCLUDE_DIR ${KOKKOS_HEADER_DIR} CACHE PATH + "Installation directory for header files") +IF(WIN32 AND NOT CYGWIN) + SET(DEF_INSTALL_CMAKE_DIR CMake) +ELSE() + SET(DEF_INSTALL_CMAKE_DIR lib/CMake/Kokkos) +ENDIF() + +SET(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH + "Installation directory for CMake files") + +# Make relative paths absolute (needed later on) +FOREACH(p LIB BIN INCLUDE CMAKE) + SET(var INSTALL_${p}_DIR) + IF(NOT IS_ABSOLUTE "${${var}}") + SET(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") + ENDIF() +ENDFOREACH() + +# set up include-directories +SET (Kokkos_INCLUDE_DIRS + ${Kokkos_SOURCE_DIR}/core/src + ${Kokkos_SOURCE_DIR}/containers/src + ${Kokkos_SOURCE_DIR}/algorithms/src + ${Kokkos_BINARY_DIR} # to find KokkosCore_config.h +) + +INCLUDE_DIRECTORIES(${Kokkos_INCLUDE_DIRS}) + +IF(KOKKOS_SEPARATE_LIBS) + # kokkoscore + ADD_LIBRARY( + kokkoscore + ${KOKKOS_CORE_SRCS} + ) + + target_compile_options( + kokkoscore + PUBLIC ${KOKKOS_CXX_FLAGS} + ) + + target_compile_features( + kokkoscore + PUBLIC ${KOKKOS_CXX11_FEATURES} + ) + + # Install the kokkoscore library + INSTALL (TARGETS kokkoscore + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + ) + + # Install the kokkoscore headers + INSTALL (DIRECTORY + ${Kokkos_SOURCE_DIR}/core/src/ + DESTINATION ${KOKKOS_HEADER_DIR} + FILES_MATCHING PATTERN "*.hpp" + ) + + # Install KokkosCore_config.h header + INSTALL (FILES + ${Kokkos_BINARY_DIR}/KokkosCore_config.h + DESTINATION ${KOKKOS_HEADER_DIR} + ) + + TARGET_LINK_LIBRARIES( + kokkoscore + ${KOKKOS_LD_FLAGS} + ${KOKKOS_LIBS} + ) + + # kokkoscontainers + ADD_LIBRARY( + kokkoscontainers + ${KOKKOS_CONTAINERS_SRCS} + ) + + TARGET_LINK_LIBRARIES( + kokkoscontainers + kokkoscore + ) + + # Install the kokkocontainers library + INSTALL (TARGETS kokkoscontainers + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) + + # Install the kokkoscontainers headers + INSTALL (DIRECTORY + ${Kokkos_SOURCE_DIR}/containers/src/ + DESTINATION ${KOKKOS_HEADER_DIR} + FILES_MATCHING PATTERN "*.hpp" + ) + + # kokkosalgorithms - Build as interface library since no source files. + ADD_LIBRARY( + kokkosalgorithms + INTERFACE + ) + + target_include_directories( + kokkosalgorithms + INTERFACE ${Kokkos_SOURCE_DIR}/algorithms/src + ) + + TARGET_LINK_LIBRARIES( + kokkosalgorithms + INTERFACE kokkoscore + ) + + # Install the kokkoalgorithms library + INSTALL (TARGETS kokkosalgorithms + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) + + # Install the kokkosalgorithms headers + INSTALL (DIRECTORY + ${Kokkos_SOURCE_DIR}/algorithms/src/ + DESTINATION ${KOKKOS_INSTALL_INDLUDE_DIR} + FILES_MATCHING PATTERN "*.hpp" + ) + + SET (Kokkos_LIBRARIES_NAMES kokkoscore kokkoscontainers kokkosalgorithms) + +ELSE() + # kokkos + ADD_LIBRARY( + kokkos + ${KOKKOS_CORE_SRCS} + ${KOKKOS_CONTAINERS_SRCS} + ) + + target_compile_options( + kokkos + PUBLIC ${KOKKOS_CXX_FLAGS} + ) + + target_compile_features( + kokkos + PUBLIC ${KOKKOS_CXX11_FEATURES} + ) + + TARGET_LINK_LIBRARIES( + kokkos + ${KOKKOS_LD_FLAGS} + ${KOKKOS_LIBS} + ) + + # Install the kokkos library + INSTALL (TARGETS kokkos + EXPORT KokkosTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) + + + # Install the kokkos headers + INSTALL (DIRECTORY + EXPORT KokkosTargets + ${Kokkos_SOURCE_DIR}/core/src/ + DESTINATION ${KOKKOS_HEADER_DIR} + FILES_MATCHING PATTERN "*.hpp" + ) + INSTALL (DIRECTORY + EXPORT KokkosTargets + ${Kokkos_SOURCE_DIR}/containers/src/ + DESTINATION ${KOKKOS_HEADER_DIR} + FILES_MATCHING PATTERN "*.hpp" + ) + INSTALL (DIRECTORY + EXPORT KokkosTargets + ${Kokkos_SOURCE_DIR}/algorithms/src/ + DESTINATION ${KOKKOS_HEADER_DIR} + FILES_MATCHING PATTERN "*.hpp" + ) + + INSTALL (FILES + ${Kokkos_BINARY_DIR}/KokkosCore_config.h + DESTINATION ${KOKKOS_HEADER_DIR} + ) + + include_directories(${Kokkos_BINARY_DIR}) + include_directories(${Kokkos_SOURCE_DIR}/core/src) + include_directories(${Kokkos_SOURCE_DIR}/containers/src) + include_directories(${Kokkos_SOURCE_DIR}/algorithms/src) + + + SET (Kokkos_LIBRARIES_NAMES kokkos) + +endif() + +# Add all targets to the build-tree export set +export(TARGETS ${Kokkos_LIBRARIES_NAMES} + FILE "${Kokkos_BINARY_DIR}/KokkosTargets.cmake") + +# Export the package for use from the build-tree +# (this registers the build-tree with a global CMake-registry) +export(PACKAGE Kokkos) + +# Create the KokkosConfig.cmake and KokkosConfigVersion files +file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" + "${INSTALL_INCLUDE_DIR}") +# ... for the build tree +set(CONF_INCLUDE_DIRS "${Kokkos_SOURCE_DIR}" "${Kokkos_BINARY_DIR}") +configure_file(${Kokkos_SOURCE_DIR}/cmake/KokkosConfig.cmake.in + "${Kokkos_BINARY_DIR}/KokkosConfig.cmake" @ONLY) +# ... for the install tree +set(CONF_INCLUDE_DIRS "\${Kokkos_CMAKE_DIR}/${REL_INCLUDE_DIR}") +configure_file(${Kokkos_SOURCE_DIR}/cmake/KokkosConfig.cmake.in + "${Kokkos_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/KokkosConfig.cmake" @ONLY) + +# Install the KokkosConfig.cmake and KokkosConfigVersion.cmake +install(FILES + "${Kokkos_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/KokkosConfig.cmake" + DESTINATION "${INSTALL_CMAKE_DIR}") + +# Install the export set for use with the install-tree +INSTALL(EXPORT KokkosTargets DESTINATION + "${INSTALL_CMAKE_DIR}") diff --git a/lib/kokkos/config/kokkos-trilinos-integration-procedure.txt b/lib/kokkos/config/kokkos-trilinos-integration-procedure.txt index 961e4186ec..0f24487814 100644 --- a/lib/kokkos/config/kokkos-trilinos-integration-procedure.txt +++ b/lib/kokkos/config/kokkos-trilinos-integration-procedure.txt @@ -60,34 +60,12 @@ Step 2: // -------------------------------------------------------------------------------- // Step 3: - 3.1. Build and test Trilinos with 3 different configurations; a configure-all script is provided in Trilinos and should be modified to test each of the following 3 configurations with appropriate environment variable(s): + 3.1. Build and test Trilinos with 4 different configurations; Run scripts for white and shepard are provided in kokkos/config/trilinos-integration - - GCC/4.7.2-OpenMP/Complex - Run tests with the following environment variable: + Usually its a good idea to run those script via nohup. + You can run all four at the same time, use separate directories for each. - export OMP_NUM_THREADS=2 - - - - Intel/15.0.2-Serial/NoComplex - - - - GCC/4.8.4/CUDA/7.5.18-Cuda/Serial/NoComplex - Run tests with the following environment variables: - - export CUDA_LAUNCH_BLOCKING=1 - export CUDA_MANAGED_FORCE_DEVICE_ALLOC=1 - - - mkdir Build - cd Build - cp TRILINOS_PATH/sampleScripts/Sandia-SEMS/configure-all ./ - ** Set the path to Trilinos appropriately within the configure-all script ** - source $SEMS_MODULE_ROOT/utils/sems-modules-init.sh kokkos - source configure-all - make -k (-k means "keep going" to get past build errors; -j12 can also be specified to build with 12 threads, for example) - ctest - - 3.2. Compare the failed test output to the test output on the dashboard ( testing.sandia.gov/cdash select Trilinos ); investigate and fix problems if new tests fail after the Kokkos snapshot + 3.2. Compare the failed test output between the pristine and the updated runs; investigate and fix problems if new tests fail after the Kokkos snapshot // -------------------------------------------------------------------------------- // @@ -134,7 +112,7 @@ Step 4: Once all Trilinos tests pass promote Kokkos develop branch to master on master: sha1 develop: sha1 - git push --follow-tags origin master + 4.4. Do NOT push yet // -------------------------------------------------------------------------------- // @@ -156,9 +134,15 @@ Step 5: python KOKKOS_PATH/config/snapshot.py KOKKOS_PATH TRILINOS_PATH/packages - 5.3. Push the updated develop branch of Trilinos to Github - congratulations!!! + 5.3. Run checkin-test to push to trilinos using the CI build modules (gcc/4.9.3) - (From Trilinos directory): - git push + The modules are listed in kokkos/config/trilinos-integration/checkin-test + Run checkin-test, forward dependencies and optional dependencies must be enabled + If push failed because someone else clearly broke something, push manually. + If push failed for unclear reasons, investigate, fix, and potentially start over from step 2 after reseting your local kokkos/master branch + +Step 6: Push Kokkos to master + + git push --follow-tags origin master // -------------------------------------------------------------------------------- // diff --git a/lib/kokkos/config/kokkos_dev/config-core-all.sh b/lib/kokkos/config/kokkos_dev/config-core-all.sh index d4fb25a8e1..1867de7204 100755 --- a/lib/kokkos/config/kokkos_dev/config-core-all.sh +++ b/lib/kokkos/config/kokkos_dev/config-core-all.sh @@ -13,7 +13,7 @@ # module load cmake/2.8.11.2 gcc/4.8.3 cuda/6.5.14 nvcc-wrapper/gnu # # The 'nvcc-wrapper' module should load a script that matches -# kokkos/config/nvcc_wrapper +# kokkos/bin/nvcc_wrapper # #----------------------------------------------------------------------------- # Source and installation directories: diff --git a/lib/kokkos/config/kokkos_dev/config-core-cuda-omp-hwloc.sh b/lib/kokkos/config/kokkos_dev/config-core-cuda-omp-hwloc.sh index c2e17bb944..5a6cc1493e 100755 --- a/lib/kokkos/config/kokkos_dev/config-core-cuda-omp-hwloc.sh +++ b/lib/kokkos/config/kokkos_dev/config-core-cuda-omp-hwloc.sh @@ -13,7 +13,7 @@ # module load cmake/2.8.11.2 gcc/4.8.3 cuda/6.5.14 nvcc-wrapper/gnu # # The 'nvcc-wrapper' module should load a script that matches -# kokkos/config/nvcc_wrapper +# kokkos/bin/nvcc_wrapper # #----------------------------------------------------------------------------- # Source and installation directories: diff --git a/lib/kokkos/config/kokkos_dev/config-core-cuda.sh b/lib/kokkos/config/kokkos_dev/config-core-cuda.sh index 39b72d5ce1..606755da81 100755 --- a/lib/kokkos/config/kokkos_dev/config-core-cuda.sh +++ b/lib/kokkos/config/kokkos_dev/config-core-cuda.sh @@ -13,7 +13,7 @@ # module load cmake/2.8.11.2 gcc/4.8.3 cuda/6.5.14 nvcc-wrapper/gnu # # The 'nvcc-wrapper' module should load a script that matches -# kokkos/config/nvcc_wrapper +# kokkos/bin/nvcc_wrapper # #----------------------------------------------------------------------------- # Source and installation directories: diff --git a/lib/kokkos/config/master_history.txt b/lib/kokkos/config/master_history.txt index 9eaecb5031..cc6f4c97d7 100644 --- a/lib/kokkos/config/master_history.txt +++ b/lib/kokkos/config/master_history.txt @@ -5,4 +5,5 @@ tag: 2.02.00 date: 10:30:2016 master: 6c90a581 develop: ca3dd56e tag: 2.02.01 date: 11:01:2016 master: 9c698c86 develop: b0072304 tag: 2.02.07 date: 12:16:2016 master: 4b4cc4ba develop: 382c0966 tag: 2.02.15 date: 02:10:2017 master: 8c64cd93 develop: 28dea8b6 -tag: 2.03.00 date: 04:25:2017 master: 120d9ce7 develop: 015ba641 +tag: 2.03.00 date: 04:25:2017 master: 120d9ce7 develop: 015ba641 +tag: 2.03.05 date: 05:27:2017 master: 36b92f43 develop: 79073186 diff --git a/lib/kokkos/config/snapshot.py b/lib/kokkos/config/snapshot.py index d816cd0c9c..bfa97bf48a 100755 --- a/lib/kokkos/config/snapshot.py +++ b/lib/kokkos/config/snapshot.py @@ -27,7 +27,7 @@ import subprocess, argparse, re, doctest, os, datetime, traceback def parse_cmdline(description): parser = argparse.ArgumentParser(usage="snapshot.py [options] source destination", description=description) - parser.add_argument("-n", "--no-comit", action="store_false", dest="create_commit", default=True, + parser.add_argument("-n", "--no-commit", action="store_false", dest="create_commit", default=True, help="Do not perform a commit or create a commit message.") parser.add_argument("-v", "--verbose", action="store_true", dest="verbose_mode", default=False, help="Enable verbose mode.") @@ -39,6 +39,8 @@ def parse_cmdline(description): help="Type of repository of the source, use none to skip all repository operations.") parser.add_argument("--dest-repo", choices=["git","none"], default="", help="Type of repository of the destination, use none to skip all repository operations.") + parser.add_argument("--small", action="store_true", dest="small_mode", + help="Don't include tests and other extra files when copying.") parser.add_argument("source", help="Source project to snapshot from.") parser.add_argument("destination", help="Destination to snapshot too.") @@ -58,9 +60,9 @@ def validate_options(options): options.source = os.path.abspath(options.source) options.destination = os.path.abspath(options.destination) - + if os.path.exists(options.source): - apparent_source_repo_type, source_root = deterimine_repo_type(options.source) + apparent_source_repo_type, source_root = determine_repo_type(options.source) else: raise RuntimeError("Could not find source directory of %s." % options.source) options.source_root = source_root @@ -69,7 +71,7 @@ def validate_options(options): print "Could not find destination directory of %s so it will be created." % options.destination os.makedirs(options.destination) - apparent_dest_repo_type, dest_root = deterimine_repo_type(options.destination) + apparent_dest_repo_type, dest_root = determine_repo_type(options.destination) options.dest_root = dest_root #error on svn repo types for now @@ -111,7 +113,7 @@ def run_cmd(cmd, options, working_dir="."): print "==== %s stderr ====" % cmd_str print proc_stderr print "==== %s stderr ====" % cmd_str - + if ret_val != 0: raise RuntimeError("Command '%s' failed with error code %d. Error message:%s%s%sstdout:%s" % \ (cmd_str, ret_val, os.linesep, proc_stderr, os.linesep, proc_stdout)) @@ -119,7 +121,7 @@ def run_cmd(cmd, options, working_dir="."): return proc_stdout, proc_stderr #end run_cmd -def deterimine_repo_type(location): +def determine_repo_type(location): apparent_repo_type = "none" while location != "": @@ -133,16 +135,32 @@ def deterimine_repo_type(location): location = location[:location.rfind(os.sep)] return apparent_repo_type, location - -#end deterimine_repo_type +#end determine_repo_type def rsync(source, dest, options): rsync_cmd = ["rsync", "-ar", "--delete"] if options.debug_mode: rsync_cmd.append("-v") + if options.small_mode or options.source_repo == "git": + rsync_cmd.append("--delete-excluded") + + if options.small_mode: + rsync_cmd.append("--include=config/master_history.txt") + rsync_cmd.append("--include=cmake/tpls") + rsync_cmd.append("--exclude=benchmarks/") + rsync_cmd.append("--exclude=config/*") + rsync_cmd.append("--exclude=doc/") + rsync_cmd.append("--exclude=example/") + rsync_cmd.append("--exclude=tpls/") + rsync_cmd.append("--exclude=HOW_TO_SNAPSHOT") + rsync_cmd.append("--exclude=unit_test") + rsync_cmd.append("--exclude=unit_tests") + rsync_cmd.append("--exclude=perf_test") + rsync_cmd.append("--exclude=performance_tests") + if options.source_repo == "git": - rsync_cmd.append("--exclude=.git") + rsync_cmd.append("--exclude=.git*") rsync_cmd.append(options.source) rsync_cmd.append(options.destination) @@ -171,28 +189,27 @@ def find_git_commit_information(options): ('sems', 'software.sandia.gov:/git/sems') """ git_log_cmd = ["git", "log", "-1"] - + output, error = run_cmd(git_log_cmd, options, options.source) - + commit_match = re.match("commit ([0-9a-fA-F]+)", output) commit_id = commit_match.group(1) commit_log = output - + git_remote_cmd = ["git", "remote", "-v"] output, error = run_cmd(git_remote_cmd, options, options.source) - + remote_match = re.search("origin\s([^ ]*/([^ ]+))", output, re.MULTILINE) if not remote_match: raise RuntimeError("Could not find origin of repo at %s. Consider using none for source repo type." % (options.source)) source_location = remote_match.group(1) source_name = remote_match.group(2).strip() - + if source_name[-1] == "/": source_name = source_name[:-1] return commit_id, commit_log, source_name, source_location - #end find_git_commit_information def do_git_commit(message, options): @@ -201,10 +218,10 @@ def do_git_commit(message, options): git_add_cmd = ["git", "add", "-A"] run_cmd(git_add_cmd, options, options.destination) - + git_commit_cmd = ["git", "commit", "-m%s" % message] run_cmd(git_commit_cmd, options, options.destination) - + git_log_cmd = ["git", "log", "--format=%h", "-1"] commit_sha1, error = run_cmd(git_log_cmd, options, options.destination) @@ -214,7 +231,7 @@ def do_git_commit(message, options): def verify_git_repo_clean(location, options): git_status_cmd = ["git", "status", "--porcelain"] output, error = run_cmd(git_status_cmd, options, location) - + if output != "": if options.no_validate_repo == False: raise RuntimeError("%s is not clean.%sPlease commit or stash all changes before running snapshot." @@ -223,7 +240,6 @@ def verify_git_repo_clean(location, options): print "WARNING: %s is not clean. Proceeding anyway." % location print "WARNING: This could lead to differences in the source and destination." print "WARNING: It could also lead to extra files being included in the snapshot commit." - #end verify_git_repo_clean def main(options): @@ -238,14 +254,14 @@ def main(options): commit_log = "Unknown commit from %s snapshotted at: %s" % (options.source, datetime.datetime.now()) repo_name = options.source repo_location = options.source - + commit_message = create_commit_message(commit_id, commit_log, repo_name, repo_location) + os.linesep*2 - + if options.dest_repo == "git": verify_git_repo_clean(options.destination, options) rsync(options.source, options.destination, options) - + if options.dest_repo == "git": do_git_commit(commit_message, options) elif options.dest_repo == "none": @@ -256,10 +272,6 @@ def main(options): cwd = os.getcwd() print "No commit done by request. Please use file at:" print "%s%sif you wish to commit this to a repo later." % (cwd+"/"+file_name, os.linesep) - - - - #end main if (__name__ == "__main__"): @@ -267,7 +279,7 @@ if (__name__ == "__main__"): doctest.testmod() sys.exit(0) - try: + try: options = parse_cmdline(__doc__) main(options) except RuntimeError, e: @@ -275,5 +287,5 @@ if (__name__ == "__main__"): if "--debug" in sys.argv: traceback.print_exc() sys.exit(1) - else: + else: sys.exit(0) diff --git a/lib/kokkos/config/test_all_sandia b/lib/kokkos/config/test_all_sandia index 6909606643..8e1246bf8b 100755 --- a/lib/kokkos/config/test_all_sandia +++ b/lib/kokkos/config/test_all_sandia @@ -24,6 +24,8 @@ elif [[ "$HOSTNAME" =~ node.* ]]; then # Warning: very generic name fi elif [[ "$HOSTNAME" =~ apollo ]]; then MACHINE=apollo +elif [[ "$HOSTNAME" =~ sullivan ]]; then + MACHINE=sullivan elif [ ! -z "$SEMS_MODULEFILES_ROOT" ]; then MACHINE=sems else @@ -152,7 +154,7 @@ if [ "$MACHINE" = "sems" ]; then "gcc/5.1.0 $BASE_MODULE_LIST "Serial" g++ $GCC_WARNING_FLAGS" "intel/16.0.1 $BASE_MODULE_LIST "OpenMP" icpc $INTEL_WARNING_FLAGS" "clang/3.9.0 $BASE_MODULE_LIST "Pthread_Serial" clang++ $CLANG_WARNING_FLAGS" - "cuda/8.0.44 $CUDA8_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/config/nvcc_wrapper $CUDA_WARNING_FLAGS" + "cuda/8.0.44 $CUDA8_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" ) else # Format: (compiler module-list build-list exe-name warning-flag) @@ -164,6 +166,7 @@ if [ "$MACHINE" = "sems" ]; then "clang/3.6.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" "clang/3.7.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" "clang/3.8.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" + "clang/3.9.0 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" "cuda/7.0.28 $CUDA_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/config/nvcc_wrapper $CUDA_WARNING_FLAGS" "cuda/7.5.18 $CUDA_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/config/nvcc_wrapper $CUDA_WARNING_FLAGS" "cuda/8.0.44 $CUDA8_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/config/nvcc_wrapper $CUDA_WARNING_FLAGS" @@ -184,7 +187,7 @@ elif [ "$MACHINE" = "white" ]; then # Format: (compiler module-list build-list exe-name warning-flag) COMPILERS=("gcc/5.4.0 $BASE_MODULE_LIST $IBM_BUILD_LIST g++ $GCC_WARNING_FLAGS" "ibm/13.1.3 $IBM_MODULE_LIST $IBM_BUILD_LIST xlC $IBM_WARNING_FLAGS" - "cuda/8.0.44 $CUDA_MODULE_LIST $CUDA_IBM_BUILD_LIST ${KOKKOS_PATH}/config/nvcc_wrapper $CUDA_WARNING_FLAGS" + "cuda/8.0.44 $CUDA_MODULE_LIST $CUDA_IBM_BUILD_LIST ${KOKKOS_PATH}/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" ) if [ -z "$ARCH_FLAG" ]; then @@ -221,7 +224,7 @@ elif [ "$MACHINE" = "sullivan" ]; then BASE_MODULE_LIST="/" # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/5.3.0 $BASE_MODULE_LIST $ARM_GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS") + COMPILERS=("gcc/6.1.0 $BASE_MODULE_LIST $ARM_GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS") if [ -z "$ARCH_FLAG" ]; then ARCH_FLAG="--arch=ARMv8-ThunderX" @@ -278,11 +281,11 @@ elif [ "$MACHINE" = "apollo" ]; then "intel/16.0.1 $BASE_MODULE_LIST "OpenMP" icpc $INTEL_WARNING_FLAGS" "clang/3.9.0 $BASE_MODULE_LIST "Pthread_Serial" clang++ $CLANG_WARNING_FLAGS" "clang/head $CLANG_MODULE_LIST "Cuda_Pthread" clang++ $CUDA_WARNING_FLAGS" - "cuda/8.0.44 $CUDA_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/config/nvcc_wrapper $CUDA_WARNING_FLAGS" + "cuda/8.0.44 $CUDA_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" ) else # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("cuda/8.0.44 $CUDA8_MODULE_LIST $BUILD_LIST_CUDA_NVCC $KOKKOS_PATH/config/nvcc_wrapper $CUDA_WARNING_FLAGS" + COMPILERS=("cuda/8.0.44 $CUDA8_MODULE_LIST $BUILD_LIST_CUDA_NVCC $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" "clang/head $CLANG_MODULE_LIST $BUILD_LIST_CUDA_CLANG clang++ $CUDA_WARNING_FLAGS" "clang/3.9.0 $CLANG_MODULE_LIST $BUILD_LIST_CLANG clang++ $CLANG_WARNING_FLAGS" "gcc/4.7.2 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" @@ -295,8 +298,8 @@ elif [ "$MACHINE" = "apollo" ]; then "intel/16.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" "clang/3.5.2 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" "clang/3.6.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "cuda/7.0.28 $CUDA_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/config/nvcc_wrapper $CUDA_WARNING_FLAGS" - "cuda/7.5.18 $CUDA_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/config/nvcc_wrapper $CUDA_WARNING_FLAGS" + "cuda/7.0.28 $CUDA_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" + "cuda/7.5.18 $CUDA_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" ) fi diff --git a/lib/kokkos/config/testing_scripts/jenkins_test_driver b/lib/kokkos/config/testing_scripts/jenkins_test_driver index 9cba7fa518..f393940304 100755 --- a/lib/kokkos/config/testing_scripts/jenkins_test_driver +++ b/lib/kokkos/config/testing_scripts/jenkins_test_driver @@ -48,7 +48,7 @@ esac #nvcc wrapper and make the wrapper the compiler. if [ $cuda_compiler != "" ]; then export NVCC_WRAPPER_DEFAULT_COMPILER=$compiler - compiler=$kokkos_path/config/nvcc_wrapper + compiler=$kokkos_path/bin/nvcc_wrapper fi if [ $host_compiler_brand == "intel" -a $cuda_compiler != "" ]; then diff --git a/lib/kokkos/config/trilinos-integration/checkin-test b/lib/kokkos/config/trilinos-integration/checkin-test new file mode 100644 index 0000000000..92a1b1c068 --- /dev/null +++ b/lib/kokkos/config/trilinos-integration/checkin-test @@ -0,0 +1,4 @@ +module purge +module load sems-env sems-gcc/4.9.3 sems-openmpi/1.10.1 sems-hdf5/1.8.12/parallel sems-netcdf/4.3.2/parallel sems-python/2.7.9 sems-zlib/1.2.8/base sems-cmake/3.5.2 sems-parmetis/4.0.3/64bit_parallel sems-scotch/6.0.3/nopthread_64bit_parallel sems-boost/1.59.0/base + +#Run Trilinos CheckinTest diff --git a/lib/kokkos/config/trilinos-integration/prepare_trilinos_repos.sh b/lib/kokkos/config/trilinos-integration/prepare_trilinos_repos.sh index 2692f76038..b81a3b1566 100755 --- a/lib/kokkos/config/trilinos-integration/prepare_trilinos_repos.sh +++ b/lib/kokkos/config/trilinos-integration/prepare_trilinos_repos.sh @@ -1,5 +1,18 @@ #!/bin/bash -le +TRILINOS_UPDATE_BRANCH=$1 +TRILINOS_PRISTINE_BRANCH=$2 + +if [ -z $TRILINOS_UPDATE_BRANCH ] +then + TRILINOS_UPDATE_BRANCH=develop +fi + +if [ -z $TRILINOS_PRISTINE_BRANCH ] +then + TRILINOS_PRISTINE_BRANCH=develop +fi + export TRILINOS_UPDATED_PATH=${PWD}/trilinos-update export TRILINOS_PRISTINE_PATH=${PWD}/trilinos-pristine @@ -16,8 +29,8 @@ if [ ! -d "${TRILINOS_PRISTINE_PATH}" ]; then fi cd ${TRILINOS_UPDATED_PATH} -git checkout develop -git reset --hard origin/develop +git checkout $TRILINOS_UPDATE_BRANCH +git reset --hard origin/$TRILINOS_UPDATE_BRANCH git pull cd .. @@ -28,18 +41,14 @@ echo "" echo "" echo "Trilinos State:" git log --pretty=oneline --since=7.days -SHA=`git log --pretty=oneline --since=7.days | head -n 2 | tail -n 1 | awk '{print $1}'` cd .. cd ${TRILINOS_PRISTINE_PATH} git status -git log --pretty=oneline --since=7.days -echo "Checkout develop" -git checkout develop +echo "Checkout $TRILINOS_PRISTINE_BRANCH" +git checkout $TRILINOS_PRISTINE_BRANCH echo "Pull" git pull -echo "Checkout SHA" -git checkout ${SHA} cd .. cd ${TRILINOS_PRISTINE_PATH} diff --git a/lib/kokkos/config/trilinos-integration/shepard_jenkins_run_script_pthread_intel b/lib/kokkos/config/trilinos-integration/shepard_jenkins_run_script_pthread_intel new file mode 100755 index 0000000000..23968e8c0f --- /dev/null +++ b/lib/kokkos/config/trilinos-integration/shepard_jenkins_run_script_pthread_intel @@ -0,0 +1,60 @@ +#!/bin/bash -el +ulimit -c 0 +module load devpack/openmpi/1.10.0/intel/16.1.056/cuda/none + +KOKKOS_BRANCH=$1 +TRILINOS_UPDATE_BRANCH=$2 +TRILINOS_PRISTINE_BRANCH=$3 + +if [ -z $KOKKOS_BRANCH ] +then + KOKKOS_BRANCH=develop +fi + +if [ -z $TRILINOS_UPDATE_BRANCH ] +then + TRILINOS_UPDATE_BRANCH=develop +fi + +if [ -z $TRILINOS_PRISTINE_BRANCH ] +then + TRILINOS_PRISTINE_BRANCH=develop +fi + +export OMP_NUM_THREADS=8 +export JENKINS_DO_CUDA=OFF +export JENKINS_DO_OPENMP=OFF +export JENKINS_DO_PTHREAD=ON +export JENKINS_DO_SERIAL=OFF +export JENKINS_DO_COMPLEX=OFF + +export ARCH_CXX_FLAG="-xCORE-AVX2 -mkl" +export ARCH_C_FLAG="-xCORE-AVX2 -mkl" +export BLAS_LIBRARIES="-mkl;${MKLROOT}/lib/intel64/libmkl_intel_lp64.a;${MKLROOT}/lib/intel64/libmkl_intel_thread.a;${MKLROOT}/lib/intel64/libmkl_core.a" +export LAPACK_LIBRARIES=${BLAS_LIBRARIES} + +export JENKINS_DO_TESTS=ON +export JENKINS_DO_EXAMPLES=ON +export JENKINS_DO_SHARED=OFF + +export QUEUE=haswell + + +module load python + + +export KOKKOS_PATH=${PWD}/kokkos + +#Already done: +if [ ! -d "${KOKKOS_PATH}" ]; then + git clone https://github.com/kokkos/kokkos ${KOKKOS_PATH} +fi + +cd ${KOKKOS_PATH} +git checkout $KOKKOS_BRANCH +git pull +cd .. + +source ${KOKKOS_PATH}/config/trilinos-integration/prepare_trilinos_repos.sh $TRILINOS_UPDATE_BRANCH $TRILINOS_PRISTINE_BRANCH + +${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/run_repo_comparison_slurm ${TRILINOS_UPDATED_PATH} ${TRILINOS_PRISTINE_PATH} ${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/configure-testbeds-jenkins-all TestCompare ${QUEUE} diff --git a/lib/kokkos/config/trilinos-integration/shepard_jenkins_run_script_serial_intel b/lib/kokkos/config/trilinos-integration/shepard_jenkins_run_script_serial_intel new file mode 100755 index 0000000000..964de3a002 --- /dev/null +++ b/lib/kokkos/config/trilinos-integration/shepard_jenkins_run_script_serial_intel @@ -0,0 +1,60 @@ +#!/bin/bash -el +ulimit -c 0 +module load devpack/openmpi/1.10.0/intel/16.1.056/cuda/none + +KOKKOS_BRANCH=$1 +TRILINOS_UPDATE_BRANCH=$2 +TRILINOS_PRISTINE_BRANCH=$3 + +if [ -z $KOKKOS_BRANCH ] +then + KOKKOS_BRANCH=develop +fi + +if [ -z $TRILINOS_UPDATE_BRANCH ] +then + TRILINOS_UPDATE_BRANCH=develop +fi + +if [ -z $TRILINOS_PRISTINE_BRANCH ] +then + TRILINOS_PRISTINE_BRANCH=develop +fi + +export OMP_NUM_THREADS=8 +export JENKINS_DO_CUDA=OFF +export JENKINS_DO_OPENMP=OFF +export JENKINS_DO_PTHREAD=OFF +export JENKINS_DO_SERIAL=ON +export JENKINS_DO_COMPLEX=ON + +export ARCH_CXX_FLAG="-xCORE-AVX2 -mkl" +export ARCH_C_FLAG="-xCORE-AVX2 -mkl" +export BLAS_LIBRARIES="-mkl;${MKLROOT}/lib/intel64/libmkl_intel_lp64.a;${MKLROOT}/lib/intel64/libmkl_intel_thread.a;${MKLROOT}/lib/intel64/libmkl_core.a" +export LAPACK_LIBRARIES=${BLAS_LIBRARIES} + +export JENKINS_DO_TESTS=ON +export JENKINS_DO_EXAMPLES=ON +export JENKINS_DO_SHARED=OFF + +export QUEUE=haswell + + +module load python + + +export KOKKOS_PATH=${PWD}/kokkos + +#Already done: +if [ ! -d "${KOKKOS_PATH}" ]; then + git clone https://github.com/kokkos/kokkos ${KOKKOS_PATH} +fi + +cd ${KOKKOS_PATH} +git checkout $KOKKOS_BRANCH +git pull +cd .. + +source ${KOKKOS_PATH}/config/trilinos-integration/prepare_trilinos_repos.sh $TRILINOS_UPDATE_BRANCH $TRILINOS_PRISTINE_BRANCH + +${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/run_repo_comparison_slurm ${TRILINOS_UPDATED_PATH} ${TRILINOS_PRISTINE_PATH} ${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/configure-testbeds-jenkins-all TestCompare ${QUEUE} diff --git a/lib/kokkos/config/trilinos-integration/white_run_jenkins_script_cuda b/lib/kokkos/config/trilinos-integration/white_run_jenkins_script_cuda new file mode 100755 index 0000000000..52af024858 --- /dev/null +++ b/lib/kokkos/config/trilinos-integration/white_run_jenkins_script_cuda @@ -0,0 +1,63 @@ +#!/bin/bash -el +ulimit -c 0 + +KOKKOS_BRANCH=$1 +TRILINOS_UPDATE_BRANCH=$2 +TRILINOS_PRISTINE_BRANCH=$3 + +if [ -z $KOKKOS_BRANCH ] +then + KOKKOS_BRANCH=develop +fi + +if [ -z $TRILINOS_UPDATE_BRANCH ] +then + TRILINOS_UPDATE_BRANCH=develop +fi + +if [ -z $TRILINOS_PRISTINE_BRANCH ] +then + TRILINOS_PRISTINE_BRANCH=develop +fi + +module load devpack/openmpi/1.10.4/gcc/5.4.0/cuda/8.0.44 +export OMP_NUM_THREADS=8 +export JENKINS_DO_CUDA=ON +export JENKINS_DO_OPENMP=OFF +export JENKINS_DO_PTHREAD=OFF +export JENKINS_DO_SERIAL=ON +export JENKINS_DO_COMPLEX=OFF + +export JENKINS_ARCH_CXX_FLAG="-mcpu=power8 -arch=sm_37" +export JENKINS_ARCH_C_FLAG="-mcpu=power8" +export BLAS_LIBRARIES="${BLAS_ROOT}/lib/libblas.a;gfortran;gomp" +export LAPACK_LIBRARIES="${LAPACK_ROOT}/lib/liblapack.a;gfortran;gomp" + +export JENKINS_DO_TESTS=ON +export JENKINS_DO_EXAMPLES=ON + +export QUEUE=rhel7F + +module load python + +export KOKKOS_PATH=${PWD}/kokkos + +#Already done: +if [ ! -d "${KOKKOS_PATH}" ]; then + git clone https://github.com/kokkos/kokkos ${KOKKOS_PATH} +fi + +export OMPI_CXX=${KOKKOS_PATH}/bin/nvcc_wrapper + +cd ${KOKKOS_PATH} +git checkout $KOKKOS_BRANCH +git pull +cd .. + +export CUDA_LAUNCH_BLOCKING=1 +export CUDA_MANAGED_FORCE_DEVICE_ALLOC=1 + +source ${KOKKOS_PATH}/config/trilinos-integration/prepare_trilinos_repos.sh $TRILINOS_UPDATE_BRANCH $TRILINOS_PRISTINE_BRANCH + +${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/run_repo_comparison_lsf ${TRILINOS_UPDATED_PATH} ${TRILINOS_PRISTINE_PATH} ${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/configure-testbeds-jenkins-all TestCompare ${QUEUE} + diff --git a/lib/kokkos/config/trilinos-integration/white_run_jenkins_script_omp b/lib/kokkos/config/trilinos-integration/white_run_jenkins_script_omp new file mode 100755 index 0000000000..452165eef2 --- /dev/null +++ b/lib/kokkos/config/trilinos-integration/white_run_jenkins_script_omp @@ -0,0 +1,58 @@ +#!/bin/bash -el +ulimit -c 0 + +KOKKOS_BRANCH=$1 +TRILINOS_UPDATE_BRANCH=$2 +TRILINOS_PRISTINE_BRANCH=$3 + +if [ -z $KOKKOS_BRANCH ] +then + KOKKOS_BRANCH=develop +fi + +if [ -z $TRILINOS_UPDATE_BRANCH ] +then + TRILINOS_UPDATE_BRANCH=develop +fi + +if [ -z $TRILINOS_PRISTINE_BRANCH ] +then + TRILINOS_PRISTINE_BRANCH=develop +fi + +module load devpack/openmpi/1.10.4/gcc/5.4.0/cuda/8.0.44 +export OMP_NUM_THREADS=8 +export JENKINS_DO_CUDA=OFF +export JENKINS_DO_OPENMP=ON +export JENKINS_DO_PTHREAD=OFF +export JENKINS_DO_SERIAL=OFF +export JENKINS_DO_COMPLEX=OFF + +export JENKINS_ARCH_CXX_FLAG="-mcpu=power8" +export JENKINS_ARCH_C_FLAG="-mcpu=power8" +export BLAS_LIBRARIES="${BLAS_ROOT}/lib/libblas.a;gfortran;gomp" +export LAPACK_LIBRARIES="${LAPACK_ROOT}/lib/liblapack.a;gfortran;gomp" + +export JENKINS_DO_TESTS=ON +export JENKINS_DO_EXAMPLES=ON + +export QUEUE=rhel7F + +module load python + +export KOKKOS_PATH=${PWD}/kokkos + +#Already done: +if [ ! -d "${KOKKOS_PATH}" ]; then + git clone https://github.com/kokkos/kokkos ${KOKKOS_PATH} +fi + +cd ${KOKKOS_PATH} +git checkout $KOKKOS_BRANCH +git pull +cd .. + +source ${KOKKOS_PATH}/config/trilinos-integration/prepare_trilinos_repos.sh $TRILINOS_UPDATE_BRANCH $TRILINOS_PRISTINE_BRANCH + +${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/run_repo_comparison_lsf ${TRILINOS_UPDATED_PATH} ${TRILINOS_PRISTINE_PATH} ${TRILINOS_UPDATED_PATH}/sampleScripts/Sandia-SEMS/configure-testbeds-jenkins-all TestCompare ${QUEUE} + diff --git a/lib/kokkos/containers/performance_tests/Makefile b/lib/kokkos/containers/performance_tests/Makefile index fa3bc77701..edaaf1ee51 100644 --- a/lib/kokkos/containers/performance_tests/Makefile +++ b/lib/kokkos/containers/performance_tests/Makefile @@ -8,7 +8,7 @@ default: build_all echo "End Build" ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES))) - CXX = $(KOKKOS_PATH)/config/nvcc_wrapper + CXX = $(KOKKOS_PATH)/bin/nvcc_wrapper else CXX = g++ endif @@ -21,8 +21,8 @@ include $(KOKKOS_PATH)/Makefile.kokkos KOKKOS_CXXFLAGS += -I$(GTEST_PATH) -I${KOKKOS_PATH}/containers/performance_tests -TEST_TARGETS = -TARGETS = +TEST_TARGETS = +TARGETS = ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) OBJ_CUDA = TestCuda.o TestMain.o gtest-all.o @@ -65,7 +65,7 @@ build_all: $(TARGETS) test: $(TEST_TARGETS) -clean: kokkos-clean +clean: kokkos-clean rm -f *.o $(TARGETS) # Compilation rules @@ -73,6 +73,5 @@ clean: kokkos-clean %.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $< -gtest-all.o:$(GTEST_PATH)/gtest/gtest-all.cc +gtest-all.o:$(GTEST_PATH)/gtest/gtest-all.cc $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $(GTEST_PATH)/gtest/gtest-all.cc - diff --git a/lib/kokkos/containers/performance_tests/TestCuda.cpp b/lib/kokkos/containers/performance_tests/TestCuda.cpp index d5cad06a47..208387425f 100644 --- a/lib/kokkos/containers/performance_tests/TestCuda.cpp +++ b/lib/kokkos/containers/performance_tests/TestCuda.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,12 +36,15 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ -#include +#include +#if defined( KOKKOS_ENABLE_CUDA ) + +#include #include #include #include @@ -52,8 +55,6 @@ #include -#if defined( KOKKOS_ENABLE_CUDA ) - #include #include @@ -79,7 +80,7 @@ protected: } }; -TEST_F( cuda, dynrankview_perf ) +TEST_F( cuda, dynrankview_perf ) { std::cout << "Cuda" << std::endl; std::cout << " DynRankView vs View: Initialization Only " << std::endl; @@ -105,5 +106,6 @@ TEST_F( cuda, unordered_map_performance_far) } } - +#else +void KOKKOS_CONTAINERS_PERFORMANCE_TESTS_TESTCUDA_PREVENT_EMPTY_LINK_ERROR() {} #endif /* #if defined( KOKKOS_ENABLE_CUDA ) */ diff --git a/lib/kokkos/containers/performance_tests/TestDynRankView.hpp b/lib/kokkos/containers/performance_tests/TestDynRankView.hpp index d96a3f7432..4c0ccb6b88 100644 --- a/lib/kokkos/containers/performance_tests/TestDynRankView.hpp +++ b/lib/kokkos/containers/performance_tests/TestDynRankView.hpp @@ -1,13 +1,13 @@ //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER @@ -263,3 +263,4 @@ void test_dynrankview_op_perf( const int par_size ) } //end Performance #endif + diff --git a/lib/kokkos/containers/performance_tests/TestOpenMP.cpp b/lib/kokkos/containers/performance_tests/TestOpenMP.cpp index da74d32ac1..b674ec4a74 100644 --- a/lib/kokkos/containers/performance_tests/TestOpenMP.cpp +++ b/lib/kokkos/containers/performance_tests/TestOpenMP.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,11 +36,14 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ +#include +#if defined( KOKKOS_ENABLE_OPENMP ) + #include #include @@ -93,7 +96,7 @@ protected: } }; -TEST_F( openmp, dynrankview_perf ) +TEST_F( openmp, dynrankview_perf ) { std::cout << "OpenMP" << std::endl; std::cout << " DynRankView vs View: Initialization Only " << std::endl; @@ -137,4 +140,7 @@ TEST_F( openmp, unordered_map_performance_far) } } // namespace test +#else +void KOKKOS_CONTAINERS_PERFORMANCE_TESTS_TESTOPENMP_PREVENT_EMPTY_LINK_ERROR() {} +#endif diff --git a/lib/kokkos/containers/performance_tests/TestThreads.cpp b/lib/kokkos/containers/performance_tests/TestThreads.cpp index 4179b7de4c..a8910a3c72 100644 --- a/lib/kokkos/containers/performance_tests/TestThreads.cpp +++ b/lib/kokkos/containers/performance_tests/TestThreads.cpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,11 +36,14 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ +#include +#if defined( KOKKOS_ENABLE_THREADS ) + #include #include @@ -87,7 +90,7 @@ protected: } }; -TEST_F( threads, dynrankview_perf ) +TEST_F( threads, dynrankview_perf ) { std::cout << "Threads" << std::endl; std::cout << " DynRankView vs View: Initialization Only " << std::endl; @@ -132,4 +135,7 @@ TEST_F( threads, unordered_map_performance_far) } // namespace Performance +#else +void KOKKOS_CONTAINERS_PERFORMANCE_TESTS_TESTTHREADS_PREVENT_EMPTY_LINK_ERROR() {} +#endif diff --git a/lib/kokkos/containers/src/Kokkos_Bitset.hpp b/lib/kokkos/containers/src/Kokkos_Bitset.hpp index 74da5f61b5..7714506e92 100644 --- a/lib/kokkos/containers/src/Kokkos_Bitset.hpp +++ b/lib/kokkos/containers/src/Kokkos_Bitset.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -435,3 +435,4 @@ void deep_copy( ConstBitset & dst, ConstBitset const& src) } // namespace Kokkos #endif //KOKKOS_BITSET_HPP + diff --git a/lib/kokkos/containers/src/Kokkos_DualView.hpp b/lib/kokkos/containers/src/Kokkos_DualView.hpp index 3a0196ee4c..937eab0d88 100644 --- a/lib/kokkos/containers/src/Kokkos_DualView.hpp +++ b/lib/kokkos/containers/src/Kokkos_DualView.hpp @@ -442,6 +442,17 @@ public: modified_host () = (modified_device () > modified_host () ? modified_device () : modified_host ()) + 1; } + +#ifdef KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK + if (modified_host() && modified_device()) { + std::string msg = "Kokkos::DualView::modify ERROR: "; + msg += "Concurrent modification of host and device views "; + msg += "in DualView \""; + msg += d_view.label(); + msg += "\"\n"; + Kokkos::abort(msg.c_str()); + } +#endif } //@} @@ -624,3 +635,4 @@ deep_copy (const ExecutionSpace& exec , } // namespace Kokkos #endif + diff --git a/lib/kokkos/containers/src/Kokkos_DynRankView.hpp b/lib/kokkos/containers/src/Kokkos_DynRankView.hpp index acb37f7f75..8e464506f9 100644 --- a/lib/kokkos/containers/src/Kokkos_DynRankView.hpp +++ b/lib/kokkos/containers/src/Kokkos_DynRankView.hpp @@ -1,13 +1,13 @@ /* //@HEADER // ************************************************************************ -// +// // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation -// +// // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -36,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact H. Carter Edwards (hcedwar@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -140,21 +140,21 @@ struct DynRankDimTraits { static typename std::enable_if< (std::is_same::value) , Layout>::type createLayout( const Layout& layout ) { return Layout( layout.dimension[0] != unspecified ? layout.dimension[0] : 1 - , layout.stride[0] + , layout.stride[0] , layout.dimension[1] != unspecified ? layout.dimension[1] : 1 - , layout.stride[1] + , layout.stride[1] , layout.dimension[2] != unspecified ? layout.dimension[2] : 1 - , layout.stride[2] + , layout.stride[2] , layout.dimension[3] != unspecified ? layout.dimension[3] : 1 - , layout.stride[3] + , layout.stride[3] , layout.dimension[4] != unspecified ? layout.dimension[4] : 1 - , layout.stride[4] + , layout.stride[4] , layout.dimension[5] != unspecified ? layout.dimension[5] : 1 - , layout.stride[5] + , layout.stride[5] , layout.dimension[6] != unspecified ? layout.dimension[6] : 1 - , layout.stride[6] + , layout.stride[6] , layout.dimension[7] != unspecified ? layout.dimension[7] : 1 - , layout.stride[7] + , layout.stride[7] ); } @@ -188,7 +188,7 @@ struct DynRankDimTraits { KOKKOS_INLINE_FUNCTION static typename std::enable_if< (std::is_same::value || std::is_same::value) && std::is_integral::value , Layout >::type reconstructLayout( const Layout& layout , iType dynrank ) { - return Layout( dynrank > 0 ? layout.dimension[0] : ~size_t(0) + return Layout( dynrank > 0 ? layout.dimension[0] : ~size_t(0) , dynrank > 1 ? layout.dimension[1] : ~size_t(0) , dynrank > 2 ? layout.dimension[2] : ~size_t(0) , dynrank > 3 ? layout.dimension[3] : ~size_t(0) @@ -205,27 +205,27 @@ struct DynRankDimTraits { static typename std::enable_if< (std::is_same::value) && std::is_integral::value , Layout >::type reconstructLayout( const Layout& layout , iType dynrank ) { return Layout( dynrank > 0 ? layout.dimension[0] : ~size_t(0) - , dynrank > 0 ? layout.stride[0] : (0) + , dynrank > 0 ? layout.stride[0] : (0) , dynrank > 1 ? layout.dimension[1] : ~size_t(0) - , dynrank > 1 ? layout.stride[1] : (0) + , dynrank > 1 ? layout.stride[1] : (0) , dynrank > 2 ? layout.dimension[2] : ~size_t(0) - , dynrank > 2 ? layout.stride[2] : (0) + , dynrank > 2 ? layout.stride[2] : (0) , dynrank > 3 ? layout.dimension[3] : ~size_t(0) - , dynrank > 3 ? layout.stride[3] : (0) + , dynrank > 3 ? layout.stride[3] : (0) , dynrank > 4 ? layout.dimension[4] : ~size_t(0) - , dynrank > 4 ? layout.stride[4] : (0) + , dynrank > 4 ? layout.stride[4] : (0) , dynrank > 5 ? layout.dimension[5] : ~size_t(0) - , dynrank > 5 ? layout.stride[5] : (0) + , dynrank > 5 ? layout.stride[5] : (0) , dynrank > 6 ? layout.dimension[6] : ~size_t(0) - , dynrank > 6 ? layout.stride[6] : (0) + , dynrank > 6 ? layout.stride[6] : (0) , dynrank > 7 ? layout.dimension[7] : ~size_t(0) - , dynrank > 7 ? layout.stride[7] : (0) + , dynrank > 7 ? layout.stride[7] : (0) ); } /** \brief Debug bounds-checking routines */ -// Enhanced debug checking - most infrastructure matches that of functions in +// Enhanced debug checking - most infrastructure matches that of functions in // Kokkos_ViewMapping; additional checks for extra arguments beyond rank are 0 template< unsigned , typename iType0 , class MapType > KOKKOS_INLINE_FUNCTION @@ -235,20 +235,20 @@ bool dyn_rank_view_verify_operator_bounds( const iType0 & , const MapType & ) template< unsigned R , typename iType0 , class MapType , typename iType1 , class ... Args > KOKKOS_INLINE_FUNCTION bool dyn_rank_view_verify_operator_bounds - ( const iType0 & rank + ( const iType0 & rank , const MapType & map , const iType1 & i , Args ... args ) { - if ( static_cast(R) < rank ) { + if ( static_cast(R) < rank ) { return ( size_t(i) < map.extent(R) ) && dyn_rank_view_verify_operator_bounds( rank , map , args ... ); } else if ( i != 0 ) { printf("DynRankView Debug Bounds Checking Error: at rank %u\n Extra arguments beyond the rank must be zero \n",R); return ( false ) - && dyn_rank_view_verify_operator_bounds( rank , map , args ... ); + && dyn_rank_view_verify_operator_bounds( rank , map , args ... ); } else { return ( true ) @@ -281,20 +281,24 @@ void dyn_rank_view_error_operator_bounds } // op_rank = rank of the operator version that was called -template< typename iType0 , typename iType1 , class MapType , class ... Args > +template< typename MemorySpace + , typename iType0 , typename iType1 , class MapType , class ... Args > KOKKOS_INLINE_FUNCTION void dyn_rank_view_verify_operator_bounds - ( const iType0 & op_rank , const iType1 & rank , const char* label , const MapType & map , Args ... args ) + ( const iType0 & op_rank , const iType1 & rank + , const Kokkos::Impl::SharedAllocationTracker & tracker + , const MapType & map , Args ... args ) { if ( static_cast(rank) > op_rank ) { - Kokkos::abort( "DynRankView Bounds Checking Error: Need at least rank arguments to the operator()" ); + Kokkos::abort( "DynRankView Bounds Checking Error: Need at least rank arguments to the operator()" ); } if ( ! dyn_rank_view_verify_operator_bounds<0>( rank , map , args ... ) ) { #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) enum { LEN = 1024 }; char buffer[ LEN ]; - int n = snprintf(buffer,LEN,"DynRankView bounds error of view %s (", label); + const std::string label = tracker.template get_label(); + int n = snprintf(buffer,LEN,"DynRankView bounds error of view %s (", label.c_str()); dyn_rank_view_error_operator_bounds<0>( buffer + n , LEN - n , map , args ... ); Kokkos::Impl::throw_runtime_exception(std::string(buffer)); #else @@ -347,7 +351,7 @@ private: std::is_same< typename DstTraits::array_layout , typename SrcTraits::array_layout >::value || std::is_same< typename DstTraits::array_layout - , Kokkos::LayoutStride >::value + , Kokkos::LayoutStride >::value }; public: @@ -381,9 +385,9 @@ public: } //end Impl /* \class DynRankView - * \brief Container that creates a Kokkos view with rank determined at runtime. + * \brief Container that creates a Kokkos view with rank determined at runtime. * Essentially this is a rank 7 view that wraps the access operators - * to yield the functionality of a view + * to yield the functionality of a view * * Changes from View * 1. The rank of the DynRankView is returned by the method rank() @@ -410,14 +414,14 @@ class DynRankView : public ViewTraits< DataType , Properties ... > { static_assert( !std::is_array::value && !std::is_pointer::value , "Cannot template DynRankView with array or pointer datatype - must be pod" ); -private: +private: template < class , class ... > friend class DynRankView ; template < class , class ... > friend class Impl::ViewMapping ; -public: +public: typedef ViewTraits< DataType , Properties ... > drvtraits ; - typedef View< DataType******* , Properties...> view_type ; + typedef View< DataType******* , Properties...> view_type ; typedef ViewTraits< DataType******* , Properties ... > traits ; @@ -430,7 +434,7 @@ private: map_type m_map ; unsigned m_rank; -public: +public: KOKKOS_INLINE_FUNCTION view_type & DownCast() const { return ( view_type & ) (*this); } KOKKOS_INLINE_FUNCTION @@ -588,7 +592,7 @@ private: // rank of the calling operator - included as first argument in ARG #define KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( ARG ) \ DynRankView::template verify_space< Kokkos::Impl::ActiveExecutionMemorySpace >::check(); \ - Kokkos::Experimental::Impl::dyn_rank_view_verify_operator_bounds ARG ; + Kokkos::Experimental::Impl::dyn_rank_view_verify_operator_bounds< typename traits::memory_space > ARG ; #else @@ -607,14 +611,10 @@ public: // Rank 0 KOKKOS_INLINE_FUNCTION reference_type operator()() const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (0 , this->rank() , NULL , m_map) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (0 , this->rank() , m_track.template get_label().c_str(),m_map) ) - #endif + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (0 , this->rank(), m_track, m_map) ) return implementation_map().reference(); - //return m_map.reference(0,0,0,0,0,0,0); + //return m_map.reference(0,0,0,0,0,0,0); } // Rank 1 @@ -624,6 +624,8 @@ public: typename std::enable_if< std::is_same::value && std::is_integral::value, reference_type>::type operator[](const iType & i0) const { + //Phalanx is violating this, since they use the operator to access ALL elements in the allocation + //KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank(), m_track, m_map) ) return data()[i0]; } @@ -647,14 +649,10 @@ public: template< typename iType > KOKKOS_INLINE_FUNCTION typename std::enable_if< (std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType & i0 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank() , NULL , m_map , i0) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank() , m_track.template get_label().c_str(),m_map,i0) ) - #endif - return m_map.reference(i0); + operator()(const iType & i0 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank(), m_track, m_map, i0) ) + return m_map.reference(i0); } template< typename iType > @@ -662,11 +660,7 @@ public: typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type operator()(const iType & i0 ) const { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank() , NULL , m_map , i0) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank() , m_track.template get_label().c_str(),m_map,i0) ) - #endif + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank(), m_track, m_map, i0) ) return m_map.reference(i0,0,0,0,0,0,0); } @@ -674,155 +668,111 @@ public: template< typename iType0 , typename iType1 > KOKKOS_INLINE_FUNCTION typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (2 , this->rank() , NULL , m_map , i0 , i1) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (2 , this->rank() , m_track.template get_label().c_str(),m_map,i0,i1) ) - #endif - return m_map.reference(i0,i1); + operator()(const iType0 & i0 , const iType1 & i1 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (2 , this->rank(), m_track, m_map, i0, i1) ) + return m_map.reference(i0,i1); } template< typename iType0 , typename iType1 > KOKKOS_INLINE_FUNCTION typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (2 , this->rank() , NULL , m_map , i0 , i1) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (2 , this->rank() , m_track.template get_label().c_str(),m_map,i0,i1) ) - #endif - return m_map.reference(i0,i1,0,0,0,0,0); + operator()(const iType0 & i0 , const iType1 & i1 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (2 , this->rank(), m_track, m_map, i0, i1) ) + return m_map.reference(i0,i1,0,0,0,0,0); } // Rank 3 template< typename iType0 , typename iType1 , typename iType2 > KOKKOS_INLINE_FUNCTION typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (3 , this->rank() , NULL , m_map , i0 , i1 , i2) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (3 , this->rank() , m_track.template get_label().c_str(),m_map,i0,i1,i2) ) - #endif - return m_map.reference(i0,i1,i2); + operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (3 , this->rank(), m_track, m_map, i0, i1, i2) ) + return m_map.reference(i0,i1,i2); } template< typename iType0 , typename iType1 , typename iType2 > KOKKOS_INLINE_FUNCTION typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (3 , this->rank() , NULL , m_map , i0 , i1 , i2) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (3 , this->rank() , m_track.template get_label().c_str(),m_map,i0,i1,i2) ) - #endif - return m_map.reference(i0,i1,i2,0,0,0,0); + operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (3 , this->rank(), m_track, m_map, i0, i1, i2) ) + return m_map.reference(i0,i1,i2,0,0,0,0); } // Rank 4 template< typename iType0 , typename iType1 , typename iType2 , typename iType3 > KOKKOS_INLINE_FUNCTION typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (4 , this->rank() , NULL , m_map , i0 , i1 , i2 , i3) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (4 , this->rank() , m_track.template get_label().c_str(),m_map,i0,i1,i2,i3) ) - #endif - return m_map.reference(i0,i1,i2,i3); + operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (4 , this->rank(), m_track, m_map, i0, i1, i2, i3) ) + return m_map.reference(i0,i1,i2,i3); } template< typename iType0 , typename iType1 , typename iType2 , typename iType3 > KOKKOS_INLINE_FUNCTION typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (4 , this->rank() , NULL , m_map , i0 , i1 , i2 , i3) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (4 , this->rank() , m_track.template get_label().c_str(),m_map,i0,i1,i2,i3) ) - #endif - return m_map.reference(i0,i1,i2,i3,0,0,0); + operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (4 , this->rank(), m_track, m_map, i0, i1, i2, i3) ) + return m_map.reference(i0,i1,i2,i3,0,0,0); } // Rank 5 template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 > KOKKOS_INLINE_FUNCTION typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (5 , this->rank() , NULL , m_map , i0 , i1 , i2 , i3, i4) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (5 , this->rank() , m_track.template get_label().c_str(),m_map,i0,i1,i2,i3,i4) ) - #endif - return m_map.reference(i0,i1,i2,i3,i4); + operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (5 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4) ) + return m_map.reference(i0,i1,i2,i3,i4); } template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 > KOKKOS_INLINE_FUNCTION typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (5 , this->rank() , NULL , m_map , i0 , i1 , i2 , i3, i4) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (5 , this->rank() , m_track.template get_label().c_str(),m_map,i0,i1,i2,i3,i4) ) - #endif - return m_map.reference(i0,i1,i2,i3,i4,0,0); + operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (5 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4) ) + return m_map.reference(i0,i1,i2,i3,i4,0,0); } // Rank 6 template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 , typename iType5 > KOKKOS_INLINE_FUNCTION typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (6 , this->rank() , NULL , m_map , i0 , i1 , i2 , i3, i4 , i5) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (6 , this->rank() , m_track.template get_label().c_str(),m_map,i0,i1,i2,i3,i4,i5) ) - #endif - return m_map.reference(i0,i1,i2,i3,i4,i5); + operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (6 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5) ) + return m_map.reference(i0,i1,i2,i3,i4,i5); } template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 , typename iType5 > KOKKOS_INLINE_FUNCTION typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (6 , this->rank() , NULL , m_map , i0 , i1 , i2 , i3, i4 , i5) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (6 , this->rank() , m_track.template get_label().c_str(),m_map,i0,i1,i2,i3,i4,i5) ) - #endif - return m_map.reference(i0,i1,i2,i3,i4,i5,0); + operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (6 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5) ) + return m_map.reference(i0,i1,i2,i3,i4,i5,0); } // Rank 7 template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 , typename iType5 , typename iType6 > KOKKOS_INLINE_FUNCTION typename std::enable_if< (std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 , const iType6 & i6 ) const - { - #ifndef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (7 , this->rank() , NULL , m_map , i0 , i1 , i2 , i3, i4 , i5 , i6) ) - #else - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (7 , this->rank() , m_track.template get_label().c_str(),m_map,i0,i1,i2,i3,i4,i5,i6) ) - #endif - return m_map.reference(i0,i1,i2,i3,i4,i5,i6); + operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 , const iType6 & i6 ) const + { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (7 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5, i6) ) + return m_map.reference(i0,i1,i2,i3,i4,i5,i6); } #undef KOKKOS_IMPL_VIEW_OPERATOR_VERIFY //---------------------------------------- - // Standard constructor, destructor, and assignment operators... + // Standard constructor, destructor, and assignment operators... KOKKOS_INLINE_FUNCTION ~DynRankView() {} @@ -840,7 +790,7 @@ public: DynRankView & operator = ( const DynRankView & rhs ) { m_track = rhs.m_track; m_map = rhs.m_map; m_rank = rhs.m_rank; return *this; } KOKKOS_INLINE_FUNCTION - DynRankView & operator = ( DynRankView && rhs ) { m_track = rhs.m_track; m_map = rhs.m_map; m_rank = rhs.m_rank; return *this; } + DynRankView & operator = ( DynRankView && rhs ) { m_track = rhs.m_track; m_map = rhs.m_map; m_rank = rhs.m_rank; return *this; } //---------------------------------------- // Compatible view copy constructor and assignment @@ -1068,7 +1018,7 @@ public: DynRankView( const Label & arg_label , typename std::enable_if< Kokkos::Experimental::Impl::is_view_label

    LAMMPS Documentation :c,h3 -19 May 2017 version :c,h4 +20 Jun 2017 version :c,h4 Version info: :h4 diff --git a/src/version.h b/src/version.h index dc0ebe76b8..c2cdc6afd6 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "19 May 2017" +#define LAMMPS_VERSION "20 Jun 2017" -- GitLab From cccf72a21d6a025dd984e214ffe89c03abec8ad4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 20 Jun 2017 16:09:11 -0400 Subject: [PATCH 333/593] make certain class member list is initialized to NULL before assigned to a neighbor list --- src/USER-MISC/compute_cnp_atom.cpp | 2 +- src/compute_cna_atom.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/USER-MISC/compute_cnp_atom.cpp b/src/USER-MISC/compute_cnp_atom.cpp index 89568c6731..f479486b79 100644 --- a/src/USER-MISC/compute_cnp_atom.cpp +++ b/src/USER-MISC/compute_cnp_atom.cpp @@ -50,7 +50,7 @@ enum{NCOMMON}; ComputeCNPAtom::ComputeCNPAtom(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), - nearest(NULL), nnearest(NULL), cnpv(NULL) + list(NULL), nearest(NULL), nnearest(NULL), cnpv(NULL) { if (narg != 4) error->all(FLERR,"Illegal compute cnp/atom command"); diff --git a/src/compute_cna_atom.cpp b/src/compute_cna_atom.cpp index 9680921e5f..bd24e06cae 100644 --- a/src/compute_cna_atom.cpp +++ b/src/compute_cna_atom.cpp @@ -43,7 +43,7 @@ enum{NCOMMON,NBOND,MAXBOND,MINBOND}; ComputeCNAAtom::ComputeCNAAtom(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), - nearest(NULL), nnearest(NULL), pattern(NULL) + list(NULL), nearest(NULL), nnearest(NULL), pattern(NULL) { if (narg != 4) error->all(FLERR,"Illegal compute cna/atom command"); -- GitLab From ffa906de6ff63cd9e106ba07333c9b57087da9b5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 20 Jun 2017 16:18:34 -0400 Subject: [PATCH 334/593] add C++ format identifiers to .h files --- src/CORESHELL/compute_temp_cs.h | 2 +- src/CORESHELL/pair_born_coul_long_cs.h | 2 +- src/CORESHELL/pair_buck_coul_long_cs.h | 2 +- src/GPU/pair_lj_cubic_gpu.h | 2 +- src/GPU/pair_tersoff_gpu.h | 2 +- src/GPU/pair_tersoff_mod_gpu.h | 2 +- src/GPU/pair_tersoff_zbl_gpu.h | 2 +- src/GPU/pair_zbl_gpu.h | 2 +- src/KOKKOS/pair_buck_kokkos.h | 2 +- src/KOKKOS/pair_sw_kokkos.h | 2 +- src/KOKKOS/pair_vashishta_kokkos.h | 2 +- src/MANYBODY/pair_bop.h | 2 +- src/MANYBODY/pair_polymorphic.h | 2 +- src/MANYBODY/pair_vashishta_table.h | 2 +- src/MC/fix_atom_swap.h | 2 +- src/MC/fix_gcmc.h | 2 +- src/MC/fix_tfmc.h | 2 +- src/RIGID/fix_ehex.h | 2 +- src/USER-CGDNA/mf_oxdna.h | 2 +- src/USER-CGDNA/pair_oxdna2_coaxstk.h | 2 +- src/USER-CGDNA/pair_oxdna2_dh.h | 2 +- src/USER-CGDNA/pair_oxdna2_excv.h | 2 +- src/USER-CGDNA/pair_oxdna2_stk.h | 2 +- src/USER-CGDNA/pair_oxdna_coaxstk.h | 2 +- src/USER-CGDNA/pair_oxdna_excv.h | 2 +- src/USER-CGDNA/pair_oxdna_hbond.h | 2 +- src/USER-CGDNA/pair_oxdna_stk.h | 2 +- src/USER-CGDNA/pair_oxdna_xstk.h | 2 +- src/USER-DIFFRACTION/compute_saed.h | 2 +- src/USER-DIFFRACTION/compute_saed_consts.h | 2 +- src/USER-DIFFRACTION/compute_xrd.h | 2 +- src/USER-DIFFRACTION/compute_xrd_consts.h | 2 +- src/USER-DIFFRACTION/fix_saed_vtk.h | 2 +- src/USER-DPD/fix_dpd_energy.h | 2 +- src/USER-DPD/fix_rx.h | 2 +- src/USER-DPD/pair_exp6_rx.h | 2 +- src/USER-DPD/pair_multi_lucy_rx.h | 2 +- src/USER-DPD/pair_table_rx.h | 2 +- src/USER-MANIFOLD/fix_nve_manifold_rattle.h | 2 +- src/USER-MANIFOLD/fix_nvt_manifold_rattle.h | 2 +- src/USER-MANIFOLD/manifold.h | 2 +- src/USER-MANIFOLD/manifold_factory.h | 2 +- src/USER-MANIFOLD/manifold_gaussian_bump.h | 2 +- src/USER-MISC/fix_filter_corotate.h | 2 +- src/USER-MISC/fix_ti_spring.h | 2 +- src/USER-MISC/fix_ttm_mod.h | 2 +- src/USER-MISC/improper_distance.h | 2 +- src/USER-MISC/pair_buck_mdf.h | 2 +- src/USER-MISC/pair_edip_multi.h | 2 +- src/USER-MISC/pair_kolmogorov_crespi_z.h | 2 +- src/USER-MISC/pair_lennard_mdf.h | 2 +- src/USER-MISC/pair_lj_mdf.h | 2 +- src/USER-MISC/pair_meam_spline.h | 2 +- src/USER-MISC/pair_momb.h | 2 +- src/USER-NETCDF/dump_netcdf.h | 2 +- src/USER-NETCDF/dump_netcdf_mpiio.h | 2 +- src/USER-OMP/fix_qeq_reax_omp.h | 2 +- src/USER-OMP/pair_reaxc_omp.h | 2 +- src/USER-QTB/fix_qbmsst.h | 2 +- src/USER-QTB/fix_qtb.h | 2 +- src/USER-QUIP/pair_quip.h | 2 +- src/USER-SMD/atom_vec_smd.h | 2 +- src/USER-SMD/compute_smd_contact_radius.h | 2 +- src/USER-SMD/compute_smd_damage.h | 2 +- src/USER-SMD/compute_smd_hourglass_error.h | 2 +- src/USER-SMD/compute_smd_internal_energy.h | 2 +- src/USER-SMD/compute_smd_plastic_strain.h | 2 +- src/USER-SMD/compute_smd_plastic_strain_rate.h | 2 +- src/USER-SMD/compute_smd_rho.h | 2 +- src/USER-SMD/compute_smd_tlsph_defgrad.h | 2 +- src/USER-SMD/compute_smd_tlsph_dt.h | 2 +- src/USER-SMD/compute_smd_tlsph_num_neighs.h | 2 +- src/USER-SMD/compute_smd_tlsph_shape.h | 2 +- src/USER-SMD/compute_smd_tlsph_strain.h | 2 +- src/USER-SMD/compute_smd_tlsph_strain_rate.h | 2 +- src/USER-SMD/compute_smd_tlsph_stress.h | 2 +- src/USER-SMD/compute_smd_triangle_mesh_vertices.h | 2 +- src/USER-SMD/compute_smd_ulsph_effm.h | 2 +- src/USER-SMD/compute_smd_ulsph_num_neighs.h | 2 +- src/USER-SMD/compute_smd_ulsph_strain.h | 2 +- src/USER-SMD/compute_smd_ulsph_strain_rate.h | 2 +- src/USER-SMD/compute_smd_ulsph_stress.h | 2 +- src/USER-SMD/compute_smd_vol.h | 2 +- src/USER-SMD/fix_smd_adjust_dt.h | 2 +- src/USER-SMD/fix_smd_integrate_tlsph.h | 2 +- src/USER-SMD/fix_smd_integrate_ulsph.h | 2 +- src/USER-SMD/fix_smd_move_triangulated_surface.h | 2 +- src/USER-SMD/fix_smd_setvel.h | 2 +- src/USER-SMD/fix_smd_tlsph_reference_configuration.h | 2 +- src/USER-SMD/fix_smd_wall_surface.h | 2 +- src/USER-SMD/pair_smd_hertz.h | 2 +- src/USER-SMD/pair_smd_tlsph.h | 2 +- src/USER-SMD/pair_smd_triangulated_surface.h | 2 +- src/USER-SMD/pair_smd_ulsph.h | 2 +- src/USER-SMD/smd_kernels.h | 2 +- src/USER-SMD/smd_material_models.h | 2 +- src/USER-SMD/smd_math.h | 2 +- src/USER-SMTBQ/pair_smtbq.h | 2 +- src/USER-VTK/dump_vtk.h | 2 +- src/pair_coul_streitz.h | 2 +- 100 files changed, 100 insertions(+), 100 deletions(-) diff --git a/src/CORESHELL/compute_temp_cs.h b/src/CORESHELL/compute_temp_cs.h index 5a1d1434c3..3e93e4a68c 100644 --- a/src/CORESHELL/compute_temp_cs.h +++ b/src/CORESHELL/compute_temp_cs.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/CORESHELL/pair_born_coul_long_cs.h b/src/CORESHELL/pair_born_coul_long_cs.h index d2c8c04849..68c29e4fc2 100644 --- a/src/CORESHELL/pair_born_coul_long_cs.h +++ b/src/CORESHELL/pair_born_coul_long_cs.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/CORESHELL/pair_buck_coul_long_cs.h b/src/CORESHELL/pair_buck_coul_long_cs.h index 7f0bc149c1..d6b117d677 100644 --- a/src/CORESHELL/pair_buck_coul_long_cs.h +++ b/src/CORESHELL/pair_buck_coul_long_cs.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/GPU/pair_lj_cubic_gpu.h b/src/GPU/pair_lj_cubic_gpu.h index 1591eb8b9e..cdfc157e8e 100644 --- a/src/GPU/pair_lj_cubic_gpu.h +++ b/src/GPU/pair_lj_cubic_gpu.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/GPU/pair_tersoff_gpu.h b/src/GPU/pair_tersoff_gpu.h index 4fa358a6b1..ed3dadef5d 100644 --- a/src/GPU/pair_tersoff_gpu.h +++ b/src/GPU/pair_tersoff_gpu.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/GPU/pair_tersoff_mod_gpu.h b/src/GPU/pair_tersoff_mod_gpu.h index 6d3017669a..3967e90a70 100644 --- a/src/GPU/pair_tersoff_mod_gpu.h +++ b/src/GPU/pair_tersoff_mod_gpu.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/GPU/pair_tersoff_zbl_gpu.h b/src/GPU/pair_tersoff_zbl_gpu.h index 003e037bba..ba923ffd2f 100644 --- a/src/GPU/pair_tersoff_zbl_gpu.h +++ b/src/GPU/pair_tersoff_zbl_gpu.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/GPU/pair_zbl_gpu.h b/src/GPU/pair_zbl_gpu.h index 950fe952dd..3e6ac37394 100644 --- a/src/GPU/pair_zbl_gpu.h +++ b/src/GPU/pair_zbl_gpu.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/KOKKOS/pair_buck_kokkos.h b/src/KOKKOS/pair_buck_kokkos.h index d57e320e99..2691f10929 100644 --- a/src/KOKKOS/pair_buck_kokkos.h +++ b/src/KOKKOS/pair_buck_kokkos.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/KOKKOS/pair_sw_kokkos.h b/src/KOKKOS/pair_sw_kokkos.h index d899edfc1b..b94e39335f 100644 --- a/src/KOKKOS/pair_sw_kokkos.h +++ b/src/KOKKOS/pair_sw_kokkos.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/KOKKOS/pair_vashishta_kokkos.h b/src/KOKKOS/pair_vashishta_kokkos.h index 49c936185d..174db2cb94 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.h +++ b/src/KOKKOS/pair_vashishta_kokkos.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/MANYBODY/pair_bop.h b/src/MANYBODY/pair_bop.h index d55d9a79a4..f50c5edd00 100644 --- a/src/MANYBODY/pair_bop.h +++ b/src/MANYBODY/pair_bop.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/MANYBODY/pair_polymorphic.h b/src/MANYBODY/pair_polymorphic.h index 9b7fe761bb..9917bcd96d 100644 --- a/src/MANYBODY/pair_polymorphic.h +++ b/src/MANYBODY/pair_polymorphic.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/MANYBODY/pair_vashishta_table.h b/src/MANYBODY/pair_vashishta_table.h index a45cac5ae1..8c52f967cb 100644 --- a/src/MANYBODY/pair_vashishta_table.h +++ b/src/MANYBODY/pair_vashishta_table.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/MC/fix_atom_swap.h b/src/MC/fix_atom_swap.h index 25208a2b5a..74720d6222 100644 --- a/src/MC/fix_atom_swap.h +++ b/src/MC/fix_atom_swap.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/MC/fix_gcmc.h b/src/MC/fix_gcmc.h index 8a5375eed7..3656a1df58 100644 --- a/src/MC/fix_gcmc.h +++ b/src/MC/fix_gcmc.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/MC/fix_tfmc.h b/src/MC/fix_tfmc.h index fee3a944cd..d4f121eb90 100644 --- a/src/MC/fix_tfmc.h +++ b/src/MC/fix_tfmc.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/RIGID/fix_ehex.h b/src/RIGID/fix_ehex.h index 3220b77195..02f83df1af 100644 --- a/src/RIGID/fix_ehex.h +++ b/src/RIGID/fix_ehex.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-CGDNA/mf_oxdna.h b/src/USER-CGDNA/mf_oxdna.h index 642c325af9..56055d5fac 100644 --- a/src/USER-CGDNA/mf_oxdna.h +++ b/src/USER-CGDNA/mf_oxdna.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-CGDNA/pair_oxdna2_coaxstk.h b/src/USER-CGDNA/pair_oxdna2_coaxstk.h index 477b35ee13..be8d6d6b37 100644 --- a/src/USER-CGDNA/pair_oxdna2_coaxstk.h +++ b/src/USER-CGDNA/pair_oxdna2_coaxstk.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-CGDNA/pair_oxdna2_dh.h b/src/USER-CGDNA/pair_oxdna2_dh.h index 3af355d503..b40346e1cf 100644 --- a/src/USER-CGDNA/pair_oxdna2_dh.h +++ b/src/USER-CGDNA/pair_oxdna2_dh.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-CGDNA/pair_oxdna2_excv.h b/src/USER-CGDNA/pair_oxdna2_excv.h index 94e39a0fa2..f59daf8361 100644 --- a/src/USER-CGDNA/pair_oxdna2_excv.h +++ b/src/USER-CGDNA/pair_oxdna2_excv.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-CGDNA/pair_oxdna2_stk.h b/src/USER-CGDNA/pair_oxdna2_stk.h index b78fc89d5e..7654e5db2f 100644 --- a/src/USER-CGDNA/pair_oxdna2_stk.h +++ b/src/USER-CGDNA/pair_oxdna2_stk.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-CGDNA/pair_oxdna_coaxstk.h b/src/USER-CGDNA/pair_oxdna_coaxstk.h index b12ef6e77b..f9228c94a2 100644 --- a/src/USER-CGDNA/pair_oxdna_coaxstk.h +++ b/src/USER-CGDNA/pair_oxdna_coaxstk.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-CGDNA/pair_oxdna_excv.h b/src/USER-CGDNA/pair_oxdna_excv.h index 0308c1f48e..ec9ddee3ec 100644 --- a/src/USER-CGDNA/pair_oxdna_excv.h +++ b/src/USER-CGDNA/pair_oxdna_excv.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-CGDNA/pair_oxdna_hbond.h b/src/USER-CGDNA/pair_oxdna_hbond.h index 409241710b..1c9f37bf50 100644 --- a/src/USER-CGDNA/pair_oxdna_hbond.h +++ b/src/USER-CGDNA/pair_oxdna_hbond.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-CGDNA/pair_oxdna_stk.h b/src/USER-CGDNA/pair_oxdna_stk.h index fd0c27d38c..950c276228 100644 --- a/src/USER-CGDNA/pair_oxdna_stk.h +++ b/src/USER-CGDNA/pair_oxdna_stk.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-CGDNA/pair_oxdna_xstk.h b/src/USER-CGDNA/pair_oxdna_xstk.h index c71962ab52..5c443a4dac 100644 --- a/src/USER-CGDNA/pair_oxdna_xstk.h +++ b/src/USER-CGDNA/pair_oxdna_xstk.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-DIFFRACTION/compute_saed.h b/src/USER-DIFFRACTION/compute_saed.h index 89e57f5097..87785c4936 100644 --- a/src/USER-DIFFRACTION/compute_saed.h +++ b/src/USER-DIFFRACTION/compute_saed.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-DIFFRACTION/compute_saed_consts.h b/src/USER-DIFFRACTION/compute_saed_consts.h index 0cce0abfc2..0c07ae13ad 100644 --- a/src/USER-DIFFRACTION/compute_saed_consts.h +++ b/src/USER-DIFFRACTION/compute_saed_consts.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-DIFFRACTION/compute_xrd.h b/src/USER-DIFFRACTION/compute_xrd.h index 92a59fcf23..61e1dae1bd 100644 --- a/src/USER-DIFFRACTION/compute_xrd.h +++ b/src/USER-DIFFRACTION/compute_xrd.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-DIFFRACTION/compute_xrd_consts.h b/src/USER-DIFFRACTION/compute_xrd_consts.h index 1ca0d6bd66..582cecae01 100644 --- a/src/USER-DIFFRACTION/compute_xrd_consts.h +++ b/src/USER-DIFFRACTION/compute_xrd_consts.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-DIFFRACTION/fix_saed_vtk.h b/src/USER-DIFFRACTION/fix_saed_vtk.h index 294b003b0c..fa379e7216 100644 --- a/src/USER-DIFFRACTION/fix_saed_vtk.h +++ b/src/USER-DIFFRACTION/fix_saed_vtk.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-DPD/fix_dpd_energy.h b/src/USER-DPD/fix_dpd_energy.h index 9be41c3b9a..89ba84c08b 100644 --- a/src/USER-DPD/fix_dpd_energy.h +++ b/src/USER-DPD/fix_dpd_energy.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-DPD/fix_rx.h b/src/USER-DPD/fix_rx.h index c35c9afabf..35998963e2 100644 --- a/src/USER-DPD/fix_rx.h +++ b/src/USER-DPD/fix_rx.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-DPD/pair_exp6_rx.h b/src/USER-DPD/pair_exp6_rx.h index c16875c960..33bd6e6623 100644 --- a/src/USER-DPD/pair_exp6_rx.h +++ b/src/USER-DPD/pair_exp6_rx.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-DPD/pair_multi_lucy_rx.h b/src/USER-DPD/pair_multi_lucy_rx.h index 87d2ed7ae8..092f40f1d1 100644 --- a/src/USER-DPD/pair_multi_lucy_rx.h +++ b/src/USER-DPD/pair_multi_lucy_rx.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-DPD/pair_table_rx.h b/src/USER-DPD/pair_table_rx.h index c6afe6a8d5..34b9fd75ce 100644 --- a/src/USER-DPD/pair_table_rx.h +++ b/src/USER-DPD/pair_table_rx.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.h b/src/USER-MANIFOLD/fix_nve_manifold_rattle.h index 71aa1aed9a..2bc821ab04 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.h +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- Lammps - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.h b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.h index a9d3e3122f..144cda3799 100644 --- a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.h +++ b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- Lammps - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MANIFOLD/manifold.h b/src/USER-MANIFOLD/manifold.h index b89e765a6e..f0d56ffd82 100644 --- a/src/USER-MANIFOLD/manifold.h +++ b/src/USER-MANIFOLD/manifold.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MANIFOLD/manifold_factory.h b/src/USER-MANIFOLD/manifold_factory.h index a2f21861eb..7fdd0a6de5 100644 --- a/src/USER-MANIFOLD/manifold_factory.h +++ b/src/USER-MANIFOLD/manifold_factory.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- Lammps - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MANIFOLD/manifold_gaussian_bump.h b/src/USER-MANIFOLD/manifold_gaussian_bump.h index f3401a4a33..f31e2a4bf4 100644 --- a/src/USER-MANIFOLD/manifold_gaussian_bump.h +++ b/src/USER-MANIFOLD/manifold_gaussian_bump.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MISC/fix_filter_corotate.h b/src/USER-MISC/fix_filter_corotate.h index 3f8e8bba43..67e3fb4f01 100644 --- a/src/USER-MISC/fix_filter_corotate.h +++ b/src/USER-MISC/fix_filter_corotate.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MISC/fix_ti_spring.h b/src/USER-MISC/fix_ti_spring.h index 57c0d3299a..13f1236a8a 100644 --- a/src/USER-MISC/fix_ti_spring.h +++ b/src/USER-MISC/fix_ti_spring.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MISC/fix_ttm_mod.h b/src/USER-MISC/fix_ttm_mod.h index 3415baf5b1..21f6e57e04 100644 --- a/src/USER-MISC/fix_ttm_mod.h +++ b/src/USER-MISC/fix_ttm_mod.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MISC/improper_distance.h b/src/USER-MISC/improper_distance.h index 6301e6897a..cff96c6d9d 100644 --- a/src/USER-MISC/improper_distance.h +++ b/src/USER-MISC/improper_distance.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MISC/pair_buck_mdf.h b/src/USER-MISC/pair_buck_mdf.h index c0ecceeea8..4f9bac6341 100644 --- a/src/USER-MISC/pair_buck_mdf.h +++ b/src/USER-MISC/pair_buck_mdf.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MISC/pair_edip_multi.h b/src/USER-MISC/pair_edip_multi.h index e55916f79b..fd94594d93 100644 --- a/src/USER-MISC/pair_edip_multi.h +++ b/src/USER-MISC/pair_edip_multi.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MISC/pair_kolmogorov_crespi_z.h b/src/USER-MISC/pair_kolmogorov_crespi_z.h index 3a81e571ef..caa5dac868 100644 --- a/src/USER-MISC/pair_kolmogorov_crespi_z.h +++ b/src/USER-MISC/pair_kolmogorov_crespi_z.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MISC/pair_lennard_mdf.h b/src/USER-MISC/pair_lennard_mdf.h index 6fefe6fc3f..c4ffc80cd6 100644 --- a/src/USER-MISC/pair_lennard_mdf.h +++ b/src/USER-MISC/pair_lennard_mdf.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MISC/pair_lj_mdf.h b/src/USER-MISC/pair_lj_mdf.h index f49020bf2d..c6236a923c 100644 --- a/src/USER-MISC/pair_lj_mdf.h +++ b/src/USER-MISC/pair_lj_mdf.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MISC/pair_meam_spline.h b/src/USER-MISC/pair_meam_spline.h index 6200254674..d3554f056e 100644 --- a/src/USER-MISC/pair_meam_spline.h +++ b/src/USER-MISC/pair_meam_spline.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-MISC/pair_momb.h b/src/USER-MISC/pair_momb.h index 95b750cb2c..e08b81aa3e 100644 --- a/src/USER-MISC/pair_momb.h +++ b/src/USER-MISC/pair_momb.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-NETCDF/dump_netcdf.h b/src/USER-NETCDF/dump_netcdf.h index 036df3f058..b86f294d30 100644 --- a/src/USER-NETCDF/dump_netcdf.h +++ b/src/USER-NETCDF/dump_netcdf.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-NETCDF/dump_netcdf_mpiio.h b/src/USER-NETCDF/dump_netcdf_mpiio.h index 10b0e800d2..3ca52449a5 100644 --- a/src/USER-NETCDF/dump_netcdf_mpiio.h +++ b/src/USER-NETCDF/dump_netcdf_mpiio.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-OMP/fix_qeq_reax_omp.h b/src/USER-OMP/fix_qeq_reax_omp.h index 078ba3b9af..7565f0aff0 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.h +++ b/src/USER-OMP/fix_qeq_reax_omp.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-OMP/pair_reaxc_omp.h b/src/USER-OMP/pair_reaxc_omp.h index a5e077c309..156627ece0 100644 --- a/src/USER-OMP/pair_reaxc_omp.h +++ b/src/USER-OMP/pair_reaxc_omp.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-QTB/fix_qbmsst.h b/src/USER-QTB/fix_qbmsst.h index 3484076abf..cec54e40d8 100644 --- a/src/USER-QTB/fix_qbmsst.h +++ b/src/USER-QTB/fix_qbmsst.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-QTB/fix_qtb.h b/src/USER-QTB/fix_qtb.h index e2b7634537..5537ecb56e 100644 --- a/src/USER-QTB/fix_qtb.h +++ b/src/USER-QTB/fix_qtb.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-QUIP/pair_quip.h b/src/USER-QUIP/pair_quip.h index 15e143aee7..f86df015ea 100644 --- a/src/USER-QUIP/pair_quip.h +++ b/src/USER-QUIP/pair_quip.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-SMD/atom_vec_smd.h b/src/USER-SMD/atom_vec_smd.h index cea9a31f86..34fdfc1f76 100644 --- a/src/USER-SMD/atom_vec_smd.h +++ b/src/USER-SMD/atom_vec_smd.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_contact_radius.h b/src/USER-SMD/compute_smd_contact_radius.h index 46034f2f11..f22dce1bab 100644 --- a/src/USER-SMD/compute_smd_contact_radius.h +++ b/src/USER-SMD/compute_smd_contact_radius.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_damage.h b/src/USER-SMD/compute_smd_damage.h index 1259788ec4..c8447872c7 100644 --- a/src/USER-SMD/compute_smd_damage.h +++ b/src/USER-SMD/compute_smd_damage.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_hourglass_error.h b/src/USER-SMD/compute_smd_hourglass_error.h index d4e39ce25f..a6d1d1a1e2 100644 --- a/src/USER-SMD/compute_smd_hourglass_error.h +++ b/src/USER-SMD/compute_smd_hourglass_error.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_internal_energy.h b/src/USER-SMD/compute_smd_internal_energy.h index 0754f6fe6c..fbccfbfb7e 100644 --- a/src/USER-SMD/compute_smd_internal_energy.h +++ b/src/USER-SMD/compute_smd_internal_energy.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_plastic_strain.h b/src/USER-SMD/compute_smd_plastic_strain.h index cdc322e4cf..d2e64e31a1 100644 --- a/src/USER-SMD/compute_smd_plastic_strain.h +++ b/src/USER-SMD/compute_smd_plastic_strain.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_plastic_strain_rate.h b/src/USER-SMD/compute_smd_plastic_strain_rate.h index efc4f0c67c..03445e92f8 100644 --- a/src/USER-SMD/compute_smd_plastic_strain_rate.h +++ b/src/USER-SMD/compute_smd_plastic_strain_rate.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_rho.h b/src/USER-SMD/compute_smd_rho.h index ce749c6466..35dfdf8e91 100644 --- a/src/USER-SMD/compute_smd_rho.h +++ b/src/USER-SMD/compute_smd_rho.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_tlsph_defgrad.h b/src/USER-SMD/compute_smd_tlsph_defgrad.h index 654403e7a3..5dfa502991 100644 --- a/src/USER-SMD/compute_smd_tlsph_defgrad.h +++ b/src/USER-SMD/compute_smd_tlsph_defgrad.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_tlsph_dt.h b/src/USER-SMD/compute_smd_tlsph_dt.h index 16969a05be..09bf6c9727 100644 --- a/src/USER-SMD/compute_smd_tlsph_dt.h +++ b/src/USER-SMD/compute_smd_tlsph_dt.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_tlsph_num_neighs.h b/src/USER-SMD/compute_smd_tlsph_num_neighs.h index 77e4c5838c..da649fbce2 100644 --- a/src/USER-SMD/compute_smd_tlsph_num_neighs.h +++ b/src/USER-SMD/compute_smd_tlsph_num_neighs.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_tlsph_shape.h b/src/USER-SMD/compute_smd_tlsph_shape.h index 167e2b67e4..193657870c 100644 --- a/src/USER-SMD/compute_smd_tlsph_shape.h +++ b/src/USER-SMD/compute_smd_tlsph_shape.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_tlsph_strain.h b/src/USER-SMD/compute_smd_tlsph_strain.h index 199190c8b9..1294af2f45 100644 --- a/src/USER-SMD/compute_smd_tlsph_strain.h +++ b/src/USER-SMD/compute_smd_tlsph_strain.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_tlsph_strain_rate.h b/src/USER-SMD/compute_smd_tlsph_strain_rate.h index 9924f5e1cc..cc4ed9f5ee 100644 --- a/src/USER-SMD/compute_smd_tlsph_strain_rate.h +++ b/src/USER-SMD/compute_smd_tlsph_strain_rate.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_tlsph_stress.h b/src/USER-SMD/compute_smd_tlsph_stress.h index 3a8f6610b1..bf9079bb4f 100644 --- a/src/USER-SMD/compute_smd_tlsph_stress.h +++ b/src/USER-SMD/compute_smd_tlsph_stress.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_triangle_mesh_vertices.h b/src/USER-SMD/compute_smd_triangle_mesh_vertices.h index 1a4ff295bb..54c6055b98 100644 --- a/src/USER-SMD/compute_smd_triangle_mesh_vertices.h +++ b/src/USER-SMD/compute_smd_triangle_mesh_vertices.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_ulsph_effm.h b/src/USER-SMD/compute_smd_ulsph_effm.h index 3c2abd851d..68981fe76d 100644 --- a/src/USER-SMD/compute_smd_ulsph_effm.h +++ b/src/USER-SMD/compute_smd_ulsph_effm.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_ulsph_num_neighs.h b/src/USER-SMD/compute_smd_ulsph_num_neighs.h index 5af3bd9302..57340f01b6 100644 --- a/src/USER-SMD/compute_smd_ulsph_num_neighs.h +++ b/src/USER-SMD/compute_smd_ulsph_num_neighs.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_ulsph_strain.h b/src/USER-SMD/compute_smd_ulsph_strain.h index 2e266f4e25..a5796f34e2 100644 --- a/src/USER-SMD/compute_smd_ulsph_strain.h +++ b/src/USER-SMD/compute_smd_ulsph_strain.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_ulsph_strain_rate.h b/src/USER-SMD/compute_smd_ulsph_strain_rate.h index d2d43ef972..fc6df758e6 100644 --- a/src/USER-SMD/compute_smd_ulsph_strain_rate.h +++ b/src/USER-SMD/compute_smd_ulsph_strain_rate.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_ulsph_stress.h b/src/USER-SMD/compute_smd_ulsph_stress.h index c962449703..4e27a51723 100644 --- a/src/USER-SMD/compute_smd_ulsph_stress.h +++ b/src/USER-SMD/compute_smd_ulsph_stress.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/compute_smd_vol.h b/src/USER-SMD/compute_smd_vol.h index e946ed85ca..5525ce57cb 100644 --- a/src/USER-SMD/compute_smd_vol.h +++ b/src/USER-SMD/compute_smd_vol.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/fix_smd_adjust_dt.h b/src/USER-SMD/fix_smd_adjust_dt.h index 3b96d76d76..d7d8c922f2 100644 --- a/src/USER-SMD/fix_smd_adjust_dt.h +++ b/src/USER-SMD/fix_smd_adjust_dt.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/fix_smd_integrate_tlsph.h b/src/USER-SMD/fix_smd_integrate_tlsph.h index 7119f8d919..ca047f2dfd 100644 --- a/src/USER-SMD/fix_smd_integrate_tlsph.h +++ b/src/USER-SMD/fix_smd_integrate_tlsph.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/fix_smd_integrate_ulsph.h b/src/USER-SMD/fix_smd_integrate_ulsph.h index 19ae31a59e..ea4f46ce53 100644 --- a/src/USER-SMD/fix_smd_integrate_ulsph.h +++ b/src/USER-SMD/fix_smd_integrate_ulsph.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/fix_smd_move_triangulated_surface.h b/src/USER-SMD/fix_smd_move_triangulated_surface.h index ce4eaed88e..c851d490c5 100644 --- a/src/USER-SMD/fix_smd_move_triangulated_surface.h +++ b/src/USER-SMD/fix_smd_move_triangulated_surface.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/fix_smd_setvel.h b/src/USER-SMD/fix_smd_setvel.h index 9e5fe642eb..b987a56f6c 100644 --- a/src/USER-SMD/fix_smd_setvel.h +++ b/src/USER-SMD/fix_smd_setvel.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/fix_smd_tlsph_reference_configuration.h b/src/USER-SMD/fix_smd_tlsph_reference_configuration.h index ede06151ee..3ff693e9bb 100644 --- a/src/USER-SMD/fix_smd_tlsph_reference_configuration.h +++ b/src/USER-SMD/fix_smd_tlsph_reference_configuration.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/fix_smd_wall_surface.h b/src/USER-SMD/fix_smd_wall_surface.h index 8bd7002a9e..a32319f48f 100644 --- a/src/USER-SMD/fix_smd_wall_surface.h +++ b/src/USER-SMD/fix_smd_wall_surface.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-SMD/pair_smd_hertz.h b/src/USER-SMD/pair_smd_hertz.h index 6b40b6bb5c..0866ef7486 100644 --- a/src/USER-SMD/pair_smd_hertz.h +++ b/src/USER-SMD/pair_smd_hertz.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/pair_smd_tlsph.h b/src/USER-SMD/pair_smd_tlsph.h index 17db11b816..4c9db9209b 100644 --- a/src/USER-SMD/pair_smd_tlsph.h +++ b/src/USER-SMD/pair_smd_tlsph.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/pair_smd_triangulated_surface.h b/src/USER-SMD/pair_smd_triangulated_surface.h index 6332313646..c1eba7804e 100644 --- a/src/USER-SMD/pair_smd_triangulated_surface.h +++ b/src/USER-SMD/pair_smd_triangulated_surface.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/pair_smd_ulsph.h b/src/USER-SMD/pair_smd_ulsph.h index 40ccc37e93..032079072e 100644 --- a/src/USER-SMD/pair_smd_ulsph.h +++ b/src/USER-SMD/pair_smd_ulsph.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/smd_kernels.h b/src/USER-SMD/smd_kernels.h index ba40699fc7..6621881f4b 100644 --- a/src/USER-SMD/smd_kernels.h +++ b/src/USER-SMD/smd_kernels.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/smd_material_models.h b/src/USER-SMD/smd_material_models.h index 858c5bbbdf..c6b6f8d94c 100644 --- a/src/USER-SMD/smd_material_models.h +++ b/src/USER-SMD/smd_material_models.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMD/smd_math.h b/src/USER-SMD/smd_math.h index 5352cfccf9..b7bf9c112d 100644 --- a/src/USER-SMD/smd_math.h +++ b/src/USER-SMD/smd_math.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- * * *** Smooth Mach Dynamics *** * diff --git a/src/USER-SMTBQ/pair_smtbq.h b/src/USER-SMTBQ/pair_smtbq.h index 49fbe8768b..25dfe98888 100644 --- a/src/USER-SMTBQ/pair_smtbq.h +++ b/src/USER-SMTBQ/pair_smtbq.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/USER-VTK/dump_vtk.h b/src/USER-VTK/dump_vtk.h index 603ca114ba..8df14c7f34 100644 --- a/src/USER-VTK/dump_vtk.h +++ b/src/USER-VTK/dump_vtk.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov diff --git a/src/pair_coul_streitz.h b/src/pair_coul_streitz.h index 5f02d29c11..8e713997f5 100644 --- a/src/pair_coul_streitz.h +++ b/src/pair_coul_streitz.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov -- GitLab From 218bc92c82d5531f8eef7affb80fc9f861945c05 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 20 Jun 2017 17:13:42 -0400 Subject: [PATCH 335/593] make pre-processor defines for using libc's qsort() consistent --- src/dump.h | 4 ++-- src/irregular.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dump.h b/src/dump.h index 3c1450854e..a5582ce5a5 100644 --- a/src/dump.h +++ b/src/dump.h @@ -33,7 +33,7 @@ class Dump : protected Pointers { int comm_forward; // size of forward communication (0 if none) int comm_reverse; // size of reverse communication (0 if none) -#if defined(LMP_USE_LIBC_QSORT) +#if defined(LMP_QSORT) // static variable across all Dump objects static Dump *dumpptr; // holds a ptr to Dump currently being used #endif @@ -135,7 +135,7 @@ class Dump : protected Pointers { void pbc_allocate(); void sort(); -#if defined(LMP_USE_LIBC_QSORT) +#if defined(LMP_QSORT) static int idcompare(const void *, const void *); static int bufcompare(const void *, const void *); static int bufcompare_reverse(const void *, const void *); diff --git a/src/irregular.h b/src/irregular.h index 5b2a771847..1f74fe801b 100644 --- a/src/irregular.h +++ b/src/irregular.h @@ -21,7 +21,7 @@ namespace LAMMPS_NS { class Irregular : protected Pointers { public: -#if defined(LMP_USE_LIBC_QSORT) +#if defined(LMP_QSORT) // static variable across all Irregular objects, for qsort callback static int *proc_recv_copy; -- GitLab From 812f1a8fabd7c955164be0f89d312d800f829ff1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 20 Jun 2017 17:20:57 -0400 Subject: [PATCH 336/593] remove local variables shadowing global ones in BondsOMP() --- src/USER-OMP/reaxc_bonds_omp.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/USER-OMP/reaxc_bonds_omp.cpp b/src/USER-OMP/reaxc_bonds_omp.cpp index dcf788a79c..a89587e23c 100644 --- a/src/USER-OMP/reaxc_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_bonds_omp.cpp @@ -49,14 +49,14 @@ void BondsOMP( reax_system *system, control_params *control, startTimeBase = MPI_Wtime(); #endif - int natoms = system->n; - int nthreads = control->nthreads; + const int natoms = system->n; + const int nthreads = control->nthreads; reax_list *bonds = (*lists) + BONDS; - double gp3 = system->reax_param.gp.l[3]; - double gp4 = system->reax_param.gp.l[4]; - double gp7 = system->reax_param.gp.l[7]; - double gp10 = system->reax_param.gp.l[10]; - double gp37 = (int) system->reax_param.gp.l[37]; + const double gp3 = system->reax_param.gp.l[3]; + const double gp4 = system->reax_param.gp.l[4]; + const double gp7 = system->reax_param.gp.l[7]; + const double gp10 = system->reax_param.gp.l[10]; + const int gp37 = (int) system->reax_param.gp.l[37]; double total_Ebond = 0.0; #if defined(_OPENMP) @@ -67,7 +67,6 @@ void BondsOMP( reax_system *system, control_params *control, int start_i, end_i; int type_i, type_j; double ebond, ebond_thr=0.0, pow_BOs_be2, exp_be12, CEbo; - double gp3, gp4, gp7, gp10, gp37; double exphu, exphua1, exphub1, exphuov, hulpov, estriph, estriph_thr=0.0; double decobdbo, decobdboua, decobdboub; single_body_parameters *sbp_i, *sbp_j; -- GitLab From e13c94ed4f26c13cf2be74361a80826c8a33e82c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 20 Jun 2017 17:25:01 -0400 Subject: [PATCH 337/593] fix uninitialized variable bug spotted by coverity scan --- src/USER-TALLY/compute_heat_flux_tally.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-TALLY/compute_heat_flux_tally.cpp b/src/USER-TALLY/compute_heat_flux_tally.cpp index 65f57b7678..b366b92be3 100644 --- a/src/USER-TALLY/compute_heat_flux_tally.cpp +++ b/src/USER-TALLY/compute_heat_flux_tally.cpp @@ -246,7 +246,7 @@ void ComputeHeatFluxTally::compute_vector() double ke_i; if (rmass) ke_i = pfactor * rmass[i]; - else ke_i *= pfactor * mass[type[i]]; + else ke_i = pfactor * mass[type[i]]; ke_i *= (vi[0]*vi[0] + vi[1]*vi[1] + vi[2]*vi[2]); ke_i += eatom[i]; -- GitLab From 15c596153aaac11a9412ca3128abe76577ba3f18 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 20 Jun 2017 17:38:28 -0400 Subject: [PATCH 338/593] remove dead code --- src/USER-OMP/reaxc_bonds_omp.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/USER-OMP/reaxc_bonds_omp.cpp b/src/USER-OMP/reaxc_bonds_omp.cpp index a89587e23c..9e16919007 100644 --- a/src/USER-OMP/reaxc_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_bonds_omp.cpp @@ -50,7 +50,6 @@ void BondsOMP( reax_system *system, control_params *control, #endif const int natoms = system->n; - const int nthreads = control->nthreads; reax_list *bonds = (*lists) + BONDS; const double gp3 = system->reax_param.gp.l[3]; const double gp4 = system->reax_param.gp.l[4]; @@ -66,8 +65,8 @@ void BondsOMP( reax_system *system, control_params *control, int i, j, pj; int start_i, end_i; int type_i, type_j; - double ebond, ebond_thr=0.0, pow_BOs_be2, exp_be12, CEbo; - double exphu, exphua1, exphub1, exphuov, hulpov, estriph, estriph_thr=0.0; + double ebond, pow_BOs_be2, exp_be12, CEbo; + double exphu, exphua1, exphub1, exphuov, hulpov, estriph; double decobdbo, decobdboua, decobdboub; single_body_parameters *sbp_i, *sbp_j; two_body_parameters *twbp; -- GitLab From 2988508cee98a57fcb4ef769a406a5494fd18edf Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 20 Jun 2017 17:53:45 -0400 Subject: [PATCH 339/593] correct indexing bug in pair style lj/long/tip4p/long --- src/KSPACE/pair_lj_long_tip4p_long.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KSPACE/pair_lj_long_tip4p_long.cpp b/src/KSPACE/pair_lj_long_tip4p_long.cpp index d2a6b801fc..1dc1ca1cb4 100644 --- a/src/KSPACE/pair_lj_long_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_long_tip4p_long.cpp @@ -1337,8 +1337,8 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag) fH[1] = 0.5 * alpha * fd[1]; fH[2] = 0.5 * alpha * fd[2]; - xH1 = x[jH1]; - xH2 = x[jH2]; + xH1 = x[iH1]; + xH2 = x[iH2]; v[0] = x[i][0]*fO[0] + xH1[0]*fH[0] + xH2[0]*fH[0]; v[1] = x[i][1]*fO[1] + xH1[1]*fH[1] + xH2[1]*fH[1]; v[2] = x[i][2]*fO[2] + xH1[2]*fH[2] + xH2[2]*fH[2]; -- GitLab From 0cfe8980d4cae5eda8f316aa7939c5af1cc5f883 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 20 Jun 2017 22:07:40 -0400 Subject: [PATCH 340/593] dead code removal --- src/MANYBODY/pair_airebo.cpp | 8 ++------ src/USER-OMP/pair_airebo_omp.cpp | 8 ++------ src/USER-OMP/pair_reaxc_omp.cpp | 13 +++++++------ src/USER-OMP/reaxc_bond_orders_omp.cpp | 12 ------------ src/USER-OMP/reaxc_forces_omp.cpp | 17 +++++------------ src/USER-OMP/reaxc_multi_body_omp.cpp | 22 ++++++++++------------ src/USER-OMP/reaxc_nonbonded_omp.cpp | 8 ++------ src/USER-REAXC/fix_reaxc_species.cpp | 2 -- 8 files changed, 28 insertions(+), 62 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index d83f5a39a8..0ca80c6b76 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -1271,7 +1271,7 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], double w21,dw21,r34[3],r34mag,cos234,w34,dw34; double cross321[3],cross234[3],prefactor,SpN; double fcijpc,fcikpc,fcjlpc,fcjkpc,fcilpc; - double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom; + double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa2,at2,cw,cwnum,cwnom; double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2; double dctik,dctjk,dctjl,dctij,dctji,dctil,rik2i,rjl2i,sink2i,sinl2i; double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil,dt1dij; @@ -1856,8 +1856,6 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], aa = (prefactor*2.0*cw/cwnom)*w21*w34 * (1.0-tspjik)*(1.0-tspijl); - aaa1 = -prefactor*(1.0-square(om1234)) * - (1.0-tspjik)*(1.0-tspijl); aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34; at2 = aa*cwnum; @@ -2107,7 +2105,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, double w21,dw21,r34[3],r34mag,cos234,w34,dw34; double cross321[3],cross234[3],prefactor,SpN; double fcikpc,fcjlpc,fcjkpc,fcilpc; - double dt2dik[3],dt2djl[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom; + double dt2dik[3],dt2djl[3],aa,aaa2,at2,cw,cwnum,cwnom; double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2; double dctik,dctjk,dctjl,dctil,rik2i,rjl2i,sink2i,sinl2i; double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil; @@ -2800,8 +2798,6 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, aa = (prefactor*2.0*cw/cwnom)*w21*w34 * (1.0-tspjik)*(1.0-tspijl); - aaa1 = -prefactor*(1.0-square(om1234)) * - (1.0-tspjik)*(1.0-tspijl); aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34; at2 = aa*cwnum; diff --git a/src/USER-OMP/pair_airebo_omp.cpp b/src/USER-OMP/pair_airebo_omp.cpp index 206e8e86e6..13df133585 100644 --- a/src/USER-OMP/pair_airebo_omp.cpp +++ b/src/USER-OMP/pair_airebo_omp.cpp @@ -1038,7 +1038,7 @@ double PairAIREBOOMP::bondorder_thr(int i, int j, double rij[3], double rijmag, double w21,dw21,r34[3],r34mag,cos234,w34,dw34; double cross321[3],cross234[3],prefactor,SpN; double fcijpc,fcikpc,fcjlpc,fcjkpc,fcilpc; - double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom; + double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa2,at2,cw,cwnum,cwnom; double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2; double dctik,dctjk,dctjl,dctij,dctji,dctil,rik2i,rjl2i,sink2i,sinl2i; double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil,dt1dij; @@ -1628,8 +1628,6 @@ double PairAIREBOOMP::bondorder_thr(int i, int j, double rij[3], double rijmag, aa = (prefactor*2.0*cw/cwnom)*w21*w34 * (1.0-tspjik)*(1.0-tspijl); - aaa1 = -prefactor*(1.0-square(om1234)) * - (1.0-tspjik)*(1.0-tspijl); aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34; at2 = aa*cwnum; @@ -1879,7 +1877,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag double w21,dw21,r34[3],r34mag,cos234,w34,dw34; double cross321[3],cross234[3],prefactor,SpN; double fcikpc,fcjlpc,fcjkpc,fcilpc; - double dt2dik[3],dt2djl[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom; + double dt2dik[3],dt2djl[3],aa,aaa2,at2,cw,cwnum,cwnom; double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2; double dctik,dctjk,dctjl,dctil,rik2i,rjl2i,sink2i,sinl2i; double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil; @@ -2572,8 +2570,6 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag aa = (prefactor*2.0*cw/cwnom)*w21*w34 * (1.0-tspjik)*(1.0-tspijl); - aaa1 = -prefactor*(1.0-square(om1234)) * - (1.0-tspjik)*(1.0-tspijl); aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34; at2 = aa*cwnum; diff --git a/src/USER-OMP/pair_reaxc_omp.cpp b/src/USER-OMP/pair_reaxc_omp.cpp index 0fb24ed5f2..91fa3d38c7 100644 --- a/src/USER-OMP/pair_reaxc_omp.cpp +++ b/src/USER-OMP/pair_reaxc_omp.cpp @@ -572,17 +572,18 @@ void PairReaxCOMP::read_reax_forces(int vflag) void PairReaxCOMP::FindBond() { - int i, ii, j, pj, jtag, nj, jtmp, jj; - double bo_tmp, bo_cut, rij, rsq; - - bond_data *bo_ij; - bo_cut = 0.10; + const double bo_cut = 0.10; + int i; #if defined(_OPENMP) #pragma omp parallel for schedule(static) default(shared) \ - private(i, nj, pj, bo_ij, j, bo_tmp) + private(i) #endif for (i = 0; i < system->n; i++) { + int j, pj, nj; + double bo_tmp; + bond_data *bo_ij; + nj = 0; for( pj = Start_Index(i, lists); pj < End_Index(i, lists); ++pj ) { bo_ij = &( lists->select.bond_list[pj] ); diff --git a/src/USER-OMP/reaxc_bond_orders_omp.cpp b/src/USER-OMP/reaxc_bond_orders_omp.cpp index 222c00980e..85755a39a3 100644 --- a/src/USER-OMP/reaxc_bond_orders_omp.cpp +++ b/src/USER-OMP/reaxc_bond_orders_omp.cpp @@ -55,7 +55,6 @@ void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj, long reductionOffset = (system->N * tid); /* Virial Tallying variables */ - double f_scaler; rvec fi_tmp, fj_tmp, fk_tmp, delij, delji, delki, delkj, temp; /* Initializations */ @@ -229,14 +228,11 @@ void Add_dBond_to_Forces_NPTOMP( reax_system *system, int i, int pj, simulation_ ivec rel_box; int pk, k, j; - PairReaxCOMP *pair_reax_ptr = static_cast(system->pair_ptr); - #if defined(_OPENMP) int tid = omp_get_thread_num(); #else int tid = 0; #endif - ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); long reductionOffset = (system->N * tid); /* Initializations */ @@ -430,12 +426,9 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, #endif double p_lp1 = system->reax_param.gp.l[15]; - int num_bonds = 0; double p_boc1 = system->reax_param.gp.l[0]; double p_boc2 = system->reax_param.gp.l[1]; reax_list *bonds = (*lists) + BONDS; - int natoms = system->N; - int nthreads = control->nthreads; #if defined(_OPENMP) #pragma omp parallel default(shared) @@ -454,11 +447,6 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data, two_body_parameters *twbp; bond_order_data *bo_ij, *bo_ji; -#if defined(_OPENMP) - int tid = omp_get_thread_num(); -#else - int tid = 0; -#endif /* Calculate Deltaprime, Deltaprime_boc values */ #if defined(_OPENMP) #pragma omp for schedule(static) diff --git a/src/USER-OMP/reaxc_forces_omp.cpp b/src/USER-OMP/reaxc_forces_omp.cpp index 4e37dac38d..5e93f31125 100644 --- a/src/USER-OMP/reaxc_forces_omp.cpp +++ b/src/USER-OMP/reaxc_forces_omp.cpp @@ -265,7 +265,6 @@ void Validate_ListsOMP( reax_system *system, storage *workspace, reax_list **lis { int i, comp, Hindex; reax_list *bonds, *hbonds; - reallocate_data *realloc = &(workspace->realloc); double saferzone = system->saferzone; #if defined(_OPENMP) @@ -335,25 +334,21 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, startTimeBase = MPI_Wtime(); #endif - int i, j, pi, pj; - int start_i, end_i, start_j, end_j; + int i, j, pj; + int start_i, end_i; int type_i, type_j; int ihb, jhb, ihb_top, jhb_top; - int local, flag; - double r_ij, cutoff; + double cutoff; single_body_parameters *sbp_i, *sbp_j; two_body_parameters *twbp; far_neighbor_data *nbr_pj; reax_atom *atom_i, *atom_j; - bond_data *ibond, *jbond; reax_list *far_nbrs = *lists + FAR_NBRS; reax_list *bonds = *lists + BONDS; reax_list *hbonds = *lists + HBONDS; int num_bonds = 0; int num_hbonds = 0; int btop_i = 0; - int btop_j = 0; - int renbr = (data->step-data->prev_steps) % control->reneighbor == 0; // We will use CdDeltaReduction as a temporary (double) buffer to accumulate total_bond_order // This is safe because CdDeltaReduction is currently zeroed and its accumulation doesn't start until BondsOMP() @@ -368,8 +363,8 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, #if defined(_OPENMP) #pragma omp parallel default(shared) \ - private(i, atom_i, type_i, pi, start_i, end_i, sbp_i, btop_i, ibond, ihb, ihb_top, \ - j, atom_j, type_j, pj, start_j, end_j, sbp_j, nbr_pj, jbond, jhb, twbp) + private(i, atom_i, type_i, start_i, end_i, sbp_i, btop_i, ihb, ihb_top, \ + j, atom_j, type_j, pj, sbp_j, nbr_pj, jhb, twbp) #endif { @@ -417,7 +412,6 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control, // outside of critical section. // Start top portion of BOp() - int jj = nbr_pj->nbr; double C12, C34, C56; double BO, BO_s, BO_pi, BO_pi2; double bo_cut = control->bo_cut; @@ -602,7 +596,6 @@ void Compute_ForcesOMP( reax_system *system, control_params *control, reax_list **lists, output_controls *out_control, mpi_datatypes *mpi_data ) { - int qeq_flag; MPI_Comm comm = mpi_data->world; // Init Forces diff --git a/src/USER-OMP/reaxc_multi_body_omp.cpp b/src/USER-OMP/reaxc_multi_body_omp.cpp index acbe4ec268..ff8baa3c1a 100644 --- a/src/USER-OMP/reaxc_multi_body_omp.cpp +++ b/src/USER-OMP/reaxc_multi_body_omp.cpp @@ -50,16 +50,14 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, #endif /* Initialize parameters */ - double p_lp1 = system->reax_param.gp.l[15]; - double p_lp3 = system->reax_param.gp.l[5]; - double p_ovun3 = system->reax_param.gp.l[32]; - double p_ovun4 = system->reax_param.gp.l[31]; - double p_ovun6 = system->reax_param.gp.l[6]; - double p_ovun7 = system->reax_param.gp.l[8]; - double p_ovun8 = system->reax_param.gp.l[9]; - - int natoms = system->n; - int nthreads = control->nthreads; + const double p_lp3 = system->reax_param.gp.l[5]; + const double p_ovun3 = system->reax_param.gp.l[32]; + const double p_ovun4 = system->reax_param.gp.l[31]; + const double p_ovun6 = system->reax_param.gp.l[6]; + const double p_ovun7 = system->reax_param.gp.l[8]; + const double p_ovun8 = system->reax_param.gp.l[9]; + + const int natoms = system->n; reax_list *bonds = (*lists) + BONDS; double total_Elp = 0.0; @@ -79,11 +77,11 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, double exp_ovun2n, exp_ovun6, exp_ovun8; double inv_exp_ovun1, inv_exp_ovun2, inv_exp_ovun2n, inv_exp_ovun8; double e_un, CEunder1, CEunder2, CEunder3, CEunder4; - double eng_tmp, f_tmp; + double eng_tmp; double p_lp2, p_ovun2, p_ovun5; int numbonds; - single_body_parameters *sbp_i, *sbp_j; + single_body_parameters *sbp_i; two_body_parameters *twbp; bond_data *pbond; bond_order_data *bo_ij; diff --git a/src/USER-OMP/reaxc_nonbonded_omp.cpp b/src/USER-OMP/reaxc_nonbonded_omp.cpp index 38a6d9e860..c509be8a26 100644 --- a/src/USER-OMP/reaxc_nonbonded_omp.cpp +++ b/src/USER-OMP/reaxc_nonbonded_omp.cpp @@ -48,8 +48,6 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, reax_list **lists, output_controls *out_control ) { int natoms = system->n; - int nthreads = control->nthreads; - long totalReductionSize = system->N * nthreads; reax_list *far_nbrs = (*lists) + FAR_NBRS; double p_vdW1 = system->reax_param.gp.l[28]; double p_vdW1i = 1.0 / p_vdW1; @@ -71,7 +69,8 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, double tmp, r_ij, fn13, exp1, exp2; double Tap, dTap, dfn13, CEvd, CEclmb, de_core; double dr3gamij_1, dr3gamij_3; - double e_ele, e_ele_thr, e_vdW, e_vdW_thr, e_core, SMALL = 0.0001; + double e_ele, e_vdW, e_core; + const double SMALL = 0.0001; double e_lg, de_lg, r_ij5, r_ij6, re6; rvec temp, ext_press; two_body_parameters *twbp; @@ -92,7 +91,6 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, system->pair_ptr->vatom, thr); e_core = 0; e_vdW = 0; - e_vdW_thr = 0; e_lg = 0; de_lg = 0.0; @@ -263,8 +261,6 @@ void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *contro double SMALL = 0.0001; int natoms = system->n; reax_list *far_nbrs = (*lists) + FAR_NBRS; - int nthreads = control->nthreads; - long totalReductionSize = system->N * nthreads; double total_EvdW = 0.; double total_Eele = 0.; diff --git a/src/USER-REAXC/fix_reaxc_species.cpp b/src/USER-REAXC/fix_reaxc_species.cpp index df28a34fe8..62b3bff93e 100644 --- a/src/USER-REAXC/fix_reaxc_species.cpp +++ b/src/USER-REAXC/fix_reaxc_species.cpp @@ -514,8 +514,6 @@ void FixReaxCSpecies::FindMolecule () int *ilist; double bo_tmp,bo_cut; double **spec_atom = f_SPECBOND->array_atom; - const double * const * const x = atom->x; - const int nlocal = atom->nlocal; inum = reaxc->list->inum; ilist = reaxc->list->ilist; -- GitLab From f45c7e1fb023b6d0d67ae3ac01e02c27a4bdfbbb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 21 Jun 2017 09:36:30 -0400 Subject: [PATCH 341/593] update fix ti/spring docs to reflect it is part of USER-MISC --- doc/src/fix_ti_spring.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/src/fix_ti_spring.txt b/doc/src/fix_ti_spring.txt index 40e595e21e..afb1dcf8ff 100644 --- a/doc/src/fix_ti_spring.txt +++ b/doc/src/fix_ti_spring.txt @@ -144,7 +144,11 @@ this fix. "fix spring"_fix_spring.html, "fix adapt"_fix_adapt.html -[Restrictions:] none +[Restrictions:] + +This fix is part of the USER-MISC package. It is only enabled if +LAMMPS was built with that package. See the "Making +LAMMPS"_Section_start.html#start_3 section for more info. [Default:] -- GitLab From 1a77135ed65b932eadbc646df4e0114ed3c62cfe Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 21 Jun 2017 09:38:10 -0400 Subject: [PATCH 342/593] whitespace cleanup in docs --- doc/src/Section_commands.txt | 2 +- doc/src/Section_howto.txt | 44 +++---- doc/src/Section_packages.txt | 174 +++++++++++++-------------- doc/src/Section_python.txt | 2 +- doc/src/accelerate_intel.txt | 36 +++--- doc/src/bond_oxdna.txt | 8 +- doc/src/compute_cnp_atom.txt | 2 +- doc/src/dump_vtk.txt | 4 +- doc/src/fix_box_relax.txt | 2 +- doc/src/fix_eos_table_rx.txt | 28 ++--- doc/src/fix_filter_corotate.txt | 4 +- doc/src/fix_gcmc.txt | 2 +- doc/src/fix_grem.txt | 6 +- doc/src/fix_ipi.txt | 12 +- doc/src/fix_mscg.txt | 4 +- doc/src/fix_nve_dot.txt | 8 +- doc/src/fix_nve_dotc_langevin.txt | 32 ++--- doc/src/fix_nvk.txt | 2 +- doc/src/fix_spring.txt | 2 +- doc/src/neb.txt | 2 +- doc/src/pair_agni.txt | 12 +- doc/src/pair_buck.txt | 2 +- doc/src/pair_exp6_rx.txt | 26 ++-- doc/src/pair_kolmogorov_crespi_z.txt | 24 ++-- doc/src/pair_multi_lucy_rx.txt | 6 +- doc/src/pair_oxdna.txt | 18 +-- doc/src/pair_oxdna2.txt | 16 +-- doc/src/pair_table_rx.txt | 6 +- doc/src/python.txt | 2 +- doc/src/tutorial_github.txt | 2 +- doc/src/tutorial_pylammps.txt | 18 +-- 31 files changed, 254 insertions(+), 254 deletions(-) diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index bcffc30549..0fbab732c8 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -1073,7 +1073,7 @@ package"_Section_start.html#start_3. "table/rx"_pair_table_rx.html, "tersoff/table (o)"_pair_tersoff.html, "thole"_pair_thole.html, -"tip4p/long/soft (o)"_pair_lj_soft.html :tb(c=4,ea=c) +"tip4p/long/soft (o)"_pair_lj_soft.html :tb(c=4,ea=c) :line diff --git a/doc/src/Section_howto.txt b/doc/src/Section_howto.txt index 579cb68474..f2f2561af8 100644 --- a/doc/src/Section_howto.txt +++ b/doc/src/Section_howto.txt @@ -1938,7 +1938,7 @@ documentation in the src/library.cpp file for details, including which quantities can be queried by name: void *lammps_extract_global(void *, char *) -void lammps_extract_box(void *, double *, double *, +void lammps_extract_box(void *, double *, double *, double *, double *, double *, int *, int *) void *lammps_extract_atom(void *, char *) void *lammps_extract_compute(void *, char *, int, int) @@ -2682,14 +2682,14 @@ bond_coeff 2 25.724 0.0 :pre When running dynamics with the adiabatic core/shell model, the following issues should be considered. The relative motion of -the core and shell particles corresponds to the polarization, -hereby an instantaneous relaxation of the shells is approximated +the core and shell particles corresponds to the polarization, +hereby an instantaneous relaxation of the shells is approximated and a fast core/shell spring frequency ensures a nearly constant -internal kinetic energy during the simulation. +internal kinetic energy during the simulation. Thermostats can alter this polarization behaviour, by scaling the -internal kinetic energy, meaning the shell will not react freely to -its electrostatic environment. -Therefore it is typically desirable to decouple the relative motion of +internal kinetic energy, meaning the shell will not react freely to +its electrostatic environment. +Therefore it is typically desirable to decouple the relative motion of the core/shell pair, which is an imaginary degree of freedom, from the real physical system. To do that, the "compute temp/cs"_compute_temp_cs.html command can be used, in conjunction with @@ -2721,13 +2721,13 @@ fix thermostatequ all nve # integrator as needed f fix_modify thermoberendsen temp CSequ thermo_modify temp CSequ # output of center-of-mass derived temperature :pre -The pressure for the core/shell system is computed via the regular -LAMMPS convention by "treating the cores and shells as individual -particles"_#MitchellFincham2. For the thermo output of the pressure -as well as for the application of a barostat, it is necessary to -use an additional "pressure"_compute_pressure compute based on the -default "temperature"_compute_temp and specifying it as a second -argument in "fix modify"_fix_modify.html and +The pressure for the core/shell system is computed via the regular +LAMMPS convention by "treating the cores and shells as individual +particles"_#MitchellFincham2. For the thermo output of the pressure +as well as for the application of a barostat, it is necessary to +use an additional "pressure"_compute_pressure compute based on the +default "temperature"_compute_temp and specifying it as a second +argument in "fix modify"_fix_modify.html and "thermo_modify"_thermo_modify.html resulting in: (...) @@ -2757,18 +2757,18 @@ temp/cs"_compute_temp_cs.html command to the {temp} keyword of the velocity all create 1427 134 bias yes temp CSequ velocity all scale 1427 temp CSequ :pre -To maintain the correct polarizability of the core/shell pairs, the -kinetic energy of the internal motion shall remain nearly constant. -Therefore the choice of spring force and mass ratio need to ensure -much faster relative motion of the 2 atoms within the core/shell pair -than their center-of-mass velocity. This allows the shells to -effectively react instantaneously to the electrostatic environment and +To maintain the correct polarizability of the core/shell pairs, the +kinetic energy of the internal motion shall remain nearly constant. +Therefore the choice of spring force and mass ratio need to ensure +much faster relative motion of the 2 atoms within the core/shell pair +than their center-of-mass velocity. This allows the shells to +effectively react instantaneously to the electrostatic environment and limits energy transfer to or from the core/shell oscillators. This fast movement also dictates the timestep that can be used. The primary literature of the adiabatic core/shell model suggests that the fast relative motion of the core/shell pairs only allows negligible -energy transfer to the environment. +energy transfer to the environment. The mentioned energy transfer will typically lead to a small drift in total energy over time. This internal energy can be monitored using the "compute chunk/atom"_compute_chunk_atom.html and "compute @@ -2790,7 +2790,7 @@ pairs as chunks. For example if core/shell pairs are the only molecules: -read_data NaCl_CS_x0.1_prop.data +read_data NaCl_CS_x0.1_prop.data compute prop all property/atom molecule compute cs_chunk all chunk/atom c_prop compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0 # note the chosen degrees of freedom for the core/shell pairs diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index 14b2c0baa3..24506379c3 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -585,7 +585,7 @@ do not recommend building with other acceleration packages installed make yes-kokkos make machine :pre - + make no-kokkos make machine :pre @@ -839,13 +839,13 @@ written and read in parallel. Note that MPIIO is part of the standard message-passing interface (MPI) library, so you should not need any additional compiler or link settings, beyond what LAMMPS normally uses for MPI on your system. - + make yes-mpiio make machine :pre - + make no-mpiio make machine :pre - + [Supporting info:] src/MPIIO: filenames -> commands @@ -855,7 +855,7 @@ src/MPIIO: filenames -> commands "read_restart"_read_restart.html :ul :line - + MSCG package :link(mscg),h4 [Contents:] @@ -914,7 +914,7 @@ lib/mscg/README examples/mscg :ul :line - + OPT package :link(OPT),h4 [Contents:] @@ -1387,7 +1387,7 @@ atomic information to continuum fields. [Authors:] Reese Jones, Jeremy Templeton, Jon Zimmerman (Sandia). [Install or un-install:] - + Before building LAMMPS with this package, you must first build the ATC library in lib/atc. You can do this manually if you prefer; follow the instructions in lib/atc/README. You can also do it in one step @@ -1420,10 +1420,10 @@ usual manner: make yes-user-atc make machine :pre - + make no-user-atc make machine :pre - + [Supporting info:] src/USER-ATC: filenames -> commands @@ -1446,7 +1446,7 @@ model. [Author:] Ilya Valuev (JIHT, Russia). [Install or un-install:] - + Before building LAMMPS with this package, you must first build the AWPMD library in lib/awpmd. You can do this manually if you prefer; follow the instructions in lib/awpmd/README. You can also do it in @@ -1479,10 +1479,10 @@ usual manner: make yes-user-awpmd make machine :pre - + make no-user-awpmd make machine :pre - + [Supporting info:] src/USER-AWPMD: filenames -> commands @@ -1505,13 +1505,13 @@ stability. [Author:] Oliver Henrich (University of Strathclyde, Glasgow). [Install or un-install:] - + make yes-user-cgdna make machine :pre - + make no-user-cgdna make machine :pre - + [Supporting info:] src/USER-CGDNA: filenames -> commands @@ -1536,13 +1536,13 @@ acids. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] - + make yes-user-cgsdk make machine :pre - + make no-user-cgsdk make machine :pre - + [Supporting info:] src/USER-CGSDK: filenames -> commands @@ -1570,7 +1570,7 @@ by Giacomo Fiorin (ICMS, Temple University, Philadelphia, PA, USA) and Jerome Henin (LISM, CNRS, Marseille, France). [Install or un-install:] - + Before building LAMMPS with this package, you must first build the COLVARS library in lib/colvars. You can do this manually if you prefer; follow the instructions in lib/colvars/README. You can also @@ -1594,10 +1594,10 @@ usual manner: make yes-user-colvars make machine :pre - + make no-user-colvars make machine :pre - + [Supporting info:] src/USER-COLVARS: filenames -> commands @@ -1619,13 +1619,13 @@ intensities based on kinematic diffraction theory. [Author:] Shawn Coleman while at the U Arkansas. [Install or un-install:] - + make yes-user-diffraction make machine :pre - + make no-user-diffraction make machine :pre - + [Supporting info:] src/USER-DIFFRACTION: filenames -> commands @@ -1654,13 +1654,13 @@ algorithm. Brennan (ARL). [Install or un-install:] - + make yes-user-dpd make machine :pre - + make no-user-dpd make machine :pre - + [Supporting info:] src/USER-DPD: filenames -> commands @@ -1696,13 +1696,13 @@ tools/drude. Devemy (CNRS), and Agilio Padua (U Blaise Pascal). [Install or un-install:] - + make yes-user-drude make machine :pre - + make no-user-drude make machine :pre - + [Supporting info:] src/USER-DRUDE: filenames -> commands @@ -1734,13 +1734,13 @@ tools/eff; see its README file. [Author:] Andres Jaramillo-Botero (CalTech). [Install or un-install:] - + make yes-user-eff make machine :pre - + make no-user-eff make machine :pre - + [Supporting info:] src/USER-EFF: filenames -> commands @@ -1773,13 +1773,13 @@ for using this package in tools/fep; see its README file. [Author:] Agilio Padua (Universite Blaise Pascal Clermont-Ferrand) [Install or un-install:] - + make yes-user-fep make machine :pre - + make no-user-fep make machine :pre - + [Supporting info:] src/USER-FEP: filenames -> commands @@ -1836,13 +1836,13 @@ file. You can then install/un-install the package and build LAMMPS in the usual manner: - + make yes-user-h5md make machine :pre - + make no-user-h5md make machine :pre - + [Supporting info:] src/USER-H5MD: filenames -> commands @@ -1908,7 +1908,7 @@ explained in "Section 5.3.2"_accelerate_intel.html. make yes-user-intel yes-user-omp make machine :pre - + make no-user-intel no-user-omp make machine :pre @@ -1938,13 +1938,13 @@ can be used to model MD particles influenced by hydrodynamic forces. Ontario). [Install or un-install:] - + make yes-user-lb make machine :pre - + make no-user-lb make machine :pre - + [Supporting info:] src/USER-LB: filenames -> commands @@ -1972,13 +1972,13 @@ matrix-MGPT algorithm due to Tomas Oppelstrup at LLNL. [Authors:] Tomas Oppelstrup and John Moriarty (LLNL). [Install or un-install:] - + make yes-user-mgpt make machine :pre - + make no-user-mgpt make machine :pre - + [Supporting info:] src/USER-MGPT: filenames -> commands @@ -2000,13 +2000,13 @@ dihedral, improper, or command style. src/USER-MISC/README file. [Install or un-install:] - + make yes-user-misc make machine :pre - + make no-user-misc make machine :pre - + [Supporting info:] src/USER-MISC: filenames -> commands @@ -2031,13 +2031,13 @@ n = grad(g). Netherlands; since 2017: Brandeis University, Waltham, MA, USA) [Install or un-install:] - + make yes-user-manifold make machine :pre - + make no-user-manifold make machine :pre - + [Supporting info:] src/USER-MANIFOLD: filenames -> commands @@ -2080,7 +2080,7 @@ at [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] - + Note that the lib/molfile/Makefile.lammps file has a setting for a dynamic loading library libdl.a that should is typically present on all systems, which is required for LAMMPS to link with this package. @@ -2090,10 +2090,10 @@ lib/molfile/Makefile.lammps for details. make yes-user-molfile make machine :pre - + make no-user-molfile make machine :pre - + [Supporting info:] src/USER-MOLFILE: filenames -> commands @@ -2128,7 +2128,7 @@ tools: [Author:] Lars Pastewka (Karlsruhe Institute of Technology). [Install or un-install:] - + Note that to follow these steps, you need the standard NetCDF software package installed on your system. The lib/netcdf/Makefile.lammps file has settings for NetCDF include and library files that LAMMPS needs to @@ -2138,7 +2138,7 @@ lib/netcdf/README for details. make yes-user-netcdf make machine :pre - + make no-user-netcdf make machine :pre @@ -2178,10 +2178,10 @@ Once you have an appropriate Makefile.machine, you can install/un-install the package and build LAMMPS in the usual manner: [Install or un-install:] - + make yes-user-omp make machine :pre - + make no-user-omp make machine :pre @@ -2213,13 +2213,13 @@ relations, directly from molecular dynamics simulations. [Author:] Ling-Ti Kong (Shanghai Jiao Tong University). [Install or un-install:] - + make yes-user-phonon make machine :pre - + make no-user-phonon make machine :pre - + [Supporting info:] src/USER-PHONON: filenames -> commands @@ -2235,7 +2235,7 @@ USER-QMMM package :link(USER-QMMM),h4 A "fix qmmm"_fix_qmmm.html command which allows LAMMPS to be used in a QM/MM simulation, currently only in combination with the "Quantum -ESPRESSO"_espresso package. +ESPRESSO"_espresso package. :link(espresso,http://www.quantum-espresso.org) @@ -2275,7 +2275,7 @@ usual manner: make yes-user-qmmm make machine :pre - + make no-user-qmmm make machine :pre @@ -2284,7 +2284,7 @@ for a QM/MM simulation. You must also build Quantum ESPRESSO and create a new executable which links LAMMPS and Quanutm ESPRESSO together. These are steps 3 and 4 described in the lib/qmmm/README file. - + [Supporting info:] src/USER-QMMM: filenames -> commands @@ -2312,13 +2312,13 @@ simulation. [Author:] Yuan Shen (Stanford U). [Install or un-install:] - + make yes-user-qtb make machine :pre - + make no-user-qtb make machine :pre - + [Supporting info:] src/USER-QTB: filenames -> commands @@ -2362,10 +2362,10 @@ usual manner: make yes-user-quip make machine :pre - + make no-user-quip make machine :pre - + [Supporting info:] src/USER-QUIP: filenames -> commands @@ -2388,13 +2388,13 @@ for monitoring molecules as bonds are created and destroyed. [Author:] Hasan Metin Aktulga (MSU) while at Purdue University. [Install or un-install:] - + make yes-user-reaxc make machine :pre - + make no-user-reaxc make machine :pre - + [Supporting info:] src/USER-REAXC: filenames -> commands @@ -2451,10 +2451,10 @@ usual manner: make yes-user-smd make machine :pre - + make no-user-smd make machine :pre - + [Supporting info:] src/USER-SMD: filenames -> commands @@ -2477,13 +2477,13 @@ ionocovalent bonds in oxides. Tetot (LAAS-CNRS, France). [Install or un-install:] - + make yes-user-smtbq make machine :pre - + make no-user-smtbq make machine :pre - + [Supporting info:] src/USER-SMTBQ: filenames -> commands @@ -2516,13 +2516,13 @@ property/atom"_compute_property_atom.html command. Dynamics, Ernst Mach Institute, Germany). [Install or un-install:] - + make yes-user-sph make machine :pre - + make no-user-sph make machine :pre - + [Supporting info:] src/USER-SPH: filenames -> commands @@ -2544,13 +2544,13 @@ stress, etc) about individual interactions. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] - + make yes-user-tally make machine :pre - + make no-user-tally make machine :pre - + [Supporting info:] src/USER-TALLY: filenames -> commands @@ -2577,7 +2577,7 @@ system. [Authors:] Richard Berger (JKU) and Daniel Queteschiner (DCS Computing). [Install or un-install:] - + The lib/vtk/Makefile.lammps file has settings for accessing VTK files and its library, which are required for LAMMPS to build and link with this package. If the settings are not valid for your system, check if @@ -2590,10 +2590,10 @@ usual manner: make yes-user-vtk make machine :pre - + make no-user-vtk make machine :pre - + [Supporting info:] src/USER-VTK: filenames -> commands diff --git a/doc/src/Section_python.txt b/doc/src/Section_python.txt index 718e9e229c..1e67fca321 100644 --- a/doc/src/Section_python.txt +++ b/doc/src/Section_python.txt @@ -714,7 +714,7 @@ stored in the "image" property. All three image flags are stored in a packed format in a single integer, so count would be 1 to retrieve that integer, however also a count value of 3 can be used and then the image flags will be unpacked into 3 individual integers, ordered -in a similar fashion as coordinates. +in a similar fashion as coordinates. Note that the data structure gather_atoms("x") returns is different from the data structure returned by extract_atom("x") in four ways. diff --git a/doc/src/accelerate_intel.txt b/doc/src/accelerate_intel.txt index ed9e4ae833..f5bd66aeba 100644 --- a/doc/src/accelerate_intel.txt +++ b/doc/src/accelerate_intel.txt @@ -42,11 +42,11 @@ precision mode. Performance improvements are shown compared to LAMMPS {without using other acceleration packages} as these are under active development (and subject to performance changes). The measurements were performed using the input files available in -the src/USER-INTEL/TEST directory with the provided run script. -These are scalable in size; the results given are with 512K -particles (524K for Liquid Crystal). Most of the simulations are +the src/USER-INTEL/TEST directory with the provided run script. +These are scalable in size; the results given are with 512K +particles (524K for Liquid Crystal). Most of the simulations are standard LAMMPS benchmarks (indicated by the filename extension in -parenthesis) with modifications to the run length and to add a +parenthesis) with modifications to the run length and to add a warmup run (for use with offload benchmarks). :c,image(JPG/user_intel.png) @@ -64,30 +64,30 @@ simulation rates and instructions to reproduce. In most molecular dynamics software, parallelization parameters (# of MPI, OpenMP, and vectorization) can change the results due -to changing the order of operations with finite-precision +to changing the order of operations with finite-precision calculations. The USER-INTEL package is deterministic. This means that the results should be reproducible from run to run with the -{same} parallel configurations and when using determinstic +{same} parallel configurations and when using determinstic libraries or library settings (MPI, OpenMP, FFT). However, there are differences in the USER-INTEL package that can change the order of operations compared to LAMMPS without acceleration: Neighbor lists can be created in a different order :ulb,l Bins used for sorting atoms can be oriented differently :l -The default stencil order for PPPM is 7. By default, LAMMPS will -calculate other PPPM parameters to fit the desired acuracy with +The default stencil order for PPPM is 7. By default, LAMMPS will +calculate other PPPM parameters to fit the desired acuracy with this order :l The {newton} setting applies to all atoms, not just atoms shared between MPI tasks :l Vectorization can change the order for adding pairwise forces :l :ule -The precision mode (described below) used with the USER-INTEL -package can change the {accuracy} of the calculations. For the -default {mixed} precision option, calculations between pairs or -triplets of atoms are performed in single precision, intended to +The precision mode (described below) used with the USER-INTEL +package can change the {accuracy} of the calculations. For the +default {mixed} precision option, calculations between pairs or +triplets of atoms are performed in single precision, intended to be within the inherent error of MD simulations. All accumulation -is performed in double precision to prevent the error from growing +is performed in double precision to prevent the error from growing with the number of atoms in the simulation. {Single} precision mode should not be used without appropriate validation. @@ -106,7 +106,7 @@ $t should be 2 for Intel Xeon CPUs and 2 or 4 for Intel Xeon Phi :l For some of the simple 2-body potentials without long-range electrostatics, performance and scalability can be better with the "newton off" setting added to the input script :l -If using {kspace_style pppm} in the input script, add +If using {kspace_style pppm} in the input script, add "kspace_modify diff ad" for better performance :l :ule @@ -115,12 +115,12 @@ For Intel Xeon Phi CPUs: Runs should be performed using MCDRAM. :ulb,l :ule -For simulations using {kspace_style pppm} on Intel CPUs +For simulations using {kspace_style pppm} on Intel CPUs supporting AVX-512: Add "kspace_modify diff ad" to the input script :ulb,l -The command-line option should be changed to -"-pk intel 0 omp $r lrt yes -sf intel" where $r is the number of +The command-line option should be changed to +"-pk intel 0 omp $r lrt yes -sf intel" where $r is the number of threads minus 1. :l Do not use thread affinity (set KMP_AFFINITY=none) :l The "newton off" setting may provide better scalability :l @@ -352,7 +352,7 @@ follow in the input script. NOTE: The USER-INTEL package will perform better with modifications to the input script when "PPPM"_kspace_style.html is used: -"kspace_modify diff ad"_kspace_modify.html should be added to the +"kspace_modify diff ad"_kspace_modify.html should be added to the input script. Long-Range Thread (LRT) mode is an option to the "package diff --git a/doc/src/bond_oxdna.txt b/doc/src/bond_oxdna.txt index f9b35a167c..2add6f4c2f 100644 --- a/doc/src/bond_oxdna.txt +++ b/doc/src/bond_oxdna.txt @@ -30,7 +30,7 @@ The {oxdna/fene} and {oxdna2/fene} bond styles use the potential to define a modified finite extensible nonlinear elastic (FENE) potential "(Ouldridge)"_#oxdna_fene to model the connectivity of the phosphate backbone -in the oxDNA force field for coarse-grained modelling of DNA. +in the oxDNA force field for coarse-grained modelling of DNA. The following coefficients must be defined for the bond type via the "bond_coeff"_bond_coeff.html command as given in the above example, or in @@ -43,8 +43,8 @@ r0 (distance) :ul NOTE: The oxDNA bond style has to be used together with the corresponding oxDNA pair styles for excluded volume interaction {oxdna/excv}, stacking {oxdna/stk}, cross-stacking {oxdna/xstk} -and coaxial stacking interaction {oxdna/coaxstk} as well as hydrogen-bonding interaction {oxdna/hbond} (see also documentation of -"pair_style oxdna/excv"_pair_oxdna.html). For the oxDNA2 "(Snodin)"_#oxdna2 bond style the analogous pair styles and an additional Debye-Hueckel pair +and coaxial stacking interaction {oxdna/coaxstk} as well as hydrogen-bonding interaction {oxdna/hbond} (see also documentation of +"pair_style oxdna/excv"_pair_oxdna.html). For the oxDNA2 "(Snodin)"_#oxdna2 bond style the analogous pair styles and an additional Debye-Hueckel pair style {oxdna2/dh} have to be defined. The coefficients in the above example have to be kept fixed and cannot be changed without reparametrizing the entire model. @@ -66,7 +66,7 @@ LAMMPS"_Section_start.html#start_3 section for more info on packages. [Related commands:] -"pair_style oxdna/excv"_pair_oxdna.html, "pair_style oxdna2/excv"_pair_oxdna2.html, "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html, "bond_coeff"_bond_coeff.html +"pair_style oxdna/excv"_pair_oxdna.html, "pair_style oxdna2/excv"_pair_oxdna2.html, "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html, "bond_coeff"_bond_coeff.html [Default:] none diff --git a/doc/src/compute_cnp_atom.txt b/doc/src/compute_cnp_atom.txt index 9aa63c84de..16a51f5241 100644 --- a/doc/src/compute_cnp_atom.txt +++ b/doc/src/compute_cnp_atom.txt @@ -42,7 +42,7 @@ where the index {j} goes over the {n}i nearest neighbors of atom {i}, and the index {k} goes over the {n}ij common nearest neighbors between atom {i} and atom {j}. Rik and Rjk are the vectors connecting atom {k} to atoms {i} and {j}. The quantity in the double sum is computed -for each atom. +for each atom. The CNP calculation is sensitive to the specified cutoff value. You should ensure that the appropriate nearest neighbors of an atom are diff --git a/doc/src/dump_vtk.txt b/doc/src/dump_vtk.txt index 21502e7f49..d4d28c81fc 100644 --- a/doc/src/dump_vtk.txt +++ b/doc/src/dump_vtk.txt @@ -16,7 +16,7 @@ ID = user-assigned name for the dump group-ID = ID of the group of atoms to be dumped vtk = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) N = dump every this many timesteps -file = name of file to write dump info to +file = name of file to write dump info to args = same as arguments for "dump_style custom"_dump.html :ul [Examples:] @@ -83,7 +83,7 @@ Triclinic simulation boxes (non-orthogonal) are saved as hexahedrons in either legacy .vtk or .vtu XML format. Style {vtk} allows you to specify a list of atom attributes to be -written to the dump file for each atom. The list of possible attributes +written to the dump file for each atom. The list of possible attributes is the same as for the "dump_style custom"_dump.html command; see its doc page for a listing and an explanation of each attribute. diff --git a/doc/src/fix_box_relax.txt b/doc/src/fix_box_relax.txt index 54decd6282..e3d75ee858 100644 --- a/doc/src/fix_box_relax.txt +++ b/doc/src/fix_box_relax.txt @@ -245,7 +245,7 @@ appear the system is converging to your specified pressure. The solution for this is to either (a) zero the velocities of all atoms before performing the minimization, or (b) make sure you are monitoring the pressure without its kinetic component. The latter can -be done by outputting the pressure from the pressure compute this +be done by outputting the pressure from the pressure compute this command creates (see below) or a pressure compute you define yourself. NOTE: Because pressure is often a very sensitive function of volume, diff --git a/doc/src/fix_eos_table_rx.txt b/doc/src/fix_eos_table_rx.txt index e8d515e1f3..e5e4f772f6 100644 --- a/doc/src/fix_eos_table_rx.txt +++ b/doc/src/fix_eos_table_rx.txt @@ -45,14 +45,14 @@ species {j} in particle {i}, {u_j} is the internal energy of species j, {DeltaH_f,j} is the heat of formation of species {j}, N is the number of molecules represented by the coarse-grained particle, kb is the Boltzmann constant, and T is the temperature of the system. Additionally, -it is possible to modify the concentration-dependent particle internal -energy relation by adding an energy correction, temperature-dependent +it is possible to modify the concentration-dependent particle internal +energy relation by adding an energy correction, temperature-dependent correction, and/or a molecule-dependent correction. An energy correction can -be specified as a constant (in energy units). A temperature correction can be -specified by multiplying a temperature correction coefficient by the -internal temperature. A molecular correction can be specified by -by multiplying a molecule correction coefficient by the average number of -product gas particles in the coarse-grain particle. +be specified as a constant (in energy units). A temperature correction can be +specified by multiplying a temperature correction coefficient by the +internal temperature. A molecular correction can be specified by +by multiplying a molecule correction coefficient by the average number of +product gas particles in the coarse-grain particle. Fix {eos/table/rx} creates interpolation tables of length {N} from {m} internal energy values of each species {u_j} listed in a file as a @@ -72,12 +72,12 @@ The second filename specifies a file containing heat of formation {DeltaH_f,j} for each species. In cases where the coarse-grain particle represents a single molecular -species (i.e., no reactions occur and fix {rx} is not present in the input file), -fix {eos/table/rx} can be applied in a similar manner to fix {eos/table} -within a non-reactive DPD simulation. In this case, the heat of formation +species (i.e., no reactions occur and fix {rx} is not present in the input file), +fix {eos/table/rx} can be applied in a similar manner to fix {eos/table} +within a non-reactive DPD simulation. In this case, the heat of formation filename is replaced with the heat of formation value for the single species. -Additionally, the energy correction and temperature correction coefficients may -also be specified as fix arguments. +Additionally, the energy correction and temperature correction coefficients may +also be specified as fix arguments. :line @@ -138,8 +138,8 @@ used as the species name must correspond with the tags used to define the reactions with the "fix rx"_fix_rx.html command. Alternatively, corrections to the EOS can be included by specifying -three additional columns that correspond to the energy correction, -the temperature correction coefficient and molecule correction +three additional columns that correspond to the energy correction, +the temperature correction coefficient and molecule correction coefficient. In this case, the format of the file is as follows: # HEAT OF FORMATION TABLE (one or more comment or blank lines) :pre diff --git a/doc/src/fix_filter_corotate.txt b/doc/src/fix_filter_corotate.txt index a3339648fa..b782d285c7 100644 --- a/doc/src/fix_filter_corotate.txt +++ b/doc/src/fix_filter_corotate.txt @@ -70,8 +70,8 @@ minimization"_minimize.html. [Restrictions:] -This fix is part of the USER-MISC package. It is only enabled if -LAMMPS was built with that package. See the "Making +This fix is part of the USER-MISC package. It is only enabled if +LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. Currently, it does not support "molecule templates"_molecule.html. diff --git a/doc/src/fix_gcmc.txt b/doc/src/fix_gcmc.txt index 7ac607a2f1..41ec38cffb 100644 --- a/doc/src/fix_gcmc.txt +++ b/doc/src/fix_gcmc.txt @@ -406,7 +406,7 @@ the user for each subsequent fix gcmc command. [Default:] The option defaults are mol = no, maxangle = 10, overlap_cutoff = 0.0, -fugacity_coeff = 1, and full_energy = no, +fugacity_coeff = 1, and full_energy = no, except for the situations where full_energy is required, as listed above. diff --git a/doc/src/fix_grem.txt b/doc/src/fix_grem.txt index 3fc5c1a10e..661f68ed99 100644 --- a/doc/src/fix_grem.txt +++ b/doc/src/fix_grem.txt @@ -85,13 +85,13 @@ No information about this fix is written to "binary restart files"_restart.html. The "thermo_modify"_thermo_modify.html {press} option is supported -by this fix to add the rescaled kinetic pressure as part of +by this fix to add the rescaled kinetic pressure as part of "thermodynamic output"_thermo_style.html. [Restrictions:] -This fix is part of the USER-MISC package. It is only enabled if -LAMMPS was built with that package. See the "Making +This fix is part of the USER-MISC package. It is only enabled if +LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. [Related commands:] diff --git a/doc/src/fix_ipi.txt b/doc/src/fix_ipi.txt index b1533830bc..07e8025d77 100644 --- a/doc/src/fix_ipi.txt +++ b/doc/src/fix_ipi.txt @@ -58,14 +58,14 @@ input are listed in the same order as in the data file of LAMMPS. The initial configuration is ignored, as it will be substituted with the coordinates received from i-PI before forces are ever evaluated. -A note of caution when using potentials that contain long-range +A note of caution when using potentials that contain long-range electrostatics, or that contain parameters that depend on box size: all of these options will be initialized based on the cell size in the -LAMMPS-side initial configuration and kept constant during the run. -This is required to e.g. obtain reproducible and conserved forces. -If the cell varies too wildly, it may be advisable to reinitialize -these interactions at each call. This behavior can be requested by -setting the {reset} switch. +LAMMPS-side initial configuration and kept constant during the run. +This is required to e.g. obtain reproducible and conserved forces. +If the cell varies too wildly, it may be advisable to reinitialize +these interactions at each call. This behavior can be requested by +setting the {reset} switch. [Restart, fix_modify, output, run start/stop, minimize info:] diff --git a/doc/src/fix_mscg.txt b/doc/src/fix_mscg.txt index 0e09f8a9c5..7d16967955 100644 --- a/doc/src/fix_mscg.txt +++ b/doc/src/fix_mscg.txt @@ -57,7 +57,7 @@ simulations is as follows: Perform all-atom simulations on the system to be coarse grained. Generate a trajectory mapped to the coarse-grained model. Create input files for the MS-CG library. -Run the range finder functionality of the MS-CG library. +Run the range finder functionality of the MS-CG library. Run the force matching functionality of the MS-CG library. Check the results of the force matching. Run coarse-grained simulations using the new coarse-grained potentials. :ol @@ -70,7 +70,7 @@ Step 2 can be performed using a Python script (what is the name?) provided with the MS-CG library which defines the coarse-grained model and converts a standard LAMMPS dump file for an all-atom simulation (step 1) into a LAMMPS dump file which has the positions of and forces -on the coarse-grained beads. +on the coarse-grained beads. In step 3, an input file named "control.in" is needed by the MS-CG library which sets parameters for the range finding and force matching diff --git a/doc/src/fix_nve_dot.txt b/doc/src/fix_nve_dot.txt index b1c00cd25c..7ad51f3768 100644 --- a/doc/src/fix_nve_dot.txt +++ b/doc/src/fix_nve_dot.txt @@ -23,13 +23,13 @@ fix 1 all nve/dot :pre [Description:] Apply a rigid-body integrator as described in "(Davidchack)"_#Davidchack1 -to a group of atoms, but without Langevin dynamics. +to a group of atoms, but without Langevin dynamics. This command performs Molecular dynamics (MD) -via a velocity-Verlet algorithm and an evolution operator that rotates -the quaternion degrees of freedom, similar to the scheme outlined in "(Miller)"_#Miller1. +via a velocity-Verlet algorithm and an evolution operator that rotates +the quaternion degrees of freedom, similar to the scheme outlined in "(Miller)"_#Miller1. This command is the equivalent of the "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html -without damping and noise and can be used to determine the stability range +without damping and noise and can be used to determine the stability range in a NVE ensemble prior to using the Langevin-type DOTC-integrator (see also "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html). The command is equivalent to the "fix nve"_fix_nve.html. diff --git a/doc/src/fix_nve_dotc_langevin.txt b/doc/src/fix_nve_dotc_langevin.txt index 19d5b233ce..5de8e663c4 100644 --- a/doc/src/fix_nve_dotc_langevin.txt +++ b/doc/src/fix_nve_dotc_langevin.txt @@ -28,20 +28,20 @@ fix 1 all nve/dotc/langevin 1.0 1.0 0.03 457145 angmom 10 :pre [Description:] -Apply a rigid-body Langevin-type integrator of the kind "Langevin C" +Apply a rigid-body Langevin-type integrator of the kind "Langevin C" as described in "(Davidchack)"_#Davidchack2 to a group of atoms, which models an interaction with an implicit background solvent. This command performs Brownian dynamics (BD) -via a technique that splits the integration into a deterministic Hamiltonian -part and the Ornstein-Uhlenbeck process for noise and damping. +via a technique that splits the integration into a deterministic Hamiltonian +part and the Ornstein-Uhlenbeck process for noise and damping. The quaternion degrees of freedom are updated though an evolution operator which performs a rotation in quaternion space, preserves the quaternion norm and is akin to "(Miller)"_#Miller2. -In terms of syntax this command has been closely modelled on the -"fix langevin"_fix_langevin.html and its {angmom} option. But it combines -the "fix nve"_fix_nve.html and the "fix langevin"_fix_langevin.html in -one single command. The main feature is improved stability +In terms of syntax this command has been closely modelled on the +"fix langevin"_fix_langevin.html and its {angmom} option. But it combines +the "fix nve"_fix_nve.html and the "fix langevin"_fix_langevin.html in +one single command. The main feature is improved stability over the standard integrator, permitting slightly larger timestep sizes. NOTE: Unlike the "fix langevin"_fix_langevin.html this command performs @@ -57,7 +57,7 @@ Fc is the conservative force computed via the usual inter-particle interactions ("pair_style"_pair_style.html, "bond_style"_bond_style.html, etc). -The Ff and Fr terms are implicitly taken into account by this fix +The Ff and Fr terms are implicitly taken into account by this fix on a per-particle basis. Ff is a frictional drag or viscous damping term proportional to the @@ -77,7 +77,7 @@ a Gaussian random number) for speed. :line -{Tstart} and {Tstop} have to be constant values, i.e. they cannot +{Tstart} and {Tstop} have to be constant values, i.e. they cannot be variables. The {damp} parameter is specified in time units and determines how @@ -98,16 +98,16 @@ different numbers of processors. The keyword/value option has to be used in the following way: -This fix has to be used together with the {angmom} keyword. The -particles are always considered to have a finite size. -The keyword {angmom} enables thermostatting of the rotational degrees of -freedom in addition to the usual translational degrees of freedom. +This fix has to be used together with the {angmom} keyword. The +particles are always considered to have a finite size. +The keyword {angmom} enables thermostatting of the rotational degrees of +freedom in addition to the usual translational degrees of freedom. -The scale factor after the {angmom} keyword gives the ratio of the rotational to +The scale factor after the {angmom} keyword gives the ratio of the rotational to the translational friction coefficient. An example input file can be found in /examples/USER/cgdna/examples/duplex2/. -A technical report with more information on this integrator can be found +A technical report with more information on this integrator can be found "here"_PDF/USER-CGDNA-overview.pdf. :line @@ -120,7 +120,7 @@ LAMMPS"_Section_start.html#start_3 section for more info on packages. [Related commands:] -"fix nve"_fix_nve.html, "fix langevin"_fix_langevin.html, "fix nve/dot"_fix_nve_dot.html, +"fix nve"_fix_nve.html, "fix langevin"_fix_langevin.html, "fix nve/dot"_fix_nve_dot.html, [Default:] none diff --git a/doc/src/fix_nvk.txt b/doc/src/fix_nvk.txt index 271483b441..49fd8217ab 100644 --- a/doc/src/fix_nvk.txt +++ b/doc/src/fix_nvk.txt @@ -27,7 +27,7 @@ timestep. V is volume; K is kinetic energy. This creates a system trajectory consistent with the isokinetic ensemble. The equations of motion used are those of Minary et al in -"(Minary)"_#nvk-Minary, a variant of those initially given by Zhang in +"(Minary)"_#nvk-Minary, a variant of those initially given by Zhang in "(Zhang)"_#nvk-Zhang. The kinetic energy will be held constant at its value given when fix diff --git a/doc/src/fix_spring.txt b/doc/src/fix_spring.txt index 5f94f4cdae..014a43aacc 100644 --- a/doc/src/fix_spring.txt +++ b/doc/src/fix_spring.txt @@ -89,7 +89,7 @@ NOTE: The center of mass of a group of atoms is calculated in group can straddle a periodic boundary. See the "dump"_dump.html doc page for a discussion of unwrapped coordinates. It also means that a spring connecting two groups or a group and the tether point can cross -a periodic boundary and its length be calculated correctly. +a periodic boundary and its length be calculated correctly. [Restart, fix_modify, output, run start/stop, minimize info:] diff --git a/doc/src/neb.txt b/doc/src/neb.txt index a4afc2fe6d..d2e8be3f03 100644 --- a/doc/src/neb.txt +++ b/doc/src/neb.txt @@ -344,7 +344,7 @@ informations can help understanding what is going wrong. For instance when the path angle becomes accute the definition of tangent used in the NEB calculation is questionable and the NEB cannot may diverge "(Maras)"_#Maras2. - + When running on multiple partitions, LAMMPS produces additional log files for each partition, e.g. log.lammps.0, log.lammps.1, etc. For a diff --git a/doc/src/pair_agni.txt b/doc/src/pair_agni.txt index 27fb6c10fe..06dcccb9d9 100644 --- a/doc/src/pair_agni.txt +++ b/doc/src/pair_agni.txt @@ -40,8 +40,8 @@ vectorial atomic forces. Only a single pair_coeff command is used with the {agni} style which specifies an AGNI potential file containing the parameters of the -force field for the needed elements. These are mapped to LAMMPS atom -types by specifying N additional arguments after the filename in the +force field for the needed elements. These are mapped to LAMMPS atom +types by specifying N additional arguments after the filename in the pair_coeff command, where N is the number of LAMMPS atom types: filename @@ -52,13 +52,13 @@ to specify the path for the force field file. An AGNI force field is fully specified by the filename which contains the parameters of the force field, i.e., the reference training environments -used to construct the machine learning force field. Example force field -and input files are provided in the examples/USER/misc/agni directory. +used to construct the machine learning force field. Example force field +and input files are provided in the examples/USER/misc/agni directory. :line -Styles with {omp} suffix is functionally the same as the corresponding -style without the suffix. They have been optimized to run faster, depending +Styles with {omp} suffix is functionally the same as the corresponding +style without the suffix. They have been optimized to run faster, depending on your available hardware, as discussed in "Section 5"_Section_accelerate.html of the manual. The accelerated style takes the same arguments and should produce the same results, except for round-off and precision diff --git a/doc/src/pair_buck.txt b/doc/src/pair_buck.txt index 49161404c3..e705e735fb 100644 --- a/doc/src/pair_buck.txt +++ b/doc/src/pair_buck.txt @@ -75,7 +75,7 @@ Lennard-Jones 12/6) given by :c,image(Eqs/pair_buck.jpg) where rho is an ionic-pair dependent length parameter, and Rc is the -cutoff on both terms. +cutoff on both terms. The styles with {coul/cut} or {coul/long} or {coul/msm} add a Coulombic term as described for the "lj/cut"_pair_lj.html pair styles. diff --git a/doc/src/pair_exp6_rx.txt b/doc/src/pair_exp6_rx.txt index 47045a5933..cbc17d357d 100644 --- a/doc/src/pair_exp6_rx.txt +++ b/doc/src/pair_exp6_rx.txt @@ -55,33 +55,33 @@ defined in the reaction kinetics files specified with the "fix rx"_fix_rx.html command or they must correspond to the tag "1fluid", signifying interaction with a product species mixture determined through a one-fluid approximation. The interaction potential is -weighted by the geometric average of either the mole fraction concentrations -or the number of molecules associated with the interacting coarse-grained -particles (see the {fractional} or {molecular} weighting pair style options). +weighted by the geometric average of either the mole fraction concentrations +or the number of molecules associated with the interacting coarse-grained +particles (see the {fractional} or {molecular} weighting pair style options). The coarse-grained potential is stored before and after the reaction kinetics solver is applied, where the difference is defined to be the internal chemical energy (uChem). -The fourth argument specifies the type of scaling that will be used +The fourth argument specifies the type of scaling that will be used to scale the EXP-6 parameters as reactions occur. Currently, there are three scaling options: {exponent}, {polynomial} and {none}. -Exponent scaling requires two additional arguments for scaling +Exponent scaling requires two additional arguments for scaling the {Rm} and {epsilon} parameters, respectively. The scaling factor -is computed by phi^exponent, where phi is the number of molecules -represented by the coarse-grain particle and exponent is specified +is computed by phi^exponent, where phi is the number of molecules +represented by the coarse-grain particle and exponent is specified as a pair coefficient argument for {Rm} and {epsilon}, respectively. -The {Rm} and {epsilon} parameters are multiplied by the scaling +The {Rm} and {epsilon} parameters are multiplied by the scaling factor to give the scaled interaction parameters for the CG particle. -Polynomial scaling requires a filename to be specified as a pair +Polynomial scaling requires a filename to be specified as a pair coeff argument. The file contains the coefficients to a fifth order -polynomial for the {alpha}, {epsilon} and {Rm} parameters that depend -upon phi (the number of molecules represented by the CG particle). +polynomial for the {alpha}, {epsilon} and {Rm} parameters that depend +upon phi (the number of molecules represented by the CG particle). The format of a polynomial file is provided below. The {none} option to the scaling does not have any additional pair coeff -arguments. This is equivalent to specifying the {exponent} option with +arguments. This is equivalent to specifying the {exponent} option with {Rm} and {epsilon} exponents of 0.0 and 0.0, respectively. The final argument specifies the interaction cutoff (optional). @@ -102,7 +102,7 @@ parenthesized comments): # POLYNOMIAL FILE (one or more comment or blank lines) :pre # General Functional Form: -# A*phi^5 + B*phi^4 + C*phi^3 + D*phi^2 + E*phi + F +# A*phi^5 + B*phi^4 + C*phi^3 + D*phi^2 + E*phi + F # # Parameter A B C D E F (blank) diff --git a/doc/src/pair_kolmogorov_crespi_z.txt b/doc/src/pair_kolmogorov_crespi_z.txt index 0879dc34d0..c7a6d4194f 100644 --- a/doc/src/pair_kolmogorov_crespi_z.txt +++ b/doc/src/pair_kolmogorov_crespi_z.txt @@ -24,25 +24,25 @@ pair_coeff 1 2 kolmogorov/crespi/z CC.KC C C :pre [Description:] -The {kolmogorov/crespi/z} style computes the Kolmogorov-Crespi interaction -potential as described in "(KC05)"_#KC05. An important simplification is made, -which is to take all normals along the z-axis. +The {kolmogorov/crespi/z} style computes the Kolmogorov-Crespi interaction +potential as described in "(KC05)"_#KC05. An important simplification is made, +which is to take all normals along the z-axis. :c,image(Eqs/pair_kolmogorov_crespi_z.jpg) -It is important to have a suffiently large cutoff to ensure smooth forces. -Energies are shifted so that they go continously to zero at the cutoff assuming +It is important to have a suffiently large cutoff to ensure smooth forces. +Energies are shifted so that they go continously to zero at the cutoff assuming that the exponential part of {Vij} (first term) decays sufficiently fast. This shift is achieved by the last term in the equation for {Vij} above. -This potential is intended for interactions between two layers of graphene. -Therefore, to avoid interaction between layers in multi-layered materials, -each layer should have a separate atom type and interactions should only +This potential is intended for interactions between two layers of graphene. +Therefore, to avoid interaction between layers in multi-layered materials, +each layer should have a separate atom type and interactions should only be computed between atom types of neighbouring layers. -The parameter file (e.g. CC.KC), is intended for use with metal -"units"_units.html, with energies in meV. An additional parameter, {S}, -is available to facilitate scaling of energies in accordance with +The parameter file (e.g. CC.KC), is intended for use with metal +"units"_units.html, with energies in meV. An additional parameter, {S}, +is available to facilitate scaling of energies in accordance with "(vanWijk)"_#vanWijk. This potential must be used in combination with hybrid/overlay. @@ -64,7 +64,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. :line -:link(KC05) +:link(KC05) [(KC05)] A. N. Kolmogorov, V. H. Crespi, Phys. Rev. B 71, 235415 (2005) :link(vanWijk) diff --git a/doc/src/pair_multi_lucy_rx.txt b/doc/src/pair_multi_lucy_rx.txt index bf5d5636fe..77ed223e2a 100644 --- a/doc/src/pair_multi_lucy_rx.txt +++ b/doc/src/pair_multi_lucy_rx.txt @@ -97,9 +97,9 @@ tags must either correspond to the species defined in the reaction kinetics files specified with the "fix rx"_fix_rx.html command or they must correspond to the tag "1fluid", signifying interaction with a product species mixture determined through a one-fluid approximation. -The interaction potential is weighted by the geometric average of -either the mole fraction concentrations or the number of molecules -associated with the interacting coarse-grained particles (see the +The interaction potential is weighted by the geometric average of +either the mole fraction concentrations or the number of molecules +associated with the interacting coarse-grained particles (see the {fractional} or {molecular} weighting pair style options). The coarse-grained potential is stored before and after the reaction kinetics solver is applied, where the difference is defined to be the internal chemical energy (uChem). diff --git a/doc/src/pair_oxdna.txt b/doc/src/pair_oxdna.txt index 0a07417fd0..d9734f122d 100644 --- a/doc/src/pair_oxdna.txt +++ b/doc/src/pair_oxdna.txt @@ -39,17 +39,17 @@ pair_coeff * * oxdna/coaxstk 46.0 0.4 0.6 0.22 0.58 2.0 2.541592653589793 0.65 1 [Description:] -The {oxdna} pair styles compute the pairwise-additive parts of the oxDNA force field -for coarse-grained modelling of DNA. The effective interaction between the nucleotides consists of potentials for the +The {oxdna} pair styles compute the pairwise-additive parts of the oxDNA force field +for coarse-grained modelling of DNA. The effective interaction between the nucleotides consists of potentials for the excluded volume interaction {oxdna/excv}, the stacking {oxdna/stk}, cross-stacking {oxdna/xstk} and coaxial stacking interaction {oxdna/coaxstk} as well as the hydrogen-bonding interaction {oxdna/hbond} between complementary pairs of nucleotides on opposite strands. -The exact functional form of the pair styles is rather complex, which manifests itself in the 144 coefficients -in the above example. The individual potentials consist of products of modulation factors, -which themselves are constructed from a number of more basic potentials -(Morse, Lennard-Jones, harmonic angle and distance) as well as quadratic smoothing and modulation terms. +The exact functional form of the pair styles is rather complex, which manifests itself in the 144 coefficients +in the above example. The individual potentials consist of products of modulation factors, +which themselves are constructed from a number of more basic potentials +(Morse, Lennard-Jones, harmonic angle and distance) as well as quadratic smoothing and modulation terms. We refer to "(Ouldridge-DPhil)"_#Ouldridge-DPhil1 and "(Ouldridge)"_#Ouldridge1 for a detailed description of the oxDNA force field. @@ -57,8 +57,8 @@ NOTE: These pair styles have to be used together with the related oxDNA bond sty {oxdna/fene} for the connectivity of the phosphate backbone (see also documentation of "bond_style oxdna/fene"_bond_oxdna.html). With one exception the coefficients in the above example have to be kept fixed and cannot be changed without reparametrizing the entire model. -The exception is the first coefficient after {oxdna/stk} (T=0.1 in the above example). -When using a Langevin thermostat, e.g. through "fix langevin"_fix_langevin.html +The exception is the first coefficient after {oxdna/stk} (T=0.1 in the above example). +When using a Langevin thermostat, e.g. through "fix langevin"_fix_langevin.html or "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html the temperature coefficients have to be matched to the one used in the fix. @@ -79,7 +79,7 @@ LAMMPS"_Section_start.html#start_3 section for more info on packages. [Related commands:] -"bond_style oxdna/fene"_bond_oxdna.html, "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html, "pair_coeff"_pair_coeff.html, +"bond_style oxdna/fene"_bond_oxdna.html, "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html, "pair_coeff"_pair_coeff.html, "bond_style oxdna2/fene"_bond_oxdna.html, "pair_style oxdna2/excv"_pair_oxdna2.html [Default:] none diff --git a/doc/src/pair_oxdna2.txt b/doc/src/pair_oxdna2.txt index 1cc562d5f1..1728a0bc7b 100644 --- a/doc/src/pair_oxdna2.txt +++ b/doc/src/pair_oxdna2.txt @@ -45,17 +45,17 @@ pair_coeff * * oxdna2/dh 0.1 1.0 0.815 :pre [Description:] -The {oxdna2} pair styles compute the pairwise-additive parts of the oxDNA force field -for coarse-grained modelling of DNA. The effective interaction between the nucleotides consists of potentials for the +The {oxdna2} pair styles compute the pairwise-additive parts of the oxDNA force field +for coarse-grained modelling of DNA. The effective interaction between the nucleotides consists of potentials for the excluded volume interaction {oxdna2/excv}, the stacking {oxdna2/stk}, cross-stacking {oxdna2/xstk} and coaxial stacking interaction {oxdna2/coaxstk}, electrostatic Debye-Hueckel interaction {oxdna2/dh} as well as the hydrogen-bonding interaction {oxdna2/hbond} between complementary pairs of nucleotides on opposite strands. -The exact functional form of the pair styles is rather complex. -The individual potentials consist of products of modulation factors, -which themselves are constructed from a number of more basic potentials -(Morse, Lennard-Jones, harmonic angle and distance) as well as quadratic smoothing and modulation terms. +The exact functional form of the pair styles is rather complex. +The individual potentials consist of products of modulation factors, +which themselves are constructed from a number of more basic potentials +(Morse, Lennard-Jones, harmonic angle and distance) as well as quadratic smoothing and modulation terms. We refer to "(Snodin)"_#Snodin and the original oxDNA publications "(Ouldridge-DPhil)"_#Ouldridge-DPhil2 and "(Ouldridge)"_#Ouldridge2 for a detailed description of the oxDNA2 force field. @@ -63,7 +63,7 @@ NOTE: These pair styles have to be used together with the related oxDNA2 bond st {oxdna2/fene} for the connectivity of the phosphate backbone (see also documentation of "bond_style oxdna2/fene"_bond_oxdna.html). Almost all coefficients in the above example have to be kept fixed and cannot be changed without reparametrizing the entire model. -Exceptions are the first coefficient after {oxdna2/stk} (T=0.1 in the above example) and the coefficients +Exceptions are the first coefficient after {oxdna2/stk} (T=0.1 in the above example) and the coefficients after {oxdna2/dh} (T=0.1, rhos=1.0, qeff=0.815 in the above example). When using a Langevin thermostat e.g. through "fix langevin"_fix_langevin.html or "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html the temperature coefficients have to be matched to the one used in the fix. @@ -86,7 +86,7 @@ LAMMPS"_Section_start.html#start_3 section for more info on packages. [Related commands:] "bond_style oxdna2/fene"_bond_oxdna.html, "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html, "pair_coeff"_pair_coeff.html, -"bond_style oxdna/fene"_bond_oxdna.html, "pair_style oxdna/excv"_pair_oxdna.html +"bond_style oxdna/fene"_bond_oxdna.html, "pair_style oxdna/excv"_pair_oxdna.html [Default:] none diff --git a/doc/src/pair_table_rx.txt b/doc/src/pair_table_rx.txt index d089a4f9da..f93af21da4 100644 --- a/doc/src/pair_table_rx.txt +++ b/doc/src/pair_table_rx.txt @@ -85,9 +85,9 @@ tags must either correspond to the species defined in the reaction kinetics files specified with the "fix rx"_fix_rx.html command or they must correspond to the tag "1fluid", signifying interaction with a product species mixture determined through a one-fluid approximation. -The interaction potential is weighted by the geometric average of -either the mole fraction concentrations or the number of molecules -associated with the interacting coarse-grained particles (see the +The interaction potential is weighted by the geometric average of +either the mole fraction concentrations or the number of molecules +associated with the interacting coarse-grained particles (see the {fractional} or {molecular} weighting pair style options). The coarse-grained potential is stored before and after the reaction kinetics solver is applied, where the difference is defined to be the internal chemical energy (uChem). diff --git a/doc/src/python.txt b/doc/src/python.txt index e00b90234c..c6538ded45 100644 --- a/doc/src/python.txt +++ b/doc/src/python.txt @@ -489,7 +489,7 @@ python"_Section_python.html. Note that it is important that the stand-alone LAMMPS executable and the LAMMPS shared library be consistent (built from the same source code files) in order for this to work. If the two have been built at different times using -different source files, problems may occur. +different source files, problems may occur. [Related commands:] diff --git a/doc/src/tutorial_github.txt b/doc/src/tutorial_github.txt index d6ec22589b..3e10b821ae 100644 --- a/doc/src/tutorial_github.txt +++ b/doc/src/tutorial_github.txt @@ -86,7 +86,7 @@ machine via HTTPS: or, if you have set up your GitHub account for using SSH keys, via SSH: $ git clone git@github.com:/lammps.git :pre - + You can find the proper URL by clicking the "Clone or download"-button: :c,image(JPG/tutorial_https_block.png) diff --git a/doc/src/tutorial_pylammps.txt b/doc/src/tutorial_pylammps.txt index 0b4fb32ed2..78cdd241fb 100644 --- a/doc/src/tutorial_pylammps.txt +++ b/doc/src/tutorial_pylammps.txt @@ -36,7 +36,7 @@ lammps.PyLammps :h4 higher-level abstraction built on top of original C-Types interface manipulation of Python objects -communication with LAMMPS is hidden from API user +communication with LAMMPS is hidden from API user shorter, more concise Python better IPython integration, designed for quick prototyping :ul @@ -328,7 +328,7 @@ IPyLammps Examples :h2 Examples of IPython notebooks can be found in the python/examples/pylammps subdirectory. To open these notebooks launch {jupyter notebook} inside this -directory and navigate to one of them. If you compiled and installed +directory and navigate to one of them. If you compiled and installed a LAMMPS shared library with exceptions, PNG, JPEG and FFMPEG support you should be able to rerun all of these notebooks. @@ -399,19 +399,19 @@ natoms = L.system.natoms :pre for i in range(niterations): iatom = random.randrange(0, natoms) current_atom = L.atoms\[iatom\] :pre - + x0, y0 = current_atom.position :pre - + dx = deltamove * random.uniform(-1, 1) dy = deltamove * random.uniform(-1, 1) :pre - + current_atom.position = (x0+dx, y0+dy) :pre - + L.run(1, "pre no post no") :pre - + e = L.eval("pe") energies.append(e) :pre - + if e <= elast: naccept += 1 elast = e @@ -460,4 +460,4 @@ Feedback and Contributing :h2 If you find this Python interface useful, please feel free to provide feedback and ideas on how to improve it to Richard Berger (richard.berger@temple.edu). We also want to encourage people to write tutorial style IPython notebooks showcasing LAMMPS usage -and maybe their latest research results. +and maybe their latest research results. -- GitLab From 02625b285521659cb9d6b2079315ee638335a649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=BCtter?= Date: Wed, 21 Jun 2017 18:54:21 +0200 Subject: [PATCH 343/593] fix typos introduced in original translation: results are correct again --- src/USER-MEAMC/meam_dens_init.cpp | 2 +- src/USER-MEAMC/meam_force.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/USER-MEAMC/meam_dens_init.cpp b/src/USER-MEAMC/meam_dens_init.cpp index c265ed5dca..e530a5feb1 100644 --- a/src/USER-MEAMC/meam_dens_init.cpp +++ b/src/USER-MEAMC/meam_dens_init.cpp @@ -379,8 +379,8 @@ MEAM::screen(int i, int j, double** x, double rijsq, double* sij, double Cmax, Cmin, rbound; *sij = 1.0; + elti = fmap[arr1v(type, i)]; eltj = fmap[arr1v(type, j)]; - elti = fmap[arr1v(type, j)]; // if rjksq > ebound*rijsq, atom k is definitely outside the ellipse rbound = this->ebound_meam[elti][eltj] * rijsq; diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp index 5a5c018435..674f766c44 100644 --- a/src/USER-MEAMC/meam_force.cpp +++ b/src/USER-MEAMC/meam_force.cpp @@ -332,11 +332,11 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, if (!iszero(arr1v(rho0, j))) aj = drhoa0i * sij / arr1v(rho0, j); - dt1dr1 = ai * (this->t1_meam[elti] - t1i); + dt1dr1 = ai * (this->t1_meam[eltj] - t1i); dt1dr2 = aj * (this->t1_meam[elti] - t1j); - dt2dr1 = ai * (this->t2_meam[elti] - t2i); + dt2dr1 = ai * (this->t2_meam[eltj] - t2i); dt2dr2 = aj * (this->t2_meam[elti] - t2j); - dt3dr1 = ai * (this->t3_meam[elti] - t3i); + dt3dr1 = ai * (this->t3_meam[eltj] - t3i); dt3dr2 = aj * (this->t3_meam[elti] - t3j); } -- GitLab From 5e165e67822f0bb919d03be849cc526d0944a22d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 21 Jun 2017 13:33:26 -0400 Subject: [PATCH 344/593] fix array bounds issue due to typo. spotted by GCC. --- src/USER-MEAMC/meam_setup_done.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-MEAMC/meam_setup_done.cpp b/src/USER-MEAMC/meam_setup_done.cpp index 60481bf661..36aeee9b17 100644 --- a/src/USER-MEAMC/meam_setup_done.cpp +++ b/src/USER-MEAMC/meam_setup_done.cpp @@ -100,7 +100,7 @@ MEAM::alloyparams(void) // Loop over pairs for (i = 0; i < this->neltypes; i++) { - for (j = 0; i < this->neltypes; i++) { + for (j = 0; j < this->neltypes; j++) { // Treat off-diagonal pairs // If i>j, set all equal to i Date: Wed, 21 Jun 2017 12:44:35 -0600 Subject: [PATCH 345/593] insure compute pair/property local will use a copy of granular neigh list --- src/compute_pair_local.cpp | 4 ++++ src/compute_property_local.cpp | 4 ++++ src/neighbor.cpp | 19 +++++++++++++++++++ src/neighbor.h | 1 + 4 files changed, 28 insertions(+) diff --git a/src/compute_pair_local.cpp b/src/compute_pair_local.cpp index 4595175503..adac486bef 100644 --- a/src/compute_pair_local.cpp +++ b/src/compute_pair_local.cpp @@ -126,11 +126,15 @@ void ComputePairLocal::init() " requested by compute pair/local"); // need an occasional half neighbor list + // set size to same value as request made by force->pair + // this should enable it to always be a copy list (e.g. for granular pstyle) int irequest = neighbor->request(this,instance_me); neighbor->requests[irequest]->pair = 0; neighbor->requests[irequest]->compute = 1; neighbor->requests[irequest]->occasional = 1; + NeighRequest *pairrequest = neighbor->find_request((void *) force->pair); + if (pairrequest) neighbor->requests[irequest]->size = pairrequest->size; } /* ---------------------------------------------------------------------- */ diff --git a/src/compute_property_local.cpp b/src/compute_property_local.cpp index 90faa88921..27b31979c9 100644 --- a/src/compute_property_local.cpp +++ b/src/compute_property_local.cpp @@ -280,12 +280,16 @@ void ComputePropertyLocal::init() } // for NEIGH/PAIR need an occasional half neighbor list + // set size to same value as request made by force->pair + // this should enable it to always be a copy list (e.g. for granular pstyle) if (kindflag == NEIGH || kindflag == PAIR) { int irequest = neighbor->request(this,instance_me); neighbor->requests[irequest]->pair = 0; neighbor->requests[irequest]->compute = 1; neighbor->requests[irequest]->occasional = 1; + NeighRequest *pairrequest = neighbor->find_request((void *) force->pair); + if (pairrequest) neighbor->requests[irequest]->size = pairrequest->size; } // do initial memory allocation so that memory_usage() is correct diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 62a9143226..60b1bc7ee0 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -1268,6 +1268,10 @@ void Neighbor::morph_copy() if (irq->ghost && !jrq->ghost) continue; + // do not copy from a history list + + if (jrq->history) continue; + // these flags must be same, // else 2 lists do not store same pairs // or their data structures are different @@ -1619,6 +1623,21 @@ void Neighbor::requests_new2old() old_oneatom = oneatom; } +/* ---------------------------------------------------------------------- + find and return request made by classptr + if not found or classpt = NULL, return NULL +------------------------------------------------------------------------- */ + +NeighRequest *Neighbor::find_request(void *classptr) +{ + if (classptr == NULL) return NULL; + + for (int i = 0; i < nrequest; i++) + if (requests[i]->requestor == classptr) return requests[i]; + + return NULL; +} + /* ---------------------------------------------------------------------- assign NBin class to a NeighList use neigh request settings to build mask diff --git a/src/neighbor.h b/src/neighbor.h index 16a80b5991..64bced2293 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -122,6 +122,7 @@ class Neighbor : protected Pointers { void exclusion_group_group_delete(int, int); // rm a group-group exclusion int exclude_setting(); // return exclude value to accelerator pkg + class NeighRequest *find_request(void *); // find a neighbor request bigint memory_usage(); -- GitLab From 1fc2eb1e3e4bea2f857f334b485c797e2a0a788e Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 21 Jun 2017 15:12:51 -0600 Subject: [PATCH 346/593] fix issue with rRESPA inner/middle neighbor lists --- doc/src/compute_pair_local.txt | 4 +++- doc/src/compute_property_local.txt | 3 +++ doc/src/run_style.txt | 4 ++-- src/neighbor.cpp | 4 +++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/src/compute_pair_local.txt b/doc/src/compute_pair_local.txt index 0121210994..16aaba4667 100644 --- a/doc/src/compute_pair_local.txt +++ b/doc/src/compute_pair_local.txt @@ -76,7 +76,9 @@ command for the types of the two atoms is used. For the {radius} setting, the sum of the radii of the two particles is used as a cutoff. For example, this is appropriate for granular particles which only interact when they are overlapping, as computed by "granular pair -styles"_pair_gran.txt. +styles"_pair_gran.txt. Note that if a granular model defines atom +types such that all particles of a specific type are monodisperse +(same diameter), then the two settings are effectively identical. Note that as atoms migrate from processor to processor, there will be no consistent ordering of the entries within the local vector or array diff --git a/doc/src/compute_property_local.txt b/doc/src/compute_property_local.txt index f7851e864b..39106a39c8 100644 --- a/doc/src/compute_property_local.txt +++ b/doc/src/compute_property_local.txt @@ -79,6 +79,9 @@ the two atoms is used. For the {radius} setting, the sum of the radii of the two particles is used as a cutoff. For example, this is appropriate for granular particles which only interact when they are overlapping, as computed by "granular pair styles"_pair_gran.html. +Note that if a granular model defines atom types such that all +particles of a specific type are monodisperse (same diameter), then +the two settings are effectively identical. If the inputs are bond, angle, etc attributes, the local data is generated by looping over all the atoms owned on a processor and diff --git a/doc/src/run_style.txt b/doc/src/run_style.txt index 0e3c1a939f..a67899420b 100644 --- a/doc/src/run_style.txt +++ b/doc/src/run_style.txt @@ -17,7 +17,7 @@ style = {verlet} or {verlet/split} or {respa} or {respa/omp} :ulb,l {verlet/split} args = none {respa} args = N n1 n2 ... keyword values ... N = # of levels of rRESPA - n1, n2, ... = loop factor between rRESPA levels (N-1 values) + n1, n2, ... = loop factors between rRESPA levels (N-1 values) zero or more keyword/value pairings may be appended to the loop factors keyword = {bond} or {angle} or {dihedral} or {improper} or {pair} or {inner} or {middle} or {outer} or {hybrid} or {kspace} @@ -55,7 +55,7 @@ style = {verlet} or {verlet/split} or {respa} or {respa/omp} :ulb,l run_style verlet run_style respa 4 2 2 2 bond 1 dihedral 2 pair 3 kspace 4 -run_style respa 4 2 2 2 bond 1 dihedral 2 inner 3 5.0 6.0 outer 4 kspace 4 :pre +run_style respa 4 2 2 2 bond 1 dihedral 2 inner 3 5.0 6.0 outer 4 kspace 4 run_style respa 3 4 2 bond 1 hybrid 2 2 1 kspace 3 :pre [Description:] diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 60b1bc7ee0..487b860c92 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -1268,9 +1268,11 @@ void Neighbor::morph_copy() if (irq->ghost && !jrq->ghost) continue; - // do not copy from a history list + // do not copy from a history list or a respa middle/inner list if (jrq->history) continue; + if (jrq->respamiddle) continue; + if (jrq->respainner) continue; // these flags must be same, // else 2 lists do not store same pairs -- GitLab From 684b7334a56cf65abe98d886af617c193c210b16 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 21 Jun 2017 19:08:02 -0400 Subject: [PATCH 347/593] enforce that CHARMM dihedral styles are run at the same r-RESPA level as pair --- src/MOLECULE/dihedral_charmm.cpp | 12 ++++++++++++ src/MOLECULE/dihedral_charmmfsw.cpp | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/MOLECULE/dihedral_charmm.cpp b/src/MOLECULE/dihedral_charmm.cpp index b9d1c440d4..409e7b4b17 100644 --- a/src/MOLECULE/dihedral_charmm.cpp +++ b/src/MOLECULE/dihedral_charmm.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include "dihedral_charmm.h" #include "atom.h" #include "comm.h" @@ -26,6 +27,7 @@ #include "force.h" #include "pair.h" #include "update.h" +#include "respa.h" #include "math_const.h" #include "memory.h" #include "error.h" @@ -368,6 +370,16 @@ void DihedralCharmm::coeff(int narg, char **arg) void DihedralCharmm::init_style() { + if (strstr(update->integrate_style,"respa")) { + Respa *r = (Respa *) update->integrate; + if (r->level_pair >= 0 && (r->level_pair != r->level_dihedral)) + error->all(FLERR,"Dihedral style charmm must be set to same" + " r-RESPA level as 'pair'"); + if (r->level_outer >= 0 && (r->level_outer != r->level_dihedral)) + error->all(FLERR,"Dihedral style charmm must be set to same" + " r-RESPA level as 'outer'"); + } + // insure use of CHARMM pair_style if any weight factors are non-zero // set local ptrs to LJ 14 arrays setup by Pair diff --git a/src/MOLECULE/dihedral_charmmfsw.cpp b/src/MOLECULE/dihedral_charmmfsw.cpp index 613170bbfa..83aa489741 100644 --- a/src/MOLECULE/dihedral_charmmfsw.cpp +++ b/src/MOLECULE/dihedral_charmmfsw.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include "dihedral_charmmfsw.h" #include "atom.h" #include "comm.h" @@ -29,6 +30,7 @@ #include "force.h" #include "pair.h" #include "update.h" +#include "respa.h" #include "math_const.h" #include "memory.h" #include "error.h" @@ -386,6 +388,16 @@ void DihedralCharmmfsw::coeff(int narg, char **arg) void DihedralCharmmfsw::init_style() { + if (strstr(update->integrate_style,"respa")) { + Respa *r = (Respa *) update->integrate; + if (r->level_pair >= 0 && (r->level_pair != r->level_dihedral)) + error->all(FLERR,"Dihedral style charmmfsw must be set to same" + " r-RESPA level as 'pair'"); + if (r->level_outer >= 0 && (r->level_outer != r->level_dihedral)) + error->all(FLERR,"Dihedral style charmmfsw must be set to same" + " r-RESPA level as 'outer'"); + } + // insure use of CHARMM pair_style if any weight factors are non-zero // set local ptrs to LJ 14 arrays setup by Pair -- GitLab From 612b44a8951e8d90c79422e853e0e57504941aff Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 21 Jun 2017 19:15:52 -0400 Subject: [PATCH 348/593] enforce using 'special_bonds charmm' for dihedral styles charmm and charmmfsw --- src/MOLECULE/dihedral_charmm.cpp | 8 ++++++-- src/MOLECULE/dihedral_charmmfsw.cpp | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/MOLECULE/dihedral_charmm.cpp b/src/MOLECULE/dihedral_charmm.cpp index 409e7b4b17..ddbce407c9 100644 --- a/src/MOLECULE/dihedral_charmm.cpp +++ b/src/MOLECULE/dihedral_charmm.cpp @@ -374,12 +374,16 @@ void DihedralCharmm::init_style() Respa *r = (Respa *) update->integrate; if (r->level_pair >= 0 && (r->level_pair != r->level_dihedral)) error->all(FLERR,"Dihedral style charmm must be set to same" - " r-RESPA level as 'pair'"); + " r-RESPA level as 'pair'"); if (r->level_outer >= 0 && (r->level_outer != r->level_dihedral)) error->all(FLERR,"Dihedral style charmm must be set to same" - " r-RESPA level as 'outer'"); + " r-RESPA level as 'outer'"); } + if ((force->special_lj[3] != 0.0) || (force->special_coul[3] != 0.0)) + error->all(FLERR,"Must use 'special_bonds charmm' with" + " dihedral style charmm"); + // insure use of CHARMM pair_style if any weight factors are non-zero // set local ptrs to LJ 14 arrays setup by Pair diff --git a/src/MOLECULE/dihedral_charmmfsw.cpp b/src/MOLECULE/dihedral_charmmfsw.cpp index 83aa489741..4d78630f47 100644 --- a/src/MOLECULE/dihedral_charmmfsw.cpp +++ b/src/MOLECULE/dihedral_charmmfsw.cpp @@ -398,6 +398,10 @@ void DihedralCharmmfsw::init_style() " r-RESPA level as 'outer'"); } + if ((force->special_lj[3] != 0.0) || (force->special_coul[3] != 0.0)) + error->all(FLERR,"Must use 'special_bonds charmm' with" + " dihedral style charmmfsw"); + // insure use of CHARMM pair_style if any weight factors are non-zero // set local ptrs to LJ 14 arrays setup by Pair -- GitLab From 0c6a7517511b348131cb803dfd6bcbd7d927c85a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 21 Jun 2017 19:29:31 -0400 Subject: [PATCH 349/593] may check for 1-4 scaling factors in CHARMM dihedral styles only when "weightflag" is set, since they may be used with amber --- src/MOLECULE/dihedral_charmm.cpp | 10 ++++++---- src/MOLECULE/dihedral_charmmfsw.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/MOLECULE/dihedral_charmm.cpp b/src/MOLECULE/dihedral_charmm.cpp index ddbce407c9..35953a6ac4 100644 --- a/src/MOLECULE/dihedral_charmm.cpp +++ b/src/MOLECULE/dihedral_charmm.cpp @@ -380,14 +380,16 @@ void DihedralCharmm::init_style() " r-RESPA level as 'outer'"); } - if ((force->special_lj[3] != 0.0) || (force->special_coul[3] != 0.0)) - error->all(FLERR,"Must use 'special_bonds charmm' with" - " dihedral style charmm"); - // insure use of CHARMM pair_style if any weight factors are non-zero // set local ptrs to LJ 14 arrays setup by Pair + // also verify that the correct 1-4 scaling is set if (weightflag) { + + if ((force->special_lj[3] != 0.0) || (force->special_coul[3] != 0.0)) + error->all(FLERR,"Must use 'special_bonds charmm' with" + " dihedral style charmm for use with CHARMM pair styles"); + int itmp; if (force->pair == NULL) error->all(FLERR,"Dihedral charmm is incompatible with Pair style"); diff --git a/src/MOLECULE/dihedral_charmmfsw.cpp b/src/MOLECULE/dihedral_charmmfsw.cpp index 4d78630f47..feb3e02bd4 100644 --- a/src/MOLECULE/dihedral_charmmfsw.cpp +++ b/src/MOLECULE/dihedral_charmmfsw.cpp @@ -398,14 +398,16 @@ void DihedralCharmmfsw::init_style() " r-RESPA level as 'outer'"); } - if ((force->special_lj[3] != 0.0) || (force->special_coul[3] != 0.0)) - error->all(FLERR,"Must use 'special_bonds charmm' with" - " dihedral style charmmfsw"); - // insure use of CHARMM pair_style if any weight factors are non-zero // set local ptrs to LJ 14 arrays setup by Pair + // also verify that the correct 1-4 scaling is set if (weightflag) { + + if ((force->special_lj[3] != 0.0) || (force->special_coul[3] != 0.0)) + error->all(FLERR,"Must use 'special_bonds charmm' with" + " dihedral style charmm for use with CHARMM pair styles"); + int itmp; if (force->pair == NULL) error->all(FLERR,"Dihedral charmmfsw is incompatible with Pair style"); -- GitLab From de3157f720b3a5c2b5632dba138bbec7d099e2fa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 21 Jun 2017 19:31:40 -0400 Subject: [PATCH 350/593] document new restrictions to CHARMM compatible dihedral styles --- doc/src/dihedral_charmm.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/src/dihedral_charmm.txt b/doc/src/dihedral_charmm.txt index 918755ec38..73dc67cdef 100644 --- a/doc/src/dihedral_charmm.txt +++ b/doc/src/dihedral_charmm.txt @@ -138,7 +138,15 @@ more instructions on how to use the accelerated styles effectively. [Restrictions:] -This dihedral style can only be used if LAMMPS was built with the +When using run_style "respa"_run_style.html, these dihedral styles +must be assigned to the same r-RESPA level as {pair} or {outer}. + +When used in combination with CHARMM pair styles, the 1-4 +"special_bonds"_special_bonds.html scaling factors must be set to 0.0. +Otherwise non-bonded contributions for these 1-4 pairs will be +computed multiple times. + +These dihedral styles can only be used if LAMMPS was built with the MOLECULE package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info on packages. -- GitLab From b9029ada7785f2efe3e70833cb0bd99f317f186e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 22 Jun 2017 00:07:59 -0400 Subject: [PATCH 351/593] fix bug in incorrect use of O coordinate instead of M coordinate in pppm/tip4p --- src/KSPACE/pppm_tip4p.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/KSPACE/pppm_tip4p.cpp b/src/KSPACE/pppm_tip4p.cpp index 259def7c9a..1ffa47584e 100644 --- a/src/KSPACE/pppm_tip4p.cpp +++ b/src/KSPACE/pppm_tip4p.cpp @@ -332,9 +332,9 @@ void PPPMTIP4P::fieldforce_ad() const double qfactor = qqrd2e * scale; - s1 = x[i][0]*hx_inv; - s2 = x[i][1]*hy_inv; - s3 = x[i][2]*hz_inv; + s1 = xi[0]*hx_inv; + s2 = xi[1]*hy_inv; + s3 = xi[2]*hz_inv; sf = sf_coeff[0]*sin(2*MY_PI*s1); sf += sf_coeff[1]*sin(4*MY_PI*s1); sf *= 2.0*q[i]*q[i]; -- GitLab From b0ddabbcde943175f6e742741a664e6e85ed9f9f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 22 Jun 2017 00:19:21 -0400 Subject: [PATCH 352/593] update examples for fix filter/corotate to comply with new CHARMM restrictions --- examples/USER/misc/filter_corotate/in.bpti | 2 +- examples/USER/misc/filter_corotate/in.peptide | 2 +- .../filter_corotate/log.10Mar2017.bpti.g++.1 | 240 ----------------- .../filter_corotate/log.10Mar2017.bpti.g++.4 | 240 ----------------- .../log.10Mar2017.peptide.g++.1 | 146 ----------- .../log.10Mar2017.peptide.g++.4 | 146 ----------- .../filter_corotate/log.22Jun2017.bpti.g++.1 | 241 ++++++++++++++++++ .../filter_corotate/log.22Jun2017.bpti.g++.4 | 241 ++++++++++++++++++ .../log.22Jun2017.peptide.g++.1 | 147 +++++++++++ .../log.22Jun2017.peptide.g++.4 | 147 +++++++++++ 10 files changed, 778 insertions(+), 774 deletions(-) delete mode 100644 examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.1 delete mode 100644 examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.4 delete mode 100644 examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.1 delete mode 100644 examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.4 create mode 100644 examples/USER/misc/filter_corotate/log.22Jun2017.bpti.g++.1 create mode 100644 examples/USER/misc/filter_corotate/log.22Jun2017.bpti.g++.4 create mode 100644 examples/USER/misc/filter_corotate/log.22Jun2017.peptide.g++.1 create mode 100644 examples/USER/misc/filter_corotate/log.22Jun2017.peptide.g++.4 diff --git a/examples/USER/misc/filter_corotate/in.bpti b/examples/USER/misc/filter_corotate/in.bpti index 6507a78704..2e4d8dda6f 100644 --- a/examples/USER/misc/filter_corotate/in.bpti +++ b/examples/USER/misc/filter_corotate/in.bpti @@ -28,7 +28,7 @@ thermo 100 thermo_style multi timestep 8 -run_style respa 3 2 8 bond 1 pair 2 kspace 3 +run_style respa 3 2 8 bond 1 dihedral 2 pair 2 kspace 3 velocity all create 200.0 12345678 dist uniform #dump dump1 all atom 100 4pti.dump diff --git a/examples/USER/misc/filter_corotate/in.peptide b/examples/USER/misc/filter_corotate/in.peptide index 0a17f995b3..e10dc09f0d 100644 --- a/examples/USER/misc/filter_corotate/in.peptide +++ b/examples/USER/misc/filter_corotate/in.peptide @@ -20,7 +20,7 @@ thermo 50 timestep 8 -run_style respa 3 2 8 bond 1 pair 2 kspace 3 +run_style respa 3 2 8 bond 1 dihedral 2 pair 2 kspace 3 fix 1 all nvt temp 250.0 250.0 100.0 tchain 1 fix cor all filter/corotate m 1.0 diff --git a/examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.1 b/examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.1 deleted file mode 100644 index 5253b47b2d..0000000000 --- a/examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.1 +++ /dev/null @@ -1,240 +0,0 @@ -LAMMPS (10 Mar 2017) - using 1 OpenMP thread(s) per MPI task - -units real - -atom_style full -bond_style harmonic -angle_style charmm -dihedral_style charmm -improper_style harmonic - -pair_style lj/charmm/coul/long 8 10 -pair_modify mix arithmetic -kspace_style pppm 1e-4 - -read_data data.bpti - orthogonal box = (-10 -10 -30) to (50 50 30) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 892 atoms - scanning bonds ... - 4 = max bonds/atom - scanning angles ... - 6 = max angles/atom - scanning dihedrals ... - 18 = max dihedrals/atom - scanning impropers ... - 2 = max impropers/atom - reading bonds ... - 906 bonds - reading angles ... - 1626 angles - reading dihedrals ... - 2501 dihedrals - reading impropers ... - 137 impropers - 4 = max # of 1-2 neighbors - 9 = max # of 1-3 neighbors - 19 = max # of 1-4 neighbors - 21 = max # of special neighbors - -special_bonds charmm -neigh_modify delay 2 every 1 - - -# ------------- MINIMIZE ---------- - -minimize 1e-4 1e-6 1000 10000 -WARNING: Resetting reneighboring criteria during minimization (../min.cpp:168) -PPPM initialization ... -WARNING: System is not charge neutral, net charge = 6 (../kspace.cpp:302) -WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.203272 - grid = 16 16 16 - stencil order = 5 - estimated absolute RMS force accuracy = 0.0316399 - estimated relative force accuracy = 9.52826e-05 - using double precision FFTs - 3d grid and FFT values/proc = 9261 4096 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 12 - ghost atom cutoff = 12 - binsize = 6, bins = 10 10 10 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/charmm/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory usage (min/avg/max) = 17.8596/1/0 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 0 -3075.6498 943.91164 -2131.7381 -380.67776 - 241 0 -4503.313 749.58662 -3753.7264 -29.045104 -Loop time of 3.35722 on 1 procs for 241 steps with 892 atoms - -99.7% CPU use with 1 MPI tasks x 1 OpenMP threads - -Minimization stats: - Stopping criterion = energy tolerance - Energy initial, next-to-last, final = - -2131.73812515 -3753.43984087 -3753.72636847 - Force two-norm initial, final = 1086.21 26.3688 - Force max component initial, final = 310.811 3.92748 - Final line search alpha, max atom move = 0.00596649 0.0234333 - Iterations, force evaluations = 241 463 - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 2.5003 | 2.5003 | 2.5003 | 0.0 | 74.48 -Bond | 0.24287 | 0.24287 | 0.24287 | 0.0 | 7.23 -Kspace | 0.53428 | 0.53428 | 0.53428 | 0.0 | 15.91 -Neigh | 0.069765 | 0.069765 | 0.069765 | 0.0 | 2.08 -Comm | 0.00065374 | 0.00065374 | 0.00065374 | 0.0 | 0.02 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 0.009358 | | | 0.28 - -Nlocal: 892 ave 892 max 892 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 31 ave 31 max 31 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 148891 ave 148891 max 148891 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 148891 -Ave neighs/atom = 166.918 -Ave special neighs/atom = 10.9395 -Neighbor list builds = 15 -Dangerous builds = 0 -reset_timestep 0 - -# ------------- RUN --------------- - -thermo 100 -thermo_style multi -timestep 8 - -run_style respa 3 2 8 bond 1 pair 2 kspace 3 -Respa levels: - 1 = bond angle dihedral improper - 2 = pair - 3 = kspace - -velocity all create 200.0 12345678 dist uniform -#dump dump1 all atom 100 4pti.dump - -fix 1 all nvt temp 200 300 25 -fix cor all filter/corotate m 1.0 - 163 = # of size 2 clusters - 0 = # of size 3 clusters - 25 = # of size 4 clusters - 0 = # of size 5 clusters - 100 = # of frozen angles - -run 1000 -PPPM initialization ... -WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.203272 - grid = 16 16 16 - stencil order = 5 - estimated absolute RMS force accuracy = 0.0316399 - estimated relative force accuracy = 9.52826e-05 - using double precision FFTs - 3d grid and FFT values/proc = 9261 4096 -Per MPI rank memory usage (min/avg/max) = 19.5425/1/0 Mbytes ----------------- Step 0 ----- CPU = 0.0000 (sec) ---------------- -TotEng = -3220.3378 KinEng = 531.1804 Temp = 200.0000 -PotEng = -3751.5181 E_bond = 42.2810 E_angle = 345.2592 -E_dihed = 337.8361 E_impro = 24.2103 E_vdwl = -288.5339 -E_coul = -886.3622 E_long = -3326.2088 Press = 83.2283 ----------------- Step 100 ----- CPU = 3.9414 (sec) ---------------- -TotEng = -2718.8970 KinEng = 538.6206 Temp = 202.8014 -PotEng = -3257.5176 E_bond = 203.3367 E_angle = 566.5317 -E_dihed = 397.6202 E_impro = 34.6623 E_vdwl = -248.7451 -E_coul = -874.5122 E_long = -3336.4111 Press = 135.8662 ----------------- Step 200 ----- CPU = 7.9028 (sec) ---------------- -TotEng = -2660.1406 KinEng = 626.3319 Temp = 235.8265 -PotEng = -3286.4725 E_bond = 209.5147 E_angle = 591.7773 -E_dihed = 388.9591 E_impro = 29.4992 E_vdwl = -243.5808 -E_coul = -923.5115 E_long = -3339.1306 Press = 88.9000 ----------------- Step 300 ----- CPU = 11.8246 (sec) ---------------- -TotEng = -2673.8090 KinEng = 616.7924 Temp = 232.2346 -PotEng = -3290.6014 E_bond = 202.8254 E_angle = 568.6860 -E_dihed = 378.4182 E_impro = 38.2399 E_vdwl = -221.3236 -E_coul = -915.3004 E_long = -3342.1468 Press = 78.8527 ----------------- Step 400 ----- CPU = 15.7990 (sec) ---------------- -TotEng = -2614.9416 KinEng = 649.3474 Temp = 244.4922 -PotEng = -3264.2890 E_bond = 211.6116 E_angle = 617.2026 -E_dihed = 399.8744 E_impro = 40.2678 E_vdwl = -211.7790 -E_coul = -978.1624 E_long = -3343.3041 Press = -4.1958 ----------------- Step 500 ----- CPU = 19.8146 (sec) ---------------- -TotEng = -2588.6772 KinEng = 660.1424 Temp = 248.5568 -PotEng = -3248.8196 E_bond = 218.4786 E_angle = 620.8605 -E_dihed = 390.3220 E_impro = 41.6794 E_vdwl = -226.3657 -E_coul = -953.1676 E_long = -3340.6269 Press = 99.3200 ----------------- Step 600 ----- CPU = 23.8587 (sec) ---------------- -TotEng = -2550.4618 KinEng = 693.3384 Temp = 261.0557 -PotEng = -3243.8002 E_bond = 232.3563 E_angle = 606.2922 -E_dihed = 396.2469 E_impro = 37.1980 E_vdwl = -235.8425 -E_coul = -937.1208 E_long = -3342.9303 Press = -21.7737 ----------------- Step 700 ----- CPU = 27.8381 (sec) ---------------- -TotEng = -2554.4355 KinEng = 692.8951 Temp = 260.8888 -PotEng = -3247.3306 E_bond = 216.3395 E_angle = 637.7785 -E_dihed = 391.5940 E_impro = 43.1426 E_vdwl = -187.6159 -E_coul = -1008.1694 E_long = -3340.3998 Press = 75.1484 ----------------- Step 800 ----- CPU = 31.8039 (sec) ---------------- -TotEng = -2508.3551 KinEng = 699.0766 Temp = 263.2163 -PotEng = -3207.4317 E_bond = 241.9936 E_angle = 641.3631 -E_dihed = 386.2198 E_impro = 43.7793 E_vdwl = -217.7523 -E_coul = -964.6070 E_long = -3338.4282 Press = -127.7337 ----------------- Step 900 ----- CPU = 35.7700 (sec) ---------------- -TotEng = -2452.7644 KinEng = 762.1842 Temp = 286.9776 -PotEng = -3214.9485 E_bond = 243.9191 E_angle = 649.8664 -E_dihed = 382.4351 E_impro = 39.0029 E_vdwl = -221.3389 -E_coul = -970.8965 E_long = -3337.9366 Press = 122.7720 ----------------- Step 1000 ----- CPU = 39.7695 (sec) ---------------- -TotEng = -2386.6805 KinEng = 799.0253 Temp = 300.8490 -PotEng = -3185.7058 E_bond = 265.3649 E_angle = 661.7543 -E_dihed = 374.6843 E_impro = 38.6877 E_vdwl = -229.2030 -E_coul = -960.7041 E_long = -3336.2899 Press = -17.9910 -Loop time of 39.7695 on 1 procs for 1000 steps with 892 atoms - -Performance: 17.380 ns/day, 1.381 hours/ns, 25.145 timesteps/s -99.6% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 29.169 | 29.169 | 29.169 | 0.0 | 73.34 -Bond | 7.6249 | 7.6249 | 7.6249 | 0.0 | 19.17 -Kspace | 1.1525 | 1.1525 | 1.1525 | 0.0 | 2.90 -Neigh | 0.87606 | 0.87606 | 0.87606 | 0.0 | 2.20 -Comm | 0.01563 | 0.01563 | 0.01563 | 0.0 | 0.04 -Output | 0.00048423 | 0.00048423 | 0.00048423 | 0.0 | 0.00 -Modify | 0.80446 | 0.80446 | 0.80446 | 0.0 | 2.02 -Other | | 0.1266 | | | 0.32 - -Nlocal: 892 ave 892 max 892 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 27 ave 27 max 27 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 146206 ave 146206 max 146206 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 146206 -Ave neighs/atom = 163.908 -Ave special neighs/atom = 10.9395 -Neighbor list builds = 186 -Dangerous builds = 0 - -unfix cor -unfix 1 - - -Please see the log.cite file for references relevant to this simulation - -Total wall time: 0:00:43 diff --git a/examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.4 b/examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.4 deleted file mode 100644 index 4300c1caf5..0000000000 --- a/examples/USER/misc/filter_corotate/log.10Mar2017.bpti.g++.4 +++ /dev/null @@ -1,240 +0,0 @@ -LAMMPS (10 Mar 2017) - using 1 OpenMP thread(s) per MPI task - -units real - -atom_style full -bond_style harmonic -angle_style charmm -dihedral_style charmm -improper_style harmonic - -pair_style lj/charmm/coul/long 8 10 -pair_modify mix arithmetic -kspace_style pppm 1e-4 - -read_data data.bpti - orthogonal box = (-10 -10 -30) to (50 50 30) - 1 by 2 by 2 MPI processor grid - reading atoms ... - 892 atoms - scanning bonds ... - 4 = max bonds/atom - scanning angles ... - 6 = max angles/atom - scanning dihedrals ... - 18 = max dihedrals/atom - scanning impropers ... - 2 = max impropers/atom - reading bonds ... - 906 bonds - reading angles ... - 1626 angles - reading dihedrals ... - 2501 dihedrals - reading impropers ... - 137 impropers - 4 = max # of 1-2 neighbors - 9 = max # of 1-3 neighbors - 19 = max # of 1-4 neighbors - 21 = max # of special neighbors - -special_bonds charmm -neigh_modify delay 2 every 1 - - -# ------------- MINIMIZE ---------- - -minimize 1e-4 1e-6 1000 10000 -WARNING: Resetting reneighboring criteria during minimization (../min.cpp:168) -PPPM initialization ... -WARNING: System is not charge neutral, net charge = 6 (../kspace.cpp:302) -WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.203272 - grid = 16 16 16 - stencil order = 5 - estimated absolute RMS force accuracy = 0.0316399 - estimated relative force accuracy = 9.52826e-05 - using double precision FFTs - 3d grid and FFT values/proc = 3549 1024 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 12 - ghost atom cutoff = 12 - binsize = 6, bins = 10 10 10 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/charmm/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory usage (min/avg/max) = 16.9693/0.981879/0 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 0 -3075.6498 943.91164 -2131.7381 -380.67776 - 241 0 -4503.3131 749.58666 -3753.7264 -29.045153 -Loop time of 1.26594 on 4 procs for 241 steps with 892 atoms - -99.0% CPU use with 4 MPI tasks x 1 OpenMP threads - -Minimization stats: - Stopping criterion = energy tolerance - Energy initial, next-to-last, final = - -2131.73812515 -3753.43983927 -3753.72640137 - Force two-norm initial, final = 1086.21 26.3688 - Force max component initial, final = 310.811 3.92751 - Final line search alpha, max atom move = 0.00596649 0.0234334 - Iterations, force evaluations = 241 463 - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.34267 | 0.63792 | 0.90268 | 25.2 | 50.39 -Bond | 0.025776 | 0.063318 | 0.095631 | 10.8 | 5.00 -Kspace | 0.21904 | 0.51601 | 0.84895 | 31.3 | 40.76 -Neigh | 0.023185 | 0.023363 | 0.023538 | 0.1 | 1.85 -Comm | 0.012025 | 0.014189 | 0.016335 | 1.4 | 1.12 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 0.01114 | | | 0.88 - -Nlocal: 223 ave 323 max 89 min -Histogram: 1 0 0 0 1 0 0 0 1 1 -Nghost: 613 ave 675 max 557 min -Histogram: 1 0 0 1 0 1 0 0 0 1 -Neighs: 37222.8 ave 50005 max 20830 min -Histogram: 1 0 0 0 1 0 0 1 0 1 - -Total # of neighbors = 148891 -Ave neighs/atom = 166.918 -Ave special neighs/atom = 10.9395 -Neighbor list builds = 15 -Dangerous builds = 0 -reset_timestep 0 - -# ------------- RUN --------------- - -thermo 100 -thermo_style multi -timestep 8 - -run_style respa 3 2 8 bond 1 pair 2 kspace 3 -Respa levels: - 1 = bond angle dihedral improper - 2 = pair - 3 = kspace - -velocity all create 200.0 12345678 dist uniform -#dump dump1 all atom 100 4pti.dump - -fix 1 all nvt temp 200 300 25 -fix cor all filter/corotate m 1.0 - 163 = # of size 2 clusters - 0 = # of size 3 clusters - 25 = # of size 4 clusters - 0 = # of size 5 clusters - 100 = # of frozen angles - -run 1000 -PPPM initialization ... -WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.203272 - grid = 16 16 16 - stencil order = 5 - estimated absolute RMS force accuracy = 0.0316399 - estimated relative force accuracy = 9.52826e-05 - using double precision FFTs - 3d grid and FFT values/proc = 3549 1024 -Per MPI rank memory usage (min/avg/max) = 17.142/0.97212/0 Mbytes ----------------- Step 0 ----- CPU = 0.0000 (sec) ---------------- -TotEng = -3220.3378 KinEng = 531.1804 Temp = 200.0000 -PotEng = -3751.5182 E_bond = 42.2810 E_angle = 345.2592 -E_dihed = 337.8361 E_impro = 24.2103 E_vdwl = -288.5339 -E_coul = -886.3622 E_long = -3326.2088 Press = 83.2282 ----------------- Step 100 ----- CPU = 1.5457 (sec) ---------------- -TotEng = -2718.9184 KinEng = 538.6205 Temp = 202.8014 -PotEng = -3257.5389 E_bond = 203.3365 E_angle = 566.5311 -E_dihed = 397.6202 E_impro = 34.6621 E_vdwl = -248.7451 -E_coul = -874.5326 E_long = -3336.4111 Press = 135.8435 ----------------- Step 200 ----- CPU = 3.0720 (sec) ---------------- -TotEng = -2660.1146 KinEng = 626.3474 Temp = 235.8323 -PotEng = -3286.4620 E_bond = 209.5168 E_angle = 591.7735 -E_dihed = 388.9615 E_impro = 29.5000 E_vdwl = -243.5840 -E_coul = -923.4998 E_long = -3339.1299 Press = 88.8857 ----------------- Step 300 ----- CPU = 4.5597 (sec) ---------------- -TotEng = -2669.7442 KinEng = 619.3625 Temp = 233.2023 -PotEng = -3289.1067 E_bond = 203.4405 E_angle = 569.5281 -E_dihed = 378.3314 E_impro = 38.2880 E_vdwl = -221.1904 -E_coul = -915.3396 E_long = -3342.1646 Press = 79.3780 ----------------- Step 400 ----- CPU = 5.9808 (sec) ---------------- -TotEng = -2618.9975 KinEng = 644.6145 Temp = 242.7102 -PotEng = -3263.6119 E_bond = 209.5864 E_angle = 618.8954 -E_dihed = 401.3798 E_impro = 39.9064 E_vdwl = -212.1271 -E_coul = -977.1589 E_long = -3344.0940 Press = -7.8938 ----------------- Step 500 ----- CPU = 7.4159 (sec) ---------------- -TotEng = -2579.7486 KinEng = 666.4643 Temp = 250.9371 -PotEng = -3246.2129 E_bond = 219.2549 E_angle = 620.3474 -E_dihed = 388.4395 E_impro = 41.4499 E_vdwl = -225.9686 -E_coul = -949.3689 E_long = -3340.3672 Press = 113.2543 ----------------- Step 600 ----- CPU = 8.9252 (sec) ---------------- -TotEng = -2535.8235 KinEng = 708.5919 Temp = 266.7990 -PotEng = -3244.4154 E_bond = 243.9451 E_angle = 606.0866 -E_dihed = 400.0562 E_impro = 33.9708 E_vdwl = -223.1319 -E_coul = -964.9940 E_long = -3340.3482 Press = -102.4475 ----------------- Step 700 ----- CPU = 10.4022 (sec) ---------------- -TotEng = -2552.6681 KinEng = 702.3080 Temp = 264.4330 -PotEng = -3254.9761 E_bond = 250.8834 E_angle = 639.0977 -E_dihed = 386.4014 E_impro = 42.3004 E_vdwl = -224.4816 -E_coul = -1011.8551 E_long = -3337.3222 Press = 10.6424 ----------------- Step 800 ----- CPU = 11.8699 (sec) ---------------- -TotEng = -2423.5415 KinEng = 772.1254 Temp = 290.7206 -PotEng = -3195.6670 E_bond = 238.5831 E_angle = 640.9180 -E_dihed = 377.7994 E_impro = 40.3135 E_vdwl = -216.5705 -E_coul = -935.1087 E_long = -3341.6019 Press = -38.2479 ----------------- Step 900 ----- CPU = 13.3548 (sec) ---------------- -TotEng = -2394.4779 KinEng = 766.6895 Temp = 288.6739 -PotEng = -3161.1673 E_bond = 284.8428 E_angle = 671.0959 -E_dihed = 380.3406 E_impro = 51.2975 E_vdwl = -219.5211 -E_coul = -990.6305 E_long = -3338.5925 Press = -15.2279 ----------------- Step 1000 ----- CPU = 14.7908 (sec) ---------------- -TotEng = -2340.1471 KinEng = 799.0198 Temp = 300.8469 -PotEng = -3139.1669 E_bond = 271.0389 E_angle = 683.8278 -E_dihed = 407.0795 E_impro = 39.6209 E_vdwl = -230.5355 -E_coul = -974.2981 E_long = -3335.9003 Press = -94.3420 -Loop time of 14.7909 on 4 procs for 1000 steps with 892 atoms - -Performance: 46.732 ns/day, 0.514 hours/ns, 67.609 timesteps/s -99.1% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 4.4184 | 7.5543 | 10.133 | 74.2 | 51.07 -Bond | 0.94027 | 1.9781 | 2.7492 | 54.4 | 13.37 -Kspace | 0.45487 | 0.45887 | 0.46343 | 0.4 | 3.10 -Neigh | 0.28145 | 0.28339 | 0.28539 | 0.3 | 1.92 -Comm | 0.7515 | 4.1484 | 8.3861 | 135.5 | 28.05 -Output | 0.00049973 | 0.00055474 | 0.00066924 | 0.0 | 0.00 -Modify | 0.26165 | 0.31142 | 0.35023 | 6.7 | 2.11 -Other | | 0.05572 | | | 0.38 - -Nlocal: 223 ave 313 max 122 min -Histogram: 1 0 0 1 0 0 0 1 0 1 -Nghost: 584.5 ave 605 max 553 min -Histogram: 1 0 0 0 0 1 0 0 0 2 -Neighs: 35448 ave 42093 max 25175 min -Histogram: 1 0 0 0 0 0 1 1 0 1 - -Total # of neighbors = 141792 -Ave neighs/atom = 158.96 -Ave special neighs/atom = 10.9395 -Neighbor list builds = 186 -Dangerous builds = 0 - -unfix cor -unfix 1 - - -Please see the log.cite file for references relevant to this simulation - -Total wall time: 0:00:16 diff --git a/examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.1 b/examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.1 deleted file mode 100644 index 23dd4c8a89..0000000000 --- a/examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.1 +++ /dev/null @@ -1,146 +0,0 @@ -LAMMPS (10 Mar 2017) - using 1 OpenMP thread(s) per MPI task -# Solvated 5-mer peptide, run for 8ps in NVT - -units real -atom_style full - -pair_style lj/charmm/coul/long 8.0 10.0 10.0 -bond_style harmonic -angle_style charmm -dihedral_style charmm -improper_style harmonic -kspace_style pppm 0.0001 - -read_data data.peptide - orthogonal box = (36.8402 41.0137 29.7681) to (64.2116 68.3851 57.1395) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 2004 atoms - reading velocities ... - 2004 velocities - scanning bonds ... - 3 = max bonds/atom - scanning angles ... - 6 = max angles/atom - scanning dihedrals ... - 14 = max dihedrals/atom - scanning impropers ... - 1 = max impropers/atom - reading bonds ... - 1365 bonds - reading angles ... - 786 angles - reading dihedrals ... - 207 dihedrals - reading impropers ... - 12 impropers - 4 = max # of 1-2 neighbors - 7 = max # of 1-3 neighbors - 14 = max # of 1-4 neighbors - 18 = max # of special neighbors - -neighbor 2.0 bin -neigh_modify delay 5 - -thermo 50 -#dump dump1 all atom 100 peptide.dump - -timestep 8 - -run_style respa 3 2 8 bond 1 pair 2 kspace 3 -Respa levels: - 1 = bond angle dihedral improper - 2 = pair - 3 = kspace - -fix 1 all nvt temp 250.0 250.0 100.0 tchain 1 -fix cor all filter/corotate m 1.0 - 19 = # of size 2 clusters - 0 = # of size 3 clusters - 3 = # of size 4 clusters - 0 = # of size 5 clusters - 646 = # of frozen angles -run 1000 -PPPM initialization ... -WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.268725 - grid = 15 15 15 - stencil order = 5 - estimated absolute RMS force accuracy = 0.0228209 - estimated relative force accuracy = 6.87243e-05 - using double precision FFTs - 3d grid and FFT values/proc = 10648 3375 -Neighbor list info ... - update every 1 steps, delay 5 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 12 - ghost atom cutoff = 12 - binsize = 6, bins = 5 5 5 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/charmm/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory usage (min/avg/max) = 22.6706/1/0 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 190.0857 -6785.6785 70.391457 -5580.3684 19434.821 - 50 239.46028 -7546.5667 1092.8874 -5023.9668 -24643.891 - 100 242.81799 -7125.5527 416.0788 -5259.7139 15525.465 - 150 235.97108 -7531.9334 932.35464 -5190.6987 -14838.489 - 200 252.06415 -7195.6011 568.02993 -5122.6064 8841.332 - 250 249.99431 -7586.5092 881.83491 -5212.0676 -9330.345 - 300 240.3382 -7333.0933 633.29951 -5264.8395 5137.9757 - 350 255.34529 -7568.2413 856.46371 -5187.2226 -6206.063 - 400 242.99276 -7419.9031 713.23943 -5255.8602 2447.0091 - 450 251.10653 -7622.061 844.20584 -5278.6079 -4906.6559 - 500 255.59314 -7439.253 710.84907 -5202.3691 1571.0032 - 550 253.2025 -7660.5101 823.05373 -5325.695 -4551.399 - 600 249.05313 -7509.6729 741.48104 -5281.2046 992.87 - 650 251.75984 -7593.6589 847.08244 -5243.4286 -3510.1176 - 700 249.25027 -7601.9112 794.0912 -5319.6557 305.76021 - 750 255.415 -7602.2674 822.98524 -5254.3109 -2333.421 - 800 241.99621 -7643.8878 796.53352 -5402.5008 -298.66565 - 850 253.6428 -7598.3764 816.45457 -5267.5316 -1905.3478 - 900 247.20231 -7690.2806 789.75999 -5424.5838 -1331.7228 - 950 255.92583 -7634.7505 831.18272 -5275.5466 -2186.5117 - 1000 253.2126 -7647.9526 823.93602 -5312.195 -1189.9659 -Loop time of 150.664 on 1 procs for 1000 steps with 2004 atoms - -Performance: 4.588 ns/day, 5.231 hours/ns, 6.637 timesteps/s -99.7% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 135.81 | 135.81 | 135.81 | 0.0 | 90.14 -Bond | 2.5889 | 2.5889 | 2.5889 | 0.0 | 1.72 -Kspace | 2.0379 | 2.0379 | 2.0379 | 0.0 | 1.35 -Neigh | 5.893 | 5.893 | 5.893 | 0.0 | 3.91 -Comm | 1.6998 | 1.6998 | 1.6998 | 0.0 | 1.13 -Output | 0.00077915 | 0.00077915 | 0.00077915 | 0.0 | 0.00 -Modify | 2 | 2 | 2 | 0.0 | 1.33 -Other | | 0.6352 | | | 0.42 - -Nlocal: 2004 ave 2004 max 2004 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 11197 ave 11197 max 11197 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 707779 ave 707779 max 707779 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 707779 -Ave neighs/atom = 353.183 -Ave special neighs/atom = 2.34032 -Neighbor list builds = 200 -Dangerous builds = 200 -unfix cor -unfix 1 - - - - -Please see the log.cite file for references relevant to this simulation - -Total wall time: 0:02:30 diff --git a/examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.4 b/examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.4 deleted file mode 100644 index 2cdd645fe3..0000000000 --- a/examples/USER/misc/filter_corotate/log.10Mar2017.peptide.g++.4 +++ /dev/null @@ -1,146 +0,0 @@ -LAMMPS (10 Mar 2017) - using 1 OpenMP thread(s) per MPI task -# Solvated 5-mer peptide, run for 8ps in NVT - -units real -atom_style full - -pair_style lj/charmm/coul/long 8.0 10.0 10.0 -bond_style harmonic -angle_style charmm -dihedral_style charmm -improper_style harmonic -kspace_style pppm 0.0001 - -read_data data.peptide - orthogonal box = (36.8402 41.0137 29.7681) to (64.2116 68.3851 57.1395) - 1 by 2 by 2 MPI processor grid - reading atoms ... - 2004 atoms - reading velocities ... - 2004 velocities - scanning bonds ... - 3 = max bonds/atom - scanning angles ... - 6 = max angles/atom - scanning dihedrals ... - 14 = max dihedrals/atom - scanning impropers ... - 1 = max impropers/atom - reading bonds ... - 1365 bonds - reading angles ... - 786 angles - reading dihedrals ... - 207 dihedrals - reading impropers ... - 12 impropers - 4 = max # of 1-2 neighbors - 7 = max # of 1-3 neighbors - 14 = max # of 1-4 neighbors - 18 = max # of special neighbors - -neighbor 2.0 bin -neigh_modify delay 5 - -thermo 50 -#dump dump1 all atom 100 peptide.dump - -timestep 8 - -run_style respa 3 2 8 bond 1 pair 2 kspace 3 -Respa levels: - 1 = bond angle dihedral improper - 2 = pair - 3 = kspace - -fix 1 all nvt temp 250.0 250.0 100.0 tchain 1 -fix cor all filter/corotate m 1.0 - 19 = # of size 2 clusters - 0 = # of size 3 clusters - 3 = # of size 4 clusters - 0 = # of size 5 clusters - 646 = # of frozen angles -run 1000 -PPPM initialization ... -WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.268725 - grid = 15 15 15 - stencil order = 5 - estimated absolute RMS force accuracy = 0.0228209 - estimated relative force accuracy = 6.87243e-05 - using double precision FFTs - 3d grid and FFT values/proc = 4312 960 -Neighbor list info ... - update every 1 steps, delay 5 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 12 - ghost atom cutoff = 12 - binsize = 6, bins = 5 5 5 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/charmm/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory usage (min/avg/max) = 16.8394/0.98826/0 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 190.0857 -6785.6785 70.391457 -5580.3684 19434.821 - 50 239.46028 -7546.5668 1092.8874 -5023.9668 -24643.891 - 100 242.81819 -7125.5629 416.08082 -5259.7209 15525.244 - 150 235.94928 -7531.9186 932.50658 -5190.6621 -14842.431 - 200 255.85551 -7254.4065 568.8803 -5157.9249 8936.8651 - 250 247.8705 -7607.4583 858.06087 -5269.4711 -9926.0442 - 300 257.64176 -7267.424 618.5573 -5110.6004 5173.3307 - 350 251.65439 -7572.3806 821.15745 -5248.7049 -7092.327 - 400 256.87927 -7414.2145 655.33178 -5225.169 4119.4095 - 450 257.12393 -7576.5541 853.39773 -5187.9819 -5224.8823 - 500 242.42371 -7524.705 705.75357 -5371.5455 2111.3878 - 550 248.97188 -7541.076 792.86994 -5261.7038 -2278.4185 - 600 249.81862 -7592.0499 767.17722 -5333.3149 -1149.4759 - 650 253.31349 -7578.2665 813.75975 -5252.0827 -2915.5706 - 700 256.61152 -7588.1475 761.03356 -5294.9988 -747.88089 - 750 248.3606 -7660.457 837.71615 -5339.8883 -3072.8311 - 800 253.81464 -7638.6089 782.4229 -5340.7698 -1025.909 - 850 245.69185 -7660.9036 795.66792 -5398.3172 -2717.5851 - 900 249.13156 -7589.4769 806.43464 -5295.5867 -761.63361 - 950 251.11482 -7691.4981 869.34937 -5322.852 -3282.3031 - 1000 241.9195 -7630.9899 828.59107 -5358.0033 -95.962685 -Loop time of 45.5507 on 4 procs for 1000 steps with 2004 atoms - -Performance: 15.174 ns/day, 1.582 hours/ns, 21.954 timesteps/s -99.4% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 35.545 | 36.674 | 38.004 | 15.8 | 80.51 -Bond | 0.51302 | 0.67796 | 0.86345 | 18.6 | 1.49 -Kspace | 0.66031 | 0.68459 | 0.70506 | 2.1 | 1.50 -Neigh | 1.5605 | 1.5627 | 1.5649 | 0.1 | 3.43 -Comm | 3.4611 | 4.9841 | 6.294 | 47.2 | 10.94 -Output | 0.00079799 | 0.00086641 | 0.0010369 | 0.0 | 0.00 -Modify | 0.67341 | 0.69059 | 0.71186 | 1.7 | 1.52 -Other | | 0.2762 | | | 0.61 - -Nlocal: 501 ave 523 max 473 min -Histogram: 1 0 0 0 0 0 2 0 0 1 -Nghost: 6643.25 ave 6708 max 6566 min -Histogram: 1 1 0 0 0 0 0 0 0 2 -Neighs: 176977 ave 185765 max 164931 min -Histogram: 1 0 0 0 1 0 0 0 1 1 - -Total # of neighbors = 707908 -Ave neighs/atom = 353.248 -Ave special neighs/atom = 2.34032 -Neighbor list builds = 200 -Dangerous builds = 200 -unfix cor -unfix 1 - - - - -Please see the log.cite file for references relevant to this simulation - -Total wall time: 0:00:45 diff --git a/examples/USER/misc/filter_corotate/log.22Jun2017.bpti.g++.1 b/examples/USER/misc/filter_corotate/log.22Jun2017.bpti.g++.1 new file mode 100644 index 0000000000..1e708a9d39 --- /dev/null +++ b/examples/USER/misc/filter_corotate/log.22Jun2017.bpti.g++.1 @@ -0,0 +1,241 @@ +LAMMPS (20 Jun 2017) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task + +units real + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic + +pair_style lj/charmm/coul/long 8 10 +pair_modify mix arithmetic +kspace_style pppm 1e-4 + +read_data data.bpti + orthogonal box = (-10 -10 -30) to (50 50 30) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 892 atoms + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 18 = max dihedrals/atom + scanning impropers ... + 2 = max impropers/atom + reading bonds ... + 906 bonds + reading angles ... + 1626 angles + reading dihedrals ... + 2501 dihedrals + reading impropers ... + 137 impropers + 4 = max # of 1-2 neighbors + 9 = max # of 1-3 neighbors + 19 = max # of 1-4 neighbors + 21 = max # of special neighbors + +special_bonds charmm +neigh_modify delay 2 every 1 + + +# ------------- MINIMIZE ---------- + +minimize 1e-4 1e-6 1000 10000 +WARNING: Resetting reneighboring criteria during minimization (../min.cpp:168) +PPPM initialization ... +WARNING: System is not charge neutral, net charge = 6 (../kspace.cpp:302) +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.203272 + grid = 16 16 16 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0316399 + estimated relative force accuracy = 9.52826e-05 + using double precision FFTs + 3d grid and FFT values/proc = 9261 4096 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 10 10 10 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 17.86 | 17.86 | 17.86 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -3075.6498 943.91164 -2131.7381 -380.67776 + 241 0 -4503.313 749.58662 -3753.7264 -29.045104 +Loop time of 7.63279 on 1 procs for 241 steps with 892 atoms + +32.0% CPU use with 1 MPI tasks x 1 OpenMP threads + +Minimization stats: + Stopping criterion = energy tolerance + Energy initial, next-to-last, final = + -2131.73812515 -3753.43984087 -3753.72636847 + Force two-norm initial, final = 1086.21 26.3688 + Force max component initial, final = 310.811 3.92748 + Final line search alpha, max atom move = 0.00596649 0.0234333 + Iterations, force evaluations = 241 463 + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 5.8395 | 5.8395 | 5.8395 | 0.0 | 76.51 +Bond | 0.46414 | 0.46414 | 0.46414 | 0.0 | 6.08 +Kspace | 1.1535 | 1.1535 | 1.1535 | 0.0 | 15.11 +Neigh | 0.14908 | 0.14908 | 0.14908 | 0.0 | 1.95 +Comm | 0.001932 | 0.001932 | 0.001932 | 0.0 | 0.03 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 0.02465 | | | 0.32 + +Nlocal: 892 ave 892 max 892 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 31 ave 31 max 31 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 148891 ave 148891 max 148891 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 148891 +Ave neighs/atom = 166.918 +Ave special neighs/atom = 10.9395 +Neighbor list builds = 15 +Dangerous builds = 0 +reset_timestep 0 + +# ------------- RUN --------------- + +thermo 100 +thermo_style multi +timestep 8 + +run_style respa 3 2 8 bond 1 dihedral 2 pair 2 kspace 3 +Respa levels: + 1 = bond angle + 2 = dihedral improper pair + 3 = kspace + +velocity all create 200.0 12345678 dist uniform +#dump dump1 all atom 100 4pti.dump + +fix 1 all nvt temp 200 300 25 +fix cor all filter/corotate m 1.0 + 163 = # of size 2 clusters + 0 = # of size 3 clusters + 25 = # of size 4 clusters + 0 = # of size 5 clusters + 100 = # of frozen angles + +run 1000 +PPPM initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.203272 + grid = 16 16 16 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0316399 + estimated relative force accuracy = 9.52826e-05 + using double precision FFTs + 3d grid and FFT values/proc = 9261 4096 +Per MPI rank memory allocation (min/avg/max) = 19.55 | 19.55 | 19.55 Mbytes +---------------- Step 0 ----- CPU = 0.0000 (sec) ---------------- +TotEng = -3220.3378 KinEng = 531.1804 Temp = 200.0000 +PotEng = -3751.5181 E_bond = 42.2810 E_angle = 345.2592 +E_dihed = 337.8361 E_impro = 24.2103 E_vdwl = -288.5339 +E_coul = -886.3622 E_long = -3326.2088 Press = 83.2283 +---------------- Step 100 ----- CPU = 8.4380 (sec) ---------------- +TotEng = -2718.4258 KinEng = 539.6265 Temp = 203.1802 +PotEng = -3258.0524 E_bond = 203.2307 E_angle = 566.1893 +E_dihed = 397.6759 E_impro = 34.7696 E_vdwl = -248.6577 +E_coul = -874.8466 E_long = -3336.4135 Press = 135.8640 +---------------- Step 200 ----- CPU = 16.9012 (sec) ---------------- +TotEng = -2661.9611 KinEng = 625.0674 Temp = 235.3503 +PotEng = -3287.0285 E_bond = 208.1804 E_angle = 590.8462 +E_dihed = 389.1482 E_impro = 30.5882 E_vdwl = -240.5448 +E_coul = -926.3091 E_long = -3338.9378 Press = 103.4738 +---------------- Step 300 ----- CPU = 25.3046 (sec) ---------------- +TotEng = -2662.4139 KinEng = 622.2647 Temp = 234.2951 +PotEng = -3284.6785 E_bond = 202.4210 E_angle = 573.6793 +E_dihed = 382.8919 E_impro = 41.8973 E_vdwl = -218.9895 +E_coul = -924.8414 E_long = -3341.7372 Press = 40.6746 +---------------- Step 400 ----- CPU = 33.8063 (sec) ---------------- +TotEng = -2604.9431 KinEng = 662.9890 Temp = 249.6286 +PotEng = -3267.9321 E_bond = 195.9116 E_angle = 616.1383 +E_dihed = 407.8502 E_impro = 43.3560 E_vdwl = -219.0377 +E_coul = -966.3118 E_long = -3345.8387 Press = -91.8856 +---------------- Step 500 ----- CPU = 42.3470 (sec) ---------------- +TotEng = -2609.3867 KinEng = 657.0939 Temp = 247.4090 +PotEng = -3266.4806 E_bond = 236.4955 E_angle = 570.6256 +E_dihed = 390.5111 E_impro = 41.9250 E_vdwl = -223.9927 +E_coul = -939.5249 E_long = -3342.5201 Press = 236.7471 +---------------- Step 600 ----- CPU = 50.9590 (sec) ---------------- +TotEng = -2564.7161 KinEng = 701.8494 Temp = 264.2603 +PotEng = -3266.5655 E_bond = 223.5820 E_angle = 582.7722 +E_dihed = 394.6196 E_impro = 43.8581 E_vdwl = -201.7759 +E_coul = -967.4136 E_long = -3342.2079 Press = 26.6595 +---------------- Step 700 ----- CPU = 59.4791 (sec) ---------------- +TotEng = -2510.1142 KinEng = 689.5931 Temp = 259.6455 +PotEng = -3199.7072 E_bond = 254.6476 E_angle = 611.9715 +E_dihed = 403.0624 E_impro = 44.1360 E_vdwl = -205.6377 +E_coul = -964.7455 E_long = -3343.1416 Press = 60.5789 +---------------- Step 800 ----- CPU = 67.9330 (sec) ---------------- +TotEng = -2452.7408 KinEng = 777.5962 Temp = 292.7805 +PotEng = -3230.3370 E_bond = 250.4950 E_angle = 656.6738 +E_dihed = 382.4702 E_impro = 39.5378 E_vdwl = -225.0375 +E_coul = -994.4519 E_long = -3340.0244 Press = -19.6463 +---------------- Step 900 ----- CPU = 76.3690 (sec) ---------------- +TotEng = -2339.9766 KinEng = 808.7116 Temp = 304.4961 +PotEng = -3148.6883 E_bond = 247.7657 E_angle = 679.0658 +E_dihed = 398.2984 E_impro = 43.7890 E_vdwl = -230.2498 +E_coul = -945.8152 E_long = -3341.5422 Press = -64.4343 +---------------- Step 1000 ----- CPU = 84.8757 (sec) ---------------- +TotEng = -2329.1819 KinEng = 822.9820 Temp = 309.8691 +PotEng = -3152.1639 E_bond = 264.9609 E_angle = 691.7104 +E_dihed = 385.9914 E_impro = 40.5525 E_vdwl = -230.5182 +E_coul = -954.6203 E_long = -3350.2405 Press = -146.6649 +Loop time of 84.8758 on 1 procs for 1000 steps with 892 atoms + +Performance: 8.144 ns/day, 2.947 hours/ns, 11.782 timesteps/s +32.0% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 68.548 | 68.548 | 68.548 | 0.0 | 80.76 +Bond | 10.263 | 10.263 | 10.263 | 0.0 | 12.09 +Kspace | 2.4528 | 2.4528 | 2.4528 | 0.0 | 2.89 +Neigh | 1.9041 | 1.9041 | 1.9041 | 0.0 | 2.24 +Comm | 0.044126 | 0.044126 | 0.044126 | 0.0 | 0.05 +Output | 0.000983 | 0.000983 | 0.000983 | 0.0 | 0.00 +Modify | 1.4113 | 1.4113 | 1.4113 | 0.0 | 1.66 +Other | | 0.2516 | | | 0.30 + +Nlocal: 892 ave 892 max 892 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 38 ave 38 max 38 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 144068 ave 144068 max 144068 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 144068 +Ave neighs/atom = 161.511 +Ave special neighs/atom = 10.9395 +Neighbor list builds = 190 +Dangerous builds = 0 + +unfix cor +unfix 1 + + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:01:32 diff --git a/examples/USER/misc/filter_corotate/log.22Jun2017.bpti.g++.4 b/examples/USER/misc/filter_corotate/log.22Jun2017.bpti.g++.4 new file mode 100644 index 0000000000..5367f0e624 --- /dev/null +++ b/examples/USER/misc/filter_corotate/log.22Jun2017.bpti.g++.4 @@ -0,0 +1,241 @@ +LAMMPS (20 Jun 2017) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task + +units real + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic + +pair_style lj/charmm/coul/long 8 10 +pair_modify mix arithmetic +kspace_style pppm 1e-4 + +read_data data.bpti + orthogonal box = (-10 -10 -30) to (50 50 30) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 892 atoms + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 18 = max dihedrals/atom + scanning impropers ... + 2 = max impropers/atom + reading bonds ... + 906 bonds + reading angles ... + 1626 angles + reading dihedrals ... + 2501 dihedrals + reading impropers ... + 137 impropers + 4 = max # of 1-2 neighbors + 9 = max # of 1-3 neighbors + 19 = max # of 1-4 neighbors + 21 = max # of special neighbors + +special_bonds charmm +neigh_modify delay 2 every 1 + + +# ------------- MINIMIZE ---------- + +minimize 1e-4 1e-6 1000 10000 +WARNING: Resetting reneighboring criteria during minimization (../min.cpp:168) +PPPM initialization ... +WARNING: System is not charge neutral, net charge = 6 (../kspace.cpp:302) +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.203272 + grid = 16 16 16 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0316399 + estimated relative force accuracy = 9.52826e-05 + using double precision FFTs + 3d grid and FFT values/proc = 3549 1024 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 10 10 10 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 16.97 | 17.2 | 17.52 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -3075.6498 943.91164 -2131.7381 -380.67776 + 241 0 -4503.3131 749.58665 -3753.7264 -29.044989 +Loop time of 3.06327 on 4 procs for 241 steps with 892 atoms + +31.9% CPU use with 4 MPI tasks x 1 OpenMP threads + +Minimization stats: + Stopping criterion = energy tolerance + Energy initial, next-to-last, final = + -2131.73812515 -3753.4398752 -3753.72640446 + Force two-norm initial, final = 1086.21 26.3687 + Force max component initial, final = 310.811 3.92765 + Final line search alpha, max atom move = 0.0059665 0.0234343 + Iterations, force evaluations = 241 463 + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.91458 | 1.6235 | 2.2701 | 38.2 | 53.00 +Bond | 0.055164 | 0.13173 | 0.19487 | 15.1 | 4.30 +Kspace | 0.48966 | 1.1993 | 1.9847 | 48.7 | 39.15 +Neigh | 0.053297 | 0.053442 | 0.053576 | 0.0 | 1.74 +Comm | 0.031677 | 0.035006 | 0.038061 | 1.5 | 1.14 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 0.02021 | | | 0.66 + +Nlocal: 223 ave 323 max 89 min +Histogram: 1 0 0 0 1 0 0 0 1 1 +Nghost: 613 ave 675 max 557 min +Histogram: 1 0 0 1 0 1 0 0 0 1 +Neighs: 37222.8 ave 50005 max 20830 min +Histogram: 1 0 0 0 1 0 0 1 0 1 + +Total # of neighbors = 148891 +Ave neighs/atom = 166.918 +Ave special neighs/atom = 10.9395 +Neighbor list builds = 15 +Dangerous builds = 0 +reset_timestep 0 + +# ------------- RUN --------------- + +thermo 100 +thermo_style multi +timestep 8 + +run_style respa 3 2 8 bond 1 dihedral 2 pair 2 kspace 3 +Respa levels: + 1 = bond angle + 2 = dihedral improper pair + 3 = kspace + +velocity all create 200.0 12345678 dist uniform +#dump dump1 all atom 100 4pti.dump + +fix 1 all nvt temp 200 300 25 +fix cor all filter/corotate m 1.0 + 163 = # of size 2 clusters + 0 = # of size 3 clusters + 25 = # of size 4 clusters + 0 = # of size 5 clusters + 100 = # of frozen angles + +run 1000 +PPPM initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.203272 + grid = 16 16 16 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0316399 + estimated relative force accuracy = 9.52826e-05 + using double precision FFTs + 3d grid and FFT values/proc = 3549 1024 +Per MPI rank memory allocation (min/avg/max) = 17.14 | 17.63 | 18.14 Mbytes +---------------- Step 0 ----- CPU = 0.0000 (sec) ---------------- +TotEng = -3220.3378 KinEng = 531.1804 Temp = 200.0000 +PotEng = -3751.5182 E_bond = 42.2810 E_angle = 345.2593 +E_dihed = 337.8361 E_impro = 24.2103 E_vdwl = -288.5339 +E_coul = -886.3622 E_long = -3326.2088 Press = 83.2284 +---------------- Step 100 ----- CPU = 3.4639 (sec) ---------------- +TotEng = -2718.4266 KinEng = 539.6246 Temp = 203.1794 +PotEng = -3258.0513 E_bond = 203.2306 E_angle = 566.1887 +E_dihed = 397.6756 E_impro = 34.7695 E_vdwl = -248.6577 +E_coul = -874.8446 E_long = -3336.4135 Press = 135.8653 +---------------- Step 200 ----- CPU = 6.8898 (sec) ---------------- +TotEng = -2662.0450 KinEng = 625.0178 Temp = 235.3317 +PotEng = -3287.0628 E_bond = 208.1691 E_angle = 590.8259 +E_dihed = 389.1424 E_impro = 30.5879 E_vdwl = -240.5397 +E_coul = -926.3110 E_long = -3338.9375 Press = 103.4843 +---------------- Step 300 ----- CPU = 10.2791 (sec) ---------------- +TotEng = -2661.8829 KinEng = 623.0352 Temp = 234.5852 +PotEng = -3284.9181 E_bond = 203.0274 E_angle = 573.6583 +E_dihed = 383.0124 E_impro = 41.9015 E_vdwl = -218.0696 +E_coul = -926.5806 E_long = -3341.8675 Press = 45.6868 +---------------- Step 400 ----- CPU = 13.5874 (sec) ---------------- +TotEng = -2594.5220 KinEng = 672.8693 Temp = 253.3487 +PotEng = -3267.3914 E_bond = 201.3378 E_angle = 612.7099 +E_dihed = 410.1920 E_impro = 44.0201 E_vdwl = -217.9714 +E_coul = -971.6203 E_long = -3346.0595 Press = -121.1015 +---------------- Step 500 ----- CPU = 16.9047 (sec) ---------------- +TotEng = -2603.9306 KinEng = 668.2122 Temp = 251.5952 +PotEng = -3272.1428 E_bond = 238.1081 E_angle = 578.3310 +E_dihed = 399.1305 E_impro = 41.4314 E_vdwl = -216.9664 +E_coul = -969.4047 E_long = -3342.7729 Press = 156.7851 +---------------- Step 600 ----- CPU = 20.1970 (sec) ---------------- +TotEng = -2531.1096 KinEng = 728.1698 Temp = 274.1705 +PotEng = -3259.2794 E_bond = 232.8396 E_angle = 621.3323 +E_dihed = 398.1952 E_impro = 37.0914 E_vdwl = -241.6350 +E_coul = -963.1540 E_long = -3343.9488 Press = 58.6784 +---------------- Step 700 ----- CPU = 23.4360 (sec) ---------------- +TotEng = -2499.9495 KinEng = 742.1211 Temp = 279.4234 +PotEng = -3242.0705 E_bond = 240.5622 E_angle = 582.9270 +E_dihed = 396.6246 E_impro = 36.6510 E_vdwl = -228.4925 +E_coul = -926.8734 E_long = -3343.4695 Press = -60.7458 +---------------- Step 800 ----- CPU = 26.6709 (sec) ---------------- +TotEng = -2426.0217 KinEng = 760.1083 Temp = 286.1959 +PotEng = -3186.1300 E_bond = 266.5863 E_angle = 652.3401 +E_dihed = 380.7407 E_impro = 34.6861 E_vdwl = -225.3729 +E_coul = -953.2382 E_long = -3341.8721 Press = -57.9824 +---------------- Step 900 ----- CPU = 29.8152 (sec) ---------------- +TotEng = -2419.4636 KinEng = 780.8361 Temp = 294.0004 +PotEng = -3200.2996 E_bond = 269.3237 E_angle = 665.7171 +E_dihed = 408.3527 E_impro = 43.7811 E_vdwl = -254.0696 +E_coul = -1002.0694 E_long = -3331.3352 Press = -52.0169 +---------------- Step 1000 ----- CPU = 32.8748 (sec) ---------------- +TotEng = -2398.7244 KinEng = 811.9856 Temp = 305.7288 +PotEng = -3210.7099 E_bond = 258.2207 E_angle = 639.3671 +E_dihed = 379.3353 E_impro = 41.7602 E_vdwl = -207.2654 +E_coul = -983.9330 E_long = -3338.1948 Press = 89.4870 +Loop time of 32.8751 on 4 procs for 1000 steps with 892 atoms + +Performance: 21.025 ns/day, 1.141 hours/ns, 30.418 timesteps/s +31.9% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 12.449 | 19.023 | 24.612 | 99.6 | 57.86 +Bond | 1.4547 | 2.8768 | 3.9098 | 61.4 | 8.75 +Kspace | 1.0537 | 1.0778 | 1.0992 | 2.1 | 3.28 +Neigh | 0.67542 | 0.67994 | 0.68323 | 0.3 | 2.07 +Comm | 1.8602 | 8.4515 | 16.516 | 182.9 | 25.71 +Output | 0.000839 | 0.00147 | 0.003293 | 2.7 | 0.00 +Modify | 0.56658 | 0.63186 | 0.69304 | 6.8 | 1.92 +Other | | 0.133 | | | 0.40 + +Nlocal: 223 ave 339 max 136 min +Histogram: 1 1 0 0 0 1 0 0 0 1 +Nghost: 590 ave 626 max 552 min +Histogram: 1 0 0 0 1 0 1 0 0 1 +Neighs: 36488.2 ave 41965 max 29054 min +Histogram: 1 0 0 0 1 0 0 0 1 1 + +Total # of neighbors = 145953 +Ave neighs/atom = 163.624 +Ave special neighs/atom = 10.9395 +Neighbor list builds = 189 +Dangerous builds = 0 + +unfix cor +unfix 1 + + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:36 diff --git a/examples/USER/misc/filter_corotate/log.22Jun2017.peptide.g++.1 b/examples/USER/misc/filter_corotate/log.22Jun2017.peptide.g++.1 new file mode 100644 index 0000000000..22c5483c9e --- /dev/null +++ b/examples/USER/misc/filter_corotate/log.22Jun2017.peptide.g++.1 @@ -0,0 +1,147 @@ +LAMMPS (20 Jun 2017) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# Solvated 5-mer peptide, run for 8ps in NVT + +units real +atom_style full + +pair_style lj/charmm/coul/long 8.0 10.0 10.0 +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic +kspace_style pppm 0.0001 + +read_data data.peptide + orthogonal box = (36.8402 41.0137 29.7681) to (64.2116 68.3851 57.1395) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 2004 atoms + reading velocities ... + 2004 velocities + scanning bonds ... + 3 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 14 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 1365 bonds + reading angles ... + 786 angles + reading dihedrals ... + 207 dihedrals + reading impropers ... + 12 impropers + 4 = max # of 1-2 neighbors + 7 = max # of 1-3 neighbors + 14 = max # of 1-4 neighbors + 18 = max # of special neighbors + +neighbor 2.0 bin +neigh_modify delay 5 + +thermo 50 +#dump dump1 all atom 100 peptide.dump + +timestep 8 + +run_style respa 3 2 8 bond 1 dihedral 2 pair 2 kspace 3 +Respa levels: + 1 = bond angle + 2 = dihedral improper pair + 3 = kspace + +fix 1 all nvt temp 250.0 250.0 100.0 tchain 1 +fix cor all filter/corotate m 1.0 + 19 = # of size 2 clusters + 0 = # of size 3 clusters + 3 = # of size 4 clusters + 0 = # of size 5 clusters + 646 = # of frozen angles +run 1000 +PPPM initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.268725 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0228209 + estimated relative force accuracy = 6.87243e-05 + using double precision FFTs + 3d grid and FFT values/proc = 10648 3375 +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 5 5 5 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 22.72 | 22.72 | 22.72 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 190.0857 -6442.7438 70.391457 -5237.4338 20361.984 + 50 239.47667 -7205.1006 1092.7664 -4682.5237 -23733.122 + 100 244.63086 -6788.0793 422.97204 -4904.5234 16458.011 + 150 240.79042 -7267.0791 966.31411 -4863.1107 -13554.894 + 200 254.77122 -6868.5713 591.00071 -4756.4431 10532.563 + 250 241.87417 -7264.9349 856.9357 -4963.8743 -9043.4359 + 300 251.37775 -6976.8 650.55612 -4825.3773 6986.2021 + 350 250.81494 -7286.7011 880.11184 -4909.0829 -6392.4665 + 400 247.55673 -7104.4036 701.89555 -4924.4551 4720.7811 + 450 258.54988 -7215.3011 832.23692 -4839.3759 -3446.3859 + 500 246.80928 -7151.2468 715.61007 -4962.0464 2637.5769 + 550 246.20721 -7159.0464 805.24974 -4883.8011 -2725.227 + 600 250.62483 -7201.7688 806.10076 -4899.2968 770.22352 + 650 247.59777 -7260.1607 802.97277 -4978.8899 -430.42309 + 700 246.86951 -7286.2971 825.99865 -4986.3486 -427.88651 + 750 252.79268 -7307.8572 833.4822 -4965.0605 -614.74372 + 800 251.73191 -7315.2457 839.59859 -4972.666 952.56448 + 850 246.75844 -7303.6221 816.67112 -5013.6642 -2055.2823 + 900 251.00123 -7317.4219 825.12165 -4993.6817 -356.53166 + 950 259.20822 -7252.3466 854.62611 -4850.1016 -1719.5267 + 1000 245.72486 -7347.5547 811.48146 -5068.9576 -717.6136 +Loop time of 357.523 on 1 procs for 1000 steps with 2004 atoms + +Performance: 1.933 ns/day, 12.414 hours/ns, 2.797 timesteps/s +32.0% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 328.2 | 328.2 | 328.2 | 0.0 | 91.80 +Bond | 4.4815 | 4.4815 | 4.4815 | 0.0 | 1.25 +Kspace | 3.9448 | 3.9448 | 3.9448 | 0.0 | 1.10 +Neigh | 12.457 | 12.457 | 12.457 | 0.0 | 3.48 +Comm | 3.2147 | 3.2147 | 3.2147 | 0.0 | 0.90 +Output | 0.001689 | 0.001689 | 0.001689 | 0.0 | 0.00 +Modify | 3.937 | 3.937 | 3.937 | 0.0 | 1.10 +Other | | 1.289 | | | 0.36 + +Nlocal: 2004 ave 2004 max 2004 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 11191 ave 11191 max 11191 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 708610 ave 708610 max 708610 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 708610 +Ave neighs/atom = 353.598 +Ave special neighs/atom = 2.34032 +Neighbor list builds = 200 +Dangerous builds = 200 +unfix cor +unfix 1 + + + + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:05:57 diff --git a/examples/USER/misc/filter_corotate/log.22Jun2017.peptide.g++.4 b/examples/USER/misc/filter_corotate/log.22Jun2017.peptide.g++.4 new file mode 100644 index 0000000000..eec3843bd0 --- /dev/null +++ b/examples/USER/misc/filter_corotate/log.22Jun2017.peptide.g++.4 @@ -0,0 +1,147 @@ +LAMMPS (20 Jun 2017) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# Solvated 5-mer peptide, run for 8ps in NVT + +units real +atom_style full + +pair_style lj/charmm/coul/long 8.0 10.0 10.0 +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic +kspace_style pppm 0.0001 + +read_data data.peptide + orthogonal box = (36.8402 41.0137 29.7681) to (64.2116 68.3851 57.1395) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 2004 atoms + reading velocities ... + 2004 velocities + scanning bonds ... + 3 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 14 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 1365 bonds + reading angles ... + 786 angles + reading dihedrals ... + 207 dihedrals + reading impropers ... + 12 impropers + 4 = max # of 1-2 neighbors + 7 = max # of 1-3 neighbors + 14 = max # of 1-4 neighbors + 18 = max # of special neighbors + +neighbor 2.0 bin +neigh_modify delay 5 + +thermo 50 +#dump dump1 all atom 100 peptide.dump + +timestep 8 + +run_style respa 3 2 8 bond 1 dihedral 2 pair 2 kspace 3 +Respa levels: + 1 = bond angle + 2 = dihedral improper pair + 3 = kspace + +fix 1 all nvt temp 250.0 250.0 100.0 tchain 1 +fix cor all filter/corotate m 1.0 + 19 = # of size 2 clusters + 0 = # of size 3 clusters + 3 = # of size 4 clusters + 0 = # of size 5 clusters + 646 = # of frozen angles +run 1000 +PPPM initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.268725 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0228209 + estimated relative force accuracy = 6.87243e-05 + using double precision FFTs + 3d grid and FFT values/proc = 4312 960 +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 5 5 5 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 16.87 | 17.05 | 17.26 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 190.0857 -6442.7438 70.391457 -5237.4338 20361.984 + 50 239.47667 -7205.1005 1092.7664 -4682.5237 -23733.122 + 100 244.63889 -6788.1152 422.96733 -4904.5161 16457.756 + 150 239.36917 -7258.7053 967.87775 -4861.6589 -13526.261 + 200 255.14702 -6864.0525 604.58036 -4736.1009 11013.1 + 250 252.72919 -7303.0966 898.11178 -4896.0494 -8480.8766 + 300 250.66477 -6989.2603 652.83649 -4839.8141 6209.3375 + 350 243.30794 -7218.8575 838.31977 -4927.8525 -5180.4928 + 400 256.3573 -7090.677 706.24197 -4853.8377 3302.577 + 450 246.15776 -7274.574 834.31676 -4970.557 -3427.971 + 500 256.28473 -7082.1447 735.42828 -4816.5524 2846.086 + 550 251.32327 -7341.739 812.64934 -5028.5484 -1786.9277 + 600 254.57737 -7152.3448 740.52534 -4891.8494 825.91675 + 650 244.95305 -7207.1136 790.67659 -4953.9295 -520.79769 + 700 249.4984 -7204.2699 779.06969 -4935.5544 -940.75384 + 750 248.46962 -7232.1037 791.6642 -4956.9361 -548.12171 + 800 260.2974 -7293.1982 793.23282 -4945.8435 -1171.26 + 850 249.79023 -7258.3759 823.56789 -4943.4198 -499.76275 + 900 249.97237 -7267.0584 784.57992 -4990.0028 -271.33531 + 950 251.29018 -7261.0642 823.467 -4937.2534 -538.7168 + 1000 246.05777 -7285.0948 847.90892 -4968.0826 -2613.1854 +Loop time of 94.6835 on 4 procs for 1000 steps with 2004 atoms + +Performance: 7.300 ns/day, 3.288 hours/ns, 10.562 timesteps/s +37.9% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 33.389 | 78.508 | 94.639 | 294.1 | 82.92 +Bond | 0.39957 | 1.104 | 1.4443 | 40.6 | 1.17 +Kspace | 0.53324 | 1.2631 | 1.5137 | 37.5 | 1.33 +Neigh | 1.2668 | 3.011 | 3.5942 | 58.0 | 3.18 +Comm | 3.4563 | 8.8707 | 11.494 | 107.9 | 9.37 +Output | 0.000435 | 0.0017425 | 0.004136 | 3.4 | 0.00 +Modify | 0.59335 | 1.4123 | 1.6921 | 39.8 | 1.49 +Other | | 0.5129 | | | 0.54 + +Nlocal: 501 ave 515 max 476 min +Histogram: 1 0 0 0 0 0 0 1 1 1 +Nghost: 6681.5 ave 6740 max 6634 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Neighs: 176872 ave 182642 max 168464 min +Histogram: 1 0 0 0 0 0 1 1 0 1 + +Total # of neighbors = 707486 +Ave neighs/atom = 353.037 +Ave special neighs/atom = 2.34032 +Neighbor list builds = 200 +Dangerous builds = 200 +unfix cor +unfix 1 + + + + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:01:53 -- GitLab From f092da80a95939daf859169f26807891b46186c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=BCtter?= Date: Thu, 22 Jun 2017 13:28:12 +0200 Subject: [PATCH 353/593] Fix some shadowing warnings --- src/USER-MEAMC/meam.h | 4 ++-- src/USER-MEAMC/meam_dens_final.cpp | 16 ++++++---------- src/USER-MEAMC/meam_setup_done.cpp | 15 +++++---------- src/USER-MEAMC/pair_meamc.cpp | 2 +- 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 789e21e6fe..2ac487483e 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -109,8 +109,8 @@ public: double *scrfcn,*dscrfcn,*fcpair; protected: void meam_checkindex(int, int, int, int*, int*); - void G_gam(double, int, double, double*, int*); - void dG_gam(double, int, double, double*, double*); + void G_gam(double, int, double*, int*); + void dG_gam(double, int, double*, double*); void getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** x, int numneigh, int* firstneigh, int numneigh_full, int* firstneigh_full, int ntype, int* type, int* fmap); diff --git a/src/USER-MEAMC/meam_dens_final.cpp b/src/USER-MEAMC/meam_dens_final.cpp index 347add205b..716cd8cada 100644 --- a/src/USER-MEAMC/meam_dens_final.cpp +++ b/src/USER-MEAMC/meam_dens_final.cpp @@ -81,8 +81,7 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global, Z = this->Z_meam[elti]; - G_gam(arr1v(gamma, i), this->ibar_meam[elti], - this->gsmooth_factor, &G, errorflag); + G_gam(arr1v(gamma, i), this->ibar_meam[elti], &G, errorflag); if (*errorflag != 0) return; get_shpfcn(shp, this->lattce_meam[elti][elti]); @@ -100,8 +99,7 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global, this->t3_meam[elti] * shp[3]) / (Z * Z); } - G_gam(gam, this->ibar_meam[elti], this->gsmooth_factor, &Gbar, - errorflag); + G_gam(gam, this->ibar_meam[elti], &Gbar, errorflag); } arr1v(rho, i) = arr1v(rho0, i) * G; @@ -113,8 +111,7 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global, gam = (arr2v(t_ave, 1, i) * shp[1] + arr2v(t_ave, 2, i) * shp[2] + arr2v(t_ave, 3, i) * shp[3]) / (Z * Z); - dG_gam(gam, this->ibar_meam[elti], this->gsmooth_factor, - &Gbar, &dGbar); + dG_gam(gam, this->ibar_meam[elti], &Gbar, &dGbar); } rho_bkgd = this->rho0_meam[elti] * Z * Gbar; } else { @@ -127,8 +124,7 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global, rhob = arr1v(rho, i) / rho_bkgd; denom = 1.0 / rho_bkgd; - dG_gam(arr1v(gamma, i), this->ibar_meam[elti], - this->gsmooth_factor, &G, &dG); + dG_gam(arr1v(gamma, i), this->ibar_meam[elti], &G, &dG); arr1v(dgamma1, i) = (G - 2 * dG * arr1v(gamma, i)) * denom; @@ -185,7 +181,7 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global, // ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc void -MEAM::G_gam(double gamma, int ibar, double gsmooth_factor, double* G, int* errorflag) +MEAM::G_gam(double gamma, int ibar, double* G, int* errorflag) { // Compute G(gamma) based on selection flag ibar: // 0 => G = sqrt(1+gamma) @@ -226,7 +222,7 @@ MEAM::G_gam(double gamma, int ibar, double gsmooth_factor, double* G, int* error // ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc void -MEAM::dG_gam(double gamma, int ibar, double gsmooth_factor, double* G, double* dG) +MEAM::dG_gam(double gamma, int ibar, double* G, double* dG) { // Compute G(gamma) and dG(gamma) based on selection flag ibar: // 0 => G = sqrt(1+gamma) diff --git a/src/USER-MEAMC/meam_setup_done.cpp b/src/USER-MEAMC/meam_setup_done.cpp index 36aeee9b17..59fab02906 100644 --- a/src/USER-MEAMC/meam_setup_done.cpp +++ b/src/USER-MEAMC/meam_setup_done.cpp @@ -471,16 +471,14 @@ MEAM::phi_meam(double r, int a, int b) else { get_shpfcn(s1, this->lattce_meam[a][a]); Gam1 = (s1[1] * t11av + s1[2] * t21av + s1[3] * t31av) / (Z1 * Z1); - G_gam(Gam1, this->ibar_meam[a], this->gsmooth_factor, &G1, - &errorflag); + G_gam(Gam1, this->ibar_meam[a], &G1, &errorflag); } if (this->ibar_meam[b] <= 0) G2 = 1.0; else { get_shpfcn(s2, this->lattce_meam[b][b]); Gam2 = (s2[1] * t12av + s2[2] * t22av + s2[3] * t32av) / (Z2 * Z2); - G_gam(Gam2, this->ibar_meam[b], this->gsmooth_factor, &G2, - &errorflag); + G_gam(Gam2, this->ibar_meam[b], &G2, &errorflag); } rho0_1 = this->rho0_meam[a] * Z1 * G1; rho0_2 = this->rho0_meam[b] * Z2 * G2; @@ -497,10 +495,8 @@ MEAM::phi_meam(double r, int a, int b) else Gam2 = Gam2 / (rho02 * rho02); - G_gam(Gam1, this->ibar_meam[a], this->gsmooth_factor, &G1, - &errorflag); - G_gam(Gam2, this->ibar_meam[b], this->gsmooth_factor, &G2, - &errorflag); + G_gam(Gam1, this->ibar_meam[a], &G1, &errorflag); + G_gam(Gam2, this->ibar_meam[b], &G2, &errorflag); if (this->mix_ref_t == 1) { rho_bkgd1 = rho0_1; rho_bkgd2 = rho0_2; @@ -602,8 +598,7 @@ MEAM::compute_reference_density(void) gam = (this->t1_meam[a] * shp[1] + this->t2_meam[a] * shp[2] + this->t3_meam[a] * shp[3]) / (Z * Z); - G_gam(gam, this->ibar_meam[a], this->gsmooth_factor, &Gbar, - &errorflag); + G_gam(gam, this->ibar_meam[a], &Gbar, &errorflag); } // The zeroth order density in the reference structure, with diff --git a/src/USER-MEAMC/pair_meamc.cpp b/src/USER-MEAMC/pair_meamc.cpp index 7ffeec360e..bf096c1a1e 100644 --- a/src/USER-MEAMC/pair_meamc.cpp +++ b/src/USER-MEAMC/pair_meamc.cpp @@ -89,7 +89,7 @@ PairMEAMC::~PairMEAMC() void PairMEAMC::compute(int eflag, int vflag) { - int i,j,ii,n,inum_half,errorflag; + int i,ii,n,inum_half,errorflag; int *ilist_half,*numneigh_half,**firstneigh_half; int *numneigh_full,**firstneigh_full; -- GitLab From 60c3f3d64c5872febe9def2f0b94651b5304e415 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 22 Jun 2017 09:15:15 -0600 Subject: [PATCH 354/593] use CHARMM energy conversion factor with new CHARMM pair styles --- src/KSPACE/pair_lj_charmmfsw_coul_long.cpp | 11 +++++++++++ src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp | 11 +++++++++++ src/force.cpp | 2 ++ src/force.h | 3 +++ src/update.cpp | 2 +- 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index 6e17a9bbd7..9ba59b6995 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -25,6 +25,7 @@ #include #include "pair_lj_charmmfsw_coul_long.h" #include "atom.h" +#include "update.h" #include "comm.h" #include "force.h" #include "kspace.h" @@ -61,6 +62,11 @@ PairLJCharmmfswCoulLong::PairLJCharmmfswCoulLong(LAMMPS *lmp) : Pair(lmp) // short-range/long-range flag accessed by DihedralCharmmfsw dihedflag = 1; + + // switch qqr2e from LAMMPS value to CHARMM value + + if (strcmp(update->unit_style,"real") == 0) + force->qqr2e = force->qqr2e_charmm_real; } /* ---------------------------------------------------------------------- */ @@ -87,6 +93,11 @@ PairLJCharmmfswCoulLong::~PairLJCharmmfswCoulLong() } if (ftable) free_tables(); } + + // switch qqr2e back from CHARMM value to LAMMPS value + + if (strcmp(update->unit_style,"real") == 0) + force->qqr2e = force->qqr2e_lammps_real; } /* ---------------------------------------------------------------------- */ diff --git a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp index 1e34b06478..f1366a379d 100644 --- a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp +++ b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp @@ -25,6 +25,7 @@ #include #include "pair_lj_charmmfsw_coul_charmmfsh.h" #include "atom.h" +#include "update.h" #include "comm.h" #include "force.h" #include "neighbor.h" @@ -46,6 +47,11 @@ PairLJCharmmfswCoulCharmmfsh::PairLJCharmmfswCoulCharmmfsh(LAMMPS *lmp) : // short-range/long-range flag accessed by DihedralCharmmfsw dihedflag = 0; + + // switch qqr2e from LAMMPS value to CHARMM value + + if (strcmp(update->unit_style,"real") == 0) + force->qqr2e = force->qqr2e_charmm_real; } /* ---------------------------------------------------------------------- */ @@ -71,6 +77,11 @@ PairLJCharmmfswCoulCharmmfsh::~PairLJCharmmfswCoulCharmmfsh() memory->destroy(lj14_4); } } + + // switch qqr2e back from CHARMM value to LAMMPS value + + if (strcmp(update->unit_style,"real") == 0) + force->qqr2e = force->qqr2e_lammps_real; } /* ---------------------------------------------------------------------- */ diff --git a/src/force.cpp b/src/force.cpp index 3dd28cc710..33e6630406 100644 --- a/src/force.cpp +++ b/src/force.cpp @@ -53,6 +53,8 @@ Force::Force(LAMMPS *lmp) : Pointers(lmp) special_extra = 0; dielectric = 1.0; + qqr2e_lammps_real = 332.06371; // these constants are toggled + qqr2e_charmm_real = 332.0716; // by new CHARMM pair styles pair = NULL; bond = NULL; diff --git a/src/force.h b/src/force.h index f2d9abc7dd..edaac1b527 100644 --- a/src/force.h +++ b/src/force.h @@ -43,6 +43,9 @@ class Force : protected Pointers { double femtosecond; // 1 femtosecond in native units double qelectron; // 1 electron charge abs() in native units + double qqr2e_lammps_real; // different versions of this constant + double qqr2e_charmm_real; // used by new CHARMM pair styles + int newton,newton_pair,newton_bond; // Newton's 3rd law settings class Pair *pair; diff --git a/src/update.cpp b/src/update.cpp index 5599dc6c88..e4c85dde73 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -154,7 +154,7 @@ void Update::set_units(const char *style) force->ftm2v = 1.0 / 48.88821291 / 48.88821291; force->mv2d = 1.0 / 0.602214129; force->nktv2p = 68568.415; - force->qqr2e = 332.06371; + force->qqr2e = 332.06371; // see also force->qqr2d_lammps_real force->qe2f = 23.060549; force->vxmu2f = 1.4393264316e4; force->xxt2kmu = 0.1; -- GitLab From dadd1c8b4d6e2e277666bb3f36715352f375f435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=BCtter?= Date: Thu, 22 Jun 2017 19:02:14 +0200 Subject: [PATCH 355/593] Remove neigh_f2c/c2f, related cleanup - neighbour lists now use C indexing - removed many arr*v() macros - removed some unneccessary pointers - minor reformatting --- src/USER-MEAMC/meam.h | 28 +-- src/USER-MEAMC/meam_dens_final.cpp | 108 +++++------ src/USER-MEAMC/meam_dens_init.cpp | 192 +++++++++--------- src/USER-MEAMC/meam_force.cpp | 300 ++++++++++++++--------------- src/USER-MEAMC/pair_meamc.cpp | 62 +----- src/USER-MEAMC/pair_meamc.h | 2 - 6 files changed, 310 insertions(+), 382 deletions(-) diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 2ac487483e..7f210eac18 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -141,20 +141,24 @@ public: void interpolate_meam(int); double compute_phi(double, int, int); public: - void meam_setup_global(int, lattice_t*, double*, int*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, int*); - void meam_setup_param(int, double, int, int*, int*); - void meam_setup_done(double*); - void meam_dens_setup(int, int, int); - void meam_dens_init(int* i, int* ntype, int* type, int* fmap, double** x, - int* numneigh, int* firstneigh, int* numneigh_full, + void meam_setup_global(int nelt, lattice_t* lat, double* z, int* ielement, double* atwt, + double* alpha, double* b0, double* b1, double* b2, + double* b3, double* alat, double* esub, double* asub, + double* t0, double* t1, double* t2, double* t3, + double* rozero, int* ibar); + void meam_setup_param(int which, double value, int nindex, int* index /*index(3)*/, int* errorflag); + void meam_setup_done(double* cutmax); + void meam_dens_setup(int atom_nmax, int nall, int n_neigh); + void meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, + int numneigh, int* firstneigh, int numneigh_full, int* firstneigh_full, int fnoffset, int* errorflag); - void meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global, - int* eflag_atom, double* eng_vdwl, double* eatom, int* ntype, + void meam_dens_final(int nlocal, int eflag_either, int eflag_global, + int eflag_atom, double* eng_vdwl, double* eatom, int ntype, int* type, int* fmap, int* errorflag); - void meam_force(int* iptr, int* eflag_either, int* eflag_global, - int* eflag_atom, int* vflag_atom, double* eng_vdwl, double* eatom, - int* ntype, int* type, int* fmap, double** x, int* numneigh, - int* firstneigh, int* numneigh_full, int* firstneigh_full, + void meam_force(int i, int eflag_either, int eflag_global, + int eflag_atom, int vflag_atom, double* eng_vdwl, double* eatom, + int ntype, int* type, int* fmap, double** x, int numneigh, + int* firstneigh, int numneigh_full, int* firstneigh_full, int fnoffset, double** f, double** vatom, int* errorflag); }; diff --git a/src/USER-MEAMC/meam_dens_final.cpp b/src/USER-MEAMC/meam_dens_final.cpp index 716cd8cada..b753542db2 100644 --- a/src/USER-MEAMC/meam_dens_final.cpp +++ b/src/USER-MEAMC/meam_dens_final.cpp @@ -21,8 +21,8 @@ using namespace LAMMPS_NS; // void -MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global, - int* eflag_atom, double* eng_vdwl, double* eatom, int* ntype, +MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, + int eflag_atom, double* eng_vdwl, double* eatom, int ntype, int* type, int* fmap, int* errorflag) { int i, elti; @@ -32,56 +32,54 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global, // Complete the calculation of density - for (i = 1; i <= *nlocal; i++) { - elti = fmap[arr1v(type, i)]; + for (i = 0; i < nlocal; i++) { + elti = fmap[type[i]]; if (elti >= 0) { - arr1v(rho1, i) = 0.0; - arr1v(rho2, i) = -1.0 / 3.0 * arr1v(arho2b, i) * arr1v(arho2b, i); - arr1v(rho3, i) = 0.0; + rho1[i] = 0.0; + rho2[i] = -1.0 / 3.0 * arho2b[i] * arho2b[i]; + rho3[i] = 0.0; for (m = 1; m <= 3; m++) { - arr1v(rho1, i) = - arr1v(rho1, i) + arr2v(arho1, m, i) * arr2v(arho1, m, i); - arr1v(rho3, i) = arr1v(rho3, i) - - 3.0 / 5.0 * arr2v(arho3b, m, i) * arr2v(arho3b, m, i); + rho1[i] = rho1[i] + arr2v(arho1, m, i+1) * arr2v(arho1, m, i+1); + rho3[i] = rho3[i] - 3.0 / 5.0 * arr2v(arho3b, m, i+1) * arr2v(arho3b, m, i+1); } for (m = 1; m <= 6; m++) { - arr1v(rho2, i) = - arr1v(rho2, i) + - this->v2D[m] * arr2v(arho2, m, i) * arr2v(arho2, m, i); + rho2[i] = + rho2[i] + + this->v2D[m] * arr2v(arho2, m, i+1) * arr2v(arho2, m, i+1); } for (m = 1; m <= 10; m++) { - arr1v(rho3, i) = - arr1v(rho3, i) + - this->v3D[m] * arr2v(arho3, m, i) * arr2v(arho3, m, i); + rho3[i] = + rho3[i] + + this->v3D[m] * arr2v(arho3, m, i+1) * arr2v(arho3, m, i+1); } - if (arr1v(rho0, i) > 0.0) { + if (rho0[i] > 0.0) { if (this->ialloy == 1) { - arr2v(t_ave, 1, i) = arr2v(t_ave, 1, i) / arr2v(tsq_ave, 1, i); - arr2v(t_ave, 2, i) = arr2v(t_ave, 2, i) / arr2v(tsq_ave, 2, i); - arr2v(t_ave, 3, i) = arr2v(t_ave, 3, i) / arr2v(tsq_ave, 3, i); + t_ave[i][0] = t_ave[i][0] / tsq_ave[i][0]; + t_ave[i][1] = t_ave[i][1] / tsq_ave[i][1]; + t_ave[i][2] = t_ave[i][2] / tsq_ave[i][2]; } else if (this->ialloy == 2) { - arr2v(t_ave, 1, i) = this->t1_meam[elti]; - arr2v(t_ave, 2, i) = this->t2_meam[elti]; - arr2v(t_ave, 3, i) = this->t3_meam[elti]; + t_ave[i][0] = this->t1_meam[elti]; + t_ave[i][1] = this->t2_meam[elti]; + t_ave[i][2] = this->t3_meam[elti]; } else { - arr2v(t_ave, 1, i) = arr2v(t_ave, 1, i) / arr1v(rho0, i); - arr2v(t_ave, 2, i) = arr2v(t_ave, 2, i) / arr1v(rho0, i); - arr2v(t_ave, 3, i) = arr2v(t_ave, 3, i) / arr1v(rho0, i); + t_ave[i][0] = t_ave[i][0] / rho0[i]; + t_ave[i][1] = t_ave[i][1] / rho0[i]; + t_ave[i][2] = t_ave[i][2] / rho0[i]; } } - arr1v(gamma, i) = arr2v(t_ave, 1, i) * arr1v(rho1, i) + - arr2v(t_ave, 2, i) * arr1v(rho2, i) + - arr2v(t_ave, 3, i) * arr1v(rho3, i); + gamma[i] = t_ave[i][0] * rho1[i] + + t_ave[i][1] * rho2[i] + + t_ave[i][2] * rho3[i]; - if (arr1v(rho0, i) > 0.0) { - arr1v(gamma, i) = arr1v(gamma, i) / (arr1v(rho0, i) * arr1v(rho0, i)); + if (rho0[i] > 0.0) { + gamma[i] = gamma[i] / (rho0[i] * rho0[i]); } Z = this->Z_meam[elti]; - G_gam(arr1v(gamma, i), this->ibar_meam[elti], &G, errorflag); + G_gam(gamma[i], this->ibar_meam[elti], &G, errorflag); if (*errorflag != 0) return; get_shpfcn(shp, this->lattce_meam[elti][elti]); @@ -90,8 +88,8 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global, dGbar = 0.0; } else { if (this->mix_ref_t == 1) { - gam = (arr2v(t_ave, 1, i) * shp[1] + arr2v(t_ave, 2, i) * shp[2] + - arr2v(t_ave, 3, i) * shp[3]) / + gam = (t_ave[i][0] * shp[1] + t_ave[i][1] * shp[2] + + t_ave[i][2] * shp[3]) / (Z * Z); } else { gam = (this->t1_meam[elti] * shp[1] + @@ -101,15 +99,15 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global, } G_gam(gam, this->ibar_meam[elti], &Gbar, errorflag); } - arr1v(rho, i) = arr1v(rho0, i) * G; + rho[i] = rho0[i] * G; if (this->mix_ref_t == 1) { if (this->ibar_meam[elti] <= 0) { Gbar = 1.0; dGbar = 0.0; } else { - gam = (arr2v(t_ave, 1, i) * shp[1] + arr2v(t_ave, 2, i) * shp[2] + - arr2v(t_ave, 3, i) * shp[3]) / + gam = (t_ave[i][0] * shp[1] + t_ave[i][1] * shp[2] + + t_ave[i][2] * shp[3]) / (Z * Z); dG_gam(gam, this->ibar_meam[elti], &Gbar, &dGbar); } @@ -121,57 +119,57 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global, rho_bkgd = this->rho_ref_meam[elti]; } } - rhob = arr1v(rho, i) / rho_bkgd; + rhob = rho[i] / rho_bkgd; denom = 1.0 / rho_bkgd; - dG_gam(arr1v(gamma, i), this->ibar_meam[elti], &G, &dG); + dG_gam(gamma[i], this->ibar_meam[elti], &G, &dG); - arr1v(dgamma1, i) = (G - 2 * dG * arr1v(gamma, i)) * denom; + dgamma1[i] = (G - 2 * dG * gamma[i]) * denom; - if (!iszero(arr1v(rho0, i))) { - arr1v(dgamma2, i) = (dG / arr1v(rho0, i)) * denom; + if (!iszero(rho0[i])) { + dgamma2[i] = (dG / rho0[i]) * denom; } else { - arr1v(dgamma2, i) = 0.0; + dgamma2[i] = 0.0; } // dgamma3 is nonzero only if we are using the "mixed" rule for // computing t in the reference system (which is not correct, but // included for backward compatibility if (this->mix_ref_t == 1) { - arr1v(dgamma3, i) = arr1v(rho0, i) * G * dGbar / (Gbar * Z * Z) * denom; + dgamma3[i] = rho0[i] * G * dGbar / (Gbar * Z * Z) * denom; } else { - arr1v(dgamma3, i) = 0.0; + dgamma3[i] = 0.0; } B = this->A_meam[elti] * this->Ec_meam[elti][elti]; if (!iszero(rhob)) { if (this->emb_lin_neg == 1 && rhob <= 0) { - arr1v(frhop, i) = -B; + frhop[i] = -B; } else { - arr1v(frhop, i) = B * (log(rhob) + 1.0); + frhop[i] = B * (log(rhob) + 1.0); } - if (*eflag_either != 0) { - if (*eflag_global != 0) { + if (eflag_either != 0) { + if (eflag_global != 0) { if (this->emb_lin_neg == 1 && rhob <= 0) { *eng_vdwl = *eng_vdwl - B * rhob; } else { *eng_vdwl = *eng_vdwl + B * rhob * log(rhob); } } - if (*eflag_atom != 0) { + if (eflag_atom != 0) { if (this->emb_lin_neg == 1 && rhob <= 0) { - arr1v(eatom, i) = arr1v(eatom, i) - B * rhob; + eatom[i] = eatom[i] - B * rhob; } else { - arr1v(eatom, i) = arr1v(eatom, i) + B * rhob * log(rhob); + eatom[i] = eatom[i] + B * rhob * log(rhob); } } } } else { if (this->emb_lin_neg == 1) { - arr1v(frhop, i) = -B; + frhop[i] = -B; } else { - arr1v(frhop, i) = B; + frhop[i] = B; } } } diff --git a/src/USER-MEAMC/meam_dens_init.cpp b/src/USER-MEAMC/meam_dens_init.cpp index e530a5feb1..932346a19a 100644 --- a/src/USER-MEAMC/meam_dens_init.cpp +++ b/src/USER-MEAMC/meam_dens_init.cpp @@ -101,18 +101,18 @@ MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) // void -MEAM::meam_dens_init(int* i, int* ntype, int* type, int* fmap, double** x, - int* numneigh, int* firstneigh, int* numneigh_full, +MEAM::meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, + int numneigh, int* firstneigh, int numneigh_full, int* firstneigh_full, int fnoffset, int* errorflag) { *errorflag = 0; // Compute screening function and derivatives - getscreen(*i, &scrfcn[fnoffset], &dscrfcn[fnoffset], &fcpair[fnoffset], x, *numneigh, firstneigh, - *numneigh_full, firstneigh_full, *ntype, type, fmap); + getscreen(i, &scrfcn[fnoffset], &dscrfcn[fnoffset], &fcpair[fnoffset], x, numneigh, firstneigh, + numneigh_full, firstneigh_full, ntype, type, fmap); // Calculate intermediate density terms to be communicated - calc_rho1(*i, *ntype, type, fmap, x, *numneigh, firstneigh, &scrfcn[fnoffset], &fcpair[fnoffset]); + calc_rho1(i, ntype, type, fmap, x, numneigh, firstneigh, &scrfcn[fnoffset], &fcpair[fnoffset]); } // ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc @@ -135,24 +135,24 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double rnorm, fc, dfc, drinv; drinv = 1.0 / this->delr_meam; - elti = fmap[arr1v(type, i)]; + elti = fmap[type[i]]; if (elti >= 0) { - xitmp = arr2v(x, 1, i); - yitmp = arr2v(x, 2, i); - zitmp = arr2v(x, 3, i); + xitmp = x[i][0]; + yitmp = x[i][1]; + zitmp = x[i][2]; - for (jn = 1; jn <= numneigh; jn++) { - j = arr1v(firstneigh, jn); + for (jn = 0; jn < numneigh; jn++) { + j = firstneigh[jn]; - eltj = fmap[arr1v(type, j)]; + eltj = fmap[type[j]]; if (eltj >= 0) { // First compute screening function itself, sij - xjtmp = arr2v(x, 1, j); - yjtmp = arr2v(x, 2, j); - zjtmp = arr2v(x, 3, j); + xjtmp = x[j][0]; + yjtmp = x[j][1]; + zjtmp = x[j][2]; delxij = xjtmp - xitmp; delyij = yjtmp - yitmp; delzij = zjtmp - zitmp; @@ -171,21 +171,21 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, } // Now compute derivatives - arr1v(dscrfcn, jn) = 0.0; + dscrfcn[jn] = 0.0; sfcij = sij * fcij; if (iszero(sfcij) || iszero(sfcij - 1.0)) goto LABEL_100; rbound = this->ebound_meam[elti][eltj] * rij2; - for (kn = 1; kn <= numneigh_full; kn++) { - k = arr1v(firstneigh_full, kn); + for (kn = 0; kn < numneigh_full; kn++) { + k = firstneigh_full[kn]; if (k == j) continue; - eltk = fmap[arr1v(type, k)]; + eltk = fmap[type[k]]; if (eltk < 0) continue; - xktmp = arr2v(x, 1, k); - yktmp = arr2v(x, 2, k); - zktmp = arr2v(x, 3, k); + xktmp = x[k][0]; + yktmp = x[k][1]; + zktmp = x[k][2]; delxjk = xktmp - xjtmp; delyjk = yktmp - yjtmp; delzjk = zktmp - zjtmp; @@ -223,16 +223,16 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, dfcut(cikj, &sikj, &dfikj); coef1 = dfikj / (delc * sikj); dCfunc(rij2, rik2, rjk2, &dCikj); - arr1v(dscrfcn, jn) = arr1v(dscrfcn, jn) + coef1 * dCikj; + dscrfcn[jn] = dscrfcn[jn] + coef1 * dCikj; } } coef1 = sfcij; coef2 = sij * dfcij / rij; - arr1v(dscrfcn, jn) = arr1v(dscrfcn, jn) * coef1 - coef2; + dscrfcn[jn] = dscrfcn[jn] * coef1 - coef2; LABEL_100: - arr1v(scrfcn, jn) = sij; - arr1v(fcpair, jn) = fcij; + scrfcn[jn] = sij; + fcpair[jn] = fcij; } } } @@ -252,20 +252,20 @@ MEAM::calc_rho1(int i, int ntype, int* type, int* fmap, double** x, double ro0i, ro0j; double rhoa0i, rhoa1i, rhoa2i, rhoa3i, A1i, A2i, A3i; - elti = fmap[arr1v(type, i)]; - xtmp = arr2v(x, 1, i); - ytmp = arr2v(x, 2, i); - ztmp = arr2v(x, 3, i); - for (jn = 1; jn <= numneigh; jn++) { - if (!iszero(arr1v(scrfcn, jn))) { - j = arr1v(firstneigh, jn); - sij = arr1v(scrfcn, jn) * arr1v(fcpair, jn); - delij[1] = arr2v(x, 1, j) - xtmp; - delij[2] = arr2v(x, 2, j) - ytmp; - delij[3] = arr2v(x, 3, j) - ztmp; + elti = fmap[type[i]]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + for (jn = 0; jn < numneigh; jn++) { + if (!iszero(scrfcn[jn])) { + j = firstneigh[jn]; + sij = scrfcn[jn] * fcpair[jn]; + delij[1] = x[j][0] - xtmp; + delij[2] = x[j][1] - ytmp; + delij[3] = x[j][2] - ztmp; rij2 = delij[1] * delij[1] + delij[2] * delij[2] + delij[3] * delij[3]; if (rij2 < this->cutforcesq) { - eltj = fmap[arr1v(type, j)]; + eltj = fmap[type[j]]; rij = sqrt(rij2); ai = rij / this->re_meam[elti][elti] - 1.0; aj = rij / this->re_meam[eltj][eltj] - 1.0; @@ -287,45 +287,27 @@ MEAM::calc_rho1(int i, int ntype, int* type, int* fmap, double** x, rhoa2i = rhoa2i * this->t2_meam[elti]; rhoa3i = rhoa3i * this->t3_meam[elti]; } - arr1v(rho0, i) = arr1v(rho0, i) + rhoa0j; - arr1v(rho0, j) = arr1v(rho0, j) + rhoa0i; + rho0[i] = rho0[i] + rhoa0j; + rho0[j] = rho0[j] + rhoa0i; // For ialloy = 2, use single-element value (not average) if (this->ialloy != 2) { - arr2v(t_ave, 1, i) = - arr2v(t_ave, 1, i) + this->t1_meam[eltj] * rhoa0j; - arr2v(t_ave, 2, i) = - arr2v(t_ave, 2, i) + this->t2_meam[eltj] * rhoa0j; - arr2v(t_ave, 3, i) = - arr2v(t_ave, 3, i) + this->t3_meam[eltj] * rhoa0j; - arr2v(t_ave, 1, j) = - arr2v(t_ave, 1, j) + this->t1_meam[elti] * rhoa0i; - arr2v(t_ave, 2, j) = - arr2v(t_ave, 2, j) + this->t2_meam[elti] * rhoa0i; - arr2v(t_ave, 3, j) = - arr2v(t_ave, 3, j) + this->t3_meam[elti] * rhoa0i; + t_ave[i][0] = t_ave[i][0] + this->t1_meam[eltj] * rhoa0j; + t_ave[i][1] = t_ave[i][1] + this->t2_meam[eltj] * rhoa0j; + t_ave[i][2] = t_ave[i][2] + this->t3_meam[eltj] * rhoa0j; + t_ave[j][0] = t_ave[j][0] + this->t1_meam[elti] * rhoa0i; + t_ave[j][1] = t_ave[j][1] + this->t2_meam[elti] * rhoa0i; + t_ave[j][2] = t_ave[j][2] + this->t3_meam[elti] * rhoa0i; } if (this->ialloy == 1) { - arr2v(tsq_ave, 1, i) = - arr2v(tsq_ave, 1, i) + - this->t1_meam[eltj] * this->t1_meam[eltj] * rhoa0j; - arr2v(tsq_ave, 2, i) = - arr2v(tsq_ave, 2, i) + - this->t2_meam[eltj] * this->t2_meam[eltj] * rhoa0j; - arr2v(tsq_ave, 3, i) = - arr2v(tsq_ave, 3, i) + - this->t3_meam[eltj] * this->t3_meam[eltj] * rhoa0j; - arr2v(tsq_ave, 1, j) = - arr2v(tsq_ave, 1, j) + - this->t1_meam[elti] * this->t1_meam[elti] * rhoa0i; - arr2v(tsq_ave, 2, j) = - arr2v(tsq_ave, 2, j) + - this->t2_meam[elti] * this->t2_meam[elti] * rhoa0i; - arr2v(tsq_ave, 3, j) = - arr2v(tsq_ave, 3, j) + - this->t3_meam[elti] * this->t3_meam[elti] * rhoa0i; + tsq_ave[i][0] = tsq_ave[i][0] + this->t1_meam[eltj] * this->t1_meam[eltj] * rhoa0j; + tsq_ave[i][1] = tsq_ave[i][1] + this->t2_meam[eltj] * this->t2_meam[eltj] * rhoa0j; + tsq_ave[i][2] = tsq_ave[i][2] + this->t3_meam[eltj] * this->t3_meam[eltj] * rhoa0j; + tsq_ave[j][0] = tsq_ave[j][0] + this->t1_meam[elti] * this->t1_meam[elti] * rhoa0i; + tsq_ave[j][1] = tsq_ave[j][1] + this->t2_meam[elti] * this->t2_meam[elti] * rhoa0i; + tsq_ave[j][2] = tsq_ave[j][2] + this->t3_meam[elti] * this->t3_meam[elti] * rhoa0i; } - arr1v(arho2b, i) = arr1v(arho2b, i) + rhoa2j; - arr1v(arho2b, j) = arr1v(arho2b, j) + rhoa2i; + arho2b[i] = arho2b[i] + rhoa2j; + arho2b[j] = arho2b[j] + rhoa2i; A1j = rhoa1j / rij; A2j = rhoa2j / rij2; @@ -336,21 +318,21 @@ MEAM::calc_rho1(int i, int ntype, int* type, int* fmap, double** x, nv2 = 1; nv3 = 1; for (m = 1; m <= 3; m++) { - arr2v(arho1, m, i) = arr2v(arho1, m, i) + A1j * delij[m]; - arr2v(arho1, m, j) = arr2v(arho1, m, j) - A1i * delij[m]; - arr2v(arho3b, m, i) = arr2v(arho3b, m, i) + rhoa3j * delij[m] / rij; - arr2v(arho3b, m, j) = arr2v(arho3b, m, j) - rhoa3i * delij[m] / rij; + arr2v(arho1, m, i+1) = arr2v(arho1, m, i+1) + A1j * delij[m]; + arr2v(arho1, m, j+1) = arr2v(arho1, m, j+1) - A1i * delij[m]; + arr2v(arho3b, m, i+1) = arr2v(arho3b, m, i+1) + rhoa3j * delij[m] / rij; + arr2v(arho3b, m, j+1) = arr2v(arho3b, m, j+1) - rhoa3i * delij[m] / rij; for (n = m; n <= 3; n++) { - arr2v(arho2, nv2, i) = - arr2v(arho2, nv2, i) + A2j * delij[m] * delij[n]; - arr2v(arho2, nv2, j) = - arr2v(arho2, nv2, j) + A2i * delij[m] * delij[n]; + arr2v(arho2, nv2, i+1) = + arr2v(arho2, nv2, i+1) + A2j * delij[m] * delij[n]; + arr2v(arho2, nv2, j+1) = + arr2v(arho2, nv2, j+1) + A2i * delij[m] * delij[n]; nv2 = nv2 + 1; for (p = n; p <= 3; p++) { - arr2v(arho3, nv3, i) = - arr2v(arho3, nv3, i) + A3j * delij[m] * delij[n] * delij[p]; - arr2v(arho3, nv3, j) = - arr2v(arho3, nv3, j) - A3i * delij[m] * delij[n] * delij[p]; + arr2v(arho3, nv3, i+1) = + arr2v(arho3, nv3, i+1) + A3j * delij[m] * delij[n] * delij[p]; + arr2v(arho3, nv3, j+1) = + arr2v(arho3, nv3, j+1) - A3i * delij[m] * delij[n] * delij[p]; nv3 = nv3 + 1; } } @@ -379,26 +361,26 @@ MEAM::screen(int i, int j, double** x, double rijsq, double* sij, double Cmax, Cmin, rbound; *sij = 1.0; - elti = fmap[arr1v(type, i)]; - eltj = fmap[arr1v(type, j)]; + elti = fmap[type[i]]; + eltj = fmap[type[j]]; // if rjksq > ebound*rijsq, atom k is definitely outside the ellipse rbound = this->ebound_meam[elti][eltj] * rijsq; - for (nk = 1; nk <= numneigh_full; nk++) { - k = arr1v(firstneigh_full, nk); - eltk = fmap[arr1v(type, k)]; + for (nk = 0; nk < numneigh_full; nk++) { + k = firstneigh_full[nk]; + eltk = fmap[type[k]]; if (k == j) continue; - delxjk = arr2v(x, 1, k) - arr2v(x, 1, j); - delyjk = arr2v(x, 2, k) - arr2v(x, 2, j); - delzjk = arr2v(x, 3, k) - arr2v(x, 3, j); + delxjk = x[k][0] - x[j][0]; + delyjk = x[k][1] - x[j][1]; + delzjk = x[k][2] - x[j][2]; rjksq = delxjk * delxjk + delyjk * delyjk + delzjk * delzjk; if (rjksq > rbound) continue; - delxik = arr2v(x, 1, k) - arr2v(x, 1, i); - delyik = arr2v(x, 2, k) - arr2v(x, 2, i); - delzik = arr2v(x, 3, k) - arr2v(x, 3, i); + delxik = x[k][0] - x[i][0]; + delyik = x[k][1] - x[i][1]; + delzik = x[k][2] - x[i][2]; riksq = delxik * delxik + delyik * delyik + delzik * delzik; if (riksq > rbound) continue; @@ -450,10 +432,10 @@ MEAM::dsij(int i, int j, int k, int jn, int numneigh, double rij2, double rbound, delc, sij, xik, xjk, cikj, sikj, dfc, a; double Cmax, Cmin, dCikj1, dCikj2; - sij = arr1v(scrfcn, jn) * arr1v(fcpair, jn); - elti = fmap[arr1v(type, i)]; - eltj = fmap[arr1v(type, j)]; - eltk = fmap[arr1v(type, k)]; + sij = scrfcn[jn] * fcpair[jn]; + elti = fmap[type[i]]; + eltj = fmap[type[j]]; + eltk = fmap[type[k]]; Cmax = this->Cmax_meam[elti][eltj][eltk]; Cmin = this->Cmin_meam[elti][eltj][eltk]; @@ -462,14 +444,14 @@ MEAM::dsij(int i, int j, int k, int jn, int numneigh, double rij2, if (!iszero(sij) && !iszero(sij - 1.0)) { rbound = rij2 * this->ebound_meam[elti][eltj]; delc = Cmax - Cmin; - dxjk = arr2v(x, 1, k) - arr2v(x, 1, j); - dyjk = arr2v(x, 2, k) - arr2v(x, 2, j); - dzjk = arr2v(x, 3, k) - arr2v(x, 3, j); + dxjk = x[k][0] - x[j][0]; + dyjk = x[k][1] - x[j][1]; + dzjk = x[k][2] - x[j][2]; rjk2 = dxjk * dxjk + dyjk * dyjk + dzjk * dzjk; if (rjk2 <= rbound) { - dxik = arr2v(x, 1, k) - arr2v(x, 1, i); - dyik = arr2v(x, 2, k) - arr2v(x, 2, i); - dzik = arr2v(x, 3, k) - arr2v(x, 3, i); + dxik = x[k][0] - x[i][0]; + dyik = x[k][1] - x[i][1]; + dzik = x[k][2] - x[i][2]; rik2 = dxik * dxik + dyik * dyik + dzik * dzik; if (rik2 <= rbound) { xik = rik2 / rij2; diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp index 674f766c44..f29021dd4f 100644 --- a/src/USER-MEAMC/meam_force.cpp +++ b/src/USER-MEAMC/meam_force.cpp @@ -26,14 +26,14 @@ using namespace LAMMPS_NS; // void -MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, - int* eflag_atom, int* vflag_atom, double* eng_vdwl, double* eatom, - int* ntype, int* type, int* fmap, double** x, int* numneigh, - int* firstneigh, int* numneigh_full, int* firstneigh_full, +MEAM::meam_force(int i, int eflag_either, int eflag_global, + int eflag_atom, int vflag_atom, double* eng_vdwl, double* eatom, + int ntype, int* type, int* fmap, double** x, int numneigh, + int* firstneigh, int numneigh_full, int* firstneigh_full, int fnoffset, double** f, double** vatom, int* errorflag) { - int i, j, jn, k, kn, kk, m, n, p, q; + int j, jn, k, kn, kk, m, n, p, q; int nv2, nv3, elti, eltj, eltk, ind; double xitmp, yitmp, zitmp, delij[3 + 1], rij2, rij, rij3; double delik[3 + 1], deljk[3 + 1], v[6 + 1], fi[3 + 1], fj[3 + 1]; @@ -69,29 +69,26 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, third = 1.0 / 3.0; sixth = 1.0 / 6.0; - //: aliased - i = *iptr; - // Compute forces atom i - elti = fmap[arr1v(type, i)]; + elti = fmap[type[i]]; if (elti >= 0) { - xitmp = arr2v(x, 1, i); - yitmp = arr2v(x, 2, i); - zitmp = arr2v(x, 3, i); + xitmp = x[i][0]; + yitmp = x[i][1]; + zitmp = x[i][2]; // Treat each pair - for (jn = 1; jn <= *numneigh; jn++) { - j = arr1v(firstneigh, jn); - eltj = fmap[arr1v(type, j)]; + for (jn = 0; jn < numneigh; jn++) { + j = firstneigh[jn]; + eltj = fmap[type[j]]; - if (!iszero(arr1v(scrfcn, fnoffset + jn)) && eltj >= 0) { + if (!iszero(scrfcn[fnoffset + jn]) && eltj >= 0) { - sij = arr1v(scrfcn, fnoffset + jn) * arr1v(fcpair, fnoffset + jn); - delij[1] = arr2v(x, 1, j) - xitmp; - delij[2] = arr2v(x, 2, j) - yitmp; - delij[3] = arr2v(x, 3, j) - zitmp; + sij = scrfcn[fnoffset + jn] * fcpair[fnoffset + jn]; + delij[1] = x[j][0] - xitmp; + delij[2] = x[j][1] - yitmp; + delij[3] = x[j][2] - zitmp; rij2 = delij[1] * delij[1] + delij[2] * delij[2] + delij[3] * delij[3]; if (rij2 < this->cutforcesq) { rij = sqrt(rij2); @@ -116,12 +113,12 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, this->phirar4[ind][kk]; recip = 1.0 / r; - if (*eflag_either != 0) { - if (*eflag_global != 0) + if (eflag_either != 0) { + if (eflag_global != 0) *eng_vdwl = *eng_vdwl + phi * sij; - if (*eflag_atom != 0) { - arr1v(eatom, i) = arr1v(eatom, i) + 0.5 * phi * sij; - arr1v(eatom, j) = arr1v(eatom, j) + 0.5 * phi * sij; + if (eflag_atom != 0) { + eatom[i] = eatom[i] + 0.5 * phi * sij; + eatom[j] = eatom[j] + 0.5 * phi * sij; } } @@ -193,19 +190,19 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, for (p = n; p <= 3; p++) { for (q = p; q <= 3; q++) { arg = delij[n] * delij[p] * delij[q] * this->v3D[nv3]; - arg1i3 = arg1i3 + arr2v(arho3, nv3, i) * arg; - arg1j3 = arg1j3 - arr2v(arho3, nv3, j) * arg; + arg1i3 = arg1i3 + arr2v(arho3, nv3, i+1) * arg; + arg1j3 = arg1j3 - arr2v(arho3, nv3, j+1) * arg; nv3 = nv3 + 1; } arg = delij[n] * delij[p] * this->v2D[nv2]; - arg1i2 = arg1i2 + arr2v(arho2, nv2, i) * arg; - arg1j2 = arg1j2 + arr2v(arho2, nv2, j) * arg; + arg1i2 = arg1i2 + arr2v(arho2, nv2, i+1) * arg; + arg1j2 = arg1j2 + arr2v(arho2, nv2, j+1) * arg; nv2 = nv2 + 1; } - arg1i1 = arg1i1 + arr2v(arho1, n, i) * delij[n]; - arg1j1 = arg1j1 - arr2v(arho1, n, j) * delij[n]; - arg3i3 = arg3i3 + arr2v(arho3b, n, i) * delij[n]; - arg3j3 = arg3j3 - arr2v(arho3b, n, j) * delij[n]; + arg1i1 = arg1i1 + arr2v(arho1, n, i+1) * delij[n]; + arg1j1 = arg1j1 - arr2v(arho1, n, j+1) * delij[n]; + arg3i3 = arg3i3 + arr2v(arho3b, n, i+1) * delij[n]; + arg3j3 = arg3j3 - arr2v(arho3b, n, j+1) * delij[n]; } // rho0 terms @@ -218,25 +215,25 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, drho1dr2 = a1 * (drhoa1i - rhoa1i / rij) * arg1j1; a1 = 2.0 * sij / rij; for (m = 1; m <= 3; m++) { - drho1drm1[m] = a1 * rhoa1j * arr2v(arho1, m, i); - drho1drm2[m] = -a1 * rhoa1i * arr2v(arho1, m, j); + drho1drm1[m] = a1 * rhoa1j * arr2v(arho1, m, i+1); + drho1drm2[m] = -a1 * rhoa1i * arr2v(arho1, m, j+1); } // rho2 terms a2 = 2 * sij / rij2; drho2dr1 = a2 * (drhoa2j - 2 * rhoa2j / rij) * arg1i2 - - 2.0 / 3.0 * arr1v(arho2b, i) * drhoa2j * sij; + 2.0 / 3.0 * arho2b[i] * drhoa2j * sij; drho2dr2 = a2 * (drhoa2i - 2 * rhoa2i / rij) * arg1j2 - - 2.0 / 3.0 * arr1v(arho2b, j) * drhoa2i * sij; + 2.0 / 3.0 * arho2b[j] * drhoa2i * sij; a2 = 4 * sij / rij2; for (m = 1; m <= 3; m++) { drho2drm1[m] = 0.0; drho2drm2[m] = 0.0; for (n = 1; n <= 3; n++) { drho2drm1[m] = drho2drm1[m] + - arr2v(arho2, this->vind2D[m][n], i) * delij[n]; + arr2v(arho2, this->vind2D[m][n], i+1) * delij[n]; drho2drm2[m] = drho2drm2[m] - - arr2v(arho2, this->vind2D[m][n], j) * delij[n]; + arr2v(arho2, this->vind2D[m][n], j+1) * delij[n]; } drho2drm1[m] = a2 * rhoa2j * drho2drm1[m]; drho2drm2[m] = -a2 * rhoa2i * drho2drm2[m]; @@ -260,25 +257,25 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, for (p = n; p <= 3; p++) { arg = delij[n] * delij[p] * this->v2D[nv2]; drho3drm1[m] = drho3drm1[m] + - arr2v(arho3, this->vind3D[m][n][p], i) * arg; + arr2v(arho3, this->vind3D[m][n][p], i+1) * arg; drho3drm2[m] = drho3drm2[m] + - arr2v(arho3, this->vind3D[m][n][p], j) * arg; + arr2v(arho3, this->vind3D[m][n][p], j+1) * arg; nv2 = nv2 + 1; } } drho3drm1[m] = - (a3 * drho3drm1[m] - a3a * arr2v(arho3b, m, i)) * rhoa3j; + (a3 * drho3drm1[m] - a3a * arr2v(arho3b, m, i+1)) * rhoa3j; drho3drm2[m] = - (-a3 * drho3drm2[m] + a3a * arr2v(arho3b, m, j)) * rhoa3i; + (-a3 * drho3drm2[m] + a3a * arr2v(arho3b, m, j+1)) * rhoa3i; } // Compute derivatives of weighting functions t wrt rij - t1i = arr2v(t_ave, 1, i); - t2i = arr2v(t_ave, 2, i); - t3i = arr2v(t_ave, 3, i); - t1j = arr2v(t_ave, 1, j); - t2j = arr2v(t_ave, 2, j); - t3j = arr2v(t_ave, 3, j); + t1i = t_ave[i][0]; + t2i = t_ave[i][1]; + t3i = t_ave[i][2]; + t1j = t_ave[j][0]; + t2j = t_ave[j][1]; + t3j = t_ave[j][2]; if (this->ialloy == 1) { @@ -288,18 +285,18 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, a2j = 0.0; a3i = 0.0; a3j = 0.0; - if (!iszero(arr2v(tsq_ave, 1, i))) - a1i = drhoa0j * sij / arr2v(tsq_ave, 1, i); - if (!iszero(arr2v(tsq_ave, 1, j))) - a1j = drhoa0i * sij / arr2v(tsq_ave, 1, j); - if (!iszero(arr2v(tsq_ave, 2, i))) - a2i = drhoa0j * sij / arr2v(tsq_ave, 2, i); - if (!iszero(arr2v(tsq_ave, 2, j))) - a2j = drhoa0i * sij / arr2v(tsq_ave, 2, j); - if (!iszero(arr2v(tsq_ave, 3, i))) - a3i = drhoa0j * sij / arr2v(tsq_ave, 3, i); - if (!iszero(arr2v(tsq_ave, 3, j))) - a3j = drhoa0i * sij / arr2v(tsq_ave, 3, j); + if (!iszero(tsq_ave[i][0])) + a1i = drhoa0j * sij / tsq_ave[i][0]; + if (!iszero(tsq_ave[j][0])) + a1j = drhoa0i * sij / tsq_ave[j][0]; + if (!iszero(tsq_ave[i][1])) + a2i = drhoa0j * sij / tsq_ave[i][1]; + if (!iszero(tsq_ave[j][1])) + a2j = drhoa0i * sij / tsq_ave[j][1]; + if (!iszero(tsq_ave[i][2])) + a3i = drhoa0j * sij / tsq_ave[i][2]; + if (!iszero(tsq_ave[j][2])) + a3j = drhoa0i * sij / tsq_ave[j][2]; dt1dr1 = a1i * (this->t1_meam[eltj] - t1i * pow(this->t1_meam[eltj], 2)); @@ -326,11 +323,11 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, } else { ai = 0.0; - if (!iszero(arr1v(rho0, i))) - ai = drhoa0j * sij / arr1v(rho0, i); + if (!iszero(rho0[i])) + ai = drhoa0j * sij / rho0[i]; aj = 0.0; - if (!iszero(arr1v(rho0, j))) - aj = drhoa0i * sij / arr1v(rho0, j); + if (!iszero(rho0[j])) + aj = drhoa0i * sij / rho0[j]; dt1dr1 = ai * (this->t1_meam[eltj] - t1i); dt1dr2 = aj * (this->t1_meam[elti] - t1j); @@ -344,32 +341,32 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, get_shpfcn(shpi, this->lattce_meam[elti][elti]); get_shpfcn(shpj, this->lattce_meam[eltj][eltj]); drhodr1 = - arr1v(dgamma1, i) * drho0dr1 + - arr1v(dgamma2, i) * (dt1dr1 * arr1v(rho1, i) + t1i * drho1dr1 + - dt2dr1 * arr1v(rho2, i) + t2i * drho2dr1 + - dt3dr1 * arr1v(rho3, i) + t3i * drho3dr1) - - arr1v(dgamma3, i) * + dgamma1[i] * drho0dr1 + + dgamma2[i] * (dt1dr1 * rho1[i] + t1i * drho1dr1 + + dt2dr1 * rho2[i] + t2i * drho2dr1 + + dt3dr1 * rho3[i] + t3i * drho3dr1) - + dgamma3[i] * (shpi[1] * dt1dr1 + shpi[2] * dt2dr1 + shpi[3] * dt3dr1); drhodr2 = - arr1v(dgamma1, j) * drho0dr2 + - arr1v(dgamma2, j) * (dt1dr2 * arr1v(rho1, j) + t1j * drho1dr2 + - dt2dr2 * arr1v(rho2, j) + t2j * drho2dr2 + - dt3dr2 * arr1v(rho3, j) + t3j * drho3dr2) - - arr1v(dgamma3, j) * + dgamma1[j] * drho0dr2 + + dgamma2[j] * (dt1dr2 * rho1[j] + t1j * drho1dr2 + + dt2dr2 * rho2[j] + t2j * drho2dr2 + + dt3dr2 * rho3[j] + t3j * drho3dr2) - + dgamma3[j] * (shpj[1] * dt1dr2 + shpj[2] * dt2dr2 + shpj[3] * dt3dr2); for (m = 1; m <= 3; m++) { drhodrm1[m] = 0.0; drhodrm2[m] = 0.0; drhodrm1[m] = - arr1v(dgamma2, i) * + dgamma2[i] * (t1i * drho1drm1[m] + t2i * drho2drm1[m] + t3i * drho3drm1[m]); drhodrm2[m] = - arr1v(dgamma2, j) * + dgamma2[j] * (t1j * drho1drm2[m] + t2j * drho2drm2[m] + t3j * drho3drm2[m]); } // Compute derivatives wrt sij, but only if necessary - if (!iszero(arr1v(dscrfcn, fnoffset + jn))) { + if (!iszero(dscrfcn[fnoffset + jn])) { drho0ds1 = rhoa0j; drho0ds2 = rhoa0i; a1 = 2.0 / rij; @@ -377,9 +374,9 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, drho1ds2 = a1 * rhoa1i * arg1j1; a2 = 2.0 / rij2; drho2ds1 = - a2 * rhoa2j * arg1i2 - 2.0 / 3.0 * arr1v(arho2b, i) * rhoa2j; + a2 * rhoa2j * arg1i2 - 2.0 / 3.0 * arho2b[i] * rhoa2j; drho2ds2 = - a2 * rhoa2i * arg1j2 - 2.0 / 3.0 * arr1v(arho2b, j) * rhoa2i; + a2 * rhoa2i * arg1j2 - 2.0 / 3.0 * arho2b[j] * rhoa2i; a3 = 2.0 / rij3; a3a = 6.0 / (5.0 * rij); drho3ds1 = a3 * rhoa3j * arg1i3 - a3a * rhoa3j * arg3i3; @@ -393,18 +390,12 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, a2j = 0.0; a3i = 0.0; a3j = 0.0; - if (!iszero(arr2v(tsq_ave, 1, i))) - a1i = rhoa0j / arr2v(tsq_ave, 1, i); - if (!iszero(arr2v(tsq_ave, 1, j))) - a1j = rhoa0i / arr2v(tsq_ave, 1, j); - if (!iszero(arr2v(tsq_ave, 2, i))) - a2i = rhoa0j / arr2v(tsq_ave, 2, i); - if (!iszero(arr2v(tsq_ave, 2, j))) - a2j = rhoa0i / arr2v(tsq_ave, 2, j); - if (!iszero(arr2v(tsq_ave, 3, i))) - a3i = rhoa0j / arr2v(tsq_ave, 3, i); - if (!iszero(arr2v(tsq_ave, 3, j))) - a3j = rhoa0i / arr2v(tsq_ave, 3, j); + if (!iszero(tsq_ave[i][0])) a1i = rhoa0j / tsq_ave[i][0]; + if (!iszero(tsq_ave[j][0])) a1j = rhoa0i / tsq_ave[j][0]; + if (!iszero(tsq_ave[i][1])) a2i = rhoa0j / tsq_ave[i][1]; + if (!iszero(tsq_ave[j][1])) a2j = rhoa0i / tsq_ave[j][1]; + if (!iszero(tsq_ave[i][2])) a3i = rhoa0j / tsq_ave[i][2]; + if (!iszero(tsq_ave[j][2])) a3j = rhoa0i / tsq_ave[j][2]; dt1ds1 = a1i * (this->t1_meam[eltj] - t1i * pow(this->t1_meam[eltj], 2)); @@ -431,11 +422,11 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, } else { ai = 0.0; - if (!iszero(arr1v(rho0, i))) - ai = rhoa0j / arr1v(rho0, i); + if (!iszero(rho0[i])) + ai = rhoa0j / rho0[i]; aj = 0.0; - if (!iszero(arr1v(rho0, j))) - aj = rhoa0i / arr1v(rho0, j); + if (!iszero(rho0[j])) + aj = rhoa0i / rho0[j]; dt1ds1 = ai * (this->t1_meam[eltj] - t1i); dt1ds2 = aj * (this->t1_meam[elti] - t1j); @@ -446,44 +437,44 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, } drhods1 = - arr1v(dgamma1, i) * drho0ds1 + - arr1v(dgamma2, i) * (dt1ds1 * arr1v(rho1, i) + t1i * drho1ds1 + - dt2ds1 * arr1v(rho2, i) + t2i * drho2ds1 + - dt3ds1 * arr1v(rho3, i) + t3i * drho3ds1) - - arr1v(dgamma3, i) * + dgamma1[i] * drho0ds1 + + dgamma2[i] * (dt1ds1 * rho1[i] + t1i * drho1ds1 + + dt2ds1 * rho2[i] + t2i * drho2ds1 + + dt3ds1 * rho3[i] + t3i * drho3ds1) - + dgamma3[i] * (shpi[1] * dt1ds1 + shpi[2] * dt2ds1 + shpi[3] * dt3ds1); drhods2 = - arr1v(dgamma1, j) * drho0ds2 + - arr1v(dgamma2, j) * (dt1ds2 * arr1v(rho1, j) + t1j * drho1ds2 + - dt2ds2 * arr1v(rho2, j) + t2j * drho2ds2 + - dt3ds2 * arr1v(rho3, j) + t3j * drho3ds2) - - arr1v(dgamma3, j) * + dgamma1[j] * drho0ds2 + + dgamma2[j] * (dt1ds2 * rho1[j] + t1j * drho1ds2 + + dt2ds2 * rho2[j] + t2j * drho2ds2 + + dt3ds2 * rho3[j] + t3j * drho3ds2) - + dgamma3[j] * (shpj[1] * dt1ds2 + shpj[2] * dt2ds2 + shpj[3] * dt3ds2); } // Compute derivatives of energy wrt rij, sij and rij[3] - dUdrij = phip * sij + arr1v(frhop, i) * drhodr1 + arr1v(frhop, j) * drhodr2; + dUdrij = phip * sij + frhop[i] * drhodr1 + frhop[j] * drhodr2; dUdsij = 0.0; - if (!iszero(arr1v(dscrfcn, fnoffset + jn))) { - dUdsij = phi + arr1v(frhop, i) * drhods1 + arr1v(frhop, j) * drhods2; + if (!iszero(dscrfcn[fnoffset + jn])) { + dUdsij = phi + frhop[i] * drhods1 + frhop[j] * drhods2; } for (m = 1; m <= 3; m++) { dUdrijm[m] = - arr1v(frhop, i) * drhodrm1[m] + arr1v(frhop, j) * drhodrm2[m]; + frhop[i] * drhodrm1[m] + frhop[j] * drhodrm2[m]; } // Add the part of the force due to dUdrij and dUdsij - force = dUdrij * recip + dUdsij * arr1v(dscrfcn, fnoffset + jn); + force = dUdrij * recip + dUdsij * dscrfcn[fnoffset + jn]; for (m = 1; m <= 3; m++) { forcem = delij[m] * force + dUdrijm[m]; - arr2v(f, m, i) = arr2v(f, m, i) + forcem; - arr2v(f, m, j) = arr2v(f, m, j) - forcem; + f[i][m-1] = f[i][m-1] + forcem; + f[j][m-1] = f[j][m-1] - forcem; } // Tabulate per-atom virial as symmetrized stress tensor - if (*vflag_atom != 0) { + if (vflag_atom != 0) { fi[1] = delij[1] * force + dUdrijm[1]; fi[2] = delij[2] * force + dUdrijm[2]; fi[3] = delij[3] * force + dUdrijm[3]; @@ -494,47 +485,46 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, v[5] = -0.25 * (delij[1] * fi[3] + delij[3] * fi[1]); v[6] = -0.25 * (delij[2] * fi[3] + delij[3] * fi[2]); - arr2v(vatom, 1, i) = arr2v(vatom, 1, i) + v[1]; - arr2v(vatom, 2, i) = arr2v(vatom, 2, i) + v[2]; - arr2v(vatom, 3, i) = arr2v(vatom, 3, i) + v[3]; - arr2v(vatom, 4, i) = arr2v(vatom, 4, i) + v[4]; - arr2v(vatom, 5, i) = arr2v(vatom, 5, i) + v[5]; - arr2v(vatom, 6, i) = arr2v(vatom, 6, i) + v[6]; - arr2v(vatom, 1, j) = arr2v(vatom, 1, j) + v[1]; - arr2v(vatom, 2, j) = arr2v(vatom, 2, j) + v[2]; - arr2v(vatom, 3, j) = arr2v(vatom, 3, j) + v[3]; - arr2v(vatom, 4, j) = arr2v(vatom, 4, j) + v[4]; - arr2v(vatom, 5, j) = arr2v(vatom, 5, j) + v[5]; - arr2v(vatom, 6, j) = arr2v(vatom, 6, j) + v[6]; + vatom[i][0] = vatom[i][0] + v[1]; + vatom[i][1] = vatom[i][1] + v[2]; + vatom[i][2] = vatom[i][2] + v[3]; + vatom[i][3] = vatom[i][3] + v[4]; + vatom[i][4] = vatom[i][4] + v[5]; + vatom[i][5] = vatom[i][5] + v[6]; + vatom[j][0] = vatom[j][0] + v[1]; + vatom[j][1] = vatom[j][1] + v[2]; + vatom[j][2] = vatom[j][2] + v[3]; + vatom[j][3] = vatom[j][3] + v[4]; + vatom[j][4] = vatom[j][4] + v[5]; + vatom[j][5] = vatom[j][5] + v[6]; } // Now compute forces on other atoms k due to change in sij if (iszero(sij) || iszero(sij - 1.0)) continue; //: cont jn loop - for (kn = 1; kn <= *numneigh_full; kn++) { - k = arr1v(firstneigh_full, kn); - eltk = fmap[arr1v(type, k)]; + for (kn = 0; kn < numneigh_full; kn++) { + k = firstneigh_full[kn]; + eltk = fmap[type[k]]; if (k != j && eltk >= 0) { - dsij(i, j, k, jn, *numneigh, rij2, &dsij1, &dsij2, *ntype, + dsij(i, j, k, jn, numneigh, rij2, &dsij1, &dsij2, ntype, type, fmap, x, &scrfcn[fnoffset], &fcpair[fnoffset]); if (!iszero(dsij1) || !iszero(dsij2)) { force1 = dUdsij * dsij1; force2 = dUdsij * dsij2; for (m = 1; m <= 3; m++) { - delik[m] = arr2v(x, m, k) - arr2v(x, m, i); - deljk[m] = arr2v(x, m, k) - arr2v(x, m, j); + delik[m] = arr2v(x, m, k+1) - arr2v(x, m, i+1); + deljk[m] = arr2v(x, m, k+1) - arr2v(x, m, j+1); } for (m = 1; m <= 3; m++) { - arr2v(f, m, i) = arr2v(f, m, i) + force1 * delik[m]; - arr2v(f, m, j) = arr2v(f, m, j) + force2 * deljk[m]; - arr2v(f, m, k) = - arr2v(f, m, k) - force1 * delik[m] - force2 * deljk[m]; + arr2v(f, m, i+1) = arr2v(f, m, i+1) + force1 * delik[m]; + arr2v(f, m, j+1) = arr2v(f, m, j+1) + force2 * deljk[m]; + arr2v(f, m, k+1) = arr2v(f, m, k+1) - force1 * delik[m] - force2 * deljk[m]; } // Tabulate per-atom virial as symmetrized stress tensor - if (*vflag_atom != 0) { + if (vflag_atom != 0) { fi[1] = force1 * delik[1]; fi[2] = force1 * delik[2]; fi[3] = force1 * delik[3]; @@ -551,24 +541,24 @@ MEAM::meam_force(int* iptr, int* eflag_either, int* eflag_global, v[6] = -sixth * (delik[2] * fi[3] + deljk[2] * fj[3] + delik[3] * fi[2] + deljk[3] * fj[2]); - arr2v(vatom, 1, i) = arr2v(vatom, 1, i) + v[1]; - arr2v(vatom, 2, i) = arr2v(vatom, 2, i) + v[2]; - arr2v(vatom, 3, i) = arr2v(vatom, 3, i) + v[3]; - arr2v(vatom, 4, i) = arr2v(vatom, 4, i) + v[4]; - arr2v(vatom, 5, i) = arr2v(vatom, 5, i) + v[5]; - arr2v(vatom, 6, i) = arr2v(vatom, 6, i) + v[6]; - arr2v(vatom, 1, j) = arr2v(vatom, 1, j) + v[1]; - arr2v(vatom, 2, j) = arr2v(vatom, 2, j) + v[2]; - arr2v(vatom, 3, j) = arr2v(vatom, 3, j) + v[3]; - arr2v(vatom, 4, j) = arr2v(vatom, 4, j) + v[4]; - arr2v(vatom, 5, j) = arr2v(vatom, 5, j) + v[5]; - arr2v(vatom, 6, j) = arr2v(vatom, 6, j) + v[6]; - arr2v(vatom, 1, k) = arr2v(vatom, 1, k) + v[1]; - arr2v(vatom, 2, k) = arr2v(vatom, 2, k) + v[2]; - arr2v(vatom, 3, k) = arr2v(vatom, 3, k) + v[3]; - arr2v(vatom, 4, k) = arr2v(vatom, 4, k) + v[4]; - arr2v(vatom, 5, k) = arr2v(vatom, 5, k) + v[5]; - arr2v(vatom, 6, k) = arr2v(vatom, 6, k) + v[6]; + vatom[i][0] = vatom[i][0] + v[1]; + vatom[i][1] = vatom[i][1] + v[2]; + vatom[i][2] = vatom[i][2] + v[3]; + vatom[i][3] = vatom[i][3] + v[4]; + vatom[i][4] = vatom[i][4] + v[5]; + vatom[i][5] = vatom[i][5] + v[6]; + vatom[j][0] = vatom[j][0] + v[1]; + vatom[j][1] = vatom[j][1] + v[2]; + vatom[j][2] = vatom[j][2] + v[3]; + vatom[j][3] = vatom[j][3] + v[4]; + vatom[j][4] = vatom[j][4] + v[5]; + vatom[j][5] = vatom[j][5] + v[6]; + vatom[k][0] = vatom[k][0] + v[1]; + vatom[k][1] = vatom[k][1] + v[2]; + vatom[k][2] = vatom[k][2] + v[3]; + vatom[k][3] = vatom[k][3] + v[4]; + vatom[k][4] = vatom[k][4] + v[5]; + vatom[k][5] = vatom[k][5] + v[6]; } } } diff --git a/src/USER-MEAMC/pair_meamc.cpp b/src/USER-MEAMC/pair_meamc.cpp index bf096c1a1e..e54f346589 100644 --- a/src/USER-MEAMC/pair_meamc.cpp +++ b/src/USER-MEAMC/pair_meamc.cpp @@ -129,24 +129,17 @@ void PairMEAMC::compute(int eflag, int vflag) int *type = atom->type; int ntype = atom->ntypes; - // change neighbor list indices to Fortran indexing - - neigh_c2f(inum_half,ilist_half,numneigh_half,firstneigh_half); - neigh_c2f(inum_half,ilist_half,numneigh_full,firstneigh_full); - // 3 stages of MEAM calculation // loop over my atoms followed by communication - int ifort; int offset = 0; errorflag = 0; for (ii = 0; ii < inum_half; ii++) { i = ilist_half[ii]; - ifort = i+1; - meam_inst->meam_dens_init(&ifort,&ntype,type,map,x, - &numneigh_half[i],firstneigh_half[i], - &numneigh_full[i],firstneigh_full[i], + meam_inst->meam_dens_init(i,ntype,type,map,x, + numneigh_half[i],firstneigh_half[i], + numneigh_full[i],firstneigh_full[i], offset, &errorflag); if (errorflag) { @@ -159,8 +152,8 @@ void PairMEAMC::compute(int eflag, int vflag) comm->reverse_comm_pair(this); - meam_inst->meam_dens_final(&nlocal,&eflag_either,&eflag_global,&eflag_atom, - &eng_vdwl,eatom,&ntype,type,map, + meam_inst->meam_dens_final(nlocal,eflag_either,eflag_global,eflag_atom, + &eng_vdwl,eatom,ntype,type,map, &errorflag); if (errorflag) { char str[128]; @@ -181,11 +174,10 @@ void PairMEAMC::compute(int eflag, int vflag) for (ii = 0; ii < inum_half; ii++) { i = ilist_half[ii]; - ifort = i+1; - meam_inst->meam_force(&ifort,&eflag_either,&eflag_global,&eflag_atom, - &vflag_atom,&eng_vdwl,eatom,&ntype,type,map,x, - &numneigh_half[i],firstneigh_half[i], - &numneigh_full[i],firstneigh_full[i], + meam_inst->meam_force(i,eflag_either,eflag_global,eflag_atom, + vflag_atom,&eng_vdwl,eatom,ntype,type,map,x, + numneigh_half[i],firstneigh_half[i], + numneigh_full[i],firstneigh_full[i], offset, f,vptr,&errorflag); if (errorflag) { @@ -196,11 +188,6 @@ void PairMEAMC::compute(int eflag, int vflag) offset += numneigh_half[i]; } - // change neighbor list indices back to C indexing - - neigh_f2c(inum_half,ilist_half,numneigh_half,firstneigh_half); - neigh_f2c(inum_half,ilist_half,numneigh_full,firstneigh_full); - if (vflag_fdotr) virial_fdotr_compute(); } @@ -806,34 +793,3 @@ void PairMEAMC::neigh_strip(int inum, int *ilist, for (j = 0; j < jnum; j++) jlist[j] &= NEIGHMASK; } } - -/* ---------------------------------------------------------------------- - toggle neighbor list indices between zero- and one-based values - needed for access by MEAM Fortran library -------------------------------------------------------------------------- */ - -void PairMEAMC::neigh_f2c(int inum, int *ilist, int *numneigh, int **firstneigh) -{ - int i,j,ii,jnum; - int *jlist; - - for (ii = 0; ii < inum; ii++) { - i = ilist[ii]; - jlist = firstneigh[i]; - jnum = numneigh[i]; - for (j = 0; j < jnum; j++) jlist[j]--; - } -} - -void PairMEAMC::neigh_c2f(int inum, int *ilist, int *numneigh, int **firstneigh) -{ - int i,j,ii,jnum; - int *jlist; - - for (ii = 0; ii < inum; ii++) { - i = ilist[ii]; - jlist = firstneigh[i]; - jnum = numneigh[i]; - for (j = 0; j < jnum; j++) jlist[j]++; - } -} diff --git a/src/USER-MEAMC/pair_meamc.h b/src/USER-MEAMC/pair_meamc.h index fc31cd55c6..476a70dd04 100644 --- a/src/USER-MEAMC/pair_meamc.h +++ b/src/USER-MEAMC/pair_meamc.h @@ -54,8 +54,6 @@ class PairMEAMC : public Pair { void allocate(); void read_files(char *, char *); void neigh_strip(int, int *, int *, int **); - void neigh_f2c(int, int *, int *, int **); - void neigh_c2f(int, int *, int *, int **); }; } -- GitLab From 488d1b7a79fc010e191227135b992bda9097d95e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 22 Jun 2017 17:36:18 -0400 Subject: [PATCH 356/593] correct find_M() function in pppm/tip4p to properly account for ghost atoms not being in lamda space with triclinic cells --- src/KSPACE/pppm_tip4p.cpp | 127 ++++++++++++++++++++++++-------------- src/KSPACE/pppm_tip4p.h | 1 - 2 files changed, 82 insertions(+), 46 deletions(-) diff --git a/src/KSPACE/pppm_tip4p.cpp b/src/KSPACE/pppm_tip4p.cpp index 1ffa47584e..e807f7e2e9 100644 --- a/src/KSPACE/pppm_tip4p.cpp +++ b/src/KSPACE/pppm_tip4p.cpp @@ -486,6 +486,8 @@ void PPPMTIP4P::fieldforce_peratom() void PPPMTIP4P::find_M(int i, int &iH1, int &iH2, double *xM) { + double **x = atom->x; + iH1 = atom->map(atom->tag[i] + 1); iH2 = atom->map(atom->tag[i] + 2); @@ -493,63 +495,98 @@ void PPPMTIP4P::find_M(int i, int &iH1, int &iH2, double *xM) if (atom->type[iH1] != typeH || atom->type[iH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); - // set iH1,iH2 to index of closest image to O - - iH1 = domain->closest_image(i,iH1); - iH2 = domain->closest_image(i,iH2); - if (triclinic) { - find_M_triclinic(i,iH1,iH2,xM); - return; - } - double **x = atom->x; + // need to use custom code to find the closest image for triclinic, + // since local atoms are in lambda coordinates, but ghosts are not. + + int *sametag = atom->sametag; + double xo[3],xh1[3],xh2[3]; + + domain->lamda2x(x[i],xo); + domain->lamda2x(x[iH1],xh1); + domain->lamda2x(x[iH2],xh2); + + double delx = xo[0] - xh1[0]; + double dely = xo[1] - xh1[1]; + double delz = xo[2] - xh1[2]; + double rsqmin = delx*delx + dely*dely + delz*delz; + double rsq; + int closest = iH1; + + while (sametag[iH1] >= 0) { + iH1 = sametag[iH1]; + delx = xo[0] - x[iH1][0]; + dely = xo[1] - x[iH1][1]; + delz = xo[2] - x[iH1][2]; + rsq = delx*delx + dely*dely + delz*delz; + if (rsq < rsqmin) { + rsqmin = rsq; + closest = iH1; + xh1[0] = x[iH1][0]; + xh1[1] = x[iH1][1]; + xh1[2] = x[iH1][2]; + } + } + iH1 = closest; + + closest = iH2; + delx = xo[0] - xh2[0]; + dely = xo[1] - xh2[1]; + delz = xo[2] - xh2[2]; + rsqmin = delx*delx + dely*dely + delz*delz; + + while (sametag[iH2] >= 0) { + iH2 = sametag[iH2]; + delx = xo[0] - x[iH2][0]; + dely = xo[1] - x[iH2][1]; + delz = xo[2] - x[iH2][2]; + rsq = delx*delx + dely*dely + delz*delz; + if (rsq < rsqmin) { + rsqmin = rsq; + closest = iH2; + xh2[0] = x[iH2][0]; + xh2[1] = x[iH2][1]; + xh2[2] = x[iH2][2]; + } + } + iH2 = closest; - double delx1 = x[iH1][0] - x[i][0]; - double dely1 = x[iH1][1] - x[i][1]; - double delz1 = x[iH1][2] - x[i][2]; + // finally compute M in real coordinates ... - double delx2 = x[iH2][0] - x[i][0]; - double dely2 = x[iH2][1] - x[i][1]; - double delz2 = x[iH2][2] - x[i][2]; + double delx1 = xh1[0] - xo[0]; + double dely1 = xh1[1] - xo[1]; + double delz1 = xh1[2] - xo[2]; - xM[0] = x[i][0] + alpha * 0.5 * (delx1 + delx2); - xM[1] = x[i][1] + alpha * 0.5 * (dely1 + dely2); - xM[2] = x[i][2] + alpha * 0.5 * (delz1 + delz2); -} + double delx2 = xh2[0] - xo[0]; + double dely2 = xh2[1] - xo[1]; + double delz2 = xh2[2] - xo[2]; -/* ---------------------------------------------------------------------- - triclinic version of find_M() - calculation of M coords done in real space -------------------------------------------------------------------------- */ + xM[0] = xo[0] + alpha * 0.5 * (delx1 + delx2); + xM[1] = xo[1] + alpha * 0.5 * (dely1 + dely2); + xM[2] = xo[2] + alpha * 0.5 * (delz1 + delz2); -void PPPMTIP4P::find_M_triclinic(int i, int iH1, int iH2, double *xM) -{ - double **x = atom->x; + // ... and convert M to lamda space for PPPM - // convert from lamda to real space - // may be possible to do this more efficiently in lamda space + domain->x2lamda(xM,xM); - domain->lamda2x(x[i],x[i]); - domain->lamda2x(x[iH1],x[iH1]); - domain->lamda2x(x[iH2],x[iH2]); + } else { - double delx1 = x[iH1][0] - x[i][0]; - double dely1 = x[iH1][1] - x[i][1]; - double delz1 = x[iH1][2] - x[i][2]; + // set iH1,iH2 to index of closest image to O - double delx2 = x[iH2][0] - x[i][0]; - double dely2 = x[iH2][1] - x[i][1]; - double delz2 = x[iH2][2] - x[i][2]; + iH1 = domain->closest_image(i,iH1); + iH2 = domain->closest_image(i,iH2); - xM[0] = x[i][0] + alpha * 0.5 * (delx1 + delx2); - xM[1] = x[i][1] + alpha * 0.5 * (dely1 + dely2); - xM[2] = x[i][2] + alpha * 0.5 * (delz1 + delz2); + double delx1 = x[iH1][0] - x[i][0]; + double dely1 = x[iH1][1] - x[i][1]; + double delz1 = x[iH1][2] - x[i][2]; - // convert back to lamda space + double delx2 = x[iH2][0] - x[i][0]; + double dely2 = x[iH2][1] - x[i][1]; + double delz2 = x[iH2][2] - x[i][2]; - domain->x2lamda(x[i],x[i]); - domain->x2lamda(x[iH1],x[iH1]); - domain->x2lamda(x[iH2],x[iH2]); - domain->x2lamda(xM,xM); + xM[0] = x[i][0] + alpha * 0.5 * (delx1 + delx2); + xM[1] = x[i][1] + alpha * 0.5 * (dely1 + dely2); + xM[2] = x[i][2] + alpha * 0.5 * (delz1 + delz2); + } } diff --git a/src/KSPACE/pppm_tip4p.h b/src/KSPACE/pppm_tip4p.h index 31e69f785a..88a5707f2d 100644 --- a/src/KSPACE/pppm_tip4p.h +++ b/src/KSPACE/pppm_tip4p.h @@ -39,7 +39,6 @@ class PPPMTIP4P : public PPPM { private: void find_M(int, int &, int &, double *); - void find_M_triclinic(int, int, int, double *); }; } -- GitLab From f8364342c238998c0ea70aa5672490f96c7aec74 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 22 Jun 2017 18:12:28 -0400 Subject: [PATCH 357/593] port corrected triclinic handling from pppm/tip4p to pppm/tip4p/omp --- src/USER-OMP/pppm_tip4p_omp.cpp | 108 +++++++++++++++++++++++++++----- 1 file changed, 94 insertions(+), 14 deletions(-) diff --git a/src/USER-OMP/pppm_tip4p_omp.cpp b/src/USER-OMP/pppm_tip4p_omp.cpp index fdc58bce10..21e3081c65 100644 --- a/src/USER-OMP/pppm_tip4p_omp.cpp +++ b/src/USER-OMP/pppm_tip4p_omp.cpp @@ -48,7 +48,7 @@ using namespace MathSpecial; PPPMTIP4POMP::PPPMTIP4POMP(LAMMPS *lmp, int narg, char **arg) : PPPMTIP4P(lmp, narg, arg), ThrOMP(lmp, THR_KSPACE) { - triclinic_support = 0; + triclinic_support = 1; suffix_flag |= Suffix::OMP; } @@ -735,6 +735,8 @@ void PPPMTIP4POMP::fieldforce_ad() void PPPMTIP4POMP::find_M_thr(int i, int &iH1, int &iH2, dbl3_t &xM) { + double **x = atom->x; + iH1 = atom->map(atom->tag[i] + 1); iH2 = atom->map(atom->tag[i] + 2); @@ -742,24 +744,102 @@ void PPPMTIP4POMP::find_M_thr(int i, int &iH1, int &iH2, dbl3_t &xM) if (atom->type[iH1] != typeH || atom->type[iH2] != typeH) error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); - // set iH1,iH2 to index of closest image to O + if (triclinic) { + + // need to use custom code to find the closest image for triclinic, + // since local atoms are in lambda coordinates, but ghosts are not. + + int *sametag = atom->sametag; + double xo[3],xh1[3],xh2[3]; + + domain->lamda2x(x[i],xo); + domain->lamda2x(x[iH1],xh1); + domain->lamda2x(x[iH2],xh2); + + double delx = xo[0] - xh1[0]; + double dely = xo[1] - xh1[1]; + double delz = xo[2] - xh1[2]; + double rsqmin = delx*delx + dely*dely + delz*delz; + double rsq; + int closest = iH1; + + while (sametag[iH1] >= 0) { + iH1 = sametag[iH1]; + delx = xo[0] - x[iH1][0]; + dely = xo[1] - x[iH1][1]; + delz = xo[2] - x[iH1][2]; + rsq = delx*delx + dely*dely + delz*delz; + if (rsq < rsqmin) { + rsqmin = rsq; + closest = iH1; + xh1[0] = x[iH1][0]; + xh1[1] = x[iH1][1]; + xh1[2] = x[iH1][2]; + } + } + iH1 = closest; + + closest = iH2; + delx = xo[0] - xh2[0]; + dely = xo[1] - xh2[1]; + delz = xo[2] - xh2[2]; + rsqmin = delx*delx + dely*dely + delz*delz; + + while (sametag[iH2] >= 0) { + iH2 = sametag[iH2]; + delx = xo[0] - x[iH2][0]; + dely = xo[1] - x[iH2][1]; + delz = xo[2] - x[iH2][2]; + rsq = delx*delx + dely*dely + delz*delz; + if (rsq < rsqmin) { + rsqmin = rsq; + closest = iH2; + xh2[0] = x[iH2][0]; + xh2[1] = x[iH2][1]; + xh2[2] = x[iH2][2]; + } + } + iH2 = closest; + + // finally compute M in real coordinates ... - iH1 = domain->closest_image(i,iH1); - iH2 = domain->closest_image(i,iH2); + double delx1 = xh1[0] - xo[0]; + double dely1 = xh1[1] - xo[1]; + double delz1 = xh1[2] - xo[2]; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + double delx2 = xh2[0] - xo[0]; + double dely2 = xh2[1] - xo[1]; + double delz2 = xh2[2] - xo[2]; + + xM.x = xo[0] + alpha * 0.5 * (delx1 + delx2); + xM.y = xo[1] + alpha * 0.5 * (dely1 + dely2); + xM.z = xo[2] + alpha * 0.5 * (delz1 + delz2); - double delx1 = x[iH1].x - x[i].x; - double dely1 = x[iH1].y - x[i].y; - double delz1 = x[iH1].z - x[i].z; + // ... and convert M to lamda space for PPPM - double delx2 = x[iH2].x - x[i].x; - double dely2 = x[iH2].y - x[i].y; - double delz2 = x[iH2].z - x[i].z; + domain->x2lamda((double *)&xM,(double *)&xM); - xM.x = x[i].x + alpha * 0.5 * (delx1 + delx2); - xM.y = x[i].y + alpha * 0.5 * (dely1 + dely2); - xM.z = x[i].z + alpha * 0.5 * (delz1 + delz2); + } else { + + // set iH1,iH2 to index of closest image to O + + iH1 = domain->closest_image(i,iH1); + iH2 = domain->closest_image(i,iH2); + + const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + + double delx1 = x[iH1].x - x[i].x; + double dely1 = x[iH1].y - x[i].y; + double delz1 = x[iH1].z - x[i].z; + + double delx2 = x[iH2].x - x[i].x; + double dely2 = x[iH2].y - x[i].y; + double delz2 = x[iH2].z - x[i].z; + + xM.x = x[i].x + alpha * 0.5 * (delx1 + delx2); + xM.y = x[i].y + alpha * 0.5 * (dely1 + dely2); + xM.z = x[i].z + alpha * 0.5 * (delz1 + delz2); + } } -- GitLab From c5430b0a26075fe20c65fe2ad70762e113f77d55 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 22 Jun 2017 18:41:44 -0400 Subject: [PATCH 358/593] print info messages when changing qqr2e constant in fully CHARMM compatible pair styles --- src/KSPACE/pair_lj_charmmfsw_coul_long.cpp | 12 ++++++++++-- src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index 9ba59b6995..30d8ab64b6 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -65,8 +65,12 @@ PairLJCharmmfswCoulLong::PairLJCharmmfswCoulLong(LAMMPS *lmp) : Pair(lmp) // switch qqr2e from LAMMPS value to CHARMM value - if (strcmp(update->unit_style,"real") == 0) + if (strcmp(update->unit_style,"real") == 0) { + if ((comm->me == 0) && (force->qqr2e != force->qqr2e_charmm_real)) + error->message(FLERR,"Switching to CHARMM coulomb energy" + " conversion constant"); force->qqr2e = force->qqr2e_charmm_real; + } } /* ---------------------------------------------------------------------- */ @@ -96,8 +100,12 @@ PairLJCharmmfswCoulLong::~PairLJCharmmfswCoulLong() // switch qqr2e back from CHARMM value to LAMMPS value - if (strcmp(update->unit_style,"real") == 0) + if (update && strcmp(update->unit_style,"real") == 0) { + if ((comm->me == 0) && (force->qqr2e == force->qqr2e_charmm_real)) + error->message(FLERR,"Restoring original LAMMPS coulomb energy" + " conversion constant"); force->qqr2e = force->qqr2e_lammps_real; + } } /* ---------------------------------------------------------------------- */ diff --git a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp index f1366a379d..0d2159b671 100644 --- a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp +++ b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp @@ -50,8 +50,12 @@ PairLJCharmmfswCoulCharmmfsh::PairLJCharmmfswCoulCharmmfsh(LAMMPS *lmp) : // switch qqr2e from LAMMPS value to CHARMM value - if (strcmp(update->unit_style,"real") == 0) + if (strcmp(update->unit_style,"real") == 0) { + if ((comm->me == 0) && (force->qqr2e != force->qqr2e_charmm_real)) + error->message(FLERR,"Switching to CHARMM coulomb energy" + " conversion constant"); force->qqr2e = force->qqr2e_charmm_real; + } } /* ---------------------------------------------------------------------- */ @@ -80,8 +84,12 @@ PairLJCharmmfswCoulCharmmfsh::~PairLJCharmmfswCoulCharmmfsh() // switch qqr2e back from CHARMM value to LAMMPS value - if (strcmp(update->unit_style,"real") == 0) + if (update && strcmp(update->unit_style,"real") == 0) { + if ((comm->me == 0) && (force->qqr2e == force->qqr2e_charmm_real)) + error->message(FLERR,"Restoring original LAMMPS coulomb energy" + " conversion constant"); force->qqr2e = force->qqr2e_lammps_real; + } } /* ---------------------------------------------------------------------- */ -- GitLab From a714b5774132011a0199031b535277bd4c3137ae Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 22 Jun 2017 19:07:57 -0400 Subject: [PATCH 359/593] make neighbor list reset message for minimization more explicit --- src/min.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/min.cpp b/src/min.cpp index d308efb848..af23629cad 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -165,8 +165,8 @@ void Min::init() if (neigh_every != 1 || neigh_delay != 0 || neigh_dist_check != 1) { if (comm->me == 0) - error->warning(FLERR, - "Resetting reneighboring criteria during minimization"); + error->warning(FLERR, "Using 'neigh_modify every 1 delay 0 check" + " yes' setting during minimization"); } neighbor->every = 1; -- GitLab From feb500b52684965dd398acd80e78de35188f1d4a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 22 Jun 2017 19:17:41 -0400 Subject: [PATCH 360/593] reword the kspace_modify fftbench keyword docs to reflect the current state (i.e. off by default) of code --- doc/src/kspace_modify.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/src/kspace_modify.txt b/doc/src/kspace_modify.txt index 66091f4973..6d27bb7076 100644 --- a/doc/src/kspace_modify.txt +++ b/doc/src/kspace_modify.txt @@ -219,10 +219,10 @@ instead of using the virial equation. This option cannot be used to access individual components of the pressure tensor, to compute per-atom virial, or with suffix kspace/pair styles of MSM, like OMP or GPU. -The {fftbench} keyword applies only to PPPM. It is on by default. If -this option is turned off, LAMMPS will not take the time at the end -of a run to give FFT benchmark timings, and will finish a few seconds -faster than it would if this option were on. +The {fftbench} keyword applies only to PPPM. It is off by default. If +this option is turned on, LAMMPS will perform a short FFT benchmark +computation and report its timings, and will thus finish a some seconds +later than it would if this option were off. The {collective} keyword applies only to PPPM. It is set to {no} by default, except on IBM BlueGene machines. If this option is set to @@ -306,7 +306,7 @@ parameters, see the "How-To"_Section_howto.html#howto_24 discussion. The option defaults are mesh = mesh/disp = 0 0 0, order = order/disp = 5 (PPPM), order = 10 (MSM), minorder = 2, overlap = yes, force = -1.0, gewald = gewald/disp = 0.0, slab = 1.0, compute = yes, cutoff/adjust = -yes (MSM), pressure/scalar = yes (MSM), fftbench = yes (PPPM), diff = ik +yes (MSM), pressure/scalar = yes (MSM), fftbench = no (PPPM), diff = ik (PPPM), mix/disp = pair, force/disp/real = -1.0, force/disp/kspace = -1.0, split = 0, tol = 1.0e-6, and disp/auto = no. For pppm/intel, order = order/disp = 7. -- GitLab From 57d5cfede3910dbb03fc47062efaae3c78d5db81 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 22 Jun 2017 23:07:09 -0400 Subject: [PATCH 361/593] add first draft of a pull request template --- .github/PULL_REQUEST_TEMPLATE.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..fb16f84d45 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +## Purpose +_Briefly describe the new feature(s) included in this pull request. +If this addresses an open GitHub Issue, mention the issue number, e.g. with `fixes #221`_ + +## Implementation Notes +_Provide any relevant details about how the feature is implemented, +how correctness was verified, how other features in LAMMPS are affected_ + +## Post Submission Checklist +Please check the fields as they are completed +- [ ] The feature or features in the pull request is complete +- [ ] Suitable new documentation files and/or updates to the existing docs are included +- [ ] One or more example input decks are included +- [ ] The source code follows the LAMMPS formatting guidelines + +## Further Information, Files, and Links +_Put any additional information here, attach relevant text or image files and URLs to external sites_ + + -- GitLab From dc7243838b8c973d3b089880c8ea1b03154c90db Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 23 Jun 2017 00:54:20 -0400 Subject: [PATCH 362/593] first draft of a contributor's guide file --- .github/CONTRIBUTING.md | 55 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/CONTRIBUTING.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000000..6f60d4919b --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,55 @@ +# Contributing to LAMMPS via GitHub + +Thank your for considering to contribute to the LAMMPS software project. + +The following is a set of guidelines as well as explanations of policies and workflows for contributing to the LAMMPS molecular dynamics software project. These guidelines focus on submitting issues or pull requests on the LAMMPS GitHub project. + +Thus please also have a look at: +[The Section on submitting new features for inclusion in LAMMPS of the Manual](http://lammps.sandia.gov/doc/Section_modify.html#mod-15) +[The LAMMPS GitHub Tutorial in the Manual](http://lammps.sandia.gov/doc/tutorial_github.html) + +## Table of Contents + +[I don't want to read this whole thing, I just have a question!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question) + +[How Can I Contribute?](#how-can-i-contribute) + * [Discussing How To Use LAMMPS](#discussing-how-to-use-lammps) + * [Reporting Bugs](#reporting-bugs) + * [Suggesting Enhancements](#suggesting-enhancements) + * [Contributing Code](#contributing-code) + +[GitHub Workflows](#github-workflows) + * [Issues](#issues) + * [Pull Requests](#pull-requests) + +__ + +## I don't want to read this whole thing I just have a question! + +> **Note:** Please do not file an issue to ask a question about how to use LAMMPS or a specific feature in LAMMPS. Instead post your question to the ['lammps-users' mailing list](http://lammps.sandia.gov/mail.html). You do not need to be subscribed to post to the list (but a mailing list subscription avoids having your post held back until your post is approved by a mailing list moderator). Most posts to the mailing list receive a response within less than 24 hours. Before posting to the mailing list, please read the [mailing list guidelines](http://lammps.sandia.gov/guidelines.html). Following those guidelines will help greatly to get a helpful response. Always mention which LAMMPS version you are using. + +## How Can I Contribute? + +There are several ways how you can actively contribute to the LAMMPS project: you can discuss compiling and using LAMMPS, and solving LAMMPS related problems with other LAMMPS users on the lammps-users mailing list, you can report bugs or suggest enhancements by creating issues on GitHub (or posting them to the lammps-users mailing list), and you can contribute by submitting pull requests on GitHub or e-mail your code +to one of the [LAMMPS core developers](http://lammps.sandia.gov/authors.html). As you may see from the aforementioned developer page, the LAMMPS software package includes the efforts of a very large number of contributors beyond the principal authors and maintainers. + +### Discussing How To Use LAMMPS + +The LAMMPS mailing list is hosted at SourceForge. The mailing list began in 2005, and now includes tens of thousands of messages in thousands of threads. LAMMPS developers try to respond to posted questions in a timely manner, but there are no guarantees. Please consider that people live in different timezone and may not have time to answer e-mails outside of their work hours. +You can post to list by sending your email to lammps-users at lists.sourceforge.net (no subscription required), but before posting, please read the [mailing list guidelines](http://lammps.sandia.gov/guidelines.html) to maximize your chances to receive a helpful response. + +Anyone can browse/search previous questions/answers in the archives. +You do not have to subscribe to the list to post Qs, receive answers (to your Qs), or browse/search the archives. You **do** need to subscribe to the list if you want emails for **all** the posts (per-message or in digest form), or to answer Qs yourself. Feel free to sign up and help us out! +If you post a message and you are a subscriber, your message will appear immediately. If you are not a subscriber, your message will be moderated, which typically takes one business day. Either way, when someone replies you will receive that reply as a personal email, and the reply will appear on the list in the new thread your message started. Posting a message sends email to subscribers immediately, but it can take a few hours for postings and replies to show up in the SourceForge archive. + +### Reporting Bugs + +### Suggesting Enhancements + +### Contributing Code + +## GitHub Workflows + +### Issues + +### Pull Requests -- GitLab From 374eef2b175259701985446852c6de1d53475547 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 23 Jun 2017 01:13:10 -0400 Subject: [PATCH 363/593] add first draft of issue template --- .github/ISSUE_TEMPLATE.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000000..39e8411be5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,30 @@ +## Summary + +_Please provide a brief description of the issue_ + +## Type of Issue + +_Is this a 'Bug Report' or a 'Suggestion for an Enhancement'?_ + +## Detailed Description (Enhancement Suggestion) + +_Explain how you would like to see LAMMPS enhanced, what feature you are looking for, provide references to relevant background information, and whether you are willing to implement the enhancement yourself_ + +## LAMMPS Version (Bug Report) + +_Please specify which LAMMPS version this issue applies to_ + +## Expected Behavior (Bug Report) + +_Describe the expected behavior. Quote from the LAMMPS manual where needed or explain why the expected behavior is meaningful_ + +## Actual Behavior (Bug Report) + +_Describe the actual behavior, how it differs from the expected behavior, and how this can be observed_ + +## Steps to Reproduce (Bug Report) + +_Describe the steps required to quickly reproduce the issue. You can attach (small) files to the section below or add URLs where to download an archive with all necessary files. Please try to create as small and as fast to run inputs as possible. The less effort and time it takes to reproduce your issue, the more likely, that somebody will look into it._ + +## Further Information, Files, and Links +_Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications_ -- GitLab From 73b948dcfc97ffc211b91ebb63f4bbbc94c64517 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 23 Jun 2017 10:01:45 -0400 Subject: [PATCH 364/593] pppm must be fully reinitialized after switching to triclinic box to avoid memory corruption --- src/KSPACE/pppm.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index 232cabe4ea..05169fca1c 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -186,6 +186,10 @@ void PPPM::init() // error check triclinic_check(); + + if (triclinic != domain->triclinic) + error->all(FLERR,"Must redefine kspace_style after changing to triclinic box"); + if (domain->triclinic && differentiation_flag == 1) error->all(FLERR,"Cannot (yet) use PPPM with triclinic box " "and kspace_modify diff ad"); -- GitLab From 05fbf93455189f5eaac373cf52b32a7feb56f7d2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 23 Jun 2017 10:37:00 -0400 Subject: [PATCH 365/593] skip deleting internal data before setup has been run --- src/USER-OMP/pair_reaxc_omp.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/USER-OMP/pair_reaxc_omp.cpp b/src/USER-OMP/pair_reaxc_omp.cpp index 91fa3d38c7..45c4bce0c0 100644 --- a/src/USER-OMP/pair_reaxc_omp.cpp +++ b/src/USER-OMP/pair_reaxc_omp.cpp @@ -84,10 +84,11 @@ PairReaxCOMP::PairReaxCOMP(LAMMPS *lmp) : PairReaxC(lmp), ThrOMP(lmp, THR_PAIR) PairReaxCOMP::~PairReaxCOMP() { - reax_list * bonds = lists+BONDS; - for (int i=0; inum_intrs; ++i) - sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); - + if (setup_flag) { + reax_list * bonds = lists+BONDS; + for (int i=0; inum_intrs; ++i) + sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); + } memory->destroy(num_nbrs_offset); #ifdef OMP_TIMING -- GitLab From 18983c307e96b0c0c8c07f954c999244156651bb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 23 Jun 2017 16:24:00 -0400 Subject: [PATCH 366/593] fix qeq/reax/omp bugfix from metin --- src/USER-OMP/fix_qeq_reax_omp.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp index 3ca193be74..df586132d4 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.cpp +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -172,6 +172,7 @@ void FixQEqReaxOMP::compute_H() H.firstnbr[ai] = num_nbrs; num_nbrs += numneigh[ai]; } + m_fill = num_nbrs; // fill in the H matrix -- GitLab From c2c6dc14588a8aafe95fde74bbc0ae8c3db0d043 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 23 Jun 2017 16:24:37 -0400 Subject: [PATCH 367/593] remove spurious comment line --- src/info.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/info.cpp b/src/info.cpp index 6a7f70b39d..9fcc24fde9 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -1,5 +1,4 @@ /* ---------------------------------------------------------------------- - fputs LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov -- GitLab From 4fcbd58d5a32656bd4fedd7b1ac486b5b6b8f137 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 23 Jun 2017 15:54:14 -0600 Subject: [PATCH 368/593] doc page clarifications for CHARMM energy and dipole pre-factors --- doc/src/pair_charmm.txt | 10 +++++++++- doc/src/pair_dipole.txt | 8 ++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/src/pair_charmm.txt b/doc/src/pair_charmm.txt index 9c5973c725..1e78607c08 100644 --- a/doc/src/pair_charmm.txt +++ b/doc/src/pair_charmm.txt @@ -104,7 +104,15 @@ charmmfsw"_dihedral_charmm.html command. Eventually code from the new styles will propagate into the related pair styles (e.g. implicit, accelerator, free energy variants). -The general CHARMM formulas are as follows +NOTE: The newest CHARMM pair styles reset the Coulombic energy +conversion factor used internally in the code, from the LAMMPS value +to the CHARMM value, as if it were effectively a parameter of the +force field. This is because the CHARMM code uses a slightly +different value for the this conversion factor in "real +units"_units.html (Kcal/mole), namely CHARMM = 332.0716, LAMMPS = +332.06371. This is to enable more precise agreement by LAMMPS with +the CHARMM force field energies and forces, when using one of these +two CHARMM pair styles. :c,image(Eqs/pair_charmm.jpg) diff --git a/doc/src/pair_dipole.txt b/doc/src/pair_dipole.txt index a9622b32fd..985581cac8 100644 --- a/doc/src/pair_dipole.txt +++ b/doc/src/pair_dipole.txt @@ -71,6 +71,14 @@ and force, Fij = -Fji as symmetric forces, and Tij != -Tji since the torques do not act symmetrically. These formulas are discussed in "(Allen)"_#Allen2 and in "(Toukmaji)"_#Toukmaji2. +Also note, that in the code, all of these terms (except Elj) have a +C/epsilon prefactor, the same as the Coulombic term in the LJ + +Coulombic pair styles discussed "here"_pair_lj.html. C is an +energy-conversion constant and epsilon is the dielectric constant +which can be set by the "dielectric"_dielectric.html command. The +same is true of the equations that follow for other dipole pair +styles. + Style {lj/sf/dipole/sf} computes "shifted-force" interactions between pairs of particles that each have a charge and/or a point dipole moment. In general, a shifted-force potential is a (sligthly) modified -- GitLab From 1370385c8c9f6879e538e2aeaf39ee69f3131ab7 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 23 Jun 2017 17:10:59 -0600 Subject: [PATCH 369/593] patch 23Jun17 --- doc/src/Manual.txt | 4 ++-- src/version.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index e6d44733e2..444e901a40 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -1,7 +1,7 @@ LAMMPS Users Manual - + @@ -21,7 +21,7 @@

    LAMMPS Documentation :c,h3 -20 Jun 2017 version :c,h4 +23 Jun 2017 version :c,h4 Version info: :h4 diff --git a/src/version.h b/src/version.h index c2cdc6afd6..07bfcc3885 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "20 Jun 2017" +#define LAMMPS_VERSION "23 Jun 2017" -- GitLab From f89a7266bfefc08490179aa05ac5cd0e8c4b860b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 25 Jun 2017 23:57:42 -0400 Subject: [PATCH 370/593] make USER-INTEL compilable again with gcc and without OpenMP active --- src/USER-INTEL/intel_preprocess.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/USER-INTEL/intel_preprocess.h b/src/USER-INTEL/intel_preprocess.h index d5cf6f5be2..1f6225dc44 100644 --- a/src/USER-INTEL/intel_preprocess.h +++ b/src/USER-INTEL/intel_preprocess.h @@ -248,12 +248,6 @@ enum {TIME_PACK, TIME_HOST_NEIGHBOR, TIME_HOST_PAIR, TIME_OFFLOAD_NEIGHBOR, #else -#define IP_PRE_omp_range(ifrom, ito, tid, inum, nthreads) \ - { \ - ifrom = 0; \ - ito = inum; \ - } - #define IP_PRE_omp_range_id(ifrom, ito, tid, inum, nthreads) \ { \ tid = 0; \ @@ -299,15 +293,6 @@ enum {TIME_PACK, TIME_HOST_NEIGHBOR, TIME_HOST_PAIR, TIME_OFFLOAD_NEIGHBOR, ito = inum; \ } -#define IP_PRE_omp_range_id_vec(ifrom, ip, ito, tid, inum, \ - nthreads, vecsize) \ - { \ - tid = 0; \ - ifrom = 0; \ - ito = inum; \ - ip = vecsize; \ - } - #endif #define IP_PRE_fdotr_acc_force_l5(lf, lt, minlocal, nthreads, f_start, \ -- GitLab From 8fca667e4b7fdc6edca571971fecf3f14e13c941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=BCtter?= Date: Mon, 26 Jun 2017 18:09:11 +0200 Subject: [PATCH 371/593] Change indexing of remaining variables and locals - Voigt index tables - local variables - remove shims from header --- src/USER-MEAMC/meam.h | 17 +-- src/USER-MEAMC/meam_dens_final.cpp | 30 ++--- src/USER-MEAMC/meam_dens_init.cpp | 40 +++---- src/USER-MEAMC/meam_force.cpp | 185 +++++++++++++---------------- src/USER-MEAMC/meam_setup_done.cpp | 78 ++++++------ 5 files changed, 154 insertions(+), 196 deletions(-) diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 7f210eac18..8d754bffa1 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -93,8 +93,8 @@ class MEAM { int augt1, ialloy, mix_ref_t, erose_form; int emb_lin_neg, bkgd_dyn; double gsmooth_factor; - int vind2D[3 + 1][3 + 1], vind3D[3 + 1][3 + 1][3 + 1]; - int v2D[6 + 1], v3D[10 + 1]; + int vind2D[3][3], vind3D[3][3][3]; + int v2D[6], v3D[10]; int nr, nrar; double dr, rdrar; @@ -181,18 +181,5 @@ public: arr[__i][__j][__k] = v; \ } -/* -Fortran Array Semantics in C. - - Stack-Allocated and global arrays are 1-based, declared as foo[N+1] and simply ignoring the first element - - Multi-Dimensional MUST be declared in reverse, so that the order when accessing is the same as in Fortran - - arrays that are passed externally via the meam_* functions must use the arr*v() functions below - (or be used with 0-based indexing) -*/ - -// access data with same index as used in fortran (1-based) -#define arr1v(ptr, i) ptr[i - 1] -#define arr2v(ptr, i, j) ptr[j - 1][i - 1] - - }; #endif diff --git a/src/USER-MEAMC/meam_dens_final.cpp b/src/USER-MEAMC/meam_dens_final.cpp index b753542db2..ab07af9f0e 100644 --- a/src/USER-MEAMC/meam_dens_final.cpp +++ b/src/USER-MEAMC/meam_dens_final.cpp @@ -27,7 +27,7 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, { int i, elti; int m; - double rhob, G, dG, Gbar, dGbar, gam, shp[3 + 1], Z; + double rhob, G, dG, Gbar, dGbar, gam, shp[3], Z; double B, denom, rho_bkgd; // Complete the calculation of density @@ -38,19 +38,19 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, rho1[i] = 0.0; rho2[i] = -1.0 / 3.0 * arho2b[i] * arho2b[i]; rho3[i] = 0.0; - for (m = 1; m <= 3; m++) { - rho1[i] = rho1[i] + arr2v(arho1, m, i+1) * arr2v(arho1, m, i+1); - rho3[i] = rho3[i] - 3.0 / 5.0 * arr2v(arho3b, m, i+1) * arr2v(arho3b, m, i+1); + for (m = 0; m < 3; m++) { + rho1[i] = rho1[i] + arho1[i][m] * arho1[i][m]; + rho3[i] = rho3[i] - 3.0 / 5.0 * arho3b[i][m] * arho3b[i][m]; } - for (m = 1; m <= 6; m++) { + for (m = 0; m < 6; m++) { rho2[i] = rho2[i] + - this->v2D[m] * arr2v(arho2, m, i+1) * arr2v(arho2, m, i+1); + this->v2D[m] * arho2[i][m] * arho2[i][m]; } - for (m = 1; m <= 10; m++) { + for (m = 0; m < 10; m++) { rho3[i] = rho3[i] + - this->v3D[m] * arr2v(arho3, m, i+1) * arr2v(arho3, m, i+1); + this->v3D[m] * arho3[i][m] * arho3[i][m]; } if (rho0[i] > 0.0) { @@ -88,13 +88,13 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, dGbar = 0.0; } else { if (this->mix_ref_t == 1) { - gam = (t_ave[i][0] * shp[1] + t_ave[i][1] * shp[2] + - t_ave[i][2] * shp[3]) / + gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + + t_ave[i][2] * shp[2]) / (Z * Z); } else { - gam = (this->t1_meam[elti] * shp[1] + - this->t2_meam[elti] * shp[2] + - this->t3_meam[elti] * shp[3]) / + gam = (this->t1_meam[elti] * shp[0] + + this->t2_meam[elti] * shp[1] + + this->t3_meam[elti] * shp[2]) / (Z * Z); } G_gam(gam, this->ibar_meam[elti], &Gbar, errorflag); @@ -106,8 +106,8 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, Gbar = 1.0; dGbar = 0.0; } else { - gam = (t_ave[i][0] * shp[1] + t_ave[i][1] * shp[2] + - t_ave[i][2] * shp[3]) / + gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + + t_ave[i][2] * shp[2]) / (Z * Z); dG_gam(gam, this->ibar_meam[elti], &Gbar, &dGbar); } diff --git a/src/USER-MEAMC/meam_dens_init.cpp b/src/USER-MEAMC/meam_dens_init.cpp index 932346a19a..b6c6dba2d4 100644 --- a/src/USER-MEAMC/meam_dens_init.cpp +++ b/src/USER-MEAMC/meam_dens_init.cpp @@ -246,7 +246,7 @@ MEAM::calc_rho1(int i, int ntype, int* type, int* fmap, double** x, { int jn, j, m, n, p, elti, eltj; int nv2, nv3; - double xtmp, ytmp, ztmp, delij[3 + 1], rij2, rij, sij; + double xtmp, ytmp, ztmp, delij[3], rij2, rij, sij; double ai, aj, rhoa0j, rhoa1j, rhoa2j, rhoa3j, A1j, A2j, A3j; // double G,Gbar,gam,shp[3+1]; double ro0i, ro0j; @@ -260,10 +260,10 @@ MEAM::calc_rho1(int i, int ntype, int* type, int* fmap, double** x, if (!iszero(scrfcn[jn])) { j = firstneigh[jn]; sij = scrfcn[jn] * fcpair[jn]; - delij[1] = x[j][0] - xtmp; - delij[2] = x[j][1] - ytmp; - delij[3] = x[j][2] - ztmp; - rij2 = delij[1] * delij[1] + delij[2] * delij[2] + delij[3] * delij[3]; + delij[0] = x[j][0] - xtmp; + delij[1] = x[j][1] - ytmp; + delij[2] = x[j][2] - ztmp; + rij2 = delij[0] * delij[0] + delij[1] * delij[1] + delij[2] * delij[2]; if (rij2 < this->cutforcesq) { eltj = fmap[type[j]]; rij = sqrt(rij2); @@ -315,24 +315,20 @@ MEAM::calc_rho1(int i, int ntype, int* type, int* fmap, double** x, A1i = rhoa1i / rij; A2i = rhoa2i / rij2; A3i = rhoa3i / (rij2 * rij); - nv2 = 1; - nv3 = 1; - for (m = 1; m <= 3; m++) { - arr2v(arho1, m, i+1) = arr2v(arho1, m, i+1) + A1j * delij[m]; - arr2v(arho1, m, j+1) = arr2v(arho1, m, j+1) - A1i * delij[m]; - arr2v(arho3b, m, i+1) = arr2v(arho3b, m, i+1) + rhoa3j * delij[m] / rij; - arr2v(arho3b, m, j+1) = arr2v(arho3b, m, j+1) - rhoa3i * delij[m] / rij; - for (n = m; n <= 3; n++) { - arr2v(arho2, nv2, i+1) = - arr2v(arho2, nv2, i+1) + A2j * delij[m] * delij[n]; - arr2v(arho2, nv2, j+1) = - arr2v(arho2, nv2, j+1) + A2i * delij[m] * delij[n]; + nv2 = 0; + nv3 = 0; + for (m = 0; m < 3; m++) { + arho1[i][m] = arho1[i][m] + A1j * delij[m]; + arho1[j][m] = arho1[j][m] - A1i * delij[m]; + arho3b[i][m] = arho3b[i][m] + rhoa3j * delij[m] / rij; + arho3b[j][m] = arho3b[j][m] - rhoa3i * delij[m] / rij; + for (n = m; n < 3; n++) { + arho2[i][nv2] = arho2[i][nv2] + A2j * delij[m] * delij[n]; + arho2[j][nv2] = arho2[j][nv2] + A2i * delij[m] * delij[n]; nv2 = nv2 + 1; - for (p = n; p <= 3; p++) { - arr2v(arho3, nv3, i+1) = - arr2v(arho3, nv3, i+1) + A3j * delij[m] * delij[n] * delij[p]; - arr2v(arho3, nv3, j+1) = - arr2v(arho3, nv3, j+1) - A3i * delij[m] * delij[n] * delij[p]; + for (p = n; p < 3; p++) { + arho3[i][nv3] = arho3[i][nv3] + A3j * delij[m] * delij[n] * delij[p]; + arho3[j][nv3] = arho3[j][nv3] - A3i * delij[m] * delij[n] * delij[p]; nv3 = nv3 + 1; } } diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp index f29021dd4f..2e6eac7328 100644 --- a/src/USER-MEAMC/meam_force.cpp +++ b/src/USER-MEAMC/meam_force.cpp @@ -35,15 +35,15 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, { int j, jn, k, kn, kk, m, n, p, q; int nv2, nv3, elti, eltj, eltk, ind; - double xitmp, yitmp, zitmp, delij[3 + 1], rij2, rij, rij3; - double delik[3 + 1], deljk[3 + 1], v[6 + 1], fi[3 + 1], fj[3 + 1]; + double xitmp, yitmp, zitmp, delij[3], rij2, rij, rij3; + double delik[3], deljk[3], v[6], fi[3], fj[3]; double third, sixth; - double pp, dUdrij, dUdsij, dUdrijm[3 + 1], force, forcem; + double pp, dUdrij, dUdsij, dUdrijm[3], force, forcem; double r, recip, phi, phip; double sij; double a1, a1i, a1j, a2, a2i, a2j; double a3i, a3j; - double shpi[3 + 1], shpj[3 + 1]; + double shpi[3], shpj[3]; double ai, aj, ro0i, ro0j, invrei, invrej; double rhoa0j, drhoa0j, rhoa0i, drhoa0i; double rhoa1j, drhoa1j, rhoa1i, drhoa1i; @@ -51,15 +51,15 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, double a3, a3a, rhoa3j, drhoa3j, rhoa3i, drhoa3i; double drho0dr1, drho0dr2, drho0ds1, drho0ds2; double drho1dr1, drho1dr2, drho1ds1, drho1ds2; - double drho1drm1[3 + 1], drho1drm2[3 + 1]; + double drho1drm1[3], drho1drm2[3]; double drho2dr1, drho2dr2, drho2ds1, drho2ds2; - double drho2drm1[3 + 1], drho2drm2[3 + 1]; + double drho2drm1[3], drho2drm2[3]; double drho3dr1, drho3dr2, drho3ds1, drho3ds2; - double drho3drm1[3 + 1], drho3drm2[3 + 1]; + double drho3drm1[3], drho3drm2[3]; double dt1dr1, dt1dr2, dt1ds1, dt1ds2; double dt2dr1, dt2dr2, dt2ds1, dt2ds2; double dt3dr1, dt3dr2, dt3ds1, dt3ds2; - double drhodr1, drhodr2, drhods1, drhods2, drhodrm1[3 + 1], drhodrm2[3 + 1]; + double drhodr1, drhodr2, drhods1, drhods2, drhodrm1[3], drhodrm2[3]; double arg; double arg1i1, arg1j1, arg1i2, arg1j2, arg1i3, arg1j3, arg3i3, arg3j3; double dsij1, dsij2, force1, force2; @@ -86,10 +86,10 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, if (!iszero(scrfcn[fnoffset + jn]) && eltj >= 0) { sij = scrfcn[fnoffset + jn] * fcpair[fnoffset + jn]; - delij[1] = x[j][0] - xitmp; - delij[2] = x[j][1] - yitmp; - delij[3] = x[j][2] - zitmp; - rij2 = delij[1] * delij[1] + delij[2] * delij[2] + delij[3] * delij[3]; + delij[0] = x[j][0] - xitmp; + delij[1] = x[j][1] - yitmp; + delij[2] = x[j][2] - zitmp; + rij2 = delij[0] * delij[0] + delij[1] * delij[1] + delij[2] * delij[2]; if (rij2 < this->cutforcesq) { rij = sqrt(rij2); r = rij; @@ -176,8 +176,8 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, drhoa3i = drhoa3i * this->t3_meam[elti]; } - nv2 = 1; - nv3 = 1; + nv2 = 0; + nv3 = 0; arg1i1 = 0.0; arg1j1 = 0.0; arg1i2 = 0.0; @@ -186,23 +186,23 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, arg1j3 = 0.0; arg3i3 = 0.0; arg3j3 = 0.0; - for (n = 1; n <= 3; n++) { - for (p = n; p <= 3; p++) { - for (q = p; q <= 3; q++) { + for (n = 0; n < 3; n++) { + for (p = n; p < 3; p++) { + for (q = p; q < 3; q++) { arg = delij[n] * delij[p] * delij[q] * this->v3D[nv3]; - arg1i3 = arg1i3 + arr2v(arho3, nv3, i+1) * arg; - arg1j3 = arg1j3 - arr2v(arho3, nv3, j+1) * arg; + arg1i3 = arg1i3 + arho3[i][nv3] * arg; + arg1j3 = arg1j3 - arho3[j][nv3] * arg; nv3 = nv3 + 1; } arg = delij[n] * delij[p] * this->v2D[nv2]; - arg1i2 = arg1i2 + arr2v(arho2, nv2, i+1) * arg; - arg1j2 = arg1j2 + arr2v(arho2, nv2, j+1) * arg; + arg1i2 = arg1i2 + arho2[i][nv2] * arg; + arg1j2 = arg1j2 + arho2[j][nv2] * arg; nv2 = nv2 + 1; } - arg1i1 = arg1i1 + arr2v(arho1, n, i+1) * delij[n]; - arg1j1 = arg1j1 - arr2v(arho1, n, j+1) * delij[n]; - arg3i3 = arg3i3 + arr2v(arho3b, n, i+1) * delij[n]; - arg3j3 = arg3j3 - arr2v(arho3b, n, j+1) * delij[n]; + arg1i1 = arg1i1 + arho1[i][n] * delij[n]; + arg1j1 = arg1j1 - arho1[j][n] * delij[n]; + arg3i3 = arg3i3 + arho3b[i][n] * delij[n]; + arg3j3 = arg3j3 - arho3b[j][n] * delij[n]; } // rho0 terms @@ -214,9 +214,9 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, drho1dr1 = a1 * (drhoa1j - rhoa1j / rij) * arg1i1; drho1dr2 = a1 * (drhoa1i - rhoa1i / rij) * arg1j1; a1 = 2.0 * sij / rij; - for (m = 1; m <= 3; m++) { - drho1drm1[m] = a1 * rhoa1j * arr2v(arho1, m, i+1); - drho1drm2[m] = -a1 * rhoa1i * arr2v(arho1, m, j+1); + for (m = 0; m < 3; m++) { + drho1drm1[m] = a1 * rhoa1j * arho1[i][m]; + drho1drm2[m] = -a1 * rhoa1i * arho1[j][m]; } // rho2 terms @@ -226,14 +226,12 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, drho2dr2 = a2 * (drhoa2i - 2 * rhoa2i / rij) * arg1j2 - 2.0 / 3.0 * arho2b[j] * drhoa2i * sij; a2 = 4 * sij / rij2; - for (m = 1; m <= 3; m++) { + for (m = 0; m < 3; m++) { drho2drm1[m] = 0.0; drho2drm2[m] = 0.0; - for (n = 1; n <= 3; n++) { - drho2drm1[m] = drho2drm1[m] + - arr2v(arho2, this->vind2D[m][n], i+1) * delij[n]; - drho2drm2[m] = drho2drm2[m] - - arr2v(arho2, this->vind2D[m][n], j+1) * delij[n]; + for (n = 0; n < 3; n++) { + drho2drm1[m] = drho2drm1[m] + arho2[i][this->vind2D[m][n]] * delij[n]; + drho2drm2[m] = drho2drm2[m] - arho2[j][this->vind2D[m][n]] * delij[n]; } drho2drm1[m] = a2 * rhoa2j * drho2drm1[m]; drho2drm2[m] = -a2 * rhoa2i * drho2drm2[m]; @@ -249,24 +247,22 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, a3a * (drhoa3i - rhoa3i / rij) * arg3j3; a3 = 6 * sij / rij3; a3a = 6 * sij / (5 * rij); - for (m = 1; m <= 3; m++) { + for (m = 0; m < 3; m++) { drho3drm1[m] = 0.0; drho3drm2[m] = 0.0; - nv2 = 1; - for (n = 1; n <= 3; n++) { - for (p = n; p <= 3; p++) { + nv2 = 0; + for (n = 0; n < 3; n++) { + for (p = n; p < 3; p++) { arg = delij[n] * delij[p] * this->v2D[nv2]; - drho3drm1[m] = drho3drm1[m] + - arr2v(arho3, this->vind3D[m][n][p], i+1) * arg; - drho3drm2[m] = drho3drm2[m] + - arr2v(arho3, this->vind3D[m][n][p], j+1) * arg; + drho3drm1[m] = drho3drm1[m] + arho3[i][this->vind3D[m][n][p]] * arg; + drho3drm2[m] = drho3drm2[m] + arho3[j][this->vind3D[m][n][p]] * arg; nv2 = nv2 + 1; } } drho3drm1[m] = - (a3 * drho3drm1[m] - a3a * arr2v(arho3b, m, i+1)) * rhoa3j; + (a3 * drho3drm1[m] - a3a * arho3b[i][m]) * rhoa3j; drho3drm2[m] = - (-a3 * drho3drm2[m] + a3a * arr2v(arho3b, m, j+1)) * rhoa3i; + (-a3 * drho3drm2[m] + a3a * arho3b[j][m]) * rhoa3i; } // Compute derivatives of weighting functions t wrt rij @@ -346,15 +342,15 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, dt2dr1 * rho2[i] + t2i * drho2dr1 + dt3dr1 * rho3[i] + t3i * drho3dr1) - dgamma3[i] * - (shpi[1] * dt1dr1 + shpi[2] * dt2dr1 + shpi[3] * dt3dr1); + (shpi[0] * dt1dr1 + shpi[1] * dt2dr1 + shpi[2] * dt3dr1); drhodr2 = dgamma1[j] * drho0dr2 + dgamma2[j] * (dt1dr2 * rho1[j] + t1j * drho1dr2 + dt2dr2 * rho2[j] + t2j * drho2dr2 + dt3dr2 * rho3[j] + t3j * drho3dr2) - dgamma3[j] * - (shpj[1] * dt1dr2 + shpj[2] * dt2dr2 + shpj[3] * dt3dr2); - for (m = 1; m <= 3; m++) { + (shpj[0] * dt1dr2 + shpj[1] * dt2dr2 + shpj[2] * dt3dr2); + for (m = 0; m < 3; m++) { drhodrm1[m] = 0.0; drhodrm2[m] = 0.0; drhodrm1[m] = @@ -442,14 +438,14 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, dt2ds1 * rho2[i] + t2i * drho2ds1 + dt3ds1 * rho3[i] + t3i * drho3ds1) - dgamma3[i] * - (shpi[1] * dt1ds1 + shpi[2] * dt2ds1 + shpi[3] * dt3ds1); + (shpi[0] * dt1ds1 + shpi[1] * dt2ds1 + shpi[2] * dt3ds1); drhods2 = dgamma1[j] * drho0ds2 + dgamma2[j] * (dt1ds2 * rho1[j] + t1j * drho1ds2 + dt2ds2 * rho2[j] + t2j * drho2ds2 + dt3ds2 * rho3[j] + t3j * drho3ds2) - dgamma3[j] * - (shpj[1] * dt1ds2 + shpj[2] * dt2ds2 + shpj[3] * dt3ds2); + (shpj[0] * dt1ds2 + shpj[1] * dt2ds2 + shpj[2] * dt3ds2); } // Compute derivatives of energy wrt rij, sij and rij[3] @@ -458,7 +454,7 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, if (!iszero(dscrfcn[fnoffset + jn])) { dUdsij = phi + frhop[i] * drhods1 + frhop[j] * drhods2; } - for (m = 1; m <= 3; m++) { + for (m = 0; m < 3; m++) { dUdrijm[m] = frhop[i] * drhodrm1[m] + frhop[j] * drhodrm2[m]; } @@ -466,37 +462,29 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, // Add the part of the force due to dUdrij and dUdsij force = dUdrij * recip + dUdsij * dscrfcn[fnoffset + jn]; - for (m = 1; m <= 3; m++) { + for (m = 0; m < 3; m++) { forcem = delij[m] * force + dUdrijm[m]; - f[i][m-1] = f[i][m-1] + forcem; - f[j][m-1] = f[j][m-1] - forcem; + f[i][m] = f[i][m] + forcem; + f[j][m] = f[j][m] - forcem; } // Tabulate per-atom virial as symmetrized stress tensor if (vflag_atom != 0) { + fi[0] = delij[0] * force + dUdrijm[0]; fi[1] = delij[1] * force + dUdrijm[1]; fi[2] = delij[2] * force + dUdrijm[2]; - fi[3] = delij[3] * force + dUdrijm[3]; + v[0] = -0.5 * (delij[0] * fi[0]); v[1] = -0.5 * (delij[1] * fi[1]); v[2] = -0.5 * (delij[2] * fi[2]); - v[3] = -0.5 * (delij[3] * fi[3]); - v[4] = -0.25 * (delij[1] * fi[2] + delij[2] * fi[1]); - v[5] = -0.25 * (delij[1] * fi[3] + delij[3] * fi[1]); - v[6] = -0.25 * (delij[2] * fi[3] + delij[3] * fi[2]); - - vatom[i][0] = vatom[i][0] + v[1]; - vatom[i][1] = vatom[i][1] + v[2]; - vatom[i][2] = vatom[i][2] + v[3]; - vatom[i][3] = vatom[i][3] + v[4]; - vatom[i][4] = vatom[i][4] + v[5]; - vatom[i][5] = vatom[i][5] + v[6]; - vatom[j][0] = vatom[j][0] + v[1]; - vatom[j][1] = vatom[j][1] + v[2]; - vatom[j][2] = vatom[j][2] + v[3]; - vatom[j][3] = vatom[j][3] + v[4]; - vatom[j][4] = vatom[j][4] + v[5]; - vatom[j][5] = vatom[j][5] + v[6]; + v[3] = -0.25 * (delij[0] * fi[1] + delij[1] * fi[0]); + v[4] = -0.25 * (delij[0] * fi[2] + delij[2] * fi[0]); + v[5] = -0.25 * (delij[1] * fi[2] + delij[2] * fi[1]); + + for (m = 0; m<6; m++) { + vatom[i][m] = vatom[i][m] + v[m]; + vatom[j][m] = vatom[j][m] + v[m]; + } } // Now compute forces on other atoms k due to change in sij @@ -512,53 +500,40 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, if (!iszero(dsij1) || !iszero(dsij2)) { force1 = dUdsij * dsij1; force2 = dUdsij * dsij2; - for (m = 1; m <= 3; m++) { - delik[m] = arr2v(x, m, k+1) - arr2v(x, m, i+1); - deljk[m] = arr2v(x, m, k+1) - arr2v(x, m, j+1); + for (m = 0; m < 3; m++) { + delik[m] = x[k][m] - x[i][m]; + deljk[m] = x[k][m] - x[j][m]; } - for (m = 1; m <= 3; m++) { - arr2v(f, m, i+1) = arr2v(f, m, i+1) + force1 * delik[m]; - arr2v(f, m, j+1) = arr2v(f, m, j+1) + force2 * deljk[m]; - arr2v(f, m, k+1) = arr2v(f, m, k+1) - force1 * delik[m] - force2 * deljk[m]; + for (m = 0; m < 3; m++) { + f[i][m] = f[i][m] + force1 * delik[m]; + f[j][m] = f[j][m] + force2 * deljk[m]; + f[k][m] = f[k][m] - force1 * delik[m] - force2 * deljk[m]; } // Tabulate per-atom virial as symmetrized stress tensor if (vflag_atom != 0) { + fi[0] = force1 * delik[0]; fi[1] = force1 * delik[1]; fi[2] = force1 * delik[2]; - fi[3] = force1 * delik[3]; + fj[0] = force2 * deljk[0]; fj[1] = force2 * deljk[1]; fj[2] = force2 * deljk[2]; - fj[3] = force2 * deljk[3]; + v[0] = -third * (delik[0] * fi[0] + deljk[0] * fj[0]); v[1] = -third * (delik[1] * fi[1] + deljk[1] * fj[1]); v[2] = -third * (delik[2] * fi[2] + deljk[2] * fj[2]); - v[3] = -third * (delik[3] * fi[3] + deljk[3] * fj[3]); - v[4] = -sixth * (delik[1] * fi[2] + deljk[1] * fj[2] + + v[3] = -sixth * (delik[0] * fi[1] + deljk[0] * fj[1] + + delik[1] * fi[0] + deljk[1] * fj[0]); + v[4] = -sixth * (delik[0] * fi[2] + deljk[0] * fj[2] + + delik[2] * fi[0] + deljk[2] * fj[0]); + v[5] = -sixth * (delik[1] * fi[2] + deljk[1] * fj[2] + delik[2] * fi[1] + deljk[2] * fj[1]); - v[5] = -sixth * (delik[1] * fi[3] + deljk[1] * fj[3] + - delik[3] * fi[1] + deljk[3] * fj[1]); - v[6] = -sixth * (delik[2] * fi[3] + deljk[2] * fj[3] + - delik[3] * fi[2] + deljk[3] * fj[2]); - - vatom[i][0] = vatom[i][0] + v[1]; - vatom[i][1] = vatom[i][1] + v[2]; - vatom[i][2] = vatom[i][2] + v[3]; - vatom[i][3] = vatom[i][3] + v[4]; - vatom[i][4] = vatom[i][4] + v[5]; - vatom[i][5] = vatom[i][5] + v[6]; - vatom[j][0] = vatom[j][0] + v[1]; - vatom[j][1] = vatom[j][1] + v[2]; - vatom[j][2] = vatom[j][2] + v[3]; - vatom[j][3] = vatom[j][3] + v[4]; - vatom[j][4] = vatom[j][4] + v[5]; - vatom[j][5] = vatom[j][5] + v[6]; - vatom[k][0] = vatom[k][0] + v[1]; - vatom[k][1] = vatom[k][1] + v[2]; - vatom[k][2] = vatom[k][2] + v[3]; - vatom[k][3] = vatom[k][3] + v[4]; - vatom[k][4] = vatom[k][4] + v[5]; - vatom[k][5] = vatom[k][5] + v[6]; + + for (m = 0; m<6; m++) { + vatom[i][m] = vatom[i][m] + v[m]; + vatom[j][m] = vatom[j][m] + v[m]; + vatom[k][m] = vatom[k][m] + v[m]; + } } } } diff --git a/src/USER-MEAMC/meam_setup_done.cpp b/src/USER-MEAMC/meam_setup_done.cpp index 59fab02906..0bf4157696 100644 --- a/src/USER-MEAMC/meam_setup_done.cpp +++ b/src/USER-MEAMC/meam_setup_done.cpp @@ -34,14 +34,14 @@ MEAM::meam_setup_done(double* cutmax) alloyparams(); // indices and factors for Voight notation - nv2 = 1; - nv3 = 1; - for (m = 1; m <= 3; m++) { - for (n = m; n <= 3; n++) { + nv2 = 0; + nv3 = 0; + for (m = 0; m < 3; m++) { + for (n = m; n < 3; n++) { this->vind2D[m][n] = nv2; this->vind2D[n][m] = nv2; nv2 = nv2 + 1; - for (p = n; p <= 3; p++) { + for (p = n; p < 3; p++) { this->vind3D[m][n][p] = nv3; this->vind3D[m][p][n] = nv3; this->vind3D[n][m][p] = nv3; @@ -53,23 +53,23 @@ MEAM::meam_setup_done(double* cutmax) } } - this->v2D[1] = 1; + this->v2D[0] = 1; + this->v2D[1] = 2; this->v2D[2] = 2; - this->v2D[3] = 2; - this->v2D[4] = 1; - this->v2D[5] = 2; - this->v2D[6] = 1; + this->v2D[3] = 1; + this->v2D[4] = 2; + this->v2D[5] = 1; - this->v3D[1] = 1; + this->v3D[0] = 1; + this->v3D[1] = 3; this->v3D[2] = 3; this->v3D[3] = 3; - this->v3D[4] = 3; - this->v3D[5] = 6; - this->v3D[6] = 3; - this->v3D[7] = 1; + this->v3D[4] = 6; + this->v3D[5] = 3; + this->v3D[6] = 1; + this->v3D[7] = 3; this->v3D[8] = 3; - this->v3D[9] = 3; - this->v3D[10] = 1; + this->v3D[9] = 1; nv2 = 0; for (m = 0; m < this->neltypes; m++) { @@ -379,7 +379,7 @@ MEAM::phi_meam(double r, int a, int b) { /*unused:double a1,a2,a12;*/ double t11av, t21av, t31av, t12av, t22av, t32av; - double G1, G2, s1[3 + 1], s2[3 + 1] /*,s12[3+1]*/, rho0_1, rho0_2; + double G1, G2, s1[3], s2[3], rho0_1, rho0_2; double Gam1, Gam2, Z1, Z2; double rhobar1, rhobar2, F1, F2; double rho01, rho11, rho21, rho31; @@ -470,14 +470,14 @@ MEAM::phi_meam(double r, int a, int b) G1 = 1.0; else { get_shpfcn(s1, this->lattce_meam[a][a]); - Gam1 = (s1[1] * t11av + s1[2] * t21av + s1[3] * t31av) / (Z1 * Z1); + Gam1 = (s1[0] * t11av + s1[1] * t21av + s1[2] * t31av) / (Z1 * Z1); G_gam(Gam1, this->ibar_meam[a], &G1, &errorflag); } if (this->ibar_meam[b] <= 0) G2 = 1.0; else { get_shpfcn(s2, this->lattce_meam[b][b]); - Gam2 = (s2[1] * t12av + s2[2] * t22av + s2[3] * t32av) / (Z2 * Z2); + Gam2 = (s2[0] * t12av + s2[1] * t22av + s2[2] * t32av) / (Z2 * Z2); G_gam(Gam2, this->ibar_meam[b], &G2, &errorflag); } rho0_1 = this->rho0_meam[a] * Z1 * G1; @@ -585,7 +585,7 @@ void MEAM::compute_reference_density(void) { int a, Z, Z2, errorflag; - double gam, Gbar, shp[3 + 1]; + double gam, Gbar, shp[3]; double rho0, rho0_2nn, arat, scrn; // loop over element types @@ -595,8 +595,8 @@ MEAM::compute_reference_density(void) Gbar = 1.0; else { get_shpfcn(shp, this->lattce_meam[a][a]); - gam = (this->t1_meam[a] * shp[1] + this->t2_meam[a] * shp[2] + - this->t3_meam[a] * shp[3]) / + gam = (this->t1_meam[a] * shp[0] + this->t2_meam[a] * shp[1] + + this->t3_meam[a] * shp[2]) / (Z * Z); G_gam(gam, this->ibar_meam[a], &Gbar, &errorflag); } @@ -627,24 +627,24 @@ void MEAM::get_shpfcn(double* s /* s(3) */, lattice_t latt) { if (latt == FCC || latt == BCC || latt == B1 || latt == B2) { + s[0] = 0.0; s[1] = 0.0; s[2] = 0.0; - s[3] = 0.0; } else if (latt == HCP) { + s[0] = 0.0; s[1] = 0.0; - s[2] = 0.0; - s[3] = 1.0 / 3.0; + s[2] = 1.0 / 3.0; } else if (latt == DIA) { + s[0] = 0.0; s[1] = 0.0; - s[2] = 0.0; - s[3] = 32.0 / 9.0; + s[2] = 32.0 / 9.0; } else if (latt == DIM) { - s[1] = 1.0; - s[2] = 2.0 / 3.0; + s[0] = 1.0; + s[1] = 2.0 / 3.0; // s(3) = 1.d0 - s[3] = 0.40; + s[2] = 0.40; } else { - s[1] = 0.0; + s[0] = 0.0; // call error('Lattice not defined in get_shpfcn.') } } @@ -804,7 +804,7 @@ MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* double* rho32) { double a1, a2; - double s[3 + 1]; + double s[3]; lattice_t lat; int Zij1nn, Zij2nn; double rhoa01nn, rhoa02nn; @@ -859,12 +859,12 @@ MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* get_shpfcn(s, DIM); *rho01 = rhoa02; *rho02 = rhoa01; - *rho11 = s[1] * rhoa12 * rhoa12; - *rho12 = s[1] * rhoa11 * rhoa11; - *rho21 = s[2] * rhoa22 * rhoa22; - *rho22 = s[2] * rhoa21 * rhoa21; - *rho31 = s[3] * rhoa32 * rhoa32; - *rho32 = s[3] * rhoa31 * rhoa31; + *rho11 = s[0] * rhoa12 * rhoa12; + *rho12 = s[0] * rhoa11 * rhoa11; + *rho21 = s[1] * rhoa22 * rhoa22; + *rho22 = s[1] * rhoa21 * rhoa21; + *rho31 = s[2] * rhoa32 * rhoa32; + *rho32 = s[2] * rhoa31 * rhoa31; } else if (lat == C11) { *rho01 = rhoa01; *rho02 = rhoa02; -- GitLab From b8897765572e454ace662b80e1e87d115a244579 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Mon, 26 Jun 2017 10:51:26 -0600 Subject: [PATCH 372/593] Fixing memory leak in Kokkos neighborlist --- src/KOKKOS/fix_qeq_reax_kokkos.cpp | 2 -- src/KOKKOS/neigh_list_kokkos.cpp | 19 ++++++------------- src/KOKKOS/neigh_list_kokkos.h | 7 +------ src/KOKKOS/npair_kokkos.h | 2 +- src/KOKKOS/pair_coul_dsf_kokkos.cpp | 3 --- src/KOKKOS/pair_coul_wolf_kokkos.cpp | 3 --- src/KOKKOS/pair_eam_alloy_kokkos.cpp | 3 --- src/KOKKOS/pair_eam_fs_kokkos.cpp | 3 --- src/KOKKOS/pair_eam_kokkos.cpp | 5 +---- src/KOKKOS/pair_kokkos.h | 4 ++-- src/KOKKOS/pair_reaxc_kokkos.cpp | 3 --- src/KOKKOS/pair_sw_kokkos.cpp | 1 - src/KOKKOS/pair_tersoff_kokkos.cpp | 1 - src/KOKKOS/pair_tersoff_mod_kokkos.cpp | 1 - src/KOKKOS/pair_tersoff_zbl_kokkos.cpp | 1 - src/neigh_list.cpp | 2 ++ src/neigh_list.h | 3 ++- 17 files changed, 15 insertions(+), 48 deletions(-) diff --git a/src/KOKKOS/fix_qeq_reax_kokkos.cpp b/src/KOKKOS/fix_qeq_reax_kokkos.cpp index 5cafbd2ef3..cef003222a 100644 --- a/src/KOKKOS/fix_qeq_reax_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reax_kokkos.cpp @@ -218,8 +218,6 @@ void FixQEqReaxKokkos::pre_force(int vflag) d_ilist = k_list->d_ilist; inum = list->inum; - k_list->clean_copy(); - //cleanup_copy(); copymode = 1; int teamsize = TEAMSIZE; diff --git a/src/KOKKOS/neigh_list_kokkos.cpp b/src/KOKKOS/neigh_list_kokkos.cpp index b1b4e4467a..caf2dfee56 100644 --- a/src/KOKKOS/neigh_list_kokkos.cpp +++ b/src/KOKKOS/neigh_list_kokkos.cpp @@ -22,21 +22,14 @@ enum{NSQ,BIN,MULTI}; /* ---------------------------------------------------------------------- */ template -void NeighListKokkos::clean_copy() +NeighListKokkos::NeighListKokkos(class LAMMPS *lmp):NeighList(lmp) { - ilist = NULL; - numneigh = NULL; - firstneigh = NULL; - firstdouble = NULL; - dnum = 0; - iskip = NULL; - ijskip = NULL; - - ipage = NULL; - dpage = NULL; - + _stride = 1; + maxneighs = 16; + kokkos = 1; maxatoms = 0; -} + execution_space = ExecutionSpaceFromDevice::space; +}; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/neigh_list_kokkos.h b/src/KOKKOS/neigh_list_kokkos.h index 45e768927c..c887bd13b7 100644 --- a/src/KOKKOS/neigh_list_kokkos.h +++ b/src/KOKKOS/neigh_list_kokkos.h @@ -68,18 +68,13 @@ class NeighListKokkos: public NeighList { public: int maxneighs; - void clean_copy(); void grow(int nmax); typename ArrayTypes::t_neighbors_2d d_neighbors; typename DAT::tdual_int_1d k_ilist; // local indices of I atoms typename ArrayTypes::t_int_1d d_ilist; typename ArrayTypes::t_int_1d d_numneigh; // # of J neighs for each I - NeighListKokkos(class LAMMPS *lmp): - NeighList(lmp) {_stride = 1; maxneighs = 16; kokkos = 1; maxatoms = 0; - execution_space = ExecutionSpaceFromDevice::space; - }; - ~NeighListKokkos() {numneigh = NULL; ilist = NULL;}; + NeighListKokkos(class LAMMPS *lmp); KOKKOS_INLINE_FUNCTION AtomNeighbors get_neighbors(const int &i) const { diff --git a/src/KOKKOS/npair_kokkos.h b/src/KOKKOS/npair_kokkos.h index 8e81c57618..53183114d3 100644 --- a/src/KOKKOS/npair_kokkos.h +++ b/src/KOKKOS/npair_kokkos.h @@ -265,7 +265,7 @@ class NeighborKokkosExecute h_new_maxneighs() = neigh_list.maxneighs; }; - ~NeighborKokkosExecute() {neigh_list.clean_copy();}; + ~NeighborKokkosExecute() {neigh_list.copymode = 1;}; template KOKKOS_FUNCTION diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_coul_dsf_kokkos.cpp index f2063bdc08..e6f5407f2d 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_dsf_kokkos.cpp @@ -120,9 +120,6 @@ void PairCoulDSFKokkos::compute(int eflag_in, int vflag_in) int inum = list->inum; - // Call cleanup_copy which sets allocations NULL which are destructed by the PairStyle - - k_list->clean_copy(); copymode = 1; // loop over neighbors of my atoms diff --git a/src/KOKKOS/pair_coul_wolf_kokkos.cpp b/src/KOKKOS/pair_coul_wolf_kokkos.cpp index 8049ba0031..75177e2d81 100644 --- a/src/KOKKOS/pair_coul_wolf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_wolf_kokkos.cpp @@ -121,9 +121,6 @@ void PairCoulWolfKokkos::compute(int eflag_in, int vflag_in) int inum = list->inum; - // Call cleanup_copy which sets allocations NULL which are destructed by the PairStyle - - k_list->clean_copy(); copymode = 1; // loop over neighbors of my atoms diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.cpp b/src/KOKKOS/pair_eam_alloy_kokkos.cpp index 76c701213d..f8b7a69d60 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.cpp +++ b/src/KOKKOS/pair_eam_alloy_kokkos.cpp @@ -122,9 +122,6 @@ void PairEAMAlloyKokkos::compute(int eflag_in, int vflag_in) d_ilist = k_list->d_ilist; int inum = list->inum; - // Call cleanup_copy which sets allocations NULL which are destructed by the PairStyle - - k_list->clean_copy(); copymode = 1; // zero out density diff --git a/src/KOKKOS/pair_eam_fs_kokkos.cpp b/src/KOKKOS/pair_eam_fs_kokkos.cpp index 9b565f8ede..57820afb26 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.cpp +++ b/src/KOKKOS/pair_eam_fs_kokkos.cpp @@ -122,9 +122,6 @@ void PairEAMFSKokkos::compute(int eflag_in, int vflag_in) d_ilist = k_list->d_ilist; int inum = list->inum; - // Call cleanup_copy which sets allocations NULL which are destructed by the PairStyle - - k_list->clean_copy(); copymode = 1; // zero out density diff --git a/src/KOKKOS/pair_eam_kokkos.cpp b/src/KOKKOS/pair_eam_kokkos.cpp index 7be8e54605..e848669947 100644 --- a/src/KOKKOS/pair_eam_kokkos.cpp +++ b/src/KOKKOS/pair_eam_kokkos.cpp @@ -117,9 +117,6 @@ void PairEAMKokkos::compute(int eflag_in, int vflag_in) d_ilist = k_list->d_ilist; int inum = list->inum; - // Call cleanup_copy which sets allocations NULL which are destructed by the PairStyle - - k_list->clean_copy(); copymode = 1; // zero out density @@ -868,4 +865,4 @@ template class PairEAMKokkos; #ifdef KOKKOS_HAVE_CUDA template class PairEAMKokkos; #endif -} \ No newline at end of file +} diff --git a/src/KOKKOS/pair_kokkos.h b/src/KOKKOS/pair_kokkos.h index 1e01b3df15..b0614a934b 100644 --- a/src/KOKKOS/pair_kokkos.h +++ b/src/KOKKOS/pair_kokkos.h @@ -87,7 +87,7 @@ struct PairComputeFunctor { vatom(c.d_vatom),list(*list_ptr) {}; // Call cleanup_copy which sets allocations NULL which are destructed by the PairStyle - ~PairComputeFunctor() {c.cleanup_copy();list.clean_copy();}; + ~PairComputeFunctor() {c.cleanup_copy();list.copymode = 1;}; KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const { return j >> SBBITS & 3; @@ -344,7 +344,7 @@ struct PairComputeFunctor { PairComputeFunctor(PairStyle* c_ptr, NeighListKokkos* list_ptr): c(*c_ptr),list(*list_ptr) {}; - ~PairComputeFunctor() {c.cleanup_copy();list.clean_copy();}; + ~PairComputeFunctor() {c.cleanup_copy();list.copymode = 1;}; KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_reaxc_kokkos.cpp b/src/KOKKOS/pair_reaxc_kokkos.cpp index 6082c93287..6be09548da 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.cpp +++ b/src/KOKKOS/pair_reaxc_kokkos.cpp @@ -709,8 +709,6 @@ void PairReaxCKokkos::compute(int eflag_in, int vflag_in) d_neighbors = k_list->d_neighbors; d_ilist = k_list->d_ilist; - k_list->clean_copy(); - if (eflag_global) { for (int i = 0; i < 14; i++) pvector[i] = 0.0; @@ -3985,7 +3983,6 @@ void PairReaxCKokkos::FindBond(int &numbonds) const int inum = list->inum; NeighListKokkos* k_list = static_cast*>(list); d_ilist = k_list->d_ilist; - k_list->clean_copy(); numbonds = 0; PairReaxCKokkosFindBondFunctor find_bond_functor(this); diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index a8950a0c79..e5c947cc8e 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -115,7 +115,6 @@ void PairSWKokkos::compute(int eflag_in, int vflag_in) d_numneigh = k_list->d_numneigh; d_neighbors = k_list->d_neighbors; - k_list->clean_copy(); copymode = 1; EV_FLOAT ev; diff --git a/src/KOKKOS/pair_tersoff_kokkos.cpp b/src/KOKKOS/pair_tersoff_kokkos.cpp index 75280c8f7c..833c815ad9 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_kokkos.cpp @@ -200,7 +200,6 @@ void PairTersoffKokkos::compute(int eflag_in, int vflag_in) d_neighbors = k_list->d_neighbors; d_ilist = k_list->d_ilist; - k_list->clean_copy(); copymode = 1; EV_FLOAT ev; diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp index d16a7fc4d7..d77ba2f141 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp @@ -200,7 +200,6 @@ void PairTersoffMODKokkos::compute(int eflag_in, int vflag_in) d_neighbors = k_list->d_neighbors; d_ilist = k_list->d_ilist; - k_list->clean_copy(); copymode = 1; EV_FLOAT ev; diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp index e9bae49fb7..040d8c5230 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp @@ -214,7 +214,6 @@ void PairTersoffZBLKokkos::compute(int eflag_in, int vflag_in) d_neighbors = k_list->d_neighbors; d_ilist = k_list->d_ilist; - k_list->clean_copy(); copymode = 1; EV_FLOAT ev; diff --git a/src/neigh_list.cpp b/src/neigh_list.cpp index edc8634373..a5ca7a5366 100644 --- a/src/neigh_list.cpp +++ b/src/neigh_list.cpp @@ -48,6 +48,7 @@ NeighList::NeighList(LAMMPS *lmp) : Pointers(lmp) ghost = 0; ssa = 0; copy = 0; + copymode = 0; dnum = 0; // ptrs @@ -85,6 +86,7 @@ NeighList::NeighList(LAMMPS *lmp) : Pointers(lmp) NeighList::~NeighList() { + if (copymode) return; if (!copy) { memory->destroy(ilist); memory->destroy(numneigh); diff --git a/src/neigh_list.h b/src/neigh_list.h index 9a77a0311d..3fb3868114 100644 --- a/src/neigh_list.h +++ b/src/neigh_list.h @@ -34,7 +34,8 @@ class NeighList : protected Pointers { int occasional; // 0 if build every reneighbor, 1 if not int ghost; // 1 if list stores neighbors of ghosts int ssa; // 1 if list stores Shardlow data - int copy; // 1 if this list copied from another list + int copy; // 1 if this list is (host) copied from another list + int copymode; // 1 if this is a Kokkos on-device copy int dnum; // # of doubles per neighbor, 0 if none // data structs to store neighbor pairs I,J and associated values -- GitLab From 9fec8a0470bd2b3ce1ad9993c4652678072a20c1 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Mon, 26 Jun 2017 10:56:03 -0600 Subject: [PATCH 373/593] Remove clean_copy function from pair_vashishta_kokkos --- src/KOKKOS/pair_vashishta_kokkos.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index f81af0b149..abdcfac89e 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -114,7 +114,6 @@ void PairVashishtaKokkos::compute(int eflag_in, int vflag_in) d_numneigh = k_list->d_numneigh; d_neighbors = k_list->d_neighbors; - k_list->clean_copy(); copymode = 1; EV_FLOAT ev; -- GitLab From fa3c7727e103a4628e8e12047c92132706b1c5d6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 27 Jun 2017 00:17:37 -0400 Subject: [PATCH 374/593] contributing guidelines, issue and pull request template are now feature complete This is still a draft and in need of editing, proofreading and testing for formatting. --- .github/CONTRIBUTING.md | 65 ++++++++++++++++++++++++++++++-- .github/ISSUE_TEMPLATE.md | 11 +++--- .github/PULL_REQUEST_TEMPLATE.md | 16 ++++---- 3 files changed, 76 insertions(+), 16 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6f60d4919b..47aa7e804e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -26,7 +26,7 @@ __ ## I don't want to read this whole thing I just have a question! -> **Note:** Please do not file an issue to ask a question about how to use LAMMPS or a specific feature in LAMMPS. Instead post your question to the ['lammps-users' mailing list](http://lammps.sandia.gov/mail.html). You do not need to be subscribed to post to the list (but a mailing list subscription avoids having your post held back until your post is approved by a mailing list moderator). Most posts to the mailing list receive a response within less than 24 hours. Before posting to the mailing list, please read the [mailing list guidelines](http://lammps.sandia.gov/guidelines.html). Following those guidelines will help greatly to get a helpful response. Always mention which LAMMPS version you are using. +> **Note:** Please do not file an issue to ask a general question about LAMMPS, its features, how to use specific commands, or how perform simulations or analysis in LAMMPS. Instead post your question to the ['lammps-users' mailing list](http://lammps.sandia.gov/mail.html). You do not need to be subscribed to post to the list (but a mailing list subscription avoids having your post delayed until it is approved by a mailing list moderator). Most posts to the mailing list receive a response within less than 24 hours. Before posting to the mailing list, please read the [mailing list guidelines](http://lammps.sandia.gov/guidelines.html). Following those guidelines will help greatly to get a helpful response. Always mention which LAMMPS version you are using. ## How Can I Contribute? @@ -38,18 +38,75 @@ to one of the [LAMMPS core developers](http://lammps.sandia.gov/authors.html). A The LAMMPS mailing list is hosted at SourceForge. The mailing list began in 2005, and now includes tens of thousands of messages in thousands of threads. LAMMPS developers try to respond to posted questions in a timely manner, but there are no guarantees. Please consider that people live in different timezone and may not have time to answer e-mails outside of their work hours. You can post to list by sending your email to lammps-users at lists.sourceforge.net (no subscription required), but before posting, please read the [mailing list guidelines](http://lammps.sandia.gov/guidelines.html) to maximize your chances to receive a helpful response. -Anyone can browse/search previous questions/answers in the archives. -You do not have to subscribe to the list to post Qs, receive answers (to your Qs), or browse/search the archives. You **do** need to subscribe to the list if you want emails for **all** the posts (per-message or in digest form), or to answer Qs yourself. Feel free to sign up and help us out! -If you post a message and you are a subscriber, your message will appear immediately. If you are not a subscriber, your message will be moderated, which typically takes one business day. Either way, when someone replies you will receive that reply as a personal email, and the reply will appear on the list in the new thread your message started. Posting a message sends email to subscribers immediately, but it can take a few hours for postings and replies to show up in the SourceForge archive. +Anyone can browse/search previous questions/answers in the archives. You do not have to subscribe to the list to post Qs, receive answers (to your Qs), or browse/search the archives. You **do** need to subscribe to the list if you want emails for **all** the posts (as individual messages or in digest form), or to answer questions yourself. Feel free to sign up and help us out! Answering questions from fellow LAMMPS users is a great way to pay back the community for providing you a useful tool for free, and to pass on the advice you have received yourself to others. It improves your karma and helps you understand your own research better. + +If you post a message and you are a subscriber, your message will appear immediately. If you are not a subscriber, your message will be moderated, which typically takes one business day. Either way, when someone replies the reply will usually be sent to both, your personal email address and the mailing list. When replying to people, that responded to your post to the list, please always included the mailing list in your replies (i.e. use "Reply All" and **not** "Reply"). Responses will appear on the list in a few minutes, but it can take a few hours for postings and replies to show up in the SourceForge archive. Sending replies also to the mailing list is important, so that responses are archived and people with a similar issue can search for possible solutions in the mailing list archive. ### Reporting Bugs +While developers writing code for LAMMPS are careful to test their code, LAMMPS is such a large and complex software, that it is impossible to test for all combinations of features under all normal and not so normal circumstances. Thus bugs do happen, and if you suspect, that you have encountered one, please try to document it and report it as an [Issue](https://github.com/lammps/lammps/issues) on the LAMMPS GitHub project webpage. However, before reporting a bug, you need to check whether this is something that may have already been corrected. The [Latest Features and Bug Fixes in LAMMPS](http://lammps.sandia.gov/bug.html) web page lists all significant changes to LAMMPS over the years. It also tells you what the current latest development version of LAMMPS is, and you should test whether your issue still applies to that version. + +When you click on the green "New Issue" button, you will be provided with a text field, where you can enter your message. That text field with contain a template with several headlines and some descriptions. Keep the headlines that are relevant to your reported potential bug and replace the descriptions with the information as suggested by the descriptions. +You can also attach small text files (please add the filename extension `.txt` or it will be rejected), images, or small compressed text files (using gzip, do not use RAR or 7-ZIP or similar tools that are uncommon ourside of Windows machines). In many cases, bugs are best illustrated by providing a small input deck (do **not** attach your entire production input, but remove everything that is not required to reproduce the issue, and scale down your system size, that the resulting calculation runs fast and can be run on small desktop quickly). + +To be able to submit an issue on GitHub, you have to register for an account (for GitHub in general). If you do not want to do that, or have other reservations against submitting an issue there, you can - as an alternative and in decreasing preference - either send an e-mail to the lammps-users mailing list, the original authors of the feature that you suspect to be affected, or one or more of the core LAMMPS developers. + ### Suggesting Enhancements +The LAMMPS developers welcome suggestions for enhancements or new features. These should be submitted using the [GitHub Issue Tracker](https://github.com/lammps/lammps/issues) of the LAMMPS project. This is particularly recommended, when you plan to implement the feature or enhancement yourself, as this allows to coordinate in case there are other similar or conflicting ongoing developments. +The LAMMPS developers will review your submission and consider implementing it. Whether this will actually happen depends on many factors: how difficult it would be, how much effort it would take, how many users would benefit from it, how well the individual developer would understand the underlying physics of the feature, and whether this is a feature that would fit into a software like LAMMPS, or would be better implemented as a separate tool. Because of these factors, it matters how well the suggested enhancement is formulated and the overall benefit is argued convincingly. + +To be able to submit an issue on GitHub, you have to register for an account (for GitHub in general). If you do not want to do that, or have other reservations against submitting an issue there, you can - as an alternative - send an e-mail to the lammps-users mailing list. + ### Contributing Code +We encourage users to submit new features or modifications for LAMMPS to the core developers so they can be added to the LAMMPS distribution. The preferred way to manage and coordinate this is by submitting a pull request at the LAMMPS project on GitHub. For any larger modifications or programming project, you are encouraged to contact the LAMMPS developers ahead of time, in order to discuss implementation strategies and coding guidelines, that will make it easier to integrate your contribution and result in less work for everybody involved. You are also encouraged to search through the list of open issues on GitHub and submit a new issue for a planned feature, so you would not duplicate the work of others (and possibly get scooped by them) or have your work duplicated by others. + +How quickly your contribution will be integrated depends largely on how much effort it will cause to integrate and test it, how much it requires changes to the core codebase, and of how much interest it is to the larger LAMMPS community. Please see below for a checklist of typical requirements. Once you have prepared everything, see [this tutorial](http://lammps.sandia.gov/doc/tutorial_github.html) + for instructions on how to submit your changes or new files through a GitHub pull request + +Here is a checklist of steps you need to follow to submit a single file or user package for our consideration. Following these steps will save both you and us time. See existing files in packages in the src dir for examples. If you are uncertain, please ask on the lammps-users mailing list. + +* All source files you provide must compile with the most current version of LAMMPS with multiple configurations. In particular you need to test compiling LAMMPS from scratch with `-DLAMMPS_BIGBIG` set in addition to the default `-DLAMMPS_SMALLBIG` setting. Your code will need to work correctly in serial and in parallel using MPI. +* For consistency with the rest of LAMMPS and especially, if you want your contribution(s) to be added to main LAMMPS code or one of its standard packages, it needs to be written in a style compatible with other LAMMPS source files. This means: 2-character indentation per level, no tabs, no lines over 80 characters. I/O is done via the C-style stdio library, class header files should not import any system headers outside , STL containers should be avoided in headers, and forward declarations used where possible or needed. All added code should be placed into the LAMMPS_NS namespace or a sub-namespace; global or static variables should be avoided, as they conflict with the modular nature of LAMMPS and the C++ class structure. Header files must not import namespaces with using. This all is so the developers can more easily understand, integrate, and maintain your contribution and reduce conflicts with other parts of LAMMPS. This basically means that the code accesses data structures, performs its operations, and is formatted similar to other LAMMPS source files, including the use of the error class for error and warning messages. +* If you want your contribution to be added as a user-contributed feature, and it’s a single file (actually a `.cpp` and `.h` file) it can be rapidly added to the USER-MISC directory. Include the one-line entry to add to the USER-MISC/README file in that dir, along with the 2 source files. You can do this multiple times if you wish to contribute several individual features. +* If you want your contribution to be added as a user-contribution and it is several related features, it is probably best to make it a user package directory with a name like USER-FOO. In addition to your new files, the directory should contain a README text file. The README should contain your name and contact information and a brief description of what your new package does. If your files depend on other LAMMPS style files also being installed (e.g. because your file is a derived class from the other LAMMPS class), then an Install.sh file is also needed to check for those dependencies. See other README and Install.sh files in other USER directories as examples. Send us a tarball of this USER-FOO directory. +* Your new source files need to have the LAMMPS copyright, GPL notice, and your name and email address at the top, like other user-contributed LAMMPS source files. They need to create a class that is inside the LAMMPS namespace. If the file is for one of the USER packages, including USER-MISC, then we are not as picky about the coding style (see above). I.e. the files do not need to be in the same stylistic format and syntax as other LAMMPS files, though that would be nice for developers as well as users who try to read your code. +* You **must** also create or extend a documentation file for each new command or style you are adding to LAMMPS. For simplicity and convenience, the documentation of groups of closely related commands or styles may be combined into a single file. This will be one file for a single-file feature. For a package, it might be several files. These are simple text files with a specific markup language, that are then auto-converted to HTML and PDF. The tools for this conversion are included in the source distribution, and the translation can be as simple as doing “make html pdf” in the doc folder. Thus the documentation source files must be in the same format and style as other `.txt` files in the lammps/doc/src directory for similar commands and styles; use one or more of them as a starting point. A description of the markup can also be found in `lammps/doc/utils/txt2html/README.html` As appropriate, the text files can include links to equations (see doc/Eqs/*.tex for examples, we auto-create the associated JPG files), or figures (see doc/JPG for examples), or even additional PDF files with further details (see doc/PDF for examples). The doc page should also include literature citations as appropriate; see the bottom of doc/fix_nh.txt for examples and the earlier part of the same file for how to format the cite itself. The "Restrictions" section of the doc page should indicate that your command is only available if LAMMPS is built with the appropriate USER-MISC or USER-FOO package. See other user package doc files for examples of how to do this. The prerequisite for building the HTML format files are Python 3.x and virtualenv, the requirement for generating the PDF format manual is the htmldoc software. Please run at least "make html" and carefully inspect and proofread the resulting HTML format doc page before submitting your code. +* For a new package (or even a single command) you should include one or more example scripts demonstrating its use. These should run in no more than a couple minutes, even on a single processor, and not require large data files as input. See directories under examples/USER for examples of input scripts other users provided for their packages. These example inputs are also required for validating memory accesses and testing for memory leaks with valgrind +* If there is a paper of yours describing your feature (either the algorithm/science behind the feature itself, or its initial usage, or its implementation in LAMMPS), you can add the citation to the *.cpp source file. See src/USER-EFF/atom_vec_electron.cpp for an example. A LaTeX citation is stored in a variable at the top of the file and a single line of code that references the variable is added to the constructor of the class. Whenever a user invokes your feature from their input script, this will cause LAMMPS to output the citation to a log.cite file and prompt the user to examine the file. Note that you should only use this for a paper you or your group authored. E.g. adding a cite in the code for a paper by Nose and Hoover if you write a fix that implements their integrator is not the intended usage. That kind of citation should just be in the doc page you provide. + +Finally, as a general rule-of-thumb, the more clear and self-explanatory you make your documentation and README files, and the easier you make it for people to get started, e.g. by providing example scripts, the more likely it is that users will try out your new feature. + +If the new features/files are broadly useful we may add them as core files to LAMMPS or as part of a standard package. Else we will add them as a user-contributed file or package. Examples of user packages are in src sub-directories that start with USER. The USER-MISC package is simply a collection of (mostly) unrelated single files, which is the simplest way to have your contribution quickly added to the LAMMPS distribution. You can see a list of the both standard and user packages by typing “make package” in the LAMMPS src directory. + +Note that by providing us files to release, you are agreeing to make them open-source, i.e. we can release them under the terms of the GPL, used as a license for the rest of LAMMPS. See Section 1.4 for details. + +With user packages and files, all we are really providing (aside from the fame and fortune that accompanies having your name in the source code and on the Authors page of the LAMMPS WWW site), is a means for you to distribute your work to the LAMMPS user community, and a mechanism for others to easily try out your new feature. This may help you find bugs or make contact with new collaborators. Note that you’re also implicitly agreeing to support your code which means answer questions, fix bugs, and maintain it if LAMMPS changes in some way that breaks it (an unusual event). + +To be able to submit an issue on GitHub, you have to register for an account (for GitHub in general). If you do not want to do that, or have other reservations or difficulties to submit a pull request, you can - as an alternative - contact one or more of the core LAMMPS developers and ask if one of them would be interested in manually merging your code into LAMMPS and send them your source code. Since the effort to merge a pull request is a small fraction of the effort of integrating source code manually (which would usually be done by converting the contribution into a pull request), your chances to have your new code included quickly are the best with a pull request. + +If you prefer to submit patches or full files, you should first make certain, that your code works correctly with the latest patch-level version of LAMMPS and contains all bugfixes from it. Then create a gzipped tar file of all changed or added files or a corresponding patch file using ‘diff -u’ or ‘diff -c’ and compress it with gzip. Please only use gzip compression, as this works well on all platforms. + ## GitHub Workflows +This section briefly summarizes the steps that will happen **after** you have submitted either an issue or a pull request on the LAMMPS GitHub project page. + ### Issues +After submitting an issue, one or more of the LAMMPS developers will review it and categorize it by assigning labels. Confirmed bug reports will be labeled `bug`; if the bug report also contains a suggestion for how to fix it, it will be labeled `bugfix`; if the issue is a feature request, it will be labeled `enhancement`. Other labels may be attached as well, depending on which parts of the LAMMPS code are affected. If the assessment is, that the issue does not warrant any changes, the `wontfix` label will be applied and if the submission is incorrect or something that should not be submitted as an issue, the `invalid` label will be applied. In both of the last two cases, the issue will then be closed without further action. + +For feature requests, what happens next is that developers may comment on the viability or relevance of the request, discuss and make suggestions for how to implement it. If a LAMMPS developer or user is planning to implement the feature, the issue will be assigned to that developer. For developers, that are not yet listed as LAMMPS project collaborators, they will receive an invitation to be added to the LAMMPS project as a collaborator so they can get assigned. If the requested feature or enhancement is implemented, it will usually be submitted as a pull request, which will contain a reference to the issue number. And once the pull request is reviewed and accepted for inclusion into LAMMPS, the issue will be closed. For details on how pull requests are processed, please see below. + +For bug reports, the next step is that one of the core LAMMPS developers will self-assign to the issue and try to confirm the bug. If confirmed, the `bug` label and potentially other labels are added to classify the issue and its impact to LAMMPS. Before confirming, further questions may be asked or requests for providing additional input files or details about the steps required to reproduce the issue. Any bugfix is likely to be submitted as a pull request (more about that below) and since most bugs require only local changes, the bugfix may be included in a pull request specifically set up to collect such local bugfixes or small enhancements. Once the bugfix is included in the master branch, the issue will be closed. + ### Pull Requests + +For submitting pull requests, there is a [detailed tutorial](http://lammps.sandia.gov/doc/tutorial_github.html) in the LAMMPS manual. Thus only a brief breakdown of the steps is presented here. +Immediately after the submission, the LAMMPS continuing integration server at ci.lammps.org will download your submitted branch and perform a simple compilation test, i.e. will test whether your submitted code can be compiled under various conditions. It will also do a check on whether your included documentation translates cleanly. Whether these tests are successful or fail will be recorded. If a test fails, please inspect the correponding output on the CI server and take the necessary steps, if needed, so that the code can compile cleanly again. The test will be re-run each the pull request is updated with a push to the remote branch on GitHub. +Next a LAMMPS core developer will self-assign and do an overall technical assessment of the submission. If you are not yet registered as a LAMMPS collaborator, you will receive an invitation for that. +You may also receive comments and suggestions on the overall submission or specific details. If permitted, additional changes may be pushed into your pull request branch or a pull request may be filed in your LAMMPS fork on GitHub to include those changes. +The LAMMPS developer may then decide to assign the pull request to another developer (e.g. when that developer is more knowledgeable about the submitted feature or enhancement or has written the modified code). It may also happen, that additional developers are requested to provide a review and approve the changes. For submissions, that may change the general behavior of LAMMPS, or where a possibility of unwanted side effects exists, additional tests may be requested by the assigned developer. +If the assigned developer is satisfied and considers the submission ready for inclusion into LAMMPS, the pull request will be assigned to the LAMMPS lead developer, Steve Plimpton (@sjplimp), who will then have the final decision on whether the submission will be included, additional changes are required or it will be ultimately rejected. After the pull request is merged, you may delete the pull request branch in your personal LAMMPS fork. +Since the learning curve for git is quite steep for efficiently managing remote repositories, local and remote branches, pull requests and more, do not hesitate to ask questions, if you are not sure about how to do certain steps that are asked of you. Even if the changes asked of you do not make sense to you, they may be important for the LAMMPS developers. Please also note, that these all are guidelines and not set in stone. + diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 39e8411be5..53a17a1476 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -8,23 +8,24 @@ _Is this a 'Bug Report' or a 'Suggestion for an Enhancement'?_ ## Detailed Description (Enhancement Suggestion) -_Explain how you would like to see LAMMPS enhanced, what feature you are looking for, provide references to relevant background information, and whether you are willing to implement the enhancement yourself_ +_Explain how you would like to see LAMMPS enhanced, what feature(s) you are looking for, provide references to relevant background information, and whether you are willing to implement the enhancement yourself or would like to participate in the implementation_ ## LAMMPS Version (Bug Report) -_Please specify which LAMMPS version this issue applies to_ +_Please specify which LAMMPS version this issue was detected with. If this is not the latest development version, please stop and test that version, too, and report it here if the bug persists_ ## Expected Behavior (Bug Report) -_Describe the expected behavior. Quote from the LAMMPS manual where needed or explain why the expected behavior is meaningful_ +_Describe the expected behavior. Quote from the LAMMPS manual where needed or explain why the expected behavior is meaningful, especially when it differs from the manual_ ## Actual Behavior (Bug Report) -_Describe the actual behavior, how it differs from the expected behavior, and how this can be observed_ +_Describe the actual behavior, how it differs from the expected behavior, and how this can be observed. Try to be specific and do **not* use vague terms like "doesn't work" or "wrong result". Do not assume that the person reading this has any experience with or knowledge of your specific research._ ## Steps to Reproduce (Bug Report) -_Describe the steps required to quickly reproduce the issue. You can attach (small) files to the section below or add URLs where to download an archive with all necessary files. Please try to create as small and as fast to run inputs as possible. The less effort and time it takes to reproduce your issue, the more likely, that somebody will look into it._ +_Describe the steps required to quickly reproduce the issue. You can attach (small) files to the section below or add URLs where to download an archive with all necessary files. Please try to create input that are as small as possible and run as fast as possible. NOTE: the less effort and time it takes to reproduce your issue, the more likely, that somebody will look into it._ ## Further Information, Files, and Links + _Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications_ diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fb16f84d45..d1cb2d4809 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,19 +1,21 @@ ## Purpose -_Briefly describe the new feature(s) included in this pull request. -If this addresses an open GitHub Issue, mention the issue number, e.g. with `fixes #221`_ + +_Briefly describe the new feature(s), enhancement(s), or bugfix(es) included in this pull request. If this addresses an open GitHub Issue, mention the issue number, e.g. with `fixes #221` or `closes #135`, so that issue will be automatically closed when the pull request is merged_ ## Implementation Notes -_Provide any relevant details about how the feature is implemented, -how correctness was verified, how other features in LAMMPS are affected_ + +_Provide any relevant details about how the changes are implemented, how correctness was verified, how other features, if any, in LAMMPS are affected_ ## Post Submission Checklist -Please check the fields as they are completed -- [ ] The feature or features in the pull request is complete + +_Please check the fields below as they are completed_ +- [ ] The feature or features in this pull request is complete - [ ] Suitable new documentation files and/or updates to the existing docs are included - [ ] One or more example input decks are included - [ ] The source code follows the LAMMPS formatting guidelines ## Further Information, Files, and Links -_Put any additional information here, attach relevant text or image files and URLs to external sites_ + +_Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)_ -- GitLab From b9d213ee2bfb157dd94e1c0affae8bb33b0c79cf Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 27 Jun 2017 00:21:29 -0400 Subject: [PATCH 375/593] update formatting for contributing ToC --- .github/CONTRIBUTING.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 47aa7e804e..c7a690a00a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -13,14 +13,14 @@ Thus please also have a look at: [I don't want to read this whole thing, I just have a question!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question) [How Can I Contribute?](#how-can-i-contribute) - * [Discussing How To Use LAMMPS](#discussing-how-to-use-lammps) - * [Reporting Bugs](#reporting-bugs) - * [Suggesting Enhancements](#suggesting-enhancements) - * [Contributing Code](#contributing-code) +* [Discussing How To Use LAMMPS](#discussing-how-to-use-lammps) +* [Reporting Bugs](#reporting-bugs) +* [Suggesting Enhancements](#suggesting-enhancements) +* [Contributing Code](#contributing-code) [GitHub Workflows](#github-workflows) - * [Issues](#issues) - * [Pull Requests](#pull-requests) +* [Issues](#issues) +* [Pull Requests](#pull-requests) __ -- GitLab From 2f9c0a3b8efdd1e1ec09c7c5ccc4c25678a2e955 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 27 Jun 2017 00:23:10 -0400 Subject: [PATCH 376/593] more formatting issues addressed --- .github/CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c7a690a00a..c6197efe23 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -5,7 +5,9 @@ Thank your for considering to contribute to the LAMMPS software project. The following is a set of guidelines as well as explanations of policies and workflows for contributing to the LAMMPS molecular dynamics software project. These guidelines focus on submitting issues or pull requests on the LAMMPS GitHub project. Thus please also have a look at: + [The Section on submitting new features for inclusion in LAMMPS of the Manual](http://lammps.sandia.gov/doc/Section_modify.html#mod-15) + [The LAMMPS GitHub Tutorial in the Manual](http://lammps.sandia.gov/doc/tutorial_github.html) ## Table of Contents -- GitLab From d076040471ca4033c804160aacabe7cdf5097807 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 27 Jun 2017 00:24:04 -0400 Subject: [PATCH 377/593] use itemized list instead of paragraphs for links at the top --- .github/CONTRIBUTING.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c6197efe23..96940f2ba1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -5,10 +5,8 @@ Thank your for considering to contribute to the LAMMPS software project. The following is a set of guidelines as well as explanations of policies and workflows for contributing to the LAMMPS molecular dynamics software project. These guidelines focus on submitting issues or pull requests on the LAMMPS GitHub project. Thus please also have a look at: - -[The Section on submitting new features for inclusion in LAMMPS of the Manual](http://lammps.sandia.gov/doc/Section_modify.html#mod-15) - -[The LAMMPS GitHub Tutorial in the Manual](http://lammps.sandia.gov/doc/tutorial_github.html) +* [The Section on submitting new features for inclusion in LAMMPS of the Manual](http://lammps.sandia.gov/doc/Section_modify.html#mod-15) +* [The LAMMPS GitHub Tutorial in the Manual](http://lammps.sandia.gov/doc/tutorial_github.html) ## Table of Contents -- GitLab From 661e51b6079cabf4341429cbb08244c2828dbd15 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 27 Jun 2017 00:38:53 -0400 Subject: [PATCH 378/593] remove non-ascii characters and spell check --- .github/CONTRIBUTING.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 96940f2ba1..beba468ea0 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -38,16 +38,16 @@ to one of the [LAMMPS core developers](http://lammps.sandia.gov/authors.html). A The LAMMPS mailing list is hosted at SourceForge. The mailing list began in 2005, and now includes tens of thousands of messages in thousands of threads. LAMMPS developers try to respond to posted questions in a timely manner, but there are no guarantees. Please consider that people live in different timezone and may not have time to answer e-mails outside of their work hours. You can post to list by sending your email to lammps-users at lists.sourceforge.net (no subscription required), but before posting, please read the [mailing list guidelines](http://lammps.sandia.gov/guidelines.html) to maximize your chances to receive a helpful response. -Anyone can browse/search previous questions/answers in the archives. You do not have to subscribe to the list to post Qs, receive answers (to your Qs), or browse/search the archives. You **do** need to subscribe to the list if you want emails for **all** the posts (as individual messages or in digest form), or to answer questions yourself. Feel free to sign up and help us out! Answering questions from fellow LAMMPS users is a great way to pay back the community for providing you a useful tool for free, and to pass on the advice you have received yourself to others. It improves your karma and helps you understand your own research better. +Anyone can browse/search previous questions/answers in the archives. You do not have to subscribe to the list to post questions, receive answers (to your questions), or browse/search the archives. You **do** need to subscribe to the list if you want emails for **all** the posts (as individual messages or in digest form), or to answer questions yourself. Feel free to sign up and help us out! Answering questions from fellow LAMMPS users is a great way to pay back the community for providing you a useful tool for free, and to pass on the advice you have received yourself to others. It improves your karma and helps you understand your own research better. If you post a message and you are a subscriber, your message will appear immediately. If you are not a subscriber, your message will be moderated, which typically takes one business day. Either way, when someone replies the reply will usually be sent to both, your personal email address and the mailing list. When replying to people, that responded to your post to the list, please always included the mailing list in your replies (i.e. use "Reply All" and **not** "Reply"). Responses will appear on the list in a few minutes, but it can take a few hours for postings and replies to show up in the SourceForge archive. Sending replies also to the mailing list is important, so that responses are archived and people with a similar issue can search for possible solutions in the mailing list archive. ### Reporting Bugs -While developers writing code for LAMMPS are careful to test their code, LAMMPS is such a large and complex software, that it is impossible to test for all combinations of features under all normal and not so normal circumstances. Thus bugs do happen, and if you suspect, that you have encountered one, please try to document it and report it as an [Issue](https://github.com/lammps/lammps/issues) on the LAMMPS GitHub project webpage. However, before reporting a bug, you need to check whether this is something that may have already been corrected. The [Latest Features and Bug Fixes in LAMMPS](http://lammps.sandia.gov/bug.html) web page lists all significant changes to LAMMPS over the years. It also tells you what the current latest development version of LAMMPS is, and you should test whether your issue still applies to that version. +While developers writing code for LAMMPS are careful to test their code, LAMMPS is such a large and complex software, that it is impossible to test for all combinations of features under all normal and not so normal circumstances. Thus bugs do happen, and if you suspect, that you have encountered one, please try to document it and report it as an [Issue](https://github.com/lammps/lammps/issues) on the LAMMPS GitHub project web page. However, before reporting a bug, you need to check whether this is something that may have already been corrected. The [Latest Features and Bug Fixes in LAMMPS](http://lammps.sandia.gov/bug.html) web page lists all significant changes to LAMMPS over the years. It also tells you what the current latest development version of LAMMPS is, and you should test whether your issue still applies to that version. When you click on the green "New Issue" button, you will be provided with a text field, where you can enter your message. That text field with contain a template with several headlines and some descriptions. Keep the headlines that are relevant to your reported potential bug and replace the descriptions with the information as suggested by the descriptions. -You can also attach small text files (please add the filename extension `.txt` or it will be rejected), images, or small compressed text files (using gzip, do not use RAR or 7-ZIP or similar tools that are uncommon ourside of Windows machines). In many cases, bugs are best illustrated by providing a small input deck (do **not** attach your entire production input, but remove everything that is not required to reproduce the issue, and scale down your system size, that the resulting calculation runs fast and can be run on small desktop quickly). +You can also attach small text files (please add the file name extension `.txt` or it will be rejected), images, or small compressed text files (using gzip, do not use RAR or 7-ZIP or similar tools that are uncommon outside of Windows machines). In many cases, bugs are best illustrated by providing a small input deck (do **not** attach your entire production input, but remove everything that is not required to reproduce the issue, and scale down your system size, that the resulting calculation runs fast and can be run on small desktop quickly). To be able to submit an issue on GitHub, you have to register for an account (for GitHub in general). If you do not want to do that, or have other reservations against submitting an issue there, you can - as an alternative and in decreasing preference - either send an e-mail to the lammps-users mailing list, the original authors of the feature that you suspect to be affected, or one or more of the core LAMMPS developers. @@ -62,31 +62,31 @@ To be able to submit an issue on GitHub, you have to register for an account (fo We encourage users to submit new features or modifications for LAMMPS to the core developers so they can be added to the LAMMPS distribution. The preferred way to manage and coordinate this is by submitting a pull request at the LAMMPS project on GitHub. For any larger modifications or programming project, you are encouraged to contact the LAMMPS developers ahead of time, in order to discuss implementation strategies and coding guidelines, that will make it easier to integrate your contribution and result in less work for everybody involved. You are also encouraged to search through the list of open issues on GitHub and submit a new issue for a planned feature, so you would not duplicate the work of others (and possibly get scooped by them) or have your work duplicated by others. -How quickly your contribution will be integrated depends largely on how much effort it will cause to integrate and test it, how much it requires changes to the core codebase, and of how much interest it is to the larger LAMMPS community. Please see below for a checklist of typical requirements. Once you have prepared everything, see [this tutorial](http://lammps.sandia.gov/doc/tutorial_github.html) +How quickly your contribution will be integrated depends largely on how much effort it will cause to integrate and test it, how much it requires changes to the core code base, and of how much interest it is to the larger LAMMPS community. Please see below for a checklist of typical requirements. Once you have prepared everything, see [this tutorial](http://lammps.sandia.gov/doc/tutorial_github.html) for instructions on how to submit your changes or new files through a GitHub pull request -Here is a checklist of steps you need to follow to submit a single file or user package for our consideration. Following these steps will save both you and us time. See existing files in packages in the src dir for examples. If you are uncertain, please ask on the lammps-users mailing list. +Here is a checklist of steps you need to follow to submit a single file or user package for our consideration. Following these steps will save both you and us time. See existing files in packages in the source directory for examples. If you are uncertain, please ask on the lammps-users mailing list. * All source files you provide must compile with the most current version of LAMMPS with multiple configurations. In particular you need to test compiling LAMMPS from scratch with `-DLAMMPS_BIGBIG` set in addition to the default `-DLAMMPS_SMALLBIG` setting. Your code will need to work correctly in serial and in parallel using MPI. * For consistency with the rest of LAMMPS and especially, if you want your contribution(s) to be added to main LAMMPS code or one of its standard packages, it needs to be written in a style compatible with other LAMMPS source files. This means: 2-character indentation per level, no tabs, no lines over 80 characters. I/O is done via the C-style stdio library, class header files should not import any system headers outside , STL containers should be avoided in headers, and forward declarations used where possible or needed. All added code should be placed into the LAMMPS_NS namespace or a sub-namespace; global or static variables should be avoided, as they conflict with the modular nature of LAMMPS and the C++ class structure. Header files must not import namespaces with using. This all is so the developers can more easily understand, integrate, and maintain your contribution and reduce conflicts with other parts of LAMMPS. This basically means that the code accesses data structures, performs its operations, and is formatted similar to other LAMMPS source files, including the use of the error class for error and warning messages. -* If you want your contribution to be added as a user-contributed feature, and it’s a single file (actually a `.cpp` and `.h` file) it can be rapidly added to the USER-MISC directory. Include the one-line entry to add to the USER-MISC/README file in that dir, along with the 2 source files. You can do this multiple times if you wish to contribute several individual features. +* If you want your contribution to be added as a user-contributed feature, and it is a single file (actually a `.cpp` and `.h` file) it can be rapidly added to the USER-MISC directory. Include the one-line entry to add to the USER-MISC/README file in that directory, along with the 2 source files. You can do this multiple times if you wish to contribute several individual features. * If you want your contribution to be added as a user-contribution and it is several related features, it is probably best to make it a user package directory with a name like USER-FOO. In addition to your new files, the directory should contain a README text file. The README should contain your name and contact information and a brief description of what your new package does. If your files depend on other LAMMPS style files also being installed (e.g. because your file is a derived class from the other LAMMPS class), then an Install.sh file is also needed to check for those dependencies. See other README and Install.sh files in other USER directories as examples. Send us a tarball of this USER-FOO directory. * Your new source files need to have the LAMMPS copyright, GPL notice, and your name and email address at the top, like other user-contributed LAMMPS source files. They need to create a class that is inside the LAMMPS namespace. If the file is for one of the USER packages, including USER-MISC, then we are not as picky about the coding style (see above). I.e. the files do not need to be in the same stylistic format and syntax as other LAMMPS files, though that would be nice for developers as well as users who try to read your code. -* You **must** also create or extend a documentation file for each new command or style you are adding to LAMMPS. For simplicity and convenience, the documentation of groups of closely related commands or styles may be combined into a single file. This will be one file for a single-file feature. For a package, it might be several files. These are simple text files with a specific markup language, that are then auto-converted to HTML and PDF. The tools for this conversion are included in the source distribution, and the translation can be as simple as doing “make html pdf” in the doc folder. Thus the documentation source files must be in the same format and style as other `.txt` files in the lammps/doc/src directory for similar commands and styles; use one or more of them as a starting point. A description of the markup can also be found in `lammps/doc/utils/txt2html/README.html` As appropriate, the text files can include links to equations (see doc/Eqs/*.tex for examples, we auto-create the associated JPG files), or figures (see doc/JPG for examples), or even additional PDF files with further details (see doc/PDF for examples). The doc page should also include literature citations as appropriate; see the bottom of doc/fix_nh.txt for examples and the earlier part of the same file for how to format the cite itself. The "Restrictions" section of the doc page should indicate that your command is only available if LAMMPS is built with the appropriate USER-MISC or USER-FOO package. See other user package doc files for examples of how to do this. The prerequisite for building the HTML format files are Python 3.x and virtualenv, the requirement for generating the PDF format manual is the htmldoc software. Please run at least "make html" and carefully inspect and proofread the resulting HTML format doc page before submitting your code. +* You **must** also create or extend a documentation file for each new command or style you are adding to LAMMPS. For simplicity and convenience, the documentation of groups of closely related commands or styles may be combined into a single file. This will be one file for a single-file feature. For a package, it might be several files. These are simple text files with a specific markup language, that are then auto-converted to HTML and PDF. The tools for this conversion are included in the source distribution, and the translation can be as simple as doing "make html pdf" in the doc folder. Thus the documentation source files must be in the same format and style as other `.txt` files in the lammps/doc/src directory for similar commands and styles; use one or more of them as a starting point. A description of the markup can also be found in `lammps/doc/utils/txt2html/README.html` As appropriate, the text files can include links to equations (see doc/Eqs/*.tex for examples, we auto-create the associated JPG files), or figures (see doc/JPG for examples), or even additional PDF files with further details (see doc/PDF for examples). The doc page should also include literature citations as appropriate; see the bottom of doc/fix_nh.txt for examples and the earlier part of the same file for how to format the cite itself. The "Restrictions" section of the doc page should indicate that your command is only available if LAMMPS is built with the appropriate USER-MISC or USER-FOO package. See other user package doc files for examples of how to do this. The prerequisite for building the HTML format files are Python 3.x and virtualenv, the requirement for generating the PDF format manual is the htmldoc software. Please run at least "make html" and carefully inspect and proofread the resulting HTML format doc page before submitting your code. * For a new package (or even a single command) you should include one or more example scripts demonstrating its use. These should run in no more than a couple minutes, even on a single processor, and not require large data files as input. See directories under examples/USER for examples of input scripts other users provided for their packages. These example inputs are also required for validating memory accesses and testing for memory leaks with valgrind * If there is a paper of yours describing your feature (either the algorithm/science behind the feature itself, or its initial usage, or its implementation in LAMMPS), you can add the citation to the *.cpp source file. See src/USER-EFF/atom_vec_electron.cpp for an example. A LaTeX citation is stored in a variable at the top of the file and a single line of code that references the variable is added to the constructor of the class. Whenever a user invokes your feature from their input script, this will cause LAMMPS to output the citation to a log.cite file and prompt the user to examine the file. Note that you should only use this for a paper you or your group authored. E.g. adding a cite in the code for a paper by Nose and Hoover if you write a fix that implements their integrator is not the intended usage. That kind of citation should just be in the doc page you provide. Finally, as a general rule-of-thumb, the more clear and self-explanatory you make your documentation and README files, and the easier you make it for people to get started, e.g. by providing example scripts, the more likely it is that users will try out your new feature. -If the new features/files are broadly useful we may add them as core files to LAMMPS or as part of a standard package. Else we will add them as a user-contributed file or package. Examples of user packages are in src sub-directories that start with USER. The USER-MISC package is simply a collection of (mostly) unrelated single files, which is the simplest way to have your contribution quickly added to the LAMMPS distribution. You can see a list of the both standard and user packages by typing “make package” in the LAMMPS src directory. +If the new features/files are broadly useful we may add them as core files to LAMMPS or as part of a standard package. Else we will add them as a user-contributed file or package. Examples of user packages are in src sub-directories that start with USER. The USER-MISC package is simply a collection of (mostly) unrelated single files, which is the simplest way to have your contribution quickly added to the LAMMPS distribution. You can see a list of the both standard and user packages by typing "make package" in the LAMMPS src directory. Note that by providing us files to release, you are agreeing to make them open-source, i.e. we can release them under the terms of the GPL, used as a license for the rest of LAMMPS. See Section 1.4 for details. -With user packages and files, all we are really providing (aside from the fame and fortune that accompanies having your name in the source code and on the Authors page of the LAMMPS WWW site), is a means for you to distribute your work to the LAMMPS user community, and a mechanism for others to easily try out your new feature. This may help you find bugs or make contact with new collaborators. Note that you’re also implicitly agreeing to support your code which means answer questions, fix bugs, and maintain it if LAMMPS changes in some way that breaks it (an unusual event). +With user packages and files, all we are really providing (aside from the fame and fortune that accompanies having your name in the source code and on the Authors page of the LAMMPS WWW site), is a means for you to distribute your work to the LAMMPS user community, and a mechanism for others to easily try out your new feature. This may help you find bugs or make contact with new collaborators. Note that you are also implicitly agreeing to support your code which means answer questions, fix bugs, and maintain it if LAMMPS changes in some way that breaks it (an unusual event). To be able to submit an issue on GitHub, you have to register for an account (for GitHub in general). If you do not want to do that, or have other reservations or difficulties to submit a pull request, you can - as an alternative - contact one or more of the core LAMMPS developers and ask if one of them would be interested in manually merging your code into LAMMPS and send them your source code. Since the effort to merge a pull request is a small fraction of the effort of integrating source code manually (which would usually be done by converting the contribution into a pull request), your chances to have your new code included quickly are the best with a pull request. -If you prefer to submit patches or full files, you should first make certain, that your code works correctly with the latest patch-level version of LAMMPS and contains all bugfixes from it. Then create a gzipped tar file of all changed or added files or a corresponding patch file using ‘diff -u’ or ‘diff -c’ and compress it with gzip. Please only use gzip compression, as this works well on all platforms. +If you prefer to submit patches or full files, you should first make certain, that your code works correctly with the latest patch-level version of LAMMPS and contains all bug fixes from it. Then create a gzipped tar file of all changed or added files or a corresponding patch file using 'diff -u' or 'diff -c' and compress it with gzip. Please only use gzip compression, as this works well on all platforms. ## GitHub Workflows @@ -103,7 +103,7 @@ For bug reports, the next step is that one of the core LAMMPS developers will se ### Pull Requests For submitting pull requests, there is a [detailed tutorial](http://lammps.sandia.gov/doc/tutorial_github.html) in the LAMMPS manual. Thus only a brief breakdown of the steps is presented here. -Immediately after the submission, the LAMMPS continuing integration server at ci.lammps.org will download your submitted branch and perform a simple compilation test, i.e. will test whether your submitted code can be compiled under various conditions. It will also do a check on whether your included documentation translates cleanly. Whether these tests are successful or fail will be recorded. If a test fails, please inspect the correponding output on the CI server and take the necessary steps, if needed, so that the code can compile cleanly again. The test will be re-run each the pull request is updated with a push to the remote branch on GitHub. +Immediately after the submission, the LAMMPS continuing integration server at ci.lammps.org will download your submitted branch and perform a simple compilation test, i.e. will test whether your submitted code can be compiled under various conditions. It will also do a check on whether your included documentation translates cleanly. Whether these tests are successful or fail will be recorded. If a test fails, please inspect the corresponding output on the CI server and take the necessary steps, if needed, so that the code can compile cleanly again. The test will be re-run each the pull request is updated with a push to the remote branch on GitHub. Next a LAMMPS core developer will self-assign and do an overall technical assessment of the submission. If you are not yet registered as a LAMMPS collaborator, you will receive an invitation for that. You may also receive comments and suggestions on the overall submission or specific details. If permitted, additional changes may be pushed into your pull request branch or a pull request may be filed in your LAMMPS fork on GitHub to include those changes. The LAMMPS developer may then decide to assign the pull request to another developer (e.g. when that developer is more knowledgeable about the submitted feature or enhancement or has written the modified code). It may also happen, that additional developers are requested to provide a review and approve the changes. For submissions, that may change the general behavior of LAMMPS, or where a possibility of unwanted side effects exists, additional tests may be requested by the assigned developer. -- GitLab From 076990c28a6740d6b2a546b8942afc6d69b32a6f Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Tue, 27 Jun 2017 16:48:33 -0400 Subject: [PATCH 379/593] Updated Gaussian bump so that it has a better taper function. --- src/USER-MANIFOLD/manifold_gaussian_bump.cpp | 436 ++++++++++++++----- src/USER-MANIFOLD/manifold_gaussian_bump.h | 31 +- 2 files changed, 360 insertions(+), 107 deletions(-) diff --git a/src/USER-MANIFOLD/manifold_gaussian_bump.cpp b/src/USER-MANIFOLD/manifold_gaussian_bump.cpp index 200edd2fb0..e1a3deb5ab 100644 --- a/src/USER-MANIFOLD/manifold_gaussian_bump.cpp +++ b/src/USER-MANIFOLD/manifold_gaussian_bump.cpp @@ -1,138 +1,374 @@ #include "manifold_gaussian_bump.h" +#include "comm.h" +#include "error.h" + using namespace LAMMPS_NS; using namespace user_manifold; +// This manifold comes with some baggage; +// it needs a taper function that is sufficiently smooth +// so we use a cubic Hermite interpolation and then for +// efficiency we construct a lookup table for that.... + +class cubic_hermite +{ +public: + // Represent x-polynomial as a * t^3 + b * t^2 + c*t + d. + double a, b, c, d; + // And y-polynomial as s * t^3 + u * t^2 + v * t + w. + double s, u, v, w; + + double x0, x1, y0, y1, yp0, yp1; + + LAMMPS_NS::Error *err; + + cubic_hermite( double x0, double x1, double y0, double y1, + double yp0, double yp1, LAMMPS_NS::Error *err ) : + x0(x0), x1(x1), y0(y0), y1(y1), yp0(yp0), yp1(yp1), + a( 2*x0 + 2 - 2*x1 ), + b( -3*x0 - 3 + 3*x1 ), + c( 1.0 ), + d( x0 ), + s( 2*y0 - 2*y1 + yp0 + yp1 ), + u( -3*y0 + 3*y1 - 2*yp0 - yp1 ), + v( yp0 ), + w( y0 ), + err(err) + { + test(); + } + + + void test() + { + if( fabs( x(0) - x0 ) > 1e-8 ) err->one(FLERR, "x0 wrong"); + if( fabs( x(1) - x1 ) > 1e-8 ) err->one(FLERR, "x1 wrong"); + if( fabs( y(0) - y0 ) > 1e-8 ) err->one(FLERR, "y0 wrong"); + if( fabs( y(1) - y1 ) > 1e-8 ) err->one(FLERR, "y1 wrong"); + } + + double get_t_from_x( double xx ) const + { + if( xx < x0 || xx > x1 ){ + char msg[2048]; + sprintf(msg, "x ( %g ) out of bounds [%g, %g]", xx, x0, x1 ); + err->one(FLERR, msg); + } + + // Newton iterate to get right t. + double t = xx - x0; + double dx = x1 - x0; + // Reasonable initial guess I hope: + t /= dx; + + double tol = 1e-8; + int maxit = 500; + double ff = x(t) - xx; + double ffp = xp(t); + // double l = 1.0 / ( 1 + res*res ); + for( int i = 0; i < maxit; ++i ){ + t -= ff / ffp; + ff = x(t) - xx; + ffp = xp(t); + double res = ff; + if( std::fabs( res ) < tol ){ + return t; + } + } + err->warning(FLERR, "Convergence failed"); + return t; + } + + double x( double t ) const + { + double t2 = t*t; + double t3 = t2*t; + return a*t3 + b*t2 + c*t + d; + } + + double y_from_x( double x ) const + { + double t = get_t_from_x( x ); + return y(t); + } + + double yp_from_x( double x ) const + { + double t = get_t_from_x( x ); + return yp(t); + } + + double y( double t ) const + { + double t2 = t*t; + double t3 = t2*t; + return s*t3 + u*t2 + v*t + w; + } + + void xy( double t, double &xx, double &yy ) const + { + xx = x(t); + yy = y(t); + } + + double xp( double t ) const + { + double t2 = t*t; + return 3*a*t2 + 2*b*t + c; + } + + double yp( double t ) const + { + double t2 = t*t; + return 3*t2*s + 2*u*t + v; + } + + double xpp( double t ) const + { + return 6*a*t + 2*b; + } + +}; + +// Manifold itself: +manifold_gaussian_bump::manifold_gaussian_bump(class LAMMPS* lmp, + int narg, char **arg) + : manifold(lmp), lut_z(NULL), lut_zp(NULL) {} + + +manifold_gaussian_bump::~manifold_gaussian_bump() +{ + if( lut_z ) delete lut_z; + if( lut_zp ) delete lut_zp; +} + + // The constraint is z = f(r = sqrt( x^2 + y^2) ) // f(x) = A*exp( -x^2 / 2 l^2 ) if x < rc1 -// = a + b*x + c*x**2 + d*x**3 if rc1 <= x < rc2 +// = Some interpolation if rc1 <= rc2 // = 0 if x >= rc2 // double manifold_gaussian_bump::g( const double *x ) { - double xf[3]; - xf[0] = x[0]; - xf[1] = x[1]; - xf[2] = 0.0; - - double x2 = dot(xf,xf); - if( x2 < rc12 ){ - return x[2] - gaussian_bump_x2( x2 ); - }else if( x2 < rc22 ){ - double rr = sqrt(x2); - double xi = rr - rc1; - xi *= inv_dr; - double xi2 = x2 * inv_dr*inv_dr; - double xi3 = xi*xi2; - return x[2] - ( aa + bb*xi + cc*xi2 + dd*xi3 ); - - }else{ - return x[2]; - } + double xf[3]; + xf[0] = x[0]; + xf[1] = x[1]; + xf[2] = 0.0; + + double x2 = dot(xf,xf); + if( x2 < rc12 ){ + return x[2] - gaussian_bump_x2( x2 ); + }else if( x2 < rc22 ){ + double rr = sqrt( x2 ); + double z_taper_func = lut_get_z( rr ); + return x[2] - z_taper_func; + }else{ + return x[2]; + } } void manifold_gaussian_bump::n( const double *x, double *nn ) { - double xf[3]; - xf[0] = x[0]; - xf[1] = x[1]; - xf[2] = 0.0; - nn[2] = 1.0; - - double x2 = dot(xf,xf); - - if( x2 < rc12 ){ - double factor = gaussian_bump_x2(x2); - factor /= (ll*ll); - nn[0] = factor * x[0]; - nn[1] = factor * x[1]; - }else if( x2 < rc22 ){ - double rr = sqrt(x2); - double xi = rr - rc1; - xi *= inv_dr; - double xi2 = x2 * inv_dr*inv_dr; - double der = bb + 2*cc*xi + 3*dd*xi2; - - nn[0] = -der * x[0] / rr; - nn[1] = -der * x[1] / rr; - }else{ - nn[0] = nn[1] = 0.0; - } + double xf[3]; + xf[0] = x[0]; + xf[1] = x[1]; + xf[2] = 0.0; + nn[2] = 1.0; + + double x2 = dot(xf,xf); + + if( x2 < rc12 ){ + double factor = gaussian_bump_x2(x2); + factor /= (ll*ll); + nn[0] = factor * x[0]; + nn[1] = factor * x[1]; + }else if( x2 < rc22 ){ + double rr = sqrt( x2 ); + double zp_taper_func = lut_get_zp( rr ); + + double inv_r = 1.0 / rr; + double der_part = zp_taper_func * inv_r; + + nn[0] = der_part * x[0]; + nn[1] = der_part * x[1]; + + }else{ + nn[0] = nn[1] = 0.0; + } } double manifold_gaussian_bump::g_and_n( const double *x, double *nn ) { - double xf[3]; - xf[0] = x[0]; - xf[1] = x[1]; - xf[2] = 0.0; - nn[2] = 1.0; - - double x2 = dot(xf,xf); - if( x2 < rc12 ){ - double gb = gaussian_bump_x2(x2); - double factor = gb / (ll*ll); - nn[0] = factor * x[0]; - nn[1] = factor * x[1]; - - return x[2] - gb; - }else if( x2 < rc22 ){ - - double rr = sqrt(x2); - double xi = rr - rc1; - xi *= inv_dr; - double xi2 = x2 * inv_dr*inv_dr; - double xi3 = xi*xi2; - - double der = bb + 2*cc*xi + 3*dd*xi2; - - nn[0] = -der * x[0] / rr; - nn[1] = -der * x[1] / rr; - - - return x[2] - ( aa + bb*xi + cc*xi2 + dd*xi3 ); - - }else{ - nn[0] = nn[1] = 0.0; - return x[2]; - } - + double xf[3]; + xf[0] = x[0]; + xf[1] = x[1]; + xf[2] = 0.0; + nn[2] = 1.0; + + double x2 = dot(xf,xf); + if( x2 < rc12 ){ + double gb = gaussian_bump_x2(x2); + double factor = gb / (ll*ll); + nn[0] = factor * x[0]; + nn[1] = factor * x[1]; + + return x[2] - gb; + }else if( x2 < rc22 ){ + double z_taper_func, zp_taper_func; + double rr = sqrt( x2 ); + lut_get_z_and_zp( rr, z_taper_func, zp_taper_func ); + + double inv_r = 1.0 / rr; + double der_part = zp_taper_func * inv_r; + + nn[0] = der_part * x[0]; + nn[1] = der_part * x[1]; + + return x[2] - z_taper_func; + }else{ + nn[0] = nn[1] = 0.0; + return x[2]; + } + } void manifold_gaussian_bump::post_param_init() { - // Read in the params: - AA = params[0]; - ll = params[1]; - rc1 = params[2]; - rc2 = params[3]; + // Read in the params: + AA = params[0]; + ll = params[1]; + rc1 = params[2]; + rc2 = params[3]; + + ll2 = 2.0*ll*ll; + + rc12 = rc1*rc1; + rc22 = rc2*rc2; + dr = rc2 - rc1; + inv_dr = 1.0 / dr; + + f_at_rc = gaussian_bump_x2 ( rc12 ); + fp_at_rc = gaussian_bump_der( rc1 ); + + + + make_lut(); + + // test_lut(); +} + + +double manifold_gaussian_bump::gaussian_bump( double x ) const +{ + double x2 = x*x; + return gaussian_bump_x2( x2 ); +} + +double manifold_gaussian_bump::gaussian_bump_x2( double x2 ) const +{ + return AA*exp( -x2 / ll2 ); +} + +double manifold_gaussian_bump::gaussian_bump_der( double x ) const +{ + double x2 = x*x; + return gaussian_bump_x2( x2 )*( -x/(ll*ll) ); +} + + +void manifold_gaussian_bump::make_lut() +{ - ll2 = 2.0*ll*ll; + lut_x0 = rc1; + lut_x1 = rc2; + lut_Nbins = 1024; // Don't make it too big, it should fit in cache. + lut_z = new double[lut_Nbins+1]; + lut_zp = new double[lut_Nbins+1]; - f_at_rc = gaussian_bump_x2 ( rc12 ); - fp_at_rc = gaussian_bump_der( rc12 ); + lut_dx = (lut_x1 - lut_x0) / lut_Nbins; - rc12 = rc1*rc1; - rc22 = rc2*rc2; - dr = rc2 - rc1; - inv_dr = 1.0 / dr; + cubic_hermite pchip( lut_x0, lut_x1, f_at_rc, 0.0, fp_at_rc, 0.0, error ); + + double xx = lut_x0; + for( int i = 0; i <= lut_Nbins; ++i ){ + lut_z[i] = pchip.y_from_x( xx ); + lut_zp[i] = pchip.yp_from_x( xx ); + xx += lut_dx; + } } -double manifold_gaussian_bump::gaussian_bump( double x ) +double manifold_gaussian_bump::lut_get_z ( double rr ) const +{ + double xs = rr - lut_x0; + double xss = xs / lut_dx; + int bin = static_cast(xss); + double frac = xss - bin; + + double zleft = lut_z[bin]; + double zright = lut_z[bin+1]; + + return zleft * ( 1 - frac ) + frac * zright; +} + +double manifold_gaussian_bump::lut_get_zp( double rr ) const { - double x2 = x*x; - return gaussian_bump_x2( x2 ); + double xs = rr - lut_x0; + double xss = xs / lut_dx; + int bin = static_cast(xss); + double frac = xss - bin; + + double zleft = lut_zp[bin]; + double zright = lut_zp[bin+1]; + + return zleft * ( 1 - frac) + frac * zright; } -double manifold_gaussian_bump::gaussian_bump_x2( double x2 ) + +void manifold_gaussian_bump::lut_get_z_and_zp( double rr, double &zz, + double &zzp ) const { - return AA*exp( -x2 / ll2 ); + double xs = rr - lut_x0; + double xss = xs / lut_dx; + int bin = static_cast(xss); + double frac = xss - bin; + double fmin = 1 - frac; + + double zleft = lut_z[bin]; + double zright = lut_z[bin+1]; + double zpleft = lut_zp[bin]; + double zpright = lut_zp[bin+1]; + + zz = zleft * fmin + zright * frac; + zzp = zpleft * fmin + zpright * frac; } -double manifold_gaussian_bump::gaussian_bump_der( double x ) + +void manifold_gaussian_bump::test_lut() { - double x2 = x*x; - return gaussian_bump_x2( x2 )*( -x/(ll*ll) ); + double x[3], nn[3]; + if( comm->me != 0 ) return; + + FILE *fp = fopen( "test_lut_gaussian.dat", "w" ); + double dx = 0.1; + for( double xx = 0; xx < 20; xx += dx ){ + x[0] = xx; + x[1] = 0.0; + x[2] = 0.0; + double gg = g( x ); + n( x, nn ); + double taper_z; + if( xx <= rc1 ){ + taper_z = gaussian_bump(xx); + }else if( xx < rc2 ){ + taper_z = lut_get_z( xx ); + }else{ + taper_z = 0.0; + } + fprintf( fp, "%g %g %g %g %g\n", xx, gaussian_bump(xx), taper_z, + gg, nn[0], nn[1], nn[2] ); + } + fclose(fp); } diff --git a/src/USER-MANIFOLD/manifold_gaussian_bump.h b/src/USER-MANIFOLD/manifold_gaussian_bump.h index f31e2a4bf4..4fef84e3a5 100644 --- a/src/USER-MANIFOLD/manifold_gaussian_bump.h +++ b/src/USER-MANIFOLD/manifold_gaussian_bump.h @@ -1,4 +1,4 @@ -/* -*- c++ -*- ---------------------------------------------------------- +/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -50,8 +50,8 @@ namespace user_manifold { class manifold_gaussian_bump : public manifold { public: enum { NPARAMS = 4 }; - manifold_gaussian_bump(class LAMMPS*, int, char **) : manifold(lmp) {} - virtual ~manifold_gaussian_bump(){} + manifold_gaussian_bump(class LAMMPS*, int, char **); + virtual ~manifold_gaussian_bump(); virtual double g( const double * ); virtual void n( const double *, double * ); @@ -66,12 +66,29 @@ namespace user_manifold { virtual void post_param_init(); private: // Some private constants: - double aa, bb, cc, dd, AA, ll, ll2, f_at_rc, fp_at_rc; + double AA, ll, ll2, f_at_rc, fp_at_rc; double rc1, rc2, rc12, rc22, dr, inv_dr; - double gaussian_bump ( double ); - double gaussian_bump_x2 ( double ); - double gaussian_bump_der( double ); + // Stuff for the look-up table: + double lut_x0, lut_x1; + int lut_Nbins; + double lut_dx; + double *lut_z; + double *lut_zp; + + double gaussian_bump ( double ) const; + double gaussian_bump_x2 ( double ) const; + double gaussian_bump_der( double ) const; + + void make_lut(); + double lut_get_z ( double rr ) const; + double lut_get_zp( double rr ) const; + void lut_get_z_and_zp( double rr, double &zz, double &zzp ) const; + + void test_lut(); + + double taper( double ); + double taper_der( double ); }; } -- GitLab From d0470799ac8b491b6e88179cd03554f875698b76 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 28 Jun 2017 06:26:21 -0400 Subject: [PATCH 380/593] consistently check for all per-atom-type masses being set only when per-atom masses are not set rather than placing an if statement around every incidence of calling atom->check_mass() to ensure it is only called when per atom masses are not set, we place that check _inside_ Atom::check_mass(). This avoids unexpected error messages. --- src/atom.cpp | 3 ++- src/molecule.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/atom.cpp b/src/atom.cpp index df4db0a842..e46b1a7242 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -1514,12 +1514,13 @@ void Atom::set_mass(double *values) } /* ---------------------------------------------------------------------- - check that all masses have been set + check that all per-atom-type masses have been set ------------------------------------------------------------------------- */ void Atom::check_mass(const char *file, int line) { if (mass == NULL) return; + if (rmass_flag) return; for (int itype = 1; itype <= ntypes; itype++) if (mass_setflag[itype] == 0) error->all(file,line,"Not all per-type masses are set"); diff --git a/src/molecule.cpp b/src/molecule.cpp index 76b28e3d47..e0e9ec8aaf 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -219,7 +219,7 @@ void Molecule::compute_mass() if (massflag) return; massflag = 1; - if (!rmassflag) atom->check_mass(FLERR); + atom->check_mass(FLERR); masstotal = 0.0; for (int i = 0; i < natoms; i++) { @@ -243,7 +243,7 @@ void Molecule::compute_com() if (!comflag) { comflag = 1; - if (!rmassflag) atom->check_mass(FLERR); + atom->check_mass(FLERR); double onemass; com[0] = com[1] = com[2] = 0.0; @@ -308,7 +308,7 @@ void Molecule::compute_inertia() if (!inertiaflag) { inertiaflag = 1; - if (!rmassflag) atom->check_mass(FLERR); + atom->check_mass(FLERR); double onemass,dx,dy,dz; for (int i = 0; i < 6; i++) itensor[i] = 0.0; -- GitLab From 91bce7ccf95e2968a7f5e28e7bba2378dfea6e48 Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Wed, 28 Jun 2017 09:48:00 -0400 Subject: [PATCH 381/593] Replaced std::fabs with fabs. --- src/USER-MANIFOLD/manifold_gaussian_bump.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-MANIFOLD/manifold_gaussian_bump.cpp b/src/USER-MANIFOLD/manifold_gaussian_bump.cpp index e1a3deb5ab..db8c589afb 100644 --- a/src/USER-MANIFOLD/manifold_gaussian_bump.cpp +++ b/src/USER-MANIFOLD/manifold_gaussian_bump.cpp @@ -72,7 +72,7 @@ public: ff = x(t) - xx; ffp = xp(t); double res = ff; - if( std::fabs( res ) < tol ){ + if( fabs( res ) < tol ){ return t; } } -- GitLab From 0c2f7c74be34c4702ea4f9157e0ef04f3e03cdec Mon Sep 17 00:00:00 2001 From: Andrew Jewett Date: Wed, 28 Jun 2017 14:12:03 -0700 Subject: [PATCH 382/593] added feature to write_data.cpp to support "extra bonds" (angles,dihedrals,impropers,special). --- src/write_data.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/write_data.cpp b/src/write_data.cpp index d8b951dd8c..8f8aa69349 100644 --- a/src/write_data.cpp +++ b/src/write_data.cpp @@ -240,6 +240,26 @@ void WriteData::header() fprintf(fp,BIGINT_FORMAT " impropers\n",atom->nimpropers); fprintf(fp,"%d improper types\n",atom->nimpropertypes); } + if (atom->extra_bond_per_atom > 0) { + fprintf(fp,BIGINT_FORMAT " extra bond per atom\n", + atom->extra_bond_per_atom); + } + if (atom->extra_angle_per_atom > 0) { + fprintf(fp,BIGINT_FORMAT " extra angle per atom\n", + atom->extra_angle_per_atom); + } + if (atom->extra_dihedral_per_atom > 0) { + fprintf(fp,BIGINT_FORMAT " extra dihedral per atom\n", + atom->extra_dihedral_per_atom); + } + if (atom->extra_improper_per_atom > 0) { + fprintf(fp,BIGINT_FORMAT " extra improper per atom\n", + atom->extra_improper_per_atom); + } + if (force->special_extra > 0) { + fprintf(fp,BIGINT_FORMAT " extra special per atom\n", + force->special_extra); + } } for (int i = 0; i < modify->nfix; i++) -- GitLab From fa306354654255b118ce63109a82c00984d58224 Mon Sep 17 00:00:00 2001 From: Andrew Jewett Date: Wed, 28 Jun 2017 17:48:32 -0700 Subject: [PATCH 383/593] Revert "added feature to write_data.cpp to support "extra bonds" (angles,dihedrals,impropers,special)." This reverts commit 0c2f7c74be34c4702ea4f9157e0ef04f3e03cdec. --- src/write_data.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/write_data.cpp b/src/write_data.cpp index 8f8aa69349..d8b951dd8c 100644 --- a/src/write_data.cpp +++ b/src/write_data.cpp @@ -240,26 +240,6 @@ void WriteData::header() fprintf(fp,BIGINT_FORMAT " impropers\n",atom->nimpropers); fprintf(fp,"%d improper types\n",atom->nimpropertypes); } - if (atom->extra_bond_per_atom > 0) { - fprintf(fp,BIGINT_FORMAT " extra bond per atom\n", - atom->extra_bond_per_atom); - } - if (atom->extra_angle_per_atom > 0) { - fprintf(fp,BIGINT_FORMAT " extra angle per atom\n", - atom->extra_angle_per_atom); - } - if (atom->extra_dihedral_per_atom > 0) { - fprintf(fp,BIGINT_FORMAT " extra dihedral per atom\n", - atom->extra_dihedral_per_atom); - } - if (atom->extra_improper_per_atom > 0) { - fprintf(fp,BIGINT_FORMAT " extra improper per atom\n", - atom->extra_improper_per_atom); - } - if (force->special_extra > 0) { - fprintf(fp,BIGINT_FORMAT " extra special per atom\n", - force->special_extra); - } } for (int i = 0; i < modify->nfix; i++) -- GitLab From 38075455b674d4d3d240d8a11db255f777bcb9e5 Mon Sep 17 00:00:00 2001 From: Andrew Jewett Date: Wed, 28 Jun 2017 17:55:30 -0700 Subject: [PATCH 384/593] new keywords for read_data: extra/X/per/atoms + changes to docs --- doc/src/Section_errors.txt | 45 +++++++++++++++++++++----------------- doc/src/read_data.txt | 5 +++++ src/read_data.cpp | 42 +++++++++++++++++++++++++++++++++-- 3 files changed, 70 insertions(+), 22 deletions(-) diff --git a/doc/src/Section_errors.txt b/doc/src/Section_errors.txt index 23942a75e5..4fe6766d12 100644 --- a/doc/src/Section_errors.txt +++ b/doc/src/Section_errors.txt @@ -4696,9 +4696,9 @@ Self-explanatory. :dd {Fix bond/create induced too many angles/dihedrals/impropers per atom} :dt -See the read_data command for info on setting the "extra angle per -atom", etc header values to allow for additional angles, etc to be -formed. :dd +See the read_data command for info on using the "extra/angle/per/atom", +(or dihedral, improper) keywords to allow for additional +angles, dihedrals, and impropers to be formed. :dd {Fix bond/create needs ghost atoms from further away} :dt @@ -7876,18 +7876,20 @@ See the setting for tagint in the src/lmptype.h file. :dd {New bond exceeded bonds per atom in create_bonds} :dt -See the read_data command for info on setting the "extra bond per -atom" header value to allow for additional bonds to be formed. :dd +See the read_data command for info on using the "extra/bond/per/atom" +keyword to allow for additional bonds to be formed {New bond exceeded bonds per atom in fix bond/create} :dt -See the read_data command for info on setting the "extra bond per -atom" header value to allow for additional bonds to be formed. :dd +See the read_data command for info on using the "extra/bond/per/atom" +keyword to allow for additional bonds to be formed :dd {New bond exceeded special list size in fix bond/create} :dt -See the special_bonds extra command for info on how to leave space in -the special bonds list to allow for additional bonds to be formed. :dd +See the "special_bonds extra" command +(or the "read_data extra/special/per/atom" command) +for info on how to leave space in the special bonds +list to allow for additional bonds to be formed. :dd {Newton bond change after simulation box is defined} :dt @@ -9664,9 +9666,10 @@ you are running. :dd {Special list size exceeded in fix bond/create} :dt -See the read_data command for info on setting the "extra special per -atom" header value to allow for additional special values to be -stored. :dd +See the special_bonds extra command +(or the read_data extra/special/per/atom command) +for info on how to leave space in the special bonds +list to allow for additional bonds to be formed. :dd {Specified processors != physical processors} :dt @@ -9683,23 +9686,25 @@ Self-explanatory. :dd {Subsequent read data induced too many angles per atom} :dt -See the create_box extra/angle/per/atom or read_data "extra angle per -atom" header value to set this limit larger. :dd +See the read_data or create_box commands for info on using the +"extra/angle/per/atom" keyword to allow for additional angles to be formed :dd {Subsequent read data induced too many bonds per atom} :dt -See the create_box extra/bond/per/atom or read_data "extra bond per -atom" header value to set this limit larger. :dd +See the read_data or create_box commands for info on using the +"extra/bond/per/atom" keyword to allow for additional bonds to be formed :dd {Subsequent read data induced too many dihedrals per atom} :dt -See the create_box extra/dihedral/per/atom or read_data "extra -dihedral per atom" header value to set this limit larger. :dd +See the read_data or create_box commands for info on using the +"extra/dihedral/per/atom" keyword to allow for additional +dihedrals to be formed :dd {Subsequent read data induced too many impropers per atom} :dt -See the create_box extra/improper/per/atom or read_data "extra -improper per atom" header value to set this limit larger. :dd +See the read_data or create_box commands for info on using the +"extra/improper/per/atom" keyword to allow for additional +impropers to be formed :dd {Substitution for illegal variable} :dt diff --git a/doc/src/read_data.txt b/doc/src/read_data.txt index b9924989a6..732578b9f4 100644 --- a/doc/src/read_data.txt +++ b/doc/src/read_data.txt @@ -32,6 +32,11 @@ keyword = {add} or {offset} or {shift} or {extra/atom/types} or {extra/bond/type {extra/angle/types} arg = # of extra angle types {extra/dihedral/types} arg = # of extra dihedral types {extra/improper/types} arg = # of extra improper types + {extra/bond/per/atom} arg = leave space for this many new bonds per atom + {extra/angle/per/atom} arg = leave space for this many new angles per atom + {extra/dihedral/per/atom} arg = leave space for this many new dihedrals per atom + {extra/improper/per/atom} arg = leave space for this many new impropers per atom + {extra/special/per/atom} arg = leave space for extra 1-2,1-3,1-4 interactions per atom {group} args = groupID groupID = add atoms in data file to this group {nocoeff} = ignore force field parameters diff --git a/src/read_data.cpp b/src/read_data.cpp index d6a33d6e9d..e44c6b7417 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -211,13 +211,51 @@ void ReadData::command(int narg, char **arg) if (extra_improper_types < 0) error->all(FLERR,"Illegal read_data command"); iarg += 2; - + } else if (strcmp(arg[iarg],"extra/bond/per/atom") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command"); + if (! atom->molecular) + error->all(FLERR,"No bonds allowed with this atom style"); + atom->extra_bond_per_atom = force->inumeric(FLERR,arg[iarg+1]); + if (atom->extra_bond_per_atom < 0) + error->all(FLERR,"Illegal read_data command"); + iarg += 2; + } else if (strcmp(arg[iarg],"extra/angle/per/atom") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command"); + if (! atom->molecular) + error->all(FLERR,"No angles allowed with this atom style"); + atom->extra_angle_per_atom = force->inumeric(FLERR,arg[iarg+1]); + if (atom->extra_angle_per_atom < 0) + error->all(FLERR,"Illegal read_data command"); + iarg += 2; + } else if (strcmp(arg[iarg],"extra/dihedral/per/atom") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command"); + if (! atom->molecular) + error->all(FLERR,"No dihedrals allowed with this atom style"); + atom->extra_dihedral_per_atom = force->inumeric(FLERR,arg[iarg+1]); + if (atom->extra_dihedral_per_atom < 0) + error->all(FLERR,"Illegal read_data command"); + iarg += 2; + } else if (strcmp(arg[iarg],"extra/improper/per/atom") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command"); + if (! atom->molecular) + error->all(FLERR,"No impropers allowed with this atom style"); + atom->extra_improper_per_atom = force->inumeric(FLERR,arg[iarg+1]); + if (atom->extra_improper_per_atom < 0) + error->all(FLERR,"Illegal read_data command"); + iarg += 2; + } else if (strcmp(arg[iarg],"extra/special/per/atom") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command"); + if (! atom->molecular) + error->all(FLERR,"No bonded interactions allowed with this atom style"); + force->special_extra = force->inumeric(FLERR,arg[iarg+1]); + if (force->special_extra < 0) + error->all(FLERR,"Illegal read_data command"); + iarg += 2; } else if (strcmp(arg[iarg],"group") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command"); int igroup = group->find_or_create(arg[iarg+1]); groupbit = group->bitmask[igroup]; iarg += 2; - } else if (strcmp(arg[iarg],"fix") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal read_data command"); -- GitLab From aa3f4b76905bb014516b960bd2b68161d57ce2a9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 29 Jun 2017 16:09:23 -0400 Subject: [PATCH 385/593] change the handling of reading "extra XXX per atom", so that the final choice is the larger of the value in the file and the keyword --- src/read_data.cpp | 20 +++++++++++++++----- src/read_data.h | 16 ++++++++-------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/read_data.cpp b/src/read_data.cpp index e44c6b7417..b1a42608c0 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -968,6 +968,7 @@ void ReadData::header(int firstpass) // search line for header keyword and set corresponding variable // customize for new header lines // check for triangles before angles so "triangles" not matched as "angles" + int extra_flag_value = 0; if (strstr(line,"atoms")) { sscanf(line,BIGINT_FORMAT,&natoms); @@ -1029,17 +1030,26 @@ void ReadData::header(int firstpass) atom->nimpropertypes = nimpropertypes + extra_improper_types; // these settings only used by first data file + // also, these are obsolescent. we parse them to maintain backward + // compatibility, but the recommended way is to set them via keywords + // in the LAMMPS input file. In case these flags are set in both, + // the input and the data file, we use the larger of the two. } else if (strstr(line,"extra bond per atom")) { - if (addflag == NONE) sscanf(line,"%d",&atom->extra_bond_per_atom); + if (addflag == NONE) sscanf(line,"%d",&extra_flag_value); + atom->extra_bond_per_atom = MAX(atom->extra_bond_per_atom,extra_flag_value); } else if (strstr(line,"extra angle per atom")) { - if (addflag == NONE) sscanf(line,"%d",&atom->extra_angle_per_atom); + if (addflag == NONE) sscanf(line,"%d",&extra_flag_value); + atom->extra_angle_per_atom = MAX(atom->extra_angle_per_atom,extra_flag_value); } else if (strstr(line,"extra dihedral per atom")) { - if (addflag == NONE) sscanf(line,"%d",&atom->extra_dihedral_per_atom); + if (addflag == NONE) sscanf(line,"%d",&extra_flag_value); + atom->extra_dihedral_per_atom = MAX(atom->extra_dihedral_per_atom,extra_flag_value); } else if (strstr(line,"extra improper per atom")) { - if (addflag == NONE) sscanf(line,"%d",&atom->extra_improper_per_atom); + if (addflag == NONE) sscanf(line,"%d",&extra_flag_value); + atom->extra_improper_per_atom = MAX(atom->extra_improper_per_atom,extra_flag_value); } else if (strstr(line,"extra special per atom")) { - if (addflag == NONE) sscanf(line,"%d",&force->special_extra); + if (addflag == NONE) sscanf(line,"%d",&extra_flag_value); + force->special_extra = MAX(force->special_extra,extra_flag_value); // local copy of box info // so can treat differently for first vs subsequent data files diff --git a/src/read_data.h b/src/read_data.h index 5463c86f08..5f83b78c61 100644 --- a/src/read_data.h +++ b/src/read_data.h @@ -472,8 +472,8 @@ outside a non-periodic simulation box. E: Subsequent read data induced too many bonds per atom -See the create_box extra/bond/per/atom or read_data "extra bond per -atom" header value to set this limit larger. +See the create_box extra/bond/per/atom or the read_data +extra/bond/per/atom keyword to set this limit larger. E: Bonds assigned incorrectly @@ -482,8 +482,8 @@ This means there is something invalid about the topology definitions. E: Subsequent read data induced too many angles per atom -See the create_box extra/angle/per/atom or read_data "extra angle per -atom" header value to set this limit larger. +See the create_box extra/angle/per/atom or the read_data +extra/angle/per/atom keyword to set this limit larger. E: Angles assigned incorrectly @@ -493,8 +493,8 @@ definitions. E: Subsequent read data induced too many dihedrals per atom -See the create_box extra/dihedral/per/atom or read_data "extra -dihedral per atom" header value to set this limit larger. +See the create_box extra/dihedral/per/atom or the read_data +extra/dihedral/per/atom keyword to set this limit larger. E: Dihedrals assigned incorrectly @@ -504,8 +504,8 @@ definitions. E: Subsequent read data induced too many impropers per atom -See the create_box extra/improper/per/atom or read_data "extra -improper per atom" header value to set this limit larger. +See the create_box extra/improper/per/atom or the read_data +extra/improper/per/atom keyword to set this limit larger. E: Impropers assigned incorrectly -- GitLab From d5921e9fb9e8d231edefcab5b5cdbc9f413c47c7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 29 Jun 2017 16:30:49 -0400 Subject: [PATCH 386/593] consolidate and update error message and read_data documentation for the updated read_data command --- doc/src/Section_errors.txt | 18 ++++++++---------- doc/src/read_data.txt | 39 ++++++++++++++++++++++---------------- src/read_data.h | 16 ++++++++-------- 3 files changed, 39 insertions(+), 34 deletions(-) diff --git a/doc/src/Section_errors.txt b/doc/src/Section_errors.txt index 4fe6766d12..40e61a248e 100644 --- a/doc/src/Section_errors.txt +++ b/doc/src/Section_errors.txt @@ -9686,25 +9686,23 @@ Self-explanatory. :dd {Subsequent read data induced too many angles per atom} :dt -See the read_data or create_box commands for info on using the -"extra/angle/per/atom" keyword to allow for additional angles to be formed :dd +See the extra/angle/per/atom keyword for the create_box +or the read_data command to set this limit larger :dd {Subsequent read data induced too many bonds per atom} :dt -See the read_data or create_box commands for info on using the -"extra/bond/per/atom" keyword to allow for additional bonds to be formed :dd +See the extra/bond/per/atom keyword for the create_box +or the read_data command to set this limit larger :dd {Subsequent read data induced too many dihedrals per atom} :dt -See the read_data or create_box commands for info on using the -"extra/dihedral/per/atom" keyword to allow for additional -dihedrals to be formed :dd +See the extra/dihedral/per/atom keyword for the create_box +or the read_data command to set this limit larger :dd {Subsequent read data induced too many impropers per atom} :dt -See the read_data or create_box commands for info on using the -"extra/improper/per/atom" keyword to allow for additional -impropers to be formed :dd +See the extra/improper/per/atom keyword for the create_box +or the read_data command to set this limit larger :dd {Substitution for illegal variable} :dt diff --git a/doc/src/read_data.txt b/doc/src/read_data.txt index 732578b9f4..bd602eee5a 100644 --- a/doc/src/read_data.txt +++ b/doc/src/read_data.txt @@ -269,11 +269,11 @@ is different than the default. {angle types} = # of angle types in system {dihedral types} = # of dihedral types in system {improper types} = # of improper types in system -{extra bond per atom} = leave space for this many new bonds per atom -{extra angle per atom} = leave space for this many new angles per atom -{extra dihedral per atom} = leave space for this many new dihedrals per atom -{extra improper per atom} = leave space for this many new impropers per atom -{extra special per atom} = leave space for this many new special bonds per atom +{extra bond per atom} = leave space for this many new bonds per atom (deprecated, use extra/bond/per/atom keyword) +{extra angle per atom} = leave space for this many new angles per atom (deprecated, use extra/angle/per/atom keyword) +{extra dihedral per atom} = leave space for this many new dihedrals per atom (deprecated, use extra/dihedral/per/atom keyword) +{extra improper per atom} = leave space for this many new impropers per atom (deprecated, use extra/improper/per/atom keyword) +{extra special per atom} = leave space for this many new special bonds per atom (deprecated, use extra/special/per/atom keyword) {ellipsoids} = # of ellipsoids in system {lines} = # of line segments in system {triangles} = # of triangles in system @@ -372,25 +372,32 @@ read_data command will generate an error in this case. The "extra bond per atom" setting (angle, dihedral, improper) is only needed if new bonds (angles, dihedrals, impropers) will be added to the system when a simulation runs, e.g. by using the "fix -bond/create"_fix_bond_create.html command. This will pre-allocate -space in LAMMPS data structures for storing the new bonds (angles, +bond/create"_fix_bond_create.html command. Using this header flag +is deprecated; please use the {extra/bond/per/atom} keyword (and +correspondingly for angles, dihedrals and impropers) in the +read_data command instead. Either will pre-allocate space in LAMMPS + data structures for storing the new bonds (angles, dihedrals, impropers). The "extra special per atom" setting is typically only needed if new bonds/angles/etc will be added to the system, e.g. by using the "fix bond/create"_fix_bond_create.html command. Or if entire new molecules -will be added to the system, e.g. by using the "fix -deposit"_fix_deposit.html or "fix pour"_fix_pour.html commands, which -will have more special 1-2,1-3,1-4 neighbors than any other molecules -defined in the data file. Using this setting will pre-allocate space -in the LAMMPS data structures for storing these neighbors. See the +will be added to the system, e.g. by using the +"fix deposit"_fix_deposit.html or "fix pour"_fix_pour.html commands, +which will have more special 1-2,1-3,1-4 neighbors than any other +molecules defined in the data file. Using this header flag is +deprecated; please use the {extra/special/per/atom} keyword instead. +Using this setting will pre-allocate space in the LAMMPS data +structures for storing these neighbors. See the "special_bonds"_special_bonds.html and "molecule"_molecule.html doc pages for more discussion of 1-2,1-3,1-4 neighbors. -NOTE: All of the "extra" settings are only used if they appear in the -first data file read; see the description of the {add} keyword above -for reading multiple data files. If they appear in later data files, -they are ignored. +NOTE: All of the "extra" settings are only applied in the first data +file read and when no simulation box has yet been created; as soon as +the simulation box is created (and read_data implies that), these +settings are {locked} and cannot be changed anymore. Please see the +description of the {add} keyword above for reading multiple data files. +If they appear in later data files, they are ignored. The "ellipsoids" and "lines" and "triangles" and "bodies" settings are only used with "atom_style ellipsoid or line or tri or diff --git a/src/read_data.h b/src/read_data.h index 5f83b78c61..730229c722 100644 --- a/src/read_data.h +++ b/src/read_data.h @@ -472,8 +472,8 @@ outside a non-periodic simulation box. E: Subsequent read data induced too many bonds per atom -See the create_box extra/bond/per/atom or the read_data -extra/bond/per/atom keyword to set this limit larger. +See the extra/bond/per/atom keyword for the create_box +or the read_data command to set this limit larger. E: Bonds assigned incorrectly @@ -482,8 +482,8 @@ This means there is something invalid about the topology definitions. E: Subsequent read data induced too many angles per atom -See the create_box extra/angle/per/atom or the read_data -extra/angle/per/atom keyword to set this limit larger. +See the extra/angle/per/atom keyword for the create_box +or the read_data command to set this limit larger. E: Angles assigned incorrectly @@ -493,8 +493,8 @@ definitions. E: Subsequent read data induced too many dihedrals per atom -See the create_box extra/dihedral/per/atom or the read_data -extra/dihedral/per/atom keyword to set this limit larger. +See the extra/dihedral/per/atom keyword for the create_box +or the read_data command to set this limit larger. E: Dihedrals assigned incorrectly @@ -504,8 +504,8 @@ definitions. E: Subsequent read data induced too many impropers per atom -See the create_box extra/improper/per/atom or the read_data -extra/improper/per/atom keyword to set this limit larger. +See the extra/improper/per/atom keyword for the create_box +or the read_data command to set this limit larger. E: Impropers assigned incorrectly -- GitLab From e0939ac795779600cfa28ed80f814911e1e64679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=BCtter?= Date: Fri, 30 Jun 2017 12:26:12 +0200 Subject: [PATCH 387/593] Re-Run clang-format --- src/USER-MEAMC/meam.h | 112 ++++++----- src/USER-MEAMC/meam_dens_final.cpp | 37 ++-- src/USER-MEAMC/meam_dens_init.cpp | 84 ++++----- src/USER-MEAMC/meam_force.cpp | 179 +++++++----------- src/USER-MEAMC/meam_impl.cpp | 5 +- src/USER-MEAMC/meam_setup_done.cpp | 265 +++++++++------------------ src/USER-MEAMC/meam_setup_global.cpp | 9 +- 7 files changed, 261 insertions(+), 430 deletions(-) diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 8d754bffa1..3baace180b 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -1,8 +1,8 @@ #ifndef LMP_MEAM_H #define LMP_MEAM_H -#include #include "memory.h" +#include #define maxelt 5 @@ -10,12 +10,14 @@ namespace LAMMPS_NS { typedef enum { FCC, BCC, HCP, DIM, DIA, B1, C11, L12, B2 } lattice_t; -class MEAM { - public: - MEAM(Memory *mem); +class MEAM +{ +public: + MEAM(Memory* mem); ~MEAM(); - private: - Memory *memory; + +private: + Memory* memory; // cutforce = force cutoff // cutforcesq = force cutoff squared @@ -64,8 +66,7 @@ class MEAM { double Ec_meam[maxelt][maxelt], re_meam[maxelt][maxelt]; double Omega_meam[maxelt], Z_meam[maxelt]; - double A_meam[maxelt], alpha_meam[maxelt][maxelt], - rho0_meam[maxelt]; + double A_meam[maxelt], alpha_meam[maxelt][maxelt], rho0_meam[maxelt]; double delta_meam[maxelt][maxelt]; double beta0_meam[maxelt], beta1_meam[maxelt]; double beta2_meam[maxelt], beta3_meam[maxelt]; @@ -79,13 +80,11 @@ class MEAM { int eltind[maxelt][maxelt]; int neltypes; - double **phir; + double** phir; - double **phirar, **phirar1, **phirar2, **phirar3, **phirar4, **phirar5, - **phirar6; + double **phirar, **phirar1, **phirar2, **phirar3, **phirar4, **phirar5, **phirar6; - double attrac_meam[maxelt][maxelt], - repuls_meam[maxelt][maxelt]; + double attrac_meam[maxelt][maxelt], repuls_meam[maxelt][maxelt]; double Cmin_meam[maxelt][maxelt][maxelt]; double Cmax_meam[maxelt][maxelt][maxelt]; @@ -101,26 +100,25 @@ class MEAM { public: int nmax; - double *rho,*rho0,*rho1,*rho2,*rho3,*frhop; - double *gamma,*dgamma1,*dgamma2,*dgamma3,*arho2b; - double **arho1,**arho2,**arho3,**arho3b,**t_ave,**tsq_ave; + double *rho, *rho0, *rho1, *rho2, *rho3, *frhop; + double *gamma, *dgamma1, *dgamma2, *dgamma3, *arho2b; + double **arho1, **arho2, **arho3, **arho3b, **t_ave, **tsq_ave; int maxneigh; - double *scrfcn,*dscrfcn,*fcpair; - protected: + double *scrfcn, *dscrfcn, *fcpair; + +protected: void meam_checkindex(int, int, int, int*, int*); void G_gam(double, int, double*, int*); void dG_gam(double, int, double*, double*); - void getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, - double** x, int numneigh, int* firstneigh, int numneigh_full, - int* firstneigh_full, int ntype, int* type, int* fmap); - void screen(int i, int j, double** x, double rijsq, double* sij, - int numneigh_full, int* firstneigh_full, int ntype, int* type, int* fmap); - void calc_rho1(int i, int ntype, int* type, int* fmap, double** x, - int numneigh, int* firstneigh, double* scrfcn, double* fcpair); - void dsij(int i, int j, int k, int jn, int numneigh, double rij2, - double* dsij1, double* dsij2, int ntype, int* type, int* fmap, double** x, - double* scrfcn, double* fcpair); + void getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** x, int numneigh, + int* firstneigh, int numneigh_full, int* firstneigh_full, int ntype, int* type, int* fmap); + void screen(int i, int j, double** x, double rijsq, double* sij, int numneigh_full, int* firstneigh_full, + int ntype, int* type, int* fmap); + void calc_rho1(int i, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, + double* scrfcn, double* fcpair); + void dsij(int i, int j, int k, int jn, int numneigh, double rij2, double* dsij1, double* dsij2, int ntype, + int* type, int* fmap, double** x, double* scrfcn, double* fcpair); void fcut(double, double*); void dfcut(double, double*, double*); void dCfunc(double, double, double, double*); @@ -131,7 +129,8 @@ public: double phi_meam(double, int, int); void compute_reference_density(); void get_shpfcn(double*, lattice_t); - void get_tavref(double*, double*, double*, double*, double*, double*, double, double, double, double, double, double, double, int, int, lattice_t); + void get_tavref(double*, double*, double*, double*, double*, double*, double, double, double, double, + double, double, double, int, int, lattice_t); void get_Zij(int*, lattice_t); void get_Zij2(int*, double*, double*, lattice_t, double, double); void get_sijk(double, int, int, int, double*); @@ -140,46 +139,41 @@ public: double erose(double, double, double, double, double, double, int); void interpolate_meam(int); double compute_phi(double, int, int); - public: - void meam_setup_global(int nelt, lattice_t* lat, double* z, int* ielement, double* atwt, - double* alpha, double* b0, double* b1, double* b2, - double* b3, double* alat, double* esub, double* asub, - double* t0, double* t1, double* t2, double* t3, - double* rozero, int* ibar); + +public: + void meam_setup_global(int nelt, lattice_t* lat, double* z, int* ielement, double* atwt, double* alpha, + double* b0, double* b1, double* b2, double* b3, double* alat, double* esub, + double* asub, double* t0, double* t1, double* t2, double* t3, double* rozero, + int* ibar); void meam_setup_param(int which, double value, int nindex, int* index /*index(3)*/, int* errorflag); void meam_setup_done(double* cutmax); void meam_dens_setup(int atom_nmax, int nall, int n_neigh); - void meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, - int numneigh, int* firstneigh, int numneigh_full, - int* firstneigh_full, int fnoffset, int* errorflag); - void meam_dens_final(int nlocal, int eflag_either, int eflag_global, - int eflag_atom, double* eng_vdwl, double* eatom, int ntype, - int* type, int* fmap, int* errorflag); - void meam_force(int i, int eflag_either, int eflag_global, - int eflag_atom, int vflag_atom, double* eng_vdwl, double* eatom, - int ntype, int* type, int* fmap, double** x, int numneigh, - int* firstneigh, int numneigh_full, int* firstneigh_full, - int fnoffset, double** f, double** vatom, - int* errorflag); + void meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, + int numneigh_full, int* firstneigh_full, int fnoffset, int* errorflag); + void meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_atom, double* eng_vdwl, + double* eatom, int ntype, int* type, int* fmap, int* errorflag); + void meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int vflag_atom, double* eng_vdwl, + double* eatom, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, + int numneigh_full, int* firstneigh_full, int fnoffset, double** f, double** vatom, + int* errorflag); }; // Functions we need for compat #define iszero(f) (fabs(f) < 1e-20) -#define setall2d(arr, v) \ - { \ - for (int __i = 0; __i < maxelt; __i++) \ - for (int __j = 0; __j < maxelt; __j++) \ - arr[__i][__j] = v; \ +#define setall2d(arr, v) \ + { \ + for (int __i = 0; __i < maxelt; __i++) \ + for (int __j = 0; __j < maxelt; __j++) \ + arr[__i][__j] = v; \ } -#define setall3d(arr, v) \ - { \ - for (int __i = 0; __i < maxelt; __i++) \ - for (int __j = 0; __j < maxelt; __j++) \ - for (int __k = 0; __k < maxelt; __k++) \ - arr[__i][__j][__k] = v; \ +#define setall3d(arr, v) \ + { \ + for (int __i = 0; __i < maxelt; __i++) \ + for (int __j = 0; __j < maxelt; __j++) \ + for (int __k = 0; __k < maxelt; __k++) \ + arr[__i][__j][__k] = v; \ } - }; #endif diff --git a/src/USER-MEAMC/meam_dens_final.cpp b/src/USER-MEAMC/meam_dens_final.cpp index ab07af9f0e..d50c1be386 100644 --- a/src/USER-MEAMC/meam_dens_final.cpp +++ b/src/USER-MEAMC/meam_dens_final.cpp @@ -1,6 +1,6 @@ #include "meam.h" -#include #include "math_special.h" +#include using namespace LAMMPS_NS; // Extern "C" declaration has the form: @@ -21,9 +21,8 @@ using namespace LAMMPS_NS; // void -MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, - int eflag_atom, double* eng_vdwl, double* eatom, int ntype, - int* type, int* fmap, int* errorflag) +MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_atom, double* eng_vdwl, + double* eatom, int ntype, int* type, int* fmap, int* errorflag) { int i, elti; int m; @@ -43,14 +42,10 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, rho3[i] = rho3[i] - 3.0 / 5.0 * arho3b[i][m] * arho3b[i][m]; } for (m = 0; m < 6; m++) { - rho2[i] = - rho2[i] + - this->v2D[m] * arho2[i][m] * arho2[i][m]; + rho2[i] = rho2[i] + this->v2D[m] * arho2[i][m] * arho2[i][m]; } for (m = 0; m < 10; m++) { - rho3[i] = - rho3[i] + - this->v3D[m] * arho3[i][m] * arho3[i][m]; + rho3[i] = rho3[i] + this->v3D[m] * arho3[i][m] * arho3[i][m]; } if (rho0[i] > 0.0) { @@ -69,9 +64,7 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, } } - gamma[i] = t_ave[i][0] * rho1[i] + - t_ave[i][1] * rho2[i] + - t_ave[i][2] * rho3[i]; + gamma[i] = t_ave[i][0] * rho1[i] + t_ave[i][1] * rho2[i] + t_ave[i][2] * rho3[i]; if (rho0[i] > 0.0) { gamma[i] = gamma[i] / (rho0[i] * rho0[i]); @@ -88,13 +81,9 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, dGbar = 0.0; } else { if (this->mix_ref_t == 1) { - gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + - t_ave[i][2] * shp[2]) / - (Z * Z); + gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + t_ave[i][2] * shp[2]) / (Z * Z); } else { - gam = (this->t1_meam[elti] * shp[0] + - this->t2_meam[elti] * shp[1] + - this->t3_meam[elti] * shp[2]) / + gam = (this->t1_meam[elti] * shp[0] + this->t2_meam[elti] * shp[1] + this->t3_meam[elti] * shp[2]) / (Z * Z); } G_gam(gam, this->ibar_meam[elti], &Gbar, errorflag); @@ -106,9 +95,7 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, Gbar = 1.0; dGbar = 0.0; } else { - gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + - t_ave[i][2] * shp[2]) / - (Z * Z); + gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + t_ave[i][2] * shp[2]) / (Z * Z); dG_gam(gam, this->ibar_meam[elti], &Gbar, &dGbar); } rho_bkgd = this->rho0_meam[elti] * Z * Gbar; @@ -196,8 +183,7 @@ MEAM::G_gam(double gamma, int ibar, double* G, int* errorflag) // e.g. gsmooth_factor is 99, {: // gsmooth_switchpoint = -0.99 // G = 0.01*(-0.99/gamma)**99 - *G = 1 / (gsmooth_factor + 1) * - pow((gsmooth_switchpoint / gamma), gsmooth_factor); + *G = 1 / (gsmooth_factor + 1) * pow((gsmooth_switchpoint / gamma), gsmooth_factor); *G = sqrt(*G); } else { *G = sqrt(1.0 + gamma); @@ -237,8 +223,7 @@ MEAM::dG_gam(double gamma, int ibar, double* G, double* dG) // e.g. gsmooth_factor is 99, {: // gsmooth_switchpoint = -0.99 // G = 0.01*(-0.99/gamma)**99 - *G = 1 / (gsmooth_factor + 1) * - pow((gsmooth_switchpoint / gamma), gsmooth_factor); + *G = 1 / (gsmooth_factor + 1) * pow((gsmooth_switchpoint / gamma), gsmooth_factor); *G = sqrt(*G); *dG = -gsmooth_factor * *G / (2.0 * gamma); } else { diff --git a/src/USER-MEAMC/meam_dens_init.cpp b/src/USER-MEAMC/meam_dens_init.cpp index b6c6dba2d4..81f94c94b1 100644 --- a/src/USER-MEAMC/meam_dens_init.cpp +++ b/src/USER-MEAMC/meam_dens_init.cpp @@ -1,10 +1,9 @@ #include "meam.h" -#include #include "math_special.h" +#include using namespace LAMMPS_NS; - void MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) { @@ -33,23 +32,23 @@ MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) nmax = atom_nmax; - memory->create(rho,nmax,"pair:rho"); - memory->create(rho0,nmax,"pair:rho0"); - memory->create(rho1,nmax,"pair:rho1"); - memory->create(rho2,nmax,"pair:rho2"); - memory->create(rho3,nmax,"pair:rho3"); - memory->create(frhop,nmax,"pair:frhop"); - memory->create(gamma,nmax,"pair:gamma"); - memory->create(dgamma1,nmax,"pair:dgamma1"); - memory->create(dgamma2,nmax,"pair:dgamma2"); - memory->create(dgamma3,nmax,"pair:dgamma3"); - memory->create(arho2b,nmax,"pair:arho2b"); - memory->create(arho1,nmax,3,"pair:arho1"); - memory->create(arho2,nmax,6,"pair:arho2"); - memory->create(arho3,nmax,10,"pair:arho3"); - memory->create(arho3b,nmax,3,"pair:arho3b"); - memory->create(t_ave,nmax,3,"pair:t_ave"); - memory->create(tsq_ave,nmax,3,"pair:tsq_ave"); + memory->create(rho, nmax, "pair:rho"); + memory->create(rho0, nmax, "pair:rho0"); + memory->create(rho1, nmax, "pair:rho1"); + memory->create(rho2, nmax, "pair:rho2"); + memory->create(rho3, nmax, "pair:rho3"); + memory->create(frhop, nmax, "pair:frhop"); + memory->create(gamma, nmax, "pair:gamma"); + memory->create(dgamma1, nmax, "pair:dgamma1"); + memory->create(dgamma2, nmax, "pair:dgamma2"); + memory->create(dgamma3, nmax, "pair:dgamma3"); + memory->create(arho2b, nmax, "pair:arho2b"); + memory->create(arho1, nmax, 3, "pair:arho1"); + memory->create(arho2, nmax, 6, "pair:arho2"); + memory->create(arho3, nmax, 10, "pair:arho3"); + memory->create(arho3b, nmax, 3, "pair:arho3b"); + memory->create(t_ave, nmax, 3, "pair:t_ave"); + memory->create(tsq_ave, nmax, 3, "pair:tsq_ave"); } if (n_neigh > maxneigh) { @@ -57,9 +56,9 @@ MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) memory->destroy(dscrfcn); memory->destroy(fcpair); maxneigh = n_neigh; - memory->create(scrfcn,maxneigh,"pair:scrfcn"); - memory->create(dscrfcn,maxneigh,"pair:dscrfcn"); - memory->create(fcpair,maxneigh,"pair:fcpair"); + memory->create(scrfcn, maxneigh, "pair:scrfcn"); + memory->create(dscrfcn, maxneigh, "pair:dscrfcn"); + memory->create(fcpair, maxneigh, "pair:fcpair"); } // zero out local arrays @@ -68,20 +67,16 @@ MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) rho0[i] = 0.0; arho2b[i] = 0.0; arho1[i][0] = arho1[i][1] = arho1[i][2] = 0.0; - for (j = 0; j < 6; j++) arho2[i][j] = 0.0; - for (j = 0; j < 10; j++) arho3[i][j] = 0.0; + for (j = 0; j < 6; j++) + arho2[i][j] = 0.0; + for (j = 0; j < 10; j++) + arho3[i][j] = 0.0; arho3b[i][0] = arho3b[i][1] = arho3b[i][2] = 0.0; t_ave[i][0] = t_ave[i][1] = t_ave[i][2] = 0.0; tsq_ave[i][0] = tsq_ave[i][1] = tsq_ave[i][2] = 0.0; } } - - - - - - // Extern "C" declaration has the form: // // void meam_dens_init_(int *, int *, int *, double *, int *, int *, int *, @@ -101,9 +96,8 @@ MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) // void -MEAM::meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, - int numneigh, int* firstneigh, int numneigh_full, - int* firstneigh_full, int fnoffset, int* errorflag) +MEAM::meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, + int numneigh_full, int* firstneigh_full, int fnoffset, int* errorflag) { *errorflag = 0; @@ -118,9 +112,8 @@ MEAM::meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, // ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc void -MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, - double** x, int numneigh, int* firstneigh, int numneigh_full, - int* firstneigh_full, int ntype, int* type, int* fmap) +MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** x, int numneigh, + int* firstneigh, int numneigh_full, int* firstneigh_full, int ntype, int* type, int* fmap) { int jn, j, kn, k; int elti, eltj, eltk; @@ -241,8 +234,8 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, // ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc void -MEAM::calc_rho1(int i, int ntype, int* type, int* fmap, double** x, - int numneigh, int* firstneigh, double* scrfcn, double* fcpair) +MEAM::calc_rho1(int i, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, + double* scrfcn, double* fcpair) { int jn, j, m, n, p, elti, eltj; int nv2, nv3; @@ -341,8 +334,8 @@ MEAM::calc_rho1(int i, int ntype, int* type, int* fmap, double** x, // ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc void -MEAM::screen(int i, int j, double** x, double rijsq, double* sij, - int numneigh_full, int* firstneigh_full, int ntype, int* type, int* fmap) +MEAM::screen(int i, int j, double** x, double rijsq, double* sij, int numneigh_full, int* firstneigh_full, + int ntype, int* type, int* fmap) // Screening function // Inputs: i = atom 1 id (integer) // j = atom 2 id (integer) @@ -410,9 +403,8 @@ MEAM::screen(int i, int j, double** x, double rijsq, double* sij, // ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc void -MEAM::dsij(int i, int j, int k, int jn, int numneigh, double rij2, - double* dsij1, double* dsij2, int ntype, int* type, int* fmap, double** x, - double* scrfcn, double* fcpair) +MEAM::dsij(int i, int j, int k, int jn, int numneigh, double rij2, double* dsij1, double* dsij2, int ntype, + int* type, int* fmap, double** x, double* scrfcn, double* fcpair) { // Inputs: i,j,k = id's of 3 atom triplet // jn = id of i-j pair @@ -548,10 +540,8 @@ MEAM::dCfunc2(double rij2, double rik2, double rjk2, double* dCikj1, double* dCi b = rik2 + rjk2; denom = rij4 - a * a; denom = denom * denom; - *dCikj1 = 4 * rij2 * - (rij4 + rik4 + 2 * rik2 * rjk2 - 3 * rjk4 - 2 * rij2 * a) / denom; - *dCikj2 = 4 * rij2 * - (rij4 - 3 * rik4 + 2 * rik2 * rjk2 + rjk4 + 2 * rij2 * a) / denom; + *dCikj1 = 4 * rij2 * (rij4 + rik4 + 2 * rik2 * rjk2 - 3 * rjk4 - 2 * rij2 * a) / denom; + *dCikj2 = 4 * rij2 * (rij4 - 3 * rik4 + 2 * rik2 * rjk2 + rjk4 + 2 * rij2 * a) / denom; (void)(b); } diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp index 2e6eac7328..4f099e61ba 100644 --- a/src/USER-MEAMC/meam_force.cpp +++ b/src/USER-MEAMC/meam_force.cpp @@ -1,7 +1,7 @@ #include "meam.h" -#include -#include #include "math_special.h" +#include +#include using namespace LAMMPS_NS; // Extern "C" declaration has the form: @@ -26,12 +26,10 @@ using namespace LAMMPS_NS; // void -MEAM::meam_force(int i, int eflag_either, int eflag_global, - int eflag_atom, int vflag_atom, double* eng_vdwl, double* eatom, - int ntype, int* type, int* fmap, double** x, int numneigh, - int* firstneigh, int numneigh_full, int* firstneigh_full, - int fnoffset, double** f, double** vatom, - int* errorflag) +MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int vflag_atom, double* eng_vdwl, + double* eatom, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, + int numneigh_full, int* firstneigh_full, int fnoffset, double** f, double** vatom, + int* errorflag) { int j, jn, k, kn, kk, m, n, p, q; int nv2, nv3, elti, eltj, eltk, ind; @@ -101,16 +99,9 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, kk = std::min(kk, this->nrar - 2); pp = pp - kk; pp = std::min(pp, 1.0); - phi = ((this->phirar3[ind][kk] * pp + - this->phirar2[ind][kk]) * - pp + - this->phirar1[ind][kk]) * - pp + + phi = ((this->phirar3[ind][kk] * pp + this->phirar2[ind][kk]) * pp + this->phirar1[ind][kk]) * pp + this->phirar[ind][kk]; - phip = (this->phirar6[ind][kk] * pp + - this->phirar5[ind][kk]) * - pp + - this->phirar4[ind][kk]; + phip = (this->phirar6[ind][kk] * pp + this->phirar5[ind][kk]) * pp + this->phirar4[ind][kk]; recip = 1.0 / r; if (eflag_either != 0) { @@ -221,10 +212,8 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, // rho2 terms a2 = 2 * sij / rij2; - drho2dr1 = a2 * (drhoa2j - 2 * rhoa2j / rij) * arg1i2 - - 2.0 / 3.0 * arho2b[i] * drhoa2j * sij; - drho2dr2 = a2 * (drhoa2i - 2 * rhoa2i / rij) * arg1j2 - - 2.0 / 3.0 * arho2b[j] * drhoa2i * sij; + drho2dr1 = a2 * (drhoa2j - 2 * rhoa2j / rij) * arg1i2 - 2.0 / 3.0 * arho2b[i] * drhoa2j * sij; + drho2dr2 = a2 * (drhoa2i - 2 * rhoa2i / rij) * arg1j2 - 2.0 / 3.0 * arho2b[j] * drhoa2i * sij; a2 = 4 * sij / rij2; for (m = 0; m < 3; m++) { drho2drm1[m] = 0.0; @@ -241,10 +230,8 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, rij3 = rij * rij2; a3 = 2 * sij / rij3; a3a = 6.0 / 5.0 * sij / rij; - drho3dr1 = a3 * (drhoa3j - 3 * rhoa3j / rij) * arg1i3 - - a3a * (drhoa3j - rhoa3j / rij) * arg3i3; - drho3dr2 = a3 * (drhoa3i - 3 * rhoa3i / rij) * arg1j3 - - a3a * (drhoa3i - rhoa3i / rij) * arg3j3; + drho3dr1 = a3 * (drhoa3j - 3 * rhoa3j / rij) * arg1i3 - a3a * (drhoa3j - rhoa3j / rij) * arg3i3; + drho3dr2 = a3 * (drhoa3i - 3 * rhoa3i / rij) * arg1j3 - a3a * (drhoa3i - rhoa3i / rij) * arg3j3; a3 = 6 * sij / rij3; a3a = 6 * sij / (5 * rij); for (m = 0; m < 3; m++) { @@ -259,10 +246,8 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, nv2 = nv2 + 1; } } - drho3drm1[m] = - (a3 * drho3drm1[m] - a3a * arho3b[i][m]) * rhoa3j; - drho3drm2[m] = - (-a3 * drho3drm2[m] + a3a * arho3b[j][m]) * rhoa3i; + drho3drm1[m] = (a3 * drho3drm1[m] - a3a * arho3b[i][m]) * rhoa3j; + drho3drm2[m] = (-a3 * drho3drm2[m] + a3a * arho3b[j][m]) * rhoa3i; } // Compute derivatives of weighting functions t wrt rij @@ -294,18 +279,12 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, if (!iszero(tsq_ave[j][2])) a3j = drhoa0i * sij / tsq_ave[j][2]; - dt1dr1 = a1i * (this->t1_meam[eltj] - - t1i * pow(this->t1_meam[eltj], 2)); - dt1dr2 = a1j * (this->t1_meam[elti] - - t1j * pow(this->t1_meam[elti], 2)); - dt2dr1 = a2i * (this->t2_meam[eltj] - - t2i * pow(this->t2_meam[eltj], 2)); - dt2dr2 = a2j * (this->t2_meam[elti] - - t2j * pow(this->t2_meam[elti], 2)); - dt3dr1 = a3i * (this->t3_meam[eltj] - - t3i * pow(this->t3_meam[eltj], 2)); - dt3dr2 = a3j * (this->t3_meam[elti] - - t3j * pow(this->t3_meam[elti], 2)); + dt1dr1 = a1i * (this->t1_meam[eltj] - t1i * pow(this->t1_meam[eltj], 2)); + dt1dr2 = a1j * (this->t1_meam[elti] - t1j * pow(this->t1_meam[elti], 2)); + dt2dr1 = a2i * (this->t2_meam[eltj] - t2i * pow(this->t2_meam[eltj], 2)); + dt2dr2 = a2j * (this->t2_meam[elti] - t2j * pow(this->t2_meam[elti], 2)); + dt3dr1 = a3i * (this->t3_meam[eltj] - t3i * pow(this->t3_meam[eltj], 2)); + dt3dr2 = a3j * (this->t3_meam[elti] - t3j * pow(this->t3_meam[elti], 2)); } else if (this->ialloy == 2) { @@ -336,29 +315,19 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, // Compute derivatives of total density wrt rij, sij and rij(3) get_shpfcn(shpi, this->lattce_meam[elti][elti]); get_shpfcn(shpj, this->lattce_meam[eltj][eltj]); - drhodr1 = - dgamma1[i] * drho0dr1 + - dgamma2[i] * (dt1dr1 * rho1[i] + t1i * drho1dr1 + - dt2dr1 * rho2[i] + t2i * drho2dr1 + - dt3dr1 * rho3[i] + t3i * drho3dr1) - - dgamma3[i] * - (shpi[0] * dt1dr1 + shpi[1] * dt2dr1 + shpi[2] * dt3dr1); - drhodr2 = - dgamma1[j] * drho0dr2 + - dgamma2[j] * (dt1dr2 * rho1[j] + t1j * drho1dr2 + - dt2dr2 * rho2[j] + t2j * drho2dr2 + - dt3dr2 * rho3[j] + t3j * drho3dr2) - - dgamma3[j] * - (shpj[0] * dt1dr2 + shpj[1] * dt2dr2 + shpj[2] * dt3dr2); + drhodr1 = dgamma1[i] * drho0dr1 + + dgamma2[i] * (dt1dr1 * rho1[i] + t1i * drho1dr1 + dt2dr1 * rho2[i] + t2i * drho2dr1 + + dt3dr1 * rho3[i] + t3i * drho3dr1) - + dgamma3[i] * (shpi[0] * dt1dr1 + shpi[1] * dt2dr1 + shpi[2] * dt3dr1); + drhodr2 = dgamma1[j] * drho0dr2 + + dgamma2[j] * (dt1dr2 * rho1[j] + t1j * drho1dr2 + dt2dr2 * rho2[j] + t2j * drho2dr2 + + dt3dr2 * rho3[j] + t3j * drho3dr2) - + dgamma3[j] * (shpj[0] * dt1dr2 + shpj[1] * dt2dr2 + shpj[2] * dt3dr2); for (m = 0; m < 3; m++) { drhodrm1[m] = 0.0; drhodrm2[m] = 0.0; - drhodrm1[m] = - dgamma2[i] * - (t1i * drho1drm1[m] + t2i * drho2drm1[m] + t3i * drho3drm1[m]); - drhodrm2[m] = - dgamma2[j] * - (t1j * drho1drm2[m] + t2j * drho2drm2[m] + t3j * drho3drm2[m]); + drhodrm1[m] = dgamma2[i] * (t1i * drho1drm1[m] + t2i * drho2drm1[m] + t3i * drho3drm1[m]); + drhodrm2[m] = dgamma2[j] * (t1j * drho1drm2[m] + t2j * drho2drm2[m] + t3j * drho3drm2[m]); } // Compute derivatives wrt sij, but only if necessary @@ -369,10 +338,8 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, drho1ds1 = a1 * rhoa1j * arg1i1; drho1ds2 = a1 * rhoa1i * arg1j1; a2 = 2.0 / rij2; - drho2ds1 = - a2 * rhoa2j * arg1i2 - 2.0 / 3.0 * arho2b[i] * rhoa2j; - drho2ds2 = - a2 * rhoa2i * arg1j2 - 2.0 / 3.0 * arho2b[j] * rhoa2i; + drho2ds1 = a2 * rhoa2j * arg1i2 - 2.0 / 3.0 * arho2b[i] * rhoa2j; + drho2ds2 = a2 * rhoa2i * arg1j2 - 2.0 / 3.0 * arho2b[j] * rhoa2i; a3 = 2.0 / rij3; a3a = 6.0 / (5.0 * rij); drho3ds1 = a3 * rhoa3j * arg1i3 - a3a * rhoa3j * arg3i3; @@ -386,25 +353,25 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, a2j = 0.0; a3i = 0.0; a3j = 0.0; - if (!iszero(tsq_ave[i][0])) a1i = rhoa0j / tsq_ave[i][0]; - if (!iszero(tsq_ave[j][0])) a1j = rhoa0i / tsq_ave[j][0]; - if (!iszero(tsq_ave[i][1])) a2i = rhoa0j / tsq_ave[i][1]; - if (!iszero(tsq_ave[j][1])) a2j = rhoa0i / tsq_ave[j][1]; - if (!iszero(tsq_ave[i][2])) a3i = rhoa0j / tsq_ave[i][2]; - if (!iszero(tsq_ave[j][2])) a3j = rhoa0i / tsq_ave[j][2]; - - dt1ds1 = a1i * (this->t1_meam[eltj] - - t1i * pow(this->t1_meam[eltj], 2)); - dt1ds2 = a1j * (this->t1_meam[elti] - - t1j * pow(this->t1_meam[elti], 2)); - dt2ds1 = a2i * (this->t2_meam[eltj] - - t2i * pow(this->t2_meam[eltj], 2)); - dt2ds2 = a2j * (this->t2_meam[elti] - - t2j * pow(this->t2_meam[elti], 2)); - dt3ds1 = a3i * (this->t3_meam[eltj] - - t3i * pow(this->t3_meam[eltj], 2)); - dt3ds2 = a3j * (this->t3_meam[elti] - - t3j * pow(this->t3_meam[elti], 2)); + if (!iszero(tsq_ave[i][0])) + a1i = rhoa0j / tsq_ave[i][0]; + if (!iszero(tsq_ave[j][0])) + a1j = rhoa0i / tsq_ave[j][0]; + if (!iszero(tsq_ave[i][1])) + a2i = rhoa0j / tsq_ave[i][1]; + if (!iszero(tsq_ave[j][1])) + a2j = rhoa0i / tsq_ave[j][1]; + if (!iszero(tsq_ave[i][2])) + a3i = rhoa0j / tsq_ave[i][2]; + if (!iszero(tsq_ave[j][2])) + a3j = rhoa0i / tsq_ave[j][2]; + + dt1ds1 = a1i * (this->t1_meam[eltj] - t1i * pow(this->t1_meam[eltj], 2)); + dt1ds2 = a1j * (this->t1_meam[elti] - t1j * pow(this->t1_meam[elti], 2)); + dt2ds1 = a2i * (this->t2_meam[eltj] - t2i * pow(this->t2_meam[eltj], 2)); + dt2ds2 = a2j * (this->t2_meam[elti] - t2j * pow(this->t2_meam[elti], 2)); + dt3ds1 = a3i * (this->t3_meam[eltj] - t3i * pow(this->t3_meam[eltj], 2)); + dt3ds2 = a3j * (this->t3_meam[elti] - t3j * pow(this->t3_meam[elti], 2)); } else if (this->ialloy == 2) { @@ -432,20 +399,14 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, dt3ds2 = aj * (this->t3_meam[elti] - t3j); } - drhods1 = - dgamma1[i] * drho0ds1 + - dgamma2[i] * (dt1ds1 * rho1[i] + t1i * drho1ds1 + - dt2ds1 * rho2[i] + t2i * drho2ds1 + - dt3ds1 * rho3[i] + t3i * drho3ds1) - - dgamma3[i] * - (shpi[0] * dt1ds1 + shpi[1] * dt2ds1 + shpi[2] * dt3ds1); - drhods2 = - dgamma1[j] * drho0ds2 + - dgamma2[j] * (dt1ds2 * rho1[j] + t1j * drho1ds2 + - dt2ds2 * rho2[j] + t2j * drho2ds2 + - dt3ds2 * rho3[j] + t3j * drho3ds2) - - dgamma3[j] * - (shpj[0] * dt1ds2 + shpj[1] * dt2ds2 + shpj[2] * dt3ds2); + drhods1 = dgamma1[i] * drho0ds1 + + dgamma2[i] * (dt1ds1 * rho1[i] + t1i * drho1ds1 + dt2ds1 * rho2[i] + t2i * drho2ds1 + + dt3ds1 * rho3[i] + t3i * drho3ds1) - + dgamma3[i] * (shpi[0] * dt1ds1 + shpi[1] * dt2ds1 + shpi[2] * dt3ds1); + drhods2 = dgamma1[j] * drho0ds2 + + dgamma2[j] * (dt1ds2 * rho1[j] + t1j * drho1ds2 + dt2ds2 * rho2[j] + t2j * drho2ds2 + + dt3ds2 * rho3[j] + t3j * drho3ds2) - + dgamma3[j] * (shpj[0] * dt1ds2 + shpj[1] * dt2ds2 + shpj[2] * dt3ds2); } // Compute derivatives of energy wrt rij, sij and rij[3] @@ -455,8 +416,7 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, dUdsij = phi + frhop[i] * drhods1 + frhop[j] * drhods2; } for (m = 0; m < 3; m++) { - dUdrijm[m] = - frhop[i] * drhodrm1[m] + frhop[j] * drhodrm2[m]; + dUdrijm[m] = frhop[i] * drhodrm1[m] + frhop[j] * drhodrm2[m]; } // Add the part of the force due to dUdrij and dUdsij @@ -481,7 +441,7 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, v[4] = -0.25 * (delij[0] * fi[2] + delij[2] * fi[0]); v[5] = -0.25 * (delij[1] * fi[2] + delij[2] * fi[1]); - for (m = 0; m<6; m++) { + for (m = 0; m < 6; m++) { vatom[i][m] = vatom[i][m] + v[m]; vatom[j][m] = vatom[j][m] + v[m]; } @@ -495,8 +455,8 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, k = firstneigh_full[kn]; eltk = fmap[type[k]]; if (k != j && eltk >= 0) { - dsij(i, j, k, jn, numneigh, rij2, &dsij1, &dsij2, ntype, - type, fmap, x, &scrfcn[fnoffset], &fcpair[fnoffset]); + dsij(i, j, k, jn, numneigh, rij2, &dsij1, &dsij2, ntype, type, fmap, x, &scrfcn[fnoffset], + &fcpair[fnoffset]); if (!iszero(dsij1) || !iszero(dsij2)) { force1 = dUdsij * dsij1; force2 = dUdsij * dsij2; @@ -522,14 +482,11 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, v[0] = -third * (delik[0] * fi[0] + deljk[0] * fj[0]); v[1] = -third * (delik[1] * fi[1] + deljk[1] * fj[1]); v[2] = -third * (delik[2] * fi[2] + deljk[2] * fj[2]); - v[3] = -sixth * (delik[0] * fi[1] + deljk[0] * fj[1] + - delik[1] * fi[0] + deljk[1] * fj[0]); - v[4] = -sixth * (delik[0] * fi[2] + deljk[0] * fj[2] + - delik[2] * fi[0] + deljk[2] * fj[0]); - v[5] = -sixth * (delik[1] * fi[2] + deljk[1] * fj[2] + - delik[2] * fi[1] + deljk[2] * fj[1]); - - for (m = 0; m<6; m++) { + v[3] = -sixth * (delik[0] * fi[1] + deljk[0] * fj[1] + delik[1] * fi[0] + deljk[1] * fj[0]); + v[4] = -sixth * (delik[0] * fi[2] + deljk[0] * fj[2] + delik[2] * fi[0] + deljk[2] * fj[0]); + v[5] = -sixth * (delik[1] * fi[2] + deljk[1] * fj[2] + delik[2] * fi[1] + deljk[2] * fj[1]); + + for (m = 0; m < 6; m++) { vatom[i][m] = vatom[i][m] + v[m]; vatom[j][m] = vatom[j][m] + v[m]; vatom[k][m] = vatom[k][m] + v[m]; diff --git a/src/USER-MEAMC/meam_impl.cpp b/src/USER-MEAMC/meam_impl.cpp index 8ad82fb4a8..25c53785e4 100644 --- a/src/USER-MEAMC/meam_impl.cpp +++ b/src/USER-MEAMC/meam_impl.cpp @@ -22,7 +22,8 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -MEAM::MEAM(Memory *mem) : memory(mem) +MEAM::MEAM(Memory* mem) + : memory(mem) { phir = phirar = phirar1 = phirar2 = phirar3 = phirar4 = phirar5 = phirar6 = NULL; @@ -69,5 +70,3 @@ MEAM::~MEAM() memory->destroy(this->dscrfcn); memory->destroy(this->fcpair); } - - diff --git a/src/USER-MEAMC/meam_setup_done.cpp b/src/USER-MEAMC/meam_setup_done.cpp index 0bf4157696..38c805a54f 100644 --- a/src/USER-MEAMC/meam_setup_done.cpp +++ b/src/USER-MEAMC/meam_setup_done.cpp @@ -1,7 +1,7 @@ #include "meam.h" -#include -#include #include "math_special.h" +#include +#include using namespace LAMMPS_NS; // Declaration in pair_meam.h: @@ -27,8 +27,7 @@ MEAM::meam_setup_done(double* cutmax) // Augment t1 term for (int i = 0; i < maxelt; i++) - this->t1_meam[i] = - this->t1_meam[i] + this->augt1 * 3.0 / 5.0 * this->t3_meam[i]; + this->t1_meam[i] = this->t1_meam[i] + this->augt1 * 3.0 / 5.0 * this->t3_meam[i]; // Compute off-diagonal alloy parameters alloyparams(); @@ -116,28 +115,21 @@ MEAM::alloyparams(void) if (iszero(this->Ec_meam[i][j])) { if (this->lattce_meam[i][j] == L12) this->Ec_meam[i][j] = - (3 * this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 4.0 - - this->delta_meam[i][j]; + (3 * this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 4.0 - this->delta_meam[i][j]; else if (this->lattce_meam[i][j] == C11) { if (this->lattce_meam[i][i] == DIA) this->Ec_meam[i][j] = - (2 * this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 3.0 - - this->delta_meam[i][j]; + (2 * this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 3.0 - this->delta_meam[i][j]; else this->Ec_meam[i][j] = - (this->Ec_meam[i][i] + 2 * this->Ec_meam[j][j]) / 3.0 - - this->delta_meam[i][j]; + (this->Ec_meam[i][i] + 2 * this->Ec_meam[j][j]) / 3.0 - this->delta_meam[i][j]; } else - this->Ec_meam[i][j] = - (this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 2.0 - - this->delta_meam[i][j]; + this->Ec_meam[i][j] = (this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 2.0 - this->delta_meam[i][j]; } if (iszero(this->alpha_meam[i][j])) - this->alpha_meam[i][j] = - (this->alpha_meam[i][i] + this->alpha_meam[j][j]) / 2.0; + this->alpha_meam[i][j] = (this->alpha_meam[i][i] + this->alpha_meam[j][j]) / 2.0; if (iszero(this->re_meam[i][j])) - this->re_meam[i][j] = - (this->re_meam[i][i] + this->re_meam[j][j]) / 2.0; + this->re_meam[i][j] = (this->re_meam[i][i] + this->re_meam[j][j]) / 2.0; } } } @@ -160,8 +152,7 @@ MEAM::alloyparams(void) for (i = 0; i < this->neltypes; i++) { for (j = 0; j < this->neltypes; j++) { for (k = 0; k < this->neltypes; k++) { - eb = (this->Cmax_meam[i][j][k] * this->Cmax_meam[i][j][k]) / - (4.0 * (this->Cmax_meam[i][j][k] - 1.0)); + eb = (this->Cmax_meam[i][j][k] * this->Cmax_meam[i][j][k]) / (4.0 * (this->Cmax_meam[i][j][k] - 1.0)); this->ebound_meam[i][j] = std::max(this->ebound_meam[i][j], eb); } } @@ -203,44 +194,20 @@ MEAM::compute_pair_meam(void) memory->destroy(this->phirar6); // allocate memory for array that defines the potential - memory->create(this->phir, - (this->neltypes * (this->neltypes + 1)) / 2, - this->nr, - "pair:phir"); + memory->create(this->phir, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phir"); // allocate coeff memory - memory->create(this->phirar, - (this->neltypes * (this->neltypes + 1)) / 2, - this->nr, - "pair:phirar"); - memory->create(this->phirar1, - (this->neltypes * (this->neltypes + 1)) / 2, - this->nr, - "pair:phirar1"); - memory->create(this->phirar2, - (this->neltypes * (this->neltypes + 1)) / 2, - this->nr, - "pair:phirar2"); - memory->create(this->phirar3, - (this->neltypes * (this->neltypes + 1)) / 2, - this->nr, - "pair:phirar3"); - memory->create(this->phirar4, - (this->neltypes * (this->neltypes + 1)) / 2, - this->nr, - "pair:phirar4"); - memory->create(this->phirar5, - (this->neltypes * (this->neltypes + 1)) / 2, - this->nr, - "pair:phirar5"); - memory->create(this->phirar6, - (this->neltypes * (this->neltypes + 1)) / 2, - this->nr, - "pair:phirar6"); + memory->create(this->phirar, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar"); + memory->create(this->phirar1, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar1"); + memory->create(this->phirar2, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar2"); + memory->create(this->phirar3, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar3"); + memory->create(this->phirar4, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar4"); + memory->create(this->phirar5, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar5"); + memory->create(this->phirar6, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar6"); // loop over pairs of element types - nv2 = 0; + nv2 = 0; for (a = 0; a < this->neltypes; a++) { for (b = a; b < this->neltypes; b++) { // loop over r values and compute @@ -253,8 +220,8 @@ MEAM::compute_pair_meam(void) // (see Lee and Baskes, PRB 62(13):8564 eqn.(21)) if (this->nn2_meam[a][b] == 1) { get_Zij(&Z1, this->lattce_meam[a][b]); - get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][b], - this->Cmin_meam[a][a][b], this->Cmax_meam[a][a][b]); + get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][b], this->Cmin_meam[a][a][b], + this->Cmax_meam[a][a][b]); // The B1, B2, and L12 cases with NN2 have a trick to them; we // need to @@ -262,55 +229,43 @@ MEAM::compute_pair_meam(void) // a-a // pairs, but need to include NN2 contributions to those pairs as // well. - if (this->lattce_meam[a][b] == B1 || - this->lattce_meam[a][b] == B2 || + if (this->lattce_meam[a][b] == B1 || this->lattce_meam[a][b] == B2 || this->lattce_meam[a][b] == L12) { rarat = r * arat; // phi_aa phiaa = phi_meam(rarat, a, a); get_Zij(&Z1, this->lattce_meam[a][a]); - get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][a], - this->Cmin_meam[a][a][a], + get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][a], this->Cmin_meam[a][a][a], this->Cmax_meam[a][a][a]); nmax = 10; if (scrn > 0.0) { for (n = 1; n <= nmax; n++) { - phiaa = phiaa + - pow((-Z2 * scrn / Z1), n) * - phi_meam(rarat * pow(arat, n), a, a); + phiaa = phiaa + pow((-Z2 * scrn / Z1), n) * phi_meam(rarat * pow(arat, n), a, a); } } // phi_bb phibb = phi_meam(rarat, b, b); get_Zij(&Z1, this->lattce_meam[b][b]); - get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[b][b], - this->Cmin_meam[b][b][b], + get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[b][b], this->Cmin_meam[b][b][b], this->Cmax_meam[b][b][b]); nmax = 10; if (scrn > 0.0) { for (n = 1; n <= nmax; n++) { - phibb = phibb + - pow((-Z2 * scrn / Z1), n) * - phi_meam(rarat * pow(arat, n), b, b); + phibb = phibb + pow((-Z2 * scrn / Z1), n) * phi_meam(rarat * pow(arat, n), b, b); } } - if (this->lattce_meam[a][b] == B1 || - this->lattce_meam[a][b] == B2) { + if (this->lattce_meam[a][b] == B1 || this->lattce_meam[a][b] == B2) { // Add contributions to the B1 or B2 potential get_Zij(&Z1, this->lattce_meam[a][b]); - get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][b], - this->Cmin_meam[a][a][b], + get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][b], this->Cmin_meam[a][a][b], this->Cmax_meam[a][a][b]); - this->phir[nv2][j] = - this->phir[nv2][j] - Z2 * scrn / (2 * Z1) * phiaa; - get_Zij2(&Z2, &arat, &scrn2, this->lattce_meam[a][b], - this->Cmin_meam[b][b][a], + this->phir[nv2][j] = this->phir[nv2][j] - Z2 * scrn / (2 * Z1) * phiaa; + get_Zij2(&Z2, &arat, &scrn2, this->lattce_meam[a][b], this->Cmin_meam[b][b][a], this->Cmax_meam[b][b][a]); - this->phir[nv2][j] = - this->phir[nv2][j] - Z2 * scrn2 / (2 * Z1) * phibb; + this->phir[nv2][j] = this->phir[nv2][j] - Z2 * scrn2 / (2 * Z1) * phibb; } else if (this->lattce_meam[a][b] == L12) { // The L12 case has one last trick; we have to be careful to @@ -327,17 +282,14 @@ MEAM::compute_pair_meam(void) get_sijk(C, b, b, a, &s221); S11 = s111 * s111 * s112 * s112; S22 = pow(s221, 4); - this->phir[nv2][j] = this->phir[nv2][j] - - 0.75 * S11 * phiaa - - 0.25 * S22 * phibb; + this->phir[nv2][j] = this->phir[nv2][j] - 0.75 * S11 * phiaa - 0.25 * S22 * phibb; } } else { nmax = 10; for (n = 1; n <= nmax; n++) { this->phir[nv2][j] = - this->phir[nv2][j] + - pow((-Z2 * scrn / Z1), n) * phi_meam(r * pow(arat, n), a, b); + this->phir[nv2][j] + pow((-Z2 * scrn / Z1), n) * phi_meam(r * pow(arat, n), a, b); } } } @@ -349,16 +301,13 @@ MEAM::compute_pair_meam(void) // potential is linear combination with zbl potential // endif if (this->zbl_meam[a][b] == 1) { - astar = - this->alpha_meam[a][b] * (r / this->re_meam[a][b] - 1.0); + astar = this->alpha_meam[a][b] * (r / this->re_meam[a][b] - 1.0); if (astar <= -3.0) - this->phir[nv2][j] = - zbl(r, this->ielt_meam[a], this->ielt_meam[b]); + this->phir[nv2][j] = zbl(r, this->ielt_meam[a], this->ielt_meam[b]); else if (astar > -3.0 && astar < -1.0) { fcut(1 - (astar + 1.0) / (-3.0 + 1.0), &frac); phizbl = zbl(r, this->ielt_meam[a], this->ielt_meam[b]); - this->phir[nv2][j] = - frac * this->phir[nv2][j] + (1 - frac) * phizbl; + this->phir[nv2][j] = frac * this->phir[nv2][j] + (1 - frac) * phizbl; } } } @@ -401,8 +350,7 @@ MEAM::phi_meam(double r, int a, int b) // Nref[i][j] = # of i's neighbors of type j get_Zij(&Z12, this->lattce_meam[a][b]); - get_densref(r, a, b, &rho01, &rho11, &rho21, &rho31, &rho02, &rho12, &rho22, - &rho32); + get_densref(r, a, b, &rho01, &rho11, &rho21, &rho31, &rho02, &rho12, &rho22, &rho32); // if densities are too small, numerical problems may result; just return zero if (rho01 <= 1e-14 && rho02 <= 1e-14) @@ -419,40 +367,32 @@ MEAM::phi_meam(double r, int a, int b) t32av = this->t3_meam[b]; } else { scalfac = 1.0 / (rho01 + rho02); - t11av = - scalfac * (this->t1_meam[a] * rho01 + this->t1_meam[b] * rho02); + t11av = scalfac * (this->t1_meam[a] * rho01 + this->t1_meam[b] * rho02); t12av = t11av; - t21av = - scalfac * (this->t2_meam[a] * rho01 + this->t2_meam[b] * rho02); + t21av = scalfac * (this->t2_meam[a] * rho01 + this->t2_meam[b] * rho02); t22av = t21av; - t31av = - scalfac * (this->t3_meam[a] * rho01 + this->t3_meam[b] * rho02); + t31av = scalfac * (this->t3_meam[a] * rho01 + this->t3_meam[b] * rho02); t32av = t31av; } } else { // average weighting factors for the reference structure, eqn. I.8 - get_tavref(&t11av, &t21av, &t31av, &t12av, &t22av, &t32av, - this->t1_meam[a], this->t2_meam[a], this->t3_meam[a], - this->t1_meam[b], this->t2_meam[b], this->t3_meam[b], - r, a, b, this->lattce_meam[a][b]); + get_tavref(&t11av, &t21av, &t31av, &t12av, &t22av, &t32av, this->t1_meam[a], this->t2_meam[a], + this->t3_meam[a], this->t1_meam[b], this->t2_meam[b], this->t3_meam[b], r, a, b, + this->lattce_meam[a][b]); } // for c11b structure, calculate background electron densities if (this->lattce_meam[a][b] == C11) { latta = this->lattce_meam[a][a]; if (latta == DIA) { - rhobar1 = pow(((Z12 / 2) * (rho02 + rho01)), 2) + - t11av * pow((rho12 - rho11), 2) + - t21av / 6.0 * pow(rho22 + rho21, 2) + - 121.0 / 40.0 * t31av * pow((rho32 - rho31), 2); + rhobar1 = pow(((Z12 / 2) * (rho02 + rho01)), 2) + t11av * pow((rho12 - rho11), 2) + + t21av / 6.0 * pow(rho22 + rho21, 2) + 121.0 / 40.0 * t31av * pow((rho32 - rho31), 2); rhobar1 = sqrt(rhobar1); rhobar2 = pow(Z12 * rho01, 2) + 2.0 / 3.0 * t21av * pow(rho21, 2); rhobar2 = sqrt(rhobar2); } else { - rhobar2 = pow(((Z12 / 2) * (rho01 + rho02)), 2) + - t12av * pow((rho11 - rho12), 2) + - t22av / 6.0 * pow(rho21 + rho22, 2) + - 121.0 / 40.0 * t32av * pow((rho31 - rho32), 2); + rhobar2 = pow(((Z12 / 2) * (rho01 + rho02)), 2) + t12av * pow((rho11 - rho12), 2) + + t22av / 6.0 * pow(rho21 + rho22, 2) + 121.0 / 40.0 * t32av * pow((rho31 - rho32), 2); rhobar2 = sqrt(rhobar2); rhobar1 = pow(Z12 * rho02, 2) + 2.0 / 3.0 * t22av * pow(rho22, 2); rhobar1 = sqrt(rhobar1); @@ -520,8 +460,7 @@ MEAM::phi_meam(double r, int a, int b) if (this->emb_lin_neg == 1 && rhobar1 <= 0) F1 = -this->A_meam[a] * this->Ec_meam[a][a] * rhobar1; else - F1 = - this->A_meam[a] * this->Ec_meam[a][a] * rhobar1 * log(rhobar1); + F1 = this->A_meam[a] * this->Ec_meam[a][a] * rhobar1 * log(rhobar1); } if (iszero(rhobar2)) F2 = 0.0; @@ -529,13 +468,11 @@ MEAM::phi_meam(double r, int a, int b) if (this->emb_lin_neg == 1 && rhobar2 <= 0) F2 = -this->A_meam[b] * this->Ec_meam[b][b] * rhobar2; else - F2 = - this->A_meam[b] * this->Ec_meam[b][b] * rhobar2 * log(rhobar2); + F2 = this->A_meam[b] * this->Ec_meam[b][b] * rhobar2 * log(rhobar2); } // compute Rose function, I.16 - Eu = erose(r, this->re_meam[a][b], this->alpha_meam[a][b], - this->Ec_meam[a][b], this->repuls_meam[a][b], + Eu = erose(r, this->re_meam[a][b], this->alpha_meam[a][b], this->Ec_meam[a][b], this->repuls_meam[a][b], this->attrac_meam[a][b], this->erose_form); // calculate the pair energy @@ -552,14 +489,12 @@ MEAM::phi_meam(double r, int a, int b) phiaa = phi_meam(r, a, a); // account for second neighbor a-a potential here... get_Zij(&Z1nn, this->lattce_meam[a][a]); - get_Zij2(&Z2nn, &arat, &scrn, this->lattce_meam[a][a], - this->Cmin_meam[a][a][a], this->Cmax_meam[a][a][a]); + get_Zij2(&Z2nn, &arat, &scrn, this->lattce_meam[a][a], this->Cmin_meam[a][a][a], + this->Cmax_meam[a][a][a]); nmax = 10; if (scrn > 0.0) { for (n = 1; n <= nmax; n++) { - phiaa = - phiaa + - pow((-Z2nn * scrn / Z1nn), n) * phi_meam(r * pow(arat, n), a, a); + phiaa = phiaa + pow((-Z2nn * scrn / Z1nn), n) * phi_meam(r * pow(arat, n), a, a); } } phi_m = Eu / 3.0 - F1 / 4.0 - F2 / 12.0 - phiaa; @@ -595,9 +530,7 @@ MEAM::compute_reference_density(void) Gbar = 1.0; else { get_shpfcn(shp, this->lattce_meam[a][a]); - gam = (this->t1_meam[a] * shp[0] + this->t2_meam[a] * shp[1] + - this->t3_meam[a] * shp[2]) / - (Z * Z); + gam = (this->t1_meam[a] * shp[0] + this->t2_meam[a] * shp[1] + this->t3_meam[a] * shp[2]) / (Z * Z); G_gam(gam, this->ibar_meam[a], &Gbar, &errorflag); } @@ -610,10 +543,9 @@ MEAM::compute_reference_density(void) // add on the contribution from those (accounting for partial // screening) if (this->nn2_meam[a][a] == 1) { - get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][a], - this->Cmin_meam[a][a][a], this->Cmax_meam[a][a][a]); - rho0_2nn = - this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta0_meam[a] * (arat - 1)); + get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][a], this->Cmin_meam[a][a][a], + this->Cmax_meam[a][a][a]); + rho0_2nn = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta0_meam[a] * (arat - 1)); rho0 = rho0 + Z2 * rho0_2nn * scrn; } @@ -652,10 +584,9 @@ MEAM::get_shpfcn(double* s /* s(3) */, lattice_t latt) //------------------------------------------------------------------------------c // Average weighting factors for the reference structure void -MEAM::get_tavref(double* t11av, double* t21av, double* t31av, double* t12av, - double* t22av, double* t32av, double t11, double t21, double t31, - double t12, double t22, double t32, double r, int a, int b, - lattice_t latt) +MEAM::get_tavref(double* t11av, double* t21av, double* t31av, double* t12av, double* t22av, double* t32av, + double t11, double t21, double t31, double t12, double t22, double t32, double r, int a, + int b, lattice_t latt) { double rhoa01, rhoa02, a1, a2, rho01 /*,rho02*/; @@ -668,8 +599,7 @@ MEAM::get_tavref(double* t11av, double* t21av, double* t31av, double* t12av, *t22av = t22; *t32av = t32; } else { - if (latt == FCC || latt == BCC || latt == DIA || latt == HCP || - latt == B1 || latt == DIM || latt == B2) { + if (latt == FCC || latt == BCC || latt == DIA || latt == HCP || latt == B1 || latt == DIM || latt == B2) { // all neighbors are of the opposite type *t11av = t12; *t21av = t22; @@ -730,8 +660,7 @@ MEAM::get_Zij(int* Zij, lattice_t latt) // neighbor screening function for lattice type "latt" void -MEAM::get_Zij2(int* Zij2, double* a, double* S, lattice_t latt, double cmin, - double cmax) +MEAM::get_Zij2(int* Zij2, double* a, double* S, lattice_t latt, double cmin, double cmax) { double /*rratio,*/ C, x, sijk; @@ -791,17 +720,15 @@ void MEAM::get_sijk(double C, int i, int j, int k, double* sijk) { double x; - x = (C - this->Cmin_meam[i][j][k]) / - (this->Cmax_meam[i][j][k] - this->Cmin_meam[i][j][k]); + x = (C - this->Cmin_meam[i][j][k]) / (this->Cmax_meam[i][j][k] - this->Cmin_meam[i][j][k]); fcut(x, sijk); } //------------------------------------------------------------------------------c // Calculate density functions, assuming reference configuration void -MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* rho21, - double* rho31, double* rho02, double* rho12, double* rho22, - double* rho32) +MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* rho21, double* rho31, + double* rho02, double* rho12, double* rho22, double* rho32) { double a1, a2; double s[3]; @@ -878,11 +805,8 @@ MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* *rho01 = 8 * rhoa01 + 4 * rhoa02; *rho02 = 12 * rhoa01; if (this->ialloy == 1) { - *rho21 = - 8. / 3. * - pow(rhoa21 * this->t2_meam[a] - rhoa22 * this->t2_meam[b], 2); - denom = 8 * rhoa01 * pow(this->t2_meam[a], 2) + - 4 * rhoa02 * pow(this->t2_meam[b], 2); + *rho21 = 8. / 3. * pow(rhoa21 * this->t2_meam[a] - rhoa22 * this->t2_meam[b], 2); + denom = 8 * rhoa01 * pow(this->t2_meam[a], 2) + 4 * rhoa02 * pow(this->t2_meam[b], 2); if (denom > 0.) *rho21 = *rho21 / denom * *rho01; } else @@ -896,8 +820,7 @@ MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* if (this->nn2_meam[a][b] == 1) { - get_Zij2(&Zij2nn, &arat, &scrn, lat, this->Cmin_meam[a][a][b], - this->Cmax_meam[a][a][b]); + get_Zij2(&Zij2nn, &arat, &scrn, lat, this->Cmin_meam[a][a][b], this->Cmax_meam[a][a][b]); a1 = arat * r / this->re_meam[a][a] - 1.0; a2 = arat * r / this->re_meam[b][b] - 1.0; @@ -924,8 +847,7 @@ MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* *rho01 = *rho01 + Zij2nn * scrn * rhoa01nn; // Assume Zij2nn and arat don't depend on order, but scrn might - get_Zij2(&Zij2nn, &arat, &scrn, lat, this->Cmin_meam[b][b][a], - this->Cmax_meam[b][b][a]); + get_Zij2(&Zij2nn, &arat, &scrn, lat, this->Cmin_meam[b][b][a], this->Cmax_meam[b][b][a]); *rho02 = *rho02 + Zij2nn * scrn * rhoa02nn; } } @@ -959,8 +881,7 @@ MEAM::zbl(double r, int z1, int z2) // Compute Rose energy function, I.16 // double -MEAM::erose(double r, double re, double alpha, double Ec, double repuls, - double attrac, int form) +MEAM::erose(double r, double re, double alpha, double Ec, double repuls, double attrac, int form) { double astar, a3; double result = 0.0; @@ -974,13 +895,11 @@ MEAM::erose(double r, double re, double alpha, double Ec, double repuls, a3 = repuls; if (form == 1) - result = -Ec * (1 + astar + (-attrac + repuls / r) * pow(astar, 3)) * - MathSpecial::fm_exp(-astar); + result = -Ec * (1 + astar + (-attrac + repuls / r) * pow(astar, 3)) * MathSpecial::fm_exp(-astar); else if (form == 2) result = -Ec * (1 + astar + a3 * pow(astar, 3)) * MathSpecial::fm_exp(-astar); else - result = - -Ec * (1 + astar + a3 * pow(astar, 3) / (r / re)) * MathSpecial::fm_exp(-astar); + result = -Ec * (1 + astar + a3 * pow(astar, 3) / (r / re)) * MathSpecial::fm_exp(-astar); } return result; } @@ -1005,37 +924,28 @@ MEAM::interpolate_meam(int ind) } this->phirar1[ind][0] = this->phirar[ind][1] - this->phirar[ind][0]; this->phirar1[ind][1] = 0.5 * (this->phirar[ind][2] - this->phirar[ind][0]); - this->phirar1[ind][this->nrar - 2] = 0.5 * (this->phirar[ind][this->nrar - 1] - this->phirar[ind][this->nrar - 3]); + this->phirar1[ind][this->nrar - 2] = + 0.5 * (this->phirar[ind][this->nrar - 1] - this->phirar[ind][this->nrar - 3]); this->phirar1[ind][this->nrar - 1] = 0.0; for (j = 2; j < this->nrar - 2; j++) { - this->phirar1[ind][j] = - ((this->phirar[ind][j - 2] - - this->phirar[ind][j + 2]) + - 8.0 * (this->phirar[ind][j + 1] - - this->phirar[ind][j - 1])) / - 12.; + this->phirar1[ind][j] = ((this->phirar[ind][j - 2] - this->phirar[ind][j + 2]) + + 8.0 * (this->phirar[ind][j + 1] - this->phirar[ind][j - 1])) / + 12.; } for (j = 0; j < this->nrar - 1; j++) { - this->phirar2[ind][j] = - 3.0 * - (this->phirar[ind][j + 1] - this->phirar[ind][j]) - - 2.0 * this->phirar1[ind][j] - - this->phirar1[ind][j + 1]; - this->phirar3[ind][j] = - this->phirar1[ind][j] + this->phirar1[ind][j + 1] - - 2.0 * - (this->phirar[ind][j + 1] - this->phirar[ind][j]); + this->phirar2[ind][j] = 3.0 * (this->phirar[ind][j + 1] - this->phirar[ind][j]) - + 2.0 * this->phirar1[ind][j] - this->phirar1[ind][j + 1]; + this->phirar3[ind][j] = this->phirar1[ind][j] + this->phirar1[ind][j + 1] - + 2.0 * (this->phirar[ind][j + 1] - this->phirar[ind][j]); } this->phirar2[ind][this->nrar - 1] = 0.0; this->phirar3[ind][this->nrar - 1] = 0.0; for (j = 0; j < this->nrar; j++) { this->phirar4[ind][j] = this->phirar1[ind][j] / drar; - this->phirar5[ind][j] = - 2.0 * this->phirar2[ind][j] / drar; - this->phirar6[ind][j] = - 3.0 * this->phirar3[ind][j] / drar; + this->phirar5[ind][j] = 2.0 * this->phirar2[ind][j] / drar; + this->phirar6[ind][j] = 3.0 * this->phirar3[ind][j] / drar; } } @@ -1054,12 +964,9 @@ MEAM::compute_phi(double rij, int elti, int eltj) kk = std::min(kk, this->nrar - 2); pp = pp - kk; pp = std::min(pp, 1.0); - double result = ((this->phirar3[ind][kk] * pp + - this->phirar2[ind][kk]) * - pp + - this->phirar1[ind][kk]) * - pp + - this->phirar[ind][kk]; + double result = + ((this->phirar3[ind][kk] * pp + this->phirar2[ind][kk]) * pp + this->phirar1[ind][kk]) * pp + + this->phirar[ind][kk]; return result; } diff --git a/src/USER-MEAMC/meam_setup_global.cpp b/src/USER-MEAMC/meam_setup_global.cpp index b4ef8e4eb8..07c6bfd699 100644 --- a/src/USER-MEAMC/meam_setup_global.cpp +++ b/src/USER-MEAMC/meam_setup_global.cpp @@ -18,11 +18,10 @@ using namespace LAMMPS_NS; // void -MEAM::meam_setup_global(int nelt, lattice_t* lat, double* z, int* ielement, double* atwt, - double* alpha, double* b0, double* b1, double* b2, - double* b3, double* alat, double* esub, double* asub, - double* t0, double* t1, double* t2, double* t3, - double* rozero, int* ibar) +MEAM::meam_setup_global(int nelt, lattice_t* lat, double* z, int* ielement, double* atwt, double* alpha, + double* b0, double* b1, double* b2, double* b3, double* alat, double* esub, + double* asub, double* t0, double* t1, double* t2, double* t3, double* rozero, + int* ibar) { int i; -- GitLab From 55487047006faad2c683c8561eb33b7a3e847050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=BCtter?= Date: Fri, 30 Jun 2017 15:37:26 +0200 Subject: [PATCH 388/593] Move stateless functions to separate module, improve style - use static/const - return instead of ptr-parameter, &ref if more than one return - replace macros from header with inline functions - remove useless/old comments --- src/USER-MEAMC/meam.h | 61 +++-- src/USER-MEAMC/meam_dens_final.cpp | 112 +------- src/USER-MEAMC/meam_dens_init.cpp | 118 +------- src/USER-MEAMC/meam_force.cpp | 26 +- src/USER-MEAMC/meam_funcs.cpp | 384 +++++++++++++++++++++++++++ src/USER-MEAMC/meam_setup_done.cpp | 246 +++-------------- src/USER-MEAMC/meam_setup_global.cpp | 15 -- src/USER-MEAMC/meam_setup_param.cpp | 11 - 8 files changed, 467 insertions(+), 506 deletions(-) create mode 100644 src/USER-MEAMC/meam_funcs.cpp diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 3baace180b..475dfe9a6e 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -2,6 +2,7 @@ #define LMP_MEAM_H #include "memory.h" +#include #include #define maxelt 5 @@ -107,10 +108,23 @@ public: int maxneigh; double *scrfcn, *dscrfcn, *fcpair; +protected: + // meam_funcs.cpp + static double fcut(const double xi); + static double dfcut(const double xi, double &dfc); + + static double dCfunc(const double rij2, const double rik2, const double rjk2); + static void dCfunc2(const double rij2, const double rik2, const double rjk2, double &dCikj1, double &dCikj2); + double G_gam(const double gamma, const int ibar, int &errorflag) const; + double dG_gam(const double gamma, const int ibar, double &dG) const; + static double zbl(const double r, const int z1, const int z2); + static double erose(const double r, const double re, const double alpha, const double Ec, const double repuls, const double attrac, const int form); + + static void get_shpfcn(const lattice_t latt, double (&s)[3]); + static int get_Zij(const lattice_t latt); + static int get_Zij2(const lattice_t latt, const double cmin, const double cmax, double &a, double &S); protected: void meam_checkindex(int, int, int, int*, int*); - void G_gam(double, int, double*, int*); - void dG_gam(double, int, double*, double*); void getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** x, int numneigh, int* firstneigh, int numneigh_full, int* firstneigh_full, int ntype, int* type, int* fmap); void screen(int i, int j, double** x, double rijsq, double* sij, int numneigh_full, int* firstneigh_full, @@ -119,24 +133,15 @@ protected: double* scrfcn, double* fcpair); void dsij(int i, int j, int k, int jn, int numneigh, double rij2, double* dsij1, double* dsij2, int ntype, int* type, int* fmap, double** x, double* scrfcn, double* fcpair); - void fcut(double, double*); - void dfcut(double, double*, double*); - void dCfunc(double, double, double, double*); - void dCfunc2(double, double, double, double*, double*); void alloyparams(); void compute_pair_meam(); double phi_meam(double, int, int); void compute_reference_density(); - void get_shpfcn(double*, lattice_t); void get_tavref(double*, double*, double*, double*, double*, double*, double, double, double, double, double, double, double, int, int, lattice_t); - void get_Zij(int*, lattice_t); - void get_Zij2(int*, double*, double*, lattice_t, double, double); void get_sijk(double, int, int, int, double*); void get_densref(double, int, int, double*, double*, double*, double*, double*, double*, double*, double*); - double zbl(double, int, int); - double erose(double, double, double, double, double, double, int); void interpolate_meam(int); double compute_phi(double, int, int); @@ -160,20 +165,24 @@ public: // Functions we need for compat -#define iszero(f) (fabs(f) < 1e-20) - -#define setall2d(arr, v) \ - { \ - for (int __i = 0; __i < maxelt; __i++) \ - for (int __j = 0; __j < maxelt; __j++) \ - arr[__i][__j] = v; \ - } -#define setall3d(arr, v) \ - { \ - for (int __i = 0; __i < maxelt; __i++) \ - for (int __j = 0; __j < maxelt; __j++) \ - for (int __k = 0; __k < maxelt; __k++) \ - arr[__i][__j][__k] = v; \ - } +static inline bool iszero(const double f) { + return fabs(f) < 1e-20; +} + +template +static inline void setall2d(TYPE (&arr)[maxi][maxj], const TYPE v) { + for (size_t i = 0; i < maxi; i++) + for (size_t j = 0; j < maxj; j++) + arr[i][j] = v; +} + +template +static inline void setall3d(TYPE (&arr)[maxi][maxj][maxk], const TYPE v) { + for (size_t i = 0; i < maxi; i++) + for (size_t j = 0; j < maxj; j++) + for (size_t k = 0; k < maxk; k++) + arr[i][j][k] = v; +} + }; #endif diff --git a/src/USER-MEAMC/meam_dens_final.cpp b/src/USER-MEAMC/meam_dens_final.cpp index d50c1be386..22b3e06c1a 100644 --- a/src/USER-MEAMC/meam_dens_final.cpp +++ b/src/USER-MEAMC/meam_dens_final.cpp @@ -1,24 +1,7 @@ #include "meam.h" #include "math_special.h" -#include using namespace LAMMPS_NS; -// Extern "C" declaration has the form: -// -// void meam_dens_final_(int *, int *, int *, int *, int *, double *, double *, -// int *, int *, int *, -// double *, double *, double *, double *, double *, double *, -// double *, double *, double *, double *, double *, double *, -// double *, double *, double *, double *, double *, int *); -// -// Call from pair_meam.cpp has the form: -// -// meam_dens_final_(&nlocal,&nmax,&eflag_either,&eflag_global,&eflag_atom, -// &eng_vdwl,eatom,ntype,type,fmap, -// &arho1[0][0],&arho2[0][0],arho2b,&arho3[0][0], -// &arho3b[0][0],&t_ave[0][0],&tsq_ave[0][0],gamma,dgamma1, -// dgamma2,dgamma3,rho,rho0,rho1,rho2,rho3,frhop,&errorflag); -// void MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_atom, double* eng_vdwl, @@ -72,10 +55,10 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ Z = this->Z_meam[elti]; - G_gam(gamma[i], this->ibar_meam[elti], &G, errorflag); + G = G_gam(gamma[i], this->ibar_meam[elti], *errorflag); if (*errorflag != 0) return; - get_shpfcn(shp, this->lattce_meam[elti][elti]); + get_shpfcn(this->lattce_meam[elti][elti], shp); if (this->ibar_meam[elti] <= 0) { Gbar = 1.0; dGbar = 0.0; @@ -86,7 +69,7 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ gam = (this->t1_meam[elti] * shp[0] + this->t2_meam[elti] * shp[1] + this->t3_meam[elti] * shp[2]) / (Z * Z); } - G_gam(gam, this->ibar_meam[elti], &Gbar, errorflag); + Gbar = G_gam(gam, this->ibar_meam[elti], *errorflag); } rho[i] = rho0[i] * G; @@ -96,7 +79,7 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ dGbar = 0.0; } else { gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + t_ave[i][2] * shp[2]) / (Z * Z); - dG_gam(gam, this->ibar_meam[elti], &Gbar, &dGbar); + Gbar = dG_gam(gam, this->ibar_meam[elti], dGbar); } rho_bkgd = this->rho0_meam[elti] * Z * Gbar; } else { @@ -109,7 +92,7 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ rhob = rho[i] / rho_bkgd; denom = 1.0 / rho_bkgd; - dG_gam(gamma[i], this->ibar_meam[elti], &G, &dG); + G = dG_gam(gamma[i], this->ibar_meam[elti], dG); dgamma1[i] = (G - 2 * dG * gamma[i]) * denom; @@ -163,88 +146,3 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ } } -// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc - -void -MEAM::G_gam(double gamma, int ibar, double* G, int* errorflag) -{ - // Compute G(gamma) based on selection flag ibar: - // 0 => G = sqrt(1+gamma) - // 1 => G = exp(gamma/2) - // 2 => not implemented - // 3 => G = 2/(1+exp(-gamma)) - // 4 => G = sqrt(1+gamma) - // -5 => G = +-sqrt(abs(1+gamma)) - - double gsmooth_switchpoint; - if (ibar == 0 || ibar == 4) { - gsmooth_switchpoint = -gsmooth_factor / (gsmooth_factor + 1); - if (gamma < gsmooth_switchpoint) { - // e.g. gsmooth_factor is 99, {: - // gsmooth_switchpoint = -0.99 - // G = 0.01*(-0.99/gamma)**99 - *G = 1 / (gsmooth_factor + 1) * pow((gsmooth_switchpoint / gamma), gsmooth_factor); - *G = sqrt(*G); - } else { - *G = sqrt(1.0 + gamma); - } - } else if (ibar == 1) { - *G = MathSpecial::fm_exp(gamma / 2.0); - } else if (ibar == 3) { - *G = 2.0 / (1.0 + exp(-gamma)); - } else if (ibar == -5) { - if ((1.0 + gamma) >= 0) { - *G = sqrt(1.0 + gamma); - } else { - *G = -sqrt(-1.0 - gamma); - } - } else { - *errorflag = 1; - } -} - -// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc - -void -MEAM::dG_gam(double gamma, int ibar, double* G, double* dG) -{ - // Compute G(gamma) and dG(gamma) based on selection flag ibar: - // 0 => G = sqrt(1+gamma) - // 1 => G = MathSpecial::fm_exp(gamma/2) - // 2 => not implemented - // 3 => G = 2/(1+MathSpecial::fm_exp(-gamma)) - // 4 => G = sqrt(1+gamma) - // -5 => G = +-sqrt(abs(1+gamma)) - double gsmooth_switchpoint; - - if (ibar == 0 || ibar == 4) { - gsmooth_switchpoint = -gsmooth_factor / (gsmooth_factor + 1); - if (gamma < gsmooth_switchpoint) { - // e.g. gsmooth_factor is 99, {: - // gsmooth_switchpoint = -0.99 - // G = 0.01*(-0.99/gamma)**99 - *G = 1 / (gsmooth_factor + 1) * pow((gsmooth_switchpoint / gamma), gsmooth_factor); - *G = sqrt(*G); - *dG = -gsmooth_factor * *G / (2.0 * gamma); - } else { - *G = sqrt(1.0 + gamma); - *dG = 1.0 / (2.0 * *G); - } - } else if (ibar == 1) { - *G = MathSpecial::fm_exp(gamma / 2.0); - *dG = *G / 2.0; - } else if (ibar == 3) { - *G = 2.0 / (1.0 + MathSpecial::fm_exp(-gamma)); - *dG = *G * (2.0 - *G) / 2; - } else if (ibar == -5) { - if ((1.0 + gamma) >= 0) { - *G = sqrt(1.0 + gamma); - *dG = 1.0 / (2.0 * *G); - } else { - *G = -sqrt(-1.0 - gamma); - *dG = -1.0 / (2.0 * *G); - } - } -} - -// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc diff --git a/src/USER-MEAMC/meam_dens_init.cpp b/src/USER-MEAMC/meam_dens_init.cpp index 81f94c94b1..82a60b87ff 100644 --- a/src/USER-MEAMC/meam_dens_init.cpp +++ b/src/USER-MEAMC/meam_dens_init.cpp @@ -1,6 +1,5 @@ #include "meam.h" #include "math_special.h" -#include using namespace LAMMPS_NS; @@ -77,24 +76,6 @@ MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) } } -// Extern "C" declaration has the form: -// -// void meam_dens_init_(int *, int *, int *, double *, int *, int *, int *, -// double *, -// int *, int *, int *, int *, -// double *, double *, double *, double *, double *, double *, -// double *, double *, double *, double *, double *, int *); -// -// -// Call from pair_meam.cpp has the form: -// -// meam_dens_init_(&i,&nmax,ntype,type,fmap,&x[0][0], -// &numneigh[i],firstneigh[i],&numneigh_full[i],firstneigh_full[i], -// &scrfcn[offset],&dscrfcn[offset],&fcpair[offset], -// rho0,&arho1[0][0],&arho2[0][0],arho2b, -// &arho3[0][0],&arho3b[0][0],&t_ave[0][0],&tsq_ave[0][0],&errorflag); -// - void MEAM::meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, int numneigh_full, int* firstneigh_full, int fnoffset, int* errorflag) @@ -158,7 +139,7 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** } else { rnorm = (this->rc_meam - rij) * drinv; screen(i, j, x, rij2, &sij, numneigh_full, firstneigh_full, ntype, type, fmap); - dfcut(rnorm, &fc, &dfc); + fc = dfcut(rnorm, dfc); fcij = fc; dfcij = dfc * drinv; } @@ -213,9 +194,9 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** } else { delc = Cmax - Cmin; cikj = (cikj - Cmin) / delc; - dfcut(cikj, &sikj, &dfikj); + sikj = dfcut(cikj, dfikj); coef1 = dfikj / (delc * sikj); - dCfunc(rij2, rik2, rjk2, &dCikj); + dCikj = dCfunc(rij2, rik2, rjk2); dscrfcn[jn] = dscrfcn[jn] + coef1 * dCikj; } } @@ -394,7 +375,7 @@ MEAM::screen(int i, int j, double** x, double rijsq, double* sij, int numneigh_f } else { delc = Cmax - Cmin; cikj = (cikj - Cmin) / delc; - fcut(cikj, &sikj); + sikj = fcut(cikj); } *sij = *sij * sikj; } @@ -449,8 +430,8 @@ MEAM::dsij(int i, int j, int k, int jn, int numneigh, double rij2, double* dsij1 cikj = (2.0 * (xik + xjk) + a - 2.0) / a; if (cikj >= Cmin && cikj <= Cmax) { cikj = (cikj - Cmin) / delc; - dfcut(cikj, &sikj, &dfc); - dCfunc2(rij2, rik2, rjk2, &dCikj1, &dCikj2); + sikj = dfcut(cikj, dfc); + dCfunc2(rij2, rik2, rjk2, dCikj1, dCikj2); a = sij / delc * dfc / sikj; *dsij1 = a * dCikj1; *dsij2 = a * dCikj2; @@ -460,90 +441,3 @@ MEAM::dsij(int i, int j, int k, int jn, int numneigh, double rij2, double* dsij1 } } } - -// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc - -void -MEAM::fcut(double xi, double* fc) -{ - // cutoff function - double a; - if (xi >= 1.0) - *fc = 1.0; - else if (xi <= 0.0) - *fc = 0.0; - else { - a = 1.0 - xi; - a = a * a; - a = a * a; - a = 1.0 - a; - *fc = a * a; - // fc = xi - } -} - -// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc - -void -MEAM::dfcut(double xi, double* fc, double* dfc) -{ - // cutoff function and its derivative - double a, a3, a4; - if (xi >= 1.0) { - *fc = 1.0; - *dfc = 0.0; - } else if (xi <= 0.0) { - *fc = 0.0; - *dfc = 0.0; - } else { - a = 1.0 - xi; - a3 = a * a * a; - a4 = a * a3; - *fc = pow((1.0 - a4), 2); - *dfc = 8 * (1.0 - a4) * a3; - // fc = xi - // dfc = 1.d0 - } -} - -// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc - -void -MEAM::dCfunc(double rij2, double rik2, double rjk2, double* dCikj) -{ - // Inputs: rij,rij2,rik2,rjk2 - // Outputs: dCikj = derivative of Cikj w.r.t. rij - double rij4, a, b, denom; - - rij4 = rij2 * rij2; - a = rik2 - rjk2; - b = rik2 + rjk2; - denom = rij4 - a * a; - denom = denom * denom; - *dCikj = -4 * (-2 * rij2 * a * a + rij4 * b + a * a * b) / denom; -} - -// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc - -void -MEAM::dCfunc2(double rij2, double rik2, double rjk2, double* dCikj1, double* dCikj2) -{ - // Inputs: rij,rij2,rik2,rjk2 - // Outputs: dCikj1 = derivative of Cikj w.r.t. rik - // dCikj2 = derivative of Cikj w.r.t. rjk - double rij4, rik4, rjk4, a, b, denom; - - rij4 = rij2 * rij2; - rik4 = rik2 * rik2; - rjk4 = rjk2 * rjk2; - a = rik2 - rjk2; - b = rik2 + rjk2; - denom = rij4 - a * a; - denom = denom * denom; - *dCikj1 = 4 * rij2 * (rij4 + rik4 + 2 * rik2 * rjk2 - 3 * rjk4 - 2 * rij2 * a) / denom; - *dCikj2 = 4 * rij2 * (rij4 - 3 * rik4 + 2 * rik2 * rjk2 + rjk4 + 2 * rij2 * a) / denom; - - (void)(b); -} - -// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp index 4f099e61ba..45470217e1 100644 --- a/src/USER-MEAMC/meam_force.cpp +++ b/src/USER-MEAMC/meam_force.cpp @@ -1,29 +1,9 @@ #include "meam.h" #include "math_special.h" #include -#include using namespace LAMMPS_NS; -// Extern "C" declaration has the form: -// -// void meam_force_(int *, int *, int *, double *, int *, int *, int *, double -// *, -// int *, int *, int *, int *, double *, double *, -// double *, double *, double *, double *, double *, double *, -// double *, double *, double *, double *, double *, double *, -// double *, double *, double *, double *, double *, double *, int -//*); -// -// Call from pair_meam.cpp has the form: -// -// meam_force_(&i,&nmax,&eflag_either,&eflag_global,&eflag_atom,&vflag_atom, -// &eng_vdwl,eatom,&ntype,type,fmap,&x[0][0], -// &numneigh[i],firstneigh[i],&numneigh_full[i],firstneigh_full[i], -// &scrfcn[offset],&dscrfcn[offset],&fcpair[offset], -// dgamma1,dgamma2,dgamma3,rho0,rho1,rho2,rho3,frhop, -// &arho1[0][0],&arho2[0][0],arho2b,&arho3[0][0],&arho3b[0][0], -// &t_ave[0][0],&tsq_ave[0][0],&f[0][0],&vatom[0][0],&errorflag); -// + void MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int vflag_atom, double* eng_vdwl, @@ -313,8 +293,8 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int } // Compute derivatives of total density wrt rij, sij and rij(3) - get_shpfcn(shpi, this->lattce_meam[elti][elti]); - get_shpfcn(shpj, this->lattce_meam[eltj][eltj]); + get_shpfcn(this->lattce_meam[elti][elti], shpi); + get_shpfcn(this->lattce_meam[eltj][eltj], shpj); drhodr1 = dgamma1[i] * drho0dr1 + dgamma2[i] * (dt1dr1 * rho1[i] + t1i * drho1dr1 + dt2dr1 * rho2[i] + t2i * drho2dr1 + dt3dr1 * rho3[i] + t3i * drho3dr1) - diff --git a/src/USER-MEAMC/meam_funcs.cpp b/src/USER-MEAMC/meam_funcs.cpp new file mode 100644 index 0000000000..bdef07e0b1 --- /dev/null +++ b/src/USER-MEAMC/meam_funcs.cpp @@ -0,0 +1,384 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Sebastian Hütter (OvGU) +------------------------------------------------------------------------- */ + +#include "meam.h" +#include "math_special.h" +#include + +using namespace LAMMPS_NS; + +//----------------------------------------------------------------------------- +// Cutoff function +// +double +MEAM::fcut(const double xi) +{ + double a; + if (xi >= 1.0) + return 1.0; + else if (xi <= 0.0) + return 0.0; + else { + a = 1.0 - xi; + a = a * a; + a = a * a; + a = 1.0 - a; + return a * a; + // fc = xi + } +} + +//----------------------------------------------------------------------------- +// Cutoff function and derivative +// +double +MEAM::dfcut(const double xi, double& dfc) +{ + double a, a3, a4; + if (xi >= 1.0) { + dfc = 0.0; + return 1.0; + } else if (xi <= 0.0) { + dfc = 0.0; + return 0.0; + } else { + a = 1.0 - xi; + a3 = a * a * a; + a4 = a * a3; + dfc = 8 * (1.0 - a4) * a3; + return pow((1.0 - a4), 2); + // fc = xi + // dfc = 1.d0 + } +} + +//----------------------------------------------------------------------------- +// Derivative of Cikj w.r.t. rij +// Inputs: rij,rij2,rik2,rjk2 +// +double +MEAM::dCfunc(const double rij2, const double rik2, const double rjk2) +{ + double rij4, a, b, denom; + + rij4 = rij2 * rij2; + a = rik2 - rjk2; + b = rik2 + rjk2; + denom = rij4 - a * a; + denom = denom * denom; + return -4 * (-2 * rij2 * a * a + rij4 * b + a * a * b) / denom; +} + +//----------------------------------------------------------------------------- +// Derivative of Cikj w.r.t. rik and rjk +// Inputs: rij,rij2,rik2,rjk2 +// +void +MEAM::dCfunc2(const double rij2, const double rik2, const double rjk2, double& dCikj1, double& dCikj2) +{ + double rij4, rik4, rjk4, a, b, denom; + + rij4 = rij2 * rij2; + rik4 = rik2 * rik2; + rjk4 = rjk2 * rjk2; + a = rik2 - rjk2; + b = rik2 + rjk2; + denom = rij4 - a * a; + denom = denom * denom; + dCikj1 = 4 * rij2 * (rij4 + rik4 + 2 * rik2 * rjk2 - 3 * rjk4 - 2 * rij2 * a) / denom; + dCikj2 = 4 * rij2 * (rij4 - 3 * rik4 + 2 * rik2 * rjk2 + rjk4 + 2 * rij2 * a) / denom; +} + +//----------------------------------------------------------------------------- +// Compute G(gamma) based on selection flag ibar: +// 0 => G = sqrt(1+gamma) +// 1 => G = exp(gamma/2) +// 2 => not implemented +// 3 => G = 2/(1+exp(-gamma)) +// 4 => G = sqrt(1+gamma) +// -5 => G = +-sqrt(abs(1+gamma)) +// +double +MEAM::G_gam(const double gamma, const int ibar, int& errorflag) const +{ + double gsmooth_switchpoint; + + switch (ibar) { + case 0: + case 4: + gsmooth_switchpoint = -gsmooth_factor / (gsmooth_factor + 1); + if (gamma < gsmooth_switchpoint) { + // e.g. gsmooth_factor is 99, {: + // gsmooth_switchpoint = -0.99 + // G = 0.01*(-0.99/gamma)**99 + double G = 1 / (gsmooth_factor + 1) * pow((gsmooth_switchpoint / gamma), gsmooth_factor); + return sqrt(G); + } else { + return sqrt(1.0 + gamma); + } + case 1: + return MathSpecial::fm_exp(gamma / 2.0); + case 3: + return 2.0 / (1.0 + exp(-gamma)); + case -5: + if ((1.0 + gamma) >= 0) { + return sqrt(1.0 + gamma); + } else { + return -sqrt(-1.0 - gamma); + } + } + errorflag = 1; +} + +//----------------------------------------------------------------------------- +// Compute G(gamma and dG(gamma) based on selection flag ibar: +// 0 => G = sqrt(1+gamma) +// 1 => G = exp(gamma/2) +// 2 => not implemented +// 3 => G = 2/(1+exp(-gamma)) +// 4 => G = sqrt(1+gamma) +// -5 => G = +-sqrt(abs(1+gamma)) +// +double +MEAM::dG_gam(const double gamma, const int ibar, double& dG) const +{ + double gsmooth_switchpoint; + double G; + + switch (ibar) { + case 0: + case 4: + gsmooth_switchpoint = -gsmooth_factor / (gsmooth_factor + 1); + if (gamma < gsmooth_switchpoint) { + // e.g. gsmooth_factor is 99, {: + // gsmooth_switchpoint = -0.99 + // G = 0.01*(-0.99/gamma)**99 + double G = 1 / (gsmooth_factor + 1) * pow((gsmooth_switchpoint / gamma), gsmooth_factor); + G = sqrt(G); + dG = -gsmooth_factor * G / (2.0 * gamma); + return G; + } else { + G = sqrt(1.0 + gamma); + dG = 1.0 / (2.0 * G); + return G; + } + case 1: + G = MathSpecial::fm_exp(gamma / 2.0); + dG = G / 2.0; + return G; + case 3: + G = 2.0 / (1.0 + MathSpecial::fm_exp(-gamma)); + dG = G * (2.0 - G) / 2; + return G; + case -5: + if ((1.0 + gamma) >= 0) { + G = sqrt(1.0 + gamma); + dG = 1.0 / (2.0 * G); + return G; + } else { + G = -sqrt(-1.0 - gamma); + dG = -1.0 / (2.0 * G); + return G; + } + } +} + +//----------------------------------------------------------------------------- +// Compute ZBL potential +// +double +MEAM::zbl(const double r, const int z1, const int z2) +{ + int i; + const double c[] = { 0.028171, 0.28022, 0.50986, 0.18175 }; + const double d[] = { 0.20162, 0.40290, 0.94229, 3.1998 }; + const double azero = 0.4685; + const double cc = 14.3997; + double a, x; + // azero = (9pi^2/128)^1/3 (0.529) Angstroms + a = azero / (pow(z1, 0.23) + pow(z2, 0.23)); + double result = 0.0; + x = r / a; + for (i = 0; i <= 3; i++) { + result = result + c[i] * MathSpecial::fm_exp(-d[i] * x); + } + if (r > 0.0) + result = result * z1 * z2 / r * cc; + return result; +} + +//----------------------------------------------------------------------------- +// Compute Rose energy function, I.16 +// +double +MEAM::erose(const double r, const double re, const double alpha, const double Ec, const double repuls, + const double attrac, const int form) +{ + double astar, a3; + double result = 0.0; + + if (r > 0.0) { + astar = alpha * (r / re - 1.0); + a3 = 0.0; + if (astar >= 0) + a3 = attrac; + else if (astar < 0) + a3 = repuls; + + if (form == 1) + result = -Ec * (1 + astar + (-attrac + repuls / r) * pow(astar, 3)) * MathSpecial::fm_exp(-astar); + else if (form == 2) + result = -Ec * (1 + astar + a3 * pow(astar, 3)) * MathSpecial::fm_exp(-astar); + else + result = -Ec * (1 + astar + a3 * pow(astar, 3) / (r / re)) * MathSpecial::fm_exp(-astar); + } + return result; +} + +//----------------------------------------------------------------------------- +// Shape factors for various configurations +// +void +MEAM::get_shpfcn(const lattice_t latt, double (&s)[3]) +{ + switch (latt) { + case FCC: + case BCC: + case B1: + case B2: + s[0] = 0.0; + s[1] = 0.0; + s[2] = 0.0; + break; + case HCP: + s[0] = 0.0; + s[1] = 0.0; + s[2] = 1.0 / 3.0; + break; + case DIA: + s[0] = 0.0; + s[1] = 0.0; + s[2] = 32.0 / 9.0; + break; + case DIM: + s[0] = 1.0; + s[1] = 2.0 / 3.0; + // s(3) = 1.d0 + s[2] = 0.40; + break; + default: + s[0] = 0.0; + // call error('Lattice not defined in get_shpfcn.') + } +} + +//----------------------------------------------------------------------------- +// Number of neighbors for the reference structure +// +int +MEAM::get_Zij(const lattice_t latt) +{ + switch (latt) { + case FCC: + return 12; + case BCC: + return 8; + case HCP: + return 12; + case B1: + return 6; + case DIA: + return 4; + case DIM: + return 1; + case C11: + return 10; + case L12: + return 12; + case B2: + return 8; + // call error('Lattice not defined in get_Zij.') + } +} + +//----------------------------------------------------------------------------- +// Number of second neighbors for the reference structure +// a = distance ratio R1/R2 +// S = second neighbor screening function +// +int +MEAM::get_Zij2(const lattice_t latt, const double cmin, const double cmax, double& a, double& S) +{ + + double C, x, sijk; + int Zij2 = 0, numscr = 0; + + switch (latt) { + case FCC: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; + case BCC: + Zij2 = 6; + a = 2.0 / sqrt(3.0); + numscr = 4; + break; + case HCP: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; + case B1: + Zij2 = 12; + a = sqrt(2.0); + numscr = 2; + break; + case DIA: + Zij2 = 0; + a = sqrt(8.0 / 3.0); + numscr = 4; + if (cmin < 0.500001) { + // call error('can not do 2NN MEAM for dia') + } + break; + case DIM: + // this really shouldn't be allowed; make sure screening is zero + a = 1.0; + S = 0.0; + return 0; + case L12: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; + case B2: + Zij2 = 6; + a = 2.0 / sqrt(3.0); + numscr = 4; + break; + // call error('Lattice not defined in get_Zij.') + } + + // Compute screening for each first neighbor + C = 4.0 / (a * a) - 1.0; + x = (C - cmin) / (cmax - cmin); + sijk = fcut(x); + // There are numscr first neighbors screening the second neighbors + S = pow(sijk, numscr); + return Zij2; +} diff --git a/src/USER-MEAMC/meam_setup_done.cpp b/src/USER-MEAMC/meam_setup_done.cpp index 38c805a54f..615ee1b62a 100644 --- a/src/USER-MEAMC/meam_setup_done.cpp +++ b/src/USER-MEAMC/meam_setup_done.cpp @@ -1,18 +1,8 @@ #include "meam.h" #include "math_special.h" #include -#include using namespace LAMMPS_NS; -// Declaration in pair_meam.h: -// -// void meam_setup_done(double *) -// -// Call from pair_meam.cpp: -// -// meam_setup_done(&cutmax) -// - void MEAM::meam_setup_done(double* cutmax) { @@ -219,9 +209,9 @@ MEAM::compute_pair_meam(void) // if using second-nearest neighbor, solve recursive problem // (see Lee and Baskes, PRB 62(13):8564 eqn.(21)) if (this->nn2_meam[a][b] == 1) { - get_Zij(&Z1, this->lattce_meam[a][b]); - get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][b], this->Cmin_meam[a][a][b], - this->Cmax_meam[a][a][b]); + Z1 = get_Zij(this->lattce_meam[a][b]); + Z2 = get_Zij2(this->lattce_meam[a][b], this->Cmin_meam[a][a][b], + this->Cmax_meam[a][a][b], arat, scrn); // The B1, B2, and L12 cases with NN2 have a trick to them; we // need to @@ -235,9 +225,9 @@ MEAM::compute_pair_meam(void) // phi_aa phiaa = phi_meam(rarat, a, a); - get_Zij(&Z1, this->lattce_meam[a][a]); - get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][a], this->Cmin_meam[a][a][a], - this->Cmax_meam[a][a][a]); + Z1 = get_Zij(this->lattce_meam[a][a]); + Z2 = get_Zij2(this->lattce_meam[a][a], this->Cmin_meam[a][a][a], + this->Cmax_meam[a][a][a], arat, scrn); nmax = 10; if (scrn > 0.0) { for (n = 1; n <= nmax; n++) { @@ -247,9 +237,9 @@ MEAM::compute_pair_meam(void) // phi_bb phibb = phi_meam(rarat, b, b); - get_Zij(&Z1, this->lattce_meam[b][b]); - get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[b][b], this->Cmin_meam[b][b][b], - this->Cmax_meam[b][b][b]); + Z1 = get_Zij(this->lattce_meam[b][b]); + Z2 = get_Zij2(this->lattce_meam[b][b], this->Cmin_meam[b][b][b], + this->Cmax_meam[b][b][b], arat, scrn); nmax = 10; if (scrn > 0.0) { for (n = 1; n <= nmax; n++) { @@ -259,12 +249,12 @@ MEAM::compute_pair_meam(void) if (this->lattce_meam[a][b] == B1 || this->lattce_meam[a][b] == B2) { // Add contributions to the B1 or B2 potential - get_Zij(&Z1, this->lattce_meam[a][b]); - get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][b], this->Cmin_meam[a][a][b], - this->Cmax_meam[a][a][b]); + Z1 = get_Zij(this->lattce_meam[a][b]); + Z2 = get_Zij2(this->lattce_meam[a][b], this->Cmin_meam[a][a][b], + this->Cmax_meam[a][a][b], arat, scrn); this->phir[nv2][j] = this->phir[nv2][j] - Z2 * scrn / (2 * Z1) * phiaa; - get_Zij2(&Z2, &arat, &scrn2, this->lattce_meam[a][b], this->Cmin_meam[b][b][a], - this->Cmax_meam[b][b][a]); + Z2 = get_Zij2(this->lattce_meam[a][b], this->Cmin_meam[b][b][a], + this->Cmax_meam[b][b][a], arat, scrn2); this->phir[nv2][j] = this->phir[nv2][j] - Z2 * scrn2 / (2 * Z1) * phibb; } else if (this->lattce_meam[a][b] == L12) { @@ -305,7 +295,7 @@ MEAM::compute_pair_meam(void) if (astar <= -3.0) this->phir[nv2][j] = zbl(r, this->ielt_meam[a], this->ielt_meam[b]); else if (astar > -3.0 && astar < -1.0) { - fcut(1 - (astar + 1.0) / (-3.0 + 1.0), &frac); + frac = fcut(1 - (astar + 1.0) / (-3.0 + 1.0)); phizbl = zbl(r, this->ielt_meam[a], this->ielt_meam[b]); this->phir[nv2][j] = frac * this->phir[nv2][j] + (1 - frac) * phizbl; } @@ -348,7 +338,7 @@ MEAM::phi_meam(double r, int a, int b) // get number of neighbors in the reference structure // Nref[i][j] = # of i's neighbors of type j - get_Zij(&Z12, this->lattce_meam[a][b]); + Z12 = get_Zij(this->lattce_meam[a][b]); get_densref(r, a, b, &rho01, &rho11, &rho21, &rho31, &rho02, &rho12, &rho22, &rho32); @@ -409,16 +399,16 @@ MEAM::phi_meam(double r, int a, int b) if (this->ibar_meam[a] <= 0) G1 = 1.0; else { - get_shpfcn(s1, this->lattce_meam[a][a]); + get_shpfcn(this->lattce_meam[a][a], s1); Gam1 = (s1[0] * t11av + s1[1] * t21av + s1[2] * t31av) / (Z1 * Z1); - G_gam(Gam1, this->ibar_meam[a], &G1, &errorflag); + G1 = G_gam(Gam1, this->ibar_meam[a], errorflag); } if (this->ibar_meam[b] <= 0) G2 = 1.0; else { - get_shpfcn(s2, this->lattce_meam[b][b]); + get_shpfcn(this->lattce_meam[b][b], s2); Gam2 = (s2[0] * t12av + s2[1] * t22av + s2[2] * t32av) / (Z2 * Z2); - G_gam(Gam2, this->ibar_meam[b], &G2, &errorflag); + G2 = G_gam(Gam2, this->ibar_meam[b], errorflag); } rho0_1 = this->rho0_meam[a] * Z1 * G1; rho0_2 = this->rho0_meam[b] * Z2 * G2; @@ -435,8 +425,8 @@ MEAM::phi_meam(double r, int a, int b) else Gam2 = Gam2 / (rho02 * rho02); - G_gam(Gam1, this->ibar_meam[a], &G1, &errorflag); - G_gam(Gam2, this->ibar_meam[b], &G2, &errorflag); + G1 = G_gam(Gam1, this->ibar_meam[a], errorflag); + G2 = G_gam(Gam2, this->ibar_meam[b], errorflag); if (this->mix_ref_t == 1) { rho_bkgd1 = rho0_1; rho_bkgd2 = rho0_2; @@ -488,9 +478,9 @@ MEAM::phi_meam(double r, int a, int b) } else if (this->lattce_meam[a][b] == L12) { phiaa = phi_meam(r, a, a); // account for second neighbor a-a potential here... - get_Zij(&Z1nn, this->lattce_meam[a][a]); - get_Zij2(&Z2nn, &arat, &scrn, this->lattce_meam[a][a], this->Cmin_meam[a][a][a], - this->Cmax_meam[a][a][a]); + Z1nn = get_Zij(this->lattce_meam[a][a]); + Z2nn = get_Zij2(this->lattce_meam[a][a], this->Cmin_meam[a][a][a], + this->Cmax_meam[a][a][a], arat, scrn); nmax = 10; if (scrn > 0.0) { for (n = 1; n <= nmax; n++) { @@ -529,9 +519,9 @@ MEAM::compute_reference_density(void) if (this->ibar_meam[a] <= 0) Gbar = 1.0; else { - get_shpfcn(shp, this->lattce_meam[a][a]); + get_shpfcn(this->lattce_meam[a][a], shp); gam = (this->t1_meam[a] * shp[0] + this->t2_meam[a] * shp[1] + this->t3_meam[a] * shp[2]) / (Z * Z); - G_gam(gam, this->ibar_meam[a], &Gbar, &errorflag); + Gbar = G_gam(gam, this->ibar_meam[a], errorflag); } // The zeroth order density in the reference structure, with @@ -543,8 +533,8 @@ MEAM::compute_reference_density(void) // add on the contribution from those (accounting for partial // screening) if (this->nn2_meam[a][a] == 1) { - get_Zij2(&Z2, &arat, &scrn, this->lattce_meam[a][a], this->Cmin_meam[a][a][a], - this->Cmax_meam[a][a][a]); + Z2 = get_Zij2(this->lattce_meam[a][a], this->Cmin_meam[a][a][a], + this->Cmax_meam[a][a][a], arat, scrn); rho0_2nn = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta0_meam[a] * (arat - 1)); rho0 = rho0 + Z2 * rho0_2nn * scrn; } @@ -553,34 +543,6 @@ MEAM::compute_reference_density(void) } } -//----------------------------------------------------------------------c -// Shape factors for various configurations -void -MEAM::get_shpfcn(double* s /* s(3) */, lattice_t latt) -{ - if (latt == FCC || latt == BCC || latt == B1 || latt == B2) { - s[0] = 0.0; - s[1] = 0.0; - s[2] = 0.0; - } else if (latt == HCP) { - s[0] = 0.0; - s[1] = 0.0; - s[2] = 1.0 / 3.0; - } else if (latt == DIA) { - s[0] = 0.0; - s[1] = 0.0; - s[2] = 32.0 / 9.0; - } else if (latt == DIM) { - s[0] = 1.0; - s[1] = 2.0 / 3.0; - // s(3) = 1.d0 - s[2] = 0.40; - } else { - s[0] = 0.0; - // call error('Lattice not defined in get_shpfcn.') - } -} - //------------------------------------------------------------------------------c // Average weighting factors for the reference structure void @@ -627,101 +589,13 @@ MEAM::get_tavref(double* t11av, double* t21av, double* t31av, double* t12av, dou } } -//------------------------------------------------------------------------------c -// Number of neighbors for the reference structure -void -MEAM::get_Zij(int* Zij, lattice_t latt) -{ - if (latt == FCC) - *Zij = 12; - else if (latt == BCC) - *Zij = 8; - else if (latt == HCP) - *Zij = 12; - else if (latt == B1) - *Zij = 6; - else if (latt == DIA) - *Zij = 4; - else if (latt == DIM) - *Zij = 1; - else if (latt == C11) - *Zij = 10; - else if (latt == L12) - *Zij = 12; - else if (latt == B2) - *Zij = 8; - else { - // call error('Lattice not defined in get_Zij.') - } -} - -//------------------------------------------------------------------------------c -// Zij2 = number of second neighbors, a = distance ratio R1/R2, and S = second -// neighbor screening function for lattice type "latt" - -void -MEAM::get_Zij2(int* Zij2, double* a, double* S, lattice_t latt, double cmin, double cmax) -{ - - double /*rratio,*/ C, x, sijk; - int numscr = 0; - - if (latt == BCC) { - *Zij2 = 6; - *a = 2.0 / sqrt(3.0); - numscr = 4; - } else if (latt == FCC) { - *Zij2 = 6; - *a = sqrt(2.0); - numscr = 4; - } else if (latt == DIA) { - *Zij2 = 0; - *a = sqrt(8.0 / 3.0); - numscr = 4; - if (cmin < 0.500001) { - // call error('can not do 2NN MEAM for dia') - } - } else if (latt == HCP) { - *Zij2 = 6; - *a = sqrt(2.0); - numscr = 4; - } else if (latt == B1) { - *Zij2 = 12; - *a = sqrt(2.0); - numscr = 2; - } else if (latt == L12) { - *Zij2 = 6; - *a = sqrt(2.0); - numscr = 4; - } else if (latt == B2) { - *Zij2 = 6; - *a = 2.0 / sqrt(3.0); - numscr = 4; - } else if (latt == DIM) { - // this really shouldn't be allowed; make sure screening is zero - *Zij2 = 0; - *a = 1; - *S = 0; - return; - } else { - // call error('Lattice not defined in get_Zij2.') - } - - // Compute screening for each first neighbor - C = 4.0 / (*a * *a) - 1.0; - x = (C - cmin) / (cmax - cmin); - fcut(x, &sijk); - // There are numscr first neighbors screening the second neighbors - *S = pow(sijk, numscr); -} - //------------------------------------------------------------------------------c void MEAM::get_sijk(double C, int i, int j, int k, double* sijk) { double x; x = (C - this->Cmin_meam[i][j][k]) / (this->Cmax_meam[i][j][k] - this->Cmin_meam[i][j][k]); - fcut(x, sijk); + *sijk = fcut(x); } //------------------------------------------------------------------------------c @@ -761,7 +635,7 @@ MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* *rho22 = 0.0; *rho32 = 0.0; - get_Zij(&Zij1nn, lat); + Zij1nn = get_Zij(lat); if (lat == FCC) { *rho01 = 12.0 * rhoa02; @@ -783,7 +657,7 @@ MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* *rho31 = 1.0 / 3.0 * rhoa32 * rhoa32; *rho32 = 1.0 / 3.0 * rhoa31 * rhoa31; } else if (lat == DIM) { - get_shpfcn(s, DIM); + get_shpfcn(DIM, s); *rho01 = rhoa02; *rho02 = rhoa01; *rho11 = s[0] * rhoa12 * rhoa12; @@ -820,7 +694,7 @@ MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* if (this->nn2_meam[a][b] == 1) { - get_Zij2(&Zij2nn, &arat, &scrn, lat, this->Cmin_meam[a][a][b], this->Cmax_meam[a][a][b]); + Zij2nn = get_Zij2(lat, this->Cmin_meam[a][a][b], this->Cmax_meam[a][a][b], arat, scrn); a1 = arat * r / this->re_meam[a][a] - 1.0; a2 = arat * r / this->re_meam[b][b] - 1.0; @@ -847,64 +721,12 @@ MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* *rho01 = *rho01 + Zij2nn * scrn * rhoa01nn; // Assume Zij2nn and arat don't depend on order, but scrn might - get_Zij2(&Zij2nn, &arat, &scrn, lat, this->Cmin_meam[b][b][a], this->Cmax_meam[b][b][a]); + Zij2nn = get_Zij2(lat, this->Cmin_meam[b][b][a], this->Cmax_meam[b][b][a], arat, scrn); *rho02 = *rho02 + Zij2nn * scrn * rhoa02nn; } } } -//--------------------------------------------------------------------- -// Compute ZBL potential -// -double -MEAM::zbl(double r, int z1, int z2) -{ - int i; - const double c[] = { 0.028171, 0.28022, 0.50986, 0.18175 }; - const double d[] = { 0.20162, 0.40290, 0.94229, 3.1998 }; - const double azero = 0.4685; - const double cc = 14.3997; - double a, x; - // azero = (9pi^2/128)^1/3 (0.529) Angstroms - a = azero / (pow(z1, 0.23) + pow(z2, 0.23)); - double result = 0.0; - x = r / a; - for (i = 0; i <= 3; i++) { - result = result + c[i] * MathSpecial::fm_exp(-d[i] * x); - } - if (r > 0.0) - result = result * z1 * z2 / r * cc; - return result; -} - -//--------------------------------------------------------------------- -// Compute Rose energy function, I.16 -// -double -MEAM::erose(double r, double re, double alpha, double Ec, double repuls, double attrac, int form) -{ - double astar, a3; - double result = 0.0; - - if (r > 0.0) { - astar = alpha * (r / re - 1.0); - a3 = 0.0; - if (astar >= 0) - a3 = attrac; - else if (astar < 0) - a3 = repuls; - - if (form == 1) - result = -Ec * (1 + astar + (-attrac + repuls / r) * pow(astar, 3)) * MathSpecial::fm_exp(-astar); - else if (form == 2) - result = -Ec * (1 + astar + a3 * pow(astar, 3)) * MathSpecial::fm_exp(-astar); - else - result = -Ec * (1 + astar + a3 * pow(astar, 3) / (r / re)) * MathSpecial::fm_exp(-astar); - } - return result; -} - -// ----------------------------------------------------------------------- void MEAM::interpolate_meam(int ind) diff --git a/src/USER-MEAMC/meam_setup_global.cpp b/src/USER-MEAMC/meam_setup_global.cpp index 07c6bfd699..7062d5ebca 100644 --- a/src/USER-MEAMC/meam_setup_global.cpp +++ b/src/USER-MEAMC/meam_setup_global.cpp @@ -2,21 +2,6 @@ #include using namespace LAMMPS_NS; -// -// declaration in pair_meam.h: -// -// void meam_setup_global(int *, int *, double *, int *, double *, double *, -// double *, double *, double *, double *, double *, -// double *, double *, double *, double *, double *, -// double *, double *, int *); -// -// call in pair_meam.cpp: -// -// meam_setup_global(&nelements,lat,z,ielement,atwt,alpha,b0,b1,b2,b3, -// alat,esub,asub,t0,t1,t2,t3,rozero,ibar); -// -// - void MEAM::meam_setup_global(int nelt, lattice_t* lat, double* z, int* ielement, double* atwt, double* alpha, double* b0, double* b1, double* b2, double* b3, double* alat, double* esub, diff --git a/src/USER-MEAMC/meam_setup_param.cpp b/src/USER-MEAMC/meam_setup_param.cpp index efcf26b104..585b5b5712 100644 --- a/src/USER-MEAMC/meam_setup_param.cpp +++ b/src/USER-MEAMC/meam_setup_param.cpp @@ -22,17 +22,6 @@ MEAM::meam_checkindex(int num, int lim, int nidx, int* idx /*idx(3)*/, int* ierr } } -// -// Declaration in pair_meam.h: -// -// void meam_setup_param(int *, double *, int *, int *, int *); -// -// in pair_meam.cpp -// -// meam_setup_param(&which,&value,&nindex,index,&errorflag); -// -// -// // The "which" argument corresponds to the index of the "keyword" array // in pair_meam.cpp: // -- GitLab From f6faad335cf5e4be18a410944c0de0d0ec71b3cb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 30 Jun 2017 11:37:18 -0400 Subject: [PATCH 389/593] update documentation for nb3/harmonic pair style according to e-mail to lammps-users --- doc/src/pair_nb3b_harmonic.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/src/pair_nb3b_harmonic.txt b/doc/src/pair_nb3b_harmonic.txt index 86a535acf3..3f7066c826 100644 --- a/doc/src/pair_nb3b_harmonic.txt +++ b/doc/src/pair_nb3b_harmonic.txt @@ -80,10 +80,12 @@ For a given entry, if the first three arguments are all different, then the entry is for the {K} and {theta_0} parameters (the cutoff in this case is irrelevant). -It is {not} required that the potential file contain entries for all -of the elements listed in the pair_coeff command. It can also contain -entries for additional elements not being used in a particular -simulation; LAMMPS ignores those entries. +It is required that the potential file contains entries for {all} +permutations of the elements listed in the pair_coeff command. +If certain combinations are not parameterized the corresponding +parameters should be set to zero. The potential file can also +contain entries for additional elements which are not used in +a particular simulation; LAMMPS ignores those entries. :line -- GitLab From 9dad95d101401f40a0019fa9155d1ceedde063c8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 30 Jun 2017 13:04:09 -0400 Subject: [PATCH 390/593] performance improvement through moving inlinable functions to header file --- src/USER-MEAMC/README | 4 +- src/USER-MEAMC/meam.h | 77 +++++++++++++- src/USER-MEAMC/meam_funcs.cpp | 187 +++++++++++----------------------- 3 files changed, 137 insertions(+), 131 deletions(-) diff --git a/src/USER-MEAMC/README b/src/USER-MEAMC/README index 19756d98a3..c1faf7c0c4 100644 --- a/src/USER-MEAMC/README +++ b/src/USER-MEAMC/README @@ -1,6 +1,6 @@ This package implements the MEAM/C potential as a LAMMPS pair style. -+==============================================================================+ +============================================================================== This package is a translation of the MEAM package to native C++. See that package as well as the Fortran code distributed in lib/meam for @@ -15,7 +15,7 @@ Translation by The original Fortran implementation was created by Greg Wagner (while at Sandia, now at Northwestern U). -+==============================================================================+ +============================================================================== Use "make yes-user-meamc" to enable this package when building LAMMPS. diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 475dfe9a6e..2f4a46ea3e 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -110,11 +110,80 @@ public: protected: // meam_funcs.cpp - static double fcut(const double xi); - static double dfcut(const double xi, double &dfc); - static double dCfunc(const double rij2, const double rik2, const double rjk2); - static void dCfunc2(const double rij2, const double rik2, const double rjk2, double &dCikj1, double &dCikj2); + //----------------------------------------------------------------------------- + // Cutoff function + // + static double fcut(const double xi) { + double a; + if (xi >= 1.0) + return 1.0; + else if (xi <= 0.0) + return 0.0; + else { + a = 1.0 - xi; + a *= a; a *= a; + a = 1.0 - a; + return a * a; + } + } + + //----------------------------------------------------------------------------- + // Cutoff function and derivative + // + static double dfcut(const double xi, double& dfc) { + double a, a3, a4, a1m4; + if (xi >= 1.0) { + dfc = 0.0; + return 1.0; + } else if (xi <= 0.0) { + dfc = 0.0; + return 0.0; + } else { + a = 1.0 - xi; + a3 = a * a * a; + a4 = a * a3; + a1m4 = 1.0-a4; + + dfc = 8 * a1m4 * a3; + return a1m4*a1m4; + } + } + + //----------------------------------------------------------------------------- + // Derivative of Cikj w.r.t. rij + // Inputs: rij,rij2,rik2,rjk2 + // + static double dCfunc(const double rij2, const double rik2, const double rjk2) { + double rij4, a, asq, b,denom; + + rij4 = rij2 * rij2; + a = rik2 - rjk2; + b = rik2 + rjk2; + asq = a*a; + denom = rij4 - asq; + denom = denom * denom; + return -4 * (-2 * rij2 * asq + rij4 * b + asq * b) / denom; + } + + //----------------------------------------------------------------------------- + // Derivative of Cikj w.r.t. rik and rjk + // Inputs: rij,rij2,rik2,rjk2 + // + static void dCfunc2(const double rij2, const double rik2, const double rjk2, + double& dCikj1, double& dCikj2) { + double rij4, rik4, rjk4, a, denom; + + rij4 = rij2 * rij2; + rik4 = rik2 * rik2; + rjk4 = rjk2 * rjk2; + a = rik2 - rjk2; + denom = rij4 - a * a; + denom = denom * denom; + dCikj1 = 4 * rij2 * (rij4 + rik4 + 2 * rik2 * rjk2 - 3 * rjk4 - 2 * rij2 * a) / denom; + dCikj2 = 4 * rij2 * (rij4 - 3 * rik4 + 2 * rik2 * rjk2 + rjk4 + 2 * rij2 * a) / denom; + } + double G_gam(const double gamma, const int ibar, int &errorflag) const; double dG_gam(const double gamma, const int ibar, double &dG) const; static double zbl(const double r, const int z1, const int z2); diff --git a/src/USER-MEAMC/meam_funcs.cpp b/src/USER-MEAMC/meam_funcs.cpp index bdef07e0b1..3c0dcb9d0b 100644 --- a/src/USER-MEAMC/meam_funcs.cpp +++ b/src/USER-MEAMC/meam_funcs.cpp @@ -21,87 +21,6 @@ using namespace LAMMPS_NS; -//----------------------------------------------------------------------------- -// Cutoff function -// -double -MEAM::fcut(const double xi) -{ - double a; - if (xi >= 1.0) - return 1.0; - else if (xi <= 0.0) - return 0.0; - else { - a = 1.0 - xi; - a = a * a; - a = a * a; - a = 1.0 - a; - return a * a; - // fc = xi - } -} - -//----------------------------------------------------------------------------- -// Cutoff function and derivative -// -double -MEAM::dfcut(const double xi, double& dfc) -{ - double a, a3, a4; - if (xi >= 1.0) { - dfc = 0.0; - return 1.0; - } else if (xi <= 0.0) { - dfc = 0.0; - return 0.0; - } else { - a = 1.0 - xi; - a3 = a * a * a; - a4 = a * a3; - dfc = 8 * (1.0 - a4) * a3; - return pow((1.0 - a4), 2); - // fc = xi - // dfc = 1.d0 - } -} - -//----------------------------------------------------------------------------- -// Derivative of Cikj w.r.t. rij -// Inputs: rij,rij2,rik2,rjk2 -// -double -MEAM::dCfunc(const double rij2, const double rik2, const double rjk2) -{ - double rij4, a, b, denom; - - rij4 = rij2 * rij2; - a = rik2 - rjk2; - b = rik2 + rjk2; - denom = rij4 - a * a; - denom = denom * denom; - return -4 * (-2 * rij2 * a * a + rij4 * b + a * a * b) / denom; -} - -//----------------------------------------------------------------------------- -// Derivative of Cikj w.r.t. rik and rjk -// Inputs: rij,rij2,rik2,rjk2 -// -void -MEAM::dCfunc2(const double rij2, const double rik2, const double rjk2, double& dCikj1, double& dCikj2) -{ - double rij4, rik4, rjk4, a, b, denom; - - rij4 = rij2 * rij2; - rik4 = rik2 * rik2; - rjk4 = rjk2 * rjk2; - a = rik2 - rjk2; - b = rik2 + rjk2; - denom = rij4 - a * a; - denom = denom * denom; - dCikj1 = 4 * rij2 * (rij4 + rik4 + 2 * rik2 * rjk2 - 3 * rjk4 - 2 * rij2 * a) / denom; - dCikj2 = 4 * rij2 * (rij4 - 3 * rik4 + 2 * rik2 * rjk2 + rjk4 + 2 * rij2 * a) / denom; -} //----------------------------------------------------------------------------- // Compute G(gamma) based on selection flag ibar: @@ -142,6 +61,7 @@ MEAM::G_gam(const double gamma, const int ibar, int& errorflag) const } } errorflag = 1; + return 0.0; } //----------------------------------------------------------------------------- @@ -195,6 +115,8 @@ MEAM::dG_gam(const double gamma, const int ibar, double& dG) const return G; } } + dG = 1.0; + return 0.0; } //----------------------------------------------------------------------------- @@ -313,6 +235,7 @@ MEAM::get_Zij(const lattice_t latt) return 8; // call error('Lattice not defined in get_Zij.') } + return 0; } //----------------------------------------------------------------------------- @@ -328,50 +251,64 @@ MEAM::get_Zij2(const lattice_t latt, const double cmin, const double cmax, doubl int Zij2 = 0, numscr = 0; switch (latt) { - case FCC: - Zij2 = 6; - a = sqrt(2.0); - numscr = 4; - break; - case BCC: - Zij2 = 6; - a = 2.0 / sqrt(3.0); - numscr = 4; - break; - case HCP: - Zij2 = 6; - a = sqrt(2.0); - numscr = 4; - break; - case B1: - Zij2 = 12; - a = sqrt(2.0); - numscr = 2; - break; - case DIA: - Zij2 = 0; - a = sqrt(8.0 / 3.0); - numscr = 4; - if (cmin < 0.500001) { + + case FCC: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; + + case BCC: + Zij2 = 6; + a = 2.0 / sqrt(3.0); + numscr = 4; + break; + + case HCP: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; + + case B1: + Zij2 = 12; + a = sqrt(2.0); + numscr = 2; + break; + + case DIA: + Zij2 = 0; + a = sqrt(8.0 / 3.0); + numscr = 4; + if (cmin < 0.500001) { // call error('can not do 2NN MEAM for dia') - } - break; - case DIM: - // this really shouldn't be allowed; make sure screening is zero - a = 1.0; - S = 0.0; - return 0; - case L12: - Zij2 = 6; - a = sqrt(2.0); - numscr = 4; - break; - case B2: - Zij2 = 6; - a = 2.0 / sqrt(3.0); - numscr = 4; - break; - // call error('Lattice not defined in get_Zij.') + } + break; + + case DIM: + // this really shouldn't be allowed; make sure screening is zero + a = 1.0; + S = 0.0; + return 0; + + case L12: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; + + case B2: + Zij2 = 6; + a = 2.0 / sqrt(3.0); + numscr = 4; + break; + case C11: + // unsupported lattice flag C11 in get_Zij + break; + default: + // unknown lattic flag in get Zij + // call error('Lattice not defined in get_Zij.') + break; } // Compute screening for each first neighbor @@ -379,6 +316,6 @@ MEAM::get_Zij2(const lattice_t latt, const double cmin, const double cmax, doubl x = (C - cmin) / (cmax - cmin); sijk = fcut(x); // There are numscr first neighbors screening the second neighbors - S = pow(sijk, numscr); + S = MathSpecial::powint(sijk, numscr); return Zij2; } -- GitLab From 711afe5062ff3a88d7acd16022be424ab60f1eda Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 30 Jun 2017 11:30:43 -0600 Subject: [PATCH 391/593] add single options to create_bonds command --- doc/src/create_bonds.txt | 185 ++++++++++++++++++------- src/create_bonds.cpp | 292 ++++++++++++++++++++++++++++++++++++--- src/create_bonds.h | 12 +- 3 files changed, 419 insertions(+), 70 deletions(-) diff --git a/doc/src/create_bonds.txt b/doc/src/create_bonds.txt index f5a4c1f505..af91a20352 100644 --- a/doc/src/create_bonds.txt +++ b/doc/src/create_bonds.txt @@ -10,53 +10,93 @@ create_bonds command :h3 [Syntax:] -create_bonds group-ID group2-ID btype rmin rmax :pre - -group-ID = ID of first group -group2-ID = ID of second group, bonds will be between atoms in the 2 groups -btype = bond type of created bonds -rmin = minimum distance between pair of atoms to bond together -rmax = minimum distance between pair of atoms to bond together :ul +create_bonds style args ... keyword value ... :pre + +style = {many} or {single/bond} or {single/angle} or {single/dihedral} :ule,l + {many} args = group-ID group2-ID btype rmin rmax + group-ID = ID of first group + group2-ID = ID of second group, bonds will be between atoms in the 2 groups + btype = bond type of created bonds + rmin = minimum distance between pair of atoms to bond together + rmax = minimum distance between pair of atoms to bond together + {single/bond} args = btype batom1 batom2 + btype = bond type of new bond + batom1,batom2 = atom IDs for two atoms in bond + {single/angle} args = atype aatom1 aatom2 aatom3 + atype = bond type of new angle + aatom1,aatom2,aatom3 = atom IDs for three atoms in angle + {single/dihedral} args = dtype datom1 datom2 datom3 datom4 + dtype = bond type of new dihedral + datom1,datom2,datom3,datom4 = atom IDs for four atoms in dihedral :pre +zero or more keyword/value pairs may be appended :l +keyword = {special} :l + {special} value = {yes} or {no} :pre +:ule [Examples:] -create_bonds all all 1 1.0 1.2 -create_bonds surf solvent 3 2.0 2.4 :pre +create_bonds many all all 1 1.0 1.2 +create_bonds many surf solvent 3 2.0 2.4 +create_bond single/bond 1 1 2 +create_bond single/angle 5 52 98 107 special no :pre [Description:] -Create bonds between pairs of atoms that meet specified distance -criteria. The bond interactions can then be computed during a -simulation by the bond potential defined by the -"bond_style"_bond_style.html and "bond_coeff"_bond_coeff.html -commands. This command is useful for adding bonds to a system, -e.g. between nearest neighbors in a lattice of atoms, without having -to enumerate all the bonds in the data file read by the -"read_data"_read_data.html command. - -Note that the flexibility of this command is limited. It can be used -several times to create different types of bond at different -distances. But it cannot typically create all the bonds that would -normally be defined in a complex system of molecules. Also note that -this command does not add any 3-body or 4-body interactions which, -depending on your model, may be induced by added bonds, -e.g. "angle"_angle_style.html, "dihedral"_dihedral_style.html, or -"improper"_improper_style.html interactions. - -All created bonds will be between pairs of atoms I,J where I is in one -of the two specified groups, and J is in the other. The two groups -can be the same, e.g. group "all". The created bonds will be of bond -type {btype}, where {btype} must be a value between 1 and the number -of bond types defined. This maximum value is set by the "bond types" -field in the header of the data file read by the -"read_data"_read_data.html command, or via the optional "bond/types" -argument of the "create_box"_create_box.html command. +Create bonds between pairs of atoms that meet a specified distance +criteria. Or create a single bond, angle, or dihedral between 2, 3, +or 4 specified atoms. + +The new bond (angle, diehdral) interactions will then be computed +during a simulation by the bond (angle, dihedral) potential defined by +the "bond_style"_bond_style.html, "bond_coeff"_bond_coeff.html, +"angle_style"_angle_style.html, "angle_coeff"_angle_coeff.html, +"dihedral_style"_dihedral_style.html, +"dihedral_coeff"_dihedral_coeff.html commands. + +The {many} style is useful for adding bonds to a system, e.g. between +nearest neighbors in a lattice of atoms, without having to enumerate +all the bonds in the data file read by the "read_data"_read_data.html +command. + +The {single} styles are useful for adding bonds, angles, dihedrals +to a system incrementally, then continuing a simulation. + +Note that this command does not auto-create any angle or dihedral +interactions when a bond is added. Nor does it auto-create any bonds +when an angle or dihedral is added. Or auto-create any angles when a +dihedral is added. Thus the flexibility of this command is limited. +It can be used several times to create different types of bond at +different distances. But it cannot typically auto-create all the +bonds or angles or dihedral that would normally be defined in a data +file for a complex system of molecules. + +NOTE: If the system has no bonds (angles, dihedrals) to begin with, or +if more bonds per atom are being added than currently exist, then you +must insure that the number of bond types and the maximum number of +bonds per atom are set to large enough values. And similarly for +angles and dihedrals. Otherwise an error may occur when too many +bonds (angles, dihedrals) are added to an atom. If the +"read_data"_read_data.html command is used to define the system, these +parameters can be set via the "bond types" and "extra bond per atom" +fields in the header section of the data file. If the +"create_box"_create_box.html command is used to define the system, +these 2 parameters can be set via its optional "bond/types" and +"extra/bond/per/atom" arguments. And similarly for angles and +dihedrals. See the doc pages for these 2 commands for details. + +:line + +The {many} style will create bonds between pairs of atoms I,J where I +is in one of the two specified groups, and J is in the other. The two +groups can be the same, e.g. group "all". The created bonds will be +of bond type {btype}, where {btype} must be a value between 1 and the +number of bond types defined. For a bond to be created, an I,J pair of atoms must be a distance D apart such that {rmin} <= D <= {rmax}. -The following settings must have been made in an input -script before this command is used: +The following settings must have been made in an input script before +this style is used: special_bonds weight for 1-2 interactions must be 0.0 a "pair_style"_pair_style.html must be defined @@ -69,8 +109,8 @@ cannot appear in the neighbor list, to avoid creation of duplicate bonds. The neighbor list for all atom type pairs must also extend to a distance that encompasses the {rmax} for new bonds to create. -An additional requirement is that your system must be ready to perform -a simulation. This means, for example, that all +An additional requirement for this style is that your system must be +ready to perform a simulation. This means, for example, that all "pair_style"_pair_style.html coefficients be set via the "pair_coeff"_pair_coeff.html command. A "bond_style"_bond_style.html command and all bond coefficients must also be set, even if no bonds @@ -83,17 +123,58 @@ executes, e.g. if you wish to use long-range Coulombic interactions via the "kspace_style"_kspace_style.html command for your subsequent simulation. -NOTE: If the system has no bonds to begin with, or if more bonds per -atom are being added than currently exist, then you must insure that -the number of bond types and the maximum number of bonds per atom are -set to large enough values. Otherwise an error may occur when too -many bonds are added to an atom. If the "read_data"_read_data.html -command is used to define the system, these 2 parameters can be set -via the "bond types" and "extra bond per atom" fields in the header -section of the data file. If the "create_box"_create_box.html command -is used to define the system, these 2 parameters can be set via its -optional "bond/types" and "extra/bond/per/atom" arguments. See the -doc pages for the 2 commands for details. +:line + +The {single/bond} style creates a signle bond of type {btype} between +two atoms with IDs {batom1} and {batom2}. {Btype} must be a value +between 1 and the number of bond types defined. + +The {single/angle} style creates a single angle of type {atype} +between three atoms with IDs {aatom1}, {aatom2}, and {aatom3}. The +ordering of the atoms is the same as in the {Angles} section of a data +file read by the "read_data"_read_data command. I.e. the 3 atoms are +ordered linearly within the angle; the central atom is {aatom2}. +{Atype} must be a value between 1 and the number of angle types +defined. + +The {single/dihedral} style creates a signle dihedral of type {btype} +between two atoms with IDs {batom1} and {batom2}. The ordering of the +atoms is the same as in the {Dihedrals} section of a data file read by +the "read_data"_read_data command. I.e. the 4 atoms are ordered +linearly within the dihedral. {Dtype} must be a value between 1 and +the number of dihedral types defined. + +:line + +The keyword {special} controls whether an internal list of special +bonds is created after one or more bonds, or a single angle or +dihedral is added to the system. + +The default value is {yes}. A value of {no} cannot be used +with the {many} style. + +This is an expensive operation since the bond topology for the system +must be walked to find all 1-2, 1-3, 1-4 interactions to store in an +internal list, which is used when pairwise interactions are weighted; +see the "special_bonds"_special_bonds.html command for details. + +Thus if you are adding a few bonds or a large list of angles all at +the same time, by using this command repeatedly, it is more efficient +to only trigger the internal list to be created once, after the last +bond (or angle, or dihedral) is added: + +create_bonds single/bond 5 52 98 special no +create_bonds single/bond 5 73 74 special no +... +create_bonds single/bond 5 17 386 special no +create_bonds single/bond 4 112 183 special yes :pre + +Note that you MUST insure the internal list is re-built after the last +bond (angle, dihedral) is added, before performing a simulation. +Otherwise pairwise interactions will not be properly excluded or +weighted. LAMMPS does NOT check that you have done this correctly. + +:line [Restrictions:] @@ -105,4 +186,6 @@ molecule template files via the "molecule"_molecule.html and "create_atoms"_create_atoms.html, "delete_bonds"_delete_bonds.html -[Default:] none +[Default:] + +The keyword default is special = yes. diff --git a/src/create_bonds.cpp b/src/create_bonds.cpp index 7b3ca714a6..c62c6df91c 100644 --- a/src/create_bonds.cpp +++ b/src/create_bonds.cpp @@ -11,6 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- + Contributing authors: Mike Salerno (NRL) added single methods +------------------------------------------------------------------------- */ + #include #include #include "create_bonds.h" @@ -27,6 +31,8 @@ using namespace LAMMPS_NS; +enum{MANY,SBOND,SANGLE,SDIHEDRAL}; + /* ---------------------------------------------------------------------- */ CreateBonds::CreateBonds(LAMMPS *lmp) : Pointers(lmp) {} @@ -42,25 +48,104 @@ void CreateBonds::command(int narg, char **arg) if (atom->molecular != 1) error->all(FLERR,"Cannot use create_bonds with non-molecular system"); - if (narg != 5) error->all(FLERR,"Illegal create_bonds command"); + if (narg < 4) error->all(FLERR,"Illegal create_bonds command"); // parse args - int igroup = group->find(arg[0]); - if (igroup == -1) error->all(FLERR,"Cannot find create_bonds group ID"); - int group1bit = group->bitmask[igroup]; - igroup = group->find(arg[1]); - if (igroup == -1) error->all(FLERR,"Cannot find create_bonds group ID"); - int group2bit = group->bitmask[igroup]; + int style; + + int iarg; + if (strcmp(arg[0],"many") == 0) { + style = MANY; + if (narg != 6) error->all(FLERR,"Illegal create_bonds command"); + igroup = group->find(arg[1]); + if (igroup == -1) error->all(FLERR,"Cannot find create_bonds group ID"); + group1bit = group->bitmask[igroup]; + igroup = group->find(arg[2]); + if (igroup == -1) error->all(FLERR,"Cannot find create_bonds group ID"); + group2bit = group->bitmask[igroup]; + btype = force->inumeric(FLERR,arg[3]); + rmin = force->numeric(FLERR,arg[4]); + rmax = force->numeric(FLERR,arg[5]); + if (rmin > rmax) error->all(FLERR,"Illegal create_bonds command"); + iarg = 6; + } else if (strcmp(arg[0],"single/bond") == 0) { + style = SBOND; + if (narg < 4) error->all(FLERR,"Illegal create_bonds command"); + btype = force->inumeric(FLERR,arg[1]); + batom1 = force->tnumeric(FLERR,arg[2]); + batom2 = force->tnumeric(FLERR,arg[3]); + iarg = 4; + } else if (strcmp(arg[0],"single/angle") == 0) { + style = SANGLE; + if (narg < 5) error->all(FLERR,"Illegal create_bonds command"); + atype = force->inumeric(FLERR,arg[1]); + aatom1 = force->tnumeric(FLERR,arg[2]); + aatom2 = force->tnumeric(FLERR,arg[3]); + aatom3 = force->tnumeric(FLERR,arg[4]); + iarg = 5; + } else if (strcmp(arg[0],"single/dihedral") == 0) { + style = SDIHEDRAL; + if (narg < 6) error->all(FLERR,"Illegal create_bonds command"); + dtype = force->inumeric(FLERR,arg[1]); + datom1 = force->tnumeric(FLERR,arg[2]); + datom2 = force->tnumeric(FLERR,arg[3]); + datom3 = force->tnumeric(FLERR,arg[4]); + datom4 = force->tnumeric(FLERR,arg[5]); + iarg = 6; + } else error->all(FLERR,"Illegal create_bonds command"); + + // optional args + + int specialflag = 1; + + while (iarg < narg) { + if (strcmp(arg[iarg],"special") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal create_bonds command"); + if (strcmp(arg[iarg+1],"yes") == 0) specialflag = 1; + else if (strcmp(arg[iarg+1],"no") == 0) specialflag = 0; + else error->all(FLERR,"Illegal create_bonds command"); + iarg += 2; + } else error->all(FLERR,"Illegal create_bonds command"); + } + + // error checks + + if (style == MANY) { + if (btype <= 0 || btype > atom->nbondtypes) + error->all(FLERR,"Invalid bond type in create_bonds command"); + if (specialflag == 0) + error->all(FLERR,"Cannot use special no with create_bonds many"); + } else if (style == SBOND) { + if (btype <= 0 || btype > atom->nbondtypes) + error->all(FLERR,"Invalid bond type in create_bonds command"); + } else if (style == SANGLE) { + if (atype <= 0 || atype > atom->nangletypes) + error->all(FLERR,"Invalid angle type in create_bonds command"); + } else if (style == SDIHEDRAL) { + if (dtype <= 0 || dtype > atom->ndihedraltypes) + error->all(FLERR,"Invalid dihedral type in create_bonds command"); + } + + // invoke creation method + + if (style == MANY) many(); + else if (style == SBOND) single_bond(); + else if (style == SANGLE) single_angle(); + else if (style == SDIHEDRAL) single_dihedral(); - int btype = force->inumeric(FLERR,arg[2]); - double rmin = force->numeric(FLERR,arg[3]); - double rmax = force->numeric(FLERR,arg[4]); + // trigger special list build - if (btype <= 0 || btype > atom->nbondtypes) - error->all(FLERR,"Invalid bond type in create_bonds command"); - if (rmin > rmax) error->all(FLERR,"Illegal create_bonds command"); + if (specialflag) { + Special special(lmp); + special.build(); + } +} +/* ---------------------------------------------------------------------- */ + +void CreateBonds::many() +{ double rminsq = rmin*rmin; double rmaxsq = rmax*rmax; @@ -221,9 +306,184 @@ void CreateBonds::command(int narg, char **arg) nadd_bonds,atom->nbonds); } } +} + +/* ---------------------------------------------------------------------- */ + +void CreateBonds::single_bond() +{ + int m; + + // check that 2 atoms exist + + int count = 0; + if (atom->map(batom1) >= 0) count++; + if (atom->map(batom2) >= 0) count++; - // re-trigger special list build + int allcount; + MPI_Allreduce(&count,&allcount,1,MPI_INT,MPI_SUM,world); + if (allcount != 2) + error->all(FLERR,"Create_bonds single/bond atoms do not exist"); - Special special(lmp); - special.build(); + // create bond once or 2x if newton_bond set + + int *num_bond = atom->num_bond; + int **bond_type = atom->bond_type; + tagint **bond_atom = atom->bond_atom; + + if ((m = atom->map(batom1)) >= 0) { + if (num_bond[m] == atom->bond_per_atom) + error->one(FLERR,"New bond exceeded bonds per atom in create_bonds"); + bond_type[m][num_bond[m]] = btype; + bond_atom[m][num_bond[m]] = batom2; + num_bond[m]++; + } + + if (force->newton_bond) return; + + if ((m = atom->map(batom2)) >= 0) { + if (num_bond[m] == atom->bond_per_atom) + error->one(FLERR,"New bond exceeded bonds per atom in create_bonds"); + bond_type[m][num_bond[m]] = btype; + bond_atom[m][num_bond[m]] = batom1; + num_bond[m]++; + } +} + +/* ---------------------------------------------------------------------- */ + +void CreateBonds::single_angle() +{ + int m; + + // check that 3 atoms exist + + int count = 0; + if (atom->map(aatom1) >= 0) count++; + if (atom->map(aatom2) >= 0) count++; + if (atom->map(aatom3) >= 0) count++; + + int allcount; + MPI_Allreduce(&count,&allcount,1,MPI_INT,MPI_SUM,world); + if (allcount != 3) + error->all(FLERR,"Create_bonds single/angle atoms do not exist"); + + // create angle once or 3x if newton_bond set + + int *num_angle = atom->num_angle; + int **angle_type = atom->angle_type; + tagint **angle_atom1 = atom->angle_atom1; + tagint **angle_atom2 = atom->angle_atom2; + tagint **angle_atom3 = atom->angle_atom3; + + if ((m = atom->map(aatom2)) >= 0) { + if (num_angle[m] == atom->angle_per_atom) + error->one(FLERR,"New angle exceeded angles per atom in create_bonds"); + angle_type[m][num_angle[m]] = atype; + angle_atom1[m][num_angle[m]] = aatom1; + angle_atom2[m][num_angle[m]] = aatom2; + angle_atom3[m][num_angle[m]] = aatom3; + num_angle[m]++; + } + + if (force->newton_bond) return; + + if ((m = atom->map(aatom1)) >= 0) { + if (num_angle[m] == atom->angle_per_atom) + error->one(FLERR,"New angle exceeded angles per atom in create_bonds"); + angle_type[m][num_angle[m]] = atype; + angle_atom1[m][num_angle[m]] = aatom1; + angle_atom2[m][num_angle[m]] = aatom2; + angle_atom3[m][num_angle[m]] = aatom3; + num_angle[m]++; + } + + if ((m = atom->map(aatom3)) >= 0) { + if (num_angle[m] == atom->angle_per_atom) + error->one(FLERR,"New angle exceeded angles per atom in create_bonds"); + angle_type[m][num_angle[m]] = atype; + angle_atom1[m][num_angle[m]] = aatom1; + angle_atom2[m][num_angle[m]] = aatom2; + angle_atom3[m][num_angle[m]] = aatom3; + num_angle[m]++; + } +} + +/* ---------------------------------------------------------------------- */ + +void CreateBonds::single_dihedral() +{ + int m; + + // check that 4 atoms exist + + int count = 0; + if (atom->map(datom1) >= 0) count++; + if (atom->map(datom2) >= 0) count++; + if (atom->map(datom3) >= 0) count++; + if (atom->map(datom4) >= 0) count++; + + int allcount; + MPI_Allreduce(&count,&allcount,1,MPI_INT,MPI_SUM,world); + if (allcount != 4) + error->all(FLERR,"Create_bonds single/dihedral atoms do not exist"); + + // create bond once or 4x if newton_bond set + + int *num_dihedral = atom->num_dihedral; + int **dihedral_type = atom->dihedral_type; + tagint **dihedral_atom1 = atom->dihedral_atom1; + tagint **dihedral_atom2 = atom->dihedral_atom2; + tagint **dihedral_atom3 = atom->dihedral_atom3; + tagint **dihedral_atom4 = atom->dihedral_atom4; + + if ((m = atom->map(datom2)) >= 0) { + if (num_dihedral[m] == atom->dihedral_per_atom) + error->one(FLERR, + "New dihedral exceeded dihedrals per atom in create_bonds"); + dihedral_type[m][num_dihedral[m]] = dtype; + dihedral_atom1[m][num_dihedral[m]] = datom1; + dihedral_atom2[m][num_dihedral[m]] = datom2; + dihedral_atom3[m][num_dihedral[m]] = datom3; + dihedral_atom4[m][num_dihedral[m]] = datom4; + num_dihedral[m]++; + } + + if (force->newton_bond) return; + + if ((m = atom->map(datom1)) >= 0) { + if (num_dihedral[m] == atom->dihedral_per_atom) + error->one(FLERR, + "New dihedral exceeded dihedrals per atom in create_bonds"); + dihedral_type[m][num_dihedral[m]] = dtype; + dihedral_atom1[m][num_dihedral[m]] = datom1; + dihedral_atom2[m][num_dihedral[m]] = datom2; + dihedral_atom3[m][num_dihedral[m]] = datom3; + dihedral_atom4[m][num_dihedral[m]] = datom4; + num_dihedral[m]++; + } + + if ((m = atom->map(datom3)) >= 0) { + if (num_dihedral[m] == atom->dihedral_per_atom) + error->one(FLERR, + "New dihedral exceeded dihedrals per atom in create_bonds"); + dihedral_type[m][num_dihedral[m]] = dtype; + dihedral_atom1[m][num_dihedral[m]] = datom1; + dihedral_atom2[m][num_dihedral[m]] = datom2; + dihedral_atom3[m][num_dihedral[m]] = datom3; + dihedral_atom4[m][num_dihedral[m]] = datom4; + num_dihedral[m]++; + } + + if ((m = atom->map(datom4)) >= 0) { + if (num_dihedral[m] == atom->dihedral_per_atom) + error->one(FLERR, + "New dihedral exceeded dihedrals per atom in create_bonds"); + dihedral_type[m][num_dihedral[m]] = dtype; + dihedral_atom1[m][num_dihedral[m]] = datom1; + dihedral_atom2[m][num_dihedral[m]] = datom2; + dihedral_atom3[m][num_dihedral[m]] = datom3; + dihedral_atom4[m][num_dihedral[m]] = datom4; + num_dihedral[m]++; + } } diff --git a/src/create_bonds.h b/src/create_bonds.h index 24b1596e37..175c74f5bc 100644 --- a/src/create_bonds.h +++ b/src/create_bonds.h @@ -30,9 +30,15 @@ class CreateBonds : protected Pointers { void command(int, char **); private: - inline int sbmask(int j) const { - return j >> SBBITS & 3; - } + int igroup,group1bit,group2bit; + int btype,atype,dtype; + tagint batom1,batom2,aatom1,aatom2,aatom3,datom1,datom2,datom3,datom4; + double rmin,rmax; + + void many(); + void single_bond(); + void single_angle(); + void single_dihedral(); }; } -- GitLab From b445f8eadf67e9ab9053da8389d95389a1ce3618 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 30 Jun 2017 14:59:08 -0400 Subject: [PATCH 392/593] spell-check new additions to create_bonds doc page --- doc/src/create_bonds.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/create_bonds.txt b/doc/src/create_bonds.txt index af91a20352..5a87852169 100644 --- a/doc/src/create_bonds.txt +++ b/doc/src/create_bonds.txt @@ -46,7 +46,7 @@ Create bonds between pairs of atoms that meet a specified distance criteria. Or create a single bond, angle, or dihedral between 2, 3, or 4 specified atoms. -The new bond (angle, diehdral) interactions will then be computed +The new bond (angle, dihedral) interactions will then be computed during a simulation by the bond (angle, dihedral) potential defined by the "bond_style"_bond_style.html, "bond_coeff"_bond_coeff.html, "angle_style"_angle_style.html, "angle_coeff"_angle_coeff.html, @@ -125,7 +125,7 @@ simulation. :line -The {single/bond} style creates a signle bond of type {btype} between +The {single/bond} style creates a single bond of type {btype} between two atoms with IDs {batom1} and {batom2}. {Btype} must be a value between 1 and the number of bond types defined. @@ -137,7 +137,7 @@ ordered linearly within the angle; the central atom is {aatom2}. {Atype} must be a value between 1 and the number of angle types defined. -The {single/dihedral} style creates a signle dihedral of type {btype} +The {single/dihedral} style creates a single dihedral of type {btype} between two atoms with IDs {batom1} and {batom2}. The ordering of the atoms is the same as in the {Dihedrals} section of a data file read by the "read_data"_read_data command. I.e. the 4 atoms are ordered -- GitLab From a490e04d240285f11209c1e669dcaef0bae62eb0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 30 Jun 2017 15:07:43 -0400 Subject: [PATCH 393/593] add backward compatibility item to pull request template --- .github/PULL_REQUEST_TEMPLATE.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d1cb2d4809..af539f7a10 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,11 @@ _Briefly describe the new feature(s), enhancement(s), or bugfix(es) included in ## Implementation Notes -_Provide any relevant details about how the changes are implemented, how correctness was verified, how other features, if any, in LAMMPS are affected_ +_Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected_ + +## Backward Compatibility + +_Please state whether any changes in the pull request break backward compatibility for inputs, and - if yes - explain what has been changed and why_ ## Post Submission Checklist -- GitLab From 1fff30af90e7809774cc832c0da89e515260eae9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 30 Jun 2017 15:30:06 -0400 Subject: [PATCH 394/593] update or create example outputs for meam and meam/c --- ...ct16.meam.icc.1 => log.19May17.meam.g++.1} | 37 ++-- ...ct16.meam.icc.4 => log.19May17.meam.g++.4} | 37 ++-- ...ear.icc.1 => log.19May17.meam.shear.g++.1} | 117 +++++----- ...ear.icc.4 => log.19May17.meam.shear.g++.4} | 129 ++++++----- examples/meam/log.19May17.meamc.g++.1 | 95 ++++++++ examples/meam/log.19May17.meamc.g++.4 | 95 ++++++++ examples/meam/log.19May17.meamc.shear.g++.1 | 207 ++++++++++++++++++ examples/meam/log.19May17.meamc.shear.g++.4 | 207 ++++++++++++++++++ 8 files changed, 786 insertions(+), 138 deletions(-) rename examples/meam/{log.5Oct16.meam.icc.1 => log.19May17.meam.g++.1} (68%) rename examples/meam/{log.5Oct16.meam.icc.4 => log.19May17.meam.g++.4} (68%) rename examples/meam/{log.5Oct16.meam.shear.icc.1 => log.19May17.meam.shear.g++.1} (55%) rename examples/meam/{log.5Oct16.meam.shear.icc.4 => log.19May17.meam.shear.g++.4} (55%) create mode 100644 examples/meam/log.19May17.meamc.g++.1 create mode 100644 examples/meam/log.19May17.meamc.g++.4 create mode 100644 examples/meam/log.19May17.meamc.shear.g++.1 create mode 100644 examples/meam/log.19May17.meamc.shear.g++.4 diff --git a/examples/meam/log.5Oct16.meam.icc.1 b/examples/meam/log.19May17.meam.g++.1 similarity index 68% rename from examples/meam/log.5Oct16.meam.icc.1 rename to examples/meam/log.19May17.meam.g++.1 index 200da68e06..a98de97f8e 100644 --- a/examples/meam/log.5Oct16.meam.icc.1 +++ b/examples/meam/log.19May17.meam.g++.1 @@ -1,4 +1,5 @@ -LAMMPS (5 Oct 2016) +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task # Test of MEAM potential for SiC system units metal @@ -34,13 +35,23 @@ timestep 0.001 run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 4.3 ghost atom cutoff = 4.3 - binsize = 2.15 -> bins = 6 6 6 -Memory usage per processor = 7.39054 Mbytes + binsize = 2.15, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.103 | 8.103 | 8.103 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -636.38121 0 -636.38121 -76571.819 10 1807.8862 -666.21959 0 -636.54126 -150571.49 @@ -53,20 +64,20 @@ Step Temp E_pair E_mol TotEng Press 80 2126.0903 -671.43755 0 -636.53557 -97475.831 90 2065.755 -670.4349 0 -636.52338 -95858.837 100 2051.4553 -670.20799 0 -636.53122 -107068.9 -Loop time of 0.094512 on 1 procs for 100 steps with 128 atoms +Loop time of 0.0864418 on 1 procs for 100 steps with 128 atoms -Performance: 91.417 ns/day, 0.263 hours/ns, 1058.067 timesteps/s -99.4% CPU use with 1 MPI tasks x no OpenMP threads +Performance: 99.952 ns/day, 0.240 hours/ns, 1156.848 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.091268 | 0.091268 | 0.091268 | 0.0 | 96.57 -Neigh | 0.0021861 | 0.0021861 | 0.0021861 | 0.0 | 2.31 -Comm | 0.00059438 | 0.00059438 | 0.00059438 | 0.0 | 0.63 -Output | 9.0837e-05 | 9.0837e-05 | 9.0837e-05 | 0.0 | 0.10 -Modify | 0.00024438 | 0.00024438 | 0.00024438 | 0.0 | 0.26 -Other | | 0.000128 | | | 0.14 +Pair | 0.082592 | 0.082592 | 0.082592 | 0.0 | 95.55 +Neigh | 0.0028124 | 0.0028124 | 0.0028124 | 0.0 | 3.25 +Comm | 0.00049043 | 0.00049043 | 0.00049043 | 0.0 | 0.57 +Output | 0.00014329 | 0.00014329 | 0.00014329 | 0.0 | 0.17 +Modify | 0.00025415 | 0.00025415 | 0.00025415 | 0.0 | 0.29 +Other | | 0.0001497 | | | 0.17 Nlocal: 128 ave 128 max 128 min Histogram: 1 0 0 0 0 0 0 0 0 0 diff --git a/examples/meam/log.5Oct16.meam.icc.4 b/examples/meam/log.19May17.meam.g++.4 similarity index 68% rename from examples/meam/log.5Oct16.meam.icc.4 rename to examples/meam/log.19May17.meam.g++.4 index 51a6619e3b..adc34d08aa 100644 --- a/examples/meam/log.5Oct16.meam.icc.4 +++ b/examples/meam/log.19May17.meam.g++.4 @@ -1,4 +1,5 @@ -LAMMPS (5 Oct 2016) +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task # Test of MEAM potential for SiC system units metal @@ -34,13 +35,23 @@ timestep 0.001 run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 4.3 ghost atom cutoff = 4.3 - binsize = 2.15 -> bins = 6 6 6 -Memory usage per processor = 7.319 Mbytes + binsize = 2.15, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.024 | 8.026 | 8.027 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -636.38121 0 -636.38121 -76571.819 10 1807.8862 -666.21959 0 -636.54126 -150571.49 @@ -53,20 +64,20 @@ Step Temp E_pair E_mol TotEng Press 80 2126.0903 -671.43755 0 -636.53557 -97475.831 90 2065.755 -670.4349 0 -636.52338 -95858.837 100 2051.4553 -670.20799 0 -636.53122 -107068.9 -Loop time of 0.0350628 on 4 procs for 100 steps with 128 atoms +Loop time of 0.0389078 on 4 procs for 100 steps with 128 atoms -Performance: 246.415 ns/day, 0.097 hours/ns, 2852.026 timesteps/s -98.4% CPU use with 4 MPI tasks x no OpenMP threads +Performance: 222.063 ns/day, 0.108 hours/ns, 2570.177 timesteps/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.030952 | 0.031776 | 0.032203 | 0.3 | 90.63 -Neigh | 0.00058937 | 0.00061423 | 0.00063896 | 0.1 | 1.75 -Comm | 0.0018125 | 0.0022421 | 0.0030777 | 1.1 | 6.39 -Output | 0.00018525 | 0.00019765 | 0.00021911 | 0.1 | 0.56 -Modify | 8.0585e-05 | 9.0539e-05 | 9.7752e-05 | 0.1 | 0.26 -Other | | 0.0001422 | | | 0.41 +Pair | 0.031958 | 0.033267 | 0.034691 | 0.6 | 85.50 +Neigh | 0.00079155 | 0.00086409 | 0.00098801 | 0.0 | 2.22 +Comm | 0.0025704 | 0.0041765 | 0.005573 | 1.9 | 10.73 +Output | 0.0002749 | 0.00029588 | 0.00033569 | 0.0 | 0.76 +Modify | 9.4891e-05 | 0.00010347 | 0.00011587 | 0.0 | 0.27 +Other | | 0.000201 | | | 0.52 Nlocal: 32 ave 36 max 30 min Histogram: 1 2 0 0 0 0 0 0 0 1 diff --git a/examples/meam/log.5Oct16.meam.shear.icc.1 b/examples/meam/log.19May17.meam.shear.g++.1 similarity index 55% rename from examples/meam/log.5Oct16.meam.shear.icc.1 rename to examples/meam/log.19May17.meam.shear.g++.1 index 57f48d5ee2..77b9688455 100644 --- a/examples/meam/log.5Oct16.meam.shear.icc.1 +++ b/examples/meam/log.19May17.meam.shear.g++.1 @@ -1,4 +1,5 @@ -LAMMPS (5 Oct 2016) +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task # 3d metal shear simulation units metal @@ -62,38 +63,48 @@ fix_modify 3 temp new3d thermo 25 thermo_modify temp new3d -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:474) +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) timestep 0.001 run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 5 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 4.3 ghost atom cutoff = 4.3 - binsize = 2.15 -> bins = 27 17 5 -Memory usage per processor = 8.55725 Mbytes + binsize = 2.15, bins = 27 17 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 9.788 | 9.788 | 9.788 Mbytes Step Temp E_pair E_mol TotEng Press Volume 0 300 -8232.7767 0 -8179.1466 1386.6643 19547.02 25 222.78953 -8188.1215 0 -8148.2941 9095.9008 19547.02 50 300 -8149.7654 0 -8096.1353 10633.141 19684.382 75 304.80657 -8163.4557 0 -8108.9665 7045.457 19759.745 100 300 -8173.6884 0 -8120.0584 5952.521 19886.589 -Loop time of 1.72323 on 1 procs for 100 steps with 1912 atoms +Loop time of 1.58103 on 1 procs for 100 steps with 1912 atoms -Performance: 5.014 ns/day, 4.787 hours/ns, 58.031 timesteps/s -99.8% CPU use with 1 MPI tasks x no OpenMP threads +Performance: 5.465 ns/day, 4.392 hours/ns, 63.250 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 1.7026 | 1.7026 | 1.7026 | 0.0 | 98.80 -Neigh | 0.014496 | 0.014496 | 0.014496 | 0.0 | 0.84 -Comm | 0.0015783 | 0.0015783 | 0.0015783 | 0.0 | 0.09 -Output | 6.0081e-05 | 6.0081e-05 | 6.0081e-05 | 0.0 | 0.00 -Modify | 0.0034628 | 0.0034628 | 0.0034628 | 0.0 | 0.20 -Other | | 0.00101 | | | 0.06 +Pair | 1.5561 | 1.5561 | 1.5561 | 0.0 | 98.42 +Neigh | 0.018544 | 0.018544 | 0.018544 | 0.0 | 1.17 +Comm | 0.0013864 | 0.0013864 | 0.0013864 | 0.0 | 0.09 +Output | 0.00011396 | 0.00011396 | 0.00011396 | 0.0 | 0.01 +Modify | 0.0038245 | 0.0038245 | 0.0038245 | 0.0 | 0.24 +Other | | 0.001096 | | | 0.07 Nlocal: 1912 ave 1912 max 1912 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -128,11 +139,11 @@ fix_modify 3 temp new2d thermo 100 thermo_modify temp new2d -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:474) +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) reset_timestep 0 run 3000 -Memory usage per processor = 8.73384 Mbytes +Per MPI rank memory allocation (min/avg/max) = 9.964 | 9.964 | 9.964 Mbytes Step Temp E_pair E_mol TotEng Press Volume 0 300.39988 -8173.6884 0 -8137.8874 4992.9811 19894.297 100 292.06374 -8177.7096 0 -8142.9021 2568.3762 19871.53 @@ -144,53 +155,53 @@ Step Temp E_pair E_mol TotEng Press Volume 700 300 -8148.1328 0 -8112.3794 3506.9234 20435.302 800 300 -8139.1821 0 -8103.4288 3628.3957 20509.519 900 305.03425 -8126.7734 0 -8090.4201 5316.2206 20638.992 - 1000 304.00321 -8112.1616 0 -8075.9311 7441.9639 20767.243 - 1100 304.14051 -8096.5041 0 -8060.2573 9646.698 20888.167 - 1200 302.78461 -8080.5931 0 -8044.5079 11516.21 20995.917 - 1300 308.67046 -8061.6724 0 -8024.8857 11496.487 21130.013 - 1400 309.83019 -8046.2701 0 -8009.3452 12926.847 21247.271 - 1500 300 -8035.0322 0 -7999.2789 15346.188 21370.637 - 1600 300 -8030.6678 0 -7994.9144 14802.342 21496.446 - 1700 300 -8024.5988 0 -7988.8454 13177.445 21611.262 - 1800 300 -8023.045 0 -7987.2916 10240.041 21740.735 - 1900 300 -8028.2797 0 -7992.5263 6912.1441 21866.544 - 2000 300 -8036.4487 0 -8000.6953 3561.8365 21977.695 - 2100 300 -8037.8249 0 -8002.0715 2879.2618 22109.611 - 2200 300 -8033.6682 0 -7997.9148 4936.3695 22224.427 - 2300 304.49349 -8033.4561 0 -7997.1673 5593.0915 22356.343 - 2400 300 -8033.2969 0 -7997.5436 7537.0891 22473.601 - 2500 300 -8033.1874 0 -7997.4341 11476.447 22598.189 - 2600 307.77395 -8026.9234 0 -7990.2436 15758.81 22720.333 - 2700 300 -8021.1736 0 -7985.4203 17948.896 22832.706 - 2800 300 -8017.0863 0 -7981.3329 17154.618 22957.293 - 2900 300 -8012.0514 0 -7976.298 13224.292 23089.209 - 3000 304.58031 -8008.1654 0 -7971.8661 8572.9227 23211.354 -Loop time of 55.136 on 1 procs for 3000 steps with 1912 atoms - -Performance: 4.701 ns/day, 5.105 hours/ns, 54.411 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads + 1000 304.00321 -8112.1616 0 -8075.9311 7441.9638 20767.243 + 1100 304.14047 -8096.5041 0 -8060.2573 9646.6976 20888.167 + 1200 302.78457 -8080.5931 0 -8044.5079 11516.209 20995.917 + 1300 308.67054 -8061.6724 0 -8024.8857 11496.479 21130.013 + 1400 309.8301 -8046.27 0 -8009.3452 12926.835 21247.271 + 1500 300 -8035.0321 0 -7999.2788 15346.455 21370.637 + 1600 300 -8030.6657 0 -7994.9123 14802.869 21496.446 + 1700 300 -8024.5251 0 -7988.7718 13176.923 21611.262 + 1800 300 -8022.9963 0 -7987.243 10260.665 21741.956 + 1900 300 -8028.0522 0 -7992.2988 6955.1367 21867.765 + 2000 300 -8037.2708 0 -8001.5175 3520.3749 21987.467 + 2100 300 -8035.9945 0 -8000.2412 3237.6121 22109.611 + 2200 300 -8036.1882 0 -8000.4348 4295.1386 22223.205 + 2300 300 -8032.7689 0 -7997.0155 6231.2346 22355.121 + 2400 300 -8034.6621 0 -7998.9088 8585.3799 22468.716 + 2500 300 -8031.7774 0 -7996.0241 11627.871 22587.196 + 2600 300 -8024.032 0 -7988.2786 16254.69 22716.669 + 2700 308.64215 -8017.407 0 -7980.6237 18440.226 22835.149 + 2800 300 -8015.7348 0 -7979.9814 17601.716 22957.293 + 2900 305.82558 -8013.7448 0 -7977.2972 14123.494 23089.209 + 3000 300 -8011.0289 0 -7975.2755 9957.2884 23205.247 +Loop time of 51.9315 on 1 procs for 3000 steps with 1912 atoms + +Performance: 4.991 ns/day, 4.808 hours/ns, 57.768 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 54.317 | 54.317 | 54.317 | -nan | 98.51 -Neigh | 0.63189 | 0.63189 | 0.63189 | 0.0 | 1.15 -Comm | 0.051245 | 0.051245 | 0.051245 | 0.0 | 0.09 -Output | 0.0005548 | 0.0005548 | 0.0005548 | 0.0 | 0.00 -Modify | 0.10452 | 0.10452 | 0.10452 | 0.0 | 0.19 -Other | | 0.03128 | | | 0.06 +Pair | 50.918 | 50.918 | 50.918 | 0.0 | 98.05 +Neigh | 0.81033 | 0.81033 | 0.81033 | 0.0 | 1.56 +Comm | 0.047331 | 0.047331 | 0.047331 | 0.0 | 0.09 +Output | 0.0011976 | 0.0011976 | 0.0011976 | 0.0 | 0.00 +Modify | 0.11889 | 0.11889 | 0.11889 | 0.0 | 0.23 +Other | | 0.03606 | | | 0.07 Nlocal: 1912 ave 1912 max 1912 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1667 ave 1667 max 1667 min +Nghost: 1672 ave 1672 max 1672 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 23365 ave 23365 max 23365 min +Neighs: 23557 ave 23557 max 23557 min Histogram: 1 0 0 0 0 0 0 0 0 0 -FullNghs: 46730 ave 46730 max 46730 min +FullNghs: 47114 ave 47114 max 47114 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 46730 -Ave neighs/atom = 24.4404 +Total # of neighbors = 47114 +Ave neighs/atom = 24.6412 Neighbor list builds = 221 Dangerous builds = 0 -Total wall time: 0:00:56 +Total wall time: 0:00:53 diff --git a/examples/meam/log.5Oct16.meam.shear.icc.4 b/examples/meam/log.19May17.meam.shear.g++.4 similarity index 55% rename from examples/meam/log.5Oct16.meam.shear.icc.4 rename to examples/meam/log.19May17.meam.shear.g++.4 index 2f197de920..84cb94f4b9 100644 --- a/examples/meam/log.5Oct16.meam.shear.icc.4 +++ b/examples/meam/log.19May17.meam.shear.g++.4 @@ -1,4 +1,5 @@ -LAMMPS (5 Oct 2016) +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task # 3d metal shear simulation units metal @@ -62,38 +63,48 @@ fix_modify 3 temp new3d thermo 25 thermo_modify temp new3d -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:474) +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) timestep 0.001 run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 5 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 4.3 ghost atom cutoff = 4.3 - binsize = 2.15 -> bins = 27 17 5 -Memory usage per processor = 7.74146 Mbytes + binsize = 2.15, bins = 27 17 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.954 | 8.957 | 8.959 Mbytes Step Temp E_pair E_mol TotEng Press Volume 0 300 -8232.7767 0 -8179.1466 1386.6643 19547.02 25 221.59546 -8187.6813 0 -8148.0673 9100.4509 19547.02 50 300 -8150.0685 0 -8096.4384 10317.407 19685.743 75 307.76021 -8164.6669 0 -8109.6496 6289.7138 19757.814 100 300 -8176.5141 0 -8122.884 4162.2559 19873.327 -Loop time of 0.469502 on 4 procs for 100 steps with 1912 atoms +Loop time of 0.482293 on 4 procs for 100 steps with 1912 atoms -Performance: 18.402 ns/day, 1.304 hours/ns, 212.992 timesteps/s -99.7% CPU use with 4 MPI tasks x no OpenMP threads +Performance: 17.914 ns/day, 1.340 hours/ns, 207.343 timesteps/s +98.7% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.44052 | 0.45213 | 0.45813 | 1.0 | 96.30 -Neigh | 0.0036478 | 0.0037832 | 0.003854 | 0.1 | 0.81 -Comm | 0.0055377 | 0.011533 | 0.02316 | 6.5 | 2.46 -Output | 9.0837e-05 | 9.8228e-05 | 0.00011325 | 0.1 | 0.02 -Modify | 0.00098062 | 0.0010158 | 0.0010564 | 0.1 | 0.22 -Other | | 0.0009408 | | | 0.20 +Pair | 0.44374 | 0.45604 | 0.46922 | 1.4 | 94.56 +Neigh | 0.0047338 | 0.0049097 | 0.0051899 | 0.2 | 1.02 +Comm | 0.0054841 | 0.019044 | 0.031472 | 6.9 | 3.95 +Output | 0.00012755 | 0.00013644 | 0.00015831 | 0.0 | 0.03 +Modify | 0.0011139 | 0.0011852 | 0.0012643 | 0.2 | 0.25 +Other | | 0.0009753 | | | 0.20 Nlocal: 478 ave 492 max 465 min Histogram: 2 0 0 0 0 0 0 0 1 1 @@ -128,11 +139,11 @@ fix_modify 3 temp new2d thermo 100 thermo_modify temp new2d -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:474) +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) reset_timestep 0 run 3000 -Memory usage per processor = 7.78572 Mbytes +Per MPI rank memory allocation (min/avg/max) = 8.999 | 9.002 | 9.005 Mbytes Step Temp E_pair E_mol TotEng Press Volume 0 295.32113 -8176.5141 0 -8141.3183 3169.3113 19886.93 100 292.00251 -8176.5358 0 -8141.7356 -825.04802 19918.765 @@ -144,53 +155,53 @@ Step Temp E_pair E_mol TotEng Press Volume 700 296.44479 -8149.7914 0 -8114.4618 1985.4155 20421.046 800 307.75738 -8139.1649 0 -8102.487 4319.078 20513.183 900 304.61422 -8126.9246 0 -8090.6214 6654.0963 20640.213 - 1000 300 -8113.8464 0 -8078.0931 7760.1242 20768.465 - 1100 300.17874 -8097.7469 0 -8061.9722 8438.1263 20874.731 - 1200 306.01444 -8083.3367 0 -8046.8665 10835.585 20994.432 + 1000 300 -8113.8464 0 -8078.0931 7760.1239 20768.465 + 1100 300.17873 -8097.7469 0 -8061.9722 8438.126 20874.731 + 1200 306.01441 -8083.3367 0 -8046.8665 10835.586 20994.432 1300 300 -8067.022 0 -8031.2686 11216.067 21126.348 - 1400 300 -8053.223 0 -8017.4697 10570.21 21253.378 - 1500 300 -8043.4848 0 -8007.7314 11360.829 21375.523 - 1600 300 -8034.6216 0 -7998.8683 11371.642 21498.889 - 1700 300 -8028.6774 0 -7992.924 9595.8772 21613.705 - 1800 300 -8033.0808 0 -7997.3274 8767.6261 21743.178 - 1900 303.30302 -8035.1958 0 -7999.0488 8059.5152 21859.215 - 2000 300 -8025.0857 0 -7989.3323 9308.9938 21980.138 - 2100 300 -8041.5796 0 -8005.8263 6656.0066 22108.39 - 2200 300 -8039.6315 0 -8003.8781 7532.9687 22226.87 - 2300 300 -8053.203 0 -8017.4497 8466.9094 22356.343 - 2400 300 -8050.9154 0 -8015.162 11784.136 22467.494 - 2500 300 -8037.6394 0 -8001.886 16464.786 22588.417 - 2600 300 -8030.9221 0 -7995.1688 16807.326 22719.112 - 2700 300 -8025.2102 0 -7989.4569 13729.61 22837.592 - 2800 300 -8014.5312 0 -7978.7779 6784.6283 22953.629 - 2900 300 -8007.4768 0 -7971.7234 1362.3131 23084.324 - 3000 300 -7994.5614 0 -7958.808 -1726.5273 23194.254 -Loop time of 14.8108 on 4 procs for 3000 steps with 1912 atoms - -Performance: 17.501 ns/day, 1.371 hours/ns, 202.555 timesteps/s -99.8% CPU use with 4 MPI tasks x no OpenMP threads + 1400 300 -8053.223 0 -8017.4697 10570.206 21253.378 + 1500 300 -8043.4849 0 -8007.7315 11360.766 21375.523 + 1600 300 -8034.621 0 -7998.8676 11371.584 21498.889 + 1700 300 -8028.6783 0 -7992.925 9596.524 21613.705 + 1800 300 -8033.0818 0 -7997.3285 8767.2651 21743.178 + 1900 303.18912 -8035.194 0 -7999.0606 8059.9558 21859.215 + 2000 300 -8025.0327 0 -7989.2794 9305.7521 21980.138 + 2100 300 -8041.4626 0 -8005.7092 6623.8789 22108.39 + 2200 300 -8040.3133 0 -8004.5599 7512.9368 22225.648 + 2300 300 -8055.6567 0 -8019.9033 8281.354 22344.128 + 2400 304.05922 -8050.289 0 -8014.0518 11964.826 22476.044 + 2500 305.75646 -8037.0481 0 -8000.6087 16594.032 22595.746 + 2600 307.71105 -8031.2253 0 -7994.5529 18381.745 22708.119 + 2700 307.397 -8026.5338 0 -7989.8988 13944.653 22829.042 + 2800 309.3455 -8020.2305 0 -7983.3634 7037.4046 22954.851 + 2900 301.2859 -8010.4731 0 -7974.5665 3843.8972 23072.109 + 3000 303.29908 -8000.0395 0 -7963.8929 364.90172 23207.69 +Loop time of 14.5278 on 4 procs for 3000 steps with 1912 atoms + +Performance: 17.842 ns/day, 1.345 hours/ns, 206.500 timesteps/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 14.05 | 14.237 | 14.332 | 2.9 | 96.12 -Neigh | 0.1592 | 0.16414 | 0.1671 | 0.8 | 1.11 -Comm | 0.26002 | 0.35589 | 0.54696 | 18.8 | 2.40 -Output | 0.00061679 | 0.00065172 | 0.0007441 | 0.2 | 0.00 -Modify | 0.02895 | 0.030174 | 0.03104 | 0.5 | 0.20 -Other | | 0.02338 | | | 0.16 - -Nlocal: 478 ave 509 max 448 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 799.25 ave 844 max 756 min -Histogram: 1 1 0 0 0 0 0 1 0 1 -Neighs: 5813.25 ave 6081 max 5602 min -Histogram: 2 0 0 0 0 0 1 0 0 1 -FullNghs: 11626.5 ave 12151 max 11205 min -Histogram: 1 1 0 0 0 0 1 0 0 1 - -Total # of neighbors = 46506 -Ave neighs/atom = 24.3232 -Neighbor list builds = 225 +Pair | 13.872 | 13.929 | 13.998 | 1.4 | 95.88 +Neigh | 0.20891 | 0.21114 | 0.21272 | 0.3 | 1.45 +Comm | 0.25364 | 0.32377 | 0.37706 | 8.9 | 2.23 +Output | 0.0011427 | 0.0012097 | 0.0013931 | 0.3 | 0.01 +Modify | 0.033687 | 0.033991 | 0.034694 | 0.2 | 0.23 +Other | | 0.02871 | | | 0.20 + +Nlocal: 478 ave 509 max 445 min +Histogram: 1 1 0 0 0 0 0 0 1 1 +Nghost: 804 ave 845 max 759 min +Histogram: 1 1 0 0 0 0 0 0 1 1 +Neighs: 5827 ave 6177 max 5496 min +Histogram: 1 0 0 1 0 1 0 0 0 1 +FullNghs: 11654 ave 12330 max 11039 min +Histogram: 1 0 0 1 0 1 0 0 0 1 + +Total # of neighbors = 46616 +Ave neighs/atom = 24.3808 +Neighbor list builds = 223 Dangerous builds = 0 Total wall time: 0:00:15 diff --git a/examples/meam/log.19May17.meamc.g++.1 b/examples/meam/log.19May17.meamc.g++.1 new file mode 100644 index 0000000000..4aa1f7bcc3 --- /dev/null +++ b/examples/meam/log.19May17.meamc.g++.1 @@ -0,0 +1,95 @@ +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task +# Test of MEAM potential for SiC system + +units metal +boundary p p p + +atom_style atomic + +read_data data.meam + orthogonal box = (-6 -6 -6) to (5.97232 5.97232 5.97232) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 128 atoms + +pair_style meam/c +pair_coeff * * library.meam Si C SiC.meam Si C +Reading potential file library.meam with DATE: 2012-06-29 +Reading potential file SiC.meam with DATE: 2007-06-11 + +neighbor 0.3 bin +neigh_modify delay 10 + +fix 1 all nve +thermo 10 +timestep 0.001 + +#dump 1 all atom 50 dump.meam + +#dump 2 all image 10 image.*.jpg element element # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 3 element Si C + +#dump 3 all movie 10 movie.mpg element element # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 3 element Si C + +run 100 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/c, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/c, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.103 | 8.103 | 8.103 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -636.38121 0 -636.38121 -76571.819 + 10 1807.8862 -666.21959 0 -636.54126 -150571.49 + 20 1932.4467 -668.2581 0 -636.53498 -120223.52 + 30 1951.3652 -668.58139 0 -636.54771 -100508.4 + 40 2172.5974 -672.22715 0 -636.5617 -110753.34 + 50 2056.9149 -670.33108 0 -636.56468 -105418.07 + 60 1947.9564 -668.52788 0 -636.55015 -111413.04 + 70 1994.7712 -669.28849 0 -636.54225 -109645.76 + 80 2126.0903 -671.43755 0 -636.53557 -97475.832 + 90 2065.7549 -670.4349 0 -636.52338 -95858.836 + 100 2051.4553 -670.20799 0 -636.53122 -107068.89 +Loop time of 0.0778153 on 1 procs for 100 steps with 128 atoms + +Performance: 111.032 ns/day, 0.216 hours/ns, 1285.094 timesteps/s +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.073801 | 0.073801 | 0.073801 | 0.0 | 94.84 +Neigh | 0.0029731 | 0.0029731 | 0.0029731 | 0.0 | 3.82 +Comm | 0.00047708 | 0.00047708 | 0.00047708 | 0.0 | 0.61 +Output | 0.00015664 | 0.00015664 | 0.00015664 | 0.0 | 0.20 +Modify | 0.00025702 | 0.00025702 | 0.00025702 | 0.0 | 0.33 +Other | | 0.0001504 | | | 0.19 + +Nlocal: 128 ave 128 max 128 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 543 ave 543 max 543 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1526 ave 1526 max 1526 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 3052 ave 3052 max 3052 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 3052 +Ave neighs/atom = 23.8438 +Neighbor list builds = 10 +Dangerous builds = 10 +Total wall time: 0:00:00 diff --git a/examples/meam/log.19May17.meamc.g++.4 b/examples/meam/log.19May17.meamc.g++.4 new file mode 100644 index 0000000000..3701fb80d8 --- /dev/null +++ b/examples/meam/log.19May17.meamc.g++.4 @@ -0,0 +1,95 @@ +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task +# Test of MEAM potential for SiC system + +units metal +boundary p p p + +atom_style atomic + +read_data data.meam + orthogonal box = (-6 -6 -6) to (5.97232 5.97232 5.97232) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 128 atoms + +pair_style meam/c +pair_coeff * * library.meam Si C SiC.meam Si C +Reading potential file library.meam with DATE: 2012-06-29 +Reading potential file SiC.meam with DATE: 2007-06-11 + +neighbor 0.3 bin +neigh_modify delay 10 + +fix 1 all nve +thermo 10 +timestep 0.001 + +#dump 1 all atom 50 dump.meam + +#dump 2 all image 10 image.*.jpg element element # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 3 element Si C + +#dump 3 all movie 10 movie.mpg element element # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 3 element Si C + +run 100 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/c, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/c, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.024 | 8.026 | 8.027 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -636.38121 0 -636.38121 -76571.819 + 10 1807.8862 -666.21959 0 -636.54126 -150571.49 + 20 1932.4467 -668.2581 0 -636.53498 -120223.52 + 30 1951.3652 -668.58139 0 -636.54771 -100508.4 + 40 2172.5974 -672.22715 0 -636.5617 -110753.34 + 50 2056.9149 -670.33108 0 -636.56468 -105418.07 + 60 1947.9564 -668.52788 0 -636.55015 -111413.04 + 70 1994.7712 -669.28849 0 -636.54225 -109645.76 + 80 2126.0903 -671.43755 0 -636.53557 -97475.832 + 90 2065.7549 -670.4349 0 -636.52338 -95858.836 + 100 2051.4553 -670.20799 0 -636.53122 -107068.89 +Loop time of 0.037066 on 4 procs for 100 steps with 128 atoms + +Performance: 233.097 ns/day, 0.103 hours/ns, 2697.887 timesteps/s +97.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.029985 | 0.031596 | 0.033021 | 0.8 | 85.24 +Neigh | 0.0007906 | 0.00085384 | 0.00088596 | 0.0 | 2.30 +Comm | 0.0025654 | 0.0040313 | 0.0057514 | 2.2 | 10.88 +Output | 0.00027013 | 0.00029153 | 0.00033426 | 0.0 | 0.79 +Modify | 9.5367e-05 | 0.00010639 | 0.00012016 | 0.0 | 0.29 +Other | | 0.0001866 | | | 0.50 + +Nlocal: 32 ave 36 max 30 min +Histogram: 1 2 0 0 0 0 0 0 0 1 +Nghost: 293.75 ave 305 max 285 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Neighs: 381.5 ave 413 max 334 min +Histogram: 1 0 0 0 1 0 0 0 0 2 +FullNghs: 763 ave 866 max 678 min +Histogram: 1 0 1 0 0 1 0 0 0 1 + +Total # of neighbors = 3052 +Ave neighs/atom = 23.8438 +Neighbor list builds = 10 +Dangerous builds = 10 +Total wall time: 0:00:00 diff --git a/examples/meam/log.19May17.meamc.shear.g++.1 b/examples/meam/log.19May17.meamc.shear.g++.1 new file mode 100644 index 0000000000..5eb06592d8 --- /dev/null +++ b/examples/meam/log.19May17.meamc.shear.g++.1 @@ -0,0 +1,207 @@ +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task +# 3d metal shear simulation + +units metal +boundary s s p + +atom_style atomic +lattice fcc 3.52 +Lattice spacing in x,y,z = 3.52 3.52 3.52 +region box block 0 16.0 0 10.0 0 2.828427 +create_box 3 box +Created orthogonal box = (0 0 0) to (56.32 35.2 9.95606) + 1 by 1 by 1 MPI processor grid + +lattice fcc 3.52 orient x 1 0 0 orient y 0 1 1 orient z 0 -1 1 origin 0.5 0 0 +Lattice spacing in x,y,z = 3.52 4.97803 4.97803 +create_atoms 1 box +Created 1912 atoms + +pair_style meam/c +pair_coeff * * library.meam Ni4 Ni.meam Ni4 Ni4 Ni4 +Reading potential file library.meam with DATE: 2012-06-29 +Reading potential file Ni.meam with DATE: 2007-06-11 + +neighbor 0.3 bin +neigh_modify delay 5 + +region lower block INF INF INF 0.9 INF INF +region upper block INF INF 6.1 INF INF INF +group lower region lower +264 atoms in group lower +group upper region upper +264 atoms in group upper +group boundary union lower upper +528 atoms in group boundary +group mobile subtract all boundary +1384 atoms in group mobile + +set group lower type 2 + 264 settings made for type +set group upper type 3 + 264 settings made for type + +# void + +#region void cylinder z 8 5 2.5 INF INF +#delete_atoms region void + +# temp controllers + +compute new3d mobile temp +compute new2d mobile temp/partial 0 1 1 + +# equilibrate + +velocity mobile create 300.0 5812775 temp new3d +fix 1 all nve +fix 2 boundary setforce 0.0 0.0 0.0 + +fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 +fix_modify 3 temp new3d + +thermo 25 +thermo_modify temp new3d +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) + +timestep 0.001 +run 100 +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 27 17 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/c, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/c, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 9.788 | 9.788 | 9.788 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 300 -8232.7767 0 -8179.1466 1386.6643 19547.02 + 25 222.78953 -8188.1215 0 -8148.2941 9095.9003 19547.02 + 50 300 -8149.7654 0 -8096.1353 10633.139 19684.382 + 75 304.80657 -8163.4557 0 -8108.9665 7045.4555 19759.745 + 100 300 -8173.6884 0 -8120.0584 5952.5197 19886.589 +Loop time of 1.46986 on 1 procs for 100 steps with 1912 atoms + +Performance: 5.878 ns/day, 4.083 hours/ns, 68.034 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.445 | 1.445 | 1.445 | 0.0 | 98.31 +Neigh | 0.018564 | 0.018564 | 0.018564 | 0.0 | 1.26 +Comm | 0.0012956 | 0.0012956 | 0.0012956 | 0.0 | 0.09 +Output | 0.00012612 | 0.00012612 | 0.00012612 | 0.0 | 0.01 +Modify | 0.0038197 | 0.0038197 | 0.0038197 | 0.0 | 0.26 +Other | | 0.001095 | | | 0.07 + +Nlocal: 1912 ave 1912 max 1912 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1672 ave 1672 max 1672 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 23806 ave 23806 max 23806 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 47612 ave 47612 max 47612 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 47612 +Ave neighs/atom = 24.9017 +Neighbor list builds = 5 +Dangerous builds = 0 + +# shear + +velocity upper set 1.0 0 0 +velocity mobile ramp vx 0.0 1.0 y 1.4 8.6 sum yes + +unfix 3 +fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 +fix_modify 3 temp new2d + +#dump 1 all atom 500 dump.meam.shear + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 +#dump_modify 2 pad 4 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 +#dump_modify 3 pad 4 + +thermo 100 +thermo_modify temp new2d +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) + +reset_timestep 0 +run 3000 +Per MPI rank memory allocation (min/avg/max) = 9.964 | 9.964 | 9.964 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 300.39988 -8173.6884 0 -8137.8874 4992.9799 19894.297 + 100 292.06374 -8177.7096 0 -8142.9021 2568.3756 19871.53 + 200 306.69894 -8177.1357 0 -8140.584 874.24118 20047.24 + 300 295.68216 -8172.9213 0 -8137.6825 -1049.0799 20091.759 + 400 308.99955 -8169.6355 0 -8132.8096 -1785.9554 20121.698 + 500 303.85688 -8163.9842 0 -8127.7712 -150.60892 20183.813 + 600 300 -8157.7627 0 -8122.0093 1492.8514 20279.887 + 700 300 -8148.1314 0 -8112.3781 3507.1949 20435.297 + 800 300 -8139.1805 0 -8103.4272 3628.5908 20509.519 + 900 305.03217 -8126.7741 0 -8090.421 5313.7881 20638.992 + 1000 303.7648 -8112.1574 0 -8075.9554 7433.3181 20767.243 + 1100 302.39719 -8096.1399 0 -8060.1009 9681.7685 20888.167 + 1200 304.04919 -8080.7022 0 -8044.4663 11621.974 21011.532 + 1300 303.56395 -8062.0984 0 -8025.9203 11410.793 21125.127 + 1400 309.92338 -8046.0008 0 -8009.0648 12408.158 21246.05 + 1500 300 -8034.7094 0 -7998.956 14845.312 21363.308 + 1600 300 -8028.4585 0 -7992.7051 15120.908 21489.117 + 1700 308.23904 -8015.9618 0 -7979.2265 14714.73 21612.483 + 1800 300 -8013.5458 0 -7977.7924 11955.065 21737.07 + 1900 300 -8012.2984 0 -7976.545 6667.1353 21854.329 + 2000 300 -8025.6019 0 -7989.8485 2006.6545 21981.359 + 2100 300 -8027.6823 0 -7991.9289 16.47633 22109.611 + 2200 300 -8029.6905 0 -7993.9372 -603.98293 22224.427 + 2300 300 -8033.2663 0 -7997.513 -464.68645 22351.457 + 2400 300 -8040.6863 0 -8004.9329 -640.54641 22467.494 + 2500 300 -8037.0332 0 -8001.2799 1504.2444 22587.196 + 2600 300 -8036.0909 0 -8000.3375 4190.2052 22708.119 + 2700 308.97892 -8028.5269 0 -7991.7035 5755.7418 22832.706 + 2800 305.27189 -8023.8286 0 -7987.4469 2611.7551 22962.179 + 2900 301.94251 -8017.4523 0 -7981.4675 358.11928 23078.216 + 3000 305.67682 -8009.853 0 -7973.4231 -2345.487 23197.918 +Loop time of 48.351 on 1 procs for 3000 steps with 1912 atoms + +Performance: 5.361 ns/day, 4.477 hours/ns, 62.046 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 47.356 | 47.356 | 47.356 | 0.0 | 97.94 +Neigh | 0.79977 | 0.79977 | 0.79977 | 0.0 | 1.65 +Comm | 0.043133 | 0.043133 | 0.043133 | 0.0 | 0.09 +Output | 0.0011899 | 0.0011899 | 0.0011899 | 0.0 | 0.00 +Modify | 0.11648 | 0.11648 | 0.11648 | 0.0 | 0.24 +Other | | 0.03404 | | | 0.07 + +Nlocal: 1912 ave 1912 max 1912 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1662 ave 1662 max 1662 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 23143 ave 23143 max 23143 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 46286 ave 46286 max 46286 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 46286 +Ave neighs/atom = 24.2082 +Neighbor list builds = 220 +Dangerous builds = 0 +Total wall time: 0:00:49 diff --git a/examples/meam/log.19May17.meamc.shear.g++.4 b/examples/meam/log.19May17.meamc.shear.g++.4 new file mode 100644 index 0000000000..136459a44a --- /dev/null +++ b/examples/meam/log.19May17.meamc.shear.g++.4 @@ -0,0 +1,207 @@ +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task +# 3d metal shear simulation + +units metal +boundary s s p + +atom_style atomic +lattice fcc 3.52 +Lattice spacing in x,y,z = 3.52 3.52 3.52 +region box block 0 16.0 0 10.0 0 2.828427 +create_box 3 box +Created orthogonal box = (0 0 0) to (56.32 35.2 9.95606) + 2 by 2 by 1 MPI processor grid + +lattice fcc 3.52 orient x 1 0 0 orient y 0 1 1 orient z 0 -1 1 origin 0.5 0 0 +Lattice spacing in x,y,z = 3.52 4.97803 4.97803 +create_atoms 1 box +Created 1912 atoms + +pair_style meam/c +pair_coeff * * library.meam Ni4 Ni.meam Ni4 Ni4 Ni4 +Reading potential file library.meam with DATE: 2012-06-29 +Reading potential file Ni.meam with DATE: 2007-06-11 + +neighbor 0.3 bin +neigh_modify delay 5 + +region lower block INF INF INF 0.9 INF INF +region upper block INF INF 6.1 INF INF INF +group lower region lower +264 atoms in group lower +group upper region upper +264 atoms in group upper +group boundary union lower upper +528 atoms in group boundary +group mobile subtract all boundary +1384 atoms in group mobile + +set group lower type 2 + 264 settings made for type +set group upper type 3 + 264 settings made for type + +# void + +#region void cylinder z 8 5 2.5 INF INF +#delete_atoms region void + +# temp controllers + +compute new3d mobile temp +compute new2d mobile temp/partial 0 1 1 + +# equilibrate + +velocity mobile create 300.0 5812775 temp new3d +fix 1 all nve +fix 2 boundary setforce 0.0 0.0 0.0 + +fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 +fix_modify 3 temp new3d + +thermo 25 +thermo_modify temp new3d +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) + +timestep 0.001 +run 100 +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 27 17 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/c, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/c, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.954 | 8.957 | 8.959 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 300 -8232.7767 0 -8179.1466 1386.6643 19547.02 + 25 221.59546 -8187.6813 0 -8148.0673 9100.4505 19547.02 + 50 300 -8150.0685 0 -8096.4384 10317.406 19685.743 + 75 307.76021 -8164.6669 0 -8109.6496 6289.7123 19757.814 + 100 300 -8176.5141 0 -8122.884 4162.2548 19873.327 +Loop time of 0.435874 on 4 procs for 100 steps with 1912 atoms + +Performance: 19.822 ns/day, 1.211 hours/ns, 229.424 timesteps/s +98.8% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.4092 | 0.41563 | 0.42184 | 0.7 | 95.35 +Neigh | 0.0048575 | 0.004932 | 0.0049984 | 0.1 | 1.13 +Comm | 0.0069079 | 0.013151 | 0.019513 | 4.2 | 3.02 +Output | 0.00012398 | 0.00013405 | 0.00015688 | 0.0 | 0.03 +Modify | 0.0011275 | 0.0011509 | 0.0011735 | 0.1 | 0.26 +Other | | 0.0008795 | | | 0.20 + +Nlocal: 478 ave 492 max 465 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Nghost: 809 ave 822 max 795 min +Histogram: 1 1 0 0 0 0 0 0 0 2 +Neighs: 5916 ave 6133 max 5658 min +Histogram: 1 0 0 1 0 0 0 0 1 1 +FullNghs: 11832 ave 12277 max 11299 min +Histogram: 1 0 0 1 0 0 0 0 1 1 + +Total # of neighbors = 47328 +Ave neighs/atom = 24.7531 +Neighbor list builds = 5 +Dangerous builds = 0 + +# shear + +velocity upper set 1.0 0 0 +velocity mobile ramp vx 0.0 1.0 y 1.4 8.6 sum yes + +unfix 3 +fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 +fix_modify 3 temp new2d + +#dump 1 all atom 500 dump.meam.shear + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 +#dump_modify 2 pad 4 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 +#dump_modify 3 pad 4 + +thermo 100 +thermo_modify temp new2d +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) + +reset_timestep 0 +run 3000 +Per MPI rank memory allocation (min/avg/max) = 8.999 | 9.002 | 9.005 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 295.32113 -8176.5141 0 -8141.3183 3169.3102 19886.93 + 100 292.0025 -8176.5358 0 -8141.7356 -825.04852 19918.765 + 200 306.11682 -8176.7718 0 -8140.2895 -1370.6881 19948.878 + 300 300 -8172.6262 0 -8136.8729 -1735.9794 20085.715 + 400 306.88504 -8168.4351 0 -8131.8612 -933.05532 20117.008 + 500 308.99111 -8166.2909 0 -8129.466 -1049.3442 20198.267 + 600 304.22555 -8158.0946 0 -8121.8377 583.69142 20328.753 + 700 296.41606 -8149.7777 0 -8114.4515 1986.7982 20421.032 + 800 307.88628 -8139.1709 0 -8102.4776 4311.4142 20513.183 + 900 303.37209 -8126.9382 0 -8090.7829 6712.7316 20640.213 + 1000 300 -8113.7973 0 -8078.044 7630.2594 20750.143 + 1100 300.07815 -8098.1383 0 -8062.3756 8423.7063 20879.616 + 1200 300 -8083.3163 0 -8047.563 10772.917 21000.539 + 1300 300 -8066.6741 0 -8030.9208 10834.336 21128.791 + 1400 300 -8050.8799 0 -8015.1265 10842.382 21257.043 + 1500 300 -8040.3206 0 -8004.5673 11852.589 21362.087 + 1600 300 -8033.2471 0 -7997.4937 11298.745 21492.782 + 1700 300 -8030.6375 0 -7994.8842 10850.43 21610.04 + 1800 300 -8035.1631 0 -7999.4097 9985.6107 21734.628 + 1900 308.56562 -8040.1954 0 -8003.4213 9865.7107 21859.215 + 2000 300 -8030.1651 0 -7994.4117 11817.502 21980.138 + 2100 300 -8031.6147 0 -7995.8613 12791.357 22101.061 + 2200 300 -8033.7793 0 -7998.0259 13823.043 22234.198 + 2300 300 -8040.5964 0 -8004.8431 16204.549 22350.236 + 2400 309.42867 -8045.9414 0 -8009.0644 18506.386 22465.051 + 2500 300 -8054.2629 0 -8018.5095 20099.612 22593.303 + 2600 300 -8054.9562 0 -8019.2028 20036.318 22721.555 + 2700 300 -8051.4788 0 -8015.7254 16993.437 22844.921 + 2800 300 -8050.6908 0 -8014.9374 9048.5896 22964.622 + 2900 309.90783 -8044.3096 0 -8007.3754 5017.0198 23080.659 + 3000 300 -8035.8165 0 -8000.0632 2084.8999 23207.69 +Loop time of 13.4901 on 4 procs for 3000 steps with 1912 atoms + +Performance: 19.214 ns/day, 1.249 hours/ns, 222.386 timesteps/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 12.851 | 12.919 | 12.945 | 1.1 | 95.76 +Neigh | 0.20449 | 0.20777 | 0.21169 | 0.6 | 1.54 +Comm | 0.27479 | 0.30264 | 0.36667 | 6.8 | 2.24 +Output | 0.0010171 | 0.0010971 | 0.0012388 | 0.3 | 0.01 +Modify | 0.033248 | 0.033878 | 0.034567 | 0.3 | 0.25 +Other | | 0.02594 | | | 0.19 + +Nlocal: 478 ave 506 max 450 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 790.5 ave 822 max 751 min +Histogram: 1 0 1 0 0 0 0 0 0 2 +Neighs: 5829.5 ave 6014 max 5672 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +FullNghs: 11659 ave 12027 max 11320 min +Histogram: 2 0 0 0 0 0 0 0 1 1 + +Total # of neighbors = 46636 +Ave neighs/atom = 24.3912 +Neighbor list builds = 220 +Dangerous builds = 0 +Total wall time: 0:00:13 -- GitLab From a4a15f24bdc14b41dd86f1871e1f4122b4327e67 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 30 Jun 2017 18:44:51 -0400 Subject: [PATCH 395/593] fold screen() function into getscreen() and avoid some repeated operations --- src/USER-MEAMC/meam.h | 2 - src/USER-MEAMC/meam_dens_init.cpp | 293 ++++++++++++++---------------- 2 files changed, 133 insertions(+), 162 deletions(-) diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 2f4a46ea3e..33a250d312 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -196,8 +196,6 @@ protected: void meam_checkindex(int, int, int, int*, int*); void getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** x, int numneigh, int* firstneigh, int numneigh_full, int* firstneigh_full, int ntype, int* type, int* fmap); - void screen(int i, int j, double** x, double rijsq, double* sij, int numneigh_full, int* firstneigh_full, - int ntype, int* type, int* fmap); void calc_rho1(int i, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, double* scrfcn, double* fcpair); void dsij(int i, int j, int k, int jn, int numneigh, double rij2, double* dsij1, double* dsij2, int ntype, diff --git a/src/USER-MEAMC/meam_dens_init.cpp b/src/USER-MEAMC/meam_dens_init.cpp index 82a60b87ff..ccfb17a98a 100644 --- a/src/USER-MEAMC/meam_dens_init.cpp +++ b/src/USER-MEAMC/meam_dens_init.cpp @@ -103,112 +103,154 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** double xktmp, yktmp, zktmp, delxjk, delyjk, delzjk, rjk2 /*,rjk*/; double xik, xjk, sij, fcij, sfcij, dfcij, sikj, dfikj, cikj; double Cmin, Cmax, delc, /*ebound,*/ rbound, a, coef1, coef2; - // double coef1a,coef1b,coef2a,coef2b; double dCikj; - /*unused:double dC1a,dC1b,dC2a,dC2b;*/ double rnorm, fc, dfc, drinv; drinv = 1.0 / this->delr_meam; elti = fmap[type[i]]; + if (elti < 0) return; - if (elti >= 0) { + xitmp = x[i][0]; + yitmp = x[i][1]; + zitmp = x[i][2]; - xitmp = x[i][0]; - yitmp = x[i][1]; - zitmp = x[i][2]; - - for (jn = 0; jn < numneigh; jn++) { - j = firstneigh[jn]; + for (jn = 0; jn < numneigh; jn++) { + j = firstneigh[jn]; + + eltj = fmap[type[j]]; + if (eltj < 0) continue; + + // First compute screening function itself, sij + xjtmp = x[j][0]; + yjtmp = x[j][1]; + zjtmp = x[j][2]; + delxij = xjtmp - xitmp; + delyij = yjtmp - yitmp; + delzij = zjtmp - zitmp; + rij2 = delxij * delxij + delyij * delyij + delzij * delzij; + rij = sqrt(rij2); + + if (rij > this->rc_meam) { + fcij = 0.0; + dfcij = 0.0; + sij = 0.0; + } else { + rnorm = (this->rc_meam - rij) * drinv; + sij = 1.0; + + // if rjk2 > ebound*rijsq, atom k is definitely outside the ellipse + const double rbound = this->ebound_meam[elti][eltj] * rij2; + for (kn = 0; kn < numneigh_full; kn++) { + k = firstneigh_full[kn]; + eltk = fmap[type[k]]; + if (eltk < 0) continue; + if (k == j) continue; + + delxjk = x[k][0] - xjtmp; + delyjk = x[k][1] - yjtmp; + delzjk = x[k][2] - zjtmp; + rjk2 = delxjk * delxjk + delyjk * delyjk + delzjk * delzjk; + if (rjk2 > rbound) continue; + + delxik = x[k][0] - xitmp; + delyik = x[k][1] - yitmp; + delzik = x[k][2] - zitmp; + rik2 = delxik * delxik + delyik * delyik + delzik * delzik; + if (rik2 > rbound) continue; - eltj = fmap[type[j]]; - if (eltj >= 0) { - - // First compute screening function itself, sij - xjtmp = x[j][0]; - yjtmp = x[j][1]; - zjtmp = x[j][2]; - delxij = xjtmp - xitmp; - delyij = yjtmp - yitmp; - delzij = zjtmp - zitmp; - rij2 = delxij * delxij + delyij * delyij + delzij * delzij; - rij = sqrt(rij2); - if (rij > this->rc_meam) { - fcij = 0.0; - dfcij = 0.0; + xik = rik2 / rij2; + xjk = rjk2 / rij2; + a = 1 - (xik - xjk) * (xik - xjk); + // if a < 0, then ellipse equation doesn't describe this case and + // atom k can't possibly screen i-j + if (a <= 0.0) continue; + + cikj = (2.0 * (xik + xjk) + a - 2.0) / a; + Cmax = this->Cmax_meam[elti][eltj][eltk]; + Cmin = this->Cmin_meam[elti][eltj][eltk]; + if (cikj >= Cmax) continue; + // note that cikj may be slightly negative (within numerical + // tolerance) if atoms are colinear, so don't reject that case here + // (other negative cikj cases were handled by the test on "a" above) + else if (cikj <= Cmin) { sij = 0.0; + break; } else { - rnorm = (this->rc_meam - rij) * drinv; - screen(i, j, x, rij2, &sij, numneigh_full, firstneigh_full, ntype, type, fmap); - fc = dfcut(rnorm, dfc); - fcij = fc; - dfcij = dfc * drinv; + delc = Cmax - Cmin; + cikj = (cikj - Cmin) / delc; + sikj = fcut(cikj); } + sij *= sikj; + } - // Now compute derivatives - dscrfcn[jn] = 0.0; - sfcij = sij * fcij; - if (iszero(sfcij) || iszero(sfcij - 1.0)) - goto LABEL_100; - rbound = this->ebound_meam[elti][eltj] * rij2; - for (kn = 0; kn < numneigh_full; kn++) { - k = firstneigh_full[kn]; - if (k == j) - continue; - eltk = fmap[type[k]]; - if (eltk < 0) - continue; - xktmp = x[k][0]; - yktmp = x[k][1]; - zktmp = x[k][2]; - delxjk = xktmp - xjtmp; - delyjk = yktmp - yjtmp; - delzjk = zktmp - zjtmp; - rjk2 = delxjk * delxjk + delyjk * delyjk + delzjk * delzjk; - if (rjk2 > rbound) - continue; - delxik = xktmp - xitmp; - delyik = yktmp - yitmp; - delzik = zktmp - zitmp; - rik2 = delxik * delxik + delyik * delyik + delzik * delzik; - if (rik2 > rbound) - continue; - xik = rik2 / rij2; - xjk = rjk2 / rij2; - a = 1 - (xik - xjk) * (xik - xjk); - // if a < 0, then ellipse equation doesn't describe this case and - // atom k can't possibly screen i-j - if (a <= 0.0) - continue; - cikj = (2.0 * (xik + xjk) + a - 2.0) / a; - Cmax = this->Cmax_meam[elti][eltj][eltk]; - Cmin = this->Cmin_meam[elti][eltj][eltk]; - if (cikj >= Cmax) { - continue; - // Note that cikj may be slightly negative (within numerical - // tolerance) if atoms are colinear, so don't reject that case - // here - // (other negative cikj cases were handled by the test on "a" - // above) - // Note that we never have 0ebound_meam[elti][eltj] * rij2; + for (kn = 0; kn < numneigh_full; kn++) { + k = firstneigh_full[kn]; + if (k == j) continue; + eltk = fmap[type[k]]; + if (eltk < 0) continue; + + xktmp = x[k][0]; + yktmp = x[k][1]; + zktmp = x[k][2]; + delxjk = xktmp - xjtmp; + delyjk = yktmp - yjtmp; + delzjk = zktmp - zjtmp; + rjk2 = delxjk * delxjk + delyjk * delyjk + delzjk * delzjk; + if (rjk2 > rbound) continue; + + delxik = xktmp - xitmp; + delyik = yktmp - yitmp; + delzik = zktmp - zitmp; + rik2 = delxik * delxik + delyik * delyik + delzik * delzik; + if (rik2 > rbound) continue; + + xik = rik2 / rij2; + xjk = rjk2 / rij2; + a = 1 - (xik - xjk) * (xik - xjk); + // if a < 0, then ellipse equation doesn't describe this case and + // atom k can't possibly screen i-j + if (a <= 0.0) continue; + + cikj = (2.0 * (xik + xjk) + a - 2.0) / a; + Cmax = this->Cmax_meam[elti][eltj][eltk]; + Cmin = this->Cmin_meam[elti][eltj][eltk]; + if (cikj >= Cmax) { + continue; + // Note that cikj may be slightly negative (within numerical + // tolerance) if atoms are colinear, so don't reject that case + // here + // (other negative cikj cases were handled by the test on "a" + // above) + // Note that we never have 0 ebound*rijsq, atom k is definitely outside the ellipse - rbound = this->ebound_meam[elti][eltj] * rijsq; - - for (nk = 0; nk < numneigh_full; nk++) { - k = firstneigh_full[nk]; - eltk = fmap[type[k]]; - if (k == j) - continue; - delxjk = x[k][0] - x[j][0]; - delyjk = x[k][1] - x[j][1]; - delzjk = x[k][2] - x[j][2]; - rjksq = delxjk * delxjk + delyjk * delyjk + delzjk * delzjk; - if (rjksq > rbound) - continue; - delxik = x[k][0] - x[i][0]; - delyik = x[k][1] - x[i][1]; - delzik = x[k][2] - x[i][2]; - riksq = delxik * delxik + delyik * delyik + delzik * delzik; - if (riksq > rbound) - continue; - xik = riksq / rijsq; - xjk = rjksq / rijsq; - a = 1 - (xik - xjk) * (xik - xjk); - // if a < 0, then ellipse equation doesn't describe this case and - // atom k can't possibly screen i-j - if (a <= 0.0) - continue; - cikj = (2.0 * (xik + xjk) + a - 2.0) / a; - Cmax = this->Cmax_meam[elti][eltj][eltk]; - Cmin = this->Cmin_meam[elti][eltj][eltk]; - if (cikj >= Cmax) - continue; - // note that cikj may be slightly negative (within numerical - // tolerance) if atoms are colinear, so don't reject that case here - // (other negative cikj cases were handled by the test on "a" above) - else if (cikj <= Cmin) { - *sij = 0.0; - break; - } else { - delc = Cmax - Cmin; - cikj = (cikj - Cmin) / delc; - sikj = fcut(cikj); - } - *sij = *sij * sikj; - } -} - -// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc - void MEAM::dsij(int i, int j, int k, int jn, int numneigh, double rij2, double* dsij1, double* dsij2, int ntype, int* type, int* fmap, double** x, double* scrfcn, double* fcpair) -- GitLab From 060e32973ef93ae7221f7651f29af70b0d8ef7de Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 1 Jul 2017 17:07:56 -0400 Subject: [PATCH 396/593] another speedup by folding dsij() into meam_force() --- src/USER-MEAMC/meam.h | 2 - src/USER-MEAMC/meam_dens_init.cpp | 60 -------------------------- src/USER-MEAMC/meam_force.cpp | 71 ++++++++++++++++++++++++------- 3 files changed, 56 insertions(+), 77 deletions(-) diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 33a250d312..df5c3f33fd 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -198,8 +198,6 @@ protected: int* firstneigh, int numneigh_full, int* firstneigh_full, int ntype, int* type, int* fmap); void calc_rho1(int i, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, double* scrfcn, double* fcpair); - void dsij(int i, int j, int k, int jn, int numneigh, double rij2, double* dsij1, double* dsij2, int ntype, - int* type, int* fmap, double** x, double* scrfcn, double* fcpair); void alloyparams(); void compute_pair_meam(); diff --git a/src/USER-MEAMC/meam_dens_init.cpp b/src/USER-MEAMC/meam_dens_init.cpp index ccfb17a98a..77d399ab20 100644 --- a/src/USER-MEAMC/meam_dens_init.cpp +++ b/src/USER-MEAMC/meam_dens_init.cpp @@ -354,63 +354,3 @@ MEAM::calc_rho1(int i, int ntype, int* type, int* fmap, double** x, int numneigh } } -// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc - -void -MEAM::dsij(int i, int j, int k, int jn, int numneigh, double rij2, double* dsij1, double* dsij2, int ntype, - int* type, int* fmap, double** x, double* scrfcn, double* fcpair) -{ - // Inputs: i,j,k = id's of 3 atom triplet - // jn = id of i-j pair - // rij2 = squared distance between i and j - // Outputs: dsij1 = deriv. of sij w.r.t. rik - // dsij2 = deriv. of sij w.r.t. rjk - - int elti, eltj, eltk; - double rik2, rjk2; - - double dxik, dyik, dzik; - double dxjk, dyjk, dzjk; - double rbound, delc, sij, xik, xjk, cikj, sikj, dfc, a; - double Cmax, Cmin, dCikj1, dCikj2; - - sij = scrfcn[jn] * fcpair[jn]; - elti = fmap[type[i]]; - eltj = fmap[type[j]]; - eltk = fmap[type[k]]; - Cmax = this->Cmax_meam[elti][eltj][eltk]; - Cmin = this->Cmin_meam[elti][eltj][eltk]; - - *dsij1 = 0.0; - *dsij2 = 0.0; - if (!iszero(sij) && !iszero(sij - 1.0)) { - rbound = rij2 * this->ebound_meam[elti][eltj]; - delc = Cmax - Cmin; - dxjk = x[k][0] - x[j][0]; - dyjk = x[k][1] - x[j][1]; - dzjk = x[k][2] - x[j][2]; - rjk2 = dxjk * dxjk + dyjk * dyjk + dzjk * dzjk; - if (rjk2 <= rbound) { - dxik = x[k][0] - x[i][0]; - dyik = x[k][1] - x[i][1]; - dzik = x[k][2] - x[i][2]; - rik2 = dxik * dxik + dyik * dyik + dzik * dzik; - if (rik2 <= rbound) { - xik = rik2 / rij2; - xjk = rjk2 / rij2; - a = 1 - (xik - xjk) * (xik - xjk); - if (!iszero(a)) { - cikj = (2.0 * (xik + xjk) + a - 2.0) / a; - if (cikj >= Cmin && cikj <= Cmax) { - cikj = (cikj - Cmin) / delc; - sikj = dfcut(cikj, dfc); - dCfunc2(rij2, rik2, rjk2, dCikj1, dCikj2); - a = sij / delc * dfc / sikj; - *dsij1 = a * dCikj1; - *dsij2 = a * dCikj2; - } - } - } - } - } -} diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp index 45470217e1..da608724e3 100644 --- a/src/USER-MEAMC/meam_force.cpp +++ b/src/USER-MEAMC/meam_force.cpp @@ -80,7 +80,7 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int pp = pp - kk; pp = std::min(pp, 1.0); phi = ((this->phirar3[ind][kk] * pp + this->phirar2[ind][kk]) * pp + this->phirar1[ind][kk]) * pp + - this->phirar[ind][kk]; + this->phirar[ind][kk]; phip = (this->phirar6[ind][kk] * pp + this->phirar5[ind][kk]) * pp + this->phirar4[ind][kk]; recip = 1.0 / r; @@ -296,13 +296,13 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int get_shpfcn(this->lattce_meam[elti][elti], shpi); get_shpfcn(this->lattce_meam[eltj][eltj], shpj); drhodr1 = dgamma1[i] * drho0dr1 + - dgamma2[i] * (dt1dr1 * rho1[i] + t1i * drho1dr1 + dt2dr1 * rho2[i] + t2i * drho2dr1 + - dt3dr1 * rho3[i] + t3i * drho3dr1) - - dgamma3[i] * (shpi[0] * dt1dr1 + shpi[1] * dt2dr1 + shpi[2] * dt3dr1); + dgamma2[i] * (dt1dr1 * rho1[i] + t1i * drho1dr1 + dt2dr1 * rho2[i] + t2i * drho2dr1 + + dt3dr1 * rho3[i] + t3i * drho3dr1) - + dgamma3[i] * (shpi[0] * dt1dr1 + shpi[1] * dt2dr1 + shpi[2] * dt3dr1); drhodr2 = dgamma1[j] * drho0dr2 + - dgamma2[j] * (dt1dr2 * rho1[j] + t1j * drho1dr2 + dt2dr2 * rho2[j] + t2j * drho2dr2 + - dt3dr2 * rho3[j] + t3j * drho3dr2) - - dgamma3[j] * (shpj[0] * dt1dr2 + shpj[1] * dt2dr2 + shpj[2] * dt3dr2); + dgamma2[j] * (dt1dr2 * rho1[j] + t1j * drho1dr2 + dt2dr2 * rho2[j] + t2j * drho2dr2 + + dt3dr2 * rho3[j] + t3j * drho3dr2) - + dgamma3[j] * (shpj[0] * dt1dr2 + shpj[1] * dt2dr2 + shpj[2] * dt3dr2); for (m = 0; m < 3; m++) { drhodrm1[m] = 0.0; drhodrm2[m] = 0.0; @@ -380,13 +380,13 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int } drhods1 = dgamma1[i] * drho0ds1 + - dgamma2[i] * (dt1ds1 * rho1[i] + t1i * drho1ds1 + dt2ds1 * rho2[i] + t2i * drho2ds1 + - dt3ds1 * rho3[i] + t3i * drho3ds1) - - dgamma3[i] * (shpi[0] * dt1ds1 + shpi[1] * dt2ds1 + shpi[2] * dt3ds1); + dgamma2[i] * (dt1ds1 * rho1[i] + t1i * drho1ds1 + dt2ds1 * rho2[i] + t2i * drho2ds1 + + dt3ds1 * rho3[i] + t3i * drho3ds1) - + dgamma3[i] * (shpi[0] * dt1ds1 + shpi[1] * dt2ds1 + shpi[2] * dt3ds1); drhods2 = dgamma1[j] * drho0ds2 + - dgamma2[j] * (dt1ds2 * rho1[j] + t1j * drho1ds2 + dt2ds2 * rho2[j] + t2j * drho2ds2 + - dt3ds2 * rho3[j] + t3j * drho3ds2) - - dgamma3[j] * (shpj[0] * dt1ds2 + shpj[1] * dt2ds2 + shpj[2] * dt3ds2); + dgamma2[j] * (dt1ds2 * rho1[j] + t1j * drho1ds2 + dt2ds2 * rho2[j] + t2j * drho2ds2 + + dt3ds2 * rho3[j] + t3j * drho3ds2) - + dgamma3[j] * (shpj[0] * dt1ds2 + shpj[1] * dt2ds2 + shpj[2] * dt3ds2); } // Compute derivatives of energy wrt rij, sij and rij[3] @@ -435,8 +435,49 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int k = firstneigh_full[kn]; eltk = fmap[type[k]]; if (k != j && eltk >= 0) { - dsij(i, j, k, jn, numneigh, rij2, &dsij1, &dsij2, ntype, type, fmap, x, &scrfcn[fnoffset], - &fcpair[fnoffset]); + double xik, xjk, cikj, sikj, dfc, a; + double dCikj1, dCikj2; + double dxik, dyik, dzik; + double dxjk, dyjk, dzjk; + double delc, rik2, rjk2; + + sij = scrfcn[jn+fnoffset] * fcpair[jn+fnoffset]; + const double Cmax = this->Cmax_meam[elti][eltj][eltk]; + const double Cmin = this->Cmin_meam[elti][eltj][eltk]; + + dsij1 = 0.0; + dsij2 = 0.0; + if (!iszero(sij) && !iszero(sij - 1.0)) { + const double rbound = rij2 * this->ebound_meam[elti][eltj]; + delc = Cmax - Cmin; + dxjk = x[k][0] - x[j][0]; + dyjk = x[k][1] - x[j][1]; + dzjk = x[k][2] - x[j][2]; + rjk2 = dxjk * dxjk + dyjk * dyjk + dzjk * dzjk; + if (rjk2 <= rbound) { + dxik = x[k][0] - x[i][0]; + dyik = x[k][1] - x[i][1]; + dzik = x[k][2] - x[i][2]; + rik2 = dxik * dxik + dyik * dyik + dzik * dzik; + if (rik2 <= rbound) { + xik = rik2 / rij2; + xjk = rjk2 / rij2; + a = 1 - (xik - xjk) * (xik - xjk); + if (!iszero(a)) { + cikj = (2.0 * (xik + xjk) + a - 2.0) / a; + if (cikj >= Cmin && cikj <= Cmax) { + cikj = (cikj - Cmin) / delc; + sikj = dfcut(cikj, dfc); + dCfunc2(rij2, rik2, rjk2, dCikj1, dCikj2); + a = sij / delc * dfc / sikj; + dsij1 = a * dCikj1; + dsij2 = a * dCikj2; + } + } + } + } + } + if (!iszero(dsij1) || !iszero(dsij2)) { force1 = dUdsij * dsij1; force2 = dUdsij * dsij2; -- GitLab From d68fb1cbb82d09bc1f91712c0db7bb92efa26089 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 1 Jul 2017 17:49:14 -0400 Subject: [PATCH 397/593] avoid repeated computation of deltaik and deltajk, calls to pow() --- src/USER-MEAMC/meam_force.cpp | 826 +++++++++++++++++----------------- 1 file changed, 416 insertions(+), 410 deletions(-) diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp index da608724e3..e6fa767f0d 100644 --- a/src/USER-MEAMC/meam_force.cpp +++ b/src/USER-MEAMC/meam_force.cpp @@ -50,193 +50,287 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int // Compute forces atom i elti = fmap[type[i]]; + if (elti < 0) return; + + xitmp = x[i][0]; + yitmp = x[i][1]; + zitmp = x[i][2]; + + // Treat each pair + for (jn = 0; jn < numneigh; jn++) { + j = firstneigh[jn]; + eltj = fmap[type[j]]; + + if (!iszero(scrfcn[fnoffset + jn]) && eltj >= 0) { + + sij = scrfcn[fnoffset + jn] * fcpair[fnoffset + jn]; + delij[0] = x[j][0] - xitmp; + delij[1] = x[j][1] - yitmp; + delij[2] = x[j][2] - zitmp; + rij2 = delij[0] * delij[0] + delij[1] * delij[1] + delij[2] * delij[2]; + if (rij2 < this->cutforcesq) { + rij = sqrt(rij2); + r = rij; + + // Compute phi and phip + ind = this->eltind[elti][eltj]; + pp = rij * this->rdrar; + kk = (int)pp; + kk = std::min(kk, this->nrar - 2); + pp = pp - kk; + pp = std::min(pp, 1.0); + phi = ((this->phirar3[ind][kk] * pp + this->phirar2[ind][kk]) * pp + this->phirar1[ind][kk]) * pp + + this->phirar[ind][kk]; + phip = (this->phirar6[ind][kk] * pp + this->phirar5[ind][kk]) * pp + this->phirar4[ind][kk]; + recip = 1.0 / r; + + if (eflag_either != 0) { + if (eflag_global != 0) + *eng_vdwl = *eng_vdwl + phi * sij; + if (eflag_atom != 0) { + eatom[i] = eatom[i] + 0.5 * phi * sij; + eatom[j] = eatom[j] + 0.5 * phi * sij; + } + } + + // write(1,*) "force_meamf: phi: ",phi + // write(1,*) "force_meamf: phip: ",phip + + // Compute pair densities and derivatives + invrei = 1.0 / this->re_meam[elti][elti]; + ai = rij * invrei - 1.0; + ro0i = this->rho0_meam[elti]; + rhoa0i = ro0i * MathSpecial::fm_exp(-this->beta0_meam[elti] * ai); + drhoa0i = -this->beta0_meam[elti] * invrei * rhoa0i; + rhoa1i = ro0i * MathSpecial::fm_exp(-this->beta1_meam[elti] * ai); + drhoa1i = -this->beta1_meam[elti] * invrei * rhoa1i; + rhoa2i = ro0i * MathSpecial::fm_exp(-this->beta2_meam[elti] * ai); + drhoa2i = -this->beta2_meam[elti] * invrei * rhoa2i; + rhoa3i = ro0i * MathSpecial::fm_exp(-this->beta3_meam[elti] * ai); + drhoa3i = -this->beta3_meam[elti] * invrei * rhoa3i; + + if (elti != eltj) { + invrej = 1.0 / this->re_meam[eltj][eltj]; + aj = rij * invrej - 1.0; + ro0j = this->rho0_meam[eltj]; + rhoa0j = ro0j * MathSpecial::fm_exp(-this->beta0_meam[eltj] * aj); + drhoa0j = -this->beta0_meam[eltj] * invrej * rhoa0j; + rhoa1j = ro0j * MathSpecial::fm_exp(-this->beta1_meam[eltj] * aj); + drhoa1j = -this->beta1_meam[eltj] * invrej * rhoa1j; + rhoa2j = ro0j * MathSpecial::fm_exp(-this->beta2_meam[eltj] * aj); + drhoa2j = -this->beta2_meam[eltj] * invrej * rhoa2j; + rhoa3j = ro0j * MathSpecial::fm_exp(-this->beta3_meam[eltj] * aj); + drhoa3j = -this->beta3_meam[eltj] * invrej * rhoa3j; + } else { + rhoa0j = rhoa0i; + drhoa0j = drhoa0i; + rhoa1j = rhoa1i; + drhoa1j = drhoa1i; + rhoa2j = rhoa2i; + drhoa2j = drhoa2i; + rhoa3j = rhoa3i; + drhoa3j = drhoa3i; + } + + const double t1mi = this->t1_meam[elti]; + const double t2mi = this->t2_meam[elti]; + const double t3mi = this->t3_meam[elti]; + const double t1mj = this->t1_meam[eltj]; + const double t2mj = this->t2_meam[eltj]; + const double t3mj = this->t3_meam[eltj]; + + if (this->ialloy == 1) { + rhoa1j *= t1mj; + rhoa2j *= t2mj; + rhoa3j *= t3mj; + rhoa1i *= t1mi; + rhoa2i *= t2mi; + rhoa3i *= t3mi; + drhoa1j *= t1mj; + drhoa2j *= t2mj; + drhoa3j *= t3mj; + drhoa1i *= t1mi; + drhoa2i *= t2mi; + drhoa3i *= t3mi; + } - if (elti >= 0) { - xitmp = x[i][0]; - yitmp = x[i][1]; - zitmp = x[i][2]; - - // Treat each pair - for (jn = 0; jn < numneigh; jn++) { - j = firstneigh[jn]; - eltj = fmap[type[j]]; - - if (!iszero(scrfcn[fnoffset + jn]) && eltj >= 0) { - - sij = scrfcn[fnoffset + jn] * fcpair[fnoffset + jn]; - delij[0] = x[j][0] - xitmp; - delij[1] = x[j][1] - yitmp; - delij[2] = x[j][2] - zitmp; - rij2 = delij[0] * delij[0] + delij[1] * delij[1] + delij[2] * delij[2]; - if (rij2 < this->cutforcesq) { - rij = sqrt(rij2); - r = rij; - - // Compute phi and phip - ind = this->eltind[elti][eltj]; - pp = rij * this->rdrar; - kk = (int)pp; - kk = std::min(kk, this->nrar - 2); - pp = pp - kk; - pp = std::min(pp, 1.0); - phi = ((this->phirar3[ind][kk] * pp + this->phirar2[ind][kk]) * pp + this->phirar1[ind][kk]) * pp + - this->phirar[ind][kk]; - phip = (this->phirar6[ind][kk] * pp + this->phirar5[ind][kk]) * pp + this->phirar4[ind][kk]; - recip = 1.0 / r; - - if (eflag_either != 0) { - if (eflag_global != 0) - *eng_vdwl = *eng_vdwl + phi * sij; - if (eflag_atom != 0) { - eatom[i] = eatom[i] + 0.5 * phi * sij; - eatom[j] = eatom[j] + 0.5 * phi * sij; + nv2 = 0; + nv3 = 0; + arg1i1 = 0.0; + arg1j1 = 0.0; + arg1i2 = 0.0; + arg1j2 = 0.0; + arg1i3 = 0.0; + arg1j3 = 0.0; + arg3i3 = 0.0; + arg3j3 = 0.0; + for (n = 0; n < 3; n++) { + for (p = n; p < 3; p++) { + for (q = p; q < 3; q++) { + arg = delij[n] * delij[p] * delij[q] * this->v3D[nv3]; + arg1i3 = arg1i3 + arho3[i][nv3] * arg; + arg1j3 = arg1j3 - arho3[j][nv3] * arg; + nv3 = nv3 + 1; } + arg = delij[n] * delij[p] * this->v2D[nv2]; + arg1i2 = arg1i2 + arho2[i][nv2] * arg; + arg1j2 = arg1j2 + arho2[j][nv2] * arg; + nv2 = nv2 + 1; } + arg1i1 = arg1i1 + arho1[i][n] * delij[n]; + arg1j1 = arg1j1 - arho1[j][n] * delij[n]; + arg3i3 = arg3i3 + arho3b[i][n] * delij[n]; + arg3j3 = arg3j3 - arho3b[j][n] * delij[n]; + } - // write(1,*) "force_meamf: phi: ",phi - // write(1,*) "force_meamf: phip: ",phip - - // Compute pair densities and derivatives - invrei = 1.0 / this->re_meam[elti][elti]; - ai = rij * invrei - 1.0; - ro0i = this->rho0_meam[elti]; - rhoa0i = ro0i * MathSpecial::fm_exp(-this->beta0_meam[elti] * ai); - drhoa0i = -this->beta0_meam[elti] * invrei * rhoa0i; - rhoa1i = ro0i * MathSpecial::fm_exp(-this->beta1_meam[elti] * ai); - drhoa1i = -this->beta1_meam[elti] * invrei * rhoa1i; - rhoa2i = ro0i * MathSpecial::fm_exp(-this->beta2_meam[elti] * ai); - drhoa2i = -this->beta2_meam[elti] * invrei * rhoa2i; - rhoa3i = ro0i * MathSpecial::fm_exp(-this->beta3_meam[elti] * ai); - drhoa3i = -this->beta3_meam[elti] * invrei * rhoa3i; - - if (elti != eltj) { - invrej = 1.0 / this->re_meam[eltj][eltj]; - aj = rij * invrej - 1.0; - ro0j = this->rho0_meam[eltj]; - rhoa0j = ro0j * MathSpecial::fm_exp(-this->beta0_meam[eltj] * aj); - drhoa0j = -this->beta0_meam[eltj] * invrej * rhoa0j; - rhoa1j = ro0j * MathSpecial::fm_exp(-this->beta1_meam[eltj] * aj); - drhoa1j = -this->beta1_meam[eltj] * invrej * rhoa1j; - rhoa2j = ro0j * MathSpecial::fm_exp(-this->beta2_meam[eltj] * aj); - drhoa2j = -this->beta2_meam[eltj] * invrej * rhoa2j; - rhoa3j = ro0j * MathSpecial::fm_exp(-this->beta3_meam[eltj] * aj); - drhoa3j = -this->beta3_meam[eltj] * invrej * rhoa3j; - } else { - rhoa0j = rhoa0i; - drhoa0j = drhoa0i; - rhoa1j = rhoa1i; - drhoa1j = drhoa1i; - rhoa2j = rhoa2i; - drhoa2j = drhoa2i; - rhoa3j = rhoa3i; - drhoa3j = drhoa3i; - } + // rho0 terms + drho0dr1 = drhoa0j * sij; + drho0dr2 = drhoa0i * sij; + + // rho1 terms + a1 = 2 * sij / rij; + drho1dr1 = a1 * (drhoa1j - rhoa1j / rij) * arg1i1; + drho1dr2 = a1 * (drhoa1i - rhoa1i / rij) * arg1j1; + a1 = 2.0 * sij / rij; + for (m = 0; m < 3; m++) { + drho1drm1[m] = a1 * rhoa1j * arho1[i][m]; + drho1drm2[m] = -a1 * rhoa1i * arho1[j][m]; + } - if (this->ialloy == 1) { - rhoa1j = rhoa1j * this->t1_meam[eltj]; - rhoa2j = rhoa2j * this->t2_meam[eltj]; - rhoa3j = rhoa3j * this->t3_meam[eltj]; - rhoa1i = rhoa1i * this->t1_meam[elti]; - rhoa2i = rhoa2i * this->t2_meam[elti]; - rhoa3i = rhoa3i * this->t3_meam[elti]; - drhoa1j = drhoa1j * this->t1_meam[eltj]; - drhoa2j = drhoa2j * this->t2_meam[eltj]; - drhoa3j = drhoa3j * this->t3_meam[eltj]; - drhoa1i = drhoa1i * this->t1_meam[elti]; - drhoa2i = drhoa2i * this->t2_meam[elti]; - drhoa3i = drhoa3i * this->t3_meam[elti]; + // rho2 terms + a2 = 2 * sij / rij2; + drho2dr1 = a2 * (drhoa2j - 2 * rhoa2j / rij) * arg1i2 - 2.0 / 3.0 * arho2b[i] * drhoa2j * sij; + drho2dr2 = a2 * (drhoa2i - 2 * rhoa2i / rij) * arg1j2 - 2.0 / 3.0 * arho2b[j] * drhoa2i * sij; + a2 = 4 * sij / rij2; + for (m = 0; m < 3; m++) { + drho2drm1[m] = 0.0; + drho2drm2[m] = 0.0; + for (n = 0; n < 3; n++) { + drho2drm1[m] = drho2drm1[m] + arho2[i][this->vind2D[m][n]] * delij[n]; + drho2drm2[m] = drho2drm2[m] - arho2[j][this->vind2D[m][n]] * delij[n]; } + drho2drm1[m] = a2 * rhoa2j * drho2drm1[m]; + drho2drm2[m] = -a2 * rhoa2i * drho2drm2[m]; + } + // rho3 terms + rij3 = rij * rij2; + a3 = 2 * sij / rij3; + a3a = 6.0 / 5.0 * sij / rij; + drho3dr1 = a3 * (drhoa3j - 3 * rhoa3j / rij) * arg1i3 - a3a * (drhoa3j - rhoa3j / rij) * arg3i3; + drho3dr2 = a3 * (drhoa3i - 3 * rhoa3i / rij) * arg1j3 - a3a * (drhoa3i - rhoa3i / rij) * arg3j3; + a3 = 6 * sij / rij3; + a3a = 6 * sij / (5 * rij); + for (m = 0; m < 3; m++) { + drho3drm1[m] = 0.0; + drho3drm2[m] = 0.0; nv2 = 0; - nv3 = 0; - arg1i1 = 0.0; - arg1j1 = 0.0; - arg1i2 = 0.0; - arg1j2 = 0.0; - arg1i3 = 0.0; - arg1j3 = 0.0; - arg3i3 = 0.0; - arg3j3 = 0.0; for (n = 0; n < 3; n++) { for (p = n; p < 3; p++) { - for (q = p; q < 3; q++) { - arg = delij[n] * delij[p] * delij[q] * this->v3D[nv3]; - arg1i3 = arg1i3 + arho3[i][nv3] * arg; - arg1j3 = arg1j3 - arho3[j][nv3] * arg; - nv3 = nv3 + 1; - } arg = delij[n] * delij[p] * this->v2D[nv2]; - arg1i2 = arg1i2 + arho2[i][nv2] * arg; - arg1j2 = arg1j2 + arho2[j][nv2] * arg; + drho3drm1[m] = drho3drm1[m] + arho3[i][this->vind3D[m][n][p]] * arg; + drho3drm2[m] = drho3drm2[m] + arho3[j][this->vind3D[m][n][p]] * arg; nv2 = nv2 + 1; } - arg1i1 = arg1i1 + arho1[i][n] * delij[n]; - arg1j1 = arg1j1 - arho1[j][n] * delij[n]; - arg3i3 = arg3i3 + arho3b[i][n] * delij[n]; - arg3j3 = arg3j3 - arho3b[j][n] * delij[n]; - } - - // rho0 terms - drho0dr1 = drhoa0j * sij; - drho0dr2 = drhoa0i * sij; - - // rho1 terms - a1 = 2 * sij / rij; - drho1dr1 = a1 * (drhoa1j - rhoa1j / rij) * arg1i1; - drho1dr2 = a1 * (drhoa1i - rhoa1i / rij) * arg1j1; - a1 = 2.0 * sij / rij; - for (m = 0; m < 3; m++) { - drho1drm1[m] = a1 * rhoa1j * arho1[i][m]; - drho1drm2[m] = -a1 * rhoa1i * arho1[j][m]; } + drho3drm1[m] = (a3 * drho3drm1[m] - a3a * arho3b[i][m]) * rhoa3j; + drho3drm2[m] = (-a3 * drho3drm2[m] + a3a * arho3b[j][m]) * rhoa3i; + } - // rho2 terms - a2 = 2 * sij / rij2; - drho2dr1 = a2 * (drhoa2j - 2 * rhoa2j / rij) * arg1i2 - 2.0 / 3.0 * arho2b[i] * drhoa2j * sij; - drho2dr2 = a2 * (drhoa2i - 2 * rhoa2i / rij) * arg1j2 - 2.0 / 3.0 * arho2b[j] * drhoa2i * sij; - a2 = 4 * sij / rij2; - for (m = 0; m < 3; m++) { - drho2drm1[m] = 0.0; - drho2drm2[m] = 0.0; - for (n = 0; n < 3; n++) { - drho2drm1[m] = drho2drm1[m] + arho2[i][this->vind2D[m][n]] * delij[n]; - drho2drm2[m] = drho2drm2[m] - arho2[j][this->vind2D[m][n]] * delij[n]; - } - drho2drm1[m] = a2 * rhoa2j * drho2drm1[m]; - drho2drm2[m] = -a2 * rhoa2i * drho2drm2[m]; - } + // Compute derivatives of weighting functions t wrt rij + t1i = t_ave[i][0]; + t2i = t_ave[i][1]; + t3i = t_ave[i][2]; + t1j = t_ave[j][0]; + t2j = t_ave[j][1]; + t3j = t_ave[j][2]; + + if (this->ialloy == 1) { + + a1i = 0.0; + a1j = 0.0; + a2i = 0.0; + a2j = 0.0; + a3i = 0.0; + a3j = 0.0; + if (!iszero(tsq_ave[i][0])) + a1i = drhoa0j * sij / tsq_ave[i][0]; + if (!iszero(tsq_ave[j][0])) + a1j = drhoa0i * sij / tsq_ave[j][0]; + if (!iszero(tsq_ave[i][1])) + a2i = drhoa0j * sij / tsq_ave[i][1]; + if (!iszero(tsq_ave[j][1])) + a2j = drhoa0i * sij / tsq_ave[j][1]; + if (!iszero(tsq_ave[i][2])) + a3i = drhoa0j * sij / tsq_ave[i][2]; + if (!iszero(tsq_ave[j][2])) + a3j = drhoa0i * sij / tsq_ave[j][2]; + + dt1dr1 = a1i * (t1mj - t1i * t1mj*t1mj); + dt1dr2 = a1j * (t1mi - t1j * t1mi*t1mi); + dt2dr1 = a2i * (t2mj - t2i * t2mj*t2mj); + dt2dr2 = a2j * (t2mi - t2j * t2mi*t2mi); + dt3dr1 = a3i * (t3mj - t3i * t3mj*t3mj); + dt3dr2 = a3j * (t3mi - t3j * t3mi*t3mi); + + } else if (this->ialloy == 2) { + + dt1dr1 = 0.0; + dt1dr2 = 0.0; + dt2dr1 = 0.0; + dt2dr2 = 0.0; + dt3dr1 = 0.0; + dt3dr2 = 0.0; + + } else { + + ai = 0.0; + if (!iszero(rho0[i])) + ai = drhoa0j * sij / rho0[i]; + aj = 0.0; + if (!iszero(rho0[j])) + aj = drhoa0i * sij / rho0[j]; + + dt1dr1 = ai * (t1mj - t1i); + dt1dr2 = aj * (t1mi - t1j); + dt2dr1 = ai * (t2mj - t2i); + dt2dr2 = aj * (t2mi - t2j); + dt3dr1 = ai * (t3mj - t3i); + dt3dr2 = aj * (t3mi - t3j); + } - // rho3 terms - rij3 = rij * rij2; - a3 = 2 * sij / rij3; - a3a = 6.0 / 5.0 * sij / rij; - drho3dr1 = a3 * (drhoa3j - 3 * rhoa3j / rij) * arg1i3 - a3a * (drhoa3j - rhoa3j / rij) * arg3i3; - drho3dr2 = a3 * (drhoa3i - 3 * rhoa3i / rij) * arg1j3 - a3a * (drhoa3i - rhoa3i / rij) * arg3j3; - a3 = 6 * sij / rij3; - a3a = 6 * sij / (5 * rij); - for (m = 0; m < 3; m++) { - drho3drm1[m] = 0.0; - drho3drm2[m] = 0.0; - nv2 = 0; - for (n = 0; n < 3; n++) { - for (p = n; p < 3; p++) { - arg = delij[n] * delij[p] * this->v2D[nv2]; - drho3drm1[m] = drho3drm1[m] + arho3[i][this->vind3D[m][n][p]] * arg; - drho3drm2[m] = drho3drm2[m] + arho3[j][this->vind3D[m][n][p]] * arg; - nv2 = nv2 + 1; - } - } - drho3drm1[m] = (a3 * drho3drm1[m] - a3a * arho3b[i][m]) * rhoa3j; - drho3drm2[m] = (-a3 * drho3drm2[m] + a3a * arho3b[j][m]) * rhoa3i; - } + // Compute derivatives of total density wrt rij, sij and rij(3) + get_shpfcn(this->lattce_meam[elti][elti], shpi); + get_shpfcn(this->lattce_meam[eltj][eltj], shpj); + drhodr1 = dgamma1[i] * drho0dr1 + + dgamma2[i] * (dt1dr1 * rho1[i] + t1i * drho1dr1 + dt2dr1 * rho2[i] + t2i * drho2dr1 + + dt3dr1 * rho3[i] + t3i * drho3dr1) - + dgamma3[i] * (shpi[0] * dt1dr1 + shpi[1] * dt2dr1 + shpi[2] * dt3dr1); + drhodr2 = dgamma1[j] * drho0dr2 + + dgamma2[j] * (dt1dr2 * rho1[j] + t1j * drho1dr2 + dt2dr2 * rho2[j] + t2j * drho2dr2 + + dt3dr2 * rho3[j] + t3j * drho3dr2) - + dgamma3[j] * (shpj[0] * dt1dr2 + shpj[1] * dt2dr2 + shpj[2] * dt3dr2); + for (m = 0; m < 3; m++) { + drhodrm1[m] = 0.0; + drhodrm2[m] = 0.0; + drhodrm1[m] = dgamma2[i] * (t1i * drho1drm1[m] + t2i * drho2drm1[m] + t3i * drho3drm1[m]); + drhodrm2[m] = dgamma2[j] * (t1j * drho1drm2[m] + t2j * drho2drm2[m] + t3j * drho3drm2[m]); + } - // Compute derivatives of weighting functions t wrt rij - t1i = t_ave[i][0]; - t2i = t_ave[i][1]; - t3i = t_ave[i][2]; - t1j = t_ave[j][0]; - t2j = t_ave[j][1]; - t3j = t_ave[j][2]; + // Compute derivatives wrt sij, but only if necessary + if (!iszero(dscrfcn[fnoffset + jn])) { + drho0ds1 = rhoa0j; + drho0ds2 = rhoa0i; + a1 = 2.0 / rij; + drho1ds1 = a1 * rhoa1j * arg1i1; + drho1ds2 = a1 * rhoa1i * arg1j1; + a2 = 2.0 / rij2; + drho2ds1 = a2 * rhoa2j * arg1i2 - 2.0 / 3.0 * arho2b[i] * rhoa2j; + drho2ds2 = a2 * rhoa2i * arg1j2 - 2.0 / 3.0 * arho2b[j] * rhoa2i; + a3 = 2.0 / rij3; + a3a = 6.0 / (5.0 * rij); + drho3ds1 = a3 * rhoa3j * arg1i3 - a3a * rhoa3j * arg3i3; + drho3ds2 = a3 * rhoa3i * arg1j3 - a3a * rhoa3i * arg3j3; if (this->ialloy == 1) { @@ -247,281 +341,193 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int a3i = 0.0; a3j = 0.0; if (!iszero(tsq_ave[i][0])) - a1i = drhoa0j * sij / tsq_ave[i][0]; + a1i = rhoa0j / tsq_ave[i][0]; if (!iszero(tsq_ave[j][0])) - a1j = drhoa0i * sij / tsq_ave[j][0]; + a1j = rhoa0i / tsq_ave[j][0]; if (!iszero(tsq_ave[i][1])) - a2i = drhoa0j * sij / tsq_ave[i][1]; + a2i = rhoa0j / tsq_ave[i][1]; if (!iszero(tsq_ave[j][1])) - a2j = drhoa0i * sij / tsq_ave[j][1]; + a2j = rhoa0i / tsq_ave[j][1]; if (!iszero(tsq_ave[i][2])) - a3i = drhoa0j * sij / tsq_ave[i][2]; + a3i = rhoa0j / tsq_ave[i][2]; if (!iszero(tsq_ave[j][2])) - a3j = drhoa0i * sij / tsq_ave[j][2]; + a3j = rhoa0i / tsq_ave[j][2]; - dt1dr1 = a1i * (this->t1_meam[eltj] - t1i * pow(this->t1_meam[eltj], 2)); - dt1dr2 = a1j * (this->t1_meam[elti] - t1j * pow(this->t1_meam[elti], 2)); - dt2dr1 = a2i * (this->t2_meam[eltj] - t2i * pow(this->t2_meam[eltj], 2)); - dt2dr2 = a2j * (this->t2_meam[elti] - t2j * pow(this->t2_meam[elti], 2)); - dt3dr1 = a3i * (this->t3_meam[eltj] - t3i * pow(this->t3_meam[eltj], 2)); - dt3dr2 = a3j * (this->t3_meam[elti] - t3j * pow(this->t3_meam[elti], 2)); + dt1ds1 = a1i * (t1mj - t1i * pow(t1mj, 2)); + dt1ds2 = a1j * (t1mi - t1j * pow(t1mi, 2)); + dt2ds1 = a2i * (t2mj - t2i * pow(t2mj, 2)); + dt2ds2 = a2j * (t2mi - t2j * pow(t2mi, 2)); + dt3ds1 = a3i * (t3mj - t3i * pow(t3mj, 2)); + dt3ds2 = a3j * (t3mi - t3j * pow(t3mi, 2)); } else if (this->ialloy == 2) { - dt1dr1 = 0.0; - dt1dr2 = 0.0; - dt2dr1 = 0.0; - dt2dr2 = 0.0; - dt3dr1 = 0.0; - dt3dr2 = 0.0; + dt1ds1 = 0.0; + dt1ds2 = 0.0; + dt2ds1 = 0.0; + dt2ds2 = 0.0; + dt3ds1 = 0.0; + dt3ds2 = 0.0; } else { ai = 0.0; if (!iszero(rho0[i])) - ai = drhoa0j * sij / rho0[i]; + ai = rhoa0j / rho0[i]; aj = 0.0; if (!iszero(rho0[j])) - aj = drhoa0i * sij / rho0[j]; - - dt1dr1 = ai * (this->t1_meam[eltj] - t1i); - dt1dr2 = aj * (this->t1_meam[elti] - t1j); - dt2dr1 = ai * (this->t2_meam[eltj] - t2i); - dt2dr2 = aj * (this->t2_meam[elti] - t2j); - dt3dr1 = ai * (this->t3_meam[eltj] - t3i); - dt3dr2 = aj * (this->t3_meam[elti] - t3j); - } - - // Compute derivatives of total density wrt rij, sij and rij(3) - get_shpfcn(this->lattce_meam[elti][elti], shpi); - get_shpfcn(this->lattce_meam[eltj][eltj], shpj); - drhodr1 = dgamma1[i] * drho0dr1 + - dgamma2[i] * (dt1dr1 * rho1[i] + t1i * drho1dr1 + dt2dr1 * rho2[i] + t2i * drho2dr1 + - dt3dr1 * rho3[i] + t3i * drho3dr1) - - dgamma3[i] * (shpi[0] * dt1dr1 + shpi[1] * dt2dr1 + shpi[2] * dt3dr1); - drhodr2 = dgamma1[j] * drho0dr2 + - dgamma2[j] * (dt1dr2 * rho1[j] + t1j * drho1dr2 + dt2dr2 * rho2[j] + t2j * drho2dr2 + - dt3dr2 * rho3[j] + t3j * drho3dr2) - - dgamma3[j] * (shpj[0] * dt1dr2 + shpj[1] * dt2dr2 + shpj[2] * dt3dr2); - for (m = 0; m < 3; m++) { - drhodrm1[m] = 0.0; - drhodrm2[m] = 0.0; - drhodrm1[m] = dgamma2[i] * (t1i * drho1drm1[m] + t2i * drho2drm1[m] + t3i * drho3drm1[m]); - drhodrm2[m] = dgamma2[j] * (t1j * drho1drm2[m] + t2j * drho2drm2[m] + t3j * drho3drm2[m]); + aj = rhoa0i / rho0[j]; + + dt1ds1 = ai * (t1mj - t1i); + dt1ds2 = aj * (t1mi - t1j); + dt2ds1 = ai * (t2mj - t2i); + dt2ds2 = aj * (t2mi - t2j); + dt3ds1 = ai * (t3mj - t3i); + dt3ds2 = aj * (t3mi - t3j); } - // Compute derivatives wrt sij, but only if necessary - if (!iszero(dscrfcn[fnoffset + jn])) { - drho0ds1 = rhoa0j; - drho0ds2 = rhoa0i; - a1 = 2.0 / rij; - drho1ds1 = a1 * rhoa1j * arg1i1; - drho1ds2 = a1 * rhoa1i * arg1j1; - a2 = 2.0 / rij2; - drho2ds1 = a2 * rhoa2j * arg1i2 - 2.0 / 3.0 * arho2b[i] * rhoa2j; - drho2ds2 = a2 * rhoa2i * arg1j2 - 2.0 / 3.0 * arho2b[j] * rhoa2i; - a3 = 2.0 / rij3; - a3a = 6.0 / (5.0 * rij); - drho3ds1 = a3 * rhoa3j * arg1i3 - a3a * rhoa3j * arg3i3; - drho3ds2 = a3 * rhoa3i * arg1j3 - a3a * rhoa3i * arg3j3; - - if (this->ialloy == 1) { - - a1i = 0.0; - a1j = 0.0; - a2i = 0.0; - a2j = 0.0; - a3i = 0.0; - a3j = 0.0; - if (!iszero(tsq_ave[i][0])) - a1i = rhoa0j / tsq_ave[i][0]; - if (!iszero(tsq_ave[j][0])) - a1j = rhoa0i / tsq_ave[j][0]; - if (!iszero(tsq_ave[i][1])) - a2i = rhoa0j / tsq_ave[i][1]; - if (!iszero(tsq_ave[j][1])) - a2j = rhoa0i / tsq_ave[j][1]; - if (!iszero(tsq_ave[i][2])) - a3i = rhoa0j / tsq_ave[i][2]; - if (!iszero(tsq_ave[j][2])) - a3j = rhoa0i / tsq_ave[j][2]; - - dt1ds1 = a1i * (this->t1_meam[eltj] - t1i * pow(this->t1_meam[eltj], 2)); - dt1ds2 = a1j * (this->t1_meam[elti] - t1j * pow(this->t1_meam[elti], 2)); - dt2ds1 = a2i * (this->t2_meam[eltj] - t2i * pow(this->t2_meam[eltj], 2)); - dt2ds2 = a2j * (this->t2_meam[elti] - t2j * pow(this->t2_meam[elti], 2)); - dt3ds1 = a3i * (this->t3_meam[eltj] - t3i * pow(this->t3_meam[eltj], 2)); - dt3ds2 = a3j * (this->t3_meam[elti] - t3j * pow(this->t3_meam[elti], 2)); - - } else if (this->ialloy == 2) { - - dt1ds1 = 0.0; - dt1ds2 = 0.0; - dt2ds1 = 0.0; - dt2ds2 = 0.0; - dt3ds1 = 0.0; - dt3ds2 = 0.0; - - } else { - - ai = 0.0; - if (!iszero(rho0[i])) - ai = rhoa0j / rho0[i]; - aj = 0.0; - if (!iszero(rho0[j])) - aj = rhoa0i / rho0[j]; - - dt1ds1 = ai * (this->t1_meam[eltj] - t1i); - dt1ds2 = aj * (this->t1_meam[elti] - t1j); - dt2ds1 = ai * (this->t2_meam[eltj] - t2i); - dt2ds2 = aj * (this->t2_meam[elti] - t2j); - dt3ds1 = ai * (this->t3_meam[eltj] - t3i); - dt3ds2 = aj * (this->t3_meam[elti] - t3j); - } - - drhods1 = dgamma1[i] * drho0ds1 + - dgamma2[i] * (dt1ds1 * rho1[i] + t1i * drho1ds1 + dt2ds1 * rho2[i] + t2i * drho2ds1 + - dt3ds1 * rho3[i] + t3i * drho3ds1) - - dgamma3[i] * (shpi[0] * dt1ds1 + shpi[1] * dt2ds1 + shpi[2] * dt3ds1); - drhods2 = dgamma1[j] * drho0ds2 + - dgamma2[j] * (dt1ds2 * rho1[j] + t1j * drho1ds2 + dt2ds2 * rho2[j] + t2j * drho2ds2 + - dt3ds2 * rho3[j] + t3j * drho3ds2) - - dgamma3[j] * (shpj[0] * dt1ds2 + shpj[1] * dt2ds2 + shpj[2] * dt3ds2); - } + drhods1 = dgamma1[i] * drho0ds1 + + dgamma2[i] * (dt1ds1 * rho1[i] + t1i * drho1ds1 + dt2ds1 * rho2[i] + t2i * drho2ds1 + + dt3ds1 * rho3[i] + t3i * drho3ds1) - + dgamma3[i] * (shpi[0] * dt1ds1 + shpi[1] * dt2ds1 + shpi[2] * dt3ds1); + drhods2 = dgamma1[j] * drho0ds2 + + dgamma2[j] * (dt1ds2 * rho1[j] + t1j * drho1ds2 + dt2ds2 * rho2[j] + t2j * drho2ds2 + + dt3ds2 * rho3[j] + t3j * drho3ds2) - + dgamma3[j] * (shpj[0] * dt1ds2 + shpj[1] * dt2ds2 + shpj[2] * dt3ds2); + } - // Compute derivatives of energy wrt rij, sij and rij[3] - dUdrij = phip * sij + frhop[i] * drhodr1 + frhop[j] * drhodr2; - dUdsij = 0.0; - if (!iszero(dscrfcn[fnoffset + jn])) { - dUdsij = phi + frhop[i] * drhods1 + frhop[j] * drhods2; - } - for (m = 0; m < 3; m++) { - dUdrijm[m] = frhop[i] * drhodrm1[m] + frhop[j] * drhodrm2[m]; - } + // Compute derivatives of energy wrt rij, sij and rij[3] + dUdrij = phip * sij + frhop[i] * drhodr1 + frhop[j] * drhodr2; + dUdsij = 0.0; + if (!iszero(dscrfcn[fnoffset + jn])) { + dUdsij = phi + frhop[i] * drhods1 + frhop[j] * drhods2; + } + for (m = 0; m < 3; m++) { + dUdrijm[m] = frhop[i] * drhodrm1[m] + frhop[j] * drhodrm2[m]; + } - // Add the part of the force due to dUdrij and dUdsij + // Add the part of the force due to dUdrij and dUdsij - force = dUdrij * recip + dUdsij * dscrfcn[fnoffset + jn]; - for (m = 0; m < 3; m++) { - forcem = delij[m] * force + dUdrijm[m]; - f[i][m] = f[i][m] + forcem; - f[j][m] = f[j][m] - forcem; - } + force = dUdrij * recip + dUdsij * dscrfcn[fnoffset + jn]; + for (m = 0; m < 3; m++) { + forcem = delij[m] * force + dUdrijm[m]; + f[i][m] = f[i][m] + forcem; + f[j][m] = f[j][m] - forcem; + } - // Tabulate per-atom virial as symmetrized stress tensor - - if (vflag_atom != 0) { - fi[0] = delij[0] * force + dUdrijm[0]; - fi[1] = delij[1] * force + dUdrijm[1]; - fi[2] = delij[2] * force + dUdrijm[2]; - v[0] = -0.5 * (delij[0] * fi[0]); - v[1] = -0.5 * (delij[1] * fi[1]); - v[2] = -0.5 * (delij[2] * fi[2]); - v[3] = -0.25 * (delij[0] * fi[1] + delij[1] * fi[0]); - v[4] = -0.25 * (delij[0] * fi[2] + delij[2] * fi[0]); - v[5] = -0.25 * (delij[1] * fi[2] + delij[2] * fi[1]); - - for (m = 0; m < 6; m++) { - vatom[i][m] = vatom[i][m] + v[m]; - vatom[j][m] = vatom[j][m] + v[m]; - } + // Tabulate per-atom virial as symmetrized stress tensor + + if (vflag_atom != 0) { + fi[0] = delij[0] * force + dUdrijm[0]; + fi[1] = delij[1] * force + dUdrijm[1]; + fi[2] = delij[2] * force + dUdrijm[2]; + v[0] = -0.5 * (delij[0] * fi[0]); + v[1] = -0.5 * (delij[1] * fi[1]); + v[2] = -0.5 * (delij[2] * fi[2]); + v[3] = -0.25 * (delij[0] * fi[1] + delij[1] * fi[0]); + v[4] = -0.25 * (delij[0] * fi[2] + delij[2] * fi[0]); + v[5] = -0.25 * (delij[1] * fi[2] + delij[2] * fi[1]); + + for (m = 0; m < 6; m++) { + vatom[i][m] = vatom[i][m] + v[m]; + vatom[j][m] = vatom[j][m] + v[m]; } + } - // Now compute forces on other atoms k due to change in sij - - if (iszero(sij) || iszero(sij - 1.0)) - continue; //: cont jn loop - for (kn = 0; kn < numneigh_full; kn++) { - k = firstneigh_full[kn]; - eltk = fmap[type[k]]; - if (k != j && eltk >= 0) { - double xik, xjk, cikj, sikj, dfc, a; - double dCikj1, dCikj2; - double dxik, dyik, dzik; - double dxjk, dyjk, dzjk; - double delc, rik2, rjk2; - - sij = scrfcn[jn+fnoffset] * fcpair[jn+fnoffset]; - const double Cmax = this->Cmax_meam[elti][eltj][eltk]; - const double Cmin = this->Cmin_meam[elti][eltj][eltk]; - - dsij1 = 0.0; - dsij2 = 0.0; - if (!iszero(sij) && !iszero(sij - 1.0)) { - const double rbound = rij2 * this->ebound_meam[elti][eltj]; - delc = Cmax - Cmin; - dxjk = x[k][0] - x[j][0]; - dyjk = x[k][1] - x[j][1]; - dzjk = x[k][2] - x[j][2]; - rjk2 = dxjk * dxjk + dyjk * dyjk + dzjk * dzjk; - if (rjk2 <= rbound) { - dxik = x[k][0] - x[i][0]; - dyik = x[k][1] - x[i][1]; - dzik = x[k][2] - x[i][2]; - rik2 = dxik * dxik + dyik * dyik + dzik * dzik; - if (rik2 <= rbound) { - xik = rik2 / rij2; - xjk = rjk2 / rij2; - a = 1 - (xik - xjk) * (xik - xjk); - if (!iszero(a)) { - cikj = (2.0 * (xik + xjk) + a - 2.0) / a; - if (cikj >= Cmin && cikj <= Cmax) { - cikj = (cikj - Cmin) / delc; - sikj = dfcut(cikj, dfc); - dCfunc2(rij2, rik2, rjk2, dCikj1, dCikj2); - a = sij / delc * dfc / sikj; - dsij1 = a * dCikj1; - dsij2 = a * dCikj2; - } + // Now compute forces on other atoms k due to change in sij + + if (iszero(sij) || iszero(sij - 1.0)) continue; //: cont jn loop + + double dxik(0), dyik(0), dzik(0); + double dxjk(0), dyjk(0), dzjk(0); + + for (kn = 0; kn < numneigh_full; kn++) { + k = firstneigh_full[kn]; + eltk = fmap[type[k]]; + if (k != j && eltk >= 0) { + double xik, xjk, cikj, sikj, dfc, a; + double dCikj1, dCikj2; + double delc, rik2, rjk2; + + sij = scrfcn[jn+fnoffset] * fcpair[jn+fnoffset]; + const double Cmax = this->Cmax_meam[elti][eltj][eltk]; + const double Cmin = this->Cmin_meam[elti][eltj][eltk]; + + dsij1 = 0.0; + dsij2 = 0.0; + if (!iszero(sij) && !iszero(sij - 1.0)) { + const double rbound = rij2 * this->ebound_meam[elti][eltj]; + delc = Cmax - Cmin; + dxjk = x[k][0] - x[j][0]; + dyjk = x[k][1] - x[j][1]; + dzjk = x[k][2] - x[j][2]; + rjk2 = dxjk * dxjk + dyjk * dyjk + dzjk * dzjk; + if (rjk2 <= rbound) { + dxik = x[k][0] - x[i][0]; + dyik = x[k][1] - x[i][1]; + dzik = x[k][2] - x[i][2]; + rik2 = dxik * dxik + dyik * dyik + dzik * dzik; + if (rik2 <= rbound) { + xik = rik2 / rij2; + xjk = rjk2 / rij2; + a = 1 - (xik - xjk) * (xik - xjk); + if (!iszero(a)) { + cikj = (2.0 * (xik + xjk) + a - 2.0) / a; + if (cikj >= Cmin && cikj <= Cmax) { + cikj = (cikj - Cmin) / delc; + sikj = dfcut(cikj, dfc); + dCfunc2(rij2, rik2, rjk2, dCikj1, dCikj2); + a = sij / delc * dfc / sikj; + dsij1 = a * dCikj1; + dsij2 = a * dCikj2; } } } } + } - if (!iszero(dsij1) || !iszero(dsij2)) { - force1 = dUdsij * dsij1; - force2 = dUdsij * dsij2; - for (m = 0; m < 3; m++) { - delik[m] = x[k][m] - x[i][m]; - deljk[m] = x[k][m] - x[j][m]; - } - for (m = 0; m < 3; m++) { - f[i][m] = f[i][m] + force1 * delik[m]; - f[j][m] = f[j][m] + force2 * deljk[m]; - f[k][m] = f[k][m] - force1 * delik[m] - force2 * deljk[m]; - } - - // Tabulate per-atom virial as symmetrized stress tensor - - if (vflag_atom != 0) { - fi[0] = force1 * delik[0]; - fi[1] = force1 * delik[1]; - fi[2] = force1 * delik[2]; - fj[0] = force2 * deljk[0]; - fj[1] = force2 * deljk[1]; - fj[2] = force2 * deljk[2]; - v[0] = -third * (delik[0] * fi[0] + deljk[0] * fj[0]); - v[1] = -third * (delik[1] * fi[1] + deljk[1] * fj[1]); - v[2] = -third * (delik[2] * fi[2] + deljk[2] * fj[2]); - v[3] = -sixth * (delik[0] * fi[1] + deljk[0] * fj[1] + delik[1] * fi[0] + deljk[1] * fj[0]); - v[4] = -sixth * (delik[0] * fi[2] + deljk[0] * fj[2] + delik[2] * fi[0] + deljk[2] * fj[0]); - v[5] = -sixth * (delik[1] * fi[2] + deljk[1] * fj[2] + delik[2] * fi[1] + deljk[2] * fj[1]); - - for (m = 0; m < 6; m++) { - vatom[i][m] = vatom[i][m] + v[m]; - vatom[j][m] = vatom[j][m] + v[m]; - vatom[k][m] = vatom[k][m] + v[m]; - } + if (!iszero(dsij1) || !iszero(dsij2)) { + force1 = dUdsij * dsij1; + force2 = dUdsij * dsij2; + + f[i][0] += force1 * dxik; + f[i][1] += force1 * dyik; + f[i][2] += force1 * dzik; + f[j][0] += force2 * dxjk; + f[j][1] += force2 * dyjk; + f[j][2] += force2 * dzjk; + f[k][0] -= force1 * dxik + force2 * dxjk; + f[k][1] -= force1 * dyik + force2 * dyjk; + f[k][2] -= force1 * dzik + force2 * dzjk; + + // Tabulate per-atom virial as symmetrized stress tensor + + if (vflag_atom != 0) { + fi[0] = force1 * dxik; + fi[1] = force1 * dyik; + fi[2] = force1 * dzik; + fj[0] = force2 * dxjk; + fj[1] = force2 * dyjk; + fj[2] = force2 * dzjk; + v[0] = -third * (dxik * fi[0] + dxjk * fj[0]); + v[1] = -third * (dyik * fi[1] + dyjk * fj[1]); + v[2] = -third * (dzik * fi[2] + dzjk * fj[2]); + v[3] = -sixth * (dxik * fi[1] + dxjk * fj[1] + dyik * fi[0] + dyjk * fj[0]); + v[4] = -sixth * (dxik * fi[2] + dxjk * fj[2] + dzik * fi[0] + dzjk * fj[0]); + v[5] = -sixth * (dyik * fi[2] + dyjk * fj[2] + dzik * fi[1] + dzjk * fj[1]); + + for (m = 0; m < 6; m++) { + vatom[i][m] = vatom[i][m] + v[m]; + vatom[j][m] = vatom[j][m] + v[m]; + vatom[k][m] = vatom[k][m] + v[m]; } } } - // end of k loop } + // end of k loop } } - // end of j loop } - - // else if elti<0, this is not a meam atom + // end of j loop } } -- GitLab From a1574fc03d87a4b5d1b6432b6085cf218a470340 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 1 Jul 2017 17:55:13 -0400 Subject: [PATCH 398/593] remove unused variables --- src/USER-MEAMC/meam_force.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp index e6fa767f0d..921ae6e861 100644 --- a/src/USER-MEAMC/meam_force.cpp +++ b/src/USER-MEAMC/meam_force.cpp @@ -14,7 +14,7 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int int j, jn, k, kn, kk, m, n, p, q; int nv2, nv3, elti, eltj, eltk, ind; double xitmp, yitmp, zitmp, delij[3], rij2, rij, rij3; - double delik[3], deljk[3], v[6], fi[3], fj[3]; + double v[6], fi[3], fj[3]; double third, sixth; double pp, dUdrij, dUdsij, dUdrijm[3], force, forcem; double r, recip, phi, phip; -- GitLab From 22f3db47232193426c050d44b848e802e0394743 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 1 Jul 2017 18:16:36 -0400 Subject: [PATCH 399/593] remove some dead code and prune argument lists accordingly --- src/USER-MEAMC/meam.h | 7 +++---- src/USER-MEAMC/meam_dens_final.cpp | 8 ++++---- src/USER-MEAMC/meam_dens_init.cpp | 7 +++---- src/USER-MEAMC/meam_force.cpp | 4 +--- src/USER-MEAMC/meam_setup_done.cpp | 4 +--- src/USER-MEAMC/pair_meamc.cpp | 19 +++---------------- 6 files changed, 15 insertions(+), 34 deletions(-) diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index df5c3f33fd..944b3fdf28 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -219,13 +219,12 @@ public: void meam_setup_done(double* cutmax); void meam_dens_setup(int atom_nmax, int nall, int n_neigh); void meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, - int numneigh_full, int* firstneigh_full, int fnoffset, int* errorflag); + int numneigh_full, int* firstneigh_full, int fnoffset); void meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_atom, double* eng_vdwl, - double* eatom, int ntype, int* type, int* fmap, int* errorflag); + double* eatom, int ntype, int* type, int* fmap, int& errorflag); void meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int vflag_atom, double* eng_vdwl, double* eatom, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, - int numneigh_full, int* firstneigh_full, int fnoffset, double** f, double** vatom, - int* errorflag); + int numneigh_full, int* firstneigh_full, int fnoffset, double** f, double** vatom); }; // Functions we need for compat diff --git a/src/USER-MEAMC/meam_dens_final.cpp b/src/USER-MEAMC/meam_dens_final.cpp index 22b3e06c1a..2adf4000f1 100644 --- a/src/USER-MEAMC/meam_dens_final.cpp +++ b/src/USER-MEAMC/meam_dens_final.cpp @@ -5,7 +5,7 @@ using namespace LAMMPS_NS; void MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_atom, double* eng_vdwl, - double* eatom, int ntype, int* type, int* fmap, int* errorflag) + double* eatom, int ntype, int* type, int* fmap, int& errorflag) { int i, elti; int m; @@ -55,8 +55,8 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ Z = this->Z_meam[elti]; - G = G_gam(gamma[i], this->ibar_meam[elti], *errorflag); - if (*errorflag != 0) + G = G_gam(gamma[i], this->ibar_meam[elti], errorflag); + if (errorflag != 0) return; get_shpfcn(this->lattce_meam[elti][elti], shp); if (this->ibar_meam[elti] <= 0) { @@ -69,7 +69,7 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ gam = (this->t1_meam[elti] * shp[0] + this->t2_meam[elti] * shp[1] + this->t3_meam[elti] * shp[2]) / (Z * Z); } - Gbar = G_gam(gam, this->ibar_meam[elti], *errorflag); + Gbar = G_gam(gam, this->ibar_meam[elti], errorflag); } rho[i] = rho0[i] * G; diff --git a/src/USER-MEAMC/meam_dens_init.cpp b/src/USER-MEAMC/meam_dens_init.cpp index 77d399ab20..e1a7509ab3 100644 --- a/src/USER-MEAMC/meam_dens_init.cpp +++ b/src/USER-MEAMC/meam_dens_init.cpp @@ -77,11 +77,10 @@ MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) } void -MEAM::meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, - int numneigh_full, int* firstneigh_full, int fnoffset, int* errorflag) +MEAM::meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, + int numneigh, int* firstneigh, + int numneigh_full, int* firstneigh_full, int fnoffset) { - *errorflag = 0; - // Compute screening function and derivatives getscreen(i, &scrfcn[fnoffset], &dscrfcn[fnoffset], &fcpair[fnoffset], x, numneigh, firstneigh, numneigh_full, firstneigh_full, ntype, type, fmap); diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp index 921ae6e861..cbed31fd5b 100644 --- a/src/USER-MEAMC/meam_force.cpp +++ b/src/USER-MEAMC/meam_force.cpp @@ -8,8 +8,7 @@ using namespace LAMMPS_NS; void MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int vflag_atom, double* eng_vdwl, double* eatom, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, - int numneigh_full, int* firstneigh_full, int fnoffset, double** f, double** vatom, - int* errorflag) + int numneigh_full, int* firstneigh_full, int fnoffset, double** f, double** vatom) { int j, jn, k, kn, kk, m, n, p, q; int nv2, nv3, elti, eltj, eltk, ind; @@ -43,7 +42,6 @@ MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int double dsij1, dsij2, force1, force2; double t1i, t2i, t3i, t1j, t2j, t3j; - *errorflag = 0; third = 1.0 / 3.0; sixth = 1.0 / 6.0; diff --git a/src/USER-MEAMC/meam_setup_done.cpp b/src/USER-MEAMC/meam_setup_done.cpp index 615ee1b62a..5ef6595253 100644 --- a/src/USER-MEAMC/meam_setup_done.cpp +++ b/src/USER-MEAMC/meam_setup_done.cpp @@ -607,7 +607,7 @@ MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* double a1, a2; double s[3]; lattice_t lat; - int Zij1nn, Zij2nn; + int Zij2nn; double rhoa01nn, rhoa02nn; double rhoa01, rhoa11, rhoa21, rhoa31; double rhoa02, rhoa12, rhoa22, rhoa32; @@ -635,8 +635,6 @@ MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* *rho22 = 0.0; *rho32 = 0.0; - Zij1nn = get_Zij(lat); - if (lat == FCC) { *rho01 = 12.0 * rhoa02; *rho02 = 12.0 * rhoa01; diff --git a/src/USER-MEAMC/pair_meamc.cpp b/src/USER-MEAMC/pair_meamc.cpp index e54f346589..e35c54352e 100644 --- a/src/USER-MEAMC/pair_meamc.cpp +++ b/src/USER-MEAMC/pair_meamc.cpp @@ -140,21 +140,14 @@ void PairMEAMC::compute(int eflag, int vflag) meam_inst->meam_dens_init(i,ntype,type,map,x, numneigh_half[i],firstneigh_half[i], numneigh_full[i],firstneigh_full[i], - offset, - &errorflag); - if (errorflag) { - char str[128]; - sprintf(str,"MEAM library error %d",errorflag); - error->one(FLERR,str); - } + offset); offset += numneigh_half[i]; } comm->reverse_comm_pair(this); meam_inst->meam_dens_final(nlocal,eflag_either,eflag_global,eflag_atom, - &eng_vdwl,eatom,ntype,type,map, - &errorflag); + &eng_vdwl,eatom,ntype,type,map,errorflag); if (errorflag) { char str[128]; sprintf(str,"MEAM library error %d",errorflag); @@ -178,13 +171,7 @@ void PairMEAMC::compute(int eflag, int vflag) vflag_atom,&eng_vdwl,eatom,ntype,type,map,x, numneigh_half[i],firstneigh_half[i], numneigh_full[i],firstneigh_full[i], - offset, - f,vptr,&errorflag); - if (errorflag) { - char str[128]; - sprintf(str,"MEAM library error %d",errorflag); - error->one(FLERR,str); - } + offset,f,vptr); offset += numneigh_half[i]; } -- GitLab From e634c5a2dec82d15b420dea0d8b272b2742956f3 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Mon, 3 Jul 2017 08:53:53 -0600 Subject: [PATCH 400/593] memory allocation bugfix for USER-INTEL pppm from M Brown --- doc/src/accelerate_intel.txt | 6 + doc/src/read_data.txt | 2 +- src/USER-INTEL/fix_intel.cpp | 12 +- src/USER-INTEL/intel_buffers.h | 26 ++++- src/USER-INTEL/intel_preprocess.h | 17 ++- src/USER-INTEL/pppm_disp_intel.cpp | 182 +++++++++++++++-------------- src/USER-INTEL/pppm_intel.cpp | 99 +++++++++++++--- src/USER-INTEL/pppm_intel.h | 7 +- 8 files changed, 239 insertions(+), 112 deletions(-) diff --git a/doc/src/accelerate_intel.txt b/doc/src/accelerate_intel.txt index f5bd66aeba..155e29e367 100644 --- a/doc/src/accelerate_intel.txt +++ b/doc/src/accelerate_intel.txt @@ -106,6 +106,8 @@ $t should be 2 for Intel Xeon CPUs and 2 or 4 for Intel Xeon Phi :l For some of the simple 2-body potentials without long-range electrostatics, performance and scalability can be better with the "newton off" setting added to the input script :l +For simulations on higher node counts, add "processors * * * grid +numa" to the beginning of the input script for better scalability :l If using {kspace_style pppm} in the input script, add "kspace_modify diff ad" for better performance :l :ule @@ -392,6 +394,10 @@ hybrid intel omp"_suffix.html command can also be used within the input script to automatically append the "omp" suffix to styles when USER-INTEL styles are not available. +NOTE: For simulations on higher node counts, add "processors * * * +grid numa"_processors.html" to the beginning of the input script for +better scalability. + When running on many nodes, performance might be better when using fewer OpenMP threads and more MPI tasks. This will depend on the simulation and the machine. Using the "verlet/split"_run_style.html diff --git a/doc/src/read_data.txt b/doc/src/read_data.txt index bd602eee5a..6785eb1066 100644 --- a/doc/src/read_data.txt +++ b/doc/src/read_data.txt @@ -14,7 +14,7 @@ read_data file keyword args ... :pre file = name of data file to read in :ulb,l zero or more keyword/arg pairs may be appended :l -keyword = {add} or {offset} or {shift} or {extra/atom/types} or {extra/bond/types} or {extra/angle/types} or {extra/dihedral/types} or {extra/improper/types} or {group} or {nocoeff} or {fix} :l +keyword = {add} or {offset} or {shift} or {extra/atom/types} or {extra/bond/types} or {extra/angle/types} or {extra/dihedral/types} or {extra/improper/types} or {extra/bond/per/atom} or {extra/angle/per/atom} or {extra/dihedral/per/atom} or {extra/improper/per/atom} or {group} or {nocoeff} or {fix} :l {add} arg = {append} or {Nstart} or {merge} append = add new atoms with IDs appended to current IDs Nstart = add new atoms with IDs starting with Nstart diff --git a/src/USER-INTEL/fix_intel.cpp b/src/USER-INTEL/fix_intel.cpp index b06f76c90d..637fc0d06e 100644 --- a/src/USER-INTEL/fix_intel.cpp +++ b/src/USER-INTEL/fix_intel.cpp @@ -748,7 +748,8 @@ void FixIntel::add_oresults(const ft * _noalias const f_in, if (eatom) { double * _noalias const lmp_eatom = force->pair->eatom + out_offset; #if defined(LMP_SIMD_COMPILER) - #pragma novector + #pragma vector aligned + #pragma ivdep #endif for (int i = ifrom; i < ito; i++) { f[i].x += f_in[ii].x; @@ -762,7 +763,8 @@ void FixIntel::add_oresults(const ft * _noalias const f_in, } } else { #if defined(LMP_SIMD_COMPILER) - #pragma novector + #pragma vector aligned + #pragma ivdep #endif for (int i = ifrom; i < ito; i++) { f[i].x += f_in[ii].x; @@ -778,7 +780,8 @@ void FixIntel::add_oresults(const ft * _noalias const f_in, if (eatom) { double * _noalias const lmp_eatom = force->pair->eatom + out_offset; #if defined(LMP_SIMD_COMPILER) - #pragma novector + #pragma vector aligned + #pragma ivdep #endif for (int i = ifrom; i < ito; i++) { f[i].x += f_in[i].x; @@ -788,7 +791,8 @@ void FixIntel::add_oresults(const ft * _noalias const f_in, } } else { #if defined(LMP_SIMD_COMPILER) - #pragma novector + #pragma vector aligned + #pragma ivdep #endif for (int i = ifrom; i < ito; i++) { f[i].x += f_in[i].x; diff --git a/src/USER-INTEL/intel_buffers.h b/src/USER-INTEL/intel_buffers.h index 135309fe44..7a7640a203 100644 --- a/src/USER-INTEL/intel_buffers.h +++ b/src/USER-INTEL/intel_buffers.h @@ -172,6 +172,10 @@ class IntelBuffers { inline void thr_pack(const int ifrom, const int ito, const int ago) { if (ago == 0) { + #if defined(LMP_SIMD_COMPILER) + #pragma vector aligned + #pragma ivdep + #endif for (int i = ifrom; i < ito; i++) { _x[i].x = lmp->atom->x[i][0]; _x[i].y = lmp->atom->x[i][1]; @@ -179,9 +183,17 @@ class IntelBuffers { _x[i].w = lmp->atom->type[i]; } if (lmp->atom->q != NULL) + #if defined(LMP_SIMD_COMPILER) + #pragma vector aligned + #pragma ivdep + #endif for (int i = ifrom; i < ito; i++) _q[i] = lmp->atom->q[i]; } else { + #if defined(LMP_SIMD_COMPILER) + #pragma vector aligned + #pragma ivdep + #endif for (int i = ifrom; i < ito; i++) { _x[i].x = lmp->atom->x[i][0]; _x[i].y = lmp->atom->x[i][1]; @@ -204,7 +216,10 @@ class IntelBuffers { const int offset, const bool dotype = false) { double ** x = lmp->atom->x + offset; if (dotype == false) { - #pragma vector nontemporal + #if defined(LMP_SIMD_COMPILER) + #pragma vector aligned + #pragma ivdep + #endif for (int i = ifrom; i < ito; i++) { _x[i].x = x[i][0]; _x[i].y = x[i][1]; @@ -212,7 +227,10 @@ class IntelBuffers { } } else { int *type = lmp->atom->type + offset; - #pragma vector nontemporal + #if defined(LMP_SIMD_COMPILER) + #pragma vector aligned + #pragma ivdep + #endif for (int i = ifrom; i < ito; i++) { _x[i].x = x[i][0]; _x[i].y = x[i][1]; @@ -225,6 +243,10 @@ class IntelBuffers { inline void thr_pack_host(const int ifrom, const int ito, const int offset) { double ** x = lmp->atom->x + offset; + #if defined(LMP_SIMD_COMPILER) + #pragma vector aligned + #pragma ivdep + #endif for (int i = ifrom; i < ito; i++) { _host_x[i].x = x[i][0]; _host_x[i].y = x[i][1]; diff --git a/src/USER-INTEL/intel_preprocess.h b/src/USER-INTEL/intel_preprocess.h index 1f6225dc44..e256dd1abc 100644 --- a/src/USER-INTEL/intel_preprocess.h +++ b/src/USER-INTEL/intel_preprocess.h @@ -68,7 +68,7 @@ enum {TIME_PACK, TIME_HOST_NEIGHBOR, TIME_HOST_PAIR, TIME_OFFLOAD_NEIGHBOR, #define INTEL_MAX_STENCIL 256 // INTEL_MAX_STENCIL * sqrt(INTEL_MAX_STENCIL) #define INTEL_MAX_STENCIL_CHECK 4096 -#define INTEL_P3M_MAXORDER 7 +#define INTEL_P3M_MAXORDER 8 #define INTEL_P3M_ALIGNED_MAXORDER 8 // PRECOMPUTE VALUES IN TABLE (DOESN'T AFFECT ACCURACY) #define INTEL_P3M_TABLE 1 @@ -248,6 +248,12 @@ enum {TIME_PACK, TIME_HOST_NEIGHBOR, TIME_HOST_PAIR, TIME_OFFLOAD_NEIGHBOR, #else +#define IP_PRE_omp_range(ifrom, ito, tid, inum, nthreads) \ + { \ + ifrom = 0; \ + ito = inum; \ + } + #define IP_PRE_omp_range_id(ifrom, ito, tid, inum, nthreads) \ { \ tid = 0; \ @@ -293,6 +299,15 @@ enum {TIME_PACK, TIME_HOST_NEIGHBOR, TIME_HOST_PAIR, TIME_OFFLOAD_NEIGHBOR, ito = inum; \ } +#define IP_PRE_omp_range_id_vec(ifrom, ip, ito, tid, inum, \ + nthreads, vecsize) \ + { \ + tid = 0; \ + ifrom = 0; \ + ito = inum; \ + ip = vecsize; \ + } + #endif #define IP_PRE_fdotr_acc_force_l5(lf, lt, minlocal, nthreads, f_start, \ diff --git a/src/USER-INTEL/pppm_disp_intel.cpp b/src/USER-INTEL/pppm_disp_intel.cpp index ec5f5150c2..1269579ff4 100644 --- a/src/USER-INTEL/pppm_disp_intel.cpp +++ b/src/USER-INTEL/pppm_disp_intel.cpp @@ -885,21 +885,22 @@ void PPPMDispIntel::make_rho_c(IntelBuffers *buffers) FFT_SCALAR z0 = fdelvolinv * q[i]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order; n++) { int mz = n*nix*niy + nzsum; FFT_SCALAR y0 = z0*rho[2][n]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order; m++) { int mzy = m*nix + mz; FFT_SCALAR x0 = y0*rho[1][m]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mzyx = l + mzy; my_density[mzyx] += x0*rho[0][l]; } @@ -1034,21 +1035,22 @@ void PPPMDispIntel::make_rho_g(IntelBuffers *buffers) FFT_SCALAR z0 = fdelvolinv * B[type]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order_6; n++) { int mz = n*nix*niy + nzsum; FFT_SCALAR y0 = z0*rho[2][n]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order_6; m++) { int mzy = m*nix + mz; FFT_SCALAR x0 = y0*rho[1][m]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mzyx = l + mzy; my_density[mzyx] += x0*rho[0][l]; } @@ -1181,21 +1183,22 @@ void PPPMDispIntel::make_rho_a(IntelBuffers *buffers) FFT_SCALAR z0 = fdelvolinv; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order_6; n++) { int mz = n + nzsum; FFT_SCALAR y0 = z0*rho[2][n]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order_6; m++) { int my = m + nysum; FFT_SCALAR x0 = y0*rho[1][m]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mx = l + nxsum; FFT_SCALAR w = x0*rho[0][l]; density_brick_a0[mz][my][mx] += w*B[7*type]; @@ -1314,21 +1317,22 @@ void PPPMDispIntel::make_rho_none(IntelBuffers *buffers) FFT_SCALAR z0 = fdelvolinv; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order_6; n++) { int mz = n*nix*niy + nzsum; FFT_SCALAR y0 = z0*rho[2][n]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order_6; m++) { int mzy = m*nix + mz; FFT_SCALAR x0 = y0*rho[1][m]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mzyx = l + mzy; FFT_SCALAR w0 = x0*rho[0][l]; for(int k = 0; k < nsplit; k++) @@ -1462,21 +1466,22 @@ void PPPMDispIntel::fieldforce_c_ik(IntelBuffers *buffers) _alignvar(FFT_SCALAR ekz_arr[INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order; n++) { int mz = n+nzsum; FFT_SCALAR z0 = rho2[n]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order; m++) { int my = m+nysum; FFT_SCALAR y0 = z0*rho1[m]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mx = l+nxsum; FFT_SCALAR x0 = y0*rho0[l]; ekx_arr[l] -= x0*vdx_brick[mz][my][mx]; @@ -1490,12 +1495,11 @@ void PPPMDispIntel::fieldforce_c_ik(IntelBuffers *buffers) FFT_SCALAR ekx, eky, ekz; ekx = eky = ekz = ZEROF; - - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { - ekx += ekx_arr[l]; - eky += eky_arr[l]; - ekz += ekz_arr[l]; - } + for (int l = 0; l < order; l++) { + ekx += ekx_arr[l]; + eky += eky_arr[l]; + ekz += ekz_arr[l]; + } // convert E-field to force @@ -1643,12 +1647,12 @@ void PPPMDispIntel::fieldforce_c_ad(IntelBuffers *buffers) particle_ekx[i] = particle_eky[i] = particle_ekz[i] = ZEROF; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order; n++) { int mz = n + nzsum; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order; m++) { int my = m + nysum; @@ -1656,9 +1660,10 @@ void PPPMDispIntel::fieldforce_c_ad(IntelBuffers *buffers) FFT_SCALAR eky_p = drho[1][m] * rho[2][n]; FFT_SCALAR ekz_p = rho[1][m] * drho[2][n]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mx = l + nxsum; ekx[l] += drho[0][l] * ekx_p * u_brick[mz][my][mx]; eky[l] += rho[0][l] * eky_p * u_brick[mz][my][mx]; @@ -1668,9 +1673,9 @@ void PPPMDispIntel::fieldforce_c_ad(IntelBuffers *buffers) } #if defined(LMP_SIMD_COMPILER) - #pragma simd + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++){ + for (int l = 0; l < order; l++){ particle_ekx[i] += ekx[l]; particle_eky[i] += eky[l]; particle_ekz[i] += ekz[l]; @@ -1809,21 +1814,22 @@ void PPPMDispIntel::fieldforce_g_ik(IntelBuffers *buffers) _alignvar(FFT_SCALAR ekz_arr[INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order_6; n++) { int mz = n+nzsum; FFT_SCALAR z0 = rho2[n]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order_6; m++) { int my = m+nysum; FFT_SCALAR y0 = z0*rho1[m]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mx = l+nxsum; FFT_SCALAR x0 = y0*rho0[l]; ekx_arr[l] -= x0*vdx_brick_g[mz][my][mx]; @@ -1837,12 +1843,11 @@ void PPPMDispIntel::fieldforce_g_ik(IntelBuffers *buffers) FFT_SCALAR ekx, eky, ekz; ekx = eky = ekz = ZEROF; - - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { - ekx += ekx_arr[l]; - eky += eky_arr[l]; - ekz += ekz_arr[l]; - } + for (int l = 0; l < order; l++) { + ekx += ekx_arr[l]; + eky += eky_arr[l]; + ekz += ekz_arr[l]; + } // convert E-field to force @@ -1985,12 +1990,12 @@ void PPPMDispIntel::fieldforce_g_ad(IntelBuffers *buffers) particle_ekx[i] = particle_eky[i] = particle_ekz[i] = ZEROF; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order_6; n++) { int mz = n + nzsum; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order_6; m++) { int my = m + nysum; @@ -1998,9 +2003,10 @@ void PPPMDispIntel::fieldforce_g_ad(IntelBuffers *buffers) FFT_SCALAR eky_p = drho[1][m] * rho[2][n]; FFT_SCALAR ekz_p = rho[1][m] * drho[2][n]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mx = l + nxsum; ekx[l] += drho[0][l] * ekx_p * u_brick_g[mz][my][mx]; eky[l] += rho[0][l] * eky_p * u_brick_g[mz][my][mx]; @@ -2010,9 +2016,9 @@ void PPPMDispIntel::fieldforce_g_ad(IntelBuffers *buffers) } #if defined(LMP_SIMD_COMPILER) - #pragma simd + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++){ + for (int l = 0; l < order; l++){ particle_ekx[i] += ekx[l]; particle_eky[i] += eky[l]; particle_ekz[i] += ekz[l]; @@ -2168,21 +2174,22 @@ void PPPMDispIntel::fieldforce_a_ik(IntelBuffers *buffers) #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order_6; n++) { int mz = n+nzsum; FFT_SCALAR z0 = rho2[n]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order_6; m++) { int my = m+nysum; FFT_SCALAR y0 = z0*rho1[m]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mx = l+nxsum; FFT_SCALAR x0 = y0*rho0[l]; ekx0_arr[l] -= x0*vdx_brick_a0[mz][my][mx]; @@ -2221,29 +2228,29 @@ void PPPMDispIntel::fieldforce_a_ik(IntelBuffers *buffers) ekx5 = eky5 = ekz5 = ZEROF; ekx6 = eky6 = ekz6 = ZEROF; - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { - ekx0 += ekx0_arr[l]; - eky0 += eky0_arr[l]; - ekz0 += ekz0_arr[l]; - ekx1 += ekx1_arr[l]; - eky1 += eky1_arr[l]; - ekz1 += ekz1_arr[l]; - ekx2 += ekx2_arr[l]; - eky2 += eky2_arr[l]; - ekz2 += ekz2_arr[l]; - ekx3 += ekx3_arr[l]; - eky3 += eky3_arr[l]; - ekz3 += ekz3_arr[l]; - ekx4 += ekx4_arr[l]; - eky4 += eky4_arr[l]; - ekz4 += ekz4_arr[l]; - ekx5 += ekx5_arr[l]; - eky5 += eky5_arr[l]; - ekz5 += ekz5_arr[l]; - ekx6 += ekx6_arr[l]; - eky6 += eky6_arr[l]; - ekz6 += ekz6_arr[l]; - } + for (int l = 0; l < order; l++) { + ekx0 += ekx0_arr[l]; + eky0 += eky0_arr[l]; + ekz0 += ekz0_arr[l]; + ekx1 += ekx1_arr[l]; + eky1 += eky1_arr[l]; + ekz1 += ekz1_arr[l]; + ekx2 += ekx2_arr[l]; + eky2 += eky2_arr[l]; + ekz2 += ekz2_arr[l]; + ekx3 += ekx3_arr[l]; + eky3 += eky3_arr[l]; + ekz3 += ekz3_arr[l]; + ekx4 += ekx4_arr[l]; + eky4 += eky4_arr[l]; + ekz4 += ekz4_arr[l]; + ekx5 += ekx5_arr[l]; + eky5 += eky5_arr[l]; + ekz5 += ekz5_arr[l]; + ekx6 += ekx6_arr[l]; + eky6 += eky6_arr[l]; + ekz6 += ekz6_arr[l]; + } // convert D-field to force @@ -2439,12 +2446,12 @@ void PPPMDispIntel::fieldforce_a_ad(IntelBuffers *buffers) particle_ekx6[i] = particle_eky6[i] = particle_ekz6[i] = ZEROF; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order_6; n++) { int mz = n + nzsum; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order_6; m++) { int my = m + nysum; @@ -2452,9 +2459,10 @@ void PPPMDispIntel::fieldforce_a_ad(IntelBuffers *buffers) FFT_SCALAR eky_p = drho[1][m] * rho[2][n]; FFT_SCALAR ekz_p = rho[1][m] * drho[2][n]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mx = l + nxsum; FFT_SCALAR x0 = drho[0][l] * ekx_p; FFT_SCALAR y0 = rho[0][l] * eky_p; @@ -2486,9 +2494,9 @@ void PPPMDispIntel::fieldforce_a_ad(IntelBuffers *buffers) } #if defined(LMP_SIMD_COMPILER) - #pragma simd + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++){ + for (int l = 0; l < order; l++){ particle_ekx0[i] += ekx0[l]; particle_eky0[i] += eky0[l]; particle_ekz0[i] += ekz0[l]; @@ -2681,21 +2689,22 @@ void PPPMDispIntel::fieldforce_none_ik(IntelBuffers *buffers) for (int k = 0; k < nsplit; k++) { #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order_6; n++) { int mz = n+nzsum; FFT_SCALAR z0 = rho2[n]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order_6; m++) { int my = m+nysum; FFT_SCALAR y0 = z0*rho1[m]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mx = l+nxsum; FFT_SCALAR x0 = y0*rho0[l]; ekx_arr[k*INTEL_P3M_ALIGNED_MAXORDER + l] -= @@ -2716,13 +2725,13 @@ void PPPMDispIntel::fieldforce_none_ik(IntelBuffers *buffers) ekx[k] = eky[k] = ekz[k] = ZEROF; } - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { - for (int k = 0; k < nsplit; k++) { - ekx[k] += ekx_arr[k*INTEL_P3M_ALIGNED_MAXORDER + l]; - eky[k] += eky_arr[k*INTEL_P3M_ALIGNED_MAXORDER + l]; - ekz[k] += ekz_arr[k*INTEL_P3M_ALIGNED_MAXORDER + l]; - } - } + for (int l = 0; l < order; l++) { + for (int k = 0; k < nsplit; k++) { + ekx[k] += ekx_arr[k*INTEL_P3M_ALIGNED_MAXORDER + l]; + eky[k] += eky_arr[k*INTEL_P3M_ALIGNED_MAXORDER + l]; + ekz[k] += ekz_arr[k*INTEL_P3M_ALIGNED_MAXORDER + l]; + } + } // convert E-field to force @@ -2867,12 +2876,12 @@ void PPPMDispIntel::fieldforce_none_ad(IntelBuffers *buffers) for (int k = 0; k < nsplit; k++) { particle_ekx[i] = particle_eky[i] = particle_ekz[i] = ZEROF; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order_6; n++) { int mz = n + nzsum; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order_6; m++) { int my = m + nysum; @@ -2880,9 +2889,10 @@ void PPPMDispIntel::fieldforce_none_ad(IntelBuffers *buffers) FFT_SCALAR eky_p = drho[1][m] * rho[2][n]; FFT_SCALAR ekz_p = rho[1][m] * drho[2][n]; #if defined(LMP_SIMD_COMPILER) + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #pragma simd #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { int mx = l + nxsum; ekx[k*INTEL_P3M_ALIGNED_MAXORDER+l] += drho[0][l] * ekx_p * u_brick_none[k][mz][my][mx]; @@ -2903,9 +2913,9 @@ void PPPMDispIntel::fieldforce_none_ad(IntelBuffers *buffers) } #if defined(LMP_SIMD_COMPILER) - #pragma simd + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++){ + for (int l = 0; l < order; l++){ for (int k = 0; k < nsplit; k++) { ekx_tot[k] += ekx[k*INTEL_P3M_ALIGNED_MAXORDER+l]; eky_tot[k] += eky[k*INTEL_P3M_ALIGNED_MAXORDER+l]; diff --git a/src/USER-INTEL/pppm_intel.cpp b/src/USER-INTEL/pppm_intel.cpp index 8416b6f3a3..f1cfe591f2 100644 --- a/src/USER-INTEL/pppm_intel.cpp +++ b/src/USER-INTEL/pppm_intel.cpp @@ -149,13 +149,13 @@ void PPPMIntel::init() memory->destroy3d_offset(vdy_brick,nzlo_out,nylo_out,nxlo_out); memory->destroy3d_offset(vdz_brick,nzlo_out,nylo_out,nxlo_out); memory->destroy3d_offset(vdxy_brick, nzlo_out, nylo_out, 2*nxlo_out); - memory->create3d_offset(vdxy_brick, nzlo_out, nzhi_out+2, - nylo_out, nyhi_out, 2*nxlo_out, 2*nxhi_out+1, - "pppmintel:vdxy_brick"); + create3d_offset(vdxy_brick, nzlo_out, nzhi_out+2, + nylo_out, nyhi_out, 2*nxlo_out, 2*nxhi_out+1, + "pppmintel:vdxy_brick"); memory->destroy3d_offset(vdz0_brick, nzlo_out, nylo_out, 2*nxlo_out); - memory->create3d_offset(vdz0_brick, nzlo_out, nzhi_out+2, - nylo_out, nyhi_out, 2*nxlo_out, 2*nxhi_out+1, - "pppmintel:vdz0_brick"); + create3d_offset(vdz0_brick, nzlo_out, nzhi_out+2, + nylo_out, nyhi_out, 2*nxlo_out, 2*nxhi_out+1, + "pppmintel:vdz0_brick"); memory->destroy(work3); memory->create(work3, 2*nfft_both, "pppmintel:work3"); @@ -555,13 +555,13 @@ void PPPMIntel::make_rho(IntelBuffers *buffers) FFT_SCALAR z0 = fdelvolinv * q[i]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order; n++) { int mz = n*nix*niy + nzsum; FFT_SCALAR y0 = z0*rho[2][n]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order; m++) { int mzy = m*nix + mz; @@ -708,13 +708,13 @@ void PPPMIntel::fieldforce_ik(IntelBuffers *buffers) _alignvar(FFT_SCALAR ekz0_arr[2 * INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order; n++) { int mz = n+nzsum; FFT_SCALAR z0 = rho2[n]; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order; m++) { int my = m+nysum; @@ -742,13 +742,13 @@ void PPPMIntel::fieldforce_ik(IntelBuffers *buffers) ekx = eky = ekz = ZEROF; if (use_packing) { - for (int l = 0; l < 2*INTEL_P3M_ALIGNED_MAXORDER; l += 2) { + for (int l = 0; l < 2*order; l += 2) { ekx += ekxy_arr[l]; eky += ekxy_arr[l+1]; ekz += ekz0_arr[l]; } } else { - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++) { + for (int l = 0; l < order; l++) { ekx += ekx_arr[l]; eky += eky_arr[l]; ekz += ekz_arr[l]; @@ -896,12 +896,12 @@ void PPPMIntel::fieldforce_ad(IntelBuffers *buffers) particle_ekx[i] = particle_eky[i] = particle_ekz[i] = ZEROF; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int n = 0; n < order; n++) { int mz = n + nzsum; #if defined(LMP_SIMD_COMPILER) - #pragma loop_count=7 + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif for (int m = 0; m < order; m++) { int my = m + nysum; @@ -921,9 +921,9 @@ void PPPMIntel::fieldforce_ad(IntelBuffers *buffers) } #if defined(LMP_SIMD_COMPILER) - #pragma simd + #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) #endif - for (int l = 0; l < INTEL_P3M_ALIGNED_MAXORDER; l++){ + for (int l = 0; l < order; l++){ particle_ekx[i] += ekx[l]; particle_eky[i] += eky[l]; particle_ekz[i] += ekz[l]; @@ -1240,6 +1240,73 @@ void PPPMIntel::pack_buffers() fix->stop_watch(TIME_PACK); } +/* ---------------------------------------------------------------------- + Allocate density_brick with extra padding for vector writes +------------------------------------------------------------------------- */ + +void PPPMIntel::allocate() +{ + PPPM::allocate(); + memory->destroy3d_offset(density_brick,nzlo_out,nylo_out,nxlo_out); + create3d_offset(density_brick,nzlo_out,nzhi_out,nylo_out,nyhi_out, + nxlo_out,nxhi_out,"pppm:density_brick"); + + if (differentiation_flag == 1) { + memory->destroy3d_offset(u_brick,nzlo_out,nylo_out,nxlo_out); + create3d_offset(u_brick,nzlo_out,nzhi_out,nylo_out,nyhi_out, + nxlo_out,nxhi_out,"pppm:u_brick"); + } else { + memory->destroy3d_offset(vdx_brick,nzlo_out,nylo_out,nxlo_out); + memory->destroy3d_offset(vdy_brick,nzlo_out,nylo_out,nxlo_out); + memory->destroy3d_offset(vdz_brick,nzlo_out,nylo_out,nxlo_out); + create3d_offset(vdx_brick,nzlo_out,nzhi_out,nylo_out,nyhi_out, + nxlo_out,nxhi_out,"pppm:vdx_brick"); + create3d_offset(vdy_brick,nzlo_out,nzhi_out,nylo_out,nyhi_out, + nxlo_out,nxhi_out,"pppm:vdy_brick"); + create3d_offset(vdz_brick,nzlo_out,nzhi_out,nylo_out,nyhi_out, + nxlo_out,nxhi_out,"pppm:vdz_brick"); + } +} + +/* ---------------------------------------------------------------------- + Create 3D-offset allocation with extra padding for vector writes +------------------------------------------------------------------------- */ + +FFT_SCALAR *** PPPMIntel::create3d_offset(FFT_SCALAR ***&array, int n1lo, + int n1hi, int n2lo, int n2hi, + int n3lo, int n3hi, + const char *name) +{ + int n1 = n1hi - n1lo + 1; + int n2 = n2hi - n2lo + 1; + int n3 = n3hi - n3lo + 1; + + bigint nbytes = ((bigint) sizeof(FFT_SCALAR)) * n1*n2*n3 + + INTEL_P3M_ALIGNED_MAXORDER*2; + FFT_SCALAR *data = (FFT_SCALAR *) memory->smalloc(nbytes,name); + nbytes = ((bigint) sizeof(FFT_SCALAR *)) * n1*n2; + FFT_SCALAR **plane = (FFT_SCALAR **) memory->smalloc(nbytes,name); + nbytes = ((bigint) sizeof(FFT_SCALAR **)) * n1; + array = (FFT_SCALAR ***) memory->smalloc(nbytes,name); + + bigint m; + bigint n = 0; + for (int i = 0; i < n1; i++) { + m = ((bigint) i) * n2; + array[i] = &plane[m]; + for (int j = 0; j < n2; j++) { + plane[m+j] = &data[n]; + n += n3; + } + } + + m = ((bigint) n1) * n2; + for (bigint i = 0; i < m; i++) array[0][i] -= n3lo; + for (int i = 0; i < n1; i++) array[i] -= n2lo; + array -= n1lo; + return array; +} + /* ---------------------------------------------------------------------- Returns 0 if Intel optimizations for PPPM ignored due to offload ------------------------------------------------------------------------- */ diff --git a/src/USER-INTEL/pppm_intel.h b/src/USER-INTEL/pppm_intel.h index e152486b29..5bffabe0e5 100644 --- a/src/USER-INTEL/pppm_intel.h +++ b/src/USER-INTEL/pppm_intel.h @@ -74,9 +74,10 @@ class PPPMIntel : public PPPM { int _use_base; #endif - template - void test_function(IntelBuffers *buffers); + virtual void allocate(); + template + void test_function(IntelBuffers *buffers); void precompute_rho(); template @@ -120,6 +121,8 @@ class PPPMIntel : public PPPM { fieldforce_ad(buffers); } } + FFT_SCALAR ***create3d_offset(FFT_SCALAR ***&, int, int, int, + int, int, int, const char *name); }; } -- GitLab From 2d1941ed9b16044d7a3960cae870847635fa1408 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 25 Jun 2017 23:57:42 -0400 Subject: [PATCH 401/593] make USER-INTEL compilable again with gcc and without OpenMP active --- src/USER-INTEL/intel_preprocess.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/USER-INTEL/intel_preprocess.h b/src/USER-INTEL/intel_preprocess.h index e256dd1abc..24cb92a0f3 100644 --- a/src/USER-INTEL/intel_preprocess.h +++ b/src/USER-INTEL/intel_preprocess.h @@ -248,12 +248,6 @@ enum {TIME_PACK, TIME_HOST_NEIGHBOR, TIME_HOST_PAIR, TIME_OFFLOAD_NEIGHBOR, #else -#define IP_PRE_omp_range(ifrom, ito, tid, inum, nthreads) \ - { \ - ifrom = 0; \ - ito = inum; \ - } - #define IP_PRE_omp_range_id(ifrom, ito, tid, inum, nthreads) \ { \ tid = 0; \ @@ -299,15 +293,6 @@ enum {TIME_PACK, TIME_HOST_NEIGHBOR, TIME_HOST_PAIR, TIME_OFFLOAD_NEIGHBOR, ito = inum; \ } -#define IP_PRE_omp_range_id_vec(ifrom, ip, ito, tid, inum, \ - nthreads, vecsize) \ - { \ - tid = 0; \ - ifrom = 0; \ - ito = inum; \ - ip = vecsize; \ - } - #endif #define IP_PRE_fdotr_acc_force_l5(lf, lt, minlocal, nthreads, f_start, \ -- GitLab From db73eca29f593d3ac1d3076e1ce958f9ca39c8b7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 3 Jul 2017 11:43:55 -0400 Subject: [PATCH 402/593] correct example inputs for recent changes to create_bonds command --- examples/balance/in.balance.bond.fast | 2 +- examples/balance/in.balance.bond.slow | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/balance/in.balance.bond.fast b/examples/balance/in.balance.bond.fast index d2cecd2bfc..3bfcea033e 100644 --- a/examples/balance/in.balance.bond.fast +++ b/examples/balance/in.balance.bond.fast @@ -32,7 +32,7 @@ bond_coeff 1 10.0 1.2 # need to preserve 1-3, 1-4 pairwise interactions during hard collisions special_bonds lj/coul 0 1 1 -create_bonds all all 1 1.0 1.5 +create_bonds many all all 1 1.0 1.5 neighbor 0.3 bin neigh_modify delay 0 every 1 check yes diff --git a/examples/balance/in.balance.bond.slow b/examples/balance/in.balance.bond.slow index fdf0ea6c48..68b1110c3d 100644 --- a/examples/balance/in.balance.bond.slow +++ b/examples/balance/in.balance.bond.slow @@ -32,7 +32,7 @@ pair_coeff 1 1 10.0 1.0 2.5 bond_style harmonic bond_coeff 1 10.0 1.2 -create_bonds all all 1 1.0 1.5 +create_bonds many all all 1 1.0 1.5 neighbor 0.3 bin neigh_modify delay 0 every 1 check yes -- GitLab From 9ca9b5e2ffbd36034d64ae8a2e035583b3da0705 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 3 Jul 2017 12:06:36 -0400 Subject: [PATCH 403/593] add authors tag to pull request template --- .github/PULL_REQUEST_TEMPLATE.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index af539f7a10..77c81ea69d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,14 +2,18 @@ _Briefly describe the new feature(s), enhancement(s), or bugfix(es) included in this pull request. If this addresses an open GitHub Issue, mention the issue number, e.g. with `fixes #221` or `closes #135`, so that issue will be automatically closed when the pull request is merged_ -## Implementation Notes +## Author(s) -_Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected_ +_Please state name and affiliation of the author or authors that should be credited with the changes in this pull request_ ## Backward Compatibility _Please state whether any changes in the pull request break backward compatibility for inputs, and - if yes - explain what has been changed and why_ +## Implementation Notes + +_Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected_ + ## Post Submission Checklist _Please check the fields below as they are completed_ -- GitLab From f670dba3d019a8333de93c178da9c716a46db624 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Mon, 3 Jul 2017 14:24:16 -0600 Subject: [PATCH 404/593] 3rd variant of Fortran wrapper for DFTB+ calling LAMMPS --- doc/src/Section_packages.txt | 5 +- examples/COUPLE/README | 5 +- examples/COUPLE/fortran3/LAMMPS-wrapper.cpp | 236 +++++ examples/COUPLE/fortran3/LAMMPS-wrapper.h | 40 + examples/COUPLE/fortran3/LAMMPS-wrapper2.cpp | 57 ++ examples/COUPLE/fortran3/LAMMPS-wrapper2.h | 34 + examples/COUPLE/fortran3/LAMMPS.F90 | 956 +++++++++++++++++++ examples/COUPLE/fortran3/README | 33 + examples/COUPLE/fortran3/data.diamond | 148 +++ examples/COUPLE/fortran3/in.simple | 16 + examples/COUPLE/fortran3/makefile | 45 + examples/COUPLE/fortran3/simple.f90 | 114 +++ src/modify.cpp | 1 - 13 files changed, 1686 insertions(+), 4 deletions(-) create mode 100644 examples/COUPLE/fortran3/LAMMPS-wrapper.cpp create mode 100644 examples/COUPLE/fortran3/LAMMPS-wrapper.h create mode 100644 examples/COUPLE/fortran3/LAMMPS-wrapper2.cpp create mode 100644 examples/COUPLE/fortran3/LAMMPS-wrapper2.h create mode 100644 examples/COUPLE/fortran3/LAMMPS.F90 create mode 100644 examples/COUPLE/fortran3/README create mode 100644 examples/COUPLE/fortran3/data.diamond create mode 100644 examples/COUPLE/fortran3/in.simple create mode 100644 examples/COUPLE/fortran3/makefile create mode 100644 examples/COUPLE/fortran3/simple.f90 diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index 18030162cf..76f88b8ab8 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -2062,8 +2062,9 @@ to plain C++. In contrast to the MEAM package, no library needs to be compiled and the pair style can be instantiated multiple times. -[Author:] Sebastian Huetter, (Otto-von-Guericke University Magdeburg) -based on the work of Greg Wagner (Northwestern U) while at Sandia. +[Author:] Sebastian Huetter, (Otto-von-Guericke University Magdeburg) +based on the Fortran version of Greg Wagner (Northwestern U) while at +Sandia. [Install or un-install:] diff --git a/examples/COUPLE/README b/examples/COUPLE/README index 7a62536239..c8c9e0e31b 100644 --- a/examples/COUPLE/README +++ b/examples/COUPLE/README @@ -41,5 +41,8 @@ fortran a simple wrapper on the LAMMPS library API that can be called from Fortran fortran2 a more sophisticated wrapper on the LAMMPS library API that can be called from Fortran +fortran3 wrapper written by Nir Goldman (LLNL), as an + extension to fortran2, used for calling LAMMPS + from Fortran DFTB+ code -Each sub-directory has its own README. +Each sub-directory has its own README with more details. diff --git a/examples/COUPLE/fortran3/LAMMPS-wrapper.cpp b/examples/COUPLE/fortran3/LAMMPS-wrapper.cpp new file mode 100644 index 0000000000..6e8bbec5ae --- /dev/null +++ b/examples/COUPLE/fortran3/LAMMPS-wrapper.cpp @@ -0,0 +1,236 @@ +/* ----------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + www.cs.sandia.gov/~sjplimp/lammps.html + Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ------------------------------------------------------------------------ + Contributing author: Karl D. Hammond + University of Tennessee, Knoxville (USA), 2012 +------------------------------------------------------------------------- */ + +/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself + provides a (I hope) robust Fortran interface to library.cpp and + library.h. All functions herein COULD be added to library.cpp instead of + including this as a separate file. See the README for instructions. */ + +#include +#include "LAMMPS-wrapper.h" +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace LAMMPS_NS; + +void lammps_open_fortran_wrapper (int argc, char **argv, + MPI_Fint communicator, void **ptr) +{ + MPI_Comm C_communicator = MPI_Comm_f2c (communicator); + lammps_open (argc, argv, C_communicator, ptr); +} + +int lammps_get_ntypes (void *ptr) +{ + class LAMMPS *lmp = (class LAMMPS *) ptr; + int ntypes = lmp->atom->ntypes; + return ntypes; +} + +void lammps_error_all (void *ptr, const char *file, int line, const char *str) +{ + class LAMMPS *lmp = (class LAMMPS *) ptr; + lmp->error->all (file, line, str); +} + +int lammps_extract_compute_vectorsize (void *ptr, char *id, int style) +{ + class LAMMPS *lmp = (class LAMMPS *) ptr; + int icompute = lmp->modify->find_compute(id); + if ( icompute < 0 ) return 0; + class Compute *compute = lmp->modify->compute[icompute]; + + if ( style == 0 ) + { + if ( !compute->vector_flag ) + return 0; + else + return compute->size_vector; + } + else if ( style == 1 ) + { + return lammps_get_natoms (ptr); + } + else if ( style == 2 ) + { + if ( !compute->local_flag ) + return 0; + else + return compute->size_local_rows; + } + else + return 0; +} + +void lammps_extract_compute_arraysize (void *ptr, char *id, int style, + int *nrows, int *ncols) +{ + class LAMMPS *lmp = (class LAMMPS *) ptr; + int icompute = lmp->modify->find_compute(id); + if ( icompute < 0 ) + { + *nrows = 0; + *ncols = 0; + } + class Compute *compute = lmp->modify->compute[icompute]; + + if ( style == 0 ) + { + if ( !compute->array_flag ) + { + *nrows = 0; + *ncols = 0; + } + else + { + *nrows = compute->size_array_rows; + *ncols = compute->size_array_cols; + } + } + else if ( style == 1 ) + { + if ( !compute->peratom_flag ) + { + *nrows = 0; + *ncols = 0; + } + else + { + *nrows = lammps_get_natoms (ptr); + *ncols = compute->size_peratom_cols; + } + } + else if ( style == 2 ) + { + if ( !compute->local_flag ) + { + *nrows = 0; + *ncols = 0; + } + else + { + *nrows = compute->size_local_rows; + *ncols = compute->size_local_cols; + } + } + else + { + *nrows = 0; + *ncols = 0; + } + + return; +} + +int lammps_extract_fix_vectorsize (void *ptr, char *id, int style) +{ + class LAMMPS *lmp = (class LAMMPS *) ptr; + int ifix = lmp->modify->find_fix(id); + if ( ifix < 0 ) return 0; + class Fix *fix = lmp->modify->fix[ifix]; + + if ( style == 0 ) + { + if ( !fix->vector_flag ) + return 0; + else + return fix->size_vector; + } + else if ( style == 1 ) + { + return lammps_get_natoms (ptr); + } + else if ( style == 2 ) + { + if ( !fix->local_flag ) + return 0; + else + return fix->size_local_rows; + } + else + return 0; +} + +void lammps_extract_fix_arraysize (void *ptr, char *id, int style, + int *nrows, int *ncols) +{ + class LAMMPS *lmp = (class LAMMPS *) ptr; + int ifix = lmp->modify->find_fix(id); + if ( ifix < 0 ) + { + *nrows = 0; + *ncols = 0; + } + class Fix *fix = lmp->modify->fix[ifix]; + + if ( style == 0 ) + { + if ( !fix->array_flag ) + { + *nrows = 0; + *ncols = 0; + } + else + { + *nrows = fix->size_array_rows; + *ncols = fix->size_array_cols; + } + } + else if ( style == 1 ) + { + if ( !fix->peratom_flag ) + { + *nrows = 0; + *ncols = 0; + } + else + { + *nrows = lammps_get_natoms (ptr); + *ncols = fix->size_peratom_cols; + } + } + else if ( style == 2 ) + { + if ( !fix->local_flag ) + { + *nrows = 0; + *ncols = 0; + } + else + { + *nrows = fix->size_local_rows; + *ncols = fix->size_local_cols; + } + } + else + { + *nrows = 0; + *ncols = 0; + } + + return; + +} + +/* vim: set ts=3 sts=3 expandtab: */ diff --git a/examples/COUPLE/fortran3/LAMMPS-wrapper.h b/examples/COUPLE/fortran3/LAMMPS-wrapper.h new file mode 100644 index 0000000000..7d94362436 --- /dev/null +++ b/examples/COUPLE/fortran3/LAMMPS-wrapper.h @@ -0,0 +1,40 @@ +/* ----------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + www.cs.sandia.gov/~sjplimp/lammps.html + Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ------------------------------------------------------------------------ + Contributing author: Karl D. Hammond + University of Tennessee, Knoxville (USA), 2012 +------------------------------------------------------------------------- */ + +/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself + provides a (I hope) robust Fortran interface to library.cpp and + library.h. All prototypes herein COULD be added to library.h instead of + including this as a separate file. See the README for instructions. */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Prototypes for auxiliary functions */ +void lammps_open_fortran_wrapper (int, char**, MPI_Fint, void**); +int lammps_get_ntypes (void*); +int lammps_extract_compute_vectorsize (void*, char*, int); +void lammps_extract_compute_arraysize (void*, char*, int, int*, int*); +int lammps_extract_fix_vectorsize (void*, char*, int); +void lammps_extract_fix_arraysize (void*, char*, int, int*, int*); +void lammps_error_all (void*, const char*, int, const char*); + +#ifdef __cplusplus +} +#endif + +/* vim: set ts=3 sts=3 expandtab: */ diff --git a/examples/COUPLE/fortran3/LAMMPS-wrapper2.cpp b/examples/COUPLE/fortran3/LAMMPS-wrapper2.cpp new file mode 100644 index 0000000000..f245c44d79 --- /dev/null +++ b/examples/COUPLE/fortran3/LAMMPS-wrapper2.cpp @@ -0,0 +1,57 @@ +/* ----------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + www.cs.sandia.gov/~sjplimp/lammps.html + Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ------------------------------------------------------------------------ + Contributing author: Karl D. Hammond + University of Tennessee, Knoxville (USA), 2012 +------------------------------------------------------------------------- */ + +/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself + provides a (I hope) robust Fortran interface to library.cpp and + library.h. All functions herein COULD be added to library.cpp instead of + including this as a separate file. See the README for instructions. */ + +#include +#include "LAMMPS-wrapper2.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace LAMMPS_NS; + +extern "C" void f_callback(void *, bigint, int, tagint *, double **, double **); + +void lammps_set_callback (void *ptr) { + class LAMMPS *lmp = (class LAMMPS *) ptr; + int ifix = lmp->modify->find_fix_by_style("external"); + FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix]; + fix->set_callback(f_callback, ptr); + return; +} + +void lammps_set_user_energy (void *ptr, double energy) { + class LAMMPS *lmp = (class LAMMPS *) ptr; + int ifix = lmp->modify->find_fix_by_style("external"); + FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix]; + fix->set_energy(energy); + return; +} + diff --git a/examples/COUPLE/fortran3/LAMMPS-wrapper2.h b/examples/COUPLE/fortran3/LAMMPS-wrapper2.h new file mode 100644 index 0000000000..794006e3af --- /dev/null +++ b/examples/COUPLE/fortran3/LAMMPS-wrapper2.h @@ -0,0 +1,34 @@ +/* ----------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + www.cs.sandia.gov/~sjplimp/lammps.html + Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ------------------------------------------------------------------------ + Contributing author: Nir Goldman, ngoldman@llnl.gov, Oct. 19th, 2016 +------------------------------------------------------------------------- */ + +/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself + provides a (I hope) robust Fortran interface to library.cpp and + library.h. All prototypes herein COULD be added to library.h instead of + including this as a separate file. See the README for instructions. */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Prototypes for auxiliary functions */ +void lammps_set_callback (void *); +void lammps_set_user_energy (void*, double); + +#ifdef __cplusplus +} +#endif + +/* vim: set ts=3 sts=3 expandtab: */ diff --git a/examples/COUPLE/fortran3/LAMMPS.F90 b/examples/COUPLE/fortran3/LAMMPS.F90 new file mode 100644 index 0000000000..eb5b7f825b --- /dev/null +++ b/examples/COUPLE/fortran3/LAMMPS.F90 @@ -0,0 +1,956 @@ +!! ----------------------------------------------------------------------- +! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +! www.cs.sandia.gov/~sjplimp/lammps.html +! Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories +! +! Copyright (2003) Sandia Corporation. Under the terms of Contract +! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains +! certain rights in this software. This software is distributed under +! the GNU General Public License. +! +! See the README file in the top-level LAMMPS directory. +!-------------------------------------------------------------------------- + +!! ------------------------------------------------------------------------ +! Contributing author: Karl D. Hammond +! University of Tennessee, Knoxville (USA), 2012 +!-------------------------------------------------------------------------- + +!! LAMMPS, a Fortran 2003 module containing an interface between Fortran +!! programs and the C-style functions in library.cpp that ship with LAMMPS. +!! This file should be accompanied by LAMMPS-wrapper.cpp and LAMMPS-wrapper.h, +!! which define wrapper functions that ease portability and enforce array +!! dimensions. +!! +!! Everything in this module should be 100% portable by way of Fortran 2003's +!! ISO_C_BINDING intrinsic module. See the README for instructions for +!! compilation and use. +!! +!! Here are the PUBLIC functions and subroutines included in this module. +!! subroutine lammps_open (command_line, communicator, ptr) +!! subroutine lammps_open_no_mpi (command_line, ptr) +!! subroutine lammps_close (ptr) +!! subroutine lammps_file (ptr, str) +!! subroutine lammps_command (ptr, str) +!! subroutine lammps_free (ptr) +!! subroutine lammps_extract_global (global, ptr, name) +!! subroutine lammps_extract_atom (atom, ptr, name) +!! subroutine lammps_extract_fix (fix, ptr, id, style, type, i, j) +!! subroutine lammps_extract_compute (compute, ptr, id, style, type) +!! subroutine lammps_extract_variable (variable, ptr, name, group) +!! function lammps_get_natoms (ptr) +!! subroutine lammps_gather_atoms (ptr, name, count, data) +!! subroutine lammps_scatter_atoms (ptr, name, data) + +#define FLERR __FILE__,__LINE__ +! The above line allows for similar error checking as is done with standard +! LAMMPS files. + +module LAMMPS + + use, intrinsic :: ISO_C_binding, only : C_double, C_int, C_ptr, C_char, & + C_NULL_CHAR, C_loc, C_F_pointer, lammps_instance => C_ptr + implicit none + private + public :: lammps_open, lammps_open_no_mpi, lammps_close, lammps_file, & + lammps_command, lammps_free, lammps_extract_global, & + lammps_extract_atom, lammps_extract_compute, lammps_extract_fix, & + lammps_extract_variable, lammps_get_natoms, lammps_gather_atoms, & + lammps_scatter_atoms, lammps_set_callback, lammps_set_user_energy + public :: lammps_instance, C_ptr, C_double, C_int + + !! Functions supplemental to the prototypes in library.h. {{{1 + !! The function definitions (in C++) are contained in LAMMPS-wrapper.cpp. + !! I would have written the first in Fortran, but the MPI libraries (which + !! were written in C) have C-based functions to convert from Fortran MPI + !! handles to C MPI handles, and there is no Fortran equivalent for those + !! functions. + interface + subroutine lammps_open_wrapper (argc, argv, communicator, ptr) & + bind (C, name='lammps_open_fortran_wrapper') + import :: C_int, C_ptr + integer (C_int), value :: argc + type (C_ptr), dimension(*) :: argv + integer, value :: communicator + type (C_ptr) :: ptr + end subroutine lammps_open_wrapper + subroutine lammps_actual_error_all (ptr, file, line, str) & + bind (C, name='lammps_error_all') + import :: C_int, C_char, C_ptr + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*), intent(in) :: file, str + integer (C_int), value :: line + end subroutine lammps_actual_error_all + function lammps_get_ntypes (ptr) result (ntypes) & + bind (C, name='lammps_get_ntypes') + import :: C_int, C_ptr + type (C_ptr), value :: ptr + integer (C_int) :: ntypes + end function lammps_get_ntypes + function lammps_actual_extract_compute_vectorsize (ptr, id, style) & + result (vectorsize) bind (C, name='lammps_extract_compute_vectorsize') + import :: C_int, C_char, C_ptr + integer (C_int) :: vectorsize + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*) :: id + integer (C_int), value :: style + end function lammps_actual_extract_compute_vectorsize + subroutine lammps_actual_extract_compute_arraysize (ptr, id, style, & + nrows, ncols) bind (C, name='lammps_extract_compute_arraysize') + import :: C_int, C_char, C_ptr + integer (C_int) :: arraysize + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*) :: id + integer (C_int), value :: style + integer (C_int) :: nrows, ncols + end subroutine lammps_actual_extract_compute_arraysize + function lammps_actual_extract_fix_vectorsize (ptr, id, style) & + result (vectorsize) bind (C, name='lammps_extract_fix_vectorsize') + import :: C_int, C_char, C_ptr + integer (C_int) :: vectorsize + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*) :: id + integer (C_int), value :: style + end function lammps_actual_extract_fix_vectorsize + subroutine lammps_actual_extract_fix_arraysize (ptr, id, style, & + nrows, ncols) bind (C, name='lammps_extract_fix_arraysize') + import :: C_int, C_char, C_ptr + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*) :: id + integer (C_int), value :: style + integer (C_int) :: nrows, ncols + end subroutine lammps_actual_extract_fix_arraysize + end interface + + !! Functions/subroutines defined in library.h and library.cpp {{{1 + interface + subroutine lammps_actual_open_no_mpi (argc, argv, ptr) & + bind (C, name='lammps_open_no_mpi') + import :: C_int, C_ptr + integer (C_int), value :: argc + type (C_ptr), dimension(*) :: argv + type (C_ptr) :: ptr + end subroutine lammps_actual_open_no_mpi + + subroutine lammps_close (ptr) bind (C, name='lammps_close') + import :: C_ptr + type (C_ptr), value :: ptr + end subroutine lammps_close + + subroutine lammps_actual_file (ptr, str) bind (C, name='lammps_file') + import :: C_ptr, C_char + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*) :: str + end subroutine lammps_actual_file + + function lammps_actual_command (ptr, str) result (command) & + bind (C, name='lammps_command') + import :: C_ptr, C_char + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*) :: str + type (C_ptr) :: command + end function lammps_actual_command + + subroutine lammps_free (ptr) bind (C, name='lammps_free') + import :: C_ptr + type (C_ptr), value :: ptr + end subroutine lammps_free + + function lammps_actual_extract_global (ptr, name) & + bind (C, name='lammps_extract_global') result (global) + import :: C_ptr, C_char + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*) :: name + type (C_ptr) :: global + end function lammps_actual_extract_global + + function lammps_actual_extract_atom (ptr, name) & + bind (C, name='lammps_extract_atom') result (atom) + import :: C_ptr, C_char + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*) :: name + type (C_ptr) :: atom + end function lammps_actual_extract_atom + + function lammps_actual_extract_compute (ptr, id, style, type) & + result (compute) bind (C, name='lammps_extract_compute') + import :: C_ptr, C_char, C_int + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*) :: id + integer (C_int), value :: style, type + type (C_ptr) :: compute + end function lammps_actual_extract_compute + + function lammps_actual_extract_fix (ptr, id, style, type, i, j) & + result (fix) bind (C, name='lammps_extract_fix') + import :: C_ptr, C_char, C_int + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*) :: id + integer (C_int), value :: style, type, i, j + type (C_ptr) :: fix + end function lammps_actual_extract_fix + + function lammps_actual_extract_variable (ptr, name, group) & + result (variable) bind (C, name='lammps_extract_variable') + import :: C_ptr, C_char + type (C_ptr), value :: ptr + character (kind=C_char), dimension(*) :: name, group + type (C_ptr) :: variable + end function lammps_actual_extract_variable + + function lammps_get_natoms (ptr) result (natoms) & + bind (C, name='lammps_get_natoms') + import :: C_ptr, C_int + type (C_ptr), value :: ptr + integer (C_int) :: natoms + end function lammps_get_natoms + + subroutine lammps_set_callback (ptr) & + bind (C, name='lammps_set_callback') + import :: C_ptr + type (C_ptr), value :: ptr + end subroutine lammps_set_callback + + subroutine lammps_set_user_energy (ptr, energy) & + bind (C, name='lammps_set_user_energy') + import :: C_ptr, C_double + type (C_ptr), value :: ptr + real(C_double), value :: energy + end subroutine lammps_set_user_energy + + subroutine lammps_actual_gather_atoms (ptr, name, type, count, data) & + bind (C, name='lammps_gather_atoms') + import :: C_ptr, C_int, C_char + type (C_ptr), value :: ptr, data + character (kind=C_char), dimension(*) :: name + integer (C_int), value :: type, count + end subroutine lammps_actual_gather_atoms + + subroutine lammps_actual_scatter_atoms (ptr, name, type, count, data) & + bind (C, name='lammps_scatter_atoms') + import :: C_ptr, C_int, C_char + type (C_ptr), value :: ptr, data + character (kind=C_char), dimension(*) :: name + integer (C_int), value :: type, count + end subroutine lammps_actual_scatter_atoms + end interface + + ! Generic functions for the wrappers below {{{1 + + interface lammps_extract_global + module procedure lammps_extract_global_i, & + lammps_extract_global_dp + end interface lammps_extract_global + + interface lammps_extract_atom + module procedure lammps_extract_atom_ia, & + lammps_extract_atom_dpa, & + lammps_extract_atom_dp2a + end interface lammps_extract_atom + + interface lammps_extract_compute + module procedure lammps_extract_compute_dp, & + lammps_extract_compute_dpa, & + lammps_extract_compute_dp2a + end interface lammps_extract_compute + + interface lammps_extract_fix + module procedure lammps_extract_fix_dp, & + lammps_extract_fix_dpa, & + lammps_extract_fix_dp2a + end interface lammps_extract_fix + + interface lammps_extract_variable + module procedure lammps_extract_variable_dp, & + lammps_extract_variable_dpa + end interface lammps_extract_variable + + interface lammps_gather_atoms + module procedure lammps_gather_atoms_ia, lammps_gather_atoms_dpa + end interface lammps_gather_atoms + + interface lammps_scatter_atoms + module procedure lammps_scatter_atoms_ia, lammps_scatter_atoms_dpa + end interface lammps_scatter_atoms + +contains !! Wrapper functions local to this module {{{1 + + subroutine lammps_open (command_line, communicator, ptr) + character (len=*), intent(in) :: command_line + integer, intent(in) :: communicator + type (C_ptr) :: ptr + integer (C_int) :: argc + type (C_ptr), dimension(:), allocatable :: argv + character (kind=C_char), dimension(len_trim(command_line)+1), target :: & + c_command_line + c_command_line = string2Cstring (command_line) + call Cstring2argcargv (c_command_line, argc, argv) + call lammps_open_wrapper (argc, argv, communicator, ptr) + deallocate (argv) + end subroutine lammps_open + +!----------------------------------------------------------------------------- + + subroutine lammps_open_no_mpi (command_line, ptr) + character (len=*), intent(in) :: command_line + type (C_ptr) :: ptr + integer (C_int) :: argc + type (C_ptr), dimension(:), allocatable :: argv + character (kind=C_char), dimension(len_trim(command_line)+1), target :: & + c_command_line + c_command_line = string2Cstring (command_line) + call Cstring2argcargv (c_command_line, argc, argv) + call lammps_actual_open_no_mpi (argc, argv, ptr) + deallocate (argv) + end subroutine lammps_open_no_mpi + +!----------------------------------------------------------------------------- + + subroutine lammps_file (ptr, str) + type (C_ptr) :: ptr + character (len=*) :: str + character (kind=C_char), dimension(len_trim(str)+1) :: Cstr + Cstr = string2Cstring (str) + call lammps_actual_file (ptr, Cstr) + end subroutine lammps_file + +!----------------------------------------------------------------------------- + + subroutine lammps_command (ptr, str) + type (C_ptr) :: ptr + character (len=*) :: str + character (kind=C_char), dimension(len_trim(str)+1) :: Cstr + type (C_ptr) :: dummy + Cstr = string2Cstring (str) + dummy = lammps_actual_command (ptr, Cstr) + end subroutine lammps_command + +!----------------------------------------------------------------------------- + +! lammps_extract_global {{{2 + function lammps_extract_global_Cptr (ptr, name) result (global) + type (C_ptr) :: global + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + character (kind=C_char), dimension(len_trim(name)+1) :: Cname + Cname = string2Cstring (name) + global = lammps_actual_extract_global (ptr, Cname) + end function lammps_extract_global_Cptr + subroutine lammps_extract_global_i (global, ptr, name) + integer (C_int), pointer, intent(out) :: global + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + type (C_ptr) :: Cptr + Cptr = lammps_extract_global_Cptr (ptr, name) + call C_F_pointer (Cptr, global) + end subroutine lammps_extract_global_i + subroutine lammps_extract_global_dp (global, ptr, name) + real (C_double), pointer, intent(out) :: global + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + type (C_ptr) :: Cptr + Cptr = lammps_extract_global_Cptr (ptr, name) + call C_F_pointer (Cptr, global) + end subroutine lammps_extract_global_dp + +!----------------------------------------------------------------------------- + +! lammps_extract_atom {{{2 + function lammps_extract_atom_Cptr (ptr, name) result (atom) + type (C_ptr) :: atom + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + character (kind=C_char), dimension(len_trim(name)+1) :: Cname + Cname = string2Cstring (name) + atom = lammps_actual_extract_atom (ptr, Cname) + end function lammps_extract_atom_Cptr + subroutine lammps_extract_atom_ia (atom, ptr, name) + integer (C_int), dimension(:), pointer, intent(out) :: atom + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + type (C_ptr) :: Cptr + integer (C_int), pointer :: nelements + call lammps_extract_global_i (nelements, ptr, 'nlocal') + Cptr = lammps_extract_atom_Cptr (ptr, name) + call C_F_pointer (Cptr, atom, (/nelements/)) + end subroutine lammps_extract_atom_ia + subroutine lammps_extract_atom_dpa (atom, ptr, name) + real (C_double), dimension(:), pointer, intent(out) :: atom + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + type (C_ptr) :: Cptr + integer (C_int), pointer :: nlocal + integer :: nelements + real (C_double), dimension(:), pointer :: Fptr + if ( name == 'mass' ) then + nelements = lammps_get_ntypes (ptr) + 1 + else if ( name == 'x' .or. name == 'v' .or. name == 'f' .or. & + name == 'mu' .or. name == 'omega' .or. name == 'torque' .or. & + name == 'angmom' ) then + ! We should not be getting a rank-2 array here! + call lammps_error_all (ptr, FLERR, 'You cannot extract those atom& + & data (' // trim(name) // ') into a rank 1 array.') + return + else + ! Everything else we can get is probably nlocal units long + call lammps_extract_global_i (nlocal, ptr, 'nlocal') + nelements = nlocal + end if + Cptr = lammps_extract_atom_Cptr (ptr, name) + call C_F_pointer (Cptr, Fptr, (/nelements/)) + if ( name == 'mass' ) then + !atom(0:) => Fptr + atom => Fptr + else + atom => Fptr + end if + end subroutine lammps_extract_atom_dpa + subroutine lammps_extract_atom_dp2a (atom, ptr, name) + real (C_double), dimension(:,:), pointer, intent(out) :: atom + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + type (C_ptr) :: Cptr + type (C_ptr), pointer, dimension(:) :: Catom + integer (C_int), pointer :: nelements + if ( name /= 'x' .and. name /= 'v' .and. name /= 'f' .and. & + name /= 'mu' .and. name /= 'omega' .and. name /= 'tandque' .and. & + name /= 'angmom' .and. name /= 'fexternal' ) then + ! We should not be getting a rank-2 array here! + call lammps_error_all (ptr, FLERR, 'You cannot extract those atom& + & data (' // trim(name) // ') into a rank 2 array.') + return + end if + Cptr = lammps_extract_atom_Cptr (ptr, name) + call lammps_extract_global_i (nelements, ptr, 'nlocal') + ! Catom will now be the array of void* pointers that the void** pointer + ! pointed to. Catom(1) is now the pointer to the first element. + call C_F_pointer (Cptr, Catom, (/nelements/)) + ! Now get the actual array, which has its shape transposed from what we + ! might think of it in C + call C_F_pointer (Catom(1), atom, (/3, nelements/)) + end subroutine lammps_extract_atom_dp2a + +!----------------------------------------------------------------------------- + +! lammps_extract_compute {{{2 + function lammps_extract_compute_Cptr (ptr, id, style, type) result (compute) + type (C_ptr) :: compute + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style, type + integer (kind=C_int) :: Cstyle, Ctype + character (kind=C_char), dimension(len_trim(id)+1) :: Cid + Cid = string2Cstring (id) + Cstyle = style + Ctype = type + compute = lammps_actual_extract_compute (ptr, Cid, Cstyle, Ctype) + end function lammps_extract_compute_Cptr + subroutine lammps_extract_compute_dp (compute, ptr, id, style, type) + real (C_double), pointer, intent(out) :: compute + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style, type + type (C_ptr) :: Cptr + ! The only valid values of (style,type) are (0,0) for scalar 'compute' + if ( style /= 0 ) then + call lammps_error_all (ptr, FLERR, 'You cannot pack per-atom/local& + & data into a scalar.') + return + end if + if ( type == 1 ) then + call lammps_error_all (ptr, FLERR, 'You cannot extract a compute& + & vector (rank 1) into a scalar.') + return + else if ( type == 2 ) then + call lammps_error_all (ptr, FLERR, 'You cannot extract a compute& + & array (rank 2) into a scalar.') + return + end if + Cptr = lammps_extract_compute_Cptr (ptr, id, style, type) + call C_F_pointer (Cptr, compute) + end subroutine lammps_extract_compute_dp + subroutine lammps_extract_compute_dpa (compute, ptr, id, style, type) + real (C_double), dimension(:), pointer, intent(out) :: compute + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style, type + type (C_ptr) :: Cptr + integer :: nelements + ! Check for the correct dimensionality + if ( type == 0 ) then + call lammps_error_all (ptr, FLERR, 'You cannot extract a compute& + & scalar (rank 0) into a rank 1 variable.') + return + else if ( type == 2 ) then + call lammps_error_all (ptr, FLERR, 'You cannot extract a compute& + & array (rank 2) into a rank 1 variable.') + return + end if + nelements = lammps_extract_compute_vectorsize (ptr, id, style) + Cptr = lammps_extract_compute_Cptr (ptr, id, style, type) + call C_F_pointer (Cptr, compute, (/nelements/)) + end subroutine lammps_extract_compute_dpa + subroutine lammps_extract_compute_dp2a (compute, ptr, id, style, type) + real (C_double), dimension(:,:), pointer, intent(out) :: compute + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style, type + type (C_ptr) :: Cptr + type (C_ptr), pointer, dimension(:) :: Ccompute + integer :: nr, nc + ! Check for the correct dimensionality + if ( type == 0 ) then + call lammps_error_all (ptr, FLERR, 'You cannot extract a compute& + & scalar (rank 0) into a rank 2 variable.') + return + else if ( type == 1 ) then + call lammps_error_all (ptr, FLERR, 'You cannot extract a compute& + & array (rank 1) into a rank 2 variable.') + return + end if + call lammps_extract_compute_arraysize (ptr, id, style, nr, nc) + Cptr = lammps_extract_compute_Cptr (ptr, id, style, type) + call C_F_pointer (Cptr, Ccompute, (/nr/)) + ! Note that the matrix is transposed, from Fortran's perspective + call C_F_pointer (Ccompute(1), compute, (/nc, nr/)) + end subroutine lammps_extract_compute_dp2a + +!----------------------------------------------------------------------------- + +! lammps_extract_fix {{{2 + function lammps_extract_fix_Cptr (ptr, id, style, type, i, j) & + result (fix) + type (C_ptr) :: fix + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style, type, i, j + character (kind=C_char), dimension(len_trim(id)+1) :: Cid + integer (kind=C_int) :: Cstyle, Ctype, Ci, Cj + Cid = string2Cstring (id) + Cstyle = style + Ctype = type + Ci = i - 1 ! This is for consistency with the values from f_ID[i], + Cj = j - 1 ! which is different from what library.cpp uses! + if ( (type >= 1 .and. Ci < 0) .or. & + (type == 2 .and. (Ci < 0 .or. Cj < 0) ) ) then + call lammps_error_all (ptr, FLERR, 'Index out of range in& + & lammps_extract_fix') + end if + fix = lammps_actual_extract_fix (ptr, Cid, Cstyle, Ctype, Ci, Cj) + end function lammps_extract_fix_Cptr + subroutine lammps_extract_fix_dp (fix, ptr, id, style, type, i, j) + real (C_double), intent(out) :: fix + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style, type, i, j + type (C_ptr) :: Cptr + real (C_double), pointer :: Fptr + ! Check for the correct dimensionality + if ( style /= 0 ) then + select case (type) + case (0) + call lammps_error_all (ptr, FLERR, 'There is no per-atom or local& + & scalar data available from fixes.') + case (1) + call lammps_error_all (ptr, FLERR, 'You cannot extract a fix''s & + &per-atom/local vector (rank 1) into a scalar.') + case (2) + call lammps_error_all (ptr, FLERR, 'You cannot extract a fix''s & + &per-atom/local array (rank 2) into a scalar.') + case default + call lammps_error_all (ptr, FLERR, 'Invalid extract_fix style/& + &type combination.') + end select + return + end if + Cptr = lammps_extract_fix_Cptr (ptr, id, style, type, i, j) + call C_F_pointer (Cptr, Fptr) + fix = Fptr + nullify (Fptr) + ! Memory is only allocated for "global" fix variables + if ( style == 0 ) call lammps_free (Cptr) + end subroutine lammps_extract_fix_dp + subroutine lammps_extract_fix_dpa (fix, ptr, id, style, type, i, j) + real (C_double), dimension(:), pointer, intent(out) :: fix + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style, type, i, j + type (C_ptr) :: Cptr + integer :: fix_len + ! Check for the correct dimensionality + if ( style == 0 ) then + call lammps_error_all (ptr, FLERR, 'You can''t extract the& + & whole vector from global fix data') + return + else if ( type == 0 ) then + call lammps_error_all (ptr, FLERR, 'You can''t extract a fix& + & scalar into a rank 1 variable') + return + else if ( type == 2 ) then + call lammps_error_all (ptr, FLERR, 'You cannot extract a fix& + & array into a rank 1 variable.') + return + else if ( type /= 1 ) then + call lammps_error_all (ptr, FLERR, 'Invalid type for fix extraction.') + return + end if + fix_len = lammps_extract_fix_vectorsize (ptr, id, style) + call C_F_pointer (Cptr, fix, (/fix_len/)) + ! Memory is only allocated for "global" fix variables, which we should + ! never get here, so no need to call lammps_free! + end subroutine lammps_extract_fix_dpa + subroutine lammps_extract_fix_dp2a (fix, ptr, id, style, type, i, j) + real (C_double), dimension(:,:), pointer, intent(out) :: fix + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style, type, i, j + type (C_ptr) :: Cptr + type (C_ptr), pointer, dimension(:) :: Cfix + integer :: nr, nc + ! Check for the correct dimensionality + if ( style == 0 ) then + call lammps_error_all (ptr, FLERR, 'It is not possible to extract the& + & entire array from global fix data.') + return + else if ( type == 0 ) then + call lammps_error_all (ptr, FLERR, 'You cannot extract a fix& + & scalar (rank 0) into a rank 2 variable.') + return + else if ( type == 1 ) then + call lammps_error_all (ptr, FLERR, 'You cannot extract a fix& + & vector (rank 1) into a rank 2 variable.') + return + end if + call lammps_extract_fix_arraysize (ptr, id, style, nr, nc) + ! Extract pointer to first element as Cfix(1) + call C_F_pointer (Cptr, Cfix, (/nr/)) + ! Now extract the array, which is transposed + call C_F_pointer (Cfix(1), fix, (/nc, nr/)) + end subroutine lammps_extract_fix_dp2a + +!----------------------------------------------------------------------------- + +! lammps_extract_variable {{{2 + function lammps_extract_variable_Cptr (ptr, name, group) result (variable) + type (C_ptr) :: ptr, variable + character (len=*) :: name + character (len=*), optional :: group + character (kind=C_char), dimension(len_trim(name)+1) :: Cname + character (kind=C_char), dimension(:), allocatable :: Cgroup + Cname = string2Cstring (name) + if ( present(group) ) then + allocate (Cgroup(len_trim(group)+1)) + Cgroup = string2Cstring (group) + else + allocate (Cgroup(1)) + Cgroup(1) = C_NULL_CHAR + end if + variable = lammps_actual_extract_variable (ptr, Cname, Cgroup) + deallocate (Cgroup) + end function lammps_extract_variable_Cptr + subroutine lammps_extract_variable_dp (variable, ptr, name, group) + real (C_double), intent(out) :: variable + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + character (len=*), intent(in), optional :: group + type (C_ptr) :: Cptr + real (C_double), pointer :: Fptr + if ( present(group) ) then + Cptr = lammps_extract_variable_Cptr (ptr, name, group) + else + Cptr = lammps_extract_variable_Cptr (ptr, name) + end if + call C_F_pointer (Cptr, Fptr) + variable = Fptr + nullify (Fptr) + call lammps_free (Cptr) + end subroutine lammps_extract_variable_dp + subroutine lammps_extract_variable_dpa (variable, ptr, name, group) + real (C_double), dimension(:), allocatable, intent(out) :: variable + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + character (len=*), intent(in), optional :: group + type (C_ptr) :: Cptr + real (C_double), dimension(:), pointer :: Fptr + integer :: natoms + if ( present(group) ) then + Cptr = lammps_extract_variable_Cptr (ptr, name, group) + else + Cptr = lammps_extract_variable_Cptr (ptr, name) + end if + natoms = lammps_get_natoms (ptr) + allocate (variable(natoms)) + call C_F_pointer (Cptr, Fptr, (/natoms/)) + variable = Fptr + nullify (Fptr) + call lammps_free (Cptr) + end subroutine lammps_extract_variable_dpa + +!-------------------------------------------------------------------------2}}} + + subroutine lammps_gather_atoms_ia (ptr, name, count, data) + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + integer, intent(in) :: count + integer, dimension(:), allocatable, intent(out) :: data + type (C_ptr) :: Cdata + integer (C_int), dimension(:), pointer :: Fdata + integer (C_int) :: natoms + character (kind=C_char), dimension(len_trim(name)+1) :: Cname + integer (C_int), parameter :: Ctype = 0_C_int + integer (C_int) :: Ccount + natoms = lammps_get_natoms (ptr) + Cname = string2Cstring (name) + if ( count /= 1 .and. count /= 3 ) then + call lammps_error_all (ptr, FLERR, 'lammps_gather_atoms requires& + & count to be either 1 or 3') + else + Ccount = count + end if + allocate ( Fdata(count*natoms) ) + allocate ( data(count*natoms) ) + Cdata = C_loc (Fdata(1)) + call lammps_actual_gather_atoms (ptr, Cname, Ctype, Ccount, Cdata) + data = Fdata + deallocate (Fdata) + end subroutine lammps_gather_atoms_ia + subroutine lammps_gather_atoms_dpa (ptr, name, count, data) + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + integer, intent(in) :: count + double precision, dimension(:), allocatable, intent(out) :: data + type (C_ptr) :: Cdata + real (C_double), dimension(:), pointer :: Fdata + integer (C_int) :: natoms + character (kind=C_char), dimension(len_trim(name)+1) :: Cname + integer (C_int), parameter :: Ctype = 1_C_int + integer (C_int) :: Ccount + natoms = lammps_get_natoms (ptr) + Cname = string2Cstring (name) + if ( count /= 1 .and. count /= 3 ) then + call lammps_error_all (ptr, FLERR, 'lammps_gather_atoms requires& + & count to be either 1 or 3') + else + Ccount = count + end if + allocate ( Fdata(count*natoms) ) + allocate ( data(count*natoms) ) + Cdata = C_loc (Fdata(1)) + call lammps_actual_gather_atoms (ptr, Cname, Ctype, Ccount, Cdata) + data = Fdata(:) + deallocate (Fdata) + end subroutine lammps_gather_atoms_dpa + +!----------------------------------------------------------------------------- + + subroutine lammps_scatter_atoms_ia (ptr, name, data) + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + integer, dimension(:), intent(in) :: data + integer (kind=C_int) :: natoms, Ccount + integer (kind=C_int), parameter :: Ctype = 0_C_int + character (kind=C_char), dimension(len_trim(name)+1) :: Cname + integer (C_int), dimension(size(data)), target :: Fdata + type (C_ptr) :: Cdata + natoms = lammps_get_natoms (ptr) + Cname = string2Cstring (name) + Ccount = size(data) / natoms + if ( Ccount /= 1 .and. Ccount /= 3 ) & + call lammps_error_all (ptr, FLERR, 'lammps_gather_atoms requires& + & count to be either 1 or 3') + Fdata = data + Cdata = C_loc (Fdata(1)) + call lammps_actual_scatter_atoms (ptr, Cname, Ctype, Ccount, Cdata) + end subroutine lammps_scatter_atoms_ia + subroutine lammps_scatter_atoms_dpa (ptr, name, data) + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: name + double precision, dimension(:), intent(in) :: data + integer (kind=C_int) :: natoms, Ccount + integer (kind=C_int), parameter :: Ctype = 1_C_int + character (kind=C_char), dimension(len_trim(name)+1) :: Cname + real (C_double), dimension(size(data)), target :: Fdata + type (C_ptr) :: Cdata + natoms = lammps_get_natoms (ptr) + Cname = string2Cstring (name) + Ccount = size(data) / natoms + if ( Ccount /= 1 .and. Ccount /= 3 ) & + call lammps_error_all (ptr, FLERR, 'lammps_gather_atoms requires& + & count to be either 1 or 3') + Fdata = data + Cdata = C_loc (Fdata(1)) + call lammps_actual_scatter_atoms (ptr, Cname, Ctype, Ccount, Cdata) + end subroutine lammps_scatter_atoms_dpa + +!----------------------------------------------------------------------------- + + function lammps_extract_compute_vectorsize (ptr, id, style) & + result (vectorsize) + integer :: vectorsize + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style + integer (C_int) :: Cvectorsize, Cstyle + character (kind=C_char), dimension(len_trim(id)+1) :: Cid + Cid = string2Cstring (id) + Cstyle = int(style, C_int) + Cvectorsize = lammps_actual_extract_compute_vectorsize (ptr, Cid, Cstyle) + vectorsize = int(Cvectorsize, kind(vectorsize)) + end function lammps_extract_compute_vectorsize + +!----------------------------------------------------------------------------- + + function lammps_extract_fix_vectorsize (ptr, id, style) & + result (vectorsize) + integer :: vectorsize + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style + integer (C_int) :: Cvectorsize, Cstyle + character (kind=C_char), dimension(len_trim(id)+1) :: Cid + Cid = string2Cstring (id) + Cstyle = int(style, C_int) + Cvectorsize = lammps_actual_extract_fix_vectorsize (ptr, Cid, Cstyle) + vectorsize = int(Cvectorsize, kind(vectorsize)) + end function lammps_extract_fix_vectorsize + +!----------------------------------------------------------------------------- + + subroutine lammps_extract_compute_arraysize (ptr, id, style, nrows, ncols) + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style + integer, intent(out) :: nrows, ncols + integer (C_int) :: Cstyle, Cnrows, Cncols + character (kind=C_char), dimension(len_trim(id)+1) :: Cid + Cid = string2Cstring (id) + Cstyle = int (style, C_int) + call lammps_actual_extract_compute_arraysize (ptr, Cid, Cstyle, & + Cnrows, Cncols) + nrows = int (Cnrows, kind(nrows)) + ncols = int (Cncols, kind(ncols)) + end subroutine lammps_extract_compute_arraysize + +!----------------------------------------------------------------------------- + + subroutine lammps_extract_fix_arraysize (ptr, id, style, nrows, ncols) + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: id + integer, intent(in) :: style + integer, intent(out) :: nrows, ncols + integer (C_int) :: Cstyle, Cnrows, Cncols + character (kind=C_char), dimension(len_trim(id)+1) :: Cid + Cid = string2Cstring (id) + Cstyle = int (style, kind(Cstyle)) + call lammps_actual_extract_fix_arraysize (ptr, Cid, Cstyle, & + Cnrows, Cncols) + nrows = int (Cnrows, kind(nrows)) + ncols = int (Cncols, kind(ncols)) + end subroutine lammps_extract_fix_arraysize + +!----------------------------------------------------------------------------- + + subroutine lammps_error_all (ptr, file, line, str) + type (C_ptr), intent(in) :: ptr + character (len=*), intent(in) :: file, str + integer, intent(in) :: line + character (kind=C_char), dimension(len_trim(file)+1) :: Cfile + character (kind=C_char), dimension(len_trim(str)+1) :: Cstr + integer (C_int) :: Cline + Cline = int(line, kind(Cline)) + Cfile = string2Cstring (file) + Cstr = string2Cstring (str) + call lammps_actual_error_all (ptr, Cfile, Cline, Cstr) + end subroutine lammps_error_all + +!----------------------------------------------------------------------------- + +! Locally defined helper functions {{{1 + + pure function string2Cstring (string) result (C_string) + use, intrinsic :: ISO_C_binding, only : C_char, C_NULL_CHAR + character (len=*), intent(in) :: string + character (len=1, kind=C_char) :: C_string (len_trim(string)+1) + integer :: i, n + n = len_trim (string) + forall (i = 1:n) + C_string(i) = string(i:i) + end forall + C_string(n+1) = C_NULL_CHAR + end function string2Cstring + +!----------------------------------------------------------------------------- + + subroutine Cstring2argcargv (Cstring, argc, argv) + !! Converts a C-style string to argc and argv, that is, words in Cstring + !! become C-style strings in argv. IMPORTANT: Cstring is modified by + !! this routine! I would make Cstring local TO this routine and accept + !! a Fortran-style string instead, but we run into scoping and + !! allocation problems that way. This routine assumes the string is + !! null-terminated, as all C-style strings must be. + + character (kind=C_char), dimension(*), target, intent(inout) :: Cstring + integer (C_int), intent(out) :: argc + type (C_ptr), dimension(:), allocatable, intent(out) :: argv + + integer :: StringStart, SpaceIndex, strlen, argnum + + argc = 1_C_int + + ! Find the length of the string + strlen = 1 + do while ( Cstring(strlen) /= C_NULL_CHAR ) + strlen = strlen + 1 + end do + + ! Find the number of non-escaped spaces + SpaceIndex = 2 + do while ( SpaceIndex < strlen ) + if ( Cstring(SpaceIndex) == ' ' .and. & + Cstring(SpaceIndex-1) /= '\' ) then + argc = argc + 1_C_int + ! Find the next non-space character + do while ( Cstring(SpaceIndex+1) == ' ') + SpaceIndex = SpaceIndex + 1 + end do + end if + SpaceIndex = SpaceIndex + 1 + end do + + ! Now allocate memory for argv + allocate (argv(argc)) + + ! Now find the string starting and ending locations + StringStart = 1 + SpaceIndex = 2 + argnum = 1 + do while ( SpaceIndex < strlen ) + if ( Cstring(SpaceIndex) == ' ' .and. & + Cstring(SpaceIndex-1) /= '\' ) then + ! Found a real space => split strings and store this one + Cstring(Spaceindex) = C_NULL_CHAR ! Replaces space with NULL + argv(argnum) = C_loc(Cstring(StringStart)) + argnum = argnum + 1 + ! Find the next non-space character + do while ( Cstring(SpaceIndex+1) == ' ') + SpaceIndex = SpaceIndex + 1 + end do + StringStart = SpaceIndex + 1 + else if ( Cstring(SpaceIndex) == ' ' .and. & + Cstring(SpaceIndex-1) == '\' ) then + ! Escaped space => remove backslash and move rest of array + Cstring(SpaceIndex-1:strlen-1) = Cstring(SpaceIndex:strlen) + strlen = strlen - 1 ! Last character is still C_NULL_CHAR + end if + SpaceIndex = SpaceIndex + 1 + end do + ! Now handle the last argument + argv(argnum) = C_loc(Cstring(StringStart)) + + end subroutine Cstring2argcargv + +! 1}}} + +end module LAMMPS + +! vim: foldmethod=marker tabstop=3 softtabstop=3 shiftwidth=3 expandtab diff --git a/examples/COUPLE/fortran3/README b/examples/COUPLE/fortran3/README new file mode 100644 index 0000000000..9effa35ec4 --- /dev/null +++ b/examples/COUPLE/fortran3/README @@ -0,0 +1,33 @@ +This directory has an example of using a callback function to obtain +forces from a fortran code for a LAMMPS simulation. The reader should +refer to the README file in COUPLE/fortran2 before proceeding. Here, +the LAMMPS.F90 file has been modified slightly and additional files +named LAMMPS-wrapper2.h and LAMMPS-wrapper2.cpp have been included in +order to supply wrapper functions to set the LAMMPS callback function +and total energy. + +In this example, the callback function is set to run the +semi-empirical quantum code DFTB+ in serial and then read in the total +energy, forces, and stress tensor from file. In this case, nlocal = +the total number of atoms in the system, so particle positions can be +read from the pos array directly, and DFTB+ forces can simply be +included via the fext array. The user should take care in the case of +a parallel calculation, where LAMMPS can assign different particules +to each processor. For example, the user should use functions such as +lammps_gather_atoms() and lammps_scatter_atoms() in the case where the +fortran force calculating code requires the positions of all atoms, +etc. + +A few more important notes: + +-The stress tensor from DFTB+ is passed in to LAMMPS via pointer. +-Calling the subroutine lammps_set_callback() is required in order to set + a pointer to the callback function in LAMMPS. +-The subroutine lammps_set_user_energy() passes in the potential energy + from DFTB+ to LAMMPS. + +This example was created by Nir Goldman, whom you can contact with +questions: + +Nir Goldman, LLNL +ngoldman@llnl.gov diff --git a/examples/COUPLE/fortran3/data.diamond b/examples/COUPLE/fortran3/data.diamond new file mode 100644 index 0000000000..b3dd599cf4 --- /dev/null +++ b/examples/COUPLE/fortran3/data.diamond @@ -0,0 +1,148 @@ +# Position data file + +64 atoms +1 atom types + +0 7.134 xlo xhi +0 7.134 ylo yhi +0 7.134 zlo zhi + +0.00000000 0.00000000 0.00000000 xy xz yz + +Masses + +1 12.010000 + +Atoms + + 1 1 0 0 0 0 + 2 1 0 0.89175 0.89175 0.89175 + 3 1 0 1.7835 1.7835 0 + 4 1 0 2.67525 2.67525 0.89175 + 5 1 0 0 1.7835 1.7835 + 6 1 0 0.89175 2.67525 2.67525 + 7 1 0 1.7835 0 1.7835 + 8 1 0 2.67525 0.89175 2.67525 + 9 1 0 0 0 3.567 + 10 1 0 0.89175 0.89175 4.45875 + 11 1 0 1.7835 1.7835 3.567 + 12 1 0 2.67525 2.67525 4.45875 + 13 1 0 0 1.7835 5.3505 + 14 1 0 0.89175 2.67525 6.24225 + 15 1 0 1.7835 0 5.3505 + 16 1 0 2.67525 0.89175 6.24225 + 17 1 0 0 3.567 0 + 18 1 0 0.89175 4.45875 0.89175 + 19 1 0 1.7835 5.3505 0 + 20 1 0 2.67525 6.24225 0.89175 + 21 1 0 0 5.3505 1.7835 + 22 1 0 0.89175 6.24225 2.67525 + 23 1 0 1.7835 3.567 1.7835 + 24 1 0 2.67525 4.45875 2.67525 + 25 1 0 0 3.567 3.567 + 26 1 0 0.89175 4.45875 4.45875 + 27 1 0 1.7835 5.3505 3.567 + 28 1 0 2.67525 6.24225 4.45875 + 29 1 0 0 5.3505 5.3505 + 30 1 0 0.89175 6.24225 6.24225 + 31 1 0 1.7835 3.567 5.3505 + 32 1 0 2.67525 4.45875 6.24225 + 33 1 0 3.567 0 0 + 34 1 0 4.45875 0.89175 0.89175 + 35 1 0 5.3505 1.7835 0 + 36 1 0 6.24225 2.67525 0.89175 + 37 1 0 3.567 1.7835 1.7835 + 38 1 0 4.45875 2.67525 2.67525 + 39 1 0 5.3505 0 1.7835 + 40 1 0 6.24225 0.89175 2.67525 + 41 1 0 3.567 0 3.567 + 42 1 0 4.45875 0.89175 4.45875 + 43 1 0 5.3505 1.7835 3.567 + 44 1 0 6.24225 2.67525 4.45875 + 45 1 0 3.567 1.7835 5.3505 + 46 1 0 4.45875 2.67525 6.24225 + 47 1 0 5.3505 0 5.3505 + 48 1 0 6.24225 0.89175 6.24225 + 49 1 0 3.567 3.567 0 + 50 1 0 4.45875 4.45875 0.89175 + 51 1 0 5.3505 5.3505 0 + 52 1 0 6.24225 6.24225 0.89175 + 53 1 0 3.567 5.3505 1.7835 + 54 1 0 4.45875 6.24225 2.67525 + 55 1 0 5.3505 3.567 1.7835 + 56 1 0 6.24225 4.45875 2.67525 + 57 1 0 3.567 3.567 3.567 + 58 1 0 4.45875 4.45875 4.45875 + 59 1 0 5.3505 5.3505 3.567 + 60 1 0 6.24225 6.24225 4.45875 + 61 1 0 3.567 5.3505 5.3505 + 62 1 0 4.45875 6.24225 6.24225 + 63 1 0 5.3505 3.567 5.3505 + 64 1 0 6.24225 4.45875 6.24225 + +Velocities + +1 -0.00733742 -0.0040297 -0.00315229 +2 -0.00788609 -0.00567535 -0.00199152 +3 -0.00239042 0.00710139 -0.00335049 +4 0.00678551 0.0019976 0.00219289 +5 0.00413717 0.00275709 0.000937637 +6 -0.00126313 0.00485636 0.00727862 +7 0.00337547 -0.00234623 -0.000922223 +8 -0.00792183 -0.00509186 -0.00104168 +9 0.00414091 0.00390285 0.000845961 +10 -0.000284543 0.0010771 -0.00458404 +11 -0.00394968 -0.00446363 -0.00361688 +12 0.00067088 -0.00655175 -0.00752464 +13 0.00306632 -0.00245545 -0.00183867 +14 -0.0082145 -0.00564127 0.000281191 +15 0.00504454 0.0045835 0.000495763 +16 0.0035767 0.00320441 -0.00486426 +17 0.00420597 0.00262005 -0.0049459 +18 0.00440579 -1.76783e-05 0.00449311 +19 -0.00406463 0.00613304 0.00285599 +20 0.00171215 -0.00517887 0.00124326 +21 0.0011118 0.00334129 -0.0015222 +22 -0.00838394 -0.00112906 -0.00353379 +23 -0.00578527 -0.00415501 0.00297043 +24 -0.00211466 0.000964108 -0.00716523 +25 -0.000204107 -0.00380986 0.00681648 +26 0.00677838 0.00540935 0.0044354 +27 -0.00266809 -0.00358382 -0.00241889 +28 -0.0003973 0.00236566 0.00558871 +29 0.000754103 0.00457797 0.000105531 +30 -0.00246049 0.00110428 0.00511088 +31 0.00248891 0.00623314 0.00461597 +32 -0.00509423 0.000570503 0.00720856 +33 -0.00244427 -0.00374384 0.00618767 +34 -0.000360752 -8.10558e-05 0.00314052 +35 0.00435313 -0.00630587 -0.0070309 +36 0.00651087 -0.00389833 3.72525e-05 +37 0.00631828 -0.00316064 0.00231522 +38 -0.00579624 -0.00345068 -0.000277486 +39 0.00483974 0.000715028 0.000206355 +40 -0.00388164 -0.00189242 -0.00554862 +41 0.00398115 0.00152915 0.00756919 +42 -0.000552263 0.00352025 -0.000246143 +43 -0.00800284 0.00555703 0.00425716 +44 -0.00734405 -0.00752512 0.00667173 +45 -0.00545636 0.00421035 0.00399552 +46 0.00480246 0.00621147 -0.00492715 +47 -0.00424168 0.00621818 -9.37733e-05 +48 -0.00649561 0.00612908 -0.0020753 +49 -0.0075007 -0.00384737 -0.00687913 +50 -0.00203903 -0.00764372 0.0023883 +51 0.00442642 0.00744072 -0.0049344 +52 -0.00280486 -0.00509128 -0.00678045 +53 0.00679491 0.00583493 0.00333875 +54 0.00574665 -0.00521074 0.00523475 +55 0.00305618 -0.00320094 0.00341297 +56 0.004304 0.000615544 -0.00668787 +57 0.00564532 0.00327373 0.00388611 +58 0.000676899 0.00210326 0.00495295 +59 0.000160781 -0.00744313 -0.00279828 +60 0.00623521 0.00371301 0.00178015 +61 0.00520759 0.000642669 0.00207913 +62 0.00398042 0.0046438 -0.00359978 +63 -0.00478071 -0.00304932 -0.00765125 +64 0.00282671 -0.00548392 -0.00692691 diff --git a/examples/COUPLE/fortran3/in.simple b/examples/COUPLE/fortran3/in.simple new file mode 100644 index 0000000000..894a490cf8 --- /dev/null +++ b/examples/COUPLE/fortran3/in.simple @@ -0,0 +1,16 @@ +units real +atom_style charge +atom_modify map array +atom_modify sort 0 0.0 +read_data data.diamond +neighbor 1.0 bin +neigh_modify delay 0 every 5 check no +fix 1 all nve +fix 2 all external pf/callback 1 1 + +fix_modify 2 energy yes +thermo_style custom step temp etotal ke pe lx ly lz pxx pyy pzz press + +thermo 1 +timestep 0.5 + diff --git a/examples/COUPLE/fortran3/makefile b/examples/COUPLE/fortran3/makefile new file mode 100644 index 0000000000..86dea30850 --- /dev/null +++ b/examples/COUPLE/fortran3/makefile @@ -0,0 +1,45 @@ +SHELL = /bin/sh + +# Path to LAMMPS extraction directory +LAMMPS_ROOT = ../../.. +LAMMPS_SRC = $(LAMMPS_ROOT)/src + +# Uncomment the line below if using the MPI stubs library +MPI_STUBS = #-I$(LAMMPS_SRC)/STUBS + +FC = mpif90 # replace with your Fortran compiler +CXX = mpicc # replace with your C++ compiler + +# Flags for Fortran compiler, C++ compiler, and C preprocessor, respectively +FFLAGS = -O2 -fPIC +CXXFLAGS = -O2 -fPIC +CPPFLAGS = -DOMPI_SKIP_MPICXX=1 -DMPICH_SKIP_MPICXX + +all : liblammps_fortran.a liblammps_fortran.so simpleF.x + +liblammps_fortran.so : LAMMPS.o LAMMPS-wrapper.o LAMMPS-wrapper2.o + $(FC) $(FFLAGS) -shared -o $@ $^ + +simpleF.x: simple.o LAMMPS.o LAMMPS-wrapper.o LAMMPS-wrapper2.o + $(FC) $(FFLAGS) simple.o -o simpleF.x liblammps_fortran.a $(LAMMPS_SRC)/liblammps_mvapich.a -lstdc++ /usr/local/tools/fftw/lib/libfftw.a + +liblammps_fortran.a : LAMMPS.o LAMMPS-wrapper.o LAMMPS-wrapper2.o + $(AR) rs $@ $^ + +LAMMPS.o lammps.mod : LAMMPS.F90 + $(FC) $(CPPFLAGS) $(FFLAGS) -c $< + +simple.o : simple.f90 + $(FC) $(FFLAGS) -c $< + +LAMMPS-wrapper.o : LAMMPS-wrapper.cpp LAMMPS-wrapper.h + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -I$(LAMMPS_SRC) $(MPI_STUBS) + +LAMMPS-wrapper2.o : LAMMPS-wrapper2.cpp LAMMPS-wrapper2.h + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -I$(LAMMPS_SRC) $(MPI_STUBS) + +clean : + $(RM) *.o *.mod liblammps_fortran.a liblammps_fortran.so + +dist : + tar -czvf fortran-interface-callback.tar.gz LAMMPS-wrapper.h LAMMPS-wrapper.cpp LAMMPS-wrapper2.h LAMMPS-wrapper2.cpp LAMMPS.F90 makefile README simple.f90 diff --git a/examples/COUPLE/fortran3/simple.f90 b/examples/COUPLE/fortran3/simple.f90 new file mode 100644 index 0000000000..40f8bf8b86 --- /dev/null +++ b/examples/COUPLE/fortran3/simple.f90 @@ -0,0 +1,114 @@ + module callback + implicit none + contains + subroutine fortran_callback(lmp, timestep, nlocal, ids, c_pos, c_fext) & + & bind(C, name='f_callback') + use, intrinsic :: ISO_C_binding + use LAMMPS + implicit none + type (C_ptr), value :: lmp + integer(C_int64_t), intent(in), value :: timestep + integer(C_int), intent(in), value :: nlocal + real (C_double), dimension(:,:), pointer :: x + type(c_ptr) :: c_pos, c_fext, c_ids + double precision, pointer :: fext(:,:), pos(:,:) + integer, intent(in) :: ids(nlocal) + real (C_double), dimension(:), pointer :: virial => NULL() + real (C_double) :: etot + real(C_double), pointer :: ts_lmp + double precision :: stress(3,3), ts_dftb + integer :: natom , i + real (C_double), parameter :: econv = 627.4947284155114 ! converts from Ha to + double precision, parameter :: fconv = 1185.793095983065 ! converts from Ha/bohr to + double precision, parameter :: autoatm = 2.9037166638E8 + double precision lx, ly, lz + real (C_double), pointer :: boxxlo, boxxhi + real (C_double), pointer :: boxylo, boxyhi + real (C_double), pointer :: boxzlo, boxzhi + double precision, parameter :: nktv2p = 68568.4149999999935972 + double precision :: volume + type (C_ptr) :: Cptr + type (C_ptr), pointer, dimension(:) :: Catom + + call c_f_pointer(c_pos, pos, [3,nlocal]) + call c_f_pointer(c_fext, fext, [3,nlocal]) + call lammps_extract_global(boxxlo, lmp, 'boxxlo') + call lammps_extract_global(boxxhi, lmp, 'boxxhi') + call lammps_extract_global(boxylo, lmp, 'boxylo') + call lammps_extract_global(boxyhi, lmp, 'boxyhi') + call lammps_extract_global(boxzlo, lmp, 'boxzlo') + call lammps_extract_global(boxzhi, lmp, 'boxzhi') + lx = boxxhi - boxxlo + ly = boxyhi - boxylo + lz = boxzhi - boxzlo + volume = lx*ly*lz + open (unit = 10, status = 'replace', action = 'write', file='lammps.gen') + write(10,*)nlocal,"S" + write(10,*) "C" + do i = 1, nlocal + write(10,'(2I,3F15.6)')i,1,pos(:,ids(i)) + enddo + write(10,*)"0.0 0.0 0.0" + write(10,*)lx,0,0 + write(10,*)0,ly,0 + write(10,*)0,0,lz + close(10) + call system("./dftb+ > dftb.out") + open (unit = 10, status = 'old', file = 'results.out') + read(10,*)etot + read(10,*)ts_dftb + do i = 1, 3 + read(10,*)stress(i,:) + enddo + stress (:,:) = stress(:,:)*autoatm + etot = etot*econv + call lammps_extract_global(ts_lmp, lmp, 'TS_dftb') + ts_lmp = ts_dftb + do i = 1, nlocal + read(10,*)fext(:,ids(i)) + fext(:,ids(i)) = fext(:,ids(i))*fconv + enddo + close(10) + call lammps_set_user_energy (lmp, etot) + call lammps_extract_atom (virial, lmp, 'virial') + if (.not. associated(virial)) then + print*,'virial pointer not associated.' + STOP + endif + virial(1) = stress(1,1)/(nktv2p/volume) + virial(2) = stress(2,2)/(nktv2p/volume) + virial(3) = stress(3,3)/(nktv2p/volume) + virial(4) = stress(1,2)/(nktv2p/volume) + virial(5) = stress(1,3)/(nktv2p/volume) + virial(6) = stress(2,3)/(nktv2p/volume) + + end subroutine + end module callback + + +program simple_fortran_callback + + use MPI + use LAMMPS + use callback + use, intrinsic :: ISO_C_binding, only : C_double, C_ptr, C_int, C_FUNPTR + implicit none + type (C_ptr) :: lmp + integer :: error, narg, me, nprocs + + call MPI_Init (error) + call MPI_Comm_rank (MPI_COMM_WORLD, me, error) + call MPI_Comm_size (MPI_COMM_WORLD, nprocs, error) + + call lammps_open_no_mpi ('lmp -log log.simple', lmp) + call lammps_file (lmp, 'in.simple') + call lammps_set_callback(lmp) + + call lammps_command (lmp, 'run 10') + call lammps_close (lmp) + call MPI_Finalize (error) + + +end program simple_fortran_callback + + diff --git a/src/modify.cpp b/src/modify.cpp index 01de6b5928..89c4a43001 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -996,7 +996,6 @@ int Modify::check_package(const char *package_fix_name) return 1; } - /* ---------------------------------------------------------------------- check if the group indicated by groupbit overlaps with any currently existing rigid fixes. return 1 in this case otherwise 0 -- GitLab From 67d474df2a5d97e4905bcd61355229af33bd0e76 Mon Sep 17 00:00:00 2001 From: Abdo Date: Wed, 5 Jul 2017 14:39:37 +0900 Subject: [PATCH 405/593] deleteing USER-EES --- src/USER-EES/README | 10 - src/USER-EES/fix_wall_ees.cpp | 207 -------------- src/USER-EES/fix_wall_ees.h | 51 ---- src/USER-EES/fix_wall_region_ees.cpp | 405 --------------------------- src/USER-EES/fix_wall_region_ees.h | 94 ------- src/USER-EES/install.sh | 34 --- 6 files changed, 801 deletions(-) delete mode 100644 src/USER-EES/README delete mode 100644 src/USER-EES/fix_wall_ees.cpp delete mode 100644 src/USER-EES/fix_wall_ees.h delete mode 100644 src/USER-EES/fix_wall_region_ees.cpp delete mode 100644 src/USER-EES/fix_wall_region_ees.h delete mode 100644 src/USER-EES/install.sh diff --git a/src/USER-EES/README b/src/USER-EES/README deleted file mode 100644 index 220c7fa203..0000000000 --- a/src/USER-EES/README +++ /dev/null @@ -1,10 +0,0 @@ -This package implements the EES potential between ellipsoidal particles and a semi finite LJ wall introduced by Babadi and Ejtehadi. - -This potential has fixes in both "fix wall" style and "fix wall/region" style so can be used as a boundary of simulation box or on the sides of a region inside the simulation box. - -The ASPHERE package is required for using this fixes. - -For more details please refer to documentation of LAMMPS under "fix wall/ees" entry. -There are also some example of using this code in /examples/usr/EES. - -This implementation is done by Abdoreza Ershadinia at Sharif University of Technology--Tehran (a.ershdinia@physics.sahrif.edu). diff --git a/src/USER-EES/fix_wall_ees.cpp b/src/USER-EES/fix_wall_ees.cpp deleted file mode 100644 index 8ccadf274a..0000000000 --- a/src/USER-EES/fix_wall_ees.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#include "math.h" -#include "math_extra.h" -#include "fix_wall_ees.h" -#include "atom.h" -#include "atom_vec.h" -#include "atom_vec_ellipsoid.h" -#include "error.h" - -using namespace LAMMPS_NS; -using namespace FixConst; - -/* ---------------------------------------------------------------------- */ - -FixWallEES::FixWallEES(LAMMPS *lmp, int narg, char **arg) : - FixWall(lmp, narg, arg) {} - -/* ---------------------------------------------------------------------- */ - -void FixWallEES::precompute(int m) -{ - coeff1[m] = ( 2. / 4725. ) * epsilon[m] * pow(sigma[m],12.0); - coeff2[m] = ( 1. / 24. ) * epsilon[m] * pow(sigma[m],6.0); - - coeff3[m] = ( 2. / 315. ) * epsilon[m] * pow(sigma[m],12.0); - coeff4[m] = ( 1. / 3. ) * epsilon[m] * pow(sigma[m],6.0); - - coeff5[m] = ( 4. / 315. ) * epsilon[m] * pow(sigma[m],12.0); - coeff6[m] = ( 1. / 12. ) * epsilon[m] * pow(sigma[m],6.0); -} - -/* ---------------------------------------------------------------------- */ -void FixWallEES::init() -{ - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - if (!avec) - error->all(FLERR,"Fix wall/ees requires atom style ellipsoid"); - - // check that all particles are finite-size ellipsoids - // no point particles allowed, spherical is OK - - int *ellipsoid = atom->ellipsoid; - int *mask = atom->mask; - int nlocal = atom->nlocal; - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) - if (ellipsoid[i] < 0) - error->one(FLERR,"Fix wall/ees requires extended particles"); - - FixWall::init(); -} - - -/* ---------------------------------------------------------------------- - interaction of all particles in group with a wall - m = index of wall coeffs - which = xlo,xhi,ylo,yhi,zlo,zhi - error if any particle is on or behind wall -------------------------------------------------------------------------- */ - -void FixWallEES::wall_particle(int m, int which, double coord) -{ - double delta; - - double **x = atom->x; - double **f = atom->f; - double **tor = atom->torque; - - - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecEllipsoid::Bonus *bonus = avec->bonus; - int *ellipsoid = atom->ellipsoid; - int *mask = atom->mask; - int nlocal = atom->nlocal; - - - int dim = which / 2; - int side = which % 2; - if (side == 0) side = -1; - - int onflag = 0; - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - - if (side < 0) - delta = x[i][dim] - coord; - else - delta = coord - x[i][dim]; - - if (delta >= cutoff[m]) - continue; - - double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; - double tempvec[3]= {0,0,0}; - double sigman = 0.0, sigman2 = 0.0; - double nhat[3] = {0,0,0}; - - nhat[dim]=-1*side; - nhat[(dim+1)%3] = 0 ; - nhat[(dim+2)%3] = 0 ; - - - double* shape = bonus[ellipsoid[i]].shape;; - MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); - MathExtra::transpose_matvec(A,nhat,tempvec); - for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; - for(int k = 0; k<3 ; k++) sigman2 += tempvec[k]*tempvec[k]; - sigman = sqrt(sigman2); - - if (delta <= sigman) { - onflag = 1; - continue; - } - - - double fwall = 0.0, twall = 0.0; - double delta2 = 0.0, delta3 = 0.0, delta4 = 0.0, delta5 = 0.0, delta6 = 0.0; - double sigman3 = 0.0, sigman4 = 0.0, sigman5 = 0.0, sigman6 = 0.0; - double hhss = 0.0, hhss2 = 0.0, hhss4 = 0.0, hhss7 = 0.0, hhss8 = 0.0; - double hps = 0.0; - double hms = 0.0; - - double tempvec2[3]= {0,0,0}; - - double SAn[3] = {0,0,0}; - double that[3] = {0,0,0}; - - double Lx[3][3] = {{0,0,0},{0,0,-1},{0,1,0}}; - double Ly[3][3] = {{0,0,1},{0,0,0},{-1,0,0}}; - double Lz[3][3] = {{0,-1,0},{1,0,0},{0,0,0}}; - - - for(int k = 0; k<3; k++) SAn[k] = tempvec[k]; - - sigman3 = sigman2 * sigman; - sigman4 = sigman2 * sigman2; - sigman5 = sigman4 * sigman; - sigman6 = sigman3 * sigman3; - - - delta2 = delta * delta; - delta3 = delta2 * delta; - delta4 = delta2 * delta2; - delta5 = delta3 * delta2; - delta6 = delta3 * delta3; - - hhss = delta2 - sigman2; - hhss2 = hhss * hhss; - hhss4 = hhss2 * hhss2; - hhss8 = hhss4 * hhss4; - hhss7 = hhss4 * hhss2 * hhss; - - hps = delta + sigman; - hms = delta - sigman; - - fwall = side*( - -1*coeff4[m]/hhss2 + - coeff3[m] * ( 21*delta6 + 63*delta4*sigman2 + 27*delta2*sigman4 + sigman6 ) / hhss8 - ); - f[i][dim] -= fwall; - - ewall[0] += -1*coeff2[m] * ( 4*delta/sigman2/hhss + 2*log(hms/hps)/sigman3 ) + - coeff1[m] * ( 35*delta5 + 70*delta3*sigman2 + 15*delta*sigman4 ) / hhss7; - - ewall[m+1] += fwall; - - twall = coeff6[m] * ( 6.*delta3/sigman4/hhss2 - 10.*delta/sigman2/hhss2 + 3.*log(hms/hps)/sigman5 ) + - coeff5[m] * ( 21.*delta5 + 30.*delta3*sigman2 + 5.*delta*sigman4 ) / hhss8 ; - - - MathExtra::matvec(Lx,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; - that[0] = MathExtra::dot3(SAn,tempvec2); - - MathExtra::matvec(Ly,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; - that[1] = MathExtra::dot3(SAn,tempvec2); - - MathExtra::matvec(Lz,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k < 3; k++) tempvec2[k] *= shape[k]; - that[2] = MathExtra::dot3(SAn,tempvec2); - - - for(int j = 0; j<3 ; j++) - tor[i][j] += twall * that[j]; - - } - - if (onflag) error->one(FLERR,"Particle on or inside fix wall surface"); -} diff --git a/src/USER-EES/fix_wall_ees.h b/src/USER-EES/fix_wall_ees.h deleted file mode 100644 index 17246c094f..0000000000 --- a/src/USER-EES/fix_wall_ees.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifdef FIX_CLASS - -FixStyle(wall/ees,FixWallEES) - -#else - -#ifndef LMP_FIX_WALL_EES_H -#define LMP_FIX_WALL_EES_H - -#include "fix_wall.h" - -namespace LAMMPS_NS { - -class FixWallEES : public FixWall { - public: - FixWallEES(class LAMMPS *, int, char **); - void precompute(int); - void init(); - void wall_particle(int, int, double); - - private: - double coeff1[6],coeff2[6],coeff3[6],coeff4[6],coeff5[6],coeff6[6]; - class AtomVecEllipsoid *avec; -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -E: Particle on or inside fix wall surface - -Particles must be "exterior" to the wall in order for energy/force to -be calculated. - -*/ diff --git a/src/USER-EES/fix_wall_region_ees.cpp b/src/USER-EES/fix_wall_region_ees.cpp deleted file mode 100644 index 20a5f74c15..0000000000 --- a/src/USER-EES/fix_wall_region_ees.cpp +++ /dev/null @@ -1,405 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ -#include -#include "math.h" -#include "stdlib.h" -#include "string.h" -#include "fix_wall_region_ees.h" -#include "atom.h" -#include "atom_vec.h" -#include "atom_vec_ellipsoid.h" -#include "domain.h" -#include "region.h" -#include "force.h" -#include "lattice.h" -#include "update.h" -#include "output.h" -#include "respa.h" -#include "error.h" -#include "math_extra.h" - -using namespace LAMMPS_NS; -using namespace FixConst; - -enum{LJ93,LJ126,COLLOID,HARMONIC,EES};//me - -/* ---------------------------------------------------------------------- */ -/// USAGE: -/// fix ID group-ID wall/region/ees region-ID epsilon sigma cutoff -/// -FixWallRegionEES::FixWallRegionEES(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) -{ - if (narg != 7) error->all(FLERR,"Illegal fix wall/region/ees command"); - scalar_flag = 1; - vector_flag = 1; - size_vector = 3; - global_freq = 1; - extscalar = 1; - extvector = 1; - - // parse args - - iregion = domain->find_region(arg[3]); - if (iregion == -1) - error->all(FLERR,"Region ID for fix wall/region/ees does not exist"); - int n = strlen(arg[3]) + 1; - idregion = new char[n]; - strcpy(idregion,arg[3]); - - - - epsilon = force->numeric(FLERR,arg[4]); - sigma = force->numeric(FLERR,arg[5]); - cutoff = force->numeric(FLERR,arg[6]); - - if (cutoff <= 0.0) error->all(FLERR,"Fix wall/region/ees cutoff <= 0.0"); - - eflag = 0; - ewall[0] = ewall[1] = ewall[2] = ewall[3] = 0.0; -} - -/* ---------------------------------------------------------------------- */ - -FixWallRegionEES::~FixWallRegionEES() -{ - delete [] idregion; -} - -/* ---------------------------------------------------------------------- */ - -int FixWallRegionEES::setmask() -{ - int mask = 0; - mask |= POST_FORCE; - mask |= THERMO_ENERGY; - mask |= POST_FORCE_RESPA; - mask |= MIN_POST_FORCE; - return mask; -} - -/* ---------------------------------------------------------------------- */ - -void FixWallRegionEES::init() -{ - // set index and check validity of region - - iregion = domain->find_region(idregion); - if (iregion == -1) - error->all(FLERR,"Region ID for fix wall/region/ees does not exist"); - - - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - if (!avec) - error->all(FLERR,"Fix wall/region/ees requires atom style ellipsoid"); - - // check that all particles are finite-size ellipsoids - // no point particles allowed, spherical is OK - - int *ellipsoid = atom->ellipsoid; - int *mask = atom->mask; - int nlocal = atom->nlocal; - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) - if (ellipsoid[i] < 0) - error->one(FLERR,"Fix wall/region/ees requires extended particles"); - - - // setup coefficients for each style - - coeff1 = ( 2. / 4725. ) * epsilon * pow(sigma,12.0); - coeff2 = ( 1. / 24. ) * epsilon * pow(sigma,6.0); - coeff3 = ( 2. / 315. ) * epsilon * pow(sigma,12.0); - coeff4 = ( 1. / 3. ) * epsilon * pow(sigma,6.0); - coeff5 = ( 4. / 315. ) * epsilon * pow(sigma,12.0); - coeff6 = ( 1. / 12. ) * epsilon * pow(sigma,6.0); - offset = 0; - - - if (strstr(update->integrate_style,"respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; -} - -/* ---------------------------------------------------------------------- */ - -void FixWallRegionEES::setup(int vflag) -{ - if (strstr(update->integrate_style,"verlet")) - post_force(vflag); - else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); - post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); - } -} - -/* ---------------------------------------------------------------------- */ - -void FixWallRegionEES::min_setup(int vflag) -{ - post_force(vflag); -} - -/* ---------------------------------------------------------------------- */ - -void FixWallRegionEES::post_force(int vflag) -{ - //me - //sth is needed here, but I dont know what - //that is calculation of sn - - int i,m,n; - double rinv,fx,fy,fz,tooclose[3];//me - double sn;//me - - eflag = 0; - ewall[0] = ewall[1] = ewall[2] = ewall[3] = 0.0; - - double **x = atom->x; - double **f = atom->f; - double *radius = atom->radius; - - double **tor = atom->torque; //me - - //avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");//me - AtomVecEllipsoid::Bonus *bonus = avec->bonus;//me - int *ellipsoid = atom->ellipsoid;//me - - int *mask = atom->mask; - int nlocal = atom->nlocal; - - Region *region = domain->regions[iregion]; - region->prematch(); - - int onflag = 0; - - // region->match() insures particle is in region or on surface, else error - // if returned contact dist r = 0, is on surface, also an error - // in COLLOID case, r <= radius is an error - - for (i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - if (!region->match(x[i][0],x[i][1],x[i][2])) { - onflag = 1; - continue; - } - - double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; - double tempvec[3]= {0,0,0}; - double sn2 = 0.0; - double nhat[3] = {0,0,0}; - double* shape = bonus[ellipsoid[i]].shape;; - MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); - - for(int which = 0 ; which < 3; which ++){//me - nhat[which]=1; - nhat[(which+1)%3] = 0 ; - nhat[(which+2)%3] = 0 ; - sn2 = 0 ; - MathExtra::transpose_matvec(A,nhat,tempvec); - for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; - for(int k = 0; k<3 ; k++) sn2 += tempvec[k]*tempvec[k]; - sn = sqrt(sn2); - tooclose[which] = sn; - } - - - - n = region->surface(x[i][0],x[i][1],x[i][2],cutoff); - - for (m = 0; m < n; m++) { - - if(region->contact[m].delx != 0 && region->contact[m].r <= tooclose[0] ){ - onflag = 1; - continue; - - }else if (region->contact[m].dely != 0 && region->contact[m].r <= tooclose[1]){ - onflag = 1; - continue; - }else if (region->contact[m].delz !=0 && region->contact[m].r <= tooclose[2]){ - onflag = 1; - continue; - } - else rinv = 1.0/region->contact[m].r; - - ees(m,i);//me - - ewall[0] += eng; - fx = fwall * region->contact[m].delx * rinv; - fy = fwall * region->contact[m].dely * rinv; - fz = fwall * region->contact[m].delz * rinv; - f[i][0] += fx; - f[i][1] += fy; - f[i][2] += fz; - - ewall[1] -= fx; - ewall[2] -= fy; - ewall[3] -= fz; - - tor[i][0] += torque[0]; - tor[i][1] += torque[1]; - tor[i][2] += torque[2]; - - } - } - - if (onflag) error->one(FLERR,"Particle on or inside surface of region " - "used in fix wall/region/ees"); -} - -/* ---------------------------------------------------------------------- */ - -void FixWallRegionEES::post_force_respa(int vflag, int ilevel, int iloop) -{ - if (ilevel == nlevels_respa-1) post_force(vflag); -} - -/* ---------------------------------------------------------------------- */ - -void FixWallRegionEES::min_post_force(int vflag) -{ - post_force(vflag); -} - -/* ---------------------------------------------------------------------- - energy of wall interaction -------------------------------------------------------------------------- */ - -double FixWallRegionEES::compute_scalar() -{ - // only sum across procs one time - - if (eflag == 0) { - MPI_Allreduce(ewall,ewall_all,4,MPI_DOUBLE,MPI_SUM,world); - eflag = 1; - } - return ewall_all[0]; -} - -/* ---------------------------------------------------------------------- - components of force on wall -------------------------------------------------------------------------- */ - -double FixWallRegionEES::compute_vector(int n) -{ - // only sum across procs one time - - if (eflag == 0) { - MPI_Allreduce(ewall,ewall_all,4,MPI_DOUBLE,MPI_SUM,world); - eflag = 1; - } - return ewall_all[n+1]; -} - - - -//me -/* ---------------------------------------------------------------------- - EES interaction for ellipsoid particle with wall - compute eng and fwall and twall = magnitude of wall force and torque -------------------------------------------------------------------------- */ - -void FixWallRegionEES::ees(int m, int i) -{ - Region *region = domain->regions[iregion]; - region->prematch(); - - double delta = 0.0, delta2 = 0.0, delta3 = 0.0, delta4 = 0.0, delta5 = 0.0, delta6 = 0.0; - double sigman = 0.0, sigman2 = 0.0 , sigman3 = 0.0, sigman4 = 0.0, sigman5 = 0.0, sigman6 = 0.0; - double hhss = 0.0, hhss2 = 0.0, hhss4 = 0.0, hhss7 = 0.0, hhss8 = 0.0; //h^2 - s_n^2 - double hps = 0.0; //h+s_n - double hms = 0.0; //h-s_n - double twall = 0.0; - double tempvec[3]={0,0,0}; - double tempvec2[3]= {0,0,0}; - - double SAn[3] = {0,0,0}; - double that[3] = {0,0,0}; - - double Lx[3][3] = {{0,0,0},{0,0,-1},{0,1,0}}; - double Ly[3][3] = {{0,0,1},{0,0,0},{-1,0,0}}; - double Lz[3][3] = {{0,-1,0},{1,0,0},{0,0,0}}; - - double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; - double nhat[3] = {0,0,0}; - - nhat[0] = region->contact[m].delx / region->contact[m].r; - nhat[1] = region->contact[m].dely / region->contact[m].r; - nhat[2] = region->contact[m].delz / region->contact[m].r; - - //avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecEllipsoid::Bonus *bonus = avec->bonus; - int *ellipsoid = atom->ellipsoid;//me - - double* shape = bonus[ellipsoid[i]].shape;; - MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); - - MathExtra::transpose_matvec(A,nhat,tempvec); - for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; - for(int k = 0; k<3 ; k++) sigman2 += tempvec[k]*tempvec[k]; - for(int k = 0; k<3; k++) SAn[k] = tempvec[k]; - - - sigman = sqrt(sigman2); - delta = fabs(region->contact[m].r); - - sigman3 = sigman2 * sigman; - sigman4 = sigman2 * sigman2; - sigman5 = sigman4 * sigman; - sigman6 = sigman3 * sigman3; - - delta2 = delta * delta; - delta3 = delta2 * delta; - delta4 = delta2 * delta2; - delta5 = delta3 * delta2; - delta6 = delta3 * delta3; - - hhss = delta2 - sigman2; - hhss2 = hhss * hhss; - hhss4 = hhss2 * hhss2; - hhss8 = hhss4 * hhss4; - hhss7 = hhss4 * hhss2 * hhss; - - hps = delta + sigman; - hms = delta - sigman; - - fwall = -1*coeff4/hhss2 + - coeff3 * ( 21*delta6 + 63*delta4*sigman2 + 27*delta2*sigman4 + sigman6 ) / hhss8 - ; - - eng = -1*coeff2 * ( 4*delta/sigman2/hhss + 2*log(hms/hps)/sigman3 ) + - coeff1 * ( 35*delta5 + 70*delta3*sigman2 + 15*delta*sigman4 ) / hhss7; - - twall = coeff6 * ( 6.*delta3/sigman4/hhss2 - 10.*delta/sigman2/hhss2 + 3.*log(hms/hps)/sigman5 ) + - coeff5 * ( 21.*delta5 + 30.*delta3*sigman2 + 5.*delta*sigman4 ) / hhss8 ; - - MathExtra::matvec(Lx,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; - that[0] = MathExtra::dot3(SAn,tempvec2); - - MathExtra::matvec(Ly,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; - that[1] = MathExtra::dot3(SAn,tempvec2); - - MathExtra::matvec(Lz,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k < 3; k++) tempvec2[k] *= shape[k]; - that[2] = MathExtra::dot3(SAn,tempvec2); - - for(int j = 0; j<3 ; j++) - torque[j] = twall * that[j]; - -} diff --git a/src/USER-EES/fix_wall_region_ees.h b/src/USER-EES/fix_wall_region_ees.h deleted file mode 100644 index 59679a0b41..0000000000 --- a/src/USER-EES/fix_wall_region_ees.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifdef FIX_CLASS - -FixStyle(wall/region/ees,FixWallRegionEES) - -#else - -#ifndef LMP_FIX_WALL_REGION_EES_H -#define LMP_FIX_WALL_REGION_EES_H - -#include "fix.h" - - -namespace LAMMPS_NS { - -class FixWallRegionEES : public Fix { - public: - FixWallRegionEES(class LAMMPS *, int, char **); - ~FixWallRegionEES(); - int setmask(); - void init(); - void setup(int); - void min_setup(int); - void post_force(int); - void post_force_respa(int, int, int); - void min_post_force(int); - double compute_scalar(); - double compute_vector(int); - - private: - class AtomVecEllipsoid *avec;//me - - int iregion; - double epsilon,sigma,cutoff; - int eflag; - double ewall[4],ewall_all[4]; - int nlevels_respa; - char *idregion; - - double coeff1,coeff2,coeff3,coeff4,offset; - double coeff5, coeff6;//me - double eng,fwall; - double torque[3];//me - - void ees(int, int);//me -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -E: Illegal ... command - -Self-explanatory. Check the input script syntax and compare to the -documentation for the command. You can use -echo screen as a -command-line option when running LAMMPS to see the offending line. - -E: Region ID for fix wall/region/ees does not exist - -Self-explanatory. - -E: Fix wall/region/ees cutoff <= 0.0 - -Self-explanatory. - -E: Fix wall/region/ees colloid requires atom style sphere - -Self-explanatory. - -E: Fix wall/region/ees colloid requires extended particles - -One of the particles has radius 0.0. - -E: Particle on or inside surface of region used in fix wall/region - -Particles must be "exterior" to the region surface in order for -energy/force to be calculated. - -*/ diff --git a/src/USER-EES/install.sh b/src/USER-EES/install.sh deleted file mode 100644 index 6163d56ad4..0000000000 --- a/src/USER-EES/install.sh +++ /dev/null @@ -1,34 +0,0 @@ -# Install/unInstall package files in LAMMPS -# mode = 0/1/2 for uninstall/install/update - -mode=$1 - -# enforce using portable C locale -LC_ALL=C -export LC_ALL - -# arg1 = file, arg2 = file it depends on - -action () { - if (test $mode = 0) then - rm -f ../$1 - elif (! cmp -s $1 ../$1) then - if (test -z "$2" || test -e ../$2) then - cp $1 .. - if (test $mode = 2) then - echo " updating src/$1" - fi - fi - elif (test -n "$2") then - if (test ! -e ../$2) then - rm -f ../$1 - fi - fi -} - -# all package files with dependencies - -action fix_wall_ees.cpp -action fix_wall_ees.h -action fix_wall_region_ees.cpp -action fix_wall_region_ees.h -- GitLab From d3b8e688c97257aa929a60e2e2c64e9f66bc4684 Mon Sep 17 00:00:00 2001 From: Abdo Date: Wed, 5 Jul 2017 14:57:43 +0900 Subject: [PATCH 406/593] Files Added to MISC --- src/MISC/fix_wall_ees.cpp | 207 ++++++++++++++++ src/MISC/fix_wall_ees.h | 51 ++++ src/MISC/fix_wall_region_ees.cpp | 405 +++++++++++++++++++++++++++++++ src/MISC/fix_wall_region_ees.h | 94 +++++++ 4 files changed, 757 insertions(+) create mode 100644 src/MISC/fix_wall_ees.cpp create mode 100644 src/MISC/fix_wall_ees.h create mode 100644 src/MISC/fix_wall_region_ees.cpp create mode 100644 src/MISC/fix_wall_region_ees.h diff --git a/src/MISC/fix_wall_ees.cpp b/src/MISC/fix_wall_ees.cpp new file mode 100644 index 0000000000..8ccadf274a --- /dev/null +++ b/src/MISC/fix_wall_ees.cpp @@ -0,0 +1,207 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "math.h" +#include "math_extra.h" +#include "fix_wall_ees.h" +#include "atom.h" +#include "atom_vec.h" +#include "atom_vec_ellipsoid.h" +#include "error.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- */ + +FixWallEES::FixWallEES(LAMMPS *lmp, int narg, char **arg) : + FixWall(lmp, narg, arg) {} + +/* ---------------------------------------------------------------------- */ + +void FixWallEES::precompute(int m) +{ + coeff1[m] = ( 2. / 4725. ) * epsilon[m] * pow(sigma[m],12.0); + coeff2[m] = ( 1. / 24. ) * epsilon[m] * pow(sigma[m],6.0); + + coeff3[m] = ( 2. / 315. ) * epsilon[m] * pow(sigma[m],12.0); + coeff4[m] = ( 1. / 3. ) * epsilon[m] * pow(sigma[m],6.0); + + coeff5[m] = ( 4. / 315. ) * epsilon[m] * pow(sigma[m],12.0); + coeff6[m] = ( 1. / 12. ) * epsilon[m] * pow(sigma[m],6.0); +} + +/* ---------------------------------------------------------------------- */ +void FixWallEES::init() +{ + avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + if (!avec) + error->all(FLERR,"Fix wall/ees requires atom style ellipsoid"); + + // check that all particles are finite-size ellipsoids + // no point particles allowed, spherical is OK + + int *ellipsoid = atom->ellipsoid; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) + if (ellipsoid[i] < 0) + error->one(FLERR,"Fix wall/ees requires extended particles"); + + FixWall::init(); +} + + +/* ---------------------------------------------------------------------- + interaction of all particles in group with a wall + m = index of wall coeffs + which = xlo,xhi,ylo,yhi,zlo,zhi + error if any particle is on or behind wall +------------------------------------------------------------------------- */ + +void FixWallEES::wall_particle(int m, int which, double coord) +{ + double delta; + + double **x = atom->x; + double **f = atom->f; + double **tor = atom->torque; + + + avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + AtomVecEllipsoid::Bonus *bonus = avec->bonus; + int *ellipsoid = atom->ellipsoid; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + + int dim = which / 2; + int side = which % 2; + if (side == 0) side = -1; + + int onflag = 0; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + + if (side < 0) + delta = x[i][dim] - coord; + else + delta = coord - x[i][dim]; + + if (delta >= cutoff[m]) + continue; + + double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; + double tempvec[3]= {0,0,0}; + double sigman = 0.0, sigman2 = 0.0; + double nhat[3] = {0,0,0}; + + nhat[dim]=-1*side; + nhat[(dim+1)%3] = 0 ; + nhat[(dim+2)%3] = 0 ; + + + double* shape = bonus[ellipsoid[i]].shape;; + MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); + MathExtra::transpose_matvec(A,nhat,tempvec); + for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; + for(int k = 0; k<3 ; k++) sigman2 += tempvec[k]*tempvec[k]; + sigman = sqrt(sigman2); + + if (delta <= sigman) { + onflag = 1; + continue; + } + + + double fwall = 0.0, twall = 0.0; + double delta2 = 0.0, delta3 = 0.0, delta4 = 0.0, delta5 = 0.0, delta6 = 0.0; + double sigman3 = 0.0, sigman4 = 0.0, sigman5 = 0.0, sigman6 = 0.0; + double hhss = 0.0, hhss2 = 0.0, hhss4 = 0.0, hhss7 = 0.0, hhss8 = 0.0; + double hps = 0.0; + double hms = 0.0; + + double tempvec2[3]= {0,0,0}; + + double SAn[3] = {0,0,0}; + double that[3] = {0,0,0}; + + double Lx[3][3] = {{0,0,0},{0,0,-1},{0,1,0}}; + double Ly[3][3] = {{0,0,1},{0,0,0},{-1,0,0}}; + double Lz[3][3] = {{0,-1,0},{1,0,0},{0,0,0}}; + + + for(int k = 0; k<3; k++) SAn[k] = tempvec[k]; + + sigman3 = sigman2 * sigman; + sigman4 = sigman2 * sigman2; + sigman5 = sigman4 * sigman; + sigman6 = sigman3 * sigman3; + + + delta2 = delta * delta; + delta3 = delta2 * delta; + delta4 = delta2 * delta2; + delta5 = delta3 * delta2; + delta6 = delta3 * delta3; + + hhss = delta2 - sigman2; + hhss2 = hhss * hhss; + hhss4 = hhss2 * hhss2; + hhss8 = hhss4 * hhss4; + hhss7 = hhss4 * hhss2 * hhss; + + hps = delta + sigman; + hms = delta - sigman; + + fwall = side*( + -1*coeff4[m]/hhss2 + + coeff3[m] * ( 21*delta6 + 63*delta4*sigman2 + 27*delta2*sigman4 + sigman6 ) / hhss8 + ); + f[i][dim] -= fwall; + + ewall[0] += -1*coeff2[m] * ( 4*delta/sigman2/hhss + 2*log(hms/hps)/sigman3 ) + + coeff1[m] * ( 35*delta5 + 70*delta3*sigman2 + 15*delta*sigman4 ) / hhss7; + + ewall[m+1] += fwall; + + twall = coeff6[m] * ( 6.*delta3/sigman4/hhss2 - 10.*delta/sigman2/hhss2 + 3.*log(hms/hps)/sigman5 ) + + coeff5[m] * ( 21.*delta5 + 30.*delta3*sigman2 + 5.*delta*sigman4 ) / hhss8 ; + + + MathExtra::matvec(Lx,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[0] = MathExtra::dot3(SAn,tempvec2); + + MathExtra::matvec(Ly,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[1] = MathExtra::dot3(SAn,tempvec2); + + MathExtra::matvec(Lz,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k < 3; k++) tempvec2[k] *= shape[k]; + that[2] = MathExtra::dot3(SAn,tempvec2); + + + for(int j = 0; j<3 ; j++) + tor[i][j] += twall * that[j]; + + } + + if (onflag) error->one(FLERR,"Particle on or inside fix wall surface"); +} diff --git a/src/MISC/fix_wall_ees.h b/src/MISC/fix_wall_ees.h new file mode 100644 index 0000000000..17246c094f --- /dev/null +++ b/src/MISC/fix_wall_ees.h @@ -0,0 +1,51 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(wall/ees,FixWallEES) + +#else + +#ifndef LMP_FIX_WALL_EES_H +#define LMP_FIX_WALL_EES_H + +#include "fix_wall.h" + +namespace LAMMPS_NS { + +class FixWallEES : public FixWall { + public: + FixWallEES(class LAMMPS *, int, char **); + void precompute(int); + void init(); + void wall_particle(int, int, double); + + private: + double coeff1[6],coeff2[6],coeff3[6],coeff4[6],coeff5[6],coeff6[6]; + class AtomVecEllipsoid *avec; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Particle on or inside fix wall surface + +Particles must be "exterior" to the wall in order for energy/force to +be calculated. + +*/ diff --git a/src/MISC/fix_wall_region_ees.cpp b/src/MISC/fix_wall_region_ees.cpp new file mode 100644 index 0000000000..20a5f74c15 --- /dev/null +++ b/src/MISC/fix_wall_region_ees.cpp @@ -0,0 +1,405 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ +#include +#include "math.h" +#include "stdlib.h" +#include "string.h" +#include "fix_wall_region_ees.h" +#include "atom.h" +#include "atom_vec.h" +#include "atom_vec_ellipsoid.h" +#include "domain.h" +#include "region.h" +#include "force.h" +#include "lattice.h" +#include "update.h" +#include "output.h" +#include "respa.h" +#include "error.h" +#include "math_extra.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +enum{LJ93,LJ126,COLLOID,HARMONIC,EES};//me + +/* ---------------------------------------------------------------------- */ +/// USAGE: +/// fix ID group-ID wall/region/ees region-ID epsilon sigma cutoff +/// +FixWallRegionEES::FixWallRegionEES(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg) +{ + if (narg != 7) error->all(FLERR,"Illegal fix wall/region/ees command"); + scalar_flag = 1; + vector_flag = 1; + size_vector = 3; + global_freq = 1; + extscalar = 1; + extvector = 1; + + // parse args + + iregion = domain->find_region(arg[3]); + if (iregion == -1) + error->all(FLERR,"Region ID for fix wall/region/ees does not exist"); + int n = strlen(arg[3]) + 1; + idregion = new char[n]; + strcpy(idregion,arg[3]); + + + + epsilon = force->numeric(FLERR,arg[4]); + sigma = force->numeric(FLERR,arg[5]); + cutoff = force->numeric(FLERR,arg[6]); + + if (cutoff <= 0.0) error->all(FLERR,"Fix wall/region/ees cutoff <= 0.0"); + + eflag = 0; + ewall[0] = ewall[1] = ewall[2] = ewall[3] = 0.0; +} + +/* ---------------------------------------------------------------------- */ + +FixWallRegionEES::~FixWallRegionEES() +{ + delete [] idregion; +} + +/* ---------------------------------------------------------------------- */ + +int FixWallRegionEES::setmask() +{ + int mask = 0; + mask |= POST_FORCE; + mask |= THERMO_ENERGY; + mask |= POST_FORCE_RESPA; + mask |= MIN_POST_FORCE; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::init() +{ + // set index and check validity of region + + iregion = domain->find_region(idregion); + if (iregion == -1) + error->all(FLERR,"Region ID for fix wall/region/ees does not exist"); + + + avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + if (!avec) + error->all(FLERR,"Fix wall/region/ees requires atom style ellipsoid"); + + // check that all particles are finite-size ellipsoids + // no point particles allowed, spherical is OK + + int *ellipsoid = atom->ellipsoid; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) + if (ellipsoid[i] < 0) + error->one(FLERR,"Fix wall/region/ees requires extended particles"); + + + // setup coefficients for each style + + coeff1 = ( 2. / 4725. ) * epsilon * pow(sigma,12.0); + coeff2 = ( 1. / 24. ) * epsilon * pow(sigma,6.0); + coeff3 = ( 2. / 315. ) * epsilon * pow(sigma,12.0); + coeff4 = ( 1. / 3. ) * epsilon * pow(sigma,6.0); + coeff5 = ( 4. / 315. ) * epsilon * pow(sigma,12.0); + coeff6 = ( 1. / 12. ) * epsilon * pow(sigma,6.0); + offset = 0; + + + if (strstr(update->integrate_style,"respa")) + nlevels_respa = ((Respa *) update->integrate)->nlevels; +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::setup(int vflag) +{ + if (strstr(update->integrate_style,"verlet")) + post_force(vflag); + else { + ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + post_force_respa(vflag,nlevels_respa-1,0); + ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + } +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::min_setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::post_force(int vflag) +{ + //me + //sth is needed here, but I dont know what + //that is calculation of sn + + int i,m,n; + double rinv,fx,fy,fz,tooclose[3];//me + double sn;//me + + eflag = 0; + ewall[0] = ewall[1] = ewall[2] = ewall[3] = 0.0; + + double **x = atom->x; + double **f = atom->f; + double *radius = atom->radius; + + double **tor = atom->torque; //me + + //avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");//me + AtomVecEllipsoid::Bonus *bonus = avec->bonus;//me + int *ellipsoid = atom->ellipsoid;//me + + int *mask = atom->mask; + int nlocal = atom->nlocal; + + Region *region = domain->regions[iregion]; + region->prematch(); + + int onflag = 0; + + // region->match() insures particle is in region or on surface, else error + // if returned contact dist r = 0, is on surface, also an error + // in COLLOID case, r <= radius is an error + + for (i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + if (!region->match(x[i][0],x[i][1],x[i][2])) { + onflag = 1; + continue; + } + + double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; + double tempvec[3]= {0,0,0}; + double sn2 = 0.0; + double nhat[3] = {0,0,0}; + double* shape = bonus[ellipsoid[i]].shape;; + MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); + + for(int which = 0 ; which < 3; which ++){//me + nhat[which]=1; + nhat[(which+1)%3] = 0 ; + nhat[(which+2)%3] = 0 ; + sn2 = 0 ; + MathExtra::transpose_matvec(A,nhat,tempvec); + for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; + for(int k = 0; k<3 ; k++) sn2 += tempvec[k]*tempvec[k]; + sn = sqrt(sn2); + tooclose[which] = sn; + } + + + + n = region->surface(x[i][0],x[i][1],x[i][2],cutoff); + + for (m = 0; m < n; m++) { + + if(region->contact[m].delx != 0 && region->contact[m].r <= tooclose[0] ){ + onflag = 1; + continue; + + }else if (region->contact[m].dely != 0 && region->contact[m].r <= tooclose[1]){ + onflag = 1; + continue; + }else if (region->contact[m].delz !=0 && region->contact[m].r <= tooclose[2]){ + onflag = 1; + continue; + } + else rinv = 1.0/region->contact[m].r; + + ees(m,i);//me + + ewall[0] += eng; + fx = fwall * region->contact[m].delx * rinv; + fy = fwall * region->contact[m].dely * rinv; + fz = fwall * region->contact[m].delz * rinv; + f[i][0] += fx; + f[i][1] += fy; + f[i][2] += fz; + + ewall[1] -= fx; + ewall[2] -= fy; + ewall[3] -= fz; + + tor[i][0] += torque[0]; + tor[i][1] += torque[1]; + tor[i][2] += torque[2]; + + } + } + + if (onflag) error->one(FLERR,"Particle on or inside surface of region " + "used in fix wall/region/ees"); +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::post_force_respa(int vflag, int ilevel, int iloop) +{ + if (ilevel == nlevels_respa-1) post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixWallRegionEES::min_post_force(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- + energy of wall interaction +------------------------------------------------------------------------- */ + +double FixWallRegionEES::compute_scalar() +{ + // only sum across procs one time + + if (eflag == 0) { + MPI_Allreduce(ewall,ewall_all,4,MPI_DOUBLE,MPI_SUM,world); + eflag = 1; + } + return ewall_all[0]; +} + +/* ---------------------------------------------------------------------- + components of force on wall +------------------------------------------------------------------------- */ + +double FixWallRegionEES::compute_vector(int n) +{ + // only sum across procs one time + + if (eflag == 0) { + MPI_Allreduce(ewall,ewall_all,4,MPI_DOUBLE,MPI_SUM,world); + eflag = 1; + } + return ewall_all[n+1]; +} + + + +//me +/* ---------------------------------------------------------------------- + EES interaction for ellipsoid particle with wall + compute eng and fwall and twall = magnitude of wall force and torque +------------------------------------------------------------------------- */ + +void FixWallRegionEES::ees(int m, int i) +{ + Region *region = domain->regions[iregion]; + region->prematch(); + + double delta = 0.0, delta2 = 0.0, delta3 = 0.0, delta4 = 0.0, delta5 = 0.0, delta6 = 0.0; + double sigman = 0.0, sigman2 = 0.0 , sigman3 = 0.0, sigman4 = 0.0, sigman5 = 0.0, sigman6 = 0.0; + double hhss = 0.0, hhss2 = 0.0, hhss4 = 0.0, hhss7 = 0.0, hhss8 = 0.0; //h^2 - s_n^2 + double hps = 0.0; //h+s_n + double hms = 0.0; //h-s_n + double twall = 0.0; + double tempvec[3]={0,0,0}; + double tempvec2[3]= {0,0,0}; + + double SAn[3] = {0,0,0}; + double that[3] = {0,0,0}; + + double Lx[3][3] = {{0,0,0},{0,0,-1},{0,1,0}}; + double Ly[3][3] = {{0,0,1},{0,0,0},{-1,0,0}}; + double Lz[3][3] = {{0,-1,0},{1,0,0},{0,0,0}}; + + double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; + double nhat[3] = {0,0,0}; + + nhat[0] = region->contact[m].delx / region->contact[m].r; + nhat[1] = region->contact[m].dely / region->contact[m].r; + nhat[2] = region->contact[m].delz / region->contact[m].r; + + //avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + AtomVecEllipsoid::Bonus *bonus = avec->bonus; + int *ellipsoid = atom->ellipsoid;//me + + double* shape = bonus[ellipsoid[i]].shape;; + MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); + + MathExtra::transpose_matvec(A,nhat,tempvec); + for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; + for(int k = 0; k<3 ; k++) sigman2 += tempvec[k]*tempvec[k]; + for(int k = 0; k<3; k++) SAn[k] = tempvec[k]; + + + sigman = sqrt(sigman2); + delta = fabs(region->contact[m].r); + + sigman3 = sigman2 * sigman; + sigman4 = sigman2 * sigman2; + sigman5 = sigman4 * sigman; + sigman6 = sigman3 * sigman3; + + delta2 = delta * delta; + delta3 = delta2 * delta; + delta4 = delta2 * delta2; + delta5 = delta3 * delta2; + delta6 = delta3 * delta3; + + hhss = delta2 - sigman2; + hhss2 = hhss * hhss; + hhss4 = hhss2 * hhss2; + hhss8 = hhss4 * hhss4; + hhss7 = hhss4 * hhss2 * hhss; + + hps = delta + sigman; + hms = delta - sigman; + + fwall = -1*coeff4/hhss2 + + coeff3 * ( 21*delta6 + 63*delta4*sigman2 + 27*delta2*sigman4 + sigman6 ) / hhss8 + ; + + eng = -1*coeff2 * ( 4*delta/sigman2/hhss + 2*log(hms/hps)/sigman3 ) + + coeff1 * ( 35*delta5 + 70*delta3*sigman2 + 15*delta*sigman4 ) / hhss7; + + twall = coeff6 * ( 6.*delta3/sigman4/hhss2 - 10.*delta/sigman2/hhss2 + 3.*log(hms/hps)/sigman5 ) + + coeff5 * ( 21.*delta5 + 30.*delta3*sigman2 + 5.*delta*sigman4 ) / hhss8 ; + + MathExtra::matvec(Lx,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[0] = MathExtra::dot3(SAn,tempvec2); + + MathExtra::matvec(Ly,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[1] = MathExtra::dot3(SAn,tempvec2); + + MathExtra::matvec(Lz,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k < 3; k++) tempvec2[k] *= shape[k]; + that[2] = MathExtra::dot3(SAn,tempvec2); + + for(int j = 0; j<3 ; j++) + torque[j] = twall * that[j]; + +} diff --git a/src/MISC/fix_wall_region_ees.h b/src/MISC/fix_wall_region_ees.h new file mode 100644 index 0000000000..59679a0b41 --- /dev/null +++ b/src/MISC/fix_wall_region_ees.h @@ -0,0 +1,94 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(wall/region/ees,FixWallRegionEES) + +#else + +#ifndef LMP_FIX_WALL_REGION_EES_H +#define LMP_FIX_WALL_REGION_EES_H + +#include "fix.h" + + +namespace LAMMPS_NS { + +class FixWallRegionEES : public Fix { + public: + FixWallRegionEES(class LAMMPS *, int, char **); + ~FixWallRegionEES(); + int setmask(); + void init(); + void setup(int); + void min_setup(int); + void post_force(int); + void post_force_respa(int, int, int); + void min_post_force(int); + double compute_scalar(); + double compute_vector(int); + + private: + class AtomVecEllipsoid *avec;//me + + int iregion; + double epsilon,sigma,cutoff; + int eflag; + double ewall[4],ewall_all[4]; + int nlevels_respa; + char *idregion; + + double coeff1,coeff2,coeff3,coeff4,offset; + double coeff5, coeff6;//me + double eng,fwall; + double torque[3];//me + + void ees(int, int);//me +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +E: Region ID for fix wall/region/ees does not exist + +Self-explanatory. + +E: Fix wall/region/ees cutoff <= 0.0 + +Self-explanatory. + +E: Fix wall/region/ees colloid requires atom style sphere + +Self-explanatory. + +E: Fix wall/region/ees colloid requires extended particles + +One of the particles has radius 0.0. + +E: Particle on or inside surface of region used in fix wall/region + +Particles must be "exterior" to the region surface in order for +energy/force to be calculated. + +*/ -- GitLab From 5eb5391b20c79b3bf8dcdd9e061bd4f827c22d38 Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Wed, 5 Jul 2017 15:06:34 +0900 Subject: [PATCH 407/593] Add reference to example --- doc/src/fix_wall_ees.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/fix_wall_ees.txt b/doc/src/fix_wall_ees.txt index 54511ffba7..075f62efaf 100644 --- a/doc/src/fix_wall_ees.txt +++ b/doc/src/fix_wall_ees.txt @@ -66,7 +66,7 @@ particle and wall no longer interact. Also,  sigma_n is the distance between c :c,image(JPG/fix_wall_ees_image.jpg)   -Details of using this command and specifications are the same as fix/wall command.  +Details of using this command and specifications are the same as fix/wall command. You can also find an example in USER/ees/ under examples/ directory.   The prefactor {epsilon} can be thought of as an effective Hamaker constant with energy units for the strength of the -- GitLab From e0521f27b42de12bcde38d0e339b9a5a2d983346 Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Wed, 5 Jul 2017 15:08:07 +0900 Subject: [PATCH 408/593] Added reference to example directory. --- doc/src/fix_wall_region_ees.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/src/fix_wall_region_ees.txt b/doc/src/fix_wall_region_ees.txt index efb417add1..aafde5eb69 100644 --- a/doc/src/fix_wall_region_ees.txt +++ b/doc/src/fix_wall_region_ees.txt @@ -30,6 +30,7 @@ as a bounding wall which interacts with nearby ellipsoidal particles according t the EES potential introduced "fix wall/ees"_fix_wall_ees.html. Other details of this command is the same wiht "fix wall/region"_fix_wall_region.html command. +One may also find and exapmle of using this code in USER/ees/ under examples/ directory. [Restrictions:] none -- GitLab From 769870cfc9579d4946d8836077b93d54d69f499b Mon Sep 17 00:00:00 2001 From: Markus Hoehnerbach Date: Thu, 29 Jun 2017 15:50:54 +0200 Subject: [PATCH 409/593] Proper spline coefficient calculation for AIREBO --- src/MANYBODY/pair_airebo.cpp | 326 +++++++++++++++++++++++++++++++++++ src/MANYBODY/pair_airebo.h | 6 + 2 files changed, 332 insertions(+) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 0ca80c6b76..b8ef4db48c 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -4066,6 +4066,276 @@ double PairAIREBO::Sptricubic(double x, double y, double z, return f; } +/* ---------------------------------------------------------------------- + spline coefficient matrix python script +------------------------------------------------------------------------- + +import numpy as np +import numpy.linalg as lin + +# Generate all the derivatives that are spline conditions +# Ordered such that df / dx_i / d_xj i < j. +# Gives the derivatives at which the spline's values are prescribed. +def generate_derivs(n): + def generate_derivs_order(n, m): + if m == 0: + return [tuple()] + if m == 1: + return [tuple([i]) for i in range(n)] + rec = generate_derivs_order(n, m - 1) + return [tuple([i]+list(j)) for i in range(n) for j in rec if j[0] > i] + ret = [] + m = 0 + while m <= n: + ret += generate_derivs_order(n, m) + m += 1 + return ret + +# Generate all the points in an n-dimensional unit cube. +# Gives the points at which the spline's values are prescribed. +def generate_points(n): + if n == 1: + return [(0,), (1,)] + rec = generate_points(n - 1) + return [tuple([j]+list(i)) for j in range(2) for i in rec] + +# Generate all the coefficients in the order later expected. +def generate_coeffs(n): + if n == 1: + return [tuple([i]) for i in range(4)] # cubic + rec = generate_coeffs(n-1) + return [tuple([i]+list(j)) for i in range(4) for j in rec] + +# Evaluate the `deriv`'s derivative at `point` symbolically +# with respect to the coefficients `coeffs`. +def eval_at(n, coeffs, deriv, point): + def eval_single(order, value, the_deriv): + if the_deriv: + if order == 0: + return 0 + if order == 1: + return 1 + return order * value + else: + if order == 0: + return 1 + else: + return value + result = {} + for c in coeffs: + result[c] = 1 + for i in range(n): + result[c] *= eval_single(c[i], point[i], i in deriv) + return result + +# Build the matrix transforming prescribed values to coefficients. +def get_matrix(n): + coeffs = generate_coeffs(n) + points = generate_points(n) + derivs = generate_derivs(n) + assert(len(coeffs) == len(points)*len(derivs)) + i = 0 + A = np.zeros((len(coeffs), len(points)*len(derivs))) + for d in derivs: + for p in points: + coeff = eval_at(n, coeffs, d, p) + for j, c in enumerate(coeffs): + A[i, j] = coeff[c] + i += 1 + return lin.inv(A) + +# Output the first k values with padding n from A. +def output_matrix(n, k, A): + print('\n'.join([''.join([("%{}d,".format(n+1)) % i for i in j[:k]]) for j in A])) + +*/ + +/* ---------------------------------------------------------------------- + tricubic spline coefficient calculation +------------------------------------------------------------------------- */ + +void PairAIREBO::Sptricubic_patch_adjust(double * dl, double wid, double lo, + char dir) { + int rowOuterL = 16, rowInnerL = 1, colL; + if (dir == 'R') { + rowOuterL = 4; + colL = 16; + } else if (dir == 'M') { + colL = 4; + } else if (dir == 'L') { + rowInnerL = 4; + colL = 1; + } + double binomial[5] = {1, 1, 2, 6}; + for (int rowOuter = 0; rowOuter < 4; rowOuter++) { + for (int rowInner = 0; rowInner < 4; rowInner++) { + for (int col = 0; col < 4; col++) { + double acc = 0; + for (int k = col; k < 4; k++) { + acc += dl[rowOuterL * rowOuter + rowInnerL * rowInner + colL * k] + * pow(wid, -k) * pow(-lo, k - col) * binomial[k] / binomial[col] + / binomial[k - col]; + } + dl[rowOuterL * rowOuter + rowInnerL * rowInner + colL * col] = acc; + } + } + } +} + +void PairAIREBO::Sptricubic_patch_coeffs( + double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, + double * y, double * y1, double * y2, double * y3, double * dl +) { + const double C_inv[64][32] = { + // output_matrix(2, 8*4, get_matrix(3)) + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + -3, 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, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, -4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -6, 0, 6, 0, 6, 0, -6, 0, -3, 0, 3, 0, -3, 0, 3, 0, -4, 0, -2, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, 0, 6, 0, 6, 0, -6, 0, + 18,-18,-18, 18,-18, 18, 18,-18, 9, -9, -9, 9, 9, -9, -9, 9, 12,-12, 6, -6,-12, 12, -6, 6, 12, 6,-12, -6,-12, -6, 12, 6, + -12, 12, 12,-12, 12,-12,-12, 12, -6, 6, 6, -6, -6, 6, 6, -6, -8, 8, -4, 4, 8, -8, 4, -4, -6, -6, 6, 6, 6, 6, -6, -6, + 4, 0, -4, 0, -4, 0, 4, 0, 2, 0, -2, 0, 2, 0, -2, 0, 2, 0, 2, 0, -2, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -4, 0, -4, 0, 4, 0, + -12, 12, 12,-12, 12,-12,-12, 12, -6, 6, 6, -6, -6, 6, 6, -6, -6, 6, -6, 6, 6, -6, 6, -6, -8, -4, 8, 4, 8, 4, -8, -4, + 8, -8, -8, 8, -8, 8, 8, -8, 4, -4, -4, 4, 4, -4, -4, 4, 4, -4, 4, -4, -4, 4, -4, 4, 4, 4, -4, -4, -4, -4, 4, 4, + }; + double dx = xmax - xmin; + double dy = ymax - ymin; + double dz = zmax - zmin; + double x[32]; + for (int i = 0; i < 8; i++) { + x[i+0*8] = y[i]; + x[i+1*8] = y1[i] * dx; + x[i+2*8] = y2[i] * dy; + x[i+3*8] = y3[i] * dz; + } + for (int i = 0; i < 64; i++) { + dl[i] = 0; + for (int k = 0; k < 32; k++) { + dl[i] += x[k] * C_inv[i][k]; + } + } + Sptricubic_patch_adjust(dl, dx, xmin, 'R'); + Sptricubic_patch_adjust(dl, dy, ymin, 'M'); + Sptricubic_patch_adjust(dl, dz, zmin, 'L'); +} + +/* ---------------------------------------------------------------------- + bicubic spline coefficient calculation +------------------------------------------------------------------------- */ + +void PairAIREBO::Spbicubic_patch_adjust(double * dl, double wid, double lo, + char dir) { + int rowL = dir == 'R' ? 1 : 4; + int colL = dir == 'L' ? 1 : 4; + double binomial[5] = {1, 1, 2, 6}; + for (int row = 0; row < 4; row++) { + for (int col = 0; col < 4; col++) { + double acc = 0; + for (int k = col; k < 4; k++) { + acc += dl[rowL * row + colL * k] * pow(wid, -k) * pow(-lo, k - col) + * binomial[k] / binomial[col] / binomial[k - col]; + } + dl[rowL * row + colL * col] = acc; + } + } +} + +void PairAIREBO::Spbicubic_patch_coeffs( + double xmin, double xmax, double ymin, double ymax, double * y, + double * y1, double * y2, double * dl +) { + const double C_inv[16][12] = { + // output_matrix(1, 4*3, get_matrix(2)) + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + -3, 3, 0, 0, 0, 0, 0, 0,-2,-1, 0, 0, + 2,-2, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,-3, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2,-2, 0, 0, 0, 0, 0, 0, + -3, 0, 3, 0,-2, 0,-1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,-3, 0, 3, 0, + 9,-9,-9, 9, 6,-6, 3,-3, 6, 3,-6,-3, + -6, 6, 6,-6,-4, 4,-2, 2,-3,-3, 3, 3, + 2, 0,-2, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, + -6, 6, 6,-6,-3, 3,-3, 3,-4,-2, 4, 2, + 4,-4,-4, 4, 2,-2, 2,-2, 2, 2,-2,-2, + }; + double dx = xmax - xmin; + double dy = ymax - ymin; + double x[12]; + for (int i = 0; i < 4; i++) { + x[i+0*4] = y[i]; + x[i+1*4] = y1[i] * dx; + x[i+2*4] = y2[i] * dy; + } + for (int i = 0; i < 16; i++) { + dl[i] = 0; + for (int k = 0; k < 12; k++) { + dl[i] += x[k] * C_inv[i][k]; + } + } + Spbicubic_patch_adjust(dl, dx, xmin, 'R'); + Spbicubic_patch_adjust(dl, dy, ymin, 'L'); +} + /* ---------------------------------------------------------------------- initialize spline knot values ------------------------------------------------------------------------- */ @@ -4107,6 +4377,22 @@ void PairAIREBO::spline_init() PCHf[2][1] = -0.300529172; PCHf[3][0] = -0.307584705; + for (int nH = 0; nH < 4; nH++) { + for (int nC = 0; nC < 4; nC++) { + double y[4] = {0}, y1[4] = {0}, y2[4] = {0}; + y[0] = PCCf[nC][nH]; + y[1] = PCCf[nC][nH+1]; + y[2] = PCCf[nC+1][nH]; + y[3] = PCCf[nC+1][nH+1]; + Spbicubic_patch_coeffs(nC, nC+1, nH, nH+1, y, y1, y2, &pCC[nC][nH][0]); + y[0] = PCHf[nC][nH]; + y[1] = PCHf[nC][nH+1]; + y[2] = PCHf[nC+1][nH]; + y[3] = PCHf[nC+1][nH+1]; + Spbicubic_patch_coeffs(nC, nC+1, nH, nH+1, y, y1, y2, &pCH[nC][nH][0]); + } + } + for (i = 0; i < 5; i++) { for (j = 0; j < 5; j++) { for (k = 0; k < 10; k++) { @@ -4271,6 +4557,46 @@ void PairAIREBO::spline_init() Tf[2][2][1] = -0.035140; for (i = 2; i < 10; i++) Tf[2][2][i] = -0.0040480; + + for (int nH = 0; nH < 4; nH++) { + for (int nC = 0; nC < 4; nC++) { + // Note: Spline knot values exist up to "10", but are never used because + // they are clamped down to 9. + for (int nConj = 0; nConj < 9; nConj++) { + double y[8] = {0}, y1[8] = {0}, y2[8] = {0}, y3[8] = {0}; + #define FILL_KNOTS_TRI(dest, src) \ + dest[0] = src[nC+0][nH+0][nConj+0]; \ + dest[1] = src[nC+0][nH+0][nConj+1]; \ + dest[2] = src[nC+0][nH+1][nConj+0]; \ + dest[3] = src[nC+0][nH+1][nConj+1]; \ + dest[4] = src[nC+1][nH+0][nConj+0]; \ + dest[5] = src[nC+1][nH+0][nConj+1]; \ + dest[6] = src[nC+1][nH+1][nConj+0]; \ + dest[7] = src[nC+1][nH+1][nConj+1]; + FILL_KNOTS_TRI(y, piCCf) + FILL_KNOTS_TRI(y1, piCCdfdx) + FILL_KNOTS_TRI(y2, piCCdfdy) + FILL_KNOTS_TRI(y3, piCCdfdz) + Sptricubic_patch_coeffs(nC, nC+1, nH, nH+1, nConj, nConj+1, y, y1, y2, y3, &piCC[nC][nH][nConj][0]); + FILL_KNOTS_TRI(y, piCHf) + FILL_KNOTS_TRI(y1, piCHdfdx) + FILL_KNOTS_TRI(y2, piCHdfdy) + FILL_KNOTS_TRI(y3, piCHdfdz) + Sptricubic_patch_coeffs(nC, nC+1, nH, nH+1, nConj, nConj+1, y, y1, y2, y3, &piCH[nC][nH][nConj][0]); + FILL_KNOTS_TRI(y, piHHf) + FILL_KNOTS_TRI(y1, piHHdfdx) + FILL_KNOTS_TRI(y2, piHHdfdy) + FILL_KNOTS_TRI(y3, piHHdfdz) + Sptricubic_patch_coeffs(nC, nC+1, nH, nH+1, nConj, nConj+1, y, y1, y2, y3, &piHH[nC][nH][nConj][0]); + FILL_KNOTS_TRI(y, Tf) + FILL_KNOTS_TRI(y1, Tdfdx) + FILL_KNOTS_TRI(y2, Tdfdy) + FILL_KNOTS_TRI(y3, Tdfdz) + Sptricubic_patch_coeffs(nC, nC+1, nH, nH+1, nConj, nConj+1, y, y1, y2, y3, &Tijc[nC][nH][nConj][0]); + #undef FILL_KNOTS_TRI + } + } + } } /* ---------------------------------------------------------------------- diff --git a/src/MANYBODY/pair_airebo.h b/src/MANYBODY/pair_airebo.h index e927794ec0..aabc3fe17a 100644 --- a/src/MANYBODY/pair_airebo.h +++ b/src/MANYBODY/pair_airebo.h @@ -113,6 +113,12 @@ class PairAIREBO : public Pair { double Sp5th(double, double *, double *); double Spbicubic(double, double, double *, double *); double Sptricubic(double, double, double, double *, double *); + void Sptricubic_patch_adjust(double *, double, double, char); + void Sptricubic_patch_coeffs(double, double, double, double, double, double, + double*, double*, double*, double*, double*); + void Spbicubic_patch_adjust(double *, double, double, char); + void Spbicubic_patch_coeffs(double, double, double, double, double *, + double *, double *, double *); void spline_init(); void allocate(); -- GitLab From 74d63c24fd349c06594b94b6e51415677b1e98b2 Mon Sep 17 00:00:00 2001 From: Markus Hoehnerbach Date: Wed, 5 Jul 2017 14:51:34 +0200 Subject: [PATCH 410/593] Fix AIREBO missing derivative in bondorderLJ This change replaces the bondorderLJ() function with code provided by Github user CF17, which is based on the bondorder() code. It could be fixed with a shorter patch [1], but layering fix upon fix seems to be unwise in this case. While the code at this point departs from following the Fortran code closely, the reason is that the bug is present in the Fortran code as well. Instead, the new code follows closely the bondorder() code that already exists, which should be easier to maintain in the future. This patch makes the two functions consistent with each other, and makes outside contributions easier. Since it uses a different approach to compute its value, some explanation of that reasoning has been added on top. 1: https://github.com/v0i0/lammps/commit/e8c5c662b28914de6b77e0ca49010eddfe1423e9 --- src/MANYBODY/pair_airebo.cpp | 403 +++++++++++++++++------------------ 1 file changed, 201 insertions(+), 202 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index b8ef4db48c..bc3af2d332 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -2081,44 +2081,63 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], /* ---------------------------------------------------------------------- Bij* function -------------------------------------------------------------------------- */ +------------------------------------------------------------------------- + +This function calculates S(t_b(b_ij*)) as specified in the AIREBO paper. +To do so, it needs to compute b_ij*, i.e. the bondorder given that the +atoms i and j are placed a ficticious distance rijmag_mod apart. +Now there are two approaches to calculate the resulting forces: +1. Carry through the ficticious distance and corresponding vector + rij_mod, correcting afterwards using the derivative of r/|r|. +2. Perform all the calculations using the real distance, and do not + use a correction, only using rijmag_mod where necessary. +This code opts for (2). Mathematically, the approaches are equivalent +if implemented correctly, since in terms where only the normalized +vector is used, both calculations necessarily lead to the same result +since if f(x) = g(x/|x|) then for x = y/|y| f(x) = g(y/|y|/1). +The actual modified distance is only used in the lamda terms. +Note that these do not contribute to the forces between i and j, since +rijmag_mod is a constant and the corresponding derivatives are +accordingly zero. +This function should be kept in sync with bondorder(), i.e. changes +there probably also need to be performed here. + +*/ -double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, - double VA, double rij0[3], double rij0mag, +double PairAIREBO::bondorderLJ(int i, int j, double rij_mod[3], double rijmag_mod, + double VA, double rij[3], double rijmag, double **f, int vflag_atom) { - int k,n,l,atomk,atoml,atomn,atom1,atom2,atom3,atom4; - int atomi,atomj,itype,jtype,ktype,ltype,ntype; - double rik[3], rjl[3], rkn[3],rknmag,dNki; + int atomi,atomj,k,n,l,atomk,atoml,atomn,atom1,atom2,atom3,atom4; + int itype,jtype,ktype,ltype,ntype; + double rik[3],rjl[3],rkn[3],rji[3],rki[3],rlj[3],rknmag,dNki,dwjl,bij; double NijC,NijH,NjiC,NjiH,wik,dwik,dwkn,wjl; double rikmag,rjlmag,cosjik,cosijl,g,tmp2,tmp3; - double Etmp,pij,tmp,wij,dwij,NconjtmpI,NconjtmpJ; - double Nki,Nlj,dS,lamdajik,lamdaijl,dgdc,dgdN,pji,Nijconj,piRC; - double dN2[2],dN3[3],dwjl; - double Tij,crosskij[3],crosskijmag; - double crossijl[3],crossijlmag,omkijl; - double tmppij,tmppji,dN2PIJ[2],dN2PJI[2],dN3piRC[3],dN3Tij[3]; - double bij,tmp3pij,tmp3pji,Stb,dStb; - double r32[3],r32mag,cos321; + double Etmp,pij,tmp,wij,dwij,NconjtmpI,NconjtmpJ,Nki,Nlj,dS; + double lamdajik,lamdaijl,dgdc,dgdN,pji,Nijconj,piRC; + double dcosjikdri[3],dcosijldri[3],dcosjikdrk[3]; + double dN2[2],dN3[3]; + double dcosjikdrj[3],dcosijldrj[3],dcosijldrl[3]; + double Tij; + double r32[3],r32mag,cos321,r43[3],r13[3]; + double dNlj; double om1234,rln[3]; double rlnmag,dwln,r23[3],r23mag,r21[3],r21mag; double w21,dw21,r34[3],r34mag,cos234,w34,dw34; double cross321[3],cross234[3],prefactor,SpN; - double fcikpc,fcjlpc,fcjkpc,fcilpc; - double dt2dik[3],dt2djl[3],aa,aaa2,at2,cw,cwnum,cwnom; + double fcikpc,fcjlpc,fcjkpc,fcilpc,fcijpc; + double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom; double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2; - double dctik,dctjk,dctjl,dctil,rik2i,rjl2i,sink2i,sinl2i; - double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil; - double dNlj; - double PijS,PjiS; + double dctik,dctjk,dctjl,dctij,dctji,dctil,rik2i,rjl2i,sink2i,sinl2i; + double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil,dt1dij; + double F23[3],F12[3],F34[3],F31[3],F24[3],fi[3],fj[3],fk[3],fl[3]; + double f1[3],f2[3],f3[3],f4[4]; + double dcut321,PijS,PjiS; double rij2,tspjik,dtsjik,tspijl,dtsijl,costmp; int *REBO_neighs,*REBO_neighs_i,*REBO_neighs_j,*REBO_neighs_k,*REBO_neighs_l; - double F12[3],F34[3],F31[3],F24[3]; - double fi[3],fj[3],fk[3],fl[3],f1[3],f2[3],f3[3],f4[4]; - double rji[3],rki[3],rlj[3],r13[3],r43[3]; - double realrij[3], realrijmag; - double rjkmag, rilmag, dctdjk, dctdik, dctdil, dctdjl; - double fjk[3], fil[3], rijmbr; + double tmppij,tmppji,dN2PIJ[2],dN2PJI[2],dN3piRC[3],dN3Tij[3]; + double tmp3pij,tmp3pji,Stb,dStb; + double **x = atom->x; int *type = atom->type; @@ -2127,12 +2146,11 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, atomj = j; itype = map[type[atomi]]; jtype = map[type[atomj]]; - wij = Sp(rij0mag,rcmin[itype][jtype],rcmax[itype][jtype],dwij); + wij = Sp(rijmag,rcmin[itype][jtype],rcmax[itype][jtype],dwij); NijC = nC[atomi]-(wij*kronecker(jtype,0)); NijH = nH[atomi]-(wij*kronecker(jtype,1)); NjiC = nC[atomj]-(wij*kronecker(itype,0)); NjiH = nH[atomj]-(wij*kronecker(itype,1)); - bij = 0.0; tmp = 0.0; tmp2 = 0.0; @@ -2145,12 +2163,6 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, Stb = 0.0; dStb = 0.0; - realrij[0] = x[atomi][0] - x[atomj][0]; - realrij[1] = x[atomi][1] - x[atomj][1]; - realrij[2] = x[atomi][2] - x[atomj][2]; - realrijmag = sqrt(realrij[0] * realrij[0] + realrij[1] * realrij[1] - + realrij[2] * realrij[2]); - REBO_neighs = REBO_firstneigh[i]; for (k = 0; k < REBO_numneigh[i]; k++) { atomk = REBO_neighs[k]; @@ -2161,9 +2173,9 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, rik[2] = x[atomi][2]-x[atomk][2]; rikmag = sqrt((rik[0]*rik[0])+(rik[1]*rik[1])+(rik[2]*rik[2])); lamdajik = 4.0*kronecker(itype,1) * - ((rho[ktype][1]-rikmag)-(rho[jtype][1]-rijmag)); + ((rho[ktype][1]-rikmag)-(rho[jtype][1]-rijmag_mod)); wik = Sp(rikmag,rcmin[itype][ktype],rcmax[itype][ktype],dS); - Nki = nC[atomk]-(wik*kronecker(itype,0)) + + Nki = nC[atomk]-(wik*kronecker(itype,0))+ nH[atomk]-(wik*kronecker(itype,1)); cosjik = ((rij[0]*rik[0])+(rij[1]*rik[1])+(rij[2]*rik[2])) / (rijmag*rikmag); @@ -2186,6 +2198,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, pij = 1.0/sqrt(1.0+Etmp+PijS); tmppij = -.5*cube(pij); tmp3pij = tmp3; + tmp = 0.0; tmp2 = 0.0; tmp3 = 0.0; @@ -2201,7 +2214,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, rjl[2] = x[atomj][2]-x[atoml][2]; rjlmag = sqrt((rjl[0]*rjl[0])+(rjl[1]*rjl[1])+(rjl[2]*rjl[2])); lamdaijl = 4.0*kronecker(jtype,1) * - ((rho[ltype][1]-rjlmag)-(rho[itype][1]-rijmag)); + ((rho[ltype][1]-rjlmag)-(rho[itype][1]-rijmag_mod)); wjl = Sp(rjlmag,rcmin[jtype][ltype],rcmax[jtype][ltype],dS); Nlj = nC[atoml]-(wjl*kronecker(jtype,0))+nH[atoml] - (wjl*kronecker(jtype,1)); @@ -2231,82 +2244,80 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, Nijconj = 1.0+(NconjtmpI*NconjtmpI)+(NconjtmpJ*NconjtmpJ); piRC = piRCSpline(NijC+NijH,NjiC+NjiH,Nijconj,itype,jtype,dN3piRC); + Tij = 0.0; dN3Tij[0] = 0.0; dN3Tij[1] = 0.0; dN3Tij[2] = 0.0; if (itype == 0 && jtype == 0) Tij=TijSpline((NijC+NijH),(NjiC+NjiH),Nijconj,dN3Tij); - Etmp = 0.0; + if (fabs(Tij) > TOL) { + atom2 = atomi; + atom3 = atomj; + r32[0] = x[atom3][0]-x[atom2][0]; + r32[1] = x[atom3][1]-x[atom2][1]; + r32[2] = x[atom3][2]-x[atom2][2]; + r32mag = sqrt((r32[0]*r32[0])+(r32[1]*r32[1])+(r32[2]*r32[2])); + r23[0] = -r32[0]; + r23[1] = -r32[1]; + r23[2] = -r32[2]; + r23mag = r32mag; REBO_neighs_i = REBO_firstneigh[i]; for (k = 0; k < REBO_numneigh[i]; k++) { atomk = REBO_neighs_i[k]; + atom1 = atomk; ktype = map[type[atomk]]; if (atomk != atomj) { - rik[0] = x[atomi][0]-x[atomk][0]; - rik[1] = x[atomi][1]-x[atomk][1]; - rik[2] = x[atomi][2]-x[atomk][2]; - rikmag = sqrt((rik[0]*rik[0])+(rik[1]*rik[1])+(rik[2]*rik[2])); - cos321 = ((rij[0]*rik[0])+(rij[1]*rik[1])+(rij[2]*rik[2])) / - (rijmag*rikmag); + r21[0] = x[atom2][0]-x[atom1][0]; + r21[1] = x[atom2][1]-x[atom1][1]; + r21[2] = x[atom2][2]-x[atom1][2]; + r21mag = sqrt(r21[0]*r21[0] + r21[1]*r21[1] + r21[2]*r21[2]); + cos321 = -1.0*((r21[0]*r32[0])+(r21[1]*r32[1])+(r21[2]*r32[2])) / + (r21mag*r32mag); cos321 = MIN(cos321,1.0); cos321 = MAX(cos321,-1.0); + sin321 = sqrt(1.0 - cos321*cos321); + if ((sin321 > TOL) && (r21mag > TOL)) { // XXX was sin321 != 0.0 + w21 = Sp(r21mag,rcmin[itype][ktype],rcmaxp[itype][ktype],dw21); + tspjik = Sp2(cos321,thmin,thmax,dtsjik); - rjk[0] = rik[0]-rij[0]; - rjk[1] = rik[1]-rij[1]; - rjk[2] = rik[2]-rij[2]; - rjk2 = (rjk[0]*rjk[0])+(rjk[1]*rjk[1])+(rjk[2]*rjk[2]); - rij2 = rijmag*rijmag; - rik2 = rikmag*rikmag; - costmp = 0.5*(rij2+rik2-rjk2)/rijmag/rikmag; - tspjik = Sp2(costmp,thmin,thmax,dtsjik); - - if (sqrt(1.0 - cos321*cos321) > sqrt(TOL)) { - wik = Sp(rikmag,rcmin[itype][ktype],rcmaxp[itype][ktype],dwik); REBO_neighs_j = REBO_firstneigh[j]; for (l = 0; l < REBO_numneigh[j]; l++) { atoml = REBO_neighs_j[l]; + atom4 = atoml; ltype = map[type[atoml]]; if (!(atoml == atomi || atoml == atomk)) { - rjl[0] = x[atomj][0]-x[atoml][0]; - rjl[1] = x[atomj][1]-x[atoml][1]; - rjl[2] = x[atomj][2]-x[atoml][2]; - rjlmag = sqrt(rjl[0]*rjl[0] + rjl[1]*rjl[1] + rjl[2]*rjl[2]); - cos234 = -((rij[0]*rjl[0])+(rij[1]*rjl[1])+(rij[2]*rjl[2])) / - (rijmag*rjlmag); + r34[0] = x[atom3][0]-x[atom4][0]; + r34[1] = x[atom3][1]-x[atom4][1]; + r34[2] = x[atom3][2]-x[atom4][2]; + r34mag = sqrt((r34[0]*r34[0])+(r34[1]*r34[1])+(r34[2]*r34[2])); + cos234 = (r32[0]*r34[0] + r32[1]*r34[1] + r32[2]*r34[2]) / + (r32mag*r34mag); cos234 = MIN(cos234,1.0); cos234 = MAX(cos234,-1.0); + sin234 = sqrt(1.0 - cos234*cos234); + + if ((sin234 > TOL) && (r34mag > TOL)) { // XXX was sin234 != 0.0 + w34 = Sp(r34mag,rcmin[jtype][ltype],rcmaxp[jtype][ltype],dw34); + tspijl = Sp2(cos234,thmin,thmax,dtsijl); + + cross321[0] = (r32[1]*r21[2])-(r32[2]*r21[1]); + cross321[1] = (r32[2]*r21[0])-(r32[0]*r21[2]); + cross321[2] = (r32[0]*r21[1])-(r32[1]*r21[0]); + cross234[0] = (r23[1]*r34[2])-(r23[2]*r34[1]); + cross234[1] = (r23[2]*r34[0])-(r23[0]*r34[2]); + cross234[2] = (r23[0]*r34[1])-(r23[1]*r34[0]); - ril[0] = rij[0]+rjl[0]; - ril[1] = rij[1]+rjl[1]; - ril[2] = rij[2]+rjl[2]; - ril2 = (ril[0]*ril[0])+(ril[1]*ril[1])+(ril[2]*ril[2]); - rjl2 = rjlmag*rjlmag; - costmp = 0.5*(rij2+rjl2-ril2)/rijmag/rjlmag; - tspijl = Sp2(costmp,thmin,thmax,dtsijl); - - if (sqrt(1.0 - cos234*cos234) > sqrt(TOL)) { - wjl = Sp(rjlmag,rcmin[jtype][ltype],rcmaxp[jtype][ltype],dS); - crosskij[0] = (rij[1]*rik[2]-rij[2]*rik[1]); - crosskij[1] = (rij[2]*rik[0]-rij[0]*rik[2]); - crosskij[2] = (rij[0]*rik[1]-rij[1]*rik[0]); - crosskijmag = sqrt(crosskij[0]*crosskij[0] + - crosskij[1]*crosskij[1] + - crosskij[2]*crosskij[2]); - crossijl[0] = (rij[1]*rjl[2]-rij[2]*rjl[1]); - crossijl[1] = (rij[2]*rjl[0]-rij[0]*rjl[2]); - crossijl[2] = (rij[0]*rjl[1]-rij[1]*rjl[0]); - crossijlmag = sqrt(crossijl[0]*crossijl[0] + - crossijl[1]*crossijl[1] + - crossijl[2]*crossijl[2]); - omkijl = -1.0*(((crosskij[0]*crossijl[0]) + - (crosskij[1]*crossijl[1]) + - (crosskij[2]*crossijl[2])) / - (crosskijmag*crossijlmag)); - Etmp += ((1.0-square(omkijl))*wik*wjl) * + cwnum = (cross321[0]*cross234[0]) + + (cross321[1]*cross234[1]) + (cross321[2]*cross234[2]); + cwnom = r21mag*r34mag*r23mag*r23mag*sin321*sin234; + om1234 = cwnum/cwnom; + cw = om1234; + Etmp += ((1.0-square(om1234))*w21*w34) * (1.0-tspjik)*(1.0-tspijl); + } } } @@ -2338,50 +2349,43 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, rik[2] = x[atomi][2]-x[atomk][2]; rikmag = sqrt(rik[0]*rik[0] + rik[1]*rik[1] + rik[2]*rik[2]); lamdajik = 4.0*kronecker(itype,1) * - ((rho[ktype][1]-rikmag)-(rho[jtype][1]-rijmag)); + ((rho[ktype][1]-rikmag)-(rho[jtype][1]-rijmag_mod)); wik = Sp(rikmag,rcmin[itype][ktype],rcmax[itype][ktype],dwik); - rjk[0] = rik[0] - rij[0]; - rjk[1] = rik[1] - rij[1]; - rjk[2] = rik[2] - rij[2]; - rjkmag = sqrt(rjk[0] * rjk[0] + rjk[1] * rjk[1] + rjk[2] * rjk[2]); - rijrik = 2 * rijmag * rikmag; - rr = rijmag * rijmag - rikmag * rikmag; - cosjik = (rijmag * rijmag + rikmag * rikmag - rjkmag * rjkmag) / rijrik; + cosjik = (rij[0]*rik[0] + rij[1]*rik[1] + rij[2]*rik[2]) / + (rijmag*rikmag); cosjik = MIN(cosjik,1.0); cosjik = MAX(cosjik,-1.0); - dctdjk = -2 / rijrik; - dctdik = (-rr + rjkmag * rjkmag) / (rijrik * rikmag * rikmag); - // evaluate splines g and derivatives dg - g = gSpline(cosjik,(NijC+NijH),itype,&dgdc,&dgdN); + dcosjikdri[0] = ((rij[0]+rik[0])/(rijmag*rikmag)) - + (cosjik*((rij[0]/(rijmag*rijmag))+(rik[0]/(rikmag*rikmag)))); + dcosjikdri[1] = ((rij[1]+rik[1])/(rijmag*rikmag)) - + (cosjik*((rij[1]/(rijmag*rijmag))+(rik[1]/(rikmag*rikmag)))); + dcosjikdri[2] = ((rij[2]+rik[2])/(rijmag*rikmag)) - + (cosjik*((rij[2]/(rijmag*rijmag))+(rik[2]/(rikmag*rikmag)))); + dcosjikdrk[0] = (-rij[0]/(rijmag*rikmag)) + + (cosjik*(rik[0]/(rikmag*rikmag))); + dcosjikdrk[1] = (-rij[1]/(rijmag*rikmag)) + + (cosjik*(rik[1]/(rikmag*rikmag))); + dcosjikdrk[2] = (-rij[2]/(rijmag*rikmag)) + + (cosjik*(rik[2]/(rikmag*rikmag))); + dcosjikdrj[0] = (-rik[0]/(rijmag*rikmag)) + + (cosjik*(rij[0]/(rijmag*rijmag))); + dcosjikdrj[1] = (-rik[1]/(rijmag*rikmag)) + + (cosjik*(rij[1]/(rijmag*rijmag))); + dcosjikdrj[2] = (-rik[2]/(rijmag*rikmag)) + + (cosjik*(rij[2]/(rijmag*rijmag))); + g = gSpline(cosjik,(NijC+NijH),itype,&dgdc,&dgdN); tmp2 = VA*.5*(tmp*wik*dgdc*exp(lamdajik)); - - fi[0] = -tmp2 * dctdik * rik[0]; - fi[1] = -tmp2 * dctdik * rik[1]; - fi[2] = -tmp2 * dctdik * rik[2]; - fk[0] = tmp2 * dctdik * rik[0]; - fk[1] = tmp2 * dctdik * rik[1]; - fk[2] = tmp2 * dctdik * rik[2]; - fj[0] = 0; - fj[1] = 0; - fj[2] = 0; - fjk[0] = -tmp2 * dctdjk * rjk[0]; - fjk[1] = -tmp2 * dctdjk * rjk[1]; - fjk[2] = -tmp2 * dctdjk * rjk[2]; - fi[0] += fjk[0]; - fi[1] += fjk[1]; - fi[2] += fjk[2]; - fk[0] -= fjk[0]; - fk[1] -= fjk[1]; - fk[2] -= fjk[2]; - rijmbr = rcmin[itype][jtype] / realrijmag; - fj[0] += rijmbr * (fjk[0] - (realrij[0] * realrij[0] * fjk[0] + realrij[0] * realrij[1] * fjk[1] + realrij[0] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); - fj[1] += rijmbr * (fjk[1] - (realrij[1] * realrij[0] * fjk[0] + realrij[1] * realrij[1] * fjk[1] + realrij[1] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); - fj[2] += rijmbr * (fjk[2] - (realrij[2] * realrij[0] * fjk[0] + realrij[2] * realrij[1] * fjk[1] + realrij[2] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); - fi[0] -= rijmbr * (fjk[0] - (realrij[0] * realrij[0] * fjk[0] + realrij[0] * realrij[1] * fjk[1] + realrij[0] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); - fi[1] -= rijmbr * (fjk[1] - (realrij[1] * realrij[0] * fjk[0] + realrij[1] * realrij[1] * fjk[1] + realrij[1] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); - fi[2] -= rijmbr * (fjk[2] - (realrij[2] * realrij[0] * fjk[0] + realrij[2] * realrij[1] * fjk[1] + realrij[2] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); + fj[0] = -tmp2*dcosjikdrj[0]; + fj[1] = -tmp2*dcosjikdrj[1]; + fj[2] = -tmp2*dcosjikdrj[2]; + fi[0] = -tmp2*dcosjikdri[0]; + fi[1] = -tmp2*dcosjikdri[1]; + fi[2] = -tmp2*dcosjikdri[2]; + fk[0] = -tmp2*dcosjikdrk[0]; + fk[1] = -tmp2*dcosjikdrk[1]; + fk[2] = -tmp2*dcosjikdrk[2]; tmp2 = VA*.5*(tmp*wik*g*exp(lamdajik)*4.0*kronecker(itype,1)); fi[0] += tmp2*(rik[0]/rikmag); @@ -2439,6 +2443,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, tmp3 = tmp3pji; dN2[0] = dN2PJI[0]; dN2[1] = dN2PJI[1]; + REBO_neighs = REBO_firstneigh[j]; for (l = 0; l < REBO_numneigh[j]; l++) { atoml = REBO_neighs[l]; @@ -2449,51 +2454,43 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, rjl[2] = x[atomj][2]-x[atoml][2]; rjlmag = sqrt((rjl[0]*rjl[0])+(rjl[1]*rjl[1])+(rjl[2]*rjl[2])); lamdaijl = 4.0*kronecker(jtype,1) * - ((rho[ltype][1]-rjlmag)-(rho[itype][1]-rijmag)); + ((rho[ltype][1]-rjlmag)-(rho[itype][1]-rijmag_mod)); wjl = Sp(rjlmag,rcmin[jtype][ltype],rcmax[jtype][ltype],dwjl); - ril[0] = rij[0] + rjl[0]; - ril[1] = rij[1] + rjl[1]; - ril[2] = rij[2] + rjl[2]; - rilmag = sqrt(ril[0] * ril[0] + ril[1] * ril[1] + ril[2] * ril[2]); - rijrjl = 2 * rijmag * rjlmag; - rr = rijmag * rijmag - rjlmag * rjlmag; - cosijl = (rijmag * rijmag + rjlmag * rjlmag - rilmag * rilmag) / rijrjl; + cosijl = (-1.0*((rij[0]*rjl[0])+(rij[1]*rjl[1])+(rij[2]*rjl[2]))) / + (rijmag*rjlmag); cosijl = MIN(cosijl,1.0); cosijl = MAX(cosijl,-1.0); - dctdil = -2 / rijrjl; - dctdjl = (-rr + rilmag * rilmag) / (rijrjl * rjlmag * rjlmag); + + dcosijldri[0] = (-rjl[0]/(rijmag*rjlmag)) - + (cosijl*rij[0]/(rijmag*rijmag)); + dcosijldri[1] = (-rjl[1]/(rijmag*rjlmag)) - + (cosijl*rij[1]/(rijmag*rijmag)); + dcosijldri[2] = (-rjl[2]/(rijmag*rjlmag)) - + (cosijl*rij[2]/(rijmag*rijmag)); + dcosijldrj[0] = ((-rij[0]+rjl[0])/(rijmag*rjlmag)) + + (cosijl*((rij[0]/square(rijmag))-(rjl[0]/(rjlmag*rjlmag)))); + dcosijldrj[1] = ((-rij[1]+rjl[1])/(rijmag*rjlmag)) + + (cosijl*((rij[1]/square(rijmag))-(rjl[1]/(rjlmag*rjlmag)))); + dcosijldrj[2] = ((-rij[2]+rjl[2])/(rijmag*rjlmag)) + + (cosijl*((rij[2]/square(rijmag))-(rjl[2]/(rjlmag*rjlmag)))); + dcosijldrl[0] = (rij[0]/(rijmag*rjlmag))+(cosijl*rjl[0]/(rjlmag*rjlmag)); + dcosijldrl[1] = (rij[1]/(rijmag*rjlmag))+(cosijl*rjl[1]/(rjlmag*rjlmag)); + dcosijldrl[2] = (rij[2]/(rijmag*rjlmag))+(cosijl*rjl[2]/(rjlmag*rjlmag)); // evaluate splines g and derivatives dg g = gSpline(cosijl,NjiC+NjiH,jtype,&dgdc,&dgdN); tmp2 = VA*.5*(tmp*wjl*dgdc*exp(lamdaijl)); - fj[0] = -tmp2 * dctdjl * rjl[0]; - fj[1] = -tmp2 * dctdjl * rjl[1]; - fj[2] = -tmp2 * dctdjl * rjl[2]; - fl[0] = tmp2 * dctdjl * rjl[0]; - fl[1] = tmp2 * dctdjl * rjl[1]; - fl[2] = tmp2 * dctdjl * rjl[2]; - fi[0] = 0; - fi[1] = 0; - fi[2] = 0; - fil[0] = -tmp2 * dctdil * ril[0]; - fil[1] = -tmp2 * dctdil * ril[1]; - fil[2] = -tmp2 * dctdil * ril[2]; - fj[0] += fil[0]; - fj[1] += fil[1]; - fj[2] += fil[2]; - fl[0] -= fil[0]; - fl[1] -= fil[1]; - fl[2] -= fil[2]; - rijmbr = rcmin[itype][jtype] / realrijmag; - fi[0] += rijmbr * (fil[0] - (realrij[0] * realrij[0] * fil[0] + realrij[0] * realrij[1] * fil[1] + realrij[0] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - fi[1] += rijmbr * (fil[1] - (realrij[1] * realrij[0] * fil[0] + realrij[1] * realrij[1] * fil[1] + realrij[1] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - fi[2] += rijmbr * (fil[2] - (realrij[2] * realrij[0] * fil[0] + realrij[2] * realrij[1] * fil[1] + realrij[2] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - fj[0] -= rijmbr * (fil[0] - (realrij[0] * realrij[0] * fil[0] + realrij[0] * realrij[1] * fil[1] + realrij[0] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - fj[1] -= rijmbr * (fil[1] - (realrij[1] * realrij[0] * fil[0] + realrij[1] * realrij[1] * fil[1] + realrij[1] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - fj[2] -= rijmbr * (fil[2] - (realrij[2] * realrij[0] * fil[0] + realrij[2] * realrij[1] * fil[1] + realrij[2] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - - + fi[0] = -tmp2*dcosijldri[0]; + fi[1] = -tmp2*dcosijldri[1]; + fi[2] = -tmp2*dcosijldri[2]; + fj[0] = -tmp2*dcosijldrj[0]; + fj[1] = -tmp2*dcosijldrj[1]; + fj[2] = -tmp2*dcosijldrj[2]; + fl[0] = -tmp2*dcosijldrl[0]; + fl[1] = -tmp2*dcosijldrl[1]; + fl[2] = -tmp2*dcosijldrl[2]; + tmp2 = VA*.5*(tmp*wjl*g*exp(lamdaijl)*4.0*kronecker(jtype,1)); fj[0] += tmp2*(rjl[0]/rjlmag); fj[1] += tmp2*(rjl[1]/rjlmag); @@ -2503,6 +2500,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, fl[2] -= tmp2*(rjl[2]/rjlmag); // coordination forces + // dwik forces tmp2 = VA*.5*(tmp*dwjl*g*exp(lamdaijl))/rjlmag; @@ -2617,8 +2615,8 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, // piRC forces to J side - REBO_neighs = REBO_firstneigh[j]; - for (l = 0; l < REBO_numneigh[j]; l++) { + REBO_neighs = REBO_firstneigh[atomj]; + for (l = 0; l < REBO_numneigh[atomj]; l++) { atoml = REBO_neighs[l]; if (atoml != atomi) { ltype = map[type[atoml]]; @@ -2688,15 +2686,14 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, dN3[2] = dN3Tij[2]; atom2 = atomi; atom3 = atomj; - r32[0] = -rij[0]; - r32[1] = -rij[1]; - r32[2] = -rij[2]; - r23[0] = rij[0]; - r23[1] = rij[1]; - r23[2] = rij[2]; - r32mag = rijmag; - r23mag = rijmag; - + r32[0] = x[atom3][0]-x[atom2][0]; + r32[1] = x[atom3][1]-x[atom2][1]; + r32[2] = x[atom3][2]-x[atom2][2]; + r32mag = sqrt((r32[0]*r32[0])+(r32[1]*r32[1])+(r32[2]*r32[2])); + r23[0] = -r32[0]; + r23[1] = -r32[1]; + r23[2] = -r32[2]; + r23mag = r32mag; REBO_neighs_i = REBO_firstneigh[i]; for (k = 0; k < REBO_numneigh[i]; k++) { atomk = REBO_neighs_i[k]; @@ -2712,20 +2709,21 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, cos321 = MIN(cos321,1.0); cos321 = MAX(cos321,-1.0); sin321 = sqrt(1.0 - cos321*cos321); - if ((sin321 > TOL) && (r21mag > TOL)) { // XXX was sin321 != 0.0 sink2i = 1.0/(sin321*sin321); rik2i = 1.0/(r21mag*r21mag); rr = (rijmag*rijmag)-(r21mag*r21mag); - rjk[0] = r21[0]-rij[0]; - rjk[1] = r21[1]-rij[1]; - rjk[2] = r21[2]-rij[2]; + rjk[0] = r21[0]-r23[0]; + rjk[1] = r21[1]-r23[1]; + rjk[2] = r21[2]-r23[2]; rjk2 = (rjk[0]*rjk[0])+(rjk[1]*rjk[1])+(rjk[2]*rjk[2]); - rijrik = 2.0*rijmag*r21mag; + rijrik = 2.0*r23mag*r21mag; rik2 = r21mag*r21mag; dctik = (-rr+rjk2)/(rijrik*rik2); + dctij = (rr+rjk2)/(rijrik*r23mag*r23mag); dctjk = -2.0/rijrik; w21 = Sp(r21mag,rcmin[itype][ktype],rcmaxp[itype][ktype],dw21); + rijmag = r32mag; rikmag = r21mag; rij2 = r32mag*r32mag; rik2 = r21mag*r21mag; @@ -2743,8 +2741,8 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, r34[1] = x[atom3][1]-x[atom4][1]; r34[2] = x[atom3][2]-x[atom4][2]; r34mag = sqrt(r34[0]*r34[0] + r34[1]*r34[1] + r34[2]*r34[2]); - cos234 = -1.0*((rij[0]*r34[0])+(rij[1]*r34[1]) + - (rij[2]*r34[2]))/(rijmag*r34mag); + cos234 = (r32[0]*r34[0] + r32[1]*r34[1] + r32[2]*r34[2]) / + (r32mag*r34mag); cos234 = MIN(cos234,1.0); cos234 = MAX(cos234,-1.0); sin234 = sqrt(1.0 - cos234*cos234); @@ -2762,6 +2760,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, rijrjl = 2.0*r23mag*r34mag; rjl2 = r34mag*r34mag; dctjl = (-rr+ril2)/(rijrjl*rjl2); + dctji = (rr+ril2)/(rijrjl*r23mag*r23mag); dctil = -2.0/rijrjl; rjlmag = r34mag; rjl2 = r34mag*r34mag; @@ -2787,6 +2786,8 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, dt1djk = (-dctjk*sink2i*cos321); dt1djl = (rjl2i)-(dctjl*sinl2i*cos234); dt1dil = (-dctil*sinl2i*cos234); + dt1dij = (2.0/(r23mag*r23mag))-(dctij*sink2i*cos321) - + (dctji*sinl2i*cos234); dt2dik[0] = (-r23[2]*cross234[1])+(r23[1]*cross234[2]); dt2dik[1] = (-r23[0]*cross234[2])+(r23[2]*cross234[0]); @@ -2796,16 +2797,29 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, dt2djl[1] = (-r23[2]*cross321[0])+(r23[0]*cross321[2]); dt2djl[2] = (-r23[0]*cross321[1])+(r23[1]*cross321[0]); + dt2dij[0] = (r21[2]*cross234[1])-(r34[2]*cross321[1]) - + (r21[1]*cross234[2])+(r34[1]*cross321[2]); + dt2dij[1] = (r21[0]*cross234[2])-(r34[0]*cross321[2]) - + (r21[2]*cross234[0])+(r34[2]*cross321[0]); + dt2dij[2] = (r21[1]*cross234[0])-(r34[1]*cross321[0]) - + (r21[0]*cross234[1])+(r34[0]*cross321[1]); + aa = (prefactor*2.0*cw/cwnom)*w21*w34 * (1.0-tspjik)*(1.0-tspijl); aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34; at2 = aa*cwnum; + fcijpc = (-dt1dij*at2)+(aaa2*dtsjik*dctij*(1.0-tspijl)) + + (aaa2*dtsijl*dctji*(1.0-tspjik)); fcikpc = (-dt1dik*at2)+(aaa2*dtsjik*dctik*(1.0-tspijl)); fcjlpc = (-dt1djl*at2)+(aaa2*dtsijl*dctjl*(1.0-tspjik)); fcjkpc = (-dt1djk*at2)+(aaa2*dtsjik*dctjk*(1.0-tspijl)); fcilpc = (-dt1dil*at2)+(aaa2*dtsijl*dctil*(1.0-tspjik)); + F23[0] = (fcijpc*r23[0])+(aa*dt2dij[0]); + F23[1] = (fcijpc*r23[1])+(aa*dt2dij[1]); + F23[2] = (fcijpc*r23[2])+(aa*dt2dij[2]); + F12[0] = (fcikpc*r21[0])+(aa*dt2dik[0]); F12[1] = (fcikpc*r21[1])+(aa*dt2dik[1]); F12[2] = (fcikpc*r21[2])+(aa*dt2dik[2]); @@ -2825,31 +2839,16 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, f1[0] = -F12[0]-F31[0]; f1[1] = -F12[1]-F31[1]; f1[2] = -F12[2]-F31[2]; - f2[0] = F12[0]+F31[0]; - f2[1] = F12[1]+F31[1]; - f2[2] = F12[2]+F31[2]; - f3[0] = F34[0]+F24[0]; - f3[1] = F34[1]+F24[1]; - f3[2] = F34[2]+F24[2]; + f2[0] = F23[0]+F12[0]+F24[0]; + f2[1] = F23[1]+F12[1]+F24[1]; + f2[2] = F23[2]+F12[2]+F24[2]; + f3[0] = -F23[0]+F34[0]+F31[0]; + f3[1] = -F23[1]+F34[1]+F31[1]; + f3[2] = -F23[2]+F34[2]+F31[2]; f4[0] = -F34[0]-F24[0]; f4[1] = -F34[1]-F24[1]; f4[2] = -F34[2]-F24[2]; - rijmbr = rcmin[itype][jtype] / realrijmag; - f2[0] += rijmbr * (F24[0] - (realrij[0] * realrij[0] * F24[0] + realrij[0] * realrij[1] * F24[1] + realrij[0] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - f2[1] += rijmbr * (F24[1] - (realrij[1] * realrij[0] * F24[0] + realrij[1] * realrij[1] * F24[1] + realrij[1] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - f2[2] += rijmbr * (F24[2] - (realrij[2] * realrij[0] * F24[0] + realrij[2] * realrij[1] * F24[1] + realrij[2] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - f3[0] -= rijmbr * (F24[0] - (realrij[0] * realrij[0] * F24[0] + realrij[0] * realrij[1] * F24[1] + realrij[0] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - f3[1] -= rijmbr * (F24[1] - (realrij[1] * realrij[0] * F24[0] + realrij[1] * realrij[1] * F24[1] + realrij[1] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - f3[2] -= rijmbr * (F24[2] - (realrij[2] * realrij[0] * F24[0] + realrij[2] * realrij[1] * F24[1] + realrij[2] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - - f2[0] -= rijmbr * (F31[0] - (realrij[0] * realrij[0] * F31[0] + realrij[0] * realrij[1] * F31[1] + realrij[0] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - f2[1] -= rijmbr * (F31[1] - (realrij[1] * realrij[0] * F31[0] + realrij[1] * realrij[1] * F31[1] + realrij[1] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - f2[2] -= rijmbr * (F31[2] - (realrij[2] * realrij[0] * F31[0] + realrij[2] * realrij[1] * F31[1] + realrij[2] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - f3[0] += rijmbr * (F31[0] - (realrij[0] * realrij[0] * F31[0] + realrij[0] * realrij[1] * F31[1] + realrij[0] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - f3[1] += rijmbr * (F31[1] - (realrij[1] * realrij[0] * F31[0] + realrij[1] * realrij[1] * F31[1] + realrij[1] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - f3[2] += rijmbr * (F31[2] - (realrij[2] * realrij[0] * F31[0] + realrij[2] * realrij[1] * F31[1] + realrij[2] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - // coordination forces tmp2 = VA*Tij*((1.0-(om1234*om1234))) * -- GitLab From 7e42af18bc6870b4d8769528228842b27388c97e Mon Sep 17 00:00:00 2001 From: Markus Hoehnerbach Date: Wed, 5 Jul 2017 15:11:58 +0200 Subject: [PATCH 411/593] Feature: AIREBO parametrize cutoff switching In #514 it has been raised that the switching function that ensures a smooth transition to the cutoff is only correct if cutlj = 3.0. This patch gives users an opportunity to configure the switching function together with the cutoff by specifying the start of the transition region. Behaviour in the default case remaing unchanged. This allows users to specify larger cutoffs than 3 (which used to have no effect) and get correct cutoff behaviour for values less then 3. --- doc/src/pair_airebo.txt | 13 ++++++++++--- src/MANYBODY/pair_airebo.cpp | 18 +++++++++++++----- src/MANYBODY/pair_airebo.h | 1 + 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/doc/src/pair_airebo.txt b/doc/src/pair_airebo.txt index 2e3083c34b..0c03eb3267 100644 --- a/doc/src/pair_airebo.txt +++ b/doc/src/pair_airebo.txt @@ -15,12 +15,13 @@ pair_style rebo/omp command :h3 [Syntax:] -pair_style style cutoff LJ_flag TORSION_flag :pre +pair_style style cutoff LJ_flag TORSION_flag cutoff_min :pre style = {airebo} or {airebo/morse} or {rebo} cutoff = LJ or Morse cutoff (sigma scale factor) (AIREBO and AIREBO-M only) LJ_flag = 0/1 to turn off/on the LJ or Morse term (AIREBO and AIREBO-M only, optional) -TORSION_flag = 0/1 to turn off/on the torsion term (AIREBO and AIREBO-M only, optional) :ul +TORSION_flag = 0/1 to turn off/on the torsion term (AIREBO and AIREBO-M only, optional) +cutoff_min = Start of the transition region of cutoff (sigma scale factor) (AIREBO and AIREBO-M only, optional) :ul [Examples:] @@ -60,7 +61,7 @@ The AIREBO potential consists of three terms: :c,image(Eqs/pair_airebo.jpg) By default, all three terms are included. For the {airebo} style, if -the two optional flag arguments to the pair_style command are +the first two optional flag arguments to the pair_style command are included, the LJ and torsional terms can be turned off. Note that both or neither of the flags must be included. If both of the LJ an torsional terms are turned off, it becomes the 2nd-generation REBO @@ -97,6 +98,12 @@ standard AIREBO potential, sigma_CC = 3.4 Angstroms, so with a scale factor of 3.0 (the argument in pair_style), the resulting E_LJ cutoff would be 10.2 Angstroms. +By default, the longer-ranged interaction is smoothly switched off +between 2.16 and 3.0 sigma. By specifying {cutoff_min} in addition +to {cutoff}, the switching can be configured to take place between +{cutoff_min} and {cutoff}. {cutoff_min} can only be specified if all +optional arguments are given. + The E_TORSION term is an explicit 4-body potential that describes various dihedral angle preferences in hydrocarbon configurations. diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index bc3af2d332..e0cc15fae1 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -68,6 +68,10 @@ PairAIREBO::PairAIREBO(LAMMPS *lmp) : Pair(lmp) nC = nH = NULL; map = NULL; manybody_flag = 1; + + sigwid = 0.84; + sigcut = 3.0; + sigmin = sigcut - sigwid; } /* ---------------------------------------------------------------------- @@ -147,7 +151,8 @@ void PairAIREBO::allocate() void PairAIREBO::settings(int narg, char **arg) { - if (narg != 1 && narg != 3) error->all(FLERR,"Illegal pair_style command"); + if (narg != 1 && narg != 3 && narg != 4) + error->all(FLERR,"Illegal pair_style command"); cutlj = force->numeric(FLERR,arg[0]); @@ -155,6 +160,13 @@ void PairAIREBO::settings(int narg, char **arg) ljflag = force->inumeric(FLERR,arg[1]); torflag = force->inumeric(FLERR,arg[2]); } + if (narg == 4) { + ljflag = force->inumeric(FLERR,arg[1]); + torflag = force->inumeric(FLERR,arg[2]); + sigcut = cutlj; + sigmin = force->numeric(FLERR,arg[3]); + sigwid = sigcut - sigmin; + } // this one parameter for C-C interactions is different in AIREBO vs REBO // see Favata, Micheletti, Ryu, Pugno, Comp Phys Comm (2016) @@ -736,10 +748,6 @@ void PairAIREBO::FLJ(int eflag, int vflag) // compute LJ forces and energy - sigwid = 0.84; - sigcut = 3.0; - sigmin = sigcut - sigwid; - rljmin = sigma[itype][jtype]; rljmax = sigcut * rljmin; rljmin = sigmin * rljmin; diff --git a/src/MANYBODY/pair_airebo.h b/src/MANYBODY/pair_airebo.h index aabc3fe17a..d9628f3bb3 100644 --- a/src/MANYBODY/pair_airebo.h +++ b/src/MANYBODY/pair_airebo.h @@ -46,6 +46,7 @@ class PairAIREBO : public Pair { int morseflag; // 1 if Morse instead of LJ for non-bonded double cutlj; // user-specified LJ cutoff + double sigcut,sigwid,sigmin; // corresponding cutoff function double cutljrebosq; // cut for when to compute // REBO neighs of ghost atoms -- GitLab From d2f7f4843a7cc64cb0468f64507d40f203ea0dab Mon Sep 17 00:00:00 2001 From: Markus Hoehnerbach Date: Wed, 5 Jul 2017 15:16:45 +0200 Subject: [PATCH 412/593] AIREBO Fix Credits --- src/MANYBODY/pair_airebo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index e0cc15fae1..27a5aad21c 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -14,7 +14,8 @@ /* ---------------------------------------------------------------------- Contributing author: Ase Henry (MIT) Bugfixes and optimizations: - Marcel Fallet & Steve Stuart (Clemson), Axel Kohlmeyer (Temple U) + Marcel Fallet & Steve Stuart (Clemson), Axel Kohlmeyer (Temple U), + Markus Hoehnerbach (RWTH Aachen), Github user CF17 AIREBO-M modification to optionally replace LJ with Morse potentials. Thomas C. O'Connor (JHU) 2014 ------------------------------------------------------------------------- */ -- GitLab From ff761d639a78bf40627a26de52724e06fdc375df Mon Sep 17 00:00:00 2001 From: Markus Hoehnerbach Date: Wed, 5 Jul 2017 15:29:40 +0200 Subject: [PATCH 413/593] Sync AIREBO USER-OMP implementation. --- src/MANYBODY/pair_airebo.cpp | 3 +- src/USER-OMP/pair_airebo_omp.cpp | 407 +++++++++++++++---------------- 2 files changed, 202 insertions(+), 208 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 27a5aad21c..a33abfcb63 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -2147,7 +2147,6 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij_mod[3], double rijmag_mo double tmppij,tmppji,dN2PIJ[2],dN2PJI[2],dN3piRC[3],dN3Tij[3]; double tmp3pij,tmp3pji,Stb,dStb; - double **x = atom->x; int *type = atom->type; @@ -2261,7 +2260,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij_mod[3], double rijmag_mo if (itype == 0 && jtype == 0) Tij=TijSpline((NijC+NijH),(NjiC+NjiH),Nijconj,dN3Tij); Etmp = 0.0; - + if (fabs(Tij) > TOL) { atom2 = atomi; atom3 = atomj; diff --git a/src/USER-OMP/pair_airebo_omp.cpp b/src/USER-OMP/pair_airebo_omp.cpp index 13df133585..2fd6c93f03 100644 --- a/src/USER-OMP/pair_airebo_omp.cpp +++ b/src/USER-OMP/pair_airebo_omp.cpp @@ -504,10 +504,6 @@ void PairAIREBOOMP::FLJ_thr(int ifrom, int ito, int evflag, int eflag, // compute LJ forces and energy - sigwid = 0.84; - sigcut = 3.0; - sigmin = sigcut - sigwid; - rljmin = sigma[itype][jtype]; rljmax = sigcut * rljmin; rljmin = sigmin * rljmin; @@ -1853,44 +1849,62 @@ double PairAIREBOOMP::bondorder_thr(int i, int j, double rij[3], double rijmag, /* ---------------------------------------------------------------------- Bij* function -------------------------------------------------------------------------- */ - -double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag, - double VA, double rij0[3], double rij0mag, +------------------------------------------------------------------------- + +This function calculates S(t_b(b_ij*)) as specified in the AIREBO paper. +To do so, it needs to compute b_ij*, i.e. the bondorder given that the +atoms i and j are placed a ficticious distance rijmag_mod apart. +Now there are two approaches to calculate the resulting forces: +1. Carry through the ficticious distance and corresponding vector + rij_mod, correcting afterwards using the derivative of r/|r|. +2. Perform all the calculations using the real distance, and do not + use a correction, only using rijmag_mod where necessary. +This code opts for (2). Mathematically, the approaches are equivalent +if implemented correctly, since in terms where only the normalized +vector is used, both calculations necessarily lead to the same result +since if f(x) = g(x/|x|) then for x = y/|y| f(x) = g(y/|y|/1). +The actual modified distance is only used in the lamda terms. +Note that these do not contribute to the forces between i and j, since +rijmag_mod is a constant and the corresponding derivatives are +accordingly zero. +This function should be kept in sync with bondorder(), i.e. changes +there probably also need to be performed here. + +*/ + +double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij_mod[3], double rijmag_mod, + double VA, double rij[3], double rijmag, int vflag_atom, ThrData * const thr) { - int k,n,l,atomk,atoml,atomn,atom1,atom2,atom3,atom4; - int atomi,atomj,itype,jtype,ktype,ltype,ntype; - double rik[3], rjl[3], rkn[3],rknmag,dNki; + int atomi,atomj,k,n,l,atomk,atoml,atomn,atom1,atom2,atom3,atom4; + int itype,jtype,ktype,ltype,ntype; + double rik[3],rjl[3],rkn[3],rji[3],rki[3],rlj[3],rknmag,dNki,dwjl,bij; double NijC,NijH,NjiC,NjiH,wik,dwik,dwkn,wjl; double rikmag,rjlmag,cosjik,cosijl,g,tmp2,tmp3; - double Etmp,pij,tmp,wij,dwij,NconjtmpI,NconjtmpJ; - double Nki,Nlj,dS,lamdajik,lamdaijl,dgdc,dgdN,pji,Nijconj,piRC; - double dN2[2],dN3[3],dwjl; - double Tij,crosskij[3],crosskijmag; - double crossijl[3],crossijlmag,omkijl; - double tmppij,tmppji,dN2PIJ[2],dN2PJI[2],dN3piRC[3],dN3Tij[3]; - double bij,tmp3pij,tmp3pji,Stb,dStb; - double r32[3],r32mag,cos321; + double Etmp,pij,tmp,wij,dwij,NconjtmpI,NconjtmpJ,Nki,Nlj,dS; + double lamdajik,lamdaijl,dgdc,dgdN,pji,Nijconj,piRC; + double dcosjikdri[3],dcosijldri[3],dcosjikdrk[3]; + double dN2[2],dN3[3]; + double dcosjikdrj[3],dcosijldrj[3],dcosijldrl[3]; + double Tij; + double r32[3],r32mag,cos321,r43[3],r13[3]; + double dNlj; double om1234,rln[3]; double rlnmag,dwln,r23[3],r23mag,r21[3],r21mag; double w21,dw21,r34[3],r34mag,cos234,w34,dw34; double cross321[3],cross234[3],prefactor,SpN; - double fcikpc,fcjlpc,fcjkpc,fcilpc; - double dt2dik[3],dt2djl[3],aa,aaa2,at2,cw,cwnum,cwnom; + double fcikpc,fcjlpc,fcjkpc,fcilpc,fcijpc; + double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom; double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2; - double dctik,dctjk,dctjl,dctil,rik2i,rjl2i,sink2i,sinl2i; - double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil; - double dNlj; - double PijS,PjiS; + double dctik,dctjk,dctjl,dctij,dctji,dctil,rik2i,rjl2i,sink2i,sinl2i; + double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil,dt1dij; + double F23[3],F12[3],F34[3],F31[3],F24[3],fi[3],fj[3],fk[3],fl[3]; + double f1[3],f2[3],f3[3],f4[4]; + double dcut321,PijS,PjiS; double rij2,tspjik,dtsjik,tspijl,dtsijl,costmp; int *REBO_neighs,*REBO_neighs_i,*REBO_neighs_j,*REBO_neighs_k,*REBO_neighs_l; - double F12[3],F34[3],F31[3],F24[3]; - double fi[3],fj[3],fk[3],fl[3],f1[3],f2[3],f3[3],f4[4]; - double rji[3],rki[3],rlj[3],r13[3],r43[3]; - double realrij[3], realrijmag; - double rjkmag, rilmag, dctdjk, dctdik, dctdil, dctdjl; - double fjk[3], fil[3], rijmbr; + double tmppij,tmppji,dN2PIJ[2],dN2PJI[2],dN3piRC[3],dN3Tij[3]; + double tmp3pij,tmp3pji,Stb,dStb; const double * const * const x = atom->x; double * const * const f = thr->get_f(); @@ -1900,12 +1914,11 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag atomj = j; itype = map[type[atomi]]; jtype = map[type[atomj]]; - wij = Sp(rij0mag,rcmin[itype][jtype],rcmax[itype][jtype],dwij); + wij = Sp(rijmag,rcmin[itype][jtype],rcmax[itype][jtype],dwij); NijC = nC[atomi]-(wij*kronecker(jtype,0)); NijH = nH[atomi]-(wij*kronecker(jtype,1)); NjiC = nC[atomj]-(wij*kronecker(itype,0)); NjiH = nH[atomj]-(wij*kronecker(itype,1)); - bij = 0.0; tmp = 0.0; tmp2 = 0.0; @@ -1918,12 +1931,6 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag Stb = 0.0; dStb = 0.0; - realrij[0] = x[atomi][0] - x[atomj][0]; - realrij[1] = x[atomi][1] - x[atomj][1]; - realrij[2] = x[atomi][2] - x[atomj][2]; - realrijmag = sqrt(realrij[0] * realrij[0] + realrij[1] * realrij[1] - + realrij[2] * realrij[2]); - REBO_neighs = REBO_firstneigh[i]; for (k = 0; k < REBO_numneigh[i]; k++) { atomk = REBO_neighs[k]; @@ -1934,9 +1941,9 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag rik[2] = x[atomi][2]-x[atomk][2]; rikmag = sqrt((rik[0]*rik[0])+(rik[1]*rik[1])+(rik[2]*rik[2])); lamdajik = 4.0*kronecker(itype,1) * - ((rho[ktype][1]-rikmag)-(rho[jtype][1]-rijmag)); + ((rho[ktype][1]-rikmag)-(rho[jtype][1]-rijmag_mod)); wik = Sp(rikmag,rcmin[itype][ktype],rcmax[itype][ktype],dS); - Nki = nC[atomk]-(wik*kronecker(itype,0)) + + Nki = nC[atomk]-(wik*kronecker(itype,0))+ nH[atomk]-(wik*kronecker(itype,1)); cosjik = ((rij[0]*rik[0])+(rij[1]*rik[1])+(rij[2]*rik[2])) / (rijmag*rikmag); @@ -1959,6 +1966,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag pij = 1.0/sqrt(1.0+Etmp+PijS); tmppij = -.5*pij*pij*pij; tmp3pij = tmp3; + tmp = 0.0; tmp2 = 0.0; tmp3 = 0.0; @@ -1974,7 +1982,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag rjl[2] = x[atomj][2]-x[atoml][2]; rjlmag = sqrt((rjl[0]*rjl[0])+(rjl[1]*rjl[1])+(rjl[2]*rjl[2])); lamdaijl = 4.0*kronecker(jtype,1) * - ((rho[ltype][1]-rjlmag)-(rho[itype][1]-rijmag)); + ((rho[ltype][1]-rjlmag)-(rho[itype][1]-rijmag_mod)); wjl = Sp(rjlmag,rcmin[jtype][ltype],rcmax[jtype][ltype],dS); Nlj = nC[atoml]-(wjl*kronecker(jtype,0))+nH[atoml] - (wjl*kronecker(jtype,1)); @@ -2004,82 +2012,80 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag Nijconj = 1.0+(NconjtmpI*NconjtmpI)+(NconjtmpJ*NconjtmpJ); piRC = piRCSpline(NijC+NijH,NjiC+NjiH,Nijconj,itype,jtype,dN3piRC); + Tij = 0.0; dN3Tij[0] = 0.0; dN3Tij[1] = 0.0; dN3Tij[2] = 0.0; if (itype == 0 && jtype == 0) Tij=TijSpline((NijC+NijH),(NjiC+NjiH),Nijconj,dN3Tij); - Etmp = 0.0; + if (fabs(Tij) > TOL) { + atom2 = atomi; + atom3 = atomj; + r32[0] = x[atom3][0]-x[atom2][0]; + r32[1] = x[atom3][1]-x[atom2][1]; + r32[2] = x[atom3][2]-x[atom2][2]; + r32mag = sqrt((r32[0]*r32[0])+(r32[1]*r32[1])+(r32[2]*r32[2])); + r23[0] = -r32[0]; + r23[1] = -r32[1]; + r23[2] = -r32[2]; + r23mag = r32mag; REBO_neighs_i = REBO_firstneigh[i]; for (k = 0; k < REBO_numneigh[i]; k++) { atomk = REBO_neighs_i[k]; + atom1 = atomk; ktype = map[type[atomk]]; if (atomk != atomj) { - rik[0] = x[atomi][0]-x[atomk][0]; - rik[1] = x[atomi][1]-x[atomk][1]; - rik[2] = x[atomi][2]-x[atomk][2]; - rikmag = sqrt((rik[0]*rik[0])+(rik[1]*rik[1])+(rik[2]*rik[2])); - cos321 = ((rij[0]*rik[0])+(rij[1]*rik[1])+(rij[2]*rik[2])) / - (rijmag*rikmag); + r21[0] = x[atom2][0]-x[atom1][0]; + r21[1] = x[atom2][1]-x[atom1][1]; + r21[2] = x[atom2][2]-x[atom1][2]; + r21mag = sqrt(r21[0]*r21[0] + r21[1]*r21[1] + r21[2]*r21[2]); + cos321 = -1.0*((r21[0]*r32[0])+(r21[1]*r32[1])+(r21[2]*r32[2])) / + (r21mag*r32mag); cos321 = MIN(cos321,1.0); cos321 = MAX(cos321,-1.0); + sin321 = sqrt(1.0 - cos321*cos321); + if ((sin321 > TOL) && (r21mag > TOL)) { // XXX was sin321 != 0.0 + w21 = Sp(r21mag,rcmin[itype][ktype],rcmaxp[itype][ktype],dw21); + tspjik = Sp2(cos321,thmin,thmax,dtsjik); - rjk[0] = rik[0]-rij[0]; - rjk[1] = rik[1]-rij[1]; - rjk[2] = rik[2]-rij[2]; - rjk2 = (rjk[0]*rjk[0])+(rjk[1]*rjk[1])+(rjk[2]*rjk[2]); - rij2 = rijmag*rijmag; - rik2 = rikmag*rikmag; - costmp = 0.5*(rij2+rik2-rjk2)/rijmag/rikmag; - tspjik = Sp2(costmp,thmin,thmax,dtsjik); - - if (sqrt(1.0 - cos321*cos321) > sqrt(TOL)) { - wik = Sp(rikmag,rcmin[itype][ktype],rcmaxp[itype][ktype],dwik); REBO_neighs_j = REBO_firstneigh[j]; for (l = 0; l < REBO_numneigh[j]; l++) { atoml = REBO_neighs_j[l]; + atom4 = atoml; ltype = map[type[atoml]]; if (!(atoml == atomi || atoml == atomk)) { - rjl[0] = x[atomj][0]-x[atoml][0]; - rjl[1] = x[atomj][1]-x[atoml][1]; - rjl[2] = x[atomj][2]-x[atoml][2]; - rjlmag = sqrt(rjl[0]*rjl[0] + rjl[1]*rjl[1] + rjl[2]*rjl[2]); - cos234 = -((rij[0]*rjl[0])+(rij[1]*rjl[1])+(rij[2]*rjl[2])) / - (rijmag*rjlmag); + r34[0] = x[atom3][0]-x[atom4][0]; + r34[1] = x[atom3][1]-x[atom4][1]; + r34[2] = x[atom3][2]-x[atom4][2]; + r34mag = sqrt((r34[0]*r34[0])+(r34[1]*r34[1])+(r34[2]*r34[2])); + cos234 = (r32[0]*r34[0] + r32[1]*r34[1] + r32[2]*r34[2]) / + (r32mag*r34mag); cos234 = MIN(cos234,1.0); cos234 = MAX(cos234,-1.0); + sin234 = sqrt(1.0 - cos234*cos234); + + if ((sin234 > TOL) && (r34mag > TOL)) { // XXX was sin234 != 0.0 + w34 = Sp(r34mag,rcmin[jtype][ltype],rcmaxp[jtype][ltype],dw34); + tspijl = Sp2(cos234,thmin,thmax,dtsijl); + + cross321[0] = (r32[1]*r21[2])-(r32[2]*r21[1]); + cross321[1] = (r32[2]*r21[0])-(r32[0]*r21[2]); + cross321[2] = (r32[0]*r21[1])-(r32[1]*r21[0]); + cross234[0] = (r23[1]*r34[2])-(r23[2]*r34[1]); + cross234[1] = (r23[2]*r34[0])-(r23[0]*r34[2]); + cross234[2] = (r23[0]*r34[1])-(r23[1]*r34[0]); - ril[0] = rij[0]+rjl[0]; - ril[1] = rij[1]+rjl[1]; - ril[2] = rij[2]+rjl[2]; - ril2 = (ril[0]*ril[0])+(ril[1]*ril[1])+(ril[2]*ril[2]); - rjl2 = rjlmag*rjlmag; - costmp = 0.5*(rij2+rjl2-ril2)/rijmag/rjlmag; - tspijl = Sp2(costmp,thmin,thmax,dtsijl); - - if (sqrt(1.0 - cos234*cos234) > sqrt(TOL)) { - wjl = Sp(rjlmag,rcmin[jtype][ltype],rcmaxp[jtype][ltype],dS); - crosskij[0] = (rij[1]*rik[2]-rij[2]*rik[1]); - crosskij[1] = (rij[2]*rik[0]-rij[0]*rik[2]); - crosskij[2] = (rij[0]*rik[1]-rij[1]*rik[0]); - crosskijmag = sqrt(crosskij[0]*crosskij[0] + - crosskij[1]*crosskij[1] + - crosskij[2]*crosskij[2]); - crossijl[0] = (rij[1]*rjl[2]-rij[2]*rjl[1]); - crossijl[1] = (rij[2]*rjl[0]-rij[0]*rjl[2]); - crossijl[2] = (rij[0]*rjl[1]-rij[1]*rjl[0]); - crossijlmag = sqrt(crossijl[0]*crossijl[0] + - crossijl[1]*crossijl[1] + - crossijl[2]*crossijl[2]); - omkijl = -1.0*(((crosskij[0]*crossijl[0]) + - (crosskij[1]*crossijl[1]) + - (crosskij[2]*crossijl[2])) / - (crosskijmag*crossijlmag)); - Etmp += ((1.0-square(omkijl))*wik*wjl) * + cwnum = (cross321[0]*cross234[0]) + + (cross321[1]*cross234[1]) + (cross321[2]*cross234[2]); + cwnom = r21mag*r34mag*r23mag*r23mag*sin321*sin234; + om1234 = cwnum/cwnom; + cw = om1234; + Etmp += ((1.0-square(om1234))*w21*w34) * (1.0-tspjik)*(1.0-tspijl); + } } } @@ -2111,50 +2117,43 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag rik[2] = x[atomi][2]-x[atomk][2]; rikmag = sqrt(rik[0]*rik[0] + rik[1]*rik[1] + rik[2]*rik[2]); lamdajik = 4.0*kronecker(itype,1) * - ((rho[ktype][1]-rikmag)-(rho[jtype][1]-rijmag)); + ((rho[ktype][1]-rikmag)-(rho[jtype][1]-rijmag_mod)); wik = Sp(rikmag,rcmin[itype][ktype],rcmax[itype][ktype],dwik); - rjk[0] = rik[0] - rij[0]; - rjk[1] = rik[1] - rij[1]; - rjk[2] = rik[2] - rij[2]; - rjkmag = sqrt(rjk[0] * rjk[0] + rjk[1] * rjk[1] + rjk[2] * rjk[2]); - rijrik = 2 * rijmag * rikmag; - rr = rijmag * rijmag - rikmag * rikmag; - cosjik = (rijmag * rijmag + rikmag * rikmag - rjkmag * rjkmag) / rijrik; + cosjik = (rij[0]*rik[0] + rij[1]*rik[1] + rij[2]*rik[2]) / + (rijmag*rikmag); cosjik = MIN(cosjik,1.0); cosjik = MAX(cosjik,-1.0); - dctdjk = -2 / rijrik; - dctdik = (-rr + rjkmag * rjkmag) / (rijrik * rikmag * rikmag); - // evaluate splines g and derivatives dg - g = gSpline(cosjik,(NijC+NijH),itype,&dgdc,&dgdN); + dcosjikdri[0] = ((rij[0]+rik[0])/(rijmag*rikmag)) - + (cosjik*((rij[0]/(rijmag*rijmag))+(rik[0]/(rikmag*rikmag)))); + dcosjikdri[1] = ((rij[1]+rik[1])/(rijmag*rikmag)) - + (cosjik*((rij[1]/(rijmag*rijmag))+(rik[1]/(rikmag*rikmag)))); + dcosjikdri[2] = ((rij[2]+rik[2])/(rijmag*rikmag)) - + (cosjik*((rij[2]/(rijmag*rijmag))+(rik[2]/(rikmag*rikmag)))); + dcosjikdrk[0] = (-rij[0]/(rijmag*rikmag)) + + (cosjik*(rik[0]/(rikmag*rikmag))); + dcosjikdrk[1] = (-rij[1]/(rijmag*rikmag)) + + (cosjik*(rik[1]/(rikmag*rikmag))); + dcosjikdrk[2] = (-rij[2]/(rijmag*rikmag)) + + (cosjik*(rik[2]/(rikmag*rikmag))); + dcosjikdrj[0] = (-rik[0]/(rijmag*rikmag)) + + (cosjik*(rij[0]/(rijmag*rijmag))); + dcosjikdrj[1] = (-rik[1]/(rijmag*rikmag)) + + (cosjik*(rij[1]/(rijmag*rijmag))); + dcosjikdrj[2] = (-rik[2]/(rijmag*rikmag)) + + (cosjik*(rij[2]/(rijmag*rijmag))); + g = gSpline(cosjik,(NijC+NijH),itype,&dgdc,&dgdN); tmp2 = VA*.5*(tmp*wik*dgdc*exp(lamdajik)); - - fi[0] = -tmp2 * dctdik * rik[0]; - fi[1] = -tmp2 * dctdik * rik[1]; - fi[2] = -tmp2 * dctdik * rik[2]; - fk[0] = tmp2 * dctdik * rik[0]; - fk[1] = tmp2 * dctdik * rik[1]; - fk[2] = tmp2 * dctdik * rik[2]; - fj[0] = 0; - fj[1] = 0; - fj[2] = 0; - fjk[0] = -tmp2 * dctdjk * rjk[0]; - fjk[1] = -tmp2 * dctdjk * rjk[1]; - fjk[2] = -tmp2 * dctdjk * rjk[2]; - fi[0] += fjk[0]; - fi[1] += fjk[1]; - fi[2] += fjk[2]; - fk[0] -= fjk[0]; - fk[1] -= fjk[1]; - fk[2] -= fjk[2]; - rijmbr = rcmin[itype][jtype] / realrijmag; - fj[0] += rijmbr * (fjk[0] - (realrij[0] * realrij[0] * fjk[0] + realrij[0] * realrij[1] * fjk[1] + realrij[0] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); - fj[1] += rijmbr * (fjk[1] - (realrij[1] * realrij[0] * fjk[0] + realrij[1] * realrij[1] * fjk[1] + realrij[1] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); - fj[2] += rijmbr * (fjk[2] - (realrij[2] * realrij[0] * fjk[0] + realrij[2] * realrij[1] * fjk[1] + realrij[2] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); - fi[0] -= rijmbr * (fjk[0] - (realrij[0] * realrij[0] * fjk[0] + realrij[0] * realrij[1] * fjk[1] + realrij[0] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); - fi[1] -= rijmbr * (fjk[1] - (realrij[1] * realrij[0] * fjk[0] + realrij[1] * realrij[1] * fjk[1] + realrij[1] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); - fi[2] -= rijmbr * (fjk[2] - (realrij[2] * realrij[0] * fjk[0] + realrij[2] * realrij[1] * fjk[1] + realrij[2] * realrij[2] * fjk[2]) / (realrijmag * realrijmag)); + fj[0] = -tmp2*dcosjikdrj[0]; + fj[1] = -tmp2*dcosjikdrj[1]; + fj[2] = -tmp2*dcosjikdrj[2]; + fi[0] = -tmp2*dcosjikdri[0]; + fi[1] = -tmp2*dcosjikdri[1]; + fi[2] = -tmp2*dcosjikdri[2]; + fk[0] = -tmp2*dcosjikdrk[0]; + fk[1] = -tmp2*dcosjikdrk[1]; + fk[2] = -tmp2*dcosjikdrk[2]; tmp2 = VA*.5*(tmp*wik*g*exp(lamdajik)*4.0*kronecker(itype,1)); fi[0] += tmp2*(rik[0]/rikmag); @@ -2212,6 +2211,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag tmp3 = tmp3pji; dN2[0] = dN2PJI[0]; dN2[1] = dN2PJI[1]; + REBO_neighs = REBO_firstneigh[j]; for (l = 0; l < REBO_numneigh[j]; l++) { atoml = REBO_neighs[l]; @@ -2222,50 +2222,43 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag rjl[2] = x[atomj][2]-x[atoml][2]; rjlmag = sqrt((rjl[0]*rjl[0])+(rjl[1]*rjl[1])+(rjl[2]*rjl[2])); lamdaijl = 4.0*kronecker(jtype,1) * - ((rho[ltype][1]-rjlmag)-(rho[itype][1]-rijmag)); + ((rho[ltype][1]-rjlmag)-(rho[itype][1]-rijmag_mod)); wjl = Sp(rjlmag,rcmin[jtype][ltype],rcmax[jtype][ltype],dwjl); - ril[0] = rij[0] + rjl[0]; - ril[1] = rij[1] + rjl[1]; - ril[2] = rij[2] + rjl[2]; - rilmag = sqrt(ril[0] * ril[0] + ril[1] * ril[1] + ril[2] * ril[2]); - rijrjl = 2 * rijmag * rjlmag; - rr = rijmag * rijmag - rjlmag * rjlmag; - cosijl = (rijmag * rijmag + rjlmag * rjlmag - rilmag * rilmag) / rijrjl; + cosijl = (-1.0*((rij[0]*rjl[0])+(rij[1]*rjl[1])+(rij[2]*rjl[2]))) / + (rijmag*rjlmag); cosijl = MIN(cosijl,1.0); cosijl = MAX(cosijl,-1.0); - dctdil = -2 / rijrjl; - dctdjl = (-rr + rilmag * rilmag) / (rijrjl * rjlmag * rjlmag); + + dcosijldri[0] = (-rjl[0]/(rijmag*rjlmag)) - + (cosijl*rij[0]/(rijmag*rijmag)); + dcosijldri[1] = (-rjl[1]/(rijmag*rjlmag)) - + (cosijl*rij[1]/(rijmag*rijmag)); + dcosijldri[2] = (-rjl[2]/(rijmag*rjlmag)) - + (cosijl*rij[2]/(rijmag*rijmag)); + dcosijldrj[0] = ((-rij[0]+rjl[0])/(rijmag*rjlmag)) + + (cosijl*((rij[0]/square(rijmag))-(rjl[0]/(rjlmag*rjlmag)))); + dcosijldrj[1] = ((-rij[1]+rjl[1])/(rijmag*rjlmag)) + + (cosijl*((rij[1]/square(rijmag))-(rjl[1]/(rjlmag*rjlmag)))); + dcosijldrj[2] = ((-rij[2]+rjl[2])/(rijmag*rjlmag)) + + (cosijl*((rij[2]/square(rijmag))-(rjl[2]/(rjlmag*rjlmag)))); + dcosijldrl[0] = (rij[0]/(rijmag*rjlmag))+(cosijl*rjl[0]/(rjlmag*rjlmag)); + dcosijldrl[1] = (rij[1]/(rijmag*rjlmag))+(cosijl*rjl[1]/(rjlmag*rjlmag)); + dcosijldrl[2] = (rij[2]/(rijmag*rjlmag))+(cosijl*rjl[2]/(rjlmag*rjlmag)); // evaluate splines g and derivatives dg g = gSpline(cosijl,NjiC+NjiH,jtype,&dgdc,&dgdN); tmp2 = VA*.5*(tmp*wjl*dgdc*exp(lamdaijl)); - fj[0] = -tmp2 * dctdjl * rjl[0]; - fj[1] = -tmp2 * dctdjl * rjl[1]; - fj[2] = -tmp2 * dctdjl * rjl[2]; - fl[0] = tmp2 * dctdjl * rjl[0]; - fl[1] = tmp2 * dctdjl * rjl[1]; - fl[2] = tmp2 * dctdjl * rjl[2]; - fi[0] = 0; - fi[1] = 0; - fi[2] = 0; - fil[0] = -tmp2 * dctdil * ril[0]; - fil[1] = -tmp2 * dctdil * ril[1]; - fil[2] = -tmp2 * dctdil * ril[2]; - fj[0] += fil[0]; - fj[1] += fil[1]; - fj[2] += fil[2]; - fl[0] -= fil[0]; - fl[1] -= fil[1]; - fl[2] -= fil[2]; - rijmbr = rcmin[itype][jtype] / realrijmag; - fi[0] += rijmbr * (fil[0] - (realrij[0] * realrij[0] * fil[0] + realrij[0] * realrij[1] * fil[1] + realrij[0] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - fi[1] += rijmbr * (fil[1] - (realrij[1] * realrij[0] * fil[0] + realrij[1] * realrij[1] * fil[1] + realrij[1] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - fi[2] += rijmbr * (fil[2] - (realrij[2] * realrij[0] * fil[0] + realrij[2] * realrij[1] * fil[1] + realrij[2] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - fj[0] -= rijmbr * (fil[0] - (realrij[0] * realrij[0] * fil[0] + realrij[0] * realrij[1] * fil[1] + realrij[0] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - fj[1] -= rijmbr * (fil[1] - (realrij[1] * realrij[0] * fil[0] + realrij[1] * realrij[1] * fil[1] + realrij[1] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - fj[2] -= rijmbr * (fil[2] - (realrij[2] * realrij[0] * fil[0] + realrij[2] * realrij[1] * fil[1] + realrij[2] * realrij[2] * fil[2]) / (realrijmag * realrijmag)); - + fi[0] = -tmp2*dcosijldri[0]; + fi[1] = -tmp2*dcosijldri[1]; + fi[2] = -tmp2*dcosijldri[2]; + fj[0] = -tmp2*dcosijldrj[0]; + fj[1] = -tmp2*dcosijldrj[1]; + fj[2] = -tmp2*dcosijldrj[2]; + fl[0] = -tmp2*dcosijldrl[0]; + fl[1] = -tmp2*dcosijldrl[1]; + fl[2] = -tmp2*dcosijldrl[2]; + tmp2 = VA*.5*(tmp*wjl*g*exp(lamdaijl)*4.0*kronecker(jtype,1)); fj[0] += tmp2*(rjl[0]/rjlmag); fj[1] += tmp2*(rjl[1]/rjlmag); @@ -2275,6 +2268,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag fl[2] -= tmp2*(rjl[2]/rjlmag); // coordination forces + // dwik forces tmp2 = VA*.5*(tmp*dwjl*g*exp(lamdaijl))/rjlmag; @@ -2389,8 +2383,8 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag // piRC forces to J side - REBO_neighs = REBO_firstneigh[j]; - for (l = 0; l < REBO_numneigh[j]; l++) { + REBO_neighs = REBO_firstneigh[atomj]; + for (l = 0; l < REBO_numneigh[atomj]; l++) { atoml = REBO_neighs[l]; if (atoml != atomi) { ltype = map[type[atoml]]; @@ -2460,15 +2454,14 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag dN3[2] = dN3Tij[2]; atom2 = atomi; atom3 = atomj; - r32[0] = -rij[0]; - r32[1] = -rij[1]; - r32[2] = -rij[2]; - r23[0] = rij[0]; - r23[1] = rij[1]; - r23[2] = rij[2]; - r32mag = rijmag; - r23mag = rijmag; - + r32[0] = x[atom3][0]-x[atom2][0]; + r32[1] = x[atom3][1]-x[atom2][1]; + r32[2] = x[atom3][2]-x[atom2][2]; + r32mag = sqrt((r32[0]*r32[0])+(r32[1]*r32[1])+(r32[2]*r32[2])); + r23[0] = -r32[0]; + r23[1] = -r32[1]; + r23[2] = -r32[2]; + r23mag = r32mag; REBO_neighs_i = REBO_firstneigh[i]; for (k = 0; k < REBO_numneigh[i]; k++) { atomk = REBO_neighs_i[k]; @@ -2484,20 +2477,21 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag cos321 = MIN(cos321,1.0); cos321 = MAX(cos321,-1.0); sin321 = sqrt(1.0 - cos321*cos321); - if ((sin321 > TOL) && (r21mag > TOL)) { // XXX was sin321 != 0.0 sink2i = 1.0/(sin321*sin321); rik2i = 1.0/(r21mag*r21mag); rr = (rijmag*rijmag)-(r21mag*r21mag); - rjk[0] = r21[0]-rij[0]; - rjk[1] = r21[1]-rij[1]; - rjk[2] = r21[2]-rij[2]; + rjk[0] = r21[0]-r23[0]; + rjk[1] = r21[1]-r23[1]; + rjk[2] = r21[2]-r23[2]; rjk2 = (rjk[0]*rjk[0])+(rjk[1]*rjk[1])+(rjk[2]*rjk[2]); - rijrik = 2.0*rijmag*r21mag; + rijrik = 2.0*r23mag*r21mag; rik2 = r21mag*r21mag; dctik = (-rr+rjk2)/(rijrik*rik2); + dctij = (rr+rjk2)/(rijrik*r23mag*r23mag); dctjk = -2.0/rijrik; w21 = Sp(r21mag,rcmin[itype][ktype],rcmaxp[itype][ktype],dw21); + rijmag = r32mag; rikmag = r21mag; rij2 = r32mag*r32mag; rik2 = r21mag*r21mag; @@ -2515,8 +2509,8 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag r34[1] = x[atom3][1]-x[atom4][1]; r34[2] = x[atom3][2]-x[atom4][2]; r34mag = sqrt(r34[0]*r34[0] + r34[1]*r34[1] + r34[2]*r34[2]); - cos234 = -1.0*((rij[0]*r34[0])+(rij[1]*r34[1]) + - (rij[2]*r34[2]))/(rijmag*r34mag); + cos234 = (r32[0]*r34[0] + r32[1]*r34[1] + r32[2]*r34[2]) / + (r32mag*r34mag); cos234 = MIN(cos234,1.0); cos234 = MAX(cos234,-1.0); sin234 = sqrt(1.0 - cos234*cos234); @@ -2534,6 +2528,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag rijrjl = 2.0*r23mag*r34mag; rjl2 = r34mag*r34mag; dctjl = (-rr+ril2)/(rijrjl*rjl2); + dctji = (rr+ril2)/(rijrjl*r23mag*r23mag); dctil = -2.0/rijrjl; rjlmag = r34mag; rjl2 = r34mag*r34mag; @@ -2559,6 +2554,8 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag dt1djk = (-dctjk*sink2i*cos321); dt1djl = (rjl2i)-(dctjl*sinl2i*cos234); dt1dil = (-dctil*sinl2i*cos234); + dt1dij = (2.0/(r23mag*r23mag))-(dctij*sink2i*cos321) - + (dctji*sinl2i*cos234); dt2dik[0] = (-r23[2]*cross234[1])+(r23[1]*cross234[2]); dt2dik[1] = (-r23[0]*cross234[2])+(r23[2]*cross234[0]); @@ -2568,16 +2565,29 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag dt2djl[1] = (-r23[2]*cross321[0])+(r23[0]*cross321[2]); dt2djl[2] = (-r23[0]*cross321[1])+(r23[1]*cross321[0]); + dt2dij[0] = (r21[2]*cross234[1])-(r34[2]*cross321[1]) - + (r21[1]*cross234[2])+(r34[1]*cross321[2]); + dt2dij[1] = (r21[0]*cross234[2])-(r34[0]*cross321[2]) - + (r21[2]*cross234[0])+(r34[2]*cross321[0]); + dt2dij[2] = (r21[1]*cross234[0])-(r34[1]*cross321[0]) - + (r21[0]*cross234[1])+(r34[0]*cross321[1]); + aa = (prefactor*2.0*cw/cwnom)*w21*w34 * (1.0-tspjik)*(1.0-tspijl); aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34; at2 = aa*cwnum; + fcijpc = (-dt1dij*at2)+(aaa2*dtsjik*dctij*(1.0-tspijl)) + + (aaa2*dtsijl*dctji*(1.0-tspjik)); fcikpc = (-dt1dik*at2)+(aaa2*dtsjik*dctik*(1.0-tspijl)); fcjlpc = (-dt1djl*at2)+(aaa2*dtsijl*dctjl*(1.0-tspjik)); fcjkpc = (-dt1djk*at2)+(aaa2*dtsjik*dctjk*(1.0-tspijl)); fcilpc = (-dt1dil*at2)+(aaa2*dtsijl*dctil*(1.0-tspjik)); + F23[0] = (fcijpc*r23[0])+(aa*dt2dij[0]); + F23[1] = (fcijpc*r23[1])+(aa*dt2dij[1]); + F23[2] = (fcijpc*r23[2])+(aa*dt2dij[2]); + F12[0] = (fcikpc*r21[0])+(aa*dt2dik[0]); F12[1] = (fcikpc*r21[1])+(aa*dt2dik[1]); F12[2] = (fcikpc*r21[2])+(aa*dt2dik[2]); @@ -2597,31 +2607,16 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag f1[0] = -F12[0]-F31[0]; f1[1] = -F12[1]-F31[1]; f1[2] = -F12[2]-F31[2]; - f2[0] = F12[0]+F31[0]; - f2[1] = F12[1]+F31[1]; - f2[2] = F12[2]+F31[2]; - f3[0] = F34[0]+F24[0]; - f3[1] = F34[1]+F24[1]; - f3[2] = F34[2]+F24[2]; + f2[0] = F23[0]+F12[0]+F24[0]; + f2[1] = F23[1]+F12[1]+F24[1]; + f2[2] = F23[2]+F12[2]+F24[2]; + f3[0] = -F23[0]+F34[0]+F31[0]; + f3[1] = -F23[1]+F34[1]+F31[1]; + f3[2] = -F23[2]+F34[2]+F31[2]; f4[0] = -F34[0]-F24[0]; f4[1] = -F34[1]-F24[1]; f4[2] = -F34[2]-F24[2]; - rijmbr = rcmin[itype][jtype] / realrijmag; - f2[0] += rijmbr * (F24[0] - (realrij[0] * realrij[0] * F24[0] + realrij[0] * realrij[1] * F24[1] + realrij[0] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - f2[1] += rijmbr * (F24[1] - (realrij[1] * realrij[0] * F24[0] + realrij[1] * realrij[1] * F24[1] + realrij[1] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - f2[2] += rijmbr * (F24[2] - (realrij[2] * realrij[0] * F24[0] + realrij[2] * realrij[1] * F24[1] + realrij[2] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - f3[0] -= rijmbr * (F24[0] - (realrij[0] * realrij[0] * F24[0] + realrij[0] * realrij[1] * F24[1] + realrij[0] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - f3[1] -= rijmbr * (F24[1] - (realrij[1] * realrij[0] * F24[0] + realrij[1] * realrij[1] * F24[1] + realrij[1] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - f3[2] -= rijmbr * (F24[2] - (realrij[2] * realrij[0] * F24[0] + realrij[2] * realrij[1] * F24[1] + realrij[2] * realrij[2] * F24[2]) / (realrijmag * realrijmag)); - - f2[0] -= rijmbr * (F31[0] - (realrij[0] * realrij[0] * F31[0] + realrij[0] * realrij[1] * F31[1] + realrij[0] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - f2[1] -= rijmbr * (F31[1] - (realrij[1] * realrij[0] * F31[0] + realrij[1] * realrij[1] * F31[1] + realrij[1] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - f2[2] -= rijmbr * (F31[2] - (realrij[2] * realrij[0] * F31[0] + realrij[2] * realrij[1] * F31[1] + realrij[2] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - f3[0] += rijmbr * (F31[0] - (realrij[0] * realrij[0] * F31[0] + realrij[0] * realrij[1] * F31[1] + realrij[0] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - f3[1] += rijmbr * (F31[1] - (realrij[1] * realrij[0] * F31[0] + realrij[1] * realrij[1] * F31[1] + realrij[1] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - f3[2] += rijmbr * (F31[2] - (realrij[2] * realrij[0] * F31[0] + realrij[2] * realrij[1] * F31[1] + realrij[2] * realrij[2] * F31[2]) / (realrijmag * realrijmag)); - // coordination forces tmp2 = VA*Tij*((1.0-(om1234*om1234))) * -- GitLab From b720f391637b4a668e7d4b7447b7bbb82c43cd17 Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Wed, 5 Jul 2017 23:15:23 +0900 Subject: [PATCH 414/593] Restrictions Added --- doc/src/fix_wall_ees.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/src/fix_wall_ees.txt b/doc/src/fix_wall_ees.txt index 075f62efaf..5b08a22935 100644 --- a/doc/src/fix_wall_ees.txt +++ b/doc/src/fix_wall_ees.txt @@ -83,7 +83,14 @@ means you cannot start your simulation with particles touching the wall position {coord} (r = sigma_n) or with particles penetrating the wall (0 =< r < sigma_n) or with particles on the wrong side of the wall (r < 0).   -[Restrictions:] none +[Restrictions:] + +This fix is part of the USER-MISC package. It is only enabled if LAMMPS +was built with that package. See the "Making +LAMMPS"_Section_start.html#start_3 section for more info. + +This fix requires that atoms be ellipsoids as defined by the +"atom_style ellipsoid"_atom_style.html command. [Related commands:] -- GitLab From cbd8f997548f3114bf9fb18eeb24570e12b50539 Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Wed, 5 Jul 2017 23:15:27 +0900 Subject: [PATCH 415/593] Restrictions Added --- doc/src/fix_wall_region_ees.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/src/fix_wall_region_ees.txt b/doc/src/fix_wall_region_ees.txt index aafde5eb69..6171291bc0 100644 --- a/doc/src/fix_wall_region_ees.txt +++ b/doc/src/fix_wall_region_ees.txt @@ -19,8 +19,8 @@ epsilon = strength factor for wall-particle interaction (energy or energy/distan sigma = size factor for wall-particle interaction (distance units) cutoff = distance from wall at which wall-particle interaction is cut off (distance units) :ul -[Examples:]o -o +[Examples:] + fix wall all wall/region/ees mySphere 1.0 1.0 2.5 :pre [Description:] @@ -32,7 +32,14 @@ the EES potential introduced "fix wall/ees"_fix_wall_ees.html. Other details of this command is the same wiht "fix wall/region"_fix_wall_region.html command. One may also find and exapmle of using this code in USER/ees/ under examples/ directory. -[Restrictions:] none +[Restrictions:] + +This fix is part of the USER-MISC package. It is only enabled if LAMMPS +was built with that package. See the "Making +LAMMPS"_Section_start.html#start_3 section for more info. + +This fix requires that atoms be ellipsoids as defined by the +"atom_style ellipsoid"_atom_style.html command. [Related commands:] -- GitLab From 8e279d4ec84e6ace7879ef6f23b911c0b2f667bc Mon Sep 17 00:00:00 2001 From: Abdo Date: Wed, 5 Jul 2017 23:16:42 +0900 Subject: [PATCH 416/593] Examples moved --- examples/USER/{ => misc}/ees/Data_region | 0 examples/USER/{ => misc}/ees/Data_wall | 0 examples/USER/{ => misc}/ees/README | 0 examples/USER/{ => misc}/ees/in.fix_wall | 0 examples/USER/{ => misc}/ees/in.fix_wall_region | 0 src/USER-MISC/README | 2 ++ src/{MISC => USER-MISC}/fix_wall_ees.cpp | 0 src/{MISC => USER-MISC}/fix_wall_ees.h | 0 src/{MISC => USER-MISC}/fix_wall_region_ees.cpp | 0 src/{MISC => USER-MISC}/fix_wall_region_ees.h | 0 10 files changed, 2 insertions(+) rename examples/USER/{ => misc}/ees/Data_region (100%) rename examples/USER/{ => misc}/ees/Data_wall (100%) rename examples/USER/{ => misc}/ees/README (100%) rename examples/USER/{ => misc}/ees/in.fix_wall (100%) rename examples/USER/{ => misc}/ees/in.fix_wall_region (100%) rename src/{MISC => USER-MISC}/fix_wall_ees.cpp (100%) rename src/{MISC => USER-MISC}/fix_wall_ees.h (100%) rename src/{MISC => USER-MISC}/fix_wall_region_ees.cpp (100%) rename src/{MISC => USER-MISC}/fix_wall_region_ees.h (100%) diff --git a/examples/USER/ees/Data_region b/examples/USER/misc/ees/Data_region similarity index 100% rename from examples/USER/ees/Data_region rename to examples/USER/misc/ees/Data_region diff --git a/examples/USER/ees/Data_wall b/examples/USER/misc/ees/Data_wall similarity index 100% rename from examples/USER/ees/Data_wall rename to examples/USER/misc/ees/Data_wall diff --git a/examples/USER/ees/README b/examples/USER/misc/ees/README similarity index 100% rename from examples/USER/ees/README rename to examples/USER/misc/ees/README diff --git a/examples/USER/ees/in.fix_wall b/examples/USER/misc/ees/in.fix_wall similarity index 100% rename from examples/USER/ees/in.fix_wall rename to examples/USER/misc/ees/in.fix_wall diff --git a/examples/USER/ees/in.fix_wall_region b/examples/USER/misc/ees/in.fix_wall_region similarity index 100% rename from examples/USER/ees/in.fix_wall_region rename to examples/USER/misc/ees/in.fix_wall_region diff --git a/src/USER-MISC/README b/src/USER-MISC/README index 52ee6cad94..37f472af1c 100644 --- a/src/USER-MISC/README +++ b/src/USER-MISC/README @@ -48,6 +48,8 @@ fix pimd, Yuxing Peng (U Chicago), yuxing at uchicago.edu, 24 Nov 2014 fix smd, Axel Kohlmeyer, akohlmey at gmail.com, 19 May 2008 fix ti/spring, Rodrigo Freitas (Unicamp/Brazil), rodrigohb at gmail.com, 7 Nov 2013 fix ttm/mod, Sergey Starikov and Vasily Pisarev (JIHT), pisarevvv at gmail.com, 2 Feb 2015 +fix wall/ees, Abdoreza Ershadinia, a.ershadinia at gmail.com, Jul 2017 +wall/region/ees, Abdoreza Ershadinia, a.ershadinia at gmail.com, Jul 2017 improper_style cossq, Georgios Vogiatzis, gvog at chemeng.ntua.gr, 25 May 12 improper_style fourier, Loukas Peristeras, loukas.peristeras at scienomics.com, 27 Oct 12 improper_style ring, Georgios Vogiatzis, gvog at chemeng.ntua.gr, 25 May 12 diff --git a/src/MISC/fix_wall_ees.cpp b/src/USER-MISC/fix_wall_ees.cpp similarity index 100% rename from src/MISC/fix_wall_ees.cpp rename to src/USER-MISC/fix_wall_ees.cpp diff --git a/src/MISC/fix_wall_ees.h b/src/USER-MISC/fix_wall_ees.h similarity index 100% rename from src/MISC/fix_wall_ees.h rename to src/USER-MISC/fix_wall_ees.h diff --git a/src/MISC/fix_wall_region_ees.cpp b/src/USER-MISC/fix_wall_region_ees.cpp similarity index 100% rename from src/MISC/fix_wall_region_ees.cpp rename to src/USER-MISC/fix_wall_region_ees.cpp diff --git a/src/MISC/fix_wall_region_ees.h b/src/USER-MISC/fix_wall_region_ees.h similarity index 100% rename from src/MISC/fix_wall_region_ees.h rename to src/USER-MISC/fix_wall_region_ees.h -- GitLab From 92831f185b3f2a34001c55ac5f226a153f384188 Mon Sep 17 00:00:00 2001 From: Abdo Date: Wed, 5 Jul 2017 23:23:09 +0900 Subject: [PATCH 417/593] Merge branch 'master' of https://github.com/aershadinia/lammps --- doc/src/fix_wall_ees.txt | 11 +++++++++-- doc/src/fix_wall_region_ees.txt | 14 +++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/doc/src/fix_wall_ees.txt b/doc/src/fix_wall_ees.txt index 54511ffba7..5b08a22935 100644 --- a/doc/src/fix_wall_ees.txt +++ b/doc/src/fix_wall_ees.txt @@ -66,7 +66,7 @@ particle and wall no longer interact. Also,  sigma_n is the distance between c :c,image(JPG/fix_wall_ees_image.jpg)   -Details of using this command and specifications are the same as fix/wall command.  +Details of using this command and specifications are the same as fix/wall command. You can also find an example in USER/ees/ under examples/ directory.   The prefactor {epsilon} can be thought of as an effective Hamaker constant with energy units for the strength of the @@ -83,7 +83,14 @@ means you cannot start your simulation with particles touching the wall position {coord} (r = sigma_n) or with particles penetrating the wall (0 =< r < sigma_n) or with particles on the wrong side of the wall (r < 0).   -[Restrictions:] none +[Restrictions:] + +This fix is part of the USER-MISC package. It is only enabled if LAMMPS +was built with that package. See the "Making +LAMMPS"_Section_start.html#start_3 section for more info. + +This fix requires that atoms be ellipsoids as defined by the +"atom_style ellipsoid"_atom_style.html command. [Related commands:] diff --git a/doc/src/fix_wall_region_ees.txt b/doc/src/fix_wall_region_ees.txt index efb417add1..6171291bc0 100644 --- a/doc/src/fix_wall_region_ees.txt +++ b/doc/src/fix_wall_region_ees.txt @@ -19,8 +19,8 @@ epsilon = strength factor for wall-particle interaction (energy or energy/distan sigma = size factor for wall-particle interaction (distance units) cutoff = distance from wall at which wall-particle interaction is cut off (distance units) :ul -[Examples:]o -o +[Examples:] + fix wall all wall/region/ees mySphere 1.0 1.0 2.5 :pre [Description:] @@ -30,8 +30,16 @@ as a bounding wall which interacts with nearby ellipsoidal particles according t the EES potential introduced "fix wall/ees"_fix_wall_ees.html. Other details of this command is the same wiht "fix wall/region"_fix_wall_region.html command. +One may also find and exapmle of using this code in USER/ees/ under examples/ directory. + +[Restrictions:] + +This fix is part of the USER-MISC package. It is only enabled if LAMMPS +was built with that package. See the "Making +LAMMPS"_Section_start.html#start_3 section for more info. -[Restrictions:] none +This fix requires that atoms be ellipsoids as defined by the +"atom_style ellipsoid"_atom_style.html command. [Related commands:] -- GitLab From 9fa4588eb72096f35d6a9fac311a280625861929 Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Wed, 5 Jul 2017 23:46:48 +0900 Subject: [PATCH 418/593] fixed a typo --- src/USER-MISC/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-MISC/README b/src/USER-MISC/README index 37f472af1c..901338c562 100644 --- a/src/USER-MISC/README +++ b/src/USER-MISC/README @@ -49,7 +49,7 @@ fix smd, Axel Kohlmeyer, akohlmey at gmail.com, 19 May 2008 fix ti/spring, Rodrigo Freitas (Unicamp/Brazil), rodrigohb at gmail.com, 7 Nov 2013 fix ttm/mod, Sergey Starikov and Vasily Pisarev (JIHT), pisarevvv at gmail.com, 2 Feb 2015 fix wall/ees, Abdoreza Ershadinia, a.ershadinia at gmail.com, Jul 2017 -wall/region/ees, Abdoreza Ershadinia, a.ershadinia at gmail.com, Jul 2017 +fix wall/region/ees, Abdoreza Ershadinia, a.ershadinia at gmail.com, Jul 2017 improper_style cossq, Georgios Vogiatzis, gvog at chemeng.ntua.gr, 25 May 12 improper_style fourier, Loukas Peristeras, loukas.peristeras at scienomics.com, 27 Oct 12 improper_style ring, Georgios Vogiatzis, gvog at chemeng.ntua.gr, 25 May 12 -- GitLab From ea4f16bd79df5a09cd46bb598592f938a6de1bd2 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 5 Jul 2017 10:01:19 -0600 Subject: [PATCH 419/593] additional fix external hooks for calling programs --- doc/src/fix_msst.txt | 61 ++++-- src/SHOCK/fix_msst.cpp | 454 +++++++++++++++++++++++++++-------------- src/SHOCK/fix_msst.h | 53 +++-- src/fix_external.cpp | 55 ++++- src/fix_external.h | 4 + 5 files changed, 431 insertions(+), 196 deletions(-) diff --git a/doc/src/fix_msst.txt b/doc/src/fix_msst.txt index bd1edd805a..43f35d6880 100644 --- a/doc/src/fix_msst.txt +++ b/doc/src/fix_msst.txt @@ -17,19 +17,22 @@ msst = style name of this fix :l dir = {x} or {y} or {z} :l shockvel = shock velocity (strictly positive, distance/time units) :l zero or more keyword value pairs may be appended :l -keyword = {q} or {mu} or {p0} or {v0} or {e0} or {tscale} :l +keyword = {q} or {mu} or {p0} or {v0} or {e0} or {tscale} or {beta} or {dftb} :l {q} value = cell mass-like parameter (mass^2/distance^4 units) {mu} value = artificial viscosity (mass/length/time units) {p0} value = initial pressure in the shock equations (pressure units) {v0} value = initial simulation cell volume in the shock equations (distance^3 units) {e0} value = initial total energy (energy units) - {tscale} value = reduction in initial temperature (unitless fraction between 0.0 and 1.0) :pre + {tscale} value = reduction in initial temperature (unitless fraction between 0.0 and 1.0) + {dftb} value = {yes} or {no} for whether using MSST in conjunction with DFTB+ + {beta} value = scale factor on energy contribution of DFTB+ :pre :ule [Examples:] fix 1 all msst y 100.0 q 1.0e5 mu 1.0e5 -fix 2 all msst z 50.0 q 1.0e4 mu 1.0e4 v0 4.3419e+03 p0 3.7797e+03 e0 -9.72360e+02 tscale 0.01 :pre +fix 2 all msst z 50.0 q 1.0e4 mu 1.0e4 v0 4.3419e+03 p0 3.7797e+03 e0 -9.72360e+02 tscale 0.01 +fix 1 all msst y 100.0 q 1.0e5 mu 1.0e5 dftb yes beta 0.5 :pre [Description:] @@ -58,11 +61,11 @@ oscillations have physical significance in some cases. The optional symmetry to equilibrate to the shock Hugoniot and Rayleigh line more rapidly in such cases. -{tscale} is a factor between 0 and 1 that determines what fraction of -thermal kinetic energy is converted to compressive strain kinetic -energy at the start of the simulation. Setting this parameter to a -non-zero value may assist in compression at the start of simulations -where it is slow to occur. +The keyword {tscale} is a factor between 0 and 1 that determines what +fraction of thermal kinetic energy is converted to compressive strain +kinetic energy at the start of the simulation. Setting this parameter +to a non-zero value may assist in compression at the start of +simulations where it is slow to occur. If keywords {e0}, {p0},or {v0} are not supplied, these quantities will be calculated on the first step, after the energy specified by @@ -77,17 +80,40 @@ For all pressure styles, the simulation box stays orthogonal in shape. Parrinello-Rahman boundary conditions (tilted box) are supported by LAMMPS, but are not implemented for MSST. -This fix computes a temperature and pressure each timestep. To do -this, the fix creates its own computes of style "temp" and "pressure", -as if these commands had been issued: +This fix computes a temperature and pressure and potential energy each +timestep. To do this, the fix creates its own computes of style "temp" +"pressure", and "pe", as if these commands had been issued: -compute fix-ID_temp group-ID temp -compute fix-ID_press group-ID pressure fix-ID_temp :pre +compute fix-ID_MSST_temp all temp +compute fix-ID_MSST_press all pressure fix-ID_MSST_temp :pre +compute fix-ID_MSST_pe all pe :pre See the "compute temp"_compute_temp.html and "compute pressure"_compute_pressure.html commands for details. Note that the -IDs of the new computes are the fix-ID + underscore + "temp" or fix_ID -+ underscore + "press". The group for the new computes is "all". +IDs of the new computes are the fix-ID + "_MSST_temp" or "_MSST_press" +or "_MSST_pe". The group for the new computes is "all". + +:line + +The {dftb} and {beta} keywords are to allow this fix to be used when +LAMMPS is being driven by DFTB+, a density-functional tight-binding +code. + +If the keyword {dftb} is used with a value of {yes}, then the MSST +equations are altered to account for an energy contribution compute by +DFTB+. In this case, you must define a "fix +external"_fix_external.html command in your input script, which is +used to callback to DFTB+ during the LAMMPS timestepping. DFTB+ will +communicate its info to LAMMPS via that fix. + +The keyword {beta} is a scale factor on the DFTB+ energy contribution. +The value of {beta} must be between 0.0 and 1.0 inclusive. A value of +0.0 means no contribution, a value of 1.0 means a full contribution. + +(July 2017) More information about these keywords and the use of +LAMMPS with DFTB+ will be added to the LAMMMPS documention soon. + +:line [Restart, fix_modify, output, run start/stop, minimize info:] @@ -149,8 +175,9 @@ all. [Default:] -The keyword defaults are q = 10, mu = 0, tscale = 0.01. p0, v0, and e0 -are calculated on the first step. +The keyword defaults are q = 10, mu = 0, tscale = 0.01, dftb = no, +beta = 0.0. Note that p0, v0, and e0 are calculated on the first +timestep. :line diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index c514a9f086..c710bdb77f 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -13,8 +13,8 @@ /* ---------------------------------------------------------------------- Contributing authors: Laurence Fried (LLNL), Evan Reed (LLNL, Stanford) - implementation of the Multi-Scale Shock Method - See Reed, Fried, Joannopoulos, Phys Rev Lett, 90, 235503 (2003) + implementation of the Multi-Scale Shock Method + see Reed, Fried, Joannopoulos, Phys Rev Lett, 90, 235503 (2003) ------------------------------------------------------------------------- */ #include @@ -26,13 +26,15 @@ #include "comm.h" #include "output.h" #include "modify.h" +#include "fix_external.h" #include "compute.h" #include "kspace.h" #include "update.h" #include "respa.h" #include "domain.h" -#include "error.h" #include "thermo.h" +#include "memory.h" +#include "error.h" using namespace LAMMPS_NS; using namespace FixConst; @@ -42,7 +44,7 @@ using namespace FixConst; FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), old_velocity(NULL), rfix(NULL), id_temp(NULL), id_press(NULL), id_pe(NULL), temperature(NULL), - pressure(NULL), pe(NULL), atoms_allocated(0) + pressure(NULL), pe(NULL) { if (narg < 4) error->all(FLERR,"Illegal fix msst command"); @@ -63,6 +65,11 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : p0 = 0.0; v0 = 1.0; e0 = 0.0; + TS_int = 0; + T0S0 = 0.0; + S_elec = 0.0; + S_elec_1 = 0.0; + S_elec_2 = 0.0; qmass = 1.0e1; mu = 0.0; @@ -71,48 +78,67 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : v0_set = 0; e0_set = 0; tscale = 0.01; + dftb = 0; + beta = 0.0; - if ( strcmp(arg[3],"x") == 0 ) - direction = 0; - else if ( strcmp(arg[3],"y") == 0 ) - direction = 1; - else if ( strcmp(arg[3],"z") == 0 ) - direction = 2; - else { - error->all(FLERR,"Illegal fix msst command"); - } + if (strcmp(arg[3],"x") == 0) direction = 0; + else if (strcmp(arg[3],"y") == 0) direction = 1; + else if (strcmp(arg[3],"z") == 0) direction = 2; + else error->all(FLERR,"Illegal fix msst command"); velocity = force->numeric(FLERR,arg[4]); - if ( velocity < 0 ) - error->all(FLERR,"Illegal fix msst command"); + if (velocity < 0) error->all(FLERR,"Illegal fix msst command"); - for ( int iarg = 5; iarg < narg; iarg++ ) { - if ( strcmp(arg[iarg],"q") == 0 ) { + // optional args + + int iarg = 5; + while (iarg < narg) { + if (strcmp(arg[iarg],"q") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix msst command"); qmass = force->numeric(FLERR,arg[iarg+1]); - iarg++; - } else if ( strcmp(arg[iarg],"mu") == 0 ) { + iarg += 2; + } else if (strcmp(arg[iarg],"mu") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix msst command"); mu = force->numeric(FLERR,arg[iarg+1]); - iarg++; - } else if ( strcmp(arg[iarg],"p0") == 0 ) { + iarg += 2; + } else if (strcmp(arg[iarg],"p0") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix msst command"); p0 = force->numeric(FLERR,arg[iarg+1]); - iarg++; p0_set = 1; - } else if ( strcmp(arg[iarg],"v0") == 0 ) { + iarg += 2; + } else if (strcmp(arg[iarg],"v0") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix msst command"); v0 = force->numeric(FLERR,arg[iarg+1]); v0_set = 1; - iarg++; - } else if ( strcmp(arg[iarg],"e0") == 0 ) { + iarg += 2; + } else if (strcmp(arg[iarg],"e0") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix msst command"); e0 = force->numeric(FLERR,arg[iarg+1]); e0_set = 1; - iarg++; - } else if ( strcmp(arg[iarg],"tscale") == 0 ) { + iarg += 2; + } else if (strcmp(arg[iarg],"tscale") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix msst command"); tscale = force->numeric(FLERR,arg[iarg+1]); if (tscale < 0.0 || tscale > 1.0) error->all(FLERR,"Fix msst tscale must satisfy 0 <= tscale < 1"); - iarg++; + iarg += 2; + } else if (strcmp(arg[iarg],"dftb") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix msst command"); + if (strcmp(arg[iarg+1],"yes") == 0) dftb = 1; + else if (strcmp(arg[iarg+1],"yes") == 0) dftb = 0; + else error->all(FLERR,"Illegal fix msst command"); + iarg += 2; + } else if (strcmp(arg[iarg],"beta") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix msst command"); + beta = force->numeric(FLERR,arg[iarg+1]); + if (beta < 0.0 || beta > 1.0) + error->all(FLERR,"Illegal fix msst command"); + iarg += 2; } else error->all(FLERR,"Illegal fix msst command"); } + // output MSST info + if (comm->me == 0) { if (screen) { fprintf(screen,"MSST parameters:\n"); @@ -166,15 +192,15 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : if (domain->nonperiodic) error->all(FLERR,"Fix msst requires a periodic box"); - // create a new compute temp style - // id = fix-ID + temp + // create a new temperature compute + // id = fix-ID + "MSST_temp" // compute group = all since pressure is always global (group all) // and thus its KE/temperature contribution should use group all - int n = strlen(id) + 6; + int n = strlen(id) + 10; id_temp = new char[n]; strcpy(id_temp,id); - strcat(id_temp,"_temp"); + strcat(id_temp,"MSST_temp"); char **newarg = new char*[3]; newarg[0] = id_temp; @@ -184,14 +210,14 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : delete [] newarg; tflag = 1; - // create a new compute pressure style - // id = fix-ID + press, compute group = all + // create a new pressure compute + // id = fix-ID + "MSST_press", compute group = all // pass id_temp as 4th arg to pressure constructor - n = strlen(id) + 7; + n = strlen(id) + 11; id_press = new char[n]; strcpy(id_press,id); - strcat(id_press,"_press"); + strcat(id_press,"MSST_press"); newarg = new char*[4]; newarg[0] = id_press; @@ -202,33 +228,30 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : delete [] newarg; pflag = 1; - // create a new compute potential energy compute + // create a new potential energy compute + // id = fix-ID + "MSST_pe", compute group = all - n = strlen(id) + 4; + n = strlen(id) + 8; id_pe = new char[n]; strcpy(id_pe,id); - strcat(id_pe,"_pe"); + strcat(id_pe,"MSST_pe"); newarg = new char*[3]; newarg[0] = id_pe; - newarg[1] = (char*)"all"; - newarg[2] = (char*)"pe"; + newarg[1] = (char*) "all"; + newarg[2] = (char*) "pe"; modify->add_compute(3,newarg); delete [] newarg; peflag = 1; - // initialize the time derivative of the volume. - omega[0] = omega[1] = omega[2] = 0.0; + // initialize the time derivative of the volume + omega[0] = omega[1] = omega[2] = 0.0; nrigid = 0; rfix = NULL; - old_velocity = new double* [atom->nlocal]; - for ( int j = 0; j < atom->nlocal; j++ ) { - old_velocity[j] = new double [3]; - } - atoms_allocated = atom->nlocal; - + maxold = 0; + old_velocity = NULL; } /* ---------------------------------------------------------------------- */ @@ -247,11 +270,7 @@ FixMSST::~FixMSST() delete [] id_press; delete [] id_pe; - for ( int j = 0; j < atoms_allocated; j++ ) { - delete [] old_velocity[j]; - } - delete [] old_velocity; - + memory->destroy(old_velocity); } /* ---------------------------------------------------------------------- */ @@ -323,6 +342,15 @@ void FixMSST::init() strcmp(modify->fix[i]->style,"poems") == 0) rfix[nrigid++] = i; } + // find fix external being used to drive LAMMPS from DFTB+ + + if (dftb) { + for (int i = 0; i < modify->nfix; i++) + if (strcmp(modify->fix[i]->style,"external") == 0) + fix_external = (FixExternal *) modify->fix[i]; + if (fix_external == NULL) + error->all(FLERR,"Fix msst dftb cannot be used w/out fix external"); + } } /* ---------------------------------------------------------------------- @@ -415,10 +443,10 @@ void FixMSST::setup(int vflag) void FixMSST::initial_integrate(int vflag) { - int sd; - double p_msst; // MSST driving pressure. - int i, k; - double vol; + int i,k; + double p_msst; // MSST driving pressure + double vol,TS,TS_term,escale_term; + int nlocal = atom->nlocal; int *mask = atom->mask; double **v = atom->v; @@ -426,21 +454,51 @@ void FixMSST::initial_integrate(int vflag) double *mass = atom->mass; int *type = atom->type; double **x = atom->x; + int sd = direction; - // check to see if old_velocity is correctly allocated + // realloc old_velocity if necessary - check_alloc(nlocal); + if (nlocal > maxold) { + memory->destroy(old_velocity); + maxold = atom->nmax; + memory->create(old_velocity,maxold,3,"msst:old_velocity"); + } - sd = direction; + // for DFTB, extract TS_dftb from fix external + // must convert energy to mv^2 units + + if (dftb) { + TS_dftb = fix_external->compute_vector(1); + TS = force->ftm2v*TS_dftb; + if (update->ntimestep == 1) T0S0 = TS; + } else { + TS = 0.0; + T0S0 = 0.0; + } + + // compute new pressure and volume - // compute new pressure and volume. temperature->compute_vector(); pressure->compute_vector(); couple(); vol = compute_vol(); + // update S_elec terms and compute TS_dot via finite differences + + S_elec_2 = S_elec_1; + S_elec_1 = S_elec; + double Temp = temperature->compute_scalar(); + S_elec = TS/Temp; + TS_dot = Temp*(3.0*S_elec-4.0*S_elec_1+S_elec_2)/(2.0*update->dt); + TS_int += (update->dt*TS_dot); + //TS_int += (update->dt*TS_dot)/total_mass; + + // compute etot + extra terms for conserved quantity + + double e_scale = compute_etotal() + compute_scalar(); + // propagate the time derivative of - // the volume 1/2 step at fixed vol, r, rdot. + // the volume 1/2 step at fixed vol, r, rdot p_msst = nktv2p * mvv2e * velocity * velocity * total_mass * ( v0 - vol)/( v0 * v0); @@ -448,13 +506,11 @@ void FixMSST::initial_integrate(int vflag) (qmass * nktv2p * mvv2e); double B = total_mass * mu / ( qmass * vol ); - // prevent blow-up of the volume. + // prevent blow-up of the volume - if ( vol > v0 && A > 0.0 ) { - A = -A; - } + if (vol > v0 && A > 0.0) A = -A; - // use taylor expansion to avoid singularity at B == 0. + // use Taylor expansion to avoid singularity at B = 0 if ( B * dthalf > 1.0e-06 ) { omega[sd] = ( omega[sd] + A * ( exp(B * dthalf) - 1.0 ) / B ) @@ -465,73 +521,124 @@ void FixMSST::initial_integrate(int vflag) } // propagate velocity sum 1/2 step by - // temporarily propagating the velocities. + // temporarily propagating the velocities velocity_sum = compute_vsum(); - for (i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) { - for ( k = 0; k < 3; k++ ) { - double C = f[i][k] * force->ftm2v / mass[type[i]]; - double D = mu * omega[sd] * omega[sd] / - (velocity_sum * mass[type[i]] * vol ); - old_velocity[i][k] = v[i][k]; - if ( k == direction ) { - D = D - 2.0 * omega[sd] / vol; + + if (dftb) { + for (i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + for ( k = 0; k < 3; k++ ) { + double C = f[i][k] * force->ftm2v / mass[type[i]]; + TS_term = TS_dot/(mass[type[i]]*velocity_sum); + escale_term = force->ftm2v*beta*(e0-e_scale) / + (mass[type[i]]*velocity_sum); + double D = mu * omega[sd] * omega[sd] / + (velocity_sum * mass[type[i]] * vol ); + D += escale_term - TS_term; + old_velocity[i][k] = v[i][k]; + if ( k == direction ) D -= 2.0 * omega[sd] / vol; + if ( fabs(dthalf * D) > 1.0e-06 ) { + double expd = exp(D * dthalf); + v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; + } else { + v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + + 0.5 * (D * D * v[i][k] + C * D ) * dthalf * dthalf; + } } - if ( fabs(dthalf * D) > 1.0e-06 ) { - double expd = exp(D * dthalf); - v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; - } else { - v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + - 0.5 * (D * D * v[i][k] + C * D ) * dthalf * dthalf; + } + } + } else { + for (i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + for ( k = 0; k < 3; k++ ) { + double C = f[i][k] * force->ftm2v / mass[type[i]]; + double D = mu * omega[sd] * omega[sd] / + (velocity_sum * mass[type[i]] * vol ); + old_velocity[i][k] = v[i][k]; + if ( k == direction ) { + D = D - 2.0 * omega[sd] / vol; + } + if ( fabs(dthalf * D) > 1.0e-06 ) { + double expd = exp(D * dthalf); + v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; + } else { + v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + + 0.5 * (D * D * v[i][k] + C * D ) * dthalf * dthalf; + } } } } } + velocity_sum = compute_vsum(); - // reset the velocities. + // reset the velocities for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { - for ( k = 0; k < 3; k++ ) { - v[i][k] = old_velocity[i][k]; - } + v[i][0] = old_velocity[i][0]; + v[i][1] = old_velocity[i][1]; + v[i][2] = old_velocity[i][2]; } } - // propagate velocities 1/2 step using the new velocity sum. + // propagate velocities 1/2 step using the new velocity sum - for (i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) { - for ( k = 0; k < 3; k++ ) { - double C = f[i][k] * force->ftm2v / mass[type[i]]; - double D = mu * omega[sd] * omega[sd] / - (velocity_sum * mass[type[i]] * vol ); - if ( k == direction ) { - D = D - 2.0 * omega[sd] / vol; + if (dftb) { + for (i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + for ( k = 0; k < 3; k++ ) { + double C = f[i][k] * force->ftm2v / mass[type[i]]; + TS_term = TS_dot/(mass[type[i]]*velocity_sum); + escale_term = force->ftm2v*beta*(e0-e_scale) / + (mass[type[i]]*velocity_sum); + double D = mu * omega[sd] * omega[sd] / + (velocity_sum * mass[type[i]] * vol ); + D += escale_term - TS_term; + if ( k == direction ) D -= 2.0 * omega[sd] / vol; + if ( fabs(dthalf * D) > 1.0e-06 ) { + double expd = exp(D * dthalf); + v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; + } else { + v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + + 0.5 * (D * D * v[i][k] + C * D ) * dthalf * dthalf; + } } - if ( fabs(dthalf * D) > 1.0e-06 ) { - double expd = exp(D * dthalf); - v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; - } else { - v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + - 0.5 * (D * D * v[i][k] + C * D ) * dthalf * dthalf; + } + } + } else { + for (i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + for ( k = 0; k < 3; k++ ) { + double C = f[i][k] * force->ftm2v / mass[type[i]]; + double D = mu * omega[sd] * omega[sd] / + (velocity_sum * mass[type[i]] * vol ); + if ( k == direction ) { + D = D - 2.0 * omega[sd] / vol; + } + if ( fabs(dthalf * D) > 1.0e-06 ) { + double expd = exp(D * dthalf); + v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; + } else { + v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + + 0.5 * (D * D * v[i][k] + C * D ) * dthalf * dthalf; + } } } } } - // propagate the volume 1/2 step. + // propagate the volume 1/2 step double vol1 = vol + omega[sd] * dthalf; - // rescale positions and change box size. + // rescale positions and change box size dilation[sd] = vol1/vol; remap(0); - // propagate particle positions 1 time step. + // propagate particle positions 1 time step for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -541,11 +648,11 @@ void FixMSST::initial_integrate(int vflag) } } - // propagate the volume 1/2 step. + // propagate the volume 1/2 step double vol2 = vol1 + omega[sd] * dthalf; - // rescale positions and change box size. + // rescale positions and change box size dilation[sd] = vol2/vol1; remap(0); @@ -560,6 +667,8 @@ void FixMSST::initial_integrate(int vflag) void FixMSST::final_integrate() { int i; + double p_msst; // MSST driving pressure + double TS,TS_term,escale_term; // v update only for atoms in MSST group @@ -570,32 +679,68 @@ void FixMSST::final_integrate() int *mask = atom->mask; int nlocal = atom->nlocal; double vol = compute_vol(); - double p_msst; + int sd = direction; - // propagate particle velocities 1/2 step. + // for DFTB, extract TS_dftb from fix external + // must convert energy to mv^2 units - for (i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) { - for ( int k = 0; k < 3; k++ ) { - double C = f[i][k] * force->ftm2v / mass[type[i]]; - double D = mu * omega[sd] * omega[sd] / - (velocity_sum * mass[type[i]] * vol ); - if ( k == direction ) { - D = D - 2.0 * omega[sd] / vol; + if (dftb) { + TS_dftb = fix_external->compute_vector(1); + TS = force->ftm2v*TS_dftb; + } else TS = 0.0; + + // compute etot + extra terms for conserved quantity + + double e_scale = compute_etotal() + compute_scalar(); + + // propagate particle velocities 1/2 step + + if (dftb) { + for (i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + for ( int k = 0; k < 3; k++ ) { + double C = f[i][k] * force->ftm2v / mass[type[i]]; + TS_term = TS_dot/(mass[type[i]]*velocity_sum); + escale_term = force->ftm2v*beta*(e0-e_scale) / + (mass[type[i]]*velocity_sum); + double D = mu * omega[sd] * omega[sd] / + (velocity_sum * mass[type[i]] * vol ); + D += escale_term - TS_term; + if ( k == direction ) D -= 2.0 * omega[sd] / vol; + if ( fabs(dthalf * D) > 1.0e-06 ) { + double expd = exp(D * dthalf); + v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; + } else { + v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + + 0.5 * (D * D * v[i][k] + C * D ) * dthalf * dthalf; + } } - if ( fabs(dthalf * D) > 1.0e-06 ) { - double expd = exp(D * dthalf); - v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; - } else { - v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + - 0.5 * (D * D * v[i][k] + C * D ) * dthalf * dthalf; + } + } + } else { + for (i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + for ( int k = 0; k < 3; k++ ) { + double C = f[i][k] * force->ftm2v / mass[type[i]]; + double D = mu * omega[sd] * omega[sd] / + (velocity_sum * mass[type[i]] * vol ); + if ( k == direction ) { + D = D - 2.0 * omega[sd] / vol; + } + if ( fabs(dthalf * D) > 1.0e-06 ) { + double expd = exp(D * dthalf); + v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; + } else { + v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + + 0.5 * (D * D * v[i][k] + C * D ) * dthalf * dthalf; + } } } } } - // compute new pressure and volume. + // compute new pressure and volume temperature->compute_vector(); @@ -604,7 +749,7 @@ void FixMSST::final_integrate() velocity_sum = compute_vsum(); vol = compute_vol(); - // propagate the time derivative of the volume 1/2 step at fixed V, r, rdot. + // propagate the time derivative of the volume 1/2 step at fixed V, r, rdot p_msst = nktv2p * mvv2e * velocity * velocity * total_mass * ( v0 - vol )/( v0 * v0 ); @@ -612,11 +757,9 @@ void FixMSST::final_integrate() ( qmass * nktv2p * mvv2e ); double B = total_mass * mu / ( qmass * vol ); - // prevent blow-up of the volume. + // prevent blow-up of the volume - if ( vol > v0 && A > 0.0 ) { - A = -A; - } + if ( vol > v0 && A > 0.0 ) A = -A; // use taylor expansion to avoid singularity at B == 0. @@ -632,8 +775,9 @@ void FixMSST::final_integrate() lagrangian_position -= velocity*vol/v0*update->dt; - // trigger virial computation on next timestep + // trigger energy and virial computation on next timestep + pe->addstep(update->ntimestep+1); pressure->addstep(update->ntimestep+1); } @@ -707,11 +851,12 @@ void FixMSST::remap(int flag) void FixMSST::write_restart(FILE *fp) { int n = 0; - double list[4]; + double list[5]; list[n++] = omega[direction]; list[n++] = e0; list[n++] = v0; list[n++] = p0; + list[n++] = TS_int; if (comm->me == 0) { int size = n * sizeof(double); fwrite(&size,sizeof(int),1,fp); @@ -730,7 +875,9 @@ void FixMSST::restart(char *buf) omega[direction] = list[n++]; e0 = list[n++]; v0 = list[n++]; - p0 = list[n++]; + p0 = list[n++]; + TS_int = list[n++]; + tscale = 0.0; // set tscale to zero for restart p0_set = 1; v0_set = 1; e0_set = 1; @@ -752,11 +899,13 @@ int FixMSST::modify_param(int narg, char **arg) strcpy(id_temp,arg[1]); int icompute = modify->find_compute(id_temp); - if (icompute < 0) error->all(FLERR,"Could not find fix_modify temperature ID"); + if (icompute < 0) + error->all(FLERR,"Could not find fix_modify temperature ID"); temperature = modify->compute[icompute]; if (temperature->tempflag == 0) - error->all(FLERR,"Fix_modify temperature ID does not compute temperature"); + error->all(FLERR,"Fix_modify temperature ID does not " + "compute temperature"); if (temperature->igroup != 0 && comm->me == 0) error->warning(FLERR,"Temperature for MSST is not for group all"); @@ -806,6 +955,10 @@ double FixMSST::compute_scalar() (1.0 - volume/ v0) * mvv2e; energy -= p0 * ( v0 - volume ) / nktv2p; + // subtract off precomputed TS_int integral value + + energy -= TS_int; + return energy; } @@ -920,25 +1073,7 @@ double FixMSST::compute_vol() return domain->xprd * domain->yprd; } -/* ---------------------------------------------------------------------- - Checks to see if the allocated size of old_velocity is >= n - The number of local atoms can change during a parallel run. -------------------------------------------------------------------------- */ - -void FixMSST::check_alloc(int n) -{ - if ( atoms_allocated < n ) { - for ( int j = 0; j < atoms_allocated; j++ ) { - delete [] old_velocity[j]; - } - delete [] old_velocity; - - old_velocity = new double* [n]; - for ( int j = 0; j < n; j++ ) - old_velocity[j] = new double [3]; - atoms_allocated = n; - } -} +/* ---------------------------------------------------------------------- */ double FixMSST::compute_vsum() { @@ -959,3 +1094,14 @@ double FixMSST::compute_vsum() MPI_Allreduce(&t,&vsum,1,MPI_DOUBLE,MPI_SUM,world); return vsum; } + +/* ---------------------------------------------------------------------- + memory usage of local atom-based array +------------------------------------------------------------------------- */ + +double FixMSST::memory_usage() +{ + double bytes = 3*atom->nmax * sizeof(double); + return bytes; +} + diff --git a/src/SHOCK/fix_msst.h b/src/SHOCK/fix_msst.h index e44c34dde3..450256bcab 100644 --- a/src/SHOCK/fix_msst.h +++ b/src/SHOCK/fix_msst.h @@ -10,10 +10,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -/* Implementation of the Multi-Scale Shock Method. - See Reed, Fried, Joannopoulos, Phys. Rev. Lett., 90, 235503(2003). - Implementation by Laurence Fried, LLNL, 4/2007. -*/ #ifdef FIX_CLASS @@ -42,55 +38,68 @@ class FixMSST : public Fix { void write_restart(FILE *); void restart(char *); int modify_param(int, char **); + double memory_usage(); private: - double dtv,dtf,dthalf; // Full and half step sizes. - double boltz,nktv2p, mvv2e; // Boltzmann factor and unit conversions. - double total_mass; // Mass of the computational cell. + double dtv,dtf,dthalf; // Full and half step sizes + double boltz,nktv2p, mvv2e; // Boltzmann factor and unit conversions + double total_mass; // Mass of the computational cell - double omega[3]; // Time derivative of the volume. + double omega[3]; // Time derivative of the volume double p_current[3],dilation[3]; - double qmass; // Effective cell mass. - double mu; // Effective cell viscosity. + double qmass; // Effective cell mass + double mu; // Effective cell viscosity double tscale; // Converts thermal energy to compressive // strain ke at simulation start + int dftb; // flag for use with DFTB+ - double velocity_sum; // Sum of the velocities squared. + double velocity_sum; // Sum of the velocities squared + double damping; // Damping function for TS force term at + // small volume difference (v0 - vol) + double T0S0; // Initial TS term for DFTB+ simulations + double S_elec,S_elec_1,S_elec_2; // time history of electron entropy + // for DFTB+ simulaitons + double TS_dot; // time derivative of TS term for + // DFTB+ simulations - double **old_velocity; // Saved velocities. + double **old_velocity; // Saved velocities int kspace_flag; // 1 if KSpace invoked, 0 if not int nrigid; // number of rigid fixes int *rfix; // indices of rigid fixes char *id_temp,*id_press; // Strings with identifiers of - char *id_pe; // created computes. + char *id_pe; // created computes class Compute *temperature; // Computes created to evaluate - class Compute *pressure; // thermodynamic quantities. + class Compute *pressure; // thermodynamic quantities class Compute *pe; int tflag,pflag,vsflag,peflag; // Flags to keep track of computes that - // were created. + // were created - // shock initial conditions. + // shock initial conditions double e0; // Initial energy double v0; // Initial volume double p0; // Initial pressure - double velocity; // Velocity of the shock. + double velocity; // Velocity of the shock double lagrangian_position; // Lagrangian location of computational cell int direction; // Direction of shock - int p0_set; // Is pressure set. - int v0_set; // Is volume set. - int e0_set; // Is energy set. + int p0_set; // Is pressure set + int v0_set; // Is volume set + int e0_set; // Is energy set + double TS_int; // Needed for conserved quantity + // with thermal electronic excitations + double beta; // Energy conservation scaling factor - int atoms_allocated; // The number of allocated atoms in old_velocity. + int maxold; // allocated size of old_velocity + double TS_dftb; // value needed from DFTB+ via fix external + class FixExternal *fix_external; // ptr to fix external // functions void couple(); void remap(int); - void check_alloc(int n); double compute_etotal(); double compute_vol(); double compute_hugoniot(); diff --git a/src/fix_external.cpp b/src/fix_external.cpp index 40e538c6c6..85523b912c 100644 --- a/src/fix_external.cpp +++ b/src/fix_external.cpp @@ -30,7 +30,7 @@ enum{PF_CALLBACK,PF_ARRAY}; FixExternal::FixExternal(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), - fexternal(NULL) + fexternal(NULL), caller_vector(NULL) { if (narg < 4) error->all(FLERR,"Illegal fix external command"); @@ -62,6 +62,11 @@ FixExternal::FixExternal(LAMMPS *lmp, int narg, char **arg) : atom->add_callback(0); user_energy = 0.0; + + // optional vector of values provided by caller + // vector_flag and size_vector are setup via set_vector_length() + + caller_vector = NULL; } /* ---------------------------------------------------------------------- */ @@ -73,6 +78,7 @@ FixExternal::~FixExternal() atom->delete_callback(id,0); memory->destroy(fexternal); + delete [] caller_vector; } /* ---------------------------------------------------------------------- */ @@ -167,10 +173,15 @@ void FixExternal::min_post_force(int vflag) post_force(vflag); } +// ---------------------------------------------------------------------- +// "set" methods caller can invoke directly +// ---------------------------------------------------------------------- + /* ---------------------------------------------------------------------- caller invokes this method to set its contribution to global energy - do not just return if eflag_global is not set - input script could access this quantity via compute_scalar() + unlike other energy/virial set methods: + do not just return if eflag_global is not set + b/c input script could access this quantity via compute_scalar() even if eflag is not set on a particular timestep ------------------------------------------------------------------------- */ @@ -220,6 +231,34 @@ void FixExternal::set_virial_peratom(double **caller_virial) vatom[i][j] = caller_virial[i][j]; } +/* ---------------------------------------------------------------------- + caller invokes this method to set length of vector of values + assume all vector values are extensive, could make this an option +------------------------------------------------------------------------- */ + +void FixExternal::set_vector_length(int n) +{ + delete [] caller_vector; + + vector_flag = 1; + size_vector = n; + extvector = 1; + + caller_vector = new double[n]; +} + +/* ---------------------------------------------------------------------- + caller invokes this method to set Index value in vector + index ranges from 1 to N inclusive +------------------------------------------------------------------------- */ + +void FixExternal::set_vector(int index, double value) +{ + if (index >= size_vector) + error->all(FLERR,"Invalid set_vector index in fix external"); + caller_vector[index-1] = value; +} + /* ---------------------------------------------------------------------- potential energy of added force up to user to set it via set_energy() @@ -230,6 +269,16 @@ double FixExternal::compute_scalar() return user_energy; } +/* ---------------------------------------------------------------------- + arbitrary value computed by caller + up to user to set it via set_vector() +------------------------------------------------------------------------- */ + +double FixExternal::compute_vector(int n) +{ + return caller_vector[n]; +} + /* ---------------------------------------------------------------------- memory usage of local atom-based array ------------------------------------------------------------------------- */ diff --git a/src/fix_external.h b/src/fix_external.h index b5f6d7ae15..1e9e78365f 100644 --- a/src/fix_external.h +++ b/src/fix_external.h @@ -39,11 +39,14 @@ class FixExternal : public Fix { void post_force(int); void min_post_force(int); double compute_scalar(); + double compute_vector(int); void set_energy_global(double); void set_virial_global(double *); void set_energy_peratom(double *); void set_virial_peratom(double **); + void set_vector_length(int); + void set_vector(int,double); double memory_usage(); void grow_arrays(int); @@ -59,6 +62,7 @@ class FixExternal : public Fix { FnPtr callback; void *ptr_caller; double user_energy; + double *caller_vector; }; } -- GitLab From 1bf1cb150faefd84910a89be70b6823ff3a34e5c Mon Sep 17 00:00:00 2001 From: Markus Hoehnerbach Date: Wed, 5 Jul 2017 18:26:32 +0200 Subject: [PATCH 420/593] Updated credits --- src/MANYBODY/pair_airebo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index a33abfcb63..5c022cedb2 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -15,7 +15,7 @@ Contributing author: Ase Henry (MIT) Bugfixes and optimizations: Marcel Fallet & Steve Stuart (Clemson), Axel Kohlmeyer (Temple U), - Markus Hoehnerbach (RWTH Aachen), Github user CF17 + Markus Hoehnerbach (RWTH Aachen), Cyril Falvo (Universite Paris Sud) AIREBO-M modification to optionally replace LJ with Morse potentials. Thomas C. O'Connor (JHU) 2014 ------------------------------------------------------------------------- */ -- GitLab From 6eddc1a2ee772ec7c2aa0dcdbd68402f2c0702c9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 12:33:41 -0400 Subject: [PATCH 421/593] coding style and whitespace cleanup to match LAMMPS style --- src/USER-MISC/fix_wall_ees.cpp | 66 +-- src/USER-MISC/fix_wall_region_ees.cpp | 554 +++++++++++++------------- src/USER-MISC/fix_wall_region_ees.h | 8 +- 3 files changed, 309 insertions(+), 319 deletions(-) diff --git a/src/USER-MISC/fix_wall_ees.cpp b/src/USER-MISC/fix_wall_ees.cpp index 8ccadf274a..9b65d1e30f 100644 --- a/src/USER-MISC/fix_wall_ees.cpp +++ b/src/USER-MISC/fix_wall_ees.cpp @@ -11,13 +11,25 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "math.h" +/* ---------------------------------------------------------------------- + Contributing author: Abdoreza Ershadinia, a.ershadinia at gmail.com +------------------------------------------------------------------------- */ + +#include #include "math_extra.h" #include "fix_wall_ees.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_ellipsoid.h" +#include "domain.h" +#include "region.h" +#include "force.h" +#include "lattice.h" +#include "update.h" +#include "output.h" +#include "respa.h" #include "error.h" +#include "math_extra.h" using namespace LAMMPS_NS; using namespace FixConst; @@ -96,13 +108,13 @@ void FixWallEES::wall_particle(int m, int which, double coord) for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - if (side < 0) - delta = x[i][dim] - coord; + if (side < 0) + delta = x[i][dim] - coord; else - delta = coord - x[i][dim]; + delta = coord - x[i][dim]; if (delta >= cutoff[m]) - continue; + continue; double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; double tempvec[3]= {0,0,0}; @@ -168,37 +180,37 @@ void FixWallEES::wall_particle(int m, int which, double coord) hms = delta - sigman; fwall = side*( - -1*coeff4[m]/hhss2 + - coeff3[m] * ( 21*delta6 + 63*delta4*sigman2 + 27*delta2*sigman4 + sigman6 ) / hhss8 - ); - f[i][dim] -= fwall; + -1*coeff4[m]/hhss2 + + coeff3[m] * ( 21*delta6 + 63*delta4*sigman2 + 27*delta2*sigman4 + sigman6 ) / hhss8 + ); + f[i][dim] -= fwall; - ewall[0] += -1*coeff2[m] * ( 4*delta/sigman2/hhss + 2*log(hms/hps)/sigman3 ) + - coeff1[m] * ( 35*delta5 + 70*delta3*sigman2 + 15*delta*sigman4 ) / hhss7; + ewall[0] += -1*coeff2[m] * ( 4*delta/sigman2/hhss + 2*log(hms/hps)/sigman3 ) + + coeff1[m] * ( 35*delta5 + 70*delta3*sigman2 + 15*delta*sigman4 ) / hhss7; - ewall[m+1] += fwall; + ewall[m+1] += fwall; - twall = coeff6[m] * ( 6.*delta3/sigman4/hhss2 - 10.*delta/sigman2/hhss2 + 3.*log(hms/hps)/sigman5 ) + - coeff5[m] * ( 21.*delta5 + 30.*delta3*sigman2 + 5.*delta*sigman4 ) / hhss8 ; + twall = coeff6[m] * ( 6.*delta3/sigman4/hhss2 - 10.*delta/sigman2/hhss2 + 3.*log(hms/hps)/sigman5 ) + + coeff5[m] * ( 21.*delta5 + 30.*delta3*sigman2 + 5.*delta*sigman4 ) / hhss8 ; - MathExtra::matvec(Lx,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; - that[0] = MathExtra::dot3(SAn,tempvec2); + MathExtra::matvec(Lx,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[0] = MathExtra::dot3(SAn,tempvec2); - MathExtra::matvec(Ly,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; - that[1] = MathExtra::dot3(SAn,tempvec2); + MathExtra::matvec(Ly,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[1] = MathExtra::dot3(SAn,tempvec2); - MathExtra::matvec(Lz,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k < 3; k++) tempvec2[k] *= shape[k]; - that[2] = MathExtra::dot3(SAn,tempvec2); + MathExtra::matvec(Lz,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k < 3; k++) tempvec2[k] *= shape[k]; + that[2] = MathExtra::dot3(SAn,tempvec2); - for(int j = 0; j<3 ; j++) + for(int j = 0; j<3 ; j++) tor[i][j] += twall * that[j]; } diff --git a/src/USER-MISC/fix_wall_region_ees.cpp b/src/USER-MISC/fix_wall_region_ees.cpp index 20a5f74c15..e070e2a221 100644 --- a/src/USER-MISC/fix_wall_region_ees.cpp +++ b/src/USER-MISC/fix_wall_region_ees.cpp @@ -1,4 +1,4 @@ -/* -*- c++ -*- ---------------------------------------------------------- +/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -10,10 +10,14 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include "math.h" -#include "stdlib.h" -#include "string.h" + +/* ---------------------------------------------------------------------- + Contributing author: Abdoreza Ershadinia, a.ershadinia at gmail.com +------------------------------------------------------------------------- */ + +#include +#include +#include #include "fix_wall_region_ees.h" #include "atom.h" #include "atom_vec.h" @@ -31,117 +35,109 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{LJ93,LJ126,COLLOID,HARMONIC,EES};//me - /* ---------------------------------------------------------------------- */ -/// USAGE: -/// fix ID group-ID wall/region/ees region-ID epsilon sigma cutoff -/// + FixWallRegionEES::FixWallRegionEES(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) + Fix(lmp, narg, arg) { - if (narg != 7) error->all(FLERR,"Illegal fix wall/region/ees command"); - scalar_flag = 1; - vector_flag = 1; - size_vector = 3; - global_freq = 1; - extscalar = 1; - extvector = 1; - - // parse args - - iregion = domain->find_region(arg[3]); - if (iregion == -1) - error->all(FLERR,"Region ID for fix wall/region/ees does not exist"); - int n = strlen(arg[3]) + 1; - idregion = new char[n]; - strcpy(idregion,arg[3]); - - - - epsilon = force->numeric(FLERR,arg[4]); - sigma = force->numeric(FLERR,arg[5]); - cutoff = force->numeric(FLERR,arg[6]); - - if (cutoff <= 0.0) error->all(FLERR,"Fix wall/region/ees cutoff <= 0.0"); - - eflag = 0; - ewall[0] = ewall[1] = ewall[2] = ewall[3] = 0.0; + if (narg != 7) error->all(FLERR,"Illegal fix wall/region/ees command"); + scalar_flag = 1; + vector_flag = 1; + size_vector = 3; + global_freq = 1; + extscalar = 1; + extvector = 1; + + // parse args + + iregion = domain->find_region(arg[3]); + if (iregion == -1) + error->all(FLERR,"Region ID for fix wall/region/ees does not exist"); + int n = strlen(arg[3]) + 1; + idregion = new char[n]; + strcpy(idregion,arg[3]); + + epsilon = force->numeric(FLERR,arg[4]); + sigma = force->numeric(FLERR,arg[5]); + cutoff = force->numeric(FLERR,arg[6]); + + if (cutoff <= 0.0) error->all(FLERR,"Fix wall/region/ees cutoff <= 0.0"); + + eflag = 0; + ewall[0] = ewall[1] = ewall[2] = ewall[3] = 0.0; } /* ---------------------------------------------------------------------- */ FixWallRegionEES::~FixWallRegionEES() { - delete [] idregion; + delete [] idregion; } /* ---------------------------------------------------------------------- */ int FixWallRegionEES::setmask() { - int mask = 0; - mask |= POST_FORCE; - mask |= THERMO_ENERGY; - mask |= POST_FORCE_RESPA; - mask |= MIN_POST_FORCE; - return mask; + int mask = 0; + mask |= POST_FORCE; + mask |= THERMO_ENERGY; + mask |= POST_FORCE_RESPA; + mask |= MIN_POST_FORCE; + return mask; } /* ---------------------------------------------------------------------- */ void FixWallRegionEES::init() { - // set index and check validity of region - - iregion = domain->find_region(idregion); - if (iregion == -1) - error->all(FLERR,"Region ID for fix wall/region/ees does not exist"); + // set index and check validity of region + iregion = domain->find_region(idregion); + if (iregion == -1) + error->all(FLERR,"Region ID for fix wall/region/ees does not exist"); - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - if (!avec) - error->all(FLERR,"Fix wall/region/ees requires atom style ellipsoid"); + avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + if (!avec) + error->all(FLERR,"Fix wall/region/ees requires atom style ellipsoid"); - // check that all particles are finite-size ellipsoids - // no point particles allowed, spherical is OK + // check that all particles are finite-size ellipsoids + // no point particles allowed, spherical is OK - int *ellipsoid = atom->ellipsoid; - int *mask = atom->mask; - int nlocal = atom->nlocal; + int *ellipsoid = atom->ellipsoid; + int *mask = atom->mask; + int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) - if (ellipsoid[i] < 0) - error->one(FLERR,"Fix wall/region/ees requires extended particles"); + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) + if (ellipsoid[i] < 0) + error->one(FLERR,"Fix wall/region/ees requires extended particles"); + // setup coefficients - // setup coefficients for each style + coeff1 = ( 2. / 4725. ) * epsilon * pow(sigma,12.0); + coeff2 = ( 1. / 24. ) * epsilon * pow(sigma,6.0); + coeff3 = ( 2. / 315. ) * epsilon * pow(sigma,12.0); + coeff4 = ( 1. / 3. ) * epsilon * pow(sigma,6.0); + coeff5 = ( 4. / 315. ) * epsilon * pow(sigma,12.0); + coeff6 = ( 1. / 12. ) * epsilon * pow(sigma,6.0); + offset = 0; - coeff1 = ( 2. / 4725. ) * epsilon * pow(sigma,12.0); - coeff2 = ( 1. / 24. ) * epsilon * pow(sigma,6.0); - coeff3 = ( 2. / 315. ) * epsilon * pow(sigma,12.0); - coeff4 = ( 1. / 3. ) * epsilon * pow(sigma,6.0); - coeff5 = ( 4. / 315. ) * epsilon * pow(sigma,12.0); - coeff6 = ( 1. / 12. ) * epsilon * pow(sigma,6.0); - offset = 0; - - if (strstr(update->integrate_style,"respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + if (strstr(update->integrate_style,"respa")) + nlevels_respa = ((Respa *) update->integrate)->nlevels; } /* ---------------------------------------------------------------------- */ void FixWallRegionEES::setup(int vflag) { - if (strstr(update->integrate_style,"verlet")) - post_force(vflag); - else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); - post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); - } + if (strstr(update->integrate_style,"verlet")) + post_force(vflag); + else { + ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + post_force_respa(vflag,nlevels_respa-1,0); + ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + } } /* ---------------------------------------------------------------------- */ @@ -155,121 +151,111 @@ void FixWallRegionEES::min_setup(int vflag) void FixWallRegionEES::post_force(int vflag) { - //me - //sth is needed here, but I dont know what - //that is calculation of sn - - int i,m,n; - double rinv,fx,fy,fz,tooclose[3];//me - double sn;//me - - eflag = 0; - ewall[0] = ewall[1] = ewall[2] = ewall[3] = 0.0; - - double **x = atom->x; - double **f = atom->f; - double *radius = atom->radius; - - double **tor = atom->torque; //me - - //avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");//me - AtomVecEllipsoid::Bonus *bonus = avec->bonus;//me - int *ellipsoid = atom->ellipsoid;//me - - int *mask = atom->mask; - int nlocal = atom->nlocal; - - Region *region = domain->regions[iregion]; - region->prematch(); - - int onflag = 0; - - // region->match() insures particle is in region or on surface, else error - // if returned contact dist r = 0, is on surface, also an error - // in COLLOID case, r <= radius is an error - - for (i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - if (!region->match(x[i][0],x[i][1],x[i][2])) { - onflag = 1; - continue; - } - - double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; - double tempvec[3]= {0,0,0}; - double sn2 = 0.0; - double nhat[3] = {0,0,0}; - double* shape = bonus[ellipsoid[i]].shape;; - MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); - - for(int which = 0 ; which < 3; which ++){//me - nhat[which]=1; - nhat[(which+1)%3] = 0 ; - nhat[(which+2)%3] = 0 ; - sn2 = 0 ; - MathExtra::transpose_matvec(A,nhat,tempvec); - for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; - for(int k = 0; k<3 ; k++) sn2 += tempvec[k]*tempvec[k]; - sn = sqrt(sn2); - tooclose[which] = sn; - } - - - - n = region->surface(x[i][0],x[i][1],x[i][2],cutoff); - - for (m = 0; m < n; m++) { - - if(region->contact[m].delx != 0 && region->contact[m].r <= tooclose[0] ){ - onflag = 1; - continue; - - }else if (region->contact[m].dely != 0 && region->contact[m].r <= tooclose[1]){ - onflag = 1; - continue; - }else if (region->contact[m].delz !=0 && region->contact[m].r <= tooclose[2]){ - onflag = 1; - continue; - } - else rinv = 1.0/region->contact[m].r; - - ees(m,i);//me - - ewall[0] += eng; - fx = fwall * region->contact[m].delx * rinv; - fy = fwall * region->contact[m].dely * rinv; - fz = fwall * region->contact[m].delz * rinv; - f[i][0] += fx; - f[i][1] += fy; - f[i][2] += fz; - - ewall[1] -= fx; - ewall[2] -= fy; - ewall[3] -= fz; - - tor[i][0] += torque[0]; - tor[i][1] += torque[1]; - tor[i][2] += torque[2]; - - } - } - - if (onflag) error->one(FLERR,"Particle on or inside surface of region " - "used in fix wall/region/ees"); + //sth is needed here, but I dont know what + //that is calculation of sn + + int i,m,n; + double rinv,fx,fy,fz,sn,tooclose[3]; + + eflag = 0; + ewall[0] = ewall[1] = ewall[2] = ewall[3] = 0.0; + + double **x = atom->x; + double **f = atom->f; + double **tor = atom->torque; + + AtomVecEllipsoid::Bonus *bonus = avec->bonus; + int *ellipsoid = atom->ellipsoid; + + int *mask = atom->mask; + int nlocal = atom->nlocal; + + Region *region = domain->regions[iregion]; + region->prematch(); + + int onflag = 0; + + // region->match() insures particle is in region or on surface, else error + // if returned contact dist r = 0, is on surface, also an error + // in COLLOID case, r <= radius is an error + + for (i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + if (!region->match(x[i][0],x[i][1],x[i][2])) { + onflag = 1; + continue; + } + + double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; + double tempvec[3]= {0,0,0}; + double sn2 = 0.0; + double nhat[3] = {0,0,0}; + double* shape = bonus[ellipsoid[i]].shape;; + MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); + + for(int which = 0 ; which < 3; which ++){//me + nhat[which]=1; + nhat[(which+1)%3] = 0 ; + nhat[(which+2)%3] = 0 ; + sn2 = 0 ; + MathExtra::transpose_matvec(A,nhat,tempvec); + for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; + for(int k = 0; k<3 ; k++) sn2 += tempvec[k]*tempvec[k]; + sn = sqrt(sn2); + tooclose[which] = sn; + } + + n = region->surface(x[i][0],x[i][1],x[i][2],cutoff); + + for (m = 0; m < n; m++) { + + if (region->contact[m].delx != 0 && region->contact[m].r <= tooclose[0]){ + onflag = 1; + continue; + } else if (region->contact[m].dely != 0 && region->contact[m].r <= tooclose[1]){ + onflag = 1; + continue; + } else if (region->contact[m].delz !=0 && region->contact[m].r <= tooclose[2]){ + onflag = 1; + continue; + } else rinv = 1.0/region->contact[m].r; + + ees(m,i); + + ewall[0] += eng; + fx = fwall * region->contact[m].delx * rinv; + fy = fwall * region->contact[m].dely * rinv; + fz = fwall * region->contact[m].delz * rinv; + f[i][0] += fx; + f[i][1] += fy; + f[i][2] += fz; + + ewall[1] -= fx; + ewall[2] -= fy; + ewall[3] -= fz; + + tor[i][0] += torque[0]; + tor[i][1] += torque[1]; + tor[i][2] += torque[2]; + } + } + + if (onflag) error->one(FLERR,"Particle on or inside surface of region " + "used in fix wall/region/ees"); } /* ---------------------------------------------------------------------- */ void FixWallRegionEES::post_force_respa(int vflag, int ilevel, int iloop) { - if (ilevel == nlevels_respa-1) post_force(vflag); + if (ilevel == nlevels_respa-1) post_force(vflag); } /* ---------------------------------------------------------------------- */ void FixWallRegionEES::min_post_force(int vflag) { - post_force(vflag); + post_force(vflag); } /* ---------------------------------------------------------------------- @@ -278,13 +264,13 @@ void FixWallRegionEES::min_post_force(int vflag) double FixWallRegionEES::compute_scalar() { - // only sum across procs one time + // only sum across procs one time - if (eflag == 0) { - MPI_Allreduce(ewall,ewall_all,4,MPI_DOUBLE,MPI_SUM,world); - eflag = 1; - } - return ewall_all[0]; + if (eflag == 0) { + MPI_Allreduce(ewall,ewall_all,4,MPI_DOUBLE,MPI_SUM,world); + eflag = 1; + } + return ewall_all[0]; } /* ---------------------------------------------------------------------- @@ -293,18 +279,15 @@ double FixWallRegionEES::compute_scalar() double FixWallRegionEES::compute_vector(int n) { - // only sum across procs one time + // only sum across procs one time - if (eflag == 0) { - MPI_Allreduce(ewall,ewall_all,4,MPI_DOUBLE,MPI_SUM,world); - eflag = 1; - } - return ewall_all[n+1]; + if (eflag == 0) { + MPI_Allreduce(ewall,ewall_all,4,MPI_DOUBLE,MPI_SUM,world); + eflag = 1; + } + return ewall_all[n+1]; } - - -//me /* ---------------------------------------------------------------------- EES interaction for ellipsoid particle with wall compute eng and fwall and twall = magnitude of wall force and torque @@ -312,94 +295,89 @@ double FixWallRegionEES::compute_vector(int n) void FixWallRegionEES::ees(int m, int i) { - Region *region = domain->regions[iregion]; - region->prematch(); - - double delta = 0.0, delta2 = 0.0, delta3 = 0.0, delta4 = 0.0, delta5 = 0.0, delta6 = 0.0; - double sigman = 0.0, sigman2 = 0.0 , sigman3 = 0.0, sigman4 = 0.0, sigman5 = 0.0, sigman6 = 0.0; - double hhss = 0.0, hhss2 = 0.0, hhss4 = 0.0, hhss7 = 0.0, hhss8 = 0.0; //h^2 - s_n^2 - double hps = 0.0; //h+s_n - double hms = 0.0; //h-s_n - double twall = 0.0; - double tempvec[3]={0,0,0}; - double tempvec2[3]= {0,0,0}; - - double SAn[3] = {0,0,0}; - double that[3] = {0,0,0}; - - double Lx[3][3] = {{0,0,0},{0,0,-1},{0,1,0}}; - double Ly[3][3] = {{0,0,1},{0,0,0},{-1,0,0}}; - double Lz[3][3] = {{0,-1,0},{1,0,0},{0,0,0}}; - - double A[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; - double nhat[3] = {0,0,0}; - - nhat[0] = region->contact[m].delx / region->contact[m].r; - nhat[1] = region->contact[m].dely / region->contact[m].r; - nhat[2] = region->contact[m].delz / region->contact[m].r; - - //avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecEllipsoid::Bonus *bonus = avec->bonus; - int *ellipsoid = atom->ellipsoid;//me - - double* shape = bonus[ellipsoid[i]].shape;; - MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); - - MathExtra::transpose_matvec(A,nhat,tempvec); - for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; - for(int k = 0; k<3 ; k++) sigman2 += tempvec[k]*tempvec[k]; - for(int k = 0; k<3; k++) SAn[k] = tempvec[k]; - - - sigman = sqrt(sigman2); - delta = fabs(region->contact[m].r); - - sigman3 = sigman2 * sigman; - sigman4 = sigman2 * sigman2; - sigman5 = sigman4 * sigman; - sigman6 = sigman3 * sigman3; - - delta2 = delta * delta; - delta3 = delta2 * delta; - delta4 = delta2 * delta2; - delta5 = delta3 * delta2; - delta6 = delta3 * delta3; - - hhss = delta2 - sigman2; - hhss2 = hhss * hhss; - hhss4 = hhss2 * hhss2; - hhss8 = hhss4 * hhss4; - hhss7 = hhss4 * hhss2 * hhss; - - hps = delta + sigman; - hms = delta - sigman; - - fwall = -1*coeff4/hhss2 + - coeff3 * ( 21*delta6 + 63*delta4*sigman2 + 27*delta2*sigman4 + sigman6 ) / hhss8 - ; - - eng = -1*coeff2 * ( 4*delta/sigman2/hhss + 2*log(hms/hps)/sigman3 ) + - coeff1 * ( 35*delta5 + 70*delta3*sigman2 + 15*delta*sigman4 ) / hhss7; - - twall = coeff6 * ( 6.*delta3/sigman4/hhss2 - 10.*delta/sigman2/hhss2 + 3.*log(hms/hps)/sigman5 ) + - coeff5 * ( 21.*delta5 + 30.*delta3*sigman2 + 5.*delta*sigman4 ) / hhss8 ; - - MathExtra::matvec(Lx,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; - that[0] = MathExtra::dot3(SAn,tempvec2); - - MathExtra::matvec(Ly,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; - that[1] = MathExtra::dot3(SAn,tempvec2); - - MathExtra::matvec(Lz,nhat,tempvec); - MathExtra::transpose_matvec(A,tempvec,tempvec2); - for(int k = 0; k < 3; k++) tempvec2[k] *= shape[k]; - that[2] = MathExtra::dot3(SAn,tempvec2); - - for(int j = 0; j<3 ; j++) - torque[j] = twall * that[j]; - + Region *region = domain->regions[iregion]; + region->prematch(); + + double delta, delta2, delta3, delta4, delta5, delta6; + double sigman, sigman2 , sigman3, sigman4, sigman5, sigman6; + double hhss, hhss2, hhss4, hhss7, hhss8; //h^2 - s_n^2 + double hps; //h+s_n + double hms; //h-s_n + double twall; + + double A[3][3], nhat[3], SAn[3], that[3]; + + double tempvec[3]= {0,0,0}; + double tempvec2[3]= {0,0,0}; + + double Lx[3][3] = {{0,0,0},{0,0,-1},{0,1,0}}; + double Ly[3][3] = {{0,0,1},{0,0,0},{-1,0,0}}; + double Lz[3][3] = {{0,-1,0},{1,0,0},{0,0,0}}; + + nhat[0] = region->contact[m].delx / region->contact[m].r; + nhat[1] = region->contact[m].dely / region->contact[m].r; + nhat[2] = region->contact[m].delz / region->contact[m].r; + + AtomVecEllipsoid::Bonus *bonus = avec->bonus; + int *ellipsoid = atom->ellipsoid; + + double* shape = bonus[ellipsoid[i]].shape;; + MathExtra::quat_to_mat(bonus[ellipsoid[i]].quat,A); + + sigman2 = 0.0; + MathExtra::transpose_matvec(A,nhat,tempvec); + for(int k = 0; k<3; k++) tempvec[k] *= shape[k]; + for(int k = 0; k<3; k++) sigman2 += tempvec[k]*tempvec[k]; + for(int k = 0; k<3; k++) SAn[k] = tempvec[k]; + + sigman = sqrt(sigman2); + delta = fabs(region->contact[m].r); + + sigman3 = sigman2 * sigman; + sigman4 = sigman2 * sigman2; + sigman5 = sigman4 * sigman; + sigman6 = sigman3 * sigman3; + + delta2 = delta * delta; + delta3 = delta2 * delta; + delta4 = delta2 * delta2; + delta5 = delta3 * delta2; + delta6 = delta3 * delta3; + + hhss = delta2 - sigman2; + hhss2 = hhss * hhss; + hhss4 = hhss2 * hhss2; + hhss8 = hhss4 * hhss4; + hhss7 = hhss4 * hhss2 * hhss; + + hps = delta + sigman; + hms = delta - sigman; + + fwall = -1*coeff4/hhss2 + coeff3 + * (21*delta6 + 63*delta4*sigman2 + 27*delta2*sigman4 + sigman6) / hhss8; + + eng = -1*coeff2 * (4*delta/sigman2/hhss + 2*log(hms/hps)/sigman3) + + coeff1 * (35*delta5 + 70*delta3*sigman2 + 15*delta*sigman4) / hhss7; + + twall = coeff6 * (6*delta3/sigman4/hhss2 - 10*delta/sigman2/hhss2 + + 3*log(hms/hps)/sigman5) + + coeff5 * (21.*delta5 + 30.*delta3*sigman2 + 5.*delta*sigman4) / hhss8; + + MathExtra::matvec(Lx,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[0] = MathExtra::dot3(SAn,tempvec2); + + MathExtra::matvec(Ly,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k<3; k++) tempvec2[k] *= shape[k]; + that[1] = MathExtra::dot3(SAn,tempvec2); + + MathExtra::matvec(Lz,nhat,tempvec); + MathExtra::transpose_matvec(A,tempvec,tempvec2); + for(int k = 0; k < 3; k++) tempvec2[k] *= shape[k]; + that[2] = MathExtra::dot3(SAn,tempvec2); + + for(int j = 0; j<3 ; j++) + torque[j] = twall * that[j]; } diff --git a/src/USER-MISC/fix_wall_region_ees.h b/src/USER-MISC/fix_wall_region_ees.h index 59679a0b41..9da2cccce6 100644 --- a/src/USER-MISC/fix_wall_region_ees.h +++ b/src/USER-MISC/fix_wall_region_ees.h @@ -40,7 +40,7 @@ class FixWallRegionEES : public Fix { double compute_vector(int); private: - class AtomVecEllipsoid *avec;//me + class AtomVecEllipsoid *avec; int iregion; double epsilon,sigma,cutoff; @@ -50,11 +50,11 @@ class FixWallRegionEES : public Fix { char *idregion; double coeff1,coeff2,coeff3,coeff4,offset; - double coeff5, coeff6;//me + double coeff5, coeff6; double eng,fwall; - double torque[3];//me + double torque[3]; - void ees(int, int);//me + void ees(int, int); }; } -- GitLab From d451dbb1a0791d837bd017965976610ec942ee3d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 13:54:56 -0400 Subject: [PATCH 422/593] adjust EES wall input example to print out some thermodynamic info that can be used for testing --- examples/USER/misc/ees/Data_region | 2 +- examples/USER/misc/ees/Data_wall | 4 ++-- examples/USER/misc/ees/in.fix_wall | 10 ++++++++-- examples/USER/misc/ees/in.fix_wall_region | 7 +++++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/examples/USER/misc/ees/Data_region b/examples/USER/misc/ees/Data_region index 80eefeafe6..1b3dc65dde 100644 --- a/examples/USER/misc/ees/Data_region +++ b/examples/USER/misc/ees/Data_region @@ -15,7 +15,7 @@ atom-ID atom-type ellipsoidflag density x y z Ellipsoids atom-ID shapex shapey shapez quatw quati quatj quatk -1 14 6 8 0.89453 0.44700 0 0 +1 14 6 8 0.89453 0.44700 0 0 2 14 6 8 0.25755 0 0.96626 0 3 14 6 8 0.95009 0 0 0.31197 diff --git a/examples/USER/misc/ees/Data_wall b/examples/USER/misc/ees/Data_wall index 27fa6c5990..c4693e33fb 100644 --- a/examples/USER/misc/ees/Data_wall +++ b/examples/USER/misc/ees/Data_wall @@ -8,12 +8,12 @@ Atoms atom-ID atom-type ellipsoidflag density x y z -1 1 1 1 30 30 30 +1 1 1 1 30 30 50 Ellipsoids atom-ID shapex shapey shapez quatw quati quatj quatk -1 14 6 8 0.44700 0 0.89453 0 +1 14 6 8 0.44700 0 0.89453 0 Velocities diff --git a/examples/USER/misc/ees/in.fix_wall b/examples/USER/misc/ees/in.fix_wall index 94db4c3b15..6ea3b67d3b 100644 --- a/examples/USER/misc/ees/in.fix_wall +++ b/examples/USER/misc/ees/in.fix_wall @@ -10,9 +10,14 @@ pair_coeff 1 1 10.0 1.0 0.5 0.5 4 0.5 0.5 4 1 timestep 0.0001 #------------------------------------# +compute temp all temp/asphere +thermo_modify temp temp + fix EES_substrate all wall/ees zhi EDGE 10 1 10 zlo EDGE 10 1 10 #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^# +thermo_style custom step temp press etotal f_EES_substrate f_EES_substrate[1] + fix NVT all nve/asphere #------------------------------------# compute qw all property/atom quatw @@ -20,6 +25,7 @@ compute qi all property/atom quati compute qj all property/atom quatj compute qk all property/atom quatk #------------------------------------# -dump 1 all custom 5000 dump1 id type x y z c_qw c_qi c_qj c_qk -run 2000000 +thermo 500 +dump 1 all custom 500 dump1 id type x y z c_qw c_qi c_qj c_qk +run 2000 diff --git a/examples/USER/misc/ees/in.fix_wall_region b/examples/USER/misc/ees/in.fix_wall_region index d457deae44..655fb6e724 100644 --- a/examples/USER/misc/ees/in.fix_wall_region +++ b/examples/USER/misc/ees/in.fix_wall_region @@ -15,6 +15,8 @@ timestep 0.0001 fix EES_block all wall/region/ees the_wall 10. 1. 20 #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^# +thermo_style custom step temp press etotal f_EES_block[1] f_EES_block[3] + fix NVT all nve/asphere #------------------------------------# compute qw all property/atom quatw @@ -22,6 +24,7 @@ compute qi all property/atom quati compute qj all property/atom quatj compute qk all property/atom quatk #------------------------------------# -dump 1 all custom 5000 dump1 id type x y z c_qw c_qi c_qj c_qk -run 2000000 +thermo 500 +#dump 1 all custom 500 dump1 id type x y z c_qw c_qi c_qj c_qk +run 2000 -- GitLab From f1088a5003ddac3326e893b6e474041a3c08f1bb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 15:03:58 -0400 Subject: [PATCH 423/593] changes requested by @sjplimp --- src/SHOCK/fix_msst.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index c710bdb77f..372d289471 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -468,7 +468,7 @@ void FixMSST::initial_integrate(int vflag) // must convert energy to mv^2 units if (dftb) { - TS_dftb = fix_external->compute_vector(1); + TS_dftb = fix_external->compute_vector(0); TS = force->ftm2v*TS_dftb; if (update->ntimestep == 1) T0S0 = TS; } else { @@ -686,7 +686,7 @@ void FixMSST::final_integrate() // must convert energy to mv^2 units if (dftb) { - TS_dftb = fix_external->compute_vector(1); + TS_dftb = fix_external->compute_vector(0); TS = force->ftm2v*TS_dftb; } else TS = 0.0; -- GitLab From e625e7917190860a121e130f6b6dc5bd4a77fa16 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 15:04:27 -0400 Subject: [PATCH 424/593] safer handling of processors w/o local atoms --- src/SHOCK/fix_msst.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index 372d289471..6c66b9389a 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -458,7 +458,7 @@ void FixMSST::initial_integrate(int vflag) // realloc old_velocity if necessary - if (nlocal > maxold) { + if (atom->nmax > maxold) { memory->destroy(old_velocity); maxold = atom->nmax; memory->create(old_velocity,maxold,3,"msst:old_velocity"); -- GitLab From 09ad29342555ac298ad7c74ddf377006084936fe Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 15:04:35 -0400 Subject: [PATCH 425/593] remove dead code --- src/modify.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modify.cpp b/src/modify.cpp index 89c4a43001..4516788aa9 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -1066,7 +1066,6 @@ int Modify::check_rigid_region_overlap(int groupbit, Region *reg) int Modify::check_rigid_list_overlap(int *select) { - const int * const mask = atom->mask; const int nlocal = atom->nlocal; int dim; -- GitLab From 894e0c3cf5064ab4f524d6cf0a25e564a65a6c1b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 16:19:24 -0400 Subject: [PATCH 426/593] simplify parsing of optional arguments --- src/MANYBODY/pair_airebo.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 5c022cedb2..26800a75d3 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -157,13 +157,11 @@ void PairAIREBO::settings(int narg, char **arg) cutlj = force->numeric(FLERR,arg[0]); - if (narg == 3) { + if (narg >= 3) { ljflag = force->inumeric(FLERR,arg[1]); torflag = force->inumeric(FLERR,arg[2]); } if (narg == 4) { - ljflag = force->inumeric(FLERR,arg[1]); - torflag = force->inumeric(FLERR,arg[2]); sigcut = cutlj; sigmin = force->numeric(FLERR,arg[3]); sigwid = sigcut - sigmin; -- GitLab From 8c3f6947ad480fd6cf22809331af916b99c76146 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 16:19:59 -0400 Subject: [PATCH 427/593] remove unused variables to silence compiler warnings --- src/MANYBODY/pair_airebo.cpp | 8 +++----- src/USER-OMP/pair_airebo_omp.cpp | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 26800a75d3..1b248f701c 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -534,7 +534,7 @@ void PairAIREBO::FLJ(int eflag, int vflag) double delij[3],rijsq,delik[3],rik,deljk[3]; double rkj,wkj,dC,VLJ,dVLJ,VA,Str,dStr,Stb; double vdw,slw,dvdw,dslw,drij,swidth,tee,tee2; - double rljmin,rljmax,sigcut,sigmin,sigwid; + double rljmin,rljmax,sigcut,sigmin; double delkm[3],rkm,deljm[3],rmj,wmj,r2inv,r6inv,scale,delscale[3]; int *ilist,*jlist,*numneigh,**firstneigh; int *REBO_neighs_i,*REBO_neighs_k; @@ -552,8 +552,6 @@ void PairAIREBO::FLJ(int eflag, int vflag) rljmax = 0.0; sigcut = 0.0; sigmin = 0.0; - sigwid = 0.0; - double **x = atom->x; double **f = atom->f; @@ -2133,13 +2131,13 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij_mod[3], double rijmag_mo double w21,dw21,r34[3],r34mag,cos234,w34,dw34; double cross321[3],cross234[3],prefactor,SpN; double fcikpc,fcjlpc,fcjkpc,fcilpc,fcijpc; - double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom; + double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa2,at2,cw,cwnum,cwnom; double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2; double dctik,dctjk,dctjl,dctij,dctji,dctil,rik2i,rjl2i,sink2i,sinl2i; double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil,dt1dij; double F23[3],F12[3],F34[3],F31[3],F24[3],fi[3],fj[3],fk[3],fl[3]; double f1[3],f2[3],f3[3],f4[4]; - double dcut321,PijS,PjiS; + double PijS,PjiS; double rij2,tspjik,dtsjik,tspijl,dtsijl,costmp; int *REBO_neighs,*REBO_neighs_i,*REBO_neighs_j,*REBO_neighs_k,*REBO_neighs_l; double tmppij,tmppji,dN2PIJ[2],dN2PJI[2],dN3piRC[3],dN3Tij[3]; diff --git a/src/USER-OMP/pair_airebo_omp.cpp b/src/USER-OMP/pair_airebo_omp.cpp index 2fd6c93f03..bc83ff8e4b 100644 --- a/src/USER-OMP/pair_airebo_omp.cpp +++ b/src/USER-OMP/pair_airebo_omp.cpp @@ -294,7 +294,7 @@ void PairAIREBOOMP::FLJ_thr(int ifrom, int ito, int evflag, int eflag, double delij[3],rijsq,delik[3],rik,deljk[3]; double rkj,wkj,dC,VLJ,dVLJ,VA,Str,dStr,Stb; double vdw,slw,dvdw,dslw,drij,swidth,tee,tee2; - double rljmin,rljmax,sigcut,sigmin,sigwid; + double rljmin,rljmax,sigcut,sigmin; double delkm[3],rkm,deljm[3],rmj,wmj,r2inv,r6inv,scale,delscale[3]; int *ilist,*jlist,*numneigh,**firstneigh; int *REBO_neighs_i,*REBO_neighs_k; @@ -312,7 +312,6 @@ void PairAIREBOOMP::FLJ_thr(int ifrom, int ito, int evflag, int eflag, rljmax = 0.0; sigcut = 0.0; sigmin = 0.0; - sigwid = 0.0; const double * const * const x = atom->x; double * const * const f = thr->get_f(); @@ -1894,13 +1893,13 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij_mod[3], double ri double w21,dw21,r34[3],r34mag,cos234,w34,dw34; double cross321[3],cross234[3],prefactor,SpN; double fcikpc,fcjlpc,fcjkpc,fcilpc,fcijpc; - double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom; + double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa2,at2,cw,cwnum,cwnom; double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2; double dctik,dctjk,dctjl,dctij,dctji,dctil,rik2i,rjl2i,sink2i,sinl2i; double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil,dt1dij; double F23[3],F12[3],F34[3],F31[3],F24[3],fi[3],fj[3],fk[3],fl[3]; double f1[3],f2[3],f3[3],f4[4]; - double dcut321,PijS,PjiS; + double PijS,PjiS; double rij2,tspjik,dtsjik,tspijl,dtsijl,costmp; int *REBO_neighs,*REBO_neighs_i,*REBO_neighs_j,*REBO_neighs_k,*REBO_neighs_l; double tmppij,tmppji,dN2PIJ[2],dN2PJI[2],dN3piRC[3],dN3Tij[3]; -- GitLab From 4de9cec1b63b5c4021067b8bdcd2644eb87d617b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 16:22:39 -0400 Subject: [PATCH 428/593] make old_velocities allocation safer while retaining the test for nlocal --- src/SHOCK/fix_msst.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index 6c66b9389a..6399b10fa2 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -250,7 +250,7 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : nrigid = 0; rfix = NULL; - maxold = 0; + maxold = -1; old_velocity = NULL; } @@ -458,7 +458,7 @@ void FixMSST::initial_integrate(int vflag) // realloc old_velocity if necessary - if (atom->nmax > maxold) { + if (nlocal > maxold) { memory->destroy(old_velocity); maxold = atom->nmax; memory->create(old_velocity,maxold,3,"msst:old_velocity"); -- GitLab From e493b6a648b268a86654824d09536bd846e618d1 Mon Sep 17 00:00:00 2001 From: Markus Hoehnerbach Date: Wed, 5 Jul 2017 22:52:29 +0200 Subject: [PATCH 429/593] Fix sigcut class variable actually used --- src/MANYBODY/pair_airebo.cpp | 4 +--- src/USER-OMP/pair_airebo_omp.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 1b248f701c..67e1e5262a 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -534,7 +534,7 @@ void PairAIREBO::FLJ(int eflag, int vflag) double delij[3],rijsq,delik[3],rik,deljk[3]; double rkj,wkj,dC,VLJ,dVLJ,VA,Str,dStr,Stb; double vdw,slw,dvdw,dslw,drij,swidth,tee,tee2; - double rljmin,rljmax,sigcut,sigmin; + double rljmin,rljmax; double delkm[3],rkm,deljm[3],rmj,wmj,r2inv,r6inv,scale,delscale[3]; int *ilist,*jlist,*numneigh,**firstneigh; int *REBO_neighs_i,*REBO_neighs_k; @@ -550,8 +550,6 @@ void PairAIREBO::FLJ(int eflag, int vflag) evdwl = 0.0; rljmin = 0.0; rljmax = 0.0; - sigcut = 0.0; - sigmin = 0.0; double **x = atom->x; double **f = atom->f; diff --git a/src/USER-OMP/pair_airebo_omp.cpp b/src/USER-OMP/pair_airebo_omp.cpp index bc83ff8e4b..73529847f2 100644 --- a/src/USER-OMP/pair_airebo_omp.cpp +++ b/src/USER-OMP/pair_airebo_omp.cpp @@ -294,7 +294,7 @@ void PairAIREBOOMP::FLJ_thr(int ifrom, int ito, int evflag, int eflag, double delij[3],rijsq,delik[3],rik,deljk[3]; double rkj,wkj,dC,VLJ,dVLJ,VA,Str,dStr,Stb; double vdw,slw,dvdw,dslw,drij,swidth,tee,tee2; - double rljmin,rljmax,sigcut,sigmin; + double rljmin,rljmax; double delkm[3],rkm,deljm[3],rmj,wmj,r2inv,r6inv,scale,delscale[3]; int *ilist,*jlist,*numneigh,**firstneigh; int *REBO_neighs_i,*REBO_neighs_k; @@ -310,8 +310,6 @@ void PairAIREBOOMP::FLJ_thr(int ifrom, int ito, int evflag, int eflag, evdwl = 0.0; rljmin = 0.0; rljmax = 0.0; - sigcut = 0.0; - sigmin = 0.0; const double * const * const x = atom->x; double * const * const f = thr->get_f(); -- GitLab From fa469ae1d0b2de105594c1015219ba75a67648c1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 17:44:18 -0400 Subject: [PATCH 430/593] add polyethylene airebo example for future reference --- examples/airebo/data.airebo | 78 ++++++++++++++++++++ examples/airebo/in.airebo | 22 ++++++ examples/airebo/in.airebo-m | 22 ++++++ examples/airebo/log.23Jun17.airebo-m.g++.1 | 86 ++++++++++++++++++++++ examples/airebo/log.23Jun17.airebo-m.g++.4 | 86 ++++++++++++++++++++++ examples/airebo/log.23Jun17.airebo.g++.1 | 86 ++++++++++++++++++++++ examples/airebo/log.23Jun17.airebo.g++.4 | 86 ++++++++++++++++++++++ 7 files changed, 466 insertions(+) create mode 100644 examples/airebo/data.airebo create mode 100644 examples/airebo/in.airebo create mode 100644 examples/airebo/in.airebo-m create mode 100644 examples/airebo/log.23Jun17.airebo-m.g++.1 create mode 100644 examples/airebo/log.23Jun17.airebo-m.g++.4 create mode 100644 examples/airebo/log.23Jun17.airebo.g++.1 create mode 100644 examples/airebo/log.23Jun17.airebo.g++.4 diff --git a/examples/airebo/data.airebo b/examples/airebo/data.airebo new file mode 100644 index 0000000000..90e20b2388 --- /dev/null +++ b/examples/airebo/data.airebo @@ -0,0 +1,78 @@ +LAMMPS data file from restart file: timestep = 1, procs = 1 + +60 atoms + +2 atom types + +-2.1 2.1 xlo xhi +-2.1 2.1 ylo yhi +0 25.5790000000 zlo zhi + +Masses + +1 12.01 +2 1.00794 + +Atoms + +1 1 0.0000000000 0.0000000000 0.0000000000 +2 2 0.9010066786 -0.6310205743 0.0000000000 +3 2 -0.9010066786 -0.6310205743 0.0000000000 +4 1 0.0000000000 0.8470061967 1.2789591482 +5 2 0.9010066786 1.4780267710 1.2789591482 +6 2 -0.9010066786 1.4780267710 1.2789591482 +7 1 0.0000000000 0.0000000000 2.5579182965 +8 2 0.9010066786 -0.6310205743 2.5579182965 +9 2 -0.9010066786 -0.6310205743 2.5579182965 +10 1 0.0000000000 0.8470061967 3.8368774447 +11 2 0.9010066786 1.4780267710 3.8368774447 +12 2 -0.9010066786 1.4780267710 3.8368774447 +13 1 0.0000000000 0.0000000000 5.1158365929 +14 2 0.9010066786 -0.6310205743 5.1158365929 +15 2 -0.9010066786 -0.6310205743 5.1158365929 +16 1 0.0000000000 0.8470061967 6.3947957411 +17 2 0.9010066786 1.4780267710 6.3947957411 +18 2 -0.9010066786 1.4780267710 6.3947957411 +19 1 0.0000000000 0.0000000000 7.6737548894 +20 2 0.9010066786 -0.6310205743 7.6737548894 +21 2 -0.9010066786 -0.6310205743 7.6737548894 +22 1 0.0000000000 0.8470061967 8.9527140376 +23 2 0.9010066786 1.4780267710 8.9527140376 +24 2 -0.9010066786 1.4780267710 8.9527140376 +25 1 0.0000000000 0.0000000000 10.2316731858 +26 2 0.9010066786 -0.6310205743 10.2316731858 +27 2 -0.9010066786 -0.6310205743 10.2316731858 +28 1 0.0000000000 0.8470061967 11.5106323340 +29 2 0.9010066786 1.4780267710 11.5106323340 +30 2 -0.9010066786 1.4780267710 11.5106323340 +31 1 0.0000000000 0.0000000000 12.7895914823 +32 2 0.9010066786 -0.6310205743 12.7895914823 +33 2 -0.9010066786 -0.6310205743 12.7895914823 +34 1 0.0000000000 0.8470061967 14.0685506305 +35 2 0.9010066786 1.4780267710 14.0685506305 +36 2 -0.9010066786 1.4780267710 14.0685506305 +37 1 0.0000000000 0.0000000000 15.3475097787 +38 2 0.9010066786 -0.6310205743 15.3475097787 +39 2 -0.9010066786 -0.6310205743 15.3475097787 +40 1 0.0000000000 0.8470061967 16.6264689269 +41 2 0.9010066786 1.4780267710 16.6264689269 +42 2 -0.9010066786 1.4780267710 16.6264689269 +43 1 0.0000000000 0.0000000000 17.9054280752 +44 2 0.9010066786 -0.6310205743 17.9054280752 +45 2 -0.9010066786 -0.6310205743 17.9054280752 +46 1 0.0000000000 0.8470061967 19.1843872234 +47 2 0.9010066786 1.4780267710 19.1843872234 +48 2 -0.9010066786 1.4780267710 19.1843872234 +49 1 0.0000000000 0.0000000000 20.4633463716 +50 2 0.9010066786 -0.6310205743 20.4633463716 +51 2 -0.9010066786 -0.6310205743 20.4633463716 +52 1 0.0000000000 0.8470061967 21.7423055198 +53 2 0.9010066786 1.4780267710 21.7423055198 +54 2 -0.9010066786 1.4780267710 21.7423055198 +55 1 0.0000000000 0.0000000000 23.0212646681 +56 2 0.9010066786 -0.6310205743 23.0212646681 +57 2 -0.9010066786 -0.6310205743 23.0212646681 +58 1 0.0000000000 0.8470061967 24.3002238163 +59 2 0.9010066786 1.4780267710 24.3002238163 +60 2 -0.9010066786 1.4780267710 24.3002238163 + diff --git a/examples/airebo/in.airebo b/examples/airebo/in.airebo new file mode 100644 index 0000000000..5b0e36ff4a --- /dev/null +++ b/examples/airebo/in.airebo @@ -0,0 +1,22 @@ +# AIREBO polyethelene benchmark + +units metal +atom_style atomic + +read_data data.airebo + +replicate 17 16 2 + +neighbor 0.5 bin +neigh_modify delay 5 every 1 + +pair_style airebo 3.0 1 1 +pair_coeff * * ../../potentials/CH.airebo C H + +velocity all create 300.0 761341 + +fix 1 all nve +timestep 0.0005 + +thermo 10 +run 100 diff --git a/examples/airebo/in.airebo-m b/examples/airebo/in.airebo-m new file mode 100644 index 0000000000..3ec29482a7 --- /dev/null +++ b/examples/airebo/in.airebo-m @@ -0,0 +1,22 @@ +# AIREBO polyethelene benchmark + +units metal +atom_style atomic + +read_data data.airebo + +replicate 17 16 2 + +neighbor 0.5 bin +neigh_modify delay 5 every 1 + +pair_style airebo/morse 3.0 1 1 +pair_coeff * * ../../potentials/CH.airebo-m C H + +velocity all create 300.0 761341 + +fix 1 all nve +timestep 0.0005 + +thermo 10 +run 100 diff --git a/examples/airebo/log.23Jun17.airebo-m.g++.1 b/examples/airebo/log.23Jun17.airebo-m.g++.1 new file mode 100644 index 0000000000..1483fcb4a6 --- /dev/null +++ b/examples/airebo/log.23Jun17.airebo-m.g++.1 @@ -0,0 +1,86 @@ +LAMMPS (23 Jun 2017) + using 1 OpenMP thread(s) per MPI task +# AIREBO polyethelene benchmark + +units metal +atom_style atomic + +read_data data.airebo + orthogonal box = (-2.1 -2.1 0) to (2.1 2.1 25.579) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 60 atoms + +replicate 17 16 2 + orthogonal box = (-2.1 -2.1 0) to (69.3 65.1 51.158) + 1 by 1 by 1 MPI processor grid + 32640 atoms + +neighbor 0.5 bin +neigh_modify delay 5 every 1 + +pair_style airebo/morse 3.0 1 1 +pair_coeff * * ../../potentials/CH.airebo-m C H +Reading potential file ../../potentials/CH.airebo-m with DATE: 2016-03-15 + +velocity all create 300.0 761341 + +fix 1 all nve +timestep 0.0005 + +thermo 10 +run 100 +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.7 + ghost atom cutoff = 10.7 + binsize = 5.35, bins = 14 13 10 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair airebo/morse, perpetual + attributes: full, newton on, ghost + pair build: full/bin/ghost + stencil: full/ghost/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 106.4 | 106.4 | 106.4 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 300 -139283.82 0 -138018.14 152.25271 + 10 166.76148 -138718.75 0 -138015.19 17412.343 + 20 207.7293 -138891.79 0 -138015.4 -19395.339 + 30 138.54469 -138596.42 0 -138011.92 -11909.248 + 40 153.95239 -138661.7 0 -138012.19 -2448.7701 + 50 126.22907 -138545.12 0 -138012.57 5206.1374 + 60 181.02757 -138778.28 0 -138014.54 22506.777 + 70 185.72779 -138799.18 0 -138015.61 -10803.744 + 80 164.28396 -138709.5 0 -138016.4 -1524.7353 + 90 180.26403 -138776.42 0 -138015.9 -27143.467 + 100 164.05694 -138706.58 0 -138014.44 5157.5516 +Loop time of 117.672 on 1 procs for 100 steps with 32640 atoms + +Performance: 0.037 ns/day, 653.734 hours/ns, 0.850 timesteps/s +99.3% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 108.31 | 108.31 | 108.31 | 0.0 | 92.04 +Neigh | 9.2199 | 9.2199 | 9.2199 | 0.0 | 7.84 +Comm | 0.052942 | 0.052942 | 0.052942 | 0.0 | 0.04 +Output | 0.0015149 | 0.0015149 | 0.0015149 | 0.0 | 0.00 +Modify | 0.060962 | 0.060962 | 0.060962 | 0.0 | 0.05 +Other | | 0.02656 | | | 0.02 + +Nlocal: 32640 ave 32640 max 32640 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 48094 ave 48094 max 48094 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 2.22109e+07 ave 2.22109e+07 max 2.22109e+07 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 22210922 +Ave neighs/atom = 680.482 +Neighbor list builds = 8 +Dangerous builds = 0 +Total wall time: 0:02:00 diff --git a/examples/airebo/log.23Jun17.airebo-m.g++.4 b/examples/airebo/log.23Jun17.airebo-m.g++.4 new file mode 100644 index 0000000000..3a3d922bcb --- /dev/null +++ b/examples/airebo/log.23Jun17.airebo-m.g++.4 @@ -0,0 +1,86 @@ +LAMMPS (23 Jun 2017) + using 1 OpenMP thread(s) per MPI task +# AIREBO polyethelene benchmark + +units metal +atom_style atomic + +read_data data.airebo + orthogonal box = (-2.1 -2.1 0) to (2.1 2.1 25.579) + 1 by 1 by 4 MPI processor grid + reading atoms ... + 60 atoms + +replicate 17 16 2 + orthogonal box = (-2.1 -2.1 0) to (69.3 65.1 51.158) + 2 by 2 by 1 MPI processor grid + 32640 atoms + +neighbor 0.5 bin +neigh_modify delay 5 every 1 + +pair_style airebo/morse 3.0 1 1 +pair_coeff * * ../../potentials/CH.airebo-m C H +Reading potential file ../../potentials/CH.airebo-m with DATE: 2016-03-15 + +velocity all create 300.0 761341 + +fix 1 all nve +timestep 0.0005 + +thermo 10 +run 100 +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.7 + ghost atom cutoff = 10.7 + binsize = 5.35, bins = 14 13 10 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair airebo/morse, perpetual + attributes: full, newton on, ghost + pair build: full/bin/ghost + stencil: full/ghost/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 29.37 | 29.75 | 30.13 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 300 -139283.82 0 -138018.14 152.25271 + 10 166.76148 -138718.75 0 -138015.19 17412.343 + 20 207.7293 -138891.79 0 -138015.4 -19395.339 + 30 138.54469 -138596.42 0 -138011.92 -11909.248 + 40 153.95239 -138661.7 0 -138012.19 -2448.7701 + 50 126.22907 -138545.12 0 -138012.57 5206.1374 + 60 181.02757 -138778.28 0 -138014.54 22506.777 + 70 185.72779 -138799.18 0 -138015.61 -10803.744 + 80 164.28396 -138709.5 0 -138016.4 -1524.7353 + 90 180.26403 -138776.42 0 -138015.9 -27143.467 + 100 164.05694 -138706.58 0 -138014.44 5157.5516 +Loop time of 32.9268 on 4 procs for 100 steps with 32640 atoms + +Performance: 0.131 ns/day, 182.927 hours/ns, 3.037 timesteps/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 28.045 | 28.537 | 29.42 | 10.4 | 86.67 +Neigh | 3.163 | 3.237 | 3.3761 | 4.7 | 9.83 +Comm | 0.09883 | 1.1206 | 1.6862 | 60.4 | 3.40 +Output | 0.00099325 | 0.0011329 | 0.0012462 | 0.3 | 0.00 +Modify | 0.016013 | 0.016726 | 0.017257 | 0.4 | 0.05 +Other | | 0.01459 | | | 0.04 + +Nlocal: 8160 ave 8167 max 8153 min +Histogram: 1 0 1 0 0 0 0 1 0 1 +Nghost: 22581 ave 22594 max 22569 min +Histogram: 1 0 0 0 1 1 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 5.55273e+06 ave 5.55908e+06 max 5.54496e+06 min +Histogram: 1 0 0 0 0 1 1 0 0 1 + +Total # of neighbors = 22210922 +Ave neighs/atom = 680.482 +Neighbor list builds = 8 +Dangerous builds = 0 +Total wall time: 0:00:33 diff --git a/examples/airebo/log.23Jun17.airebo.g++.1 b/examples/airebo/log.23Jun17.airebo.g++.1 new file mode 100644 index 0000000000..0ef895dc28 --- /dev/null +++ b/examples/airebo/log.23Jun17.airebo.g++.1 @@ -0,0 +1,86 @@ +LAMMPS (23 Jun 2017) + using 1 OpenMP thread(s) per MPI task +# AIREBO polyethelene benchmark + +units metal +atom_style atomic + +read_data data.airebo + orthogonal box = (-2.1 -2.1 0) to (2.1 2.1 25.579) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 60 atoms + +replicate 17 16 2 + orthogonal box = (-2.1 -2.1 0) to (69.3 65.1 51.158) + 1 by 1 by 1 MPI processor grid + 32640 atoms + +neighbor 0.5 bin +neigh_modify delay 5 every 1 + +pair_style airebo 3.0 1 1 +pair_coeff * * ../../potentials/CH.airebo C H +Reading potential file ../../potentials/CH.airebo with DATE: 2011-10-25 + +velocity all create 300.0 761341 + +fix 1 all nve +timestep 0.0005 + +thermo 10 +run 100 +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.7 + ghost atom cutoff = 10.7 + binsize = 5.35, bins = 14 13 10 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair airebo, perpetual + attributes: full, newton on, ghost + pair build: full/bin/ghost + stencil: full/ghost/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 106.4 | 106.4 | 106.4 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 300 -139300.72 0 -138035.04 7988.6647 + 10 161.34683 -138712.9 0 -138032.19 33228.921 + 20 208.59504 -138912.79 0 -138032.74 -3211.8806 + 30 139.7513 -138618.85 0 -138029.25 10878.143 + 40 142.14562 -138629.02 0 -138029.32 14601.302 + 50 114.23401 -138510.95 0 -138029 24691.125 + 60 164.92002 -138726 0 -138030.21 35125.541 + 70 162.15256 -138715.9 0 -138031.79 5658.7946 + 80 157.16184 -138695.77 0 -138032.72 19824.698 + 90 196.15907 -138860.65 0 -138033.07 -7950.8462 + 100 178.31875 -138784.89 0 -138032.57 30997.671 +Loop time of 110.107 on 1 procs for 100 steps with 32640 atoms + +Performance: 0.039 ns/day, 611.705 hours/ns, 0.908 timesteps/s +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 100.76 | 100.76 | 100.76 | 0.0 | 91.51 +Neigh | 9.1909 | 9.1909 | 9.1909 | 0.0 | 8.35 +Comm | 0.058134 | 0.058134 | 0.058134 | 0.0 | 0.05 +Output | 0.0015941 | 0.0015941 | 0.0015941 | 0.0 | 0.00 +Modify | 0.062212 | 0.062212 | 0.062212 | 0.0 | 0.06 +Other | | 0.03123 | | | 0.03 + +Nlocal: 32640 ave 32640 max 32640 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 48190 ave 48190 max 48190 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 2.22178e+07 ave 2.22178e+07 max 2.22178e+07 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 22217840 +Ave neighs/atom = 680.694 +Neighbor list builds = 8 +Dangerous builds = 0 +Total wall time: 0:01:52 diff --git a/examples/airebo/log.23Jun17.airebo.g++.4 b/examples/airebo/log.23Jun17.airebo.g++.4 new file mode 100644 index 0000000000..486b48a004 --- /dev/null +++ b/examples/airebo/log.23Jun17.airebo.g++.4 @@ -0,0 +1,86 @@ +LAMMPS (23 Jun 2017) + using 1 OpenMP thread(s) per MPI task +# AIREBO polyethelene benchmark + +units metal +atom_style atomic + +read_data data.airebo + orthogonal box = (-2.1 -2.1 0) to (2.1 2.1 25.579) + 1 by 1 by 4 MPI processor grid + reading atoms ... + 60 atoms + +replicate 17 16 2 + orthogonal box = (-2.1 -2.1 0) to (69.3 65.1 51.158) + 2 by 2 by 1 MPI processor grid + 32640 atoms + +neighbor 0.5 bin +neigh_modify delay 5 every 1 + +pair_style airebo 3.0 1 1 +pair_coeff * * ../../potentials/CH.airebo C H +Reading potential file ../../potentials/CH.airebo with DATE: 2011-10-25 + +velocity all create 300.0 761341 + +fix 1 all nve +timestep 0.0005 + +thermo 10 +run 100 +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.7 + ghost atom cutoff = 10.7 + binsize = 5.35, bins = 14 13 10 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair airebo, perpetual + attributes: full, newton on, ghost + pair build: full/bin/ghost + stencil: full/ghost/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 29.37 | 29.75 | 30.13 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 300 -139300.72 0 -138035.04 7988.6647 + 10 161.34683 -138712.9 0 -138032.19 33228.921 + 20 208.59504 -138912.79 0 -138032.74 -3211.8806 + 30 139.7513 -138618.85 0 -138029.25 10878.143 + 40 142.14562 -138629.02 0 -138029.32 14601.302 + 50 114.23401 -138510.95 0 -138029 24691.125 + 60 164.92002 -138726 0 -138030.21 35125.541 + 70 162.15256 -138715.9 0 -138031.79 5658.7946 + 80 157.16184 -138695.77 0 -138032.72 19824.698 + 90 196.15907 -138860.65 0 -138033.07 -7950.8462 + 100 178.31875 -138784.89 0 -138032.57 30997.671 +Loop time of 30.1916 on 4 procs for 100 steps with 32640 atoms + +Performance: 0.143 ns/day, 167.731 hours/ns, 3.312 timesteps/s +99.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 26.083 | 26.31 | 26.795 | 5.5 | 87.14 +Neigh | 3.1781 | 3.2134 | 3.2775 | 2.2 | 10.64 +Comm | 0.086296 | 0.63643 | 0.88995 | 40.2 | 2.11 +Output | 0.00074124 | 0.0010698 | 0.0013616 | 0.7 | 0.00 +Modify | 0.015335 | 0.016373 | 0.017565 | 0.8 | 0.05 +Other | | 0.01457 | | | 0.05 + +Nlocal: 8160 ave 8174 max 8146 min +Histogram: 1 0 1 0 0 0 0 1 0 1 +Nghost: 22614.5 ave 22629 max 22601 min +Histogram: 1 1 0 0 0 0 0 1 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 5.55446e+06 ave 5.56556e+06 max 5.54192e+06 min +Histogram: 1 0 0 1 0 0 0 1 0 1 + +Total # of neighbors = 22217840 +Ave neighs/atom = 680.694 +Neighbor list builds = 8 +Dangerous builds = 0 +Total wall time: 0:00:30 -- GitLab From a5234d7aeaf5ad99ac2588b8f6bbacfe257c6ccb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 22:34:34 -0400 Subject: [PATCH 431/593] fix bug reported by richard berger via https://ci.lammps.org/job/lammps/job/master/job/regression/160/testReport/junit/examples/msst/msst/ --- src/SHOCK/fix_msst.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index 6399b10fa2..e14660d9b8 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -434,6 +434,7 @@ void FixMSST::setup(int vflag) // trigger virial computation on next timestep + pe->addstep(update->ntimestep+1); pressure->addstep(update->ntimestep+1); } -- GitLab From 7f63c09667ffd6037492704a88cae479d802df4e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 22:35:58 -0400 Subject: [PATCH 432/593] correct comment for Fix::ev_setup() --- src/fix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fix.cpp b/src/fix.cpp index ca9a69606c..e6e8a292b9 100644 --- a/src/fix.cpp +++ b/src/fix.cpp @@ -161,7 +161,7 @@ void Fix::modify_params(int narg, char **arg) /* ---------------------------------------------------------------------- setup for energy, virial computation see integrate::ev_set() for values of eflag (0-3) and vflag (0-6) - fixes call this if use ev_tally() + fixes call this if they use ev_tally() ------------------------------------------------------------------------- */ void Fix::ev_setup(int eflag, int vflag) -- GitLab From 4ee7c6f5caa80f2b3af1563a072bfd566b399b1f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 6 Jul 2017 00:23:50 -0400 Subject: [PATCH 433/593] remove code without effect --- src/SHOCK/fix_msst.cpp | 14 +++----------- src/SHOCK/fix_msst.h | 1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index e14660d9b8..cd4d6c0325 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -469,7 +469,7 @@ void FixMSST::initial_integrate(int vflag) // must convert energy to mv^2 units if (dftb) { - TS_dftb = fix_external->compute_vector(0); + double TS_dftb = fix_external->compute_vector(0); TS = force->ftm2v*TS_dftb; if (update->ntimestep == 1) T0S0 = TS; } else { @@ -669,7 +669,7 @@ void FixMSST::final_integrate() { int i; double p_msst; // MSST driving pressure - double TS,TS_term,escale_term; + double TS_term,escale_term; // v update only for atoms in MSST group @@ -683,15 +683,7 @@ void FixMSST::final_integrate() int sd = direction; - // for DFTB, extract TS_dftb from fix external - // must convert energy to mv^2 units - - if (dftb) { - TS_dftb = fix_external->compute_vector(0); - TS = force->ftm2v*TS_dftb; - } else TS = 0.0; - - // compute etot + extra terms for conserved quantity + // compute etot + extra terms for conserved quantity double e_scale = compute_etotal() + compute_scalar(); diff --git a/src/SHOCK/fix_msst.h b/src/SHOCK/fix_msst.h index 450256bcab..5a88ba8c54 100644 --- a/src/SHOCK/fix_msst.h +++ b/src/SHOCK/fix_msst.h @@ -93,7 +93,6 @@ class FixMSST : public Fix { double beta; // Energy conservation scaling factor int maxold; // allocated size of old_velocity - double TS_dftb; // value needed from DFTB+ via fix external class FixExternal *fix_external; // ptr to fix external // functions -- GitLab From 0423971205006fa83b3f377297ff8abdb10a0189 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 6 Jul 2017 00:24:00 -0400 Subject: [PATCH 434/593] whitespace cleanup --- src/SHOCK/fix_msst.cpp | 20 ++++++++++---------- src/SHOCK/fix_msst.h | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index cd4d6c0325..b66f0ed4d3 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -42,8 +42,8 @@ using namespace FixConst; /* ---------------------------------------------------------------------- */ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), old_velocity(NULL), rfix(NULL), - id_temp(NULL), id_press(NULL), id_pe(NULL), temperature(NULL), + Fix(lmp, narg, arg), old_velocity(NULL), rfix(NULL), + id_temp(NULL), id_press(NULL), id_pe(NULL), temperature(NULL), pressure(NULL), pe(NULL) { if (narg < 4) error->all(FLERR,"Illegal fix msst command"); @@ -131,7 +131,7 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : } else if (strcmp(arg[iarg],"beta") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix msst command"); beta = force->numeric(FLERR,arg[iarg+1]); - if (beta < 0.0 || beta > 1.0) + if (beta < 0.0 || beta > 1.0) error->all(FLERR,"Illegal fix msst command"); iarg += 2; } else error->all(FLERR,"Illegal fix msst command"); @@ -348,7 +348,7 @@ void FixMSST::init() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"external") == 0) fix_external = (FixExternal *) modify->fix[i]; - if (fix_external == NULL) + if (fix_external == NULL) error->all(FLERR,"Fix msst dftb cannot be used w/out fix external"); } } @@ -494,7 +494,7 @@ void FixMSST::initial_integrate(int vflag) TS_int += (update->dt*TS_dot); //TS_int += (update->dt*TS_dot)/total_mass; - // compute etot + extra terms for conserved quantity + // compute etot + extra terms for conserved quantity double e_scale = compute_etotal() + compute_scalar(); @@ -532,7 +532,7 @@ void FixMSST::initial_integrate(int vflag) for ( k = 0; k < 3; k++ ) { double C = f[i][k] * force->ftm2v / mass[type[i]]; TS_term = TS_dot/(mass[type[i]]*velocity_sum); - escale_term = force->ftm2v*beta*(e0-e_scale) / + escale_term = force->ftm2v*beta*(e0-e_scale) / (mass[type[i]]*velocity_sum); double D = mu * omega[sd] * omega[sd] / (velocity_sum * mass[type[i]] * vol ); @@ -592,7 +592,7 @@ void FixMSST::initial_integrate(int vflag) for ( k = 0; k < 3; k++ ) { double C = f[i][k] * force->ftm2v / mass[type[i]]; TS_term = TS_dot/(mass[type[i]]*velocity_sum); - escale_term = force->ftm2v*beta*(e0-e_scale) / + escale_term = force->ftm2v*beta*(e0-e_scale) / (mass[type[i]]*velocity_sum); double D = mu * omega[sd] * omega[sd] / (velocity_sum * mass[type[i]] * vol ); @@ -695,7 +695,7 @@ void FixMSST::final_integrate() for ( int k = 0; k < 3; k++ ) { double C = f[i][k] * force->ftm2v / mass[type[i]]; TS_term = TS_dot/(mass[type[i]]*velocity_sum); - escale_term = force->ftm2v*beta*(e0-e_scale) / + escale_term = force->ftm2v*beta*(e0-e_scale) / (mass[type[i]]*velocity_sum); double D = mu * omega[sd] * omega[sd] / (velocity_sum * mass[type[i]] * vol ); @@ -868,7 +868,7 @@ void FixMSST::restart(char *buf) omega[direction] = list[n++]; e0 = list[n++]; v0 = list[n++]; - p0 = list[n++]; + p0 = list[n++]; TS_int = list[n++]; tscale = 0.0; // set tscale to zero for restart p0_set = 1; @@ -892,7 +892,7 @@ int FixMSST::modify_param(int narg, char **arg) strcpy(id_temp,arg[1]); int icompute = modify->find_compute(id_temp); - if (icompute < 0) + if (icompute < 0) error->all(FLERR,"Could not find fix_modify temperature ID"); temperature = modify->compute[icompute]; diff --git a/src/SHOCK/fix_msst.h b/src/SHOCK/fix_msst.h index 5a88ba8c54..092017bfbb 100644 --- a/src/SHOCK/fix_msst.h +++ b/src/SHOCK/fix_msst.h @@ -54,12 +54,12 @@ class FixMSST : public Fix { int dftb; // flag for use with DFTB+ double velocity_sum; // Sum of the velocities squared - double damping; // Damping function for TS force term at + double damping; // Damping function for TS force term at // small volume difference (v0 - vol) - double T0S0; // Initial TS term for DFTB+ simulations - double S_elec,S_elec_1,S_elec_2; // time history of electron entropy - // for DFTB+ simulaitons - double TS_dot; // time derivative of TS term for + double T0S0; // Initial TS term for DFTB+ simulations + double S_elec,S_elec_1,S_elec_2; // time history of electron entropy + // for DFTB+ simulaitons + double TS_dot; // time derivative of TS term for // DFTB+ simulations double **old_velocity; // Saved velocities @@ -88,7 +88,7 @@ class FixMSST : public Fix { int p0_set; // Is pressure set int v0_set; // Is volume set int e0_set; // Is energy set - double TS_int; // Needed for conserved quantity + double TS_int; // Needed for conserved quantity // with thermal electronic excitations double beta; // Energy conservation scaling factor -- GitLab From 47649ff50f3ab81e702e9866dca45945b5e8dd77 Mon Sep 17 00:00:00 2001 From: Abdo Date: Thu, 6 Jul 2017 15:35:06 +0900 Subject: [PATCH 435/593] some edits to make examples more illustrative. --- examples/USER/misc/ees/Data_region | 12 ++++++------ examples/USER/misc/ees/README | 8 ++++---- examples/USER/misc/ees/in.fix_wall | 10 +++++----- examples/USER/misc/ees/in.fix_wall_region | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/USER/misc/ees/Data_region b/examples/USER/misc/ees/Data_region index 1b3dc65dde..e48c5342d0 100644 --- a/examples/USER/misc/ees/Data_region +++ b/examples/USER/misc/ees/Data_region @@ -8,9 +8,9 @@ Atoms atom-ID atom-type ellipsoidflag density x y z -1 1 1 1 5 30 30 -2 1 1 1 30 5 30 -3 1 1 1 30 30 5 +1 1 1 1 10 30 30 +2 1 1 1 30 10 30 +3 1 1 1 30 30 10 Ellipsoids @@ -22,7 +22,7 @@ atom-ID shapex shapey shapez quatw quati quatj quatk Velocities -1 1.3 0 0 1 0 5 -2 0 .2 0 .1 3 0 -3 0 0 .9 .5 5 1 +1 1.3 0 0 0 0 50 +2 0 .5 0 .1 3 10 +3 0 0 .9 .5 61 1 diff --git a/examples/USER/misc/ees/README b/examples/USER/misc/ees/README index 4eb40665a3..9f4cb4f159 100644 --- a/examples/USER/misc/ees/README +++ b/examples/USER/misc/ees/README @@ -1,13 +1,13 @@ -Here one may find simple examples that show how to use "fix wall/ess" and "fix wall/region/ess" commands. +Here one may find simple examples showing how "fix wall/ess" and "fix wall/region/ess" work. --in.fix_wall_region: - This input file uses Data_region file to setup a system of three particles colliding with a + This input uses "Data_region" to setup a system of three particles colliding with a cubic region which its walls interact with particle with EES potential. To find out details of how to set parameters of "fix wall/region/ees" see documentaion. --in.fix_wall - This input file uses Data_wall to confine a ellipsoidal particle between two EES walls to - show how to use "fix wall/ees" command. For more details lookup LAMMPS's documentation. + This input uses "Data_wall" to confine a ellipsoidal particle between two EES walls. + For more details lookup LAMMPS's documentation under "fix wall/ess" command. diff --git a/examples/USER/misc/ees/in.fix_wall b/examples/USER/misc/ees/in.fix_wall index 6ea3b67d3b..d0306bea63 100644 --- a/examples/USER/misc/ees/in.fix_wall +++ b/examples/USER/misc/ees/in.fix_wall @@ -1,4 +1,4 @@ - +log log_substrate units lj atom_style ellipsoid boundary p p f @@ -7,7 +7,7 @@ read_data Data_wall pair_style resquared 1 pair_coeff 1 1 10.0 1.0 0.5 0.5 4 0.5 0.5 4 1 #------------------------------------# -timestep 0.0001 +timestep 0.0002 #------------------------------------# compute temp all temp/asphere @@ -18,7 +18,7 @@ fix EES_substrate all wall/ees zhi EDGE 10 1 10 zlo EDGE 10 1 10 thermo_style custom step temp press etotal f_EES_substrate f_EES_substrate[1] -fix NVT all nve/asphere +fix NVE all nve/asphere #------------------------------------# compute qw all property/atom quatw compute qi all property/atom quati @@ -26,6 +26,6 @@ compute qj all property/atom quatj compute qk all property/atom quatk #------------------------------------# thermo 500 -dump 1 all custom 500 dump1 id type x y z c_qw c_qi c_qj c_qk -run 2000 +dump 1 all custom 1000 dump_substrate id type x y z c_qw c_qi c_qj c_qk +run 40000 diff --git a/examples/USER/misc/ees/in.fix_wall_region b/examples/USER/misc/ees/in.fix_wall_region index 655fb6e724..fb16f23481 100644 --- a/examples/USER/misc/ees/in.fix_wall_region +++ b/examples/USER/misc/ees/in.fix_wall_region @@ -1,4 +1,4 @@ - +log log_region units lj atom_style ellipsoid boundary p p p @@ -9,7 +9,7 @@ region the_wall block 20. 40. 20. 40. 20. 40. side out pair_style resquared 1 pair_coeff 1 1 10.0 1.0 0.5 0.5 4 0.5 0.5 4 1 #------------------------------------# -timestep 0.0001 +timestep 0.0005 #------------------------------------# fix EES_block all wall/region/ees the_wall 10. 1. 20 @@ -17,7 +17,7 @@ fix EES_block all wall/region/ees the_wall 10. 1. 20 thermo_style custom step temp press etotal f_EES_block[1] f_EES_block[3] -fix NVT all nve/asphere +fix NVE all nve/asphere #------------------------------------# compute qw all property/atom quatw compute qi all property/atom quati @@ -25,6 +25,6 @@ compute qj all property/atom quatj compute qk all property/atom quatk #------------------------------------# thermo 500 -#dump 1 all custom 500 dump1 id type x y z c_qw c_qi c_qj c_qk -run 2000 +dump 1 all custom 1000 dump_region id type x y z c_qw c_qi c_qj c_qk +run 50000 -- GitLab From 33be51af54323bf87c9cb2996d5768818de7f9a8 Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Thu, 6 Jul 2017 20:19:40 +0900 Subject: [PATCH 436/593] Deleted "fix wall/region/ees" doc file --- doc/src/fix_wall_region_ees.txt | 48 --------------------------------- 1 file changed, 48 deletions(-) diff --git a/doc/src/fix_wall_region_ees.txt b/doc/src/fix_wall_region_ees.txt index 6171291bc0..8b13789179 100644 --- a/doc/src/fix_wall_region_ees.txt +++ b/doc/src/fix_wall_region_ees.txt @@ -1,49 +1 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -fix wall/region/ees command :h3 - -[Syntax:] - -fix ID group-ID wall/region/ees region-ID epsilon sigma cutoff :pre - -ID, group-ID are documented in "fix"_fix.html command -wall/region = style name of this fix command -region-ID = region whose boundary will act as wall -epsilon = strength factor for wall-particle interaction (energy or energy/distance^2 units) -sigma = size factor for wall-particle interaction (distance units) -cutoff = distance from wall at which wall-particle interaction is cut off (distance units) :ul - -[Examples:] - -fix wall all wall/region/ees mySphere 1.0 1.0 2.5 :pre - -[Description:] - -Treat the surface of the geometric region defined by the {region-ID} -as a bounding wall which interacts with nearby ellipsoidal particles according to -the EES potential introduced "fix wall/ees"_fix_wall_ees.html. - -Other details of this command is the same wiht "fix wall/region"_fix_wall_region.html command. -One may also find and exapmle of using this code in USER/ees/ under examples/ directory. - -[Restrictions:] - -This fix is part of the USER-MISC package. It is only enabled if LAMMPS -was built with that package. See the "Making -LAMMPS"_Section_start.html#start_3 section for more info. - -This fix requires that atoms be ellipsoids as defined by the -"atom_style ellipsoid"_atom_style.html command. - -[Related commands:] - -"fix wall/lj93"_fix_wall.html, -"fix wall/ees"_fix_wall_ees.html - -[Default:] none -- GitLab From a62eb43791daccf3a7780090ff2bda50308a4e2a Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Thu, 6 Jul 2017 20:20:12 +0900 Subject: [PATCH 437/593] Delete "fix_wall_region_ees.txt" --- doc/src/fix_wall_region_ees.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 doc/src/fix_wall_region_ees.txt diff --git a/doc/src/fix_wall_region_ees.txt b/doc/src/fix_wall_region_ees.txt deleted file mode 100644 index 8b13789179..0000000000 --- a/doc/src/fix_wall_region_ees.txt +++ /dev/null @@ -1 +0,0 @@ - -- GitLab From 8be6d5bfd841ee1b06e7e7de25b386af80b123ed Mon Sep 17 00:00:00 2001 From: Abdoreza Ershadinia Date: Thu, 6 Jul 2017 20:21:55 +0900 Subject: [PATCH 438/593] Merged two doc files --- doc/src/fix_wall_ees.txt | 41 ++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/doc/src/fix_wall_ees.txt b/doc/src/fix_wall_ees.txt index 5b08a22935..450d743372 100644 --- a/doc/src/fix_wall_ees.txt +++ b/doc/src/fix_wall_ees.txt @@ -8,6 +8,7 @@ fix wall/ees command :h3 +fix wall/region/ees command :h3 [Syntax:] @@ -26,29 +27,32 @@ face = {xlo} or {xhi} or {ylo} or {yhi} or {zlo} or {zhi} :l sigma = size factor for wall-particle interaction (distance units) sigma can be a variable (see below) cutoff = distance from wall at which wall-particle interaction is cut off (distance units) :pre -zero or more keyword/value pairs may be appended :l -keyword = {units} or {fld} :l - {units} value = {lattice} or {box} - {lattice} = the wall position is defined in lattice units - {box} = the wall position is defined in simulation box units - {fld} value = {yes} or {no} - {yes} = invoke the wall constraint to be compatible with implicit FLD - {no} = invoke the wall constraint in the normal way - {pbc} value = {yes} or {no} - {yes} = allow periodic boundary in a wall dimension - {no} = require non-perioidic boundaries in any wall dimension :pre :ule + + +fix ID group-ID wall/region/ees region-ID epsilon sigma cutoff :pre + +ID, group-ID are documented in "fix"_fix.html command +wall/region = style name of this fix command +region-ID = region whose boundary will act as wall +epsilon = strength factor for wall-particle interaction (energy or energy/distance^2 units) +sigma = size factor for wall-particle interaction (distance units) +cutoff = distance from wall at which wall-particle interaction is cut off (distance units) :ul + [Examples:] fix wallhi all wall/ees xlo -1.0 1.0 1.0 2.5 units box fix wallhi all wall/ees xhi EDGE 1.0 1.0 2.5 fix wallhi all wall/ees v_wiggle 23.2 1.0 1.0 2.5 -fix zwalls all wall/ees zlo 0.0 1.0 1.0 0.858 zhi 40.0 1.0 1.0 0.858 :pre +fix zwalls all wall/ees zlo 0.0 1.0 1.0 0.858 zhi 40.0 1.0 1.0 0.858 + +fix ees_cube all wall/region/ees myCube 1.0 1.0 2.5 :pre + [Description:]   -Bound the simulation domain on one or more of its faces with a flat +"Fix wall/ees" bounds the simulation domain on one or more of its faces with a flat wall that interacts with the ellipsoidal atoms in the group by generating a force on the atom in a direction perpendicular to the wall and a torque parallel with the wall.  The energy of wall-particle interactions E is given by: @@ -82,7 +86,16 @@ all particles in the group, or LAMMPS will generate an error.  This means you cannot start your simulation with particles touching the wall position {coord} (r = sigma_n) or with particles penetrating the wall (0 =< r < sigma_n) or with particles on the wrong side of the wall (r < 0). -  + + + +"fix wall/region/ees" treat the surface of the geometric region defined by the {region-ID} +as a bounding wall which interacts with nearby ellipsoidal particles according to +the EES potential introduced above. + +Other details of this command is the same wiht "fix wall/region"_fix_wall_region.html command. +One may also find and exapmle of using this code in USER/ees/ under examples/ directory. + [Restrictions:] This fix is part of the USER-MISC package. It is only enabled if LAMMPS -- GitLab From 423e3b6389dc4584d0194b1697be0eccf29a7447 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 6 Jul 2017 14:45:51 -0400 Subject: [PATCH 439/593] integrate fix wall/ees and wall/region/ees into doc system --- doc/src/Section_commands.txt | 4 +++- doc/src/fixes.txt | 1 + doc/src/lammps.book | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index 6e526dcb51..df283f62e2 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -732,7 +732,9 @@ package"_Section_start.html#start_3. "smd/wall/surface"_fix_smd_wall_surface.html, "temp/rescale/eff"_fix_temp_rescale_eff.html, "ti/spring"_fix_ti_spring.html, -"ttm/mod"_fix_ttm.html :tb(c=6,ea=c) +"ttm/mod"_fix_ttm.html +"wall/ees"_fix_wall_ees.html +"wall/region/ees"_fix_wall_ees.html :tb(c=6,ea=c) :line diff --git a/doc/src/fixes.txt b/doc/src/fixes.txt index 7997f6f1d4..733d402057 100644 --- a/doc/src/fixes.txt +++ b/doc/src/fixes.txt @@ -154,6 +154,7 @@ Fixes :h1 fix_viscosity fix_viscous fix_wall + fix_wall_ees fix_wall_gran fix_wall_gran_region fix_wall_piston diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 3186865fb6..09d9e2906d 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -280,6 +280,7 @@ fix_vector.html fix_viscosity.html fix_viscous.html fix_wall.html +fix_wall_ees.html fix_wall_gran.html fix_wall_gran_region.html fix_wall_piston.html -- GitLab From 23925b3a57fcd51e862a19756348d46c632f69df Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 6 Jul 2017 14:47:44 -0400 Subject: [PATCH 440/593] update fix wall/ees and wall/region/ees file to conform more to common formatting also fix some typos and formatting issues --- doc/src/fix_wall_ees.txt | 93 +++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 49 deletions(-) diff --git a/doc/src/fix_wall_ees.txt b/doc/src/fix_wall_ees.txt index 450d743372..a8688e8e41 100644 --- a/doc/src/fix_wall_ees.txt +++ b/doc/src/fix_wall_ees.txt @@ -7,17 +7,17 @@ :line fix wall/ees command :h3 - fix wall/region/ees command :h3 [Syntax:] -fix ID group-ID wall/ees face args ... keyword value ... :pre +fix ID group-ID style args :pre ID, group-ID are documented in "fix"_fix.html command :ulb,l -one or more face/arg pairs may be appended :l -face = {xlo} or {xhi} or {ylo} or {yhi} or {zlo} or {zhi} :l - args = coord epsilon sigma cutoff +style = {wall/ees} or {wall/region/ees} :l + args for style {wall/ees}: one or more {face parameters} groups may be appended + face = {xlo} or {xhi} or {ylo} or {yhi} or {zlo} or {zhi} + parameters = coord epsilon sigma cutoff coord = position of wall = EDGE or constant or variable EDGE = current lo or hi edge of simulation box constant = number like 0.0 or -30.0 (distance units) @@ -27,60 +27,57 @@ face = {xlo} or {xhi} or {ylo} or {yhi} or {zlo} or {zhi} :l sigma = size factor for wall-particle interaction (distance units) sigma can be a variable (see below) cutoff = distance from wall at which wall-particle interaction is cut off (distance units) :pre -:ule - - - -fix ID group-ID wall/region/ees region-ID epsilon sigma cutoff :pre -ID, group-ID are documented in "fix"_fix.html command -wall/region = style name of this fix command -region-ID = region whose boundary will act as wall -epsilon = strength factor for wall-particle interaction (energy or energy/distance^2 units) -sigma = size factor for wall-particle interaction (distance units) -cutoff = distance from wall at which wall-particle interaction is cut off (distance units) :ul + args for style {wall/region/ees}: {region-ID} {epsilon} {sigma} {cutoff} + region-ID = region whose boundary will act as wall + epsilon = strength factor for wall-particle interaction (energy or energy/distance^2 units) + sigma = size factor for wall-particle interaction (distance units) + cutoff = distance from wall at which wall-particle interaction is cut off (distance units) :pre + :ule [Examples:] fix wallhi all wall/ees xlo -1.0 1.0 1.0 2.5 units box fix wallhi all wall/ees xhi EDGE 1.0 1.0 2.5 fix wallhi all wall/ees v_wiggle 23.2 1.0 1.0 2.5 -fix zwalls all wall/ees zlo 0.0 1.0 1.0 0.858 zhi 40.0 1.0 1.0 0.858 +fix zwalls all wall/ees zlo 0.0 1.0 1.0 0.858 zhi 40.0 1.0 1.0 0.858 :pre fix ees_cube all wall/region/ees myCube 1.0 1.0 2.5 :pre [Description:] -  -"Fix wall/ees" bounds the simulation domain on one or more of its faces with a flat -wall that interacts with the ellipsoidal atoms in the group by generating a force -on the atom in a direction perpendicular to the wall and a torque parallel with the wall.  The energy of -wall-particle interactions E is given by: - - +Fix {wall/ees} bounds the simulation domain on one or more of its +faces with a flat wall that interacts with the ellipsoidal atoms in the +group by generating a force on the atom in a direction perpendicular to +the wall and a torque parallel with the wall.  The energy of +wall-particle interactions E is given by: :c,image(Eqs/fix_wall_ees.jpg) -  -  -Introduced by Babadi and Ejtehadi in "(Babadi)"_#BabadiEjtehadi. Here, {r} is the distance from the particle to the wall at -position {coord}, and Rc is the {cutoff} distance at which the  -particle and wall no longer interact. Also,  sigma_n is the distance between center of ellipsoid and the nearest point of its surface to the wall  The energy of the wall (see the image below). + +Introduced by Babadi and Ejtehadi in "(Babadi)"_#BabadiEjtehadi. Here, +{r} is the distance from the particle to the wall at position {coord}, +and Rc is the {cutoff} distance at which the  particle and wall no +longer interact. Also,  sigma_n is the distance between center of +ellipsoid and the nearest point of its surface to the wall  The energy +of the wall (see the image below). :c,image(JPG/fix_wall_ees_image.jpg) -  -Details of using this command and specifications are the same as fix/wall command. You can also find an example in USER/ees/ under examples/ directory. -  +Details of using this command and specifications are the same as +fix/wall command. You can also find an example in USER/ees/ under +examples/ directory. + The prefactor {epsilon} can be thought of as an effective Hamaker constant with energy units for the strength of the ellipsoid-wall interaction.  More specifically, the {epsilon} pre-factor -= 8 * pi^2 * rho_wall * rho_ellipsoid * epsilon * sigma_a * sigma_b * sigma_c, where epsilon -is the LJ parameters for the constituent LJ -particles and sigma_a, sigma_b, and sigma_c are radii of ellipsoidal particles. Rho_wall and rho_ellipsoid are the number density of the -constituent particles, in the wall and ellipsoid respectively, in units -of 1/volume. -  += 8 * pi^2 * rho_wall * rho_ellipsoid * epsilon +* sigma_a * sigma_b * sigma_c, where epsilon is the LJ parameters for +the constituent LJ particles and sigma_a, sigma_b, and sigma_c are radii +of ellipsoidal particles. Rho_wall and rho_ellipsoid are the number +density of the constituent particles, in the wall and ellipsoid +respectively, in units of 1/volume. + NOTE: You must insure that r is always bigger than sigma_n for all particles in the group, or LAMMPS will generate an error.  This means you cannot start your simulation with particles touching the wall @@ -88,18 +85,18 @@ position {coord} (r = sigma_n) or with particles penetrating the wall (0 =< r < wall (r < 0). +Fix {wall/region/ees} treats the surface of the geometric region defined +by the {region-ID} as a bounding wall which interacts with nearby +ellipsoidal particles according to the EES potential introduced above. -"fix wall/region/ees" treat the surface of the geometric region defined by the {region-ID} -as a bounding wall which interacts with nearby ellipsoidal particles according to -the EES potential introduced above. - -Other details of this command is the same wiht "fix wall/region"_fix_wall_region.html command. -One may also find and exapmle of using this code in USER/ees/ under examples/ directory. +Other details of this command are the same as for the "fix +wall/region"_fix_wall_region.html command. One may also find an example +of using this fix in the examples/USER/misc/ees/ directory. [Restrictions:] -This fix is part of the USER-MISC package. It is only enabled if LAMMPS -was built with that package. See the "Making +This fix is part of the USER-MISC package. It is only enabled if +LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. This fix requires that atoms be ellipsoids as defined by the @@ -112,11 +109,9 @@ This fix requires that atoms be ellipsoids as defined by the [Default:] -The option defaults units = lattice, fld = no, and pbc = no. +none :line :link(BabadiEjtehadi) [(Babadi)] Babadi and Ejtehadi, EPL, 77 (2007) 23002. -:link(Babadi) -[(Berardi)] Babadi, Ejtehadi, Everaers, J Comp Phys, 219, 770-779 (2006). -- GitLab From 43393799487783098575ef4a1de654ad32369fe7 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 6 Jul 2017 13:58:26 -0600 Subject: [PATCH 441/593] patch 6Jul17 --- doc/src/Manual.txt | 4 ++-- src/version.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index 444e901a40..36391731d0 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -1,7 +1,7 @@ LAMMPS Users Manual - + @@ -21,7 +21,7 @@

    LAMMPS Documentation :c,h3 -23 Jun 2017 version :c,h4 +6 Jul 2017 version :c,h4 Version info: :h4 diff --git a/src/version.h b/src/version.h index 07bfcc3885..3fbe238325 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "23 Jun 2017" +#define LAMMPS_VERSION "6 Jul 2017" -- GitLab From 7193fffe0d1c465a39c835d87bb0be1a4d4dee0e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 6 Jul 2017 16:08:25 -0400 Subject: [PATCH 442/593] make example input / output conform with LAMMPS conventions (no dump files, no log command) and update reference outputs --- examples/USER/misc/ees/in.fix_wall | 3 +- examples/USER/misc/ees/in.fix_wall_region | 3 +- .../USER/misc/ees/log.23Jun17.fix_wall.g++.1 | 162 ++++++++++++++++ .../USER/misc/ees/log.23Jun17.fix_wall.g++.4 | 162 ++++++++++++++++ .../ees/log.23Jun17.fix_wall_region.g++.1 | 180 ++++++++++++++++++ .../ees/log.23Jun17.fix_wall_region.g++.4 | 180 ++++++++++++++++++ 6 files changed, 686 insertions(+), 4 deletions(-) create mode 100644 examples/USER/misc/ees/log.23Jun17.fix_wall.g++.1 create mode 100644 examples/USER/misc/ees/log.23Jun17.fix_wall.g++.4 create mode 100644 examples/USER/misc/ees/log.23Jun17.fix_wall_region.g++.1 create mode 100644 examples/USER/misc/ees/log.23Jun17.fix_wall_region.g++.4 diff --git a/examples/USER/misc/ees/in.fix_wall b/examples/USER/misc/ees/in.fix_wall index d0306bea63..42f03fb1a5 100644 --- a/examples/USER/misc/ees/in.fix_wall +++ b/examples/USER/misc/ees/in.fix_wall @@ -1,4 +1,3 @@ -log log_substrate units lj atom_style ellipsoid boundary p p f @@ -26,6 +25,6 @@ compute qj all property/atom quatj compute qk all property/atom quatk #------------------------------------# thermo 500 -dump 1 all custom 1000 dump_substrate id type x y z c_qw c_qi c_qj c_qk +#dump 1 all custom 1000 dump_substrate id type x y z c_qw c_qi c_qj c_qk run 40000 diff --git a/examples/USER/misc/ees/in.fix_wall_region b/examples/USER/misc/ees/in.fix_wall_region index fb16f23481..c3a2ea2488 100644 --- a/examples/USER/misc/ees/in.fix_wall_region +++ b/examples/USER/misc/ees/in.fix_wall_region @@ -1,4 +1,3 @@ -log log_region units lj atom_style ellipsoid boundary p p p @@ -25,6 +24,6 @@ compute qj all property/atom quatj compute qk all property/atom quatk #------------------------------------# thermo 500 -dump 1 all custom 1000 dump_region id type x y z c_qw c_qi c_qj c_qk +#dump 1 all custom 1000 dump_region id type x y z c_qw c_qi c_qj c_qk run 50000 diff --git a/examples/USER/misc/ees/log.23Jun17.fix_wall.g++.1 b/examples/USER/misc/ees/log.23Jun17.fix_wall.g++.1 new file mode 100644 index 0000000000..91e39687bb --- /dev/null +++ b/examples/USER/misc/ees/log.23Jun17.fix_wall.g++.1 @@ -0,0 +1,162 @@ +LAMMPS (23 Jun 2017) + using 1 OpenMP thread(s) per MPI task +units lj +atom_style ellipsoid +boundary p p f +read_data Data_wall + orthogonal box = (0 0 0) to (60 60 60) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 1 atoms + 1 ellipsoids + reading velocities ... + 1 velocities +#------------------------------------# +pair_style resquared 1 +pair_coeff 1 1 10.0 1.0 0.5 0.5 4 0.5 0.5 4 1 +#------------------------------------# +timestep 0.0002 +#------------------------------------# + +compute temp all temp/asphere +thermo_modify temp temp + +fix EES_substrate all wall/ees zhi EDGE 10 1 10 zlo EDGE 10 1 10 +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^# + +thermo_style custom step temp press etotal f_EES_substrate f_EES_substrate[1] +WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:705) + +fix NVE all nve/asphere +#------------------------------------# +compute qw all property/atom quatw +compute qi all property/atom quati +compute qj all property/atom quatj +compute qk all property/atom quatk +#------------------------------------# +thermo 500 +#dump 1 all custom 1000 dump_substrate id type x y z c_qw c_qi c_qj c_qk +run 40000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 1.3 + binsize = 0.65, bins = 93 93 93 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair resquared, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 7.95 | 7.95 | 7.95 Mbytes +Step Temp Press TotEng f_EES_substrate f_EES_substrate[1] + 0 0 0.00054301475 0 0 0 + 500 0 0.00054301501 0 -0.002011167 -0.00089853601 + 1000 0 0.0005430153 0 -0.0021039425 -0.00095953758 + 1500 0 0.00054301561 0 -0.0022030914 -0.0010262478 + 2000 0 0.00054301593 0 -0.002309218 -0.0010993652 + 2500 0 0.00054301628 0 -0.0024230015 -0.0011796956 + 3000 0 0.00054301666 0 -0.0025452078 -0.0012681725 + 3500 0 0.00054301707 0 -0.0026767034 -0.0013658817 + 4000 0 0.00054301751 0 -0.0028184722 -0.0014740918 + 4500 0 0.00054301798 0 -0.0029716352 -0.0015942917 + 5000 0 0.00054301849 0 -0.0031374752 -0.0017282378 + 5500 0 0.00054301905 0 -0.0033174662 -0.0018780129 + 6000 0 0.00054301965 0 -0.0035133093 -0.0020461007 + 6500 0 0.00054302031 0 -0.0037269778 -0.0022354811 + 7000 0 0.00054302103 0 -0.0039607721 -0.0024497521 + 7500 0 0.00054302182 0 -0.0042173892 -0.0026932881 + 8000 0 0.0005430227 0 -0.0045000102 -0.0029714471 + 8500 0 0.00054302366 0 -0.0048124114 -0.003290844 + 9000 0 0.00054302473 0 -0.0051591071 -0.0036597154 + 9500 0 0.00054302592 0 -0.0055455349 -0.0040884113 + 10000 0 0.00054302726 0 -0.0059782985 -0.0045900652 + 10500 0 0.00054302876 0 -0.0064654891 -0.0051815166 + 11000 0 0.00054303046 0 -0.0070171161 -0.0058845936 + 11500 0 0.0005430324 0 -0.0076456899 -0.0067279075 + 12000 0 0.00054303463 0 -0.0083670175 -0.0077493697 + 12500 0 0.00054303721 0 -0.0092012967 -0.0089996821 + 13000 0 0.00054304021 0 -0.010174616 -0.010546991 + 13500 0 0.00054304375 0 -0.011320967 -0.012482357 + 14000 0 0.00054304796 0 -0.012684757 -0.01492338 + 14500 0 0.00054305301 0 -0.014323176 -0.01800425 + 15000 0 0.00054305913 0 -0.016305242 -0.021804766 + 15500 0 0.0005430665 0 -0.018693849 -0.026019991 + 16000 0 0.00054307501 0 -0.021450982 -0.028460977 + 16500 0 0.0005430828 0 -0.023974925 -0.017549988 + 17000 0 0.00054307849 0 -0.022577692 0.07296284 + 17500 0 0.00054298744 0 0.0069237358 0.72962844 + 18000 0 0.00054212125 0 0.28756839 7.5171061 + 18500 0 0.00052809177 0 4.8331004 159.56814 + 19000 0 0.00019717774 0 112.04947 5692.3379 + 19500 0 0.00051978321 0 7.5250598 262.38764 + 20000 0 0.00054179603 0 0.39293697 10.289153 + 20500 0 0.00054296932 0 0.01279406 0.89377639 + 21000 0 0.00054308425 0 -0.02444466 0.081890707 + 21500 0 0.0005430907 0 -0.026532401 -0.021386086 + 22000 0 0.00054308271 0 -0.023944983 -0.032642459 + 22500 0 0.00054307381 0 -0.02106205 -0.029524272 + 23000 0 0.00054306612 0 -0.018569361 -0.024753431 + 23500 0 0.00054305976 0 -0.01650866 -0.020566675 + 24000 0 0.00054305452 0 -0.014811253 -0.017216347 + 24500 0 0.00054305017 0 -0.013402896 -0.014581066 + 25000 0 0.00054304653 0 -0.012222687 -0.01250069 + 25500 0 0.00054304345 0 -0.011223677 -0.0108418 + 26000 0 0.00054304081 0 -0.010370111 -0.0095034766 + 26500 0 0.00054303854 0 -0.0096346546 -0.0084112161 + 27000 0 0.00054303657 0 -0.0089962072 -0.0075100751 + 27500 0 0.00054303485 0 -0.0084382935 -0.0067592209 + 28000 0 0.00054303334 0 -0.0079478992 -0.0061279726 + 28500 0 0.000543032 0 -0.0075146283 -0.0055930001 + 29000 0 0.00054303081 0 -0.0071300893 -0.0051363504 + 29500 0 0.00054302976 0 -0.0067874426 -0.00474405 + 30000 0 0.00054302881 0 -0.0064810641 -0.0044051051 + 30500 0 0.00054302796 0 -0.0062062911 -0.0041107799 + 31000 0 0.0005430272 0 -0.0059592289 -0.0038540677 + 31500 0 0.00054302651 0 -0.0057366023 -0.0036293011 + 32000 0 0.00054302589 0 -0.0055356393 -0.0034318592 + 32500 0 0.00054302533 0 -0.0053539804 -0.0032579475 + 33000 0 0.00054302482 0 -0.0051896066 -0.0031044289 + 33500 0 0.00054302436 0 -0.0050407818 -0.0029686945 + 34000 0 0.00054302395 0 -0.0049060063 -0.002848562 + 34500 0 0.00054302357 0 -0.0047839795 -0.002742197 + 35000 0 0.00054302323 0 -0.0046735688 -0.0026480503 + 35500 0 0.00054302292 0 -0.0045737849 -0.0025648085 + 36000 0 0.00054302264 0 -0.0044837605 -0.0024913535 + 36500 0 0.00054302239 0 -0.0044027327 -0.0024267309 + 37000 0 0.00054302217 0 -0.0043300292 -0.0023701236 + 37500 0 0.00054302197 0 -0.0042650554 -0.0023208304 + 38000 0 0.00054302179 0 -0.0042072838 -0.0022782486 + 38500 0 0.00054302163 0 -0.0041562461 -0.0022418592 + 39000 0 0.0005430215 0 -0.0041115244 -0.0022112152 + 39500 0 0.00054302138 0 -0.0040727453 -0.0021859312 + 40000 0 0.00054302127 0 -0.0040395743 -0.0021656748 +Loop time of 0.111517 on 1 procs for 40000 steps with 1 atoms + +Performance: 6198147.516 tau/day, 358689.092 timesteps/s +98.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0082421 | 0.0082421 | 0.0082421 | 0.0 | 7.39 +Neigh | 0.021163 | 0.021163 | 0.021163 | 0.0 | 18.98 +Comm | 0.045411 | 0.045411 | 0.045411 | 0.0 | 40.72 +Output | 0.0012326 | 0.0012326 | 0.0012326 | 0.0 | 1.11 +Modify | 0.022813 | 0.022813 | 0.022813 | 0.0 | 20.46 +Other | | 0.01265 | | | 11.35 + +Nlocal: 1 ave 1 max 1 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 33 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/USER/misc/ees/log.23Jun17.fix_wall.g++.4 b/examples/USER/misc/ees/log.23Jun17.fix_wall.g++.4 new file mode 100644 index 0000000000..6c69ce3e72 --- /dev/null +++ b/examples/USER/misc/ees/log.23Jun17.fix_wall.g++.4 @@ -0,0 +1,162 @@ +LAMMPS (23 Jun 2017) + using 1 OpenMP thread(s) per MPI task +units lj +atom_style ellipsoid +boundary p p f +read_data Data_wall + orthogonal box = (0 0 0) to (60 60 60) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 1 atoms + 1 ellipsoids + reading velocities ... + 1 velocities +#------------------------------------# +pair_style resquared 1 +pair_coeff 1 1 10.0 1.0 0.5 0.5 4 0.5 0.5 4 1 +#------------------------------------# +timestep 0.0002 +#------------------------------------# + +compute temp all temp/asphere +thermo_modify temp temp + +fix EES_substrate all wall/ees zhi EDGE 10 1 10 zlo EDGE 10 1 10 +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^# + +thermo_style custom step temp press etotal f_EES_substrate f_EES_substrate[1] +WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:705) + +fix NVE all nve/asphere +#------------------------------------# +compute qw all property/atom quatw +compute qi all property/atom quati +compute qj all property/atom quatj +compute qk all property/atom quatk +#------------------------------------# +thermo 500 +#dump 1 all custom 1000 dump_substrate id type x y z c_qw c_qi c_qj c_qk +run 40000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 1.3 + binsize = 0.65, bins = 93 93 93 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair resquared, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.128 | 5.41 | 5.753 Mbytes +Step Temp Press TotEng f_EES_substrate f_EES_substrate[1] + 0 0 0.00054301475 0 0 0 + 500 0 0.00054301501 0 -0.002011167 -0.00089853601 + 1000 0 0.0005430153 0 -0.0021039425 -0.00095953758 + 1500 0 0.00054301561 0 -0.0022030914 -0.0010262478 + 2000 0 0.00054301593 0 -0.002309218 -0.0010993652 + 2500 0 0.00054301628 0 -0.0024230015 -0.0011796956 + 3000 0 0.00054301666 0 -0.0025452078 -0.0012681725 + 3500 0 0.00054301707 0 -0.0026767034 -0.0013658817 + 4000 0 0.00054301751 0 -0.0028184722 -0.0014740918 + 4500 0 0.00054301798 0 -0.0029716352 -0.0015942917 + 5000 0 0.00054301849 0 -0.0031374752 -0.0017282378 + 5500 0 0.00054301905 0 -0.0033174662 -0.0018780129 + 6000 0 0.00054301965 0 -0.0035133093 -0.0020461007 + 6500 0 0.00054302031 0 -0.0037269778 -0.0022354811 + 7000 0 0.00054302103 0 -0.0039607721 -0.0024497521 + 7500 0 0.00054302182 0 -0.0042173892 -0.0026932881 + 8000 0 0.0005430227 0 -0.0045000102 -0.0029714471 + 8500 0 0.00054302366 0 -0.0048124114 -0.003290844 + 9000 0 0.00054302473 0 -0.0051591071 -0.0036597154 + 9500 0 0.00054302592 0 -0.0055455349 -0.0040884113 + 10000 0 0.00054302726 0 -0.0059782985 -0.0045900652 + 10500 0 0.00054302876 0 -0.0064654891 -0.0051815166 + 11000 0 0.00054303046 0 -0.0070171161 -0.0058845936 + 11500 0 0.0005430324 0 -0.0076456899 -0.0067279075 + 12000 0 0.00054303463 0 -0.0083670175 -0.0077493697 + 12500 0 0.00054303721 0 -0.0092012967 -0.0089996821 + 13000 0 0.00054304021 0 -0.010174616 -0.010546991 + 13500 0 0.00054304375 0 -0.011320967 -0.012482357 + 14000 0 0.00054304796 0 -0.012684757 -0.01492338 + 14500 0 0.00054305301 0 -0.014323176 -0.01800425 + 15000 0 0.00054305913 0 -0.016305242 -0.021804766 + 15500 0 0.0005430665 0 -0.018693849 -0.026019991 + 16000 0 0.00054307501 0 -0.021450982 -0.028460977 + 16500 0 0.0005430828 0 -0.023974925 -0.017549988 + 17000 0 0.00054307849 0 -0.022577692 0.07296284 + 17500 0 0.00054298744 0 0.0069237358 0.72962844 + 18000 0 0.00054212125 0 0.28756839 7.5171061 + 18500 0 0.00052809177 0 4.8331004 159.56814 + 19000 0 0.00019717774 0 112.04947 5692.3379 + 19500 0 0.00051978321 0 7.5250598 262.38764 + 20000 0 0.00054179603 0 0.39293697 10.289153 + 20500 0 0.00054296932 0 0.01279406 0.89377639 + 21000 0 0.00054308425 0 -0.02444466 0.081890707 + 21500 0 0.0005430907 0 -0.026532401 -0.021386086 + 22000 0 0.00054308271 0 -0.023944983 -0.032642459 + 22500 0 0.00054307381 0 -0.02106205 -0.029524272 + 23000 0 0.00054306612 0 -0.018569361 -0.024753431 + 23500 0 0.00054305976 0 -0.01650866 -0.020566675 + 24000 0 0.00054305452 0 -0.014811253 -0.017216347 + 24500 0 0.00054305017 0 -0.013402896 -0.014581066 + 25000 0 0.00054304653 0 -0.012222687 -0.01250069 + 25500 0 0.00054304345 0 -0.011223677 -0.0108418 + 26000 0 0.00054304081 0 -0.010370111 -0.0095034766 + 26500 0 0.00054303854 0 -0.0096346546 -0.0084112161 + 27000 0 0.00054303657 0 -0.0089962072 -0.0075100751 + 27500 0 0.00054303485 0 -0.0084382935 -0.0067592209 + 28000 0 0.00054303334 0 -0.0079478992 -0.0061279726 + 28500 0 0.000543032 0 -0.0075146283 -0.0055930001 + 29000 0 0.00054303081 0 -0.0071300893 -0.0051363504 + 29500 0 0.00054302976 0 -0.0067874426 -0.00474405 + 30000 0 0.00054302881 0 -0.0064810641 -0.0044051051 + 30500 0 0.00054302796 0 -0.0062062911 -0.0041107799 + 31000 0 0.0005430272 0 -0.0059592289 -0.0038540677 + 31500 0 0.00054302651 0 -0.0057366023 -0.0036293011 + 32000 0 0.00054302589 0 -0.0055356393 -0.0034318592 + 32500 0 0.00054302533 0 -0.0053539804 -0.0032579475 + 33000 0 0.00054302482 0 -0.0051896066 -0.0031044289 + 33500 0 0.00054302436 0 -0.0050407818 -0.0029686945 + 34000 0 0.00054302395 0 -0.0049060063 -0.002848562 + 34500 0 0.00054302357 0 -0.0047839795 -0.002742197 + 35000 0 0.00054302323 0 -0.0046735688 -0.0026480503 + 35500 0 0.00054302292 0 -0.0045737849 -0.0025648085 + 36000 0 0.00054302264 0 -0.0044837605 -0.0024913535 + 36500 0 0.00054302239 0 -0.0044027327 -0.0024267309 + 37000 0 0.00054302217 0 -0.0043300292 -0.0023701236 + 37500 0 0.00054302197 0 -0.0042650554 -0.0023208304 + 38000 0 0.00054302179 0 -0.0042072838 -0.0022782486 + 38500 0 0.00054302163 0 -0.0041562461 -0.0022418592 + 39000 0 0.0005430215 0 -0.0041115244 -0.0022112152 + 39500 0 0.00054302138 0 -0.0040727453 -0.0021859312 + 40000 0 0.00054302127 0 -0.0040395743 -0.0021656748 +Loop time of 0.216115 on 4 procs for 40000 steps with 1 atoms + +Performance: 3198303.409 tau/day, 185087.003 timesteps/s +98.5% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0020442 | 0.0047204 | 0.012008 | 6.1 | 2.18 +Neigh | 0.0069654 | 0.0072649 | 0.0074701 | 0.2 | 3.36 +Comm | 0.024762 | 0.039833 | 0.056166 | 7.4 | 18.43 +Output | 0.0020285 | 0.0023268 | 0.0026891 | 0.5 | 1.08 +Modify | 0.0081856 | 0.013537 | 0.029052 | 7.7 | 6.26 +Other | | 0.1484 | | | 68.68 + +Nlocal: 0.25 ave 1 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 +Nghost: 0.25 ave 1 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 33 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/USER/misc/ees/log.23Jun17.fix_wall_region.g++.1 b/examples/USER/misc/ees/log.23Jun17.fix_wall_region.g++.1 new file mode 100644 index 0000000000..f4bd804127 --- /dev/null +++ b/examples/USER/misc/ees/log.23Jun17.fix_wall_region.g++.1 @@ -0,0 +1,180 @@ +LAMMPS (23 Jun 2017) + using 1 OpenMP thread(s) per MPI task +units lj +atom_style ellipsoid +boundary p p p +read_data Data_region + orthogonal box = (0 0 0) to (60 60 60) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 3 atoms + 3 ellipsoids + reading velocities ... + 3 velocities +#------------------------------------# +region the_wall block 20. 40. 20. 40. 20. 40. side out +#------------------------------------# +pair_style resquared 1 +pair_coeff 1 1 10.0 1.0 0.5 0.5 4 0.5 0.5 4 1 +#------------------------------------# +timestep 0.0005 +#------------------------------------# + +fix EES_block all wall/region/ees the_wall 10. 1. 20 +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^# + +thermo_style custom step temp press etotal f_EES_block[1] f_EES_block[3] + +fix NVE all nve/asphere +#------------------------------------# +compute qw all property/atom quatw +compute qi all property/atom quati +compute qj all property/atom quatj +compute qk all property/atom quatk +#------------------------------------# +thermo 500 +#dump 1 all custom 1000 dump_region id type x y z c_qw c_qi c_qj c_qk +run 50000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 1.3 + binsize = 0.65, bins = 93 93 93 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair resquared, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 7.958 | 7.958 | 7.958 Mbytes +Step Temp Press TotEng f_EES_block[1] f_EES_block[3] + 0 161.26842 0.0014932261 161.26842 -0.00042715909 -0.00015747012 + 500 161.26864 0.0014932281 161.26864 -0.00055836679 -0.00017557792 + 1000 161.26891 0.0014932306 161.26891 -0.00075239934 -0.00019646897 + 1500 161.26926 0.0014932339 161.26926 -0.0010543331 -0.0002206925 + 2000 161.26975 0.0014932385 161.26975 -0.0015566164 -0.00024893301 + 2500 161.27047 0.0014932451 161.27047 -0.0024700842 -0.00028205104 + 3000 161.27163 0.0014932558 161.27163 -0.0043191186 -0.00032113859 + 3500 161.27364 0.0014932745 161.27364 -0.0073109231 -0.00036759584 + 4000 161.26391 0.0014931843 161.26391 0.2453813 -0.00042323837 + 4500 77.783029 0.00072021324 77.783029 4908.2333 -0.00049044991 + 5000 160.23852 0.00148369 160.23852 0.13220034 -0.00057240356 + 5500 160.2431 0.0014837324 160.2431 -0.0072005112 -0.00067338844 + 6000 160.24148 0.0014837174 160.24148 -0.0040896209 -0.0007993028 + 6500 160.24071 0.0014837103 160.24071 -0.0023574992 -0.00095841662 + 7000 160.24038 0.0014837072 160.24038 -0.001495267 -0.001162584 + 7500 160.24031 0.0014837066 160.24031 -0.0010172907 -0.0014292316 + 8000 160.24043 0.0014837077 160.24043 -0.00072823316 -0.0017847384 + 8500 160.24073 0.0014837105 160.24073 -0.00054165121 -0.0022704187 + 9000 160.24121 0.0014837149 160.24121 -0.00041506183 -0.0029536182 + 9500 160.24192 0.0014837215 160.24192 -0.00032574317 -0.0039493769 + 10000 160.24293 0.0014837308 160.24293 -0.00026069929 -0.0054649542 + 10500 160.2444 0.0014837444 160.2444 -0.00021208476 -0.0078936604 + 11000 160.2466 0.0014837648 160.2466 -0.00017494913 -0.011981095 + 11500 160.25001 0.0014837964 160.25001 -0.00014605132 -0.018414768 + 12000 160.25411 0.0014838343 160.25411 -0.00012320207 -0.0069059119 + 12500 160.18929 0.0014832342 160.18929 -0.00010488251 1.4672359 + 13000 127.86814 0.0011839642 127.86814 -9.0014128e-05 1420.4476 + 13500 154.09961 0.0014268483 154.09961 -7.7815401e-05 5.4703004 + 14000 154.31359 0.0014288295 154.31359 -6.7709777e-05 0.025351973 + 14500 154.3112 0.0014288074 154.3112 -5.9265083e-05 -0.020243217 + 15000 154.30773 0.0014287753 154.30773 -5.2152714e-05 -0.013791198 + 15500 154.30551 0.0014287547 154.30551 -4.6119584e-05 -0.0090829354 + 16000 154.30409 0.0014287415 154.30409 -4.0968492e-05 -0.0062748728 + 16500 154.30315 0.0014287329 154.30315 -3.6544144e-05 -0.004532774 + 17000 154.30254 0.0014287272 154.30254 -3.2723062e-05 -0.003394041 + 17500 154.30216 0.0014287237 154.30216 -2.9406189e-05 -0.0026153428 + 18000 154.30195 0.0014287218 154.30195 -2.6513408e-05 -0.0020627306 + 18500 154.30188 0.0014287211 154.30188 -2.397943e-05 -0.0016584214 + 19000 154.30194 0.0014287216 154.30194 -2.1750674e-05 -0.0013550174 + 19500 154.3021 0.0014287232 154.3021 -1.9782885e-05 -0.0011224153 + 20000 154.30239 0.0014287258 154.30239 -1.8039282e-05 -0.00094080826 + 20500 154.30279 0.0014287295 154.30279 -1.6489128e-05 -0.00079676335 + 21000 154.30332 0.0014287345 154.30332 -1.5106598e-05 -0.00068092925 + 21500 154.30401 0.0014287409 154.30401 -1.3869884e-05 -0.000586646 + 22000 154.30489 0.001428749 154.30489 -1.2760487e-05 -0.00050907464 + 22500 154.30601 0.0014287593 154.30601 -1.1762643e-05 -0.00044463657 + 23000 154.30743 0.0014287725 154.30743 -1.0862863e-05 -0.00039064328 + 23500 154.30924 0.0014287893 154.30924 -1.004956e-05 -0.00034504622 + 24000 154.31159 0.001428811 154.31159 -9.3127419e-06 -0.0003062645 + 24500 154.31464 0.0014288393 154.31464 8.7817413e-06 -0.00027306395 + 25000 154.31848 0.0014288748 154.31848 9.4348998e-06 -0.00024447093 + 25500 154.32222 0.0014289094 154.32222 1.0150613e-05 -0.00021970994 + 26000 154.31667 0.0014288581 154.31667 1.0936298e-05 -0.0001981578 + 26500 154.19679 0.0014277481 154.19679 1.1800434e-05 -0.00017930967 + 27000 151.70582 0.0014046835 151.70582 1.2752738e-05 -0.00016275349 + 27500 144.06864 0.0013339689 144.06864 1.3804382e-05 -0.00014815061 + 28000 153.30039 0.0014194481 153.30039 1.4968247e-05 -0.00013522085 + 28500 153.70626 0.0014232061 153.70626 1.6259237e-05 -0.00012373107 + 29000 153.73143 0.0014234392 153.73143 1.7694652e-05 -0.00011348611 + 29500 153.72942 0.0014234205 153.72942 1.9294649e-05 -0.0001043218 + 30000 153.72536 0.001423383 153.72536 2.1082798e-05 -9.6099303e-05 + 30500 153.72189 0.0014233508 153.72189 2.3086777e-05 -8.8700684e-05 + 31000 153.71915 0.0014233255 153.71915 2.533922e-05 -8.2025314e-05 + 31500 153.71701 0.0014233056 153.71701 2.7878775e-05 -7.5986974e-05 + 32000 153.7153 0.0014232898 153.7153 3.0751438e-05 -7.05115e-05 + 32500 153.71392 0.0014232771 153.71392 3.4012214e-05 -6.5534861e-05 + 33000 153.7128 0.0014232667 153.7128 3.7727241e-05 -6.1001578e-05 + 33500 153.71187 0.001423258 153.71187 4.1976497e-05 -5.686342e-05 + 34000 153.71109 0.0014232508 153.71109 4.6857282e-05 -5.3078322e-05 + 34500 153.71043 0.0014232447 153.71043 5.2488748e-05 -4.9609488e-05 + 35000 153.70987 0.0014232395 153.70987 5.9017833e-05 -4.6424634e-05 + 35500 153.70939 0.0014232351 153.70939 6.6627108e-05 -4.3495356e-05 + 36000 153.70898 0.0014232313 153.70898 7.5545279e-05 -4.0796599e-05 + 36500 153.70863 0.001423228 153.70863 8.6061387e-05 -3.8306204e-05 + 37000 153.70832 0.0014232252 153.70832 9.8544264e-05 -3.6004526e-05 + 37500 153.70806 0.0014232227 153.70806 0.00011346953 -3.3874109e-05 + 38000 153.70783 0.0014232207 153.70783 0.00013145761 -3.1899404e-05 + 38500 153.70764 0.0014232189 153.70764 0.00015332826 -3.0066532e-05 + 39000 153.70748 0.0014232174 153.70748 0.00018017988 -2.836308e-05 + 39500 153.70736 0.0014232163 153.70736 0.00021350768 -2.6777922e-05 + 40000 153.70726 0.0014232154 153.70726 0.00025538329 -2.5301066e-05 + 40500 153.70719 0.0014232147 153.70719 0.00030873482 -2.3923522e-05 + 41000 153.70716 0.0014232145 153.70716 0.00037779644 -2.2637186e-05 + 41500 153.70717 0.0014232145 153.70717 0.00046885357 -2.1434741e-05 + 42000 153.70722 0.001423215 153.70722 0.00059152584 -2.0309568e-05 + 42500 153.70733 0.001423216 153.70733 0.00076107465 -1.9255668e-05 + 43000 153.70751 0.0014232177 153.70751 0.0010027741 -1.82676e-05 + 43500 153.7078 0.0014232203 153.7078 0.0013607156 -1.7340414e-05 + 44000 153.70823 0.0014232244 153.70823 0.0019168919 -1.6469607e-05 + 44500 153.70891 0.0014232306 153.70891 0.0028362183 -1.5651071e-05 + 45000 153.70999 0.0014232407 153.70999 0.0044814624 -1.4881056e-05 + 45500 153.71183 0.0014232577 153.71183 0.0076783372 -1.4156133e-05 + 46000 153.71504 0.0014232874 153.71504 0.012021529 -1.347316e-05 + 46500 153.70337 0.0014231794 153.70337 -0.27386631 -1.2829258e-05 + 47000 109.96863 0.0010182281 109.96863 -1552.3264 -1.2221783e-05 + 47500 56.442204 0.000522613 56.442204 -0.62595366 -1.1648303e-05 + 48000 56.439532 0.00052258826 56.439532 0.015282177 -1.1106581e-05 + 48500 56.439907 0.00052259173 56.439907 0.01178542 -1.0594552e-05 + 49000 56.44015 0.00052259399 56.44015 0.0080268131 -1.0110314e-05 + 49500 56.440316 0.00052259552 56.440316 0.0061338692 -9.6521057e-06 + 50000 56.440444 0.0005225967 56.440444 0.005195231 -9.2183009e-06 +Loop time of 0.344104 on 1 procs for 50000 steps with 3 atoms + +Performance: 6277171.077 tau/day, 145304.886 timesteps/s +98.2% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.023412 | 0.023412 | 0.023412 | 0.0 | 6.80 +Neigh | 0.13182 | 0.13182 | 0.13182 | 0.0 | 38.31 +Comm | 0.084006 | 0.084006 | 0.084006 | 0.0 | 24.41 +Output | 0.0023429 | 0.0023429 | 0.0023429 | 0.0 | 0.68 +Modify | 0.083383 | 0.083383 | 0.083383 | 0.0 | 24.23 +Other | | 0.01914 | | | 5.56 + +Nlocal: 3 ave 3 max 3 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1 ave 1 max 1 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 210 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/USER/misc/ees/log.23Jun17.fix_wall_region.g++.4 b/examples/USER/misc/ees/log.23Jun17.fix_wall_region.g++.4 new file mode 100644 index 0000000000..6a5f6fca19 --- /dev/null +++ b/examples/USER/misc/ees/log.23Jun17.fix_wall_region.g++.4 @@ -0,0 +1,180 @@ +LAMMPS (23 Jun 2017) + using 1 OpenMP thread(s) per MPI task +units lj +atom_style ellipsoid +boundary p p p +read_data Data_region + orthogonal box = (0 0 0) to (60 60 60) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 3 atoms + 3 ellipsoids + reading velocities ... + 3 velocities +#------------------------------------# +region the_wall block 20. 40. 20. 40. 20. 40. side out +#------------------------------------# +pair_style resquared 1 +pair_coeff 1 1 10.0 1.0 0.5 0.5 4 0.5 0.5 4 1 +#------------------------------------# +timestep 0.0005 +#------------------------------------# + +fix EES_block all wall/region/ees the_wall 10. 1. 20 +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^# + +thermo_style custom step temp press etotal f_EES_block[1] f_EES_block[3] + +fix NVE all nve/asphere +#------------------------------------# +compute qw all property/atom quatw +compute qi all property/atom quati +compute qj all property/atom quatj +compute qk all property/atom quatk +#------------------------------------# +thermo 500 +#dump 1 all custom 1000 dump_region id type x y z c_qw c_qi c_qj c_qk +run 50000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 1.3 + binsize = 0.65, bins = 93 93 93 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair resquared, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.629 | 5.722 | 5.754 Mbytes +Step Temp Press TotEng f_EES_block[1] f_EES_block[3] + 0 161.26842 0.0014932261 161.26842 -0.00042715909 -0.00015747012 + 500 161.26864 0.0014932281 161.26864 -0.00055836679 -0.00017557792 + 1000 161.26891 0.0014932306 161.26891 -0.00075239934 -0.00019646897 + 1500 161.26926 0.0014932339 161.26926 -0.0010543331 -0.0002206925 + 2000 161.26975 0.0014932385 161.26975 -0.0015566164 -0.00024893301 + 2500 161.27047 0.0014932451 161.27047 -0.0024700842 -0.00028205104 + 3000 161.27163 0.0014932558 161.27163 -0.0043191186 -0.00032113859 + 3500 161.27364 0.0014932745 161.27364 -0.0073109231 -0.00036759584 + 4000 161.26391 0.0014931843 161.26391 0.2453813 -0.00042323837 + 4500 77.783029 0.00072021324 77.783029 4908.2333 -0.00049044991 + 5000 160.23852 0.00148369 160.23852 0.13220034 -0.00057240356 + 5500 160.2431 0.0014837324 160.2431 -0.0072005112 -0.00067338844 + 6000 160.24148 0.0014837174 160.24148 -0.0040896209 -0.0007993028 + 6500 160.24071 0.0014837103 160.24071 -0.0023574992 -0.00095841662 + 7000 160.24038 0.0014837072 160.24038 -0.001495267 -0.001162584 + 7500 160.24031 0.0014837066 160.24031 -0.0010172907 -0.0014292316 + 8000 160.24043 0.0014837077 160.24043 -0.00072823316 -0.0017847384 + 8500 160.24073 0.0014837105 160.24073 -0.00054165121 -0.0022704187 + 9000 160.24121 0.0014837149 160.24121 -0.00041506183 -0.0029536182 + 9500 160.24192 0.0014837215 160.24192 -0.00032574317 -0.0039493769 + 10000 160.24293 0.0014837308 160.24293 -0.00026069929 -0.0054649542 + 10500 160.2444 0.0014837444 160.2444 -0.00021208476 -0.0078936604 + 11000 160.2466 0.0014837648 160.2466 -0.00017494913 -0.011981095 + 11500 160.25001 0.0014837964 160.25001 -0.00014605132 -0.018414768 + 12000 160.25411 0.0014838343 160.25411 -0.00012320207 -0.0069059119 + 12500 160.18929 0.0014832342 160.18929 -0.00010488251 1.4672359 + 13000 127.86814 0.0011839642 127.86814 -9.0014128e-05 1420.4476 + 13500 154.09961 0.0014268483 154.09961 -7.7815401e-05 5.4703004 + 14000 154.31359 0.0014288295 154.31359 -6.7709777e-05 0.025351973 + 14500 154.3112 0.0014288074 154.3112 -5.9265083e-05 -0.020243217 + 15000 154.30773 0.0014287753 154.30773 -5.2152714e-05 -0.013791198 + 15500 154.30551 0.0014287547 154.30551 -4.6119584e-05 -0.0090829354 + 16000 154.30409 0.0014287415 154.30409 -4.0968492e-05 -0.0062748728 + 16500 154.30315 0.0014287329 154.30315 -3.6544144e-05 -0.004532774 + 17000 154.30254 0.0014287272 154.30254 -3.2723062e-05 -0.003394041 + 17500 154.30216 0.0014287237 154.30216 -2.9406189e-05 -0.0026153428 + 18000 154.30195 0.0014287218 154.30195 -2.6513408e-05 -0.0020627306 + 18500 154.30188 0.0014287211 154.30188 -2.397943e-05 -0.0016584214 + 19000 154.30194 0.0014287216 154.30194 -2.1750674e-05 -0.0013550174 + 19500 154.3021 0.0014287232 154.3021 -1.9782885e-05 -0.0011224153 + 20000 154.30239 0.0014287258 154.30239 -1.8039282e-05 -0.00094080826 + 20500 154.30279 0.0014287295 154.30279 -1.6489128e-05 -0.00079676335 + 21000 154.30332 0.0014287345 154.30332 -1.5106598e-05 -0.00068092925 + 21500 154.30401 0.0014287409 154.30401 -1.3869884e-05 -0.000586646 + 22000 154.30489 0.001428749 154.30489 -1.2760487e-05 -0.00050907464 + 22500 154.30601 0.0014287593 154.30601 -1.1762643e-05 -0.00044463657 + 23000 154.30743 0.0014287725 154.30743 -1.0862863e-05 -0.00039064328 + 23500 154.30924 0.0014287893 154.30924 -1.004956e-05 -0.00034504622 + 24000 154.31159 0.001428811 154.31159 -9.3127419e-06 -0.0003062645 + 24500 154.31464 0.0014288393 154.31464 8.7817413e-06 -0.00027306395 + 25000 154.31848 0.0014288748 154.31848 9.4348998e-06 -0.00024447093 + 25500 154.32222 0.0014289094 154.32222 1.0150613e-05 -0.00021970994 + 26000 154.31667 0.0014288581 154.31667 1.0936298e-05 -0.0001981578 + 26500 154.19679 0.0014277481 154.19679 1.1800434e-05 -0.00017930967 + 27000 151.70582 0.0014046835 151.70582 1.2752738e-05 -0.00016275349 + 27500 144.06864 0.0013339689 144.06864 1.3804382e-05 -0.00014815061 + 28000 153.30039 0.0014194481 153.30039 1.4968247e-05 -0.00013522085 + 28500 153.70626 0.0014232061 153.70626 1.6259237e-05 -0.00012373107 + 29000 153.73143 0.0014234392 153.73143 1.7694652e-05 -0.00011348611 + 29500 153.72942 0.0014234205 153.72942 1.9294649e-05 -0.0001043218 + 30000 153.72536 0.001423383 153.72536 2.1082798e-05 -9.6099303e-05 + 30500 153.72189 0.0014233508 153.72189 2.3086777e-05 -8.8700684e-05 + 31000 153.71915 0.0014233255 153.71915 2.533922e-05 -8.2025314e-05 + 31500 153.71701 0.0014233056 153.71701 2.7878775e-05 -7.5986974e-05 + 32000 153.7153 0.0014232898 153.7153 3.0751438e-05 -7.05115e-05 + 32500 153.71392 0.0014232771 153.71392 3.4012214e-05 -6.5534861e-05 + 33000 153.7128 0.0014232667 153.7128 3.7727241e-05 -6.1001578e-05 + 33500 153.71187 0.001423258 153.71187 4.1976497e-05 -5.686342e-05 + 34000 153.71109 0.0014232508 153.71109 4.6857282e-05 -5.3078322e-05 + 34500 153.71043 0.0014232447 153.71043 5.2488748e-05 -4.9609488e-05 + 35000 153.70987 0.0014232395 153.70987 5.9017833e-05 -4.6424634e-05 + 35500 153.70939 0.0014232351 153.70939 6.6627108e-05 -4.3495356e-05 + 36000 153.70898 0.0014232313 153.70898 7.5545279e-05 -4.0796599e-05 + 36500 153.70863 0.001423228 153.70863 8.6061387e-05 -3.8306204e-05 + 37000 153.70832 0.0014232252 153.70832 9.8544264e-05 -3.6004526e-05 + 37500 153.70806 0.0014232227 153.70806 0.00011346953 -3.3874109e-05 + 38000 153.70783 0.0014232207 153.70783 0.00013145761 -3.1899404e-05 + 38500 153.70764 0.0014232189 153.70764 0.00015332826 -3.0066532e-05 + 39000 153.70748 0.0014232174 153.70748 0.00018017988 -2.836308e-05 + 39500 153.70736 0.0014232163 153.70736 0.00021350768 -2.6777922e-05 + 40000 153.70726 0.0014232154 153.70726 0.00025538329 -2.5301066e-05 + 40500 153.70719 0.0014232147 153.70719 0.00030873482 -2.3923522e-05 + 41000 153.70716 0.0014232145 153.70716 0.00037779644 -2.2637186e-05 + 41500 153.70717 0.0014232145 153.70717 0.00046885357 -2.1434741e-05 + 42000 153.70722 0.001423215 153.70722 0.00059152584 -2.0309568e-05 + 42500 153.70733 0.001423216 153.70733 0.00076107465 -1.9255668e-05 + 43000 153.70751 0.0014232177 153.70751 0.0010027741 -1.82676e-05 + 43500 153.7078 0.0014232203 153.7078 0.0013607156 -1.7340414e-05 + 44000 153.70823 0.0014232244 153.70823 0.0019168919 -1.6469607e-05 + 44500 153.70891 0.0014232306 153.70891 0.0028362183 -1.5651071e-05 + 45000 153.70999 0.0014232407 153.70999 0.0044814624 -1.4881056e-05 + 45500 153.71183 0.0014232577 153.71183 0.0076783372 -1.4156133e-05 + 46000 153.71504 0.0014232874 153.71504 0.012021529 -1.347316e-05 + 46500 153.70337 0.0014231794 153.70337 -0.27386631 -1.2829258e-05 + 47000 109.96863 0.0010182281 109.96863 -1552.3264 -1.2221783e-05 + 47500 56.442204 0.000522613 56.442204 -0.62595366 -1.1648303e-05 + 48000 56.439532 0.00052258826 56.439532 0.015282177 -1.1106581e-05 + 48500 56.439907 0.00052259173 56.439907 0.01178542 -1.0594552e-05 + 49000 56.44015 0.00052259399 56.44015 0.0080268131 -1.0110314e-05 + 49500 56.440316 0.00052259552 56.440316 0.0061338692 -9.6521057e-06 + 50000 56.440444 0.0005225967 56.440444 0.005195231 -9.2183009e-06 +Loop time of 0.483531 on 4 procs for 50000 steps with 3 atoms + +Performance: 4467138.628 tau/day, 103405.987 timesteps/s +97.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0032809 | 0.010859 | 0.013737 | 4.2 | 2.25 +Neigh | 0.037744 | 0.039156 | 0.042488 | 1.0 | 8.10 +Comm | 0.19775 | 0.2088 | 0.21768 | 1.8 | 43.18 +Output | 0.0028036 | 0.0030343 | 0.0035536 | 0.6 | 0.63 +Modify | 0.011325 | 0.032141 | 0.039636 | 6.7 | 6.65 +Other | | 0.1895 | | | 39.20 + +Nlocal: 0.75 ave 1 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 3 +Nghost: 1.75 ave 3 max 1 min +Histogram: 2 0 0 0 0 1 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 210 +Dangerous builds = 0 + +Total wall time: 0:00:00 -- GitLab From 16fc2d6fe179d45ac86076b20238bc50086d300b Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Thu, 22 Jun 2017 22:33:09 -0500 Subject: [PATCH 443/593] Add install.py and update config for kim lib --- lib/kim/Makefile.lammps | 7 +++- lib/kim/README | 23 ++++++------- lib/kim/install.py | 72 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 14 deletions(-) create mode 100644 lib/kim/install.py diff --git a/lib/kim/Makefile.lammps b/lib/kim/Makefile.lammps index 427c62b5f3..8384f8d399 100644 --- a/lib/kim/Makefile.lammps +++ b/lib/kim/Makefile.lammps @@ -16,7 +16,12 @@ # Settings that the LAMMPS build will import when this package is installed -KIM_CONFIG_HELPER = kim-api-build-config + +ifeq ($(wildcard ../../lib/kim/bin/kim-api-build-config),) + KIM_CONFIG_HELPER = kim-api-build-config +else + KIM_CONFIG_HELPER = ../../lib/kim/bin/kim-api-build-config +endif ifeq ($(shell $(KIM_CONFIG_HELPER) --version 2> /dev/null),) $(error $(KIM_CONFIG_HELPER) utility is not available. Something is wrong with your KIM API package setup) endif diff --git a/lib/kim/README b/lib/kim/README index fcaf09bd17..086bbce90c 100644 --- a/lib/kim/README +++ b/lib/kim/README @@ -9,13 +9,16 @@ KIM API and he also maintains the code that implements the pair_style kim command. To download, build, and install the KIM API on your system, follow -these steps. We are working on scripts that will automate this -process. +these steps. You can use the install.py script to automate these steps. -The KIM API is available for download from "this -site"_https://openkim.org, namely https://openkim.org. The tarball -you download is "kim-api-vX.Y.Z.tgz", which can be unpacked in this -directory or whereever you wish: +**Note** The process described below will compile the kim-api using absolute +paths names. This means that if you move your lammps directory to a new +location after compilation the kim-api library will not be able to find some of +its components. It is best to recompile after moving the lammps directory. + +The KIM API is available for download from "this site"_https://openkim.org, +namely https://openkim.org. The tarball you download is "kim-api-vX.Y.Z.tgz", +which can be unpacked in this directory or whereever you wish: tar xvfz kim*tgz @@ -41,13 +44,7 @@ $ tar zxvf kim-api-vX.Y.Z.tgz # get OpenKIM models, setup and compile $ cd kim-api-vX.Y.Z -$ cp Makefile.KIM_Config.example Makefile.KIM_Config - -# edit this file as appropriate following the instructions given in -# INSTALL. Here, we'll assume you set the 'prefix' variable as -# follows in order to install the KIM API to your home directory: -# prefix = $(HOME)/local -$ vi Makefile.KIM_Config +$ ./configure --prefix=?????? $ make add-EAM_Dynamo_Angelo_Moody_NiAlH__MO_418978237058_001 $ make diff --git a/lib/kim/install.py b/lib/kim/install.py new file mode 100644 index 0000000000..d075e522c3 --- /dev/null +++ b/lib/kim/install.py @@ -0,0 +1,72 @@ +#!usr/local/python + +# install.py tool to setup the kim-api library +# used to automate the steps described in the README file in this dir + +import sys,os,re,urllib,commands + +help = """ +Syntax: install.py -v version + specify one or more options, order does not matter + -v = version of kim-api to download and work with + default = kim-api-v1.8.2 (current as of June 2017) +""" + +def error(): + print help + sys.exit() + +# parse args + +args = sys.argv + +dir = "." +version = "kim-api-v1.8.2" + +iarg = 1 +while iarg < len(args): + if args[iarg] == "-v": + if iarg+2 > len(args): error() + version = args[iarg+1] + iarg += 2 + else: error() + +dir = os.path.abspath(dir) +url = "https://s3.openkim.org/kim-api/%s.tgz" % version + +# download and unpack tarball + +print "Downloading kim-api tarball ..." +urllib.urlretrieve(url,"%s/%s.tgz" % (dir,version)) +print "Unpacking kim-api tarball ..." +cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (dir,version,version) +txt = commands.getstatusoutput(cmd) +if txt[0] != 0: error() + +# configure kim-api +print "Configuring kim-api ..." +cmd = "cd %s/%s; ./configure --prefix='%s'" % (dir,version,dir) +txt = commands.getstatusoutput(cmd) +print txt[1] +if txt[0] != 0: error() + +# build kim-api + +print "Building kim-api ..." +cmd = "cd %s/%s; make" % (dir,version) +txt = commands.getstatusoutput(cmd) +print txt[1] +if txt[0] != 0: error() + +# install kim-api + +print "Installing kim-api ..." +cmd = "cd %s/%s; make install" % (dir,version) +txt = commands.getstatusoutput(cmd) +print txt[1] +if txt[0] != 0: error() + +cmd = "cd %s/%s; make install-set-default-to-v1" %(dir,version) +txt = commands.getstatusoutput(cmd) +print txt[1] +if txt[0] != 0: error() -- GitLab From b0be8b24eac994ae2f1a7402c66b8ac69a565373 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Thu, 6 Jul 2017 15:46:36 -0500 Subject: [PATCH 444/593] Further work on lib/kim/install.py --- lib/kim/.gitignore | 1 + lib/kim/Makefile.lammps | 5 +- lib/kim/install.py | 139 +++++++++++++++++++++++++++++----------- 3 files changed, 107 insertions(+), 38 deletions(-) create mode 100644 lib/kim/.gitignore diff --git a/lib/kim/.gitignore b/lib/kim/.gitignore new file mode 100644 index 0000000000..eb55b3d4b8 --- /dev/null +++ b/lib/kim/.gitignore @@ -0,0 +1 @@ +/Makefile.KIM_DIR diff --git a/lib/kim/Makefile.lammps b/lib/kim/Makefile.lammps index 8384f8d399..3964e662b5 100644 --- a/lib/kim/Makefile.lammps +++ b/lib/kim/Makefile.lammps @@ -16,11 +16,12 @@ # Settings that the LAMMPS build will import when this package is installed +include ./Makefile.KIM_DIR -ifeq ($(wildcard ../../lib/kim/bin/kim-api-build-config),) +ifeq ($(wildcard $(KIM_INSTALL_DIR)/bin/kim-api-build-config),) KIM_CONFIG_HELPER = kim-api-build-config else - KIM_CONFIG_HELPER = ../../lib/kim/bin/kim-api-build-config + KIM_CONFIG_HELPER = $(KIM_INSTALL_DIR)/bin/kim-api-build-config endif ifeq ($(shell $(KIM_CONFIG_HELPER) --version 2> /dev/null),) $(error $(KIM_CONFIG_HELPER) utility is not available. Something is wrong with your KIM API package setup) diff --git a/lib/kim/install.py b/lib/kim/install.py index d075e522c3..bfc97a0983 100644 --- a/lib/kim/install.py +++ b/lib/kim/install.py @@ -6,10 +6,20 @@ import sys,os,re,urllib,commands help = """ -Syntax: install.py -v version +Syntax: install.py -v version -c kim-dir -b kim-model-name -a kim-name specify one or more options, order does not matter -v = version of kim-api to download and work with default = kim-api-v1.8.2 (current as of June 2017) + -c = create Makefile.KIM_DIR within lammps lib/kim to configure lammps + for use with the kim-api library installed at "kim-dir" (absolute + path). default = this dir + -b = build kim-api and kim model where kim-model-name can be a specific + openkim.org model name (such as + "EAM_Dynamo_Ackland_W__MO_141627196590_002") or the keyword + "OpenKIM" to install all compatible models from the openkim.org + site. + -a = add kim-name openkim.org item (model driver or model) to existing + kim-api instalation. """ def error(): @@ -20,53 +30,110 @@ def error(): args = sys.argv -dir = "." +thisdir = os.environ['PWD'] +dir = thisdir version = "kim-api-v1.8.2" +dirflag = 0 +buildflag = 0 +addflag = 0 + iarg = 1 while iarg < len(args): if args[iarg] == "-v": if iarg+2 > len(args): error() version = args[iarg+1] iarg += 2 + elif args[iarg] == "-c": + dirflag = 1 + if iarg+2 > len(args): error() + dir = args[iarg+1] + iarg += 2 + elif args[iarg] == "-b": + buildflag = 1 + if iarg+2 > len(args): error() + modelname = args[iarg+1] + iarg += 2 + elif args[iarg] == "-a": + addflag = 1 + if iarg+2 > len(args): error() + addmodelname = args[iarg+1] + iarg += 2 else: error() +thisdir = os.path.abspath(thisdir) dir = os.path.abspath(dir) url = "https://s3.openkim.org/kim-api/%s.tgz" % version # download and unpack tarball -print "Downloading kim-api tarball ..." -urllib.urlretrieve(url,"%s/%s.tgz" % (dir,version)) -print "Unpacking kim-api tarball ..." -cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (dir,version,version) -txt = commands.getstatusoutput(cmd) -if txt[0] != 0: error() - -# configure kim-api -print "Configuring kim-api ..." -cmd = "cd %s/%s; ./configure --prefix='%s'" % (dir,version,dir) -txt = commands.getstatusoutput(cmd) -print txt[1] -if txt[0] != 0: error() - -# build kim-api - -print "Building kim-api ..." -cmd = "cd %s/%s; make" % (dir,version) -txt = commands.getstatusoutput(cmd) -print txt[1] -if txt[0] != 0: error() - -# install kim-api - -print "Installing kim-api ..." -cmd = "cd %s/%s; make install" % (dir,version) -txt = commands.getstatusoutput(cmd) -print txt[1] -if txt[0] != 0: error() - -cmd = "cd %s/%s; make install-set-default-to-v1" %(dir,version) -txt = commands.getstatusoutput(cmd) -print txt[1] -if txt[0] != 0: error() + +if not os.path.isfile("%s/Makefile.KIM_DIR" % thisdir): + open("%s/Makefile.KIM_DIR" % thisdir, 'w').write("KIM_INSTALL_DIR=%s" % dir) + print "Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) +else: + if dirflag == 1: + open("%s/Makefile.KIM_DIR" % thisdir, 'w').write("KIM_INSTALL_DIR=%s" % dir) + print "Updated %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) + + +if buildflag == 1: + # download kim-api + print "Downloading kim-api tarball ..." + urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,version)) + print "Unpacking kim-api tarball ..." + cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (thisdir,version,version) + txt = commands.getstatusoutput(cmd) + if txt[0] != 0: error() + + # configure kim-api + print "Configuring kim-api ..." + cmd = "cd %s/%s; ./configure --prefix='%s'" % (thisdir,version,dir) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: error() + + # build kim-api + print "Configuring model : %s" % modelname + cmd = "cd %s/%s; make add-%s" % (thisdir,version,modelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: error() + # + print "Building kim-api ..." + cmd = "cd %s/%s; make" % (thisdir,version) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: error() + + # install kim-api + print "Installing kim-api ..." + cmd = "cd %s/%s; make install" % (thisdir,version) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: error() + # + cmd = "cd %s/%s; make install-set-default-to-v1" %(thisdir,version) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: error() + + # remove source files + print "Removing kim-api source and build files" + cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" % (thisdir,version,version) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: error() + +if addflag == 1: + # download model + url = "https://openkim.org/download/%s.tgz" % addmodelname + print "Downloading item tarball ..." + urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,addmodelname)) + print "Unpacking item tarball ..." + cmd = "cd %s; tar zxvf %s.tgz" % (thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + if txt[0] != 0: error() + # + print "Building item ..." + #..... -- GitLab From fe888e46221910931096e959d48943114ef974ee Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 7 Jul 2017 15:39:25 -0400 Subject: [PATCH 445/593] add support for recomputing normalization factors and finite size correction during --- doc/src/compute_rdf.txt | 11 +++++- src/compute_rdf.cpp | 86 +++++++++++++++++++++++++++-------------- src/compute_rdf.h | 2 + 3 files changed, 68 insertions(+), 31 deletions(-) diff --git a/doc/src/compute_rdf.txt b/doc/src/compute_rdf.txt index acbc0e4f0c..e462e85fc0 100644 --- a/doc/src/compute_rdf.txt +++ b/doc/src/compute_rdf.txt @@ -180,9 +180,18 @@ will register an arbitrarily large spike at whatever distance they happen to be at, and zero everywhere else. Coord(r) will show a step change from zero to one at the location of the spike in g(r). +NOTE: compute rdf can handle dynamic groups and systems where atoms +are added or removed, but this causes that certain normalization +parameters need to be recomputed in every step and include collective +communication operations. This will reduce performance and limit +parallel efficiency and scaling. For systems, where only the type +of atoms changes (e.g. when using "fix atom/swap"_fix_atom_swap.html), +you need to explicitly request the dynamic normalization updates +via "compute_modify dynamic yes"_compute_modify.html + [Related commands:] -"fix ave/time"_fix_ave_time.html +"fix ave/time"_fix_ave_time.html, "compute_modify"_compute_modify.html [Default:] diff --git a/src/compute_rdf.cpp b/src/compute_rdf.cpp index fc6ad6d8b6..72eb46f6f5 100644 --- a/src/compute_rdf.cpp +++ b/src/compute_rdf.cpp @@ -48,7 +48,6 @@ ComputeRDF::ComputeRDF(LAMMPS *lmp, int narg, char **arg) : array_flag = 1; extarray = 0; - dynamic_group_allow = 0; nbin = force->inumeric(FLERR,arg[3]); if (nbin < 1) error->all(FLERR,"Illegal compute rdf command"); @@ -125,6 +124,9 @@ ComputeRDF::ComputeRDF(LAMMPS *lmp, int narg, char **arg) : icount = new int[npairs]; jcount = new int[npairs]; duplicates = new int[npairs]; + + dynamic = 0; + natoms_old = 0; } /* ---------------------------------------------------------------------- */ @@ -150,7 +152,6 @@ ComputeRDF::~ComputeRDF() void ComputeRDF::init() { - int i,j,m; if (!force->pair && !cutflag) error->all(FLERR,"Compute rdf requires a pair style be defined " @@ -184,12 +185,50 @@ void ComputeRDF::init() for (int i = 0; i < nbin; i++) array[i][0] = (i+0.5) * delr; + // initialize normalization, finite size correction, and changing atom counts + + natoms_old = atom->natoms; + dynamic = group->dynamic[igroup]; + if (dynamic_user) dynamic = 1; + init_norm(); + + // need an occasional half neighbor list + // if user specified, request a cutoff = cutoff_user + skin + // skin is included b/c Neighbor uses this value similar + // to its cutneighmax = force cutoff + skin + // also, this NeighList may be used by this compute for multiple steps + // (until next reneighbor), so it needs to contain atoms further + // than cutoff_user apart, just like a normal neighbor list does + + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->pair = 0; + neighbor->requests[irequest]->compute = 1; + neighbor->requests[irequest]->occasional = 1; + if (cutflag) { + neighbor->requests[irequest]->cut = 1; + neighbor->requests[irequest]->cutoff = mycutneigh; + } +} + +/* ---------------------------------------------------------------------- */ + +void ComputeRDF::init_list(int id, NeighList *ptr) +{ + list = ptr; +} + +/* ---------------------------------------------------------------------- */ + +void ComputeRDF::init_norm() +{ + int i,j,m; + // count atoms of each type that are also in group - int *mask = atom->mask; - int *type = atom->type; - int nlocal = atom->nlocal; - int ntypes = atom->ntypes; + const int nlocal = atom->nlocal; + const int ntypes = atom->ntypes; + const int * const mask = atom->mask; + const int * const type = atom->type; for (i = 1; i <= ntypes; i++) typecount[i] = 0; for (i = 0; i < nlocal; i++) @@ -218,30 +257,6 @@ void ComputeRDF::init() MPI_Allreduce(duplicates,scratch,npairs,MPI_INT,MPI_SUM,world); for (i = 0; i < npairs; i++) duplicates[i] = scratch[i]; delete [] scratch; - - // need an occasional half neighbor list - // if user specified, request a cutoff = cutoff_user + skin - // skin is included b/c Neighbor uses this value similar - // to its cutneighmax = force cutoff + skin - // also, this NeighList may be used by this compute for multiple steps - // (until next reneighbor), so it needs to contain atoms further - // than cutoff_user apart, just like a normal neighbor list does - - int irequest = neighbor->request(this,instance_me); - neighbor->requests[irequest]->pair = 0; - neighbor->requests[irequest]->compute = 1; - neighbor->requests[irequest]->occasional = 1; - if (cutflag) { - neighbor->requests[irequest]->cut = 1; - neighbor->requests[irequest]->cutoff = mycutneigh; - } -} - -/* ---------------------------------------------------------------------- */ - -void ComputeRDF::init_list(int id, NeighList *ptr) -{ - list = ptr; } /* ---------------------------------------------------------------------- */ @@ -253,6 +268,17 @@ void ComputeRDF::compute_array() int *ilist,*jlist,*numneigh,**firstneigh; double factor_lj,factor_coul; + if (natoms_old != atom->natoms) { + dynamic = 1; + natoms_old = atom->natoms; + } + + // if the number of atoms has changed or we have a dynamic group + // or dynamic updates are requested (e.g. when changing atom types) + // we need to recompute some normalization parameters + + if (dynamic) init_norm(); + invoked_array = update->ntimestep; // invoke half neighbor list (will copy or build if necessary) diff --git a/src/compute_rdf.h b/src/compute_rdf.h index 61d99e0881..4188799b74 100644 --- a/src/compute_rdf.h +++ b/src/compute_rdf.h @@ -51,6 +51,8 @@ class ComputeRDF : public Compute { int *duplicates; class NeighList *list; // half neighbor list + void init_norm(); + bigint natoms_old; }; } -- GitLab From 71ddcaf0b607c6518516bb67907eee64d80eeea8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 7 Jul 2017 15:50:19 -0400 Subject: [PATCH 446/593] whitespace cleanup --- src/compute_rdf.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compute_rdf.cpp b/src/compute_rdf.cpp index 72eb46f6f5..167de4576d 100644 --- a/src/compute_rdf.cpp +++ b/src/compute_rdf.cpp @@ -41,7 +41,7 @@ using namespace MathConst; ComputeRDF::ComputeRDF(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), rdfpair(NULL), nrdfpair(NULL), ilo(NULL), ihi(NULL), jlo(NULL), jhi(NULL), - hist(NULL), histall(NULL), typecount(NULL), icount(NULL), jcount(NULL), + hist(NULL), histall(NULL), typecount(NULL), icount(NULL), jcount(NULL), duplicates(NULL) { if (narg < 4 || (narg-4) % 2) error->all(FLERR,"Illegal compute rdf command"); @@ -72,7 +72,7 @@ ComputeRDF::ComputeRDF(LAMMPS *lmp, int narg, char **arg) : iarg += 2; } else error->all(FLERR,"Illegal compute rdf command"); } - + // pairwise args if (nargpair == 0) npairs = 1; @@ -162,12 +162,12 @@ void ComputeRDF::init() mycutneigh = cutoff_user + skin; double cutghost; // as computed by Neighbor and Comm - if (force->pair) + if (force->pair) cutghost = MAX(force->pair->cutforce+skin,comm->cutghostuser); - else + else cutghost = comm->cutghostuser; - if (mycutneigh > cutghost) + if (mycutneigh > cutghost) error->all(FLERR,"Compure rdf cutoff exceeds ghost atom range - " "use comm_modify cutoff command"); if (force->pair && mycutneigh < force->pair->cutforce + skin) -- GitLab From 92395e9bb412578dff8742ceea1e9ac3a5122076 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 10 Jul 2017 17:19:37 -0400 Subject: [PATCH 447/593] disallow MC moves with fix rigid and fix shake active. update examples and add shake example --- examples/gcmc/H2O.txt | 62 ++++ examples/gcmc/in.gcmc.co2 | 2 +- examples/gcmc/in.gcmc.h2o | 88 ++++++ examples/gcmc/log.24Mar17.gcmc.co2.g++.4 | 179 ----------- ...mc.co2.g++.1 => log.6Jul17.gcmc.co2.g++.1} | 99 +++--- examples/gcmc/log.6Jul17.gcmc.co2.g++.4 | 180 +++++++++++ examples/gcmc/log.6Jul17.gcmc.h2o.g++.1 | 281 ++++++++++++++++++ examples/gcmc/log.6Jul17.gcmc.h2o.g++.4 | 281 ++++++++++++++++++ ...gcmc.lj.g++.1 => log.6Jul17.gcmc.lj.g++.1} | 23 +- ...gcmc.lj.g++.4 => log.6Jul17.gcmc.lj.g++.4} | 23 +- src/MC/fix_gcmc.cpp | 4 + 11 files changed, 970 insertions(+), 252 deletions(-) create mode 100644 examples/gcmc/H2O.txt create mode 100644 examples/gcmc/in.gcmc.h2o delete mode 100644 examples/gcmc/log.24Mar17.gcmc.co2.g++.4 rename examples/gcmc/{log.24Mar17.gcmc.co2.g++.1 => log.6Jul17.gcmc.co2.g++.1} (50%) create mode 100644 examples/gcmc/log.6Jul17.gcmc.co2.g++.4 create mode 100644 examples/gcmc/log.6Jul17.gcmc.h2o.g++.1 create mode 100644 examples/gcmc/log.6Jul17.gcmc.h2o.g++.4 rename examples/gcmc/{log.24Mar17.gcmc.lj.g++.1 => log.6Jul17.gcmc.lj.g++.1} (88%) rename examples/gcmc/{log.24Mar17.gcmc.lj.g++.4 => log.6Jul17.gcmc.lj.g++.4} (88%) diff --git a/examples/gcmc/H2O.txt b/examples/gcmc/H2O.txt new file mode 100644 index 0000000000..b56f869693 --- /dev/null +++ b/examples/gcmc/H2O.txt @@ -0,0 +1,62 @@ +# CO2 molecule file. TraPPE model. + +3 atoms +2 bonds +1 angles + +Coords + +1 1.12456 0.09298 1.27452 +2 1.53683 0.75606 1.89928 +3 0.49482 0.56390 0.65678 + +Types + +1 1 +2 2 +3 2 + +Charges + +1 -0.8472 +2 0.4236 +3 0.4236 + +Bonds + +1 1 1 2 +2 1 1 3 + +Angles + +1 1 2 1 3 + +Shake Flags + +1 1 +2 1 +3 1 + +Shake Atoms + +1 1 2 3 +2 1 2 3 +3 1 2 3 + +Shake Bond Types + +1 1 1 1 +2 1 1 1 +3 1 1 1 + +Special Bond Counts + +1 2 0 0 +2 1 1 0 +3 1 1 0 + +Special Bonds + +1 2 3 +2 1 3 +3 1 2 diff --git a/examples/gcmc/in.gcmc.co2 b/examples/gcmc/in.gcmc.co2 index 0961e2b556..d11ef72fdd 100644 --- a/examples/gcmc/in.gcmc.co2 +++ b/examples/gcmc/in.gcmc.co2 @@ -64,7 +64,7 @@ fix_modify myrigidnvt dynamic/dof no # gcmc variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans) -fix mygcmc all gcmc 100 100 100 0 54341 ${temp} ${mu} ${disp} mol & +fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol & co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt # output diff --git a/examples/gcmc/in.gcmc.h2o b/examples/gcmc/in.gcmc.h2o new file mode 100644 index 0000000000..7ffaafa975 --- /dev/null +++ b/examples/gcmc/in.gcmc.h2o @@ -0,0 +1,88 @@ +# fix gcmc example with fix shake + +# variables available on command line + +variable mu index -8.1 +variable disp index 0.5 +variable temp index 338.0 +variable lbox index 10.0 +variable spacing index 5.0 + +# global model settings + +units real +atom_style full +boundary p p p +pair_style lj/cut/coul/long 14 +pair_modify mix arithmetic tail yes +kspace_style ewald 0.0001 +bond_style harmonic +angle_style harmonic + +# box, start molecules on simple cubic lattice + +lattice sc ${spacing} +region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box +create_box 2 box & + bond/types 1 & + angle/types 1 & + extra/bond/per/atom 2 & + extra/angle/per/atom 1 & + extra/special/per/atom 2 + +# we can load multiple molecule templates, but don't have to use them all +molecule co2mol CO2.txt +molecule h2omol H2O.txt +create_atoms 0 box mol h2omol 464563 units box + +# rigid SPC/E water model + +pair_coeff 1 1 0.15535 3.166 +pair_coeff * 2 0.0000 0.0000 + +bond_coeff 1 1000 1.0 +angle_coeff 1 100 109.47 + +# masses + +mass 1 15.9994 +mass 2 1.0 + +# MD settings + +group h2o type 1 2 +neighbor 2.0 bin +neigh_modify every 1 delay 1 check yes +velocity all create ${temp} 54654 +timestep 1.0 + +minimize 0.0 0.0 100 1000 +reset_timestep 0 +# rigid constraints with thermostat + +fix mynvt all nvt temp ${temp} ${temp} 100 +fix wshake all shake 0.0001 50 0 b 1 a 1 mol h2omol +# gcmc + + + +run 1000 + +variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans) +fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol & + h2omol tfac_insert ${tfac} group h2o shake wshake + +# output + +variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1) +variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1) +variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1) +variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1) +compute_modify thermo_temp dynamic/dof yes +thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc +thermo 1000 + +# run + +run 20000 + diff --git a/examples/gcmc/log.24Mar17.gcmc.co2.g++.4 b/examples/gcmc/log.24Mar17.gcmc.co2.g++.4 deleted file mode 100644 index 65504b8d46..0000000000 --- a/examples/gcmc/log.24Mar17.gcmc.co2.g++.4 +++ /dev/null @@ -1,179 +0,0 @@ -LAMMPS (17 Mar 2017) -# GCMC for CO2 molecular fluid, rigid/small/nvt dynamics -# Rigid CO2 TraPPE model -# [Potoff and J.I. Siepmann, Vapor-liquid equilibria of -# mixtures containing alkanes, carbon dioxide and -# nitrogen AIChE J., 47,1676-1682 (2001)]. - -# variables available on command line - -variable mu index -8.1 -variable disp index 0.5 -variable temp index 338.0 -variable lbox index 10.0 -variable spacing index 5.0 - -# global model settings - -units real -atom_style full -boundary p p p -pair_style lj/cut/coul/long 14 -pair_modify mix arithmetic tail yes -kspace_style ewald 0.0001 -bond_style harmonic -angle_style harmonic - -# box, start molecules on simple cubic lattice - -lattice sc ${spacing} -lattice sc 5.0 -Lattice spacing in x,y,z = 5 5 5 -region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box -region box block 0 10.0 0 ${lbox} 0 ${lbox} units box -region box block 0 10.0 0 10.0 0 ${lbox} units box -region box block 0 10.0 0 10.0 0 10.0 units box -create_box 2 box bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2 -Created orthogonal box = (0 0 0) to (10 10 10) - 1 by 2 by 2 MPI processor grid -molecule co2mol CO2.txt -Read molecule co2mol: - 3 atoms with 2 types - 2 bonds with 1 types - 1 angles with 1 types - 0 dihedrals with 0 types - 0 impropers with 0 types -create_atoms 0 box mol co2mol 464563 units box -Created 24 atoms - -# rigid CO2 TraPPE model - -pair_coeff 1 1 0.053649 2.8 -pair_coeff 2 2 0.156973 3.05 -bond_coeff 1 0 1.16 -angle_coeff 1 0 180 - -# masses - -mass 1 12.0107 -mass 2 15.9994 - -# MD settings - -group co2 type 1 2 -24 atoms in group co2 -neighbor 2.0 bin -neigh_modify every 1 delay 10 check yes -velocity all create ${temp} 54654 -velocity all create 338.0 54654 -timestep 1.0 - -# rigid constraints with thermostat - -fix myrigidnvt all rigid/nvt/small molecule temp ${temp} ${temp} 100 mol co2mol -fix myrigidnvt all rigid/nvt/small molecule temp 338.0 ${temp} 100 mol co2mol -fix myrigidnvt all rigid/nvt/small molecule temp 338.0 338.0 100 mol co2mol -8 rigid bodies with 24 atoms - 1.16 = max distance from body owner to body atom -fix_modify myrigidnvt dynamic/dof no - -# gcmc - -variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans) -fix mygcmc all gcmc 100 100 100 0 54341 ${temp} ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt -fix mygcmc all gcmc 100 100 100 0 54341 338.0 ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt -fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt -fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt -fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert 1.66666666666667 group co2 rigid myrigidnvt - -# output - -variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1) -variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1) -variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1) -variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1) -compute_modify thermo_temp dynamic/dof yes -thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc -thermo 1000 - -# run - -run 20000 -Ewald initialization ... -WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.164636 - estimated absolute RMS force accuracy = 0.0332064 - estimated relative force accuracy = 0.0001 - KSpace vectors: actual max1d max3d = 16 2 62 - kxmax kymax kzmax = 2 2 2 -WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:439) -0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc -0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc -WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (../neighbor.cpp:472) -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 16 - ghost atom cutoff = 16 - binsize = 8, bins = 2 2 2 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory allocation (min/avg/max) = 15.4 | 15.4 | 15.4 Mbytes -Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc - 0 386.52184 23582.465 -3.2433417 14.209828 0.5846359 24 0 0 0 0 -WARNING: Using kspace solver on system with no charge (../kspace.cpp:289) - 1000 760.80877 -39.270882 -3.5239626 12.851016 0.29231795 12 0.24161633 0.22984103 0.71087092 0.85283311 - 2000 308.0739 -255.061 -20.411926 14.386853 0.73079488 30 0.26075352 0.24898725 0.73128383 0.88590474 - 3000 432.34358 -1361.3278 -12.644057 15.894387 0.5846359 24 0.21121583 0.21051229 0.70036003 0.86735027 - 4000 631.524 -63.488785 -3.6517158 13.804656 0.36539744 15 0.22486443 0.22886173 0.72358173 0.87172606 - 5000 730.61244 -1029.284 -6.2144028 19.600352 0.43847693 18 0.23017182 0.22740779 0.72281887 0.87820845 - 6000 752.43412 503.4547 -3.7053679 16.447663 0.36539744 15 0.22943971 0.226183 0.71450085 0.87447436 - 7000 660.68448 828.51735 -10.592278 21.006666 0.51155641 21 0.24702096 0.24218506 0.71815602 0.8740222 - 8000 331.58822 -621.22187 -5.3705759 7.2482776 0.36539744 15 0.23211903 0.22906813 0.70281376 0.86269411 - 9000 413.91538 869.51669 -11.28701 15.216905 0.5846359 24 0.23246466 0.22923961 0.70832684 0.86244176 - 10000 242.20861 -808.23311 -5.4533937 5.2945044 0.36539744 15 0.22024676 0.22031775 0.70785097 0.85712561 - 11000 348.20046 -372.16895 -3.4663358 7.6114092 0.36539744 15 0.2252033 0.22688969 0.71513402 0.86123263 - 12000 251.99682 303.30092 -18.58289 11.768089 0.73079488 30 0.20916844 0.21068047 0.694787 0.84635875 - 13000 306.83592 -1582.0137 -20.810287 14.329041 0.73079488 30 0.19494837 0.196527 0.67554784 0.83056119 - 14000 476.57411 268.94927 -14.185859 19.888076 0.65771539 27 0.19779631 0.20016859 0.67957528 0.83375167 - 15000 267.03534 730.71183 -9.3348616 9.8171066 0.5846359 24 0.19468305 0.19814971 0.68032974 0.83810439 - 16000 639.83235 2190.3244 -9.6666503 26.701062 0.65771539 27 0.19520687 0.19848997 0.68514387 0.84100361 - 17000 2237.1203 -222.59057 -0.18248834 4.4456205 0.073079488 3 0.20412446 0.20757814 0.69175318 0.8434939 - 18000 754.44841 205.54694 -10.501943 27.736031 0.5846359 24 0.2129422 0.21508015 0.69665031 0.84758331 - 19000 1610.1148 1293.6003 -0.20849836 3.1996309 0.073079488 3 0.22061668 0.22356929 0.69949369 0.84851405 - 20000 231.61458 -39.696514 -4.6452226 5.0629266 0.36539744 15 0.21984893 0.22246517 0.69914635 0.85058457 -Loop time of 21.1019 on 4 procs for 20000 steps with 15 atoms - -Performance: 81.888 ns/day, 0.293 hours/ns, 947.781 timesteps/s -98.9% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.31897 | 0.41973 | 0.49748 | 10.1 | 1.99 -Bond | 0.014808 | 0.015063 | 0.015289 | 0.2 | 0.07 -Kspace | 0.3813 | 0.46228 | 0.56585 | 9.8 | 2.19 -Neigh | 0.049173 | 0.050043 | 0.050868 | 0.3 | 0.24 -Comm | 0.9755 | 0.99686 | 1.0205 | 1.9 | 4.72 -Output | 0.0014546 | 0.0015051 | 0.0016098 | 0.2 | 0.01 -Modify | 19.043 | 19.062 | 19.085 | 0.4 | 90.33 -Other | | 0.09438 | | | 0.45 - -Nlocal: 3.75 ave 6 max 3 min -Histogram: 3 0 0 0 0 0 0 0 0 1 -Nghost: 876.5 ave 937 max 818 min -Histogram: 1 1 0 0 0 0 0 0 1 1 -Neighs: 490.5 ave 647 max 363 min -Histogram: 1 0 1 0 0 1 0 0 0 1 - -Total # of neighbors = 1962 -Ave neighs/atom = 130.8 -Ave special neighs/atom = 2 -Neighbor list builds = 40070 -Dangerous builds = 115 - -Total wall time: 0:00:21 diff --git a/examples/gcmc/log.24Mar17.gcmc.co2.g++.1 b/examples/gcmc/log.6Jul17.gcmc.co2.g++.1 similarity index 50% rename from examples/gcmc/log.24Mar17.gcmc.co2.g++.1 rename to examples/gcmc/log.6Jul17.gcmc.co2.g++.1 index 7562476bf3..f9e494c43f 100644 --- a/examples/gcmc/log.24Mar17.gcmc.co2.g++.1 +++ b/examples/gcmc/log.6Jul17.gcmc.co2.g++.1 @@ -1,4 +1,5 @@ -LAMMPS (17 Mar 2017) +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task # GCMC for CO2 molecular fluid, rigid/small/nvt dynamics # Rigid CO2 TraPPE model # [Potoff and J.I. Siepmann, Vapor-liquid equilibria of @@ -80,11 +81,11 @@ fix_modify myrigidnvt dynamic/dof no # gcmc variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans) -fix mygcmc all gcmc 100 100 100 0 54341 ${temp} ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt -fix mygcmc all gcmc 100 100 100 0 54341 338.0 ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt -fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt -fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt -fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert 1.66666666666667 group co2 rigid myrigidnvt +fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt +fix mygcmc all gcmc 100 100 0 0 54341 338.0 ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert 1.66666666666667 group co2 rigid myrigidnvt # output @@ -106,7 +107,7 @@ WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) estimated relative force accuracy = 0.0001 KSpace vectors: actual max1d max3d = 16 2 62 kxmax kymax kzmax = 2 2 2 -WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:439) +WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:445) 0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc 0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (../neighbor.cpp:472) @@ -122,56 +123,58 @@ Neighbor list info ... pair build: half/bin/newton stencil: half/bin/3d/newton bin: standard -Per MPI rank memory allocation (min/avg/max) = 15.61 | 15.61 | 15.61 Mbytes +Per MPI rank memory allocation (min/avg/max) = 15.62 | 15.62 | 15.62 Mbytes Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc 0 364.27579 4238.8631 -9.6809388 13.391989 0.5846359 24 0 0 0 0 - 1000 311.39835 -327.93481 -8.6795381 9.9010062 0.51155641 21 0.13302848 0.12331626 0.6894397 0.90997852 WARNING: Using kspace solver on system with no charge (../kspace.cpp:289) - 2000 905.66812 319.43347 -0.50350961 6.2991241 0.14615898 6 0.20952183 0.20430213 0.71797992 0.92626683 - 3000 275.57393 -719.89718 -26.534978 14.238181 0.80387436 33 0.21291069 0.20460696 0.72899202 0.9133259 - 4000 254.70771 -245.01902 -20.981537 13.160079 0.80387436 33 0.17245726 0.16974613 0.70145764 0.90542759 - 5000 96.073601 -517.98124 -34.019065 5.441166 0.87695385 36 0.14174575 0.13607057 0.6776754 0.90155771 - 6000 397.57265 148.92645 -7.2012893 10.665797 0.43847693 18 0.12299956 0.1202471 0.66165464 0.90274793 - 7000 455.4271 -347.44181 -5.9244703 12.217875 0.43847693 18 0.15182038 0.14791307 0.67904236 0.90560829 - 8000 301.03124 -627.45324 -13.251012 11.066909 0.5846359 24 0.16687346 0.16315516 0.6936719 0.91129375 - 9000 256.5747 -565.67983 -17.814128 11.981874 0.73079488 30 0.15458482 0.15131825 0.68966283 0.90993975 - 10000 443.60076 89.586912 -6.077863 11.900606 0.43847693 18 0.16092552 0.16020353 0.69882461 0.91422145 - 11000 436.43777 64.412921 -6.7128469 11.708443 0.43847693 18 0.17453966 0.17480683 0.70679243 0.91369445 - 12000 594.42207 849.07743 -3.3708621 10.040536 0.29231795 12 0.17461606 0.17568622 0.71175869 0.91333367 - 13000 426.85849 -1093.1334 -17.524618 17.813377 0.65771539 27 0.17742896 0.17792831 0.71363306 0.91450124 - 14000 317.75995 336.31107 -10.46774 11.681912 0.5846359 24 0.18331181 0.18427921 0.71715557 0.91652256 - 15000 272.65129 317.50536 -26.428336 14.087176 0.80387436 33 0.17449167 0.175957 0.71122398 0.91528038 - 16000 344.28567 -577.91079 -18.177927 16.077919 0.73079488 30 0.1661682 0.16781514 0.70485136 0.91508882 - 17000 134.55928 -193.5668 -30.297136 7.6208177 0.87695385 36 0.15965609 0.1605036 0.69658104 0.9140445 - 18000 231.87302 -446.07671 -14.875027 9.6763722 0.65771539 27 0.15270985 0.15351831 0.69002918 0.91372795 - 19000 328.6835 -280.22365 -20.001303 16.982214 0.80387436 33 0.15201017 0.15272181 0.69023195 0.91272534 - 20000 0 -20.39554 -0.14872889 -0 0 0 0.15600204 0.15750795 0.69503275 0.9138765 -Loop time of 30.9008 on 1 procs for 20000 steps with 0 atoms - -Performance: 55.921 ns/day, 0.429 hours/ns, 647.233 timesteps/s -99.8% CPU use with 1 MPI tasks x no OpenMP threads + 1000 420.43475 1722.4052 -9.6956123 15.456579 0.5846359 24 0.20879341 0.20713005 0 0 + 2000 302.29516 -547.83641 -22.017674 14.11699 0.73079488 30 0.1742478 0.1678018 0 0 + 3000 316.6934 -1080.2672 -8.2218891 10.069364 0.51155641 21 0.13544917 0.13720634 0 0 + 4000 246.81618 -679.83642 -14.577244 10.29997 0.65771539 27 0.1568939 0.15860229 0 0 + 5000 260.22849 -896.29914 -16.097593 10.859684 0.65771539 27 0.13138744 0.13547049 0 0 + 6000 291.70796 -1521.99 -22.303136 13.622574 0.73079488 30 0.12615476 0.12717694 0 0 + 7000 236.02638 -599.92186 -27.580831 13.367447 0.87695385 36 0.119703 0.12145398 0 0 + 8000 321.45341 688.10577 -10.09204 11.817696 0.5846359 24 0.10917411 0.11032646 0 0 + 9000 502.85382 -302.31056 -0.22330142 0.99927447 0.073079488 3 0.1254105 0.12905828 0 0 + 10000 249.98239 -510.0091 -32.815145 15.399767 0.95003334 39 0.1274504 0.12875623 0 0 + 11000 247.59424 -1129.0274 -25.320205 12.792544 0.80387436 33 0.11739076 0.11916784 0 0 + 12000 0 -20.39554 -0.14872889 -0 0 0 0.1254933 0.12920375 0 0 + 13000 1272.2738 -474.79484 -0.29450485 8.8489483 0.14615898 6 0.13767133 0.14112496 0 0 + 14000 516.54246 -36.296516 -5.0012009 11.291243 0.36539744 15 0.15632744 0.15955377 0 0 + 15000 307.09233 1951.9301 -14.820362 12.815375 0.65771539 27 0.15393544 0.15716192 0 0 + 16000 198.31989 -559.48443 -30.459487 11.231925 0.87695385 36 0.1482565 0.15025652 0 0 + 17000 246.99311 657.85683 -18.579206 11.53442 0.73079488 30 0.14143958 0.14375423 0 0 + 18000 467.13468 167.03738 -1.0945268 5.569759 0.21923846 9 0.13847359 0.14098533 0 0 + 19000 359.54027 -1413.5407 -12.156233 13.217895 0.5846359 24 0.15169146 0.15294205 0 0 + 20000 227.79597 -1204.5652 -23.24144 10.637925 0.73079488 30 0.14917199 0.15022946 0 0 +Loop time of 20.153 on 1 procs for 20000 steps with 30 atoms + +Performance: 85.744 ns/day, 0.280 hours/ns, 992.408 timesteps/s +99.3% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 2.1985 | 2.1985 | 2.1985 | 0.0 | 7.11 -Bond | 0.029596 | 0.029596 | 0.029596 | 0.0 | 0.10 -Kspace | 0.23123 | 0.23123 | 0.23123 | 0.0 | 0.75 -Neigh | 0.16141 | 0.16141 | 0.16141 | 0.0 | 0.52 -Comm | 0.20628 | 0.20628 | 0.20628 | 0.0 | 0.67 -Output | 0.00068831 | 0.00068831 | 0.00068831 | 0.0 | 0.00 -Modify | 28.022 | 28.022 | 28.022 | 0.0 | 90.69 -Other | | 0.05058 | | | 0.16 - -Nlocal: 0 ave 0 max 0 min +Pair | 2.5352 | 2.5352 | 2.5352 | 0.0 | 12.58 +Bond | 0.026112 | 0.026112 | 0.026112 | 0.0 | 0.13 +Kspace | 0.25 | 0.25 | 0.25 | 0.0 | 1.24 +Neigh | 0.10364 | 0.10364 | 0.10364 | 0.0 | 0.51 +Comm | 0.22907 | 0.22907 | 0.22907 | 0.0 | 1.14 +Output | 0.0013065 | 0.0013065 | 0.0013065 | 0.0 | 0.01 +Modify | 16.957 | 16.957 | 16.957 | 0.0 | 84.14 +Other | | 0.05061 | | | 0.25 + +Nlocal: 30 ave 30 max 30 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min +Nghost: 2310 ave 2310 max 2310 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min +Neighs: 7736 ave 7736 max 7736 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 0 -Neighbor list builds = 40367 -Dangerous builds = 118 +Total # of neighbors = 7736 +Ave neighs/atom = 257.867 +Ave special neighs/atom = 2 +Neighbor list builds = 20349 +Dangerous builds = 0 -Total wall time: 0:00:30 +Total wall time: 0:00:20 diff --git a/examples/gcmc/log.6Jul17.gcmc.co2.g++.4 b/examples/gcmc/log.6Jul17.gcmc.co2.g++.4 new file mode 100644 index 0000000000..0df25430d2 --- /dev/null +++ b/examples/gcmc/log.6Jul17.gcmc.co2.g++.4 @@ -0,0 +1,180 @@ +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# GCMC for CO2 molecular fluid, rigid/small/nvt dynamics +# Rigid CO2 TraPPE model +# [Potoff and J.I. Siepmann, Vapor-liquid equilibria of +# mixtures containing alkanes, carbon dioxide and +# nitrogen AIChE J., 47,1676-1682 (2001)]. + +# variables available on command line + +variable mu index -8.1 +variable disp index 0.5 +variable temp index 338.0 +variable lbox index 10.0 +variable spacing index 5.0 + +# global model settings + +units real +atom_style full +boundary p p p +pair_style lj/cut/coul/long 14 +pair_modify mix arithmetic tail yes +kspace_style ewald 0.0001 +bond_style harmonic +angle_style harmonic + +# box, start molecules on simple cubic lattice + +lattice sc ${spacing} +lattice sc 5.0 +Lattice spacing in x,y,z = 5 5 5 +region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box +region box block 0 10.0 0 ${lbox} 0 ${lbox} units box +region box block 0 10.0 0 10.0 0 ${lbox} units box +region box block 0 10.0 0 10.0 0 10.0 units box +create_box 2 box bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2 +Created orthogonal box = (0 0 0) to (10 10 10) + 1 by 2 by 2 MPI processor grid +molecule co2mol CO2.txt +Read molecule co2mol: + 3 atoms with 2 types + 2 bonds with 1 types + 1 angles with 1 types + 0 dihedrals with 0 types + 0 impropers with 0 types +create_atoms 0 box mol co2mol 464563 units box +Created 24 atoms + +# rigid CO2 TraPPE model + +pair_coeff 1 1 0.053649 2.8 +pair_coeff 2 2 0.156973 3.05 +bond_coeff 1 0 1.16 +angle_coeff 1 0 180 + +# masses + +mass 1 12.0107 +mass 2 15.9994 + +# MD settings + +group co2 type 1 2 +24 atoms in group co2 +neighbor 2.0 bin +neigh_modify every 1 delay 10 check yes +velocity all create ${temp} 54654 +velocity all create 338.0 54654 +timestep 1.0 + +# rigid constraints with thermostat + +fix myrigidnvt all rigid/nvt/small molecule temp ${temp} ${temp} 100 mol co2mol +fix myrigidnvt all rigid/nvt/small molecule temp 338.0 ${temp} 100 mol co2mol +fix myrigidnvt all rigid/nvt/small molecule temp 338.0 338.0 100 mol co2mol +8 rigid bodies with 24 atoms + 1.16 = max distance from body owner to body atom +fix_modify myrigidnvt dynamic/dof no + +# gcmc + +variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans) +fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt +fix mygcmc all gcmc 100 100 0 0 54341 338.0 ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert 1.66666666666667 group co2 rigid myrigidnvt + +# output + +variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1) +variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1) +variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1) +variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1) +compute_modify thermo_temp dynamic/dof yes +thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc +thermo 1000 + +# run + +run 20000 +Ewald initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.164636 + estimated absolute RMS force accuracy = 0.0332064 + estimated relative force accuracy = 0.0001 + KSpace vectors: actual max1d max3d = 16 2 62 + kxmax kymax kzmax = 2 2 2 +WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:445) +0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc +0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc +WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (../neighbor.cpp:472) +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 16 + ghost atom cutoff = 16 + binsize = 8, bins = 2 2 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 15.41 | 15.41 | 15.41 Mbytes +Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc + 0 386.52184 23582.465 -3.2433417 14.209828 0.5846359 24 0 0 0 0 +WARNING: Using kspace solver on system with no charge (../kspace.cpp:289) + 1000 335.66829 -3.7743052 -4.6268612 7.3374649 0.36539744 15 0.20601899 0.20787963 0 0 + 2000 459.73529 238.91592 -0.42937831 5.4815343 0.21923846 9 0.30392058 0.30105616 0 0 + 3000 255.47773 -479.67802 -36.850434 15.738299 0.95003334 39 0.22220744 0.2197582 0 0 + 4000 182.70803 -1059.2262 -43.044833 12.163134 1.0231128 42 0.16781689 0.16716177 0 0 + 5000 234.00907 -1821.0444 -46.04795 15.578317 1.0231128 42 0.13498091 0.13704201 0 0 + 6000 163.42759 -774.67294 -49.686261 11.691518 1.0961923 45 0.11401677 0.11296973 0 0 + 7000 171.64616 -355.23516 -49.323434 12.27947 1.0961923 45 0.098302308 0.098552065 0 0 + 8000 251.29791 -905.47863 -37.841209 15.480807 0.95003334 39 0.086856972 0.08638658 0 0 + 9000 143.69498 -849.95393 -49.073188 10.279858 1.0961923 45 0.078261061 0.077955243 0 0 + 10000 239.35727 -1158.1879 -43.562047 15.934355 1.0231128 42 0.070789792 0.070807529 0 0 + 11000 169.51213 -1574.7885 -51.125228 12.126803 1.0961923 45 0.065008734 0.06498871 0 0 + 12000 181.39739 160.11631 -46.850937 12.977068 1.0961923 45 0.059648717 0.059514803 0 0 + 13000 164.14601 -1107.7629 -50.726722 11.742914 1.0961923 45 0.055207333 0.055097701 0 0 + 14000 287.26285 418.51463 -41.664766 19.123497 1.0231128 42 0.051346789 0.051222285 0 0 + 15000 256.94593 -532.36615 -41.651618 17.105257 1.0231128 42 0.047870301 0.047861685 0 0 + 16000 166.92132 151.15933 -39.957018 11.11219 1.0231128 42 0.045205599 0.045042211 0 0 + 17000 163.22452 -1299.8119 -42.677558 10.866089 1.0231128 42 0.043122086 0.042993687 0 0 + 18000 158.01154 475.77329 -48.803162 11.304057 1.0961923 45 0.041016683 0.040647229 0 0 + 19000 138.49297 -1585.1508 -47.517099 9.9077098 1.0961923 45 0.038929287 0.038436764 0 0 + 20000 173.84439 -1362.6301 -53.002743 12.436731 1.0961923 45 0.036973919 0.036523816 0 0 +Loop time of 31.8386 on 4 procs for 20000 steps with 45 atoms + +Performance: 54.274 ns/day, 0.442 hours/ns, 628.168 timesteps/s +98.5% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.1546 | 1.6687 | 2.1338 | 29.5 | 5.24 +Bond | 0.019769 | 0.020369 | 0.02132 | 0.4 | 0.06 +Kspace | 0.53392 | 0.99911 | 1.5116 | 37.8 | 3.14 +Neigh | 0.06737 | 0.067842 | 0.068412 | 0.2 | 0.21 +Comm | 1.9408 | 1.9582 | 1.9733 | 1.1 | 6.15 +Output | 0.0019503 | 0.0020472 | 0.0022476 | 0.3 | 0.01 +Modify | 26.974 | 26.99 | 27.001 | 0.2 | 84.77 +Other | | 0.1322 | | | 0.42 + +Nlocal: 11.25 ave 14 max 8 min +Histogram: 1 0 0 0 0 1 1 0 0 1 +Nghost: 2639.75 ave 2656 max 2617 min +Histogram: 1 0 0 0 0 0 2 0 0 1 +Neighs: 4320 ave 5824 max 2201 min +Histogram: 1 0 0 0 0 0 1 1 0 1 + +Total # of neighbors = 17280 +Ave neighs/atom = 384 +Ave special neighs/atom = 2 +Neighbor list builds = 20394 +Dangerous builds = 0 + +Total wall time: 0:00:31 diff --git a/examples/gcmc/log.6Jul17.gcmc.h2o.g++.1 b/examples/gcmc/log.6Jul17.gcmc.h2o.g++.1 new file mode 100644 index 0000000000..3b1606e65d --- /dev/null +++ b/examples/gcmc/log.6Jul17.gcmc.h2o.g++.1 @@ -0,0 +1,281 @@ +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# fix gcmc example with fix shake + +# variables available on command line + +variable mu index -8.1 +variable disp index 0.5 +variable temp index 338.0 +variable lbox index 10.0 +variable spacing index 5.0 + +# global model settings + +units real +atom_style full +boundary p p p +pair_style lj/cut/coul/long 14 +pair_modify mix arithmetic tail yes +kspace_style ewald 0.0001 +bond_style harmonic +angle_style harmonic + +# box, start molecules on simple cubic lattice + +lattice sc ${spacing} +lattice sc 5.0 +Lattice spacing in x,y,z = 5 5 5 +region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box +region box block 0 10.0 0 ${lbox} 0 ${lbox} units box +region box block 0 10.0 0 10.0 0 ${lbox} units box +region box block 0 10.0 0 10.0 0 10.0 units box +create_box 2 box bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2 +Created orthogonal box = (0 0 0) to (10 10 10) + 1 by 1 by 1 MPI processor grid + +# we can load multiple molecule templates, but don't have to use them all +molecule co2mol CO2.txt +Read molecule co2mol: + 3 atoms with 2 types + 2 bonds with 1 types + 1 angles with 1 types + 0 dihedrals with 0 types + 0 impropers with 0 types +molecule h2omol H2O.txt +Read molecule h2omol: + 3 atoms with 2 types + 2 bonds with 1 types + 1 angles with 1 types + 0 dihedrals with 0 types + 0 impropers with 0 types +create_atoms 0 box mol h2omol 464563 units box +Created 24 atoms + +# rigid SPC/E water model + +pair_coeff 1 1 0.15535 3.166 +pair_coeff * 2 0.0000 0.0000 + +bond_coeff 1 1000 1.0 +angle_coeff 1 100 109.47 + +# masses + +mass 1 15.9994 +mass 2 1.0 + +# MD settings + +group h2o type 1 2 +24 atoms in group h2o +neighbor 2.0 bin +neigh_modify every 1 delay 1 check yes +velocity all create ${temp} 54654 +velocity all create 338.0 54654 +timestep 1.0 + +minimize 0.0 0.0 100 1000 +WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (../min.cpp:168) +Ewald initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.170448 + estimated absolute RMS force accuracy = 0.0332064 + estimated relative force accuracy = 0.0001 + KSpace vectors: actual max1d max3d = 16 2 62 + kxmax kymax kzmax = 2 2 2 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 16 + ghost atom cutoff = 16 + binsize = 8, bins = 2 2 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 11.88 | 11.88 | 11.88 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 338 -4.1890564 9.2628112e-06 18.98377 739.06991 + 100 338 -30.182886 0.85607237 -6.1539961 -2535.3207 +Loop time of 0.0525794 on 1 procs for 100 steps with 24 atoms + +99.4% CPU use with 1 MPI tasks x 1 OpenMP threads + +Minimization stats: + Stopping criterion = max iterations + Energy initial, next-to-last, final = + -4.18904713252 -28.9258064504 -29.3268133965 + Force two-norm initial, final = 18.0027 42.4511 + Force max component initial, final = 5.8993 16.0523 + Final line search alpha, max atom move = 0.00353207 0.056698 + Iterations, force evaluations = 100 238 + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.044199 | 0.044199 | 0.044199 | 0.0 | 84.06 +Bond | 0.00049019 | 0.00049019 | 0.00049019 | 0.0 | 0.93 +Kspace | 0.0031631 | 0.0031631 | 0.0031631 | 0.0 | 6.02 +Neigh | 0.00046444 | 0.00046444 | 0.00046444 | 0.0 | 0.88 +Comm | 0.0034101 | 0.0034101 | 0.0034101 | 0.0 | 6.49 +Output | 1.9073e-05 | 1.9073e-05 | 1.9073e-05 | 0.0 | 0.04 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 0.0008333 | | | 1.58 + +Nlocal: 24 ave 24 max 24 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 2047 ave 2047 max 2047 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4936 ave 4936 max 4936 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 4936 +Ave neighs/atom = 205.667 +Ave special neighs/atom = 2 +Neighbor list builds = 2 +Dangerous builds = 0 +reset_timestep 0 +# rigid constraints with thermostat + +fix mynvt all nvt temp ${temp} ${temp} 100 +fix mynvt all nvt temp 338.0 ${temp} 100 +fix mynvt all nvt temp 338.0 338.0 100 +fix wshake all shake 0.0001 50 0 b 1 a 1 mol h2omol + 0 = # of size 2 clusters + 0 = # of size 3 clusters + 0 = # of size 4 clusters + 8 = # of frozen angles +# gcmc + + + +run 1000 +Ewald initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.170448 + estimated absolute RMS force accuracy = 0.0332064 + estimated relative force accuracy = 0.0001 + KSpace vectors: actual max1d max3d = 16 2 62 + kxmax kymax kzmax = 2 2 2 +Per MPI rank memory allocation (min/avg/max) = 11.63 | 11.63 | 11.63 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 518.26667 -30.182886 0 -7.0100684 993.1985 + 1000 326.9865 -62.258445 0 -47.638175 -5.3440813 +Loop time of 0.14263 on 1 procs for 1000 steps with 24 atoms + +Performance: 605.764 ns/day, 0.040 hours/ns, 7011.155 timesteps/s +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.10849 | 0.10849 | 0.10849 | 0.0 | 76.07 +Bond | 0.00015426 | 0.00015426 | 0.00015426 | 0.0 | 0.11 +Kspace | 0.01205 | 0.01205 | 0.01205 | 0.0 | 8.45 +Neigh | 0.0046577 | 0.0046577 | 0.0046577 | 0.0 | 3.27 +Comm | 0.011531 | 0.011531 | 0.011531 | 0.0 | 8.08 +Output | 1.6212e-05 | 1.6212e-05 | 1.6212e-05 | 0.0 | 0.01 +Modify | 0.0037699 | 0.0037699 | 0.0037699 | 0.0 | 2.64 +Other | | 0.001957 | | | 1.37 + +Nlocal: 24 ave 24 max 24 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1660 ave 1660 max 1660 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 5112 ave 5112 max 5112 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 5112 +Ave neighs/atom = 213 +Ave special neighs/atom = 2 +Neighbor list builds = 25 +Dangerous builds = 0 + +variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans) +fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake +fix mygcmc all gcmc 100 100 0 0 54341 338.0 ${mu} ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol h2omol tfac_insert ${tfac} group h2o shake wshake +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol h2omol tfac_insert 1.66666666666667 group h2o shake wshake + +# output + +variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1) +variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1) +variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1) +variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1) +compute_modify thermo_temp dynamic/dof yes +thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc +thermo 1000 + +# run + +run 20000 +Ewald initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.170448 + estimated absolute RMS force accuracy = 0.0332064 + estimated relative force accuracy = 0.0001 + KSpace vectors: actual max1d max3d = 16 2 62 + kxmax kymax kzmax = 2 2 2 +WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:445) +0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc +0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc +WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (../neighbor.cpp:472) +Per MPI rank memory allocation (min/avg/max) = 11.63 | 11.63 | 11.63 Mbytes +Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc + 1000 326.9865 -4.3509713 -62.258445 14.62027 0.23910963 24 0 0 0 0 + 2000 116.99793 -5344.1527 -286.61595 17.088682 0.74721761 75 0.048183096 0.013941446 0 0 + 3000 106.86746 -3920.4926 -361.60598 18.794545 0.89666113 90 0.035637919 0.012768883 0 0 + 4000 75.002668 540.46846 -414.8511 14.531966 0.98632724 99 0.025963651 0.0093451705 0 0 + 5000 79.924788 -2131.1173 -437.21216 15.962121 1.0162159 102 0.019879728 0.0070418993 0 0 + 6000 95.552773 -3647.0233 -438.24276 19.083253 1.0162159 102 0.015753613 0.0056885133 0 0 + 7000 79.501736 -2071.5369 -440.77351 15.877631 1.0162159 102 0.01326216 0.0046915318 0 0 + 8000 62.567091 -3102.9616 -442.21884 12.495541 1.0162159 102 0.011305503 0.0040437885 0 0 + 9000 68.324047 -3812.7866 -440.46835 13.645287 1.0162159 102 0.0099549538 0.0035157329 0 0 + 10000 83.857631 -2158.2659 -444.8183 16.747566 1.0162159 102 0.0088200922 0.0031354281 0 0 + 11000 68.350984 -2084.0789 -440.14081 13.650667 1.0162159 102 0.0081331455 0.0030247424 0 0 + 12000 76.867315 -1585.6723 -443.36199 15.3515 1.0162159 102 0.0073845932 0.0027532534 0 0 + 13000 59.74266 -2211.0211 -446.07791 11.931462 1.0162159 102 0.0067756276 0.0025213898 0 0 + 14000 81.154979 -907.0176 -441.53368 16.207808 1.0162159 102 0.0062527642 0.0023280719 0 0 + 15000 66.814346 -2804.5134 -455.80704 13.7421 1.0461046 105 0.0059590528 0.0021576214 0 0 + 16000 71.42983 -3930.4004 -458.43218 14.691394 1.0461046 105 0.0055547473 0.0020163729 0 0 + 17000 89.624855 -3569.8136 -455.18164 18.433672 1.0461046 105 0.0052173265 0.0018867687 0 0 + 18000 63.519962 -1882.8157 -456.58939 13.064525 1.0461046 105 0.0049082049 0.0017765986 0 0 + 19000 71.872698 -2243.5046 -454.93359 14.782481 1.0461046 105 0.0046439115 0.0016748361 0 0 + 20000 73.660765 -2285.3173 -476.35473 15.589381 1.0759934 108 0.0045124933 0.0015837653 0 0 + 21000 95.675868 987.92089 -475.46736 20.248603 1.0759934 108 0.004285814 0.0015049513 0 0 +Loop time of 226.155 on 1 procs for 20000 steps with 108 atoms + +Performance: 7.641 ns/day, 3.141 hours/ns, 88.435 timesteps/s +99.2% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 38.053 | 38.053 | 38.053 | 0.0 | 16.83 +Bond | 0.089673 | 0.089673 | 0.089673 | 0.0 | 0.04 +Kspace | 0.92778 | 0.92778 | 0.92778 | 0.0 | 0.41 +Neigh | 1.2619 | 1.2619 | 1.2619 | 0.0 | 0.56 +Comm | 0.97483 | 0.97483 | 0.97483 | 0.0 | 0.43 +Output | 0.0013306 | 0.0013306 | 0.0013306 | 0.0 | 0.00 +Modify | 184.68 | 184.68 | 184.68 | 0.0 | 81.66 +Other | | 0.171 | | | 0.08 + +Nlocal: 108 ave 108 max 108 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 7850 ave 7850 max 7850 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 99828 ave 99828 max 99828 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 99828 +Ave neighs/atom = 924.333 +Ave special neighs/atom = 2 +Neighbor list builds = 20439 +Dangerous builds = 0 + +Total wall time: 0:03:46 diff --git a/examples/gcmc/log.6Jul17.gcmc.h2o.g++.4 b/examples/gcmc/log.6Jul17.gcmc.h2o.g++.4 new file mode 100644 index 0000000000..c04b25f45e --- /dev/null +++ b/examples/gcmc/log.6Jul17.gcmc.h2o.g++.4 @@ -0,0 +1,281 @@ +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# fix gcmc example with fix shake + +# variables available on command line + +variable mu index -8.1 +variable disp index 0.5 +variable temp index 338.0 +variable lbox index 10.0 +variable spacing index 5.0 + +# global model settings + +units real +atom_style full +boundary p p p +pair_style lj/cut/coul/long 14 +pair_modify mix arithmetic tail yes +kspace_style ewald 0.0001 +bond_style harmonic +angle_style harmonic + +# box, start molecules on simple cubic lattice + +lattice sc ${spacing} +lattice sc 5.0 +Lattice spacing in x,y,z = 5 5 5 +region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box +region box block 0 10.0 0 ${lbox} 0 ${lbox} units box +region box block 0 10.0 0 10.0 0 ${lbox} units box +region box block 0 10.0 0 10.0 0 10.0 units box +create_box 2 box bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2 +Created orthogonal box = (0 0 0) to (10 10 10) + 1 by 2 by 2 MPI processor grid + +# we can load multiple molecule templates, but don't have to use them all +molecule co2mol CO2.txt +Read molecule co2mol: + 3 atoms with 2 types + 2 bonds with 1 types + 1 angles with 1 types + 0 dihedrals with 0 types + 0 impropers with 0 types +molecule h2omol H2O.txt +Read molecule h2omol: + 3 atoms with 2 types + 2 bonds with 1 types + 1 angles with 1 types + 0 dihedrals with 0 types + 0 impropers with 0 types +create_atoms 0 box mol h2omol 464563 units box +Created 24 atoms + +# rigid SPC/E water model + +pair_coeff 1 1 0.15535 3.166 +pair_coeff * 2 0.0000 0.0000 + +bond_coeff 1 1000 1.0 +angle_coeff 1 100 109.47 + +# masses + +mass 1 15.9994 +mass 2 1.0 + +# MD settings + +group h2o type 1 2 +24 atoms in group h2o +neighbor 2.0 bin +neigh_modify every 1 delay 1 check yes +velocity all create ${temp} 54654 +velocity all create 338.0 54654 +timestep 1.0 + +minimize 0.0 0.0 100 1000 +WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (../min.cpp:168) +Ewald initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.170448 + estimated absolute RMS force accuracy = 0.0332064 + estimated relative force accuracy = 0.0001 + KSpace vectors: actual max1d max3d = 16 2 62 + kxmax kymax kzmax = 2 2 2 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 16 + ghost atom cutoff = 16 + binsize = 8, bins = 2 2 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 11.85 | 11.85 | 11.85 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 338 -4.9610706 9.2628112e-06 18.211756 730.90791 + 100 338 -15.742442 0.14954269 7.579918 -637.49568 +Loop time of 0.0828406 on 4 procs for 100 steps with 24 atoms + +98.7% CPU use with 4 MPI tasks x 1 OpenMP threads + +Minimization stats: + Stopping criterion = max iterations + Energy initial, next-to-last, final = + -4.96106135393 -15.5388622715 -15.592899346 + Force two-norm initial, final = 15.474 18.1478 + Force max component initial, final = 5.80042 7.56514 + Final line search alpha, max atom move = 0.00151131 0.0114333 + Iterations, force evaluations = 100 328 + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.012844 | 0.025471 | 0.047008 | 8.1 | 30.75 +Bond | 0.00038934 | 0.00046468 | 0.00054336 | 0.0 | 0.56 +Kspace | 0.0061138 | 0.027556 | 0.04014 | 7.8 | 33.26 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.023276 | 0.023636 | 0.023804 | 0.1 | 28.53 +Output | 3.171e-05 | 3.3557e-05 | 3.8147e-05 | 0.0 | 0.04 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 0.00568 | | | 6.86 + +Nlocal: 6 ave 8 max 3 min +Histogram: 1 0 0 0 1 0 0 0 0 2 +Nghost: 1722 ave 1725 max 1720 min +Histogram: 2 0 0 0 0 0 1 0 0 1 +Neighs: 1256.75 ave 2101 max 667 min +Histogram: 1 0 1 0 1 0 0 0 0 1 + +Total # of neighbors = 5027 +Ave neighs/atom = 209.458 +Ave special neighs/atom = 2 +Neighbor list builds = 0 +Dangerous builds = 0 +reset_timestep 0 +# rigid constraints with thermostat + +fix mynvt all nvt temp ${temp} ${temp} 100 +fix mynvt all nvt temp 338.0 ${temp} 100 +fix mynvt all nvt temp 338.0 338.0 100 +fix wshake all shake 0.0001 50 0 b 1 a 1 mol h2omol + 0 = # of size 2 clusters + 0 = # of size 3 clusters + 0 = # of size 4 clusters + 8 = # of frozen angles +# gcmc + + + +run 1000 +Ewald initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.170448 + estimated absolute RMS force accuracy = 0.0332064 + estimated relative force accuracy = 0.0001 + KSpace vectors: actual max1d max3d = 16 2 62 + kxmax kymax kzmax = 2 2 2 +Per MPI rank memory allocation (min/avg/max) = 11.6 | 11.6 | 11.6 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 518.26667 -15.742442 0 7.4303753 -613.0781 + 1000 369.81793 -54.202686 0 -37.667331 294.98823 +Loop time of 0.199641 on 4 procs for 1000 steps with 24 atoms + +Performance: 432.777 ns/day, 0.055 hours/ns, 5008.996 timesteps/s +98.5% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.017161 | 0.034988 | 0.05833 | 8.0 | 17.53 +Bond | 0.00017357 | 0.00021374 | 0.00027347 | 0.0 | 0.11 +Kspace | 0.018025 | 0.044624 | 0.065613 | 8.4 | 22.35 +Neigh | 0.0029755 | 0.0033154 | 0.0036366 | 0.6 | 1.66 +Comm | 0.059933 | 0.06537 | 0.070709 | 1.5 | 32.74 +Output | 3.4571e-05 | 3.6657e-05 | 4.22e-05 | 0.0 | 0.02 +Modify | 0.043458 | 0.045628 | 0.04767 | 0.9 | 22.86 +Other | | 0.005465 | | | 2.74 + +Nlocal: 6 ave 8 max 3 min +Histogram: 1 0 0 0 0 0 1 0 1 1 +Nghost: 1331.5 ave 1369 max 1290 min +Histogram: 1 0 0 0 0 2 0 0 0 1 +Neighs: 1259.75 ave 1642 max 428 min +Histogram: 1 0 0 0 0 0 0 1 0 2 + +Total # of neighbors = 5039 +Ave neighs/atom = 209.958 +Ave special neighs/atom = 2 +Neighbor list builds = 27 +Dangerous builds = 0 + +variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans) +fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake +fix mygcmc all gcmc 100 100 0 0 54341 338.0 ${mu} ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol h2omol tfac_insert ${tfac} group h2o shake wshake +fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol h2omol tfac_insert 1.66666666666667 group h2o shake wshake + +# output + +variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1) +variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1) +variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1) +variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1) +compute_modify thermo_temp dynamic/dof yes +thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc +thermo 1000 + +# run + +run 20000 +Ewald initialization ... +WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.170448 + estimated absolute RMS force accuracy = 0.0332064 + estimated relative force accuracy = 0.0001 + KSpace vectors: actual max1d max3d = 16 2 62 + kxmax kymax kzmax = 2 2 2 +WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:445) +0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc +0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc +WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (../neighbor.cpp:472) +Per MPI rank memory allocation (min/avg/max) = 11.6 | 11.6 | 11.6 Mbytes +Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc + 1000 369.81793 295.32434 -54.202686 16.535355 0.23910963 24 0 0 0 0 + 2000 84.544466 -2810.9047 -344.81664 14.364627 0.86677242 87 0.052198354 0.0099581757 0 0 + 3000 75.188527 -3688.256 -425.02228 14.567977 0.98632724 99 0.030546787 0.0049111089 0 0 + 4000 75.019396 -5669.3063 -427.69454 14.535207 0.98632724 99 0.019972039 0.0033375609 0 0 + 5000 90.415371 -2141.7596 -434.65925 17.518218 0.98632724 99 0.014909796 0.002514964 0 0 + 6000 78.212628 -943.75125 -428.80584 15.153904 0.98632724 99 0.01181521 0.0020316119 0 0 + 7000 71.754139 -2028.5122 -435.2139 13.902555 0.98632724 99 0.0099466198 0.0016755471 0 0 + 8000 84.446231 -1969.1657 -428.27313 16.361681 0.98632724 99 0.0084791272 0.0014442102 0 0 + 9000 70.952348 -2476.9812 -446.33824 14.170197 1.0162159 102 0.0077150892 0.0012556189 0 0 + 10000 71.418543 -1875.7083 -443.7214 14.263302 1.0162159 102 0.0068355714 0.0011197957 0 0 + 11000 86.094994 -4508.7581 -444.82687 17.194399 1.0162159 102 0.0061494515 0.0010082475 0 0 + 12000 81.906091 -1547.8105 -442.36719 16.357815 1.0162159 102 0.0055834729 0.00091775114 0 0 + 13000 57.221548 -4607.6222 -448.30939 11.42796 1.0162159 102 0.0051230355 0.00084046326 0 0 + 14000 61.288344 -2518.1779 -445.70636 12.240157 1.0162159 102 0.0047276997 0.00077602396 0 0 + 15000 85.787669 -2407.7111 -443.3834 17.133022 1.0162159 102 0.0043983485 0.00071920715 0 0 + 16000 74.845939 -3288.3403 -445.8247 14.947802 1.0162159 102 0.0042321884 0.00080654918 0 0 + 17000 73.835431 -1926.9566 -445.67476 14.745989 1.0162159 102 0.0039751059 0.00075470749 0 0 + 18000 72.634985 -3997.552 -447.2351 14.506243 1.0162159 102 0.0037395847 0.00071063946 0 0 + 19000 96.776472 -714.44132 -453.65552 19.904587 1.0461046 105 0.0036487876 0.00066993446 0 0 + 20000 75.470786 183.16972 -464.04688 15.522521 1.0461046 105 0.0034630763 0.00063350614 0 0 + 21000 65.658309 -773.41266 -466.27068 13.504331 1.0461046 105 0.003289113 0.00060198052 0 0 +Loop time of 93.8859 on 4 procs for 20000 steps with 105 atoms + +Performance: 18.405 ns/day, 1.304 hours/ns, 213.024 timesteps/s +98.8% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 6.7882 | 10.264 | 14.758 | 93.2 | 10.93 +Bond | 0.028286 | 0.034218 | 0.039038 | 2.5 | 0.04 +Kspace | 0.57255 | 5.2227 | 8.8493 | 133.8 | 5.56 +Neigh | 0.3635 | 0.36915 | 0.37473 | 0.9 | 0.39 +Comm | 2.9961 | 3.2542 | 3.509 | 11.4 | 3.47 +Output | 0.0011675 | 0.0012342 | 0.001375 | 0.2 | 0.00 +Modify | 74.428 | 74.499 | 74.571 | 0.7 | 79.35 +Other | | 0.2411 | | | 0.26 + +Nlocal: 26.25 ave 31 max 22 min +Histogram: 1 0 1 0 0 0 1 0 0 1 +Nghost: 6049.25 ave 6133 max 5962 min +Histogram: 1 0 0 0 1 0 1 0 0 1 +Neighs: 23613 ave 35083 max 14025 min +Histogram: 1 0 0 1 1 0 0 0 0 1 + +Total # of neighbors = 94452 +Ave neighs/atom = 899.543 +Ave special neighs/atom = 2 +Neighbor list builds = 20428 +Dangerous builds = 0 + +Total wall time: 0:01:34 diff --git a/examples/gcmc/log.24Mar17.gcmc.lj.g++.1 b/examples/gcmc/log.6Jul17.gcmc.lj.g++.1 similarity index 88% rename from examples/gcmc/log.24Mar17.gcmc.lj.g++.1 rename to examples/gcmc/log.6Jul17.gcmc.lj.g++.1 index 36a9fe885d..69fc2ede1c 100644 --- a/examples/gcmc/log.24Mar17.gcmc.lj.g++.1 +++ b/examples/gcmc/log.6Jul17.gcmc.lj.g++.1 @@ -1,5 +1,4 @@ -LAMMPS (17 Mar 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) +LAMMPS (6 Jul 2017) using 1 OpenMP thread(s) per MPI task # GCMC for LJ simple fluid, no dynamics # T = 2.0 @@ -100,20 +99,20 @@ Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_rhoav v_pav v 8000 2.2175324 1.5897263 -3.078898 3.2759002 0.528 66 0.068180395 0.067899629 0.11332691 0.53928 1.5488388 -0.01075766 9000 1.8610779 1.0396231 -2.923262 2.7465908 0.496 62 0.068346453 0.068028117 0.1134132 0.52912 1.4352871 0.027082544 10000 2.1079271 1.1746643 -2.9112062 3.1091925 0.48 60 0.068352878 0.068054948 0.11335434 0.5316 1.4462327 0.018503094 -Loop time of 13.05 on 1 procs for 10000 steps with 60 atoms +Loop time of 20.6892 on 1 procs for 10000 steps with 60 atoms -Performance: 331035.016 tau/day, 766.285 timesteps/s -100.0% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 208804.611 tau/day, 483.344 timesteps/s +99.4% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.37239 | 0.37239 | 0.37239 | 0.0 | 2.85 -Neigh | 0.94764 | 0.94764 | 0.94764 | 0.0 | 7.26 -Comm | 0.092473 | 0.092473 | 0.092473 | 0.0 | 0.71 -Output | 0.00023365 | 0.00023365 | 0.00023365 | 0.0 | 0.00 -Modify | 11.627 | 11.627 | 11.627 | 0.0 | 89.09 -Other | | 0.01054 | | | 0.08 +Pair | 0.47227 | 0.47227 | 0.47227 | 0.0 | 2.28 +Neigh | 1.1729 | 1.1729 | 1.1729 | 0.0 | 5.67 +Comm | 0.17133 | 0.17133 | 0.17133 | 0.0 | 0.83 +Output | 0.00028253 | 0.00028253 | 0.00028253 | 0.0 | 0.00 +Modify | 18.852 | 18.852 | 18.852 | 0.0 | 91.12 +Other | | 0.02063 | | | 0.10 Nlocal: 60 ave 60 max 60 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -126,4 +125,4 @@ Total # of neighbors = 2133 Ave neighs/atom = 35.55 Neighbor list builds = 10000 Dangerous builds = 0 -Total wall time: 0:00:13 +Total wall time: 0:00:20 diff --git a/examples/gcmc/log.24Mar17.gcmc.lj.g++.4 b/examples/gcmc/log.6Jul17.gcmc.lj.g++.4 similarity index 88% rename from examples/gcmc/log.24Mar17.gcmc.lj.g++.4 rename to examples/gcmc/log.6Jul17.gcmc.lj.g++.4 index 8694d8b95e..6bd3b3189c 100644 --- a/examples/gcmc/log.24Mar17.gcmc.lj.g++.4 +++ b/examples/gcmc/log.6Jul17.gcmc.lj.g++.4 @@ -1,5 +1,4 @@ -LAMMPS (17 Mar 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) +LAMMPS (6 Jul 2017) using 1 OpenMP thread(s) per MPI task # GCMC for LJ simple fluid, no dynamics # T = 2.0 @@ -100,20 +99,20 @@ Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_rhoav v_pav v 8000 1.7790467 1.8680568 -2.8028819 2.6275151 0.52 65 0.070454494 0.070172368 0.11736806 0.524 1.4213649 0.047985191 9000 1.7968847 1.3195587 -3.261001 2.6550983 0.536 67 0.069952011 0.069618327 0.11650087 0.53904 1.4624201 -0.01069837 10000 2.1566109 1.1015729 -3.4999837 3.1880335 0.552 69 0.069603309 0.069284134 0.11625548 0.53128 1.3587249 0.02075238 -Loop time of 13.0611 on 4 procs for 10000 steps with 69 atoms +Loop time of 24.9916 on 4 procs for 10000 steps with 69 atoms -Performance: 330753.007 tau/day, 765.632 timesteps/s -99.7% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 172857.936 tau/day, 400.134 timesteps/s +98.2% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.08888 | 0.09443 | 0.099889 | 1.4 | 0.72 -Neigh | 0.27721 | 0.28532 | 0.29177 | 1.1 | 2.18 -Comm | 0.27648 | 0.28875 | 0.30268 | 1.9 | 2.21 -Output | 0.00029635 | 0.00043058 | 0.00048113 | 0.0 | 0.00 -Modify | 12.384 | 12.384 | 12.384 | 0.0 | 94.82 -Other | | 0.008055 | | | 0.06 +Pair | 0.11696 | 0.12516 | 0.1321 | 1.7 | 0.50 +Neigh | 0.34874 | 0.35644 | 0.36545 | 1.2 | 1.43 +Comm | 0.48531 | 0.51366 | 0.54755 | 3.8 | 2.06 +Output | 0.0005362 | 0.00069767 | 0.00076008 | 0.0 | 0.00 +Modify | 23.956 | 23.972 | 23.988 | 0.3 | 95.92 +Other | | 0.02376 | | | 0.10 Nlocal: 17.25 ave 23 max 10 min Histogram: 1 0 0 0 0 0 2 0 0 1 @@ -126,4 +125,4 @@ Total # of neighbors = 2823 Ave neighs/atom = 40.913 Neighbor list builds = 10000 Dangerous builds = 0 -Total wall time: 0:00:13 +Total wall time: 0:00:24 diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index fbe6b6bb62..4405a680f2 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -188,6 +188,10 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Cannot use fix gcmc shake and not molecule"); if (rigidflag && shakeflag) error->all(FLERR,"Cannot use fix gcmc rigid and shake"); + if (rigidflag && (nmcmoves > 0)) + error->all(FLERR,"Cannot use fix gcmc rigid with MC moves"); + if (shakeflag && (nmcmoves > 0)) + error->all(FLERR,"Cannot use fix gcmc shake with MC moves"); // setup of coords and imageflags array -- GitLab From b5e9e90bb66d7e7363664b1b56d049fdb206e12d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 10 Jul 2017 17:21:20 -0400 Subject: [PATCH 448/593] white space cleanup --- src/MC/fix_gcmc.cpp | 54 ++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 4405a680f2..48ba8ed5cf 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -71,7 +71,7 @@ enum{ATOM,MOLECULE}; FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), idregion(NULL), full_flag(0), ngroups(0), groupstrings(NULL), ngrouptypes(0), grouptypestrings(NULL), - grouptypebits(NULL), grouptypes(NULL), local_gas_list(NULL), atom_coord(NULL), random_equal(NULL), random_unequal(NULL), + grouptypebits(NULL), grouptypes(NULL), local_gas_list(NULL), atom_coord(NULL), random_equal(NULL), random_unequal(NULL), coords(NULL), imageflags(NULL), fixrigid(NULL), fixshake(NULL), idrigid(NULL), idshake(NULL) { if (narg < 11) error->all(FLERR,"Illegal fix gcmc command"); @@ -637,7 +637,7 @@ void FixGCMC::init() force->boltz*reservoir_temperature)); zz = exp(beta*chemical_potential)/(pow(lambda,3.0)); } - + sigma = sqrt(force->boltz*reservoir_temperature*tfac_insert/gas_mass/force->mvv2e); if (pressure_flag) zz = pressure*fugacity_coeff*beta/force->nktv2p; @@ -962,21 +962,21 @@ void FixGCMC::attempt_atomic_insertion() zz*volume*exp(-beta*insertion_energy)/(ngas+1)) { atom->avec->create_atom(ngcmc_type,coord); int m = atom->nlocal - 1; - + // add to groups // optionally add to type-based groups - + atom->mask[m] = groupbitall; for (int igroup = 0; igroup < ngrouptypes; igroup++) { if (ngcmc_type == grouptypes[igroup]) atom->mask[m] |= grouptypebits[igroup]; } - + atom->v[m][0] = random_unequal->gaussian()*sigma; atom->v[m][1] = random_unequal->gaussian()*sigma; atom->v[m][2] = random_unequal->gaussian()*sigma; modify->create_attribute(m); - + success = 1; } } @@ -1349,7 +1349,7 @@ void FixGCMC::attempt_molecule_insertion() if (insertion_energy_sum < MAXENERGYTEST && random_equal->uniform() < zz*volume*natoms_per_molecule* exp(-beta*insertion_energy_sum)/(ngas + natoms_per_molecule)) { - + tagint maxmol = 0; for (int i = 0; i < atom->nlocal; i++) maxmol = MAX(maxmol,atom->molecule[i]); tagint maxmol_all; @@ -1357,33 +1357,33 @@ void FixGCMC::attempt_molecule_insertion() maxmol_all++; if (maxmol_all >= MAXTAGINT) error->all(FLERR,"Fix gcmc ran out of available molecule IDs"); - + tagint maxtag = 0; for (int i = 0; i < atom->nlocal; i++) maxtag = MAX(maxtag,atom->tag[i]); tagint maxtag_all; MPI_Allreduce(&maxtag,&maxtag_all,1,MPI_LMP_TAGINT,MPI_MAX,world); - + int nlocalprev = atom->nlocal; - + double vnew[3]; vnew[0] = random_equal->gaussian()*sigma; vnew[1] = random_equal->gaussian()*sigma; vnew[2] = random_equal->gaussian()*sigma; - + for (int i = 0; i < natoms_per_molecule; i++) { if (procflag[i]) { atom->avec->create_atom(onemols[imol]->type[i],atom_coord[i]); int m = atom->nlocal - 1; - + // add to groups // optionally add to type-based groups - + atom->mask[m] = groupbitall; for (int igroup = 0; igroup < ngrouptypes; igroup++) { if (ngcmc_type == grouptypes[igroup]) atom->mask[m] |= grouptypebits[igroup]; } - + atom->image[m] = imagezero; domain->remap(atom->x[m],atom->image[m]); atom->molecule[m] = maxmol_all; @@ -1393,7 +1393,7 @@ void FixGCMC::attempt_molecule_insertion() atom->v[m][0] = vnew[0]; atom->v[m][1] = vnew[1]; atom->v[m][2] = vnew[2]; - + atom->add_molecule_atom(onemols[imol],i,m,maxtag_all); modify->create_attribute(m); } @@ -1494,13 +1494,13 @@ void FixGCMC::attempt_atomic_translation_full() energy_stored = energy_after; ntranslation_successes += 1.0; } else { - + tagint tmptag_all; MPI_Allreduce(&tmptag,&tmptag_all,1,MPI_LMP_TAGINT,MPI_MAX,world); - + double xtmp_all[3]; MPI_Allreduce(&xtmp,&xtmp_all,3,MPI_DOUBLE,MPI_SUM,world); - + for (int i = 0; i < atom->nlocal; i++) { if (tmptag_all == atom->tag[i]) { x[i][0] = xtmp_all[0]; @@ -1655,7 +1655,7 @@ void FixGCMC::attempt_atomic_insertion_full() if (energy_after < MAXENERGYTEST && random_equal->uniform() < zz*volume*exp(beta*(energy_before - energy_after))/(ngas+1)) { - + ninsertion_successes += 1.0; energy_stored = energy_after; } else { @@ -2150,11 +2150,11 @@ double FixGCMC::energy(int i, int itype, tagint imolecule, double *coord) int jtype = type[j]; // if overlap check requested, if overlap, - // return signal value for energy + // return signal value for energy if (overlap_flag && rsq < overlap_cutoffsq) return MAXENERGYSIGNAL; - + if (rsq < cutsq[itype][jtype]) total_energy += pair->single(i,j,itype,jtype,rsq,factor_coul,factor_lj,fpair); @@ -2189,7 +2189,7 @@ double FixGCMC::molecule_energy(tagint gas_molecule_id) double FixGCMC::energy_full() { int imolecule; - + if (triclinic) domain->x2lamda(atom->nlocal); domain->pbc(); comm->exchange(); @@ -2202,7 +2202,7 @@ double FixGCMC::energy_full() int vflag = 0; // if overlap check requested, if overlap, - // return signal value for energy + // return signal value for energy if (overlap_flag) { int overlaptestall; @@ -2216,12 +2216,12 @@ double FixGCMC::energy_full() for (int j = i+1; j < nall; j++) { if (mode == MOLECULE) if (imolecule == molecule[j]) continue; - + delx = x[i][0] - x[j][0]; dely = x[i][1] - x[j][1]; delz = x[i][2] - x[j][2]; rsq = delx*delx + dely*dely + delz*delz; - + if (rsq < overlap_cutoffsq) { overlaptest = 1; break; @@ -2236,7 +2236,7 @@ double FixGCMC::energy_full() // clear forces so they don't accumulate over multiple // calls within fix gcmc timestep, e.g. for fix shake - + size_t nbytes = sizeof(double) * (atom->nlocal + atom->nghost); if (nbytes) memset(&atom->f[0][0],0,3*nbytes); @@ -2374,7 +2374,7 @@ void FixGCMC::update_gas_atoms_list() group->xcm(molecule_group,gas_mass,com); // remap unwrapped com into periodic box - + domain->remap(com); comx[imolecule] = com[0]; comy[imolecule] = com[1]; -- GitLab From c9a0d38a3effa82a95decbfaa3a8145aa0545260 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 10 Jul 2017 17:34:00 -0400 Subject: [PATCH 449/593] mention restriction for use with fix shake or fix rigid in fix gcmc docs --- doc/src/fix_gcmc.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/src/fix_gcmc.txt b/doc/src/fix_gcmc.txt index 41ec38cffb..405738276f 100644 --- a/doc/src/fix_gcmc.txt +++ b/doc/src/fix_gcmc.txt @@ -383,6 +383,9 @@ called. Reneighboring is required. Can be run in parallel, but aspects of the GCMC part will not scale well in parallel. Only usable for 3D simulations. +When using fix gcmc in combination with fix shake or fix rigid, +only gcmc exchange moves are supported. + Note that very lengthy simulations involving insertions/deletions of billions of gas molecules may run out of atom or molecule IDs and trigger an error, so it is better to run multiple shorter-duration -- GitLab From 8d592f4b9e4350abacefef31380c626ff8d7095e Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Mon, 10 Jul 2017 16:43:23 -0500 Subject: [PATCH 450/593] Finalized code for lib/kim/install.py --- lib/kim/.gitignore | 1 + lib/kim/Makefile.lammps | 2 +- lib/kim/install.py | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/kim/.gitignore b/lib/kim/.gitignore index eb55b3d4b8..3be8ecbdd6 100644 --- a/lib/kim/.gitignore +++ b/lib/kim/.gitignore @@ -1 +1,2 @@ /Makefile.KIM_DIR +/Makefile.KIM_Config diff --git a/lib/kim/Makefile.lammps b/lib/kim/Makefile.lammps index 3964e662b5..b66d7005a4 100644 --- a/lib/kim/Makefile.lammps +++ b/lib/kim/Makefile.lammps @@ -16,7 +16,7 @@ # Settings that the LAMMPS build will import when this package is installed -include ./Makefile.KIM_DIR +include ../../lib/kim/Makefile.KIM_DIR ifeq ($(wildcard $(KIM_INSTALL_DIR)/bin/kim-api-build-config),) KIM_CONFIG_HELPER = kim-api-build-config diff --git a/lib/kim/install.py b/lib/kim/install.py index bfc97a0983..ca426f3f2e 100644 --- a/lib/kim/install.py +++ b/lib/kim/install.py @@ -70,10 +70,12 @@ url = "https://s3.openkim.org/kim-api/%s.tgz" % version if not os.path.isfile("%s/Makefile.KIM_DIR" % thisdir): open("%s/Makefile.KIM_DIR" % thisdir, 'w').write("KIM_INSTALL_DIR=%s" % dir) + open("%s/Makefile.KIM_Config" % thisdir, 'w').write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) print "Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) else: if dirflag == 1: open("%s/Makefile.KIM_DIR" % thisdir, 'w').write("KIM_INSTALL_DIR=%s" % dir) + open("%s/Makefile.KIM_Config" % thisdir, 'w').write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) print "Updated %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) @@ -119,7 +121,7 @@ if buildflag == 1: if txt[0] != 0: error() # remove source files - print "Removing kim-api source and build files" + print "Removing kim-api source and build files ..." cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" % (thisdir,version,version) txt = commands.getstatusoutput(cmd) print txt[1] @@ -136,4 +138,14 @@ if addflag == 1: if txt[0] != 0: error() # print "Building item ..." - #..... + cmd = "cd %s/%s; make; make install" %(thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: error() + # + print "Removing kim item source and build files ..." + cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: error() + -- GitLab From c29e8fba9bd09ac734ab6ef7e04b6ca0ef6c1fc4 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Mon, 10 Jul 2017 17:00:30 -0500 Subject: [PATCH 451/593] Updated lib/kim/README file to go along with new install.py --- lib/kim/README | 74 ++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/lib/kim/README b/lib/kim/README index 086bbce90c..00d6ea8fad 100644 --- a/lib/kim/README +++ b/lib/kim/README @@ -11,66 +11,64 @@ kim command. To download, build, and install the KIM API on your system, follow these steps. You can use the install.py script to automate these steps. -**Note** The process described below will compile the kim-api using absolute -paths names. This means that if you move your lammps directory to a new -location after compilation the kim-api library will not be able to find some of -its components. It is best to recompile after moving the lammps directory. +----------------- -The KIM API is available for download from "this site"_https://openkim.org, -namely https://openkim.org. The tarball you download is "kim-api-vX.Y.Z.tgz", -which can be unpacked in this directory or whereever you wish: +Instructions: -tar xvfz kim*tgz -Note that if you unpack and build KIM in this directory, when you -download a new LAMMPS tarball, the files you have added here will be -lost. So you likely want to build it somewhere else. +1. Configure lammps for use with the kim-api library installed in this directory -The kim-api-vX.Y.Z/docs/ directory has further documentation for the -KIM API. In order to compile and install the KIM API follow the -instructions found in the file kim-api-vX.Y.Z/INSTALL. (Don't forget -to download and compile any Model Drivers and Models that you want to -use.) +$ printf "KIM_INSTALL_DIR=${PWD}\n" > ./Makefile.KIM_DIR +$ printf "include ${PWD}/lib/kim-api/Makefile.KIM_Config\n" > ./Makefile.KIM_Config -Once you have successfully compiled and installed the KIM API, you -need to make sure the utility kim-api-build-config is in your PATH so -that the LAMMPS build system can properly work with the KIM API. - -The following are example commands that perform these steps: +2. Download and unpack the kim-api # replace X.Y.Z as appropriate here and below $ wget http://s3.openkim.org/kim-api/kim-api-vX.Y.Z.tgz $ tar zxvf kim-api-vX.Y.Z.tgz -# get OpenKIM models, setup and compile +# configure the kim-api $ cd kim-api-vX.Y.Z -$ ./configure --prefix=?????? +$ ./configure --prefix=${PWD}/../ + +# setup the desired kim item +$ make add-Pair_Johnson_Fe__MO_857282754307_002 + +3. Build and install the kim-api and model -$ make add-EAM_Dynamo_Angelo_Moody_NiAlH__MO_418978237058_001 $ make $ make install # replace X with the KIM API major version number $ make install-set-default-to-vX +$ cd ../ + +4. Remove source and build files + +$ rm -rf kim-api-vX.Y.Z +$ rm -rf kim-api-vX.Y.Z.tgz + +5. To add additional items do the following (replace the kim item name with your + desired value) + +$ wget https://openkim.org/download/EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001.tgz +$ tar zxvf EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001.tgz +$ cd EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001 +$ make +$ make install +$ cd .. +$ rm -rf EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001 +$ rm -rf EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001.tgz -# In order to permanently add the kim-api-build-config utility to your -# PATH variable, perform the following: -# -# For the bash shell: -$ printf "export PATH=${PATH}:${HOME}/local/bin\n" >> ${HOME}/.bashrc -$ source ${HOME}/.bashrc -# -# For the csh shell: -% printf "setenv PATH ${PATH}:${HOME}/local/bin\b" >> ${HOME}/.cshrc -% source ${HOME}/.cshrc +----------------- When these steps are complete you can build LAMMPS with the KIM package installed: -$ cd lammps/src +$ cd ../../src $ make yes-kim $ make g++ (or whatever target you wish) -Note that the Makefile.lammps file in this directory is required -to allow the LAMMPS build to find the necessary KIM files. You -should not normally need to edit this file. +Note that the Makefile.lammps and Makefile.KIM_DIR files in this directory +are required to allow the LAMMPS build to find the necessary KIM files. +You should not normally need to edit this file. -- GitLab From e30c5fc9560c82a7da026fbe951e852d40e3c088 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Mon, 10 Jul 2017 21:05:29 -0500 Subject: [PATCH 452/593] Fixed shebang and renamed to lib/kim/Install.py --- lib/kim/{install.py => Install.py} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename lib/kim/{install.py => Install.py} (99%) diff --git a/lib/kim/install.py b/lib/kim/Install.py similarity index 99% rename from lib/kim/install.py rename to lib/kim/Install.py index ca426f3f2e..bcd22dcbb3 100644 --- a/lib/kim/install.py +++ b/lib/kim/Install.py @@ -1,4 +1,4 @@ -#!usr/local/python +#!/usr/bin/env python # install.py tool to setup the kim-api library # used to automate the steps described in the README file in this dir @@ -148,4 +148,3 @@ if addflag == 1: txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() - -- GitLab From c8939d8df6dac59494e5bfa5f9d2543d2a913260 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 11 Jul 2017 09:43:54 -0400 Subject: [PATCH 453/593] clarify explanation of body style molecule in rigid fixes --- doc/src/fix_rigid.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/src/fix_rigid.txt b/doc/src/fix_rigid.txt index dbadd3fa63..87021b8551 100644 --- a/doc/src/fix_rigid.txt +++ b/doc/src/fix_rigid.txt @@ -212,8 +212,9 @@ pour"_fix_pour.html. For bodystyle {single} the entire fix group of atoms is treated as one rigid body. This option is only allowed for the {rigid} styles. -For bodystyle {molecule}, each set of atoms in the fix group with a -different molecule ID is treated as a rigid body. This option is +For bodystyle {molecule}, atoms are grouped into rigid bodies by their +respective molecule IDs: each set of atoms in the fix group with the +same molecule ID is treated as a different rigid body. This option is allowed for both the {rigid} and {rigid/small} styles. Note that atoms with a molecule ID = 0 will be treated as a single rigid body. For a system with atomic solvent (typically this is atoms with -- GitLab From 5a1e020bf01c8a3454dd9159fe41de4ec4dbffa2 Mon Sep 17 00:00:00 2001 From: "H. Metin Aktulga" Date: Tue, 11 Jul 2017 08:05:36 -0700 Subject: [PATCH 454/593] updated the credits and citations for pair style reaxc/omp and qeq/reax/omp --- src/USER-OMP/fix_qeq_reax_omp.cpp | 32 +++++++++++++++++--- src/USER-OMP/fix_qeq_reax_omp.h | 10 ------ src/USER-OMP/pair_reaxc_omp.cpp | 37 +++++++++++++++++++---- src/USER-OMP/pair_reaxc_omp.h | 10 ------ src/USER-OMP/reaxc_bond_orders_omp.cpp | 14 +++++---- src/USER-OMP/reaxc_bond_orders_omp.h | 14 +++++---- src/USER-OMP/reaxc_bonds_omp.cpp | 14 +++++---- src/USER-OMP/reaxc_bonds_omp.h | 14 +++++---- src/USER-OMP/reaxc_forces_omp.cpp | 14 +++++---- src/USER-OMP/reaxc_forces_omp.h | 14 +++++---- src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp | 14 +++++---- src/USER-OMP/reaxc_hydrogen_bonds_omp.h | 14 +++++---- src/USER-OMP/reaxc_init_md_omp.cpp | 14 +++++---- src/USER-OMP/reaxc_init_md_omp.h | 14 +++++---- src/USER-OMP/reaxc_multi_body_omp.cpp | 14 +++++---- src/USER-OMP/reaxc_multi_body_omp.h | 14 +++++---- src/USER-OMP/reaxc_nonbonded_omp.cpp | 14 +++++---- src/USER-OMP/reaxc_nonbonded_omp.h | 14 +++++---- src/USER-OMP/reaxc_torsion_angles_omp.cpp | 14 +++++---- src/USER-OMP/reaxc_torsion_angles_omp.h | 14 +++++---- src/USER-OMP/reaxc_valence_angles_omp.cpp | 14 +++++---- src/USER-OMP/reaxc_valence_angles_omp.h | 14 +++++---- 22 files changed, 203 insertions(+), 138 deletions(-) diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp index df586132d4..0db3ffdc43 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.cpp +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -12,11 +12,24 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing author: Hasan Metin Aktulga, Purdue University - (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov) + Contributing author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu - Hybrid and sub-group capabilities: Ray Shan (Sandia) -------------------------------------------------------------------------- */ + Hybrid & sub-group capabilities added by Ray Shan (Materials Design) + + OpenMP based threading support for fix qeq/reax/omp added + by Hasan Metin Aktulga (MSU), Chris Knight (ALCF), Paul Coffman (ALCF), + Kurt O'Hearn (MSU), Ray Shan (Materials Design), Wei Jiang (ALCF) + + Integration of the pair_style reax/c/omp into the User-OMP package + by Axel Kohlmeyer (Temple U.) + + Please cite the related publication: + H. M. Aktulga, C. Knight, P. Coffman, K. A. O'Hearn, T. R. Shan, + W. Jiang, "Optimizing the performance of reactive molecular dynamics + simulations for multi-core architectures", International Journal of + High Performance Computing Applications, to appear. + ------------------------------------------------------------------------- */ #include #include @@ -50,11 +63,22 @@ using namespace FixConst; #define CUBE(x) ((x)*(x)*(x)) #define MIN_NBRS 100 +static const char cite_fix_qeq_reax_omp[] = + "fix qeq/reax/omp command:\n\n" + "@Article{Aktulga17,\n" + " author = {H. M. Aktulga, C. Knight, P. Coffman, K. A. OHearn, T. R. Shan, W. Jiang},\n" + " title = {Optimizing the performance of reactive molecular dynamics simulations for multi-core architectures},\n" + " journal = {International Journal of High Performance Computing Applications},\n" + " year = to appear\n" + "}\n\n"; + /* ---------------------------------------------------------------------- */ FixQEqReaxOMP::FixQEqReaxOMP(LAMMPS *lmp, int narg, char **arg) : FixQEqReax(lmp, narg, arg) { + if (lmp->citeme) lmp->citeme->add(cite_fix_qeq_reax_omp); + if (narg<8 || narg>9) error->all(FLERR,"Illegal fix qeq/reax/omp command"); b_temp = NULL; diff --git a/src/USER-OMP/fix_qeq_reax_omp.h b/src/USER-OMP/fix_qeq_reax_omp.h index 7565f0aff0..46210647e5 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.h +++ b/src/USER-OMP/fix_qeq_reax_omp.h @@ -11,16 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -/* ---------------------------------------------------------------------- - Contributing author: Hasan Metin Aktulga, Purdue University - (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov) - - Please cite the related publication: - H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, - "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. -------------------------------------------------------------------------- */ - #ifdef FIX_CLASS FixStyle(qeq/reax/omp,FixQEqReaxOMP) diff --git a/src/USER-OMP/pair_reaxc_omp.cpp b/src/USER-OMP/pair_reaxc_omp.cpp index 45c4bce0c0..5489651782 100644 --- a/src/USER-OMP/pair_reaxc_omp.cpp +++ b/src/USER-OMP/pair_reaxc_omp.cpp @@ -12,12 +12,26 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing author: Hasan Metin Aktulga, Purdue University - (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov) - Per-atom energy/virial added by Ray Shan (Sandia) - Fix reax/c/bonds and fix reax/c/species for pair_style reax/c added by - Ray Shan (Sandia) -------------------------------------------------------------------------- */ + Contributing author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu + + Per-atom energy/virial added by Ray Shan (Materials Design, Inc.) + Fix reax/c/bonds and fix reax/c/species for pair_style reax/c added + by Ray Shan (Materials Design) + + OpenMP based threading support for pair_style reax/c/omp added + by Hasan Metin Aktulga (MSU), Chris Knight (ALCF), Paul Coffman (ALCF), + Kurt O'Hearn (MSU), Ray Shan (Materials Design), Wei Jiang (ALCF) + + Integration of the pair_style reax/c/omp into the User-OMP package + by Axel Kohlmeyer (Temple U.) + + Please cite the related publication: + H. M. Aktulga, C. Knight, P. Coffman, K. A. O'Hearn, T. R. Shan, + W. Jiang, "Optimizing the performance of reactive molecular dynamics + simulations for multi-core architectures", International Journal of + High Performance Computing Applications, to appear. + ------------------------------------------------------------------------- */ #include "pair_reaxc_omp.h" #include "atom.h" @@ -62,10 +76,21 @@ int ompTimingCount[LASTTIMINGINDEX]; int ompTimingCGCount[LASTTIMINGINDEX]; #endif +static const char cite_pair_reax_c_omp[] = + "pair reax/c/omp command:\n\n" + "@Article{Aktulga17,\n" + " author = {H. M. Aktulga, C. Knight, P. Coffman, K. A. OHearn, T. R. Shan, W. Jiang},\n" + " title = {Optimizing the performance of reactive molecular dynamics simulations for multi-core architectures},\n" + " journal = {International Journal of High Performance Computing Applications},\n" + " year = to appear\n" + "}\n\n"; + /* ---------------------------------------------------------------------- */ PairReaxCOMP::PairReaxCOMP(LAMMPS *lmp) : PairReaxC(lmp), ThrOMP(lmp, THR_PAIR) { + if (lmp->citeme) lmp->citeme->add(cite_pair_reax_c_omp); + suffix_flag |= Suffix::OMP; system->pair_ptr = this; diff --git a/src/USER-OMP/pair_reaxc_omp.h b/src/USER-OMP/pair_reaxc_omp.h index 156627ece0..d0dedf7e3c 100644 --- a/src/USER-OMP/pair_reaxc_omp.h +++ b/src/USER-OMP/pair_reaxc_omp.h @@ -11,16 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -/* ---------------------------------------------------------------------- - Contributing author: Hasan Metin Aktulga, Purdue University - (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov) - - Please cite the related publication: - H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, - "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. -------------------------------------------------------------------------- */ - #ifdef PAIR_CLASS PairStyle(reax/c/omp,PairReaxCOMP) diff --git a/src/USER-OMP/reaxc_bond_orders_omp.cpp b/src/USER-OMP/reaxc_bond_orders_omp.cpp index 85755a39a3..9b863e8984 100644 --- a/src/USER-OMP/reaxc_bond_orders_omp.cpp +++ b/src/USER-OMP/reaxc_bond_orders_omp.cpp @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_bond_orders_omp.h b/src/USER-OMP/reaxc_bond_orders_omp.h index 272309cadd..5fe0c4611c 100644 --- a/src/USER-OMP/reaxc_bond_orders_omp.h +++ b/src/USER-OMP/reaxc_bond_orders_omp.h @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_bonds_omp.cpp b/src/USER-OMP/reaxc_bonds_omp.cpp index 9e16919007..d079db6674 100644 --- a/src/USER-OMP/reaxc_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_bonds_omp.cpp @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_bonds_omp.h b/src/USER-OMP/reaxc_bonds_omp.h index 8c07fd8957..1d4e44ca11 100644 --- a/src/USER-OMP/reaxc_bonds_omp.h +++ b/src/USER-OMP/reaxc_bonds_omp.h @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_forces_omp.cpp b/src/USER-OMP/reaxc_forces_omp.cpp index 5e93f31125..6fec7a7e4d 100644 --- a/src/USER-OMP/reaxc_forces_omp.cpp +++ b/src/USER-OMP/reaxc_forces_omp.cpp @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_forces_omp.h b/src/USER-OMP/reaxc_forces_omp.h index f4941fc7fa..a438543900 100644 --- a/src/USER-OMP/reaxc_forces_omp.h +++ b/src/USER-OMP/reaxc_forces_omp.h @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp index c446151150..be1444824b 100644 --- a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_hydrogen_bonds_omp.h b/src/USER-OMP/reaxc_hydrogen_bonds_omp.h index b4a2d78dbb..45a15cee36 100644 --- a/src/USER-OMP/reaxc_hydrogen_bonds_omp.h +++ b/src/USER-OMP/reaxc_hydrogen_bonds_omp.h @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_init_md_omp.cpp b/src/USER-OMP/reaxc_init_md_omp.cpp index 6cce08a041..79fec8b268 100644 --- a/src/USER-OMP/reaxc_init_md_omp.cpp +++ b/src/USER-OMP/reaxc_init_md_omp.cpp @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_init_md_omp.h b/src/USER-OMP/reaxc_init_md_omp.h index bb4e9c7061..157268dbd6 100644 --- a/src/USER-OMP/reaxc_init_md_omp.h +++ b/src/USER-OMP/reaxc_init_md_omp.h @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_multi_body_omp.cpp b/src/USER-OMP/reaxc_multi_body_omp.cpp index ff8baa3c1a..13d250750b 100644 --- a/src/USER-OMP/reaxc_multi_body_omp.cpp +++ b/src/USER-OMP/reaxc_multi_body_omp.cpp @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_multi_body_omp.h b/src/USER-OMP/reaxc_multi_body_omp.h index b0746569ca..f98529e217 100644 --- a/src/USER-OMP/reaxc_multi_body_omp.h +++ b/src/USER-OMP/reaxc_multi_body_omp.h @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_nonbonded_omp.cpp b/src/USER-OMP/reaxc_nonbonded_omp.cpp index c509be8a26..0c595e07df 100644 --- a/src/USER-OMP/reaxc_nonbonded_omp.cpp +++ b/src/USER-OMP/reaxc_nonbonded_omp.cpp @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_nonbonded_omp.h b/src/USER-OMP/reaxc_nonbonded_omp.h index 1ea51257cf..66ecefa05b 100644 --- a/src/USER-OMP/reaxc_nonbonded_omp.h +++ b/src/USER-OMP/reaxc_nonbonded_omp.h @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_torsion_angles_omp.cpp b/src/USER-OMP/reaxc_torsion_angles_omp.cpp index 4ede439ed4..b6920c6709 100644 --- a/src/USER-OMP/reaxc_torsion_angles_omp.cpp +++ b/src/USER-OMP/reaxc_torsion_angles_omp.cpp @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_torsion_angles_omp.h b/src/USER-OMP/reaxc_torsion_angles_omp.h index 51b05f7ae1..742de36eb7 100644 --- a/src/USER-OMP/reaxc_torsion_angles_omp.h +++ b/src/USER-OMP/reaxc_torsion_angles_omp.h @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_valence_angles_omp.cpp b/src/USER-OMP/reaxc_valence_angles_omp.cpp index d6f0962020..888eeab4a1 100644 --- a/src/USER-OMP/reaxc_valence_angles_omp.cpp +++ b/src/USER-OMP/reaxc_valence_angles_omp.cpp @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/USER-OMP/reaxc_valence_angles_omp.h b/src/USER-OMP/reaxc_valence_angles_omp.h index ce304acced..17d797707f 100644 --- a/src/USER-OMP/reaxc_valence_angles_omp.h +++ b/src/USER-OMP/reaxc_valence_angles_omp.h @@ -1,16 +1,18 @@ /*---------------------------------------------------------------------- PuReMD - Purdue ReaxFF Molecular Dynamics Program - + Website: https://www.cs.purdue.edu/puremd + Copyright (2010) Purdue University - Hasan Metin Aktulga, hmaktulga@lbl.gov - Joseph Fogarty, jcfogart@mail.usf.edu - Sagar Pandit, pandit@usf.edu - Ananth Y Grama, ayg@cs.purdue.edu + + Contributing authors: + H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama + Corresponding author: + Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Please cite the related publication: H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama, "Parallel Reactive Molecular Dynamics: Numerical Methods and - Algorithmic Techniques", Parallel Computing, in press. + Algorithmic Techniques", Parallel Computing, 38 (4-5), 245-259 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as -- GitLab From 338fc28970731ea4d7ec7bb2cec97c875f47d8cf Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 11 Jul 2017 14:59:08 -0400 Subject: [PATCH 455/593] combine citeme.log entry for pair reax/c/omp and fix qeq/reax/omp --- src/USER-OMP/fix_qeq_reax_omp.cpp | 12 ------------ src/USER-OMP/pair_reaxc_omp.cpp | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp index 0db3ffdc43..3578a6da37 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.cpp +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -49,7 +49,6 @@ #include "pair.h" #include "respa.h" #include "memory.h" -#include "citeme.h" #include "error.h" #include "reaxc_defs.h" @@ -63,22 +62,11 @@ using namespace FixConst; #define CUBE(x) ((x)*(x)*(x)) #define MIN_NBRS 100 -static const char cite_fix_qeq_reax_omp[] = - "fix qeq/reax/omp command:\n\n" - "@Article{Aktulga17,\n" - " author = {H. M. Aktulga, C. Knight, P. Coffman, K. A. OHearn, T. R. Shan, W. Jiang},\n" - " title = {Optimizing the performance of reactive molecular dynamics simulations for multi-core architectures},\n" - " journal = {International Journal of High Performance Computing Applications},\n" - " year = to appear\n" - "}\n\n"; - /* ---------------------------------------------------------------------- */ FixQEqReaxOMP::FixQEqReaxOMP(LAMMPS *lmp, int narg, char **arg) : FixQEqReax(lmp, narg, arg) { - if (lmp->citeme) lmp->citeme->add(cite_fix_qeq_reax_omp); - if (narg<8 || narg>9) error->all(FLERR,"Illegal fix qeq/reax/omp command"); b_temp = NULL; diff --git a/src/USER-OMP/pair_reaxc_omp.cpp b/src/USER-OMP/pair_reaxc_omp.cpp index 5489651782..078b9d63d4 100644 --- a/src/USER-OMP/pair_reaxc_omp.cpp +++ b/src/USER-OMP/pair_reaxc_omp.cpp @@ -77,7 +77,7 @@ int ompTimingCGCount[LASTTIMINGINDEX]; #endif static const char cite_pair_reax_c_omp[] = - "pair reax/c/omp command:\n\n" + "pair reax/c/omp and fix qeq/reax/omp command:\n\n" "@Article{Aktulga17,\n" " author = {H. M. Aktulga, C. Knight, P. Coffman, K. A. OHearn, T. R. Shan, W. Jiang},\n" " title = {Optimizing the performance of reactive molecular dynamics simulations for multi-core architectures},\n" -- GitLab From f7f4a24930ba18badcc090a8c0dd9c3c1e889372 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 11 Jul 2017 15:00:39 -0400 Subject: [PATCH 456/593] whitspace cleanup --- src/USER-OMP/fix_qeq_reax_omp.cpp | 170 +++++++++++++++--------------- src/USER-OMP/pair_reaxc_omp.cpp | 14 +-- 2 files changed, 92 insertions(+), 92 deletions(-) diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp index 3578a6da37..4457ab6592 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.cpp +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -17,16 +17,16 @@ Hybrid & sub-group capabilities added by Ray Shan (Materials Design) - OpenMP based threading support for fix qeq/reax/omp added - by Hasan Metin Aktulga (MSU), Chris Knight (ALCF), Paul Coffman (ALCF), + OpenMP based threading support for fix qeq/reax/omp added + by Hasan Metin Aktulga (MSU), Chris Knight (ALCF), Paul Coffman (ALCF), Kurt O'Hearn (MSU), Ray Shan (Materials Design), Wei Jiang (ALCF) - - Integration of the pair_style reax/c/omp into the User-OMP package + + Integration of the pair_style reax/c/omp into the User-OMP package by Axel Kohlmeyer (Temple U.) Please cite the related publication: - H. M. Aktulga, C. Knight, P. Coffman, K. A. O'Hearn, T. R. Shan, - W. Jiang, "Optimizing the performance of reactive molecular dynamics + H. M. Aktulga, C. Knight, P. Coffman, K. A. O'Hearn, T. R. Shan, + W. Jiang, "Optimizing the performance of reactive molecular dynamics simulations for multi-core architectures", International Journal of High Performance Computing Applications, to appear. ------------------------------------------------------------------------- */ @@ -204,46 +204,46 @@ void FixQEqReaxOMP::compute_H() for (ii = 0; ii < inum; ii++) { i = ilist[ii]; if (mask[i] & groupbit) { - jlist = firstneigh[i]; - jnum = numneigh[i]; - mfill = H.firstnbr[i]; - - for (jj = 0; jj < jnum; jj++) { - j = jlist[jj]; - - dx = x[j][0] - x[i][0]; - dy = x[j][1] - x[i][1]; - dz = x[j][2] - x[i][2]; - r_sqr = SQR(dx) + SQR(dy) + SQR(dz); - - flag = 0; - if (r_sqr <= SQR(swb)) { - if (j < n) flag = 1; - else if (tag[i] < tag[j]) flag = 1; - else if (tag[i] == tag[j]) { - if (dz > SMALL) flag = 1; - else if (fabs(dz) < SMALL) { - if (dy > SMALL) flag = 1; - else if (fabs(dy) < SMALL && dx > SMALL) flag = 1; - } - } - } - - if (flag) { - H.jlist[mfill] = j; - H.val[mfill] = calculate_H( sqrt(r_sqr), shld[type[i]][type[j]] ); - mfill++; - } - } - - H.numnbrs[i] = mfill - H.firstnbr[i]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + mfill = H.firstnbr[i]; + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + + dx = x[j][0] - x[i][0]; + dy = x[j][1] - x[i][1]; + dz = x[j][2] - x[i][2]; + r_sqr = SQR(dx) + SQR(dy) + SQR(dz); + + flag = 0; + if (r_sqr <= SQR(swb)) { + if (j < n) flag = 1; + else if (tag[i] < tag[j]) flag = 1; + else if (tag[i] == tag[j]) { + if (dz > SMALL) flag = 1; + else if (fabs(dz) < SMALL) { + if (dy > SMALL) flag = 1; + else if (fabs(dy) < SMALL && dx > SMALL) flag = 1; + } + } + } + + if (flag) { + H.jlist[mfill] = j; + H.val[mfill] = calculate_H( sqrt(r_sqr), shld[type[i]][type[j]] ); + mfill++; + } + } + + H.numnbrs[i] = mfill - H.firstnbr[i]; } } if (mfill >= H.m) { char str[128]; sprintf(str,"H matrix size has been exceeded: mfill=%d H.m=%d\n", - mfill, H.m); + mfill, H.m); error->warning(FLERR,str); error->all(FLERR,"Fix qeq/reax/omp has insufficient QEq matrix size"); } @@ -313,7 +313,7 @@ void FixQEqReaxOMP::pre_force(int vflag) if (dual_enabled) { matvecs = dual_CG(b_s, b_t, s, t); // OMP_TIMING inside dual_CG } else { - matvecs_s = CG(b_s, s); // CG on s - parallel + matvecs_s = CG(b_s, s); // CG on s - parallel #ifdef OMP_TIMING endTimeBase = MPI_Wtime(); @@ -323,7 +323,7 @@ void FixQEqReaxOMP::pre_force(int vflag) startTimeBase = endTimeBase; #endif - matvecs_t = CG(b_t, t); // CG on t - parallel + matvecs_t = CG(b_t, t); // CG on t - parallel #ifdef OMP_TIMING endTimeBase = MPI_Wtime(); @@ -390,23 +390,23 @@ void FixQEqReaxOMP::init_matvec() for (int ii = 0; ii < nn; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) { - - /* init pre-conditioner for H and init solution vectors */ - Hdia_inv[i] = 1. / eta[ atom->type[i] ]; - b_s[i] = -chi[ atom->type[i] ]; - b_t[i] = -1.0; - - // Predictor Step - double tp = 0.0; - double sp = 0.0; - for (int j=0; jtype[i] ]; + b_s[i] = -chi[ atom->type[i] ]; + b_t[i] = -1.0; + + // Predictor Step + double tp = 0.0; + double sp = 0.0; + for (int j=0; jmask[i] & groupbit) { - - /* init pre-conditioner for H and init solution vectors */ - Hdia_inv[i] = 1. / eta[ atom->type[i] ]; - b_s[i] = -chi[ atom->type[i] ]; - b_t[i] = -1.0; - - /* linear extrapolation for s & t from previous solutions */ - //s[i] = 2 * s_hist[i][0] - s_hist[i][1]; - //t[i] = 2 * t_hist[i][0] - t_hist[i][1]; - - /* quadratic extrapolation for s & t from previous solutions */ - //s[i] = s_hist[i][2] + 3 * ( s_hist[i][0] - s_hist[i][1] ); - t[i] = t_hist[i][2] + 3 * ( t_hist[i][0] - t_hist[i][1] ); - - /* cubic extrapolation for s & t from previous solutions */ - s[i] = 4*(s_hist[i][0]+s_hist[i][2])-(6*s_hist[i][1]+s_hist[i][3]); - //t[i] = 4*(t_hist[i][0]+t_hist[i][2])-(6*t_hist[i][1]+t_hist[i][3]); + + /* init pre-conditioner for H and init solution vectors */ + Hdia_inv[i] = 1. / eta[ atom->type[i] ]; + b_s[i] = -chi[ atom->type[i] ]; + b_t[i] = -1.0; + + /* linear extrapolation for s & t from previous solutions */ + //s[i] = 2 * s_hist[i][0] - s_hist[i][1]; + //t[i] = 2 * t_hist[i][0] - t_hist[i][1]; + + /* quadratic extrapolation for s & t from previous solutions */ + //s[i] = s_hist[i][2] + 3 * ( s_hist[i][0] - s_hist[i][1] ); + t[i] = t_hist[i][2] + 3 * ( t_hist[i][0] - t_hist[i][1] ); + + /* cubic extrapolation for s & t from previous solutions */ + s[i] = 4*(s_hist[i][0]+s_hist[i][2])-(6*s_hist[i][1]+s_hist[i][3]); + //t[i] = 4*(t_hist[i][0]+t_hist[i][2])-(6*t_hist[i][1]+t_hist[i][3]); } } } @@ -526,7 +526,7 @@ int FixQEqReaxOMP::CG( double *b, double *x) #endif { MPI_Allreduce(&tmp1, &tmp2, 1, MPI_DOUBLE, MPI_SUM, world); - + alpha = sig_new / tmp2; tmp1 = 0.0; } @@ -540,7 +540,7 @@ int FixQEqReaxOMP::CG( double *b, double *x) if (atom->mask[ii] & groupbit) { x[ii] += alpha * d[ii]; r[ii] -= alpha * q[ii]; - + // pre-conditioning p[ii] = r[ii] * Hdia_inv[ii]; tmp1 += r[ii] * p[ii]; @@ -628,7 +628,7 @@ void FixQEqReaxOMP::sparse_matvec( sparse_matrix *A, double *x, double *b) #if defined(_OPENMP) #pragma omp barrier #pragma omp for schedule(dynamic,50) -#endif +#endif for (ii = 0; ii < nn; ++ii) { i = ilist[ii]; if (atom->mask[i] & groupbit) { @@ -858,9 +858,9 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2) { my_buf[0] = tmp1; my_buf[1] = tmp2; - + MPI_Allreduce(&my_buf, &buf, 2, MPI_DOUBLE, MPI_SUM, world); - + alpha_s = sig_new_s / buf[0]; alpha_t = sig_new_t / buf[1]; @@ -877,14 +877,14 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2) int indxI = 2 * ii; x1[ii] += alpha_s * d[indxI ]; x2[ii] += alpha_t * d[indxI+1]; - + r[indxI ] -= alpha_s * q[indxI ]; r[indxI+1] -= alpha_t * q[indxI+1]; - + // pre-conditioning p[indxI ] = r[indxI ] * Hdia_inv[ii]; p[indxI+1] = r[indxI+1] * Hdia_inv[ii]; - + tmp1 += r[indxI ] * p[indxI ]; tmp2 += r[indxI+1] * p[indxI+1]; } @@ -915,7 +915,7 @@ int FixQEqReaxOMP::dual_CG( double *b1, double *b2, double *x1, double *x2) ii = ilist[jj]; if (atom->mask[ii] & groupbit) { int indxI = 2 * ii; - + d[indxI ] = p[indxI ] + beta_s * d[indxI ]; d[indxI+1] = p[indxI+1] + beta_t * d[indxI+1]; } diff --git a/src/USER-OMP/pair_reaxc_omp.cpp b/src/USER-OMP/pair_reaxc_omp.cpp index 078b9d63d4..0c16284e25 100644 --- a/src/USER-OMP/pair_reaxc_omp.cpp +++ b/src/USER-OMP/pair_reaxc_omp.cpp @@ -16,19 +16,19 @@ Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu Per-atom energy/virial added by Ray Shan (Materials Design, Inc.) - Fix reax/c/bonds and fix reax/c/species for pair_style reax/c added + Fix reax/c/bonds and fix reax/c/species for pair_style reax/c added by Ray Shan (Materials Design) - OpenMP based threading support for pair_style reax/c/omp added - by Hasan Metin Aktulga (MSU), Chris Knight (ALCF), Paul Coffman (ALCF), + OpenMP based threading support for pair_style reax/c/omp added + by Hasan Metin Aktulga (MSU), Chris Knight (ALCF), Paul Coffman (ALCF), Kurt O'Hearn (MSU), Ray Shan (Materials Design), Wei Jiang (ALCF) - - Integration of the pair_style reax/c/omp into the User-OMP package + + Integration of the pair_style reax/c/omp into the User-OMP package by Axel Kohlmeyer (Temple U.) Please cite the related publication: - H. M. Aktulga, C. Knight, P. Coffman, K. A. O'Hearn, T. R. Shan, - W. Jiang, "Optimizing the performance of reactive molecular dynamics + H. M. Aktulga, C. Knight, P. Coffman, K. A. O'Hearn, T. R. Shan, + W. Jiang, "Optimizing the performance of reactive molecular dynamics simulations for multi-core architectures", International Journal of High Performance Computing Applications, to appear. ------------------------------------------------------------------------- */ -- GitLab From f717a70638f91c0ac50bd160b7a63a8be86858dc Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 11 Jul 2017 16:16:03 -0600 Subject: [PATCH 457/593] tools/Makefile: remove remains of data2xmovie data2xmovie was removed in e110d6961a48017274256e23d15530974aec55ff --- tools/Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 2cf46fcc23..cd3c5756ae 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -5,7 +5,7 @@ # all: - $(MAKE) binary2txt chain micelle2d data2xmovie + $(MAKE) binary2txt chain micelle2d binary2txt: binary2txt.o g++ -g binary2txt.o -o binary2txt @@ -16,14 +16,11 @@ chain: chain.o micelle2d: micelle2d.o ifort micelle2d.o -o micelle2d -data2xmovie: data2xmovie.o - g++ -g data2xmovie.o -o data2xmovie - thermo_extract: thermo_extract.o gcc -g thermo_extract.o -o thermo_extract clean: - rm binary2txt chain micelle2d data2xmovie + rm binary2txt chain micelle2d rm thermo_extract rm *.o -- GitLab From ddc96213255a15932fe9d1a12b8a69fc7e1d414b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 11 Jul 2017 18:30:41 -0400 Subject: [PATCH 458/593] remove absolutely last reference to xmovie --- examples/README | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/README b/examples/README index 090ed733ac..e4312e2598 100644 --- a/examples/README +++ b/examples/README @@ -37,9 +37,8 @@ produce dump snapshots of the running simulation in any of 3 formats. If you uncomment the dump command in the input script, a text dump file will be produced, which can be animated by various visualization -programs (see http://lammps.sandia.gov/viz.html) such as VMD or -AtomEye. It can also be animated using the xmovie tool described in -the Additional Tools section of the LAMMPS documentation. +programs (see http://lammps.sandia.gov/viz.html) such as Ovito, VMD, +or AtomEye. If you uncomment the dump image command in the input script, and assuming you have built LAMMPS with a JPG library, JPG snapshot images -- GitLab From a9ff593763c74082df4df53d268e2ddcc172a3fb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 12 Jul 2017 09:48:07 -0400 Subject: [PATCH 459/593] avoid segfault when calling enforce2d before langevin data has been initialized --- src/RIGID/fix_rigid.cpp | 2 +- src/RIGID/fix_rigid_small.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index d0c931a466..9d46968273 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -949,7 +949,7 @@ void FixRigid::enforce2d() angmom[ibody][1] = 0.0; omega[ibody][0] = 0.0; omega[ibody][1] = 0.0; - if (langflag) { + if (langflag && langextra) { langextra[ibody][2] = 0.0; langextra[ibody][3] = 0.0; langextra[ibody][4] = 0.0; diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index b4de4f53bb..60afeecbf0 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -786,7 +786,7 @@ void FixRigidSmall::enforce2d() b->angmom[1] = 0.0; b->omega[0] = 0.0; b->omega[1] = 0.0; - if (langflag) { + if (langflag && langextra) { langextra[ibody][2] = 0.0; langextra[ibody][3] = 0.0; langextra[ibody][4] = 0.0; -- GitLab From 69d97fa60cf04a6364f9714baf031337fd048151 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 12 Jul 2017 11:26:16 -0400 Subject: [PATCH 460/593] fix enforce2d has to be defined after fixes with enforce2d_flag set this check currently only applies to rigid fixes and is needed so that their respective enforce2d function is called _after_ the post force functions. this is required in combination with commit a9ff593763c74082df4df53d268e2ddcc172a3fb to allow rigid fixes use the langevin option correctly for 2d systems --- src/fix_enforce2d.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/fix_enforce2d.cpp b/src/fix_enforce2d.cpp index 21a99e3c16..336fd12556 100644 --- a/src/fix_enforce2d.cpp +++ b/src/fix_enforce2d.cpp @@ -66,12 +66,21 @@ void FixEnforce2D::init() if (modify->fix[i]->enforce2d_flag) nfixlist++; if (nfixlist) { + int myindex = -1; delete [] flist; flist = new Fix*[nfixlist]; nfixlist = 0; for (int i = 0; i < modify->nfix; i++) { - if (modify->fix[i]->enforce2d_flag) - flist[nfixlist++] = modify->fix[i]; + if (modify->fix[i]->enforce2d_flag) { + if (myindex < 0) + flist[nfixlist++] = modify->fix[i]; + else { + char msg[256]; + sprintf(msg,"Fix enforce2d must be defined after fix %s",modify->fix[i]->style); + error->all(FLERR,msg); + } + } + if (modify->fix[i] == this) myindex = i; } } } -- GitLab From a419c7c57c52f9017ec2c0f5b8d247ac43501572 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 12 Jul 2017 11:40:35 -0400 Subject: [PATCH 461/593] update src/.gitignore for fix wall*/ees sources --- src/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/.gitignore b/src/.gitignore index 1c7f468e6e..306b123c14 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -508,6 +508,10 @@ /fix_tune_kspace.h /fix_wall_colloid.cpp /fix_wall_colloid.h +/fix_wall_ees.cpp +/fix_wall_ees.h +/fix_wall_region_ees.cpp +/fix_wall_region_ees.h /fix_wall_gran.cpp /fix_wall_gran.h /fix_wall_gran_region.cpp -- GitLab From 734729b0a4d5772a4f4d0c17c11a16813fa730f3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 12 Jul 2017 17:27:49 -0400 Subject: [PATCH 462/593] avoid small memory leak with USER-REAXC + USER-OMP, spotted by GCC's address sanitizer --- src/USER-REAXC/reaxc_allocate.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/USER-REAXC/reaxc_allocate.cpp b/src/USER-REAXC/reaxc_allocate.cpp index 0d9c51c878..e3fc54c504 100644 --- a/src/USER-REAXC/reaxc_allocate.cpp +++ b/src/USER-REAXC/reaxc_allocate.cpp @@ -196,11 +196,10 @@ void DeAllocate_Workspace( control_params *control, storage *workspace ) /* reductions */ #ifdef LMP_USER_OMP - if(workspace->CdDeltaReduction) sfree( workspace->CdDeltaReduction, "cddelta_reduce" ); - if(workspace->forceReduction) sfree( workspace->forceReduction, "f_reduce" ); - if(workspace->valence_angle_atom_myoffset) sfree( workspace->valence_angle_atom_myoffset, "valence_angle_atom_myoffset"); - - if (control->virial && workspace->my_ext_pressReduction) sfree( workspace->my_ext_pressReduction, "ext_press_reduce"); + if (workspace->CdDeltaReduction) sfree( workspace->CdDeltaReduction, "cddelta_reduce" ); + if (workspace->forceReduction) sfree( workspace->forceReduction, "f_reduce" ); + if (workspace->valence_angle_atom_myoffset) sfree( workspace->valence_angle_atom_myoffset, "valence_angle_atom_myoffset"); + if (workspace->my_ext_pressReduction) sfree( workspace->my_ext_pressReduction, "ext_press_reduce"); #endif } @@ -307,9 +306,7 @@ int Allocate_Workspace( reax_system *system, control_params *control, "forceReduction", comm); workspace->valence_angle_atom_myoffset = (int *) scalloc(sizeof(int), total_cap, "valence_angle_atom_myoffset", comm); - - if (control->virial) - workspace->my_ext_pressReduction = (rvec *) calloc(sizeof(rvec), control->nthreads); + workspace->my_ext_pressReduction = (rvec *) calloc(sizeof(rvec), control->nthreads); #endif return SUCCESS; -- GitLab From 01e848387ac85e6bc013dc233c20a01e7ea127c7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 12 Jul 2017 18:00:38 -0400 Subject: [PATCH 463/593] avoid accessing uninitialized data when exiting LAMMPS early --- src/comm_brick.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/comm_brick.cpp b/src/comm_brick.cpp index d6cbed40af..3c972b8244 100644 --- a/src/comm_brick.cpp +++ b/src/comm_brick.cpp @@ -124,6 +124,7 @@ void CommBrick::init_buffers() maxrecv = BUFMIN; memory->create(buf_recv,maxrecv,"comm:buf_recv"); + nswap = 0; maxswap = 6; allocate_swap(maxswap); -- GitLab From c24fca61f37aa7abfa1c907fd51a1da7478a18a3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 12 Jul 2017 18:14:11 -0400 Subject: [PATCH 464/593] fix possible uninitialized data access with pppm and pppm/disp --- src/KSPACE/pppm.cpp | 5 +++++ src/KSPACE/pppm_disp.cpp | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index 05169fca1c..6add8b58b7 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -95,6 +95,11 @@ PPPM::PPPM(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg), MPI_Comm_rank(world,&me); MPI_Comm_size(world,&nprocs); + nfft_both = 0; + nxhi_in = nxlo_in = nxhi_out = nxlo_out = 0; + nyhi_in = nylo_in = nyhi_out = nylo_out = 0; + nzhi_in = nzlo_in = nzhi_out = nzlo_out = 0; + density_brick = vdx_brick = vdy_brick = vdz_brick = NULL; density_fft = NULL; u_brick = NULL; diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index b31d42a815..43b2c8236a 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -121,6 +121,13 @@ PPPMDisp::PPPMDisp(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg), MPI_Comm_rank(world,&me); MPI_Comm_size(world,&nprocs); + nfft_both = nfft_both_6 = 0; + nxhi_in = nxlo_in = nxhi_out = nxlo_out = 0; + nyhi_in = nylo_in = nyhi_out = nylo_out = 0; + nzhi_in = nzlo_in = nzhi_out = nzlo_out = 0; + nxhi_in_6 = nxlo_in_6 = nxhi_out_6 = nxlo_out_6 = 0; + nyhi_in_6 = nylo_in_6 = nyhi_out_6 = nylo_out_6 = 0; + nzhi_in_6 = nzlo_in_6 = nzhi_out_6 = nzlo_out_6 = 0; csumflag = 0; B = NULL; -- GitLab From 0af9203fdc991af03cb77a7bbc649170d74c4088 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 12 Jul 2017 18:32:04 -0400 Subject: [PATCH 465/593] remove useless and incorrect neighbor list request in fix qeq/comb/omp --- src/USER-OMP/fix_qeq_comb_omp.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/USER-OMP/fix_qeq_comb_omp.cpp b/src/USER-OMP/fix_qeq_comb_omp.cpp index 0c69876b86..351003b668 100644 --- a/src/USER-OMP/fix_qeq_comb_omp.cpp +++ b/src/USER-OMP/fix_qeq_comb_omp.cpp @@ -70,17 +70,6 @@ void FixQEQCombOMP::init() ngroup = group->count(igroup); if (ngroup == 0) error->all(FLERR,"Fix qeq/comb group has no atoms"); - - // determine status of neighbor flag of the omp package command - int ifix = modify->find_fix("package_omp"); - int use_omp = 0; - if (ifix >=0) { - FixOMP * fix = static_cast(lmp->modify->fix[ifix]); - if (fix->get_neighbor()) use_omp = 1; - } - - int irequest = neighbor->request(this,instance_me); - neighbor->requests[irequest]->omp = use_omp; } /* ---------------------------------------------------------------------- */ -- GitLab From de8d417aeccdcee893ae50ccb6f47fd41bcf802e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 13 Jul 2017 10:55:13 -0400 Subject: [PATCH 466/593] fix off-by-one memory allocation bug --- src/USER-OMP/fix_nphug_omp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-OMP/fix_nphug_omp.cpp b/src/USER-OMP/fix_nphug_omp.cpp index bc3c2cdd5c..75ff393e28 100644 --- a/src/USER-OMP/fix_nphug_omp.cpp +++ b/src/USER-OMP/fix_nphug_omp.cpp @@ -157,7 +157,7 @@ FixNPHugOMP::FixNPHugOMP(LAMMPS *lmp, int narg, char **arg) : // create a new compute potential energy compute - n = strlen(id) + 3; + n = strlen(id) + 4; id_pe = new char[n]; strcpy(id_pe,id); strcat(id_pe,"_pe"); -- GitLab From d0cc1dfbb80ccd9e8bad183d7a4fb380e085b4c2 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 13 Jul 2017 11:19:35 -0600 Subject: [PATCH 467/593] changes to SNAP virial from Aidan --- doc/src/Section_start.txt | 51 ++++++++++++++++++++++++++++++--------- src/SNAP/pair_snap.cpp | 27 +++++++++++++-------- 2 files changed, 57 insertions(+), 21 deletions(-) diff --git a/doc/src/Section_start.txt b/doc/src/Section_start.txt index dcd320655f..b7a471c3fa 100644 --- a/doc/src/Section_start.txt +++ b/doc/src/Section_start.txt @@ -434,20 +434,39 @@ files. Note that on some large parallel machines which use "modules" for their compile/link environements, you may simply need to include the correct module in your build environment. Or the parallel machine may have a vendor-provided FFT library which the compiler has no -trouble finding. +trouble finding. See the src/MAKE/OPTIONS/Makefile.fftw file for an +example of how to specify these variables to use the FFTW3 library. -FFTW is a fast, portable library that should also work on any -platform. You can download it from +FFTW is fast, portable library that should also work on any platform +and typically be faster than KISS FFT. You can download it from "www.fftw.org"_http://www.fftw.org. Both the legacy version 2.1.X and the newer 3.X versions are supported as -DFFT_FFTW2 or -DFFT_FFTW3. -Building FFTW for your box should be as simple as ./configure; make. -Note that on some platforms FFTW2 has been pre-installed, and uses -renamed files indicating the precision it was compiled with, -e.g. sfftw.h, or dfftw.h instead of fftw.h. In this case, you can -specify an additional define variable for FFT_INC called -DFFTW_SIZE, -which will select the correct include file. In this case, for FFT_LIB -you must also manually specify the correct library, namely -lsfftw or --ldfftw. +Building FFTW for your box should be as simple as ./configure; make; +make install. The install command typically requires root privileges +(e.g. invoke it via sudo), unless you specify a local directory with +the "--prefix" option of configure. Type "./configure --help" to see +various options. + +If you wish to have FFTW support for single-precision FFTs (see below +about -DFFT_SINGLE) in addition to the default double-precision FFTs, +you will need to build FFTW a second time for single-precision. For +FFTW3, do this via: + +make clean +./configure --enable-single; make; make install :pre + +which should produce the additional library libfftw3f.a. + +For FFTW2, do this: + +make clean +./configure --enable-float --enable-type-prefix; make; make install :pre + +which should produce the additional library libsfftw.a and additional +include file sfttw.a. Note that on some platforms FFTW2 has been +pre-installed for both single- and double-precision, and may already +have these files as well as libdfftw.a and dfftw.h for double +precision. The FFT_INC variable also allows for a -DFFT_SINGLE setting that will use single-precision FFTs with PPPM, which can speed-up long-range @@ -459,6 +478,16 @@ accuracy for reduced memory use and parallel communication costs for transposing 3d FFT data. Note that single precision FFTs have only been tested with the FFTW3, FFTW2, MKL, and KISS FFT options. +When using -DFFT_SINGLE with FFTW3 or FFTW2, you need to build FFTW +with support for single-precision, as explained above. For FFTW3 you +also need to include -lfftw3f with the FFT_LIB setting, in addition to +-lfftw3. For FFTW2, you also need to specify -DFFT_SIZE with the +FFT_INC setting and -lsfftw with the FFT_LIB setting (in place of +-lfftw). Similarly, if FFTW2 has been preinstalled with an explicit +double-precision library (libdfftw.a and not the default libfftw.a), +then you can specify -DFFT_SIZE (and not -DFFT_SINGLE), and specify +-ldfftw to use double-precision FFTs. + Step 7 :h6 The 3 JPG variables allow you to specify a JPEG and/or PNG library diff --git a/src/SNAP/pair_snap.cpp b/src/SNAP/pair_snap.cpp index 492e9ad643..696f910a11 100644 --- a/src/SNAP/pair_snap.cpp +++ b/src/SNAP/pair_snap.cpp @@ -289,7 +289,7 @@ void PairSNAP::compute_regular(int eflag, int vflag) } } } - + f[i][0] += fij[0]; f[i][1] += fij[1]; f[i][2] += fij[2]; @@ -297,13 +297,17 @@ void PairSNAP::compute_regular(int eflag, int vflag) f[j][1] -= fij[1]; f[j][2] -= fij[2]; - if (evflag) - ev_tally_xyz(i,j,nlocal,newton_pair,0.0,0.0, + // tally per-atom virial contribution + + if (vflag) + ev_tally_xyz(i,j,nlocal,newton_pair,0.0,0.0, fij[0],fij[1],fij[2], - snaptr->rij[jj][0],snaptr->rij[jj][1], - snaptr->rij[jj][2]); + -snaptr->rij[jj][0],-snaptr->rij[jj][1], + -snaptr->rij[jj][2]); } + // tally energy contribution + if (eflag) { // evdwl = energy of atom I, sum over coeffs_k * Bi_k @@ -336,7 +340,7 @@ void PairSNAP::compute_regular(int eflag, int vflag) } } } - ev_tally_full(i,2.0*evdwl,0.0,0.0,delx,dely,delz); + ev_tally_full(i,2.0*evdwl,0.0,0.0,0.0,0.0,0.0); } } @@ -655,11 +659,14 @@ void PairSNAP::compute_optimized(int eflag, int vflag) f[j][0] -= fij[0]; f[j][1] -= fij[1]; f[j][2] -= fij[2]; - if (evflag) + + // tally per-atom virial contribution + + if (vflag) ev_tally_xyz(i,j,nlocal,newton_pair,0.0,0.0, fij[0],fij[1],fij[2], - sna[tid]->rij[jj][0],sna[tid]->rij[jj][1], - sna[tid]->rij[jj][2]); + -sna[tid]->rij[jj][0],-sna[tid]->rij[jj][1], + -sna[tid]->rij[jj][2]); } } @@ -699,7 +706,7 @@ void PairSNAP::compute_optimized(int eflag, int vflag) #if defined(_OPENMP) #pragma omp critical #endif - ev_tally_full(i,2.0*evdwl,0.0,0.0,delx,dely,delz); + ev_tally_full(i,2.0*evdwl,0.0,0.0,0.0,0.0,0.0); } } -- GitLab From 609c8b1e87742b539dd5ce1556d7d53b1c0af771 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 13 Jul 2017 17:32:27 -0400 Subject: [PATCH 468/593] add flag to reax/c system struct to signaling, whether OpenMP is active --- src/USER-OMP/pair_reaxc_omp.cpp | 1 + src/USER-REAXC/pair_reaxc.cpp | 2 ++ src/USER-REAXC/reaxc_types.h | 1 + 3 files changed, 4 insertions(+) diff --git a/src/USER-OMP/pair_reaxc_omp.cpp b/src/USER-OMP/pair_reaxc_omp.cpp index 0c16284e25..7ac8952b1e 100644 --- a/src/USER-OMP/pair_reaxc_omp.cpp +++ b/src/USER-OMP/pair_reaxc_omp.cpp @@ -93,6 +93,7 @@ PairReaxCOMP::PairReaxCOMP(LAMMPS *lmp) : PairReaxC(lmp), ThrOMP(lmp, THR_PAIR) suffix_flag |= Suffix::OMP; system->pair_ptr = this; + system->omp_active = 1; num_nbrs_offset = NULL; diff --git a/src/USER-REAXC/pair_reaxc.cpp b/src/USER-REAXC/pair_reaxc.cpp index bf3b2e4467..300ccbe330 100644 --- a/src/USER-REAXC/pair_reaxc.cpp +++ b/src/USER-REAXC/pair_reaxc.cpp @@ -108,6 +108,8 @@ PairReaxC::PairReaxC(LAMMPS *lmp) : Pair(lmp) system->my_atoms = NULL; system->pair_ptr = this; + system->omp_active = 0; + fix_reax = NULL; tmpid = NULL; tmpbo = NULL; diff --git a/src/USER-REAXC/reaxc_types.h b/src/USER-REAXC/reaxc_types.h index 547602feb4..ac23329985 100644 --- a/src/USER-REAXC/reaxc_types.h +++ b/src/USER-REAXC/reaxc_types.h @@ -415,6 +415,7 @@ struct _reax_system int mincap; double safezone, saferzone; + int omp_active; }; typedef _reax_system reax_system; -- GitLab From 132cee9840515d3f076576c8f6e58ec9136753b0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 13 Jul 2017 17:33:00 -0400 Subject: [PATCH 469/593] protect warning printf()s to be only printed on rank 0 --- src/USER-REAXC/reaxc_ffield.cpp | 63 ++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/src/USER-REAXC/reaxc_ffield.cpp b/src/USER-REAXC/reaxc_ffield.cpp index 58a347ebf7..fcface79fd 100644 --- a/src/USER-REAXC/reaxc_ffield.cpp +++ b/src/USER-REAXC/reaxc_ffield.cpp @@ -40,8 +40,10 @@ char Read_Force_Field( FILE *fp, reax_interaction *reax, int errorflag = 1; double val; MPI_Comm comm; + int me; comm = MPI_COMM_WORLD; + MPI_Comm_rank(comm, &me); s = (char*) malloc(sizeof(char)*MAX_LINE); tmp = (char**) malloc(sizeof(char*)*MAX_TOKENS); @@ -58,7 +60,8 @@ char Read_Force_Field( FILE *fp, reax_interaction *reax, /* reading the number of global parameters */ n = atoi(tmp[0]); if (n < 1) { - fprintf( stderr, "WARNING: number of globals in ffield file is 0!\n" ); + if (me == 0) + fprintf( stderr, "WARNING: number of globals in ffield file is 0!\n" ); fclose(fp); free(s); free(tmp); @@ -199,7 +202,8 @@ char Read_Force_Field( FILE *fp, reax_interaction *reax, /* Sanity check */ if (c < 3) { - fprintf(stderr, "Inconsistent ffield file (reaxc_ffield.cpp) \n"); + if (me == 0) + fprintf(stderr, "Inconsistent ffield file (reaxc_ffield.cpp) \n"); MPI_Abort( comm, FILE_NOT_FOUND ); } @@ -219,7 +223,8 @@ char Read_Force_Field( FILE *fp, reax_interaction *reax, /* Sanity check */ if (c > 3) { - fprintf(stderr, "Inconsistent ffield file (reaxc_ffield.cpp) \n"); + if (me == 0) + fprintf(stderr, "Inconsistent ffield file (reaxc_ffield.cpp) \n"); MPI_Abort( comm, FILE_NOT_FOUND ); } @@ -230,50 +235,51 @@ char Read_Force_Field( FILE *fp, reax_interaction *reax, if( reax->sbp[i].rcore2>0.01 && reax->sbp[i].acore2>0.01 ){ // Inner-wall if( reax->sbp[i].gamma_w>0.5 ){ // Shielding vdWaals if( reax->gp.vdw_type != 0 && reax->gp.vdw_type != 3 ) { - if (errorflag) - fprintf( stderr, "Warning: inconsistent vdWaals-parameters\n" \ - "Force field parameters for element %s\n" \ - "indicate inner wall+shielding, but earlier\n" \ - "atoms indicate different vdWaals-method.\n" \ - "This may cause division-by-zero errors.\n" \ + if (errorflag && (me == 0)) + fprintf( stderr, "Warning: inconsistent vdWaals-parameters\n" \ + "Force field parameters for element %s\n" \ + "indicate inner wall+shielding, but earlier\n" \ + "atoms indicate different vdWaals-method.\n" \ + "This may cause division-by-zero errors.\n" \ "Keeping vdWaals-setting for earlier atoms.\n", reax->sbp[i].name ); errorflag = 0; - } - else{ + } else{ reax->gp.vdw_type = 3; } } else { // No shielding vdWaals parameters present - if( reax->gp.vdw_type != 0 && reax->gp.vdw_type != 2 ) - fprintf( stderr, "Warning: inconsistent vdWaals-parameters\n" \ - "Force field parameters for element %s\n" \ + if( reax->gp.vdw_type != 0 && reax->gp.vdw_type != 2 ) { + if (me == 0) + fprintf( stderr, "Warning: inconsistent vdWaals-parameters\n" \ + "Force field parameters for element %s\n" \ "indicate inner wall without shielding, but earlier\n" \ - "atoms indicate different vdWaals-method.\n" \ - "This may cause division-by-zero errors.\n" \ + "atoms indicate different vdWaals-method.\n" \ + "This may cause division-by-zero errors.\n" \ "Keeping vdWaals-setting for earlier atoms.\n", reax->sbp[i].name ); - else{ + } else { reax->gp.vdw_type = 2; } } } else{ // No Inner wall parameters present if( reax->sbp[i].gamma_w>0.5 ){ // Shielding vdWaals - if( reax->gp.vdw_type != 0 && reax->gp.vdw_type != 1 ) - fprintf( stderr, "Warning: inconsistent vdWaals-parameters\n" \ - "Force field parameters for element %s\n" \ + if( reax->gp.vdw_type != 0 && reax->gp.vdw_type != 1 ) { + if (me == 0) + fprintf( stderr, "Warning: inconsistent vdWaals-parameters\n" \ + "Force field parameters for element %s\n" \ "indicate shielding without inner wall, but earlier\n" \ - "atoms indicate different vdWaals-method.\n" \ - "This may cause division-by-zero errors.\n" \ + "atoms indicate different vdWaals-method.\n" \ + "This may cause division-by-zero errors.\n" \ "Keeping vdWaals-setting for earlier atoms.\n", reax->sbp[i].name ); - else{ + } else { reax->gp.vdw_type = 1; } - } - else{ - fprintf( stderr, "Error: inconsistent vdWaals-parameters\n"\ + } else { + if (me == 0) + fprintf( stderr, "Error: inconsistent vdWaals-parameters\n" \ "No shielding or inner-wall set for element %s\n", reax->sbp[i].name ); MPI_Abort( comm, INVALID_INPUT ); @@ -284,8 +290,9 @@ char Read_Force_Field( FILE *fp, reax_interaction *reax, /* Equate vval3 to valf for first-row elements (25/10/2004) */ for( i = 0; i < reax->num_atom_types; i++ ) if( reax->sbp[i].mass < 21 && - reax->sbp[i].valency_val != reax->sbp[i].valency_boc ){ - fprintf( stderr, "Warning: changed valency_val to valency_boc for %s\n", + reax->sbp[i].valency_val != reax->sbp[i].valency_boc ) { + if (me == 0) + fprintf(stderr,"Warning: changed valency_val to valency_boc for %s\n", reax->sbp[i].name ); reax->sbp[i].valency_val = reax->sbp[i].valency_boc; } -- GitLab From 111786e92e0ff34125d32c6d60d01959c6ab4e03 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 13 Jul 2017 17:33:56 -0400 Subject: [PATCH 470/593] avoid trying to free NULL pointers and reallocate storage for OpenMP, when not using OpenMP styles --- src/USER-REAXC/reaxc_allocate.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/USER-REAXC/reaxc_allocate.cpp b/src/USER-REAXC/reaxc_allocate.cpp index e3fc54c504..1b8274916e 100644 --- a/src/USER-REAXC/reaxc_allocate.cpp +++ b/src/USER-REAXC/reaxc_allocate.cpp @@ -367,8 +367,9 @@ static int Reallocate_Bonds_List( reax_system *system, reax_list *bonds, *total_bonds = (int)(MAX( *total_bonds * safezone, mincap*MIN_BONDS )); #ifdef LMP_USER_OMP - for (i = 0; i < bonds->num_intrs; ++i) - sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); + if (system->omp_active) + for (i = 0; i < bonds->num_intrs; ++i) + sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); #endif Delete_List( bonds, comm ); @@ -384,9 +385,10 @@ static int Reallocate_Bonds_List( reax_system *system, reax_list *bonds, int nthreads = 1; #endif - for (i = 0; i < bonds->num_intrs; ++i) - bonds->select.bond_list[i].bo_data.CdboReduction = - (double*) smalloc(sizeof(double)*nthreads, "CdboReduction", comm); + if (system->omp_active) + for (i = 0; i < bonds->num_intrs; ++i) + bonds->select.bond_list[i].bo_data.CdboReduction = + (double*) smalloc(sizeof(double)*nthreads, "CdboReduction", comm); #endif return SUCCESS; -- GitLab From 32ca58bdf23ca8b8e39035d168d3e56d54eb99e6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 13 Jul 2017 17:34:30 -0400 Subject: [PATCH 471/593] whitespace cleanup --- src/USER-OMP/reaxc_init_md_omp.cpp | 4 +-- src/USER-REAXC/reaxc_types.h | 41 +++++++++++++++--------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/USER-OMP/reaxc_init_md_omp.cpp b/src/USER-OMP/reaxc_init_md_omp.cpp index 79fec8b268..c0e4a45eaa 100644 --- a/src/USER-OMP/reaxc_init_md_omp.cpp +++ b/src/USER-OMP/reaxc_init_md_omp.cpp @@ -39,7 +39,7 @@ #include "reaxc_tool_box.h" #include "reaxc_vector.h" -// Functions definedd in reaxc_init_md.cpp +// Functions defined in reaxc_init_md.cpp extern int Init_MPI_Datatypes(reax_system*, storage*, mpi_datatypes*, MPI_Comm, char*); extern int Init_System(reax_system*, control_params*, char*); extern int Init_Simulation_Data(reax_system*, control_params*, simulation_data*, char*); @@ -104,7 +104,7 @@ int Init_ListsOMP( reax_system *system, control_params *control, /* 3bodies list */ cap_3body = (int)(MAX( num_3body*safezone, MIN_3BODIES )); if( !Make_List( bond_cap, cap_3body, TYP_THREE_BODY, - *lists+THREE_BODIES, comm ) ){ + *lists+THREE_BODIES, comm ) ){ fprintf( stderr, "Problem in initializing angles list. Terminating!\n" ); MPI_Abort( comm, INSUFFICIENT_MEMORY ); diff --git a/src/USER-REAXC/reaxc_types.h b/src/USER-REAXC/reaxc_types.h index ac23329985..14078feb0c 100644 --- a/src/USER-REAXC/reaxc_types.h +++ b/src/USER-REAXC/reaxc_types.h @@ -44,26 +44,26 @@ #ifdef OMP_TIMING // pkcoff timing fields enum { - COMPUTEINDEX=0, - COMPUTEWLINDEX, - COMPUTEBFINDEX, - COMPUTEQEQINDEX, - COMPUTENBFINDEX, - COMPUTEIFINDEX, - COMPUTETFINDEX, - COMPUTEBOINDEX, - COMPUTEBONDSINDEX, - COMPUTEATOMENERGYINDEX, - COMPUTEVALENCEANGLESBOINDEX, - COMPUTETORSIONANGLESBOINDEX, - COMPUTEHBONDSINDEX, - COMPUTECG1INDEX, - COMPUTECG2INDEX, - COMPUTECGCOMPUTEINDEX, - COMPUTECALCQINDEX, - COMPUTEINITMVINDEX, - COMPUTEMVCOMPINDEX, - LASTTIMINGINDEX + COMPUTEINDEX=0, + COMPUTEWLINDEX, + COMPUTEBFINDEX, + COMPUTEQEQINDEX, + COMPUTENBFINDEX, + COMPUTEIFINDEX, + COMPUTETFINDEX, + COMPUTEBOINDEX, + COMPUTEBONDSINDEX, + COMPUTEATOMENERGYINDEX, + COMPUTEVALENCEANGLESBOINDEX, + COMPUTETORSIONANGLESBOINDEX, + COMPUTEHBONDSINDEX, + COMPUTECG1INDEX, + COMPUTECG2INDEX, + COMPUTECGCOMPUTEINDEX, + COMPUTECALCQINDEX, + COMPUTEINITMVINDEX, + COMPUTEMVCOMPINDEX, + LASTTIMINGINDEX }; extern double ompTimingData[LASTTIMINGINDEX]; @@ -745,7 +745,6 @@ typedef struct double *CdDeltaReduction; int *valence_angle_atom_myoffset; - reallocate_data realloc; } storage; -- GitLab From 8a1db83b73060e93606c0bfb92afbe1b47d48bde Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Jul 2017 10:31:51 -0400 Subject: [PATCH 472/593] silence static code analysis warning --- src/MANYBODY/pair_airebo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 67e1e5262a..77b43f8d0e 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -4157,7 +4157,7 @@ def output_matrix(n, k, A): void PairAIREBO::Sptricubic_patch_adjust(double * dl, double wid, double lo, char dir) { - int rowOuterL = 16, rowInnerL = 1, colL; + int rowOuterL = 16, rowInnerL = 1, colL = 4; if (dir == 'R') { rowOuterL = 4; colL = 16; -- GitLab From e5405cdb04770283b1de48edf7167bb99e57ac2d Mon Sep 17 00:00:00 2001 From: Markus Hoehnerbach Date: Fri, 14 Jul 2017 17:57:25 +0200 Subject: [PATCH 473/593] AIREBO: Add doc about OpenKIM issue --- src/MANYBODY/pair_airebo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 67e1e5262a..d05558eb19 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -2105,6 +2105,14 @@ accordingly zero. This function should be kept in sync with bondorder(), i.e. changes there probably also need to be performed here. +The OpenKIM Fortran implementation chooses option (1) instead, which +means that the internal values computed by the two codes are not +directly comparable. +Note that of 7/2017 the OpenKIM code contains an issue where the it +assumes dt2dij[] to be zero (since it is a r_ij derivative). This is +incorrect since dt2dij is not a derivative of the scalar distance r_ij, +but of the vector r_ij. + */ double PairAIREBO::bondorderLJ(int i, int j, double rij_mod[3], double rijmag_mod, -- GitLab From 4d4c03a1e4f5af2619f02c528b92bdeb2672cf55 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Jul 2017 12:33:40 -0400 Subject: [PATCH 474/593] restore gaussian flow example that was lost. tweak input to make it usable for comparing --- examples/USER/flow_gauss/README | 45 + examples/USER/flow_gauss/in.GD | 262 +++++ examples/USER/flow_gauss/log.6Jul17.GD.g++.1 | 909 ++++++++++++++++++ examples/USER/flow_gauss/log.6Jul17.GD.g++.4 | 909 ++++++++++++++++++ examples/USER/flow_gauss/output-files/GD.out | 41 + .../USER/flow_gauss/output-files/Vy_profile | 134 +++ .../USER/flow_gauss/output-files/x_profiles | 36 + 7 files changed, 2336 insertions(+) create mode 100644 examples/USER/flow_gauss/README create mode 100644 examples/USER/flow_gauss/in.GD create mode 100644 examples/USER/flow_gauss/log.6Jul17.GD.g++.1 create mode 100644 examples/USER/flow_gauss/log.6Jul17.GD.g++.4 create mode 100644 examples/USER/flow_gauss/output-files/GD.out create mode 100644 examples/USER/flow_gauss/output-files/Vy_profile create mode 100644 examples/USER/flow_gauss/output-files/x_profiles diff --git a/examples/USER/flow_gauss/README b/examples/USER/flow_gauss/README new file mode 100644 index 0000000000..ef7cc82d96 --- /dev/null +++ b/examples/USER/flow_gauss/README @@ -0,0 +1,45 @@ +The input script in.GD is an example simulation using Gaussian dynamics (GD). +The simulation is of a simple 2d Lennard-Jones fluid flowing through a pipe. +For details see online LAMMPS documentation and +Strong and Eaves, J. Phys. Chem. Lett. 7(10) 2016, p. 1907. + +Note that the run times and box size are chosen to allow a fast example run. +They are not adequate for a real simulation. + +The script has the following parts: +1) initialize variables + These can be modified to customize the simulation. Note that if the + pipe dimensions L or d are changed, the geometry should be checked + by visualizing the coordinates in all.init.lammpstrj. + +2) create box + +3) set up potential + +4) create atoms + +5) set up profile-unbiased thermostat (PUT) + see Evans and Morriss, Phys. Rev. Lett. 56(20) 1986, p. 2172 + By default, this uses boxes which contain on average 8 molecules. + +6) equilibrate without GD + +7) initialize the center-of-mass velocity and run to achieve steady-state + The system is initialized with a uniform velocity profile, which + relaxes over the course of the simulation. + +8) collect data + The data is output in several files: + GD.out contains the force that GD applies, and the flux in the x- and + y- directions. The output Jx should be equal to the value of + J set in section 1, which is 0.1 by default. + x_profiles contains the velocity, density, and pressure profiles in + the x-direction. The pressure profile is given by + (-1/2V)*(c_spa[1] + c_spa[2]), where V is the volume of a + slice. The pressure profile is computed with IK1, see + Todd, Evans, and Davis, Phys. Rev. E 52(2) 1995, p. 1627. + Note that to compare with the pump method, or to + compute a pressure drop, you must correct this pressure + profile as described in Strong 2016 above. + Vy_profile is the velocity profile inside the pipe along the + y-direction, u_x(y). diff --git a/examples/USER/flow_gauss/in.GD b/examples/USER/flow_gauss/in.GD new file mode 100644 index 0000000000..bcff4d4c57 --- /dev/null +++ b/examples/USER/flow_gauss/in.GD @@ -0,0 +1,262 @@ +#LAMMPS input script +#in.GD +#see README for details + +############################################################################### +#initialize variables +clear + +#frequency for outputting info (timesteps) +variable dump_rate equal 50 +variable thermo_rate equal 10 + +#equilibration time (timesteps) +variable equil equal 1000 + +#stabilization time (timesteps to reach steady-state) +variable stabil equal 1000 + +#data collection time (timesteps) +variable run equal 2000 + +#length of pipe +variable L equal 30 + +#width of pipe +variable d equal 20 + +#flux (mass/sigma*tau) +variable J equal 0.1 + +#simulation box dimensions +variable Lx equal 100 +variable Ly equal 40 + +#bulk fluid density +variable dens equal 0.8 + +#lattice spacing for wall atoms +variable aWall equal 1.0 #1.7472 + +#timestep +variable ts equal 0.001 + +#temperature +variable T equal 2.0 + +#thermostat damping constant +variable tdamp equal ${ts}*100 + +units lj +dimension 2 +atom_style atomic + + +############################################################################### +#create box + +#create lattice with the spacing aWall +variable rhoWall equal ${aWall}^(-2) +lattice sq ${rhoWall} + +#modify input dimensions to be multiples of aWall +variable L1 equal round($L/${aWall})*${aWall} +variable d1 equal round($d/${aWall})*${aWall} +variable Ly1 equal round(${Ly}/${aWall})*${aWall} +variable Lx1 equal round(${Lx}/${aWall})*${aWall} + +#create simulation box +variable lx2 equal ${Lx1}/2 +variable ly2 equal ${Ly1}/2 +region simbox block -${lx2} ${lx2} -${ly2} ${ly2} 0 0.1 units box +create_box 2 simbox + +##################################################################### +#set up potential + +mass 1 1.0 #fluid atoms +mass 2 1.0 #wall atoms + +pair_style lj/cut 2.5 +pair_modify shift yes +pair_coeff 1 1 1.0 1.0 2.5 +pair_coeff 1 2 1.0 1.0 1.12246 +pair_coeff 2 2 0.0 0.0 + +neigh_modify exclude type 2 2 + +timestep ${ts} + +##################################################################### +#create atoms + +#create wall atoms everywhere +create_atoms 2 box + +#define region which is "walled off" +variable dhalf equal ${d1}/2 +variable Lhalf equal ${L1}/2 +region walltop block -${Lhalf} ${Lhalf} ${dhalf} EDGE -0.1 0.1 & + units box +region wallbot block -${Lhalf} ${Lhalf} EDGE -${dhalf} -0.1 0.1 & + units box +region outsidewall union 2 walltop wallbot side out + +#remove wall atoms outside wall region +group outside region outsidewall +delete_atoms group outside + +#remove wall atoms that aren't on edge of wall region +variable x1 equal ${Lhalf}-${aWall} +variable y1 equal ${dhalf}+${aWall} +region insideTop block -${x1} ${x1} ${y1} EDGE -0.1 0.1 units box +region insideBot block -${x1} ${x1} EDGE -${y1} -0.1 0.1 units box +region insideWall union 2 insideTop insideBot +group insideWall region insideWall +delete_atoms group insideWall + +#define new lattice, to give correct fluid density +#y lattice const must be a multiple of aWall +variable atrue equal ${dens}^(-1/2) +variable ay equal round(${atrue}/${aWall})*${aWall} + +#choose x lattice const to give correct density +variable ax equal (${ay}*${dens})^(-1) + +#change Lx to be multiple of ax +variable Lx1 equal round(${Lx}/${ax})*${ax} +variable lx2 equal ${Lx1}/2 +change_box all x final -${lx2} ${lx2} units box + +#define new lattice +lattice custom ${dens} & + a1 ${ax} 0.0 0.0 a2 0.0 ${ay} 0.0 a3 0.0 0.0 1.0 & + basis 0.0 0.0 0.0 + +#fill in rest of box with bulk particles +variable delta equal 0.001 +variable Ldelt equal ${Lhalf}+${delta} +variable dDelt equal ${dhalf}-${delta} +region left block EDGE -${Ldelt} EDGE EDGE -0.1 0.1 units box +region right block ${Ldelt} EDGE EDGE EDGE -0.1 0.1 units box +region pipe block -${Ldelt} ${Ldelt} -${dDelt} ${dDelt} -0.1 0.1 & + units box + +region bulk union 3 left pipe right +create_atoms 1 region bulk + +group bulk type 1 +group wall type 2 + +#remove atoms that are too close to wall +delete_atoms overlap 0.9 bulk wall + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes +neigh_modify exclude group wall wall + +velocity bulk create $T 78915 dist gaussian rot yes mom yes loop geom + +##################################################################### +#set up PUT +#see Evans and Morriss, Phys. Rev. Lett. 56(20) 1986, p. 2172 + +#average number of particles per box, Evans and Morriss used 2.0 +variable NperBox equal 8.0 + +#calculate box sizes +variable boxSide equal sqrt(${NperBox}/${dens}) +variable nX equal round(lx/${boxSide}) +variable nY equal round(ly/${boxSide}) +variable dX equal lx/${nX} +variable dY equal ly/${nY} + +#temperature of fluid (excluding wall) +compute myT bulk temp + +#profile-unbiased temperature of fluid +compute myTp bulk temp/profile 1 1 0 xy ${nX} ${nY} + +#thermo setup +thermo ${thermo_rate} +thermo_style custom step c_myT c_myTp etotal press + +#dump initial configuration +# dump 55 all custom 1 all.init.lammpstrj id type x y z vx vy vz +# dump 56 wall custom 1 wall.init.lammpstrj id type x y z +# dump_modify 55 sort id +# dump_modify 56 sort id +run 0 +# undump 55 +# undump 56 + +##################################################################### +#equilibrate without GD + +fix nvt bulk nvt temp $T $T ${tdamp} +fix_modify nvt temp myTp +fix 2 bulk enforce2d + +run ${equil} + +##################################################################### +#initialize the COM velocity and run to achieve steady-state + +#calculate velocity to add: V=J/rho_total +variable Vadd equal $J*lx*ly/count(bulk) + +#first remove any COM velocity, then add back the streaming velocity +velocity bulk zero linear +velocity bulk set ${Vadd} 0.0 0.0 units box sum yes mom no + +fix GD bulk flow/gauss 1 0 0 #energy yes +#fix_modify GD energy yes + +run ${stabil} + +##################################################################### +#collect data + +#print the applied force and total flux to ensure conservation of Jx +variable Fapp equal f_GD[1] +compute vxBulk bulk reduce sum vx +compute vyBulk bulk reduce sum vy +variable invVol equal 1.0/(lx*ly) +variable jx equal c_vxBulk*${invVol} +variable jy equal c_vyBulk*${invVol} +variable curr_step equal step +variable p_Fapp format Fapp %.3f +variable p_jx format jx %.5g +variable p_jy format jy %.5g +fix print_vCOM all print ${dump_rate} & + "${curr_step} ${p_Fapp} ${p_jx} ${p_jy}" file GD.out screen no & + title "timestep Fapp Jx Jy" + +#compute IK1 pressure profile +#see Todd, Evans, and Davis, Phys. Rev. E 52(2) 1995, p. 1627 +#use profile-unbiased temperature to remove the streaming velocity +#from the kinetic part of the pressure +compute spa bulk stress/atom myTp + +#for the pressure profile, use the same grid as the PUT +compute chunkX bulk chunk/atom bin/1d x lower ${dX} units box + +#output pressure profile and other profiles +#the pressure profile is (-1/2V)*(c_spa[1] + c_spa[2]), where +#V is the volume of a slice +fix profiles bulk ave/chunk 1 1 ${dump_rate} chunkX & + vx density/mass c_spa[1] c_spa[2] & + file x_profiles ave running overwrite + +#compute velocity profile across the pipe with a finer grid +variable dYnew equal ${dY}/10 +compute chunkY bulk chunk/atom bin/1d y center ${dYnew} units box & + region pipe +fix velYprof bulk ave/chunk 1 1 ${dump_rate} chunkY & + vx file Vy_profile ave running overwrite + +#full trajectory +# dump 7 bulk custom ${dump_rate} bulk.lammpstrj id type x y z +# dump_modify 7 sort id + +run ${run} diff --git a/examples/USER/flow_gauss/log.6Jul17.GD.g++.1 b/examples/USER/flow_gauss/log.6Jul17.GD.g++.1 new file mode 100644 index 0000000000..bb9167f490 --- /dev/null +++ b/examples/USER/flow_gauss/log.6Jul17.GD.g++.1 @@ -0,0 +1,909 @@ +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task +#LAMMPS input script +#in.GD +#see README for details + +############################################################################### +#initialize variables +clear + using 1 OpenMP thread(s) per MPI task + +#frequency for outputting info (timesteps) +variable dump_rate equal 50 +variable thermo_rate equal 10 + +#equilibration time (timesteps) +variable equil equal 1000 + +#stabilization time (timesteps to reach steady-state) +variable stabil equal 1000 + +#data collection time (timesteps) +variable run equal 2000 + +#length of pipe +variable L equal 30 + +#width of pipe +variable d equal 20 + +#flux (mass/sigma*tau) +variable J equal 0.1 + +#simulation box dimensions +variable Lx equal 100 +variable Ly equal 40 + +#bulk fluid density +variable dens equal 0.8 + +#lattice spacing for wall atoms +variable aWall equal 1.0 #1.7472 + +#timestep +variable ts equal 0.001 + +#temperature +variable T equal 2.0 + +#thermostat damping constant +variable tdamp equal ${ts}*100 +variable tdamp equal 0.001*100 + +units lj +dimension 2 +atom_style atomic + + +############################################################################### +#create box + +#create lattice with the spacing aWall +variable rhoWall equal ${aWall}^(-2) +variable rhoWall equal 1^(-2) +lattice sq ${rhoWall} +lattice sq 1 +Lattice spacing in x,y,z = 1 1 1 + +#modify input dimensions to be multiples of aWall +variable L1 equal round($L/${aWall})*${aWall} +variable L1 equal round(30/${aWall})*${aWall} +variable L1 equal round(30/1)*${aWall} +variable L1 equal round(30/1)*1 +variable d1 equal round($d/${aWall})*${aWall} +variable d1 equal round(20/${aWall})*${aWall} +variable d1 equal round(20/1)*${aWall} +variable d1 equal round(20/1)*1 +variable Ly1 equal round(${Ly}/${aWall})*${aWall} +variable Ly1 equal round(40/${aWall})*${aWall} +variable Ly1 equal round(40/1)*${aWall} +variable Ly1 equal round(40/1)*1 +variable Lx1 equal round(${Lx}/${aWall})*${aWall} +variable Lx1 equal round(100/${aWall})*${aWall} +variable Lx1 equal round(100/1)*${aWall} +variable Lx1 equal round(100/1)*1 + +#create simulation box +variable lx2 equal ${Lx1}/2 +variable lx2 equal 100/2 +variable ly2 equal ${Ly1}/2 +variable ly2 equal 40/2 +region simbox block -${lx2} ${lx2} -${ly2} ${ly2} 0 0.1 units box +region simbox block -50 ${lx2} -${ly2} ${ly2} 0 0.1 units box +region simbox block -50 50 -${ly2} ${ly2} 0 0.1 units box +region simbox block -50 50 -20 ${ly2} 0 0.1 units box +region simbox block -50 50 -20 20 0 0.1 units box +create_box 2 simbox +Created orthogonal box = (-50 -20 0) to (50 20 0.1) + 1 by 1 by 1 MPI processor grid + +##################################################################### +#set up potential + +mass 1 1.0 #fluid atoms +mass 2 1.0 #wall atoms + +pair_style lj/cut 2.5 +pair_modify shift yes +pair_coeff 1 1 1.0 1.0 2.5 +pair_coeff 1 2 1.0 1.0 1.12246 +pair_coeff 2 2 0.0 0.0 + +neigh_modify exclude type 2 2 + +timestep ${ts} +timestep 0.001 + +##################################################################### +#create atoms + +#create wall atoms everywhere +create_atoms 2 box +Created 4000 atoms + +#define region which is "walled off" +variable dhalf equal ${d1}/2 +variable dhalf equal 20/2 +variable Lhalf equal ${L1}/2 +variable Lhalf equal 30/2 +region walltop block -${Lhalf} ${Lhalf} ${dhalf} EDGE -0.1 0.1 units box +region walltop block -15 ${Lhalf} ${dhalf} EDGE -0.1 0.1 units box +region walltop block -15 15 ${dhalf} EDGE -0.1 0.1 units box +region walltop block -15 15 10 EDGE -0.1 0.1 units box +region wallbot block -${Lhalf} ${Lhalf} EDGE -${dhalf} -0.1 0.1 units box +region wallbot block -15 ${Lhalf} EDGE -${dhalf} -0.1 0.1 units box +region wallbot block -15 15 EDGE -${dhalf} -0.1 0.1 units box +region wallbot block -15 15 EDGE -10 -0.1 0.1 units box +region outsidewall union 2 walltop wallbot side out + +#remove wall atoms outside wall region +group outside region outsidewall +3349 atoms in group outside +delete_atoms group outside +Deleted 3349 atoms, new total = 651 + +#remove wall atoms that aren't on edge of wall region +variable x1 equal ${Lhalf}-${aWall} +variable x1 equal 15-${aWall} +variable x1 equal 15-1 +variable y1 equal ${dhalf}+${aWall} +variable y1 equal 10+${aWall} +variable y1 equal 10+1 +region insideTop block -${x1} ${x1} ${y1} EDGE -0.1 0.1 units box +region insideTop block -14 ${x1} ${y1} EDGE -0.1 0.1 units box +region insideTop block -14 14 ${y1} EDGE -0.1 0.1 units box +region insideTop block -14 14 11 EDGE -0.1 0.1 units box +region insideBot block -${x1} ${x1} EDGE -${y1} -0.1 0.1 units box +region insideBot block -14 ${x1} EDGE -${y1} -0.1 0.1 units box +region insideBot block -14 14 EDGE -${y1} -0.1 0.1 units box +region insideBot block -14 14 EDGE -11 -0.1 0.1 units box +region insideWall union 2 insideTop insideBot +group insideWall region insideWall +551 atoms in group insideWall +delete_atoms group insideWall +Deleted 551 atoms, new total = 100 + +#define new lattice, to give correct fluid density +#y lattice const must be a multiple of aWall +variable atrue equal ${dens}^(-1/2) +variable atrue equal 0.8^(-1/2) +variable ay equal round(${atrue}/${aWall})*${aWall} +variable ay equal round(1.11803398874989/${aWall})*${aWall} +variable ay equal round(1.11803398874989/1)*${aWall} +variable ay equal round(1.11803398874989/1)*1 + +#choose x lattice const to give correct density +variable ax equal (${ay}*${dens})^(-1) +variable ax equal (1*${dens})^(-1) +variable ax equal (1*0.8)^(-1) + +#change Lx to be multiple of ax +variable Lx1 equal round(${Lx}/${ax})*${ax} +variable Lx1 equal round(100/${ax})*${ax} +variable Lx1 equal round(100/1.25)*${ax} +variable Lx1 equal round(100/1.25)*1.25 +variable lx2 equal ${Lx1}/2 +variable lx2 equal 100/2 +change_box all x final -${lx2} ${lx2} units box +change_box all x final -50 ${lx2} units box +change_box all x final -50 50 units box + orthogonal box = (-50 -20 0) to (50 20 0.1) + +#define new lattice +lattice custom ${dens} a1 ${ax} 0.0 0.0 a2 0.0 ${ay} 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 +lattice custom 0.8 a1 ${ax} 0.0 0.0 a2 0.0 ${ay} 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 +lattice custom 0.8 a1 1.25 0.0 0.0 a2 0.0 ${ay} 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 +lattice custom 0.8 a1 1.25 0.0 0.0 a2 0.0 1 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 +Lattice spacing in x,y,z = 1.25 1 1 + +#fill in rest of box with bulk particles +variable delta equal 0.001 +variable Ldelt equal ${Lhalf}+${delta} +variable Ldelt equal 15+${delta} +variable Ldelt equal 15+0.001 +variable dDelt equal ${dhalf}-${delta} +variable dDelt equal 10-${delta} +variable dDelt equal 10-0.001 +region left block EDGE -${Ldelt} EDGE EDGE -0.1 0.1 units box +region left block EDGE -15.001 EDGE EDGE -0.1 0.1 units box +region right block ${Ldelt} EDGE EDGE EDGE -0.1 0.1 units box +region right block 15.001 EDGE EDGE EDGE -0.1 0.1 units box +region pipe block -${Ldelt} ${Ldelt} -${dDelt} ${dDelt} -0.1 0.1 units box +region pipe block -15.001 ${Ldelt} -${dDelt} ${dDelt} -0.1 0.1 units box +region pipe block -15.001 15.001 -${dDelt} ${dDelt} -0.1 0.1 units box +region pipe block -15.001 15.001 -9.999 ${dDelt} -0.1 0.1 units box +region pipe block -15.001 15.001 -9.999 9.999 -0.1 0.1 units box + +region bulk union 3 left pipe right +create_atoms 1 region bulk +Created 2675 atoms + +group bulk type 1 +2675 atoms in group bulk +group wall type 2 +100 atoms in group wall + +#remove atoms that are too close to wall +delete_atoms overlap 0.9 bulk wall +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 72 29 1 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d/newton + bin: standard +Deleted 0 atoms, new total = 2775 + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes +neigh_modify exclude group wall wall + +velocity bulk create $T 78915 dist gaussian rot yes mom yes loop geom +velocity bulk create 2 78915 dist gaussian rot yes mom yes loop geom + +##################################################################### +#set up PUT +#see Evans and Morriss, Phys. Rev. Lett. 56(20) 1986, p. 2172 + +#average number of particles per box, Evans and Morriss used 2.0 +variable NperBox equal 8.0 + +#calculate box sizes +variable boxSide equal sqrt(${NperBox}/${dens}) +variable boxSide equal sqrt(8/${dens}) +variable boxSide equal sqrt(8/0.8) +variable nX equal round(lx/${boxSide}) +variable nX equal round(lx/3.16227766016838) +variable nY equal round(ly/${boxSide}) +variable nY equal round(ly/3.16227766016838) +variable dX equal lx/${nX} +variable dX equal lx/32 +variable dY equal ly/${nY} +variable dY equal ly/13 + +#temperature of fluid (excluding wall) +compute myT bulk temp + +#profile-unbiased temperature of fluid +compute myTp bulk temp/profile 1 1 0 xy ${nX} ${nY} +compute myTp bulk temp/profile 1 1 0 xy 32 ${nY} +compute myTp bulk temp/profile 1 1 0 xy 32 13 + +#thermo setup +thermo ${thermo_rate} +thermo 10 +thermo_style custom step c_myT c_myTp etotal press + +#dump initial configuration +# dump 55 all custom 1 all.init.lammpstrj id type x y z vx vy vz +# dump 56 wall custom 1 wall.init.lammpstrj id type x y z +# dump_modify 55 sort id +# dump_modify 56 sort id +run 0 +WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 72 29 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.103 | 3.103 | 3.103 Mbytes +Step c_myT c_myTp TotEng Press + 0 2 2.0555109 0.77892922 7.3417096 +Loop time of 9.53674e-07 on 1 procs for 0 steps with 2775 atoms + +314.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 9.537e-07 | | |100.00 + +Nlocal: 2775 ave 2775 max 2775 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 510 ave 510 max 510 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 26406 ave 26406 max 26406 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 26406 +Ave neighs/atom = 9.51568 +Neighbor list builds = 0 +Dangerous builds = 0 +# undump 55 +# undump 56 + +##################################################################### +#equilibrate without GD + +fix nvt bulk nvt temp $T $T ${tdamp} +fix nvt bulk nvt temp 2 $T ${tdamp} +fix nvt bulk nvt temp 2 2 ${tdamp} +fix nvt bulk nvt temp 2 2 0.1 +fix_modify nvt temp myTp +WARNING: Temperature for fix modify is not for group all (../fix_nh.cpp:1395) +fix 2 bulk enforce2d + +run ${equil} +run 1000 +Per MPI rank memory allocation (min/avg/max) = 3.166 | 3.166 | 3.166 Mbytes +Step c_myT c_myTp TotEng Press + 0 2 2.0555109 0.77892922 7.3417096 + 10 1.9173594 1.9390034 0.77876976 7.6702228 + 20 1.7033394 1.6974676 0.77977799 8.5614784 + 30 1.5026161 1.4723993 0.78456655 9.4308258 + 40 1.4880481 1.4591602 0.79486693 9.6134304 + 50 1.6192437 1.6150635 0.81109069 9.2592835 + 60 1.7404087 1.7583444 0.82955456 8.952392 + 70 1.7757591 1.8006606 0.8452778 8.9717917 + 80 1.7573847 1.7813629 0.85769389 9.1936368 + 90 1.7491183 1.7726908 0.86882429 9.3712357 + 100 1.7798944 1.8079583 0.88029084 9.3871755 + 110 1.8440582 1.8793133 0.89259397 9.2582848 + 120 1.9191606 1.9673434 0.90533438 9.0680574 + 130 1.9883299 2.0484299 0.91755461 8.88117 + 140 2.0463366 2.1111872 0.92818114 8.7184178 + 150 2.0953769 2.167849 0.93639789 8.5713408 + 160 2.1442147 2.2216228 0.94145082 8.4082835 + 170 2.1797848 2.2631458 0.94246877 8.2767903 + 180 2.1863476 2.2700986 0.93873326 8.2311689 + 190 2.1832866 2.2710551 0.93003012 8.1959062 + 200 2.1937154 2.2868403 0.91642537 8.0842007 + 210 2.2022708 2.2915142 0.89824533 7.9575312 + 220 2.1884715 2.2770564 0.87677613 7.9000591 + 230 2.1671124 2.2496063 0.85409501 7.8673156 + 240 2.1560417 2.2379998 0.83167878 7.8003228 + 250 2.1421449 2.2240624 0.81004723 7.7491508 + 260 2.1172164 2.1971044 0.78931978 7.7457415 + 270 2.0856847 2.1672998 0.76956352 7.7719788 + 280 2.0670685 2.1449303 0.75073364 7.7524614 + 290 2.0639481 2.1428374 0.73258016 7.6727716 + 300 2.055776 2.1361719 0.7147669 7.6095248 + 310 2.038425 2.1209353 0.69722853 7.5797085 + 320 2.0203023 2.1066031 0.68006634 7.5521081 + 330 2.0118478 2.1039797 0.66330302 7.4877535 + 340 2.0159442 2.1096258 0.64673694 7.3761703 + 350 2.0166408 2.1075061 0.63020017 7.2788 + 360 2.0059407 2.0806316 0.61387618 7.2263941 + 370 1.9964281 2.0642074 0.59814148 7.1728041 + 380 1.9918446 2.0567527 0.58303017 7.101597 + 390 1.992835 2.0548138 0.56852431 7.0084774 + 400 2.0012934 2.0615016 0.55438401 6.8865948 + 410 2.0084291 2.073418 0.54034073 6.7697478 + 420 2.007464 2.0786717 0.52617041 6.6849032 + 430 1.9983712 2.0704366 0.51188183 6.6323103 + 440 1.9884651 2.0588515 0.49765394 6.5868356 + 450 1.982221 2.0467396 0.4837102 6.5311681 + 460 1.9738673 2.031238 0.47021649 6.4882783 + 470 1.9574246 2.0060447 0.45740021 6.4814923 + 480 1.9361065 1.9734507 0.44557947 6.4995199 + 490 1.9251024 1.9562469 0.43506067 6.4858343 + 500 1.9279545 1.9572145 0.42577835 6.4274765 + 510 1.9267504 1.9570246 0.41755013 6.3927027 + 520 1.9093405 1.9393872 0.41031829 6.4281888 + 530 1.8820555 1.9060756 0.40432569 6.5099401 + 540 1.86537 1.8912682 0.3999087 6.55843 + 550 1.8694252 1.9043192 0.39717519 6.5337875 + 560 1.8835224 1.9294105 0.39589322 6.4760141 + 570 1.8898719 1.9462433 0.39573596 6.4520041 + 580 1.8887698 1.9472764 0.39649878 6.4602989 + 590 1.8945125 1.9550624 0.39810844 6.4470226 + 600 1.9106571 1.9735939 0.40045321 6.3971026 + 610 1.9273243 1.98509 0.40330026 6.3474421 + 620 1.9351802 1.9888986 0.4064498 6.3340566 + 630 1.9337889 1.9846794 0.40981479 6.3610556 + 640 1.9257018 1.9757153 0.4134641 6.4184721 + 650 1.9204429 1.9718256 0.41750942 6.4679594 + 660 1.9220449 1.9701963 0.42202455 6.4919724 + 670 1.9230578 1.9707406 0.4270412 6.5178484 + 680 1.9204554 1.9740485 0.43255127 6.5572507 + 690 1.9201811 1.9762854 0.43847123 6.5869126 + 700 1.9271511 1.9867455 0.44474356 6.5882669 + 710 1.9418851 2.0042477 0.45120727 6.558573 + 720 1.9544547 2.0186724 0.4576061 6.5338329 + 730 1.9687971 2.0326169 0.46367507 6.4988775 + 740 1.9830308 2.0466267 0.46920367 6.4618136 + 750 1.9936981 2.0526606 0.47397868 6.4367349 + 760 2.0008431 2.0535449 0.47786748 6.4249001 + 770 1.9982133 2.0483219 0.48085757 6.4504786 + 780 1.9841544 2.0311693 0.48306488 6.5200512 + 790 1.9683122 2.0158738 0.48475632 6.5959263 + 800 1.9604618 2.003224 0.48619405 6.6392559 + 810 1.9629155 2.0075077 0.48756075 6.6406486 + 820 1.9683056 2.0110554 0.48883443 6.6269424 + 830 1.975409 2.0189161 0.48995399 6.6030215 + 840 1.9897264 2.035016 0.4907852 6.5485575 + 850 2.0094338 2.0555358 0.49104505 6.4719926 + 860 2.0217589 2.0643603 0.49040437 6.4233305 + 870 2.0147718 2.0641627 0.48866908 6.4491964 + 880 1.9883859 2.0324092 0.48592007 6.5488061 + 890 1.9625853 2.0028776 0.48263002 6.6452734 + 900 1.9520401 1.9889124 0.47925524 6.6808078 + 910 1.9559583 1.9952984 0.47597346 6.6573059 + 920 1.9657244 2.0083503 0.47268726 6.6073704 + 930 1.969288 2.0152339 0.4692054 6.5780416 + 940 1.9652206 2.0116384 0.4654438 6.5769812 + 950 1.9567495 1.9960693 0.46147541 6.5942022 + 960 1.9418452 1.980858 0.45753557 6.6369454 + 970 1.9247196 1.9585585 0.45390337 6.6888821 + 980 1.9128262 1.9481721 0.45090045 6.7198221 + 990 1.9167211 1.9451096 0.44869731 6.6912394 + 1000 1.935529 1.9662384 0.44728238 6.6079829 +Loop time of 1.307 on 1 procs for 1000 steps with 2775 atoms + +Performance: 66105.601 tau/day, 765.111 timesteps/s +98.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.7676 | 0.7676 | 0.7676 | 0.0 | 58.73 +Neigh | 0.088947 | 0.088947 | 0.088947 | 0.0 | 6.81 +Comm | 0.0094135 | 0.0094135 | 0.0094135 | 0.0 | 0.72 +Output | 0.019547 | 0.019547 | 0.019547 | 0.0 | 1.50 +Modify | 0.39755 | 0.39755 | 0.39755 | 0.0 | 30.42 +Other | | 0.02394 | | | 1.83 + +Nlocal: 2775 ave 2775 max 2775 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 527 ave 527 max 527 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 24332 ave 24332 max 24332 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 24332 +Ave neighs/atom = 8.76829 +Neighbor list builds = 38 +Dangerous builds = 0 + +##################################################################### +#initialize the COM velocity and run to achieve steady-state + +#calculate velocity to add: V=J/rho_total +variable Vadd equal $J*lx*ly/count(bulk) +variable Vadd equal 0.1*lx*ly/count(bulk) + +#first remove any COM velocity, then add back the streaming velocity +velocity bulk zero linear +velocity bulk set ${Vadd} 0.0 0.0 units box sum yes mom no +velocity bulk set 0.149532710280374 0.0 0.0 units box sum yes mom no + +fix GD bulk flow/gauss 1 0 0 #energy yes +#fix_modify GD energy yes + +run ${stabil} +run 1000 +Per MPI rank memory allocation (min/avg/max) = 3.166 | 3.166 | 3.166 Mbytes +Step c_myT c_myTp TotEng Press + 1000 1.9466974 1.9662384 0.45804438 6.615449 + 1010 1.9605467 1.9815754 0.45717241 6.5545496 + 1020 1.9560139 1.9823875 0.45660431 6.5672421 + 1030 1.9348326 1.9691606 0.45633148 6.6463667 + 1040 1.9167809 1.9449522 0.45657707 6.7139486 + 1050 1.9193541 1.943342 0.45767968 6.7014054 + 1060 1.9410751 1.9720491 0.45967742 6.6150379 + 1070 1.9658493 1.9964883 0.46221539 6.5178418 + 1080 1.9767205 2.0074304 0.46491236 6.4768594 + 1090 1.9714544 2.0003054 0.46759126 6.5026957 + 1100 1.9647035 1.9927455 0.4703109 6.5400181 + 1110 1.9657667 1.9959656 0.47317481 6.5519094 + 1120 1.9706062 1.9980802 0.476185 6.5512675 + 1130 1.9747655 2.0062292 0.47932281 6.554091 + 1140 1.9761245 2.0075076 0.48248327 6.5670381 + 1150 1.9744197 2.0073027 0.48562483 6.5914441 + 1160 1.9722698 2.0046687 0.48874207 6.6165575 + 1170 1.9692145 2.0013845 0.49187442 6.6438115 + 1180 1.9665609 1.9970724 0.49508053 6.6693821 + 1190 1.9625031 1.9908427 0.49843816 6.7002606 + 1200 1.960528 1.993084 0.50203044 6.7237076 + 1210 1.9649156 1.9981485 0.50587066 6.7217755 + 1220 1.9788059 2.0134511 0.50987442 6.6833452 + 1230 1.9952283 2.0343101 0.51379781 6.6340278 + 1240 2.0039391 2.0494196 0.51730872 6.6129751 + 1250 2.0019006 2.0526773 0.52014603 6.6320217 + 1260 1.9974025 2.0528914 0.52221385 6.6601786 + 1270 1.9953949 2.0561121 0.5234754 6.6796142 + 1280 1.9893864 2.0470375 0.5238632 6.7140134 + 1290 1.9694951 2.019253 0.5235093 6.798442 + 1300 1.9473901 1.9965919 0.52280384 6.8863369 + 1310 1.9511151 2.006161 0.52203882 6.8700917 + 1320 1.979341 2.0388959 0.52106938 6.7529595 + 1330 2.0073235 2.0720045 0.51935291 6.6297731 + 1340 2.0202482 2.0841419 0.51624273 6.55803 + 1350 2.0177489 2.0669046 0.51142591 6.5401753 + 1360 2.0069274 2.04717 0.50505824 6.5506533 + 1370 1.994854 2.0311383 0.49743042 6.5633001 + 1380 1.9793176 2.0077184 0.48890503 6.5859072 + 1390 1.9580907 1.9839831 0.48004316 6.6288992 + 1400 1.9415542 1.9594192 0.47143599 6.6534105 + 1410 1.9405188 1.9591825 0.46353105 6.620549 + 1420 1.9504784 1.9730647 0.45640199 6.5471784 + 1430 1.9594158 1.9819854 0.44995052 6.4802874 + 1440 1.9615108 1.9863792 0.44406411 6.44391 + 1450 1.9544127 1.9806249 0.43873409 6.4484818 + 1460 1.9384927 1.9614953 0.43408605 6.4905259 + 1470 1.9214711 1.9425515 0.43035972 6.5390434 + 1480 1.9170761 1.9300809 0.42775046 6.5409502 + 1490 1.9242904 1.9385731 0.42631007 6.5005057 + 1500 1.9307133 1.9446119 0.4258836 6.4660754 + 1510 1.9303576 1.9435389 0.42633976 6.4616415 + 1520 1.9248382 1.9408306 0.42765441 6.4832059 + 1530 1.9120794 1.9278123 0.42986958 6.5380951 + 1540 1.899122 1.9125029 0.4331459 6.5987181 + 1550 1.9030956 1.9187821 0.43765067 6.6012019 + 1560 1.9182961 1.9453782 0.44330842 6.5674222 + 1570 1.9272863 1.9613129 0.44971962 6.5619794 + 1580 1.931679 1.9698134 0.45643436 6.5780809 + 1590 1.9336692 1.9728684 0.46314752 6.6035675 + 1600 1.938895 1.9823104 0.46964519 6.6138411 + 1610 1.9510838 1.9937914 0.47568807 6.5916989 + 1620 1.9685387 2.0087314 0.48102339 6.5424432 + 1630 1.9894416 2.0295715 0.48539861 6.4757743 + 1640 1.9982699 2.0426949 0.48860411 6.4512418 + 1650 1.9901677 2.0363837 0.49062424 6.4879985 + 1660 1.9814216 2.0291326 0.49172203 6.5248034 + 1670 1.9812111 2.0293629 0.49218297 6.5253876 + 1680 1.9903906 2.0408376 0.49211747 6.4852787 + 1690 2.0015983 2.0538843 0.4914581 6.4325081 + 1700 2.009727 2.0503407 0.49011163 6.3878577 + 1710 2.0167822 2.0531002 0.4881688 6.3477054 + 1720 2.0189021 2.0445033 0.48564798 6.3273063 + 1730 2.0129713 2.0354734 0.48270666 6.3385541 + 1740 2.0048763 2.0199836 0.47950943 6.3587586 + 1750 1.9994843 2.0085942 0.47624908 6.3694119 + 1760 1.9940025 2.0072098 0.47305283 6.3816295 + 1770 1.9817431 1.9974066 0.46994486 6.4224295 + 1780 1.965171 1.9805421 0.4670779 6.4832371 + 1790 1.9474078 1.9662605 0.46466823 6.5516524 + 1800 1.9286009 1.9507751 0.46292015 6.6263366 + 1810 1.9168087 1.9437961 0.46199899 6.6759834 + 1820 1.9107555 1.9306323 0.46204129 6.7029857 + 1830 1.9135569 1.930819 0.46316484 6.6949737 + 1840 1.9345342 1.9553413 0.46532704 6.6178988 + 1850 1.9630349 1.9929548 0.46822932 6.5137866 + 1860 1.9820746 2.0188839 0.47135068 6.4489028 + 1870 1.9834959 2.0217145 0.47427805 6.4552721 + 1880 1.9731564 2.0120293 0.47692755 6.5100251 + 1890 1.9653605 2.0070624 0.47943307 6.5594235 + 1900 1.9630631 2.0095488 0.48192185 6.5912876 + 1910 1.9556778 2.0035006 0.48443107 6.6437189 + 1920 1.9408788 1.9828296 0.48710124 6.7228731 + 1930 1.9292393 1.9732376 0.49025327 6.7880112 + 1940 1.9263081 1.9708942 0.49416086 6.8162477 + 1950 1.9358375 1.976323 0.49899895 6.7946964 + 1960 1.9520543 1.9936542 0.50485961 6.7467481 + 1970 1.9709064 2.0108957 0.51165586 6.6909455 + 1980 1.9940026 2.0375428 0.51918913 6.6250463 + 1990 2.0171261 2.0646948 0.52705638 6.5649879 + 2000 2.0302713 2.0802515 0.53472229 6.5470853 +Loop time of 1.34877 on 1 procs for 1000 steps with 2775 atoms + +Performance: 64058.154 tau/day, 741.414 timesteps/s +98.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.77091 | 0.77091 | 0.77091 | 0.0 | 57.16 +Neigh | 0.085835 | 0.085835 | 0.085835 | 0.0 | 6.36 +Comm | 0.0093472 | 0.0093472 | 0.0093472 | 0.0 | 0.69 +Output | 0.019047 | 0.019047 | 0.019047 | 0.0 | 1.41 +Modify | 0.43949 | 0.43949 | 0.43949 | 0.0 | 32.58 +Other | | 0.02415 | | | 1.79 + +Nlocal: 2775 ave 2775 max 2775 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 530 ave 530 max 530 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 24404 ave 24404 max 24404 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 24404 +Ave neighs/atom = 8.79423 +Neighbor list builds = 36 +Dangerous builds = 0 + +##################################################################### +#collect data + +#print the applied force and total flux to ensure conservation of Jx +variable Fapp equal f_GD[1] +compute vxBulk bulk reduce sum vx +compute vyBulk bulk reduce sum vy +variable invVol equal 1.0/(lx*ly) +variable jx equal c_vxBulk*${invVol} +variable jx equal c_vxBulk*0.00025 +variable jy equal c_vyBulk*${invVol} +variable jy equal c_vyBulk*0.00025 +variable curr_step equal step +variable p_Fapp format Fapp %.3f +variable p_jx format jx %.5g +variable p_jy format jy %.5g +fix print_vCOM all print ${dump_rate} "${curr_step} ${p_Fapp} ${p_jx} ${p_jy}" file GD.out screen no title "timestep Fapp Jx Jy" +fix print_vCOM all print 50 "${curr_step} ${p_Fapp} ${p_jx} ${p_jy}" file GD.out screen no title "timestep Fapp Jx Jy" + +#compute IK1 pressure profile +#see Todd, Evans, and Davis, Phys. Rev. E 52(2) 1995, p. 1627 +#use profile-unbiased temperature to remove the streaming velocity +#from the kinetic part of the pressure +compute spa bulk stress/atom myTp + +#for the pressure profile, use the same grid as the PUT +compute chunkX bulk chunk/atom bin/1d x lower ${dX} units box +compute chunkX bulk chunk/atom bin/1d x lower 3.125 units box + +#output pressure profile and other profiles +#the pressure profile is (-1/2V)*(c_spa[1] + c_spa[2]), where +#V is the volume of a slice +fix profiles bulk ave/chunk 1 1 ${dump_rate} chunkX vx density/mass c_spa[1] c_spa[2] file x_profiles ave running overwrite +fix profiles bulk ave/chunk 1 1 50 chunkX vx density/mass c_spa[1] c_spa[2] file x_profiles ave running overwrite + +#compute velocity profile across the pipe with a finer grid +variable dYnew equal ${dY}/10 +variable dYnew equal 3.07692307692308/10 +compute chunkY bulk chunk/atom bin/1d y center ${dYnew} units box region pipe +compute chunkY bulk chunk/atom bin/1d y center 0.307692307692308 units box region pipe +fix velYprof bulk ave/chunk 1 1 ${dump_rate} chunkY vx file Vy_profile ave running overwrite +fix velYprof bulk ave/chunk 1 1 50 chunkY vx file Vy_profile ave running overwrite + +#full trajectory +# dump 7 bulk custom ${dump_rate} bulk.lammpstrj id type x y z +# dump_modify 7 sort id + +run ${run} +run 2000 +Per MPI rank memory allocation (min/avg/max) = 5.174 | 5.174 | 5.174 Mbytes +Step c_myT c_myTp TotEng Press + 2000 2.0302713 2.0802515 0.53472229 6.5470853 + 2010 2.0303419 2.0806129 0.54177821 6.5808527 + 2020 2.0245167 2.0792991 0.54803523 6.6381758 + 2030 2.0169072 2.065404 0.55345227 6.7008962 + 2040 2.0052526 2.0513817 0.55818432 6.7755868 + 2050 1.9953625 2.0366564 0.56245299 6.8382569 + 2060 2.0003667 2.0462109 0.56649798 6.8390557 + 2070 2.0238288 2.0834553 0.57023651 6.7637821 + 2080 2.045765 2.1173867 0.5730944 6.6861321 + 2090 2.0563925 2.1370313 0.57430831 6.6422581 + 2100 2.0620437 2.1480293 0.57319824 6.6080678 + 2110 2.0584437 2.1473173 0.56913597 6.5969671 + 2120 2.0532825 2.1393006 0.56154606 6.5799417 + 2130 2.0450143 2.1234905 0.55009479 6.5616931 + 2140 2.0229537 2.1004507 0.53511912 6.5854627 + 2150 1.9832556 2.0554119 0.51812599 6.6700591 + 2160 1.9444027 2.0110758 0.50163049 6.7534263 + 2170 1.9267473 1.9904528 0.48759542 6.76469 + 2180 1.9262232 1.9809353 0.47662199 6.7188048 + 2190 1.9359331 1.9854626 0.46836289 6.6406985 + 2200 1.9530728 1.9971865 0.4620366 6.5409943 + 2210 1.9657099 2.0056761 0.45692542 6.4639397 + 2220 1.9661008 2.0046161 0.45253504 6.4388081 + 2230 1.9574696 1.9947839 0.44864257 6.4528687 + 2240 1.9522284 1.9922663 0.44518111 6.4584458 + 2250 1.9518203 1.9950044 0.44206844 6.4491722 + 2260 1.9527908 1.9989603 0.4391804 6.4377912 + 2270 1.9452231 1.9932538 0.43643529 6.4607516 + 2280 1.9249341 1.9759145 0.43392742 6.5320897 + 2290 1.9087464 1.960985 0.43186869 6.5875176 + 2300 1.9103289 1.964731 0.43039882 6.5765021 + 2310 1.9182062 1.9783814 0.4294628 6.5434488 + 2320 1.9204281 1.9796609 0.42889381 6.5351629 + 2330 1.916279 1.9720659 0.42866391 6.5562619 + 2340 1.9062866 1.9587628 0.42890166 6.6033936 + 2350 1.9024117 1.9566812 0.42979475 6.6297969 + 2360 1.908153 1.960687 0.43141898 6.6215148 + 2370 1.9115944 1.9663337 0.43376668 6.6236491 + 2380 1.9086193 1.9637867 0.4367911 6.6529568 + 2390 1.9039907 1.9610268 0.44053991 6.6926343 + 2400 1.9034944 1.9609406 0.44508818 6.7193441 + 2410 1.9151521 1.9753641 0.4504458 6.7015957 + 2420 1.9314517 1.9925924 0.45644382 6.6669864 + 2430 1.9433933 2.0062001 0.46277215 6.6481527 + 2440 1.9504631 2.0087015 0.46917209 6.6475757 + 2450 1.9550092 2.0094957 0.47550077 6.6556459 + 2460 1.9609689 2.0147997 0.48170141 6.6568282 + 2470 1.9730726 2.0328127 0.48763131 6.6337545 + 2480 1.9838562 2.0466643 0.49303443 6.6143423 + 2490 1.9862031 2.0473388 0.49767532 6.6245587 + 2500 1.9817565 2.0455432 0.50152131 6.6573893 + 2510 1.9785788 2.0423176 0.50460561 6.6808042 + 2520 1.9823006 2.0505106 0.50696374 6.6726698 + 2530 1.9907178 2.0553736 0.50852885 6.6402082 + 2540 2.0005205 2.0690408 0.50919421 6.5966469 + 2550 2.0079727 2.0809816 0.50872954 6.5568419 + 2560 2.0133128 2.096271 0.50682742 6.5199915 + 2570 2.0141298 2.0990846 0.50314491 6.4951991 + 2580 2.0048768 2.0874319 0.49750096 6.5025454 + 2590 1.9876498 2.0638834 0.4900201 6.5333038 + 2600 1.9720479 2.0474479 0.48105263 6.5527157 + 2610 1.9596324 2.0355764 0.4710001 6.5547867 + 2620 1.9439039 2.0106405 0.46046644 6.5646889 + 2630 1.9321714 1.9924346 0.45021207 6.5589454 + 2640 1.9349378 1.9923889 0.44082833 6.5012762 + 2650 1.9448459 2.0069955 0.43251999 6.4228945 + 2660 1.9446852 2.0050346 0.42525857 6.3921645 + 2670 1.9325594 1.9884937 0.41913362 6.4169726 + 2680 1.9121687 1.9606084 0.41434428 6.4821267 + 2690 1.8923613 1.9339385 0.41105831 6.5517615 + 2700 1.8807238 1.9191801 0.40933203 6.5949447 + 2710 1.8797367 1.918758 0.40906826 6.6001309 + 2720 1.8852961 1.9225996 0.41005611 6.58191 + 2730 1.8937478 1.9357751 0.41204348 6.5541946 + 2740 1.9019279 1.9449374 0.41476104 6.5278575 + 2750 1.9134396 1.9614415 0.41800066 6.4890769 + 2760 1.9339551 1.9913779 0.42150554 6.4159805 + 2770 1.9597826 2.0220988 0.42487614 6.3232273 + 2780 1.9753466 2.0414907 0.42771704 6.2715489 + 2790 1.9720423 2.0402016 0.42976012 6.2949288 + 2800 1.9512893 2.0172711 0.43109201 6.3878056 + 2810 1.9232302 1.9870212 0.4320928 6.5101822 + 2820 1.9026913 1.959286 0.43326424 6.6024967 + 2830 1.9033802 1.9621601 0.43500785 6.6114274 + 2840 1.9214292 1.9833838 0.43733454 6.5508757 + 2850 1.9440563 2.0087358 0.43995473 6.4713496 + 2860 1.9589136 2.0211107 0.44250821 6.4232961 + 2870 1.9588429 2.022232 0.44477492 6.4355861 + 2880 1.9456751 2.0009513 0.44676532 6.5021746 + 2890 1.9269155 1.9782929 0.44877858 6.5926531 + 2900 1.9125262 1.9554653 0.45121196 6.6657808 + 2910 1.9187855 1.9572583 0.45438665 6.6589954 + 2920 1.9416112 1.9784518 0.45839212 6.5888253 + 2930 1.9613579 1.9975032 0.46305788 6.5317424 + 2940 1.9711529 2.0102501 0.46812715 6.5148943 + 2950 1.9707865 2.0133283 0.47345305 6.5389543 + 2960 1.9732526 2.0170219 0.47898306 6.5537092 + 2970 1.9871126 2.0282309 0.48465048 6.5273492 + 2980 1.9953449 2.0404164 0.49032615 6.5227325 + 2990 1.9909136 2.037246 0.49581423 6.5664662 + 3000 1.9872474 2.0307896 0.5011051 6.6060698 + 3010 1.9944885 2.0457308 0.5062755 6.6031811 + 3020 2.0103461 2.0599491 0.51116655 6.5654871 + 3030 2.0240275 2.077342 0.5154921 6.5358852 + 3040 2.0205953 2.0704954 0.51898871 6.5708937 + 3050 2.0032184 2.0463036 0.52167438 6.657741 + 3060 1.9889341 2.0265284 0.52385964 6.7329171 + 3070 1.9795143 2.0201081 0.52588914 6.7881407 + 3080 1.9713362 2.0123964 0.52797238 6.8362858 + 3090 1.9692592 2.0106467 0.53025538 6.8616268 + 3100 1.9722487 2.0259566 0.53277635 6.8689898 + 3110 1.9703322 2.0314028 0.53541462 6.895271 + 3120 1.9594359 2.0217586 0.53808512 6.954362 + 3130 1.9524729 2.0148628 0.5409094 6.9965233 + 3140 1.9630381 2.0260807 0.54400259 6.968082 + 3150 1.9902598 2.0549364 0.54720142 6.8698796 + 3160 2.029715 2.0923999 0.54995378 6.7193678 + 3170 2.0581544 2.1137995 0.55150021 6.6053728 + 3180 2.0590739 2.1156535 0.55123668 6.5919337 + 3190 2.0400682 2.0904721 0.54894762 6.6505757 + 3200 2.0211594 2.0682597 0.54484887 6.7046468 + 3210 2.012712 2.0573114 0.53922056 6.7130909 + 3220 2.0102377 2.0554701 0.53219251 6.6919068 + 3230 2.0017671 2.0505068 0.52386898 6.6867054 + 3240 1.9854941 2.0308454 0.51458791 6.7051085 + 3250 1.9767009 2.0187664 0.50486784 6.6916859 + 3260 1.9771733 2.0186148 0.49510721 6.6424305 + 3270 1.974003 2.0136039 0.48556818 6.6078903 + 3280 1.9627665 1.9989122 0.47654147 6.6067904 + 3290 1.9491247 1.9826247 0.46834865 6.6186709 + 3300 1.9414093 1.9724941 0.4612122 6.6119543 + 3310 1.9433901 1.9715482 0.45518879 6.570612 + 3320 1.9518837 1.9872717 0.45010165 6.5057947 + 3330 1.9603874 1.9957995 0.44566728 6.4428221 + 3340 1.9615962 1.9945224 0.44167201 6.4099339 + 3350 1.955918 1.9882866 0.4380303 6.4070811 + 3360 1.9463445 1.9763654 0.43480086 6.4241178 + 3370 1.9411187 1.9683081 0.4320639 6.4296577 + 3380 1.9407224 1.9580074 0.42991627 6.4210217 + 3390 1.9402479 1.9530447 0.42850635 6.4170536 + 3400 1.9451337 1.9555771 0.42787382 6.3990336 + 3410 1.9475586 1.9612432 0.42797178 6.3953251 + 3420 1.9434927 1.960532 0.4286887 6.4210681 + 3430 1.9339054 1.9516935 0.43003682 6.4707071 + 3440 1.9234014 1.9464343 0.43214965 6.5248205 + 3450 1.9191846 1.9444777 0.43516361 6.5558451 + 3460 1.923218 1.9594606 0.43915611 6.5549213 + 3470 1.9328953 1.9792053 0.44397878 6.5327637 + 3480 1.9466227 1.9997841 0.44940599 6.4954965 + 3490 1.9672374 2.0323219 0.45511091 6.4358811 + 3500 1.9799622 2.0479841 0.46061029 6.4100217 + 3510 1.97942 2.0493411 0.46551964 6.4368108 + 3520 1.9725674 2.0389602 0.46976379 6.4892049 + 3530 1.9716429 2.0389798 0.47344292 6.5200899 + 3540 1.9789254 2.0486162 0.47659268 6.5198212 + 3550 1.9872455 2.0577517 0.47908145 6.5144586 + 3560 1.9808834 2.0545963 0.48076562 6.5633282 + 3570 1.9637165 2.0335394 0.4816783 6.6519124 + 3580 1.9407948 2.0067763 0.48212406 6.7605224 + 3590 1.9226532 1.9825887 0.482523 6.8486041 + 3600 1.9135067 1.9700999 0.48328349 6.8977859 + 3610 1.9157516 1.9720028 0.48470695 6.8977759 + 3620 1.9328644 2.0001154 0.48688778 6.8361569 + 3630 1.9568208 2.0243053 0.48963934 6.7442107 + 3640 1.9824587 2.0569223 0.49259174 6.6452535 + 3650 1.9934906 2.0686357 0.49529039 6.6020218 + 3660 1.9996281 2.0747054 0.49732231 6.5808905 + 3670 2.0038801 2.0772777 0.49838834 6.5691351 + 3680 1.9941342 2.0712365 0.49826732 6.6088108 + 3690 1.9762631 2.0486045 0.49689109 6.6739003 + 3700 1.9667284 2.034939 0.49438991 6.7010266 + 3710 1.9615089 2.0168112 0.49093736 6.7040385 + 3720 1.9613068 2.014749 0.48673789 6.6813041 + 3730 1.9731234 2.0290151 0.48175562 6.6096756 + 3740 1.9829764 2.0461907 0.47575174 6.5424752 + 3750 1.9792839 2.0454423 0.4685271 6.5237752 + 3760 1.9599692 2.0287015 0.46022485 6.5616271 + 3770 1.935975 2.0000948 0.45138017 6.6136471 + 3780 1.9236713 1.9834802 0.44262437 6.6187463 + 3790 1.9268004 1.9875324 0.43430113 6.5632772 + 3800 1.932601 1.9872595 0.42649564 6.4984765 + 3810 1.9322506 1.9814946 0.41928856 6.4617054 + 3820 1.9245737 1.9712821 0.4128224 6.461378 + 3830 1.9148568 1.9555602 0.40721003 6.4774474 + 3840 1.9049961 1.9457058 0.4026118 6.5029211 + 3850 1.8915137 1.9265199 0.39914962 6.5483592 + 3860 1.8784768 1.9058055 0.39700153 6.5962113 + 3870 1.8755236 1.9045158 0.39632769 6.6079033 + 3880 1.8841415 1.9140314 0.39710038 6.5777071 + 3890 1.8958027 1.9331148 0.39918951 6.5359786 + 3900 1.9064085 1.948805 0.40238576 6.4998591 + 3910 1.9185092 1.9675732 0.40647523 6.4610682 + 3920 1.9342595 1.9933225 0.41115392 6.4122308 + 3930 1.9482664 2.007614 0.41603495 6.373684 + 3940 1.9557759 2.0161573 0.42084462 6.3636707 + 3950 1.9573687 2.016612 0.42540421 6.3804123 + 3960 1.9486354 1.9998027 0.42974612 6.4404943 + 3970 1.936214 1.980721 0.43412037 6.5176787 + 3980 1.9274292 1.9595259 0.43885103 6.5846211 + 3990 1.9233082 1.953436 0.44425085 6.6354275 + 4000 1.9289165 1.9522097 0.45042645 6.6513836 +Loop time of 2.49114 on 1 procs for 2000 steps with 2775 atoms + +Performance: 69365.902 tau/day, 802.846 timesteps/s +98.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.4257 | 1.4257 | 1.4257 | 0.0 | 57.23 +Neigh | 0.15501 | 0.15501 | 0.15501 | 0.0 | 6.22 +Comm | 0.017206 | 0.017206 | 0.017206 | 0.0 | 0.69 +Output | 0.034183 | 0.034183 | 0.034183 | 0.0 | 1.37 +Modify | 0.81531 | 0.81531 | 0.81531 | 0.0 | 32.73 +Other | | 0.04374 | | | 1.76 + +Nlocal: 2775 ave 2775 max 2775 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 517 ave 517 max 517 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 24366 ave 24366 max 24366 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 24366 +Ave neighs/atom = 8.78054 +Neighbor list builds = 72 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:05 diff --git a/examples/USER/flow_gauss/log.6Jul17.GD.g++.4 b/examples/USER/flow_gauss/log.6Jul17.GD.g++.4 new file mode 100644 index 0000000000..6171c0da5c --- /dev/null +++ b/examples/USER/flow_gauss/log.6Jul17.GD.g++.4 @@ -0,0 +1,909 @@ +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task +#LAMMPS input script +#in.GD +#see README for details + +############################################################################### +#initialize variables +clear + using 1 OpenMP thread(s) per MPI task + +#frequency for outputting info (timesteps) +variable dump_rate equal 50 +variable thermo_rate equal 10 + +#equilibration time (timesteps) +variable equil equal 1000 + +#stabilization time (timesteps to reach steady-state) +variable stabil equal 1000 + +#data collection time (timesteps) +variable run equal 2000 + +#length of pipe +variable L equal 30 + +#width of pipe +variable d equal 20 + +#flux (mass/sigma*tau) +variable J equal 0.1 + +#simulation box dimensions +variable Lx equal 100 +variable Ly equal 40 + +#bulk fluid density +variable dens equal 0.8 + +#lattice spacing for wall atoms +variable aWall equal 1.0 #1.7472 + +#timestep +variable ts equal 0.001 + +#temperature +variable T equal 2.0 + +#thermostat damping constant +variable tdamp equal ${ts}*100 +variable tdamp equal 0.001*100 + +units lj +dimension 2 +atom_style atomic + + +############################################################################### +#create box + +#create lattice with the spacing aWall +variable rhoWall equal ${aWall}^(-2) +variable rhoWall equal 1^(-2) +lattice sq ${rhoWall} +lattice sq 1 +Lattice spacing in x,y,z = 1 1 1 + +#modify input dimensions to be multiples of aWall +variable L1 equal round($L/${aWall})*${aWall} +variable L1 equal round(30/${aWall})*${aWall} +variable L1 equal round(30/1)*${aWall} +variable L1 equal round(30/1)*1 +variable d1 equal round($d/${aWall})*${aWall} +variable d1 equal round(20/${aWall})*${aWall} +variable d1 equal round(20/1)*${aWall} +variable d1 equal round(20/1)*1 +variable Ly1 equal round(${Ly}/${aWall})*${aWall} +variable Ly1 equal round(40/${aWall})*${aWall} +variable Ly1 equal round(40/1)*${aWall} +variable Ly1 equal round(40/1)*1 +variable Lx1 equal round(${Lx}/${aWall})*${aWall} +variable Lx1 equal round(100/${aWall})*${aWall} +variable Lx1 equal round(100/1)*${aWall} +variable Lx1 equal round(100/1)*1 + +#create simulation box +variable lx2 equal ${Lx1}/2 +variable lx2 equal 100/2 +variable ly2 equal ${Ly1}/2 +variable ly2 equal 40/2 +region simbox block -${lx2} ${lx2} -${ly2} ${ly2} 0 0.1 units box +region simbox block -50 ${lx2} -${ly2} ${ly2} 0 0.1 units box +region simbox block -50 50 -${ly2} ${ly2} 0 0.1 units box +region simbox block -50 50 -20 ${ly2} 0 0.1 units box +region simbox block -50 50 -20 20 0 0.1 units box +create_box 2 simbox +Created orthogonal box = (-50 -20 0) to (50 20 0.1) + 4 by 1 by 1 MPI processor grid + +##################################################################### +#set up potential + +mass 1 1.0 #fluid atoms +mass 2 1.0 #wall atoms + +pair_style lj/cut 2.5 +pair_modify shift yes +pair_coeff 1 1 1.0 1.0 2.5 +pair_coeff 1 2 1.0 1.0 1.12246 +pair_coeff 2 2 0.0 0.0 + +neigh_modify exclude type 2 2 + +timestep ${ts} +timestep 0.001 + +##################################################################### +#create atoms + +#create wall atoms everywhere +create_atoms 2 box +Created 4000 atoms + +#define region which is "walled off" +variable dhalf equal ${d1}/2 +variable dhalf equal 20/2 +variable Lhalf equal ${L1}/2 +variable Lhalf equal 30/2 +region walltop block -${Lhalf} ${Lhalf} ${dhalf} EDGE -0.1 0.1 units box +region walltop block -15 ${Lhalf} ${dhalf} EDGE -0.1 0.1 units box +region walltop block -15 15 ${dhalf} EDGE -0.1 0.1 units box +region walltop block -15 15 10 EDGE -0.1 0.1 units box +region wallbot block -${Lhalf} ${Lhalf} EDGE -${dhalf} -0.1 0.1 units box +region wallbot block -15 ${Lhalf} EDGE -${dhalf} -0.1 0.1 units box +region wallbot block -15 15 EDGE -${dhalf} -0.1 0.1 units box +region wallbot block -15 15 EDGE -10 -0.1 0.1 units box +region outsidewall union 2 walltop wallbot side out + +#remove wall atoms outside wall region +group outside region outsidewall +3349 atoms in group outside +delete_atoms group outside +Deleted 3349 atoms, new total = 651 + +#remove wall atoms that aren't on edge of wall region +variable x1 equal ${Lhalf}-${aWall} +variable x1 equal 15-${aWall} +variable x1 equal 15-1 +variable y1 equal ${dhalf}+${aWall} +variable y1 equal 10+${aWall} +variable y1 equal 10+1 +region insideTop block -${x1} ${x1} ${y1} EDGE -0.1 0.1 units box +region insideTop block -14 ${x1} ${y1} EDGE -0.1 0.1 units box +region insideTop block -14 14 ${y1} EDGE -0.1 0.1 units box +region insideTop block -14 14 11 EDGE -0.1 0.1 units box +region insideBot block -${x1} ${x1} EDGE -${y1} -0.1 0.1 units box +region insideBot block -14 ${x1} EDGE -${y1} -0.1 0.1 units box +region insideBot block -14 14 EDGE -${y1} -0.1 0.1 units box +region insideBot block -14 14 EDGE -11 -0.1 0.1 units box +region insideWall union 2 insideTop insideBot +group insideWall region insideWall +551 atoms in group insideWall +delete_atoms group insideWall +Deleted 551 atoms, new total = 100 + +#define new lattice, to give correct fluid density +#y lattice const must be a multiple of aWall +variable atrue equal ${dens}^(-1/2) +variable atrue equal 0.8^(-1/2) +variable ay equal round(${atrue}/${aWall})*${aWall} +variable ay equal round(1.11803398874989/${aWall})*${aWall} +variable ay equal round(1.11803398874989/1)*${aWall} +variable ay equal round(1.11803398874989/1)*1 + +#choose x lattice const to give correct density +variable ax equal (${ay}*${dens})^(-1) +variable ax equal (1*${dens})^(-1) +variable ax equal (1*0.8)^(-1) + +#change Lx to be multiple of ax +variable Lx1 equal round(${Lx}/${ax})*${ax} +variable Lx1 equal round(100/${ax})*${ax} +variable Lx1 equal round(100/1.25)*${ax} +variable Lx1 equal round(100/1.25)*1.25 +variable lx2 equal ${Lx1}/2 +variable lx2 equal 100/2 +change_box all x final -${lx2} ${lx2} units box +change_box all x final -50 ${lx2} units box +change_box all x final -50 50 units box + orthogonal box = (-50 -20 0) to (50 20 0.1) + +#define new lattice +lattice custom ${dens} a1 ${ax} 0.0 0.0 a2 0.0 ${ay} 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 +lattice custom 0.8 a1 ${ax} 0.0 0.0 a2 0.0 ${ay} 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 +lattice custom 0.8 a1 1.25 0.0 0.0 a2 0.0 ${ay} 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 +lattice custom 0.8 a1 1.25 0.0 0.0 a2 0.0 1 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 +Lattice spacing in x,y,z = 1.25 1 1 + +#fill in rest of box with bulk particles +variable delta equal 0.001 +variable Ldelt equal ${Lhalf}+${delta} +variable Ldelt equal 15+${delta} +variable Ldelt equal 15+0.001 +variable dDelt equal ${dhalf}-${delta} +variable dDelt equal 10-${delta} +variable dDelt equal 10-0.001 +region left block EDGE -${Ldelt} EDGE EDGE -0.1 0.1 units box +region left block EDGE -15.001 EDGE EDGE -0.1 0.1 units box +region right block ${Ldelt} EDGE EDGE EDGE -0.1 0.1 units box +region right block 15.001 EDGE EDGE EDGE -0.1 0.1 units box +region pipe block -${Ldelt} ${Ldelt} -${dDelt} ${dDelt} -0.1 0.1 units box +region pipe block -15.001 ${Ldelt} -${dDelt} ${dDelt} -0.1 0.1 units box +region pipe block -15.001 15.001 -${dDelt} ${dDelt} -0.1 0.1 units box +region pipe block -15.001 15.001 -9.999 ${dDelt} -0.1 0.1 units box +region pipe block -15.001 15.001 -9.999 9.999 -0.1 0.1 units box + +region bulk union 3 left pipe right +create_atoms 1 region bulk +Created 2675 atoms + +group bulk type 1 +2675 atoms in group bulk +group wall type 2 +100 atoms in group wall + +#remove atoms that are too close to wall +delete_atoms overlap 0.9 bulk wall +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 72 29 1 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command delete_atoms, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/2d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d/newton + bin: standard +Deleted 0 atoms, new total = 2775 + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes +neigh_modify exclude group wall wall + +velocity bulk create $T 78915 dist gaussian rot yes mom yes loop geom +velocity bulk create 2 78915 dist gaussian rot yes mom yes loop geom + +##################################################################### +#set up PUT +#see Evans and Morriss, Phys. Rev. Lett. 56(20) 1986, p. 2172 + +#average number of particles per box, Evans and Morriss used 2.0 +variable NperBox equal 8.0 + +#calculate box sizes +variable boxSide equal sqrt(${NperBox}/${dens}) +variable boxSide equal sqrt(8/${dens}) +variable boxSide equal sqrt(8/0.8) +variable nX equal round(lx/${boxSide}) +variable nX equal round(lx/3.16227766016838) +variable nY equal round(ly/${boxSide}) +variable nY equal round(ly/3.16227766016838) +variable dX equal lx/${nX} +variable dX equal lx/32 +variable dY equal ly/${nY} +variable dY equal ly/13 + +#temperature of fluid (excluding wall) +compute myT bulk temp + +#profile-unbiased temperature of fluid +compute myTp bulk temp/profile 1 1 0 xy ${nX} ${nY} +compute myTp bulk temp/profile 1 1 0 xy 32 ${nY} +compute myTp bulk temp/profile 1 1 0 xy 32 13 + +#thermo setup +thermo ${thermo_rate} +thermo 10 +thermo_style custom step c_myT c_myTp etotal press + +#dump initial configuration +# dump 55 all custom 1 all.init.lammpstrj id type x y z vx vy vz +# dump 56 wall custom 1 wall.init.lammpstrj id type x y z +# dump_modify 55 sort id +# dump_modify 56 sort id +run 0 +WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 72 29 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/2d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.067 | 3.068 | 3.07 Mbytes +Step c_myT c_myTp TotEng Press + 0 2 2.0555109 0.77892922 7.3417096 +Loop time of 4.35114e-06 on 4 procs for 0 steps with 2775 atoms + +114.9% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 4.351e-06 | | |100.00 + +Nlocal: 693.75 ave 800 max 578 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 266.25 ave 325 max 198 min +Histogram: 1 1 0 0 0 0 0 0 0 2 +Neighs: 6601.5 ave 8000 max 5147 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 26406 +Ave neighs/atom = 9.51568 +Neighbor list builds = 0 +Dangerous builds = 0 +# undump 55 +# undump 56 + +##################################################################### +#equilibrate without GD + +fix nvt bulk nvt temp $T $T ${tdamp} +fix nvt bulk nvt temp 2 $T ${tdamp} +fix nvt bulk nvt temp 2 2 ${tdamp} +fix nvt bulk nvt temp 2 2 0.1 +fix_modify nvt temp myTp +WARNING: Temperature for fix modify is not for group all (../fix_nh.cpp:1395) +fix 2 bulk enforce2d + +run ${equil} +run 1000 +Per MPI rank memory allocation (min/avg/max) = 3.13 | 3.131 | 3.132 Mbytes +Step c_myT c_myTp TotEng Press + 0 2 2.0555109 0.77892922 7.3417096 + 10 1.9173594 1.9390034 0.77876976 7.6702228 + 20 1.7033394 1.6974676 0.77977799 8.5614784 + 30 1.5026161 1.4723993 0.78456655 9.4308258 + 40 1.4880481 1.4591602 0.79486693 9.6134304 + 50 1.6192437 1.6150635 0.81109069 9.2592835 + 60 1.7404087 1.7583444 0.82955456 8.952392 + 70 1.7757591 1.8006606 0.8452778 8.9717917 + 80 1.7573847 1.7813629 0.85769389 9.1936368 + 90 1.7491183 1.7726908 0.86882429 9.3712357 + 100 1.7798944 1.8079583 0.88029084 9.3871755 + 110 1.8440582 1.8793133 0.89259397 9.2582848 + 120 1.9191606 1.9673434 0.90533438 9.0680574 + 130 1.9883299 2.0484299 0.91755461 8.88117 + 140 2.0463366 2.1111872 0.92818114 8.7184178 + 150 2.0953769 2.167849 0.93639789 8.5713408 + 160 2.1442147 2.2216228 0.94145082 8.4082835 + 170 2.1797848 2.2631458 0.94246877 8.2767903 + 180 2.1863476 2.2700986 0.93873326 8.2311689 + 190 2.1832866 2.2710551 0.93003012 8.1959062 + 200 2.1937154 2.2868403 0.91642537 8.0842007 + 210 2.2022708 2.2915142 0.89824533 7.9575312 + 220 2.1884715 2.2770564 0.87677613 7.9000591 + 230 2.1671124 2.2496063 0.85409501 7.8673156 + 240 2.1560417 2.2379998 0.83167878 7.8003228 + 250 2.1421449 2.2240624 0.81004723 7.7491508 + 260 2.1172164 2.1971044 0.78931978 7.7457415 + 270 2.0856847 2.1672998 0.76956352 7.7719788 + 280 2.0670685 2.1449303 0.75073364 7.7524614 + 290 2.0639481 2.1428374 0.73258016 7.6727716 + 300 2.055776 2.1361719 0.7147669 7.6095248 + 310 2.038425 2.1209353 0.69722853 7.5797085 + 320 2.0203023 2.1066031 0.68006634 7.5521081 + 330 2.0118478 2.1039797 0.66330302 7.4877535 + 340 2.0159442 2.1096258 0.64673694 7.3761703 + 350 2.0166408 2.1075061 0.63020017 7.2788 + 360 2.0059407 2.0806316 0.61387618 7.2263941 + 370 1.9964281 2.0642074 0.59814148 7.1728041 + 380 1.9918446 2.0567527 0.58303017 7.101597 + 390 1.992835 2.0548138 0.56852431 7.0084774 + 400 2.0012934 2.0615016 0.55438401 6.8865948 + 410 2.0084291 2.073418 0.54034073 6.7697478 + 420 2.007464 2.0786717 0.52617041 6.6849032 + 430 1.9983712 2.0704366 0.51188183 6.6323103 + 440 1.9884651 2.0588515 0.49765394 6.5868356 + 450 1.982221 2.0467396 0.4837102 6.5311681 + 460 1.9738673 2.031238 0.47021649 6.4882783 + 470 1.9574246 2.0060447 0.45740021 6.4814923 + 480 1.9361065 1.9734507 0.44557947 6.4995199 + 490 1.9251024 1.9562469 0.43506067 6.4858343 + 500 1.9279545 1.9572145 0.42577835 6.4274765 + 510 1.9267504 1.9570246 0.41755013 6.3927027 + 520 1.9093405 1.9393872 0.41031829 6.4281888 + 530 1.8820555 1.9060756 0.40432569 6.5099401 + 540 1.86537 1.8912682 0.3999087 6.55843 + 550 1.8694252 1.9043192 0.39717519 6.5337875 + 560 1.8835224 1.9294105 0.39589322 6.4760141 + 570 1.8898719 1.9462433 0.39573596 6.4520041 + 580 1.8887698 1.9472764 0.39649878 6.4602989 + 590 1.8945125 1.9550624 0.39810844 6.4470226 + 600 1.9106571 1.9735939 0.40045321 6.3971026 + 610 1.9273243 1.98509 0.40330026 6.3474421 + 620 1.9351802 1.9888986 0.4064498 6.3340566 + 630 1.9337889 1.9846794 0.40981479 6.3610556 + 640 1.9257018 1.9757153 0.4134641 6.4184721 + 650 1.9204429 1.9718256 0.41750942 6.4679594 + 660 1.9220449 1.9701963 0.42202455 6.4919724 + 670 1.9230578 1.9707406 0.4270412 6.5178484 + 680 1.9204554 1.9740485 0.43255127 6.5572507 + 690 1.9201811 1.9762854 0.43847123 6.5869126 + 700 1.9271511 1.9867455 0.44474356 6.5882669 + 710 1.9418851 2.0042477 0.45120727 6.558573 + 720 1.9544547 2.0186724 0.4576061 6.5338329 + 730 1.9687971 2.0326169 0.46367507 6.4988775 + 740 1.9830308 2.0466267 0.46920367 6.4618136 + 750 1.9936981 2.0526606 0.47397868 6.4367349 + 760 2.0008431 2.0535449 0.47786748 6.4249001 + 770 1.9982133 2.0483219 0.48085757 6.4504786 + 780 1.9841544 2.0311693 0.48306488 6.5200512 + 790 1.9683122 2.0158738 0.48475632 6.5959263 + 800 1.9604618 2.003224 0.48619405 6.6392559 + 810 1.9629155 2.0075077 0.48756075 6.6406486 + 820 1.9683056 2.0110554 0.48883443 6.6269424 + 830 1.975409 2.0189161 0.48995399 6.6030215 + 840 1.9897264 2.035016 0.4907852 6.5485575 + 850 2.0094338 2.0555358 0.49104505 6.4719926 + 860 2.0217589 2.0643603 0.49040437 6.4233305 + 870 2.0147718 2.0641627 0.48866908 6.4491964 + 880 1.9883859 2.0324092 0.48592007 6.5488061 + 890 1.9625853 2.0028776 0.48263002 6.6452734 + 900 1.9520401 1.9889124 0.47925524 6.6808078 + 910 1.9559583 1.9952984 0.47597346 6.6573059 + 920 1.9657244 2.0083503 0.47268726 6.6073704 + 930 1.969288 2.0152339 0.4692054 6.5780416 + 940 1.9652206 2.0116384 0.4654438 6.5769812 + 950 1.9567495 1.9960693 0.46147541 6.5942022 + 960 1.9418452 1.980858 0.45753557 6.6369454 + 970 1.9247196 1.9585585 0.45390337 6.6888821 + 980 1.9128262 1.9481721 0.45090045 6.7198221 + 990 1.9167211 1.9451096 0.44869731 6.6912394 + 1000 1.935529 1.9662384 0.44728238 6.6079829 +Loop time of 0.474418 on 4 procs for 1000 steps with 2775 atoms + +Performance: 182118.045 tau/day, 2107.848 timesteps/s +98.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.13953 | 0.19068 | 0.23764 | 10.4 | 40.19 +Neigh | 0.016439 | 0.022345 | 0.027069 | 3.2 | 4.71 +Comm | 0.018215 | 0.068071 | 0.12178 | 18.6 | 14.35 +Output | 0.011982 | 0.012633 | 0.013047 | 0.4 | 2.66 +Modify | 0.14494 | 0.15597 | 0.16628 | 2.4 | 32.88 +Other | | 0.02472 | | | 5.21 + +Nlocal: 693.75 ave 800 max 584 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 255.5 ave 323 max 192 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Neighs: 6083 ave 7384 max 4742 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 24332 +Ave neighs/atom = 8.76829 +Neighbor list builds = 38 +Dangerous builds = 0 + +##################################################################### +#initialize the COM velocity and run to achieve steady-state + +#calculate velocity to add: V=J/rho_total +variable Vadd equal $J*lx*ly/count(bulk) +variable Vadd equal 0.1*lx*ly/count(bulk) + +#first remove any COM velocity, then add back the streaming velocity +velocity bulk zero linear +velocity bulk set ${Vadd} 0.0 0.0 units box sum yes mom no +velocity bulk set 0.149532710280374 0.0 0.0 units box sum yes mom no + +fix GD bulk flow/gauss 1 0 0 #energy yes +#fix_modify GD energy yes + +run ${stabil} +run 1000 +Per MPI rank memory allocation (min/avg/max) = 3.13 | 3.131 | 3.132 Mbytes +Step c_myT c_myTp TotEng Press + 1000 1.9466974 1.9662384 0.45804438 6.615449 + 1010 1.9605467 1.9815754 0.45717241 6.5545496 + 1020 1.9560139 1.9823875 0.45660431 6.5672421 + 1030 1.9348326 1.9691606 0.45633148 6.6463667 + 1040 1.9167809 1.9449522 0.45657707 6.7139486 + 1050 1.9193541 1.943342 0.45767968 6.7014054 + 1060 1.9410751 1.9720491 0.45967742 6.6150379 + 1070 1.9658493 1.9964883 0.46221539 6.5178418 + 1080 1.9767205 2.0074304 0.46491236 6.4768594 + 1090 1.9714544 2.0003054 0.46759126 6.5026957 + 1100 1.9647035 1.9927455 0.4703109 6.5400181 + 1110 1.9657667 1.9959656 0.47317481 6.5519094 + 1120 1.9706062 1.9980802 0.476185 6.5512675 + 1130 1.9747655 2.0062292 0.47932281 6.554091 + 1140 1.9761245 2.0075076 0.48248327 6.5670381 + 1150 1.9744197 2.0073027 0.48562483 6.5914441 + 1160 1.9722698 2.0046687 0.48874207 6.6165575 + 1170 1.9692145 2.0013845 0.49187442 6.6438115 + 1180 1.9665609 1.9970724 0.49508053 6.6693821 + 1190 1.9625031 1.9908427 0.49843816 6.7002606 + 1200 1.960528 1.993084 0.50203044 6.7237076 + 1210 1.9649156 1.9981485 0.50587066 6.7217755 + 1220 1.9788059 2.0134511 0.50987442 6.6833452 + 1230 1.9952283 2.0343101 0.51379781 6.6340278 + 1240 2.0039391 2.0494196 0.51730872 6.6129751 + 1250 2.0019006 2.0526773 0.52014603 6.6320217 + 1260 1.9974025 2.0528914 0.52221385 6.6601786 + 1270 1.9953949 2.0561121 0.5234754 6.6796142 + 1280 1.9893864 2.0470375 0.5238632 6.7140134 + 1290 1.9694951 2.019253 0.5235093 6.798442 + 1300 1.9473901 1.9965919 0.52280384 6.8863369 + 1310 1.9511151 2.006161 0.52203882 6.8700917 + 1320 1.979341 2.0388959 0.52106938 6.7529595 + 1330 2.0073235 2.0720045 0.51935291 6.6297731 + 1340 2.0202482 2.0841419 0.51624273 6.55803 + 1350 2.0177489 2.0669046 0.51142591 6.5401753 + 1360 2.0069274 2.04717 0.50505824 6.5506533 + 1370 1.994854 2.0311383 0.49743042 6.5633001 + 1380 1.9793176 2.0077184 0.48890503 6.5859072 + 1390 1.9580907 1.9839831 0.48004316 6.6288992 + 1400 1.9415542 1.9594192 0.47143599 6.6534105 + 1410 1.9405188 1.9591825 0.46353105 6.620549 + 1420 1.9504784 1.9730647 0.45640199 6.5471784 + 1430 1.9594158 1.9819854 0.44995052 6.4802874 + 1440 1.9615108 1.9863792 0.44406411 6.44391 + 1450 1.9544127 1.9806249 0.43873409 6.4484818 + 1460 1.9384927 1.9614953 0.43408605 6.4905259 + 1470 1.9214711 1.9425515 0.43035972 6.5390434 + 1480 1.9170761 1.9300809 0.42775046 6.5409502 + 1490 1.9242904 1.9385731 0.42631007 6.5005057 + 1500 1.9307133 1.9446119 0.4258836 6.4660754 + 1510 1.9303576 1.9435389 0.42633976 6.4616415 + 1520 1.9248382 1.9408306 0.42765441 6.4832059 + 1530 1.9120794 1.9278123 0.42986958 6.5380951 + 1540 1.899122 1.9125029 0.4331459 6.5987181 + 1550 1.9030956 1.9187821 0.43765067 6.6012019 + 1560 1.9182961 1.9453782 0.44330842 6.5674222 + 1570 1.9272863 1.9613129 0.44971962 6.5619794 + 1580 1.931679 1.9698134 0.45643436 6.5780809 + 1590 1.9336692 1.9728684 0.46314752 6.6035675 + 1600 1.938895 1.9823104 0.46964519 6.6138411 + 1610 1.9510838 1.9937914 0.47568807 6.5916989 + 1620 1.9685387 2.0087314 0.48102339 6.5424432 + 1630 1.9894416 2.0295715 0.48539861 6.4757743 + 1640 1.9982699 2.0426949 0.48860411 6.4512418 + 1650 1.9901677 2.0363837 0.49062424 6.4879985 + 1660 1.9814216 2.0291326 0.49172203 6.5248034 + 1670 1.9812111 2.0293629 0.49218297 6.5253876 + 1680 1.9903906 2.0408376 0.49211747 6.4852787 + 1690 2.0015983 2.0538843 0.4914581 6.4325081 + 1700 2.009727 2.0503407 0.49011163 6.3878577 + 1710 2.0167822 2.0531002 0.4881688 6.3477054 + 1720 2.0189021 2.0445033 0.48564798 6.3273063 + 1730 2.0129713 2.0354734 0.48270666 6.3385541 + 1740 2.0048763 2.0199836 0.47950943 6.3587586 + 1750 1.9994843 2.0085942 0.47624908 6.3694119 + 1760 1.9940025 2.0072098 0.47305283 6.3816295 + 1770 1.9817431 1.9974066 0.46994486 6.4224295 + 1780 1.965171 1.9805421 0.4670779 6.4832371 + 1790 1.9474078 1.9662605 0.46466823 6.5516524 + 1800 1.9286009 1.9507751 0.46292015 6.6263366 + 1810 1.9168087 1.9437961 0.46199899 6.6759834 + 1820 1.9107555 1.9306323 0.46204129 6.7029857 + 1830 1.9135569 1.930819 0.46316484 6.6949737 + 1840 1.9345342 1.9553413 0.46532704 6.6178988 + 1850 1.9630349 1.9929548 0.46822932 6.5137866 + 1860 1.9820746 2.0188839 0.47135068 6.4489028 + 1870 1.9834959 2.0217145 0.47427805 6.4552721 + 1880 1.9731564 2.0120293 0.47692755 6.5100251 + 1890 1.9653605 2.0070624 0.47943307 6.5594235 + 1900 1.9630631 2.0095488 0.48192185 6.5912876 + 1910 1.9556778 2.0035006 0.48443107 6.6437189 + 1920 1.9408788 1.9828296 0.48710124 6.7228731 + 1930 1.9292393 1.9732376 0.49025327 6.7880112 + 1940 1.9263081 1.9708942 0.49416086 6.8162477 + 1950 1.9358375 1.976323 0.49899895 6.7946964 + 1960 1.9520543 1.9936542 0.50485961 6.7467481 + 1970 1.9709064 2.0108957 0.51165586 6.6909455 + 1980 1.9940026 2.0375428 0.51918913 6.6250463 + 1990 2.0171261 2.0646948 0.52705638 6.5649879 + 2000 2.0302713 2.0802515 0.53472229 6.5470853 +Loop time of 0.482133 on 4 procs for 1000 steps with 2775 atoms + +Performance: 179203.608 tau/day, 2074.116 timesteps/s +98.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.1081 | 0.18228 | 0.23471 | 12.7 | 37.81 +Neigh | 0.011443 | 0.019967 | 0.025651 | 4.1 | 4.14 +Comm | 0.01639 | 0.073615 | 0.15634 | 21.8 | 15.27 +Output | 0.011851 | 0.012603 | 0.013287 | 0.5 | 2.61 +Modify | 0.14306 | 0.16634 | 0.18018 | 3.6 | 34.50 +Other | | 0.02733 | | | 5.67 + +Nlocal: 693.75 ave 797 max 590 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 259 ave 320 max 195 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 6101 ave 7360 max 4853 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 24404 +Ave neighs/atom = 8.79423 +Neighbor list builds = 36 +Dangerous builds = 0 + +##################################################################### +#collect data + +#print the applied force and total flux to ensure conservation of Jx +variable Fapp equal f_GD[1] +compute vxBulk bulk reduce sum vx +compute vyBulk bulk reduce sum vy +variable invVol equal 1.0/(lx*ly) +variable jx equal c_vxBulk*${invVol} +variable jx equal c_vxBulk*0.00025 +variable jy equal c_vyBulk*${invVol} +variable jy equal c_vyBulk*0.00025 +variable curr_step equal step +variable p_Fapp format Fapp %.3f +variable p_jx format jx %.5g +variable p_jy format jy %.5g +fix print_vCOM all print ${dump_rate} "${curr_step} ${p_Fapp} ${p_jx} ${p_jy}" file GD.out screen no title "timestep Fapp Jx Jy" +fix print_vCOM all print 50 "${curr_step} ${p_Fapp} ${p_jx} ${p_jy}" file GD.out screen no title "timestep Fapp Jx Jy" + +#compute IK1 pressure profile +#see Todd, Evans, and Davis, Phys. Rev. E 52(2) 1995, p. 1627 +#use profile-unbiased temperature to remove the streaming velocity +#from the kinetic part of the pressure +compute spa bulk stress/atom myTp + +#for the pressure profile, use the same grid as the PUT +compute chunkX bulk chunk/atom bin/1d x lower ${dX} units box +compute chunkX bulk chunk/atom bin/1d x lower 3.125 units box + +#output pressure profile and other profiles +#the pressure profile is (-1/2V)*(c_spa[1] + c_spa[2]), where +#V is the volume of a slice +fix profiles bulk ave/chunk 1 1 ${dump_rate} chunkX vx density/mass c_spa[1] c_spa[2] file x_profiles ave running overwrite +fix profiles bulk ave/chunk 1 1 50 chunkX vx density/mass c_spa[1] c_spa[2] file x_profiles ave running overwrite + +#compute velocity profile across the pipe with a finer grid +variable dYnew equal ${dY}/10 +variable dYnew equal 3.07692307692308/10 +compute chunkY bulk chunk/atom bin/1d y center ${dYnew} units box region pipe +compute chunkY bulk chunk/atom bin/1d y center 0.307692307692308 units box region pipe +fix velYprof bulk ave/chunk 1 1 ${dump_rate} chunkY vx file Vy_profile ave running overwrite +fix velYprof bulk ave/chunk 1 1 50 chunkY vx file Vy_profile ave running overwrite + +#full trajectory +# dump 7 bulk custom ${dump_rate} bulk.lammpstrj id type x y z +# dump_modify 7 sort id + +run ${run} +run 2000 +Per MPI rank memory allocation (min/avg/max) = 5.138 | 5.139 | 5.14 Mbytes +Step c_myT c_myTp TotEng Press + 2000 2.0302713 2.0802515 0.53472229 6.5470853 + 2010 2.0303419 2.0806129 0.54177821 6.5808527 + 2020 2.0245167 2.0792991 0.54803523 6.6381758 + 2030 2.0169072 2.065404 0.55345227 6.7008962 + 2040 2.0052526 2.0513817 0.55818432 6.7755868 + 2050 1.9953625 2.0366564 0.56245299 6.8382569 + 2060 2.0003667 2.0462109 0.56649798 6.8390557 + 2070 2.0238288 2.0834553 0.57023651 6.7637821 + 2080 2.045765 2.1173867 0.5730944 6.6861321 + 2090 2.0563925 2.1370313 0.57430831 6.6422581 + 2100 2.0620437 2.1480293 0.57319824 6.6080678 + 2110 2.0584437 2.1473173 0.56913597 6.5969671 + 2120 2.0532825 2.1393006 0.56154606 6.5799417 + 2130 2.0450143 2.1234905 0.55009479 6.5616931 + 2140 2.0229537 2.1004507 0.53511912 6.5854627 + 2150 1.9832556 2.0554119 0.51812599 6.6700591 + 2160 1.9444027 2.0110758 0.50163049 6.7534263 + 2170 1.9267473 1.9904528 0.48759542 6.76469 + 2180 1.9262232 1.9809353 0.47662199 6.7188048 + 2190 1.9359331 1.9854626 0.46836289 6.6406985 + 2200 1.9530728 1.9971865 0.4620366 6.5409943 + 2210 1.9657099 2.0056761 0.45692542 6.4639397 + 2220 1.9661008 2.0046161 0.45253504 6.4388081 + 2230 1.9574696 1.9947839 0.44864257 6.4528687 + 2240 1.9522284 1.9922663 0.44518111 6.4584458 + 2250 1.9518203 1.9950044 0.44206844 6.4491722 + 2260 1.9527908 1.9989603 0.4391804 6.4377912 + 2270 1.9452231 1.9932538 0.43643529 6.4607516 + 2280 1.9249341 1.9759145 0.43392742 6.5320897 + 2290 1.9087464 1.960985 0.43186869 6.5875176 + 2300 1.9103289 1.964731 0.43039882 6.5765021 + 2310 1.9182062 1.9783814 0.4294628 6.5434488 + 2320 1.9204281 1.9796609 0.42889381 6.5351629 + 2330 1.916279 1.9720659 0.42866391 6.5562619 + 2340 1.9062866 1.9587628 0.42890166 6.6033936 + 2350 1.9024117 1.9566812 0.42979475 6.6297969 + 2360 1.908153 1.960687 0.43141898 6.6215148 + 2370 1.9115944 1.9663337 0.43376668 6.6236491 + 2380 1.9086193 1.9637867 0.4367911 6.6529568 + 2390 1.9039907 1.9610268 0.44053991 6.6926343 + 2400 1.9034944 1.9609406 0.44508818 6.7193441 + 2410 1.9151521 1.9753641 0.4504458 6.7015957 + 2420 1.9314517 1.9925924 0.45644382 6.6669864 + 2430 1.9433933 2.0062001 0.46277215 6.6481527 + 2440 1.9504631 2.0087015 0.46917209 6.6475757 + 2450 1.9550092 2.0094957 0.47550077 6.6556459 + 2460 1.9609689 2.0147997 0.48170141 6.6568282 + 2470 1.9730726 2.0328127 0.48763131 6.6337545 + 2480 1.9838562 2.0466643 0.49303443 6.6143423 + 2490 1.9862031 2.0473388 0.49767532 6.6245587 + 2500 1.9817565 2.0455432 0.50152131 6.6573893 + 2510 1.9785788 2.0423176 0.50460561 6.6808042 + 2520 1.9823006 2.0505106 0.50696374 6.6726698 + 2530 1.9907178 2.0553736 0.50852885 6.6402082 + 2540 2.0005205 2.0690408 0.50919421 6.5966469 + 2550 2.0079727 2.0809816 0.50872954 6.5568419 + 2560 2.0133128 2.096271 0.50682742 6.5199915 + 2570 2.0141298 2.0990846 0.50314491 6.4951991 + 2580 2.0048768 2.0874319 0.49750096 6.5025454 + 2590 1.9876498 2.0638834 0.4900201 6.5333038 + 2600 1.9720479 2.0474479 0.48105263 6.5527157 + 2610 1.9596324 2.0355764 0.4710001 6.5547867 + 2620 1.9439039 2.0106405 0.46046644 6.5646889 + 2630 1.9321714 1.9924346 0.45021207 6.5589454 + 2640 1.9349378 1.9923889 0.44082833 6.5012762 + 2650 1.9448459 2.0069955 0.43251999 6.4228945 + 2660 1.9446852 2.0050346 0.42525857 6.3921645 + 2670 1.9325594 1.9884937 0.41913362 6.4169726 + 2680 1.9121687 1.9606084 0.41434428 6.4821267 + 2690 1.8923613 1.9339385 0.41105831 6.5517615 + 2700 1.8807238 1.9191801 0.40933203 6.5949447 + 2710 1.8797367 1.918758 0.40906826 6.6001309 + 2720 1.8852961 1.9225996 0.41005611 6.58191 + 2730 1.8937478 1.9357751 0.41204348 6.5541946 + 2740 1.9019279 1.9449374 0.41476104 6.5278575 + 2750 1.9134396 1.9614415 0.41800066 6.4890769 + 2760 1.9339551 1.9913779 0.42150554 6.4159805 + 2770 1.9597826 2.0220988 0.42487614 6.3232273 + 2780 1.9753466 2.0414907 0.42771704 6.2715489 + 2790 1.9720423 2.0402016 0.42976012 6.2949288 + 2800 1.9512893 2.0172711 0.43109201 6.3878056 + 2810 1.9232302 1.9870212 0.4320928 6.5101822 + 2820 1.9026913 1.959286 0.43326424 6.6024967 + 2830 1.9033802 1.9621601 0.43500785 6.6114274 + 2840 1.9214292 1.9833838 0.43733454 6.5508757 + 2850 1.9440563 2.0087358 0.43995473 6.4713496 + 2860 1.9589136 2.0211107 0.44250821 6.4232961 + 2870 1.9588429 2.022232 0.44477492 6.4355861 + 2880 1.9456751 2.0009513 0.44676532 6.5021746 + 2890 1.9269155 1.9782929 0.44877858 6.5926531 + 2900 1.9125262 1.9554653 0.45121196 6.6657808 + 2910 1.9187855 1.9572583 0.45438665 6.6589954 + 2920 1.9416112 1.9784518 0.45839212 6.5888253 + 2930 1.9613579 1.9975032 0.46305788 6.5317424 + 2940 1.9711529 2.0102501 0.46812715 6.5148943 + 2950 1.9707865 2.0133283 0.47345305 6.5389543 + 2960 1.9732526 2.0170219 0.47898306 6.5537092 + 2970 1.9871126 2.0282309 0.48465048 6.5273492 + 2980 1.9953449 2.0404164 0.49032615 6.5227325 + 2990 1.9909136 2.037246 0.49581423 6.5664662 + 3000 1.9872474 2.0307896 0.50110509 6.6060698 + 3010 1.9944885 2.0457308 0.5062755 6.6031811 + 3020 2.0103461 2.0599491 0.51116655 6.5654871 + 3030 2.0240275 2.077342 0.5154921 6.5358852 + 3040 2.0205953 2.0704954 0.51898871 6.5708937 + 3050 2.0032184 2.0463036 0.52167438 6.657741 + 3060 1.9889341 2.0265284 0.52385964 6.7329171 + 3070 1.9795143 2.0201081 0.52588914 6.7881407 + 3080 1.9713362 2.0123964 0.52797238 6.8362858 + 3090 1.9692592 2.0106467 0.53025538 6.8616268 + 3100 1.9722487 2.0259566 0.53277635 6.8689898 + 3110 1.9703322 2.0314028 0.53541462 6.895271 + 3120 1.9594359 2.0217586 0.53808512 6.954362 + 3130 1.9524729 2.0148628 0.5409094 6.9965233 + 3140 1.9630381 2.0260807 0.54400259 6.968082 + 3150 1.9902598 2.0549364 0.54720142 6.8698796 + 3160 2.029715 2.0923999 0.54995378 6.7193678 + 3170 2.0581544 2.1137995 0.55150021 6.6053728 + 3180 2.059074 2.1156535 0.55123668 6.5919337 + 3190 2.0400682 2.0904721 0.54894762 6.6505757 + 3200 2.0211594 2.0682597 0.54484887 6.7046468 + 3210 2.012712 2.0573114 0.53922057 6.7130909 + 3220 2.0102377 2.0554701 0.53219251 6.6919069 + 3230 2.0017671 2.0505068 0.52386898 6.6867054 + 3240 1.9854941 2.0308454 0.51458792 6.7051085 + 3250 1.9767009 2.0187664 0.50486785 6.6916859 + 3260 1.9771733 2.0186148 0.49510722 6.6424305 + 3270 1.974003 2.0136039 0.48556819 6.6078903 + 3280 1.9627665 1.9989122 0.47654147 6.6067904 + 3290 1.9491247 1.9826248 0.46834866 6.6186709 + 3300 1.9414093 1.9724941 0.4612122 6.6119543 + 3310 1.9433901 1.9715482 0.45518879 6.570612 + 3320 1.9518837 1.9872717 0.45010165 6.5057947 + 3330 1.9603874 1.9957995 0.44566728 6.4428221 + 3340 1.9615962 1.9945224 0.44167201 6.4099339 + 3350 1.955918 1.9882866 0.4380303 6.4070811 + 3360 1.9463445 1.9763654 0.43480086 6.4241178 + 3370 1.9411187 1.9683081 0.43206391 6.4296577 + 3380 1.9407224 1.9580074 0.42991627 6.4210217 + 3390 1.9402479 1.9530447 0.42850635 6.4170536 + 3400 1.9451337 1.9555771 0.42787382 6.3990336 + 3410 1.9475586 1.9612432 0.42797178 6.3953251 + 3420 1.9434927 1.960532 0.4286887 6.4210681 + 3430 1.9339054 1.9516935 0.43003682 6.4707071 + 3440 1.9234014 1.9464343 0.43214965 6.5248205 + 3450 1.9191846 1.9444777 0.43516361 6.5558451 + 3460 1.923218 1.9594606 0.43915611 6.5549213 + 3470 1.9328953 1.9792053 0.44397878 6.5327637 + 3480 1.9466227 1.9997841 0.44940599 6.4954965 + 3490 1.9672374 2.0323219 0.45511091 6.4358811 + 3500 1.9799622 2.0479841 0.46061029 6.4100217 + 3510 1.97942 2.0493411 0.46551964 6.4368108 + 3520 1.9725674 2.0389602 0.46976378 6.4892049 + 3530 1.9716429 2.0389798 0.47344292 6.5200899 + 3540 1.9789254 2.0486162 0.47659268 6.5198212 + 3550 1.9872455 2.0577517 0.47908145 6.5144586 + 3560 1.9808834 2.0545962 0.48076561 6.5633282 + 3570 1.9637165 2.0335394 0.4816783 6.6519124 + 3580 1.9407948 2.0067763 0.48212405 6.7605224 + 3590 1.9226532 1.9825887 0.48252299 6.8486041 + 3600 1.9135067 1.9700999 0.48328348 6.8977858 + 3610 1.9157516 1.9720028 0.48470695 6.8977759 + 3620 1.9328644 2.0001154 0.48688777 6.8361569 + 3630 1.9568208 2.0243053 0.48963933 6.7442107 + 3640 1.9824587 2.0569223 0.49259173 6.6452535 + 3650 1.9934906 2.0686356 0.49529038 6.6020218 + 3660 1.9996281 2.0747054 0.4973223 6.5808904 + 3670 2.0038801 2.0772777 0.49838833 6.5691351 + 3680 1.9941342 2.0712365 0.49826732 6.6088107 + 3690 1.9762631 2.0486045 0.49689108 6.6739002 + 3700 1.9667284 2.0349391 0.4943899 6.7010265 + 3710 1.9615089 2.0168112 0.49093735 6.7040384 + 3720 1.9613068 2.0147489 0.48673788 6.6813041 + 3730 1.9731234 2.0290151 0.48175561 6.6096757 + 3740 1.9829764 2.0461907 0.47575173 6.5424752 + 3750 1.9792839 2.0454423 0.46852709 6.5237753 + 3760 1.9599692 2.0287014 0.46022484 6.5616271 + 3770 1.935975 2.0000948 0.45138016 6.6136471 + 3780 1.9236713 1.9834802 0.44262435 6.6187463 + 3790 1.9268004 1.9875324 0.43430112 6.5632772 + 3800 1.932601 1.9872595 0.42649563 6.4984764 + 3810 1.9322506 1.9814946 0.41928855 6.4617054 + 3820 1.9245737 1.9712821 0.4128224 6.4613779 + 3830 1.9148568 1.9555602 0.40721003 6.4774474 + 3840 1.9049961 1.9457058 0.40261179 6.5029211 + 3850 1.8915137 1.9265199 0.39914961 6.5483592 + 3860 1.8784768 1.9058055 0.39700153 6.5962113 + 3870 1.8755236 1.9045158 0.39632768 6.6079033 + 3880 1.8841415 1.9140314 0.39710037 6.577707 + 3890 1.8958027 1.9331149 0.39918951 6.5359785 + 3900 1.9064085 1.948805 0.40238576 6.499859 + 3910 1.9185092 1.9675733 0.40647523 6.4610682 + 3920 1.9342595 1.9933225 0.41115392 6.4122308 + 3930 1.9482664 2.0076139 0.41603495 6.3736841 + 3940 1.9557759 2.0161573 0.42084462 6.3636708 + 3950 1.9573687 2.016612 0.42540421 6.3804124 + 3960 1.9486354 1.9998027 0.42974612 6.4404944 + 3970 1.936214 1.9807209 0.43412037 6.5176788 + 3980 1.9274292 1.9595259 0.43885103 6.5846212 + 3990 1.9233082 1.953436 0.44425085 6.6354276 + 4000 1.9289166 1.9522097 0.45042645 6.6513835 +Loop time of 0.998413 on 4 procs for 2000 steps with 2775 atoms + +Performance: 173074.634 tau/day, 2003.179 timesteps/s +98.9% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.25646 | 0.3672 | 0.47947 | 15.7 | 36.78 +Neigh | 0.027925 | 0.039163 | 0.050221 | 4.5 | 3.92 +Comm | 0.032807 | 0.14565 | 0.27684 | 25.4 | 14.59 +Output | 0.025572 | 0.032272 | 0.035355 | 2.2 | 3.23 +Modify | 0.31519 | 0.35781 | 0.375 | 4.1 | 35.84 +Other | | 0.05632 | | | 5.64 + +Nlocal: 693.75 ave 805 max 582 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 255.5 ave 312 max 199 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 6091.5 ave 7423 max 4780 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 24366 +Ave neighs/atom = 8.78054 +Neighbor list builds = 72 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:01 diff --git a/examples/USER/flow_gauss/output-files/GD.out b/examples/USER/flow_gauss/output-files/GD.out new file mode 100644 index 0000000000..e3049830bc --- /dev/null +++ b/examples/USER/flow_gauss/output-files/GD.out @@ -0,0 +1,41 @@ +timestep Fapp Jx Jy +2050 -215.835 0.1 -0.002562 +2100 -220.455 0.1 -0.0019705 +2150 55.212 0.1 -0.0028338 +2200 87.052 0.1 -0.0042335 +2250 -62.998 0.1 -0.0045646 +2300 71.630 0.1 -0.0039858 +2350 43.159 0.1 -0.0029771 +2400 109.930 0.1 -0.0018522 +2450 110.735 0.1 -0.0011188 +2500 107.071 0.1 0.0005978 +2550 335.449 0.1 0.0010164 +2600 159.694 0.1 -0.00015953 +2650 6.532 0.1 -0.0004907 +2700 65.524 0.1 -0.00093116 +2750 79.662 0.1 -0.0033425 +2800 69.846 0.1 -0.0055377 +2850 122.175 0.1 -0.00721 +2900 32.456 0.1 -0.0086166 +2950 -85.137 0.1 -0.01107 +3000 154.735 0.1 -0.011337 +3050 72.979 0.1 -0.0095316 +3100 -24.457 0.1 -0.0098708 +3150 -0.383 0.1 -0.0094961 +3200 132.434 0.1 -0.011524 +3250 48.222 0.1 -0.014966 +3300 -73.186 0.1 -0.016999 +3350 172.062 0.1 -0.018554 +3400 106.144 0.1 -0.021202 +3450 -22.860 0.1 -0.01949 +3500 22.120 0.1 -0.016033 +3550 -254.920 0.1 -0.012172 +3600 -147.218 0.1 -0.011162 +3650 -12.508 0.1 -0.010255 +3700 81.846 0.1 -0.0085117 +3750 -79.406 0.1 -0.0061294 +3800 -34.994 0.1 -0.0026239 +3850 94.992 0.1 -0.0015312 +3900 -0.345 0.1 -0.0011157 +3950 -88.693 0.1 -0.0018929 +4000 156.029 0.1 -0.0024547 diff --git a/examples/USER/flow_gauss/output-files/Vy_profile b/examples/USER/flow_gauss/output-files/Vy_profile new file mode 100644 index 0000000000..2df7468364 --- /dev/null +++ b/examples/USER/flow_gauss/output-files/Vy_profile @@ -0,0 +1,134 @@ +# Chunk-averaged data for fix velYprof and group file +# Timestep Number-of-chunks Total-count +# Chunk Coord1 Ncount vx +4000 130 18774 + 1 -19.8462 0 0 + 2 -19.5385 0 0 + 3 -19.2308 0 0 + 4 -18.9231 0 0 + 5 -18.6154 0 0 + 6 -18.3077 0 0 + 7 -18 0 0 + 8 -17.6923 0 0 + 9 -17.3846 0 0 + 10 -17.0769 0 0 + 11 -16.7692 0 0 + 12 -16.4615 0 0 + 13 -16.1538 0 0 + 14 -15.8462 0 0 + 15 -15.5385 0 0 + 16 -15.2308 0 0 + 17 -14.9231 0 0 + 18 -14.6154 0 0 + 19 -14.3077 0 0 + 20 -14 0 0 + 21 -13.6923 0 0 + 22 -13.3846 0 0 + 23 -13.0769 0 0 + 24 -12.7692 0 0 + 25 -12.4615 0 0 + 26 -12.1538 0 0 + 27 -11.8462 0 0 + 28 -11.5385 0 0 + 29 -11.2308 0 0 + 30 -10.9231 0 0 + 31 -10.6154 0 0 + 32 -10.3077 0 0 + 33 -10 0 0 + 34 -9.69231 0 0 + 35 -9.38462 0 0 + 36 -9.07692 12.3415 0.126356 + 37 -8.76923 9.14634 0.119194 + 38 -8.46154 3.46341 0.0688559 + 39 -8.15385 7.26829 0.180935 + 40 -7.84615 9.97561 0.114685 + 41 -7.53846 6.14634 0.158317 + 42 -7.23077 7.17073 0.128092 + 43 -6.92308 8.56098 0.30356 + 44 -6.61538 7.7561 0.118822 + 45 -6.30769 6.04878 0.170019 + 46 -6 8.19512 0.146873 + 47 -5.69231 8.4878 0.258003 + 48 -5.38462 7.21951 0.0612577 + 49 -5.07692 7.14634 0.394221 + 50 -4.76923 7.34146 0.214609 + 51 -4.46154 7.90244 0.1583 + 52 -4.15385 6.36585 0.191919 + 53 -3.84615 8.04878 0.202891 + 54 -3.53846 7.2439 -0.00173288 + 55 -3.23077 7.53659 0.117062 + 56 -2.92308 6.41463 0.324614 + 57 -2.61538 7.60976 0.496272 + 58 -2.30769 8.39024 0.364642 + 59 -2 6.73171 0.292624 + 60 -1.69231 7.02439 0.517913 + 61 -1.38462 8.43902 0.534594 + 62 -1.07692 7.21951 0.497622 + 63 -0.769231 6.95122 0.303701 + 64 -0.461538 8.68293 0.406682 + 65 -0.153846 7.5122 0.218835 + 66 0.153846 6.82927 0.189413 + 67 0.461538 8.26829 0.228409 + 68 0.769231 7.2439 0.506845 + 69 1.07692 7.97561 0.154118 + 70 1.38462 8.26829 0.144882 + 71 1.69231 6.58537 0.192568 + 72 2 7.46341 0.360144 + 73 2.30769 8.95122 0.0112179 + 74 2.61538 6.58537 0.276061 + 75 2.92308 6.53659 0.114354 + 76 3.23077 8.46341 0.0386417 + 77 3.53846 8 0.0711626 + 78 3.84615 6.92683 0.203194 + 79 4.15385 8.4878 0.317789 + 80 4.46154 7.5122 0.268122 + 81 4.76923 6.58537 -0.112372 + 82 5.07692 9.02439 0.115702 + 83 5.38462 7.41463 -0.067424 + 84 5.69231 6.07317 0.0626918 + 85 6 8.34146 -0.0153977 + 86 6.30769 8.21951 0.281342 + 87 6.61538 6.29268 0.359939 + 88 6.92308 8.87805 0.110875 + 89 7.23077 6.09756 0.134999 + 90 7.53846 6.65854 0.0841478 + 91 7.84615 10.8537 0.144519 + 92 8.15385 5.58537 0.309331 + 93 8.46154 5.80488 0.103667 + 94 8.76923 7.60976 0.39288 + 95 9.07692 12.0244 0.462022 + 96 9.38462 0 0 + 97 9.69231 0 0 + 98 10 0 0 + 99 10.3077 0 0 + 100 10.6154 0 0 + 101 10.9231 0 0 + 102 11.2308 0 0 + 103 11.5385 0 0 + 104 11.8462 0 0 + 105 12.1538 0 0 + 106 12.4615 0 0 + 107 12.7692 0 0 + 108 13.0769 0 0 + 109 13.3846 0 0 + 110 13.6923 0 0 + 111 14 0 0 + 112 14.3077 0 0 + 113 14.6154 0 0 + 114 14.9231 0 0 + 115 15.2308 0 0 + 116 15.5385 0 0 + 117 15.8462 0 0 + 118 16.1538 0 0 + 119 16.4615 0 0 + 120 16.7692 0 0 + 121 17.0769 0 0 + 122 17.3846 0 0 + 123 17.6923 0 0 + 124 18 0 0 + 125 18.3077 0 0 + 126 18.6154 0 0 + 127 18.9231 0 0 + 128 19.2308 0 0 + 129 19.5385 0 0 + 130 19.8462 0 0 diff --git a/examples/USER/flow_gauss/output-files/x_profiles b/examples/USER/flow_gauss/output-files/x_profiles new file mode 100644 index 0000000000..7a761345af --- /dev/null +++ b/examples/USER/flow_gauss/output-files/x_profiles @@ -0,0 +1,36 @@ +# Chunk-averaged data for fix profiles and group density/mass +# Timestep Number-of-chunks Total-count +# Chunk Coord1 Ncount vx density/mass c_spa[1] c_spa[2] +4000 32 109675 + 1 -48.4375 97.7805 0.159561 0.782244 -9.17487 -8.9018 + 2 -45.3125 100.927 0.187846 0.807415 -9.24302 -9.92813 + 3 -42.1875 99.0976 0.227036 0.79278 -9.03415 -9.66032 + 4 -39.0625 101.146 0.243495 0.809171 -8.89515 -9.25314 + 5 -35.9375 98.7805 0.194616 0.790244 -9.13265 -8.52663 + 6 -32.8125 97.8049 0.165768 0.782439 -9.26009 -8.52446 + 7 -29.6875 100.195 0.0758064 0.801561 -9.02933 -8.50733 + 8 -26.5625 98.4878 0.054432 0.787902 -9.61672 -9.24963 + 9 -23.4375 99.9268 0.0740914 0.799415 -9.88959 -9.94984 + 10 -20.3125 99.7561 0.130294 0.798049 -10.2459 -9.39412 + 11 -17.1875 102.463 0.120168 0.819707 -10.6072 -10.254 + 12 -14.0625 47.6341 0.208545 0.381073 -9.85715 -10.0799 + 13 -10.9375 48.1951 0.238051 0.385561 -9.81349 -10.569 + 14 -7.8125 47.439 0.287107 0.379512 -10.0184 -9.63087 + 15 -4.6875 48.2439 0.22506 0.385951 -9.83794 -9.6963 + 16 -1.5625 48.4634 0.208869 0.387707 -9.29366 -10.0114 + 17 1.5625 46.4878 0.19447 0.371902 -10.2409 -9.84627 + 18 4.6875 47.2927 0.168034 0.378341 -10.1523 -11.908 + 19 7.8125 48.6829 0.145552 0.389463 -10.24 -11.0582 + 20 10.9375 48.8293 0.214036 0.390634 -9.27729 -10.1074 + 21 14.0625 46.9756 0.267083 0.375805 -9.24833 -9.83182 + 22 17.1875 97.2683 0.175404 0.778146 -9.64001 -8.61724 + 23 20.3125 101.146 0.10746 0.809171 -9.33416 -9.82308 + 24 23.4375 101.927 0.157503 0.815415 -9.76491 -10.1909 + 25 26.5625 101.024 0.179934 0.808195 -9.72775 -9.98559 + 26 29.6875 100.976 0.180631 0.807805 -9.33871 -10.0228 + 27 32.8125 96.4146 0.144418 0.771317 -9.74826 -9.79723 + 28 35.9375 101.244 0.117224 0.809951 -8.95584 -8.80226 + 29 39.0625 102 0.10507 0.816 -9.15563 -8.98232 + 30 42.1875 101.195 0.040236 0.809561 -9.1499 -8.95112 + 31 45.3125 96.9512 0.0312252 0.77561 -9.20475 -9.0005 + 32 48.4375 100.244 0.103032 0.801951 -9.16324 -8.77526 -- GitLab From 3b1134c1649a83c5be60aa0ff1f75f47d54d92c0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Jul 2017 13:42:02 -0400 Subject: [PATCH 475/593] correct formatting error in peridynamics pair style docs --- doc/src/pair_peri.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/pair_peri.txt b/doc/src/pair_peri.txt index 6ffd8122aa..7abe6378dd 100644 --- a/doc/src/pair_peri.txt +++ b/doc/src/pair_peri.txt @@ -127,7 +127,7 @@ G (force/area units) horizon (distance units) s00 (unitless) alpha (unitless) -m_yield_stress (force/area units) +m_yield_stress (force/area units) :ul K is the bulk modulus and G is the shear modulus. The horizon is a cutoff distance and s00 and alpha are used as a bond breaking -- GitLab From 14f1d646ad76653d8cee44489fc9504f5917a0f6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Jul 2017 13:44:12 -0400 Subject: [PATCH 476/593] provide working examples for all four peridynamics models and reference outputs --- examples/peri/{in.peri => in.peri-pmb} | 0 examples/peri/in.peri.eps | 45 +++++++ examples/peri/in.peri.lps | 45 +++++++ examples/peri/in.peri.pmb | 45 +++++++ examples/peri/in.peri.ves | 45 +++++++ examples/peri/log.6Jul17.peri.eps.g++.1 | 115 ++++++++++++++++++ examples/peri/log.6Jul17.peri.eps.g++.4 | 115 ++++++++++++++++++ examples/peri/log.6Jul17.peri.lps.g++.1 | 115 ++++++++++++++++++ examples/peri/log.6Jul17.peri.lps.g++.4 | 115 ++++++++++++++++++ ...6.peri.g++.1 => log.6Jul17.peri.pmb.g++.1} | 57 +++++---- ...6.peri.g++.4 => log.6Jul17.peri.pmb.g++.4} | 69 ++++++----- examples/peri/log.6Jul17.peri.ves.g++.1 | 115 ++++++++++++++++++ examples/peri/log.6Jul17.peri.ves.g++.4 | 115 ++++++++++++++++++ 13 files changed, 944 insertions(+), 52 deletions(-) rename examples/peri/{in.peri => in.peri-pmb} (100%) create mode 100644 examples/peri/in.peri.eps create mode 100644 examples/peri/in.peri.lps create mode 100644 examples/peri/in.peri.pmb create mode 100644 examples/peri/in.peri.ves create mode 100644 examples/peri/log.6Jul17.peri.eps.g++.1 create mode 100644 examples/peri/log.6Jul17.peri.eps.g++.4 create mode 100644 examples/peri/log.6Jul17.peri.lps.g++.1 create mode 100644 examples/peri/log.6Jul17.peri.lps.g++.4 rename examples/peri/{log.5Oct16.peri.g++.1 => log.6Jul17.peri.pmb.g++.1} (62%) rename examples/peri/{log.5Oct16.peri.g++.4 => log.6Jul17.peri.pmb.g++.4} (58%) create mode 100644 examples/peri/log.6Jul17.peri.ves.g++.1 create mode 100644 examples/peri/log.6Jul17.peri.ves.g++.4 diff --git a/examples/peri/in.peri b/examples/peri/in.peri-pmb similarity index 100% rename from examples/peri/in.peri rename to examples/peri/in.peri-pmb diff --git a/examples/peri/in.peri.eps b/examples/peri/in.peri.eps new file mode 100644 index 0000000000..5ddea41722 --- /dev/null +++ b/examples/peri/in.peri.eps @@ -0,0 +1,45 @@ +# small Peridynamic cylinder hit by projectile + +units si +boundary s s s +atom_style peri +atom_modify map array +neighbor 0.0010 bin + +# small target + +lattice sc 0.0005 +region target cylinder y 0.0 0.0 0.0050 -0.0050 0.0 units box +create_box 1 target +create_atoms 1 region target + +pair_style peri/eps +pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 10.0e8 +set group all density 2200 +set group all volume 1.25e-10 +velocity all set 0.0 0.0 0.0 sum no units box +fix 1 all nve + +# spherical indenter to shatter target + +variable y0 equal 0.00155 +variable vy equal -100 +variable y equal "v_y0 + step*dt*v_vy" + +fix 2 all indent 1e17 sphere 0.0000 v_y 0.0000 0.0015 units box + +compute 1 all damage/atom +timestep 1.0e-7 +thermo 100 + +#dump 1 all custom 100 dump.peri id type x y z c_1 + +#dump 2 all image 50 image.*.jpg type type & +# axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 + +#dump 3 all movie 50 movie.mpg type type & +# axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 + +run 1000 diff --git a/examples/peri/in.peri.lps b/examples/peri/in.peri.lps new file mode 100644 index 0000000000..af0462b5d4 --- /dev/null +++ b/examples/peri/in.peri.lps @@ -0,0 +1,45 @@ +# small Peridynamic cylinder hit by projectile + +units si +boundary s s s +atom_style peri +atom_modify map array +neighbor 0.0010 bin + +# small target + +lattice sc 0.0005 +region target cylinder y 0.0 0.0 0.0050 -0.0050 0.0 units box +create_box 1 target +create_atoms 1 region target + +pair_style peri/lps +pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 +set group all density 2200 +set group all volume 1.25e-10 +velocity all set 0.0 0.0 0.0 sum no units box +fix 1 all nve + +# spherical indenter to shatter target + +variable y0 equal 0.00155 +variable vy equal -100 +variable y equal "v_y0 + step*dt*v_vy" + +fix 2 all indent 1e17 sphere 0.0000 v_y 0.0000 0.0015 units box + +compute 1 all damage/atom +timestep 1.0e-7 +thermo 100 + +#dump 1 all custom 100 dump.peri id type x y z c_1 + +#dump 2 all image 50 image.*.jpg type type & +# axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 + +#dump 3 all movie 50 movie.mpg type type & +# axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 + +run 1000 diff --git a/examples/peri/in.peri.pmb b/examples/peri/in.peri.pmb new file mode 100644 index 0000000000..f9f5d54231 --- /dev/null +++ b/examples/peri/in.peri.pmb @@ -0,0 +1,45 @@ +# small Peridynamic cylinder hit by projectile + +units si +boundary s s s +atom_style peri +atom_modify map array +neighbor 0.0010 bin + +# small target + +lattice sc 0.0005 +region target cylinder y 0.0 0.0 0.0050 -0.0050 0.0 units box +create_box 1 target +create_atoms 1 region target + +pair_style peri/pmb +pair_coeff * * 1.6863e22 0.0015001 0.0005 0.25 +set group all density 2200 +set group all volume 1.25e-10 +velocity all set 0.0 0.0 0.0 sum no units box +fix 1 all nve + +# spherical indenter to shatter target + +variable y0 equal 0.00155 +variable vy equal -100 +variable y equal "v_y0 + step*dt*v_vy" + +fix 2 all indent 1e17 sphere 0.0000 v_y 0.0000 0.0015 units box + +compute 1 all damage/atom +timestep 1.0e-7 +thermo 100 + +#dump 1 all custom 100 dump.peri id type x y z c_1 + +#dump 2 all image 50 image.*.jpg type type & +# axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 + +#dump 3 all movie 50 movie.mpg type type & +# axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 + +run 1000 diff --git a/examples/peri/in.peri.ves b/examples/peri/in.peri.ves new file mode 100644 index 0000000000..3787e676a4 --- /dev/null +++ b/examples/peri/in.peri.ves @@ -0,0 +1,45 @@ +# small Peridynamic cylinder hit by projectile + +units si +boundary s s s +atom_style peri +atom_modify map array +neighbor 0.0010 bin + +# small target + +lattice sc 0.0005 +region target cylinder y 0.0 0.0 0.0050 -0.0050 0.0 units box +create_box 1 target +create_atoms 1 region target + +pair_style peri/ves +pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 0.5 0.001 +set group all density 2200 +set group all volume 1.25e-10 +velocity all set 0.0 0.0 0.0 sum no units box +fix 1 all nve + +# spherical indenter to shatter target + +variable y0 equal 0.00155 +variable vy equal -100 +variable y equal "v_y0 + step*dt*v_vy" + +fix 2 all indent 1e17 sphere 0.0000 v_y 0.0000 0.0015 units box + +compute 1 all damage/atom +timestep 1.0e-7 +thermo 100 + +#dump 1 all custom 100 dump.peri id type x y z c_1 + +#dump 2 all image 50 image.*.jpg type type & +# axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 + +#dump 3 all movie 50 movie.mpg type type & +# axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 + +run 1000 diff --git a/examples/peri/log.6Jul17.peri.eps.g++.1 b/examples/peri/log.6Jul17.peri.eps.g++.1 new file mode 100644 index 0000000000..6aa4314d53 --- /dev/null +++ b/examples/peri/log.6Jul17.peri.eps.g++.1 @@ -0,0 +1,115 @@ +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# small Peridynamic cylinder hit by projectile + +units si +boundary s s s +atom_style peri +atom_modify map array +neighbor 0.0010 bin + +# small target + +lattice sc 0.0005 +Lattice spacing in x,y,z = 0.0005 0.0005 0.0005 +region target cylinder y 0.0 0.0 0.0050 -0.0050 0.0 units box +create_box 1 target +Created orthogonal box = (-0.005 -0.005 -0.005) to (0.005 0 0.005) + 1 by 1 by 1 MPI processor grid +create_atoms 1 region target +Created 3487 atoms + +pair_style peri/eps +pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 10.0e8 +set group all density 2200 + 3487 settings made for density +set group all volume 1.25e-10 + 3487 settings made for volume +velocity all set 0.0 0.0 0.0 sum no units box +fix 1 all nve + +# spherical indenter to shatter target + +variable y0 equal 0.00155 +variable vy equal -100 +variable y equal "v_y0 + step*dt*v_vy" + +fix 2 all indent 1e17 sphere 0.0000 v_y 0.0000 0.0015 units box + +compute 1 all damage/atom +timestep 1.0e-7 +thermo 100 + +#dump 1 all custom 100 dump.peri id type x y z c_1 + +#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 + +#dump 3 all movie 50 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 + +run 1000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0.0025001 + ghost atom cutoff = 0.0025001 + binsize = 0.00125005, bins = 9 5 9 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair peri/eps, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix PERI_NEIGH, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Peridynamic bonds: + total # of bonds = 335966 + bonds/atom = 96.3482 +Per MPI rank memory allocation (min/avg/max) = 50.29 | 50.29 | 50.29 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 0 0 0 0 0 5.0030006e-07 + 100 8.3466308e+24 247103.03 0 849681.45 8.0295601e+11 5.0030006e-07 + 200 1.1784921e+27 1098605.6 0 86178912 1.0246967e+14 5.5353162e-07 + 300 2.6263212e+27 4118581.6 0 1.9372377e+08 1.662415e+14 7.6036043e-07 + 400 3.3085888e+27 9397203.3 0 2.4825816e+08 1.561692e+14 1.0196674e-06 + 500 3.9151799e+27 18408722 0 3.0106204e+08 1.5298661e+14 1.2317127e-06 + 600 6.2936721e+27 11346143 0 4.6571282e+08 1.9645007e+14 1.5419242e-06 + 700 1.2721597e+28 3830223.2 0 9.2225588e+08 3.0235577e+14 2.0250441e-06 + 800 1.3190107e+28 2831668.7 0 9.5508099e+08 2.4853932e+14 2.5542553e-06 + 900 1.3166045e+28 1911868.6 0 9.524241e+08 1.9729649e+14 3.2117896e-06 + 1000 1.3159578e+28 1995827.6 0 9.5204114e+08 1.6722163e+14 3.7875695e-06 +Loop time of 72.5574 on 1 procs for 1000 steps with 3487 atoms + +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 71.779 | 71.779 | 71.779 | 0.0 | 98.93 +Neigh | 0.5596 | 0.5596 | 0.5596 | 0.0 | 0.77 +Comm | 0.0040631 | 0.0040631 | 0.0040631 | 0.0 | 0.01 +Output | 0.00056624 | 0.00056624 | 0.00056624 | 0.0 | 0.00 +Modify | 0.18403 | 0.18403 | 0.18403 | 0.0 | 0.25 +Other | | 0.03016 | | | 0.04 + +Nlocal: 3487 ave 3487 max 3487 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 569177 ave 569177 max 569177 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 1.20908e+06 ave 1.20908e+06 max 1.20908e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1209076 +Ave neighs/atom = 346.738 +Neighbor list builds = 40 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:01:12 diff --git a/examples/peri/log.6Jul17.peri.eps.g++.4 b/examples/peri/log.6Jul17.peri.eps.g++.4 new file mode 100644 index 0000000000..1423ec4637 --- /dev/null +++ b/examples/peri/log.6Jul17.peri.eps.g++.4 @@ -0,0 +1,115 @@ +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# small Peridynamic cylinder hit by projectile + +units si +boundary s s s +atom_style peri +atom_modify map array +neighbor 0.0010 bin + +# small target + +lattice sc 0.0005 +Lattice spacing in x,y,z = 0.0005 0.0005 0.0005 +region target cylinder y 0.0 0.0 0.0050 -0.0050 0.0 units box +create_box 1 target +Created orthogonal box = (-0.005 -0.005 -0.005) to (0.005 0 0.005) + 2 by 1 by 2 MPI processor grid +create_atoms 1 region target +Created 3487 atoms + +pair_style peri/eps +pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 10.0e8 +set group all density 2200 + 3487 settings made for density +set group all volume 1.25e-10 + 3487 settings made for volume +velocity all set 0.0 0.0 0.0 sum no units box +fix 1 all nve + +# spherical indenter to shatter target + +variable y0 equal 0.00155 +variable vy equal -100 +variable y equal "v_y0 + step*dt*v_vy" + +fix 2 all indent 1e17 sphere 0.0000 v_y 0.0000 0.0015 units box + +compute 1 all damage/atom +timestep 1.0e-7 +thermo 100 + +#dump 1 all custom 100 dump.peri id type x y z c_1 + +#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 + +#dump 3 all movie 50 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 + +run 1000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0.0025001 + ghost atom cutoff = 0.0025001 + binsize = 0.00125005, bins = 9 5 9 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair peri/eps, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix PERI_NEIGH, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Peridynamic bonds: + total # of bonds = 335966 + bonds/atom = 96.3482 +Per MPI rank memory allocation (min/avg/max) = 44.77 | 45.04 | 45.14 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 0 0 0 0 0 5.0030006e-07 + 100 8.3466308e+24 247103.03 0 849681.45 8.0295601e+11 5.0030006e-07 + 200 1.1784921e+27 1098605.6 0 86178912 1.0246967e+14 5.5353162e-07 + 300 2.6263212e+27 4118581.6 0 1.9372377e+08 1.662415e+14 7.6036043e-07 + 400 3.3085888e+27 9397203.3 0 2.4825816e+08 1.561692e+14 1.0196674e-06 + 500 3.9151799e+27 18408722 0 3.0106204e+08 1.5298661e+14 1.2317127e-06 + 600 6.2936721e+27 11346143 0 4.6571282e+08 1.9645007e+14 1.5419242e-06 + 700 1.2721597e+28 3830223.2 0 9.2225588e+08 3.0235577e+14 2.0250441e-06 + 800 1.3190107e+28 2831668.7 0 9.5508099e+08 2.4853932e+14 2.5542553e-06 + 900 1.3166045e+28 1911869.3 0 9.524241e+08 1.9729649e+14 3.2117896e-06 + 1000 1.3159578e+28 1995833.9 0 9.5204114e+08 1.6722163e+14 3.7875695e-06 +Loop time of 29.6266 on 4 procs for 1000 steps with 3487 atoms + +98.8% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 25.905 | 26.18 | 26.326 | 3.2 | 88.37 +Neigh | 0.15352 | 0.1872 | 0.22394 | 7.6 | 0.63 +Comm | 3.0374 | 3.1471 | 3.3731 | 7.5 | 10.62 +Output | 0.00047588 | 0.00062978 | 0.00097752 | 0.0 | 0.00 +Modify | 0.073521 | 0.081854 | 0.093222 | 2.7 | 0.28 +Other | | 0.02989 | | | 0.10 + +Nlocal: 871.75 ave 908 max 838 min +Histogram: 1 0 0 0 1 1 0 0 0 1 +Nghost: 1368.25 ave 1402 max 1332 min +Histogram: 1 0 0 0 1 1 0 0 0 1 +Neighs: 142294 ave 159233 max 124729 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +FullNghs: 302269 ave 346070 max 260820 min +Histogram: 1 0 0 0 2 0 0 0 0 1 + +Total # of neighbors = 1209076 +Ave neighs/atom = 346.738 +Neighbor list builds = 40 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:29 diff --git a/examples/peri/log.6Jul17.peri.lps.g++.1 b/examples/peri/log.6Jul17.peri.lps.g++.1 new file mode 100644 index 0000000000..4b2ac532d1 --- /dev/null +++ b/examples/peri/log.6Jul17.peri.lps.g++.1 @@ -0,0 +1,115 @@ +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# small Peridynamic cylinder hit by projectile + +units si +boundary s s s +atom_style peri +atom_modify map array +neighbor 0.0010 bin + +# small target + +lattice sc 0.0005 +Lattice spacing in x,y,z = 0.0005 0.0005 0.0005 +region target cylinder y 0.0 0.0 0.0050 -0.0050 0.0 units box +create_box 1 target +Created orthogonal box = (-0.005 -0.005 -0.005) to (0.005 0 0.005) + 1 by 1 by 1 MPI processor grid +create_atoms 1 region target +Created 3487 atoms + +pair_style peri/lps +pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 +set group all density 2200 + 3487 settings made for density +set group all volume 1.25e-10 + 3487 settings made for volume +velocity all set 0.0 0.0 0.0 sum no units box +fix 1 all nve + +# spherical indenter to shatter target + +variable y0 equal 0.00155 +variable vy equal -100 +variable y equal "v_y0 + step*dt*v_vy" + +fix 2 all indent 1e17 sphere 0.0000 v_y 0.0000 0.0015 units box + +compute 1 all damage/atom +timestep 1.0e-7 +thermo 100 + +#dump 1 all custom 100 dump.peri id type x y z c_1 + +#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 + +#dump 3 all movie 50 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 + +run 1000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0.0025001 + ghost atom cutoff = 0.0025001 + binsize = 0.00125005, bins = 9 5 9 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair peri/lps, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix PERI_NEIGH, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Peridynamic bonds: + total # of bonds = 335966 + bonds/atom = 96.3482 +Per MPI rank memory allocation (min/avg/max) = 34.91 | 34.91 | 34.91 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 0 0 0 0 0 5.0030006e-07 + 100 1.684629e+24 133446.65 0 255067.11 1.6206343e+11 5.0030006e-07 + 200 1.1380148e+27 684478.05 0 82842557 9.9178307e+13 5.5225839e-07 + 300 2.5659218e+27 5944645.9 0 1.9118934e+08 1.6231114e+14 7.6086254e-07 + 400 2.9916164e+27 13677434 0 2.2965481e+08 1.4081705e+14 1.0224963e-06 + 500 3.3570343e+27 11130894 0 2.5348933e+08 1.2577633e+14 1.2846002e-06 + 600 3.9506165e+27 6986672.5 0 2.9219831e+08 1.2659956e+14 1.5019096e-06 + 700 7.8366157e+27 11716082 0 5.7747436e+08 1.9480124e+14 1.9361899e-06 + 800 8.2483231e+27 4671647.2 0 6.0015282e+08 1.7040064e+14 2.3297298e-06 + 900 8.2720965e+27 1249680.9 0 5.9844715e+08 1.4117116e+14 2.8202052e-06 + 1000 8.2441462e+27 2278265.6 0 5.9745788e+08 1.234652e+14 3.213751e-06 +Loop time of 62.3833 on 1 procs for 1000 steps with 3487 atoms + +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 61.608 | 61.608 | 61.608 | 0.0 | 98.76 +Neigh | 0.57177 | 0.57177 | 0.57177 | 0.0 | 0.92 +Comm | 0.0030825 | 0.0030825 | 0.0030825 | 0.0 | 0.00 +Output | 0.00051951 | 0.00051951 | 0.00051951 | 0.0 | 0.00 +Modify | 0.17278 | 0.17278 | 0.17278 | 0.0 | 0.28 +Other | | 0.02745 | | | 0.04 + +Nlocal: 3487 ave 3487 max 3487 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 576568 ave 576568 max 576568 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 1.20908e+06 ave 1.20908e+06 max 1.20908e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1209076 +Ave neighs/atom = 346.738 +Neighbor list builds = 37 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:01:02 diff --git a/examples/peri/log.6Jul17.peri.lps.g++.4 b/examples/peri/log.6Jul17.peri.lps.g++.4 new file mode 100644 index 0000000000..04244f0123 --- /dev/null +++ b/examples/peri/log.6Jul17.peri.lps.g++.4 @@ -0,0 +1,115 @@ +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# small Peridynamic cylinder hit by projectile + +units si +boundary s s s +atom_style peri +atom_modify map array +neighbor 0.0010 bin + +# small target + +lattice sc 0.0005 +Lattice spacing in x,y,z = 0.0005 0.0005 0.0005 +region target cylinder y 0.0 0.0 0.0050 -0.0050 0.0 units box +create_box 1 target +Created orthogonal box = (-0.005 -0.005 -0.005) to (0.005 0 0.005) + 2 by 1 by 2 MPI processor grid +create_atoms 1 region target +Created 3487 atoms + +pair_style peri/lps +pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 +set group all density 2200 + 3487 settings made for density +set group all volume 1.25e-10 + 3487 settings made for volume +velocity all set 0.0 0.0 0.0 sum no units box +fix 1 all nve + +# spherical indenter to shatter target + +variable y0 equal 0.00155 +variable vy equal -100 +variable y equal "v_y0 + step*dt*v_vy" + +fix 2 all indent 1e17 sphere 0.0000 v_y 0.0000 0.0015 units box + +compute 1 all damage/atom +timestep 1.0e-7 +thermo 100 + +#dump 1 all custom 100 dump.peri id type x y z c_1 + +#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 + +#dump 3 all movie 50 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 + +run 1000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0.0025001 + ghost atom cutoff = 0.0025001 + binsize = 0.00125005, bins = 9 5 9 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair peri/lps, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix PERI_NEIGH, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Peridynamic bonds: + total # of bonds = 335966 + bonds/atom = 96.3482 +Per MPI rank memory allocation (min/avg/max) = 29.4 | 29.66 | 29.76 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 0 0 0 0 0 5.0030006e-07 + 100 1.684629e+24 133446.65 0 255067.11 1.6206343e+11 5.0030006e-07 + 200 1.1380148e+27 684478.05 0 82842557 9.9178307e+13 5.5225839e-07 + 300 2.5659218e+27 5944645.9 0 1.9118934e+08 1.6231114e+14 7.6086254e-07 + 400 2.9916164e+27 13677434 0 2.2965481e+08 1.4081705e+14 1.0224963e-06 + 500 3.3570343e+27 11130894 0 2.5348933e+08 1.2577633e+14 1.2846002e-06 + 600 3.9506165e+27 6986672.5 0 2.9219831e+08 1.2659956e+14 1.5019096e-06 + 700 7.8366157e+27 11716082 0 5.7747436e+08 1.9480124e+14 1.9361899e-06 + 800 8.2483231e+27 4671647.2 0 6.0015282e+08 1.7040064e+14 2.3297298e-06 + 900 8.2720965e+27 1249680.9 0 5.9844715e+08 1.4117116e+14 2.8202052e-06 + 1000 8.2441489e+27 2277476.2 0 5.9745729e+08 1.2346524e+14 3.213751e-06 +Loop time of 23.2656 on 4 procs for 1000 steps with 3487 atoms + +99.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 20.801 | 21.119 | 21.525 | 6.3 | 90.78 +Neigh | 0.13851 | 0.18557 | 0.22747 | 8.5 | 0.80 +Comm | 1.5175 | 1.8689 | 2.1386 | 18.0 | 8.03 +Output | 0.00049806 | 0.00059026 | 0.00071931 | 0.0 | 0.00 +Modify | 0.063441 | 0.066235 | 0.069135 | 0.9 | 0.28 +Other | | 0.02496 | | | 0.11 + +Nlocal: 871.75 ave 939 max 805 min +Histogram: 1 0 0 0 1 1 0 0 0 1 +Nghost: 1343.25 ave 1410 max 1276 min +Histogram: 1 0 0 0 1 1 0 0 0 1 +Neighs: 144142 ave 176488 max 113797 min +Histogram: 1 0 1 0 0 0 1 0 0 1 +FullNghs: 302269 ave 346070 max 260820 min +Histogram: 1 0 0 0 2 0 0 0 0 1 + +Total # of neighbors = 1209076 +Ave neighs/atom = 346.738 +Neighbor list builds = 37 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:23 diff --git a/examples/peri/log.5Oct16.peri.g++.1 b/examples/peri/log.6Jul17.peri.pmb.g++.1 similarity index 62% rename from examples/peri/log.5Oct16.peri.g++.1 rename to examples/peri/log.6Jul17.peri.pmb.g++.1 index 687876f97f..84a439674b 100644 --- a/examples/peri/log.5Oct16.peri.g++.1 +++ b/examples/peri/log.6Jul17.peri.pmb.g++.1 @@ -1,10 +1,11 @@ -LAMMPS (5 Oct 2016) +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task # small Peridynamic cylinder hit by projectile -units si +units si boundary s s s atom_style peri -atom_modify map array +atom_modify map array neighbor 0.0010 bin # small target @@ -41,24 +42,34 @@ thermo 100 #dump 1 all custom 100 dump.peri id type x y z c_1 -#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 -#dump_modify 2 pad 4 +#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 -#dump 3 all movie 50 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 -#dump_modify 3 pad 4 +#dump 3 all movie 50 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 run 1000 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 0.0025001 ghost atom cutoff = 0.0025001 - binsize = 0.00125005 -> bins = 9 5 9 + binsize = 0.00125005, bins = 9 5 9 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair peri/pmb, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix PERI_NEIGH, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard Peridynamic bonds: total # of bonds = 335966 bonds/atom = 96.3482 -Memory usage per processor = 26.6858 Mbytes +Per MPI rank memory allocation (min/avg/max) = 34.79 | 34.79 | 34.79 Mbytes Step Temp E_pair E_mol TotEng Press Volume 0 0 0 0 0 0 5.0030006e-07 100 1.7890585e+24 552721.8 0 681881.47 1.7210968e+11 5.0030006e-07 @@ -68,28 +79,28 @@ Step Temp E_pair E_mol TotEng Press Volume 500 4.2580877e+27 20212686 0 3.2762196e+08 1.6249923e+14 1.2611723e-06 600 5.5126512e+27 30861342 0 4.2884284e+08 1.7320038e+14 1.531873e-06 700 1.1807414e+28 23119941 0 8.7554687e+08 2.9477434e+14 1.9278632e-06 - 800 1.2424839e+28 2407361.6 0 8.994088e+08 2.3787786e+14 2.5138992e-06 - 900 1.2358395e+28 4532520.6 0 8.9673706e+08 1.9097312e+14 3.1145903e-06 - 1000 1.2341057e+28 3219939.5 0 8.9417279e+08 1.5968597e+14 3.7196039e-06 -Loop time of 20.3026 on 1 procs for 1000 steps with 3487 atoms + 800 1.2424839e+28 2407365.1 0 8.994088e+08 2.3787786e+14 2.5138992e-06 + 900 1.2358397e+28 4532424.3 0 8.9673716e+08 1.9097316e+14 3.1145903e-06 + 1000 1.2341048e+28 3219355.8 0 8.9417154e+08 1.5968585e+14 3.7196039e-06 +Loop time of 28.565 on 1 procs for 1000 steps with 3487 atoms -99.9% CPU use with 1 MPI tasks x no OpenMP threads +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 19.625 | 19.625 | 19.625 | 0.0 | 96.66 -Neigh | 0.57013 | 0.57013 | 0.57013 | 0.0 | 2.81 -Comm | 0.0014448 | 0.0014448 | 0.0014448 | 0.0 | 0.01 -Output | 0.00024772 | 0.00024772 | 0.00024772 | 0.0 | 0.00 -Modify | 0.092173 | 0.092173 | 0.092173 | 0.0 | 0.45 -Other | | 0.01359 | | | 0.07 +Pair | 27.721 | 27.721 | 27.721 | 0.0 | 97.04 +Neigh | 0.66353 | 0.66353 | 0.66353 | 0.0 | 2.32 +Comm | 0.0027969 | 0.0027969 | 0.0027969 | 0.0 | 0.01 +Output | 0.00042295 | 0.00042295 | 0.00042295 | 0.0 | 0.00 +Modify | 0.1566 | 0.1566 | 0.1566 | 0.0 | 0.55 +Other | | 0.02086 | | | 0.07 Nlocal: 3487 ave 3487 max 3487 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 567140 ave 567140 max 567140 min +Neighs: 567132 ave 567132 max 567132 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 1.20908e+06 ave 1.20908e+06 max 1.20908e+06 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -101,4 +112,4 @@ Dangerous builds = 0 Please see the log.cite file for references relevant to this simulation -Total wall time: 0:00:20 +Total wall time: 0:00:28 diff --git a/examples/peri/log.5Oct16.peri.g++.4 b/examples/peri/log.6Jul17.peri.pmb.g++.4 similarity index 58% rename from examples/peri/log.5Oct16.peri.g++.4 rename to examples/peri/log.6Jul17.peri.pmb.g++.4 index cb478772af..637b2cc26a 100644 --- a/examples/peri/log.5Oct16.peri.g++.4 +++ b/examples/peri/log.6Jul17.peri.pmb.g++.4 @@ -1,10 +1,11 @@ -LAMMPS (5 Oct 2016) +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task # small Peridynamic cylinder hit by projectile -units si +units si boundary s s s atom_style peri -atom_modify map array +atom_modify map array neighbor 0.0010 bin # small target @@ -41,24 +42,34 @@ thermo 100 #dump 1 all custom 100 dump.peri id type x y z c_1 -#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 -#dump_modify 2 pad 4 +#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 -#dump 3 all movie 50 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 -#dump_modify 3 pad 4 +#dump 3 all movie 50 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 run 1000 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 0.0025001 ghost atom cutoff = 0.0025001 - binsize = 0.00125005 -> bins = 9 5 9 + binsize = 0.00125005, bins = 9 5 9 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair peri/pmb, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix PERI_NEIGH, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard Peridynamic bonds: total # of bonds = 335966 bonds/atom = 96.3482 -Memory usage per processor = 26.9049 Mbytes +Per MPI rank memory allocation (min/avg/max) = 29.27 | 29.54 | 29.64 Mbytes Step Temp E_pair E_mol TotEng Press Volume 0 0 0 0 0 0 5.0030006e-07 100 1.7890585e+24 552721.8 0 681881.47 1.7210968e+11 5.0030006e-07 @@ -68,29 +79,29 @@ Step Temp E_pair E_mol TotEng Press Volume 500 4.2580877e+27 20212686 0 3.2762196e+08 1.6249923e+14 1.2611723e-06 600 5.5126512e+27 30861342 0 4.2884284e+08 1.7320038e+14 1.531873e-06 700 1.1807414e+28 23119941 0 8.7554687e+08 2.9477434e+14 1.9278632e-06 - 800 1.2424839e+28 2407361.5 0 8.994088e+08 2.3787786e+14 2.5138992e-06 - 900 1.2358395e+28 4532520.1 0 8.9673706e+08 1.9097312e+14 3.1145903e-06 - 1000 1.2341057e+28 3219974.3 0 8.9417286e+08 1.5968598e+14 3.7196039e-06 -Loop time of 5.91321 on 4 procs for 1000 steps with 3487 atoms + 800 1.2424839e+28 2407365.2 0 8.994088e+08 2.3787786e+14 2.5138992e-06 + 900 1.2358397e+28 4532423 0 8.9673716e+08 1.9097316e+14 3.1145903e-06 + 1000 1.2341048e+28 3219408.7 0 8.9417158e+08 1.5968585e+14 3.7196039e-06 +Loop time of 9.59889 on 4 procs for 1000 steps with 3487 atoms -99.6% CPU use with 4 MPI tasks x no OpenMP threads +99.2% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 4.5763 | 5.0164 | 5.502 | 15.8 | 84.83 -Neigh | 0.11212 | 0.14636 | 0.1811 | 7.8 | 2.48 -Comm | 0.18545 | 0.70922 | 1.1869 | 45.6 | 11.99 -Output | 0.00026011 | 0.00030977 | 0.00038433 | 0.3 | 0.01 -Modify | 0.028668 | 0.029356 | 0.030043 | 0.4 | 0.50 -Other | | 0.01158 | | | 0.20 - -Nlocal: 871.75 ave 920 max 824 min -Histogram: 1 0 0 1 0 0 1 0 0 1 -Nghost: 1343.25 ave 1391 max 1295 min -Histogram: 1 0 0 1 0 0 1 0 0 1 -Neighs: 141785 ave 170754 max 115891 min -Histogram: 1 1 0 0 0 0 0 1 0 1 +Pair | 7.9131 | 8.1341 | 8.3286 | 6.7 | 84.74 +Neigh | 0.19736 | 0.22539 | 0.25643 | 5.6 | 2.35 +Comm | 0.92843 | 1.1536 | 1.402 | 18.4 | 12.02 +Output | 0.00053358 | 0.00059688 | 0.00070548 | 0.0 | 0.01 +Modify | 0.060774 | 0.06358 | 0.068375 | 1.2 | 0.66 +Other | | 0.02165 | | | 0.23 + +Nlocal: 871.75 ave 920 max 829 min +Histogram: 1 0 0 0 2 0 0 0 0 1 +Nghost: 1343.25 ave 1386 max 1295 min +Histogram: 1 0 0 0 0 2 0 0 0 1 +Neighs: 141783 ave 157099 max 127518 min +Histogram: 2 0 0 0 0 0 0 0 1 1 FullNghs: 302269 ave 346070 max 260820 min Histogram: 1 0 0 0 2 0 0 0 0 1 @@ -101,4 +112,4 @@ Dangerous builds = 0 Please see the log.cite file for references relevant to this simulation -Total wall time: 0:00:05 +Total wall time: 0:00:09 diff --git a/examples/peri/log.6Jul17.peri.ves.g++.1 b/examples/peri/log.6Jul17.peri.ves.g++.1 new file mode 100644 index 0000000000..3d1d156d4a --- /dev/null +++ b/examples/peri/log.6Jul17.peri.ves.g++.1 @@ -0,0 +1,115 @@ +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# small Peridynamic cylinder hit by projectile + +units si +boundary s s s +atom_style peri +atom_modify map array +neighbor 0.0010 bin + +# small target + +lattice sc 0.0005 +Lattice spacing in x,y,z = 0.0005 0.0005 0.0005 +region target cylinder y 0.0 0.0 0.0050 -0.0050 0.0 units box +create_box 1 target +Created orthogonal box = (-0.005 -0.005 -0.005) to (0.005 0 0.005) + 1 by 1 by 1 MPI processor grid +create_atoms 1 region target +Created 3487 atoms + +pair_style peri/ves +pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 0.5 0.001 +set group all density 2200 + 3487 settings made for density +set group all volume 1.25e-10 + 3487 settings made for volume +velocity all set 0.0 0.0 0.0 sum no units box +fix 1 all nve + +# spherical indenter to shatter target + +variable y0 equal 0.00155 +variable vy equal -100 +variable y equal "v_y0 + step*dt*v_vy" + +fix 2 all indent 1e17 sphere 0.0000 v_y 0.0000 0.0015 units box + +compute 1 all damage/atom +timestep 1.0e-7 +thermo 100 + +#dump 1 all custom 100 dump.peri id type x y z c_1 + +#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 + +#dump 3 all movie 50 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 + +run 1000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0.0025001 + ghost atom cutoff = 0.0025001 + binsize = 0.00125005, bins = 9 5 9 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair peri/ves, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix PERI_NEIGH, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Peridynamic bonds: + total # of bonds = 335966 + bonds/atom = 96.3482 +Per MPI rank memory allocation (min/avg/max) = 65.41 | 65.41 | 65.41 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 0 0 0 0 0 5.0030006e-07 + 100 8.3392177e+24 247040.57 0 849083.8 8.0224286e+11 5.0030006e-07 + 200 1.1849022e+27 1158030.5 0 86701105 1.0301578e+14 5.5359205e-07 + 300 2.6287222e+27 4389155.1 0 1.9416767e+08 1.6636212e+14 7.6050375e-07 + 400 3.2718778e+27 7458219 0 2.4366885e+08 1.5439709e+14 1.0199269e-06 + 500 3.8413187e+27 6151611.4 0 2.8347258e+08 1.5008974e+14 1.2318007e-06 + 600 6.1409926e+27 18424316 0 4.6176842e+08 1.9507512e+14 1.5151227e-06 + 700 1.0046131e+28 11478344 0 7.3675086e+08 2.4228512e+14 1.9956447e-06 + 800 1.0402132e+28 4421233.6 0 7.5539495e+08 2.0512303e+14 2.4407262e-06 + 900 1.0419515e+28 7223261.3 0 7.594519e+08 1.6647307e+14 3.0124137e-06 + 1000 1.0503737e+28 2621490.6 0 7.6093049e+08 1.4315634e+14 3.5313793e-06 +Loop time of 77.2175 on 1 procs for 1000 steps with 3487 atoms + +99.4% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 76.421 | 76.421 | 76.421 | 0.0 | 98.97 +Neigh | 0.56616 | 0.56616 | 0.56616 | 0.0 | 0.73 +Comm | 0.0038247 | 0.0038247 | 0.0038247 | 0.0 | 0.00 +Output | 0.00051951 | 0.00051951 | 0.00051951 | 0.0 | 0.00 +Modify | 0.19434 | 0.19434 | 0.19434 | 0.0 | 0.25 +Other | | 0.03197 | | | 0.04 + +Nlocal: 3487 ave 3487 max 3487 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 561942 ave 561942 max 561942 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 1.20908e+06 ave 1.20908e+06 max 1.20908e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1209076 +Ave neighs/atom = 346.738 +Neighbor list builds = 37 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:01:17 diff --git a/examples/peri/log.6Jul17.peri.ves.g++.4 b/examples/peri/log.6Jul17.peri.ves.g++.4 new file mode 100644 index 0000000000..bd05d58e9f --- /dev/null +++ b/examples/peri/log.6Jul17.peri.ves.g++.4 @@ -0,0 +1,115 @@ +LAMMPS (6 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# small Peridynamic cylinder hit by projectile + +units si +boundary s s s +atom_style peri +atom_modify map array +neighbor 0.0010 bin + +# small target + +lattice sc 0.0005 +Lattice spacing in x,y,z = 0.0005 0.0005 0.0005 +region target cylinder y 0.0 0.0 0.0050 -0.0050 0.0 units box +create_box 1 target +Created orthogonal box = (-0.005 -0.005 -0.005) to (0.005 0 0.005) + 2 by 1 by 2 MPI processor grid +create_atoms 1 region target +Created 3487 atoms + +pair_style peri/ves +pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 0.5 0.001 +set group all density 2200 + 3487 settings made for density +set group all volume 1.25e-10 + 3487 settings made for volume +velocity all set 0.0 0.0 0.0 sum no units box +fix 1 all nve + +# spherical indenter to shatter target + +variable y0 equal 0.00155 +variable vy equal -100 +variable y equal "v_y0 + step*dt*v_vy" + +fix 2 all indent 1e17 sphere 0.0000 v_y 0.0000 0.0015 units box + +compute 1 all damage/atom +timestep 1.0e-7 +thermo 100 + +#dump 1 all custom 100 dump.peri id type x y z c_1 + +#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 2 pad 4 + +#dump 3 all movie 50 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 adiam 0.0006 +#dump_modify 3 pad 4 + +run 1000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0.0025001 + ghost atom cutoff = 0.0025001 + binsize = 0.00125005, bins = 9 5 9 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair peri/ves, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix PERI_NEIGH, occasional + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Peridynamic bonds: + total # of bonds = 335966 + bonds/atom = 96.3482 +Per MPI rank memory allocation (min/avg/max) = 59.9 | 60.16 | 60.26 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 0 0 0 0 0 5.0030006e-07 + 100 8.3392177e+24 247040.57 0 849083.8 8.0224286e+11 5.0030006e-07 + 200 1.1849022e+27 1158030.5 0 86701105 1.0301578e+14 5.5359205e-07 + 300 2.6287222e+27 4389155.1 0 1.9416767e+08 1.6636212e+14 7.6050375e-07 + 400 3.2718778e+27 7458219 0 2.4366885e+08 1.5439709e+14 1.0199269e-06 + 500 3.8413187e+27 6151611.4 0 2.8347258e+08 1.5008974e+14 1.2318007e-06 + 600 6.1409926e+27 18424316 0 4.6176842e+08 1.9507512e+14 1.5151227e-06 + 700 1.0046131e+28 11478344 0 7.3675086e+08 2.4228512e+14 1.9956447e-06 + 800 1.0402132e+28 4421233.6 0 7.5539495e+08 2.0512303e+14 2.4407262e-06 + 900 1.0419515e+28 7223258.7 0 7.594519e+08 1.6647307e+14 3.0124137e-06 + 1000 1.0503738e+28 2621480.4 0 7.6093057e+08 1.4315636e+14 3.5313793e-06 +Loop time of 25.9768 on 4 procs for 1000 steps with 3487 atoms + +99.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 22.455 | 23.348 | 24.175 | 14.1 | 89.88 +Neigh | 0.14472 | 0.18294 | 0.2299 | 8.6 | 0.70 +Comm | 1.4715 | 2.3485 | 3.2075 | 44.8 | 9.04 +Output | 0.000489 | 0.00059682 | 0.0007987 | 0.0 | 0.00 +Modify | 0.063634 | 0.071411 | 0.076907 | 1.9 | 0.27 +Other | | 0.02506 | | | 0.10 + +Nlocal: 871.75 ave 896 max 852 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Nghost: 1293.25 ave 1313 max 1269 min +Histogram: 1 0 1 0 0 0 0 0 0 2 +Neighs: 140486 ave 167239 max 121255 min +Histogram: 2 0 0 0 0 0 1 0 0 1 +FullNghs: 302269 ave 346070 max 260820 min +Histogram: 1 0 0 0 2 0 0 0 0 1 + +Total # of neighbors = 1209076 +Ave neighs/atom = 346.738 +Neighbor list builds = 37 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:26 -- GitLab From 522bc13d678627d3e4af071f4a0daf1231f06021 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Jul 2017 13:47:49 -0400 Subject: [PATCH 477/593] avoid casts to the wrong derived class, which upsets code analysis tools. seems to improve performance, too. --- src/PERI/fix_peri_neigh.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/PERI/fix_peri_neigh.cpp b/src/PERI/fix_peri_neigh.cpp index a84ce31609..d92f355c53 100644 --- a/src/PERI/fix_peri_neigh.cpp +++ b/src/PERI/fix_peri_neigh.cpp @@ -302,9 +302,15 @@ void FixPeriNeigh::setup(int vflag) double **x0 = atom->x0; double half_lc = 0.5*(domain->lattice->xlattice); double vfrac_scale; - PairPeriLPS *pairlps = static_cast(anypair); - PairPeriVES *pairves = static_cast(anypair); - PairPeriEPS *paireps = static_cast(anypair); + PairPeriLPS *pairlps = NULL; + PairPeriVES *pairves = NULL; + PairPeriEPS *paireps = NULL; + if (isLPS) + pairlps = static_cast(anypair); + else if (isVES) + pairves = static_cast(anypair); + else if (isEPS) + paireps = static_cast(anypair); for (i = 0; i < nlocal; i++) { double xtmp0 = x0[i][0]; -- GitLab From e084d4dad633b3fac81a9b66b0081507aa3b2b81 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Jul 2017 13:48:21 -0400 Subject: [PATCH 478/593] print warnings in Pair::init() only on MPI rank 0 --- src/pair.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pair.cpp b/src/pair.cpp index 06792060ce..ce711c4f5d 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -196,10 +196,10 @@ void Pair::init() error->all(FLERR,"Cannot use pair tail corrections with 2d simulations"); if (tail_flag && domain->nonperiodic && comm->me == 0) error->warning(FLERR,"Using pair tail corrections with nonperiodic system"); - if (!compute_flag && tail_flag) + if (!compute_flag && tail_flag && comm->me == 0) error->warning(FLERR,"Using pair tail corrections with " "pair_modify compute no"); - if (!compute_flag && offset_flag) + if (!compute_flag && offset_flag && comm->me == 0) error->warning(FLERR,"Using pair potential shift with " "pair_modify compute no"); -- GitLab From a04711b21f06b78270f852bb62beed12eb7e4475 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Jul 2017 13:49:28 -0400 Subject: [PATCH 479/593] do not allow pairwise cutoffs <= 0.0. avoids undefined behavior and division by zero errors --- src/pair.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pair.cpp b/src/pair.cpp index ce711c4f5d..21c8fe00e5 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -242,6 +242,7 @@ void Pair::init() for (i = 1; i <= atom->ntypes; i++) for (j = i; j <= atom->ntypes; j++) { cut = init_one(i,j); + if (cut <= 0.0) error->all(FLERR,"Illegal pair style cutoff <= 0.0"); cutsq[i][j] = cutsq[j][i] = cut*cut; cutforce = MAX(cutforce,cut); if (tail_flag) { -- GitLab From 1c92eecea7fca7ac5c479c5cfd0cf7436d38d19a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Jul 2017 14:01:41 -0400 Subject: [PATCH 480/593] move updated gauss_flow example to the correct folder --- examples/USER/flow_gauss/README | 45 --- examples/USER/flow_gauss/in.GD | 262 ------------------ examples/USER/misc/flow_gauss/README | 52 ++-- examples/USER/misc/flow_gauss/in.GD | 256 ++++++++--------- .../{ => misc}/flow_gauss/log.6Jul17.GD.g++.1 | 0 .../{ => misc}/flow_gauss/log.6Jul17.GD.g++.4 | 0 .../{ => misc}/flow_gauss/output-files/GD.out | 0 .../flow_gauss/output-files/Vy_profile | 0 .../flow_gauss/output-files/x_profiles | 0 9 files changed, 156 insertions(+), 459 deletions(-) delete mode 100644 examples/USER/flow_gauss/README delete mode 100644 examples/USER/flow_gauss/in.GD mode change 100755 => 100644 examples/USER/misc/flow_gauss/in.GD rename examples/USER/{ => misc}/flow_gauss/log.6Jul17.GD.g++.1 (100%) rename examples/USER/{ => misc}/flow_gauss/log.6Jul17.GD.g++.4 (100%) rename examples/USER/{ => misc}/flow_gauss/output-files/GD.out (100%) rename examples/USER/{ => misc}/flow_gauss/output-files/Vy_profile (100%) rename examples/USER/{ => misc}/flow_gauss/output-files/x_profiles (100%) diff --git a/examples/USER/flow_gauss/README b/examples/USER/flow_gauss/README deleted file mode 100644 index ef7cc82d96..0000000000 --- a/examples/USER/flow_gauss/README +++ /dev/null @@ -1,45 +0,0 @@ -The input script in.GD is an example simulation using Gaussian dynamics (GD). -The simulation is of a simple 2d Lennard-Jones fluid flowing through a pipe. -For details see online LAMMPS documentation and -Strong and Eaves, J. Phys. Chem. Lett. 7(10) 2016, p. 1907. - -Note that the run times and box size are chosen to allow a fast example run. -They are not adequate for a real simulation. - -The script has the following parts: -1) initialize variables - These can be modified to customize the simulation. Note that if the - pipe dimensions L or d are changed, the geometry should be checked - by visualizing the coordinates in all.init.lammpstrj. - -2) create box - -3) set up potential - -4) create atoms - -5) set up profile-unbiased thermostat (PUT) - see Evans and Morriss, Phys. Rev. Lett. 56(20) 1986, p. 2172 - By default, this uses boxes which contain on average 8 molecules. - -6) equilibrate without GD - -7) initialize the center-of-mass velocity and run to achieve steady-state - The system is initialized with a uniform velocity profile, which - relaxes over the course of the simulation. - -8) collect data - The data is output in several files: - GD.out contains the force that GD applies, and the flux in the x- and - y- directions. The output Jx should be equal to the value of - J set in section 1, which is 0.1 by default. - x_profiles contains the velocity, density, and pressure profiles in - the x-direction. The pressure profile is given by - (-1/2V)*(c_spa[1] + c_spa[2]), where V is the volume of a - slice. The pressure profile is computed with IK1, see - Todd, Evans, and Davis, Phys. Rev. E 52(2) 1995, p. 1627. - Note that to compare with the pump method, or to - compute a pressure drop, you must correct this pressure - profile as described in Strong 2016 above. - Vy_profile is the velocity profile inside the pipe along the - y-direction, u_x(y). diff --git a/examples/USER/flow_gauss/in.GD b/examples/USER/flow_gauss/in.GD deleted file mode 100644 index bcff4d4c57..0000000000 --- a/examples/USER/flow_gauss/in.GD +++ /dev/null @@ -1,262 +0,0 @@ -#LAMMPS input script -#in.GD -#see README for details - -############################################################################### -#initialize variables -clear - -#frequency for outputting info (timesteps) -variable dump_rate equal 50 -variable thermo_rate equal 10 - -#equilibration time (timesteps) -variable equil equal 1000 - -#stabilization time (timesteps to reach steady-state) -variable stabil equal 1000 - -#data collection time (timesteps) -variable run equal 2000 - -#length of pipe -variable L equal 30 - -#width of pipe -variable d equal 20 - -#flux (mass/sigma*tau) -variable J equal 0.1 - -#simulation box dimensions -variable Lx equal 100 -variable Ly equal 40 - -#bulk fluid density -variable dens equal 0.8 - -#lattice spacing for wall atoms -variable aWall equal 1.0 #1.7472 - -#timestep -variable ts equal 0.001 - -#temperature -variable T equal 2.0 - -#thermostat damping constant -variable tdamp equal ${ts}*100 - -units lj -dimension 2 -atom_style atomic - - -############################################################################### -#create box - -#create lattice with the spacing aWall -variable rhoWall equal ${aWall}^(-2) -lattice sq ${rhoWall} - -#modify input dimensions to be multiples of aWall -variable L1 equal round($L/${aWall})*${aWall} -variable d1 equal round($d/${aWall})*${aWall} -variable Ly1 equal round(${Ly}/${aWall})*${aWall} -variable Lx1 equal round(${Lx}/${aWall})*${aWall} - -#create simulation box -variable lx2 equal ${Lx1}/2 -variable ly2 equal ${Ly1}/2 -region simbox block -${lx2} ${lx2} -${ly2} ${ly2} 0 0.1 units box -create_box 2 simbox - -##################################################################### -#set up potential - -mass 1 1.0 #fluid atoms -mass 2 1.0 #wall atoms - -pair_style lj/cut 2.5 -pair_modify shift yes -pair_coeff 1 1 1.0 1.0 2.5 -pair_coeff 1 2 1.0 1.0 1.12246 -pair_coeff 2 2 0.0 0.0 - -neigh_modify exclude type 2 2 - -timestep ${ts} - -##################################################################### -#create atoms - -#create wall atoms everywhere -create_atoms 2 box - -#define region which is "walled off" -variable dhalf equal ${d1}/2 -variable Lhalf equal ${L1}/2 -region walltop block -${Lhalf} ${Lhalf} ${dhalf} EDGE -0.1 0.1 & - units box -region wallbot block -${Lhalf} ${Lhalf} EDGE -${dhalf} -0.1 0.1 & - units box -region outsidewall union 2 walltop wallbot side out - -#remove wall atoms outside wall region -group outside region outsidewall -delete_atoms group outside - -#remove wall atoms that aren't on edge of wall region -variable x1 equal ${Lhalf}-${aWall} -variable y1 equal ${dhalf}+${aWall} -region insideTop block -${x1} ${x1} ${y1} EDGE -0.1 0.1 units box -region insideBot block -${x1} ${x1} EDGE -${y1} -0.1 0.1 units box -region insideWall union 2 insideTop insideBot -group insideWall region insideWall -delete_atoms group insideWall - -#define new lattice, to give correct fluid density -#y lattice const must be a multiple of aWall -variable atrue equal ${dens}^(-1/2) -variable ay equal round(${atrue}/${aWall})*${aWall} - -#choose x lattice const to give correct density -variable ax equal (${ay}*${dens})^(-1) - -#change Lx to be multiple of ax -variable Lx1 equal round(${Lx}/${ax})*${ax} -variable lx2 equal ${Lx1}/2 -change_box all x final -${lx2} ${lx2} units box - -#define new lattice -lattice custom ${dens} & - a1 ${ax} 0.0 0.0 a2 0.0 ${ay} 0.0 a3 0.0 0.0 1.0 & - basis 0.0 0.0 0.0 - -#fill in rest of box with bulk particles -variable delta equal 0.001 -variable Ldelt equal ${Lhalf}+${delta} -variable dDelt equal ${dhalf}-${delta} -region left block EDGE -${Ldelt} EDGE EDGE -0.1 0.1 units box -region right block ${Ldelt} EDGE EDGE EDGE -0.1 0.1 units box -region pipe block -${Ldelt} ${Ldelt} -${dDelt} ${dDelt} -0.1 0.1 & - units box - -region bulk union 3 left pipe right -create_atoms 1 region bulk - -group bulk type 1 -group wall type 2 - -#remove atoms that are too close to wall -delete_atoms overlap 0.9 bulk wall - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes -neigh_modify exclude group wall wall - -velocity bulk create $T 78915 dist gaussian rot yes mom yes loop geom - -##################################################################### -#set up PUT -#see Evans and Morriss, Phys. Rev. Lett. 56(20) 1986, p. 2172 - -#average number of particles per box, Evans and Morriss used 2.0 -variable NperBox equal 8.0 - -#calculate box sizes -variable boxSide equal sqrt(${NperBox}/${dens}) -variable nX equal round(lx/${boxSide}) -variable nY equal round(ly/${boxSide}) -variable dX equal lx/${nX} -variable dY equal ly/${nY} - -#temperature of fluid (excluding wall) -compute myT bulk temp - -#profile-unbiased temperature of fluid -compute myTp bulk temp/profile 1 1 0 xy ${nX} ${nY} - -#thermo setup -thermo ${thermo_rate} -thermo_style custom step c_myT c_myTp etotal press - -#dump initial configuration -# dump 55 all custom 1 all.init.lammpstrj id type x y z vx vy vz -# dump 56 wall custom 1 wall.init.lammpstrj id type x y z -# dump_modify 55 sort id -# dump_modify 56 sort id -run 0 -# undump 55 -# undump 56 - -##################################################################### -#equilibrate without GD - -fix nvt bulk nvt temp $T $T ${tdamp} -fix_modify nvt temp myTp -fix 2 bulk enforce2d - -run ${equil} - -##################################################################### -#initialize the COM velocity and run to achieve steady-state - -#calculate velocity to add: V=J/rho_total -variable Vadd equal $J*lx*ly/count(bulk) - -#first remove any COM velocity, then add back the streaming velocity -velocity bulk zero linear -velocity bulk set ${Vadd} 0.0 0.0 units box sum yes mom no - -fix GD bulk flow/gauss 1 0 0 #energy yes -#fix_modify GD energy yes - -run ${stabil} - -##################################################################### -#collect data - -#print the applied force and total flux to ensure conservation of Jx -variable Fapp equal f_GD[1] -compute vxBulk bulk reduce sum vx -compute vyBulk bulk reduce sum vy -variable invVol equal 1.0/(lx*ly) -variable jx equal c_vxBulk*${invVol} -variable jy equal c_vyBulk*${invVol} -variable curr_step equal step -variable p_Fapp format Fapp %.3f -variable p_jx format jx %.5g -variable p_jy format jy %.5g -fix print_vCOM all print ${dump_rate} & - "${curr_step} ${p_Fapp} ${p_jx} ${p_jy}" file GD.out screen no & - title "timestep Fapp Jx Jy" - -#compute IK1 pressure profile -#see Todd, Evans, and Davis, Phys. Rev. E 52(2) 1995, p. 1627 -#use profile-unbiased temperature to remove the streaming velocity -#from the kinetic part of the pressure -compute spa bulk stress/atom myTp - -#for the pressure profile, use the same grid as the PUT -compute chunkX bulk chunk/atom bin/1d x lower ${dX} units box - -#output pressure profile and other profiles -#the pressure profile is (-1/2V)*(c_spa[1] + c_spa[2]), where -#V is the volume of a slice -fix profiles bulk ave/chunk 1 1 ${dump_rate} chunkX & - vx density/mass c_spa[1] c_spa[2] & - file x_profiles ave running overwrite - -#compute velocity profile across the pipe with a finer grid -variable dYnew equal ${dY}/10 -compute chunkY bulk chunk/atom bin/1d y center ${dYnew} units box & - region pipe -fix velYprof bulk ave/chunk 1 1 ${dump_rate} chunkY & - vx file Vy_profile ave running overwrite - -#full trajectory -# dump 7 bulk custom ${dump_rate} bulk.lammpstrj id type x y z -# dump_modify 7 sort id - -run ${run} diff --git a/examples/USER/misc/flow_gauss/README b/examples/USER/misc/flow_gauss/README index 4966cd2dc9..ef7cc82d96 100644 --- a/examples/USER/misc/flow_gauss/README +++ b/examples/USER/misc/flow_gauss/README @@ -1,45 +1,45 @@ The input script in.GD is an example simulation using Gaussian dynamics (GD). The simulation is of a simple 2d Lennard-Jones fluid flowing through a pipe. -For details see online LAMMPS documentation and +For details see online LAMMPS documentation and Strong and Eaves, J. Phys. Chem. Lett. 7(10) 2016, p. 1907. -Note that the run times and box size are chosen to allow a fast example run. -They are not adequate for a real simulation. +Note that the run times and box size are chosen to allow a fast example run. +They are not adequate for a real simulation. The script has the following parts: 1) initialize variables - These can be modified to customize the simulation. Note that if the - pipe dimensions L or d are changed, the geometry should be checked - by visualizing the coordinates in all.init.lammpstrj. + These can be modified to customize the simulation. Note that if the + pipe dimensions L or d are changed, the geometry should be checked + by visualizing the coordinates in all.init.lammpstrj. 2) create box - + 3) set up potential 4) create atoms 5) set up profile-unbiased thermostat (PUT) - see Evans and Morriss, Phys. Rev. Lett. 56(20) 1986, p. 2172 - By default, this uses boxes which contain on average 8 molecules. + see Evans and Morriss, Phys. Rev. Lett. 56(20) 1986, p. 2172 + By default, this uses boxes which contain on average 8 molecules. 6) equilibrate without GD - + 7) initialize the center-of-mass velocity and run to achieve steady-state - The system is initialized with a uniform velocity profile, which - relaxes over the course of the simulation. + The system is initialized with a uniform velocity profile, which + relaxes over the course of the simulation. 8) collect data - The data is output in several files: - GD.out contains the force that GD applies, and the flux in the x- and - y- directions. The output Jx should be equal to the value of - J set in section 1, which is 0.1 by default. - x_profiles contains the velocity, density, and pressure profiles in - the x-direction. The pressure profile is given by - (-1/2V)*(c_spa[1] + c_spa[2]), where V is the volume of a - slice. The pressure profile is computed with IK1, see - Todd, Evans, and Davis, Phys. Rev. E 52(2) 1995, p. 1627. - Note that to compare with the pump method, or to - compute a pressure drop, you must correct this pressure - profile as described in Strong 2016 above. - Vy_profile is the velocity profile inside the pipe along the - y-direction, u_x(y). + The data is output in several files: + GD.out contains the force that GD applies, and the flux in the x- and + y- directions. The output Jx should be equal to the value of + J set in section 1, which is 0.1 by default. + x_profiles contains the velocity, density, and pressure profiles in + the x-direction. The pressure profile is given by + (-1/2V)*(c_spa[1] + c_spa[2]), where V is the volume of a + slice. The pressure profile is computed with IK1, see + Todd, Evans, and Davis, Phys. Rev. E 52(2) 1995, p. 1627. + Note that to compare with the pump method, or to + compute a pressure drop, you must correct this pressure + profile as described in Strong 2016 above. + Vy_profile is the velocity profile inside the pipe along the + y-direction, u_x(y). diff --git a/examples/USER/misc/flow_gauss/in.GD b/examples/USER/misc/flow_gauss/in.GD old mode 100755 new mode 100644 index 8117715c12..bcff4d4c57 --- a/examples/USER/misc/flow_gauss/in.GD +++ b/examples/USER/misc/flow_gauss/in.GD @@ -7,83 +7,85 @@ clear #frequency for outputting info (timesteps) -variable dump_rate equal 50 -variable thermo_rate equal 10 +variable dump_rate equal 50 +variable thermo_rate equal 10 #equilibration time (timesteps) -variable equil equal 1000 +variable equil equal 1000 #stabilization time (timesteps to reach steady-state) -variable stabil equal 1000 +variable stabil equal 1000 #data collection time (timesteps) -variable run equal 2000 +variable run equal 2000 #length of pipe -variable L equal 30 +variable L equal 30 #width of pipe -variable d equal 20 +variable d equal 20 #flux (mass/sigma*tau) -variable J equal 0.1 +variable J equal 0.1 #simulation box dimensions -variable Lx equal 100 -variable Ly equal 40 +variable Lx equal 100 +variable Ly equal 40 #bulk fluid density -variable dens equal 0.8 +variable dens equal 0.8 #lattice spacing for wall atoms -variable aWall equal 1.0 #1.7472 +variable aWall equal 1.0 #1.7472 #timestep -variable ts equal 0.001 +variable ts equal 0.001 #temperature -variable T equal 2.0 +variable T equal 2.0 #thermostat damping constant -variable tdamp equal ${ts}*100 +variable tdamp equal ${ts}*100 -units lj -dimension 2 -atom_style atomic +units lj +dimension 2 +atom_style atomic ############################################################################### #create box #create lattice with the spacing aWall -variable rhoWall equal ${aWall}^(-2) -lattice sq ${rhoWall} +variable rhoWall equal ${aWall}^(-2) +lattice sq ${rhoWall} #modify input dimensions to be multiples of aWall -variable L1 equal round($L/${aWall})*${aWall} -variable d1 equal round($d/${aWall})*${aWall} -variable Ly1 equal round(${Ly}/${aWall})*${aWall} -variable Lx1 equal round(${Lx}/${aWall})*${aWall} +variable L1 equal round($L/${aWall})*${aWall} +variable d1 equal round($d/${aWall})*${aWall} +variable Ly1 equal round(${Ly}/${aWall})*${aWall} +variable Lx1 equal round(${Lx}/${aWall})*${aWall} #create simulation box -variable lx2 equal ${Lx1}/2 -variable ly2 equal ${Ly1}/2 -region simbox block -${lx2} ${lx2} -${ly2} ${ly2} 0 0.1 units box -create_box 2 simbox +variable lx2 equal ${Lx1}/2 +variable ly2 equal ${Ly1}/2 +region simbox block -${lx2} ${lx2} -${ly2} ${ly2} 0 0.1 units box +create_box 2 simbox ##################################################################### #set up potential -mass 1 1.0 #fluid atoms -mass 2 1.0 #wall atoms +mass 1 1.0 #fluid atoms +mass 2 1.0 #wall atoms -pair_style lj/cut 2.5 -pair_modify shift yes -pair_coeff 1 1 1.0 1.0 2.5 -pair_coeff 1 2 1.0 1.0 1.12246 -pair_coeff 2 2 0.0 0.0 0.0 +pair_style lj/cut 2.5 +pair_modify shift yes +pair_coeff 1 1 1.0 1.0 2.5 +pair_coeff 1 2 1.0 1.0 1.12246 +pair_coeff 2 2 0.0 0.0 -timestep ${ts} +neigh_modify exclude type 2 2 + +timestep ${ts} ##################################################################### #create atoms @@ -92,167 +94,169 @@ timestep ${ts} create_atoms 2 box #define region which is "walled off" -variable dhalf equal ${d1}/2 -variable Lhalf equal ${L1}/2 -region walltop block -${Lhalf} ${Lhalf} ${dhalf} EDGE -0.1 0.1 & - units box -region wallbot block -${Lhalf} ${Lhalf} EDGE -${dhalf} -0.1 0.1 & - units box -region outsidewall union 2 walltop wallbot side out +variable dhalf equal ${d1}/2 +variable Lhalf equal ${L1}/2 +region walltop block -${Lhalf} ${Lhalf} ${dhalf} EDGE -0.1 0.1 & + units box +region wallbot block -${Lhalf} ${Lhalf} EDGE -${dhalf} -0.1 0.1 & + units box +region outsidewall union 2 walltop wallbot side out #remove wall atoms outside wall region -group outside region outsidewall -delete_atoms group outside +group outside region outsidewall +delete_atoms group outside #remove wall atoms that aren't on edge of wall region -variable x1 equal ${Lhalf}-${aWall} -variable y1 equal ${dhalf}+${aWall} -region insideTop block -${x1} ${x1} ${y1} EDGE -0.1 0.1 units box -region insideBot block -${x1} ${x1} EDGE -${y1} -0.1 0.1 units box -region insideWall union 2 insideTop insideBot -group insideWall region insideWall -delete_atoms group insideWall +variable x1 equal ${Lhalf}-${aWall} +variable y1 equal ${dhalf}+${aWall} +region insideTop block -${x1} ${x1} ${y1} EDGE -0.1 0.1 units box +region insideBot block -${x1} ${x1} EDGE -${y1} -0.1 0.1 units box +region insideWall union 2 insideTop insideBot +group insideWall region insideWall +delete_atoms group insideWall #define new lattice, to give correct fluid density #y lattice const must be a multiple of aWall -variable atrue equal ${dens}^(-1/2) -variable ay equal round(${atrue}/${aWall})*${aWall} +variable atrue equal ${dens}^(-1/2) +variable ay equal round(${atrue}/${aWall})*${aWall} #choose x lattice const to give correct density -variable ax equal (${ay}*${dens})^(-1) +variable ax equal (${ay}*${dens})^(-1) #change Lx to be multiple of ax -variable Lx1 equal round(${Lx}/${ax})*${ax} -variable lx2 equal ${Lx1}/2 -change_box all x final -${lx2} ${lx2} units box +variable Lx1 equal round(${Lx}/${ax})*${ax} +variable lx2 equal ${Lx1}/2 +change_box all x final -${lx2} ${lx2} units box #define new lattice -lattice custom ${dens} & - a1 ${ax} 0.0 0.0 a2 0.0 ${ay} 0.0 a3 0.0 0.0 1.0 & - basis 0.0 0.0 0.0 +lattice custom ${dens} & + a1 ${ax} 0.0 0.0 a2 0.0 ${ay} 0.0 a3 0.0 0.0 1.0 & + basis 0.0 0.0 0.0 #fill in rest of box with bulk particles -variable delta equal 0.001 -variable Ldelt equal ${Lhalf}+${delta} -variable dDelt equal ${dhalf}-${delta} -region left block EDGE -${Ldelt} EDGE EDGE -0.1 0.1 units box -region right block ${Ldelt} EDGE EDGE EDGE -0.1 0.1 units box -region pipe block -${Ldelt} ${Ldelt} -${dDelt} ${dDelt} -0.1 0.1 & - units box +variable delta equal 0.001 +variable Ldelt equal ${Lhalf}+${delta} +variable dDelt equal ${dhalf}-${delta} +region left block EDGE -${Ldelt} EDGE EDGE -0.1 0.1 units box +region right block ${Ldelt} EDGE EDGE EDGE -0.1 0.1 units box +region pipe block -${Ldelt} ${Ldelt} -${dDelt} ${dDelt} -0.1 0.1 & + units box -region bulk union 3 left pipe right -create_atoms 1 region bulk +region bulk union 3 left pipe right +create_atoms 1 region bulk -group bulk type 1 -group wall type 2 +group bulk type 1 +group wall type 2 #remove atoms that are too close to wall delete_atoms overlap 0.9 bulk wall -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes neigh_modify exclude group wall wall -velocity bulk create $T 78915 dist gaussian rot yes mom yes loop geom +velocity bulk create $T 78915 dist gaussian rot yes mom yes loop geom ##################################################################### #set up PUT #see Evans and Morriss, Phys. Rev. Lett. 56(20) 1986, p. 2172 #average number of particles per box, Evans and Morriss used 2.0 -variable NperBox equal 8.0 +variable NperBox equal 8.0 #calculate box sizes -variable boxSide equal sqrt(${NperBox}/${dens}) -variable nX equal round(lx/${boxSide}) -variable nY equal round(ly/${boxSide}) -variable dX equal lx/${nX} -variable dY equal ly/${nY} +variable boxSide equal sqrt(${NperBox}/${dens}) +variable nX equal round(lx/${boxSide}) +variable nY equal round(ly/${boxSide}) +variable dX equal lx/${nX} +variable dY equal ly/${nY} #temperature of fluid (excluding wall) -compute myT bulk temp +compute myT bulk temp #profile-unbiased temperature of fluid -compute myTp bulk temp/profile 1 1 0 xy ${nX} ${nY} +compute myTp bulk temp/profile 1 1 0 xy ${nX} ${nY} #thermo setup -thermo ${thermo_rate} -thermo_style custom step c_myT c_myTp etotal press +thermo ${thermo_rate} +thermo_style custom step c_myT c_myTp etotal press #dump initial configuration -dump 55 all custom 1 all.init.lammpstrj id type x y z vx vy vz -dump 56 wall custom 1 wall.init.lammpstrj id type x y z -dump_modify 55 sort id -dump_modify 56 sort id -run 0 -undump 55 -undump 56 +# dump 55 all custom 1 all.init.lammpstrj id type x y z vx vy vz +# dump 56 wall custom 1 wall.init.lammpstrj id type x y z +# dump_modify 55 sort id +# dump_modify 56 sort id +run 0 +# undump 55 +# undump 56 ##################################################################### #equilibrate without GD -fix nvt bulk nvt temp $T $T ${tdamp} -fix_modify nvt temp myTp -fix 2 bulk enforce2d +fix nvt bulk nvt temp $T $T ${tdamp} +fix_modify nvt temp myTp +fix 2 bulk enforce2d -run ${equil} +run ${equil} ##################################################################### #initialize the COM velocity and run to achieve steady-state #calculate velocity to add: V=J/rho_total -variable Vadd equal $J*lx*ly/count(bulk) +variable Vadd equal $J*lx*ly/count(bulk) #first remove any COM velocity, then add back the streaming velocity velocity bulk zero linear -velocity bulk set ${Vadd} 0.0 0.0 units box sum yes mom no +velocity bulk set ${Vadd} 0.0 0.0 units box sum yes mom no -fix GD bulk flow/gauss 1 0 0 #energy yes -#fix_modify GD energy yes +fix GD bulk flow/gauss 1 0 0 #energy yes +#fix_modify GD energy yes -run ${stabil} +run ${stabil} ##################################################################### #collect data #print the applied force and total flux to ensure conservation of Jx -variable Fapp equal f_GD[1] -compute vxBulk bulk reduce sum vx -compute vyBulk bulk reduce sum vy +variable Fapp equal f_GD[1] +compute vxBulk bulk reduce sum vx +compute vyBulk bulk reduce sum vy variable invVol equal 1.0/(lx*ly) -variable jx equal c_vxBulk*${invVol} -variable jy equal c_vyBulk*${invVol} -variable curr_step equal step -fix print_vCOM all print ${dump_rate} & - "${curr_step} ${Fapp} ${jx} ${jy}" file GD.out screen no & - title "timestep Fapp Jx Jy" - -#compute IK1 pressure profile +variable jx equal c_vxBulk*${invVol} +variable jy equal c_vyBulk*${invVol} +variable curr_step equal step +variable p_Fapp format Fapp %.3f +variable p_jx format jx %.5g +variable p_jy format jy %.5g +fix print_vCOM all print ${dump_rate} & + "${curr_step} ${p_Fapp} ${p_jx} ${p_jy}" file GD.out screen no & + title "timestep Fapp Jx Jy" + +#compute IK1 pressure profile #see Todd, Evans, and Davis, Phys. Rev. E 52(2) 1995, p. 1627 #use profile-unbiased temperature to remove the streaming velocity #from the kinetic part of the pressure -compute spa bulk stress/atom myTp +compute spa bulk stress/atom myTp #for the pressure profile, use the same grid as the PUT -compute chunkX bulk chunk/atom bin/1d x lower ${dX} units box +compute chunkX bulk chunk/atom bin/1d x lower ${dX} units box #output pressure profile and other profiles #the pressure profile is (-1/2V)*(c_spa[1] + c_spa[2]), where #V is the volume of a slice -fix profiles bulk ave/chunk 1 1 ${dump_rate} chunkX & - vx density/mass c_spa[1] c_spa[2] & - file x_profiles ave running overwrite +fix profiles bulk ave/chunk 1 1 ${dump_rate} chunkX & + vx density/mass c_spa[1] c_spa[2] & + file x_profiles ave running overwrite #compute velocity profile across the pipe with a finer grid -variable dYnew equal ${dY}/10 -compute chunkY bulk chunk/atom bin/1d y center ${dYnew} units box & - region pipe -fix velYprof bulk ave/chunk 1 1 ${dump_rate} chunkY & - vx file Vy_profile ave running overwrite +variable dYnew equal ${dY}/10 +compute chunkY bulk chunk/atom bin/1d y center ${dYnew} units box & + region pipe +fix velYprof bulk ave/chunk 1 1 ${dump_rate} chunkY & + vx file Vy_profile ave running overwrite #full trajectory -dump 7 bulk custom ${dump_rate} bulk.lammpstrj & - id type x y z -dump_modify 7 sort id +# dump 7 bulk custom ${dump_rate} bulk.lammpstrj id type x y z +# dump_modify 7 sort id -run ${run} +run ${run} diff --git a/examples/USER/flow_gauss/log.6Jul17.GD.g++.1 b/examples/USER/misc/flow_gauss/log.6Jul17.GD.g++.1 similarity index 100% rename from examples/USER/flow_gauss/log.6Jul17.GD.g++.1 rename to examples/USER/misc/flow_gauss/log.6Jul17.GD.g++.1 diff --git a/examples/USER/flow_gauss/log.6Jul17.GD.g++.4 b/examples/USER/misc/flow_gauss/log.6Jul17.GD.g++.4 similarity index 100% rename from examples/USER/flow_gauss/log.6Jul17.GD.g++.4 rename to examples/USER/misc/flow_gauss/log.6Jul17.GD.g++.4 diff --git a/examples/USER/flow_gauss/output-files/GD.out b/examples/USER/misc/flow_gauss/output-files/GD.out similarity index 100% rename from examples/USER/flow_gauss/output-files/GD.out rename to examples/USER/misc/flow_gauss/output-files/GD.out diff --git a/examples/USER/flow_gauss/output-files/Vy_profile b/examples/USER/misc/flow_gauss/output-files/Vy_profile similarity index 100% rename from examples/USER/flow_gauss/output-files/Vy_profile rename to examples/USER/misc/flow_gauss/output-files/Vy_profile diff --git a/examples/USER/flow_gauss/output-files/x_profiles b/examples/USER/misc/flow_gauss/output-files/x_profiles similarity index 100% rename from examples/USER/flow_gauss/output-files/x_profiles rename to examples/USER/misc/flow_gauss/output-files/x_profiles -- GitLab From bbb4d63db9802c7e1e29114ee6836751dff7bf3b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Jul 2017 14:52:08 -0400 Subject: [PATCH 481/593] use neighbor list exclusions instead of a zero cutoff --- examples/ASPHERE/poly/in.poly | 139 +++++++++++++++--------------- examples/ASPHERE/poly/in.poly.mp | 143 ++++++++++++++++--------------- 2 files changed, 142 insertions(+), 140 deletions(-) diff --git a/examples/ASPHERE/poly/in.poly b/examples/ASPHERE/poly/in.poly index 3496a774bb..8932523dbf 100644 --- a/examples/ASPHERE/poly/in.poly +++ b/examples/ASPHERE/poly/in.poly @@ -1,114 +1,115 @@ # SRD diffusion demo - poydisperse spheres -units lj -atom_style sphere -atom_modify first big -dimension 2 +units lj +atom_style sphere +atom_modify first big +dimension 2 # create big particles with 3 different types and diameters -lattice sq 0.3 -region box block 0 10 0 10 -0.5 0.5 -create_box 4 box -create_atoms 1 region box +lattice sq 0.3 +region box block 0 10 0 10 -0.5 0.5 +create_box 4 box +create_atoms 1 region box -group big type 1 -set group big type/fraction 2 0.33 394895 -set group big type/fraction 3 0.5 989894 -group big type 2 3 +group big type 1 +set group big type/fraction 2 0.33 394895 +set group big type/fraction 3 0.5 989894 +group big type 2 3 -set type 1*3 mass 1.0 -velocity big create 1.44 87287 loop geom +set type 1*3 mass 1.0 +velocity big create 1.44 87287 loop geom # equilibrate big particles, repulsive only to prevent aggregation -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.1 -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes -fix 1 big nve -fix 2 all enforce2d +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes +neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 -#dump 1 all atom 10 dump.poly.equil +fix 1 big nve +fix 2 all enforce2d -run 1000 +#dump 1 all atom 10 dump.poly.equil -#undump 1 -unfix 1 -unfix 2 +run 1000 + +#undump 1 +unfix 1 +unfix 2 # add small particles as hi density lattice -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 250.0 -create_atoms 4 region plane +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 250.0 +create_atoms 4 region plane -set type 4 mass 0.1 -group small type 4 -velocity small create 1.0 593849 loop geom +set type 4 mass 0.1 +group small type 4 +velocity small create 1.0 593849 loop geom # delete overlaps # must set *-4 cutoffs to non-zero values -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 1.0 2.0 -pair_coeff 3 3 1.0 1.5 -pair_coeff 1 4 0.0 1.0 0.5 -pair_coeff 2 4 0.0 1.0 1.0 -pair_coeff 3 4 0.0 1.0 0.75 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 1.0 2.0 +pair_coeff 3 3 1.0 1.5 +pair_coeff 4 4 0.0 1.0 0.1 +neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 -delete_atoms overlap 1.0 small big +delete_atoms overlap 1.0 small big # SRD run -reset_timestep 0 +reset_timestep 0 -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.1 +neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big nve -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & +fix 1 big nve +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & search 0.2 inside ignore -fix 3 all enforce2d +fix 3 all enforce2d # diagnostics -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & - f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & - f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & + f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & + f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] -thermo_modify temp tbig -thermo 1000 +thermo_modify temp tbig +thermo 1000 -#dump 1 all atom 1000 dump.poly +#dump 1 all atom 1000 dump.poly -#dump 1 all image 1000 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 -run 100000 +run 100000 diff --git a/examples/ASPHERE/poly/in.poly.mp b/examples/ASPHERE/poly/in.poly.mp index 1c6a1faee3..05ff8226e2 100644 --- a/examples/ASPHERE/poly/in.poly.mp +++ b/examples/ASPHERE/poly/in.poly.mp @@ -1,115 +1,116 @@ # SRD viscosity demo - poydisperse spheres -units lj -atom_style sphere -atom_modify first big -dimension 2 +units lj +atom_style sphere +atom_modify first big +dimension 2 # create big particles with 3 different types and diameters -lattice sq 0.3 -region box block 0 10 0 10 -0.5 0.5 -create_box 4 box -create_atoms 1 region box +lattice sq 0.3 +region box block 0 10 0 10 -0.5 0.5 +create_box 4 box +create_atoms 1 region box -group big type 1 -set group big type/fraction 2 0.33 394895 -set group big type/fraction 3 0.5 989894 -group big type 2 3 +group big type 1 +set group big type/fraction 2 0.33 394895 +set group big type/fraction 3 0.5 989894 +group big type 2 3 -set type 1*3 mass 1.0 -velocity big create 1.44 87287 loop geom +set type 1*3 mass 1.0 +velocity big create 1.44 87287 loop geom # equilibrate big particles, repulsive only to prevent aggregation -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.1 -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes -fix 1 big nve -fix 2 all enforce2d +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes +neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 -#dump 1 all atom 10 dump.poly.equil +fix 1 big nve +fix 2 all enforce2d -run 1000 +#dump 1 all atom 10 dump.poly.equil -#undump 1 -unfix 1 -unfix 2 +run 1000 + +#undump 1 +unfix 1 +unfix 2 # add small particles as hi density lattice -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 250.0 -create_atoms 4 region plane +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 250.0 +create_atoms 4 region plane -set type 4 mass 0.1 -group small type 4 -velocity small create 1.0 593849 loop geom +set type 4 mass 0.1 +group small type 4 +velocity small create 1.0 593849 loop geom # delete overlaps # must set *-4 cutoffs to non-zero values -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 1.0 2.0 -pair_coeff 3 3 1.0 1.5 -pair_coeff 1 4 0.0 1.0 0.5 -pair_coeff 2 4 0.0 1.0 1.0 -pair_coeff 3 4 0.0 1.0 0.75 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 1.0 2.0 +pair_coeff 3 3 1.0 1.5 +pair_coeff 4 4 0.0 1.0 0.1 +neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 -delete_atoms overlap 1.0 small big +delete_atoms overlap 1.0 small big # SRD run -reset_timestep 0 +reset_timestep 0 -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.0 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.1 +neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big nve -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & - search 0.2 inside ignore -fix 3 small viscosity 10 x y 50 -fix 4 all enforce2d +fix 1 big nve +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & + search 0.2 inside ignore +fix 3 small viscosity 10 x y 50 +fix 4 all enforce2d # diagnostics -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & - f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & - f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & + f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & + f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] -thermo_modify temp tbig -thermo 1000 +thermo_modify temp tbig +thermo 1000 -#dump 1 all atom 500 dump.poly.mp +#dump 1 all atom 500 dump.poly.mp -#dump 1 all image 500 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 +#dump 1 all image 500 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 -run 50000 +run 50000 -- GitLab From 296e572e6998214669d573562335b145c22b758a Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 14 Jul 2017 16:25:16 -0600 Subject: [PATCH 482/593] better Install.py script for KIM from Ryan Elliott --- doc/src/Section_example.txt | 1 + doc/src/Section_packages.txt | 44 +++++-- doc/src/neigh_modify.txt | 7 +- examples/README | 1 + lib/Install.py | 13 ++- lib/atc/Install.py | 13 ++- lib/awpmd/Install.py | 13 ++- lib/colvars/Install.py | 13 ++- lib/gpu/Install.py | 25 ++-- lib/h5md/Install.py | 13 ++- lib/kim/Install.py | 217 ++++++++++++++++++++++++++--------- lib/kim/README | 10 +- lib/linalg/Install.py | 8 +- lib/meam/Install.py | 13 ++- lib/mscg/Install.py | 11 +- lib/poems/Install.py | 13 ++- lib/qmmm/Install.py | 13 ++- lib/reax/Install.py | 13 ++- lib/smd/Install.py | 11 +- lib/voronoi/Install.py | 11 +- src/Makefile | 3 +- 21 files changed, 360 insertions(+), 106 deletions(-) diff --git a/doc/src/Section_example.txt b/doc/src/Section_example.txt index 26dc3b9698..f8b39be173 100644 --- a/doc/src/Section_example.txt +++ b/doc/src/Section_example.txt @@ -49,6 +49,7 @@ Lists of both kinds of directories are given below. Lowercase directories :h4 accelerate: run with various acceleration options (OpenMP, GPU, Phi) +airebo: polyethylene with AIREBO potential balance: dynamic load balancing, 2d system body: body particles, 2d system cmap: CMAP 5-body contributions to CHARMM force field diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index 76f88b8ab8..a65e510654 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -492,14 +492,38 @@ Minnesota). [Install or un-install:] -Using this package requires the KIM library and its models -(interatomic potentials) to be downloaded and installed on your -system. The library can be downloaded and built in lib/kim or -elsewhere on your system. Details of the download, build, and install -process for KIM are given in the lib/kim/README file. +Before building LAMMPS with this package, you must first download and +build the KIM library and include the KIM models that you want to +use. You can do this manually if you prefer; follow the instructions +in lib/kim/README. You can also do it in one step from the lammps/src +dir, using a command like these, which simply invoke the +lib/kim/Install.py script with the specified args. + +make lib-kim # print help message +make lib-kim args="-b . none" # install KIM API lib with only example models +make lib-kim args="-b . Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model +make lib-kim args="-b . OpenKIM" # install KIM API lib with all models +make lib-kim args="-a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver :pre + +Note that in LAMMPS lingo, a KIM model driver is a pair style +(e.g. EAM or Tersoff). A KIM model is a pair style for a particular +element or alloy and set of parameters, e.g. EAM for Cu with a +specific EAM potential file. Also note that installing the KIM API +library with all its models, may take around 30 min to build. Of +course you only need to do that once. + +See the list of KIM model drivers here: +https://openkim.org/kim-items/model-drivers/alphabetical -Once that process is complete, you can then install/un-install the -package and build LAMMPS in the usual manner: +See the list of all KIM models here: +https://openkim.org/kim-items/models/by-model-drivers + +See the list of example KIM models included by default here: +https://openkim.org/kim-api +in the "What is in the KIM API source package?" section + +You can then install/un-install the package and build LAMMPS in the +usual manner: make yes-kim make machine :pre @@ -1414,7 +1438,7 @@ lib/linalg. In the latter case you also need to build the library in lib/linalg with a command like these: make lib-linalg # print help message -make lib-atc args="-m gfortran" # build with GNU Fortran compiler +make lib-linalg args="-m gfortran" # build with GNU Fortran compiler You can then install/un-install the package and build LAMMPS in the usual manner: @@ -2469,8 +2493,8 @@ step from the lammps/src dir, using a command like these, which simply invoke the lib/smd/Install.py script with the specified args: make lib-smd # print help message -make lib-smd args="-g -l" # download in default lib/smd/eigen-eigen-* -make lib-smd args="-h . eigen -g -l" # download in lib/smd/eigen +make lib-smd args="-g -l" # download and build in default lib/smd/eigen-eigen-* +make lib-smd args="-h . eigen -g -l" # download and build in lib/smd/eigen make lib-smd args="-h ~ eigen -g -l" # download and build in ~/eigen :pre Note that the final -l switch is to create a symbolic (soft) link diff --git a/doc/src/neigh_modify.txt b/doc/src/neigh_modify.txt index 5c149d892d..c4544cb29b 100644 --- a/doc/src/neigh_modify.txt +++ b/doc/src/neigh_modify.txt @@ -109,7 +109,8 @@ atoms in the specified group. This can be useful for models where a large portion of the simulation is particles that do not interact with other particles or with each other via pairwise interactions. The group specified with this option must also be specified via the -"atom_modify first"_atom_modify.html command. +"atom_modify first"_atom_modify.html command. Note that specifying +"all" as the group-ID effectively turns off the {include} option. The {exclude} option turns off pairwise interactions between certain pairs of atoms, by not including them in the neighbor list. These are @@ -213,5 +214,5 @@ space. [Default:] The option defaults are delay = 10, every = 1, check = yes, once = no, -cluster = no, include = all, exclude = none, page = 100000, one = -2000, and binsize = 0.0. +cluster = no, include = all (same as no include option defined), +exclude = none, page = 100000, one = 2000, and binsize = 0.0. diff --git a/examples/README b/examples/README index e4312e2598..0ec28aa2c2 100644 --- a/examples/README +++ b/examples/README @@ -58,6 +58,7 @@ These are the sample problems and their output in the various sub-directories: accelerate: use of all the various accelerator packages +airebo: polyethylene with AIREBO potential balance: dynamic load balancing, 2d system body: body particles, 2d system cmap: CMAP 5-body contributions to CHARMM force field diff --git a/lib/Install.py b/lib/Install.py index 18b426f928..29270560a6 100644 --- a/lib/Install.py +++ b/lib/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/atc/Install.py b/lib/atc/Install.py index 18b426f928..29270560a6 100644 --- a/lib/atc/Install.py +++ b/lib/atc/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/awpmd/Install.py b/lib/awpmd/Install.py index 18b426f928..29270560a6 100644 --- a/lib/awpmd/Install.py +++ b/lib/awpmd/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/colvars/Install.py b/lib/colvars/Install.py index 18b426f928..29270560a6 100644 --- a/lib/colvars/Install.py +++ b/lib/colvars/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/gpu/Install.py b/lib/gpu/Install.py index d396be5e1a..c6cd1f3021 100644 --- a/lib/gpu/Install.py +++ b/lib/gpu/Install.py @@ -8,14 +8,17 @@ import sys,os,re,commands # help message help = """ -Syntax: python Install.py -i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix - specify one or more options, order does not matter - copies an existing Makefile.isuffix in lib/gpu to Makefile.auto - optionally edits these variables in Makefile.auto: - CUDA_HOME, CUDA_ARCH, CUDA_PRECISION, EXTRAMAKE - optionally uses Makefile.auto to build the GPU library -> libgpu.a - and to copy a Makefile.lammps.esuffix -> Makefile.lammps - optionally copies Makefile.auto to a new Makefile.osuffix +Syntax from src dir: make lib-gpu args="-i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix" +Syntax from lib dir: python Install.py -i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix + +specify one or more options, order does not matter + +copies an existing Makefile.isuffix in lib/gpu to Makefile.auto +optionally edits these variables in Makefile.auto: + CUDA_HOME, CUDA_ARCH, CUDA_PRECISION, EXTRAMAKE +optionally uses Makefile.auto to build the GPU library -> libgpu.a + and to copy a Makefile.lammps.esuffix -> Makefile.lammps +optionally copies Makefile.auto to a new Makefile.osuffix -i = use Makefile.isuffix as starting point, copy to Makefile.auto default isuffix = linux @@ -34,6 +37,12 @@ Syntax: python Install.py -i isuffix -h hdir -a arch -p precision -e esuffix -m also copies EXTRAMAKE file -> Makefile.lammps -e can set which Makefile.lammps.esuffix file is copied -o = copy final Makefile.auto to Makefile.osuffix + +Examples: + +make lib-gpu args="-m" # build GPU lib with default Makefile.linux +make lib-gpu args="-i xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision +make lib-gpu args="-i xk7 -p single -o xk7.single -m" # ditto, also build GPU lib """ # print error message or help diff --git a/lib/h5md/Install.py b/lib/h5md/Install.py index 18b426f928..29270560a6 100644 --- a/lib/h5md/Install.py +++ b/lib/h5md/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/kim/Install.py b/lib/kim/Install.py index bcd22dcbb3..9f36f9fedb 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -1,25 +1,44 @@ #!/usr/bin/env python -# install.py tool to setup the kim-api library +# install.pa tool to setup the kim-api library # used to automate the steps described in the README file in this dir import sys,os,re,urllib,commands help = """ -Syntax: install.py -v version -c kim-dir -b kim-model-name -a kim-name - specify one or more options, order does not matter - -v = version of kim-api to download and work with - default = kim-api-v1.8.2 (current as of June 2017) - -c = create Makefile.KIM_DIR within lammps lib/kim to configure lammps - for use with the kim-api library installed at "kim-dir" (absolute - path). default = this dir - -b = build kim-api and kim model where kim-model-name can be a specific - openkim.org model name (such as - "EAM_Dynamo_Ackland_W__MO_141627196590_002") or the keyword - "OpenKIM" to install all compatible models from the openkim.org - site. - -a = add kim-name openkim.org item (model driver or model) to existing - kim-api instalation. +Syntax from src dir: make lib-kim args="-v version -b kim-install-dir kim-name -a kim-name" +Syntax from lib dir: python Install.py -v version -b kim-install-dir kim-name -a kim-name + +specify one or more options, order does not matter + + -v = version of KIM API library to use + default = kim-api-v1.8.2 (current as of June 2017) + -b = download and build KIM API library with KIM models + kim-dir = where to install/build the KIM API library + use "." to install in lib/kim + kim-name = none to install only the example KIM models + kim-name = KIM model name (see example below) + examples + kim-name = OpenKIM to install all models + from the openkim.org site (this can take 30 minutes or more) + -a = add single KIM model or model driver with kim-name + to existing KIM API lib (see example below) + +Examples: + +make lib-kim args="-b . none" # install KIM API lib with only example models +make lib-kim args="-b . Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model +make lib-kim args="-b . OpenKIM" # install KIM API lib with all models +make lib-kim args="-a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver + +See the list of KIM model drivers here: +https://openkim.org/kim-items/model-drivers/alphabetical + +See the list of all KIM models here: +https://openkim.org/kim-items/models/by-model-drivers + +See the list of example KIM models included by default here: +https://openkim.org/kim-api +in the "What is in the KIM API source package?" section """ def error(): @@ -28,32 +47,28 @@ def error(): # parse args -args = sys.argv +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() thisdir = os.environ['PWD'] -dir = thisdir version = "kim-api-v1.8.2" -dirflag = 0 buildflag = 0 addflag = 0 -iarg = 1 +iarg = 0 while iarg < len(args): if args[iarg] == "-v": if iarg+2 > len(args): error() version = args[iarg+1] iarg += 2 - elif args[iarg] == "-c": - dirflag = 1 - if iarg+2 > len(args): error() - dir = args[iarg+1] - iarg += 2 elif args[iarg] == "-b": buildflag = 1 - if iarg+2 > len(args): error() - modelname = args[iarg+1] - iarg += 2 + if iarg+3 > len(args): error() + dir = args[iarg+1] + modelname = args[iarg+2] + iarg += 3 elif args[iarg] == "-a": addflag = 1 if iarg+2 > len(args): error() @@ -62,33 +77,59 @@ while iarg < len(args): else: error() thisdir = os.path.abspath(thisdir) -dir = os.path.abspath(dir) url = "https://s3.openkim.org/kim-api/%s.tgz" % version -# download and unpack tarball +# download KIM tarball, unpack, build KIM +# either in lib/kim or user-requested location + +if buildflag == 1: + + # set install directory + dir = os.path.abspath(dir) + "/installed-" + version + + # check to see if an installed kim-api already exists + + if os.path.isdir(dir): + print "kim-api is already installed at %s" % dir + print "Must remove this directory in order to resintall at this location" + sys.exit() + # configure LAMMPS to use kim-api to be installed -if not os.path.isfile("%s/Makefile.KIM_DIR" % thisdir): - open("%s/Makefile.KIM_DIR" % thisdir, 'w').write("KIM_INSTALL_DIR=%s" % dir) - open("%s/Makefile.KIM_Config" % thisdir, 'w').write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) + mkfle = open("%s/Makefile.KIM_DIR" % thisdir, 'w') + mkfle.write("KIM_INSTALL_DIR=%s\n" % dir) + mkfle.write("\n") + mkfle.write(".DUMMY: print_dir\n") + mkfle.write("\n") + mkfle.write("print_dir:\n") + mkfle.write(" @printf $(KIM_INSTALL_DIR)\n") + mkfle.close() + open("%s/Makefile.KIM_Config" % thisdir, 'w'). \ + write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) print "Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) -else: - if dirflag == 1: - open("%s/Makefile.KIM_DIR" % thisdir, 'w').write("KIM_INSTALL_DIR=%s" % dir) - open("%s/Makefile.KIM_Config" % thisdir, 'w').write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) - print "Updated %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) + # download entire kim-api tarball + # try first via urllib + # if fails (probably due to no SSL support), use wget -if buildflag == 1: - # download kim-api print "Downloading kim-api tarball ..." - urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,version)) + + try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,version)) + except: + cmd = "wget %s %s/%s.tgz" % (url,thisdir,version) + txt = commands.getstatusoutput(cmd) + print txt[1] + if not os.path.isfile("%s/%s.tgz" % (thisdir,version)): + print "Both urllib.urlretrieve() and wget command failed to download" + sys.exit() + print "Unpacking kim-api tarball ..." cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (thisdir,version,version) txt = commands.getstatusoutput(cmd) if txt[0] != 0: error() # configure kim-api + print "Configuring kim-api ..." cmd = "cd %s/%s; ./configure --prefix='%s'" % (thisdir,version,dir) txt = commands.getstatusoutput(cmd) @@ -96,12 +137,19 @@ if buildflag == 1: if txt[0] != 0: error() # build kim-api + print "Configuring model : %s" % modelname - cmd = "cd %s/%s; make add-%s" % (thisdir,version,modelname) + if modelname == "none": + cmd = "cd %s/%s; make add-examples" % (thisdir,version) + else: + if modelname == "OpenKIM": + print "configuring all OpenKIM models, this will take a while ..." + cmd = "cd %s/%s; make add-examples; make add-%s" % \ + (thisdir,version,modelname) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() - # + print "Building kim-api ..." cmd = "cd %s/%s; make" % (thisdir,version) txt = commands.getstatusoutput(cmd) @@ -109,42 +157,101 @@ if buildflag == 1: if txt[0] != 0: error() # install kim-api + print "Installing kim-api ..." cmd = "cd %s/%s; make install" % (thisdir,version) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() - # + cmd = "cd %s/%s; make install-set-default-to-v1" %(thisdir,version) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() # remove source files + print "Removing kim-api source and build files ..." cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" % (thisdir,version,version) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() +# add a single model (and possibly its driver) to existing KIM installation + if addflag == 1: - # download model - url = "https://openkim.org/download/%s.tgz" % addmodelname + + # get location of installed kim-api + + if not os.path.isfile("%s/Makefile.KIM_DIR" % thisdir): + print "kim-api is not installed" + error() + else: + cmd = "cd %s; make -f Makefile.KIM_DIR print_dir" % thisdir + dir = commands.getstatusoutput(cmd)[1] + + # download single model + # try first via urllib + # if fails (probably due to no SSL support), use wget + print "Downloading item tarball ..." - urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,addmodelname)) + + url = "https://openkim.org/download/%s.tgz" % addmodelname + + try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,addmodelname)) + except: + cmd = "wget %s %s/%s.tgz" % (url,thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if not os.path.isfile("%s/%s.tgz" % (thisdir,addmodelname)): + print "Both urllib.urlretrieve() and wget command failed to download" + sys.exit() + print "Unpacking item tarball ..." cmd = "cd %s; tar zxvf %s.tgz" % (thisdir,addmodelname) txt = commands.getstatusoutput(cmd) if txt[0] != 0: error() - # + print "Building item ..." cmd = "cd %s/%s; make; make install" %(thisdir,addmodelname) txt = commands.getstatusoutput(cmd) - print txt[1] - if txt[0] != 0: error() - # - print "Removing kim item source and build files ..." - cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) - txt = commands.getstatusoutput(cmd) - print txt[1] - if txt[0] != 0: error() + firstRunOutput = txt[1] + if txt[0] != 0: + # Error: but first, check to see if it needs a driver + + cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + if txt[1] == "ParameterizedModel": + + # Get and install driver + + cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + adddrivername = txt[1] + print "First Installing model driver: %s" % adddrivername + cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) + txt = commands.getstatusoutput(cmd) + if txt[0] != 0: + print firstRunOutput + print txt[1] + error() + else: + print txt[1] + cmd = "cd %s; python Install.py -a %s" % (thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: + error() + else: + print firstRunOutput + error() + else: + + # success + + print firstRunOutput + print "Removing kim item source and build files ..." + cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: error() diff --git a/lib/kim/README b/lib/kim/README index 00d6ea8fad..7a4230dc25 100644 --- a/lib/kim/README +++ b/lib/kim/README @@ -8,14 +8,16 @@ James Sethna (Cornell U). Ryan Elliott is the main developer for the KIM API and he also maintains the code that implements the pair_style kim command. -To download, build, and install the KIM API on your system, follow -these steps. You can use the install.py script to automate these steps. +You can type "make lib-kim" from the src directory to see help on +how to download and build this library via make commands, or you can +do the same thing by typing "python Install.py" from within this +directory, or you can do it manually by following the instructions +below. ----------------- Instructions: - 1. Configure lammps for use with the kim-api library installed in this directory $ printf "KIM_INSTALL_DIR=${PWD}\n" > ./Makefile.KIM_DIR @@ -65,7 +67,7 @@ $ rm -rf EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001.tgz When these steps are complete you can build LAMMPS with the KIM package installed: -$ cd ../../src +$ cd lammpos/src $ make yes-kim $ make g++ (or whatever target you wish) diff --git a/lib/linalg/Install.py b/lib/linalg/Install.py index c7076ca52f..560afecec4 100644 --- a/lib/linalg/Install.py +++ b/lib/linalg/Install.py @@ -8,9 +8,15 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine +Syntax from src dir: make lib-linalg args="-m machine" +Syntax from lib dir: python Install.py -m machine + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file + +Example: + +make lib-linalg args="-m gfortran" # build with GNU Fortran compiler """ # print error message or help diff --git a/lib/meam/Install.py b/lib/meam/Install.py index 18b426f928..29270560a6 100644 --- a/lib/meam/Install.py +++ b/lib/meam/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/mscg/Install.py b/lib/mscg/Install.py index e547232614..7b10be189f 100644 --- a/lib/mscg/Install.py +++ b/lib/mscg/Install.py @@ -8,8 +8,11 @@ import sys,os,re,commands # help message help = """ -Syntax: python Install.py -h hpath hdir -g -b [suffix] -l - specify one or more options, order does not matter +Syntax from src dir: make lib-mscg args="-h hpath hdir -g -b [suffix] -l" +Syntax from lib dir: python Install.py -h hpath hdir -g -b [suffix] -l + +specify one or more options, order does not matter + -h = set home dir of MS-CG to be hpath/hdir hpath can be full path, contain '~' or '.' chars default hpath = . = lib/mscg @@ -22,6 +25,10 @@ Syntax: python Install.py -h hpath hdir -g -b [suffix] -l optional suffix specifies which src/Make/Makefile.suffix to use default suffix = g++_simple -l = create 2 softlinks (includelink,liblink) in lib/mscg to MS-CG src dir + +Example: + +make lib-mscg args="-g -b -l" # download/build in lib/mscg/MSCG-release-master """ # settings diff --git a/lib/poems/Install.py b/lib/poems/Install.py index 18b426f928..29270560a6 100644 --- a/lib/poems/Install.py +++ b/lib/poems/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/qmmm/Install.py b/lib/qmmm/Install.py index 18b426f928..29270560a6 100644 --- a/lib/qmmm/Install.py +++ b/lib/qmmm/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/reax/Install.py b/lib/reax/Install.py index 18b426f928..29270560a6 100644 --- a/lib/reax/Install.py +++ b/lib/reax/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/smd/Install.py b/lib/smd/Install.py index dc0a3187ce..e6fe8926a4 100644 --- a/lib/smd/Install.py +++ b/lib/smd/Install.py @@ -8,8 +8,11 @@ import sys,os,re,glob,commands # help message help = """ -Syntax: python Install.py -h hpath hdir -g -l - specify one or more options, order does not matter +Syntax from src dir: make lib-smd args="-h hpath hdir -g -l" +Syntax from lib dir: python Install.py -h hpath hdir -g -l + +specify one or more options, order does not matter + -h = set home dir of Eigen to be hpath/hdir hpath can be full path, contain '~' or '.' chars default hpath = . = lib/smd @@ -19,6 +22,10 @@ Syntax: python Install.py -h hpath hdir -g -l hpath must already exist if hdir already exists, it will be deleted before unpack -l = create softlink (includelink) in lib/smd to Eigen src dir + +Example: + +make lib-smd args="-g -l" # download/build in default lib/smd/eigen-eigen-* """ # settings diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py index 7d847183b3..54246f113e 100644 --- a/lib/voronoi/Install.py +++ b/lib/voronoi/Install.py @@ -8,8 +8,11 @@ import sys,os,re,urllib,commands # help message help = """ -Syntax: python Install.py -v version -h hpath hdir -g -b -l - specify one or more options, order does not matter +Syntax from src dir: make lib-voronoi args="-v version -h hpath hdir -g -b -l" +Syntax from lib dir: python Install.py -v version -h hpath hdir -g -b -l + +specify one or more options, order does not matter + -v = version of Voro++ to download and build default version = voro++-0.4.6 (current as of Jan 2015) -h = set home dir of Voro++ to be hpath/hdir @@ -22,6 +25,10 @@ Syntax: python Install.py -v version -h hpath hdir -g -b -l if hdir already exists, it will be deleted before unpack -b = build Voro++ library in its src dir -l = create 2 softlinks (includelink,liblink) in lib/voronoi to Voro++ src dir + +Example: + +make lib-voronoi args="-g -b -l" # download/build in lib/voronoi/voro++-0.4.6 """ # settings diff --git a/src/Makefile b/src/Makefile index c7b20dcb13..3d1085e0be 100644 --- a/src/Makefile +++ b/src/Makefile @@ -116,7 +116,8 @@ help: @echo 'make package-overwrite replace package files with src files' @echo 'make package-diff (pd) diff src files against package files' @echo '' - @echo 'make lib-package download/build/install a package library' + @echo 'make lib-package help for download/build/install a package library' + @echo 'make lib-package args="..." download/build/install a package library' @echo 'make purge purge obsolete copies of source files' @echo '' @echo 'make machine build LAMMPS for machine' -- GitLab From 3f297382ac1f4682626555e840ed243bbc0a1ec3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Jul 2017 22:41:59 -0400 Subject: [PATCH 483/593] Revert "do not allow pairwise cutoffs <= 0.0. avoids undefined behavior and division by zero errors" This reverts commit a04711b21f06b78270f852bb62beed12eb7e4475. --- src/pair.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pair.cpp b/src/pair.cpp index 21c8fe00e5..ce711c4f5d 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -242,7 +242,6 @@ void Pair::init() for (i = 1; i <= atom->ntypes; i++) for (j = i; j <= atom->ntypes; j++) { cut = init_one(i,j); - if (cut <= 0.0) error->all(FLERR,"Illegal pair style cutoff <= 0.0"); cutsq[i][j] = cutsq[j][i] = cut*cut; cutforce = MAX(cutforce,cut); if (tail_flag) { -- GitLab From 4ec07422f07cc325435a4eeeefbdcc24d5a08559 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Jul 2017 23:33:00 -0400 Subject: [PATCH 484/593] avoid division by zero when using cutoff 0.0 with pair_modify shift yes --- src/ASPHERE/pair_gayberne.cpp | 2 +- src/ASPHERE/pair_resquared.cpp | 2 +- src/CLASS2/pair_lj_class2.cpp | 2 +- src/CLASS2/pair_lj_class2_coul_cut.cpp | 2 +- src/CLASS2/pair_lj_class2_coul_long.cpp | 2 +- src/COLLOID/pair_colloid.cpp | 2 +- src/COLLOID/pair_yukawa_colloid.cpp | 2 +- src/DIPOLE/pair_lj_cut_dipole_cut.cpp | 2 +- src/DIPOLE/pair_lj_cut_dipole_long.cpp | 2 +- src/DIPOLE/pair_lj_long_dipole_long.cpp | 2 +- src/KSPACE/pair_born_coul_long.cpp | 2 +- src/KSPACE/pair_buck_coul_long.cpp | 2 +- src/KSPACE/pair_buck_long_coul_long.cpp | 2 +- src/KSPACE/pair_lj_cut_coul_long.cpp | 2 +- src/KSPACE/pair_lj_long_coul_long.cpp | 2 +- src/MISC/pair_nm_cut.cpp | 2 +- src/MISC/pair_nm_cut_coul_cut.cpp | 2 +- src/MISC/pair_nm_cut_coul_long.cpp | 2 +- src/MOLECULE/pair_lj_cut_tip4p_cut.cpp | 2 +- src/USER-CGSDK/pair_lj_sdk.cpp | 2 +- src/USER-CGSDK/pair_lj_sdk_coul_long.cpp | 2 +- .../pair_lj_charmm_coul_long_soft.cpp | 2 +- src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp | 4 +- src/USER-FEP/pair_lj_cut_coul_long_soft.cpp | 4 +- src/USER-FEP/pair_lj_cut_soft.cpp | 4 +- src/USER-MISC/pair_buck_mdf.cpp | 2 +- src/USER-MISC/pair_coul_diel.cpp | 2 +- src/USER-MISC/pair_gauss_cut.cpp | 3 + src/USER-MISC/pair_kolmogorov_crespi_z.cpp | 4 +- src/USER-MISC/pair_list.cpp | 94 +++++++++---------- src/pair_born.cpp | 2 +- src/pair_born_coul_dsf.cpp | 2 +- src/pair_born_coul_wolf.cpp | 2 +- src/pair_buck.cpp | 2 +- src/pair_buck_coul_cut.cpp | 2 +- src/pair_lj96_cut.cpp | 2 +- src/pair_lj_cut.cpp | 2 +- src/pair_lj_cut_coul_cut.cpp | 2 +- src/pair_lj_cut_coul_dsf.cpp | 2 +- src/pair_lj_expand.cpp | 2 +- src/pair_mie_cut.cpp | 2 +- src/pair_yukawa.cpp | 2 +- 42 files changed, 97 insertions(+), 88 deletions(-) diff --git a/src/ASPHERE/pair_gayberne.cpp b/src/ASPHERE/pair_gayberne.cpp index 25bdae14f1..9ff87326ed 100644 --- a/src/ASPHERE/pair_gayberne.cpp +++ b/src/ASPHERE/pair_gayberne.cpp @@ -391,7 +391,7 @@ double PairGayBerne::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double ratio = sigma[i][j] / cut[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/ASPHERE/pair_resquared.cpp b/src/ASPHERE/pair_resquared.cpp index ed9d9b36c4..caa031a1e8 100644 --- a/src/ASPHERE/pair_resquared.cpp +++ b/src/ASPHERE/pair_resquared.cpp @@ -391,7 +391,7 @@ double PairRESquared::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double ratio = sigma[i][j] / cut[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/CLASS2/pair_lj_class2.cpp b/src/CLASS2/pair_lj_class2.cpp index e79dc0c6de..0b90b2717e 100644 --- a/src/CLASS2/pair_lj_class2.cpp +++ b/src/CLASS2/pair_lj_class2.cpp @@ -235,7 +235,7 @@ double PairLJClass2::init_one(int i, int j) lj3[i][j] = 2.0 * epsilon[i][j] * pow(sigma[i][j],9.0); lj4[i][j] = 3.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double ratio = sigma[i][j] / cut[i][j]; offset[i][j] = epsilon[i][j] * (2.0*pow(ratio,9.0) - 3.0*pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/CLASS2/pair_lj_class2_coul_cut.cpp b/src/CLASS2/pair_lj_class2_coul_cut.cpp index bec7f1da15..395953e0a9 100644 --- a/src/CLASS2/pair_lj_class2_coul_cut.cpp +++ b/src/CLASS2/pair_lj_class2_coul_cut.cpp @@ -286,7 +286,7 @@ double PairLJClass2CoulCut::init_one(int i, int j) lj3[i][j] = 2.0 * epsilon[i][j] * pow(sigma[i][j],9.0); lj4[i][j] = 3.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = epsilon[i][j] * (2.0*pow(ratio,9.0) - 3.0*pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/CLASS2/pair_lj_class2_coul_long.cpp b/src/CLASS2/pair_lj_class2_coul_long.cpp index 5f7d738e92..5d2ae891d0 100644 --- a/src/CLASS2/pair_lj_class2_coul_long.cpp +++ b/src/CLASS2/pair_lj_class2_coul_long.cpp @@ -329,7 +329,7 @@ double PairLJClass2CoulLong::init_one(int i, int j) lj3[i][j] = 2.0 * epsilon[i][j] * pow(sigma[i][j],9.0); lj4[i][j] = 3.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = epsilon[i][j] * (2.0*pow(ratio,9.0) - 3.0*pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/COLLOID/pair_colloid.cpp b/src/COLLOID/pair_colloid.cpp index 68150f6eff..983b973e0e 100644 --- a/src/COLLOID/pair_colloid.cpp +++ b/src/COLLOID/pair_colloid.cpp @@ -354,7 +354,7 @@ double PairColloid::init_one(int i, int j) lj4[j][i] = lj4[i][j] = 4.0 * epsilon * sigma6[i][j]; offset[j][i] = offset[i][j] = 0.0; - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double tmp; offset[j][i] = offset[i][j] = single(0,0,i,j,cut[i][j]*cut[i][j],0.0,1.0,tmp); diff --git a/src/COLLOID/pair_yukawa_colloid.cpp b/src/COLLOID/pair_yukawa_colloid.cpp index 9b8d0ecaad..87fa7f5422 100644 --- a/src/COLLOID/pair_yukawa_colloid.cpp +++ b/src/COLLOID/pair_yukawa_colloid.cpp @@ -147,7 +147,7 @@ double PairYukawaColloid::init_one(int i, int j) cut[i][j] = mix_distance(cut[i][i],cut[j][j]); } - if (offset_flag) { + if (offset_flag && (kappa != 0.0)) { double screening = exp(-kappa * (cut[i][j] - (rad[i]+rad[j]))); offset[i][j] = a[i][j]/kappa * screening; } else offset[i][j] = 0.0; diff --git a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp index addd02e505..af987bf258 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp @@ -387,7 +387,7 @@ double PairLJCutDipoleCut::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/DIPOLE/pair_lj_cut_dipole_long.cpp b/src/DIPOLE/pair_lj_cut_dipole_long.cpp index 78922e356f..63f48bea81 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_long.cpp @@ -420,7 +420,7 @@ double PairLJCutDipoleLong::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/DIPOLE/pair_lj_long_dipole_long.cpp b/src/DIPOLE/pair_lj_long_dipole_long.cpp index 15ac2e788c..b833b250d4 100644 --- a/src/DIPOLE/pair_lj_long_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_long_dipole_long.cpp @@ -314,7 +314,7 @@ double PairLJLongDipoleLong::init_one(int i, int j) //if (cut_respa && MIN(cut_lj[i][j],cut_coul) < cut_respa[3]) //error->all(FLERR,"Pair cutoff < Respa interior cutoff"); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/KSPACE/pair_born_coul_long.cpp b/src/KSPACE/pair_born_coul_long.cpp index e588a30b55..479128ef2b 100644 --- a/src/KSPACE/pair_born_coul_long.cpp +++ b/src/KSPACE/pair_born_coul_long.cpp @@ -311,7 +311,7 @@ double PairBornCoulLong::init_one(int i, int j) born2[i][j] = 6.0*c[i][j]; born3[i][j] = 8.0*d[i][j]; - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double rexp = exp((sigma[i][j]-cut_lj[i][j])*rhoinv[i][j]); offset[i][j] = a[i][j]*rexp - c[i][j]/pow(cut_lj[i][j],6.0) + d[i][j]/pow(cut_lj[i][j],8.0); diff --git a/src/KSPACE/pair_buck_coul_long.cpp b/src/KSPACE/pair_buck_coul_long.cpp index 476e3c716a..95496409b9 100644 --- a/src/KSPACE/pair_buck_coul_long.cpp +++ b/src/KSPACE/pair_buck_coul_long.cpp @@ -297,7 +297,7 @@ double PairBuckCoulLong::init_one(int i, int j) buck1[i][j] = a[i][j]/rho[i][j]; buck2[i][j] = 6.0*c[i][j]; - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double rexp = exp(-cut_lj[i][j]/rho[i][j]); offset[i][j] = a[i][j]*rexp - c[i][j]/pow(cut_lj[i][j],6.0); } else offset[i][j] = 0.0; diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index 8aa4d72083..4cfb9b7267 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -330,7 +330,7 @@ double PairBuckLongCoulLong::init_one(int i, int j) if (cut_respa && MIN(cut_buck[i][j],cut_coul) < cut_respa[3]) error->all(FLERR,"Pair cutoff < Respa interior cutoff"); - if (offset_flag) { + if (offset_flag && (cut_buck[i][j] > 0.0)) { double rexp = exp(-cut_buck[i][j]/buck_rho[i][j]); offset[i][j] = buck_a[i][j]*rexp - buck_c[i][j]/pow(cut_buck[i][j],6.0); } else offset[i][j] = 0.0; diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index e9799843fc..f8be9fdb79 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -743,7 +743,7 @@ double PairLJCutCoulLong::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index 44256a9fbb..7c6adfcb41 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -333,7 +333,7 @@ double PairLJLongCoulLong::init_one(int i, int j) if (cut_respa && MIN(cut_lj[i][j],cut_coul) < cut_respa[3]) error->all(FLERR,"Pair cutoff < Respa interior cutoff"); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/MISC/pair_nm_cut.cpp b/src/MISC/pair_nm_cut.cpp index 0163cdcf58..b9bf6ac477 100644 --- a/src/MISC/pair_nm_cut.cpp +++ b/src/MISC/pair_nm_cut.cpp @@ -243,7 +243,7 @@ double PairNMCut::init_one(int i, int j) r0n[i][j] = pow(r0[i][j],nn[i][j]); r0m[i][j] = pow(r0[i][j],mm[i][j]); - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { offset[i][j] = e0nm[i][j] * ((mm[i][j]*r0n[i][j] / pow(cut[i][j],nn[i][j])) - (nn[i][j]*r0m[i][j] / pow(cut[i][j],mm[i][j]))); diff --git a/src/MISC/pair_nm_cut_coul_cut.cpp b/src/MISC/pair_nm_cut_coul_cut.cpp index 5cb2452906..78c77a648f 100644 --- a/src/MISC/pair_nm_cut_coul_cut.cpp +++ b/src/MISC/pair_nm_cut_coul_cut.cpp @@ -291,7 +291,7 @@ double PairNMCutCoulCut::init_one(int i, int j) r0n[i][j] = pow(r0[i][j],nn[i][j]); r0m[i][j] = pow(r0[i][j],mm[i][j]); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { offset[i][j] = e0nm[i][j] * ((mm[i][j]*r0n[i][j] / pow(cut_lj[i][j],nn[i][j])) - (nn[i][j]*r0m[i][j] / pow(cut_lj[i][j],mm[i][j]))); diff --git a/src/MISC/pair_nm_cut_coul_long.cpp b/src/MISC/pair_nm_cut_coul_long.cpp index 15d5d03757..8e0da40eac 100644 --- a/src/MISC/pair_nm_cut_coul_long.cpp +++ b/src/MISC/pair_nm_cut_coul_long.cpp @@ -339,7 +339,7 @@ double PairNMCutCoulLong::init_one(int i, int j) r0n[i][j] = pow(r0[i][j],nn[i][j]); r0m[i][j] = pow(r0[i][j],mm[i][j]); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { offset[i][j] = e0nm[i][j] * ((mm[i][j]*r0n[i][j] / pow(cut_lj[i][j],nn[i][j])) - (nn[i][j]*r0m[i][j] / pow(cut_lj[i][j],mm[i][j]))); diff --git a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp index e3093e4d10..c616a9fa83 100644 --- a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp +++ b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp @@ -531,7 +531,7 @@ double PairLJCutTIP4PCut::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/USER-CGSDK/pair_lj_sdk.cpp b/src/USER-CGSDK/pair_lj_sdk.cpp index 23b0f47a6d..56e56c9605 100644 --- a/src/USER-CGSDK/pair_lj_sdk.cpp +++ b/src/USER-CGSDK/pair_lj_sdk.cpp @@ -311,7 +311,7 @@ double PairLJSDK::init_one(int i, int j) lj3[i][j] = lj_prefact[ljt] * epsilon[i][j] * pow(sigma[i][j],lj_pow1[ljt]); lj4[i][j] = lj_prefact[ljt] * epsilon[i][j] * pow(sigma[i][j],lj_pow2[ljt]); - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double ratio = sigma[i][j] / cut[i][j]; offset[i][j] = lj_prefact[ljt] * epsilon[i][j] * (pow(ratio,lj_pow1[ljt]) - pow(ratio,lj_pow2[ljt])); } else offset[i][j] = 0.0; diff --git a/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp b/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp index 845c5822a7..4c9e42f778 100644 --- a/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp +++ b/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp @@ -401,7 +401,7 @@ double PairLJSDKCoulLong::init_one(int i, int j) lj3[i][j] = lj_prefact[ljt] * epsilon[i][j] * pow(sigma[i][j],lj_pow1[ljt]); lj4[i][j] = lj_prefact[ljt] * epsilon[i][j] * pow(sigma[i][j],lj_pow2[ljt]); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = lj_prefact[ljt] * epsilon[i][j] * (pow(ratio,lj_pow1[ljt]) - pow(ratio,lj_pow2[ljt])); diff --git a/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp b/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp index 81b82e9774..d8bfd698be 100644 --- a/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp +++ b/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp @@ -994,7 +994,7 @@ double PairLJCharmmCoulLongSoft::single(int i, int j, int itype, int jtype, if (rsq < cut_ljsq) { philj = lj1[itype][jtype] * 4.0 * epsilon[itype][jtype] * - (1.0/(denlj*denlj) - 1.0/denlj) - offset[itype][jtype]; + (1.0/(denlj*denlj) - 1.0/denlj); if (rsq > cut_lj_innersq) { switch1 = (cut_ljsq-rsq) * (cut_ljsq-rsq) * (cut_ljsq + 2.0*rsq - 3.0*cut_lj_innersq) / denom_lj; diff --git a/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp b/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp index b2e781c57b..9e52a16a02 100644 --- a/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp @@ -236,6 +236,8 @@ void PairLJCutCoulCutSoft::coeff(int narg, char **arg) double epsilon_one = force->numeric(FLERR,arg[2]); double sigma_one = force->numeric(FLERR,arg[3]); double lambda_one = force->numeric(FLERR,arg[4]); + if (sigma_one <= 0.0) + error->all(FLERR,"Incorrect args for pair coefficients"); double cut_lj_one = cut_lj_global; double cut_coul_one = cut_coul_global; @@ -296,7 +298,7 @@ double PairLJCutCoulCutSoft::init_one(int i, int j) lj3[i][j] = alphalj * (1.0 - lambda[i][j])*(1.0 - lambda[i][j]); lj4[i][j] = alphac * (1.0 - lambda[i][j])*(1.0 - lambda[i][j]); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double denlj = lj3[i][j] + pow(cut_lj[i][j] / sigma[i][j], 6.0); offset[i][j] = lj1[i][j] * 4.0 * epsilon[i][j] * (1.0/(denlj*denlj) - 1.0/denlj); } else offset[i][j] = 0.0; diff --git a/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp b/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp index 3b80729b0b..f7c4084fe2 100644 --- a/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp @@ -604,6 +604,8 @@ void PairLJCutCoulLongSoft::coeff(int narg, char **arg) double epsilon_one = force->numeric(FLERR,arg[2]); double sigma_one = force->numeric(FLERR,arg[3]); double lambda_one = force->numeric(FLERR,arg[4]); + if (sigma_one <= 0.0) + error->all(FLERR,"Incorrect args for pair coefficients"); double cut_lj_one = cut_lj_global; if (narg == 6) cut_lj_one = force->numeric(FLERR,arg[5]); @@ -723,7 +725,7 @@ double PairLJCutCoulLongSoft::init_one(int i, int j) lj3[i][j] = alphalj * (1.0 - lambda[i][j])*(1.0 - lambda[i][j]); lj4[i][j] = alphac * (1.0 - lambda[i][j])*(1.0 - lambda[i][j]); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double denlj = lj3[i][j] + pow(cut_lj[i][j] / sigma[i][j], 6.0); offset[i][j] = lj1[i][j] * 4.0 * epsilon[i][j] * (1.0/(denlj*denlj) - 1.0/denlj); } else offset[i][j] = 0.0; diff --git a/src/USER-FEP/pair_lj_cut_soft.cpp b/src/USER-FEP/pair_lj_cut_soft.cpp index 800fdfcde8..8b6280a61a 100644 --- a/src/USER-FEP/pair_lj_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_soft.cpp @@ -484,6 +484,8 @@ void PairLJCutSoft::coeff(int narg, char **arg) double epsilon_one = force->numeric(FLERR,arg[2]); double sigma_one = force->numeric(FLERR,arg[3]); double lambda_one = force->numeric(FLERR,arg[4]); + if (sigma_one <= 0.0) + error->all(FLERR,"Incorrect args for pair coefficients"); double cut_one = cut_global; if (narg == 6) cut_one = force->numeric(FLERR,arg[5]); @@ -584,7 +586,7 @@ double PairLJCutSoft::init_one(int i, int j) lj2[i][j] = pow(sigma[i][j], 6.0); lj3[i][j] = alphalj * (1.0 - lambda[i][j])*(1.0 - lambda[i][j]); - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double denlj = lj3[i][j] + pow(cut[i][j] / sigma[i][j], 6.0); offset[i][j] = lj1[i][j] * 4.0 * epsilon[i][j] * (1.0/(denlj*denlj) - 1.0/denlj); } else offset[i][j] = 0.0; diff --git a/src/USER-MISC/pair_buck_mdf.cpp b/src/USER-MISC/pair_buck_mdf.cpp index 6c3dcbd7ee..372fbaf8c0 100644 --- a/src/USER-MISC/pair_buck_mdf.cpp +++ b/src/USER-MISC/pair_buck_mdf.cpp @@ -259,7 +259,7 @@ double PairBuckMDF::init_one(int i, int j) buck1[i][j] = a[i][j]/rho[i][j]; buck2[i][j] = 6.0*c[i][j]; - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double rexp = exp(-cut[i][j]/rho[i][j]); offset[i][j] = a[i][j]*rexp - c[i][j]/pow(cut[i][j],6.0); } else offset[i][j] = 0.0; diff --git a/src/USER-MISC/pair_coul_diel.cpp b/src/USER-MISC/pair_coul_diel.cpp index a62362aa6f..c653e9abb2 100644 --- a/src/USER-MISC/pair_coul_diel.cpp +++ b/src/USER-MISC/pair_coul_diel.cpp @@ -235,7 +235,7 @@ double PairCoulDiel::init_one(int i, int j) double *q = atom->q; double qqrd2e = force->qqrd2e; - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double rarg = (cut[i][j]-rme[i][j])/sigmae[i][j]; double epsr=a_eps+b_eps*tanh(rarg); offset[i][j] = qqrd2e*q[i]*q[j]*((eps_s/epsr) -1.)/cut[i][j]; diff --git a/src/USER-MISC/pair_gauss_cut.cpp b/src/USER-MISC/pair_gauss_cut.cpp index 3836187a64..4408545c34 100644 --- a/src/USER-MISC/pair_gauss_cut.cpp +++ b/src/USER-MISC/pair_gauss_cut.cpp @@ -196,6 +196,9 @@ void PairGaussCut::coeff(int narg, char **arg) double hgauss_one = force->numeric(FLERR,arg[2]); double rmh_one = force->numeric(FLERR,arg[3]); double sigmah_one = force->numeric(FLERR,arg[4]); + if (sigmah_one <= 0.0) + error->all(FLERR,"Incorrect args for pair coefficients"); + double cut_one = cut_global; if (narg == 6) cut_one = force->numeric(FLERR,arg[5]); diff --git a/src/USER-MISC/pair_kolmogorov_crespi_z.cpp b/src/USER-MISC/pair_kolmogorov_crespi_z.cpp index 15a325e106..c03aee6362 100644 --- a/src/USER-MISC/pair_kolmogorov_crespi_z.cpp +++ b/src/USER-MISC/pair_kolmogorov_crespi_z.cpp @@ -53,7 +53,7 @@ PairKolmogorovCrespiZ::PairKolmogorovCrespiZ(LAMMPS *lmp) : Pair(lmp) map = NULL; // always compute energy offset - offset_flag = true; + offset_flag = 1; } /* ---------------------------------------------------------------------- */ @@ -285,7 +285,7 @@ double PairKolmogorovCrespiZ::init_one(int i, int j) { if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { int iparam_ij = elem2param[map[i]][map[j]]; Param& p = params[iparam_ij]; offset[i][j] = -p.A*pow(p.z0/cut[i][j],6); diff --git a/src/USER-MISC/pair_list.cpp b/src/USER-MISC/pair_list.cpp index 3adbe8b69d..458c228d58 100644 --- a/src/USER-MISC/pair_list.cpp +++ b/src/USER-MISC/pair_list.cpp @@ -81,7 +81,7 @@ void PairList::compute(int eflag, int vflag) { if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = eflag_global = - vflag_global = eflag_atom = vflag_atom = 0; + vflag_global = eflag_atom = vflag_atom = 0; const int nlocal = atom->nlocal; const int newton_pair = force->newton_pair; @@ -126,46 +126,46 @@ void PairList::compute(int eflag, int vflag) const double r2inv = 1.0/rsq; if (style[n] == HARM) { - const double r = sqrt(rsq); - const double dr = par.parm.harm.r0 - r; - fpair = 2.0*par.parm.harm.k*dr/r; + const double r = sqrt(rsq); + const double dr = par.parm.harm.r0 - r; + fpair = 2.0*par.parm.harm.k*dr/r; - if (eflag_either) - epair = par.parm.harm.k*dr*dr - par.offset; + if (eflag_either) + epair = par.parm.harm.k*dr*dr - par.offset; } else if (style[n] == MORSE) { - const double r = sqrt(rsq); - const double dr = par.parm.morse.r0 - r; - const double dexp = exp(par.parm.morse.alpha * dr); - fpair = 2.0*par.parm.morse.d0*par.parm.morse.alpha - * (dexp*dexp - dexp) / r; + const double r = sqrt(rsq); + const double dr = par.parm.morse.r0 - r; + const double dexp = exp(par.parm.morse.alpha * dr); + fpair = 2.0*par.parm.morse.d0*par.parm.morse.alpha + * (dexp*dexp - dexp) / r; - if (eflag_either) - epair = par.parm.morse.d0 * (dexp*dexp - 2.0*dexp) - par.offset; + if (eflag_either) + epair = par.parm.morse.d0 * (dexp*dexp - 2.0*dexp) - par.offset; } else if (style[n] == LJ126) { - const double r6inv = r2inv*r2inv*r2inv; - const double sig6 = mypow(par.parm.lj126.sigma,6); - fpair = 24.0*par.parm.lj126.epsilon*r6inv - * (2.0*sig6*sig6*r6inv - sig6) * r2inv; + const double r6inv = r2inv*r2inv*r2inv; + const double sig6 = mypow(par.parm.lj126.sigma,6); + fpair = 24.0*par.parm.lj126.epsilon*r6inv + * (2.0*sig6*sig6*r6inv - sig6) * r2inv; - if (eflag_either) - epair = 4.0*par.parm.lj126.epsilon*r6inv - * (sig6*sig6*r6inv - sig6) - par.offset; + if (eflag_either) + epair = 4.0*par.parm.lj126.epsilon*r6inv + * (sig6*sig6*r6inv - sig6) - par.offset; } if (newton_pair || i < nlocal) { - f[i].x += dx*fpair; - f[i].y += dy*fpair; - f[i].z += dz*fpair; + f[i].x += dx*fpair; + f[i].y += dy*fpair; + f[i].z += dz*fpair; } if (newton_pair || j < nlocal) { - f[j].x -= dx*fpair; - f[j].y -= dy*fpair; - f[j].z -= dz*fpair; + f[j].x -= dx*fpair; + f[j].y -= dy*fpair; + f[j].z -= dz*fpair; } if (evflag) ev_tally(i,j,nlocal,newton_pair,epair,0.0,fpair,dx,dy,dz); @@ -174,10 +174,10 @@ void PairList::compute(int eflag, int vflag) if (vflag_fdotr) virial_fdotr_compute(); if (check_flag) { - int tmp; - MPI_Allreduce(&pc,&tmp,1,MPI_INT,MPI_SUM,world); - if (tmp != 2*npairs) - error->all(FLERR,"Not all pairs processed in pair_style list"); + int tmp; + MPI_Allreduce(&pc,&tmp,1,MPI_INT,MPI_SUM,world); + if (tmp != 2*npairs) + error->all(FLERR,"Not all pairs processed in pair_style list"); } } @@ -263,12 +263,12 @@ void PairList::settings(int narg, char **arg) ptr = strtok(NULL," \t\n\r\f"); if ((ptr == NULL) || (*ptr == '#')) - error->all(FLERR,"Incorrectly formatted harmonic pair parameters"); + error->all(FLERR,"Incorrectly formatted harmonic pair parameters"); par.parm.harm.k = force->numeric(FLERR,ptr); ptr = strtok(NULL," \t\n\r\f"); if ((ptr == NULL) || (*ptr == '#')) - error->all(FLERR,"Incorrectly formatted harmonic pair parameters"); + error->all(FLERR,"Incorrectly formatted harmonic pair parameters"); par.parm.harm.r0 = force->numeric(FLERR,ptr); ++nharm; @@ -279,17 +279,17 @@ void PairList::settings(int narg, char **arg) ptr = strtok(NULL," \t\n\r\f"); if (!ptr) - error->all(FLERR,"Incorrectly formatted morse pair parameters"); + error->all(FLERR,"Incorrectly formatted morse pair parameters"); par.parm.morse.d0 = force->numeric(FLERR,ptr); ptr = strtok(NULL," \t\n\r\f"); if (!ptr) - error->all(FLERR,"Incorrectly formatted morse pair parameters"); + error->all(FLERR,"Incorrectly formatted morse pair parameters"); par.parm.morse.alpha = force->numeric(FLERR,ptr); ptr = strtok(NULL," \t\n\r\f"); if (!ptr) - error->all(FLERR,"Incorrectly formatted morse pair parameters"); + error->all(FLERR,"Incorrectly formatted morse pair parameters"); par.parm.morse.r0 = force->numeric(FLERR,ptr); ++nmorse; @@ -300,12 +300,12 @@ void PairList::settings(int narg, char **arg) ptr = strtok(NULL," \t\n\r\f"); if (!ptr) - error->all(FLERR,"Incorrectly formatted 12-6 LJ pair parameters"); + error->all(FLERR,"Incorrectly formatted 12-6 LJ pair parameters"); par.parm.lj126.epsilon = force->numeric(FLERR,ptr); ptr = strtok(NULL," \t\n\r\f"); if (!ptr) - error->all(FLERR,"Incorrectly formatted 12-6 LJ pair parameters"); + error->all(FLERR,"Incorrectly formatted 12-6 LJ pair parameters"); par.parm.lj126.sigma = force->numeric(FLERR,ptr); ++nlj126; @@ -332,10 +332,10 @@ void PairList::settings(int narg, char **arg) if (comm->me == 0) { if (screen) fprintf(screen,"Read %d (%d/%d/%d) interacting pairs from %s\n", - npairs, nharm, nmorse, nlj126, arg[0]); + npairs, nharm, nmorse, nlj126, arg[0]); if (logfile) fprintf(logfile,"Read %d (%d/%d/%d) interacting pairs from %s\n", - npairs, nharm, nmorse, nlj126, arg[0]); + npairs, nharm, nmorse, nlj126, arg[0]); } } @@ -380,18 +380,18 @@ void PairList::init_style() list_parm_t &par = params[n]; if (style[n] == HARM) { - const double dr = sqrt(par.cutsq) - par.parm.harm.r0; - par.offset = par.parm.harm.k*dr*dr; + const double dr = sqrt(par.cutsq) - par.parm.harm.r0; + par.offset = par.parm.harm.k*dr*dr; } else if (style[n] == MORSE) { - const double dr = par.parm.morse.r0 - sqrt(par.cutsq); - const double dexp = exp(par.parm.morse.alpha * dr); - par.offset = par.parm.morse.d0 * (dexp*dexp - 2.0*dexp); + const double dr = par.parm.morse.r0 - sqrt(par.cutsq); + const double dexp = exp(par.parm.morse.alpha * dr); + par.offset = par.parm.morse.d0 * (dexp*dexp - 2.0*dexp); } else if (style[n] == LJ126) { - const double r6inv = par.cutsq*par.cutsq*par.cutsq; - const double sig6 = mypow(par.parm.lj126.sigma,6); - par.offset = 4.0*par.parm.lj126.epsilon*r6inv * (sig6*sig6*r6inv - sig6); + const double r6inv = par.cutsq*par.cutsq*par.cutsq; + const double sig6 = mypow(par.parm.lj126.sigma,6); + par.offset = 4.0*par.parm.lj126.epsilon*r6inv * (sig6*sig6*r6inv - sig6); } } } diff --git a/src/pair_born.cpp b/src/pair_born.cpp index 6d420fb36b..979499488e 100644 --- a/src/pair_born.cpp +++ b/src/pair_born.cpp @@ -243,7 +243,7 @@ double PairBorn::init_one(int i, int j) born2[i][j] = 6.0*c[i][j]; born3[i][j] = 8.0*d[i][j]; - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double rexp = exp((sigma[i][j]-cut[i][j])*rhoinv[i][j]); offset[i][j] = a[i][j]*rexp - c[i][j]/pow(cut[i][j],6.0) + d[i][j]/pow(cut[i][j],8.0); diff --git a/src/pair_born_coul_dsf.cpp b/src/pair_born_coul_dsf.cpp index caec95759a..d53e9cf00e 100644 --- a/src/pair_born_coul_dsf.cpp +++ b/src/pair_born_coul_dsf.cpp @@ -306,7 +306,7 @@ double PairBornCoulDSF::init_one(int i, int j) born2[i][j] = 6.0*c[i][j]; born3[i][j] = 8.0*d[i][j]; - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double rexp = exp((sigma[i][j]-cut_lj[i][j])*rhoinv[i][j]); offset[i][j] = a[i][j]*rexp - c[i][j]/pow(cut_lj[i][j],6.0) + d[i][j]/pow(cut_lj[i][j],8.0); diff --git a/src/pair_born_coul_wolf.cpp b/src/pair_born_coul_wolf.cpp index bad0c5ed3e..fbec4f3da7 100644 --- a/src/pair_born_coul_wolf.cpp +++ b/src/pair_born_coul_wolf.cpp @@ -305,7 +305,7 @@ double PairBornCoulWolf::init_one(int i, int j) born2[i][j] = 6.0*c[i][j]; born3[i][j] = 8.0*d[i][j]; - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double rexp = exp((sigma[i][j]-cut_lj[i][j])*rhoinv[i][j]); offset[i][j] = a[i][j]*rexp - c[i][j]/pow(cut_lj[i][j],6.0) + d[i][j]/pow(cut_lj[i][j],8.0); diff --git a/src/pair_buck.cpp b/src/pair_buck.cpp index e4da772e0a..ac7ac0aeb5 100644 --- a/src/pair_buck.cpp +++ b/src/pair_buck.cpp @@ -230,7 +230,7 @@ double PairBuck::init_one(int i, int j) buck1[i][j] = a[i][j]/rho[i][j]; buck2[i][j] = 6.0*c[i][j]; - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double rexp = exp(-cut[i][j]/rho[i][j]); offset[i][j] = a[i][j]*rexp - c[i][j]/pow(cut[i][j],6.0); } else offset[i][j] = 0.0; diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index c052c3100a..2764a8e4e4 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -281,7 +281,7 @@ double PairBuckCoulCut::init_one(int i, int j) buck1[i][j] = a[i][j]/rho[i][j]; buck2[i][j] = 6.0*c[i][j]; - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double rexp = exp(-cut_lj[i][j]/rho[i][j]); offset[i][j] = a[i][j]*rexp - c[i][j]/pow(cut_lj[i][j],6.0); } else offset[i][j] = 0.0; diff --git a/src/pair_lj96_cut.cpp b/src/pair_lj96_cut.cpp index f4b2747d40..83fc5bcdda 100644 --- a/src/pair_lj96_cut.cpp +++ b/src/pair_lj96_cut.cpp @@ -557,7 +557,7 @@ double PairLJ96Cut::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],9.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double ratio = sigma[i][j] / cut[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,9.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/pair_lj_cut.cpp b/src/pair_lj_cut.cpp index a3ebf414c9..7f838061f1 100644 --- a/src/pair_lj_cut.cpp +++ b/src/pair_lj_cut.cpp @@ -551,7 +551,7 @@ double PairLJCut::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double ratio = sigma[i][j] / cut[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/pair_lj_cut_coul_cut.cpp b/src/pair_lj_cut_coul_cut.cpp index 0d62c43dc3..85cf9dc97d 100644 --- a/src/pair_lj_cut_coul_cut.cpp +++ b/src/pair_lj_cut_coul_cut.cpp @@ -278,7 +278,7 @@ double PairLJCutCoulCut::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/pair_lj_cut_coul_dsf.cpp b/src/pair_lj_cut_coul_dsf.cpp index 09293a6f4c..5d95d06ed7 100644 --- a/src/pair_lj_cut_coul_dsf.cpp +++ b/src/pair_lj_cut_coul_dsf.cpp @@ -303,7 +303,7 @@ double PairLJCutCoulDSF::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/pair_lj_expand.cpp b/src/pair_lj_expand.cpp index 2fd780472a..785733dccc 100644 --- a/src/pair_lj_expand.cpp +++ b/src/pair_lj_expand.cpp @@ -240,7 +240,7 @@ double PairLJExpand::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double ratio = sigma[i][j] / cut[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/pair_mie_cut.cpp b/src/pair_mie_cut.cpp index 312fb7bc70..320f21248d 100644 --- a/src/pair_mie_cut.cpp +++ b/src/pair_mie_cut.cpp @@ -575,7 +575,7 @@ double PairMIECut::init_one(int i, int j) mie3[i][j] = Cmie[i][j] * epsilon[i][j] * pow(sigma[i][j],gamR[i][j]); mie4[i][j] = Cmie[i][j] * epsilon[i][j] * pow(sigma[i][j],gamA[i][j]); - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double ratio = sigma[i][j] / cut[i][j]; offset[i][j] = Cmie[i][j] * epsilon[i][j] * (pow(ratio,gamR[i][j]) - pow(ratio,gamA[i][j])); diff --git a/src/pair_yukawa.cpp b/src/pair_yukawa.cpp index 0e5fd36cd6..2ba6633d9e 100644 --- a/src/pair_yukawa.cpp +++ b/src/pair_yukawa.cpp @@ -210,7 +210,7 @@ double PairYukawa::init_one(int i, int j) cut[i][j] = mix_distance(cut[i][i],cut[j][j]); } - if (offset_flag) { + if (offset_flag && (cut[i][j] > 0.0)) { double screening = exp(-kappa * cut[i][j]); offset[i][j] = a[i][j] * screening / cut[i][j]; } else offset[i][j] = 0.0; -- GitLab From d7355801dff5d7ef2aed45fa0a90bb9a40016ff5 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Sat, 15 Jul 2017 12:03:04 -0500 Subject: [PATCH 485/593] Make KIM Install.py Python 3 compatible --- lib/kim/Install.py | 141 ++++++++++++++++++++++----------------------- 1 file changed, 70 insertions(+), 71 deletions(-) diff --git a/lib/kim/Install.py b/lib/kim/Install.py index 9f36f9fedb..cf1b254ecd 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -2,8 +2,8 @@ # install.pa tool to setup the kim-api library # used to automate the steps described in the README file in this dir - -import sys,os,re,urllib,commands +from __future__ import print_function +import sys,os,re,urllib,subprocess help = """ Syntax from src dir: make lib-kim args="-v version -b kim-install-dir kim-name -a kim-name" @@ -42,7 +42,7 @@ in the "What is in the KIM API source package?" section """ def error(): - print help + print(help) sys.exit() # parse args @@ -54,8 +54,8 @@ if nargs == 0: error() thisdir = os.environ['PWD'] version = "kim-api-v1.8.2" -buildflag = 0 -addflag = 0 +buildflag = False +addflag = False iarg = 0 while iarg < len(args): @@ -64,13 +64,13 @@ while iarg < len(args): version = args[iarg+1] iarg += 2 elif args[iarg] == "-b": - buildflag = 1 + buildflag = True if iarg+3 > len(args): error() dir = args[iarg+1] modelname = args[iarg+2] iarg += 3 elif args[iarg] == "-a": - addflag = 1 + addflag = True if iarg+2 > len(args): error() addmodelname = args[iarg+1] iarg += 2 @@ -82,176 +82,175 @@ url = "https://s3.openkim.org/kim-api/%s.tgz" % version # download KIM tarball, unpack, build KIM # either in lib/kim or user-requested location -if buildflag == 1: +if buildflag: # set install directory - dir = os.path.abspath(dir) + "/installed-" + version + dir = os.path.join(os.path.abspath(dir), "installed-" + version) # check to see if an installed kim-api already exists if os.path.isdir(dir): - print "kim-api is already installed at %s" % dir - print "Must remove this directory in order to resintall at this location" + print("kim-api is already installed at %s" % dir) + print("Must remove this directory in order to resintall at this location") sys.exit() # configure LAMMPS to use kim-api to be installed - mkfle = open("%s/Makefile.KIM_DIR" % thisdir, 'w') - mkfle.write("KIM_INSTALL_DIR=%s\n" % dir) - mkfle.write("\n") - mkfle.write(".DUMMY: print_dir\n") - mkfle.write("\n") - mkfle.write("print_dir:\n") - mkfle.write(" @printf $(KIM_INSTALL_DIR)\n") - mkfle.close() - open("%s/Makefile.KIM_Config" % thisdir, 'w'). \ - write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) - print "Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) + with open("%s/Makefile.KIM_DIR" % thisdir, 'w') as mkfile: + mkfle.write("KIM_INSTALL_DIR=%s\n\n" % dir) + mkfle.write(".DUMMY: print_dir\n\n") + mkfle.write("print_dir:\n") + mkfle.write(" @printf $(KIM_INSTALL_DIR)\n") + + with open("%s/Makefile.KIM_Config" % thisdir, 'w') as cfgfile: + cfgfile.write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) + + print("Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir)) # download entire kim-api tarball # try first via urllib # if fails (probably due to no SSL support), use wget - print "Downloading kim-api tarball ..." + print("Downloading kim-api tarball ...") try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,version)) except: cmd = "wget %s %s/%s.tgz" % (url,thisdir,version) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if not os.path.isfile("%s/%s.tgz" % (thisdir,version)): - print "Both urllib.urlretrieve() and wget command failed to download" + print("Both urllib.urlretrieve() and wget command failed to download") sys.exit() - print "Unpacking kim-api tarball ..." + print("Unpacking kim-api tarball ...") cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (thisdir,version,version) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) if txt[0] != 0: error() # configure kim-api - print "Configuring kim-api ..." + print("Configuring kim-api ...") cmd = "cd %s/%s; ./configure --prefix='%s'" % (thisdir,version,dir) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() # build kim-api - print "Configuring model : %s" % modelname + print("Configuring model : %s" % modelname) if modelname == "none": cmd = "cd %s/%s; make add-examples" % (thisdir,version) else: if modelname == "OpenKIM": - print "configuring all OpenKIM models, this will take a while ..." + print("configuring all OpenKIM models, this will take a while ...") cmd = "cd %s/%s; make add-examples; make add-%s" % \ (thisdir,version,modelname) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() - print "Building kim-api ..." + print("Building kim-api ...") cmd = "cd %s/%s; make" % (thisdir,version) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() # install kim-api - print "Installing kim-api ..." + print("Installing kim-api ...") cmd = "cd %s/%s; make install" % (thisdir,version) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() cmd = "cd %s/%s; make install-set-default-to-v1" %(thisdir,version) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() # remove source files - print "Removing kim-api source and build files ..." + print("Removing kim-api source and build files ...") cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" % (thisdir,version,version) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() # add a single model (and possibly its driver) to existing KIM installation -if addflag == 1: +if addflag: # get location of installed kim-api if not os.path.isfile("%s/Makefile.KIM_DIR" % thisdir): - print "kim-api is not installed" + print("kim-api is not installed") error() else: cmd = "cd %s; make -f Makefile.KIM_DIR print_dir" % thisdir - dir = commands.getstatusoutput(cmd)[1] + dir = subprocess.getstatusoutput(cmd)[1] # download single model # try first via urllib # if fails (probably due to no SSL support), use wget - print "Downloading item tarball ..." + print("Downloading item tarball ...") url = "https://openkim.org/download/%s.tgz" % addmodelname try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,addmodelname)) except: cmd = "wget %s %s/%s.tgz" % (url,thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if not os.path.isfile("%s/%s.tgz" % (thisdir,addmodelname)): - print "Both urllib.urlretrieve() and wget command failed to download" + print("Both urllib.urlretrieve() and wget command failed to download") sys.exit() - print "Unpacking item tarball ..." + print("Unpacking item tarball ...") cmd = "cd %s; tar zxvf %s.tgz" % (thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) if txt[0] != 0: error() - print "Building item ..." + print("Building item ...") cmd = "cd %s/%s; make; make install" %(thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) firstRunOutput = txt[1] if txt[0] != 0: # Error: but first, check to see if it needs a driver cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) if txt[1] == "ParameterizedModel": # Get and install driver cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) adddrivername = txt[1] - print "First Installing model driver: %s" % adddrivername + print("First Installing model driver: %s" % adddrivername) cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) if txt[0] != 0: - print firstRunOutput - print txt[1] + print(firstRunOutput) + print(txt[1]) error() else: - print txt[1] + print(txt[1]) cmd = "cd %s; python Install.py -a %s" % (thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() else: - print firstRunOutput + print(firstRunOutput) error() else: # success - print firstRunOutput - print "Removing kim item source and build files ..." + print(firstRunOutput) + print("Removing kim item source and build files ...") cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() -- GitLab From 992ce797010d5de94163e5b4a7f2f02b6f1ca537 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 16 Jul 2017 14:37:30 -0400 Subject: [PATCH 486/593] add sanity checks to EAM potential file reader subroutine --- src/MANYBODY/pair_eam.cpp | 8 ++++++-- src/MANYBODY/pair_eam_alloy.cpp | 6 +++++- src/MANYBODY/pair_eam_fs.cpp | 6 +++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp index d3ac3951bf..29a627e1d0 100644 --- a/src/MANYBODY/pair_eam.cpp +++ b/src/MANYBODY/pair_eam.cpp @@ -465,16 +465,17 @@ void PairEAM::read_file(char *filename) } } - int tmp; + int tmp,nwords; if (me == 0) { fgets(line,MAXLINE,fptr); fgets(line,MAXLINE,fptr); sscanf(line,"%d %lg",&tmp,&file->mass); fgets(line,MAXLINE,fptr); - sscanf(line,"%d %lg %d %lg %lg", + nwords = sscanf(line,"%d %lg %d %lg %lg", &file->nrho,&file->drho,&file->nr,&file->dr,&file->cut); } + MPI_Bcast(&nwords,1,MPI_INT,0,world); MPI_Bcast(&file->mass,1,MPI_DOUBLE,0,world); MPI_Bcast(&file->nrho,1,MPI_INT,0,world); MPI_Bcast(&file->drho,1,MPI_DOUBLE,0,world); @@ -482,6 +483,9 @@ void PairEAM::read_file(char *filename) MPI_Bcast(&file->dr,1,MPI_DOUBLE,0,world); MPI_Bcast(&file->cut,1,MPI_DOUBLE,0,world); + if ((nwords != 5) || (file->nrho <= 0) || (file->nr <= 0) || (file->dr <= 0.0)) + error->all(FLERR,"Invalid EAM potential file"); + memory->create(file->frho,(file->nrho+1),"pair:frho"); memory->create(file->rhor,(file->nr+1),"pair:rhor"); memory->create(file->zr,(file->nr+1),"pair:zr"); diff --git a/src/MANYBODY/pair_eam_alloy.cpp b/src/MANYBODY/pair_eam_alloy.cpp index d3ed404a0b..e22b4642a8 100644 --- a/src/MANYBODY/pair_eam_alloy.cpp +++ b/src/MANYBODY/pair_eam_alloy.cpp @@ -166,16 +166,20 @@ void PairEAMAlloy::read_file(char *filename) if (me == 0) { fgets(line,MAXLINE,fptr); - sscanf(line,"%d %lg %d %lg %lg", + nwords = sscanf(line,"%d %lg %d %lg %lg", &file->nrho,&file->drho,&file->nr,&file->dr,&file->cut); } + MPI_Bcast(&nwords,1,MPI_INT,0,world); MPI_Bcast(&file->nrho,1,MPI_INT,0,world); MPI_Bcast(&file->drho,1,MPI_DOUBLE,0,world); MPI_Bcast(&file->nr,1,MPI_INT,0,world); MPI_Bcast(&file->dr,1,MPI_DOUBLE,0,world); MPI_Bcast(&file->cut,1,MPI_DOUBLE,0,world); + if ((nwords != 5) || (file->nrho <= 0) || (file->nr <= 0) || (file->dr <= 0.0)) + error->all(FLERR,"Invalid EAM potential file"); + file->mass = new double[file->nelements]; memory->create(file->frho,file->nelements,file->nrho+1,"pair:frho"); memory->create(file->rhor,file->nelements,file->nr+1,"pair:rhor"); diff --git a/src/MANYBODY/pair_eam_fs.cpp b/src/MANYBODY/pair_eam_fs.cpp index f0f1814dc2..2817e13f8a 100644 --- a/src/MANYBODY/pair_eam_fs.cpp +++ b/src/MANYBODY/pair_eam_fs.cpp @@ -166,16 +166,20 @@ void PairEAMFS::read_file(char *filename) if (me == 0) { fgets(line,MAXLINE,fptr); - sscanf(line,"%d %lg %d %lg %lg", + nwords = sscanf(line,"%d %lg %d %lg %lg", &file->nrho,&file->drho,&file->nr,&file->dr,&file->cut); } + MPI_Bcast(&nwords,1,MPI_INT,0,world); MPI_Bcast(&file->nrho,1,MPI_INT,0,world); MPI_Bcast(&file->drho,1,MPI_DOUBLE,0,world); MPI_Bcast(&file->nr,1,MPI_INT,0,world); MPI_Bcast(&file->dr,1,MPI_DOUBLE,0,world); MPI_Bcast(&file->cut,1,MPI_DOUBLE,0,world); + if ((nwords != 5) || (file->nrho <= 0) || (file->nr <= 0) || (file->dr <= 0.0)) + error->all(FLERR,"Invalid EAM potential file"); + file->mass = new double[file->nelements]; memory->create(file->frho,file->nelements,file->nrho+1, "pair:frho"); -- GitLab From bda07301693ae242d089a234b9f34a2ff0316fd9 Mon Sep 17 00:00:00 2001 From: Max Veit Date: Mon, 7 Nov 2016 14:59:25 +0000 Subject: [PATCH 487/593] Modified the quip/lammps interface to pass lammps atom ids --- src/USER-QUIP/pair_quip.cpp | 3 ++- src/USER-QUIP/pair_quip.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/USER-QUIP/pair_quip.cpp b/src/USER-QUIP/pair_quip.cpp index e8b23c761f..0ad8066027 100644 --- a/src/USER-QUIP/pair_quip.cpp +++ b/src/USER-QUIP/pair_quip.cpp @@ -66,6 +66,7 @@ void PairQUIP::compute(int eflag, int vflag) int nghost = atom->nghost; int ntotal = nlocal + nghost; int *type = atom->type; + tagint *tag = atom->tag; double **x = atom->x; double **f = atom->f; @@ -124,7 +125,7 @@ void PairQUIP::compute(int eflag, int vflag) lattice[8] = domain->zprd; quip_lammps_wrapper - (&nlocal,&nghost,atomic_numbers, + (&nlocal,&nghost,atomic_numbers,tag, &inum,&sum_num_neigh,ilist, quip_num_neigh,quip_neigh,lattice, quip_potential,&n_quip_potential,&x[0][0], diff --git a/src/USER-QUIP/pair_quip.h b/src/USER-QUIP/pair_quip.h index f86df015ea..985a43fd7e 100644 --- a/src/USER-QUIP/pair_quip.h +++ b/src/USER-QUIP/pair_quip.h @@ -24,7 +24,7 @@ PairStyle(quip,PairQUIP) extern "C" { - void quip_lammps_wrapper(int*, int*, int*, + void quip_lammps_wrapper(int*, int*, int*, int*, int*, int*, int*, int*, int*, double*, int*, int*, double*, -- GitLab From 23033404b0a4f3101a3090981329780b088d8050 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 17 Jul 2017 18:18:21 -0400 Subject: [PATCH 488/593] skip table consistency check for bitmapped tables --- src/pair_table.cpp | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/pair_table.cpp b/src/pair_table.cpp index b36843ff44..782fb43f9a 100644 --- a/src/pair_table.cpp +++ b/src/pair_table.cpp @@ -453,20 +453,25 @@ void PairTable::read_table(Table *tb, char *file, char *keyword) double r,e,f,rprev,rnext,eprev,enext,fleft,fright; int ferror = 0; - for (int i = 1; i < tb->ninput-1; i++) { - r = tb->rfile[i]; - rprev = tb->rfile[i-1]; - rnext = tb->rfile[i+1]; - e = tb->efile[i]; - eprev = tb->efile[i-1]; - enext = tb->efile[i+1]; - f = tb->ffile[i]; - fleft = - (e-eprev) / (r-rprev); - fright = - (enext-e) / (rnext-r); - if (f < fleft && f < fright) ferror++; - if (f > fleft && f > fright) ferror++; - //printf("Values %d: %g %g %g\n",i,r,e,f); - //printf(" secant %d %d %g: %g %g %g\n",i,ferror,r,fleft,fright,f); + + // bitmapped tables do not follow regular ordering, so we cannot check them here + + if (tb->rflag != BMP) { + for (int i = 1; i < tb->ninput-1; i++) { + r = tb->rfile[i]; + rprev = tb->rfile[i-1]; + rnext = tb->rfile[i+1]; + e = tb->efile[i]; + eprev = tb->efile[i-1]; + enext = tb->efile[i+1]; + f = tb->ffile[i]; + fleft = - (e-eprev) / (r-rprev); + fright = - (enext-e) / (rnext-r); + if (f < fleft && f < fright) ferror++; + if (f > fleft && f > fright) ferror++; + //printf("Values %d: %g %g %g\n",i,r,e,f); + //printf(" secant %d %d %g: %g %g %g\n",i,ferror,r,fleft,fright,f); + } } if (ferror) { -- GitLab From c3a2ed0d1b30c8afb8464e7695f8ec808462be08 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 17 Jul 2017 23:56:38 -0400 Subject: [PATCH 489/593] plug small memory leak in USER-OMP variants of pppm kspace styles --- src/USER-OMP/pppm_cg_omp.cpp | 16 ++++++------- src/USER-OMP/pppm_cg_omp.h | 3 +-- src/USER-OMP/pppm_disp_omp.cpp | 31 ++++++++---------------- src/USER-OMP/pppm_disp_omp.h | 1 - src/USER-OMP/pppm_disp_tip4p_omp.cpp | 28 ++++++++++------------ src/USER-OMP/pppm_disp_tip4p_omp.h | 3 +-- src/USER-OMP/pppm_omp.cpp | 6 ++--- src/USER-OMP/pppm_omp.h | 3 +-- src/USER-OMP/pppm_tip4p_omp.cpp | 16 ++++++------- src/USER-OMP/pppm_tip4p_omp.h | 3 +-- src/USER-OMP/thr_data.cpp | 35 +++++++++++++++++----------- 11 files changed, 64 insertions(+), 81 deletions(-) diff --git a/src/USER-OMP/pppm_cg_omp.cpp b/src/USER-OMP/pppm_cg_omp.cpp index 021765d14b..df0e632f78 100644 --- a/src/USER-OMP/pppm_cg_omp.cpp +++ b/src/USER-OMP/pppm_cg_omp.cpp @@ -55,13 +55,11 @@ PPPMCGOMP::PPPMCGOMP(LAMMPS *lmp, int narg, char **arg) : } /* ---------------------------------------------------------------------- - allocate memory that depends on # of K-vectors and order + clean up per-thread allocations ------------------------------------------------------------------------- */ -void PPPMCGOMP::allocate() +PPPMCGOMP::~PPPMCGOMP() { - PPPMCG::allocate(); - #if defined(_OPENMP) #pragma omp parallel default(none) #endif @@ -72,17 +70,17 @@ void PPPMCGOMP::allocate() const int tid = 0; #endif ThrData *thr = fix->get_thr(tid); - thr->init_pppm(order,memory); + thr->init_pppm(-order,memory); } } /* ---------------------------------------------------------------------- - free memory that depends on # of K-vectors and order + allocate memory that depends on # of K-vectors and order ------------------------------------------------------------------------- */ -void PPPMCGOMP::deallocate() +void PPPMCGOMP::allocate() { - PPPMCG::deallocate(); + PPPMCG::allocate(); #if defined(_OPENMP) #pragma omp parallel default(none) @@ -94,7 +92,7 @@ void PPPMCGOMP::deallocate() const int tid = 0; #endif ThrData *thr = fix->get_thr(tid); - thr->init_pppm(-order,memory); + thr->init_pppm(order,memory); } } diff --git a/src/USER-OMP/pppm_cg_omp.h b/src/USER-OMP/pppm_cg_omp.h index 91f09ebbfa..07763eba38 100644 --- a/src/USER-OMP/pppm_cg_omp.h +++ b/src/USER-OMP/pppm_cg_omp.h @@ -28,12 +28,11 @@ namespace LAMMPS_NS { class PPPMCGOMP : public PPPMCG, public ThrOMP { public: PPPMCGOMP(class LAMMPS *, int, char **); - virtual ~PPPMCGOMP () {}; + virtual ~PPPMCGOMP (); virtual void compute(int, int); protected: virtual void allocate(); - virtual void deallocate(); virtual void compute_gf_ik(); virtual void compute_gf_ad(); diff --git a/src/USER-OMP/pppm_disp_omp.cpp b/src/USER-OMP/pppm_disp_omp.cpp index 16d3001ddf..6cf2983761 100644 --- a/src/USER-OMP/pppm_disp_omp.cpp +++ b/src/USER-OMP/pppm_disp_omp.cpp @@ -55,17 +55,6 @@ PPPMDispOMP::PPPMDispOMP(LAMMPS *lmp, int narg, char **arg) : PPPMDispOMP::~PPPMDispOMP() { - deallocate(); -} - -/* ---------------------------------------------------------------------- - allocate memory that depends on # of K-vectors and order -------------------------------------------------------------------------- */ - -void PPPMDispOMP::allocate() -{ - PPPMDisp::allocate(); - #if defined(_OPENMP) #pragma omp parallel default(none) #endif @@ -75,25 +64,24 @@ void PPPMDispOMP::allocate() #else const int tid = 0; #endif - if (function[0]) { - ThrData *thr = fix->get_thr(tid); - thr->init_pppm(order,memory); + ThrData * thr = fix->get_thr(tid); + thr->init_pppm(-order,memory); } if (function[1] + function[2]) { ThrData * thr = fix->get_thr(tid); - thr->init_pppm_disp(order_6,memory); + thr->init_pppm_disp(-order_6,memory); } } } /* ---------------------------------------------------------------------- - free memory that depends on # of K-vectors and order + allocate memory that depends on # of K-vectors and order ------------------------------------------------------------------------- */ -void PPPMDispOMP::deallocate() +void PPPMDispOMP::allocate() { - PPPMDisp::deallocate(); + PPPMDisp::allocate(); #if defined(_OPENMP) #pragma omp parallel default(none) @@ -104,13 +92,14 @@ void PPPMDispOMP::deallocate() #else const int tid = 0; #endif + if (function[0]) { - ThrData * thr = fix->get_thr(tid); - thr->init_pppm(-order,memory); + ThrData *thr = fix->get_thr(tid); + thr->init_pppm(order,memory); } if (function[1] + function[2]) { ThrData * thr = fix->get_thr(tid); - thr->init_pppm_disp(-order_6,memory); + thr->init_pppm_disp(order_6,memory); } } } diff --git a/src/USER-OMP/pppm_disp_omp.h b/src/USER-OMP/pppm_disp_omp.h index 86c213282a..b1ec2856bb 100644 --- a/src/USER-OMP/pppm_disp_omp.h +++ b/src/USER-OMP/pppm_disp_omp.h @@ -33,7 +33,6 @@ namespace LAMMPS_NS { protected: virtual void allocate(); - virtual void deallocate(); virtual void compute_gf(); virtual void compute_gf_6(); diff --git a/src/USER-OMP/pppm_disp_tip4p_omp.cpp b/src/USER-OMP/pppm_disp_tip4p_omp.cpp index 8872c849f3..29aeeb79dc 100644 --- a/src/USER-OMP/pppm_disp_tip4p_omp.cpp +++ b/src/USER-OMP/pppm_disp_tip4p_omp.cpp @@ -52,13 +52,10 @@ PPPMDispTIP4POMP::PPPMDispTIP4POMP(LAMMPS *lmp, int narg, char **arg) : suffix_flag |= Suffix::OMP; } -/* ---------------------------------------------------------------------- - allocate memory that depends on # of K-vectors and order -------------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- */ -void PPPMDispTIP4POMP::allocate() +PPPMDispTIP4POMP::~PPPMDispTIP4POMP() { - PPPMDispTIP4P::allocate(); #if defined(_OPENMP) #pragma omp parallel default(none) @@ -69,25 +66,24 @@ void PPPMDispTIP4POMP::allocate() #else const int tid = 0; #endif - if (function[0]) { - ThrData *thr = fix->get_thr(tid); - thr->init_pppm(order,memory); + ThrData * thr = fix->get_thr(tid); + thr->init_pppm(-order,memory); } if (function[1] + function[2]) { ThrData * thr = fix->get_thr(tid); - thr->init_pppm_disp(order_6,memory); + thr->init_pppm_disp(-order_6,memory); } } } /* ---------------------------------------------------------------------- - free memory that depends on # of K-vectors and order + allocate memory that depends on # of K-vectors and order ------------------------------------------------------------------------- */ -void PPPMDispTIP4POMP::deallocate() +void PPPMDispTIP4POMP::allocate() { - PPPMDispTIP4P::deallocate(); + PPPMDispTIP4P::allocate(); #if defined(_OPENMP) #pragma omp parallel default(none) @@ -98,18 +94,18 @@ void PPPMDispTIP4POMP::deallocate() #else const int tid = 0; #endif + if (function[0]) { - ThrData * thr = fix->get_thr(tid); - thr->init_pppm(-order,memory); + ThrData *thr = fix->get_thr(tid); + thr->init_pppm(order,memory); } if (function[1] + function[2]) { ThrData * thr = fix->get_thr(tid); - thr->init_pppm_disp(-order_6,memory); + thr->init_pppm_disp(order_6,memory); } } } - /* ---------------------------------------------------------------------- Compute the modified (hockney-eastwood) coulomb green function ------------------------------------------------------------------------- */ diff --git a/src/USER-OMP/pppm_disp_tip4p_omp.h b/src/USER-OMP/pppm_disp_tip4p_omp.h index e05a52ac80..296444366b 100644 --- a/src/USER-OMP/pppm_disp_tip4p_omp.h +++ b/src/USER-OMP/pppm_disp_tip4p_omp.h @@ -28,11 +28,10 @@ namespace LAMMPS_NS { class PPPMDispTIP4POMP : public PPPMDispTIP4P, public ThrOMP { public: PPPMDispTIP4POMP(class LAMMPS *, int, char **); - virtual ~PPPMDispTIP4POMP () {}; + virtual ~PPPMDispTIP4POMP (); protected: virtual void allocate(); - virtual void deallocate(); virtual void compute_gf(); virtual void compute_gf_6(); diff --git a/src/USER-OMP/pppm_omp.cpp b/src/USER-OMP/pppm_omp.cpp index a62199be56..48b91e3a7b 100644 --- a/src/USER-OMP/pppm_omp.cpp +++ b/src/USER-OMP/pppm_omp.cpp @@ -74,13 +74,11 @@ void PPPMOMP::allocate() } /* ---------------------------------------------------------------------- - free memory that depends on # of K-vectors and order + clean up per-thread allocations ------------------------------------------------------------------------- */ -void PPPMOMP::deallocate() +PPPMOMP::~PPPMOMP() { - PPPM::deallocate(); - #if defined(_OPENMP) #pragma omp parallel default(none) #endif diff --git a/src/USER-OMP/pppm_omp.h b/src/USER-OMP/pppm_omp.h index 03eb0e110b..bf8a9e0c21 100644 --- a/src/USER-OMP/pppm_omp.h +++ b/src/USER-OMP/pppm_omp.h @@ -28,12 +28,11 @@ namespace LAMMPS_NS { class PPPMOMP : public PPPM, public ThrOMP { public: PPPMOMP(class LAMMPS *, int, char **); - virtual ~PPPMOMP () {}; + virtual ~PPPMOMP (); virtual void compute(int, int); protected: virtual void allocate(); - virtual void deallocate(); virtual void compute_gf_ik(); virtual void compute_gf_ad(); diff --git a/src/USER-OMP/pppm_tip4p_omp.cpp b/src/USER-OMP/pppm_tip4p_omp.cpp index 21e3081c65..1eab140cec 100644 --- a/src/USER-OMP/pppm_tip4p_omp.cpp +++ b/src/USER-OMP/pppm_tip4p_omp.cpp @@ -53,13 +53,11 @@ PPPMTIP4POMP::PPPMTIP4POMP(LAMMPS *lmp, int narg, char **arg) : } /* ---------------------------------------------------------------------- - allocate memory that depends on # of K-vectors and order + clean up per-thread allocations ------------------------------------------------------------------------- */ -void PPPMTIP4POMP::allocate() +PPPMTIP4POMP::~PPPMTIP4POMP() { - PPPMTIP4P::allocate(); - #if defined(_OPENMP) #pragma omp parallel default(none) #endif @@ -70,17 +68,17 @@ void PPPMTIP4POMP::allocate() const int tid = 0; #endif ThrData *thr = fix->get_thr(tid); - thr->init_pppm(order,memory); + thr->init_pppm(-order,memory); } } /* ---------------------------------------------------------------------- - free memory that depends on # of K-vectors and order + allocate memory that depends on # of K-vectors and order ------------------------------------------------------------------------- */ -void PPPMTIP4POMP::deallocate() +void PPPMTIP4POMP::allocate() { - PPPMTIP4P::deallocate(); + PPPMTIP4P::allocate(); #if defined(_OPENMP) #pragma omp parallel default(none) @@ -92,7 +90,7 @@ void PPPMTIP4POMP::deallocate() const int tid = 0; #endif ThrData *thr = fix->get_thr(tid); - thr->init_pppm(-order,memory); + thr->init_pppm(order,memory); } } diff --git a/src/USER-OMP/pppm_tip4p_omp.h b/src/USER-OMP/pppm_tip4p_omp.h index 0ee807651c..59559cd587 100644 --- a/src/USER-OMP/pppm_tip4p_omp.h +++ b/src/USER-OMP/pppm_tip4p_omp.h @@ -28,12 +28,11 @@ namespace LAMMPS_NS { class PPPMTIP4POMP : public PPPMTIP4P, public ThrOMP { public: PPPMTIP4POMP(class LAMMPS *, int, char **); - virtual ~PPPMTIP4POMP () {}; + virtual ~PPPMTIP4POMP (); virtual void compute(int, int); protected: virtual void allocate(); - virtual void deallocate(); virtual void compute_gf_ik(); virtual void compute_gf_ad(); diff --git a/src/USER-OMP/thr_data.cpp b/src/USER-OMP/thr_data.cpp index 28fd27f9b8..2ee68fb311 100644 --- a/src/USER-OMP/thr_data.cpp +++ b/src/USER-OMP/thr_data.cpp @@ -176,16 +176,22 @@ void ThrData::init_pppm(int order, Memory *memory) { FFT_SCALAR **rho1d, **drho1d; if (order > 0) { - memory->create2d_offset(rho1d,3,-order/2,order/2,"thr_data:rho1d"); - memory->create2d_offset(drho1d,3,-order/2,order/2,"thr_data:drho1d"); - _rho1d = static_cast(rho1d); - _drho1d = static_cast(drho1d); + rho1d = static_cast(_rho1d); + drho1d = static_cast(_drho1d); + if (rho1d) memory->destroy2d_offset(rho1d,-order/2); + if (drho1d) memory->destroy2d_offset(drho1d,-order/2); + memory->create2d_offset(rho1d,3,-order/2,order/2,"thr_data:rho1d"); + memory->create2d_offset(drho1d,3,-order/2,order/2,"thr_data:drho1d"); + _rho1d = static_cast(rho1d); + _drho1d = static_cast(drho1d); } else { order = -order; rho1d = static_cast(_rho1d); drho1d = static_cast(_drho1d); - memory->destroy2d_offset(rho1d,-order/2); - memory->destroy2d_offset(drho1d,-order/2); + if (rho1d) memory->destroy2d_offset(rho1d,-order/2); + if (drho1d) memory->destroy2d_offset(drho1d,-order/2); + _rho1d = NULL; + _drho1d = NULL; } } @@ -203,20 +209,23 @@ void ThrData::init_pppm_disp(int order_6, Memory *memory) { FFT_SCALAR **rho1d_6, **drho1d_6; if (order_6 > 0) { - memory->create2d_offset(rho1d_6,3,-order_6/2,order_6/2,"thr_data:rho1d_6"); - memory->create2d_offset(drho1d_6,3,-order_6/2,order_6/2,"thr_data:drho1d_6"); - _rho1d_6 = static_cast(rho1d_6); - _drho1d_6 = static_cast(drho1d_6); + rho1d_6 = static_cast(_rho1d_6); + drho1d_6 = static_cast(_drho1d_6); + if (rho1d_6) memory->destroy2d_offset(rho1d_6,-order_6/2); + if (drho1d_6) memory->destroy2d_offset(drho1d_6,-order_6/2); + memory->create2d_offset(rho1d_6,3,-order_6/2,order_6/2,"thr_data:rho1d_6"); + memory->create2d_offset(drho1d_6,3,-order_6/2,order_6/2,"thr_data:drho1d_6"); + _rho1d_6 = static_cast(rho1d_6); + _drho1d_6 = static_cast(drho1d_6); } else { order_6 = -order_6; rho1d_6 = static_cast(_rho1d_6); drho1d_6 = static_cast(_drho1d_6); - memory->destroy2d_offset(rho1d_6,-order_6/2); - memory->destroy2d_offset(drho1d_6,-order_6/2); + if (rho1d_6) memory->destroy2d_offset(rho1d_6,-order_6/2); + if (drho1d_6) memory->destroy2d_offset(drho1d_6,-order_6/2); } } - /* ---------------------------------------------------------------------- compute global pair virial via summing F dot r over own & ghost atoms at this point, only pairwise forces have been accumulated in atom->f -- GitLab From c083d5d6f3f844bba454776a7397a36856aea4de Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 00:18:03 -0400 Subject: [PATCH 490/593] fix memory leak in list of neighbor list requests --- src/neighbor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 487b860c92..ef150902e3 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -197,7 +197,7 @@ Neighbor::~Neighbor() delete [] slist; delete [] plist; - for (int i = 0; i < nlist; i++) + for (int i = 0; i < nrequest; i++) if (requests[i]) delete requests[i]; memory->sfree(requests); for (int i = 0; i < old_nrequest; i++) -- GitLab From bc5186bc30e150c01edd456f395961db44a3c7eb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 00:44:24 -0400 Subject: [PATCH 491/593] fix unitialized pointer issue in USER-OMP with pppm/disp --- src/USER-OMP/thr_data.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/USER-OMP/thr_data.cpp b/src/USER-OMP/thr_data.cpp index 2ee68fb311..9d0b657b30 100644 --- a/src/USER-OMP/thr_data.cpp +++ b/src/USER-OMP/thr_data.cpp @@ -30,7 +30,8 @@ using namespace LAMMPS_NS; ThrData::ThrData(int tid, Timer *t) : _f(0),_torque(0),_erforce(0),_de(0),_drho(0),_mu(0),_lambda(0),_rhoB(0), - _D_values(0),_rho(0),_fp(0),_rho1d(0),_drho1d(0),_tid(tid), _timer(t) + _D_values(0),_rho(0),_fp(0),_rho1d(0),_drho1d(0),_rho1d_6(0),_drho1d_6(0), + _tid(tid), _timer(t) { _timer_active = 0; } -- GitLab From d9186c8fde6d764c6c9e16f51aa29e463a17e786 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 01:17:34 -0400 Subject: [PATCH 492/593] Revert "use neighbor list exclusions instead of a zero cutoff" This reverts commit bbb4d63db9802c7e1e29114ee6836751dff7bf3b. --- examples/ASPHERE/poly/in.poly | 139 +++++++++++++++--------------- examples/ASPHERE/poly/in.poly.mp | 143 +++++++++++++++---------------- 2 files changed, 140 insertions(+), 142 deletions(-) diff --git a/examples/ASPHERE/poly/in.poly b/examples/ASPHERE/poly/in.poly index 8932523dbf..3496a774bb 100644 --- a/examples/ASPHERE/poly/in.poly +++ b/examples/ASPHERE/poly/in.poly @@ -1,115 +1,114 @@ # SRD diffusion demo - poydisperse spheres -units lj -atom_style sphere -atom_modify first big -dimension 2 +units lj +atom_style sphere +atom_modify first big +dimension 2 # create big particles with 3 different types and diameters -lattice sq 0.3 -region box block 0 10 0 10 -0.5 0.5 -create_box 4 box -create_atoms 1 region box +lattice sq 0.3 +region box block 0 10 0 10 -0.5 0.5 +create_box 4 box +create_atoms 1 region box -group big type 1 -set group big type/fraction 2 0.33 394895 -set group big type/fraction 3 0.5 989894 -group big type 2 3 +group big type 1 +set group big type/fraction 2 0.33 394895 +set group big type/fraction 3 0.5 989894 +group big type 2 3 -set type 1*3 mass 1.0 -velocity big create 1.44 87287 loop geom +set type 1*3 mass 1.0 +velocity big create 1.44 87287 loop geom # equilibrate big particles, repulsive only to prevent aggregation -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.1 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes -neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 +fix 1 big nve +fix 2 all enforce2d -fix 1 big nve -fix 2 all enforce2d +#dump 1 all atom 10 dump.poly.equil -#dump 1 all atom 10 dump.poly.equil +run 1000 -run 1000 - -#undump 1 -unfix 1 -unfix 2 +#undump 1 +unfix 1 +unfix 2 # add small particles as hi density lattice -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 250.0 -create_atoms 4 region plane +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 250.0 +create_atoms 4 region plane -set type 4 mass 0.1 -group small type 4 -velocity small create 1.0 593849 loop geom +set type 4 mass 0.1 +group small type 4 +velocity small create 1.0 593849 loop geom # delete overlaps # must set *-4 cutoffs to non-zero values -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 1.0 2.0 -pair_coeff 3 3 1.0 1.5 -pair_coeff 4 4 0.0 1.0 0.1 -neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 1.0 2.0 +pair_coeff 3 3 1.0 1.5 +pair_coeff 1 4 0.0 1.0 0.5 +pair_coeff 2 4 0.0 1.0 1.0 +pair_coeff 3 4 0.0 1.0 0.75 +pair_coeff 4 4 0.0 1.0 0.0 -delete_atoms overlap 1.0 small big +delete_atoms overlap 1.0 small big # SRD run -reset_timestep 0 +reset_timestep 0 -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.1 -neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big nve -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & +fix 1 big nve +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & search 0.2 inside ignore -fix 3 all enforce2d +fix 3 all enforce2d # diagnostics -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & - f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & - f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & + f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & + f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] -thermo_modify temp tbig -thermo 1000 +thermo_modify temp tbig +thermo 1000 -#dump 1 all atom 1000 dump.poly +#dump 1 all atom 1000 dump.poly -#dump 1 all image 1000 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 +#dump 1 all image 1000 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 -run 100000 +run 100000 diff --git a/examples/ASPHERE/poly/in.poly.mp b/examples/ASPHERE/poly/in.poly.mp index 05ff8226e2..1c6a1faee3 100644 --- a/examples/ASPHERE/poly/in.poly.mp +++ b/examples/ASPHERE/poly/in.poly.mp @@ -1,116 +1,115 @@ # SRD viscosity demo - poydisperse spheres -units lj -atom_style sphere -atom_modify first big -dimension 2 +units lj +atom_style sphere +atom_modify first big +dimension 2 # create big particles with 3 different types and diameters -lattice sq 0.3 -region box block 0 10 0 10 -0.5 0.5 -create_box 4 box -create_atoms 1 region box +lattice sq 0.3 +region box block 0 10 0 10 -0.5 0.5 +create_box 4 box +create_atoms 1 region box -group big type 1 -set group big type/fraction 2 0.33 394895 -set group big type/fraction 3 0.5 989894 -group big type 2 3 +group big type 1 +set group big type/fraction 2 0.33 394895 +set group big type/fraction 3 0.5 989894 +group big type 2 3 -set type 1*3 mass 1.0 -velocity big create 1.44 87287 loop geom +set type 1*3 mass 1.0 +velocity big create 1.44 87287 loop geom # equilibrate big particles, repulsive only to prevent aggregation -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.1 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes -neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 +fix 1 big nve +fix 2 all enforce2d -fix 1 big nve -fix 2 all enforce2d +#dump 1 all atom 10 dump.poly.equil -#dump 1 all atom 10 dump.poly.equil +run 1000 -run 1000 - -#undump 1 -unfix 1 -unfix 2 +#undump 1 +unfix 1 +unfix 2 # add small particles as hi density lattice -region plane block INF INF INF INF -0.001 0.001 units box -lattice sq 250.0 -create_atoms 4 region plane +region plane block INF INF INF INF -0.001 0.001 units box +lattice sq 250.0 +create_atoms 4 region plane -set type 4 mass 0.1 -group small type 4 -velocity small create 1.0 593849 loop geom +set type 4 mass 0.1 +group small type 4 +velocity small create 1.0 593849 loop geom # delete overlaps # must set *-4 cutoffs to non-zero values -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 -pair_coeff 2 2 1.0 2.0 -pair_coeff 3 3 1.0 1.5 -pair_coeff 4 4 0.0 1.0 0.1 -neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 +pair_coeff 2 2 1.0 2.0 +pair_coeff 3 3 1.0 1.5 +pair_coeff 1 4 0.0 1.0 0.5 +pair_coeff 2 4 0.0 1.0 1.0 +pair_coeff 3 4 0.0 1.0 0.75 +pair_coeff 4 4 0.0 1.0 0.0 -delete_atoms overlap 1.0 small big +delete_atoms overlap 1.0 small big # SRD run -reset_timestep 0 +reset_timestep 0 -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes -comm_modify mode multi group big vel yes -neigh_modify include big +comm_modify mode multi group big vel yes +neigh_modify include big # no pairwise interactions with small particles -pair_style lj/cut 1.12 -pair_coeff 1 1 1.0 1.0 1.12 -pair_coeff 2 2 1.0 2.0 2.24 -pair_coeff 3 3 1.0 1.5 1.68 -pair_coeff 4 4 0.0 1.0 0.1 -neigh_modify exclude type 1 4 exclude type 2 4 exclude type 3 4 exclude type 4 4 +pair_style lj/cut 1.12 +pair_coeff 1 1 1.0 1.0 1.12 +pair_coeff 2 2 1.0 2.0 2.24 +pair_coeff 3 3 1.0 1.5 1.68 +pair_coeff 4 4 0.0 1.0 0.0 # use fix SRD to push small particles out from inside big ones # if comment out, big particles won't see SRD particles -timestep 0.001 +timestep 0.001 -fix 1 big nve -fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & - search 0.2 inside ignore -fix 3 small viscosity 10 x y 50 -fix 4 all enforce2d +fix 1 big nve +fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 & + search 0.2 inside ignore +fix 3 small viscosity 10 x y 50 +fix 4 all enforce2d # diagnostics -compute tbig big temp/sphere -variable pebig equal pe*atoms/count(big) -variable ebig equal etotal*atoms/count(big) -thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & - f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & - f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] +compute tbig big temp/sphere +variable pebig equal pe*atoms/count(big) +variable ebig equal etotal*atoms/count(big) +thermo_style custom step temp f_2[8] etotal v_pebig v_ebig press & + f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] & + f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] -thermo_modify temp tbig -thermo 1000 +thermo_modify temp tbig +thermo 1000 -#dump 1 all atom 500 dump.poly.mp +#dump 1 all atom 500 dump.poly.mp -#dump 1 all image 500 image.*.jpg type type zoom 1.6 -#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 +#dump 1 all image 500 image.*.jpg type type zoom 1.6 +#dump_modify 1 pad 6 adiam 1 1 adiam 2 2.0 adiam 3 1.5 adiam 4 0.1 -run 50000 +run 50000 -- GitLab From 358915d16ee7841396177f4f0fc71f4b6229addc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 07:26:45 -0400 Subject: [PATCH 493/593] avoid division by zero in peri pair styles --- src/PERI/pair_peri_eps.cpp | 37 +++++++++++++++--------------- src/PERI/pair_peri_lps.cpp | 22 ++++++++++-------- src/USER-OMP/pair_peri_lps_omp.cpp | 18 +++++++++------ 3 files changed, 42 insertions(+), 35 deletions(-) diff --git a/src/PERI/pair_peri_eps.cpp b/src/PERI/pair_peri_eps.cpp index b5807c0e3c..670e1d6937 100644 --- a/src/PERI/pair_peri_eps.cpp +++ b/src/PERI/pair_peri_eps.cpp @@ -46,7 +46,7 @@ PairPeriEPS::PairPeriEPS(LAMMPS *lmp) : Pair(lmp) ifix_peri = -1; - nmax = 0; + nmax = -1; s0_new = NULL; theta = NULL; @@ -209,7 +209,7 @@ void PairPeriEPS::compute(int eflag, int vflag) for (i = 0; i < nlocal; i++) maxpartner = MAX(maxpartner,npartner[i]); - if (atom->nmax > nmax) { + if (nlocal > nmax) { memory->destroy(s0_new); memory->destroy(theta); nmax = atom->nmax; @@ -220,13 +220,13 @@ void PairPeriEPS::compute(int eflag, int vflag) // ******** temp array to store Plastic extension *********** /// // create on heap to reduce stack use and to allow for faster zeroing - double **deviatorPlasticExtTemp; - memory->create(deviatorPlasticExtTemp,nlocal,maxpartner,"pair:plastext"); - memset(&(deviatorPlasticExtTemp[0][0]),0,sizeof(double)*nlocal*maxpartner); + double **deviatorPlasticExtTemp = NULL; + if (nlocal*maxpartner > 0) { + memory->create(deviatorPlasticExtTemp,nlocal,maxpartner,"pair:plastext"); + memset(&(deviatorPlasticExtTemp[0][0]),0,sizeof(double)*nlocal*maxpartner); + } // ******** temp array to store Plastic extension *********** /// - - // compute the dilatation on each particle compute_dilatation(); @@ -280,12 +280,10 @@ void PairPeriEPS::compute(int eflag, int vflag) double fsurf = (tdnorm * tdnorm)/2 - pointwiseYieldvalue; bool elastic = true; - double alphavalue = (15 * shearmodulus[itype][itype]) /wvolume[i]; - - - if (fsurf>0) { + if (fsurf > 0) { elastic = false; - deltalambda = ((tdnorm /sqrt(2.0 * pointwiseYieldvalue)) - 1.0) / alphavalue; + deltalambda = ((tdnorm /sqrt(2.0 * pointwiseYieldvalue)) - 1.0) * wvolume[i] + / (15 * shearmodulus[itype][itype]); double templambda = lambdaValue[i]; lambdaValue[i] = templambda + deltalambda; } @@ -348,10 +346,9 @@ void PairPeriEPS::compute(int eflag, int vflag) ( (omega_plus / wvolume[i]) + (omega_minus / wvolume[j]) ) * (deviatoric_extension - edpNp1); - if(elastic) { + if (elastic) { rkNew = tdtrialValue; - } - else { + } else { rkNew = (sqrt(2.0*pointwiseYieldvalue) * tdtrialValue) / tdnorm; deviatorPlasticExtTemp[i][jj] = edpNp1 + rkNew * deltalambda; } @@ -402,10 +399,12 @@ void PairPeriEPS::compute(int eflag, int vflag) memcpy(s0,s0_new,sizeof(double)*nlocal); - memcpy(&(deviatorPlasticextension[0][0]), - &(deviatorPlasticExtTemp[0][0]), - sizeof(double)*nlocal*maxpartner); - memory->destroy(deviatorPlasticExtTemp); + if (nlocal*maxpartner > 0) { + memcpy(&(deviatorPlasticextension[0][0]), + &(deviatorPlasticExtTemp[0][0]), + sizeof(double)*nlocal*maxpartner); + memory->destroy(deviatorPlasticExtTemp); + } } /* ---------------------------------------------------------------------- diff --git a/src/PERI/pair_peri_lps.cpp b/src/PERI/pair_peri_lps.cpp index cd88b41825..0fe8f29f38 100644 --- a/src/PERI/pair_peri_lps.cpp +++ b/src/PERI/pair_peri_lps.cpp @@ -33,6 +33,7 @@ #include "memory.h" #include "error.h" #include "update.h" +#include "math_const.h" using namespace LAMMPS_NS; @@ -174,7 +175,7 @@ void PairPeriLPS::compute(int eflag, int vflag) // of the bond-based theory used in PMB model double kshort = (15.0 * 18.0 * bulkmodulus[itype][itype]) / - (3.141592653589793 * cutsq[itype][jtype] * cutsq[itype][jtype]); + (MathConst::MY_PI * cutsq[itype][jtype] * cutsq[itype][jtype]); rk = (kshort * vfrac[j]) * (dr / cut[itype][jtype]); if (r > 0.0) fpair = -(rk/r); @@ -285,13 +286,14 @@ void PairPeriLPS::compute(int eflag, int vflag) omega_plus = influence_function(-1.0*delx0,-1.0*dely0,-1.0*delz0); omega_minus = influence_function(delx0,dely0,delz0); - - rk = ( (3.0 * bulkmodulus[itype][itype]) - - (5.0 * shearmodulus[itype][itype]) ) * vfrac[j] * vfrac_scale * - ( (omega_plus * theta[i] / wvolume[i]) + - ( omega_minus * theta[j] / wvolume[j] ) ) * r0[i][jj]; - rk += 15.0 * ( shearmodulus[itype][itype] * vfrac[j] * vfrac_scale ) * - ( (omega_plus / wvolume[i]) + (omega_minus / wvolume[j]) ) * dr; + if ((wvolume[i] > 0.0) && (wvolume[j] > 0.0)) { + rk = ( (3.0 * bulkmodulus[itype][itype]) - + (5.0 * shearmodulus[itype][itype]) ) * vfrac[j] * vfrac_scale * + ( (omega_plus * theta[i] / wvolume[i]) + + ( omega_minus * theta[j] / wvolume[j] ) ) * r0[i][jj]; + rk += 15.0 * ( shearmodulus[itype][itype] * vfrac[j] * vfrac_scale ) * + ( (omega_plus / wvolume[i]) + (omega_minus / wvolume[j]) ) * dr; + } else rk = 0.0; if (r > 0.0) fbond = -(rk/r); else fbond = 0.0; @@ -305,9 +307,11 @@ void PairPeriLPS::compute(int eflag, int vflag) double deviatoric_extension = dr - (theta[i]* r0[i][jj] / 3.0); - if (eflag) evdwl = 0.5 * 15 * (shearmodulus[itype][itype]/wvolume[i]) * + if (eflag && (wvolume[i] > 0.0)) + evdwl = 0.5 * 15 * (shearmodulus[itype][itype]/wvolume[i]) * omega_plus*(deviatoric_extension * deviatoric_extension) * vfrac[j] * vfrac_scale; + else evdwl = 0.0; if (evflag) ev_tally(i,i,nlocal,0,0.5*evdwl,0.0, 0.5*fbond*vfrac[i],delx,dely,delz); diff --git a/src/USER-OMP/pair_peri_lps_omp.cpp b/src/USER-OMP/pair_peri_lps_omp.cpp index 4876e6b15f..a471b47750 100644 --- a/src/USER-OMP/pair_peri_lps_omp.cpp +++ b/src/USER-OMP/pair_peri_lps_omp.cpp @@ -310,12 +310,14 @@ void PairPeriLPSOMP::eval(int iifrom, int iito, ThrData * const thr) omega_plus = influence_function(-1.0*delx0,-1.0*dely0,-1.0*delz0); omega_minus = influence_function(delx0,dely0,delz0); - rk = ( (3.0 * bulkmodulus[itype][itype]) - - (5.0 * shearmodulus[itype][itype]) ) * vfrac[j] * vfrac_scale * - ( (omega_plus * theta[i] / wvolume[i]) + - ( omega_minus * theta[j] / wvolume[j] ) ) * r0[i][jj]; - rk += 15.0 * ( shearmodulus[itype][itype] * vfrac[j] * vfrac_scale ) * - ( (omega_plus / wvolume[i]) + (omega_minus / wvolume[j]) ) * dr; + if ((wvolume[i] > 0.0) && (wvolume[j] > 0.0)) { + rk = ( (3.0 * bulkmodulus[itype][itype]) - + (5.0 * shearmodulus[itype][itype]) ) * vfrac[j] * vfrac_scale * + ( (omega_plus * theta[i] / wvolume[i]) + + ( omega_minus * theta[j] / wvolume[j] ) ) * r0[i][jj]; + rk += 15.0 * ( shearmodulus[itype][itype] * vfrac[j] * vfrac_scale ) * + ( (omega_plus / wvolume[i]) + (omega_minus / wvolume[j]) ) * dr; + } else rk = 0.0; if (r > 0.0) fbond = -(rk/r); else fbond = 0.0; @@ -327,9 +329,11 @@ void PairPeriLPSOMP::eval(int iifrom, int iito, ThrData * const thr) // since I-J is double counted, set newton off & use 1/2 factor and I,I double deviatoric_extension = dr - (theta[i]* r0[i][jj] / 3.0); - if (EFLAG) evdwl = 0.5 * 15 * (shearmodulus[itype][itype]/wvolume[i]) * + if (EFLAG && (wvolume[i] > 0.0)) + evdwl = 0.5 * 15 * (shearmodulus[itype][itype]/wvolume[i]) * omega_plus*(deviatoric_extension * deviatoric_extension) * vfrac[j] * vfrac_scale; + else evdwl = 0.0; if (EVFLAG) ev_tally_thr(this,i,i,nlocal,0,0.5*evdwl,0.0, 0.5*fbond*vfrac[i],delx,dely,delz,thr); -- GitLab From 4ad9528999220c12c3a1a008c66e0e6c3f68e3e8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 07:37:14 -0400 Subject: [PATCH 494/593] safer handling of memory management for lists in reax/c --- src/USER-REAXC/pair_reaxc.cpp | 1 + src/USER-REAXC/reaxc_list.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/USER-REAXC/pair_reaxc.cpp b/src/USER-REAXC/pair_reaxc.cpp index 300ccbe330..0f4bd49cc8 100644 --- a/src/USER-REAXC/pair_reaxc.cpp +++ b/src/USER-REAXC/pair_reaxc.cpp @@ -84,6 +84,7 @@ PairReaxC::PairReaxC(LAMMPS *lmp) : Pair(lmp) memory->smalloc(sizeof(storage),"reax:storage"); lists = (reax_list *) memory->smalloc(LIST_N * sizeof(reax_list),"reax:lists"); + memset(lists,0,LIST_N * sizeof(reax_list)); out_control = (output_controls *) memory->smalloc(sizeof(output_controls),"reax:out_control"); mpi_data = (mpi_datatypes *) diff --git a/src/USER-REAXC/reaxc_list.cpp b/src/USER-REAXC/reaxc_list.cpp index 2755d5506e..e7fac4d418 100644 --- a/src/USER-REAXC/reaxc_list.cpp +++ b/src/USER-REAXC/reaxc_list.cpp @@ -36,6 +36,8 @@ int Make_List(int n, int num_intrs, int type, reax_list *l, MPI_Comm comm) l->n = n; l->num_intrs = num_intrs; + if (l->index) sfree(l->index, "list:index"); + if (l->end_index) sfree(l->index, "list:end_index"); l->index = (int*) smalloc( n * sizeof(int), "list:index", comm ); l->end_index = (int*) smalloc( n * sizeof(int), "list:end_index", comm ); @@ -43,36 +45,43 @@ int Make_List(int n, int num_intrs, int type, reax_list *l, MPI_Comm comm) switch(l->type) { case TYP_VOID: + if (l->select.v) sfree(l->select.v, "list:v"); l->select.v = (void*) smalloc(l->num_intrs * sizeof(void*), "list:v", comm); break; case TYP_THREE_BODY: + if (l->select.three_body_list) sfree(l->select.three_body_list,"list:three_bodies"); l->select.three_body_list = (three_body_interaction_data*) smalloc( l->num_intrs * sizeof(three_body_interaction_data), "list:three_bodies", comm ); break; case TYP_BOND: + if (l->select.bond_list) sfree(l->select.bond_list,"list:bonds"); l->select.bond_list = (bond_data*) smalloc( l->num_intrs * sizeof(bond_data), "list:bonds", comm ); break; case TYP_DBO: + if (l->select.dbo_list) sfree(l->select.dbo_list,"list:dbonds"); l->select.dbo_list = (dbond_data*) smalloc( l->num_intrs * sizeof(dbond_data), "list:dbonds", comm ); break; case TYP_DDELTA: + if (l->select.dDelta_list) sfree(l->select.dDelta_list,"list:dDeltas"); l->select.dDelta_list = (dDelta_data*) smalloc( l->num_intrs * sizeof(dDelta_data), "list:dDeltas", comm ); break; case TYP_FAR_NEIGHBOR: + if (l->select.far_nbr_list) sfree(l->select.far_nbr_list,"list:far_nbrs"); l->select.far_nbr_list = (far_neighbor_data*) smalloc(l->num_intrs * sizeof(far_neighbor_data), "list:far_nbrs", comm); break; case TYP_HBOND: + if (l->select.hbond_list) sfree(l->select.hbond_list,"list:hbonds"); l->select.hbond_list = (hbond_data*) smalloc( l->num_intrs * sizeof(hbond_data), "list:hbonds", comm ); break; @@ -94,28 +103,37 @@ void Delete_List( reax_list *l, MPI_Comm comm ) sfree( l->index, "list:index" ); sfree( l->end_index, "list:end_index" ); + l->index = NULL; + l->end_index = NULL; switch(l->type) { case TYP_VOID: sfree( l->select.v, "list:v" ); + l->select.v = NULL; break; case TYP_HBOND: sfree( l->select.hbond_list, "list:hbonds" ); + l->select.hbond_list = NULL; break; case TYP_FAR_NEIGHBOR: sfree( l->select.far_nbr_list, "list:far_nbrs" ); + l->select.far_nbr_list = NULL; break; case TYP_BOND: sfree( l->select.bond_list, "list:bonds" ); + l->select.bond_list = NULL; break; case TYP_DBO: sfree( l->select.dbo_list, "list:dbos" ); + l->select.dbo_list = NULL; break; case TYP_DDELTA: sfree( l->select.dDelta_list, "list:dDeltas" ); + l->select.dDelta_list = NULL; break; case TYP_THREE_BODY: sfree( l->select.three_body_list, "list:three_bodies" ); + l->select.three_body_list = NULL; break; default: -- GitLab From 085cbee1163d6cd6bd787718fb2152f37fd049c0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 11:14:59 -0400 Subject: [PATCH 495/593] protect LAMMPS from calling incompatible QUIP library with -DLAMMPS_BIGBIG --- src/USER-QUIP/pair_quip.cpp | 11 +++++++++++ src/USER-QUIP/pair_quip.h | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/src/USER-QUIP/pair_quip.cpp b/src/USER-QUIP/pair_quip.cpp index 0ad8066027..ccd71235e7 100644 --- a/src/USER-QUIP/pair_quip.cpp +++ b/src/USER-QUIP/pair_quip.cpp @@ -124,12 +124,23 @@ void PairQUIP::compute(int eflag, int vflag) lattice[7] = domain->yz; lattice[8] = domain->zprd; +#if defined(LAMMPS_BIGBIG) + error->all(FLERR,"Pair style quip does not support -DLAMMPS_BIGBIG"); + // quip_lammps_longint_wrapper( + // (&nlocal,&nghost,atomic_numbers,tag, + // &inum,&sum_num_neigh,ilist, + // quip_num_neigh,quip_neigh,lattice, + // quip_potential,&n_quip_potential,&x[0][0], + // &quip_energy,quip_local_e,quip_virial,quip_local_virial,quip_force); +#else quip_lammps_wrapper (&nlocal,&nghost,atomic_numbers,tag, &inum,&sum_num_neigh,ilist, quip_num_neigh,quip_neigh,lattice, quip_potential,&n_quip_potential,&x[0][0], &quip_energy,quip_local_e,quip_virial,quip_local_virial,quip_force); +#endif + iquip = 0; for (ii = 0; ii < ntotal; ii++) { for( jj = 0; jj < 3; jj++ ) { diff --git a/src/USER-QUIP/pair_quip.h b/src/USER-QUIP/pair_quip.h index 985a43fd7e..c785792410 100644 --- a/src/USER-QUIP/pair_quip.h +++ b/src/USER-QUIP/pair_quip.h @@ -29,6 +29,11 @@ extern "C" int*, int*, double*, int*, int*, double*, double*, double*, double*, double*, double*); + // void quip_lammps_longint_wrapper(int*, int*, int*, int64_t*, + // int*, int*, int*, + // int*, int*, double*, + // int*, int*, double*, + // double*, double*, double*, double*, double*); void quip_lammps_potential_initialise(int*, int*, double*, char*, int*, char*, int*); } -- GitLab From a92d79253734ab7d7ef8288b35920a5bc368eec1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 12:55:55 -0400 Subject: [PATCH 496/593] update manual links that got broken when removing and renumbering a section --- doc/src/Manual.txt | 1 - doc/src/Section_accelerate.txt | 10 +- doc/src/Section_errors.txt | 2 +- doc/src/Section_howto.txt | 10 +- doc/src/Section_packages.txt | 30 +- doc/src/Section_python.txt | 6 +- doc/src/Section_start.txt | 12 +- doc/src/accelerate_gpu.txt | 10 +- doc/src/accelerate_intel.txt | 10 +- doc/src/accelerate_kokkos.txt | 24 +- doc/src/accelerate_omp.txt | 6 +- doc/src/accelerate_opt.txt | 4 +- doc/src/angle_charmm.txt | 2 +- doc/src/angle_class2.txt | 2 +- doc/src/angle_cosine.txt | 2 +- doc/src/angle_cosine_delta.txt | 2 +- doc/src/angle_cosine_periodic.txt | 2 +- doc/src/angle_cosine_shift.txt | 2 +- doc/src/angle_cosine_shift_exp.txt | 2 +- doc/src/angle_cosine_squared.txt | 2 +- doc/src/angle_fourier.txt | 2 +- doc/src/angle_fourier_simple.txt | 2 +- doc/src/angle_harmonic.txt | 2 +- doc/src/angle_quartic.txt | 2 +- doc/src/angle_table.txt | 2 +- doc/src/balance.txt | 2 +- doc/src/bond_class2.txt | 2 +- doc/src/bond_fene.txt | 2 +- doc/src/bond_fene_expand.txt | 2 +- doc/src/bond_harmonic.txt | 2 +- doc/src/bond_harmonic_shift.txt | 2 +- doc/src/bond_harmonic_shift_cut.txt | 2 +- doc/src/bond_morse.txt | 2 +- doc/src/bond_nonlinear.txt | 2 +- doc/src/bond_quartic.txt | 2 +- doc/src/bond_table.txt | 2 +- doc/src/compute_pressure.txt | 2 +- doc/src/compute_temp.txt | 2 +- doc/src/compute_temp_partial.txt | 2 +- doc/src/dihedral_charmm.txt | 2 +- doc/src/dihedral_class2.txt | 2 +- doc/src/dihedral_cosine_shift_exp.txt | 2 +- doc/src/dihedral_fourier.txt | 2 +- doc/src/dihedral_harmonic.txt | 2 +- doc/src/dihedral_helix.txt | 2 +- doc/src/dihedral_multi_harmonic.txt | 2 +- doc/src/dihedral_nharmonic.txt | 2 +- doc/src/dihedral_opls.txt | 2 +- doc/src/dihedral_quadratic.txt | 2 +- doc/src/echo.txt | 2 +- doc/src/fix_addforce.txt | 2 +- doc/src/fix_aveforce.txt | 2 +- doc/src/fix_deform.txt | 2 +- doc/src/fix_enforce2d.txt | 2 +- doc/src/fix_freeze.txt | 2 +- doc/src/fix_gravity.txt | 2 +- doc/src/fix_langevin.txt | 2 +- doc/src/fix_momentum.txt | 2 +- doc/src/fix_nh.txt | 2 +- doc/src/fix_nph_asphere.txt | 2 +- doc/src/fix_nph_body.txt | 2 +- doc/src/fix_nph_sphere.txt | 2 +- doc/src/fix_nphug.txt | 2 +- doc/src/fix_npt_asphere.txt | 2 +- doc/src/fix_npt_body.txt | 2 +- doc/src/fix_npt_sphere.txt | 2 +- doc/src/fix_nve.txt | 2 +- doc/src/fix_nve_asphere.txt | 2 +- doc/src/fix_nve_sphere.txt | 2 +- doc/src/fix_nvt_asphere.txt | 2 +- doc/src/fix_nvt_body.txt | 2 +- doc/src/fix_nvt_sllod.txt | 2 +- doc/src/fix_nvt_sphere.txt | 2 +- doc/src/fix_qeq_comb.txt | 2 +- doc/src/fix_qeq_reax.txt | 2 +- doc/src/fix_reax_bonds.txt | 2 +- doc/src/fix_reaxc_species.txt | 2 +- doc/src/fix_rigid.txt | 2 +- doc/src/fix_setforce.txt | 2 +- doc/src/fix_shake.txt | 2 +- doc/src/fix_wall_reflect.txt | 2 +- doc/src/improper_class2.txt | 2 +- doc/src/improper_cossq.txt | 2 +- doc/src/improper_cvff.txt | 2 +- doc/src/improper_fourier.txt | 2 +- doc/src/improper_harmonic.txt | 2 +- doc/src/improper_ring.txt | 2 +- doc/src/improper_umbrella.txt | 2 +- doc/src/jump.txt | 4 +- doc/src/log.txt | 2 +- doc/src/neb.txt | 2 +- doc/src/neighbor.txt | 2 +- doc/src/next.txt | 2 +- doc/src/package.txt | 28 +- doc/src/pair_adp.txt | 2 +- doc/src/pair_agni.txt | 2 +- doc/src/pair_airebo.txt | 2 +- doc/src/pair_beck.txt | 2 +- doc/src/pair_born.txt | 2 +- doc/src/pair_brownian.txt | 2 +- doc/src/pair_buck.txt | 2 +- doc/src/pair_buck_long.txt | 2 +- doc/src/pair_charmm.txt | 2 +- doc/src/pair_class2.txt | 2 +- doc/src/pair_colloid.txt | 2 +- doc/src/pair_comb.txt | 2 +- doc/src/pair_coul.txt | 2 +- doc/src/pair_dipole.txt | 2 +- doc/src/pair_dpd.txt | 2 +- doc/src/pair_eam.txt | 2 +- doc/src/pair_edip.txt | 2 +- doc/src/pair_eim.txt | 2 +- doc/src/pair_gayberne.txt | 2 +- doc/src/pair_gran.txt | 2 +- doc/src/pair_gromacs.txt | 2 +- doc/src/pair_hbond_dreiding.txt | 2 +- doc/src/pair_hybrid.txt | 2 +- doc/src/pair_lj.txt | 2 +- doc/src/pair_lj96.txt | 2 +- doc/src/pair_lj_cubic.txt | 2 +- doc/src/pair_lj_expand.txt | 2 +- doc/src/pair_lj_long.txt | 2 +- doc/src/pair_lj_smooth.txt | 2 +- doc/src/pair_lj_smooth_linear.txt | 2 +- doc/src/pair_lj_soft.txt | 2 +- doc/src/pair_lubricate.txt | 2 +- doc/src/pair_meam_spline.txt | 2 +- doc/src/pair_morse.txt | 2 +- doc/src/pair_nb3b_harmonic.txt | 2 +- doc/src/pair_nm.txt | 2 +- doc/src/pair_peri.txt | 2 +- doc/src/pair_reaxc.txt | 2 +- doc/src/pair_resquared.txt | 2 +- doc/src/pair_sdk.txt | 2 +- doc/src/pair_soft.txt | 2 +- doc/src/pair_sw.txt | 2 +- doc/src/pair_table.txt | 2 +- doc/src/pair_tersoff.txt | 2 +- doc/src/pair_tersoff_mod.txt | 2 +- doc/src/pair_tersoff_zbl.txt | 2 +- doc/src/pair_thole.txt | 2 +- doc/src/pair_vashishta.txt | 2 +- doc/src/pair_yukawa.txt | 2 +- doc/src/pair_yukawa_colloid.txt | 2 +- doc/src/pair_zbl.txt | 2 +- doc/src/partition.txt | 4 +- doc/src/prd.txt | 2 +- doc/src/processors.txt | 12 +- doc/src/read_data.txt | 2 +- doc/src/read_restart.txt | 2 +- doc/src/region.txt | 2 +- doc/src/restart.txt | 2 +- doc/src/run_style.txt | 6 +- doc/src/suffix.txt | 4 +- doc/src/temper.txt | 4 +- doc/src/thermo_style.txt | 2 +- doc/src/timer.txt | 2 +- doc/src/variable.txt | 8 +- doc/src/write_data.txt | 2 +- doc/src/write_restart.txt | 2 +- src/Make.py | 2378 ------------------------- 161 files changed, 237 insertions(+), 2616 deletions(-) delete mode 100755 src/Make.py diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index 36391731d0..359aa19edb 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -261,7 +261,6 @@ END_RST --> :link(start_6,Section_start.html#start_6) :link(start_7,Section_start.html#start_7) :link(start_8,Section_start.html#start_8) -:link(start_9,Section_start.html#start_9) :link(cmd_1,Section_commands.html#cmd_1) :link(cmd_2,Section_commands.html#cmd_2) diff --git a/doc/src/Section_accelerate.txt b/doc/src/Section_accelerate.txt index 64b80c1a55..8812358886 100644 --- a/doc/src/Section_accelerate.txt +++ b/doc/src/Section_accelerate.txt @@ -56,7 +56,7 @@ timings; you can simply extrapolate from short runs. For the set of runs, look at the timing data printed to the screen and log file at the end of each LAMMPS run. "This -section"_Section_start.html#start_8 of the manual has an overview. +section"_Section_start.html#start_7 of the manual has an overview. Running on one (or a few processors) should give a good estimate of the serial performance and what portions of the timestep are taking @@ -226,16 +226,16 @@ re-build LAMMPS | make machine | prepare and test a regular LAMMPS simulation | lmp_machine -in in.script; mpirun -np 32 lmp_machine -in in.script | -enable specific accelerator support via '-k on' "command-line switch"_Section_start.html#start_7, | +enable specific accelerator support via '-k on' "command-line switch"_Section_start.html#start_6, | only needed for KOKKOS package | -set any needed options for the package via "-pk" "command-line switch"_Section_start.html#start_7 or "package"_package.html command, | +set any needed options for the package via "-pk" "command-line switch"_Section_start.html#start_6 or "package"_package.html command, | only if defaults need to be changed | -use accelerated styles in your input via "-sf" "command-line switch"_Section_start.html#start_7 or "suffix"_suffix.html command | lmp_machine -in in.script -sf gpu +use accelerated styles in your input via "-sf" "command-line switch"_Section_start.html#start_6 or "suffix"_suffix.html command | lmp_machine -in in.script -sf gpu :tb(c=2,s=|) Note that the first 4 steps can be done as a single command, using the src/Make.py tool. This tool is discussed in "Section -2.4"_Section_start.html#start_4 of the manual, and its use is +4"_Section_packages.html of the manual, and its use is illustrated in the individual accelerator sections. Typically these steps only need to be done once, to create an executable that uses one or more accelerator packages. diff --git a/doc/src/Section_errors.txt b/doc/src/Section_errors.txt index 40e61a248e..408c01d52c 100644 --- a/doc/src/Section_errors.txt +++ b/doc/src/Section_errors.txt @@ -71,7 +71,7 @@ style", with ... being fix, compute, pair, etc, it means that you mistyped the style name or that the command is part of an optional package which was not compiled into your executable. The list of available styles in your executable can be listed by using "the -h -command-line argument"_Section_start.html#start_7. The installation +command-line argument"_Section_start.html#start_6. The installation and compilation of optional packages is explained in the "installation instructions"_Section_start.html#start_3. diff --git a/doc/src/Section_howto.txt b/doc/src/Section_howto.txt index f2f2561af8..6d699fe24b 100644 --- a/doc/src/Section_howto.txt +++ b/doc/src/Section_howto.txt @@ -54,7 +54,7 @@ restart files can be saved to disk using the "restart"_restart.html command. At a later time, these binary files can be read via a "read_restart"_read_restart.html command in a new script. Or they can be converted to text data files using the "-r command-line -switch"_Section_start.html#start_7 and read by a +switch"_Section_start.html#start_6 and read by a "read_data"_read_data.html command in a new script. Here we give examples of 2 scripts that read either a binary restart @@ -337,7 +337,7 @@ All of the above examples work whether you are running on 1 or multiple processors, but assumed you are running LAMMPS on a single partition of processors. LAMMPS can be run on multiple partitions via the "-partition" command-line switch as described in "this -section"_Section_start.html#start_7 of the manual. +section"_Section_start.html#start_6 of the manual. In the last 2 examples, if LAMMPS were run on 3 partitions, the same scripts could be used if the "index" and "loop" variables were @@ -387,7 +387,7 @@ for more info on packages. In all these cases, you must run with one or more processors per replica. The processors assigned to each replica are determined at run-time by using the "-partition command-line -switch"_Section_start.html#start_7 to launch LAMMPS on multiple +switch"_Section_start.html#start_6 to launch LAMMPS on multiple partitions, which in this context are the same as replicas. E.g. these commands: @@ -395,7 +395,7 @@ mpirun -np 16 lmp_linux -partition 8x2 -in in.temper mpirun -np 8 lmp_linux -partition 8x1 -in in.neb :pre would each run 8 replicas, on either 16 or 8 processors. Note the use -of the "-in command-line switch"_Section_start.html#start_7 to specify +of the "-in command-line switch"_Section_start.html#start_6 to specify the input script which is required when running in multi-replica mode. Also note that with MPI installed on a machine (e.g. your desktop), @@ -1872,7 +1872,7 @@ void lammps_free(void *) :pre The lammps_open() function is used to initialize LAMMPS, passing in a list of strings as if they were "command-line -arguments"_Section_start.html#start_7 when LAMMPS is run in +arguments"_Section_start.html#start_6 when LAMMPS is run in stand-alone mode from the command line, and a MPI communicator for LAMMPS to run under. It returns a ptr to the LAMMPS object that is created, and which is used in subsequent library calls. The diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index a65e510654..c7e6e84831 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -369,7 +369,7 @@ suffix in their style name. "Section 5.3.1"_accelerate_gpu.html gives details of what hardware and Cuda software is required on your system, and details on how to build and use this package. Its styles can be invoked at run time via the "-sf gpu" or "-suffix gpu" "command-line -switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS +switches"_Section_start.html#start_6. See also the "KOKKOS"_#KOKKOS package, which has GPU-enabled styles. [Authors:] Mike Brown (Intel) while at Sandia and ORNL and Trung Nguyen @@ -427,8 +427,8 @@ src/GPU/README lib/gpu/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.1"_accelerate_gpu.html -"Section 2.7 -sf gpu"_Section_start.html#start_7 -"Section 2.7 -pk gpu"_Section_start.html#start_7 +"Section 2.6 -sf gpu"_Section_start.html#start_6 +"Section 2.6 -pk gpu"_Section_start.html#start_6 "package gpu"_package.html Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (g) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul @@ -553,7 +553,7 @@ style name. "Section 5.3.3"_accelerate_kokkos.html gives details of what hardware and software is required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf kk" or "-suffix kk" "command-line -switches"_Section_start.html#start_7. Also see the "GPU"_#GPU, +switches"_Section_start.html#start_6. Also see the "GPU"_#GPU, "OPT"_#OPT, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPUs, KNLs, and GPUs. @@ -621,9 +621,9 @@ src/KOKKOS/README lib/kokkos/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.3"_accelerate_kokkos.html -"Section 2.7 -k on ..."_Section_start.html#start_7 -"Section 2.7 -sf kk"_Section_start.html#start_7 -"Section 2.7 -pk kokkos"_Section_start.html#start_7 +"Section 2.6 -k on ..."_Section_start.html#start_6 +"Section 2.6 -sf kk"_Section_start.html#start_6 +"Section 2.6 -pk kokkos"_Section_start.html#start_6 "package kokkos"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (k) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul @@ -950,7 +950,7 @@ CHARMM, and Morse potentials. The styles have an "opt" suffix in their style name. "Section 5.3.5"_accelerate_opt.html gives details of how to build and use this package. Its styles can be invoked at run time via the "-sf opt" or "-suffix opt" "command-line -switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS, +switches"_Section_start.html#start_6. See also the "KOKKOS"_#KOKKOS, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPU performance. @@ -977,7 +977,7 @@ CCFLAGS: add -restrict :ul src/OPT: filenames -> commands "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.5"_accelerate_opt.html -"Section 2.7 -sf opt"_Section_start.html#start_7 +"Section 2.6 -sf opt"_Section_start.html#start_6 Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (t) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul @@ -1887,7 +1887,7 @@ All of them have an "intel" in their style name. "Section 5.3.2"_accelerate_intel.html gives details of what hardware and compilers are required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf intel" or -"-suffix intel" "command-line switches"_Section_start.html#start_7. +"-suffix intel" "command-line switches"_Section_start.html#start_6. Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPUs and KNLs. @@ -1943,8 +1943,8 @@ src/USER-INTEL: filenames -> commands src/USER-INTEL/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.2"_accelerate_gpu.html -"Section 2.7 -sf intel"_Section_start.html#start_7 -"Section 2.7 -pk intel"_Section_start.html#start_7 +"Section 2.6 -sf intel"_Section_start.html#start_6 +"Section 2.6 -pk intel"_Section_start.html#start_6 "package intel"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (i) src/USER-INTEL/TEST @@ -2217,7 +2217,7 @@ via OpenMP directives. All of them have an "omp" in their style name. "Section 5.3.4"_accelerate_omp.html gives details of what hardware and compilers are required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf omp" or -"-suffix omp" "command-line switches"_Section_start.html#start_7. +"-suffix omp" "command-line switches"_Section_start.html#start_6. Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-INTEL"_#USER-INTEL packages, which have styles optimized for CPUs. @@ -2250,8 +2250,8 @@ src/USER-OMP: filenames -> commands src/USER-OMP/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.4"_accelerate_omp.html -"Section 2.7 -sf omp"_Section_start.html#start_7 -"Section 2.7 -pk omp"_Section_start.html#start_7 +"Section 2.6 -sf omp"_Section_start.html#start_6 +"Section 2.6 -pk omp"_Section_start.html#start_6 "package omp"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (o) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul diff --git a/doc/src/Section_python.txt b/doc/src/Section_python.txt index 1e67fca321..f4b6bdad97 100644 --- a/doc/src/Section_python.txt +++ b/doc/src/Section_python.txt @@ -198,7 +198,7 @@ file and the shared library. 11.3 Building LAMMPS as a shared library :link(py_3),h4 Instructions on how to build LAMMPS as a shared library are given in -"Section 2.5"_Section_start.html#start_5. A shared library is one +"Section 2.4"_Section_start.html#start_4. A shared library is one that is dynamically loadable, which is what Python requires to wrap LAMMPS. On Linux this is a library file that ends in ".so", not ".a". @@ -217,7 +217,7 @@ NOTE: If you are building LAMMPS with an MPI or FFT library or other auxiliary libraries (used by various packages), then all of these extra libraries must also be shared libraries. If the LAMMPS shared-library build fails with an error complaining about this, see -"Section 2.5"_Section_start.html#start_5 for more details. +"Section 2.4"_Section_start.html#start_4 for more details. :line @@ -439,7 +439,7 @@ first importing from the lammps.py file: >>> CDLL("liblammps.so") :pre If an error occurs, carefully go thru the steps in "Section -2.5"_Section_start.html#start_5 and above about building a shared +2.4"_Section_start.html#start_4 and above about building a shared library and about insuring Python can find the necessary two files it needs. diff --git a/doc/src/Section_start.txt b/doc/src/Section_start.txt index b7a471c3fa..c798005f5e 100644 --- a/doc/src/Section_start.txt +++ b/doc/src/Section_start.txt @@ -14,11 +14,11 @@ experienced users. 2.1 "What's in the LAMMPS distribution"_#start_1 2.2 "Making LAMMPS"_#start_2 2.3 "Making LAMMPS with optional packages"_#start_3 -2.5 "Building LAMMPS as a library"_#start_4 -2.6 "Running LAMMPS"_#start_5 -2.7 "Command-line options"_#start_6 -2.8 "Screen output"_#start_7 -2.9 "Tips for users of previous versions"_#start_8 :all(b) +2.4 "Building LAMMPS as a library"_#start_4 +2.5 "Running LAMMPS"_#start_5 +2.6 "Command-line options"_#start_6 +2.7 "Screen output"_#start_7 +2.8 "Tips for users of previous versions"_#start_8 :all(b) :line @@ -714,7 +714,7 @@ type lmp_machine -h :pre to run your executable with the optional "-h command-line -switch"_#start_7 for "help", which will list the styles and commands +switch"_#start_6 for "help", which will list the styles and commands known to your executable, and immediately exit. :line diff --git a/doc/src/accelerate_gpu.txt b/doc/src/accelerate_gpu.txt index 2ac7d62f6c..68e9fa477a 100644 --- a/doc/src/accelerate_gpu.txt +++ b/doc/src/accelerate_gpu.txt @@ -54,7 +54,7 @@ specify the # of GPUs per node use GPU styles in your input script :ul The latter two steps can be done using the "-pk gpu" and "-sf gpu" -"command-line switches"_Section_start.html#start_7 respectively. Or +"command-line switches"_Section_start.html#start_6 respectively. Or the effect of the "-pk" or "-sf" switches can be duplicated by adding the "package gpu"_package.html or "suffix gpu"_suffix.html commands respectively to your input script. @@ -75,7 +75,7 @@ This requires two steps (a,b): build the GPU library, then build LAMMPS with the GPU package. You can do both these steps in one line, using the src/Make.py script, -described in "Section 2.4"_Section_start.html#start_4 of the manual. +described in "Section 4"_Section_packages.html of the manual. Type "Make.py -h" for help. If run from the src directory, this command will create src/lmp_gpu using src/MAKE/Makefile.mpi as the starting Makefile.machine: @@ -151,9 +151,9 @@ automatically if you create more MPI tasks/node than there are GPUs/mode. E.g. with 8 MPI tasks/node and 2 GPUs, each GPU will be shared by 4 MPI tasks. -Use the "-sf gpu" "command-line switch"_Section_start.html#start_7, +Use the "-sf gpu" "command-line switch"_Section_start.html#start_6, which will automatically append "gpu" to styles that support it. Use -the "-pk gpu Ng" "command-line switch"_Section_start.html#start_7 to +the "-pk gpu Ng" "command-line switch"_Section_start.html#start_6 to set Ng = # of GPUs/node to use. lmp_machine -sf gpu -pk gpu 1 -in in.script # 1 MPI task uses 1 GPU @@ -188,7 +188,7 @@ pair_style lj/cut/gpu 2.5 :pre You must also use the "package gpu"_package.html command to enable the GPU package, unless the "-sf gpu" or "-pk gpu" "command-line -switches"_Section_start.html#start_7 were used. It specifies the +switches"_Section_start.html#start_6 were used. It specifies the number of GPUs/node to use, as well as other options. [Speed-ups to expect:] diff --git a/doc/src/accelerate_intel.txt b/doc/src/accelerate_intel.txt index 155e29e367..74ae9d9a42 100644 --- a/doc/src/accelerate_intel.txt +++ b/doc/src/accelerate_intel.txt @@ -226,7 +226,7 @@ source /opt/intel/parallel_studio_xe_2016.3.067/psxevars.sh make intel_cpu_intelmpi :pre Alternatively, the build can be accomplished with the src/Make.py -script, described in "Section 2.4"_Section_start.html#start_4 of the +script, described in "Section 4"_Section_packages.html of the manual. Type "Make.py -h" for help. For an example: Make.py -v -p intel omp -intel cpu -a file intel_cpu_intelmpi :pre @@ -301,7 +301,7 @@ Hyper-Threading technology disabled. To enable USER-INTEL optimizations for all available styles used in the input script, the "-sf intel" -"command-line switch"_Section_start.html#start_7 can be used without +"command-line switch"_Section_start.html#start_6 can be used without any requirement for editing the input script. This switch will automatically append "intel" to styles that support it. It also invokes a default command: "package intel 1"_package.html. This @@ -314,7 +314,7 @@ support, that 1 coprocessor per node will be used with automatic balancing of work between the CPU and the coprocessor. You can specify different options for the USER-INTEL package by using -the "-pk intel Nphi" "command-line switch"_Section_start.html#start_7 +the "-pk intel Nphi" "command-line switch"_Section_start.html#start_6 with keyword/value pairs as specified in the documentation. Here, Nphi = # of Xeon Phi coprocessors/node (ignored without offload support). Common options to the USER-INTEL package include {omp} to @@ -387,7 +387,7 @@ can performed automatically by using "-sf hybrid intel opt" or and "omp" suffixes can be appended manually in the input script. For the latter, the "package omp"_package.html command must be in the input script or the "-pk omp Nt" "command-line -switch"_Section_start.html#start_7 must be used where Nt is the +switch"_Section_start.html#start_6 must be used where Nt is the number of OpenMP threads. The number of OpenMP threads should not be set differently for the different packages. Note that the "suffix hybrid intel omp"_suffix.html command can also be used within the @@ -486,7 +486,7 @@ sorting"_atom_modify.html is changed to 1 so that the per-atom data is effectively sorted at every rebuild of the neighbor lists. All the available coprocessor threads on each Phi will be divided among MPI tasks, unless the {tptask} option of the "-pk intel" "command-line -switch"_Section_start.html#start_7 is used to limit the coprocessor +switch"_Section_start.html#start_6 is used to limit the coprocessor threads per MPI task. [Restrictions:] diff --git a/doc/src/accelerate_kokkos.txt b/doc/src/accelerate_kokkos.txt index 602c3191f6..6ccd695841 100644 --- a/doc/src/accelerate_kokkos.txt +++ b/doc/src/accelerate_kokkos.txt @@ -136,7 +136,7 @@ You must choose at build time whether to build for CPUs (OpenMP), GPUs, or Phi. You can do any of these in one line, using the src/Make.py script, -described in "Section 2.4"_Section_start.html#start_4 of the manual. +described in "Section 4"_Section_packages.html of the manual. Type "Make.py -h" for help. If run from the src directory, these commands will create src/lmp_kokkos_omp, lmp_kokkos_cuda, and lmp_kokkos_phi. Note that the OMP and PHI options use @@ -144,7 +144,7 @@ src/MAKE/Makefile.mpi as the starting Makefile.machine. The CUDA option uses src/MAKE/OPTIONS/Makefile.kokkos_cuda. The latter two steps can be done using the "-k on", "-pk kokkos" and -"-sf kk" "command-line switches"_Section_start.html#start_7 +"-sf kk" "command-line switches"_Section_start.html#start_6 respectively. Or the effect of the "-pk" or "-sf" switches can be duplicated by adding the "package kokkos"_package.html or "suffix kk"_suffix.html commands respectively to your input script. @@ -280,10 +280,10 @@ specify how many Phi coprocessors there are per node; each coprocessors is simply treated as running some number of MPI tasks. You must use the "-k on" "command-line -switch"_Section_start.html#start_7 to enable the KOKKOS package. It +switch"_Section_start.html#start_6 to enable the KOKKOS package. It takes additional arguments for hardware settings appropriate to your system. Those arguments are "documented -here"_Section_start.html#start_7. The two most commonly used +here"_Section_start.html#start_6. The two most commonly used options are: -k on t Nt g Ng :pre @@ -304,12 +304,12 @@ The "-k on" switch also issues a "package kokkos" command (with no additional arguments) which sets various KOKKOS options to default values, as discussed on the "package"_package.html command doc page. -Use the "-sf kk" "command-line switch"_Section_start.html#start_7, +Use the "-sf kk" "command-line switch"_Section_start.html#start_6, which will automatically append "kk" to styles that support it. Use -the "-pk kokkos" "command-line switch"_Section_start.html#start_7 if +the "-pk kokkos" "command-line switch"_Section_start.html#start_6 if you wish to change any of the default "package kokkos"_package.html optionns set by the "-k on" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. @@ -323,7 +323,7 @@ However, when running in MPI-only mode with 1 thread per MPI task, it will typically be faster to use "half" neighbor lists and set the Newton flag to "on", just as is the case for non-accelerated pair styles. You can do this with the "-pk" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. [Or run with the KOKKOS package by editing an input script:] @@ -332,7 +332,7 @@ appropriate thread and GPU values for host=OMP or host=MIC or device=CUDA are the same. You must still use the "-k on" "command-line -switch"_Section_start.html#start_7 to enable the KOKKOS package, and +switch"_Section_start.html#start_6 to enable the KOKKOS package, and specify its additional arguments for hardware options appropriate to your system, as documented above. @@ -343,7 +343,7 @@ pair_style lj/cut/kk 2.5 :pre You only need to use the "package kokkos"_package.html command if you wish to change any of its option defaults, as set by the "-k on" -"command-line switch"_Section_start.html#start_7. +"command-line switch"_Section_start.html#start_6. [Speed-ups to expect:] @@ -389,7 +389,7 @@ If N is the number of physical cores/node, then the number of MPI tasks/node * number of threads/task should not exceed N, and should typically equal N. Note that the default threads/task is 1, as set by the "t" keyword of the "-k" "command-line -switch"_Section_start.html#start_7. If you do not change this, no +switch"_Section_start.html#start_6. If you do not change this, no additional parallelism (beyond MPI) will be invoked on the host CPU(s). @@ -429,7 +429,7 @@ details). The -np setting of the mpirun command should set the number of MPI tasks/node to be equal to the # of physical GPUs on the node. -Use the "-k" "command-line switch"_Section_commands.html#start_7 to +Use the "-k" "command-line switch"_Section_commands.html#start_6 to specify the number of GPUs per node, and the number of threads per MPI task. As above for multi-core CPUs (and no GPU), if N is the number of physical cores/node, then the number of MPI tasks/node * number of diff --git a/doc/src/accelerate_omp.txt b/doc/src/accelerate_omp.txt index c8dd343861..81b7a5adc2 100644 --- a/doc/src/accelerate_omp.txt +++ b/doc/src/accelerate_omp.txt @@ -41,7 +41,7 @@ each MPI task running on a CPU. The lines above illustrate how to include/build with the USER-OMP package in two steps, using the "make" command. Or how to do it with one command via the src/Make.py script, described in "Section -2.4"_Section_start.html#start_4 of the manual. Type "Make.py -h" for +4"_Section_packages.html of the manual. Type "Make.py -h" for help. Note that the CCFLAGS and LINKFLAGS settings in Makefile.machine must @@ -62,14 +62,14 @@ threads/task should not exceed the physical number of cores (on a node), otherwise performance will suffer. As in the lines above, use the "-sf omp" "command-line -switch"_Section_start.html#start_7, which will automatically append +switch"_Section_start.html#start_6, which will automatically append "omp" to styles that support it. The "-sf omp" switch also issues a default "package omp 0"_package.html command, which will set the number of threads per MPI task via the OMP_NUM_THREADS environment variable. You can also use the "-pk omp Nt" "command-line -switch"_Section_start.html#start_7, to explicitly set Nt = # of OpenMP +switch"_Section_start.html#start_6, to explicitly set Nt = # of OpenMP threads per MPI task to use, as well as additional options. Its syntax is the same as the "package omp"_package.html command whose doc page gives details, including the default values used if it is not diff --git a/doc/src/accelerate_opt.txt b/doc/src/accelerate_opt.txt index 704321ca07..5a2a5eac0a 100644 --- a/doc/src/accelerate_opt.txt +++ b/doc/src/accelerate_opt.txt @@ -36,7 +36,7 @@ None. The lines above illustrate how to build LAMMPS with the OPT package in two steps, using the "make" command. Or how to do it with one command via the src/Make.py script, described in "Section -2.4"_Section_start.html#start_4 of the manual. Type "Make.py -h" for +4"_Section_packages.html of the manual. Type "Make.py -h" for help. Note that if you use an Intel compiler to build with the OPT package, @@ -46,7 +46,7 @@ The Make.py command will add this automatically. [Run with the OPT package from the command line:] As in the lines above, use the "-sf opt" "command-line -switch"_Section_start.html#start_7, which will automatically append +switch"_Section_start.html#start_6, which will automatically append "opt" to styles that support it. [Or run with the OPT package by editing an input script:] diff --git a/doc/src/angle_charmm.txt b/doc/src/angle_charmm.txt index a02e604258..7ff7ef8fd4 100644 --- a/doc/src/angle_charmm.txt +++ b/doc/src/angle_charmm.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_class2.txt b/doc/src/angle_class2.txt index 74f2544cd4..71a508d691 100644 --- a/doc/src/angle_class2.txt +++ b/doc/src/angle_class2.txt @@ -94,7 +94,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine.txt b/doc/src/angle_cosine.txt index 4fb2ccaf7c..c0ce3c9301 100644 --- a/doc/src/angle_cosine.txt +++ b/doc/src/angle_cosine.txt @@ -50,7 +50,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_delta.txt b/doc/src/angle_cosine_delta.txt index 6ab214508c..830fd6db58 100644 --- a/doc/src/angle_cosine_delta.txt +++ b/doc/src/angle_cosine_delta.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_periodic.txt b/doc/src/angle_cosine_periodic.txt index c6cd57e419..b5c53b1b0f 100644 --- a/doc/src/angle_cosine_periodic.txt +++ b/doc/src/angle_cosine_periodic.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_shift.txt b/doc/src/angle_cosine_shift.txt index dc1a29a86b..6ed9fe2150 100644 --- a/doc/src/angle_cosine_shift.txt +++ b/doc/src/angle_cosine_shift.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_shift_exp.txt b/doc/src/angle_cosine_shift_exp.txt index 48af5ba76a..44a68c1087 100644 --- a/doc/src/angle_cosine_shift_exp.txt +++ b/doc/src/angle_cosine_shift_exp.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_squared.txt b/doc/src/angle_cosine_squared.txt index 23e1b150a8..065cdad542 100644 --- a/doc/src/angle_cosine_squared.txt +++ b/doc/src/angle_cosine_squared.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_fourier.txt b/doc/src/angle_fourier.txt index f58ae8e4f4..da39e7cf32 100644 --- a/doc/src/angle_fourier.txt +++ b/doc/src/angle_fourier.txt @@ -51,7 +51,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_fourier_simple.txt b/doc/src/angle_fourier_simple.txt index 9da8ffed28..5adda6cb32 100644 --- a/doc/src/angle_fourier_simple.txt +++ b/doc/src/angle_fourier_simple.txt @@ -50,7 +50,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_harmonic.txt b/doc/src/angle_harmonic.txt index 12ee805218..4c74763964 100644 --- a/doc/src/angle_harmonic.txt +++ b/doc/src/angle_harmonic.txt @@ -57,7 +57,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_quartic.txt b/doc/src/angle_quartic.txt index fea2eb9e03..f7640bdfbc 100644 --- a/doc/src/angle_quartic.txt +++ b/doc/src/angle_quartic.txt @@ -57,7 +57,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_table.txt b/doc/src/angle_table.txt index 61dd7b041e..bd6e167bd8 100644 --- a/doc/src/angle_table.txt +++ b/doc/src/angle_table.txt @@ -136,7 +136,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/balance.txt b/doc/src/balance.txt index 79728d6569..da6f59900d 100644 --- a/doc/src/balance.txt +++ b/doc/src/balance.txt @@ -394,7 +394,7 @@ weights. It assigns the same weight to each particle owned by a processor based on the total computational time spent by that processor. See details below on what time window is used. It uses the same timing information as is used for the "MPI task timing -breakdown"_Section_start.html#start_8, namely, for sections {Pair}, +breakdown"_Section_start.html#start_7, namely, for sections {Pair}, {Bond}, {Kspace}, and {Neigh}. The time spent in those portions of the timestep are measured for each MPI rank, summed, then divided by the number of particles owned by that processor. I.e. the weight is diff --git a/doc/src/bond_class2.txt b/doc/src/bond_class2.txt index aa05412387..9687a63168 100644 --- a/doc/src/bond_class2.txt +++ b/doc/src/bond_class2.txt @@ -56,7 +56,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_fene.txt b/doc/src/bond_fene.txt index 80d2a805c5..9050c3bf5c 100644 --- a/doc/src/bond_fene.txt +++ b/doc/src/bond_fene.txt @@ -59,7 +59,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_fene_expand.txt b/doc/src/bond_fene_expand.txt index 3908c16a7e..ff687444a9 100644 --- a/doc/src/bond_fene_expand.txt +++ b/doc/src/bond_fene_expand.txt @@ -62,7 +62,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_harmonic.txt b/doc/src/bond_harmonic.txt index 1cbd897dac..c18a7e0fd4 100644 --- a/doc/src/bond_harmonic.txt +++ b/doc/src/bond_harmonic.txt @@ -54,7 +54,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_harmonic_shift.txt b/doc/src/bond_harmonic_shift.txt index 8cb2d2ce7d..bf3b3c115a 100644 --- a/doc/src/bond_harmonic_shift.txt +++ b/doc/src/bond_harmonic_shift.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_harmonic_shift_cut.txt b/doc/src/bond_harmonic_shift_cut.txt index 836d6afda4..1918ce00b6 100644 --- a/doc/src/bond_harmonic_shift_cut.txt +++ b/doc/src/bond_harmonic_shift_cut.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_morse.txt b/doc/src/bond_morse.txt index 12e51f9bef..4f6a32e341 100644 --- a/doc/src/bond_morse.txt +++ b/doc/src/bond_morse.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_nonlinear.txt b/doc/src/bond_nonlinear.txt index ac9f3369c2..434af62506 100644 --- a/doc/src/bond_nonlinear.txt +++ b/doc/src/bond_nonlinear.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_quartic.txt b/doc/src/bond_quartic.txt index e61f4f0343..4dc7ad4a36 100644 --- a/doc/src/bond_quartic.txt +++ b/doc/src/bond_quartic.txt @@ -88,7 +88,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_table.txt b/doc/src/bond_table.txt index cb096fba11..906d3e5d76 100644 --- a/doc/src/bond_table.txt +++ b/doc/src/bond_table.txt @@ -133,7 +133,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/compute_pressure.txt b/doc/src/compute_pressure.txt index 292e779f72..f0691ad207 100644 --- a/doc/src/compute_pressure.txt +++ b/doc/src/compute_pressure.txt @@ -117,7 +117,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/compute_temp.txt b/doc/src/compute_temp.txt index 0bd2d4b121..b88be79e20 100644 --- a/doc/src/compute_temp.txt +++ b/doc/src/compute_temp.txt @@ -79,7 +79,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/compute_temp_partial.txt b/doc/src/compute_temp_partial.txt index 163a00af52..fe2420b4e4 100644 --- a/doc/src/compute_temp_partial.txt +++ b/doc/src/compute_temp_partial.txt @@ -86,7 +86,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_charmm.txt b/doc/src/dihedral_charmm.txt index 73dc67cdef..06abe054e4 100644 --- a/doc/src/dihedral_charmm.txt +++ b/doc/src/dihedral_charmm.txt @@ -128,7 +128,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_class2.txt b/doc/src/dihedral_class2.txt index 91ab6f3738..cb9fc72c22 100644 --- a/doc/src/dihedral_class2.txt +++ b/doc/src/dihedral_class2.txt @@ -153,7 +153,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_cosine_shift_exp.txt b/doc/src/dihedral_cosine_shift_exp.txt index 89614a3fdb..715682affc 100644 --- a/doc/src/dihedral_cosine_shift_exp.txt +++ b/doc/src/dihedral_cosine_shift_exp.txt @@ -64,7 +64,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_fourier.txt b/doc/src/dihedral_fourier.txt index 5682309b83..da892b59da 100644 --- a/doc/src/dihedral_fourier.txt +++ b/doc/src/dihedral_fourier.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_harmonic.txt b/doc/src/dihedral_harmonic.txt index c763dcce22..d9a48ff384 100644 --- a/doc/src/dihedral_harmonic.txt +++ b/doc/src/dihedral_harmonic.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_helix.txt b/doc/src/dihedral_helix.txt index fced983db0..1e907557b2 100644 --- a/doc/src/dihedral_helix.txt +++ b/doc/src/dihedral_helix.txt @@ -58,7 +58,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_multi_harmonic.txt b/doc/src/dihedral_multi_harmonic.txt index 5774a67685..7d3c2ea083 100644 --- a/doc/src/dihedral_multi_harmonic.txt +++ b/doc/src/dihedral_multi_harmonic.txt @@ -52,7 +52,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_nharmonic.txt b/doc/src/dihedral_nharmonic.txt index 0df28a05d4..8392d83899 100644 --- a/doc/src/dihedral_nharmonic.txt +++ b/doc/src/dihedral_nharmonic.txt @@ -52,7 +52,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_opls.txt b/doc/src/dihedral_opls.txt index afcc5d3514..d1a6ba3ff2 100644 --- a/doc/src/dihedral_opls.txt +++ b/doc/src/dihedral_opls.txt @@ -60,7 +60,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_quadratic.txt b/doc/src/dihedral_quadratic.txt index 526b469f63..ca2f5aed40 100644 --- a/doc/src/dihedral_quadratic.txt +++ b/doc/src/dihedral_quadratic.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/echo.txt b/doc/src/echo.txt index 8ef8ad05f8..3141c7a719 100644 --- a/doc/src/echo.txt +++ b/doc/src/echo.txt @@ -26,7 +26,7 @@ command to the screen and/or log file as it is read and processed. If an input script has errors, it can be useful to look at echoed output to see the last command processed. -The "command-line switch"_Section_start.html#start_5 -echo can be used +The "command-line switch"_Section_start.html#start_6 -echo can be used in place of this command. [Restrictions:] none diff --git a/doc/src/fix_addforce.txt b/doc/src/fix_addforce.txt index da9f98a6da..1cc0a15332 100644 --- a/doc/src/fix_addforce.txt +++ b/doc/src/fix_addforce.txt @@ -117,7 +117,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_aveforce.txt b/doc/src/fix_aveforce.txt index d980e9a211..5d7dec3e6a 100644 --- a/doc/src/fix_aveforce.txt +++ b/doc/src/fix_aveforce.txt @@ -77,7 +77,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_deform.txt b/doc/src/fix_deform.txt index d3254eece6..63d872eded 100644 --- a/doc/src/fix_deform.txt +++ b/doc/src/fix_deform.txt @@ -557,7 +557,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_enforce2d.txt b/doc/src/fix_enforce2d.txt index 1dce620033..5d04e96677 100644 --- a/doc/src/fix_enforce2d.txt +++ b/doc/src/fix_enforce2d.txt @@ -41,7 +41,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_freeze.txt b/doc/src/fix_freeze.txt index 6a4f6c2fcf..a63ee4cb32 100644 --- a/doc/src/fix_freeze.txt +++ b/doc/src/fix_freeze.txt @@ -45,7 +45,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_gravity.txt b/doc/src/fix_gravity.txt index 2cf1665c30..dae8ac5ed0 100644 --- a/doc/src/fix_gravity.txt +++ b/doc/src/fix_gravity.txt @@ -102,7 +102,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_langevin.txt b/doc/src/fix_langevin.txt index 534d83f6a9..93c73f5a5d 100644 --- a/doc/src/fix_langevin.txt +++ b/doc/src/fix_langevin.txt @@ -276,7 +276,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_momentum.txt b/doc/src/fix_momentum.txt index 4f94e2a857..bcf4465fb8 100644 --- a/doc/src/fix_momentum.txt +++ b/doc/src/fix_momentum.txt @@ -73,7 +73,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nh.txt b/doc/src/fix_nh.txt index c1cc3e560a..8fa30ac222 100644 --- a/doc/src/fix_nh.txt +++ b/doc/src/fix_nh.txt @@ -492,7 +492,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nph_asphere.txt b/doc/src/fix_nph_asphere.txt index 3d151a724b..8c35b6a1a7 100644 --- a/doc/src/fix_nph_asphere.txt +++ b/doc/src/fix_nph_asphere.txt @@ -93,7 +93,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nph_body.txt b/doc/src/fix_nph_body.txt index 3a273be595..1e590f1cb3 100644 --- a/doc/src/fix_nph_body.txt +++ b/doc/src/fix_nph_body.txt @@ -92,7 +92,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nph_sphere.txt b/doc/src/fix_nph_sphere.txt index 9258f40c76..62b45edfd7 100644 --- a/doc/src/fix_nph_sphere.txt +++ b/doc/src/fix_nph_sphere.txt @@ -102,7 +102,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nphug.txt b/doc/src/fix_nphug.txt index ef3ffc4955..292e46f94a 100644 --- a/doc/src/fix_nphug.txt +++ b/doc/src/fix_nphug.txt @@ -152,7 +152,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_npt_asphere.txt b/doc/src/fix_npt_asphere.txt index 8fe98f1818..5f3979e36e 100644 --- a/doc/src/fix_npt_asphere.txt +++ b/doc/src/fix_npt_asphere.txt @@ -117,7 +117,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_npt_body.txt b/doc/src/fix_npt_body.txt index 772920df61..d89bf19db2 100644 --- a/doc/src/fix_npt_body.txt +++ b/doc/src/fix_npt_body.txt @@ -116,7 +116,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_npt_sphere.txt b/doc/src/fix_npt_sphere.txt index 24a8fede57..c4cf2cb08d 100644 --- a/doc/src/fix_npt_sphere.txt +++ b/doc/src/fix_npt_sphere.txt @@ -127,7 +127,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nve.txt b/doc/src/fix_nve.txt index 7ad8301877..c04c17858e 100644 --- a/doc/src/fix_nve.txt +++ b/doc/src/fix_nve.txt @@ -46,7 +46,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nve_asphere.txt b/doc/src/fix_nve_asphere.txt index 03846a2558..1f31fb9679 100644 --- a/doc/src/fix_nve_asphere.txt +++ b/doc/src/fix_nve_asphere.txt @@ -57,7 +57,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nve_sphere.txt b/doc/src/fix_nve_sphere.txt index f91a41f515..21dc6cba8a 100644 --- a/doc/src/fix_nve_sphere.txt +++ b/doc/src/fix_nve_sphere.txt @@ -77,7 +77,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_asphere.txt b/doc/src/fix_nvt_asphere.txt index 77de1dea40..21b900f16a 100644 --- a/doc/src/fix_nvt_asphere.txt +++ b/doc/src/fix_nvt_asphere.txt @@ -98,7 +98,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_body.txt b/doc/src/fix_nvt_body.txt index 1f04b85c8b..6a5e09ba7f 100644 --- a/doc/src/fix_nvt_body.txt +++ b/doc/src/fix_nvt_body.txt @@ -97,7 +97,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_sllod.txt b/doc/src/fix_nvt_sllod.txt index 82631f22e3..392dbc281c 100644 --- a/doc/src/fix_nvt_sllod.txt +++ b/doc/src/fix_nvt_sllod.txt @@ -121,7 +121,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_sphere.txt b/doc/src/fix_nvt_sphere.txt index fa1c97bcce..ecf0922b79 100644 --- a/doc/src/fix_nvt_sphere.txt +++ b/doc/src/fix_nvt_sphere.txt @@ -108,7 +108,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_qeq_comb.txt b/doc/src/fix_qeq_comb.txt index 30c5003e72..7f82404127 100644 --- a/doc/src/fix_qeq_comb.txt +++ b/doc/src/fix_qeq_comb.txt @@ -74,7 +74,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_qeq_reax.txt b/doc/src/fix_qeq_reax.txt index a1a19b7368..18450c7cd5 100644 --- a/doc/src/fix_qeq_reax.txt +++ b/doc/src/fix_qeq_reax.txt @@ -92,7 +92,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_reax_bonds.txt b/doc/src/fix_reax_bonds.txt index aadb0a9cbc..54aa7faef8 100644 --- a/doc/src/fix_reax_bonds.txt +++ b/doc/src/fix_reax_bonds.txt @@ -82,7 +82,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section_accelerate"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_reaxc_species.txt b/doc/src/fix_reaxc_species.txt index 9a588356e0..7c920791f7 100644 --- a/doc/src/fix_reaxc_species.txt +++ b/doc/src/fix_reaxc_species.txt @@ -151,7 +151,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section_accelerate"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_rigid.txt b/doc/src/fix_rigid.txt index 87021b8551..62969112f7 100644 --- a/doc/src/fix_rigid.txt +++ b/doc/src/fix_rigid.txt @@ -676,7 +676,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_setforce.txt b/doc/src/fix_setforce.txt index 90766fc5bc..f5be0f93a5 100644 --- a/doc/src/fix_setforce.txt +++ b/doc/src/fix_setforce.txt @@ -82,7 +82,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_shake.txt b/doc/src/fix_shake.txt index 8b26aaa874..c187b17c6c 100644 --- a/doc/src/fix_shake.txt +++ b/doc/src/fix_shake.txt @@ -159,7 +159,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_wall_reflect.txt b/doc/src/fix_wall_reflect.txt index 5b425316e0..954ec65bf6 100644 --- a/doc/src/fix_wall_reflect.txt +++ b/doc/src/fix_wall_reflect.txt @@ -142,7 +142,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_class2.txt b/doc/src/improper_class2.txt index 0b41afe2db..14ec6258de 100644 --- a/doc/src/improper_class2.txt +++ b/doc/src/improper_class2.txt @@ -99,7 +99,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_cossq.txt b/doc/src/improper_cossq.txt index e238063a8f..138a6a1650 100644 --- a/doc/src/improper_cossq.txt +++ b/doc/src/improper_cossq.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_cvff.txt b/doc/src/improper_cvff.txt index 72f346ba04..5f69eccc60 100644 --- a/doc/src/improper_cvff.txt +++ b/doc/src/improper_cvff.txt @@ -66,7 +66,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_fourier.txt b/doc/src/improper_fourier.txt index 3a5354b1fe..f9062da207 100644 --- a/doc/src/improper_fourier.txt +++ b/doc/src/improper_fourier.txt @@ -60,7 +60,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_harmonic.txt b/doc/src/improper_harmonic.txt index b47b0ca41f..bb17e5a641 100644 --- a/doc/src/improper_harmonic.txt +++ b/doc/src/improper_harmonic.txt @@ -70,7 +70,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_ring.txt b/doc/src/improper_ring.txt index cba59399e7..c02d392474 100644 --- a/doc/src/improper_ring.txt +++ b/doc/src/improper_ring.txt @@ -69,7 +69,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_umbrella.txt b/doc/src/improper_umbrella.txt index fafa2e7e4c..d6df9ee6cc 100644 --- a/doc/src/improper_umbrella.txt +++ b/doc/src/improper_umbrella.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/jump.txt b/doc/src/jump.txt index 1b1a209511..4e3799f7b1 100644 --- a/doc/src/jump.txt +++ b/doc/src/jump.txt @@ -40,12 +40,12 @@ lmp_g++ < in.script :pre since the SELF option invokes the C-library rewind() call, which may not be supported for stdin on some systems or by some MPI implementations. This can be worked around by using the "-in -command-line argument"_Section_start.html#start_7, e.g. +command-line argument"_Section_start.html#start_6, e.g. lmp_g++ -in in.script :pre or by using the "-var command-line -argument"_Section_start.html#start_7 to pass the script name as a +argument"_Section_start.html#start_6 to pass the script name as a variable to the input script. In the latter case, a "variable"_variable.html called "fname" could be used in place of SELF, e.g. diff --git a/doc/src/log.txt b/doc/src/log.txt index 460482ea1e..92bb12e6db 100644 --- a/doc/src/log.txt +++ b/doc/src/log.txt @@ -34,7 +34,7 @@ the same log file. The file "log.lammps" is the default log file for a LAMMPS run. The name of the initial log file can also be set by the command-line -switch -log. See "Section 2.7"_Section_start.html#start_7 for +switch -log. See "Section 2.6"_Section_start.html#start_6 for details. [Restrictions:] none diff --git a/doc/src/neb.txt b/doc/src/neb.txt index d2e8be3f03..144fe8bdef 100644 --- a/doc/src/neb.txt +++ b/doc/src/neb.txt @@ -51,7 +51,7 @@ follows the discussion in these 4 papers: "(HenkelmanA)"_#HenkelmanA, Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the -partition command-line -switch; see "Section 2.7"_Section_start.html#start_7 of the manual. +switch; see "Section 2.6"_Section_start.html#start_6 of the manual. Note that if you have MPI installed, you can run a multi-replica simulation with more replicas (partitions) than you have physical processors, e.g you can run a 10-replica simulation on just one or two diff --git a/doc/src/neighbor.txt b/doc/src/neighbor.txt index 7b8f499ba8..062f79a5bb 100644 --- a/doc/src/neighbor.txt +++ b/doc/src/neighbor.txt @@ -66,7 +66,7 @@ stored in the list. When a run is finished, counts of the number of neighbors stored in the pairwise list and the number of times neighbor lists were built are printed to the screen and log file. See "this -section"_Section_start.html#start_8 for details. +section"_Section_start.html#start_7 for details. [Restrictions:] none diff --git a/doc/src/next.txt b/doc/src/next.txt index fe9dc97542..08f73b896c 100644 --- a/doc/src/next.txt +++ b/doc/src/next.txt @@ -71,7 +71,7 @@ next value (for each variable) is assigned to whichever processor partition executes the command first. All processors in the partition are assigned the same value(s). Running LAMMPS on multiple partitions of processors via the "-partition" command-line switch is described in -"this section"_Section_start.html#start_7 of the manual. {Universe}- +"this section"_Section_start.html#start_6 of the manual. {Universe}- and {uloop}-style variables are incremented using the files "tmp.lammps.variable" and "tmp.lammps.variable.lock" which you will see in your directory during and after such a LAMMPS run. diff --git a/doc/src/package.txt b/doc/src/package.txt index 18a26bd55c..1b9092644f 100644 --- a/doc/src/package.txt +++ b/doc/src/package.txt @@ -115,7 +115,7 @@ their initialization, before a simulation is defined. This command can also be specified from the command-line when launching LAMMPS, using the "-pk" "command-line -switch"_Section_start.html#start_7. The syntax is exactly the same as +switch"_Section_start.html#start_6. The syntax is exactly the same as when used in an input script. Note that all of the accelerator packages require the package command @@ -126,18 +126,18 @@ a default version of the command is typically invoked by other accelerator settings. The KOKKOS package requires a "-k on" "command-line -switch"_Section_start.html#start_7 respectively, which invokes a +switch"_Section_start.html#start_6 respectively, which invokes a "package kokkos" command with default settings. For the GPU, USER-INTEL, and USER-OMP packages, if a "-sf gpu" or "-sf -intel" or "-sf omp" "command-line switch"_Section_start.html#start_7 +intel" or "-sf omp" "command-line switch"_Section_start.html#start_6 is used to auto-append accelerator suffixes to various styles in the input script, then those switches also invoke a "package gpu", "package intel", or "package omp" command with default settings. NOTE: A package command for a particular style can be invoked multiple times when a simulation is setup, e.g. by the "-c on", "-k on", "-sf", -and "-pk" "command-line switches"_Section_start.html#start_7, and by +and "-pk" "command-line switches"_Section_start.html#start_6, and by using this command in an input script. Each time it is used all of the style options are set, either to default values or to specified settings. I.e. settings from previous invocations do not persist @@ -305,7 +305,7 @@ value via their package commands, but there is only a single global invoked, you should insure the two values are consistent. If they are not, the last one invoked will take precedence, for both packages. Also note that if the "-sf hybrid intel omp" "command-line -switch"_"_Section_start.html#start_7 is used, it invokes a "package +switch"_"_Section_start.html#start_6 is used, it invokes a "package intel" command, followed by a "package omp" command, both with a setting of {Nthreads} = 0. @@ -550,7 +550,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. [Related commands:] "suffix"_suffix.html, "-pk" "command-line -setting"_Section_start.html#start_7 +setting"_Section_start.html#start_6 [Default:] @@ -558,9 +558,9 @@ For the GPU package, the default is Ngpu = 1 and the option defaults are neigh = yes, newton = off, binsize = 0.0, split = 1.0, gpuID = 0 to Ngpu-1, tpa = 1, and device = not used. These settings are made automatically if the "-sf gpu" "command-line -switch"_Section_start.html#start_7 is used. If it is not used, you +switch"_Section_start.html#start_6 is used. If it is not used, you must invoke the package gpu command in your input script or via the -"-pk gpu" "command-line switch"_Section_start.html#start_7. +"-pk gpu" "command-line switch"_Section_start.html#start_6. For the USER-INTEL package, the default is Nphi = 1 and the option defaults are omp = 0, mode = mixed, lrt = no, balance = -1, tpc = 4, @@ -569,21 +569,21 @@ style being used. This value is output to the screen in the offload report at the end of each run. Note that all of these settings, except "omp" and "mode", are ignored if LAMMPS was not built with Xeon Phi coprocessor support. These settings are made automatically -if the "-sf intel" "command-line switch"_Section_start.html#start_7 +if the "-sf intel" "command-line switch"_Section_start.html#start_6 is used. If it is not used, you must invoke the package intel command in your input script or or via the "-pk intel" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. For the KOKKOS package, the option defaults neigh = full, neigh/qeq = full, newton = off, binsize = 0.0, and comm = device. These settings are made automatically by the required "-k on" "command-line -switch"_Section_start.html#start_7. You can change them bu using the +switch"_Section_start.html#start_6. You can change them bu using the package kokkos command in your input script or via the "-pk kokkos" -"command-line switch"_Section_start.html#start_7. +"command-line switch"_Section_start.html#start_6. For the OMP package, the default is Nthreads = 0 and the option defaults are neigh = yes. These settings are made automatically if -the "-sf omp" "command-line switch"_Section_start.html#start_7 is +the "-sf omp" "command-line switch"_Section_start.html#start_6 is used. If it is not used, you must invoke the package omp command in your input script or via the "-pk omp" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. diff --git a/doc/src/pair_adp.txt b/doc/src/pair_adp.txt index 457a797d95..9d2a48dcbc 100644 --- a/doc/src/pair_adp.txt +++ b/doc/src/pair_adp.txt @@ -137,7 +137,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_agni.txt b/doc/src/pair_agni.txt index 06dcccb9d9..402e537dad 100644 --- a/doc/src/pair_agni.txt +++ b/doc/src/pair_agni.txt @@ -70,7 +70,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated style explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_airebo.txt b/doc/src/pair_airebo.txt index 0c03eb3267..e66ecb637f 100644 --- a/doc/src/pair_airebo.txt +++ b/doc/src/pair_airebo.txt @@ -185,7 +185,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_beck.txt b/doc/src/pair_beck.txt index 4e792754b8..e160f09b3d 100644 --- a/doc/src/pair_beck.txt +++ b/doc/src/pair_beck.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_born.txt b/doc/src/pair_born.txt index d38d9e3191..a3cc744a22 100644 --- a/doc/src/pair_born.txt +++ b/doc/src/pair_born.txt @@ -152,7 +152,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_brownian.txt b/doc/src/pair_brownian.txt index 33eed77629..79b71e91c7 100644 --- a/doc/src/pair_brownian.txt +++ b/doc/src/pair_brownian.txt @@ -85,7 +85,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "this section"_Section_accelerate.html of the manual for more diff --git a/doc/src/pair_buck.txt b/doc/src/pair_buck.txt index e705e735fb..d18b39d5d9 100644 --- a/doc/src/pair_buck.txt +++ b/doc/src/pair_buck.txt @@ -152,7 +152,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_buck_long.txt b/doc/src/pair_buck_long.txt index ba18738e4d..05e760e1b2 100644 --- a/doc/src/pair_buck_long.txt +++ b/doc/src/pair_buck_long.txt @@ -114,7 +114,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_charmm.txt b/doc/src/pair_charmm.txt index 1e78607c08..ef4ef41c95 100644 --- a/doc/src/pair_charmm.txt +++ b/doc/src/pair_charmm.txt @@ -195,7 +195,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_class2.txt b/doc/src/pair_class2.txt index 23b90aae2d..36fae5068b 100644 --- a/doc/src/pair_class2.txt +++ b/doc/src/pair_class2.txt @@ -114,7 +114,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_colloid.txt b/doc/src/pair_colloid.txt index a0df1d464e..83b15b358b 100644 --- a/doc/src/pair_colloid.txt +++ b/doc/src/pair_colloid.txt @@ -139,7 +139,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_comb.txt b/doc/src/pair_comb.txt index 3a2f380bfa..f5461b1cbc 100644 --- a/doc/src/pair_comb.txt +++ b/doc/src/pair_comb.txt @@ -124,7 +124,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_coul.txt b/doc/src/pair_coul.txt index 4a601e90c0..29e5beed3c 100644 --- a/doc/src/pair_coul.txt +++ b/doc/src/pair_coul.txt @@ -274,7 +274,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_dipole.txt b/doc/src/pair_dipole.txt index 985581cac8..2516e5eae4 100644 --- a/doc/src/pair_dipole.txt +++ b/doc/src/pair_dipole.txt @@ -198,7 +198,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_dpd.txt b/doc/src/pair_dpd.txt index 62a5faffed..9dd204ad2d 100644 --- a/doc/src/pair_dpd.txt +++ b/doc/src/pair_dpd.txt @@ -121,7 +121,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_eam.txt b/doc/src/pair_eam.txt index 4d3c2b2dea..ce8495affd 100644 --- a/doc/src/pair_eam.txt +++ b/doc/src/pair_eam.txt @@ -381,7 +381,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for more diff --git a/doc/src/pair_edip.txt b/doc/src/pair_edip.txt index 86453859d3..e5b1420b59 100644 --- a/doc/src/pair_edip.txt +++ b/doc/src/pair_edip.txt @@ -121,7 +121,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_eim.txt b/doc/src/pair_eim.txt index 3f068d4040..75ad2d4683 100644 --- a/doc/src/pair_eim.txt +++ b/doc/src/pair_eim.txt @@ -148,7 +148,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_gayberne.txt b/doc/src/pair_gayberne.txt index 8639f220a4..c923578586 100644 --- a/doc/src/pair_gayberne.txt +++ b/doc/src/pair_gayberne.txt @@ -145,7 +145,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_gran.txt b/doc/src/pair_gran.txt index 62a58b3504..d7e87af013 100644 --- a/doc/src/pair_gran.txt +++ b/doc/src/pair_gran.txt @@ -191,7 +191,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_gromacs.txt b/doc/src/pair_gromacs.txt index 3aca8c3cd3..ec84a2d57a 100644 --- a/doc/src/pair_gromacs.txt +++ b/doc/src/pair_gromacs.txt @@ -103,7 +103,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_hbond_dreiding.txt b/doc/src/pair_hbond_dreiding.txt index 9641e294fa..d3cf90ec14 100644 --- a/doc/src/pair_hbond_dreiding.txt +++ b/doc/src/pair_hbond_dreiding.txt @@ -178,7 +178,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_hybrid.txt b/doc/src/pair_hybrid.txt index 5166fe1f84..fc1824cf62 100644 --- a/doc/src/pair_hybrid.txt +++ b/doc/src/pair_hybrid.txt @@ -330,7 +330,7 @@ LAMMPS was built with those packages. See the You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj.txt b/doc/src/pair_lj.txt index 5c8e31ac42..058d54fb59 100644 --- a/doc/src/pair_lj.txt +++ b/doc/src/pair_lj.txt @@ -253,7 +253,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj96.txt b/doc/src/pair_lj96.txt index 6e7c3cbaec..83f6ec063d 100644 --- a/doc/src/pair_lj96.txt +++ b/doc/src/pair_lj96.txt @@ -61,7 +61,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_cubic.txt b/doc/src/pair_lj_cubic.txt index d33e3ec09b..4ca8c3c141 100644 --- a/doc/src/pair_lj_cubic.txt +++ b/doc/src/pair_lj_cubic.txt @@ -75,7 +75,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_expand.txt b/doc/src/pair_lj_expand.txt index c5f0c88a75..e0838426f6 100644 --- a/doc/src/pair_lj_expand.txt +++ b/doc/src/pair_lj_expand.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_long.txt b/doc/src/pair_lj_long.txt index da9f37b9c3..6be4562d18 100644 --- a/doc/src/pair_lj_long.txt +++ b/doc/src/pair_lj_long.txt @@ -168,7 +168,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_smooth.txt b/doc/src/pair_lj_smooth.txt index 133773abd0..b1678cad58 100644 --- a/doc/src/pair_lj_smooth.txt +++ b/doc/src/pair_lj_smooth.txt @@ -74,7 +74,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_smooth_linear.txt b/doc/src/pair_lj_smooth_linear.txt index a48c441f54..5f7c226cee 100644 --- a/doc/src/pair_lj_smooth_linear.txt +++ b/doc/src/pair_lj_smooth_linear.txt @@ -61,7 +61,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_soft.txt b/doc/src/pair_lj_soft.txt index e372092cf0..2ef133da55 100644 --- a/doc/src/pair_lj_soft.txt +++ b/doc/src/pair_lj_soft.txt @@ -219,7 +219,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lubricate.txt b/doc/src/pair_lubricate.txt index 501a043801..b39c7545c7 100644 --- a/doc/src/pair_lubricate.txt +++ b/doc/src/pair_lubricate.txt @@ -154,7 +154,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "this section"_Section_accelerate.html of the manual for more diff --git a/doc/src/pair_meam_spline.txt b/doc/src/pair_meam_spline.txt index 2295a6640b..6653b397a0 100644 --- a/doc/src/pair_meam_spline.txt +++ b/doc/src/pair_meam_spline.txt @@ -118,7 +118,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_morse.txt b/doc/src/pair_morse.txt index 5fbb6d5c0a..3eb5ac5afe 100644 --- a/doc/src/pair_morse.txt +++ b/doc/src/pair_morse.txt @@ -113,7 +113,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_nb3b_harmonic.txt b/doc/src/pair_nb3b_harmonic.txt index 3f7066c826..2395707fb4 100644 --- a/doc/src/pair_nb3b_harmonic.txt +++ b/doc/src/pair_nb3b_harmonic.txt @@ -104,7 +104,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_nm.txt b/doc/src/pair_nm.txt index 9096bdc523..81cea1a38d 100644 --- a/doc/src/pair_nm.txt +++ b/doc/src/pair_nm.txt @@ -145,7 +145,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_peri.txt b/doc/src/pair_peri.txt index 6ffd8122aa..6fef445595 100644 --- a/doc/src/pair_peri.txt +++ b/doc/src/pair_peri.txt @@ -151,7 +151,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_reaxc.txt b/doc/src/pair_reaxc.txt index cfa88673d7..b9dc6e0ed8 100644 --- a/doc/src/pair_reaxc.txt +++ b/doc/src/pair_reaxc.txt @@ -311,7 +311,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_resquared.txt b/doc/src/pair_resquared.txt index 2e0034ed3b..9ad95eb5fc 100644 --- a/doc/src/pair_resquared.txt +++ b/doc/src/pair_resquared.txt @@ -157,7 +157,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_sdk.txt b/doc/src/pair_sdk.txt index 1c348eaaf7..360136a4ea 100644 --- a/doc/src/pair_sdk.txt +++ b/doc/src/pair_sdk.txt @@ -97,7 +97,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_soft.txt b/doc/src/pair_soft.txt index ec1c06729a..08fa88c477 100644 --- a/doc/src/pair_soft.txt +++ b/doc/src/pair_soft.txt @@ -94,7 +94,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_sw.txt b/doc/src/pair_sw.txt index 6025b9b11b..6ed8f00236 100644 --- a/doc/src/pair_sw.txt +++ b/doc/src/pair_sw.txt @@ -156,7 +156,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. When using the USER-INTEL package with this style, there is an diff --git a/doc/src/pair_table.txt b/doc/src/pair_table.txt index 01c577cd98..b99491b477 100644 --- a/doc/src/pair_table.txt +++ b/doc/src/pair_table.txt @@ -229,7 +229,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_tersoff.txt b/doc/src/pair_tersoff.txt index 23a20ad0fd..918e889924 100644 --- a/doc/src/pair_tersoff.txt +++ b/doc/src/pair_tersoff.txt @@ -191,7 +191,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_tersoff_mod.txt b/doc/src/pair_tersoff_mod.txt index ff703063b3..e0c2b5a5cb 100644 --- a/doc/src/pair_tersoff_mod.txt +++ b/doc/src/pair_tersoff_mod.txt @@ -143,7 +143,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_tersoff_zbl.txt b/doc/src/pair_tersoff_zbl.txt index 18e54749aa..21d57e4e88 100644 --- a/doc/src/pair_tersoff_zbl.txt +++ b/doc/src/pair_tersoff_zbl.txt @@ -201,7 +201,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_thole.txt b/doc/src/pair_thole.txt index 61ca0b5c35..41a4059cee 100644 --- a/doc/src/pair_thole.txt +++ b/doc/src/pair_thole.txt @@ -142,7 +142,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_vashishta.txt b/doc/src/pair_vashishta.txt index 9c275a61d3..d9c66d45c0 100644 --- a/doc/src/pair_vashishta.txt +++ b/doc/src/pair_vashishta.txt @@ -183,7 +183,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_yukawa.txt b/doc/src/pair_yukawa.txt index 26acdb2ccb..61d6bde6a9 100644 --- a/doc/src/pair_yukawa.txt +++ b/doc/src/pair_yukawa.txt @@ -60,7 +60,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_yukawa_colloid.txt b/doc/src/pair_yukawa_colloid.txt index ecdc1496ab..2037a9451f 100644 --- a/doc/src/pair_yukawa_colloid.txt +++ b/doc/src/pair_yukawa_colloid.txt @@ -92,7 +92,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_zbl.txt b/doc/src/pair_zbl.txt index 154fdc1c13..5ab672171b 100644 --- a/doc/src/pair_zbl.txt +++ b/doc/src/pair_zbl.txt @@ -82,7 +82,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/partition.txt b/doc/src/partition.txt index 9c1d560c83..610eee99b3 100644 --- a/doc/src/partition.txt +++ b/doc/src/partition.txt @@ -27,7 +27,7 @@ partition yes 6* fix all nvt temp 1.0 1.0 0.1 :pre This command invokes the specified command on a subset of the partitions of processors you have defined via the -partition -command-line switch. See "Section 2.6"_Section_start.html#start_7 +command-line switch. See "Section 2.6"_Section_start.html#start_6 for an explanation of the switch. Normally, every input script command in your script is invoked by @@ -49,7 +49,7 @@ argument. Partitions are numbered from 1 to Np, where Np is the number of partitions specified by the "-partition command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. {N} can be specified in one of two ways. An explicit numeric value can be used, as in the 1st example above. Or a wild-card asterisk can diff --git a/doc/src/prd.txt b/doc/src/prd.txt index 247d422b1c..3c0305e316 100644 --- a/doc/src/prd.txt +++ b/doc/src/prd.txt @@ -63,7 +63,7 @@ event to occur. Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the -partition command-line -switch; see "Section 2.7"_Section_start.html#start_7 of the manual. +switch; see "Section 2.6"_Section_start.html#start_6 of the manual. Note that if you have MPI installed, you can run a multi-replica simulation with more replicas (partitions) than you have physical processors, e.g you can run a 10-replica simulation on one or two diff --git a/doc/src/processors.txt b/doc/src/processors.txt index 781049af9c..e54b2cede3 100644 --- a/doc/src/processors.txt +++ b/doc/src/processors.txt @@ -82,7 +82,7 @@ sub-domain. Also note that if multiple partitions are being used then P is the number of processors in this partition; see "this -section"_Section_start.html#start_7 for an explanation of the +section"_Section_start.html#start_6 for an explanation of the -partition command-line switch. Also note that you can prefix the processors command with the "partition"_partition.html command to easily specify different Px,Py,Pz values for different partitions. @@ -249,7 +249,7 @@ partition {Precv} which is enforced when each is setting up their own mapping of their processors to the simulation box. Each of {Psend} and {Precv} must be integers from 1 to Np, where Np is the number of partitions you have defined via the "-partition command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. A "dependency" means that the sending partition will create its regular 3d grid as Px by Py by Pz and after it has done this, it will @@ -286,7 +286,7 @@ processors and their mapping to the 3d grid to the specified file processors in the manner you desired, which can be tricky to figure out, especially when running on multiple partitions or on, a multicore machine or when the processor ranks were reordered by use of the -"-reorder command-line switch"_Section_start.html#start_7 or due to +"-reorder command-line switch"_Section_start.html#start_6 or due to use of MPI-specific launch options such as a config file. If you have multiple partitions you should insure that each one writes @@ -300,9 +300,9 @@ The IDs are the processor's rank in this simulation (the world), the universe (of multiple simulations), and the original MPI communicator used to instantiate LAMMPS, respectively. The world and universe IDs will only be different if you are running on more than one partition; -see the "-partition command-line switch"_Section_start.html#start_7. +see the "-partition command-line switch"_Section_start.html#start_6. The universe and original IDs will only be different if you used the -"-reorder command-line switch"_Section_start.html#start_7 to reorder +"-reorder command-line switch"_Section_start.html#start_6 to reorder the processors differently than their rank in the original communicator LAMMPS was instantiated with. @@ -332,7 +332,7 @@ The {part} keyword (for the receiving partition) only works with the [Related commands:] -"partition"_partition.html, "-reorder command-line switch"_Section_start.html#start_7 +"partition"_partition.html, "-reorder command-line switch"_Section_start.html#start_6 [Default:] diff --git a/doc/src/read_data.txt b/doc/src/read_data.txt index 6785eb1066..a8aca53693 100644 --- a/doc/src/read_data.txt +++ b/doc/src/read_data.txt @@ -62,7 +62,7 @@ simulation. The file can be ASCII text or a gzipped text file atom coordinates; see the "read_restart"_read_restart.html and "create_atoms"_create_atoms.html commands for alternative methods. Also see the explanation of the "-restart command-line -switch"_Section_start.html#start_7 which can convert a restart file to +switch"_Section_start.html#start_6 which can convert a restart file to a data file. This command can be used multiple times to add new atoms and their diff --git a/doc/src/read_restart.txt b/doc/src/read_restart.txt index d0f4b16175..d1091542b8 100644 --- a/doc/src/read_restart.txt +++ b/doc/src/read_restart.txt @@ -81,7 +81,7 @@ wrong. Because restart files are binary, they may not be portable to other machines. In this case, you can use the "-restart command-line -switch"_Section_start.html#start_7 to convert a restart file to a data +switch"_Section_start.html#start_6 to convert a restart file to a data file. Similar to how restart files are written (see the diff --git a/doc/src/region.txt b/doc/src/region.txt index 885e5e45f8..5039e4a516 100644 --- a/doc/src/region.txt +++ b/doc/src/region.txt @@ -375,7 +375,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/restart.txt b/doc/src/restart.txt index 5e0c2a9ea5..7c39ae1404 100644 --- a/doc/src/restart.txt +++ b/doc/src/restart.txt @@ -125,7 +125,7 @@ Restart files can be read by a "read_restart"_read_restart.html command to restart a simulation from a particular state. Because the file is binary (to enable exact restarts), it may not be readable on another machine. In this case, you can use the "-r command-line -switch"_Section_start.html#start_7 to convert a restart file to a data +switch"_Section_start.html#start_6 to convert a restart file to a data file. NOTE: Although the purpose of restart files is to enable restarting a diff --git a/doc/src/run_style.txt b/doc/src/run_style.txt index a67899420b..ba836a07dd 100644 --- a/doc/src/run_style.txt +++ b/doc/src/run_style.txt @@ -69,7 +69,7 @@ The {verlet} style is a standard velocity-Verlet integrator. The {verlet/split} style is also a velocity-Verlet integrator, but it splits the force calculation within each timestep over 2 partitions of -processors. See "Section 2.7"_Section_start.html#start_7 for an +processors. See "Section 2.6"_Section_start.html#start_6 for an explanation of the -partition command-line switch. Specifically, this style performs all computation except the @@ -115,7 +115,7 @@ When you run in 2-partition mode with the {verlet/split} style, the thermodynamic data for the entire simulation will be output to the log and screen file of the 1st partition, which are log.lammps.0 and screen.0 by default; see the "-plog and -pscreen command-line -switches"_Section_start.html#start_7 to change this. The log and +switches"_Section_start.html#start_6 to change this. The log and screen file for the 2nd partition will not contain thermodynamic output beyond the 1st timestep of the run. @@ -259,7 +259,7 @@ Accelerated styles take the same arguments and should produce the same results, except for round-off and precision issues. You can specify {respa/omp} explicitly in your input script, or -you can use the "-suffix command-line switch"_Section_start.html#start_7 +you can use the "-suffix command-line switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. diff --git a/doc/src/suffix.txt b/doc/src/suffix.txt index 127719cdb5..7a4adb50b6 100644 --- a/doc/src/suffix.txt +++ b/doc/src/suffix.txt @@ -28,7 +28,7 @@ suffix kk :pre This command allows you to use variants of various styles if they exist. In that respect it operates the same as the "-suffix -command-line switch"_Section_start.html#start_7. It also has options +command-line switch"_Section_start.html#start_6. It also has options to turn off or back on any suffix setting made via the command line. The specified style can be {gpu}, {intel}, {kk}, {omp}, {opt} or @@ -105,6 +105,6 @@ input script. [Related commands:] -"Command-line switch -suffix"_Section_start.html#start_7 +"Command-line switch -suffix"_Section_start.html#start_6 [Default:] none diff --git a/doc/src/temper.txt b/doc/src/temper.txt index be7edfba43..b1c47c8076 100644 --- a/doc/src/temper.txt +++ b/doc/src/temper.txt @@ -32,7 +32,7 @@ replicas (ensembles) of a system. Two or more replicas must be used. Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the -partition command-line -switch; see "Section 2.7"_Section_start.html#start_7 of the +switch; see "Section 2.6"_Section_start.html#start_6 of the manual. Note that if you have MPI installed, you can run a multi-replica simulation with more replicas (partitions) than you have physical processors, e.g you can run a 10-replica simulation on one or @@ -70,7 +70,7 @@ As a tempering run proceeds, multiple log files and screen output files are created, one per replica. By default these files are named log.lammps.M and screen.M where M is the replica number from 0 to N-1, with N = # of replicas. See the "section on command-line -switches"_Section_start.html#start_7 for info on how to change these +switches"_Section_start.html#start_6 for info on how to change these names. The main screen and log file (log.lammps) will list information about diff --git a/doc/src/thermo_style.txt b/doc/src/thermo_style.txt index 36ec7bf12e..6102169ee3 100644 --- a/doc/src/thermo_style.txt +++ b/doc/src/thermo_style.txt @@ -255,7 +255,7 @@ The {part} keyword is useful for multi-replica or multi-partition simulations to indicate which partition this output and this file corresponds to, or for use in a "variable"_variable.html to append to a filename for output specific to this partition. See "Section -2.7"_Section_start.html#start_7 of the manual for details on running +2.6"_Section_start.html#start_6 of the manual for details on running in multi-partition mode. The {timeremain} keyword returns the remaining seconds when a diff --git a/doc/src/timer.txt b/doc/src/timer.txt index 39a6c542b7..768c3e1353 100644 --- a/doc/src/timer.txt +++ b/doc/src/timer.txt @@ -40,7 +40,7 @@ time is spent in different sections of the code and thus can provide information for determining performance and load imbalance problems. This can be done at different levels of detail and accuracy. For more information about the timing output, see this "discussion of screen -output in Section 2.8"_Section_start.html#start_8. +output in Section 2.7"_Section_start.html#start_7. The {off} setting will turn all time measurements off. The {loop} setting will only measure the total time for a run and not collect any diff --git a/doc/src/variable.txt b/doc/src/variable.txt index e32e82ef4d..e3b7c5de0d 100644 --- a/doc/src/variable.txt +++ b/doc/src/variable.txt @@ -178,7 +178,7 @@ This means variables can NOT be re-defined in an input script (with two exceptions, read further). This is to allow an input script to be processed multiple times without resetting the variables; see the "jump"_jump.html or "include"_include.html commands. It also means -that using the "command-line switch"_Section_start.html#start_7 -var +that using the "command-line switch"_Section_start.html#start_6 -var will override a corresponding index variable setting in the input script. @@ -248,7 +248,7 @@ variable. {Index} style variables with a single string value can also be set by using the command-line switch -var; see "this -section"_Section_start.html#start_7 for details. +section"_Section_start.html#start_6 for details. The {loop} style is identical to the {index} style except that the strings are the integers from 1 to N inclusive, if only one argument N @@ -264,7 +264,7 @@ N1 <= N2 and N2 >= 0 is required. For the {world} style, one or more strings are specified. There must be one string for each processor partition or "world". See "this -section"_Section_start.html#start_7 of the manual for information on +section"_Section_start.html#start_6 of the manual for information on running LAMMPS with multiple partitions via the "-partition" command-line switch. This variable command assigns one string to each world. All processors in the world are assigned the same string. The @@ -277,7 +277,7 @@ different partitions. For the {universe} style, one or more strings are specified. There must be at least as many strings as there are processor partitions or -"worlds". See "this page"_Section_start.html#start_7 for information +"worlds". See "this page"_Section_start.html#start_6 for information on running LAMMPS with multiple partitions via the "-partition" command-line switch. This variable command initially assigns one string to each world. When a "next"_next.html command is encountered diff --git a/doc/src/write_data.txt b/doc/src/write_data.txt index 033199e98b..39e5a7f811 100644 --- a/doc/src/write_data.txt +++ b/doc/src/write_data.txt @@ -59,7 +59,7 @@ If you want to do more exact restarts, using binary files, see the "restart"_restart.html, "write_restart"_write_restart.html, and "read_restart"_read_restart.html commands. You can also convert binary restart files to text data files, after a simulation has run, -using the "-r command-line switch"_Section_start.html#start_7. +using the "-r command-line switch"_Section_start.html#start_6. NOTE: Only limited information about a simulation is stored in a data file. For example, no information about atom "groups"_group.html and diff --git a/doc/src/write_restart.txt b/doc/src/write_restart.txt index 8160eec3df..ff3b652dba 100644 --- a/doc/src/write_restart.txt +++ b/doc/src/write_restart.txt @@ -66,7 +66,7 @@ Restart files can be read by a "read_restart"_read_restart.html command to restart a simulation from a particular state. Because the file is binary (to enable exact restarts), it may not be readable on another machine. In this case, you can use the "-r command-line -switch"_Section_start.html#start_7 to convert a restart file to a data +switch"_Section_start.html#start_6 to convert a restart file to a data file. NOTE: Although the purpose of restart files is to enable restarting a diff --git a/src/Make.py b/src/Make.py deleted file mode 100755 index 3030183e1a..0000000000 --- a/src/Make.py +++ /dev/null @@ -1,2378 +0,0 @@ -#!/usr/bin/env python2 - -# Make.py tool for managing packages and their auxiliary libs, -# auto-editing machine Makefiles, and building LAMMPS -# Syntax: Make.py -h (for help) -# Notes: should be compatible with python 2.7 and 3.x thanks to 'futurize' - -from __future__ import print_function -import sys,os,re,copy,subprocess,platform - -# switch abbrevs -# switch classes = created class for each switch -# lib classes = auxiliary package libs -# build classes = build options with defaults -# make classes = makefile options with no defaults -# setargs = makefile settings -# actionargs = allowed actions (also lib-dir and machine) -# lib build flags are set if lib is built, for use with zoutput - -abbrevs = "adhjmoprsvz" - -switchclasses = ("actions","dir","help","jmake","makefile", - "output","packages","redo","settings","verbose","zoutput") -libclasses = ("atc","awpmd","colvars","cuda","gpu","h5md", - "meam","poems","python","qmmm","reax","voronoi") -buildclasses = ("intel","kokkos") -makeclasses = ("cc","flags","mpi","fft","jpg","png") - -setargs = ("gzip","#gzip","ffmpeg","#ffmpeg","smallbig","bigbig", - "smallsmall","exceptions","#exceptions") -actionargs = ("lib-all","file","clean","exe") - -gpubuildflag = 0 - -# ---------------------------------------------------------------- -# functions -# ---------------------------------------------------------------- - -# if flag = 1, print txt and exit -# if flag = 0, print txt as warning and do not exit - -def error(txt,flag=1): - if flag: - print("ERROR:",txt) - sys.exit() - else: - print("WARNING:",txt) - -# store command-line args as sw = dict of key/value -# key = switch word, value = list of following args -# order = list of switches in order specified -# enforce no switch more than once - -def parse_args(args): - narg = len(args) - sw = {} - order = [] - iarg = 0 - while iarg < narg: - if args[iarg][0] != '-': error("Arg %s is not a switch" % args[iarg]) - switch = args[iarg][1:] - if switch in sw: error("Duplicate switch %s" % args[iarg]) - order.append(switch) - first = iarg+1 - last = first - while last < narg and args[last][0] != '-': last += 1 - sw[switch] = args[first:last] - iarg = last - return sw,order - -# convert info in switches dict back to a string, in switch_order - -def switch2str(switches,switch_order): - txt = "" - for switch in switch_order: - if txt: txt += ' ' - txt += "-%s" % switch - txt += ' ' + ' '.join(switches[switch]) - return txt - -# check if compiler works with ccflags on dummy one-line tmpauto.cpp file -# return 1 if successful, else 0 -# warn = 1 = print warning if not successful, warn = 0 = no warning -# NOTE: unrecognized -override-limits can leave verride-limits file - -def compile_check(compiler,ccflags,warn): - open("tmpauto.cpp",'w').write("int main(int, char **) {}\n") - tmp = "%s %s -c tmpauto.cpp" % (compiler,ccflags) - try: txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT, - shell=True).decode() - except subprocess.CalledProcessError as e: txt = e.output - flag = 1 - if txt or not os.path.isfile("tmpauto.o"): - flag = 0 - if warn: - print(tmp) - if txt: print(txt) - else: print("compile produced no output") - os.remove("tmpauto.cpp") - if os.path.isfile("tmpauto.o"): os.remove("tmpauto.o") - return flag - -# check if linker works with linkflags and libs on tmpauto.o file -# return 1 if successful, else 0 -# warn = 1 = print warning if not successful, warn = 0 = no warning - -def link_check(linker,linkflags,libs,warn): - open("tmpauto.cpp",'w').write("int main(int, char **) {}\n") - tmp = "%s %s -o tmpauto tmpauto.cpp %s" % (linker,linkflags,libs) - try: txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT, - shell=True).decode() - except subprocess.CalledProcessError as e: txt = e.output - flag = 1 - if txt or not os.path.isfile("tmpauto"): - flag = 0 - if warn: - print(tmp) - if txt: print(txt) - else: print("link produced no output") - os.remove("tmpauto.cpp") - if os.path.isfile("tmpauto"): os.remove("tmpauto") - return flag - -# ---------------------------------------------------------------- -# switch classes, one per single-letter switch -# ---------------------------------------------------------------- - -# actions - -class Actions(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --a action1 action2 ... - possible actions = lib-all, lib-dir, file, clean, exe or machine - machine is a Makefile.machine suffix - actions can be specified in any order - each action can appear only once - lib-dir can appear multiple times for different dirs - some actions depend on installed packages - installed packages = currently installed + result of -p switch - actions are invoked in this order, independent of specified order - (1) lib-all or lib-dir = build auxiliary libraries - lib-all builds all auxiliary libs needed by installed packages - lib-dir builds a specific lib whether package installed or not - dir is any dir in lib directory (atc, cuda, meam, etc) except linalg - (2) file = create a new src/MAKE/MINE/Makefile.auto - if file not specified, existing Makefile.auto is NOT changed - except by -m switch, which will copy Makefile.machine to Makefile.auto - note that exe action can add an -m switch, as described below - if file is specified, new Makefile.auto is created - if "-m machine" specified (or added by exe), - start with existing Makefile.machine, else existing Makefile.auto - if "-m none" specified, start Makefile.auto from scratch - must use -cc and -mpi switches to specify compiler and MPI - settings for these switches will alter Makefile.auto - -s, -intel, -kokkos, -cc, -mpi, -fft, -jpg, -png - if these accelerator packages are installed, they induce settings - that will alter Makefile.auto: opt, user-omp, user-intel, kokkos - use -z switch to copy final Makefile.auto to new filename - (3) clean = invoke "make clean-auto" to insure clean build on current files - useful if compiler flags have changed - (4) exe or machine = build LAMMPS - machine can be any existing Makefile.machine suffix - machine is converted to "exe" action, and additionally: - "-m machine" is added if -m switch is not specified - "-o machine" is added if -o switch is not specified - if either "-m" or "-o" are specified, they are not overridden - does not invoke any lib builds, since libs could be previously built - exe ALWAYS builds using src/MAKE/MINE/Makefile.auto - if file action also specified, it creates a new Makefile.auto - else if -m switch specified, - existing Makefile.machine is copied to create Makefile.auto - else Makefile.auto must already exist and is not changed - build produces src/lmp_auto, or error message if unsuccessful - use -o switch to copy src/lmp_auto to new filename - use -z switch to copy src/MAKE/MINE/Makefile.auto to new filename -""" - - def check(self): - if not self.inlist: error("-a args are invalid") - libs = [] - cleans = [] - files = [] - exes = [] - for one in self.inlist: - if one.startswith("lib-"): - lib = one[4:] - if lib != "all" and lib not in libclasses: error("Actions are invalid") - libs.append(one) - elif one == "file": - files.append(one) - elif one == "clean": - cleans.append(one) - elif one == "exe": - exes.append(one) - # one action can be unknown, must be a machine (checked in setup) - else: - exes.append(one) - if len(set(libs)) != len(libs) or \ - len(cleans) > 1 or len(files) > 1 or len(exes) > 1: - error("Actions are invalid") - self.alist = [action for actions in [libs,cleans,files,exes] \ - for action in actions] - - # dedup list of actions concatenated from two lists - # current self.inlist = specified -a switch + redo command -a switch - # specified exe/machine action replaces redo exe/machine action - # operates on and replaces self.inlist - - def dedup(self): - alist = [] - exemachine = 0 - for one in self.inlist: - if one == "exe" or (one not in actionargs and not one.startswith("lib-")): - if exemachine: continue - exemachine = 1 - if one not in alist: alist.append(one) - self.inlist = alist - - # if last action is unknown, assume machine and convert to exe - # only done if action is a suffix for an existing Makefile.machine - # return machine if conversion done, else None - - def setup(self): - machine = self.alist[-1] - if machine in actionargs or machine.startswith("lib-"): return None - make = MakeReader(machine,2) - self.alist[-1] = "exe" - return machine - - # build one or more auxiliary package libraries - - def lib(self,suffix): - if suffix != "all": - print("building",suffix,"library ...") - txt = "%s.build()" % suffix - exec(txt) - else: - final = packages.final - for one in packages.lib: - if final[one]: - if "user" in one: pkg = one[5:] - else: pkg = one - print("building",pkg,"library ...") - txt = "%s.build()" % pkg - exec(txt) - - # read Makefile.machine - # if caller = "file", edit via switches - # if caller = "exe", just read - # write out new Makefile.auto - - def file(self,caller): - - # if caller="file", create from mpi or read from Makefile.machine or auto - # if caller="exe" and "file" action already invoked, read from auto - # if caller="exe" and no "file" action, read from Makefile.machine or auto - - if caller == "file": - if makefile and makefile.machine == "none": - if cc and mpi: machine = "mpi" - else: error("Cannot create makefile unless -cc and -mpi are used") - elif makefile: machine = makefile.machine - else: machine = "auto" - elif caller == "exe" and "file" in self.alist: - machine = "auto" - elif caller == "exe" and "file" not in self.alist: - if makefile and makefile.machine == "none": - error("Cannot build with makefile = none") - elif makefile: machine = makefile.machine - else: machine = "auto" - - make = MakeReader(machine,1) - - # change makefile settings to user specifications - - precompiler = "" - if caller == "file": - - # add compiler/linker and default CCFLAGS,LINKFLAGS - # if cc.wrap, add wrapper setting for mpi = ompi/mpich - # precompiler = env variable setting for OpenMPI wrapper compiler - - if cc: - make.setvar("CC",cc.compiler) - make.setvar("LINK",cc.compiler) - if cc.wrap: - if cc.wrap == "nvcc": - wrapper = os.path.abspath("../lib/kokkos/config/nvcc_wrapper") - else: wrapper = cc.wrap - abbrev = cc.abbrev - if abbrev == "mpi": - if cc.parent == "mpich": - make.addvar("CC","-cxx=%s" % wrapper) - make.addvar("LINK","-cxx=%s" % wrapper) - elif cc.parent == "openmpi": - make.addvar("export OMPI_CXX",wrapper,"cc") - precompiler = "env OMPI_CXX=%s " % wrapper - else: error("Could not add MPI wrapper compiler, " + - "did not recognize OpenMPI or MPICH") - make.setvar("CCFLAGS","-g") - make.addvar("CCFLAGS","-O3") - make.setvar("LINKFLAGS","-g") - make.addvar("LINKFLAGS","-O") - - # add MPI settings - - if mpi: - make.delvar("MPI_INC","*") - make.delvar("MPI_PATH","*") - make.delvar("MPI_LIB","*") - if mpi.style == "mpi": - make.addvar("MPI_INC","-DMPICH_SKIP_MPICXX") - make.addvar("MPI_INC","-DOMPI_SKIP_MPICXX=1") - elif mpi.style == "mpich": - make.addvar("MPI_INC","-DMPICH_SKIP_MPICXX") - make.addvar("MPI_INC","-DOMPI_SKIP_MPICXX=1") - if mpi.dir: make.addvar("MPI_INC","-I%s/include" % mpi.dir) - if mpi.dir: make.addvar("MPI_PATH","-L%s/lib" % mpi.dir) - make.addvar("MPI_LIB","-lmpich") - make.addvar("MPI_LIB","-lmpl") - make.addvar("MPI_LIB","-lpthread") - elif mpi.style == "ompi": - make.addvar("MPI_INC","-DMPICH_SKIP_MPICXX") - make.addvar("MPI_INC","-DOMPI_SKIP_MPICXX=1") - if mpi.dir: make.addvar("MPI_INC","-I%s/include" % mpi.dir) - if mpi.dir: make.addvar("MPI_PATH","-L%s/lib" % mpi.dir) - make.addvar("MPI_LIB","-lmpi") - make.addvar("MPI_LIB","-lmpi_cxx") - elif mpi.style == "serial": - make.addvar("MPI_INC","-I../STUBS") - make.addvar("MPI_PATH","-L../STUBS") - make.addvar("MPI_LIB","-lmpi_stubs") - - # add accelerator package CCFLAGS and LINKFLAGS and variables - - compiler = precompiler + ' '.join(make.getvar("CC")) - linker = precompiler + ' '.join(make.getvar("LINK")) - - final = packages.final - if final["opt"]: - if compile_check(compiler,"-restrict",0): - make.addvar("CCFLAGS","-restrict") - - if final["user-omp"]: - if compile_check(compiler,"-fopenmp",1): - make.addvar("CCFLAGS","-fopenmp") - make.addvar("LINKFLAGS","-fopenmp") - if compile_check(compiler,"-restrict",0): - make.addvar("CCFLAGS","-restrict") - - if final["user-intel"]: - if intel.mode == "cpu": - make.delvar("CCFLAGS","-O*") - make.addvar("CCFLAGS","-O2") - if compile_check(compiler,"-openmp",1): - make.addvar("CCFLAGS","-openmp") - if compile_check(compiler,"-restrict",1): - make.addvar("CCFLAGS","-restrict") - if compile_check(compiler,"-no-offload",1): - make.addvar("CCFLAGS","-no-offload") - if compile_check(compiler,"-fno-alias",1): - make.addvar("CCFLAGS","-fno-alias") - if compile_check(compiler,"-ansi-alias",1): - make.addvar("CCFLAGS","-ansi-alias") - if compile_check(compiler,"-xAVX",1): - make.addvar("CCFLAGS","-xAVX") - if compile_check(compiler,"-fp-model fast=2",1): - make.addvar("CCFLAGS","-fp-model fast=2") - if compile_check(compiler,"-no-prec-div",1): - make.addvar("CCFLAGS","-no-prec-div") - if compile_check(compiler,"-override-limits",1): - make.addvar("CCFLAGS","-override-limits") - make.addvar("CCFLAGS","-DLAMMPS_MEMALIGN=64") - make.delvar("CCFLAGS","-DLMP_INTEL_OFFLOAD") - - make.delvar("LINKFLAGS","-O*") - make.addvar("LINKFLAGS","-O2") - if link_check(linker,"-openmp","",1): - make.addvar("LINKFLAGS","-openmp") - if link_check(linker,"-xAVX","",1): - make.addvar("LINKFLAGS","-xAVX") - if link_check(linker,"-fpmodel fast=2","",1): - make.addvar("LINKFLAGS","-fpmodel fast=2") - if link_check(linker,"-no-prec-div","",1): - make.addvar("LINKFLAGS","-no-prec-div") - if link_check(linker,"-override-limits","",1): - make.addvar("LINKFLAGS","-override-limits") - make.delvar("LINKFLAGS","-offload") - - if link_check(linker,"","-ltbbmalloc",1): - make.addvar("LIB","-ltbbmalloc") - if link_check(linker,"","-ltbbmalloc_proxy",1): - make.addvar("LIB","-ltbbmalloc_proxy") - - elif intel.mode == "phi": - if compile_check(compiler,"-fopenmp",1): - make.addvar("CCFLAGS","-fopenmp") - make.addvar("LINKFLAGS","-fopenmp") - make.addvar("CCFLAGS","-DLAMMPS_MEMALIGN=64") - if compile_check(compiler,"-restrict",1): - make.addvar("CCFLAGS","-restrict") - if compile_check(compiler,"-xHost",1): - make.addvar("CCFLAGS","-xHost") - make.addvar("CCFLAGS","-DLMP_INTEL_OFFLOAD") - if compile_check(compiler,"-fno-alias",1): - make.addvar("CCFLAGS","-fno-alias") - if compile_check(compiler,"-ansi-alias",1): - make.addvar("CCFLAGS","-ansi-alias") - if compile_check(compiler,"-override-limits",1): - make.addvar("CCFLAGS","-override-limits") - if compile_check(compiler,'-offload-option,mic,compiler,' + - '"-fp-model fast=2 -mGLOB_default_function_attrs=' + - '\\"gather_scatter_loop_unroll=4\\""',1): - make.addvar("CCFLAGS",'-offload-option,mic,compiler,' + - '"-fp-model fast=2 -mGLOB_default_function_attrs=' + - '\\"gather_scatter_loop_unroll=4\\""') - if link_check(linker,"-offload","",1): - make.addvar("LINKFLAGS","-offload") - - if final["kokkos"]: - if kokkos.mode == "omp": - make.delvar("KOKKOS_DEVICES","*") - make.delvar("KOKKOS_ARCH","*") - make.addvar("KOKKOS_DEVICES","OpenMP","lmp") - if kokkos.archcpu: - make.addvar("KOKKOS_ARCH",kokkos.archcpu,"lmp") - elif kokkos.mode == "cuda": - make.delvar("KOKKOS_DEVICES","*") - make.delvar("KOKKOS_ARCH","*") - make.addvar("KOKKOS_DEVICES","Cuda, OpenMP","lmp") - if kokkos.archgpu: - if kokkos.archgpu[0] == "3": value = "Kepler" + kokkos.archgpu - elif kokkos.archgpu[0] == "2": value = "Fermi" + kokkos.archgpu - else: error("Unrecognized Kokkos archgpu setting") - if kokkos.archcpu: value += ", %s" % kokkos.archcpu - make.addvar("KOKKOS_ARCH",value,"lmp") - elif kokkos.mode == "phi": - make.delvar("KOKKOS_DEVICES","*") - make.delvar("KOKKOS_ARCH","*") - make.addvar("KOKKOS_DEVICES","OpenMP","lmp") - make.addvar("KOKKOS_ARCH","KNC","lmp") - - # add LMP_INC ifdef settings - - if settings: - list = settings.inlist - for one in list: - if one == "gzip": make.addvar("LMP_INC","-DLAMMPS_GZIP") - elif one == "#gzip": make.delvar("LMP_INC","-DLAMMPS_GZIP") - elif one == "ffmpeg": make.addvar("LMP_INC","-DLAMMPS_FFMPEG") - elif one == "#ffmpeg": make.delvar("LMP_INC","-DLAMMPS_FFMPEG") - elif one == "smallbig": - make.delvar("LMP_INC","-DLAMMPS_BIGBIG") - make.delvar("LMP_INC","-DLAMMPS_SMALLSMALL") - elif one == "bigbig": - make.delvar("LMP_INC","-DLAMMPS_SMALLBIG") - make.delvar("LMP_INC","-DLAMMPS_SMALLSMALL") - make.addvar("LMP_INC","-DLAMMPS_BIGBIG") - elif one == "smallsmall": - make.delvar("LMP_INC","-DLAMMPS_SMALLBIG") - make.delvar("LMP_INC","-DLAMMPS_BIGBIG") - make.addvar("LMP_INC","-DLAMMPS_SMALLSMALL") - elif one == "exceptions": make.addvar("LMP_INC","-DLAMMPS_EXCEPTIONS") - elif one == "#exception": make.delvar("LMP_INC","-DLAMMPS_EXCEPTIONS") - - # add FFT, JPG, PNG settings - - if fft: - make.delvar("FFT_INC","*") - make.delvar("FFT_PATH","*") - make.delvar("FFT_LIB","*") - if fft.mode == "none": make.addvar("FFT_INC","-DFFT_NONE") - else: - make.addvar("FFT_INC","-DFFT_%s" % fft.mode.upper()) - make.addvar("FFT_LIB",fft.lib) - if fft.dir: - make.addvar("FFT_INC","-I%s/include" % fft.dir) - make.addvar("FFT_PATH","-L%s/lib" % fft.dir) - else: - if fft.incdir: make.addvar("FFT_INC","-I%s" % fft.incdir) - if fft.libdir: make.addvar("FFT_PATH","-L%s" % fft.libdir) - - if jpg: - if jpg.on == 0: - make.delvar("LMP_INC","-DLAMMPS_JPEG") - make.delvar("JPG_LIB","-ljpeg") - else: - make.addvar("LMP_INC","-DLAMMPS_JPEG") - make.addvar("JPG_LIB","-ljpeg") - if jpg.dir: - make.addvar("JPG_INC","-I%s/include" % jpg.dir) - make.addvar("JPG_PATH","-L%s/lib" % jpg.dir) - else: - if jpg.incdir: make.addvar("JPG_INC","-I%s" % jpg.incdir) - if jpg.libdir: make.addvar("JPG_PATH","-L%s" % jpg.libdir) - - if png: - if png.on == 0: - make.delvar("LMP_INC","-DLAMMPS_PNG") - make.delvar("JPG_LIB","-lpng") - else: - make.addvar("LMP_INC","-DLAMMPS_PNG") - make.addvar("JPG_LIB","-lpng") - if png.dir: - make.addvar("JPG_INC","-I%s/include" % png.dir) - make.addvar("JPG_PATH","-L%s/lib" % png.dir) - else: - if png.incdir: make.addvar("JPG_INC","-I%s" % png.incdir) - if png.libdir: make.addvar("JPG_PATH","-L%s" % png.libdir) - - # finally after all other settings, add explicit flags - - if flags: - for var,action,flist in flags.flags: - values = make.getvar(var) - if values == None: - error("Flags for a non-existent Makefile.auto variable") - for flag in flist: - flag = "-" + flag - if action == "add": make.addvar(var,flag) - elif action == "del": make.delvar(var,flag) - - # set self.stubs if Makefile.auto uses STUBS lib in MPI settings - - if make.getvar("MPI_LIB") and "-lmpi_stubs" in make.getvar("MPI_LIB"): - self.stubs = 1 - else: self.stubs = 0 - - # write out Makefile.auto - # unless caller = "exe" and "file" action already invoked - - if caller == "file" or "file" not in self.alist: - # make certain that 'MAKE/MINE' folder exists. - subprocess.check_output("mkdir -p %s/MAKE/MINE" % dir.src, - stderr=subprocess.STDOUT,shell=True) - make.write("%s/MAKE/MINE/Makefile.auto" % dir.src,1) - print("Created src/MAKE/MINE/Makefile.auto") - - # test full compile and link - # unless caller = "file" and "exe" action will be invoked later - - if caller == "file" and "exe" in self.alist: return - compiler = precompiler + ' '.join(make.getvar("CC")) - ccflags = ' '.join(make.getvar("CCFLAGS")) - linker = precompiler + ' '.join(make.getvar("LINK")) - linkflags = ' '.join(make.getvar("LINKFLAGS")) - libs = ' '.join(make.getvar("LIB")) - if not compile_check(compiler,ccflags,1): - error("Test of compilation failed") - if not link_check(linker,linkflags,libs,1): error("Test of link failed") - - # invoke "make clean-auto" to force clean before build - - def clean(self): - txt = "cd %s; make clean-auto" % dir.src - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Performed make clean-auto") - - # build LAMMPS using Makefile.auto and -j setting - # invoke self.file() first, to test makefile compile/link - # delete existing lmp_auto, so can detect if build fails - # build STUBS lib (if unbuilt) if Makefile.auto MPI settings need it - - def exe(self): - self.file("exe") - subprocess.check_output("cd %s; rm -f lmp_auto" % dir.src,stderr=subprocess.STDOUT,shell=True) - if self.stubs and not os.path.isfile("%s/STUBS/libmpi_stubs.a" % dir.src): - print("building serial STUBS library ...") - tmp = "cd %s/STUBS; make clean; make" % dir.src - txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True).decode() - if not os.path.isfile("%s/STUBS/libmpi_stubs.a" % dir.src): - print(txt) - error('Unsuccessful "make stubs"') - print("Created src/STUBS/libmpi_stubs.a") - - # special hack for shannon GPU cluster - # must use "srun make" if on it and building w/ GPU package, else just make - # this is b/c Cuda libs are not all available on host - - make = "make" - if "shannon" == platform.node() and packages.final["gpu"]: - make = "srun make" - - if jmake: tmp = "cd %s; %s -j %d auto" % (dir.src,make,jmake.n) - else: tmp = "cd %s; %s auto" % (dir.src,make) - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(tmp,shell=True) - else: - print(tmp) - try: subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/lmp_auto" % dir.src): - error('Unsuccessful "make auto"') - elif not output: print("Created src/lmp_auto") - -# dir switch - -class Dir(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --d dir - dir = LAMMPS home dir - if -d not specified, working dir must be lammps/src -""" - - def check(self): - if self.inlist != None and len(self.inlist) != 1: - error("-d args are invalid") - - # if inlist = None, check that cwd = lammps/src - # store cwd and lammps dir - # derive src,make,lib dirs from lammps dir - # check that they all exist - - def setup(self): - self.cwd = os.getcwd() - if self.inlist == None: self.lammps = ".." - else: self.lammps = self.inlist[0] - self.lammps = os.path.realpath(self.lammps) - self.src = self.lammps + "/src" - self.make = self.lammps + "/src/MAKE" - self.lib = self.lammps + "/lib" - if not os.path.isdir(self.lammps): error("LAMMPS home dir is invalid") - if not os.path.isdir(self.src): error("LAMMPS src dir is invalid") - if not os.path.isdir(self.lib): error("LAMMPS lib dir is invalid") - -# help switch - -class Help(object): - def __init__(self,list): pass - - def help(self): - return """ -Syntax: Make.py switch args ... - switches can be listed in any order - help switch: - -h prints help and syntax for all other specified switches - switch for actions: - -a lib-all, lib-dir, clean, file, exe or machine - list one or more actions, in any order - machine is a Makefile.machine suffix - one-letter switches: - -d (dir), -j (jmake), -m (makefile), -o (output), -p (packages), - -r (redo), -s (settings), -v (verbose), -z (makefile output) - switches for libs: - -atc, -awpmd, -colvars, -cuda, -gpu, -h5md, - -meam, -poems, -python, -qmmm, -reax, -voronoi - switches for build and makefile options: - -intel, -kokkos, -cc, -flags, -mpi, -fft, -jpg, -png -""" - -# jmake switch - -class Jmake(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --j N - use N procs for performing parallel make commands - used when building a lib or LAMMPS itself - if -j not specified, serial make commands run on single core -""" - - def check(self): - if len(self.inlist) != 1: error("-j args are invalid") - if not self.inlist[0].isdigit(): error("-j args are invalid") - n = int(self.inlist[0]) - if n <= 0: error("-j args are invalid") - self.n = n - -# makefile switch - -class Makefile(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --m machine - use Makefile.machine under src/MAKE as starting point to create Makefile.auto - if machine = "none", file action will create Makefile.auto from scratch - must use -cc and -mpi switches to specify compiler and MPI - if -m not specified, file/exe actions alter existing Makefile.auto -""" - - def check(self): - if len(self.inlist) != 1: error("-m args are invalid") - self.machine = self.inlist[0] - -# output switch - -class Output(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --o machine - copy final src/lmp_auto to lmp_machine in working dir - if -o not specified, exe action only produces src/lmp_auto -""" - - def check(self): - if len(self.inlist) != 1: error("-o args are invalid") - self.machine = self.inlist[0] - -# packages switch - -class Packages(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --p = package1 package2 ... - list of packages to install or uninstall in order specified - operates on set of packages currently installed - valid package names: - any LAMMPS standard or user package (type "make package" to see list) - prefix by yes/no to install/uninstall (see abbrevs) - yes-molecule, yes-user-atc, no-molecule, no-user-atc - can use LAMMPS categories (type "make package" to see list) - all = all standard and user packages (also none = no-all) - std (or standard) = all standard packages - user = all user packages - lib = all standard and user packages with auxiliary libs - can abbreviate package names and yes/no - omp = user-omp = yes-user-omp - ^omp = ^user-omp = no-user-omp - user = yes-user, ^user = no-user - all = yes-all, ^all = none = no-all - when action performed, list is processed in order, - as if typed "make yes/no" for each - if "orig" or "original" is last package in list, - set of installed packages will be restored to original (current) list - after "build" action is performed - if -p not specified, currently installed packages are not changed -""" - - def check(self): - if self.inlist != None and not self.inlist: error("-p args are invalid") - - def setup(self): - - # extract package lists from src/Makefile - # remove names from lib that there are not Make.py lib-classes for - # most don't actually have libs, so nothing to control from Make.py - - make = MakeReader("%s/Makefile" % dir.src) - std = make.getvar("PACKAGE") - user = make.getvar("PACKUSER") - lib = make.getvar("PACKLIB") - lib.remove("kim") - lib.remove("kokkos") - lib.remove("user-molfile") - lib.remove("python") - lib.remove("user-quip") - all = std + user - - # plist = command line args expanded to yes-package or no-package - - plist = [] - if self.inlist: - for one in self.inlist: - if one in std: - plist.append("yes-%s" % one) - elif one in user: - plist.append("yes-%s" % one) - elif "user-"+one in user: - plist.append("yes-user-%s" % one) - elif one == "std" or one == "standard" or one == "user" or \ - one == "lib" or one == "all": plist.append("yes-%s" % one) - elif one.startswith("yes-"): - if one[4:] in std: plist.append("yes-%s" % one[4:]) - elif one[4:] in user: plist.append("yes-%s" % one[4:]) - elif "user-"+one[4:] in user: plist.append("yes-user-%s" % one[4:]) - elif one == "yes-std" or one == "yes-standard" or \ - one == "yes-user" or one == "yes-lib" or one == "yes-all": - plist.append("yes-%s" % one[4:]) - else: error("Invalid package name %s" % one) - elif one.startswith("no-"): - if one[3:] in std: plist.append("no-%s" % one[3:]) - elif one[3:] in user: plist.append("no-%s" % one[3:]) - elif "user-"+one[3:] in user: plist.append("no-user-%s" % one[3:]) - elif one == "no-std" or one == "no-standard" or one == "no-user" or \ - one == "no-lib" or one == "no-all": - plist.append("no-%s" % one[3:]) - else: error("Invalid package name %s" % one) - elif one.startswith('^'): - if one[1:] in std: plist.append("no-%s" % one[1:]) - elif one[1:] in user: plist.append("no-%s" % one[1:]) - elif "user-"+one[1:] in user: plist.append("no-user-%s" % one[1:]) - elif one == "^std" or one == "^standard" or one == "^user" or \ - one == "^lib" or one == "^all": plist.append("no-%s" % one[1:]) - else: error("Invalid package name %s" % one) - elif one == "none": plist.append("no-all") - elif one == "orig": plist.append(one) - else: error("Invalid package name %s" % one) - if "orig" in plist and plist.index("orig") != len(plist)-1: - error('-p orig arg must be last') - if plist.count("orig") > 1: error('-p orig arg must be last') - - # original = dict of all packages - # key = package name, value = 1 if currently installed, else 0 - - original = {} - tmp = "cd %s; make ps" % dir.src - output = subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True).decode().split('\n') - pattern = "Installed\s+(\w+): package (\S+)" - for line in output: - m = re.search(pattern,line) - if not m: continue - pkg = m.group(2).lower() - if pkg not in all: error('Package list does not match "make ps" results') - if m.group(1) == "NO": original[pkg] = 0 - elif m.group(1) == "YES": original[pkg] = 1 - - # final = dict of all packages after plist applied to original - # key = package name, value = 1 if installed, else 0 - - final = copy.deepcopy(original) - for i,one in enumerate(plist): - if "yes" in one: - pkg = one[4:] - yes = 1 - else: - pkg = one[3:] - yes = 0 - if pkg in all: - final[pkg] = yes - elif pkg == "std" or pkg == "standard": - for pkg in std: final[pkg] = yes - elif pkg == "user": - for pkg in user: final[pkg] = yes - elif pkg == "lib": - for pkg in lib: final[pkg] = yes - elif pkg == "all": - for pkg in all: final[pkg] = yes - - self.std = std - self.user = user - self.lib = lib - self.all = all - self.plist = plist - self.original = original - self.final = final - - # install packages in plist - - def install(self): - if self.plist: print("Installing packages ...") - for one in self.plist: - if one == "orig": continue - subprocess.check_output("cd %s; make %s" % (dir.src,one), - stderr=subprocess.STDOUT,shell=True) - if self.plist and verbose: - txt = subprocess.check_output("cd %s; make ps" % dir.src, - stderr=subprocess.STDOUT, - shell=True).decode() - print("Package status after installation:") - print(txt) - - # restore packages to original list if requested - # order of re-install should not matter matter b/c of Depend.sh - - def uninstall(self): - if not self.plist or self.plist[-1] != "orig": return - print("Restoring packages to original state ...") - subprocess.check_output("cd %s; make no-all" % dir.src, - stderr=subprocess.STDOUT,shell=True) - for one in self.all: - if self.original[one]: - subprocess.check_output("cd %s; make yes-%s" % (dir.src,one), - stderr=subprocess.STDOUT,shell=True) - if verbose: - txt = subprocess.check_output("cd %s; make ps" % dir.src, - stderr=subprocess.STDOUT, - shell=True).decode() - print("Restored package status:") - print(txt) - -# redo switch - -class Redo(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --r file label1 label2 ... - all args are optional - invoke Make.py commands from a file - other specified switches are merged with file commands (see below) - redo file format: - blank lines and lines starting with "#" are skipped - other lines are treated as commands - each command is a list of Make.py args, as if typed at command-line - commands can have leading label, followed by ":" - commands cannot contain a "-r" switch - if no args, execute previous command, which is stored in src/Make.py.last - if one arg, execute all commands from specified file - unlabeled or labeled commands are all executed - if multiple args, execute only matching labeled commands from file - if other switches are specified, - if file command does not have the switch, it is added - if file command has the switch, the specified switch replaces it - except if -a (action) switch is both specified and in the file command, - two sets of actions are merged and duplicates removed - if both switches have "exe or machine" action, - the specified exe/machine overrides the file exe/machine -""" - - def check(self): - if len(self.inlist) == 0: - self.dir = 1 - self.file = "Make.py.last" - self.labels = [] - else: - self.dir = 0 - self.file = self.inlist[0] - self.labels = self.inlist[1:] - - # read redo file - # self.commands = list of commands to execute - - def setup(self): - file = self.file - if not os.path.isfile(file): error("Redo file %s does not exist" % file) - lines = open(file,'r').readlines() - - cmdlines = [] - for line in lines: - line = line.strip() - if not line or line[0] == '#' : continue - cmdlines.append(line) - - # if no labels, add all file commands to command list - # if labels, make a dict with key = label, value = command - # and discard unlabeled commands - - dict = {} - commands = [] - for line in cmdlines: - words = line.split() - if "-r" in words: error("Redo command cannot contain -r switch") - if words[0][-1] == ':': label = words[0][:-1] - else: label = None - if not self.labels: - if label: subprocess.append(' '.join(words[1:])) - else: subprocess.append(line) - else: - if not label: continue - dict[label] = ' '.join(words[1:]) - - # extract labeled commands from dict and add to command list - - for label in self.labels: - if label not in dict: error("Redo label not in redo file") - subprocess.append(dict[label]) - - self.commands = commands - -# settings switch - -class Settings(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --s set1 set2 ... - possible settings = gzip #gzip ffmpeg #ffmpeg - smallbig bigbig smallsmall exceptions #exceptions - alter LAMMPS ifdef settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - gzip and #gzip turn on/off LAMMPS_GZIP setting - ffmpeg and #ffmpeg turn on/off LAMMPS_FFMPEG setting - smallbig, bigbig, smallsmall turn on LAMMPS_SMALLBIG, etc - and turn off other two - exceptions and #exceptions turn on/off LAMMPS_EXCEPTIONS setting -""" - - def check(self): - if not self.inlist: error("-s args are invalid") - for one in self.inlist: - if one not in setargs: error("-s args are invalid") - -# verbose switch - -class Verbose(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --v (no arguments) - produce verbose output as Make.py executes - if -v not specified, minimal output is produced -""" - - def check(self): - if len(self.inlist): error("-v args are invalid") - -# zoutput switch for making copy of final Makefile.auto - -class Zoutput(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --z machine - copy created/used src/MAKE/MINE/Makefile.auto to Makefile.machine in same dir - copy created/used lib/*/Makefile.auto and lib/*/Makefile.lammps to - Makefile_lib.machine and Makefile_lib_lammps.machine in same dir - this can be used to preserve the machine Makefile and lib Makefiles -""" - - def check(self): - if len(self.inlist) != 1: error("-z args are invalid") - self.machine = self.inlist[0] - -# ---------------------------------------------------------------- -# lib classes, one per LAMMPS auxiliary lib -# ---------------------------------------------------------------- - -# ATC lib - -class ATC(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --atc make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = g++) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-atc args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-atc args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-atc args are invalid") - - def build(self): - libdir = dir.lib + "/atc" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libatc.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/atc library") - else: print("Created lib/atc library") - -# AWPMD lib - -class AWPMD(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "mpicc" - self.lammpsflag = 0 - - def help(self): - return """ --awpmd make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = mpicc) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-awpmd args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-awpmd args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-awpmd args are invalid") - - def build(self): - libdir = dir.lib + "/awpmd" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libawpmd.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/awpmd library") - else: print("Created lib/awpmd library") - -# COLVARS lib - -class COLVARS(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --colvars make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = g++) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-colvars args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-colvars args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-colvars args are invalid") - - def build(self): - libdir = dir.lib + "/colvars" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libcolvars.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/colvars library") - else: print("Created lib/colvars library") - -# CUDA lib - -class CUDA(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.mode = "double" - self.arch = "35" - - def help(self): - return """ --cuda mode=double arch=35 - all args are optional and can be in any order - mode = double or mixed or single (def = double) - arch = M (def = 35) - M = 31,35,37,etc for Kepler - M = 20 for CC2.0 (GF100/110, e.g. C2050,GTX580,GTX470) - M = 21 for CC2.1 (GF104/114, e.g. GTX560, GTX460, GTX450) - M = 13 for CC1.3 (GF200, e.g. C1060, GTX285) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-cuda args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-cuda args are invalid") - if words[0] == "mode": self.mode = words[1] - elif words[0] == "arch": self.arch = words[1] - else: error("-cuda args are invalid") - if self.mode != "double" and self.mode != "mixed" and \ - self.mode != "single": - error("-cuda args are invalid") - if not self.arch.isdigit(): error("-cuda args are invalid") - - def build(self): - libdir = dir.lib + "/cuda" - subprocess.check_output("cd %s; make clean" % libdir, - stderr=subprocess.STDOUT,shell=True) - if self.mode == "double": n = 2 - elif self.mode == "mixed": n = 3 - elif self.mode == "single": n = 1 - if jmake: txt = "cd %s; make -j %d precision=%d arch=%s" % \ - (libdir,jmake.n,n,self.arch) - else: txt = "cd %s; make precision=%d arch=%s" % \ - (libdir,n,self.arch) - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/liblammpscuda.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/cuda library") - else: print("Created lib/cuda library") - -# GPU lib - -class GPU(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "linux.double" - self.lammpsflag = self.modeflag = self.archflag = self.homeflag = 0 - - def help(self): - return """ --gpu make=suffix lammps=suffix2 mode=double arch=N home=path - all args are optional and can be in any order - make = use Makefile.suffix (def = linux.double) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) - mode = double or mixed or single (def = CUDA_PREC in makefile) - arch = 3x (x = digit for Kepler) or 2x (x = digit for Fermi) - (def = CUDA_ARCH in makefile) - home = path to Cuda, e.g. /usr/local/cuda (def = CUDA_HOME in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-gpu args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-gpu args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - elif words[0] == "mode": - self.mode = words[1] - self.modeflag = 1 - elif words[0] == "arch": - self.arch = words[1] - self.archflag = 1 - elif words[0] == "home": - self.home = words[1] - self.homeflag = 1 - else: error("-gpu args are invalid") - if self.modeflag and (self.mode != "double" and - self.mode != "mixed" and - self.mode != "single"): - error("-gpu args are invalid") - if self.archflag and not self.arch.isdigit(): - error("-gpu args are invalid") - - def build(self): - global gpubuildflag - gpubuildflag = 1 - libdir = dir.lib + "/gpu" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.modeflag: - if self.mode == "double": - make.setvar("CUDA_PRECISION","-D_DOUBLE_DOUBLE") - elif self.mode == "mixed": - make.setvar("CUDA_PRECISION","-D_SINGLE_DOUBLE") - elif self.mode == "single": - make.setvar("CUDA_PRECISION","-D_SINGLE_SINGLE") - if self.archflag: - make.setvar("CUDA_ARCH","-arch=sm_%s" % self.arch) - if self.homeflag: - make.setvar("CUDA_HOME",self.home) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - # special hack for shannon GPU cluster - # must use "srun make" if on it, else just make - # this is b/c Cuda libs are not all available on host - - make = "make" - if "shannon" == platform.node(): make = "srun make" - - subprocess.check_output("cd %s; %s -f Makefile.auto clean" % - (libdir,make),stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; %s -j %d -f Makefile.auto" % (libdir,make,jmake.n) - else: txt = "cd %s; %s -f Makefile.auto" % (libdir,make) - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libgpu.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/gpu library") - else: print("Created lib/gpu library") - -# H5MD lib - -class H5MD(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "h5cc" - self.lammpsflag = 0 - - def help(self): - return """ --h5md make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = h5cc) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-h5md args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-h5md args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-h5md args are invalid") - - def build(self): - libdir = dir.lib + "/h5md" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make clean" % libdir, - stderr=subprocess.STDOUT,shell=True) - txt = "cd %s; make" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libch5md.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/h5md library") - else: print("Created lib/h5md library") - -# MEAM lib - -class MEAM(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "gfortran" - self.lammpsflag = 0 - - def help(self): - return """ --meam make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = gfortran) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-meam args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-meam args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-meam args are invalid") - - def build(self): - libdir = dir.lib + "/meam" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - # do not use -j for MEAM build, parallel build does not work - txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libmeam.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/meam library") - else: print("Created lib/meam library") - -# POEMS lib - -class POEMS(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --poems make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = g++) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-poems args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-poems args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-poems args are invalid") - - def build(self): - libdir = dir.lib + "/poems" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % libdir, - stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libpoems.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/poems library") - else: print("Created lib/poems library") - -# PYTHON lib - -class PYTHON(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --python lammps=suffix - arg is optional, use Makefile.lammps if not specified - lammps = use Makefile.lammps.suffix -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-python args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-python args are invalid") - if words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-python args are invalid") - - def build(self): - libdir = dir.lib + "/python" - if self.lammpsflag: - subprocess.check_output("cd %s; cp Makefile.lammps.%s Makefile.lammps" % - (libdir,self.lammps)) - if not os.path.isfile("%s/Makefile.lammps.%s" % (libdir,self.lammps)): - error("Unsuccessful creation of lib/python/Makefile.lammps.%s file" % - self.lammps) - else: print("Created lib/python/Makefile.lammps file") - -# QMMM lib - -class QMMM(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "gfortran" - self.lammpsflag = 0 - - def help(self): - return """ --qmmm make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = gfortran) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-qmmm args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-qmmm args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-qmmm args are invalid") - - def build(self): - libdir = dir.lib + "/qmmm" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libqmmm.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/qmmm library") - else: print("Created lib/qmmm library") - -# REAX lib - -class REAX(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "gfortran" - self.lammpsflag = 0 - - def help(self): - return """ --reax make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = gfortran) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-reax args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-reax args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-reax args are invalid") - - def build(self): - libdir = dir.lib + "/reax" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - cmd = "cd %s; make -f Makefile.auto clean" % libdir - subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libreax.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/reax library") - else: print("Created lib/reax library") - -# VORONOI lib - -class VORONOI(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.install = "" - - def help(self): - return """ --voronoi install="-d dir -v version -g -b -i installdir -l incdir libdir" - arg is optional, only needed if want to run install.py script - install = args to use with lib/voronoi/install.py script - must enclose in quotes since install.py args have switches - install.py can download, build, install, setup links to the Voro++ library - see lib/voronoi/README for details on Voro++ and using install.py -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-voronoi args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-voronoi args are invalid") - if words[0] == "install": self.install = words[1] - else: error("-voronoi args are invalid") - - def build(self): - if not self.install: return - libdir = dir.lib + "/voronoi" - cmd = "cd %s; python install.py %s" % (libdir,self.install) - txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT, - shell=True).decode() - if verbose: print(txt) - print("Created lib/voronoi library") - -# ---------------------------------------------------------------- -# build classes for intel, kokkos build options -# ---------------------------------------------------------------- - -# Intel class - -class Intel(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.mode = "cpu" - - def help(self): - return """ --intel mode - mode = cpu or phi (def = cpu) - build Intel package for CPU or Xeon Phi -""" - - def check(self): - if self.inlist == None: return - if len(self.inlist) != 1: error("-intel args are invalid") - self.mode = self.inlist[0] - if self.mode != "cpu" and self.mode != "phi": - error("-intel args are invalid") - -# Kokkos class - -class Kokkos(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.mode = "" - self.archgpu = None - self.archcpu = None - - def help(self): - return """ --kokkos mode archgpu=N archcpu=SNB - mode is not optional, arch is optional - mode = omp or cuda or phi (def = KOKKOS_DEVICES setting in Makefile ) - build Kokkos package for omp or cuda or phi - sets KOKKOS_DEVICES to "OpenMP" (omp, phi) or "Cuda, OpenMP" (cuda) - archgpu = number like 35 (Kepler) or 21 (Fermi) (def = none) - sets KOKKOS_ARCH for GPU to appropriate value - archcpu = SNB or HSW or BGQ or Power7 or Power8 (def = none) - for CPU = SandyBridge, Haswell, BGQ, Power7, Power8 - sets KOKKOS_ARCH for GPU to appropriate value -""" - - def check(self): - print(self.inlist) - if self.inlist != None and len(self.inlist) == 0: - error("-kokkos args are invalid") - - if self.inlist == None: return - if len(self.inlist) < 1: error("-kokkos args are invalid") - self.mode = self.inlist[0] - if self.mode != "omp" and self.mode != "cuda" and self.mode != "phi": - error("-kokkos args are invalid") - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-kokkos args are invalid") - if words[0] == "archgpu": self.archgpu = words[1] - elif words[0] == "archcpu": self.archcpu = words[1] - else: error("-kokkos args are invalid") - -# ---------------------------------------------------------------- -# makefile classes for CC, FLAGS, MPI, JPG, PNG, FFT settings -# ---------------------------------------------------------------- - -# Cc class - -class Cc(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.compiler = self.abbrev = "" - self.wrap = "" - self.parent = "" - - def help(self): - return """ --cc compiler wrap=wcompiler,parent - alter CC setting in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - compiler is required, all other args are optional - compiler = any string with g++ or icc or icpc - or mpi (or mpicxx, mpiCC, mpiicpc, etc) - can be compiler name or full path to compiler - mpi by itself is changed to mpicxx - wcompiler = compiler for mpi wrapper to use - use nvcc for building for Kokkos/cuda with provided nvcc_wrapper - parent = openmpi or mpich - parent style determines syntax for setting low-level compiler -""" - - def check(self): - if len(self.inlist) < 1: error("-cc args are invalid") - self.compiler = self.inlist[0] - if self.compiler == "mpi": - self.compiler = "mpicxx" - self.abbrev = "mpi" - elif self.compiler.startswith("mpi"): - self.abbrev = "mpi" - elif self.compiler == "g++" or self.compiler == "icc" or \ - self.compiler == "icpc": - self.abbrev = self.compiler - elif "mpi" in self.compiler: self.abbrev = "mpi" - elif "g++" in self.compiler: self.abbrev = "g++" - elif "icc" in self.compiler: self.abbrev = "icc" - elif "icpc" in self.compiler: self.abbrev = "icpc" - else: error("-cc args are invalid") - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-cc args are invalid") - args = words[1].split(',') - if len(args) != 2: error("-cc args are invalid") - if words[0] == "wrap": - if self.abbrev != "mpi": error("-cc compiler is not a wrapper") - self.wrap = args[0] - self.parent = args[1] - else: error("-cc args are invalid") - -# Flags class - -class Flags(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.flags = [] - - def help(self): - return """ --flags var action N f1 f2 ... var action N f1 f2 ... - alter variable settings (flags) in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - var = CCFLAGS, LINKFLAGS, LIB, etc - any variable in Makefile.auto, must already exist - action = add or del - N = # of flags to follow - f1,f2,etc = flag to add or delete - "-" char will be prepended to each flag - for example: add 4 g O3 xHost "fp-model fast=2" - will add: -g -O3 -xHost -fp-model fast=2 - for add: if flag already exists, no change is made - for delete: flag of form "-O*", will delete any wildcard match - for -O,-O2,-O3,etc: existing -O* will first be removed -""" - - def check(self): - if len(self.inlist) < 1: error("-flags args are invalid") - narg = len(self.inlist) - i = 0 - while i < narg: - if i+3 > narg: error("-flags args are invalid") - var = self.inlist[i] - action = self.inlist[i+1] - if action != "add" and action != "del": error("-flags args are invalid") - nflag = int(self.inlist[i+2]) - i += 3 - if i+nflag > narg: error("-flags args are invalid") - flags = self.inlist[i:i+nflag] - self.flags.append([var,action,flags]) - i += nflag - -# Mpi class - -class Mpi(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.style = self.dir = "" - - def help(self): - return """ --mpi style dir=path - alter MPI settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - style is required, all other args are optional - style = mpi or mpich or ompi or serial - mpi = no MPI settings (assume compiler is MPI wrapper) - mpich = use explicit settings for MPICH - ompi = use explicit settings for OpenMPI - serial = use settings for src/STUBS library - dir = path for MPICH or OpenMPI directory - add -I and -L settings for include and lib sub-dirs -""" - - def check(self): - if len(self.inlist) < 1: error("-mpi args are invalid") - self.style = self.inlist[0] - if self.style != "mpi" and self.style != "mpich" and \ - self.style != "ompi" and self.style != "serial": - error("-mpi args are invalid") - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-mpi args are invalid") - if words[0] == "dir": self.dir = words[1] - else: error("-mpi args are invalid") - -# Fft class - -class Fft(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.dir = self.incdir = self.libdir = "" - - def help(self): - return """ --fft mode lib=libname dir=homedir idir=incdir ldir=libdir - alter FFT settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - mode is required, all other args are optional - first removes all current FFT variable settings - mode = none or fftw or fftw3 or ... - adds -DFFT_MODE setting - lib = name of FFT library to link with (def is libname = mode) - adds -llib{libname} setting, e.g. -llibfftw3 - dir = home dir for include and library files (def = none) - adds -Idir/include and -Ldir/lib settings - if set, overrides idir and ldir args - idir = dir for include file (def = none) - adds -Iidir setting - ldir = dir for library file (def = none) - adds -Lldir setting -""" - - def check(self): - if not len(self.inlist): error("-fft args are invalid") - self.mode = self.inlist[0] - self.lib = "-l%s" % self.mode - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-fft args are invalid") - if words[0] == "lib": self.lib = "-l%s" % words[1] - elif words[0] == "dir": self.dir = words[1] - elif words[0] == "idir": self.incdir = words[1] - elif words[0] == "ldir": self.libdir = words[1] - else: error("-fft args are invalid") - -# Jpg class - -class Jpg(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.on = 1 - self.dir = self.incdir = self.libdir = "" - - def help(self): - return """ --jpg flag dir=homedir idir=incdir ldir=libdir - alter JPG settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - change JPG settings in makefile - all args are optional, flag must come first if specified - flag = yes or no (def = yes) - include or exclude JPEG support - adds/removes -DLAMMPS_JPEG and -ljpeg settings - dir = home dir for include and library files (def = none) - adds -Idir/include and -Ldir/lib settings - if set, overrides idir and ldir args - idir = dir for include file (def = none) - adds -Iidir setting - ldir = dir for library file (def = none) - adds -Lldir setting -""" - - def check(self): - for i,one in enumerate(self.inlist): - if one == "no" and i == 0: self.on = 0 - elif one == "yes" and i == 0: self.on = 1 - else: - words = one.split('=') - if len(words) != 2: error("-jpeg args are invalid") - if words[0] == "dir": self.dir = words[1] - elif words[0] == "idir": self.incdir = words[1] - elif words[0] == "ldir": self.libdir = words[1] - else: error("-jpeg args are invalid") - -# Png class - -class Png(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.on = 1 - self.dir = self.incdir = self.libdir = "" - - def help(self): - return """ --png flag dir=homedir idir=incdir ldir=libdir - alter PNG settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - all args are optional, flag must come first if specified - flag = yes or no (def = yes) - include or exclude PNG support - adds/removes -DLAMMPS_PNG and -lpng settings - dir = home dir for include and library files (def = none) - adds -Idir/include and -Ldir/lib settings - if set, overrides idir and ldir args - idir = dir for include file (def = none) - adds -Iidir setting - ldir = dir for library file (def = none) - adds -Lldir setting -""" - - def check(self): - for i,one in enumerate(self.inlist): - if one == "no" and i == 0: self.on = 0 - elif one == "yes" and i == 0: self.on = 1 - else: - words = one.split('=') - if len(words) != 2: error("-png args are invalid") - if words[0] == "dir": self.dir = words[1] - elif words[0] == "idir": self.incdir = words[1] - elif words[0] == "ldir": self.libdir = words[1] - else: error("-png args are invalid") - -# ---------------------------------------------------------------- -# auxiliary classes -# ---------------------------------------------------------------- - -# read, tweak, and write a Makefile - -class MakeReader(object): - - # read a makefile - # flag = 0 if file is full path name - # flag = 1,2 if file is suffix for any Makefile.machine under src/MAKE - # look for this file in same order that src/Makefile does - # if flag = 1, read the file - # if flag = 2, just check if file exists - - def __init__(self,file,flag=0): - if flag == 0: - if not os.path.isfile(file): error("Makefile %s does not exist" % file) - lines = open(file,'r').readlines() - else: - mfile = "%s/MAKE/MINE/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - mfile = "%s/MAKE/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - mfile = "%s/MAKE/OPTIONS/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - mfile = "%s/MAKE/MACHINES/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - error("Makefile.%s does not exist" % file) - if flag == 1: lines = open(mfile,'r').readlines() - else: return - - # scan lines of makefile - # if not a variable line, just copy to newlines - # if a variable line, concatenate any continuation lines - # convert variable to var dict entry: key = name, value = list of words - # discard any portion of value string with a comment char - # varinfo = list of variable info: (name, name with whitespace for print) - # add index into varinfo to newlines - # ccindex = index of "CC =" line, to add OMPI var before it - # lmpindex = index of "LAMMPS-specific settings" - # line to add KOKKOS vars before it - - var = {} - varinfo = [] - newlines = [] - pattern = "(\S+\s+=\s+)(.*)" - conditional = 0 - multiline = 0 - self.ccindex = self.lmpindex = 0 - - for line in lines: - line = line[:-1] - if "CC =" in line: self.ccindex = len(newlines) - if "LAMMPS-specific settings" in line: self.lmpindex = len(newlines) - if "ifeq" in line: - conditional = 1 - continue - if conditional: - if "endif" in line: - conditional = 0 - continue - if multiline: - if '#' in line: line = line[:line.find('#')] - morevalues = line.split() - values = values[:-1] + morevalues - if values[-1] != '\\': - var[name] = values - multiline = 0 - newlines.append(str(len(varinfo))) - varinfo.append((name,namewhite)) - continue - varflag = 1 - if len(line.strip()) == 0: varflag = 0 - elif line.lstrip()[0] == '#': varflag = 0 - else: - m = re.match(pattern,line) - if not m: varflag = 0 - if varflag: - namewhite = m.group(1) - name = namewhite.split()[0] - if name in var: - error("Makefile variable %s appears more than once" % name) - remainder = m.group(2) - if '#' in remainder: remainder = remainder[:remainder.find('#')] - values = remainder.split() - if values and values[-1] == '\\': multiline = 1 - else: - var[name] = values - newlines.append(str(len(varinfo))) - varinfo.append((name,namewhite)) - else: - newlines.append(line) - - self.var = var - self.varinfo = varinfo - self.lines = newlines - - # return list of values associated with var - # return None if var not defined - - def getvar(self,var): - if var in self.var: return self.var[var] - else: return None - - # set var to single value - # if var not defined, error - - def setvar(self,var,value): - if var not in self.var: error("Variable %s not in makefile" % var) - self.var[var] = [value] - - # add value to var - # do not add if value already defined by var - # if var not defined, - # create new variable using "where" - # where="cc", line before "CC =" line, use ":=" - # where="lmp", 2 lines before "LAMMPS-specific settings" line, use "=" - - def addvar(self,var,value,where=""): - if var in self.var: - if value not in self.var[var]: self.var[var].append(value) - else: - if not where: - error("Variable %s with value %s is not in makefile" % (var,value)) - if where == "cc": - if not self.ccindex: error("No 'CC =' line in makefile to add variable") - index = self.ccindex - varwhite = "%s :=\t\t" % var - elif where == "lmp": - if not self.lmpindex: error("No 'LAMMPS-specific settings line' " + - "in makefile to add variable") - index = self.lmpindex - 2 - varwhite = "%s =\t\t" % var - self.var[var] = [value] - varwhite = "%s =\t\t" % var - self.lines.insert(index,str(len(self.varinfo))) - self.varinfo.append((var,varwhite)) - - # if value = None, remove entire var - # no need to update lines or varinfo, write() will ignore deleted vars - # else remove value from var - # value can have trailing '*' to remove wildcard match - # if var or value not defined, ignore it - - def delvar(self,var,value=None): - #if var == "KOKKOS_DEVICES": - # print self.var,value - if var not in self.var: return - if not value: - del self.var[var] - #print "AGAIN",self.var - elif value and value[-1] != '*': - if value not in self.var[var]: return - self.var[var].remove(value) - else: - value = value[:-1] - values = self.var[var] - dellist = [] - for i,one in enumerate(values): - if one.startswith(value): dellist.append(i) - while dellist: values.pop(dellist.pop()) - self.var[var] = values - - # write stored makefile lines to file, using vars that may have been updated - # do not write var if not in dict, since has been deleted - # wrap var values into multiple lines if needed - # file = 1 if this is Makefile.auto, change 1st line to use "auto" - - def write(self,file,flag=0): - fp = open(file,'w') - for i,line in enumerate(self.lines): - if not line.isdigit(): - if flag and i == 0: - line = "# auto = makefile auto-generated by Make.py" - print(line, file=fp) - else: - index = int(line) - name = self.varinfo[index][0] - txt = self.varinfo[index][1] - if name not in self.var: continue - values = self.var[name] - print("%s%s" % (txt,' '.join(values)), file=fp) - -# ---------------------------------------------------------------- -# main program -# ---------------------------------------------------------------- - -# parse command-line args -# switches dict: key = switch letter, value = list of args -# switch_order = list of switches in order -# will possibly be merged with redo file args below - -cmd_switches,cmd_switch_order = parse_args(sys.argv[1:]) - -if "v" in cmd_switches: - # debug - #print "Command-line parsing:" - #for switch in cmd_switch_order: - # print " %s: %s" % (switch,' '.join(cmd_switches[switch])) - pass - -# check for redo switch, process redo file -# redolist = list of commands to execute - -redoflag = 0 -redolist = [] - -if 'r' in cmd_switches and 'h' not in cmd_switches: - redoflag = 1 - redo = Redo(cmd_switches['r']) - redo.check() - redo.setup() - redolist = redo.commands - redoindex = 0 - del redo - if not redolist: error("No commands to execute from redo file") - -# loop over Make.py commands -# if no redo switch, loop once for command-line command -# if redo, loop over one or more commands from redo file - -while 1: - - # if redo: - # parse next command from redo file - # use command-line switches to add/replace file command switches - # do not add -r, since already processed - # and don't want -r swtich to appear in Make.py.last file - # if -a in both: concatenate, de-dup, - # specified exe/machine action replaces file exe/machine action - # print resulting new command - # else just use command-line switches - - if redoflag: - if redoindex == len(redolist): break - args = redolist[redoindex].split() - switches,switch_order = parse_args(args) - redoindex += 1 - - for switch in cmd_switches: - if switch == 'r': continue - if switch == 'a' and switch in switches: - tmp = Actions(cmd_switches[switch] + switches[switch]) - tmp.dedup() - switches[switch] = tmp.inlist - continue - if switch not in switches: switch_order.append(switch) - switches[switch] = cmd_switches[switch] - - argstr = switch2str(switches,switch_order) - print("Redo command: Make.py",argstr) - else: - switches = cmd_switches - switch_order = cmd_switch_order - - # initialize all class variables to None - - for one in switchclasses: exec("%s = None" % one) - for one in libclasses: exec("%s = None" % one) - for one in buildclasses: exec("%s = None" % one) - for one in makeclasses: exec("%s = None" % one) - - # classes = dictionary of created classes - # key = switch, value = class instance - - classes = {} - for switch in switches: - if len(switch) == 1 and switch in abbrevs: - i = abbrevs.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (switchclasses[i],switch,switchclasses[i].capitalize(),switch) - exec(txt) - elif switch in libclasses: - i = libclasses.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (libclasses[i],switch,libclasses[i].upper(),switch) - exec(txt) - elif switch in buildclasses: - i = buildclasses.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (buildclasses[i],switch,buildclasses[i].capitalize(),switch) - exec(txt) - elif switch in makeclasses: - i = makeclasses.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (makeclasses[i],switch,makeclasses[i].capitalize(),switch) - exec(txt) - else: error("Unknown command-line switch -%s" % switch) - - # print help messages and exit - - if help or (actions and "-h" in actions.inlist) or not switches: - if not help: help = Help(None) - print(help.help()) - for switch in switch_order: - if switch == "h": continue - print(classes[switch].help()[1:]) - sys.exit() - - # create needed default classes if not specified with switch - # dir and packages plus lib and build classes so defaults are set - - if not dir: dir = Dir(None) - if not packages: packages = Packages(None) - - for one in libclasses: - txt = "if not %s: %s = %s(None)" % (one,one,one.upper()) - exec(txt) - - for one in buildclasses: - txt = "if not %s: %s = %s(None)" % (one,one,one.capitalize()) - exec(txt) - - # error check on args for all classes - - for switch in classes: classes[switch].check() - - # prep for action - # actions.setup() detects if last action = machine - # if yes, induce addition of "-m" and "-o" switches - - dir.setup() - packages.setup() - - if actions: - machine = actions.setup() - if machine: - switches['a'][-1] = "exe" - if 'm' not in switches: - switches['m'] = [machine] - switch_order.insert(-1,'m') - makefile = classes['m'] = Makefile(switches['m']) - makefile.check() - if 'o' not in switches: - switches['o'] = [machine] - switch_order.insert(-1,'o') - output = classes['o'] = Output(switches['o']) - output.check() - - # perform actions - - packages.install() - - if actions: - for action in actions.alist: - print("Action %s ..." % action) - if action.startswith("lib-"): actions.lib(action[4:]) - elif action == "file": actions.file("file") - elif action == "clean": actions.clean() - elif action == "exe": actions.exe() - - packages.uninstall() - - # create copy of executable if requested, and exe action performed - - if output and actions and "exe" in actions.alist: - txt = "cp %s/lmp_auto %s/lmp_%s" % (dir.src,dir.cwd,output.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created lmp_%s in %s" % (output.machine,dir.cwd)) - - # create copy of Makefile.auto if requested, and file or exe action performed - # ditto for library Makefile.auto and Makefile.lammps files - - if zoutput and actions and \ - ("file" in actions.alist or "exe" in actions.alist): - txt = "cp %s/MAKE/MINE/Makefile.auto %s/MAKE/MINE/Makefile.%s" % \ - (dir.src,dir.src,zoutput.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created Makefile.%s in %s/MAKE/MINE" % (zoutput.machine,dir.src)) - if gpubuildflag: - txt = "cp %s/gpu/Makefile.auto %s/MAKE/MINE/Makefile_gpu.%s" % \ - (dir.lib,dir.src,zoutput.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created Makefile_gpu.%s in %s/MAKE/MINE" % \ - (zoutput.machine,dir.src)) - txt = "cp %s/gpu/Makefile.lammps %s/MAKE/MINE/Makefile_gpu_lammps.%s" % \ - (dir.lib,dir.src,zoutput.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created Makefile_gpu_lammps.%s in %s/MAKE/MINE" % \ - (zoutput.machine,dir.src)) - - # write current Make.py command to src/Make.py.last - - fp = open("%s/Make.py.last" % dir.src,'w') - print("# last invoked Make.py command", file=fp) - print(switch2str(switches,switch_order), file=fp) - fp.close() - - # if not redoflag, done - - if not redoflag: break -- GitLab From 49e6c2eb7d4a2a04f590b866e7fbb9e2c9cfe8cc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 13:14:03 -0400 Subject: [PATCH 497/593] remove references to Make.py from the manual and instead refer to section 4 --- doc/src/Section_accelerate.txt | 4 ++-- doc/src/accelerate_gpu.txt | 9 ++------- doc/src/accelerate_intel.txt | 11 ++++------- doc/src/accelerate_kokkos.txt | 15 ++++++--------- doc/src/accelerate_omp.txt | 10 +++------- doc/src/accelerate_opt.txt | 8 ++------ 6 files changed, 19 insertions(+), 38 deletions(-) diff --git a/doc/src/Section_accelerate.txt b/doc/src/Section_accelerate.txt index 8812358886..bb0c93b8aa 100644 --- a/doc/src/Section_accelerate.txt +++ b/doc/src/Section_accelerate.txt @@ -233,8 +233,8 @@ set any needed options for the package via "-pk" "command-line switch"_Section_s use accelerated styles in your input via "-sf" "command-line switch"_Section_start.html#start_6 or "suffix"_suffix.html command | lmp_machine -in in.script -sf gpu :tb(c=2,s=|) -Note that the first 4 steps can be done as a single command, using the -src/Make.py tool. This tool is discussed in "Section +Note that the first 4 steps can be done as a single command with +suitable make command invocations. This is discussed in "Section 4"_Section_packages.html of the manual, and its use is illustrated in the individual accelerator sections. Typically these steps only need to be done once, to create an executable that uses one diff --git a/doc/src/accelerate_gpu.txt b/doc/src/accelerate_gpu.txt index 68e9fa477a..2723b6e971 100644 --- a/doc/src/accelerate_gpu.txt +++ b/doc/src/accelerate_gpu.txt @@ -74,13 +74,8 @@ Run lammps/lib/gpu/nvc_get_devices (after building the GPU library, see below) t This requires two steps (a,b): build the GPU library, then build LAMMPS with the GPU package. -You can do both these steps in one line, using the src/Make.py script, -described in "Section 4"_Section_packages.html of the manual. -Type "Make.py -h" for help. If run from the src directory, this -command will create src/lmp_gpu using src/MAKE/Makefile.mpi as the -starting Makefile.machine: - -Make.py -p gpu -gpu mode=single arch=31 -o gpu -a lib-gpu file mpi :pre +You can do both these steps in one line as described in +"Section 4"_Section_packages.html of the manual. Or you can follow these two (a,b) steps: diff --git a/doc/src/accelerate_intel.txt b/doc/src/accelerate_intel.txt index 74ae9d9a42..9eb295e0d0 100644 --- a/doc/src/accelerate_intel.txt +++ b/doc/src/accelerate_intel.txt @@ -225,11 +225,9 @@ source /opt/intel/parallel_studio_xe_2016.3.067/psxevars.sh # or psxevars.csh for C-shell make intel_cpu_intelmpi :pre -Alternatively, the build can be accomplished with the src/Make.py -script, described in "Section 4"_Section_packages.html of the -manual. Type "Make.py -h" for help. For an example: - -Make.py -v -p intel omp -intel cpu -a file intel_cpu_intelmpi :pre +Alternatively this can be done as a single command with +suitable make command invocations. This is discussed in "Section +4"_Section_packages.html of the manual. Note that if you build with support for a Phi coprocessor, the same binary can be used on nodes with or without coprocessors installed. @@ -244,8 +242,7 @@ highly recommended for CCFLAGS and LINKFLAGS. LIB should include is required for CCFLAGS and "-qoffload" is required for LINKFLAGS. Other recommended CCFLAG options for best performance are "-O2 -fno-alias -ansi-alias -qoverride-limits fp-model fast=2 --no-prec-div". The Make.py command will add all of these -automatically. +-no-prec-div". NOTE: The vectorization and math capabilities can differ depending on the CPU. For Intel compilers, the "-x" flag specifies the type of diff --git a/doc/src/accelerate_kokkos.txt b/doc/src/accelerate_kokkos.txt index 6ccd695841..712a05300c 100644 --- a/doc/src/accelerate_kokkos.txt +++ b/doc/src/accelerate_kokkos.txt @@ -60,8 +60,7 @@ More details follow. use a C++11 compatible compiler make yes-kokkos make mpi KOKKOS_DEVICES=OpenMP # build with the KOKKOS package -make kokkos_omp # or Makefile.kokkos_omp already has variable set -Make.py -v -p kokkos -kokkos omp -o mpi -a file mpi # or one-line build via Make.py :pre +make kokkos_omp # or Makefile.kokkos_omp already has variable set :pre mpirun -np 16 lmp_mpi -k on -sf kk -in in.lj # 1 node, 16 MPI tasks/node, no threads mpirun -np 2 -ppn 1 lmp_mpi -k on t 16 -sf kk -in in.lj # 2 nodes, 1 MPI task/node, 16 threads/task @@ -82,8 +81,7 @@ use a C++11 compatible compiler KOKKOS_DEVICES = Cuda, OpenMP KOKKOS_ARCH = Kepler35 make yes-kokkos -make machine -Make.py -p kokkos -kokkos cuda arch=31 -o kokkos_cuda -a file kokkos_cuda :pre +make machine :pre mpirun -np 1 lmp_cuda -k on t 6 -sf kk -in in.lj # one MPI task, 6 threads on CPU mpirun -np 4 -ppn 1 lmp_cuda -k on t 6 -sf kk -in in.lj # ditto on 4 nodes :pre @@ -98,8 +96,7 @@ use a C++11 compatible compiler KOKKOS_DEVICES = OpenMP KOKKOS_ARCH = KNC make yes-kokkos -make machine -Make.py -p kokkos -kokkos phi -o kokkos_phi -a file mpi :pre +make machine :pre host=MIC, Intel Phi with 61 cores (240 threads/phi via 4x hardware threading): mpirun -np 1 lmp_g++ -k on t 240 -sf kk -in in.lj # 1 MPI task on 1 Phi, 1*240 = 240 @@ -135,9 +132,9 @@ mode like the USER-INTEL package supports. You must choose at build time whether to build for CPUs (OpenMP), GPUs, or Phi. -You can do any of these in one line, using the src/Make.py script, -described in "Section 4"_Section_packages.html of the manual. -Type "Make.py -h" for help. If run from the src directory, these +You can do any of these in one line, using the suitable make command +line flags as described in "Section 4"_Section_packages.html of the +manual. If run from the src directory, these commands will create src/lmp_kokkos_omp, lmp_kokkos_cuda, and lmp_kokkos_phi. Note that the OMP and PHI options use src/MAKE/Makefile.mpi as the starting Makefile.machine. The CUDA diff --git a/doc/src/accelerate_omp.txt b/doc/src/accelerate_omp.txt index 81b7a5adc2..fa7bef1a52 100644 --- a/doc/src/accelerate_omp.txt +++ b/doc/src/accelerate_omp.txt @@ -23,8 +23,7 @@ one or more 16-core nodes. More details follow. use -fopenmp with CCFLAGS and LINKFLAGS in Makefile.machine make yes-user-omp make mpi # build with USER-OMP package, if settings added to Makefile.mpi -make omp # or Makefile.omp already has settings -Make.py -v -p omp -o mpi -a file mpi # or one-line build via Make.py :pre +make omp # or Makefile.omp already has settings :pre lmp_mpi -sf omp -pk omp 16 < in.script # 1 MPI task, 16 threads mpirun -np 4 lmp_mpi -sf omp -pk omp 4 -in in.script # 4 MPI tasks, 4 threads/task @@ -40,14 +39,11 @@ each MPI task running on a CPU. The lines above illustrate how to include/build with the USER-OMP package in two steps, using the "make" command. Or how to do it with -one command via the src/Make.py script, described in "Section -4"_Section_packages.html of the manual. Type "Make.py -h" for -help. +one command as described in "Section 4"_Section_packages.html of the manual. Note that the CCFLAGS and LINKFLAGS settings in Makefile.machine must include "-fopenmp". Likewise, if you use an Intel compiler, the -CCFLAGS setting must include "-restrict". The Make.py command will -add these automatically. +CCFLAGS setting must include "-restrict". [Run with the USER-OMP package from the command line:] diff --git a/doc/src/accelerate_opt.txt b/doc/src/accelerate_opt.txt index 5a2a5eac0a..845264b522 100644 --- a/doc/src/accelerate_opt.txt +++ b/doc/src/accelerate_opt.txt @@ -21,8 +21,7 @@ Here is a quick overview of how to use the OPT package. More details follow. make yes-opt -make mpi # build with the OPT package -Make.py -v -p opt -o mpi -a file mpi # or one-line build via Make.py :pre +make mpi # build with the OPT package :pre lmp_mpi -sf opt -in in.script # run in serial mpirun -np 4 lmp_mpi -sf opt -in in.script # run in parallel :pre @@ -35,13 +34,10 @@ None. The lines above illustrate how to build LAMMPS with the OPT package in two steps, using the "make" command. Or how to do it with one command -via the src/Make.py script, described in "Section -4"_Section_packages.html of the manual. Type "Make.py -h" for -help. +as described in "Section 4"_Section_packages.html of the manual. Note that if you use an Intel compiler to build with the OPT package, the CCFLAGS setting in your Makefile.machine must include "-restrict". -The Make.py command will add this automatically. [Run with the OPT package from the command line:] -- GitLab From 49b4cf9a770cd407ff8c32426c537998bf9f1eb6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 13:24:32 -0400 Subject: [PATCH 498/593] remove references to Make.py and USER-CUDA --- bench/FERMI/README | 66 ++++---------------------------------- bench/README | 46 +++++++++----------------- examples/README | 11 +------ examples/accelerate/README | 64 ++++-------------------------------- 4 files changed, 29 insertions(+), 158 deletions(-) diff --git a/bench/FERMI/README b/bench/FERMI/README index db3f527bdc..b66e560775 100644 --- a/bench/FERMI/README +++ b/bench/FERMI/README @@ -1,55 +1,21 @@ These are input scripts used to run versions of several of the -benchmarks in the top-level bench directory using the GPU and -USER-CUDA accelerator packages. The results of running these scripts -on two different machines (a desktop with 2 Tesla GPUs and the ORNL -Titan supercomputer) are shown on the "GPU (Fermi)" section of the -Benchmark page of the LAMMPS WWW site: lammps.sandia.gov/bench. +benchmarks in the top-level bench directory using the GPU accelerator +package. The results of running these scripts on two different machines +(a desktop with 2 Tesla GPUs and the ORNL Titan supercomputer) are shown +on the "GPU (Fermi)" section of the Benchmark page of the LAMMPS WWW +site: lammps.sandia.gov/bench. Examples are shown below of how to run these scripts. This assumes -you have built 3 executables with both the GPU and USER-CUDA packages +you have built 3 executables with the GPU package installed, e.g. lmp_linux_single lmp_linux_mixed lmp_linux_double -The precision (single, mixed, double) refers to the GPU and USER-CUDA -package precision. See the README files in the lib/gpu and lib/cuda -directories for instructions on how to build the packages with -different precisions. The GPU and USER-CUDA sub-sections of the -doc/Section_accelerate.html file also describes this process. - -Make.py -d ~/lammps -j 16 -p #all orig -m linux -o cpu -a exe -Make.py -d ~/lammps -j 16 -p #all opt orig -m linux -o opt -a exe -Make.py -d ~/lammps -j 16 -p #all omp orig -m linux -o omp -a exe -Make.py -d ~/lammps -j 16 -p #all gpu orig -m linux \ - -gpu mode=double arch=20 -o gpu_double -a libs exe -Make.py -d ~/lammps -j 16 -p #all gpu orig -m linux \ - -gpu mode=mixed arch=20 -o gpu_mixed -a libs exe -Make.py -d ~/lammps -j 16 -p #all gpu orig -m linux \ - -gpu mode=single arch=20 -o gpu_single -a libs exe -Make.py -d ~/lammps -j 16 -p #all cuda orig -m linux \ - -cuda mode=double arch=20 -o cuda_double -a libs exe -Make.py -d ~/lammps -j 16 -p #all cuda orig -m linux \ - -cuda mode=mixed arch=20 -o cuda_mixed -a libs exe -Make.py -d ~/lammps -j 16 -p #all cuda orig -m linux \ - -cuda mode=single arch=20 -o cuda_single -a libs exe -Make.py -d ~/lammps -j 16 -p #all intel orig -m linux -o intel_cpu -a exe -Make.py -d ~/lammps -j 16 -p #all kokkos orig -m linux -o kokkos_omp -a exe -Make.py -d ~/lammps -j 16 -p #all kokkos orig -kokkos cuda arch=20 \ - -m cuda -o kokkos_cuda -a exe - -Make.py -d ~/lammps -j 16 -p #all opt omp gpu cuda intel kokkos orig \ - -gpu mode=double arch=20 -cuda mode=double arch=20 -m linux \ - -o all -a libs exe - -Make.py -d ~/lammps -j 16 -p #all opt omp gpu cuda intel kokkos orig \ - -kokkos cuda arch=20 -gpu mode=double arch=20 \ - -cuda mode=double arch=20 -m cuda -o all_cuda -a libs exe - ------------------------------------------------------------------------ -To run on just CPUs (without using the GPU or USER-CUDA styles), +To run on just CPUs (without using the GPU styles), do something like the following: mpirun -np 1 lmp_linux_double -v x 8 -v y 8 -v z 8 -v t 100 < in.lj @@ -81,23 +47,5 @@ node via a "-ppn" setting. ------------------------------------------------------------------------ -To run with the USER-CUDA package, do something like the following: - -mpirun -np 1 lmp_linux_single -c on -sf cuda -v x 16 -v y 16 -v z 16 -v t 100 < in.lj -mpirun -np 2 lmp_linux_double -c on -sf cuda -pk cuda 2 -v x 32 -v y 64 -v z 64 -v t 100 < in.eam - -The "xyz" settings determine the problem size. The "t" setting -determines the number of timesteps. The "np" setting determines how -many MPI tasks (per node) the problem will run on. The numeric -argument to the "-pk" setting is the number of GPUs (per node); 1 GPU -is the default. Note that the number of MPI tasks must equal the -number of GPUs (both per node) with the USER-CUDA package. - -These mpirun commands run on a single node. To run on multiple nodes, -scale up the "-np" setting, and control the number of MPI tasks per -node via a "-ppn" setting. - ------------------------------------------------------------------------- - If the script has "titan" in its name, it was run on the Titan supercomputer at ORNL. diff --git a/bench/README b/bench/README index 85d71cbb5d..0806fcded6 100644 --- a/bench/README +++ b/bench/README @@ -71,49 +71,33 @@ integration ---------------------------------------------------------------------- -Here is a src/Make.py command which will perform a parallel build of a -LAMMPS executable "lmp_mpi" with all the packages needed by all the -examples. This assumes you have an MPI installed on your machine so -that "mpicxx" can be used as the wrapper compiler. It also assumes -you have an Intel compiler to use as the base compiler. You can leave -off the "-cc mpi wrap=icc" switch if that is not the case. You can -also leave off the "-fft fftw3" switch if you do not have the FFTW -(v3) installed as an FFT package, in which case the default KISS FFT -library will be used. - -cd src -Make.py -j 16 -p none molecule manybody kspace granular rigid orig \ - -cc mpi wrap=icc -fft fftw3 -a file mpi - ----------------------------------------------------------------------- - Here is how to run each problem, assuming the LAMMPS executable is named lmp_mpi, and you are using the mpirun command to launch parallel runs: Serial (one processor runs): -lmp_mpi < in.lj -lmp_mpi < in.chain -lmp_mpi < in.eam -lmp_mpi < in.chute -lmp_mpi < in.rhodo +lmp_mpi -in in.lj +lmp_mpi -in in.chain +lmp_mpi -in in.eam +lmp_mpi -in in.chute +lmp_mpi -in in.rhodo Parallel fixed-size runs (on 8 procs in this case): -mpirun -np 8 lmp_mpi < in.lj -mpirun -np 8 lmp_mpi < in.chain -mpirun -np 8 lmp_mpi < in.eam -mpirun -np 8 lmp_mpi < in.chute -mpirun -np 8 lmp_mpi < in.rhodo +mpirun -np 8 lmp_mpi -in in.lj +mpirun -np 8 lmp_mpi -in in.chain +mpirun -np 8 lmp_mpi -in in.eam +mpirun -np 8 lmp_mpi -in in.chute +mpirun -np 8 lmp_mpi -in in.rhodo Parallel scaled-size runs (on 16 procs in this case): -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.lj -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.chain.scaled -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.eam -mpirun -np 16 lmp_mpi -var x 4 -var y 4 < in.chute.scaled -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.rhodo.scaled +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.lj +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.chain.scaled +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.eam +mpirun -np 16 lmp_mpi -var x 4 -var y 4 -in in.chute.scaled +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.rhodo.scaled For each of the scaled-size runs you must set 3 variables as -var command line switches. The variables x,y,z are used in the input diff --git a/examples/README b/examples/README index 0ec28aa2c2..dc622ef7c4 100644 --- a/examples/README +++ b/examples/README @@ -106,20 +106,11 @@ tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si vashishta: models using the Vashishta potential voronoi: Voronoi tesselation via compute voronoi/atom command -Here is a src/Make.py command which will perform a parallel build of a -LAMMPS executable "lmp_mpi" with all the packages needed by all the -examples, with the exception of the accelerate sub-directory. See the -accelerate/README for Make.py commands suitable for its example -scripts. - -cd src -Make.py -j 16 -p none std no-lib reax meam poems reaxc orig -a lib-all mpi - Here is how you might run and visualize one of the sample problems: cd indent cp ../../src/lmp_mpi . # copy LAMMPS executable to this dir -lmp_mpi < in.indent # run the problem +lmp_mpi -in in.indent # run the problem Running the simulation produces the files {dump.indent} and {log.lammps}. You can visualize the dump file as follows: diff --git a/examples/accelerate/README b/examples/accelerate/README index 1fab296a53..c4eb5dcc8d 100644 --- a/examples/accelerate/README +++ b/examples/accelerate/README @@ -1,14 +1,11 @@ These are example scripts that can be run with any of the acclerator packages in LAMMPS: -USER-CUDA, GPU, USER-INTEL, KOKKOS, USER-OMP, OPT +GPU, USER-INTEL, KOKKOS, USER-OMP, OPT The easiest way to build LAMMPS with these packages -is via the src/Make.py tool described in Section 2.4 -of the manual. You can also type "Make.py -h" to see -its options. The easiest way to run these scripts -is by using the appropriate - +is via the flags described in Section 4 of the manual. +The easiest way to run these scripts is by using the appropriate Details on the individual accelerator packages can be found in doc/Section_accelerate.html. @@ -16,21 +13,6 @@ can be found in doc/Section_accelerate.html. Build LAMMPS with one or more of the accelerator packages -The following command will invoke the src/Make.py tool with one of the -command-lines from the Make.list file: - -../../src/Make.py -r Make.list target - -target = one or more of the following: - cpu, omp, opt - cuda_double, cuda_mixed, cuda_single - gpu_double, gpu_mixed, gpu_single - intel_cpu, intel_phi - kokkos_omp, kokkos_cuda, kokkos_phi - -If successful, the build will produce the file lmp_target in this -directory. - Note that in addition to any accelerator packages, these packages also need to be installed to run all of the example scripts: ASPHERE, MOLECULE, KSPACE, RIGID. @@ -38,39 +20,11 @@ MOLECULE, KSPACE, RIGID. These two targets will build a single LAMMPS executable with all the CPU accelerator packages installed (USER-INTEL for CPU, KOKKOS for OMP, USER-OMP, OPT) or all the GPU accelerator packages installed -(USER-CUDA, GPU, KOKKOS for CUDA): - -target = all_cpu, all_gpu - -Note that the Make.py commands in Make.list assume an MPI environment -exists on your machine and use mpicxx as the wrapper compiler with -whatever underlying compiler it wraps by default. If you add "-cc mpi -wrap=g++" or "-cc mpi wrap=icc" after the target, you can choose the -underlying compiler for mpicxx to invoke. E.g. - -../../src/Make.py -r Make.list intel_cpu -cc mpi wrap=icc +(GPU, KOKKOS for CUDA): -You should do this for any build that includes the USER-INTEL -package, since it will perform best with the Intel compilers. - -Note that for kokkos_cuda, it needs to be "-cc nvcc" instead of "mpi", -since a KOKKOS for CUDA build requires NVIDIA nvcc as the wrapper -compiler. - -Also note that the Make.py commands in Make.list use the default -FFT support which is via the KISS library. If you want to -build with another FFT library, e.g. FFTW3, then you can add -"-fft fftw3" after the target, e.g. - -../../src/Make.py -r Make.list gpu -fft fftw3 - -For any build with USER-CUDA, GPU, or KOKKOS for CUDA, be sure to set +For any build with GPU, or KOKKOS for CUDA, be sure to set the arch=XX setting to the appropriate value for the GPUs and Cuda -environment on your system. What is defined in the Make.list file is -arch=21 for older Fermi GPUs. This can be overridden as follows, -e.g. for Kepler GPUs: - -../../src/Make.py -r Make.list gpu_double -gpu mode=double arch=35 +environment on your system. --------------------- @@ -118,12 +72,6 @@ Note that when running in.lj.5.0 (which has a long cutoff) with the GPU package, the "-pk tpa" setting should be > 1 (e.g. 8) for best performance. -** USER-CUDA package - -lmp_machine -c on -sf cuda < in.lj -mpirun -np 1 lmp_machine -c on -sf cuda < in.lj # 1 MPI, 1 MPI/GPU -mpirun -np 2 lmp_machine -c on -sf cuda -pk cuda 2 < in.lj # 2 MPI, 1 MPI/GPU - ** KOKKOS package for OMP lmp_kokkos_omp -k on t 1 -sf kk -pk kokkos neigh half < in.lj -- GitLab From 02572a4099a6dfc6dc7ddae2c908446a54a491b3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 14:41:38 -0400 Subject: [PATCH 499/593] add workaround that allows pair style quip to work with -DLAMMPS_BIGBIG, assuming tags are still only 32-bit signed integer --- src/USER-QUIP/pair_quip.cpp | 47 +++++++++++++++++++++++-------------- src/USER-QUIP/pair_quip.h | 5 ---- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/USER-QUIP/pair_quip.cpp b/src/USER-QUIP/pair_quip.cpp index ccd71235e7..fa946641a5 100644 --- a/src/USER-QUIP/pair_quip.cpp +++ b/src/USER-QUIP/pair_quip.cpp @@ -125,26 +125,37 @@ void PairQUIP::compute(int eflag, int vflag) lattice[8] = domain->zprd; #if defined(LAMMPS_BIGBIG) - error->all(FLERR,"Pair style quip does not support -DLAMMPS_BIGBIG"); - // quip_lammps_longint_wrapper( - // (&nlocal,&nghost,atomic_numbers,tag, - // &inum,&sum_num_neigh,ilist, - // quip_num_neigh,quip_neigh,lattice, - // quip_potential,&n_quip_potential,&x[0][0], - // &quip_energy,quip_local_e,quip_virial,quip_local_virial,quip_force); + int *tmptag = new int[ntotal]; + int tmplarge = 0, toolarge = 0; + for (ii = 0; ii < ntotal; ++ii) { + tmptag[ii] = tag[ii]; + if (tag[ii] > MAXSMALLINT) tmplarge=1; + } + MPI_Allreduce(&tmplarge,&toolarge,1,MPI_INT,MPI_MAX,comm); + if (toolarge > 0) + error->all(FLERR,"Pair style quip does not support 64-bit atom IDs"); + + quip_lammps_wrapper(&nlocal,&nghost,atomic_numbers,tmptag, + &inum,&sum_num_neigh,ilist, + quip_num_neigh,quip_neigh,lattice, + quip_potential,&n_quip_potential,&x[0][0], + &quip_energy,quip_local_e,quip_virial, + quip_local_virial,quip_force); + + delete[] tmptag; #else - quip_lammps_wrapper - (&nlocal,&nghost,atomic_numbers,tag, - &inum,&sum_num_neigh,ilist, - quip_num_neigh,quip_neigh,lattice, - quip_potential,&n_quip_potential,&x[0][0], - &quip_energy,quip_local_e,quip_virial,quip_local_virial,quip_force); + quip_lammps_wrapper(&nlocal,&nghost,atomic_numbers,tag, + &inum,&sum_num_neigh,ilist, + quip_num_neigh,quip_neigh,lattice, + quip_potential,&n_quip_potential,&x[0][0], + &quip_energy,quip_local_e,quip_virial, + quip_local_virial,quip_force); #endif iquip = 0; for (ii = 0; ii < ntotal; ii++) { for( jj = 0; jj < 3; jj++ ) { - f[ii][jj] = quip_force[iquip]; + f[ii][jj] += quip_force[iquip]; iquip++; } } @@ -175,11 +186,11 @@ void PairQUIP::compute(int eflag, int vflag) vatom[ii][1] += quip_local_virial[iatom+4]; vatom[ii][2] += quip_local_virial[iatom+8]; vatom[ii][3] += (quip_local_virial[iatom+3] + - quip_local_virial[iatom+1])*0.5; + quip_local_virial[iatom+1])*0.5; vatom[ii][4] += (quip_local_virial[iatom+2] + - quip_local_virial[iatom+6])*0.5; + quip_local_virial[iatom+6])*0.5; vatom[ii][5] += (quip_local_virial[iatom+5] + - quip_local_virial[iatom+7])*0.5; + quip_local_virial[iatom+7])*0.5; iatom += 9; } } @@ -202,6 +213,8 @@ void PairQUIP::compute(int eflag, int vflag) void PairQUIP::settings(int narg, char **arg) { if (narg != 0) error->all(FLERR,"Illegal pair_style command"); + if (strncmp(force->pair->style,"hybrid",6) == 0) + error->all(FLERR,"Pair style quip is not compatible with hybrid styles"); } /* ---------------------------------------------------------------------- diff --git a/src/USER-QUIP/pair_quip.h b/src/USER-QUIP/pair_quip.h index c785792410..985a43fd7e 100644 --- a/src/USER-QUIP/pair_quip.h +++ b/src/USER-QUIP/pair_quip.h @@ -29,11 +29,6 @@ extern "C" int*, int*, double*, int*, int*, double*, double*, double*, double*, double*, double*); - // void quip_lammps_longint_wrapper(int*, int*, int*, int64_t*, - // int*, int*, int*, - // int*, int*, double*, - // int*, int*, double*, - // double*, double*, double*, double*, double*); void quip_lammps_potential_initialise(int*, int*, double*, char*, int*, char*, int*); } -- GitLab From 5cbaf7ca1d3218d6c0cbb9529ae7b0c01fd804ce Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 14:47:54 -0400 Subject: [PATCH 500/593] correct commands table format issue --- doc/src/Section_commands.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index 7dc3d27b6a..f1eb225fe5 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -734,8 +734,8 @@ package"_Section_start.html#start_3. "smd/wall/surface"_fix_smd_wall_surface.html, "temp/rescale/eff"_fix_temp_rescale_eff.html, "ti/spring"_fix_ti_spring.html, -"ttm/mod"_fix_ttm.html -"wall/ees"_fix_wall_ees.html +"ttm/mod"_fix_ttm.html, +"wall/ees"_fix_wall_ees.html, "wall/region/ees"_fix_wall_ees.html :tb(c=6,ea=c) :line -- GitLab From f96b9e0dcf555319b94e4397f103cf197cd4c988 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 15:48:18 -0400 Subject: [PATCH 501/593] add various checks and improvements to identify incompatible uses and warn or exit with error message --- src/USER-QUIP/pair_quip.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/USER-QUIP/pair_quip.cpp b/src/USER-QUIP/pair_quip.cpp index fa946641a5..7e178c7a64 100644 --- a/src/USER-QUIP/pair_quip.cpp +++ b/src/USER-QUIP/pair_quip.cpp @@ -42,6 +42,7 @@ PairQUIP::PairQUIP(LAMMPS *lmp) : Pair(lmp) single_enable = 0; one_coeff = 1; no_virial_fdotr_compute = 1; + manybody_flag = 1; } PairQUIP::~PairQUIP() @@ -99,7 +100,7 @@ void PairQUIP::compute(int eflag, int vflag) jnum = numneigh[i]; for (jj = 0; jj < jnum; jj++) { - quip_neigh[iquip] = jlist[jj]+1; + quip_neigh[iquip] = (jlist[jj] & NEIGHMASK) + 1; iquip++; } } @@ -131,7 +132,7 @@ void PairQUIP::compute(int eflag, int vflag) tmptag[ii] = tag[ii]; if (tag[ii] > MAXSMALLINT) tmplarge=1; } - MPI_Allreduce(&tmplarge,&toolarge,1,MPI_INT,MPI_MAX,comm); + MPI_Allreduce(&tmplarge,&toolarge,1,MPI_INT,MPI_MAX,world); if (toolarge > 0) error->all(FLERR,"Pair style quip does not support 64-bit atom IDs"); @@ -213,7 +214,7 @@ void PairQUIP::compute(int eflag, int vflag) void PairQUIP::settings(int narg, char **arg) { if (narg != 0) error->all(FLERR,"Illegal pair_style command"); - if (strncmp(force->pair->style,"hybrid",6) == 0) + if (strncmp(force->pair_style,"hybrid",6) == 0) error->all(FLERR,"Pair style quip is not compatible with hybrid styles"); } -- GitLab From 17aff29fe2e70bbb68d44b0b92ecb105124bdd86 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 15:48:31 -0400 Subject: [PATCH 502/593] fix off-by-one bug when copying strings --- src/USER-QUIP/pair_quip.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/USER-QUIP/pair_quip.cpp b/src/USER-QUIP/pair_quip.cpp index 7e178c7a64..c6ab8b259b 100644 --- a/src/USER-QUIP/pair_quip.cpp +++ b/src/USER-QUIP/pair_quip.cpp @@ -255,11 +255,11 @@ void PairQUIP::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); n_quip_file = strlen(arg[2]); - quip_file = new char[n_quip_file]; + quip_file = new char[n_quip_file+1]; strcpy(quip_file,arg[2]); n_quip_string = strlen(arg[3]); - quip_string = new char[n_quip_string]; + quip_string = new char[n_quip_string+1]; strcpy(quip_string,arg[3]); for (int i = 4; i < narg; i++) { -- GitLab From 148364949e21685af899a9a94f9c13c5fc201806 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 16:11:49 -0400 Subject: [PATCH 503/593] fix memory corruption issue in fix reax/c/species --- src/USER-REAXC/fix_reaxc_species.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/USER-REAXC/fix_reaxc_species.cpp b/src/USER-REAXC/fix_reaxc_species.cpp index 62b3bff93e..181c9bcd31 100644 --- a/src/USER-REAXC/fix_reaxc_species.cpp +++ b/src/USER-REAXC/fix_reaxc_species.cpp @@ -195,8 +195,10 @@ FixReaxCSpecies::FixReaxCSpecies(LAMMPS *lmp, int narg, char **arg) : if (iarg+ntypes+1 > narg) error->all(FLERR,"Illegal fix reax/c/species command"); eletype = (char**) malloc(ntypes*sizeof(char*)); + int len; for (int i = 0; i < ntypes; i ++) { - eletype[i] = (char*) malloc(2*sizeof(char)); + len = strlen(arg[iarg+1+i])+1; + eletype[i] = (char*) malloc(len*sizeof(char)); strcpy(eletype[i],arg[iarg+1+i]); } eleflag = 1; -- GitLab From 03cd4c5255573463cfc5448a87cdc870364b5ed7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 17:16:10 -0400 Subject: [PATCH 504/593] ported lib/voronoi/Install.py to python 3.x and tested with 2.7 --- lib/voronoi/Install.py | 57 +++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py index 54246f113e..64122c9d5b 100644 --- a/lib/voronoi/Install.py +++ b/lib/voronoi/Install.py @@ -2,8 +2,10 @@ # Install.py tool to download, unpack, build, and link to the Voro++ library # used to automate the steps described in the README file in this dir - -import sys,os,re,urllib,commands +from __future__ import print_function +import sys,os,re,subprocess +try: from urllib.request import urlretrieve as geturl +except: from urllib import urlretrieve as geturl # help message @@ -39,8 +41,8 @@ url = "http://math.lbl.gov/voro++/download/dir/%s.tar.gz" % version # print error message or help def error(str=None): - if not str: print help - else: print "ERROR",str + if not str: print(help) + else: print("ERROR",str) sys.exit() # expand to full path name @@ -58,9 +60,9 @@ if nargs == 0: error() homepath = "." homedir = version -grabflag = 0 -buildflag = 0 -linkflag = 0 +grabflag = False +buildflag = False +linkflag = False iarg = 0 while iarg < nargs: @@ -74,13 +76,13 @@ while iarg < nargs: homedir = args[iarg+2] iarg += 3 elif args[iarg] == "-g": - grabflag = 1 + grabflag = True iarg += 1 elif args[iarg] == "-b": - buildflag = 1 + buildflag = True iarg += 1 elif args[iarg] == "-l": - linkflag = 1 + linkflag = True iarg += 1 else: error() @@ -91,35 +93,38 @@ homedir = "%s/%s" % (homepath,homedir) # download and unpack Voro++ tarball if grabflag: - print "Downloading Voro++ ..." - urllib.urlretrieve(url,"%s/%s.tar.gz" % (homepath,version)) + print("Downloading Voro++ ...") + geturl(url,"%s/%s.tar.gz" % (homepath,version)) - print "Unpacking Voro++ tarball ..." + print("Unpacking Voro++ tarball ...") if os.path.exists("%s/%s" % (homepath,version)): - commands.getoutput("rm -rf %s/%s" % (homepath,version)) - cmd = "cd %s; tar zxvf %s.tar.gz" % (homepath,version) - commands.getoutput(cmd) + cmd = ['rm -rf "%s/%s"' % (homepath,version)] + subprocess.check_output(cmd,shell=True) + cmd = ['cd "%s"; tar -xzvf %s.tar.gz' % (homepath,version)] + subprocess.check_output(cmd,shell=True) if os.path.basename(homedir) != version: - if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir) + if os.path.exists(homedir): + cmd = ['rm -rf "%s"' % homedir] + subprocess.check_output(cmd,shell=True) os.rename("%s/%s" % (homepath,version),homedir) # build Voro++ if buildflag: - print "Building Voro++ ..." - cmd = "cd %s; make" % homedir - txt = commands.getoutput(cmd) - print txt + print("Building Voro++ ...") + cmd = ['cd "%s"; make' % homedir] + txt = subprocess.check_output(cmd,shell=True) + print(txt) # create 2 links in lib/voronoi to Voro++ src dir if linkflag: - print "Creating links to Voro++ include and lib files" + print("Creating links to Voro++ include and lib files") if os.path.isfile("includelink") or os.path.islink("includelink"): os.remove("includelink") if os.path.isfile("liblink") or os.path.islink("liblink"): os.remove("liblink") - cmd = "ln -s %s/src includelink" % homedir - commands.getoutput(cmd) - cmd = "ln -s %s/src liblink" % homedir - commands.getoutput(cmd) + cmd = ['ln -s "%s/src" includelink' % homedir, 'includelink'] + subprocess.check_output(cmd,shell=True) + cmd = ['ln -s "%s/src" liblink' % homedir] + subprocess.check_output(cmd,shell=True) -- GitLab From 7ccb0d37cdd65ad1c523a104a90aea69162f26a6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 17:37:48 -0400 Subject: [PATCH 505/593] port USER-SMD folder. make voronoi consistent with it --- lib/smd/Install.py | 34 +++++++++++++++++++--------------- lib/voronoi/Install.py | 8 ++++---- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/lib/smd/Install.py b/lib/smd/Install.py index e6fe8926a4..0fa05375db 100644 --- a/lib/smd/Install.py +++ b/lib/smd/Install.py @@ -3,7 +3,10 @@ # Install.py tool to download, unpack, and point to the Eigen library # used to automate the steps described in the README file in this dir -import sys,os,re,glob,commands +from __future__ import print_function +import sys,os,re,glob,subprocess +try: from urllib.request import urlretrieve as geturl +except: from urllib import urlretrieve as geturl # help message @@ -30,14 +33,15 @@ make lib-smd args="-g -l" # download/build in default lib/smd/eigen-eigen-* # settings -url = "http://bitbucket.org/eigen/eigen/get/3.3.3.tar.gz" +version = '3.3.4' +url = "http://bitbucket.org/eigen/eigen/get/%s.tar.gz" % version tarball = "eigen.tar.gz" # print error message or help def error(str=None): - if not str: print help - else: print "ERROR",str + if not str: print(help) + else: print("ERROR",str) sys.exit() # expand to full path name @@ -80,26 +84,26 @@ if not os.path.isdir(homepath): error("Eigen path does not exist") # glob to find name of dir it unpacks to if grabflag: - print "Downloading Eigen ..." - cmd = "curl -L %s > %s/%s" % (url,homepath,tarball) - print cmd - print commands.getoutput(cmd) + print("Downloading Eigen ...") + geturl(url,"%s/%s" % (homepath,tarball)) - print "Unpacking Eigen tarball ..." + print("Unpacking Eigen tarball ...") edir = glob.glob("%s/eigen-eigen-*" % homepath) for one in edir: - if os.path.isdir(one): commands.getoutput("rm -rf %s" % one) - cmd = "cd %s; tar zxvf %s" % (homepath,tarball) - commands.getoutput(cmd) + if os.path.isdir(one): + subprocess.check_output("rm -rf %s" % one,shell=True) + cmd = 'cd "%s"; tar -xzvf %s' % (homepath,tarball) + subprocess.check_output(cmd,shell=True) if homedir != "ee": - if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir) + if os.path.exists(homedir): + subprocess.check_output("rm -rf %s" % homedir,shell=True) edir = glob.glob("%s/eigen-eigen-*" % homepath) os.rename(edir[0],"%s/%s" % (homepath,homedir)) # create link in lib/smd to Eigen src dir if linkflag: - print "Creating link to Eigen files" + print("Creating link to Eigen files") if os.path.isfile("includelink") or os.path.islink("includelink"): os.remove("includelink") if homedir == "ee": @@ -107,4 +111,4 @@ if linkflag: linkdir = edir[0] else: linkdir = "%s/%s" % (homepath,homedir) cmd = "ln -s %s includelink" % linkdir - commands.getoutput(cmd) + subprocess.check_output(cmd,shell=True) diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py index 64122c9d5b..1c4bc5cb6d 100644 --- a/lib/voronoi/Install.py +++ b/lib/voronoi/Install.py @@ -98,13 +98,13 @@ if grabflag: print("Unpacking Voro++ tarball ...") if os.path.exists("%s/%s" % (homepath,version)): - cmd = ['rm -rf "%s/%s"' % (homepath,version)] + cmd = 'rm -rf "%s/%s"' % (homepath,version) subprocess.check_output(cmd,shell=True) - cmd = ['cd "%s"; tar -xzvf %s.tar.gz' % (homepath,version)] + cmd = 'cd "%s"; tar -xzvf %s.tar.gz' % (homepath,version) subprocess.check_output(cmd,shell=True) if os.path.basename(homedir) != version: if os.path.exists(homedir): - cmd = ['rm -rf "%s"' % homedir] + cmd = 'rm -rf "%s"' % homedir subprocess.check_output(cmd,shell=True) os.rename("%s/%s" % (homepath,version),homedir) @@ -112,7 +112,7 @@ if grabflag: if buildflag: print("Building Voro++ ...") - cmd = ['cd "%s"; make' % homedir] + cmd = 'cd "%s"; make' % homedir txt = subprocess.check_output(cmd,shell=True) print(txt) -- GitLab From 81f342aafa231587f748190b87423911eab9c1b0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 18:06:18 -0400 Subject: [PATCH 506/593] fix variable name bug and synchronize with other ported Install.py files --- lib/kim/Install.py | 70 +++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 42 deletions(-) diff --git a/lib/kim/Install.py b/lib/kim/Install.py index cf1b254ecd..f9348a2696 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -3,7 +3,9 @@ # install.pa tool to setup the kim-api library # used to automate the steps described in the README file in this dir from __future__ import print_function -import sys,os,re,urllib,subprocess +import sys,os,re,subprocess +try: from urllib.request import urlretrieve as geturl +except: from urllib import urlretrieve as geturl help = """ Syntax from src dir: make lib-kim args="-v version -b kim-install-dir kim-name -a kim-name" @@ -97,10 +99,10 @@ if buildflag: # configure LAMMPS to use kim-api to be installed with open("%s/Makefile.KIM_DIR" % thisdir, 'w') as mkfile: - mkfle.write("KIM_INSTALL_DIR=%s\n\n" % dir) - mkfle.write(".DUMMY: print_dir\n\n") - mkfle.write("print_dir:\n") - mkfle.write(" @printf $(KIM_INSTALL_DIR)\n") + mkfile.write("KIM_INSTALL_DIR=%s\n\n" % dir) + mkfile.write(".DUMMY: print_dir\n\n") + mkfile.write("print_dir:\n") + mkfile.write(" @printf $(KIM_INSTALL_DIR)\n") with open("%s/Makefile.KIM_Config" % thisdir, 'w') as cfgfile: cfgfile.write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) @@ -113,27 +115,23 @@ if buildflag: print("Downloading kim-api tarball ...") - try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,version)) + try: geturl(url,"%s/%s.tgz" % (thisdir,version)) except: cmd = "wget %s %s/%s.tgz" % (url,thisdir,version) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) + subprocess.check_output(cmd,shell=True) if not os.path.isfile("%s/%s.tgz" % (thisdir,version)): - print("Both urllib.urlretrieve() and wget command failed to download") + print("Both urllib and wget command failed to download") sys.exit() print("Unpacking kim-api tarball ...") cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (thisdir,version,version) - txt = subprocess.getstatusoutput(cmd) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) # configure kim-api print("Configuring kim-api ...") cmd = "cd %s/%s; ./configure --prefix='%s'" % (thisdir,version,dir) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) # build kim-api @@ -145,36 +143,26 @@ if buildflag: print("configuring all OpenKIM models, this will take a while ...") cmd = "cd %s/%s; make add-examples; make add-%s" % \ (thisdir,version,modelname) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) print("Building kim-api ...") cmd = "cd %s/%s; make" % (thisdir,version) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) # install kim-api print("Installing kim-api ...") cmd = "cd %s/%s; make install" % (thisdir,version) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) cmd = "cd %s/%s; make install-set-default-to-v1" %(thisdir,version) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) # remove source files print("Removing kim-api source and build files ...") cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" % (thisdir,version,version) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) # add a single model (and possibly its driver) to existing KIM installation @@ -187,7 +175,7 @@ if addflag: error() else: cmd = "cd %s; make -f Makefile.KIM_DIR print_dir" % thisdir - dir = subprocess.getstatusoutput(cmd)[1] + dir = subprocess.check_output(cmd,shell=True)[1] # download single model # try first via urllib @@ -197,10 +185,10 @@ if addflag: url = "https://openkim.org/download/%s.tgz" % addmodelname - try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,addmodelname)) + try: geturl(url,"%s/%s.tgz" % (thisdir,addmodelname)) except: cmd = "wget %s %s/%s.tgz" % (url,thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) + txt = subprocess.check_output(cmd,shell=True) print(txt[1]) if not os.path.isfile("%s/%s.tgz" % (thisdir,addmodelname)): print("Both urllib.urlretrieve() and wget command failed to download") @@ -208,28 +196,27 @@ if addflag: print("Unpacking item tarball ...") cmd = "cd %s; tar zxvf %s.tgz" % (thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) print("Building item ...") cmd = "cd %s/%s; make; make install" %(thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) + subprocess.check_output(cmd,shell=True) firstRunOutput = txt[1] if txt[0] != 0: # Error: but first, check to see if it needs a driver cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) + txt = subprocess.check_output(cmd,shell=True) if txt[1] == "ParameterizedModel": # Get and install driver cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) + txt = subprocess.check_output(cmd,shell=True) adddrivername = txt[1] print("First Installing model driver: %s" % adddrivername) cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) - txt = subprocess.getstatusoutput(cmd) + txt = subprocess.check_output(cmd,shell=True) if txt[0] != 0: print(firstRunOutput) print(txt[1]) @@ -237,7 +224,7 @@ if addflag: else: print(txt[1]) cmd = "cd %s; python Install.py -a %s" % (thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) + txt = subprocess.check_output(cmd,shell=True) print(txt[1]) if txt[0] != 0: error() @@ -251,6 +238,5 @@ if addflag: print(firstRunOutput) print("Removing kim item source and build files ...") cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) + -- GitLab From fcf9607a666616f53cd2d03445e76fb619dae85c Mon Sep 17 00:00:00 2001 From: Max Veit Date: Wed, 19 Jul 2017 17:47:21 +0100 Subject: [PATCH 507/593] Update USER_QUIP docs to clarify use of "special_bonds" --- doc/src/pair_quip.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/src/pair_quip.txt b/doc/src/pair_quip.txt index 12dcd244e2..fbc87d61ac 100644 --- a/doc/src/pair_quip.txt +++ b/doc/src/pair_quip.txt @@ -80,6 +80,14 @@ LAMMPS"_Section_start.html#start_3 section for more info. QUIP potentials are parametrized in electron-volts and Angstroms and therefore should be used with LAMMPS metal "units"_units.html. +QUIP potentials are generally not designed to work with the scaling +factors set by the "special_bonds"_special_bonds.html command. The +recommended setting in molecular systems is to include all +interactions, i.e. to use {special_bonds lj 1.0 1.0 1.0}. The only +exception to this rule is if you know that your QUIP potential needs +to exclude bonded, 1-3, or 1-4 interactions and does not already do +this exclusion within QUIP. + [Related commands:] "pair_coeff"_pair_coeff.html -- GitLab From 52a1c54d500e8255eab06290beaaf99ed225f9ca Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 19 Jul 2017 13:17:35 -0400 Subject: [PATCH 508/593] support QUIP wrapper API version query, relax hybrid restriction to allow hybrid/overlay, update docs --- doc/src/pair_quip.txt | 16 ++++++++++++---- src/USER-QUIP/pair_quip.cpp | 10 ++++++++-- src/USER-QUIP/pair_quip.h | 5 +++-- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/doc/src/pair_quip.txt b/doc/src/pair_quip.txt index fbc87d61ac..9436b0c4ed 100644 --- a/doc/src/pair_quip.txt +++ b/doc/src/pair_quip.txt @@ -83,10 +83,18 @@ therefore should be used with LAMMPS metal "units"_units.html. QUIP potentials are generally not designed to work with the scaling factors set by the "special_bonds"_special_bonds.html command. The recommended setting in molecular systems is to include all -interactions, i.e. to use {special_bonds lj 1.0 1.0 1.0}. The only -exception to this rule is if you know that your QUIP potential needs -to exclude bonded, 1-3, or 1-4 interactions and does not already do -this exclusion within QUIP. +interactions, i.e. to use {special_bonds lj/coul 1.0 1.0 1.0}. Scaling +factors > 0.0 will be ignored and treated as 1.0. The only exception +to this rule is if you know that your QUIP potential needs to exclude +bonded, 1-3, or 1-4 interactions and does not already do this exclusion +within QUIP. Then a factor 0.0 needs to be used which will remove such +pairs from the neighbor list. This needs to be very carefully tested, +because it may remove pairs from the neighbor list that are still +required. + +Pair style {quip} cannot be used with pair style {hybrid}, only +with {hybrid/overlay} and only the {quip} substyle is applied to +all atom types. [Related commands:] diff --git a/src/USER-QUIP/pair_quip.cpp b/src/USER-QUIP/pair_quip.cpp index c6ab8b259b..6bbbcdb8e6 100644 --- a/src/USER-QUIP/pair_quip.cpp +++ b/src/USER-QUIP/pair_quip.cpp @@ -214,8 +214,14 @@ void PairQUIP::compute(int eflag, int vflag) void PairQUIP::settings(int narg, char **arg) { if (narg != 0) error->all(FLERR,"Illegal pair_style command"); - if (strncmp(force->pair_style,"hybrid",6) == 0) - error->all(FLERR,"Pair style quip is not compatible with hybrid styles"); + if (strcmp(force->pair_style,"hybrid") == 0) + error->all(FLERR,"Pair style quip is only compatible with hybrid/overlay"); + + // check if linked to the correct QUIP library API version + // as of 2017-07-19 this is API_VERSION 1 + if (quip_lammps_api_version() != 1) + error->all(FLERR,"QUIP LAMMPS wrapper API version is not compatible " + "with this version of LAMMPS"); } /* ---------------------------------------------------------------------- diff --git a/src/USER-QUIP/pair_quip.h b/src/USER-QUIP/pair_quip.h index 985a43fd7e..debdc2cb83 100644 --- a/src/USER-QUIP/pair_quip.h +++ b/src/USER-QUIP/pair_quip.h @@ -24,12 +24,13 @@ PairStyle(quip,PairQUIP) extern "C" { - void quip_lammps_wrapper(int*, int*, int*, int*, + int quip_lammps_api_version(); + void quip_lammps_wrapper(int*, int*, int*, int*, int*, int*, int*, int*, int*, double*, int*, int*, double*, double*, double*, double*, double*, double*); - void quip_lammps_potential_initialise(int*, int*, double*, char*, int*, char*, int*); + void quip_lammps_potential_initialise(int*, int*, double*, char*, int*, char*, int*); } namespace LAMMPS_NS { -- GitLab From f181a0bfabbbdae09e440714b2e4a27c23f5efd4 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Wed, 19 Jul 2017 12:54:33 -0500 Subject: [PATCH 509/593] Update lib/kim/Install.py for phthon 2.7 conversion --- lib/kim/Install.py | 61 ++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/lib/kim/Install.py b/lib/kim/Install.py index f9348a2696..cb089e41e2 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -200,43 +200,52 @@ if addflag: print("Building item ...") cmd = "cd %s/%s; make; make install" %(thisdir,addmodelname) - subprocess.check_output(cmd,shell=True) - firstRunOutput = txt[1] - if txt[0] != 0: + try: + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + except subprocess.CalledProcessError as e: + # Error: but first, check to see if it needs a driver + firstRunOutput = e.output + cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) - txt = subprocess.check_output(cmd,shell=True) - if txt[1] == "ParameterizedModel": + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + if txt == "ParameterizedModel": # Get and install driver cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) - txt = subprocess.check_output(cmd,shell=True) - adddrivername = txt[1] + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + adddrivername = txt print("First Installing model driver: %s" % adddrivername) cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) - txt = subprocess.check_output(cmd,shell=True) - if txt[0] != 0: - print(firstRunOutput) - print(txt[1]) - error() - else: - print(txt[1]) + try: + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + except subprocess.CalledProcessError as e: + print(e.output) + sys.exit() + + print(txt) + + # now install the model that needed the driver + cmd = "cd %s; python Install.py -a %s" % (thisdir,addmodelname) - txt = subprocess.check_output(cmd,shell=True) - print(txt[1]) - if txt[0] != 0: - error() + try: + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + except subprocess.CalledProcessError as e: + print(e.output) + sys.exit() + print(txt) + sys.exit() else: print(firstRunOutput) - error() - else: - - # success + print("Error, unable to build and install OpenKIM item: %s" \ + % addmodelname) + sys.exit() - print(firstRunOutput) - print("Removing kim item source and build files ...") - cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) - subprocess.check_output(cmd,shell=True) + # success the first time + print(txt) + print("Removing kim item source and build files ...") + cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) + subprocess.check_output(cmd,shell=True) -- GitLab From ee6cac826e656d6280c1dff1478a5c4040ce7010 Mon Sep 17 00:00:00 2001 From: Giacomo Fiorin Date: Wed, 19 Jul 2017 14:10:43 -0400 Subject: [PATCH 510/593] Update Colvars to version 2017-07-15 and support automated builds for it --- doc/src/PDF/colvars-refman-lammps.pdf | Bin 566757 -> 570332 bytes lib/colvars/Install.py | 104 ++- lib/colvars/Makefile.colvars | 119 --- lib/colvars/Makefile.common | 65 ++ lib/colvars/Makefile.deps | 78 ++ lib/colvars/Makefile.fermi | 120 --- lib/colvars/Makefile.g++ | 118 +-- lib/colvars/Makefile.g++-debug | 5 + lib/colvars/Makefile.lammps | 5 + lib/colvars/Makefile.lammps.debug | 2 +- lib/colvars/Makefile.lammps.empty | 2 +- lib/colvars/Makefile.mingw32-cross | 124 +-- lib/colvars/Makefile.mingw64-cross | 124 +-- lib/colvars/README | 99 +- lib/colvars/colvar.cpp | 434 ++++++--- lib/colvars/colvar.h | 47 +- lib/colvars/colvaratoms.cpp | 214 +++-- lib/colvars/colvaratoms.h | 39 +- lib/colvars/colvarbias.cpp | 24 +- lib/colvars/colvarbias.h | 2 +- lib/colvars/colvarbias_abf.cpp | 130 +-- lib/colvars/colvarbias_alb.cpp | 62 +- lib/colvars/colvarbias_histogram.cpp | 28 +- lib/colvars/colvarbias_meta.cpp | 151 ++-- lib/colvars/colvarbias_meta.h | 7 +- lib/colvars/colvarbias_restraint.cpp | 54 +- lib/colvars/colvarcomp.cpp | 232 ++--- lib/colvars/colvarcomp.h | 75 +- lib/colvars/colvarcomp_angles.cpp | 203 ++++- lib/colvars/colvarcomp_coordnums.cpp | 47 +- lib/colvars/colvarcomp_distances.cpp | 101 ++- lib/colvars/colvarcomp_protein.cpp | 84 +- lib/colvars/colvarcomp_rotations.cpp | 14 +- lib/colvars/colvardeps.cpp | 341 +++++-- lib/colvars/colvardeps.h | 124 ++- lib/colvars/colvargrid.cpp | 3 +- lib/colvars/colvargrid.h | 6 +- lib/colvars/colvarmodule.cpp | 178 ++-- lib/colvars/colvarmodule.h | 66 +- lib/colvars/colvarparse.cpp | 53 +- lib/colvars/colvarparse.h | 25 +- lib/colvars/colvarproxy.cpp | 492 ++++++++++ lib/colvars/colvarproxy.h | 842 ++++++++---------- lib/colvars/colvars_version.h | 8 + lib/colvars/colvarscript.cpp | 150 ++-- lib/colvars/colvarscript.h | 20 +- lib/colvars/colvartypes.h | 5 + lib/colvars/colvarvalue.cpp | 275 ++++++ lib/colvars/colvarvalue.h | 296 +----- src/USER-COLVARS/colvarproxy_lammps.cpp | 4 - src/USER-COLVARS/colvarproxy_lammps.h | 7 +- src/USER-COLVARS/colvarproxy_lammps_version.h | 10 + 52 files changed, 3439 insertions(+), 2379 deletions(-) delete mode 100644 lib/colvars/Makefile.colvars create mode 100644 lib/colvars/Makefile.common create mode 100644 lib/colvars/Makefile.deps delete mode 100644 lib/colvars/Makefile.fermi create mode 100644 lib/colvars/Makefile.g++-debug create mode 100644 lib/colvars/Makefile.lammps create mode 100644 lib/colvars/colvarproxy.cpp create mode 100644 lib/colvars/colvars_version.h create mode 100644 src/USER-COLVARS/colvarproxy_lammps_version.h diff --git a/doc/src/PDF/colvars-refman-lammps.pdf b/doc/src/PDF/colvars-refman-lammps.pdf index 37201275fe4b4efa0da77afbb72e6c55a127c042..a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100644 --- a/lib/colvars/Install.py +++ b/lib/colvars/Install.py @@ -1,27 +1,34 @@ #!/usr/bin/env python -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README +# Install.py tool to do automate build of Colvars -import sys,commands,os +from __future__ import print_function +import sys,os,subprocess # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-colvars args="-m machine -e suffix" +Syntax from lib/colvars dir: python Install.py -m machine -e suffix + +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file + machine = suffix of a lib/colvars/Makefile.* or of a + src/MAKE/MACHINES/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examples: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler """ # print error message or help def error(str=None): - if not str: print help - else: print "ERROR",str + if not str: print(help) + else: print("ERROR"),str sys.exit() # parse args @@ -31,17 +38,17 @@ nargs = len(args) if nargs == 0: error() machine = None -extraflag = 0 +extraflag = False iarg = 0 while iarg < nargs: if args[iarg] == "-m": - if iarg+2 > nargs: error() + if iarg+2 > len(args): error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 + if iarg+2 > len(args): error() + extraflag = True suffix = args[iarg+1] iarg += 2 else: error() @@ -51,32 +58,79 @@ while iarg < nargs: cwd = os.getcwd() lib = os.path.basename(cwd) -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - +def get_lammps_machine_flags(machine): + """Parse Makefile.machine from LAMMPS, return dictionary of compiler flags""" + if not os.path.exists("../../src/MAKE/MACHINES/Makefile.%s" % machine): + error("Cannot locate src/MAKE/MACHINES/Makefile.%s" % machine) + lines = open("../../src/MAKE/MACHINES/Makefile.%s" % machine, + 'r').readlines() + machine_flags = {} + for line in lines: + line = line.partition('#')[0] + line = line.rstrip() + words = line.split() + if (len(words) > 2): + if ((words[0] == 'CC') or (words[0] == 'CCFLAGS') or + (words[0] == 'SHFLAGS') or (words[0] == 'ARCHIVE') or + (words[0] == 'ARFLAGS') or (words[0] == 'SHELL')): + machine_flags[words[0]] = ' '.join(words[2:]) + return machine_flags + +def gen_colvars_makefile_machine(machine, machine_flags): + """Generate Makefile.machine for Colvars given the compiler flags""" + machine_makefile = open("Makefile.%s" % machine, 'w') + machine_makefile.write('''# -*- makefile -*- to build Colvars module with %s + +COLVARS_LIB = libcolvars.a +COLVARS_OBJ_DIR = + +CXX = %s +CXXFLAGS = %s %s +AR = %s +ARFLAGS = %s +SHELL = %s + +include Makefile.common + +.PHONY: default clean + +default: $(COLVARS_LIB) Makefile.lammps + +clean: + -rm -f $(COLVARS_OBJS) $(COLVARS_LIB) +''' % (machine, machine_flags['CC'], + machine_flags['CCFLAGS'], machine_flags['SHFLAGS'] , + machine_flags['ARCHIVE'], machine_flags['ARFLAGS'], + machine_flags['SHELL'])) + +if not os.path.exists("Makefile.%s" % machine): + machine_flags = get_lammps_machine_flags(machine) + gen_colvars_makefile_machine(machine, machine_flags) if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) +# create Makefile.auto as copy of Makefile.machine +# reset EXTRAMAKE if requested + lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') - for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - + fp.write(line) fp.close() # make the library via Makefile.auto -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt +print("Building lib%s.a ..." % lib) +cmd = ["make -f Makefile.auto clean"] +print(subprocess.check_output(cmd, shell=True)) +cmd = ["make -f Makefile.auto -j12"] +print(subprocess.check_output(cmd, shell=True)) -if os.path.exists("lib%s.a" % lib): print "Build was successful" +if os.path.exists("lib%s.a" % lib): print("Build was successful") else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib + print("lib/%s/Makefile.lammps was NOT created" % lib) diff --git a/lib/colvars/Makefile.colvars b/lib/colvars/Makefile.colvars deleted file mode 100644 index d1a2044038..0000000000 --- a/lib/colvars/Makefile.colvars +++ /dev/null @@ -1,119 +0,0 @@ -# library build -*- makefile -*- for colvars module - -# which file will be copied to Makefile.lammps - -EXTRAMAKE = Makefile.lammps.empty - -# ------ SETTINGS ------ - -CXX = g++ -CXXFLAGS = -O2 -g -Wall -fPIC -funroll-loops # -DCOLVARS_DEBUG -ARCHIVE = ar -ARCHFLAG = -rscv -SHELL = /bin/sh - -# ------ DEFINITIONS ------ - -SRC = colvaratoms.cpp colvarbias_abf.cpp colvarbias_alb.cpp colvarbias.cpp \ - colvarbias_histogram.cpp colvarbias_meta.cpp colvarbias_restraint.cpp \ - colvarcomp_angles.cpp colvarcomp_coordnums.cpp colvarcomp.cpp \ - colvarcomp_distances.cpp colvarcomp_protein.cpp colvarcomp_rotations.cpp \ - colvardeps.cpp colvar.cpp colvargrid.cpp colvarmodule.cpp colvarparse.cpp \ - colvarscript.cpp colvartypes.cpp colvarvalue.cpp - -LIB = libcolvars.a -OBJ = $(SRC:.cpp=.o) -EXE = #colvars_standalone - -# ------ MAKE PROCEDURE ------ - -default: $(LIB) $(EXE) Makefile.lammps - -Makefile.lammps: - @cp $(EXTRAMAKE) Makefile.lammps - -$(LIB): $(OBJ) - $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) - -colvars_standalone: colvars_main.o colvarproxy_standalone.o $(LIB) - $(CXX) -o $@ $(CXXFLAGS) $^ - -# ------ MAKE FLAGS ------ - -.SUFFIXES: -.SUFFIXES: .cpp .o - -.PHONY: default clean - -# ------ COMPILE RULES ------ - -.cpp.o: - $(CXX) $(CXXFLAGS) -c $< - -# ------ DEPENDENCIES ------ -# -colvaratoms.o: colvaratoms.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvaratoms.h -colvarbias_abf.o: colvarbias_abf.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvar.h colvarparse.h colvardeps.h \ - colvarbias_abf.h colvarbias.h colvargrid.h -colvarbias_alb.o: colvarbias_alb.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarbias_alb.h colvar.h colvarparse.h \ - colvardeps.h colvarbias_restraint.h colvarbias.h -colvarbias.o: colvarbias.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarbias.h colvar.h colvarparse.h colvardeps.h -colvarbias_histogram.o: colvarbias_histogram.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvar.h colvarparse.h \ - colvardeps.h colvarbias_histogram.h colvarbias.h colvargrid.h -colvarbias_meta.o: colvarbias_meta.cpp colvar.h colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvarbias_meta.h colvarbias.h colvargrid.h -colvarbias_restraint.o: colvarbias_restraint.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarbias_restraint.h \ - colvarbias.h colvar.h colvarparse.h colvardeps.h -colvarcomp_angles.o: colvarcomp_angles.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvar.h colvarparse.h colvardeps.h \ - colvarcomp.h colvaratoms.h -colvarcomp_coordnums.o: colvarcomp_coordnums.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvaratoms.h colvar.h colvarcomp.h -colvarcomp.o: colvarcomp.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvar.h colvarparse.h colvardeps.h colvarcomp.h \ - colvaratoms.h -colvarcomp_distances.o: colvarcomp_distances.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvar.h colvarcomp.h colvaratoms.h -colvarcomp_protein.o: colvarcomp_protein.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h colvar.h \ - colvarcomp.h colvaratoms.h -colvarcomp_rotations.o: colvarcomp_rotations.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvar.h colvarcomp.h colvaratoms.h -colvar.o: colvar.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvar.h colvarcomp.h \ - colvaratoms.h colvarscript.h colvarbias.h -colvardeps.o: colvardeps.cpp colvardeps.h colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h -colvargrid.o: colvargrid.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvar.h colvarcomp.h \ - colvaratoms.h colvargrid.h -colvarmodule.o: colvarmodule.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h colvar.h \ - colvarbias.h colvarbias_abf.h colvargrid.h colvarbias_alb.h \ - colvarbias_restraint.h colvarbias_histogram.h colvarbias_meta.h \ - colvarscript.h -colvarparse.o: colvarparse.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h -colvarscript.o: colvarscript.cpp colvarscript.h colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarbias.h colvar.h \ - colvarparse.h colvardeps.h -colvartypes.o: colvartypes.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h -colvarvalue.o: colvarvalue.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h - -# ------ CLEAN ------ - -clean: - -rm *.o *~ $(LIB) - diff --git a/lib/colvars/Makefile.common b/lib/colvars/Makefile.common new file mode 100644 index 0000000000..818373abe1 --- /dev/null +++ b/lib/colvars/Makefile.common @@ -0,0 +1,65 @@ +# Shared -*- makefile -*- for multiple architectures + +# Detect settings from PYTHON package (if defined) +include ../../src/Makefile.package.settings +ifeq ($(python_SYSINC),) +COLVARS_PYTHON_INCFLAGS = +else +COLVARS_PYTHON_INCFLAGS = -DCOLVARS_PYTHON $(python_SYSINC) +endif + +# Detect debug settings +ifeq ($(COLVARS_DEBUG),) +COLVARS_DEBUG_INCFLAGS = +else +COLVARS_DEBUG_INCFLAGS= -DCOLVARS_DEBUG +endif + +COLVARS_INCFLAGS = $(COLVARS_DEBUG_INCFLAGS) $(COLVARS_PYTHON_INCFLAGS) + + +.SUFFIXES: +.SUFFIXES: .cpp .o + +COLVARS_SRCS = \ + colvaratoms.cpp \ + colvarbias_abf.cpp \ + colvarbias_alb.cpp \ + colvarbias.cpp \ + colvarbias_histogram.cpp \ + colvarbias_meta.cpp \ + colvarbias_restraint.cpp \ + colvarcomp_angles.cpp \ + colvarcomp_coordnums.cpp \ + colvarcomp.cpp \ + colvarcomp_distances.cpp \ + colvarcomp_protein.cpp \ + colvarcomp_rotations.cpp \ + colvar.cpp \ + colvardeps.cpp \ + colvargrid.cpp \ + colvarmodule.cpp \ + colvarparse.cpp \ + colvarproxy.cpp \ + colvarscript.cpp \ + colvartypes.cpp \ + colvarvalue.cpp + +COLVARS_OBJS = $(COLVARS_SRCS:.cpp=.o) + +.cpp.o: + $(CXX) $(CXXFLAGS) $(COLVARS_INCFLAGS) -c $< + +$(COLVARS_LIB): Makefile.deps $(COLVARS_OBJS) + $(AR) $(ARFLAGS) $(COLVARS_LIB) $(COLVARS_OBJS) + + +Makefile.deps: $(COLVARS_SRCS) + @echo > $@ + @for src in $^ ; do \ + obj=`basename $$src .cpp`.o ; \ + $(CXX) -MM $(COLVARS_INCFLAGS) \ + -MT '$$(COLVARS_OBJ_DIR)'$$obj $$src >> $@ ; \ + done + +include Makefile.deps diff --git a/lib/colvars/Makefile.deps b/lib/colvars/Makefile.deps new file mode 100644 index 0000000000..f463da5f86 --- /dev/null +++ b/lib/colvars/Makefile.deps @@ -0,0 +1,78 @@ + +$(COLVARS_OBJ_DIR)colvaratoms.o: colvaratoms.cpp colvarmodule.h \ + colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \ + colvarparse.h colvaratoms.h colvardeps.h +$(COLVARS_OBJ_DIR)colvarbias_abf.o: colvarbias_abf.cpp colvarmodule.h \ + colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h colvar.h \ + colvarparse.h colvardeps.h colvarbias_abf.h colvarbias.h colvargrid.h +$(COLVARS_OBJ_DIR)colvarbias_alb.o: colvarbias_alb.cpp colvarmodule.h \ + colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \ + colvarbias_alb.h colvar.h colvarparse.h colvardeps.h colvarbias.h +$(COLVARS_OBJ_DIR)colvarbias.o: colvarbias.cpp colvarmodule.h \ + colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h colvarbias.h \ + colvar.h colvarparse.h colvardeps.h +$(COLVARS_OBJ_DIR)colvarbias_histogram.o: colvarbias_histogram.cpp \ + colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \ + colvarvalue.h colvar.h colvarparse.h colvardeps.h colvarbias_histogram.h \ + colvarbias.h colvargrid.h +$(COLVARS_OBJ_DIR)colvarbias_meta.o: colvarbias_meta.cpp colvar.h \ + colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \ + colvarvalue.h colvarparse.h colvardeps.h colvarbias_meta.h colvarbias.h \ + colvargrid.h +$(COLVARS_OBJ_DIR)colvarbias_restraint.o: colvarbias_restraint.cpp \ + colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \ + colvarvalue.h colvarbias_restraint.h colvarbias.h colvar.h colvarparse.h \ + colvardeps.h +$(COLVARS_OBJ_DIR)colvarcomp_angles.o: colvarcomp_angles.cpp \ + colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \ + colvarvalue.h colvar.h colvarparse.h colvardeps.h colvarcomp.h \ + colvaratoms.h +$(COLVARS_OBJ_DIR)colvarcomp_coordnums.o: colvarcomp_coordnums.cpp \ + colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \ + colvarvalue.h colvarparse.h colvaratoms.h colvardeps.h colvar.h \ + colvarcomp.h +$(COLVARS_OBJ_DIR)colvarcomp.o: colvarcomp.cpp colvarmodule.h \ + colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h colvar.h \ + colvarparse.h colvardeps.h colvarcomp.h colvaratoms.h +$(COLVARS_OBJ_DIR)colvarcomp_distances.o: colvarcomp_distances.cpp \ + colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \ + colvarvalue.h colvarparse.h colvar.h colvardeps.h colvarcomp.h \ + colvaratoms.h +$(COLVARS_OBJ_DIR)colvarcomp_protein.o: colvarcomp_protein.cpp \ + colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \ + colvarvalue.h colvarparse.h colvar.h colvardeps.h colvarcomp.h \ + colvaratoms.h +$(COLVARS_OBJ_DIR)colvarcomp_rotations.o: colvarcomp_rotations.cpp \ + colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \ + colvarvalue.h colvarparse.h colvar.h colvardeps.h colvarcomp.h \ + colvaratoms.h +$(COLVARS_OBJ_DIR)colvar.o: colvar.cpp colvarmodule.h colvars_version.h \ + colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvar.h \ + colvardeps.h colvarcomp.h colvaratoms.h colvarscript.h colvarbias.h +$(COLVARS_OBJ_DIR)colvardeps.o: colvardeps.cpp colvardeps.h \ + colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \ + colvarvalue.h colvarparse.h +$(COLVARS_OBJ_DIR)colvargrid.o: colvargrid.cpp colvarmodule.h \ + colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \ + colvarparse.h colvar.h colvardeps.h colvarcomp.h colvaratoms.h \ + colvargrid.h +$(COLVARS_OBJ_DIR)colvarmodule.o: colvarmodule.cpp colvarmodule.h \ + colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \ + colvarparse.h colvar.h colvardeps.h colvarbias.h colvarbias_abf.h \ + colvargrid.h colvarbias_alb.h colvarbias_histogram.h colvarbias_meta.h \ + colvarbias_restraint.h colvarscript.h colvaratoms.h +$(COLVARS_OBJ_DIR)colvarparse.o: colvarparse.cpp colvarmodule.h \ + colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \ + colvarparse.h +$(COLVARS_OBJ_DIR)colvarproxy.o: colvarproxy.cpp colvarmodule.h \ + colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \ + colvarscript.h colvarbias.h colvar.h colvarparse.h colvardeps.h \ + colvaratoms.h +$(COLVARS_OBJ_DIR)colvarscript.o: colvarscript.cpp colvarscript.h \ + colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \ + colvarvalue.h colvarbias.h colvar.h colvarparse.h colvardeps.h +$(COLVARS_OBJ_DIR)colvartypes.o: colvartypes.cpp colvarmodule.h \ + colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \ + colvarparse.h +$(COLVARS_OBJ_DIR)colvarvalue.o: colvarvalue.cpp colvarmodule.h \ + colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h diff --git a/lib/colvars/Makefile.fermi b/lib/colvars/Makefile.fermi deleted file mode 100644 index 906675ae12..0000000000 --- a/lib/colvars/Makefile.fermi +++ /dev/null @@ -1,120 +0,0 @@ -# library build -*- makefile -*- for colvars module - -# which file will be copied to Makefile.lammps - -EXTRAMAKE = Makefile.lammps.empty - -# ------ SETTINGS ------ - -CXX = g++ -CXXFLAGS = -O2 -mpc64 -g -fPIC \ - -Wall -Wno-sign-compare # -DCOLVARS_DEBUG -ARCHIVE = ar -ARCHFLAG = -rscv -SHELL = /bin/sh - -# ------ DEFINITIONS ------ - -SRC = colvaratoms.cpp colvarbias_abf.cpp colvarbias_alb.cpp colvarbias.cpp \ - colvarbias_histogram.cpp colvarbias_meta.cpp colvarbias_restraint.cpp \ - colvarcomp_angles.cpp colvarcomp_coordnums.cpp colvarcomp.cpp \ - colvarcomp_distances.cpp colvarcomp_protein.cpp colvarcomp_rotations.cpp \ - colvardeps.cpp colvar.cpp colvargrid.cpp colvarmodule.cpp colvarparse.cpp \ - colvarscript.cpp colvartypes.cpp colvarvalue.cpp - -LIB = libcolvars.a -OBJ = $(SRC:.cpp=.o) -EXE = #colvars_standalone - -# ------ MAKE PROCEDURE ------ - -default: $(LIB) $(EXE) Makefile.lammps - -Makefile.lammps: - @cp $(EXTRAMAKE) Makefile.lammps - -$(LIB): $(OBJ) - $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) - -colvars_standalone: colvars_main.o colvarproxy_standalone.o $(LIB) - $(CXX) -o $@ $(CXXFLAGS) $^ - -# ------ MAKE FLAGS ------ - -.SUFFIXES: -.SUFFIXES: .cpp .o - -.PHONY: default clean - -# ------ COMPILE RULES ------ - -.cpp.o: - $(CXX) $(CXXFLAGS) -c $< - -# ------ DEPENDENCIES ------ -# -colvaratoms.o: colvaratoms.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvaratoms.h -colvarbias_abf.o: colvarbias_abf.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvar.h colvarparse.h colvardeps.h \ - colvarbias_abf.h colvarbias.h colvargrid.h -colvarbias_alb.o: colvarbias_alb.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarbias_alb.h colvar.h colvarparse.h \ - colvardeps.h colvarbias_restraint.h colvarbias.h -colvarbias.o: colvarbias.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarbias.h colvar.h colvarparse.h colvardeps.h -colvarbias_histogram.o: colvarbias_histogram.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvar.h colvarparse.h \ - colvardeps.h colvarbias_histogram.h colvarbias.h colvargrid.h -colvarbias_meta.o: colvarbias_meta.cpp colvar.h colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvarbias_meta.h colvarbias.h colvargrid.h -colvarbias_restraint.o: colvarbias_restraint.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarbias_restraint.h \ - colvarbias.h colvar.h colvarparse.h colvardeps.h -colvarcomp_angles.o: colvarcomp_angles.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvar.h colvarparse.h colvardeps.h \ - colvarcomp.h colvaratoms.h -colvarcomp_coordnums.o: colvarcomp_coordnums.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvaratoms.h colvar.h colvarcomp.h -colvarcomp.o: colvarcomp.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvar.h colvarparse.h colvardeps.h colvarcomp.h \ - colvaratoms.h -colvarcomp_distances.o: colvarcomp_distances.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvar.h colvarcomp.h colvaratoms.h -colvarcomp_protein.o: colvarcomp_protein.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h colvar.h \ - colvarcomp.h colvaratoms.h -colvarcomp_rotations.o: colvarcomp_rotations.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvar.h colvarcomp.h colvaratoms.h -colvar.o: colvar.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvar.h colvarcomp.h \ - colvaratoms.h colvarscript.h colvarbias.h -colvardeps.o: colvardeps.cpp colvardeps.h colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h -colvargrid.o: colvargrid.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvar.h colvarcomp.h \ - colvaratoms.h colvargrid.h -colvarmodule.o: colvarmodule.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h colvar.h \ - colvarbias.h colvarbias_abf.h colvargrid.h colvarbias_alb.h \ - colvarbias_restraint.h colvarbias_histogram.h colvarbias_meta.h \ - colvarscript.h -colvarparse.o: colvarparse.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h -colvarscript.o: colvarscript.cpp colvarscript.h colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarbias.h colvar.h \ - colvarparse.h colvardeps.h -colvartypes.o: colvartypes.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h -colvarvalue.o: colvarvalue.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h - -# ------ CLEAN ------ - -clean: - -rm *.o *~ $(LIB) - diff --git a/lib/colvars/Makefile.g++ b/lib/colvars/Makefile.g++ index c80fa1065e..cd7f72a833 100644 --- a/lib/colvars/Makefile.g++ +++ b/lib/colvars/Makefile.g++ @@ -1,119 +1,25 @@ -# library build -*- makefile -*- for colvars module - -# which file will be copied to Makefile.lammps +# -*- makefile -*- to build Colvars module with GNU compiler EXTRAMAKE = Makefile.lammps.empty -# ------ SETTINGS ------ +COLVARS_LIB = libcolvars.a +COLVARS_OBJ_DIR = CXX = g++ -CXXFLAGS = -O2 -g -fPIC -funroll-loops # -DCOLVARS_DEBUG -ARCHIVE = ar -ARCHFLAG = -rscv +CXXFLAGS = -O2 -g -Wall -fPIC -funroll-loops +AR = ar +ARFLAGS = -rscv SHELL = /bin/sh -# ------ DEFINITIONS ------ - -SRC = colvaratoms.cpp colvarbias_abf.cpp colvarbias_alb.cpp colvarbias.cpp \ - colvarbias_histogram.cpp colvarbias_meta.cpp colvarbias_restraint.cpp \ - colvarcomp_angles.cpp colvarcomp_coordnums.cpp colvarcomp.cpp \ - colvarcomp_distances.cpp colvarcomp_protein.cpp colvarcomp_rotations.cpp \ - colvardeps.cpp colvar.cpp colvargrid.cpp colvarmodule.cpp colvarparse.cpp \ - colvarscript.cpp colvartypes.cpp colvarvalue.cpp - -LIB = libcolvars.a -OBJ = $(SRC:.cpp=.o) -EXE = #colvars_standalone - -# ------ MAKE PROCEDURE ------ - -default: $(LIB) $(EXE) Makefile.lammps - -Makefile.lammps: - @cp $(EXTRAMAKE) Makefile.lammps - -$(LIB): $(OBJ) - $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) - -colvars_standalone: colvars_main.o colvarproxy_standalone.o $(LIB) - $(CXX) -o $@ $(CXXFLAGS) $^ - -# ------ MAKE FLAGS ------ - -.SUFFIXES: -.SUFFIXES: .cpp .o +include Makefile.common .PHONY: default clean -# ------ COMPILE RULES ------ - -.cpp.o: - $(CXX) $(CXXFLAGS) -c $< - -# ------ DEPENDENCIES ------ -# -colvaratoms.o: colvaratoms.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvaratoms.h -colvarbias_abf.o: colvarbias_abf.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvar.h colvarparse.h colvardeps.h \ - colvarbias_abf.h colvarbias.h colvargrid.h -colvarbias_alb.o: colvarbias_alb.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarbias_alb.h colvar.h colvarparse.h \ - colvardeps.h colvarbias_restraint.h colvarbias.h -colvarbias.o: colvarbias.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarbias.h colvar.h colvarparse.h colvardeps.h -colvarbias_histogram.o: colvarbias_histogram.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvar.h colvarparse.h \ - colvardeps.h colvarbias_histogram.h colvarbias.h colvargrid.h -colvarbias_meta.o: colvarbias_meta.cpp colvar.h colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvarbias_meta.h colvarbias.h colvargrid.h -colvarbias_restraint.o: colvarbias_restraint.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarbias_restraint.h \ - colvarbias.h colvar.h colvarparse.h colvardeps.h -colvarcomp_angles.o: colvarcomp_angles.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvar.h colvarparse.h colvardeps.h \ - colvarcomp.h colvaratoms.h -colvarcomp_coordnums.o: colvarcomp_coordnums.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvaratoms.h colvar.h colvarcomp.h -colvarcomp.o: colvarcomp.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvar.h colvarparse.h colvardeps.h colvarcomp.h \ - colvaratoms.h -colvarcomp_distances.o: colvarcomp_distances.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvar.h colvarcomp.h colvaratoms.h -colvarcomp_protein.o: colvarcomp_protein.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h colvar.h \ - colvarcomp.h colvaratoms.h -colvarcomp_rotations.o: colvarcomp_rotations.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvar.h colvarcomp.h colvaratoms.h -colvar.o: colvar.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvar.h colvarcomp.h \ - colvaratoms.h colvarscript.h colvarbias.h -colvardeps.o: colvardeps.cpp colvardeps.h colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h -colvargrid.o: colvargrid.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvar.h colvarcomp.h \ - colvaratoms.h colvargrid.h -colvarmodule.o: colvarmodule.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h colvar.h \ - colvarbias.h colvarbias_abf.h colvargrid.h colvarbias_alb.h \ - colvarbias_restraint.h colvarbias_histogram.h colvarbias_meta.h \ - colvarscript.h -colvarparse.o: colvarparse.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h -colvarscript.o: colvarscript.cpp colvarscript.h colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarbias.h colvar.h \ - colvarparse.h colvardeps.h -colvartypes.o: colvartypes.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h -colvarvalue.o: colvarvalue.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h - -# ------ CLEAN ------ +default: $(COLVARS_LIB) Makefile.lammps clean: - -rm *.o *~ $(LIB) + -rm -f $(COLVARS_OBJS) $(COLVARS_LIB) + +Makefile.lammps: + -cp $(EXTRAMAKE) Makefile.lammps diff --git a/lib/colvars/Makefile.g++-debug b/lib/colvars/Makefile.g++-debug new file mode 100644 index 0000000000..a6ca2f8124 --- /dev/null +++ b/lib/colvars/Makefile.g++-debug @@ -0,0 +1,5 @@ +# -*- makefile -*- to build Colvars module with GNU compiler + +COLVARS_DEBUG = "YES" + +include Makefile.g++ diff --git a/lib/colvars/Makefile.lammps b/lib/colvars/Makefile.lammps new file mode 100644 index 0000000000..99f57b050b --- /dev/null +++ b/lib/colvars/Makefile.lammps @@ -0,0 +1,5 @@ +# Settings that the LAMMPS build will import when this package library is used + +colvars_SYSINC = +colvars_SYSLIB = +colvars_SYSPATH = diff --git a/lib/colvars/Makefile.lammps.debug b/lib/colvars/Makefile.lammps.debug index 1ef229d58a..1c4399a2cd 100644 --- a/lib/colvars/Makefile.lammps.debug +++ b/lib/colvars/Makefile.lammps.debug @@ -1,5 +1,5 @@ # Settings that the LAMMPS build will import when this package library is used -colvars_SYSINC = # -DCOLVARS_DEBUG +colvars_SYSINC = -DCOLVARS_DEBUG colvars_SYSLIB = colvars_SYSPATH = diff --git a/lib/colvars/Makefile.lammps.empty b/lib/colvars/Makefile.lammps.empty index 1ef229d58a..99f57b050b 100644 --- a/lib/colvars/Makefile.lammps.empty +++ b/lib/colvars/Makefile.lammps.empty @@ -1,5 +1,5 @@ # Settings that the LAMMPS build will import when this package library is used -colvars_SYSINC = # -DCOLVARS_DEBUG +colvars_SYSINC = colvars_SYSLIB = colvars_SYSPATH = diff --git a/lib/colvars/Makefile.mingw32-cross b/lib/colvars/Makefile.mingw32-cross index eba83c555f..e2873ecdad 100644 --- a/lib/colvars/Makefile.mingw32-cross +++ b/lib/colvars/Makefile.mingw32-cross @@ -1,127 +1,31 @@ -# library build -*- makefile -*- for colvars module - -# which file will be copied to Makefile.lammps +# -*- makefile -*- to build Colvars module with MinGW 32-bit EXTRAMAKE = Makefile.lammps.empty -# ------ SETTINGS ------ +COLVARS_LIB = libcolvars.a +COLVARS_OBJ_DIR = Obj_mingw64/ CXX = i686-w64-mingw32-g++ CXXFLAGS = -O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \ -fno-rtti -fno-exceptions -finline-functions \ -ffast-math -funroll-loops -fstrict-aliasing \ -Wall -W -Wno-uninitialized -ARCHIVE = i686-w64-mingw32-ar -ARCHFLAG = -rscv +AR = i686-w64-mingw32-ar +ARFLAGS = -rscv SHELL = /bin/sh -# ------ DEFINITIONS ------ - -SRC = colvaratoms.cpp colvarbias_abf.cpp colvarbias_alb.cpp colvarbias.cpp \ - colvarbias_histogram.cpp colvarbias_meta.cpp colvarbias_restraint.cpp \ - colvarcomp_angles.cpp colvarcomp_coordnums.cpp colvarcomp.cpp \ - colvarcomp_distances.cpp colvarcomp_protein.cpp colvarcomp_rotations.cpp \ - colvardeps.cpp colvar.cpp colvargrid.cpp colvarmodule.cpp colvarparse.cpp \ - colvarscript.cpp colvartypes.cpp colvarvalue.cpp - -DIR = Obj_mingw32/ -LIB = $(DIR)libcolvars.a -OBJ = $(SRC:%.cpp=$(DIR)%.o) -EXE = #colvars_standalone - -# ------ MAKE PROCEDURE ------ - -default: $(DIR) $(LIB) $(EXE) Makefile.lammps - -$(DIR): - mkdir $(DIR) - -Makefile.lammps: - @cp $(EXTRAMAKE) Makefile.lammps - -$(LIB): $(DIR) $(OBJ) - $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) - @cp $(EXTRAMAKE) Makefile.lammps - -$(DIR)colvars_standalone: colvars_main.o colvarproxy_standalone.o $(LIB) - $(CXX) -o $@ $(CXXFLAGS) $^ - -# ------ MAKE FLAGS ------ - -.SUFFIXES: -.SUFFIXES: .cpp .o +include Makefile.common .PHONY: default clean -# ------ COMPILE RULES ------ +default: $(COLVARS_OBJ_DIR) $(COLVARS_LIB) Makefile.lammps -$(DIR)%.o: %.cpp - $(CXX) $(CXXFLAGS) -c $< -o $@ - -# ------ DEPENDENCIES ------ -# -$(DIR)colvaratoms.o: colvaratoms.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvaratoms.h -$(DIR)colvarbias_abf.o: colvarbias_abf.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvar.h colvarparse.h colvardeps.h \ - colvarbias_abf.h colvarbias.h colvargrid.h -$(DIR)colvarbias_alb.o: colvarbias_alb.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarbias_alb.h colvar.h colvarparse.h \ - colvardeps.h colvarbias_restraint.h colvarbias.h -$(DIR)colvarbias.o: colvarbias.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarbias.h colvar.h colvarparse.h colvardeps.h -$(DIR)colvarbias_histogram.o: colvarbias_histogram.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvar.h colvarparse.h \ - colvardeps.h colvarbias_histogram.h colvarbias.h colvargrid.h -$(DIR)colvarbias_meta.o: colvarbias_meta.cpp colvar.h colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvarbias_meta.h colvarbias.h colvargrid.h -$(DIR)colvarbias_restraint.o: colvarbias_restraint.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarbias_restraint.h \ - colvarbias.h colvar.h colvarparse.h colvardeps.h -$(DIR)colvarcomp_angles.o: colvarcomp_angles.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvar.h colvarparse.h colvardeps.h \ - colvarcomp.h colvaratoms.h -$(DIR)colvarcomp_coordnums.o: colvarcomp_coordnums.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvaratoms.h colvar.h colvarcomp.h -$(DIR)colvarcomp.o: colvarcomp.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvar.h colvarparse.h colvardeps.h colvarcomp.h \ - colvaratoms.h -$(DIR)colvarcomp_distances.o: colvarcomp_distances.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvar.h colvarcomp.h colvaratoms.h -$(DIR)colvarcomp_protein.o: colvarcomp_protein.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h colvar.h \ - colvarcomp.h colvaratoms.h -$(DIR)colvarcomp_rotations.o: colvarcomp_rotations.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvar.h colvarcomp.h colvaratoms.h -$(DIR)colvar.o: colvar.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvar.h colvarcomp.h \ - colvaratoms.h colvarscript.h colvarbias.h -$(DIR)colvardeps.o: colvardeps.cpp colvardeps.h colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h -$(DIR)colvargrid.o: colvargrid.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvar.h colvarcomp.h \ - colvaratoms.h colvargrid.h -$(DIR)colvarmodule.o: colvarmodule.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h colvar.h \ - colvarbias.h colvarbias_abf.h colvargrid.h colvarbias_alb.h \ - colvarbias_restraint.h colvarbias_histogram.h colvarbias_meta.h \ - colvarscript.h -$(DIR)colvarparse.o: colvarparse.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h -$(DIR)colvarscript.o: colvarscript.cpp colvarscript.h colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarbias.h colvar.h \ - colvarparse.h colvardeps.h -$(DIR)colvartypes.o: colvartypes.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h -$(DIR)colvarvalue.o: colvarvalue.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h - -# ------ CLEAN ------ +$(COLVARS_OBJ_DIR): + mkdir $(COLVARS_OBJ_DIR) clean: - -rm $(DIR)*.o *~ $(LIB) - -rmdir $(DIR) + -rm -f $(COLVARS_OBJS) $(COLVARS_LIB) + -rmdir $(COLVARS_OBJ_DIR) + +Makefile.lammps: + -cp $(EXTRAMAKE) Makefile.lammps diff --git a/lib/colvars/Makefile.mingw64-cross b/lib/colvars/Makefile.mingw64-cross index 1d83b6a0a8..09d6bd4fa9 100644 --- a/lib/colvars/Makefile.mingw64-cross +++ b/lib/colvars/Makefile.mingw64-cross @@ -1,127 +1,31 @@ -# library build -*- makefile -*- for colvars module - -# which file will be copied to Makefile.lammps +# -*- makefile -*- to build Colvars module with MinGW 32-bit EXTRAMAKE = Makefile.lammps.empty -# ------ SETTINGS ------ +COLVARS_LIB = libcolvars.a +COLVARS_OBJ_DIR = Obj_mingw32/ CXX = x86_64-w64-mingw32-g++ CXXFLAGS = -O2 -march=core2 -mtune=core2 -mpc64 -msse2 \ -fno-rtti -fno-exceptions -finline-functions \ -ffast-math -funroll-loops -fstrict-aliasing \ -Wall -W -Wno-uninitialized -ARCHIVE = x86_64-w64-mingw32-ar -ARCHFLAG = -rscv +AR = x86_64-w64-mingw32-ar +ARFLAGS = -rscv SHELL = /bin/sh -# ------ DEFINITIONS ------ - -SRC = colvaratoms.cpp colvarbias_abf.cpp colvarbias_alb.cpp colvarbias.cpp \ - colvarbias_histogram.cpp colvarbias_meta.cpp colvarbias_restraint.cpp \ - colvarcomp_angles.cpp colvarcomp_coordnums.cpp colvarcomp.cpp \ - colvarcomp_distances.cpp colvarcomp_protein.cpp colvarcomp_rotations.cpp \ - colvardeps.cpp colvar.cpp colvargrid.cpp colvarmodule.cpp colvarparse.cpp \ - colvarscript.cpp colvartypes.cpp colvarvalue.cpp - -DIR = Obj_mingw64/ -LIB = $(DIR)libcolvars.a -OBJ = $(SRC:%.cpp=$(DIR)%.o) -EXE = #colvars_standalone - -# ------ MAKE PROCEDURE ------ - -default: $(DIR) $(LIB) $(EXE) Makefile.lammps - -$(DIR): - mkdir $(DIR) - -Makefile.lammps: - @cp $(EXTRAMAKE) Makefile.lammps - -$(LIB): $(DIR) $(OBJ) - $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) - @cp $(EXTRAMAKE) Makefile.lammps - -$(DIR)colvars_standalone: colvars_main.o colvarproxy_standalone.o $(LIB) - $(CXX) -o $@ $(CXXFLAGS) $^ - -# ------ MAKE FLAGS ------ - -.SUFFIXES: -.SUFFIXES: .cpp .o +include Makefile.common .PHONY: default clean -# ------ COMPILE RULES ------ +default: $(COLVARS_OBJ_DIR) $(COLVARS_LIB) Makefile.lammps -$(DIR)%.o: %.cpp - $(CXX) $(CXXFLAGS) -c $< -o $@ - -# ------ DEPENDENCIES ------ -# -$(DIR)colvaratoms.o: colvaratoms.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvaratoms.h -$(DIR)colvarbias_abf.o: colvarbias_abf.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvar.h colvarparse.h colvardeps.h \ - colvarbias_abf.h colvarbias.h colvargrid.h -$(DIR)colvarbias_alb.o: colvarbias_alb.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarbias_alb.h colvar.h colvarparse.h \ - colvardeps.h colvarbias_restraint.h colvarbias.h -$(DIR)colvarbias.o: colvarbias.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarbias.h colvar.h colvarparse.h colvardeps.h -$(DIR)colvarbias_histogram.o: colvarbias_histogram.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvar.h colvarparse.h \ - colvardeps.h colvarbias_histogram.h colvarbias.h colvargrid.h -$(DIR)colvarbias_meta.o: colvarbias_meta.cpp colvar.h colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvarbias_meta.h colvarbias.h colvargrid.h -$(DIR)colvarbias_restraint.o: colvarbias_restraint.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarbias_restraint.h \ - colvarbias.h colvar.h colvarparse.h colvardeps.h -$(DIR)colvarcomp_angles.o: colvarcomp_angles.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvar.h colvarparse.h colvardeps.h \ - colvarcomp.h colvaratoms.h -$(DIR)colvarcomp_coordnums.o: colvarcomp_coordnums.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvaratoms.h colvar.h colvarcomp.h -$(DIR)colvarcomp.o: colvarcomp.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvar.h colvarparse.h colvardeps.h colvarcomp.h \ - colvaratoms.h -$(DIR)colvarcomp_distances.o: colvarcomp_distances.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvar.h colvarcomp.h colvaratoms.h -$(DIR)colvarcomp_protein.o: colvarcomp_protein.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h colvar.h \ - colvarcomp.h colvaratoms.h -$(DIR)colvarcomp_rotations.o: colvarcomp_rotations.cpp colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h \ - colvar.h colvarcomp.h colvaratoms.h -$(DIR)colvar.o: colvar.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvar.h colvarcomp.h \ - colvaratoms.h colvarscript.h colvarbias.h -$(DIR)colvardeps.o: colvardeps.cpp colvardeps.h colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h -$(DIR)colvargrid.o: colvargrid.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h colvardeps.h colvar.h colvarcomp.h \ - colvaratoms.h colvargrid.h -$(DIR)colvarmodule.o: colvarmodule.cpp colvarmodule.h colvartypes.h \ - colvarproxy.h colvarvalue.h colvarparse.h colvardeps.h colvar.h \ - colvarbias.h colvarbias_abf.h colvargrid.h colvarbias_alb.h \ - colvarbias_restraint.h colvarbias_histogram.h colvarbias_meta.h \ - colvarscript.h -$(DIR)colvarparse.o: colvarparse.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h -$(DIR)colvarscript.o: colvarscript.cpp colvarscript.h colvarmodule.h \ - colvartypes.h colvarproxy.h colvarvalue.h colvarbias.h colvar.h \ - colvarparse.h colvardeps.h -$(DIR)colvartypes.o: colvartypes.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h colvarparse.h -$(DIR)colvarvalue.o: colvarvalue.cpp colvarmodule.h colvartypes.h colvarproxy.h \ - colvarvalue.h - -# ------ CLEAN ------ +$(COLVARS_OBJ_DIR): + mkdir $(COLVARS_OBJ_DIR) clean: - -rm $(DIR)*.o *~ $(LIB) - -rmdir $(DIR) + -rm -f $(COLVARS_OBJS) $(COLVARS_LIB) + -rmdir $(COLVARS_OBJ_DIR) + +Makefile.lammps: + -cp $(EXTRAMAKE) Makefile.lammps diff --git a/lib/colvars/README b/lib/colvars/README index a5e5938b20..a4f04221b3 100644 --- a/lib/colvars/README +++ b/lib/colvars/README @@ -1,49 +1,35 @@ -This library is the portable "colvars" module, originally interfaced -with the NAMD MD code, to provide an extensible software framework, -that allows enhanced sampling in molecular dynamics simulations. -The module is written to maximize performance, portability, -flexibility of usage for the user, and extensibility for the developer. +## Collective variables module (Colvars) -The development of the colvars library is now hosted on github at: -http://colvars.github.io/ -You can use this site to get access to the latest development sources -and the up-to-date documentation. +A software module for molecular simulation and analysis that provides a +high-performance implementation of sampling algorithms defined on a reduced +space of continuously differentiable functions (aka collective variables). -Copy of the specific documentation is also in - doc/PDF/colvars-refman-lammps.pdf +The module itself implements a variety of functions and algorithms, including +free-energy estimators based on thermodynamic forces, non-equilibrium work and +probability distributions. -Please report bugs and request new features at: -https://github.com/colvars/colvars/issues - -The following publications describe the principles of -the implementation of this library: +For a brief description see: + http://colvars.github.io/ + https://github.com/colvars/colvars/ - Using collective variables to drive molecular dynamics simulations, - Giacomo Fiorin , Michael L. Klein & Jérôme Hénin (2013): - Molecular Physics DOI:10.1080/00268976.2013.813594 - Exploring Multidimensional Free Energy Landscapes Using - Time-Dependent Biases on Collective Variables, - J. Hénin, G. Fiorin, C. Chipot, and M. L. Klein, - J. Chem. Theory Comput., 6, 35-47 (2010). - -------------------------------------------------- +## How to build This directory has source files to build a library that LAMMPS links against when using the USER-COLVARS package. -This library must be built with a C++ compiler, before LAMMPS is -built, so LAMMPS can link against it. +This library must be built with a C++ compiler, *before* LAMMPS is built, so +that LAMMPS can link against it. You can use the provided Makefile.* files or +create your own, specific to your compiler and system. For example: -You can type "make lib-colvars" from the src directory to see help on -how to build this library via make commands, or you can do the same -thing by typing "python Install.py" from within this directory, or you -can do it manually by following the instructions below. + make -f Makefile.g++ -Build the library using one of the provided Makefile.* files or create -your own, specific to your compiler and system. For example: +will use the GNU C++ compiler and is a good template to start. -make -f Makefile.g++ +**Optional**: if you use the Install.py script provided in this folder, you +can give the machine name as the '-m' argument. This can be the suffix of one +of the files from either this folder, or from src/MAKE. +*This is only supported by the Install.py within the lib/colvars folder*. When you are done building this library, two files should exist in this directory: @@ -51,23 +37,42 @@ exist in this directory: libcolvars.a the library LAMMPS will link against Makefile.lammps settings the LAMMPS Makefile will import -Makefile.lammps is created by the make command, by copying one of the -Makefile.lammps.* files. See the EXTRAMAKE setting at the top of the -Makefile.* files. - IMPORTANT: You must examine the final Makefile.lammps to insure it is correct for your system, else the LAMMPS build will likely fail. -Makefile.lammps has settings for 3 variables: +If you want to set a debug flag recognized by the library, the +settings in Makefile.common should work. -user-colvars_SYSINC = leave blank for this package unless debugging -user-colvars_SYSLIB = leave blank for this package -user-colvars_SYSPATH = leave blank for this package -You have several choices for these settings: +## Documentation -Since they do not normally need to be set, the settings in -Makefile.lammps.empty should work. +For the reference manual see: + http://colvars.github.io/colvars-refman-lammps + +A copy of reference manual is also in: + doc/PDF/colvars-refman-lammps.pdf + +Also included is a Doxygen-based developer documentation: + http://colvars.github.io/doxygen/html/ + +The reference article is: + G. Fiorin, M. L. Klein, and J. Henin, + Molecular Physics 111, 3345 (2013). + http://dx.doi.org/10.1080/00268976.2013.813594 + + +## Updating to the latest version + +To recompile LAMMPS with the most recent version of this module, the `master` +branch of this repository from GitHub, or clone it via git: + + git clone https://github.com/colvars/colvars.git + +and run the provided `update-colvars-code.sh` script against the unpacked +LAMMPS source tree: + + ./update-colvars-code.sh /path/to/lammps/folder + +Please report bugs and request new features at: +https://github.com/colvars/colvars/issues -If you want to set a debug flag recognized by the library, the -settings in Makefile.lammps.debug should work. diff --git a/lib/colvars/colvar.cpp b/lib/colvars/colvar.cpp index e8c7e88324..d23bd852aa 100644 --- a/lib/colvars/colvar.cpp +++ b/lib/colvars/colvar.cpp @@ -1,5 +1,5 @@ - // -*- c++ -*- + // This file is part of the Collective Variables module (Colvars). // The original version of Colvars and its updates are located at: // https://github.com/colvars/colvars @@ -7,13 +7,14 @@ // If you wish to distribute your changes, please submit them to the // Colvars repository at GitHub. - #include "colvarmodule.h" #include "colvarvalue.h" #include "colvarparse.h" #include "colvar.h" #include "colvarcomp.h" #include "colvarscript.h" + +// used in build_atom_list() #include @@ -25,8 +26,10 @@ bool compare(colvar::cvc *i, colvar::cvc *j) { colvar::colvar() + : prev_timestep(-1) { // Initialize static array once and for all + runave_os = NULL; init_cv_requires(); } @@ -66,6 +69,13 @@ int colvar::init(std::string const &conf) size_t i; +#ifdef LEPTON + error_code |= init_custom_function(conf); + if (error_code != COLVARS_OK) { + return cvm::get_error(); + } +#endif + // Setup colvar as scripted function of components if (get_keyval(conf, "scriptedFunction", scripted_function, "", colvarparse::parse_silent)) { @@ -122,7 +132,7 @@ int colvar::init(std::string const &conf) } } - if (!is_enabled(f_cv_scripted)) { + if (!(is_enabled(f_cv_scripted) || is_enabled(f_cv_custom_function))) { colvarvalue const &cvc_value = (cvcs[0])->value(); if (cvm::debug()) cvm::log ("This collective variable is a "+ @@ -141,7 +151,7 @@ int colvar::init(std::string const &conf) // check for linear combinations { - bool lin = !is_enabled(f_cv_scripted); + bool lin = !(is_enabled(f_cv_scripted) || is_enabled(f_cv_custom_function)); for (i = 0; i < cvcs.size(); i++) { // FIXME this is a reverse dependency, ie. cv feature depends on cvc flag @@ -206,7 +216,7 @@ int colvar::init(std::string const &conf) for (i = 0; i < cvcs.size(); i++) { // components may have different types only for scripted functions - if (!is_enabled(f_cv_scripted) && (colvarvalue::check_types(cvcs[i]->value(), + if (!(is_enabled(f_cv_scripted) || is_enabled(f_cv_custom_function)) && (colvarvalue::check_types(cvcs[i]->value(), cvcs[0]->value())) ) { cvm::error("ERROR: you are definining this collective variable " "by using components of different types. " @@ -223,7 +233,6 @@ int colvar::init(std::string const &conf) // at this point, the colvar's type is defined f.type(value()); - f_accumulated.type(value()); x_old.type(value()); v_fdiff.type(value()); @@ -239,18 +248,23 @@ int colvar::init(std::string const &conf) reset_bias_force(); + get_keyval(conf, "timeStepFactor", time_step_factor, 1); + if (time_step_factor < 0) { + cvm::error("Error: timeStepFactor must be positive.\n"); + return COLVARS_ERROR; + } + if (time_step_factor != 1) { + enable(f_cv_multiple_ts); + } + // TODO use here information from the CVCs' own natural boundaries error_code |= init_grid_parameters(conf); - get_keyval(conf, "timeStepFactor", time_step_factor, 1); - error_code |= init_extended_Lagrangian(conf); error_code |= init_output_flags(conf); - // Start in active state by default + // Now that the children are defined we can solve dependencies enable(f_cv_active); - // Make sure dependency side-effects are correct - refresh_deps(); if (cvm::b_analysis) parse_analysis(conf); @@ -262,6 +276,158 @@ int colvar::init(std::string const &conf) } +#ifdef LEPTON +int colvar::init_custom_function(std::string const &conf) +{ + std::string expr; + std::vector pexprs; + Lepton::ParsedExpression pexpr; + size_t pos = 0; // current position in config string + double *ref; + + if (!key_lookup(conf, "customFunction", &expr, &pos)) { + return COLVARS_OK; + } + + enable(f_cv_custom_function); + cvm::log("This colvar uses a custom function.\n"); + + do { + if (cvm::debug()) + cvm::log("Parsing expression \"" + expr + "\".\n"); + try { + pexpr = Lepton::Parser::parse(expr); + pexprs.push_back(pexpr); + } + catch (...) { + cvm::error("Error parsing expression \"" + expr + "\".\n", INPUT_ERROR); + return INPUT_ERROR; + } + + try { + value_evaluators.push_back( + new Lepton::CompiledExpression(pexpr.createCompiledExpression())); + // Define variables for cvc values + // Stored in order: expr1, cvc1, cvc2, expr2, cvc1... + for (size_t i = 0; i < cvcs.size(); i++) { + for (size_t j = 0; j < cvcs[i]->value().size(); j++) { + std::string vn = cvcs[i]->name + + (cvcs[i]->value().size() > 1 ? cvm::to_str(j+1) : ""); + try { + ref =&value_evaluators.back()->getVariableReference(vn); + } + catch (...) { // Variable is absent from expression + // To keep the same workflow, we use a pointer to a double here + // that will receive CVC values - even though none was allocated by Lepton + ref = &dev_null; + if (cvm::debug()) + cvm::log("Variable " + vn + " is absent from expression \"" + expr + "\".\n"); + } + value_eval_var_refs.push_back(ref); + } + } + } + catch (...) { + cvm::error("Error compiling expression \"" + expr + "\".\n", INPUT_ERROR); + return INPUT_ERROR; + } + } while (key_lookup(conf, "customFunction", &expr, &pos)); + + + // Now define derivative with respect to each scalar sub-component + for (size_t i = 0; i < cvcs.size(); i++) { + for (size_t j = 0; j < cvcs[i]->value().size(); j++) { + std::string vn = cvcs[i]->name + + (cvcs[i]->value().size() > 1 ? cvm::to_str(j+1) : ""); + // Element ordering: we want the + // gradient vector of derivatives of all elements of the colvar + // wrt to a given element of a cvc ([i][j]) + for (size_t c = 0; c < pexprs.size(); c++) { + gradient_evaluators.push_back( + new Lepton::CompiledExpression(pexprs[c].differentiate(vn).createCompiledExpression())); + // and record the refs to each variable in those expressions + for (size_t k = 0; k < cvcs.size(); k++) { + for (size_t l = 0; l < cvcs[k]->value().size(); l++) { + std::string vvn = cvcs[k]->name + + (cvcs[k]->value().size() > 1 ? cvm::to_str(l+1) : ""); + try { + ref = &gradient_evaluators.back()->getVariableReference(vvn); + } + catch (...) { // Variable is absent from derivative + // To keep the same workflow, we use a pointer to a double here + // that will receive CVC values - even though none was allocated by Lepton + if (cvm::debug()) + cvm::log("Variable " + vvn + " is absent from derivative of \"" + expr + "\" wrt " + vn + ".\n"); + ref = &dev_null; + } + grad_eval_var_refs.push_back(ref); + } + } + } + } + } + + + if (value_evaluators.size() == 0) { + cvm::error("Error: no custom function defined.\n", INPUT_ERROR); + return INPUT_ERROR; + } + + std::string type_str; + bool b_type_specified = get_keyval(conf, "customFunctionType", + type_str, "scalar", parse_silent); + x.type(colvarvalue::type_notset); + int t; + for (t = 0; t < colvarvalue::type_all; t++) { + if (type_str == colvarvalue::type_keyword(colvarvalue::Type(t))) { + x.type(colvarvalue::Type(t)); + break; + } + } + if (x.type() == colvarvalue::type_notset) { + cvm::error("Could not parse custom colvar type.", INPUT_ERROR); + return INPUT_ERROR; + } + + // Guess type based on number of expressions + if (!b_type_specified) { + if (value_evaluators.size() == 1) { + x.type(colvarvalue::type_scalar); + } else { + x.type(colvarvalue::type_vector); + } + } + + if (x.type() == colvarvalue::type_vector) { + x.vector1d_value.resize(value_evaluators.size()); + } + + x_reported.type(x); + cvm::log(std::string("Expecting colvar value of type ") + + colvarvalue::type_desc(x.type()) + + (x.type()==colvarvalue::type_vector ? " of size " + cvm::to_str(x.size()) : "") + + ".\n"); + + if (x.size() != value_evaluators.size()) { + cvm::error("Error: based on custom function type, expected " + + cvm::to_str(x.size()) + " scalar expressions, but " + + cvm::to_str(value_evaluators.size() + " were found.\n")); + return INPUT_ERROR; + } + + return COLVARS_OK; +} + +#else + +int colvar::init_custom_function(std::string const &conf) +{ + return COLVARS_OK; +} + +#endif // #ifdef LEPTON + + int colvar::init_grid_parameters(std::string const &conf) { colvarmodule *cv = cvm::main(); @@ -326,7 +492,8 @@ int colvar::init_grid_parameters(std::string const &conf) std::string const walls_conf("\n\ harmonicWalls {\n\ name "+this->name+"w\n\ - colvars "+this->name+"\n"+lw_conf+uw_conf+ + colvars "+this->name+"\n"+lw_conf+uw_conf+"\ + timeStepFactor "+cvm::to_str(time_step_factor)+"\n"+ "}\n"); cv->append_new_config(walls_conf); } @@ -372,17 +539,14 @@ harmonicWalls {\n\ int colvar::init_extended_Lagrangian(std::string const &conf) { - bool b_extended_Lagrangian; - get_keyval(conf, "extendedLagrangian", b_extended_Lagrangian, false); + get_keyval_feature(this, conf, "extendedLagrangian", f_cv_extended_Lagrangian, false); - if (b_extended_Lagrangian) { + if (is_enabled(f_cv_extended_Lagrangian)) { cvm::real temp, tolerance, period; cvm::log("Enabling the extended Lagrangian term for colvar \""+ this->name+"\".\n"); - enable(f_cv_extended_Lagrangian); - xr.type(value()); vr.type(value()); fr.type(value()); @@ -404,7 +568,7 @@ int colvar::init_extended_Lagrangian(std::string const &conf) return INPUT_ERROR; } ext_force_k = cvm::boltzmann() * temp / (tolerance * tolerance); - cvm::log("Computed extended system force constant: " + cvm::to_str(ext_force_k) + " kcal/mol/U^2"); + cvm::log("Computed extended system force constant: " + cvm::to_str(ext_force_k) + " [E]/U^2"); get_keyval(conf, "extendedTimeConstant", period, 200.0); if (period <= 0.0) { @@ -412,7 +576,7 @@ int colvar::init_extended_Lagrangian(std::string const &conf) } ext_mass = (cvm::boltzmann() * temp * period * period) / (4.0 * PI * PI * tolerance * tolerance); - cvm::log("Computed fictitious mass: " + cvm::to_str(ext_mass) + " kcal/mol/(U/fs)^2 (U: colvar unit)"); + cvm::log("Computed fictitious mass: " + cvm::to_str(ext_mass) + " [E]/(U/fs)^2 (U: colvar unit)"); { bool b_output_energy; @@ -429,8 +593,9 @@ int colvar::init_extended_Lagrangian(std::string const &conf) } if (ext_gamma != 0.0) { enable(f_cv_Langevin); - ext_gamma *= 1.0e-3; // convert from ps-1 to fs-1 - ext_sigma = std::sqrt(2.0 * cvm::boltzmann() * temp * ext_gamma * ext_mass / cvm::dt()); + ext_gamma *= 1.0e-3; // correct as long as input is required in ps-1 and cvm::dt() is in fs + // Adjust Langevin sigma for slow time step if time_step_factor != 1 + ext_sigma = std::sqrt(2.0 * cvm::boltzmann() * temp * ext_gamma * ext_mass / (cvm::dt() * cvm::real(time_step_factor))); } } @@ -486,8 +651,8 @@ template int colvar::init_components_type(std::string c size_t pos = 0; while ( this->key_lookup(conf, def_config_key, - def_conf, - pos) ) { + &def_conf, + &pos) ) { if (!def_conf.size()) continue; cvm::log("Initializing " "a new \""+std::string(def_config_key)+"\" component"+ @@ -514,6 +679,7 @@ template int colvar::init_components_type(std::string c if ( (cvcp->period != 0.0) || (cvcp->wrap_center != 0.0) ) { if ( (cvcp->function_type != std::string("distance_z")) && (cvcp->function_type != std::string("dihedral")) && + (cvcp->function_type != std::string("polar_phi")) && (cvcp->function_type != std::string("spin_angle")) ) { cvm::error("Error: invalid use of period and/or " "wrapAround in a \""+ @@ -566,6 +732,10 @@ int colvar::init_components(std::string const &conf) "on an axis", "distanceZ"); error_code |= init_components_type(conf, "distance projection " "on a plane", "distanceXY"); + error_code |= init_components_type(conf, "spherical polar angle theta", + "polarTheta"); + error_code |= init_components_type(conf, "spherical azimuthal angle phi", + "polarPhi"); error_code |= init_components_type(conf, "average distance " "weighted by inverse power", "distanceInv"); error_code |= init_components_type(conf, "N1xN2-long vector " @@ -618,16 +788,18 @@ int colvar::init_components(std::string const &conf) } -int colvar::refresh_deps() +void colvar::do_feature_side_effects(int id) { - // If enabled features are changed upstream, the features below should be refreshed - if (is_enabled(f_cv_total_force_calc)) { - cvm::request_total_force(); - } - if (is_enabled(f_cv_collect_gradient) && atom_ids.size() == 0) { - build_atom_list(); + switch (id) { + case f_cv_total_force_calc: + cvm::request_total_force(); + break; + case f_cv_collect_gradient: + if (atom_ids.size() == 0) { + build_atom_list(); + } + break; } - return COLVARS_OK; } @@ -688,20 +860,19 @@ int colvar::parse_analysis(std::string const &conf) cvm::error("Error: runAveStride must be commensurate with the restart frequency.\n", INPUT_ERROR); } - std::string runave_outfile; get_keyval(conf, "runAveOutputFile", runave_outfile, std::string(cvm::output_prefix()+"."+ this->name+".runave.traj")); size_t const this_cv_width = x.output_width(cvm::cv_width); - cvm::backup_file(runave_outfile.c_str()); - runave_os.open(runave_outfile.c_str()); - runave_os << "# " << cvm::wrap_string("step", cvm::it_width-2) - << " " - << cvm::wrap_string("running average", this_cv_width) - << " " - << cvm::wrap_string("running stddev", this_cv_width) - << "\n"; + cvm::proxy->backup_file(runave_outfile); + runave_os = cvm::proxy->output_stream(runave_outfile); + *runave_os << "# " << cvm::wrap_string("step", cvm::it_width-2) + << " " + << cvm::wrap_string("running average", this_cv_width) + << " " + << cvm::wrap_string("running stddev", this_cv_width) + << "\n"; } acf_length = 0; @@ -768,6 +939,10 @@ void colvar::setup() { colvar::~colvar() { + // There is no need to call free_children_deps() here + // because the children are cvcs and will be deleted + // just below + // Clear references to this colvar's cvcs as children // for dependency purposes remove_all_children(); @@ -792,6 +967,22 @@ colvar::~colvar() break; } } + +#ifdef LEPTON + for (std::vector::iterator cei = value_evaluators.begin(); + cei != value_evaluators.end(); + ++cei) { + if (*cei != NULL) delete (*cei); + } + value_evaluators.clear(); + + for (std::vector::iterator gei = gradient_evaluators.begin(); + gei != gradient_evaluators.end(); + ++gei) { + if (*gei != NULL) delete (*gei); + } + gradient_evaluators.clear(); +#endif } @@ -911,7 +1102,6 @@ int colvar::calc_cvc_values(int first_cvc, size_t num_cvcs) int colvar::collect_cvc_values() { x.reset(); - size_t i; // combine them appropriately, using either a scripted function or a polynomial if (is_enabled(f_cv_scripted)) { @@ -925,9 +1115,26 @@ int colvar::collect_cvc_values() cvm::error("Error running scripted colvar"); return COLVARS_OK; } + +#ifdef LEPTON + } else if (is_enabled(f_cv_custom_function)) { + + size_t l = 0; // index in the vector of variable references + + for (size_t i = 0; i < x.size(); i++) { + // Fill Lepton evaluator variables with CVC values, serialized into scalars + for (size_t j = 0; j < cvcs.size(); j++) { + for (size_t k = 0; k < cvcs[j]->value().size(); k++) { + *(value_eval_var_refs[l++]) = cvcs[j]->value()[k]; + } + } + x[i] = value_evaluators[i]->evaluate(); + } +#endif + } else if (x.type() == colvarvalue::type_scalar) { // polynomial combination allowed - for (i = 0; i < cvcs.size(); i++) { + for (size_t i = 0; i < cvcs.size(); i++) { if (!cvcs[i]->is_enabled()) continue; x += (cvcs[i])->sup_coeff * ( ((cvcs[i])->sup_np != 1) ? @@ -935,7 +1142,7 @@ int colvar::collect_cvc_values() (cvcs[i])->value().real_value ); } } else { - for (i = 0; i < cvcs.size(); i++) { + for (size_t i = 0; i < cvcs.size(); i++) { if (!cvcs[i]->is_enabled()) continue; x += (cvcs[i])->sup_coeff * (cvcs[i])->value(); } @@ -984,16 +1191,9 @@ int colvar::calc_cvc_gradients(int first_cvc, size_t num_cvcs) (cvcs[i])->calc_gradients(); // if requested, propagate (via chain rule) the gradients above // to the atoms used to define the roto-translation - // This could be integrated in the CVC base class - for (size_t ig = 0; ig < cvcs[i]->atom_groups.size(); ig++) { - if (cvcs[i]->atom_groups[ig]->b_fit_gradients) - cvcs[i]->atom_groups[ig]->calc_fit_gradients(); - - if (cvcs[i]->is_enabled(f_cvc_debug_gradient)) { - cvm::log("Debugging gradients for " + cvcs[i]->description); - cvcs[i]->debug_gradients(cvcs[i]->atom_groups[ig]); - } - } + (cvcs[i])->calc_fit_gradients(); + if ((cvcs[i])->is_enabled(f_cvc_debug_gradient)) + (cvcs[i])->debug_gradients(); } cvm::decrease_depth(); @@ -1011,13 +1211,6 @@ int colvar::collect_cvc_gradients() size_t i; if (is_enabled(f_cv_collect_gradient)) { - - if (is_enabled(f_cv_scripted)) { - cvm::error("Collecting atomic gradients is not implemented for " - "scripted colvars.", COLVARS_NOT_IMPLEMENTED); - return COLVARS_NOT_IMPLEMENTED; - } - // Collect the atomic gradients inside colvar object for (unsigned int a = 0; a < atomic_gradients.size(); a++) { atomic_gradients[a].reset(); @@ -1214,6 +1407,11 @@ cvm::real colvar::update_forces_energy() // set to zero the applied force f.type(value()); f.reset(); + fr.reset(); + + // If we are not active at this timestep, that's all we have to do + // return with energy == zero + if (!is_enabled(f_cv_active)) return 0.; // add the biases' force, which at this point should already have // been summed over each bias using this colvar @@ -1236,7 +1434,24 @@ cvm::real colvar::update_forces_energy() cvm::log("Updating extended-Lagrangian degree of freedom.\n"); } - cvm::real dt = cvm::dt(); + if (prev_timestep > -1) { + // Keep track of slow timestep to integrate MTS colvars + // the colvar checks the interval after waking up twice + int n_timesteps = cvm::step_relative() - prev_timestep; + if (n_timesteps != 0 && n_timesteps != time_step_factor) { + cvm::error("Error: extended-Lagrangian " + description + " has timeStepFactor " + + cvm::to_str(time_step_factor) + ", but was activated after " + cvm::to_str(n_timesteps) + + " steps at timestep " + cvm::to_str(cvm::step_absolute()) + " (relative step: " + + cvm::to_str(cvm::step_relative()) + ").\n" + + "Make sure that this colvar is requested by biases at multiples of timeStepFactor.\n"); + return 0.; + } + } + prev_timestep = cvm::step_relative(); + + // Integrate with slow timestep (if time_step_factor != 1) + cvm::real dt = cvm::dt() * cvm::real(time_step_factor); + colvarvalue f_ext(fr.type()); // force acting on the extended variable f_ext.reset(); @@ -1248,18 +1463,17 @@ cvm::real colvar::update_forces_energy() // - after this code block, colvar force to be applied to atomic coordinates // ie. spring force (fb_actual will be added just below) fr = f; - f_ext = f + (-0.5 * ext_force_k) * this->dist2_lgrad(xr, x); - f = (-0.5 * ext_force_k) * this->dist2_rgrad(xr, x); - - if (is_enabled(f_cv_subtract_applied_force)) { - // Report a "system" force without the biases on this colvar - // that is, just the spring force - ft_reported = (-0.5 * ext_force_k) * this->dist2_lgrad(xr, x); - } else { - // The total force acting on the extended variable is f_ext - // This will be used in the next timestep - ft_reported = f_ext; - } + // External force has been scaled for a 1-timestep impulse, scale it back because we will + // integrate it with the colvar's own timestep factor + f_ext = f / cvm::real(time_step_factor); + f_ext += (-0.5 * ext_force_k) * this->dist2_lgrad(xr, x); + f = (-0.5 * ext_force_k) * this->dist2_rgrad(xr, x); + // Coupling force is a slow force, to be applied to atomic coords impulse-style + f *= cvm::real(time_step_factor); + + // The total force acting on the extended variable is f_ext + // This will be used in the next timestep + ft_reported = f_ext; // leapfrog: starting from x_i, f_i, v_(i-1/2) vr += (0.5 * dt) * f_ext / ext_mass; @@ -1279,13 +1493,10 @@ cvm::real colvar::update_forces_energy() if (this->is_enabled(f_cv_periodic)) this->wrap(xr); } - // Now adding the force on the actual colvar (for those biases who + // Now adding the force on the actual colvar (for those biases that // bypass the extended Lagrangian mass) f += fb_actual; - // Store force to be applied, possibly summed over several timesteps - f_accumulated += f; - if (is_enabled(f_cv_fdiff_velocity)) { // set it for the next step x_old = x; @@ -1306,7 +1517,7 @@ void colvar::communicate_forces() size_t i; if (cvm::debug()) { cvm::log("Communicating forces from colvar \""+this->name+"\".\n"); - cvm::log("Force to be applied: " + cvm::to_str(f_accumulated) + "\n"); + cvm::log("Force to be applied: " + cvm::to_str(f) + "\n"); } if (is_enabled(f_cv_scripted)) { @@ -1333,14 +1544,42 @@ void colvar::communicate_forces() if (!cvcs[i]->is_enabled()) continue; // cvc force is colvar force times colvar/cvc Jacobian // (vector-matrix product) - (cvcs[i])->apply_force(colvarvalue(f_accumulated.as_vector() * func_grads[grad_index++], + (cvcs[i])->apply_force(colvarvalue(f.as_vector() * func_grads[grad_index++], cvcs[i]->value().type())); } + +#ifdef LEPTON + } else if (is_enabled(f_cv_custom_function)) { + + size_t r = 0; // index in the vector of variable references + size_t e = 0; // index of the gradient evaluator + + for (size_t i = 0; i < cvcs.size(); i++) { // gradient with respect to cvc i + cvm::matrix2d jacobian (x.size(), cvcs[i]->value().size()); + for (size_t j = 0; j < cvcs[i]->value().size(); j++) { // j-th element + for (size_t c = 0; c < x.size(); c++) { // derivative of scalar element c of the colvarvalue + + // Feed cvc values to the evaluator + for (size_t k = 0; k < cvcs.size(); k++) { // + for (size_t l = 0; l < cvcs[k]->value().size(); l++) { + *(grad_eval_var_refs[r++]) = cvcs[k]->value()[l]; + } + } + jacobian[c][j] = gradient_evaluators[e++]->evaluate(); + } + } + // cvc force is colvar force times colvar/cvc Jacobian + // (vector-matrix product) + (cvcs[i])->apply_force(colvarvalue(f.as_vector() * jacobian, + cvcs[i]->value().type())); + } +#endif + } else if (x.type() == colvarvalue::type_scalar) { for (i = 0; i < cvcs.size(); i++) { if (!cvcs[i]->is_enabled()) continue; - (cvcs[i])->apply_force(f_accumulated * (cvcs[i])->sup_coeff * + (cvcs[i])->apply_force(f * (cvcs[i])->sup_coeff * cvm::real((cvcs[i])->sup_np) * (std::pow((cvcs[i])->value().real_value, (cvcs[i])->sup_np-1)) ); @@ -1350,14 +1589,10 @@ void colvar::communicate_forces() for (i = 0; i < cvcs.size(); i++) { if (!cvcs[i]->is_enabled()) continue; - (cvcs[i])->apply_force(f_accumulated * (cvcs[i])->sup_coeff); + (cvcs[i])->apply_force(f * (cvcs[i])->sup_coeff); } } - // Accumulated forces have been applied, impulse-style - // Reset to start accumulating again - f_accumulated.reset(); - if (cvm::debug()) cvm::log("Done communicating forces from colvar \""+this->name+"\".\n"); } @@ -1394,7 +1629,7 @@ int colvar::update_cvc_flags() cvm::error("ERROR: All CVCs are disabled for colvar " + this->name +"\n"); return COLVARS_ERROR; } - cvc_flags.resize(0); + cvc_flags.clear(); } return COLVARS_OK; @@ -1744,16 +1979,15 @@ int colvar::write_output_files() cvm::log("Writing acf to file \""+acf_outfile+"\".\n"); cvm::backup_file(acf_outfile.c_str()); - cvm::ofstream acf_os(acf_outfile.c_str()); - if (! acf_os.is_open()) { - cvm::error("Cannot open file \""+acf_outfile+"\".\n", FILE_ERROR); - } - write_acf(acf_os); - acf_os.close(); + std::ostream *acf_os = cvm::proxy->output_stream(acf_outfile); + if (!acf_os) return cvm::get_error(); + write_acf(*acf_os); + cvm::proxy->close_output_stream(acf_outfile); } - if (runave_os.is_open()) { - runave_os.close(); + if (runave_os) { + cvm::proxy->close_output_stream(runave_outfile); + runave_os = NULL; } } return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); @@ -2031,12 +2265,12 @@ void colvar::calc_runave() } runave_variance *= 1.0 / cvm::real(runave_length-1); - runave_os << std::setw(cvm::it_width) << cvm::step_relative() - << " " - << std::setprecision(cvm::cv_prec) << std::setw(cvm::cv_width) - << runave << " " - << std::setprecision(cvm::cv_prec) << std::setw(cvm::cv_width) - << std::sqrt(runave_variance) << "\n"; + *runave_os << std::setw(cvm::it_width) << cvm::step_relative() + << " " + << std::setprecision(cvm::cv_prec) << std::setw(cvm::cv_width) + << runave << " " + << std::setprecision(cvm::cv_prec) << std::setw(cvm::cv_width) + << std::sqrt(runave_variance) << "\n"; } history_add_value(runave_length, *x_history_p, x); diff --git a/lib/colvars/colvar.h b/lib/colvars/colvar.h index 0cbda450b8..6113e1678b 100644 --- a/lib/colvars/colvar.h +++ b/lib/colvars/colvar.h @@ -19,6 +19,9 @@ #include "colvarparse.h" #include "colvardeps.h" +#ifdef LEPTON +#include "Lepton.h" // for runtime custom expressions +#endif /// \brief A collective variable (main class); to be defined, it needs /// at least one object of a derived class of colvar::cvc; it @@ -89,7 +92,10 @@ public: return cv_features; } - int refresh_deps(); + /// Implements possible actions to be carried out + /// when a given feature is enabled + /// This overloads the base function in colvardeps + void do_feature_side_effects(int id); /// List of biases that depend on this colvar std::vector biases; @@ -235,6 +241,9 @@ public: /// Parse the CVC configuration and allocate their data int init_components(std::string const &conf); + /// Parse parameters for custom function with Lepton + int init_custom_function(std::string const &conf); + /// Init defaults for grid options int init_grid_parameters(std::string const &conf); @@ -334,24 +343,13 @@ protected: /// Sum of square coefficients for active cvcs cvm::real active_cvc_square_norm; - /// Time step multiplier (for coarse-time-step colvars) - /// Colvar will only be calculated at those times; biases may ignore the information and - /// always update their own forces (which is typically inexpensive) especially if - /// they rely on other colvars. In this case, the colvar will accumulate forces applied between - /// colvar updates. Alternately they may use it to calculate "impulse" biasing - /// forces at longer intervals. Impulse forces must be multiplied by the timestep factor. - int time_step_factor; - - /// Biasing force collected between updates, to be applied at next update for coarse-time-step colvars - colvarvalue f_accumulated; + /// \brief Absolute timestep number when this colvar was last updated + int prev_timestep; public: /// \brief Return the number of CVC objects with an active flag (as set by update_cvc_flags) inline size_t num_active_cvcs() const { return n_active_cvcs; } - /// \brief returns time_step_factor - inline int get_time_step_factor() const {return time_step_factor;} - /// \brief Use the internal metrics (as from \link cvc /// \endlink objects) to calculate square distances and gradients /// @@ -484,7 +482,9 @@ protected: /// Timesteps to skip between two values in the running average series size_t runave_stride; /// Name of the file to write the running average - cvm::ofstream runave_os; + std::string runave_outfile; + /// File to write the running average + std::ostream *runave_os; /// Current value of the running average colvarvalue runave; /// Current value of the square deviation from the running average @@ -508,6 +508,8 @@ public: class distance; class distance_z; class distance_xy; + class polar_theta; + class polar_phi; class distance_inv; class distance_pairs; class angle; @@ -556,6 +558,21 @@ private: /// when using scriptedFunction std::vector sorted_cvc_values; +#ifdef LEPTON + /// Vector of evaluators for custom functions using Lepton + std::vector value_evaluators; + + /// Vector of evaluators for gradients of custom functions + std::vector gradient_evaluators; + + /// Vector of references to cvc values to be passed to Lepton evaluators + std::vector value_eval_var_refs; + std::vector grad_eval_var_refs; + + /// Unused value that is written to when a variable simplifies out of a Lepton expression + double dev_null; +#endif + public: /// \brief Sorted array of (zero-based) IDs for all atoms involved std::vector atom_ids; diff --git a/lib/colvars/colvaratoms.cpp b/lib/colvars/colvaratoms.cpp index 32cfadf3b6..9b4a922e3f 100644 --- a/lib/colvars/colvaratoms.cpp +++ b/lib/colvars/colvaratoms.cpp @@ -67,32 +67,24 @@ cvm::atom::~atom() -// TODO change this arrangement -// Note: "conf" is the configuration of the cvc who is using this atom group; -// "key" is the name of the atom group (e.g. "atoms", "group1", "group2", ...) -cvm::atom_group::atom_group(std::string const &conf, - char const *key_in) +cvm::atom_group::atom_group() { - key = key_in; - cvm::log("Defining atom group \"" + key + "\".\n"); init(); - // real work is done by parse - parse(conf); - setup(); } -cvm::atom_group::atom_group(std::vector const &atoms_in) +cvm::atom_group::atom_group(char const *key_in) { + key = key_in; init(); - atoms = atoms_in; - setup(); } -cvm::atom_group::atom_group() +cvm::atom_group::atom_group(std::vector const &atoms_in) { init(); + atoms = atoms_in; + setup(); } @@ -180,7 +172,7 @@ int cvm::atom_group::init() { if (!key.size()) key = "unnamed"; description = "atom group " + key; - // These will be overwritten by parse(), if initializing from a config string + // These may be overwritten by parse(), if a name is provided atoms.clear(); @@ -193,7 +185,6 @@ int cvm::atom_group::init() b_center = false; b_rotate = false; b_user_defined_fit = false; - b_fit_gradients = false; fitting_group = NULL; noforce = false; @@ -265,34 +256,10 @@ void cvm::atom_group::update_total_charge() } -int cvm::atom_group::parse(std::string const &conf) +int cvm::atom_group::parse(std::string const &group_conf) { - std::string group_conf; - - // TODO move this to the cvc class constructor/init - - // save_delimiters is set to false for this call, because "conf" is - // not the config string of this group, but of its parent object - // (which has already taken care of the delimiters) - save_delimiters = false; - key_lookup(conf, key.c_str(), group_conf, dummy_pos); - // restoring the normal value, because we do want keywords checked - // inside "group_conf" - save_delimiters = true; - - if (group_conf.size() == 0) { - cvm::error("Error: atom group \""+key+ - "\" is set, but has no definition.\n", - INPUT_ERROR); - return COLVARS_ERROR; - } - - cvm::increase_depth(); - cvm::log("Initializing atom group \""+key+"\".\n"); - description = "atom group " + key; - // whether or not to include messages in the log // colvarparse::Parse_Mode mode = parse_silent; // { @@ -304,10 +271,53 @@ int cvm::atom_group::parse(std::string const &conf) int parse_error = COLVARS_OK; + // Optional group name will let other groups reuse atom definition + if (get_keyval(group_conf, "name", name)) { + if ((cvm::atom_group_by_name(this->name) != NULL) && + (cvm::atom_group_by_name(this->name) != this)) { + cvm::error("Error: this atom group cannot have the same name, \""+this->name+ + "\", as another atom group.\n", + INPUT_ERROR); + return INPUT_ERROR; + } + cvm::main()->register_named_atom_group(this); + description = "atom group " + name; + } + + // We need to know about fitting to decide whether the group is scalable + // and we need to know about scalability before adding atoms + bool b_defined_center = get_keyval(group_conf, "centerReference", b_center, false); + bool b_defined_rotate = get_keyval(group_conf, "rotateReference", b_rotate, false); + // is the user setting explicit options? + b_user_defined_fit = b_defined_center || b_defined_rotate; + + if (is_available(f_ag_scalable_com) && !b_rotate && !b_center) { + enable(f_ag_scalable_com); + enable(f_ag_scalable); + } + + { + std::string atoms_of = ""; + if (get_keyval(group_conf, "atomsOfGroup", atoms_of)) { + atom_group * ag = atom_group_by_name(atoms_of); + if (ag == NULL) { + cvm::error("Error: cannot find atom group with name " + atoms_of + ".\n"); + return COLVARS_ERROR; + } + parse_error |= add_atoms_of_group(ag); + } + } + +// if (get_keyval(group_conf, "copyOfGroup", source)) { +// // Goal: Initialize this as a full copy +// // for this we'll need an atom_group copy constructor +// return COLVARS_OK; +// } + { std::string numbers_conf = ""; size_t pos = 0; - while (key_lookup(group_conf, "atomNumbers", numbers_conf, pos)) { + while (key_lookup(group_conf, "atomNumbers", &numbers_conf, &pos)) { parse_error |= add_atom_numbers(numbers_conf); numbers_conf = ""; } @@ -325,7 +335,7 @@ int cvm::atom_group::parse(std::string const &conf) std::string range_conf = ""; size_t pos = 0; while (key_lookup(group_conf, "atomNumbersRange", - range_conf, pos)) { + &range_conf, &pos)) { parse_error |= add_atom_numbers_range(range_conf); range_conf = ""; } @@ -347,7 +357,7 @@ int cvm::atom_group::parse(std::string const &conf) size_t range_count = 0; psii = psf_segids.begin(); while (key_lookup(group_conf, "atomNameResidueRange", - range_conf, pos)) { + &range_conf, &pos)) { range_count++; if (psf_segids.size() && (range_count > psf_segids.size())) { cvm::error("Error: more instances of \"atomNameResidueRange\" than " @@ -415,14 +425,9 @@ int cvm::atom_group::parse(std::string const &conf) } } - // We need to know the fitting options to decide whether the group is scalable + // Now that atoms are defined we can parse the detailed fitting options parse_error |= parse_fitting_options(group_conf); - if (is_available(f_ag_scalable_com) && !b_rotate && !b_center) { - enable(f_ag_scalable_com); - enable(f_ag_scalable); - } - if (is_enabled(f_ag_scalable) && !b_dummy) { cvm::log("Enabling scalable calculation for group \""+this->key+"\".\n"); index = (cvm::proxy)->init_atom_group(atoms_ids); @@ -431,13 +436,6 @@ int cvm::atom_group::parse(std::string const &conf) bool b_print_atom_ids = false; get_keyval(group_conf, "printAtomIDs", b_print_atom_ids, false, colvarparse::parse_silent); - // TODO move this to colvarparse object - check_keywords(group_conf, key.c_str()); - if (cvm::get_error()) { - cvm::error("Error setting up atom group \""+key+"\"."); - return COLVARS_ERROR; - } - // Calculate all required properties (such as total mass) setup(); @@ -446,7 +444,7 @@ int cvm::atom_group::parse(std::string const &conf) cvm::log("Atom group \""+key+"\" defined, "+ cvm::to_str(atoms_ids.size())+" atoms initialized: total mass = "+ - cvm::to_str(total_mass)+", total charge = "+ + cvm::to_str(total_mass)+", total charge = "+ cvm::to_str(total_charge)+".\n"); if (b_print_atom_ids) { @@ -454,12 +452,41 @@ int cvm::atom_group::parse(std::string const &conf) cvm::log(print_atom_ids()); } - cvm::decrease_depth(); - return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); } +int cvm::atom_group::add_atoms_of_group(atom_group const * ag) +{ + std::vector const &source_ids = ag->atoms_ids; + + if (source_ids.size()) { + atoms_ids.reserve(atoms_ids.size()+source_ids.size()); + + if (is_enabled(f_ag_scalable)) { + for (size_t i = 0; i < source_ids.size(); i++) { + add_atom_id(source_ids[i]); + } + } else { + atoms.reserve(atoms.size()+source_ids.size()); + for (size_t i = 0; i < source_ids.size(); i++) { + // We could use the atom copy constructor, but only if the source + // group is not scalable - whereas this works in both cases + // atom constructor expects 1-based atom number + add_atom(cvm::atom(source_ids[i] + 1)); + } + } + + if (cvm::get_error()) return COLVARS_ERROR; + } else { + cvm::error("Error: source atom group contains no atoms\".\n", INPUT_ERROR); + return COLVARS_ERROR; + } + + return COLVARS_OK; +} + + int cvm::atom_group::add_atom_numbers(std::string const &numbers_conf) { std::vector atom_indexes; @@ -629,13 +656,6 @@ std::string const cvm::atom_group::print_atom_ids() const int cvm::atom_group::parse_fitting_options(std::string const &group_conf) { - bool b_defined_center = get_keyval(group_conf, "centerReference", b_center, false); - bool b_defined_rotate = get_keyval(group_conf, "rotateReference", b_rotate, false); - // is the user setting explicit options? - b_user_defined_fit = b_defined_center || b_defined_rotate; - - get_keyval(group_conf, "enableFitGradients", b_fit_gradients, true); - if (b_center || b_rotate) { if (b_dummy) @@ -643,27 +663,31 @@ int cvm::atom_group::parse_fitting_options(std::string const &group_conf) "cannot be defined for a dummy atom.\n"); bool b_ref_pos_group = false; - if (key_lookup(group_conf, "refPositionsGroup")) { + std::string fitting_group_conf; + if (key_lookup(group_conf, "refPositionsGroup", &fitting_group_conf)) { b_ref_pos_group = true; cvm::log("Warning: keyword \"refPositionsGroup\" is deprecated: please use \"fittingGroup\" instead.\n"); } - if (b_ref_pos_group || key_lookup(group_conf, "fittingGroup")) { + if (b_ref_pos_group || key_lookup(group_conf, "fittingGroup", &fitting_group_conf)) { // instead of this group, define another group to compute the fit if (fitting_group) { cvm::error("Error: the atom group \""+ key+"\" has already a reference group " "for the rototranslational fit, which was communicated by the " "colvar component. You should not use fittingGroup " - "in this case.\n"); + "in this case.\n", INPUT_ERROR); + return INPUT_ERROR; } cvm::log("Within atom group \""+key+"\":\n"); - fitting_group = b_ref_pos_group ? - new atom_group(group_conf, "refPositionsGroup") : - new atom_group(group_conf, "fittingGroup"); - - // regardless of the configuration, fit gradients must be calculated by fittingGroup - fitting_group->b_fit_gradients = this->b_fit_gradients; + fitting_group = new atom_group("fittingGroup"); + if (fitting_group->parse(fitting_group_conf) == COLVARS_OK) { + fitting_group->check_keywords(fitting_group_conf, "fittingGroup"); + if (cvm::get_error()) { + cvm::error("Error setting up atom group \"fittingGroup\".", INPUT_ERROR); + return INPUT_ERROR; + } + } } atom_group *group_for_fit = fitting_group ? fitting_group : this; @@ -720,11 +744,6 @@ int cvm::atom_group::parse_fitting_options(std::string const &group_conf) return COLVARS_ERROR; } - if (b_fit_gradients) { - group_for_fit->fit_gradients.assign(group_for_fit->size(), cvm::atom_pos(0.0, 0.0, 0.0)); - rot.request_group1_gradients(group_for_fit->size()); - } - if (b_rotate && !noforce) { cvm::log("Warning: atom group \""+key+ "\" will be aligned to a fixed orientation given by the reference positions provided. " @@ -737,10 +756,37 @@ int cvm::atom_group::parse_fitting_options(std::string const &group_conf) } } + // Enable fit gradient calculation only if necessary, and not disabled by the user + // This must happen after fitting group is defined so that side-effects are performed + // properly (ie. allocating fitting group gradients) + { + bool b_fit_gradients; + get_keyval(group_conf, "enableFitGradients", b_fit_gradients, true); + + if (b_fit_gradients && (b_center || b_rotate)) { + enable(f_ag_fit_gradients); + } + } + return COLVARS_OK; } +void cvm::atom_group::do_feature_side_effects(int id) +{ + // If enabled features are changed upstream, the features below should be refreshed + switch (id) { + case f_ag_fit_gradients: + if (b_center || b_rotate) { + atom_group *group_for_fit = fitting_group ? fitting_group : this; + group_for_fit->fit_gradients.assign(group_for_fit->size(), cvm::atom_pos(0.0, 0.0, 0.0)); + rot.request_group1_gradients(group_for_fit->size()); + } + break; + } +} + + int cvm::atom_group::create_sorted_ids(void) { // Only do the work if the vector is not yet populated @@ -1000,12 +1046,12 @@ void cvm::atom_group::set_weighted_gradient(cvm::rvector const &grad) void cvm::atom_group::calc_fit_gradients() { - if (b_dummy) return; + if (b_dummy || ! is_enabled(f_ag_fit_gradients)) return; if (cvm::debug()) cvm::log("Calculating fit gradients.\n"); - atom_group *group_for_fit = fitting_group ? fitting_group : this; + cvm::atom_group *group_for_fit = fitting_group ? fitting_group : this; if (b_center) { // add the center of geometry contribution to the gradients @@ -1190,7 +1236,7 @@ void cvm::atom_group::apply_colvar_force(cvm::real const &force) } } - if ((b_center || b_rotate) && b_fit_gradients) { + if ((b_center || b_rotate) && is_enabled(f_ag_fit_gradients)) { atom_group *group_for_fit = fitting_group ? fitting_group : this; diff --git a/lib/colvars/colvaratoms.h b/lib/colvars/colvaratoms.h index 85f6212951..dba2890abc 100644 --- a/lib/colvars/colvaratoms.h +++ b/lib/colvars/colvaratoms.h @@ -150,12 +150,21 @@ class colvarmodule::atom_group { public: - /// \brief Initialize the group by looking up its configuration - /// string in conf and parsing it; this is actually done by parse(), - /// which is a member function so that a group can be initialized - /// also after construction - atom_group(std::string const &conf, - char const *key); + + /// \brief Default constructor + atom_group(); + + /// \brief Create a group object, assign a name to it + atom_group(char const *key); + + /// \brief Initialize the group after a (temporary) vector of atoms + atom_group(std::vector const &atoms_in); + + /// \brief Destructor + ~atom_group(); + + /// \brief Optional name to reuse properties of this in other groups + std::string name; /// \brief Keyword used to define the group // TODO Make this field part of the data structures that link a group to a CVC @@ -172,15 +181,13 @@ public: int parse(std::string const &conf); int add_atom_numbers(std::string const &numbers_conf); + int add_atoms_of_group(atom_group const * ag); int add_index_group(std::string const &index_group_name); int add_atom_numbers_range(std::string const &range_conf); int add_atom_name_residue_range(std::string const &psf_segid, std::string const &range_conf); int parse_fitting_options(std::string const &group_conf); - /// \brief Initialize the group after a (temporary) vector of atoms - atom_group(std::vector const &atoms_in); - /// \brief Add an atom object to this group int add_atom(cvm::atom const &a); @@ -203,12 +210,6 @@ public: return ag_features; } - /// \brief Default constructor - atom_group(); - - /// \brief Destructor - ~atom_group(); - protected: /// \brief Array of atom objects @@ -294,10 +295,6 @@ public: /// cvc's (eg rmsd, eigenvector) will not override the user's choice bool b_user_defined_fit; - /// \brief Whether or not the derivatives of the roto-translation - /// should be included when calculating the colvar's gradients (default: yes) - bool b_fit_gradients; - /// \brief use reference coordinates for b_center or b_rotate std::vector ref_pos; @@ -464,6 +461,10 @@ public: /// apply_colvar_force() once that is implemented for non-scalar values void apply_force(cvm::rvector const &force); + /// Implements possible actions to be carried out + /// when a given feature is enabled + /// This overloads the base function in colvardeps + void do_feature_side_effects(int id); }; diff --git a/lib/colvars/colvarbias.cpp b/lib/colvars/colvarbias.cpp index 3779c82aa3..e437466be9 100644 --- a/lib/colvars/colvarbias.cpp +++ b/lib/colvars/colvarbias.cpp @@ -23,9 +23,7 @@ colvarbias::colvarbias(char const *key) b_output_energy = false; reset(); state_file_step = 0; - - // Start in active state by default - enable(f_cvb_active); + description = "uninitialized " + cvm::to_str(key) + " bias"; } @@ -74,7 +72,6 @@ int colvarbias::init(std::string const &conf) cvm::error("Error: no collective variables specified.\n", INPUT_ERROR); return INPUT_ERROR; } - } else { cvm::log("Reinitializing bias \""+name+"\".\n"); } @@ -83,6 +80,16 @@ int colvarbias::init(std::string const &conf) get_keyval(conf, "outputEnergy", b_output_energy, b_output_energy); + get_keyval(conf, "timeStepFactor", time_step_factor, 1); + if (time_step_factor < 1) { + cvm::error("Error: timeStepFactor must be 1 or greater.\n"); + return COLVARS_ERROR; + } + + // Now that children are defined, we can solve dependencies + enable(f_cvb_active); + if (cvm::debug()) print_state(); + return COLVARS_OK; } @@ -110,6 +117,8 @@ colvarbias::~colvarbias() int colvarbias::clear() { + free_children_deps(); + // Remove references to this bias from colvars for (std::vector::iterator cvi = colvars.begin(); cvi != colvars.end(); @@ -200,7 +209,12 @@ void colvarbias::communicate_forces() cvm::log("Communicating a force to colvar \""+ variables(i)->name+"\".\n"); } - variables(i)->add_bias_force(colvar_forces[i]); + // Impulse-style multiple timestep + // Note that biases with different values of time_step_factor + // may send forces to the same colvar + // which is why rescaling has to happen now: the colvar is not + // aware of this bias' time_step_factor + variables(i)->add_bias_force(cvm::real(time_step_factor) * colvar_forces[i]); } } diff --git a/lib/colvars/colvarbias.h b/lib/colvars/colvarbias.h index 6d5776d3db..205e761cfc 100644 --- a/lib/colvars/colvarbias.h +++ b/lib/colvars/colvarbias.h @@ -56,7 +56,7 @@ public: /// \brief Compute the energy of the bias with alternative values of the /// collective variables (suitable for bias exchange) - virtual int calc_energy(std::vector const &values = + virtual int calc_energy(std::vector const &values = std::vector(0)) { cvm::error("Error: calc_energy() not implemented.\n", COLVARS_NOT_IMPLEMENTED); diff --git a/lib/colvars/colvarbias_abf.cpp b/lib/colvars/colvarbias_abf.cpp index d039004f09..a96fc21d64 100644 --- a/lib/colvars/colvarbias_abf.cpp +++ b/lib/colvars/colvarbias_abf.cpp @@ -71,10 +71,17 @@ int colvarbias_abf::init(std::string const &conf) // shared ABF get_keyval(conf, "shared", shared_on, false); if (shared_on) { - if (!cvm::replica_enabled() || cvm::replica_num() <= 1) + if (!cvm::replica_enabled() || cvm::replica_num() <= 1) { cvm::error("Error: shared ABF requires more than one replica."); - else - cvm::log("shared ABF will be applied among "+ cvm::to_str(cvm::replica_num()) + " replicas.\n"); + return COLVARS_ERROR; + } + cvm::log("shared ABF will be applied among "+ cvm::to_str(cvm::replica_num()) + " replicas.\n"); + if (cvm::proxy->smp_enabled() == COLVARS_OK) { + cvm::error("Error: shared ABF is currently not available with SMP parallelism; " + "please set \"SMP off\" at the top of the Colvars configuration file.\n", + COLVARS_NOT_IMPLEMENTED); + return COLVARS_NOT_IMPLEMENTED; + } // If shared_freq is not set, we default to output_freq get_keyval(conf, "sharedFreq", shared_freq, output_freq); @@ -84,11 +91,11 @@ int colvarbias_abf::init(std::string const &conf) if (colvars.size() == 0) { cvm::error("Error: no collective variables specified for the ABF bias.\n"); + return COLVARS_ERROR; } if (update_bias) { - // Request calculation of total force (which also checks for availability) - // TODO - change this to a dependency - needs ABF-specific features + // Request calculation of total force if(enable(f_cvb_get_total_force)) return cvm::get_error(); } @@ -108,6 +115,16 @@ int colvarbias_abf::init(std::string const &conf) if (colvars[i]->is_enabled(f_cv_extended_Lagrangian)) b_extended = true; + // Cannot mix and match coarse time steps with ABF because it gives + // wrong total force averages - total force needs to be averaged over + // every time step + if (colvars[i]->get_time_step_factor() != time_step_factor) { + cvm::error("Error: " + colvars[i]->description + " has a value of timeStepFactor (" + + cvm::to_str(colvars[i]->get_time_step_factor()) + ") different from that of " + + description + " (" + cvm::to_str(time_step_factor) + ").\n"); + return COLVARS_ERROR; + } + // Here we could check for orthogonality of the Cartesian coordinates // and make it just a warning if some parameter is set? } @@ -282,12 +299,12 @@ int colvarbias_abf::update() // Compute and apply the new bias, if applicable if (is_enabled(f_cvb_apply_force) && samples->index_ok(bin)) { - size_t count = samples->value(bin); - cvm::real fact = 1.0; + size_t count = samples->value(bin); + cvm::real fact = 1.0; // Factor that ensures smooth introduction of the force if ( count < full_samples ) { - fact = ( count < min_samples) ? 0.0 : + fact = (count < min_samples) ? 0.0 : (cvm::real(count - min_samples)) / (cvm::real(full_samples - min_samples)); } @@ -434,62 +451,57 @@ void colvarbias_abf::write_gradients_samples(const std::string &prefix, bool app std::string gradients_out_name = prefix + ".grad"; std::ios::openmode mode = (append ? std::ios::app : std::ios::out); - cvm::ofstream samples_os; - cvm::ofstream gradients_os; - - if (!append) cvm::backup_file(samples_out_name.c_str()); - samples_os.open(samples_out_name.c_str(), mode); - if (!samples_os.is_open()) { + std::ostream *samples_os = + cvm::proxy->output_stream(samples_out_name, mode); + if (!samples_os) { cvm::error("Error opening ABF samples file " + samples_out_name + " for writing"); } - samples->write_multicol(samples_os); - samples_os.close(); + samples->write_multicol(*samples_os); + cvm::proxy->close_output_stream(samples_out_name); - if (!append) cvm::backup_file(gradients_out_name.c_str()); - gradients_os.open(gradients_out_name.c_str(), mode); - if (!gradients_os.is_open()) { + std::ostream *gradients_os = + cvm::proxy->output_stream(gradients_out_name, mode); + if (!gradients_os) { cvm::error("Error opening ABF gradient file " + gradients_out_name + " for writing"); } - gradients->write_multicol(gradients_os); - gradients_os.close(); + gradients->write_multicol(*gradients_os); + cvm::proxy->close_output_stream(gradients_out_name); if (colvars.size() == 1) { - std::string pmf_out_name = prefix + ".pmf"; - if (!append) cvm::backup_file(pmf_out_name.c_str()); - cvm::ofstream pmf_os; // Do numerical integration and output a PMF - pmf_os.open(pmf_out_name.c_str(), mode); - if (!pmf_os.is_open()) cvm::error("Error opening pmf file " + pmf_out_name + " for writing"); - gradients->write_1D_integral(pmf_os); - pmf_os << std::endl; - pmf_os.close(); + std::string pmf_out_name = prefix + ".pmf"; + std::ostream *pmf_os = cvm::proxy->output_stream(pmf_out_name, mode); + if (!pmf_os) { + cvm::error("Error opening pmf file " + pmf_out_name + " for writing"); + } + gradients->write_1D_integral(*pmf_os); + *pmf_os << std::endl; + cvm::proxy->close_output_stream(pmf_out_name); } if (z_gradients) { // Write eABF-related quantities std::string z_samples_out_name = prefix + ".zcount"; - cvm::ofstream z_samples_os; - if (!append) cvm::backup_file(z_samples_out_name.c_str()); - z_samples_os.open(z_samples_out_name.c_str(), mode); - if (!z_samples_os.is_open()) { + std::ostream *z_samples_os = + cvm::proxy->output_stream(z_samples_out_name, mode); + if (!z_samples_os) { cvm::error("Error opening eABF z-histogram file " + z_samples_out_name + " for writing"); } - z_samples->write_multicol(z_samples_os); - z_samples_os.close(); + z_samples->write_multicol(*z_samples_os); + cvm::proxy->close_output_stream(z_samples_out_name); if (b_czar_window_file) { std::string z_gradients_out_name = prefix + ".zgrad"; - cvm::ofstream z_gradients_os; - if (!append) cvm::backup_file(z_gradients_out_name.c_str()); - z_gradients_os.open(z_gradients_out_name.c_str(), mode); - if (!z_gradients_os.is_open()) { + std::ostream *z_gradients_os = + cvm::proxy->output_stream(z_gradients_out_name, mode); + if (!z_gradients_os) { cvm::error("Error opening eABF z-gradient file " + z_gradients_out_name + " for writing"); } - z_gradients->write_multicol(z_gradients_os); - z_gradients_os.close(); + z_gradients->write_multicol(*z_gradients_os); + cvm::proxy->close_output_stream(z_gradients_out_name); } // Calculate CZAR estimator of gradients @@ -503,26 +515,24 @@ void colvarbias_abf::write_gradients_samples(const std::string &prefix, bool app } std::string czar_gradients_out_name = prefix + ".czar.grad"; - cvm::ofstream czar_gradients_os; - if (!append) cvm::backup_file(czar_gradients_out_name.c_str()); - czar_gradients_os.open(czar_gradients_out_name.c_str(), mode); - if (!czar_gradients_os.is_open()) { + std::ostream *czar_gradients_os = + cvm::proxy->output_stream(czar_gradients_out_name, mode); + if (!czar_gradients_os) { cvm::error("Error opening CZAR gradient file " + czar_gradients_out_name + " for writing"); } - czar_gradients->write_multicol(czar_gradients_os); - czar_gradients_os.close(); + czar_gradients->write_multicol(*czar_gradients_os); + cvm::proxy->close_output_stream(czar_gradients_out_name); if (colvars.size() == 1) { - std::string czar_pmf_out_name = prefix + ".czar.pmf"; - if (!append) cvm::backup_file(czar_pmf_out_name.c_str()); - cvm::ofstream czar_pmf_os; // Do numerical integration and output a PMF - czar_pmf_os.open(czar_pmf_out_name.c_str(), mode); - if (!czar_pmf_os.is_open()) cvm::error("Error opening CZAR pmf file " + czar_pmf_out_name + " for writing"); - czar_gradients->write_1D_integral(czar_pmf_os); - czar_pmf_os << std::endl; - czar_pmf_os.close(); + std::string czar_pmf_out_name = prefix + ".czar.pmf"; + std::ostream *czar_pmf_os = + cvm::proxy->output_stream(czar_pmf_out_name, mode); + if (!czar_pmf_os) cvm::error("Error opening CZAR pmf file " + czar_pmf_out_name + " for writing"); + czar_gradients->write_1D_integral(*czar_pmf_os); + *czar_pmf_os << std::endl; + cvm::proxy->close_output_stream(czar_pmf_out_name); } } return; @@ -570,9 +580,13 @@ void colvarbias_abf::read_gradients_samples() is.clear(); is.open(gradients_in_name.c_str()); - if (!is.is_open()) cvm::error("Error opening ABF gradient file " + gradients_in_name + " for reading"); - gradients->read_multicol(is, true); - is.close(); + if (!is.is_open()) { + cvm::error("Error opening ABF gradient file " + + gradients_in_name + " for reading", INPUT_ERROR); + } else { + gradients->read_multicol(is, true); + is.close(); + } if (z_gradients) { // Read eABF z-averaged data for CZAR diff --git a/lib/colvars/colvarbias_alb.cpp b/lib/colvars/colvarbias_alb.cpp index d096ac3daf..124a15c5da 100644 --- a/lib/colvars/colvarbias_alb.cpp +++ b/lib/colvars/colvarbias_alb.cpp @@ -156,8 +156,8 @@ int colvarbias_alb::update() colvars[i], colvar_centers[i]); bias_energy += restraint_potential(restraint_convert_k(current_coupling[i], colvars[i]->width), - colvars[i], - colvar_centers[i]); + colvars[i], + colvar_centers[i]); if (!b_equilibration) { //Welford, West, and Hanso online variance method @@ -169,26 +169,26 @@ int colvarbias_alb::update() } else { //check if we've reached the setpoint if (coupling_rate[i] == 0 || pow(current_coupling[i] - set_coupling[i],2) < pow(coupling_rate[i],2)) { - finished_equil_flag &= 1; //we continue equilibrating as long as we haven't reached all the set points + finished_equil_flag &= 1; //we continue equilibrating as long as we haven't reached all the set points } else { - current_coupling[i] += coupling_rate[i]; - finished_equil_flag = 0; + current_coupling[i] += coupling_rate[i]; + finished_equil_flag = 0; } //update max_coupling_range if (!b_hard_coupling_range && fabs(current_coupling[i]) > max_coupling_range[i]) { - std::ostringstream logStream; - logStream << "Coupling constant for " - << colvars[i]->name - << " has exceeded coupling range of " - << max_coupling_range[i] - << ".\n"; - - max_coupling_range[i] *= 1.25; - logStream << "Expanding coupling range to " << max_coupling_range[i] << ".\n"; - cvm::log(logStream.str()); + std::ostringstream logStream; + logStream << "Coupling constant for " + << colvars[i]->name + << " has exceeded coupling range of " + << max_coupling_range[i] + << ".\n"; + + max_coupling_range[i] *= 1.25; + logStream << "Expanding coupling range to " << max_coupling_range[i] << ".\n"; + cvm::log(logStream.str()); } @@ -214,23 +214,23 @@ int colvarbias_alb::update() temp = 2. * (means[i] / (static_cast (colvar_centers[i])) - 1) * ssd[i] / (update_calls - 1); if (cvm::temperature() > 0) - step_size = temp / (cvm::temperature() * cvm::boltzmann()); + step_size = temp / (cvm::temperature() * cvm::boltzmann()); else - step_size = temp / cvm::boltzmann(); + step_size = temp / cvm::boltzmann(); means[i] = 0; ssd[i] = 0; //stochastic if we do that update or not if (colvars.size() == 1 || rand() < RAND_MAX / ((int) colvars.size())) { - coupling_accum[i] += step_size * step_size; - current_coupling[i] = set_coupling[i]; - set_coupling[i] += max_coupling_range[i] / sqrt(coupling_accum[i]) * step_size; - coupling_rate[i] = (set_coupling[i] - current_coupling[i]) / update_freq; - //set to the minimum rate and then put the sign back on it - coupling_rate[i] = copysign(fmin(fabs(coupling_rate[i]), max_coupling_rate[i]), coupling_rate[i]); + coupling_accum[i] += step_size * step_size; + current_coupling[i] = set_coupling[i]; + set_coupling[i] += max_coupling_range[i] / sqrt(coupling_accum[i]) * step_size; + coupling_rate[i] = (set_coupling[i] - current_coupling[i]) / update_freq; + //set to the minimum rate and then put the sign back on it + coupling_rate[i] = copysign(fmin(fabs(coupling_rate[i]), max_coupling_rate[i]), coupling_rate[i]); } else { - coupling_rate[i] = 0; + coupling_rate[i] = 0; } } @@ -339,14 +339,14 @@ std::ostream & colvarbias_alb::write_traj_label(std::ostream &os) if (b_output_coupling) for (size_t i = 0; i < current_coupling.size(); i++) { os << " ForceConst_" << i - <name, cvm::cv_width - 4); + << cvm::wrap_string(colvars[i]->name, cvm::cv_width - 4); } if (b_output_centers) @@ -372,8 +372,8 @@ std::ostream & colvarbias_alb::write_traj(std::ostream &os) if (b_output_coupling) for (size_t i = 0; i < current_coupling.size(); i++) { os << " " - << std::setprecision(cvm::en_prec) << std::setw(cvm::en_width) - << current_coupling[i]; + << std::setprecision(cvm::en_prec) << std::setw(cvm::en_width) + << current_coupling[i]; } @@ -387,8 +387,8 @@ std::ostream & colvarbias_alb::write_traj(std::ostream &os) if (b_output_grad) for (size_t i = 0; i < means.size(); i++) { os << " " - << std::setprecision(cvm::cv_prec) << std::setw(cvm::cv_width) - << -2. * (means[i] / (static_cast (colvar_centers[i])) - 1) * ssd[i] / (fmax(update_calls,2) - 1); + << std::setprecision(cvm::cv_prec) << std::setw(cvm::cv_width) + << -2. * (means[i] / (static_cast (colvar_centers[i])) - 1) * ssd[i] / (fmax(update_calls,2) - 1); } diff --git a/lib/colvars/colvarbias_histogram.cpp b/lib/colvars/colvarbias_histogram.cpp index 502a7455b1..0722e6384d 100644 --- a/lib/colvars/colvarbias_histogram.cpp +++ b/lib/colvars/colvarbias_histogram.cpp @@ -86,8 +86,9 @@ int colvarbias_histogram::init(std::string const &conf) { std::string grid_conf; - if (key_lookup(conf, "histogramGrid", grid_conf)) { + if (key_lookup(conf, "histogramGrid", &grid_conf)) { grid->parse_params(grid_conf); + grid->check_keywords(grid_conf, "histogramGrid"); } } @@ -176,26 +177,27 @@ int colvarbias_histogram::write_output_files() if (out_name.size()) { cvm::log("Writing the histogram file \""+out_name+"\".\n"); cvm::backup_file(out_name.c_str()); - cvm::ofstream grid_os(out_name.c_str()); - if (!grid_os.is_open()) { - cvm::error("Error opening histogram file " + out_name + " for writing.\n", FILE_ERROR); + std::ostream *grid_os = cvm::proxy->output_stream(out_name); + if (!grid_os) { + return cvm::error("Error opening histogram file "+out_name+ + " for writing.\n", FILE_ERROR); } - // TODO add return code here - grid->write_multicol(grid_os); - grid_os.close(); + grid->write_multicol(*grid_os); + cvm::proxy->close_output_stream(out_name); } if (out_name_dx.size()) { cvm::log("Writing the histogram file \""+out_name_dx+"\".\n"); cvm::backup_file(out_name_dx.c_str()); - cvm::ofstream grid_os(out_name_dx.c_str()); - if (!grid_os.is_open()) { - cvm::error("Error opening histogram file " + out_name_dx + " for writing.\n", FILE_ERROR); + std::ostream *grid_os = cvm::proxy->output_stream(out_name_dx); + if (!grid_os) { + return cvm::error("Error opening histogram file "+out_name_dx+ + " for writing.\n", FILE_ERROR); } - // TODO add return code here - grid->write_opendx(grid_os); - grid_os.close(); + grid->write_opendx(*grid_os); + cvm::proxy->close_output_stream(out_name_dx); } + return COLVARS_OK; } diff --git a/lib/colvars/colvarbias_meta.cpp b/lib/colvars/colvarbias_meta.cpp index b0acfe974a..66806fc9fc 100644 --- a/lib/colvars/colvarbias_meta.cpp +++ b/lib/colvars/colvarbias_meta.cpp @@ -36,6 +36,8 @@ colvarbias_meta::colvarbias_meta(char const *key) : colvarbias(key) { new_hills_begin = hills.end(); + hills_traj_os = NULL; + replica_hills_os = NULL; } @@ -163,7 +165,6 @@ int colvarbias_meta::init(std::string const &conf) cvm::log("Done initializing the metadynamics bias \""+this->name+"\""+ ((comm != single_replica) ? ", replica \""+replica_id+"\"" : "")+".\n"); - save_delimiters = false; return COLVARS_OK; } @@ -239,11 +240,15 @@ colvarbias_meta::~colvarbias_meta() hills_energy_gradients = NULL; } - if (replica_hills_os.is_open()) - replica_hills_os.close(); + if (replica_hills_os) { + cvm::proxy->close_output_stream(replica_hills_file); + replica_hills_os = NULL; + } - if (hills_traj_os.is_open()) - hills_traj_os.close(); + if (hills_traj_os) { + cvm::proxy->close_output_stream(hills_traj_file_name()); + hills_traj_os = NULL; + } if(target_dist) { delete target_dist; @@ -280,9 +285,9 @@ colvarbias_meta::create_hill(colvarbias_meta::hill const &h) } // output to trajectory (if specified) - if (hills_traj_os.is_open()) { - hills_traj_os << (hills.back()).output_traj(); - hills_traj_os.flush(); + if (hills_traj_os) { + *hills_traj_os << (hills.back()).output_traj(); + cvm::proxy->flush_output_stream(hills_traj_os); } has_data = true; @@ -312,12 +317,12 @@ colvarbias_meta::delete_hill(hill_iter &h) } } - if (hills_traj_os.is_open()) { + if (hills_traj_os) { // output to the trajectory - hills_traj_os << "# DELETED this hill: " - << (hills.back()).output_traj() - << "\n"; - hills_traj_os.flush(); + *hills_traj_os << "# DELETED this hill: " + << (hills.back()).output_traj() + << "\n"; + cvm::proxy->flush_output_stream(hills_traj_os); } return hills.erase(h); @@ -501,12 +506,12 @@ int colvarbias_meta::update_bias() case multiple_replicas: create_hill(hill(hill_weight*hills_scale, colvars, hill_width, replica_id)); - if (replica_hills_os.is_open()) { - replica_hills_os << hills.back(); + if (replica_hills_os) { + *replica_hills_os << hills.back(); } else { - cvm::fatal_error("Error: in metadynamics bias \""+this->name+"\""+ - ((comm != single_replica) ? ", replica \""+replica_id+"\"" : "")+ - " while writing hills for the other replicas.\n"); + return cvm::error("Error: in metadynamics bias \""+this->name+"\""+ + ((comm != single_replica) ? ", replica \""+replica_id+"\"" : "")+ + " while writing hills for the other replicas.\n", FILE_ERROR); } break; } @@ -904,8 +909,9 @@ int colvarbias_meta::replica_share() // reread the replicas registry update_replicas_registry(); // empty the output buffer - if (replica_hills_os.is_open()) - replica_hills_os.flush(); + if (replica_hills_os) { + cvm::proxy->flush_output_stream(replica_hills_os); + } read_replica_files(); } return COLVARS_OK; @@ -1421,7 +1427,7 @@ std::istream & colvarbias_meta::read_hill(std::istream &is) // it is safer to read colvarvalue objects one at a time; // TODO: change this it later std::string centers_input; - key_lookup(data, "centers", centers_input); + key_lookup(data, "centers", ¢ers_input); std::istringstream centers_is(centers_input); for (size_t i = 0; i < num_variables(); i++) { centers_is >> h_centers[i]; @@ -1521,13 +1527,11 @@ int colvarbias_meta::setup_output() // for the others to read // open the "hills" buffer file - if (!replica_hills_os.is_open()) { - cvm::backup_file(replica_hills_file.c_str()); - replica_hills_os.open(replica_hills_file.c_str()); - if (!replica_hills_os.is_open()) - cvm::error("Error: in opening file \""+ - replica_hills_file+"\" for writing.\n", FILE_ERROR); - replica_hills_os.setf(std::ios::scientific, std::ios::floatfield); + if (!replica_hills_os) { + cvm::proxy->backup_file(replica_hills_file); + replica_hills_os = cvm::proxy->output_stream(replica_hills_file); + if (!replica_hills_os) return cvm::get_error(); + replica_hills_os->setf(std::ios::scientific, std::ios::floatfield); } // write the state file (so that there is always one available) @@ -1539,46 +1543,52 @@ int colvarbias_meta::setup_output() // if we're running without grids, use a growing list of "hills" files // otherwise, just one state file and one "hills" file as buffer - std::ofstream list_os(replica_list_file.c_str(), - (use_grids ? std::ios::trunc : std::ios::app)); - if (! list_os.is_open()) - cvm::fatal_error("Error: in opening file \""+ - replica_list_file+"\" for writing.\n"); - list_os << "stateFile " << replica_state_file << "\n"; - list_os << "hillsFile " << replica_hills_file << "\n"; - list_os.close(); - - // finally, if add a new record for this replica to the registry + std::ostream *list_os = + cvm::proxy->output_stream(replica_list_file, + (use_grids ? std::ios_base::trunc : + std::ios_base::app)); + if (!list_os) { + return cvm::get_error(); + } + *list_os << "stateFile " << replica_state_file << "\n"; + *list_os << "hillsFile " << replica_hills_file << "\n"; + cvm::proxy->close_output_stream(replica_list_file); + + // finally, add a new record for this replica to the registry if (! registered_replica) { - std::ofstream reg_os(replicas_registry_file.c_str(), std::ios::app); - if (! reg_os.is_open()) - cvm::error("Error: in opening file \""+ - replicas_registry_file+"\" for writing.\n", FILE_ERROR); - reg_os << replica_id << " " << replica_list_file << "\n"; - reg_os.close(); + std::ostream *reg_os = + cvm::proxy->output_stream(replicas_registry_file, + std::ios::app); + if (!reg_os) { + return cvm::get_error(); + } + *reg_os << replica_id << " " << replica_list_file << "\n"; + cvm::proxy->close_output_stream(replicas_registry_file); } } if (b_hills_traj) { - std::string const traj_file_name(cvm::output_prefix()+ - ".colvars."+this->name+ - ( (comm != single_replica) ? - ("."+replica_id) : - ("") )+ - ".hills.traj"); - if (!hills_traj_os.is_open()) { - cvm::backup_file(traj_file_name.c_str()); - hills_traj_os.open(traj_file_name.c_str()); + if (!hills_traj_os) { + hills_traj_os = cvm::proxy->output_stream(hills_traj_file_name()); + if (!hills_traj_os) return cvm::get_error(); } - if (!hills_traj_os.is_open()) - cvm::error("Error: in opening hills output file \"" + - traj_file_name+"\".\n", FILE_ERROR); } return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); } +std::string const colvarbias_meta::hills_traj_file_name() const +{ + return std::string(cvm::output_prefix()+ + ".colvars."+this->name+ + ( (comm != single_replica) ? + ("."+replica_id) : + ("") )+ + ".hills.traj"); +} + + std::string const colvarbias_meta::get_state_params() const { std::ostringstream os; @@ -1671,12 +1681,13 @@ void colvarbias_meta::write_pmf() (dump_fes_save ? "."+cvm::to_str(cvm::step_absolute()) : "") + ".pmf"); - cvm::backup_file(fes_file_name.c_str()); - cvm::ofstream fes_os(fes_file_name.c_str()); - pmf->write_multicol(fes_os); - fes_os.close(); + cvm::proxy->backup_file(fes_file_name); + std::ostream *fes_os = cvm::proxy->output_stream(fes_file_name); + pmf->write_multicol(*fes_os); + cvm::proxy->close_output_stream(fes_file_name); } } + if (comm != single_replica) { // output the combined PMF from all replicas pmf->reset(); @@ -1695,10 +1706,10 @@ void colvarbias_meta::write_pmf() (dump_fes_save ? "."+cvm::to_str(cvm::step_absolute()) : "") + ".pmf"); - cvm::backup_file(fes_file_name.c_str()); - cvm::ofstream fes_os(fes_file_name.c_str()); - pmf->write_multicol(fes_os); - fes_os.close(); + cvm::proxy->backup_file(fes_file_name); + std::ostream *fes_os = cvm::proxy->output_stream(fes_file_name); + pmf->write_multicol(*fes_os); + cvm::proxy->close_output_stream(fes_file_name); } delete pmf; @@ -1769,13 +1780,11 @@ int colvarbias_meta::write_replica_state_file() // rep_state_os.close(); // reopen the hills file - replica_hills_os.close(); - cvm::backup_file(replica_hills_file.c_str()); - replica_hills_os.open(replica_hills_file.c_str()); - if (!replica_hills_os.is_open()) - cvm::fatal_error("Error: in opening file \""+ - replica_hills_file+"\" for writing.\n"); - replica_hills_os.setf(std::ios::scientific, std::ios::floatfield); + cvm::proxy->close_output_stream(replica_hills_file); + cvm::proxy->backup_file(replica_hills_file); + replica_hills_os = cvm::proxy->output_stream(replica_hills_file); + if (!replica_hills_os) return cvm::get_error(); + replica_hills_os->setf(std::ios::scientific, std::ios::floatfield); return COLVARS_OK; } diff --git a/lib/colvars/colvarbias_meta.h b/lib/colvars/colvarbias_meta.h index 01921eaf64..249f7342bc 100644 --- a/lib/colvars/colvarbias_meta.h +++ b/lib/colvars/colvarbias_meta.h @@ -78,7 +78,10 @@ protected: /// Write the hill logfile bool b_hills_traj; /// Logfile of hill management (creation and deletion) - cvm::ofstream hills_traj_os; + std::ostream *hills_traj_os; + + /// Name of the hill logfile + std::string const hills_traj_file_name() const; /// \brief List of hills used on this bias (total); if a grid is /// employed, these don't need to be updated at every time step @@ -241,7 +244,7 @@ protected: std::string replica_hills_file; /// \brief Output stream corresponding to replica_hills_file - cvm::ofstream replica_hills_os; + std::ostream *replica_hills_os; /// Position within replica_hills_file (when reading it) int replica_hills_file_pos; diff --git a/lib/colvars/colvarbias_restraint.cpp b/lib/colvars/colvarbias_restraint.cpp index 159d9eae64..bb6d6164e5 100644 --- a/lib/colvars/colvarbias_restraint.cpp +++ b/lib/colvars/colvarbias_restraint.cpp @@ -853,6 +853,21 @@ int colvarbias_restraint_harmonic_walls::init(std::string const &conf) get_keyval(conf, "upperWallConstant", upper_wall_k, (upper_wall_k > 0.0) ? upper_wall_k : force_k); + if (lower_wall_k * upper_wall_k > 0.0) { + for (size_t i = 0; i < num_variables(); i++) { + if (variables(i)->width != 1.0) + cvm::log("The lower and upper wall force constants for colvar \""+ + variables(i)->name+ + "\" will be rescaled to "+ + cvm::to_str(lower_wall_k / + (variables(i)->width * variables(i)->width))+ + " and "+ + cvm::to_str(upper_wall_k / + (variables(i)->width * variables(i)->width))+ + " according to the specified width.\n"); + } + } + enable(f_cvb_scalar_variables); size_t i; @@ -869,7 +884,7 @@ int colvarbias_restraint_harmonic_walls::init(std::string const &conf) if (!get_keyval(conf, "lowerWalls", lower_walls, lower_walls) && b_null_lower_walls) { cvm::log("Lower walls were not provided.\n"); - lower_walls.resize(0); + lower_walls.clear(); } bool b_null_upper_walls = false; @@ -884,7 +899,7 @@ int colvarbias_restraint_harmonic_walls::init(std::string const &conf) if (!get_keyval(conf, "upperWalls", upper_walls, upper_walls) && b_null_upper_walls) { cvm::log("Upper walls were not provided.\n"); - upper_walls.resize(0); + upper_walls.clear(); } if ((lower_walls.size() == 0) && (upper_walls.size() == 0)) { @@ -954,7 +969,8 @@ void colvarbias_restraint_harmonic_walls::communicate_forces() cvm::log("Communicating a force to colvar \""+ variables(i)->name+"\".\n"); } - variables(i)->add_bias_force_actual_value(colvar_forces[i]); + // Impulse-style multiple timestep + variables(i)->add_bias_force_actual_value(cvm::real(time_step_factor) * colvar_forces[i]); } } @@ -1282,9 +1298,9 @@ int colvarbias_restraint_histogram::init(std::string const &conf) colvarbias_restraint_histogram::~colvarbias_restraint_histogram() { - p.resize(0); - ref_p.resize(0); - p_diff.resize(0); + p.clear(); + ref_p.clear(); + p_diff.clear(); } @@ -1382,23 +1398,23 @@ std::ostream & colvarbias_restraint_histogram::write_restart(std::ostream &os) { if (b_write_histogram) { std::string file_name(cvm::output_prefix()+"."+this->name+".hist.dat"); - std::ofstream os(file_name.c_str()); - os << "# " << cvm::wrap_string(variables(0)->name, cvm::cv_width) - << " " << "p(" << cvm::wrap_string(variables(0)->name, cvm::cv_width-3) - << ")\n"; + std::ostream *os = cvm::proxy->output_stream(file_name); + *os << "# " << cvm::wrap_string(variables(0)->name, cvm::cv_width) + << " " << "p(" << cvm::wrap_string(variables(0)->name, cvm::cv_width-3) + << ")\n"; size_t igrid; for (igrid = 0; igrid < p.size(); igrid++) { cvm::real const x_grid = (lower_boundary + (igrid+1)*width); - os << " " - << std::setprecision(cvm::cv_prec) - << std::setw(cvm::cv_width) - << x_grid - << " " - << std::setprecision(cvm::cv_prec) - << std::setw(cvm::cv_width) - << p[igrid] << "\n"; + *os << " " + << std::setprecision(cvm::cv_prec) + << std::setw(cvm::cv_width) + << x_grid + << " " + << std::setprecision(cvm::cv_prec) + << std::setw(cvm::cv_width) + << p[igrid] << "\n"; } - os.close(); + cvm::proxy->close_output_stream(file_name); } return os; } diff --git a/lib/colvars/colvarcomp.cpp b/lib/colvars/colvarcomp.cpp index 786bc032d2..589de1d32a 100644 --- a/lib/colvars/colvarcomp.cpp +++ b/lib/colvars/colvarcomp.cpp @@ -51,6 +51,17 @@ colvar::cvc::cvc(std::string const &conf) get_keyval_feature((colvarparse *)this, conf, "debugGradients", f_cvc_debug_gradient, false, parse_silent); + { + bool b_no_PBC = false; + get_keyval(conf, "forceNoPBC", b_no_PBC, false); + if (b_no_PBC) { + disable(f_cvc_pbc_minimum_image); + } else { + enable(f_cvc_pbc_minimum_image); + } + // this does not use get_keyval_feature() only for backward compatibility + } + // Attempt scalable calculations when in parallel? (By default yes, if available) get_keyval(conf, "scalable", b_try_scalable, true); @@ -94,13 +105,15 @@ cvm::atom_group *colvar::cvc::parse_group(std::string const &conf, bool optional) { cvm::atom_group *group = NULL; + std::string group_conf; - if (key_lookup(conf, group_key)) { - group = new cvm::atom_group; - group->key = group_key; + if (key_lookup(conf, group_key, &group_conf)) { + group = new cvm::atom_group(group_key); if (b_try_scalable) { - if (is_available(f_cvc_scalable_com) && is_enabled(f_cvc_com_based)) { + if (is_available(f_cvc_scalable_com) + && is_enabled(f_cvc_com_based) + && !is_enabled(f_cvc_debug_gradient)) { enable(f_cvc_scalable_com); enable(f_cvc_scalable); // The CVC makes the feature available; @@ -111,44 +124,51 @@ cvm::atom_group *colvar::cvc::parse_group(std::string const &conf, // TODO check for other types of parallelism here } - if (group->parse(conf) == COLVARS_OK) { - atom_groups.push_back(group); - } else { + if (group_conf.size() == 0) { + cvm::error("Error: atom group \""+group->key+ + "\" is set, but has no definition.\n", + INPUT_ERROR); + return group; + } + + cvm::increase_depth(); + if (group->parse(group_conf) == COLVARS_OK) { + register_atom_group(group); + } + group->check_keywords(group_conf, group_key); + if (cvm::get_error()) { cvm::error("Error parsing definition for atom group \""+ - std::string(group_key)+"\".\n"); + std::string(group_key)+"\"\n.", INPUT_ERROR); } + cvm::decrease_depth(); + } else { if (! optional) { cvm::error("Error: definition for atom group \""+ - std::string(group_key)+"\" not found.\n"); + std::string(group_key)+"\" not found.\n"); } } + return group; } int colvar::cvc::setup() { - size_t i; description = "cvc " + name; - - for (i = 0; i < atom_groups.size(); i++) { - add_child((colvardeps *) atom_groups[i]); - } - return COLVARS_OK; } colvar::cvc::~cvc() { + free_children_deps(); remove_all_children(); for (size_t i = 0; i < atom_groups.size(); i++) { if (atom_groups[i] != NULL) delete atom_groups[i]; } } - void colvar::cvc::read_data() { size_t ig; @@ -187,117 +207,129 @@ void colvar::cvc::calc_Jacobian_derivative() } -void colvar::cvc::debug_gradients(cvm::atom_group *group) +void colvar::cvc::calc_fit_gradients() +{ + for (size_t ig = 0; ig < atom_groups.size(); ig++) { + atom_groups[ig]->calc_fit_gradients(); + } +} + + +void colvar::cvc::debug_gradients() { - // this function should work for any scalar variable: + // this function should work for any scalar cvc: // the only difference will be the name of the atom group (here, "group") // NOTE: this assumes that groups for this cvc are non-overlapping, // since atom coordinates are modified only within the current group - if (group->b_dummy) return; + cvm::log("Debugging gradients for " + description); - cvm::rotation const rot_0 = group->rot; - cvm::rotation const rot_inv = group->rot.inverse(); + for (size_t ig = 0; ig < atom_groups.size(); ig++) { + cvm::atom_group *group = atom_groups[ig]; + if (group->b_dummy) continue; - cvm::real x_0 = x.real_value; - if ((x.type() == colvarvalue::type_vector) && (x.size() == 1)) x_0 = x[0]; + cvm::rotation const rot_0 = group->rot; + cvm::rotation const rot_inv = group->rot.inverse(); - // cvm::log("gradients = "+cvm::to_str (gradients)+"\n"); + cvm::real x_0 = x.real_value; + if ((x.type() == colvarvalue::type_vector) && (x.size() == 1)) x_0 = x[0]; - cvm::atom_group *group_for_fit = group->fitting_group ? group->fitting_group : group; - cvm::atom_pos fit_gradient_sum, gradient_sum; + // cvm::log("gradients = "+cvm::to_str (gradients)+"\n"); - // print the values of the fit gradients - if (group->b_rotate || group->b_center) { - if (group->b_fit_gradients) { - size_t j; + cvm::atom_group *group_for_fit = group->fitting_group ? group->fitting_group : group; + cvm::atom_pos fit_gradient_sum, gradient_sum; - // fit_gradients are in the simulation frame: we should print them in the rotated frame - cvm::log("Fit gradients:\n"); - for (j = 0; j < group_for_fit->fit_gradients.size(); j++) { - cvm::log((group->fitting_group ? std::string("refPosGroup") : group->key) + - "[" + cvm::to_str(j) + "] = " + - (group->b_rotate ? - cvm::to_str(rot_0.rotate(group_for_fit->fit_gradients[j])) : - cvm::to_str(group_for_fit->fit_gradients[j]))); - } - } - } - - // debug the gradients - for (size_t ia = 0; ia < group->size(); ia++) { - - // tests are best conducted in the unrotated (simulation) frame - cvm::rvector const atom_grad = (group->b_rotate ? - rot_inv.rotate((*group)[ia].grad) : - (*group)[ia].grad); - gradient_sum += atom_grad; + // print the values of the fit gradients + if (group->b_rotate || group->b_center) { + if (group->is_enabled(f_ag_fit_gradients)) { + size_t j; - for (size_t id = 0; id < 3; id++) { - // (re)read original positions - group->read_positions(); - // change one coordinate - (*group)[ia].pos[id] += cvm::debug_gradients_step_size; - group->calc_required_properties(); - calc_value(); - cvm::real x_1 = x.real_value; - if ((x.type() == colvarvalue::type_vector) && (x.size() == 1)) x_1 = x[0]; - cvm::log("Atom "+cvm::to_str(ia)+", component "+cvm::to_str(id)+":\n"); - cvm::log("dx(actual) = "+cvm::to_str(x_1 - x_0, - 21, 14)+"\n"); - cvm::real const dx_pred = (group->fit_gradients.size()) ? - (cvm::debug_gradients_step_size * (atom_grad[id] + group->fit_gradients[ia][id])) : - (cvm::debug_gradients_step_size * atom_grad[id]); - cvm::log("dx(interp) = "+cvm::to_str(dx_pred, - 21, 14)+"\n"); - cvm::log("|dx(actual) - dx(interp)|/|dx(actual)| = "+ - cvm::to_str(std::fabs(x_1 - x_0 - dx_pred) / - std::fabs(x_1 - x_0), 12, 5)+"\n"); + // fit_gradients are in the simulation frame: we should print them in the rotated frame + cvm::log("Fit gradients:\n"); + for (j = 0; j < group_for_fit->fit_gradients.size(); j++) { + cvm::log((group->fitting_group ? std::string("refPosGroup") : group->key) + + "[" + cvm::to_str(j) + "] = " + + (group->b_rotate ? + cvm::to_str(rot_0.rotate(group_for_fit->fit_gradients[j])) : + cvm::to_str(group_for_fit->fit_gradients[j]))); + } + } } - } - if ((group->b_fit_gradients) && (group->fitting_group != NULL)) { - cvm::atom_group *ref_group = group->fitting_group; - group->read_positions(); - group->calc_required_properties(); + // debug the gradients + for (size_t ia = 0; ia < group->size(); ia++) { - for (size_t ia = 0; ia < ref_group->size(); ia++) { - - // fit gradients are in the unrotated (simulation) frame - cvm::rvector const atom_grad = ref_group->fit_gradients[ia]; - fit_gradient_sum += atom_grad; + // tests are best conducted in the unrotated (simulation) frame + cvm::rvector const atom_grad = (group->b_rotate ? + rot_inv.rotate((*group)[ia].grad) : + (*group)[ia].grad); + gradient_sum += atom_grad; for (size_t id = 0; id < 3; id++) { // (re)read original positions group->read_positions(); - ref_group->read_positions(); // change one coordinate - (*ref_group)[ia].pos[id] += cvm::debug_gradients_step_size; + (*group)[ia].pos[id] += cvm::debug_gradients_step_size; group->calc_required_properties(); calc_value(); + cvm::real x_1 = x.real_value; + if ((x.type() == colvarvalue::type_vector) && (x.size() == 1)) x_1 = x[0]; + cvm::log("Atom "+cvm::to_str(ia)+", component "+cvm::to_str(id)+":\n"); + cvm::log("dx(actual) = "+cvm::to_str(x_1 - x_0, + 21, 14)+"\n"); + cvm::real const dx_pred = (group->fit_gradients.size()) ? + (cvm::debug_gradients_step_size * (atom_grad[id] + group->fit_gradients[ia][id])) : + (cvm::debug_gradients_step_size * atom_grad[id]); + cvm::log("dx(interp) = "+cvm::to_str(dx_pred, + 21, 14)+"\n"); + cvm::log("|dx(actual) - dx(interp)|/|dx(actual)| = "+ + cvm::to_str(std::fabs(x_1 - x_0 - dx_pred) / + std::fabs(x_1 - x_0), 12, 5)+"\n"); + } + } - cvm::real const x_1 = x.real_value; - cvm::log("refPosGroup atom "+cvm::to_str(ia)+", component "+cvm::to_str (id)+":\n"); - cvm::log("dx(actual) = "+cvm::to_str (x_1 - x_0, - 21, 14)+"\n"); - - cvm::real const dx_pred = cvm::debug_gradients_step_size * atom_grad[id]; + if ((group->is_enabled(f_ag_fit_gradients)) && (group->fitting_group != NULL)) { + cvm::atom_group *ref_group = group->fitting_group; + group->read_positions(); + group->calc_required_properties(); - cvm::log("dx(interp) = "+cvm::to_str (dx_pred, - 21, 14)+"\n"); - cvm::log ("|dx(actual) - dx(interp)|/|dx(actual)| = "+ - cvm::to_str(std::fabs (x_1 - x_0 - dx_pred) / - std::fabs (x_1 - x_0), - 12, 5)+ - ".\n"); + for (size_t ia = 0; ia < ref_group->size(); ia++) { + + // fit gradients are in the unrotated (simulation) frame + cvm::rvector const atom_grad = ref_group->fit_gradients[ia]; + fit_gradient_sum += atom_grad; + + for (size_t id = 0; id < 3; id++) { + // (re)read original positions + group->read_positions(); + ref_group->read_positions(); + // change one coordinate + (*ref_group)[ia].pos[id] += cvm::debug_gradients_step_size; + group->calc_required_properties(); + calc_value(); + + cvm::real const x_1 = x.real_value; + cvm::log("refPosGroup atom "+cvm::to_str(ia)+", component "+cvm::to_str (id)+":\n"); + cvm::log("dx(actual) = "+cvm::to_str (x_1 - x_0, + 21, 14)+"\n"); + + cvm::real const dx_pred = cvm::debug_gradients_step_size * atom_grad[id]; + + cvm::log("dx(interp) = "+cvm::to_str (dx_pred, + 21, 14)+"\n"); + cvm::log ("|dx(actual) - dx(interp)|/|dx(actual)| = "+ + cvm::to_str(std::fabs (x_1 - x_0 - dx_pred) / + std::fabs (x_1 - x_0), + 12, 5)+ + ".\n"); + } } } - } - - cvm::log("Gradient sum: " + cvm::to_str(gradient_sum) + - " Fit gradient sum: " + cvm::to_str(fit_gradient_sum) + - " Total " + cvm::to_str(gradient_sum + fit_gradient_sum)); + cvm::log("Gradient sum: " + cvm::to_str(gradient_sum) + + " Fit gradient sum: " + cvm::to_str(fit_gradient_sum) + + " Total " + cvm::to_str(gradient_sum + fit_gradient_sum)); + } return; } diff --git a/lib/colvars/colvarcomp.h b/lib/colvars/colvarcomp.h index ec215cbad1..2c865a166b 100644 --- a/lib/colvars/colvarcomp.h +++ b/lib/colvars/colvarcomp.h @@ -146,8 +146,11 @@ public: /// order to apply forces virtual void calc_gradients() = 0; + /// \brief Calculate the atomic fit gradients + void calc_fit_gradients(); + /// \brief Calculate finite-difference gradients alongside the analytical ones, for each Cartesian component - virtual void debug_gradients(cvm::atom_group *group); + virtual void debug_gradients(); /// \brief Calculate the total force from the system using the /// inverse atomic gradients @@ -228,6 +231,12 @@ public: /// e.g. atomic gradients std::vector atom_groups; + /// \brief Store a pointer to new atom group, and list as child for dependencies + inline void register_atom_group(cvm::atom_group *ag) { + atom_groups.push_back(ag); + add_child((colvardeps *) ag); + } + /// \brief Whether or not this CVC will be computed in parallel whenever possible bool b_try_scalable; @@ -427,15 +436,77 @@ public: }; +/// \brief Colvar component: polar coordinate phi of a group +/// (colvarvalue::type_scalar type, range [-180:180]) +class colvar::polar_phi + : public colvar::cvc +{ +public: + polar_phi(std::string const &conf); + polar_phi(); + virtual ~polar_phi() {} +protected: + cvm::atom_group *atoms; + cvm::real r, theta, phi; +public: + virtual void calc_value(); + virtual void calc_gradients(); + virtual void apply_force(colvarvalue const &force); + /// Redefined to handle the 2*PI periodicity + virtual cvm::real dist2(colvarvalue const &x1, + colvarvalue const &x2) const; + /// Redefined to handle the 2*PI periodicity + virtual colvarvalue dist2_lgrad(colvarvalue const &x1, + colvarvalue const &x2) const; + /// Redefined to handle the 2*PI periodicity + virtual colvarvalue dist2_rgrad(colvarvalue const &x1, + colvarvalue const &x2) const; + /// Redefined to handle the 2*PI periodicity + virtual void wrap(colvarvalue &x) const; +}; + + +/// \brief Colvar component: polar coordinate theta of a group +/// (colvarvalue::type_scalar type, range [0:180]) +class colvar::polar_theta + : public colvar::cvc +{ +public: + polar_theta(std::string const &conf); + polar_theta(); + virtual ~polar_theta() {} +protected: + cvm::atom_group *atoms; + cvm::real r, theta, phi; +public: + virtual void calc_value(); + virtual void calc_gradients(); + virtual void apply_force(colvarvalue const &force); + /// Redefined to override the distance ones + virtual cvm::real dist2(colvarvalue const &x1, + colvarvalue const &x2) const; + /// Redefined to override the distance ones + virtual colvarvalue dist2_lgrad(colvarvalue const &x1, + colvarvalue const &x2) const; + /// Redefined to override the distance ones + virtual colvarvalue dist2_rgrad(colvarvalue const &x1, + colvarvalue const &x2) const; +}; /// \brief Colvar component: average distance between two groups of atoms, weighted as the sixth power, /// as in NMR refinements(colvarvalue::type_scalar type, range (0:*)) class colvar::distance_inv - : public colvar::distance + : public colvar::cvc { protected: + /// First atom group + cvm::atom_group *group1; + /// Second atom group + cvm::atom_group *group2; /// Components of the distance vector orthogonal to the axis int exponent; + /// Use absolute positions, ignoring PBCs when present + bool b_no_PBC; public: distance_inv(std::string const &conf); distance_inv(); diff --git a/lib/colvars/colvarcomp_angles.cpp b/lib/colvars/colvarcomp_angles.cpp index 0204f3b4b1..9f879a4c41 100644 --- a/lib/colvars/colvarcomp_angles.cpp +++ b/lib/colvars/colvarcomp_angles.cpp @@ -45,9 +45,9 @@ colvar::angle::angle(cvm::atom const &a1, group1 = new cvm::atom_group(std::vector(1, a1)); group2 = new cvm::atom_group(std::vector(1, a2)); group3 = new cvm::atom_group(std::vector(1, a3)); - atom_groups.push_back(group1); - atom_groups.push_back(group2); - atom_groups.push_back(group3); + register_atom_group(group1); + register_atom_group(group2); + register_atom_group(group3); x.type(colvarvalue::type_scalar); } @@ -66,12 +66,16 @@ void colvar::angle::calc_value() cvm::atom_pos const g2_pos = group2->center_of_mass(); cvm::atom_pos const g3_pos = group3->center_of_mass(); - r21 = cvm::position_distance(g2_pos, g1_pos); + r21 = is_enabled(f_cvc_pbc_minimum_image) ? + cvm::position_distance(g2_pos, g1_pos) : + g1_pos - g2_pos; r21l = r21.norm(); - r23 = cvm::position_distance(g2_pos, g3_pos); + r23 = is_enabled(f_cvc_pbc_minimum_image) ? + cvm::position_distance(g2_pos, g3_pos) : + g3_pos - g2_pos; r23l = r23.norm(); - cvm::real const cos_theta = (r21*r23)/(r21l*r23l); + cvm::real const cos_theta = (r21*r23)/(r21l*r23l); x.real_value = (180.0/PI) * std::acos(cos_theta); } @@ -166,9 +170,9 @@ colvar::dipole_angle::dipole_angle(cvm::atom const &a1, group1 = new cvm::atom_group(std::vector(1, a1)); group2 = new cvm::atom_group(std::vector(1, a2)); group3 = new cvm::atom_group(std::vector(1, a3)); - atom_groups.push_back(group1); - atom_groups.push_back(group2); - atom_groups.push_back(group3); + register_atom_group(group1); + register_atom_group(group2); + register_atom_group(group3); x.type(colvarvalue::type_scalar); } @@ -191,10 +195,12 @@ void colvar::dipole_angle::calc_value() r21 = group1->dipole(); r21l = r21.norm(); - r23 = cvm::position_distance(g2_pos, g3_pos); + r23 = is_enabled(f_cvc_pbc_minimum_image) ? + cvm::position_distance(g2_pos, g3_pos) : + g3_pos - g2_pos; r23l = r23.norm(); - cvm::real const cos_theta = (r21*r23)/(r21l*r23l); + cvm::real const cos_theta = (r21*r23)/(r21l*r23l); x.real_value = (180.0/PI) * std::acos(cos_theta); } @@ -293,10 +299,10 @@ colvar::dihedral::dihedral(cvm::atom const &a1, group2 = new cvm::atom_group(std::vector(1, a2)); group3 = new cvm::atom_group(std::vector(1, a3)); group4 = new cvm::atom_group(std::vector(1, a4)); - atom_groups.push_back(group1); - atom_groups.push_back(group2); - atom_groups.push_back(group3); - atom_groups.push_back(group4); + register_atom_group(group1); + register_atom_group(group2); + register_atom_group(group3); + register_atom_group(group4); x.type(colvarvalue::type_scalar); @@ -324,9 +330,15 @@ void colvar::dihedral::calc_value() cvm::atom_pos const g4_pos = group4->center_of_mass(); // Usual sign convention: r12 = r2 - r1 - r12 = cvm::position_distance(g1_pos, g2_pos); - r23 = cvm::position_distance(g2_pos, g3_pos); - r34 = cvm::position_distance(g3_pos, g4_pos); + r12 = is_enabled(f_cvc_pbc_minimum_image) ? + cvm::position_distance(g1_pos, g2_pos) : + g2_pos - g1_pos; + r23 = is_enabled(f_cvc_pbc_minimum_image) ? + cvm::position_distance(g2_pos, g3_pos) : + g3_pos - g2_pos; + r34 = is_enabled(f_cvc_pbc_minimum_image) ? + cvm::position_distance(g3_pos, g4_pos) : + g4_pos - g3_pos; cvm::rvector const n1 = cvm::rvector::outer(r12, r23); cvm::rvector const n2 = cvm::rvector::outer(r23, r34); @@ -365,10 +377,10 @@ void colvar::dihedral::calc_gradients() cvm::real const K = (1.0/sin_phi) * (180.0/PI); - f1 = K * cvm::rvector::outer(r23, dcosdA); - f3 = K * cvm::rvector::outer(dcosdB, r23); - f2 = K * (cvm::rvector::outer(dcosdA, r12) - + cvm::rvector::outer(r34, dcosdB)); + f1 = K * cvm::rvector::outer(r23, dcosdA); + f3 = K * cvm::rvector::outer(dcosdB, r23); + f2 = K * (cvm::rvector::outer(dcosdA, r12) + + cvm::rvector::outer(r34, dcosdB)); } else { rC = 1.0/rC; @@ -439,7 +451,7 @@ void colvar::dihedral::calc_force_invgrads() // Default case: use groups 1 and 4 group4->read_total_forces(); ft.real_value = PI/180.0 * 0.5 * (fact1 * (cross1 * group1->total_force()) - + fact4 * (cross4 * group4->total_force())); + + fact4 * (cross4 * group4->total_force())); } } @@ -510,3 +522,148 @@ void colvar::dihedral::wrap(colvarvalue &x) const return; } + + +colvar::polar_theta::polar_theta(std::string const &conf) + : cvc(conf) +{ + function_type = "polar_theta"; + enable(f_cvc_com_based); + + atoms = parse_group(conf, "atoms"); + init_total_force_params(conf); + x.type(colvarvalue::type_scalar); +} + + +colvar::polar_theta::polar_theta() +{ + function_type = "polar_theta"; + x.type(colvarvalue::type_scalar); +} + + +void colvar::polar_theta::calc_value() +{ + cvm::rvector pos = atoms->center_of_mass(); + r = atoms->center_of_mass().norm(); + // Internal values of theta and phi are radians + theta = (r > 0.) ? std::acos(pos.z / r) : 0.; + phi = std::atan2(pos.y, pos.x); + x.real_value = (180.0/PI) * theta; +} + + +void colvar::polar_theta::calc_gradients() +{ + if (r == 0.) + atoms->set_weighted_gradient(cvm::rvector(0., 0., 0.)); + else + atoms->set_weighted_gradient(cvm::rvector( + (180.0/PI) * std::cos(theta) * std::cos(phi) / r, + (180.0/PI) * std::cos(theta) * std::sin(phi) / r, + (180.0/PI) * -std::sin(theta) / r)); +} + + +void colvar::polar_theta::apply_force(colvarvalue const &force) +{ + if (!atoms->noforce) + atoms->apply_colvar_force(force.real_value); +} + + +simple_scalar_dist_functions(polar_theta) + + +colvar::polar_phi::polar_phi(std::string const &conf) + : cvc(conf) +{ + function_type = "polar_phi"; + period = 360.0; + enable(f_cvc_com_based); + + atoms = parse_group(conf, "atoms"); + init_total_force_params(conf); + x.type(colvarvalue::type_scalar); +} + + +colvar::polar_phi::polar_phi() +{ + function_type = "polar_phi"; + period = 360.0; + x.type(colvarvalue::type_scalar); +} + + +void colvar::polar_phi::calc_value() +{ + cvm::rvector pos = atoms->center_of_mass(); + r = atoms->center_of_mass().norm(); + // Internal values of theta and phi are radians + theta = (r > 0.) ? std::acos(pos.z / r) : 0.; + phi = std::atan2(pos.y, pos.x); + x.real_value = (180.0/PI) * phi; +} + + +void colvar::polar_phi::calc_gradients() +{ + atoms->set_weighted_gradient(cvm::rvector( + (180.0/PI) * -std::sin(phi) / (r*std::sin(theta)), + (180.0/PI) * std::cos(phi) / (r*std::sin(theta)), + 0.)); +} + + +void colvar::polar_phi::apply_force(colvarvalue const &force) +{ + if (!atoms->noforce) + atoms->apply_colvar_force(force.real_value); +} + + +// Same as dihedral, for polar_phi + +cvm::real colvar::polar_phi::dist2(colvarvalue const &x1, + colvarvalue const &x2) const +{ + cvm::real diff = x1.real_value - x2.real_value; + diff = (diff < -180.0 ? diff + 360.0 : (diff > 180.0 ? diff - 360.0 : diff)); + return diff * diff; +} + + +colvarvalue colvar::polar_phi::dist2_lgrad(colvarvalue const &x1, + colvarvalue const &x2) const +{ + cvm::real diff = x1.real_value - x2.real_value; + diff = (diff < -180.0 ? diff + 360.0 : (diff > 180.0 ? diff - 360.0 : diff)); + return 2.0 * diff; +} + + +colvarvalue colvar::polar_phi::dist2_rgrad(colvarvalue const &x1, + colvarvalue const &x2) const +{ + cvm::real diff = x1.real_value - x2.real_value; + diff = (diff < -180.0 ? diff + 360.0 : (diff > 180.0 ? diff - 360.0 : diff)); + return (-2.0) * diff; +} + + +void colvar::polar_phi::wrap(colvarvalue &x) const +{ + if ((x.real_value - wrap_center) >= 180.0) { + x.real_value -= 360.0; + return; + } + + if ((x.real_value - wrap_center) < -180.0) { + x.real_value += 360.0; + return; + } + + return; +} diff --git a/lib/colvars/colvarcomp_coordnums.cpp b/lib/colvars/colvarcomp_coordnums.cpp index 987a16a816..369d489e27 100644 --- a/lib/colvars/colvarcomp_coordnums.cpp +++ b/lib/colvars/colvarcomp_coordnums.cpp @@ -87,8 +87,10 @@ colvar::coordnum::coordnum(std::string const &conf) group1 = parse_group(conf, "group1"); group2 = parse_group(conf, "group2"); - if (group1->b_dummy) - cvm::fatal_error("Error: only group2 is allowed to be a dummy atom\n"); + if (group1->b_dummy) { + cvm::error("Error: only group2 is allowed to be a dummy atom\n"); + return; + } bool const b_isotropic = get_keyval(conf, "cutoff", r0, cvm::real(4.0 * cvm::unit_angstrom())); @@ -99,6 +101,7 @@ colvar::coordnum::coordnum(std::string const &conf) if (b_isotropic) { cvm::error("Error: cannot specify \"cutoff\" and \"cutoff3\" at the same time.\n", INPUT_ERROR); + return; } b_anisotropic = true; @@ -115,6 +118,10 @@ colvar::coordnum::coordnum(std::string const &conf) cvm::error("Error: odd exponents provided, can only use even ones.\n", INPUT_ERROR); } + if (!is_enabled(f_cvc_pbc_minimum_image)) { + cvm::log("Warning: only minimum-image distances are used by this variable.\n"); + } + get_keyval(conf, "group2CenterOnly", b_group2_center_only, group2->b_dummy); } @@ -228,12 +235,13 @@ colvar::h_bond::h_bond(std::string const &conf) get_keyval(conf, "donor", d_num, -1); if ( (a_num == -1) || (d_num == -1) ) { - cvm::fatal_error("Error: either acceptor or donor undefined.\n"); + cvm::error("Error: either acceptor or donor undefined.\n"); + return; } cvm::atom acceptor = cvm::atom(a_num); cvm::atom donor = cvm::atom(d_num); - atom_groups.push_back(new cvm::atom_group); + register_atom_group(new cvm::atom_group); atom_groups[0]->add_atom(acceptor); atom_groups[0]->add_atom(donor); @@ -242,7 +250,8 @@ colvar::h_bond::h_bond(std::string const &conf) get_keyval(conf, "expDenom", ed, 8); if ( (en%2) || (ed%2) ) { - cvm::fatal_error("Error: odd exponents provided, can only use even ones.\n"); + cvm::error("Error: odd exponents provided, can only use even ones.\n"); + return; } if (cvm::debug()) @@ -258,7 +267,7 @@ colvar::h_bond::h_bond(cvm::atom const &acceptor, function_type = "h_bond"; x.type(colvarvalue::type_scalar); - atom_groups.push_back(new cvm::atom_group); + register_atom_group(new cvm::atom_group); atom_groups[0]->add_atom(acceptor); atom_groups[0]->add_atom(donor); } @@ -313,7 +322,12 @@ colvar::selfcoordnum::selfcoordnum(std::string const &conf) get_keyval(conf, "expDenom", ed, int(12)); if ( (en%2) || (ed%2) ) { - cvm::fatal_error("Error: odd exponents provided, can only use even ones.\n"); + cvm::error("Error: odd exponents provided, can only use even ones.\n"); + return; + } + + if (!is_enabled(f_cvc_pbc_minimum_image)) { + cvm::log("Warning: only minimum-image distances are used by this variable.\n"); } } @@ -364,8 +378,10 @@ colvar::groupcoordnum::groupcoordnum(std::string const &conf) x.type(colvarvalue::type_scalar); // group1 and group2 are already initialized by distance() - if (group1->b_dummy || group2->b_dummy) - cvm::fatal_error("Error: neither group can be a dummy atom\n"); + if (group1->b_dummy || group2->b_dummy) { + cvm::error("Error: neither group can be a dummy atom\n"); + return; + } bool const b_scale = get_keyval(conf, "cutoff", r0, cvm::real(4.0 * cvm::unit_angstrom())); @@ -373,9 +389,11 @@ colvar::groupcoordnum::groupcoordnum(std::string const &conf) if (get_keyval(conf, "cutoff3", r0_vec, cvm::rvector(4.0, 4.0, 4.0), parse_silent)) { - if (b_scale) - cvm::fatal_error("Error: cannot specify \"scale\" and " + if (b_scale) { + cvm::error("Error: cannot specify \"scale\" and " "\"scale3\" at the same time.\n"); + return; + } b_anisotropic = true; // remove meaningless negative signs if (r0_vec.x < 0.0) r0_vec.x *= -1.0; @@ -387,7 +405,12 @@ colvar::groupcoordnum::groupcoordnum(std::string const &conf) get_keyval(conf, "expDenom", ed, int(12)); if ( (en%2) || (ed%2) ) { - cvm::fatal_error("Error: odd exponents provided, can only use even ones.\n"); + cvm::error("Error: odd exponents provided, can only use even ones.\n"); + return; + } + + if (!is_enabled(f_cvc_pbc_minimum_image)) { + cvm::log("Warning: only minimum-image distances are used by this variable.\n"); } } diff --git a/lib/colvars/colvarcomp_distances.cpp b/lib/colvars/colvarcomp_distances.cpp index f46270246f..18d154515a 100644 --- a/lib/colvars/colvarcomp_distances.cpp +++ b/lib/colvars/colvarcomp_distances.cpp @@ -28,10 +28,6 @@ colvar::distance::distance(std::string const &conf) group1 = parse_group(conf, "group1"); group2 = parse_group(conf, "group2"); - if (get_keyval(conf, "forceNoPBC", b_no_PBC, false)) { - cvm::log("Computing distance using absolute positions (not minimal-image)"); - } - init_total_force_params(conf); x.type(colvarvalue::type_scalar); @@ -45,18 +41,17 @@ colvar::distance::distance() provide(f_cvc_inv_gradient); provide(f_cvc_Jacobian); enable(f_cvc_com_based); - b_no_PBC = false; x.type(colvarvalue::type_scalar); } void colvar::distance::calc_value() { - if (b_no_PBC) { + if (!is_enabled(f_cvc_pbc_minimum_image)) { dist_v = group2->center_of_mass() - group1->center_of_mass(); } else { dist_v = cvm::position_distance(group1->center_of_mass(), - group2->center_of_mass()); + group2->center_of_mass()); } x.real_value = dist_v.norm(); } @@ -107,6 +102,7 @@ colvar::distance_vec::distance_vec(std::string const &conf) { function_type = "distance_vec"; enable(f_cvc_com_based); + enable(f_cvc_implicit_gradient); x.type(colvarvalue::type_3vector); } @@ -116,17 +112,18 @@ colvar::distance_vec::distance_vec() { function_type = "distance_vec"; enable(f_cvc_com_based); + enable(f_cvc_implicit_gradient); x.type(colvarvalue::type_3vector); } void colvar::distance_vec::calc_value() { - if (b_no_PBC) { + if (!is_enabled(f_cvc_pbc_minimum_image)) { x.rvector_value = group2->center_of_mass() - group1->center_of_mass(); } else { x.rvector_value = cvm::position_distance(group1->center_of_mass(), - group2->center_of_mass()); + group2->center_of_mass()); } } @@ -214,10 +211,6 @@ colvar::distance_z::distance_z(std::string const &conf) fixed_axis = true; } - if (get_keyval(conf, "forceNoPBC", b_no_PBC, false)) { - cvm::log("Computing distance using absolute positions (not minimal-image)"); - } - init_total_force_params(conf); } @@ -236,22 +229,24 @@ colvar::distance_z::distance_z() void colvar::distance_z::calc_value() { if (fixed_axis) { - if (b_no_PBC) { + if (!is_enabled(f_cvc_pbc_minimum_image)) { dist_v = main->center_of_mass() - ref1->center_of_mass(); } else { dist_v = cvm::position_distance(ref1->center_of_mass(), - main->center_of_mass()); + main->center_of_mass()); } } else { - if (b_no_PBC) { + if (!is_enabled(f_cvc_pbc_minimum_image)) { dist_v = main->center_of_mass() - (0.5 * (ref1->center_of_mass() + ref2->center_of_mass())); axis = ref2->center_of_mass() - ref1->center_of_mass(); } else { dist_v = cvm::position_distance(0.5 * (ref1->center_of_mass() + - ref2->center_of_mass()), main->center_of_mass()); - axis = cvm::position_distance(ref1->center_of_mass(), ref2->center_of_mass()); + ref2->center_of_mass()), + main->center_of_mass()); + axis = cvm::position_distance(ref1->center_of_mass(), + ref2->center_of_mass()); } axis_norm = axis.norm(); axis = axis.unit(); @@ -268,16 +263,20 @@ void colvar::distance_z::calc_gradients() if (fixed_axis) { ref1->set_weighted_gradient(-1.0 * axis); } else { - if (b_no_PBC) { - ref1->set_weighted_gradient( 1.0 / axis_norm * (main->center_of_mass() - ref2->center_of_mass() - + if (!is_enabled(f_cvc_pbc_minimum_image)) { + ref1->set_weighted_gradient( 1.0 / axis_norm * + (main->center_of_mass() - ref2->center_of_mass() - x.real_value * axis )); - ref2->set_weighted_gradient( 1.0 / axis_norm * (ref1->center_of_mass() - main->center_of_mass() + + ref2->set_weighted_gradient( 1.0 / axis_norm * + (ref1->center_of_mass() - main->center_of_mass() + x.real_value * axis )); } else { ref1->set_weighted_gradient( 1.0 / axis_norm * ( - cvm::position_distance(ref2->center_of_mass(), main->center_of_mass()) - x.real_value * axis )); + cvm::position_distance(ref2->center_of_mass(), + main->center_of_mass()) - x.real_value * axis )); ref2->set_weighted_gradient( 1.0 / axis_norm * ( - cvm::position_distance(main->center_of_mass(), ref1->center_of_mass()) + x.real_value * axis )); + cvm::position_distance(main->center_of_mass(), + ref1->center_of_mass()) + x.real_value * axis )); } } } @@ -390,17 +389,18 @@ colvar::distance_xy::distance_xy() void colvar::distance_xy::calc_value() { - if (b_no_PBC) { + if (!is_enabled(f_cvc_pbc_minimum_image)) { dist_v = main->center_of_mass() - ref1->center_of_mass(); } else { dist_v = cvm::position_distance(ref1->center_of_mass(), - main->center_of_mass()); + main->center_of_mass()); } if (!fixed_axis) { - if (b_no_PBC) { + if (!is_enabled(f_cvc_pbc_minimum_image)) { v12 = ref2->center_of_mass() - ref1->center_of_mass(); } else { - v12 = cvm::position_distance(ref1->center_of_mass(), ref2->center_of_mass()); + v12 = cvm::position_distance(ref1->center_of_mass(), + ref2->center_of_mass()); } axis_norm = v12.norm(); axis = v12.unit(); @@ -425,10 +425,11 @@ void colvar::distance_xy::calc_gradients() ref1->set_weighted_gradient(-1.0 * x_inv * dist_v_ortho); main->set_weighted_gradient( x_inv * dist_v_ortho); } else { - if (b_no_PBC) { + if (!is_enabled(f_cvc_pbc_minimum_image)) { v13 = main->center_of_mass() - ref1->center_of_mass(); } else { - v13 = cvm::position_distance(ref1->center_of_mass(), main->center_of_mass()); + v13 = cvm::position_distance(ref1->center_of_mass(), + main->center_of_mass()); } A = (dist_v * axis) / axis_norm; @@ -480,6 +481,7 @@ colvar::distance_dir::distance_dir(std::string const &conf) { function_type = "distance_dir"; enable(f_cvc_com_based); + enable(f_cvc_implicit_gradient); x.type(colvarvalue::type_unit3vector); } @@ -489,13 +491,14 @@ colvar::distance_dir::distance_dir() { function_type = "distance_dir"; enable(f_cvc_com_based); + enable(f_cvc_implicit_gradient); x.type(colvarvalue::type_unit3vector); } void colvar::distance_dir::calc_value() { - if (b_no_PBC) { + if (!is_enabled(f_cvc_pbc_minimum_image)) { dist_v = group2->center_of_mass() - group1->center_of_mass(); } else { dist_v = cvm::position_distance(group1->center_of_mass(), @@ -539,22 +542,26 @@ cvm::real colvar::distance_dir::dist2(colvarvalue const &x1, colvarvalue colvar::distance_dir::dist2_lgrad(colvarvalue const &x1, colvarvalue const &x2) const { - return colvarvalue((x1.rvector_value - x2.rvector_value), colvarvalue::type_unit3vector); + return colvarvalue((x1.rvector_value - x2.rvector_value), colvarvalue::type_unit3vectorderiv); } colvarvalue colvar::distance_dir::dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const { - return colvarvalue((x2.rvector_value - x1.rvector_value), colvarvalue::type_unit3vector); + return colvarvalue((x2.rvector_value - x1.rvector_value), colvarvalue::type_unit3vectorderiv); } colvar::distance_inv::distance_inv(std::string const &conf) - : distance(conf) + : cvc(conf) { function_type = "distance_inv"; + + group1 = parse_group(conf, "group1"); + group2 = parse_group(conf, "group2"); + get_keyval(conf, "exponent", exponent, 6); if (exponent%2) { cvm::error("Error: odd exponent provided, can only use even ones.\n"); @@ -589,7 +596,7 @@ colvar::distance_inv::distance_inv() void colvar::distance_inv::calc_value() { x.real_value = 0.0; - if (b_no_PBC) { + if (!is_enabled(f_cvc_pbc_minimum_image)) { for (cvm::atom_iter ai1 = group1->begin(); ai1 != group1->end(); ai1++) { for (cvm::atom_iter ai2 = group2->begin(); ai2 != group2->end(); ai2++) { cvm::rvector const dv = ai2->pos - ai1->pos; @@ -655,14 +662,11 @@ colvar::distance_pairs::distance_pairs(std::string const &conf) { function_type = "distance_pairs"; - if (get_keyval(conf, "forceNoPBC", b_no_PBC, false)) { - cvm::log("Computing distance using absolute positions (not minimal-image)"); - } - group1 = parse_group(conf, "group1"); group2 = parse_group(conf, "group2"); x.type(colvarvalue::type_vector); + enable(f_cvc_implicit_gradient); x.vector1d_value.resize(group1->size() * group2->size()); } @@ -670,6 +674,7 @@ colvar::distance_pairs::distance_pairs(std::string const &conf) colvar::distance_pairs::distance_pairs() { function_type = "distance_pairs"; + enable(f_cvc_implicit_gradient); x.type(colvarvalue::type_vector); } @@ -678,7 +683,7 @@ void colvar::distance_pairs::calc_value() { x.vector1d_value.resize(group1->size() * group2->size()); - if (b_no_PBC) { + if (!is_enabled(f_cvc_pbc_minimum_image)) { size_t i1, i2; for (i1 = 0; i1 < group1->size(); i1++) { for (i2 = 0; i2 < group2->size(); i2++) { @@ -693,7 +698,8 @@ void colvar::distance_pairs::calc_value() size_t i1, i2; for (i1 = 0; i1 < group1->size(); i1++) { for (i2 = 0; i2 < group2->size(); i2++) { - cvm::rvector const dv = cvm::position_distance((*group1)[i1].pos, (*group2)[i2].pos); + cvm::rvector const dv = cvm::position_distance((*group1)[i1].pos, + (*group2)[i2].pos); cvm::real const d = dv.norm(); x.vector1d_value[i1*group2->size() + i2] = d; (*group1)[i1].grad = -1.0 * dv.unit(); @@ -712,7 +718,7 @@ void colvar::distance_pairs::calc_gradients() void colvar::distance_pairs::apply_force(colvarvalue const &force) { - if (b_no_PBC) { + if (!is_enabled(f_cvc_pbc_minimum_image)) { size_t i1, i2; for (i1 = 0; i1 < group1->size(); i1++) { for (i2 = 0; i2 < group2->size(); i2++) { @@ -725,7 +731,8 @@ void colvar::distance_pairs::apply_force(colvarvalue const &force) size_t i1, i2; for (i1 = 0; i1 < group1->size(); i1++) { for (i2 = 0; i2 < group2->size(); i2++) { - cvm::rvector const dv = cvm::position_distance((*group1)[i1].pos, (*group2)[i2].pos); + cvm::rvector const dv = cvm::position_distance((*group1)[i1].pos, + (*group2)[i2].pos); (*group1)[i1].apply_force(force[i1*group2->size() + i2] * (-1.0) * dv.unit()); (*group2)[i2].apply_force(force[i1*group2->size() + i2] * dv.unit()); } @@ -999,7 +1006,7 @@ colvar::rmsd::rmsd(std::string const &conf) cvm::log("This is a standard minimum RMSD, derivatives of the optimal rotation " "will not be computed as they cancel out in the gradients."); - atoms->b_fit_gradients = false; + atoms->disable(f_ag_fit_gradients); // request the calculation of the derivatives of the rotation defined by the atom group atoms->rot.request_group1_gradients(atoms->size()); @@ -1191,8 +1198,8 @@ colvar::eigenvector::eigenvector(std::string const &conf) atoms->b_rotate = true; atoms->ref_pos = ref_pos; atoms->center_ref_pos(); - atoms->b_fit_gradients = false; // cancel out if group is fitted on itself - // and cvc is translationally invariant + atoms->disable(f_ag_fit_gradients); // cancel out if group is fitted on itself + // and cvc is translationally invariant // request the calculation of the derivatives of the rotation defined by the atom group atoms->rot.request_group1_gradients(atoms->size()); @@ -1207,8 +1214,9 @@ colvar::eigenvector::eigenvector(std::string const &conf) if (b_inline) { cvm::log("Using vector components from input file.\n"); if (eigenvec.size() != atoms->size()) { - cvm::fatal_error("Error: vector components do not " + cvm::error("Error: vector components do not " "match the number of requested atoms->\n"); + return; } } @@ -1422,6 +1430,7 @@ colvar::cartesian::cartesian(std::string const &conf) } x.type(colvarvalue::type_vector); + enable(f_cvc_implicit_gradient); x.vector1d_value.resize(atoms->size() * axes.size()); } diff --git a/lib/colvars/colvarcomp_protein.cpp b/lib/colvars/colvarcomp_protein.cpp index 393c7dcf9a..b8fc96cfad 100644 --- a/lib/colvars/colvarcomp_protein.cpp +++ b/lib/colvars/colvarcomp_protein.cpp @@ -20,15 +20,6 @@ // alpha component ////////////////////////////////////////////////////////////////////// - // FIXME: this will not make collect_gradients work - // because gradients in individual atom groups - // are those of the sub-cvcs (angle, hb), not those - // of this cvc (alpha) - // This is true of all cvcs with sub-cvcs, and those - // that do not calculate explicit gradients - // SO: we need a flag giving the availability of - // atomic gradients - colvar::alpha_angles::alpha_angles(std::string const &conf) : cvc(conf) { @@ -36,6 +27,7 @@ colvar::alpha_angles::alpha_angles(std::string const &conf) cvm::log("Initializing alpha_angles object.\n"); function_type = "alpha_angles"; + enable(f_cvc_implicit_gradient); x.type(colvarvalue::type_scalar); std::string segment_id; @@ -44,7 +36,7 @@ colvar::alpha_angles::alpha_angles(std::string const &conf) std::vector residues; { std::string residues_conf = ""; - key_lookup(conf, "residueRange", residues_conf); + key_lookup(conf, "residueRange", &residues_conf); if (residues_conf.size()) { std::istringstream is(residues_conf); int initial, final; @@ -57,12 +49,14 @@ colvar::alpha_angles::alpha_angles(std::string const &conf) } } } else { - cvm::fatal_error("Error: no residues defined in \"residueRange\".\n"); + cvm::error("Error: no residues defined in \"residueRange\".\n"); + return; } } if (residues.size() < 5) { - cvm::fatal_error("Error: not enough residues defined in \"residueRange\".\n"); + cvm::error("Error: not enough residues defined in \"residueRange\".\n"); + return; } std::string const &sid = segment_id; @@ -71,7 +65,8 @@ colvar::alpha_angles::alpha_angles(std::string const &conf) get_keyval(conf, "hBondCoeff", hb_coeff, 0.5); if ( (hb_coeff < 0.0) || (hb_coeff > 1.0) ) { - cvm::fatal_error("Error: hBondCoeff must be defined between 0 and 1.\n"); + cvm::error("Error: hBondCoeff must be defined between 0 and 1.\n"); + return; } @@ -84,9 +79,9 @@ colvar::alpha_angles::alpha_angles(std::string const &conf) theta.push_back(new colvar::angle(cvm::atom(r[i ], "CA", sid), cvm::atom(r[i+1], "CA", sid), cvm::atom(r[i+2], "CA", sid))); - atom_groups.push_back(theta.back()->atom_groups[0]); - atom_groups.push_back(theta.back()->atom_groups[1]); - atom_groups.push_back(theta.back()->atom_groups[2]); + register_atom_group(theta.back()->atom_groups[0]); + register_atom_group(theta.back()->atom_groups[1]); + register_atom_group(theta.back()->atom_groups[2]); } } else { @@ -106,7 +101,7 @@ colvar::alpha_angles::alpha_angles(std::string const &conf) hb.push_back(new colvar::h_bond(cvm::atom(r[i ], "O", sid), cvm::atom(r[i+4], "N", sid), r0, en, ed)); - atom_groups.push_back(hb.back()->atom_groups[0]); + register_atom_group(hb.back()->atom_groups[0]); } } else { @@ -123,6 +118,7 @@ colvar::alpha_angles::alpha_angles() : cvc() { function_type = "alpha_angles"; + enable(f_cvc_implicit_gradient); x.type(colvarvalue::type_scalar); } @@ -239,15 +235,6 @@ simple_scalar_dist_functions(alpha_angles) // dihedral principal component ////////////////////////////////////////////////////////////////////// - // FIXME: this will not make collect_gradients work - // because gradients in individual atom groups - // are those of the sub-cvcs (dihedral), not those - // of this cvc - // This is true of all cvcs with sub-cvcs, and those - // that do not calculate explicit gradients - // SO: we need a flag giving the availability of - // atomic gradients - colvar::dihedPC::dihedPC(std::string const &conf) : cvc(conf) { @@ -255,6 +242,7 @@ colvar::dihedPC::dihedPC(std::string const &conf) cvm::log("Initializing dihedral PC object.\n"); function_type = "dihedPC"; + enable(f_cvc_implicit_gradient); x.type(colvarvalue::type_scalar); std::string segment_id; @@ -263,7 +251,7 @@ colvar::dihedPC::dihedPC(std::string const &conf) std::vector residues; { std::string residues_conf = ""; - key_lookup(conf, "residueRange", residues_conf); + key_lookup(conf, "residueRange", &residues_conf); if (residues_conf.size()) { std::istringstream is(residues_conf); int initial, final; @@ -276,12 +264,14 @@ colvar::dihedPC::dihedPC(std::string const &conf) } } } else { - cvm::fatal_error("Error: no residues defined in \"residueRange\".\n"); + cvm::error("Error: no residues defined in \"residueRange\".\n"); + return; } } if (residues.size() < 2) { - cvm::fatal_error("Error: dihedralPC requires at least two residues.\n"); + cvm::error("Error: dihedralPC requires at least two residues.\n"); + return; } std::string const &sid = segment_id; @@ -291,13 +281,16 @@ colvar::dihedPC::dihedPC(std::string const &conf) int vecNumber; if (get_keyval(conf, "vectorFile", vecFileName, vecFileName)) { get_keyval(conf, "vectorNumber", vecNumber, 0); - if (vecNumber < 1) - cvm::fatal_error("A positive value of vectorNumber is required."); + if (vecNumber < 1) { + cvm::error("A positive value of vectorNumber is required."); + return; + } std::ifstream vecFile; vecFile.open(vecFileName.c_str()); - if (!vecFile.good()) - cvm::fatal_error("Error opening dihedral PCA vector file " + vecFileName + " for reading"); + if (!vecFile.good()) { + cvm::error("Error opening dihedral PCA vector file " + vecFileName + " for reading"); + } // TODO: adapt to different formats by setting this flag bool eigenvectors_as_columns = true; @@ -321,8 +314,9 @@ colvar::dihedPC::dihedPC(std::string const &conf) for (int i = 1; iatom_groups[0]); - atom_groups.push_back(theta.back()->atom_groups[1]); - atom_groups.push_back(theta.back()->atom_groups[2]); - atom_groups.push_back(theta.back()->atom_groups[3]); + register_atom_group(theta.back()->atom_groups[0]); + register_atom_group(theta.back()->atom_groups[1]); + register_atom_group(theta.back()->atom_groups[2]); + register_atom_group(theta.back()->atom_groups[3]); // Phi (next res) theta.push_back(new colvar::dihedral(cvm::atom(r[i ], "C", sid), cvm::atom(r[i+1], "N", sid), cvm::atom(r[i+1], "CA", sid), cvm::atom(r[i+1], "C", sid))); - atom_groups.push_back(theta.back()->atom_groups[0]); - atom_groups.push_back(theta.back()->atom_groups[1]); - atom_groups.push_back(theta.back()->atom_groups[2]); - atom_groups.push_back(theta.back()->atom_groups[3]); + register_atom_group(theta.back()->atom_groups[0]); + register_atom_group(theta.back()->atom_groups[1]); + register_atom_group(theta.back()->atom_groups[2]); + register_atom_group(theta.back()->atom_groups[3]); } if (cvm::debug()) @@ -377,6 +372,7 @@ colvar::dihedPC::dihedPC() : cvc() { function_type = "dihedPC"; + enable(f_cvc_implicit_gradient); x.type(colvarvalue::type_scalar); } diff --git a/lib/colvars/colvarcomp_rotations.cpp b/lib/colvars/colvarcomp_rotations.cpp index 936e770169..2650a9fe18 100644 --- a/lib/colvars/colvarcomp_rotations.cpp +++ b/lib/colvars/colvarcomp_rotations.cpp @@ -22,6 +22,7 @@ colvar::orientation::orientation(std::string const &conf) { function_type = "orientation"; atoms = parse_group(conf, "atoms"); + enable(f_cvc_implicit_gradient); x.type(colvarvalue::type_quaternion); ref_pos.reserve(atoms->size()); @@ -29,8 +30,9 @@ colvar::orientation::orientation(std::string const &conf) if (get_keyval(conf, "refPositions", ref_pos, ref_pos)) { cvm::log("Using reference positions from input file.\n"); if (ref_pos.size() != atoms->size()) { - cvm::fatal_error("Error: reference positions do not " + cvm::error("Error: reference positions do not " "match the number of requested atoms.\n"); + return; } } @@ -43,9 +45,11 @@ colvar::orientation::orientation(std::string const &conf) if (get_keyval(conf, "refPositionsCol", file_col, std::string(""))) { // use PDB flags if column is provided bool found = get_keyval(conf, "refPositionsColValue", file_col_value, 0.0); - if (found && file_col_value==0.0) - cvm::fatal_error("Error: refPositionsColValue, " + if (found && file_col_value==0.0) { + cvm::error("Error: refPositionsColValue, " "if provided, must be non-zero.\n"); + return; + } } else { // if not, use atom indices atoms->create_sorted_ids(); @@ -56,8 +60,9 @@ colvar::orientation::orientation(std::string const &conf) } if (!ref_pos.size()) { - cvm::fatal_error("Error: must define a set of " + cvm::error("Error: must define a set of " "reference coordinates.\n"); + return; } @@ -88,6 +93,7 @@ colvar::orientation::orientation() : cvc() { function_type = "orientation"; + enable(f_cvc_implicit_gradient); x.type(colvarvalue::type_quaternion); } diff --git a/lib/colvars/colvardeps.cpp b/lib/colvars/colvardeps.cpp index 8252f77e62..5402836f53 100644 --- a/lib/colvars/colvardeps.cpp +++ b/lib/colvars/colvardeps.cpp @@ -10,24 +10,77 @@ #include "colvardeps.h" +colvardeps::colvardeps() + : time_step_factor (1) {} colvardeps::~colvardeps() { size_t i; - // Do not delete features if it's static + // Protest if we are deleting an object while a parent object may still depend on it + if (parents.size()) { + cvm::log("Warning: destroying \"" + description + "\" before its parents objects:"); + for (i=0; idescription); + } + } + + // Do not delete features if it's a static object + // may change in the future though // for (i=0; idescription); + +void colvardeps::free_children_deps() { + // Dereference children requirements of all enabled features + // Useful when object is destroyed or set inactive + // CAUTION: when setting the parent object inactive, disable "active" first + // then call this, to avoid double-dereferencing the deps of "active" + + // Cannot be in the base class destructor because it needs the derived class features() + size_t i,j,fid; + + if (cvm::debug()) cvm::log("DEPS: freeing children deps for " + description); + + cvm::increase_depth(); + for (fid = 0; fid < feature_states.size(); fid++) { + if (is_enabled(fid)) { + for (i=0; irequires_children.size(); i++) { + int g = features()[fid]->requires_children[i]; + for (j=0; jfeatures()[g]->description); + children[j]->decr_ref_count(g); + } + } + } + } + cvm::decrease_depth(); +} + + +// re-enable children features (and increase ref count accordingly) +// So free_children_deps() can be called whenever an object becomes inactive +void colvardeps::restore_children_deps() { + size_t i,j,fid; + + cvm::increase_depth(); + for (fid = 0; fid < feature_states.size(); fid++) { + if (is_enabled(fid)) { + for (i=0; irequires_children.size(); i++) { + int g = features()[fid]->requires_children[i]; + for (j=0; jfeatures()[g]->description); + children[j]->enable(g, false, false); + } + } } } + cvm::decrease_depth(); } @@ -37,15 +90,10 @@ void colvardeps::provide(int feature_id, bool truefalse) { void colvardeps::set_enabled(int feature_id, bool truefalse) { -// if (!is_static(feature_id)) { -// cvm::error("Cannot set feature " + features()[feature_id]->description + " statically in " + description + ".\n"); -// return; -// } if (truefalse) { - // Resolve dependencies too enable(feature_id); } else { - feature_states[feature_id].enabled = false; + disable(feature_id); } } @@ -56,7 +104,7 @@ bool colvardeps::get_keyval_feature(colvarparse *cvp, colvarparse::Parse_Mode const parse_mode) { if (!is_user(feature_id)) { - cvm::error("Cannot set feature " + features()[feature_id]->description + " from user input in " + description + ".\n"); + cvm::error("Cannot set feature \"" + features()[feature_id]->description + "\" from user input in \"" + description + "\".\n"); return false; } bool value; @@ -83,21 +131,34 @@ int colvardeps::enable(int feature_id, if (cvm::debug()) { cvm::log("DEPS: " + description + - (dry_run ? " testing " : " requiring ") + + (dry_run ? " testing " : " enabling ") + "\"" + f->description +"\""); } if (fs->enabled) { - // Do not try to solve deps if already enabled + if (!(dry_run || toplevel)) { + // This is a dependency + // Prevent disabling this feature as long + // as requirement is enabled + fs->ref_count++; + if (cvm::debug()) + cvm::log("DEPS: bumping ref_count to " + cvm::to_str(fs->ref_count)); + } + // Do not try to further resolve deps return COLVARS_OK; } + std::string feature_type_descr = is_static(feature_id) ? "Static" : + (is_dynamic(feature_id) ? "Dynamic" : "User-controlled"); + if (!fs->available) { if (!dry_run) { if (toplevel) { - cvm::error("Error: Feature unavailable: \"" + f->description + "\" in " + description + "."); + cvm::error("Error: " + feature_type_descr + " feature unavailable: \"" + + f->description + "\" in " + description + "."); } else { - cvm::log("Feature unavailable: \"" + f->description + "\" in " + description); + cvm::log(feature_type_descr + " feature unavailable: \"" + + f->description + "\" in " + description + "."); } } return COLVARS_ERROR; @@ -105,21 +166,22 @@ int colvardeps::enable(int feature_id, if (!toplevel && !is_dynamic(feature_id)) { if (!dry_run) { - cvm::log("Non-dynamic feature : \"" + f->description - + "\" in " + description + " may not be enabled as a dependency.\n"); + cvm::log(feature_type_descr + " feature \"" + f->description + + "\" may not be enabled as a dependency in " + description + ".\n"); } return COLVARS_ERROR; } // 1) enforce exclusions + // reminder: exclusions must be mutual for this to work for (i=0; irequires_exclude.size(); i++) { feature *g = features()[f->requires_exclude[i]]; if (cvm::debug()) cvm::log(f->description + " requires exclude " + g->description); if (is_enabled(f->requires_exclude[i])) { if (!dry_run) { - cvm::log("Features \"" + f->description + "\" is incompatible with \"" - + g->description + "\" in " + description); + cvm::log("Feature \"" + f->description + "\" is incompatible with \"" + + g->description + "\" in " + description + "."); if (toplevel) { cvm::error("Error: Failed dependency in " + description + "."); } @@ -156,23 +218,27 @@ int colvardeps::enable(int feature_id, res = enable(g, true, false); // see if available if (res == COLVARS_OK) { ok = true; - if (!dry_run) enable(g, false, false); // Require again, for real + if (!dry_run) { + enable(g, false, false); // Require again, for real + fs->alternate_refs.push_back(g); // We remember we enabled this + // so we can free it if this feature gets disabled + } break; } } if (!ok) { if (!dry_run) { - cvm::log("No dependency satisfied among alternates:"); - cvm::log("-----------------------------------------"); + cvm::log("\"" + f->description + "\" in " + description + + " requires one of the following features, none of which can be enabled:\n"); + cvm::log("-----------------------------------------\n"); + cvm::increase_depth(); for (j=0; jrequires_alt[i].size(); j++) { int g = f->requires_alt[i][j]; cvm::log(cvm::to_str(j+1) + ". " + features()[g]->description); - cvm::increase_depth(); enable(g, false, false); // Just for printing error output - cvm::decrease_depth(); } + cvm::decrease_depth(); cvm::log("-----------------------------------------"); - cvm::log("for \"" + f->description + "\" in " + description); if (toplevel) { cvm::error("Error: Failed dependency in " + description + "."); } @@ -182,12 +248,13 @@ int colvardeps::enable(int feature_id, } // 4) solve deps in children + // if the object is inactive, we solve but do not enable: will be enabled + // when the object becomes active + cvm::increase_depth(); for (i=0; irequires_children.size(); i++) { int g = f->requires_children[i]; for (j=0; jenable(g, dry_run, false); - cvm::decrease_depth(); + res = children[j]->enable(g, dry_run || !is_enabled(), false); if (res != COLVARS_OK) { if (!dry_run) { cvm::log("...required by \"" + f->description + "\" in " + description); @@ -198,25 +265,114 @@ int colvardeps::enable(int feature_id, return res; } } - // If we've just touched the features of child objects, refresh them - if (!dry_run && f->requires_children.size() != 0) { + } + cvm::decrease_depth(); + + // Actually enable feature only once everything checks out + if (!dry_run) { + fs->enabled = true; + // This should be the only reference + if (!toplevel) fs->ref_count = 1; + if (feature_id == 0) { + // Waking up this object, enable all deps in children + restore_children_deps(); + } + do_feature_side_effects(feature_id); + if (cvm::debug()) + cvm::log("DEPS: feature \"" + f->description + "\" in " + + description + " enabled, ref_count = 1."); + } + return COLVARS_OK; +} + + +int colvardeps::disable(int feature_id) { + size_t i, j; + feature *f = features()[feature_id]; + feature_state *fs = &feature_states[feature_id]; + + if (cvm::debug()) cvm::log("DEPS: disabling feature \"" + + f->description + "\" in " + description); + + if (fs->enabled == false) { + return COLVARS_OK; + } + + if (fs->ref_count > 1) { + cvm::error("Error: cannot disable feature \"" + f->description + + "\" in " + description + " because of " + cvm::to_str(fs->ref_count-1) + + " remaining references.\n" ); + return COLVARS_ERROR; + } + + // internal deps (self) + for (i=0; irequires_self.size(); i++) { + if (cvm::debug()) cvm::log("DEPS: dereferencing self " + + features()[f->requires_self[i]]->description); + decr_ref_count(f->requires_self[i]); + } + + // alternates + for (i=0; ialternate_refs.size(); i++) { + if (cvm::debug()) cvm::log("DEPS: dereferencing alt " + + features()[fs->alternate_refs[i]]->description); + decr_ref_count(fs->alternate_refs[i]); + } + // Forget these, now that they are dereferenced + fs->alternate_refs.clear(); + + // deps in children + // except if the object is inactive, then children dependencies + // have already been dereferenced by this function + // (or never referenced if feature was enabled while the object + // was inactive) + if (is_enabled()) { + cvm::increase_depth(); + for (i=0; irequires_children.size(); i++) { + int g = f->requires_children[i]; for (j=0; jrefresh_deps(); + if (cvm::debug()) cvm::log("DEPS: dereferencing children's " + + children[j]->features()[g]->description); + children[j]->decr_ref_count(g); } } + cvm::decrease_depth(); } - // Actually enable feature only once everything checks out - if (!dry_run) fs->enabled = true; + fs->enabled = false; + fs->ref_count = 0; + if (feature_id == 0) { + // Putting this object to sleep + free_children_deps(); + } return COLVARS_OK; } +int colvardeps::decr_ref_count(int feature_id) { + int &rc = feature_states[feature_id].ref_count; + feature *f = features()[feature_id]; + + if (cvm::debug()) + cvm::log("DEPS: decreasing reference count of \"" + f->description + + "\" in " + description + ".\n"); + + if (rc <= 0) { + cvm::error("Error: cannot decrease reference count of feature \"" + f->description + + "\" in " + description + ", which is " + cvm::to_str(rc) + ".\n"); + return COLVARS_ERROR; + } + + rc--; + if (rc == 0 && f->is_dynamic()) { + // we can auto-disable this feature + if (cvm::debug()) + cvm::log("DEPS will now auto-disable dynamic feature \"" + f->description + + "\" in " + description + ".\n"); + disable(feature_id); + } + return COLVARS_OK; +} -// disable() { -// -// // we need refs to parents to walk up the deps tree! -// // or refresh -// } void colvardeps::init_feature(int feature_id, const char *description, feature_type type) { features()[feature_id]->description = description; features()[feature_id]->type = type; @@ -235,6 +391,11 @@ void colvardeps::init_feature(int feature_id, const char *description, feature_t features()[f]->requires_alt.back()[0] = g; \ features()[f]->requires_alt.back()[1] = h; \ features()[f]->requires_alt.back()[2] = i +#define f_req_alt4(f, g, h, i, j) features()[f]->requires_alt.push_back(std::vector(4));\ + features()[f]->requires_alt.back()[0] = g; \ + features()[f]->requires_alt.back()[1] = h; \ + features()[f]->requires_alt.back()[2] = i; \ + features()[f]->requires_alt.back()[3] = j void colvardeps::init_cvb_requires() { int i; @@ -246,6 +407,9 @@ void colvardeps::init_cvb_requires() { init_feature(f_cvb_active, "active", f_type_dynamic); f_req_children(f_cvb_active, f_cv_active); + init_feature(f_cvb_awake, "awake", f_type_static); + f_req_self(f_cvb_awake, f_cvb_active); + init_feature(f_cvb_apply_force, "apply force", f_type_user); f_req_children(f_cvb_apply_force, f_cv_gradient); @@ -278,9 +442,12 @@ void colvardeps::init_cv_requires() { } init_feature(f_cv_active, "active", f_type_dynamic); - f_req_children(f_cv_active, f_cvc_active); - // Colvars must be either a linear combination, or scalar (and polynomial) or scripted - f_req_alt3(f_cv_active, f_cv_scalar, f_cv_linear, f_cv_scripted); + // Do not require f_cvc_active in children, as some components may be disabled + // Colvars must be either a linear combination, or scalar (and polynomial) or scripted/custom + f_req_alt4(f_cv_active, f_cv_scalar, f_cv_linear, f_cv_scripted, f_cv_custom_function); + + init_feature(f_cv_awake, "awake", f_type_static); + f_req_self(f_cv_awake, f_cv_active); init_feature(f_cv_gradient, "gradient", f_type_dynamic); f_req_children(f_cv_gradient, f_cvc_gradient); @@ -288,8 +455,10 @@ void colvardeps::init_cv_requires() { init_feature(f_cv_collect_gradient, "collect gradient", f_type_dynamic); f_req_self(f_cv_collect_gradient, f_cv_gradient); f_req_self(f_cv_collect_gradient, f_cv_scalar); + // The following exlusion could be lifted by implementing the feature + f_req_exclude(f_cv_collect_gradient, f_cv_scripted); - init_feature(f_cv_fdiff_velocity, "fdiff_velocity", f_type_dynamic); + init_feature(f_cv_fdiff_velocity, "velocity from finite differences", f_type_dynamic); // System force: either trivial (spring force); through extended Lagrangian, or calculated explicitly init_feature(f_cv_total_force, "total force", f_type_dynamic); @@ -335,6 +504,9 @@ void colvardeps::init_cv_requires() { init_feature(f_cv_subtract_applied_force, "subtract applied force from total force", f_type_user); f_req_self(f_cv_subtract_applied_force, f_cv_total_force); + // There is no well-defined way to implement f_cv_subtract_applied_force + // in the case of extended-Lagrangian colvars + f_req_exclude(f_cv_subtract_applied_force, f_cv_extended_Lagrangian); init_feature(f_cv_lower_boundary, "lower boundary", f_type_user); f_req_self(f_cv_lower_boundary, f_cv_scalar); @@ -350,12 +522,21 @@ void colvardeps::init_cv_requires() { init_feature(f_cv_corrfunc, "correlation function", f_type_user); - init_feature(f_cv_scripted, "scripted", f_type_static); + init_feature(f_cv_scripted, "scripted", f_type_user); + + init_feature(f_cv_custom_function, "custom function", f_type_user); + f_req_exclude(f_cv_custom_function, f_cv_scripted); + init_feature(f_cv_periodic, "periodic", f_type_static); f_req_self(f_cv_periodic, f_cv_homogeneous); init_feature(f_cv_scalar, "scalar", f_type_static); init_feature(f_cv_linear, "linear", f_type_static); init_feature(f_cv_homogeneous, "homogeneous", f_type_static); + + // because total forces are obtained from the previous time step, + // we cannot (currently) have colvar values and total forces for the same timestep + init_feature(f_cv_multiple_ts, "multiple timestep colvar"); + f_req_exclude(f_cv_multiple_ts, f_cv_total_force_calc); } // Initialize feature_states for each instance @@ -365,23 +546,6 @@ void colvardeps::init_cv_requires() { // Most features are available, so we set them so // and list exceptions below } - -// // properties that may NOT be enabled as a dependency -// // This will be deprecated by feature types -// int unavailable_deps[] = { -// f_cv_lower_boundary, -// f_cv_upper_boundary, -// f_cv_extended_Lagrangian, -// f_cv_Langevin, -// f_cv_scripted, -// f_cv_periodic, -// f_cv_scalar, -// f_cv_linear, -// f_cv_homogeneous -// }; -// for (i = 0; i < sizeof(unavailable_deps) / sizeof(unavailable_deps[0]); i++) { -// feature_states[unavailable_deps[i]].available = false; -// } } @@ -401,20 +565,26 @@ void colvardeps::init_cvc_requires() { init_feature(f_cvc_gradient, "gradient", f_type_dynamic); + init_feature(f_cvc_implicit_gradient, "implicit gradient", f_type_static); + f_req_children(f_cvc_implicit_gradient, f_ag_implicit_gradient); + init_feature(f_cvc_inv_gradient, "inverse gradient", f_type_dynamic); f_req_self(f_cvc_inv_gradient, f_cvc_gradient); init_feature(f_cvc_debug_gradient, "debug gradient", f_type_user); f_req_self(f_cvc_debug_gradient, f_cvc_gradient); + f_req_exclude(f_cvc_debug_gradient, f_cvc_implicit_gradient); init_feature(f_cvc_Jacobian, "Jacobian derivative", f_type_dynamic); f_req_self(f_cvc_Jacobian, f_cvc_inv_gradient); init_feature(f_cvc_com_based, "depends on group centers of mass", f_type_static); + // init_feature(f_cvc_pbc_minimum_image, "use minimum-image distances with PBCs", f_type_user); + // Compute total force on first site only to avoid unwanted // coupling to other colvars (see e.g. Ciccotti et al., 2005) - init_feature(f_cvc_one_site_total_force, "compute total collective force only from one group center", f_type_user); + init_feature(f_cvc_one_site_total_force, "compute total force from one group", f_type_user); f_req_self(f_cvc_one_site_total_force, f_cvc_com_based); init_feature(f_cvc_scalable, "scalable calculation", f_type_static); @@ -438,11 +608,17 @@ void colvardeps::init_cvc_requires() { feature_states.push_back(feature_state(avail, false)); } + // CVCs are enabled from the start - get disabled based on flags + feature_states[f_cvc_active].enabled = true; + // Features that are implemented by all cvcs by default // Each cvc specifies what other features are available feature_states[f_cvc_active].available = true; feature_states[f_cvc_gradient].available = true; + // Use minimum-image distances by default + feature_states[f_cvc_pbc_minimum_image].enabled = true; + // Features that are implemented by default if their requirements are feature_states[f_cvc_one_site_total_force].available = true; @@ -464,8 +640,10 @@ void colvardeps::init_ag_requires() { init_feature(f_ag_center, "translational fit", f_type_static); init_feature(f_ag_rotate, "rotational fit", f_type_static); init_feature(f_ag_fitting_group, "reference positions group", f_type_static); - init_feature(f_ag_fit_gradient_group, "fit gradient for main group", f_type_static); - init_feature(f_ag_fit_gradient_ref, "fit gradient for reference group", f_type_static); + init_feature(f_ag_implicit_gradient, "implicit atom gradient", f_type_dynamic); + init_feature(f_ag_fit_gradients, "fit gradients", f_type_user); + f_req_exclude(f_ag_fit_gradients, f_ag_implicit_gradient); + init_feature(f_ag_atom_forces, "atomic forces", f_type_dynamic); // parallel calculation implies that we have at least a scalable center of mass, @@ -493,29 +671,50 @@ void colvardeps::init_ag_requires() { feature_states[f_ag_scalable_com].available = false; // TODO make f_ag_scalable depend on f_ag_scalable_com (or something else) feature_states[f_ag_scalable].available = true; + feature_states[f_ag_fit_gradients].available = true; + feature_states[f_ag_implicit_gradient].available = true; } void colvardeps::print_state() { size_t i; - cvm::log("Enabled features of " + description); + cvm::log("Enabled features of \"" + description + "\" (with reference count)"); for (i = 0; i < feature_states.size(); i++) { - if (feature_states[i].enabled) - cvm::log("- " + features()[i]->description); + if (is_enabled(i)) + cvm::log("- " + features()[i]->description + " (" + + cvm::to_str(feature_states[i].ref_count) + ")"); } + cvm::increase_depth(); for (i=0; iprint_state(); - cvm::decrease_depth(); } + cvm::decrease_depth(); } void colvardeps::add_child(colvardeps *child) { + children.push_back(child); child->parents.push_back((colvardeps *)this); + + // Solve dependencies of already enabled parent features + // in the new child + + size_t i, fid; + cvm::increase_depth(); + for (fid = 0; fid < feature_states.size(); fid++) { + if (is_enabled(fid)) { + for (i=0; irequires_children.size(); i++) { + int g = features()[fid]->requires_children[i]; + if (cvm::debug()) cvm::log("DEPS: re-enabling children's " + + child->features()[g]->description); + child->enable(g, false, false); + } + } + } + cvm::decrease_depth(); } diff --git a/lib/colvars/colvardeps.h b/lib/colvars/colvardeps.h index fd07cb6457..b810a5fca1 100644 --- a/lib/colvars/colvardeps.h +++ b/lib/colvars/colvardeps.h @@ -23,10 +23,14 @@ /// 3. Static features are static properties of the object, determined /// programatically at initialization time. /// +/// In all classes, feature 0 is active. When an object is inactivated +/// all its children dependencies are dereferenced (free_children_deps) +/// While the object is inactive, no dependency solving is done on children +/// it is done when the object is activated back (restore_children_deps) class colvardeps { public: - colvardeps() {} + colvardeps(); virtual ~colvardeps(); // Subclasses should initialize the following members: @@ -34,9 +38,10 @@ public: std::string description; // reference to object name (cv, cvc etc.) /// This contains the current state of each feature for each object + // since the feature class only contains static properties struct feature_state { feature_state(bool a, bool e) - : available(a), enabled(e) {} + : available(a), enabled(e), ref_count(0) {} /// Feature may be enabled, subject to possible dependencies bool available; @@ -44,9 +49,28 @@ public: /// TODO consider implications for dependency solving: anyone who disables /// it should trigger a refresh of parent objects bool enabled; // see if this should be private depending on implementation + // bool enabledOnce; // this should trigger an update when object is evaluated + + /// Number of features requiring this one as a dependency + /// When it falls to zero: + /// - a dynamic feature is disabled automatically + /// - other features may be disabled statically + int ref_count; + /// List of features that were enabled by this one + /// as part of an alternate requirement (for ref counting purposes) + /// This is necessary because we don't know which feature in the list + /// we enabled, otherwise + std::vector alternate_refs; }; +protected: + /// Time step multiplier (for coarse-timestep biases & colvars) + /// Biases and colvars will only be calculated at those times + /// (f_cvb_awake and f_cv_awake); a + /// Biases use this to apply "impulse" biasing forces at the outer timestep + /// Unused by lower-level objects (cvcs and atom groups) + int time_step_factor; private: /// List of the states of all features @@ -61,10 +85,13 @@ private: }; public: + /// \brief returns time_step_factor + inline int get_time_step_factor() const {return time_step_factor;} + /// Pair a numerical feature ID with a description and type void init_feature(int feature_id, const char *description, feature_type type = f_type_not_set); - /// Describes a feature and its dependecies + /// Describes a feature and its dependencies /// used in a static array within each subclass class feature { @@ -120,30 +147,16 @@ public: private: - // pointers to objects this object depends on - // list should be maintained by any code that modifies the object - // this could be secured by making lists of colvars / cvcs / atom groups private and modified through accessor functions + /// pointers to objects this object depends on + /// list should be maintained by any code that modifies the object + /// this could be secured by making lists of colvars / cvcs / atom groups private and modified through accessor functions std::vector children; - // pointers to objects that depend on this object - // the size of this array is in effect a reference counter + /// pointers to objects that depend on this object + /// the size of this array is in effect a reference counter std::vector parents; public: - // disabling a feature f: - // if parents depend on f, tell them to refresh / check that they are ok? - // if children provide features to satisfy f ONLY, disable that - - // When the state of this object has changed, recursively tell parents - // to enforce their dependencies -// void refresh_parents() { -// -// } - - // std::vector parents; // Needed to trigger a refresh if capabilities of this object change - - // End of members to be initialized by subclasses - // Checks whether given feature is enabled // Defaults to querying f_*_active inline bool is_enabled(int f = f_cv_active) const { @@ -161,9 +174,7 @@ public: /// dependencies will be checked by enable() void provide(int feature_id, bool truefalse = true); - /// Set the feature's enabled flag, without dependency check or resolution - /// To be used for static properties only - /// Checking for availability is up to the caller + /// Enable or disable, depending on flag value void set_enabled(int feature_id, bool truefalse = true); protected: @@ -178,31 +189,57 @@ protected: public: - int enable(int f, bool dry_run = false, bool toplevel = true); // enable a feature and recursively solve its dependencies - // dry_run is set to true to recursively test if a feature is available, without enabling it -// int disable(int f); + /// enable a feature and recursively solve its dependencies + /// for proper reference counting, one should not add + /// spurious calls to enable() + /// dry_run is set to true to recursively test if a feature is available, without enabling it + int enable(int f, bool dry_run = false, bool toplevel = true); + + /// Disable a feature, decrease the reference count of its dependencies + /// and recursively disable them as applicable + int disable(int f); + + /// disable all enabled features to free their dependencies + /// to be done when deleting the object + /// Cannot be in the base class destructor because it needs the derived class features() + void free_children_deps(); + + /// re-enable children features (to be used when object becomes active) + void restore_children_deps(); + /// Decrement the reference count of a feature + /// disabling it if it's dynamic and count reaches zero + int decr_ref_count(int f); - /// This function is called whenever feature states are changed outside - /// of the object's control, that is, by parents - /// Eventually it may also be used when properties of children change - virtual int refresh_deps() { return COLVARS_OK; } + /// Implements possible actions to be carried out + /// when a given feature is enabled + /// Base function does nothing, can be overloaded + virtual void do_feature_side_effects(int id) {} // NOTE that all feature enums should start with f_*_active enum features_biases { /// \brief Bias is active f_cvb_active, - f_cvb_apply_force, // will apply forces - f_cvb_get_total_force, // requires total forces - f_cvb_history_dependent, // depends on simulation history - f_cvb_scalar_variables, // requires scalar colvars - f_cvb_calc_pmf, // whether this bias will compute a PMF + /// \brief Bias is awake (active on its own accord) this timestep + f_cvb_awake, + /// \brief will apply forces + f_cvb_apply_force, + /// \brief requires total forces + f_cvb_get_total_force, + /// \brief depends on simulation history + f_cvb_history_dependent, + /// \brief requires scalar colvars + f_cvb_scalar_variables, + /// \brief whether this bias will compute a PMF + f_cvb_calc_pmf, f_cvb_ntot }; enum features_colvar { /// \brief Calculate colvar f_cv_active, + /// \brief Colvar is awake (active on its own accord) this timestep + f_cv_awake, /// \brief Gradients are calculated and temporarily stored, so /// that external forces can be applied f_cv_gradient, @@ -254,12 +291,16 @@ public: f_cv_corrfunc, /// \brief Value and gradient computed by user script f_cv_scripted, + /// \brief Value and gradient computed by user function through Lepton + f_cv_custom_function, /// \brief Colvar is periodic f_cv_periodic, /// \brief is scalar f_cv_scalar, f_cv_linear, f_cv_homogeneous, + /// \brief multiple timestep through time_step_factor + f_cv_multiple_ts, /// \brief Number of colvar features f_cv_ntot }; @@ -268,10 +309,13 @@ public: f_cvc_active, f_cvc_scalar, f_cvc_gradient, + /// \brief CVC doesn't calculate and store explicit atom gradients + f_cvc_implicit_gradient, f_cvc_inv_gradient, /// \brief If enabled, calc_gradients() will call debug_gradients() for every group needed f_cvc_debug_gradient, f_cvc_Jacobian, + f_cvc_pbc_minimum_image, f_cvc_one_site_total_force, f_cvc_com_based, f_cvc_scalable, @@ -287,9 +331,9 @@ public: /// Perform a standard minimum msd fit for given atoms /// ie. not using refpositionsgroup // f_ag_min_msd_fit, - f_ag_fit_gradient_group,// TODO check that these are sometimes needed separately - // maybe for minimum RMSD? - f_ag_fit_gradient_ref, + /// \brief Does not have explicit atom gradients from parent CVC + f_ag_implicit_gradient, + f_ag_fit_gradients, f_ag_atom_forces, f_ag_scalable, f_ag_scalable_com, diff --git a/lib/colvars/colvargrid.cpp b/lib/colvars/colvargrid.cpp index 3b25acd2ef..9016e2c23a 100644 --- a/lib/colvars/colvargrid.cpp +++ b/lib/colvars/colvargrid.cpp @@ -144,7 +144,8 @@ void colvar_grid_gradient::write_1D_integral(std::ostream &os) os << "# xi A(xi)\n"; if ( cv.size() != 1 ) { - cvm::fatal_error("Cannot write integral for multi-dimensional gradient grids."); + cvm::error("Cannot write integral for multi-dimensional gradient grids."); + return; } integral = 0.0; diff --git a/lib/colvars/colvargrid.h b/lib/colvars/colvargrid.h index d4b9295c6e..6f06cb1066 100644 --- a/lib/colvars/colvargrid.h +++ b/lib/colvars/colvargrid.h @@ -198,7 +198,6 @@ public: /// Default constructor colvar_grid() : has_data(false) { - save_delimiters = false; nd = nt = 0; mult = 1; this->setup(); @@ -225,7 +224,6 @@ public: widths(g.widths), has_data(false) { - save_delimiters = false; } /// \brief Constructor from explicit grid sizes \param nx_i Number @@ -237,7 +235,6 @@ public: size_t mult_i = 1) : has_data(false) { - save_delimiters = false; this->setup(nx_i, t, mult_i); } @@ -248,7 +245,6 @@ public: bool margin = false) : has_data(false) { - save_delimiters = false; this->init_from_colvars(colvars, t, mult_i, margin); } @@ -840,7 +836,7 @@ public: // reallocate the array in case the grid params have just changed if (new_params) { init_from_boundaries(); - // data.resize(0); // no longer needed: setup calls clear() + // data.clear(); // no longer needed: setup calls clear() return this->setup(nx, T(), mult); } diff --git a/lib/colvars/colvarmodule.cpp b/lib/colvars/colvarmodule.cpp index 10cd3c0e47..780dc28afa 100644 --- a/lib/colvars/colvarmodule.cpp +++ b/lib/colvars/colvarmodule.cpp @@ -21,10 +21,14 @@ #include "colvarbias_meta.h" #include "colvarbias_restraint.h" #include "colvarscript.h" +#include "colvaratoms.h" colvarmodule::colvarmodule(colvarproxy *proxy_in) { + depth_s = 0; + cv_traj_os = NULL; + // pointer to the proxy object if (proxy == NULL) { proxy = proxy_in; @@ -33,12 +37,10 @@ colvarmodule::colvarmodule(colvarproxy *proxy_in) // TODO relax this error to handle multiple molecules in VMD // once the module is not static anymore cvm::error("Error: trying to allocate the collective " - "variable module twice.\n"); + "variable module twice.\n", BUG_ERROR); return; } - depth_s = 0; - cvm::log(cvm::line_marker); cvm::log("Initializing the collective variables module, version "+ cvm::to_str(COLVARS_VERSION)+".\n"); @@ -222,9 +224,9 @@ int colvarmodule::parse_config(std::string &conf) // update any necessary proxy data proxy->setup(); - if (cv_traj_os.is_open()) { + if (cv_traj_os != NULL) { // configuration might have changed, better redo the labels - write_traj_label(cv_traj_os); + write_traj_label(*cv_traj_os); } return get_error(); @@ -295,7 +297,7 @@ int colvarmodule::parse_colvars(std::string const &conf) std::string colvar_conf = ""; size_t pos = 0; - while (parse->key_lookup(conf, "colvar", colvar_conf, pos)) { + while (parse->key_lookup(conf, "colvar", &colvar_conf, &pos)) { if (colvar_conf.size()) { cvm::log(cvm::line_marker); @@ -350,7 +352,7 @@ int colvarmodule::parse_biases_type(std::string const &conf, { std::string bias_conf = ""; size_t conf_saved_pos = 0; - while (parse->key_lookup(conf, keyword, bias_conf, conf_saved_pos)) { + while (parse->key_lookup(conf, keyword, &bias_conf, &conf_saved_pos)) { if (bias_conf.size()) { cvm::log(cvm::line_marker); cvm::increase_depth(); @@ -409,12 +411,6 @@ int colvarmodule::parse_biases(std::string const &conf) size_t i; - for (i = 0; i < biases.size(); i++) { - biases[i]->enable(colvardeps::f_cvb_active); - if (cvm::debug()) - biases[i]->print_state(); - } - size_t n_hist_dep_biases = 0; std::vector hist_dep_biases_names; for (i = 0; i < biases.size(); i++) { @@ -487,7 +483,8 @@ int colvarmodule::catch_input_errors(int result) } -colvarbias * colvarmodule::bias_by_name(std::string const &name) { +colvarbias * colvarmodule::bias_by_name(std::string const &name) +{ colvarmodule *cv = cvm::main(); for (std::vector::iterator bi = cv->biases.begin(); bi != cv->biases.end(); @@ -500,7 +497,8 @@ colvarbias * colvarmodule::bias_by_name(std::string const &name) { } -colvar *colvarmodule::colvar_by_name(std::string const &name) { +colvar *colvarmodule::colvar_by_name(std::string const &name) +{ colvarmodule *cv = cvm::main(); for (std::vector::iterator cvi = cv->colvars.begin(); cvi != cv->colvars.end(); @@ -513,6 +511,20 @@ colvar *colvarmodule::colvar_by_name(std::string const &name) { } +cvm::atom_group *colvarmodule::atom_group_by_name(std::string const &name) +{ + colvarmodule *cv = cvm::main(); + for (std::vector::iterator agi = cv->named_atom_groups.begin(); + agi != cv->named_atom_groups.end(); + agi++) { + if ((*agi)->name == name) { + return (*agi); + } + } + return NULL; +} + + int colvarmodule::change_configuration(std::string const &bias_name, std::string const &conf) { @@ -521,7 +533,10 @@ int colvarmodule::change_configuration(std::string const &bias_name, cvm::increase_depth(); colvarbias *b; b = bias_by_name(bias_name); - if (b == NULL) { cvm::error("Error: bias not found: " + bias_name); } + if (b == NULL) { + cvm::error("Error: bias not found: " + bias_name); + return COLVARS_ERROR; + } b->change_configuration(conf); cvm::decrease_depth(); return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); @@ -534,7 +549,10 @@ std::string colvarmodule::read_colvar(std::string const &name) colvar *c; std::stringstream ss; c = colvar_by_name(name); - if (c == NULL) { cvm::fatal_error("Error: colvar not found: " + name); } + if (c == NULL) { + cvm::error("Error: colvar not found: " + name); + return std::string(); + } ss << c->value(); cvm::decrease_depth(); return ss.str(); @@ -547,7 +565,10 @@ cvm::real colvarmodule::energy_difference(std::string const &bias_name, colvarbias *b; cvm::real energy_diff = 0.; b = bias_by_name(bias_name); - if (b == NULL) { cvm::fatal_error("Error: bias not found: " + bias_name); } + if (b == NULL) { + cvm::error("Error: bias not found: " + bias_name); + return 0.; + } energy_diff = b->energy_difference(conf); cvm::decrease_depth(); return energy_diff; @@ -666,18 +687,36 @@ int colvarmodule::calc_colvars() cvm::log("Calculating collective variables.\n"); // calculate collective variables and their gradients + // First, we need to decide which biases are awake + // so they can activate colvars as needed + std::vector::iterator bi; + for (bi = biases.begin(); bi != biases.end(); bi++) { + int tsf = (*bi)->get_time_step_factor(); + if (tsf > 0 && (step_absolute() % tsf == 0)) { + (*bi)->enable(colvardeps::f_cvb_awake); + } else { + (*bi)->disable(colvardeps::f_cvb_awake); + } + } + int error_code = COLVARS_OK; std::vector::iterator cvi; // Determine which colvars are active at this iteration - variables_active()->resize(0); + variables_active()->clear(); variables_active()->reserve(variables()->size()); for (cvi = variables()->begin(); cvi != variables()->end(); cvi++) { - // This is a dynamic feature - the next call should be to enable() - // or disable() when dynamic dependency resolution is fully implemented - (*cvi)->set_enabled(colvardeps::f_cv_active, - step_absolute() % (*cvi)->get_time_step_factor() == 0); - variables_active()->push_back(*cvi); + // Wake up or put to sleep variables + int tsf = (*cvi)->get_time_step_factor(); + if (tsf > 0 && (step_absolute() % tsf == 0)) { + (*cvi)->enable(colvardeps::f_cv_awake); + } else { + (*cvi)->disable(colvardeps::f_cv_awake); + } + + if ((*cvi)->is_enabled()) { + variables_active()->push_back(*cvi); + } } // if SMP support is available, split up the work @@ -685,8 +724,8 @@ int colvarmodule::calc_colvars() // first, calculate how much work (currently, how many active CVCs) each colvar has - variables_active_smp()->resize(0); - variables_active_smp_items()->resize(0); + variables_active_smp()->clear(); + variables_active_smp_items()->clear(); variables_active_smp()->reserve(variables_active()->size()); variables_active_smp_items()->reserve(variables_active()->size()); @@ -748,7 +787,8 @@ int colvarmodule::calc_biases() total_bias_energy = 0.0; // update the list of active biases - biases_active()->resize(0); + // which may have changed based on f_cvb_awake in calc_colvars() + biases_active()->clear(); biases_active()->reserve(biases.size()); for (bi = biases.begin(); bi != biases.end(); bi++) { if ((*bi)->is_enabled()) { @@ -828,8 +868,7 @@ int colvarmodule::update_colvar_forces() "of colvars (if they have any).\n"); cvm::increase_depth(); for (cvi = variables()->begin(); cvi != variables()->end(); cvi++) { - // Here we call even inactive colvars, so they accumulate biasing forces - // as well as update their extended-system dynamics + // Inactive colvars will only reset their forces and return 0 energy total_colvar_energy += (*cvi)->update_forces_energy(); if (cvm::get_error()) { return COLVARS_ERROR; @@ -883,11 +922,13 @@ int colvarmodule::write_restart_files() ((cvm::step_absolute() % restart_out_freq) == 0) ) { cvm::log("Writing the state file \""+ restart_out_name+"\".\n"); - proxy->backup_file(restart_out_name.c_str()); - restart_out_os.open(restart_out_name.c_str()); - if (!restart_out_os.is_open() || !write_restart(restart_out_os)) - cvm::error("Error: in writing restart file.\n"); - restart_out_os.close(); + proxy->backup_file(restart_out_name); + std::ostream *restart_out_os = proxy->output_stream(restart_out_name); + if (!restart_out_os) return cvm::get_error(); + if (!write_restart(*restart_out_os)) { + return cvm::error("Error: in writing restart file.\n", FILE_ERROR); + } + proxy->close_output_stream(restart_out_name); } return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); @@ -896,26 +937,26 @@ int colvarmodule::write_restart_files() int colvarmodule::write_traj_files() { - if (!cv_traj_os.is_open()) { + if (cv_traj_os == NULL) { open_traj_file(cv_traj_name); } // write labels in the traj file every 1000 lines and at first timestep if ((cvm::step_absolute() % (cv_traj_freq * 1000)) == 0 || cvm::step_relative() == 0) { - write_traj_label(cv_traj_os); + write_traj_label(*cv_traj_os); } if ((cvm::step_absolute() % cv_traj_freq) == 0) { - write_traj(cv_traj_os); + write_traj(*cv_traj_os); } - if (restart_out_freq && cv_traj_os.is_open()) { + if (restart_out_freq && (cv_traj_os != NULL)) { // flush the trajectory file if we are at the restart frequency if ( (cvm::step_relative() > 0) && ((cvm::step_absolute() % restart_out_freq) == 0) ) { cvm::log("Synchronizing (emptying the buffer of) trajectory file \""+ cv_traj_name+"\".\n"); - cv_traj_os.flush(); + proxy->flush_output_stream(cv_traj_os); } } @@ -1003,9 +1044,11 @@ int colvarmodule::reset() index_groups.clear(); index_group_names.clear(); - if (cv_traj_os.is_open()) { + proxy->reset(); + + if (cv_traj_os != NULL) { // Do not close file here, as we might not be done with it yet. - cv_traj_os.flush(); + proxy->flush_output_stream(cv_traj_os); } return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); @@ -1264,9 +1307,9 @@ int colvarmodule::write_output_files() } cvm::decrease_depth(); - if (cv_traj_os.is_open()) { - // do not close to avoid problems with multiple NAMD runs - cv_traj_os.flush(); + if (cv_traj_os != NULL) { + // do not close, there may be another run command + proxy->flush_output_stream(cv_traj_os); } return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); @@ -1380,9 +1423,10 @@ std::ostream & colvarmodule::write_restart(std::ostream &os) return os; } + int colvarmodule::open_traj_file(std::string const &file_name) { - if (cv_traj_os.is_open()) { + if (cv_traj_os != NULL) { return COLVARS_OK; } @@ -1390,36 +1434,35 @@ int colvarmodule::open_traj_file(std::string const &file_name) if (cv_traj_append) { cvm::log("Appending to colvar trajectory file \""+file_name+ "\".\n"); - cv_traj_os.open(file_name.c_str(), std::ios::app); + cv_traj_os = (cvm::proxy)->output_stream(file_name, std::ios::app); } else { cvm::log("Writing to colvar trajectory file \""+file_name+ "\".\n"); proxy->backup_file(file_name.c_str()); - cv_traj_os.open(file_name.c_str()); + cv_traj_os = (cvm::proxy)->output_stream(file_name); } - if (!cv_traj_os.is_open()) { + if (cv_traj_os == NULL) { cvm::error("Error: cannot write to file \""+file_name+"\".\n", FILE_ERROR); } - return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); + return cvm::get_error(); } + int colvarmodule::close_traj_file() { - if (cv_traj_os.is_open()) { - cv_traj_os.close(); + if (cv_traj_os != NULL) { + proxy->close_output_stream(cv_traj_name); + cv_traj_os = NULL; } - return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); + return cvm::get_error(); } + std::ostream & colvarmodule::write_traj_label(std::ostream &os) { - if (!os.good()) { - cvm::error("Cannot write to trajectory file."); - return os; - } os.setf(std::ios::scientific, std::ios::floatfield); os << "# " << cvm::wrap_string("step", cvm::it_width-2) @@ -1437,13 +1480,16 @@ std::ostream & colvarmodule::write_traj_label(std::ostream &os) (*bi)->write_traj_label(os); } os << "\n"; + if (cvm::debug()) { - os.flush(); + proxy->flush_output_stream(&os); } + cvm::decrease_depth(); return os; } + std::ostream & colvarmodule::write_traj(std::ostream &os) { os.setf(std::ios::scientific, std::ios::floatfield); @@ -1463,9 +1509,11 @@ std::ostream & colvarmodule::write_traj(std::ostream &os) (*bi)->write_traj(os); } os << "\n"; + if (cvm::debug()) { - os.flush(); + proxy->flush_output_stream(&os); } + cvm::decrease_depth(); return os; } @@ -1540,25 +1588,19 @@ void colvarmodule::clear_error() } -void cvm::error(std::string const &message, int code) +int colvarmodule::error(std::string const &message, int code) { set_error_bits(code); proxy->error(message); + return get_error(); } -void cvm::fatal_error(std::string const &message) +int colvarmodule::fatal_error(std::string const &message) { - // TODO once all non-fatal errors have been set to be handled by error(), - // set DELETE_COLVARS here for VMD to handle it set_error_bits(FATAL_ERROR); proxy->fatal_error(message); -} - - -void cvm::exit(std::string const &message) -{ - proxy->exit(message); + return get_error(); } diff --git a/lib/colvars/colvarmodule.h b/lib/colvars/colvarmodule.h index b4f80e0b5e..0f6efd14c4 100644 --- a/lib/colvars/colvarmodule.h +++ b/lib/colvars/colvarmodule.h @@ -10,9 +10,7 @@ #ifndef COLVARMODULE_H #define COLVARMODULE_H -#ifndef COLVARS_VERSION -#define COLVARS_VERSION "2017-03-09" -#endif +#include "colvars_version.h" #ifndef COLVARS_DEBUG #define COLVARS_DEBUG false @@ -54,11 +52,6 @@ You can browse the class hierarchy or the list of source files. #include #include -#ifdef NAMD_VERSION -// use Lustre-friendly wrapper to POSIX write() -#include "fstream_namd.h" -#endif - class colvarparse; class colvar; class colvarbias; @@ -188,7 +181,13 @@ private: /// Indexes of the items to calculate for each colvar std::vector colvars_smp_items; + /// Array of named atom groups + std::vector named_atom_groups; public: + /// Register a named atom group into named_atom_groups + inline void register_named_atom_group(atom_group * ag) { + named_atom_groups.push_back(ag); + } /// Array of collective variables std::vector *variables(); @@ -319,12 +318,6 @@ public: /// (Re)initialize the output trajectory and state file (does not write it yet) int setup_output(); -#ifdef NAMD_VERSION - typedef ofstream_namd ofstream; -#else - typedef std::ofstream ofstream; -#endif - /// Read the input restart file std::istream & read_restart(std::istream &is); /// Write the output restart file @@ -332,7 +325,7 @@ public: /// Open a trajectory file if requested (and leave it open) int open_traj_file(std::string const &file_name); - /// Close it + /// Close it (note: currently unused) int close_traj_file(); /// Write in the trajectory file std::ostream & write_traj(std::ostream &os); @@ -354,6 +347,9 @@ public: /// Look up a colvar by name; returns NULL if not found static colvar * colvar_by_name(std::string const &name); + /// Look up a named atom group by name; returns NULL if not found + static atom_group * atom_group_by_name(std::string const &name); + /// Load new configuration for the given bias - /// currently works for harmonic (force constant and/or centers) int change_configuration(std::string const &bias_name, std::string const &conf); @@ -452,10 +448,10 @@ public: static void log(std::string const &message); /// Print a message to the main log and exit with error code - static void fatal_error(std::string const &message); + static int fatal_error(std::string const &message); /// Print a message to the main log and set global error code - static void error(std::string const &message, int code = COLVARS_ERROR); + static int error(std::string const &message, int code = COLVARS_ERROR); /// Print a message to the main log and exit normally static void exit(std::string const &message); @@ -471,8 +467,7 @@ public: /// \brief Get the distance between two atomic positions with pbcs handled /// correctly static rvector position_distance(atom_pos const &pos1, - atom_pos const &pos2); - + atom_pos const &pos2); /// \brief Get the square distance between two positions (with /// periodic boundary conditions handled transparently) @@ -481,21 +476,7 @@ public: /// an analytical square distance (while taking the square of /// position_distance() would produce leads to a cusp) static real position_dist2(atom_pos const &pos1, - atom_pos const &pos2); - - /// \brief Get the closest periodic image to a reference position - /// \param pos The position to look for the closest periodic image - /// \param ref_pos (optional) The reference position - static void select_closest_image(atom_pos &pos, - atom_pos const &ref_pos); - - /// \brief Perform select_closest_image() on a set of atomic positions - /// - /// After that, distance vectors can then be calculated directly, - /// without using position_distance() - static void select_closest_images(std::vector &pos, - atom_pos const &ref_pos); - + atom_pos const &pos2); /// \brief Names of groups from a Gromacs .ndx file to be read at startup std::list index_group_names; @@ -556,14 +537,11 @@ protected: std::string cv_traj_name; /// Collective variables output trajectory file - colvarmodule::ofstream cv_traj_os; + std::ostream *cv_traj_os; /// Appending to the existing trajectory file? bool cv_traj_append; - /// Output restart file - colvarmodule::ofstream restart_out_os; - private: /// Counter for the current depth in the object hierarchy (useg e.g. in output) @@ -704,18 +682,6 @@ inline void cvm::request_total_force() proxy->request_total_force(true); } -inline void cvm::select_closest_image(atom_pos &pos, - atom_pos const &ref_pos) -{ - proxy->select_closest_image(pos, ref_pos); -} - -inline void cvm::select_closest_images(std::vector &pos, - atom_pos const &ref_pos) -{ - proxy->select_closest_images(pos, ref_pos); -} - inline cvm::rvector cvm::position_distance(atom_pos const &pos1, atom_pos const &pos2) { diff --git a/lib/colvars/colvarparse.cpp b/lib/colvars/colvarparse.cpp index 8055d925db..9f333b7b76 100644 --- a/lib/colvars/colvarparse.cpp +++ b/lib/colvars/colvarparse.cpp @@ -17,10 +17,7 @@ // space & tab -std::string const colvarparse::white_space = " \t"; - -std::string colvarparse::dummy_string = ""; -size_t colvarparse::dummy_pos = 0; +char const * const colvarparse::white_space = " \t"; // definition of single-value keyword parsers @@ -37,7 +34,7 @@ template bool colvarparse::_get_keyval_scalar_(std::string const do { std::string data_this = ""; - b_found = key_lookup(conf, key, data_this, save_pos); + b_found = key_lookup(conf, key, &data_this, &save_pos); if (b_found) { if (!b_found_any) b_found_any = true; @@ -92,7 +89,7 @@ bool colvarparse::_get_keyval_scalar_string_(std::string const &conf, do { std::string data_this = ""; - b_found = key_lookup(conf, key, data_this, save_pos); + b_found = key_lookup(conf, key, &data_this, &save_pos); if (b_found) { if (!b_found_any) b_found_any = true; @@ -156,7 +153,7 @@ template bool colvarparse::_get_keyval_vector_(std::string const do { std::string data_this = ""; - b_found = key_lookup(conf, key, data_this, save_pos); + b_found = key_lookup(conf, key, &data_this, &save_pos); if (b_found) { if (!b_found_any) b_found_any = true; @@ -313,7 +310,7 @@ bool colvarparse::get_keyval(std::string const &conf, do { std::string data_this = ""; - b_found = key_lookup(conf, key, data_this, save_pos); + b_found = key_lookup(conf, key, &data_this, &save_pos); if (b_found) { if (!b_found_any) b_found_any = true; @@ -552,8 +549,8 @@ std::istream & colvarparse::getline_nocomments(std::istream &is, bool colvarparse::key_lookup(std::string const &conf, char const *key_in, - std::string &data, - size_t &save_pos) + std::string *data, + size_t *save_pos) { if (cvm::debug()) { cvm::log("Looking for the keyword \""+std::string(key_in)+"\" and its value.\n"); @@ -570,14 +567,12 @@ bool colvarparse::key_lookup(std::string const &conf, std::string const conf_lower(to_lower_cppstr(conf)); // by default, there is no value, unless we found one - data = ""; - - // when the function is invoked without save_pos, ensure that we - // start from zero - colvarparse::dummy_pos = 0; + if (data != NULL) { + data->clear(); + } // start from the first occurrence of key - size_t pos = conf_lower.find(key, save_pos); + size_t pos = conf_lower.find(key, (save_pos != NULL) ? *save_pos : 0); // iterate over all instances of the substring until it finds it as isolated keyword while (true) { @@ -593,7 +588,7 @@ bool colvarparse::key_lookup(std::string const &conf, bool b_isolated_left = true, b_isolated_right = true; if (pos > 0) { - if ( std::string("\n"+white_space+ + if ( std::string("\n"+std::string(white_space)+ "}").find(conf[pos-1]) == std::string::npos ) { // none of the valid delimiting characters is on the left of key @@ -602,7 +597,7 @@ bool colvarparse::key_lookup(std::string const &conf, } if (pos < conf.size()-key.size()-1) { - if ( std::string("\n"+white_space+ + if ( std::string("\n"+std::string(white_space)+ "{").find(conf[pos+key.size()]) == std::string::npos ) { // none of the valid delimiting characters is on the right of key @@ -625,9 +620,11 @@ bool colvarparse::key_lookup(std::string const &conf, } } + if (save_pos != NULL) { // save the pointer for a future call (when iterating over multiple // valid instances of the same keyword) - save_pos = pos + key.size(); + *save_pos = pos + key.size(); + } // get the remainder of the line size_t pl = conf.rfind("\n", pos); @@ -716,19 +713,21 @@ bool colvarparse::key_lookup(std::string const &conf, data_end) + 1; } - data.append(line, data_begin, (data_end-data_begin)); + if (data != NULL) { + data->append(line, data_begin, (data_end-data_begin)); - if (cvm::debug()) { - cvm::log("Keyword value = \""+data+"\".\n"); - } + if (cvm::debug()) { + cvm::log("Keyword value = \""+*data+"\".\n"); + } - if (data.size() && save_delimiters) { - data_begin_pos.push_back(conf.find(data, pos+key.size())); - data_end_pos.push_back(data_begin_pos.back()+data.size()); + if (data->size()) { + data_begin_pos.push_back(conf.find(*data, pos+key.size())); + data_end_pos.push_back(data_begin_pos.back()+data->size()); + } } } - save_pos = line_end; + if (save_pos != NULL) *save_pos = line_end; return true; } diff --git a/lib/colvars/colvarparse.h b/lib/colvars/colvarparse.h index 9f116caafd..9389bc49da 100644 --- a/lib/colvars/colvarparse.h +++ b/lib/colvars/colvarparse.h @@ -24,7 +24,7 @@ /// need to parse input inherit from this class colvarparse { -protected: +private: /// \brief List of legal keywords for this object: this is updated /// by each call to colvarparse::get_keyval() or @@ -41,14 +41,6 @@ protected: /// values before the keyword check is performed std::list data_end_pos; - /// \brief Whether or not to accumulate data_begin_pos and - /// data_end_pos in key_lookup(); it may be useful to disable - /// this after the constructor is called, because other files may be - /// read (e.g. restart) that would mess up the registry; in any - /// case, nothing serious happens until check_keywords() is invoked - /// (which should happen only right after construction) - bool save_delimiters; - /// \brief Add a new valid keyword to the list void add_keyword(char const *key); @@ -62,14 +54,12 @@ public: inline colvarparse() - : save_delimiters(true) { init(); } /// Constructor that stores the object's config string inline colvarparse(const std::string& conf) - : save_delimiters(true) { init(conf); } @@ -115,8 +105,6 @@ public: /// \brief Use this after parsing a config string (note that check_keywords() calls it already) void clear_keyword_registry(); -public: - /// \fn get_keyval bool const get_keyval (std::string const &conf, /// char const *key, _type_ &value, _type_ const &def_value, /// Parse_Mode const parse_mode) \brief Helper function to parse @@ -282,7 +270,7 @@ public: /// Accepted white space delimiters, used in key_lookup() - static std::string const white_space; + static const char * const white_space; /// \brief Low-level function for parsing configuration strings; /// automatically adds the requested keyword to the list of valid @@ -293,13 +281,8 @@ public: /// within "conf", useful when doing multiple calls bool key_lookup(std::string const &conf, char const *key, - std::string &data = dummy_string, - size_t &save_pos = dummy_pos); - - /// Used as a default argument by key_lookup - static std::string dummy_string; - /// Used as a default argument by key_lookup - static size_t dummy_pos; + std::string *data = NULL, + size_t *save_pos = NULL); /// \brief Works as std::getline() but also removes everything /// between a comment character and the following newline diff --git a/lib/colvars/colvarproxy.cpp b/lib/colvars/colvarproxy.cpp new file mode 100644 index 0000000000..fa24091d52 --- /dev/null +++ b/lib/colvars/colvarproxy.cpp @@ -0,0 +1,492 @@ +// -*- c++ -*- + +// This file is part of the Collective Variables module (Colvars). +// The original version of Colvars and its updates are located at: +// https://github.com/colvars/colvars +// Please update all Colvars source files before making any changes. +// If you wish to distribute your changes, please submit them to the +// Colvars repository at GitHub. + +#include +#include + +#include "colvarmodule.h" +#include "colvarproxy.h" +#include "colvarscript.h" +#include "colvaratoms.h" + + + +colvarproxy_system::colvarproxy_system() {} + + +colvarproxy_system::~colvarproxy_system() {} + + +void colvarproxy_system::add_energy(cvm::real energy) {} + + +void colvarproxy_system::request_total_force(bool yesno) +{ + if (yesno == true) + cvm::error("Error: total forces are currently not implemented.\n", + COLVARS_NOT_IMPLEMENTED); +} + + +bool colvarproxy_system::total_forces_enabled() const +{ + return false; +} + + +cvm::real colvarproxy_system::position_dist2(cvm::atom_pos const &pos1, + cvm::atom_pos const &pos2) +{ + return (position_distance(pos1, pos2)).norm2(); +} + + + +colvarproxy_atoms::colvarproxy_atoms() {} + + +colvarproxy_atoms::~colvarproxy_atoms() +{ + reset(); +} + + +int colvarproxy_atoms::reset() +{ + atoms_ids.clear(); + atoms_ncopies.clear(); + atoms_masses.clear(); + atoms_charges.clear(); + atoms_positions.clear(); + atoms_total_forces.clear(); + atoms_new_colvar_forces.clear(); + return COLVARS_OK; +} + + +int colvarproxy_atoms::add_atom_slot(int atom_id) +{ + atoms_ids.push_back(atom_id); + atoms_ncopies.push_back(1); + atoms_masses.push_back(1.0); + atoms_charges.push_back(0.0); + atoms_positions.push_back(cvm::rvector(0.0, 0.0, 0.0)); + atoms_total_forces.push_back(cvm::rvector(0.0, 0.0, 0.0)); + atoms_new_colvar_forces.push_back(cvm::rvector(0.0, 0.0, 0.0)); + return (atoms_ids.size() - 1); +} + + +int colvarproxy_atoms::init_atom(cvm::residue_id const &residue, + std::string const &atom_name, + std::string const &segment_id) +{ + cvm::error("Error: initializing an atom by name and residue number is currently not supported.\n", + COLVARS_NOT_IMPLEMENTED); + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_atoms::check_atom_id(cvm::residue_id const &residue, + std::string const &atom_name, + std::string const &segment_id) +{ + colvarproxy_atoms::init_atom(residue, atom_name, segment_id); + return COLVARS_NOT_IMPLEMENTED; +} + + +void colvarproxy_atoms::clear_atom(int index) +{ + if (((size_t) index) >= atoms_ids.size()) { + cvm::error("Error: trying to disable an atom that was not previously requested.\n", + INPUT_ERROR); + } + if (atoms_ncopies[index] > 0) { + atoms_ncopies[index] -= 1; + } +} + + +int colvarproxy_atoms::load_atoms(char const *filename, + cvm::atom_group &atoms, + std::string const &pdb_field, + double const) +{ + return cvm::error("Error: loading atom identifiers from a file " + "is currently not implemented.\n", + COLVARS_NOT_IMPLEMENTED); +} + + +int colvarproxy_atoms::load_coords(char const *filename, + std::vector &pos, + const std::vector &indices, + std::string const &pdb_field, + double const) +{ + return cvm::error("Error: loading atomic coordinates from a file " + "is currently not implemented.\n", + COLVARS_NOT_IMPLEMENTED); +} + + + +colvarproxy_atom_groups::colvarproxy_atom_groups() {} + + +colvarproxy_atom_groups::~colvarproxy_atom_groups() +{ + reset(); +} + + +int colvarproxy_atom_groups::reset() +{ + atom_groups_ids.clear(); + atom_groups_ncopies.clear(); + atom_groups_masses.clear(); + atom_groups_charges.clear(); + atom_groups_coms.clear(); + atom_groups_total_forces.clear(); + atom_groups_new_colvar_forces.clear(); + return COLVARS_OK; +} + + +int colvarproxy_atom_groups::add_atom_group_slot(int atom_group_id) +{ + atom_groups_ids.push_back(atom_group_id); + atom_groups_ncopies.push_back(1); + atom_groups_masses.push_back(1.0); + atom_groups_charges.push_back(0.0); + atom_groups_coms.push_back(cvm::rvector(0.0, 0.0, 0.0)); + atom_groups_total_forces.push_back(cvm::rvector(0.0, 0.0, 0.0)); + atom_groups_new_colvar_forces.push_back(cvm::rvector(0.0, 0.0, 0.0)); + return (atom_groups_ids.size() - 1); +} + + +int colvarproxy_atom_groups::scalable_group_coms() +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_atom_groups::init_atom_group(std::vector const &atoms_ids) +{ + cvm::error("Error: initializing a group outside of the Colvars module " + "is currently not supported.\n", + COLVARS_NOT_IMPLEMENTED); + return COLVARS_NOT_IMPLEMENTED; +} + + +void colvarproxy_atom_groups::clear_atom_group(int index) +{ + if (((size_t) index) >= atom_groups_ids.size()) { + cvm::error("Error: trying to disable an atom group " + "that was not previously requested.\n", + INPUT_ERROR); + } + if (atom_groups_ncopies[index] > 0) { + atom_groups_ncopies[index] -= 1; + } +} + + + +colvarproxy_smp::colvarproxy_smp() +{ + b_smp_active = true; +} + + +colvarproxy_smp::~colvarproxy_smp() {} + + +int colvarproxy_smp::smp_enabled() +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_smp::smp_colvars_loop() +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_smp::smp_biases_loop() +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_smp::smp_biases_script_loop() +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_smp::smp_thread_id() +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_smp::smp_num_threads() +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_smp::smp_lock() +{ + return COLVARS_OK; +} + + +int colvarproxy_smp::smp_trylock() +{ + return COLVARS_OK; +} + + +int colvarproxy_smp::smp_unlock() +{ + return COLVARS_OK; +} + + + + +colvarproxy_replicas::colvarproxy_replicas() {} + + +colvarproxy_replicas::~colvarproxy_replicas() {} + + +bool colvarproxy_replicas::replica_enabled() +{ + return false; +} + + +int colvarproxy_replicas::replica_index() +{ + return 0; +} + + +int colvarproxy_replicas::replica_num() +{ + return 1; +} + + +void colvarproxy_replicas::replica_comm_barrier() {} + + +int colvarproxy_replicas::replica_comm_recv(char* msg_data, + int buf_len, + int src_rep) +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_replicas::replica_comm_send(char* msg_data, + int msg_len, + int dest_rep) +{ + return COLVARS_NOT_IMPLEMENTED; +} + + + + +colvarproxy_script::colvarproxy_script() +{ + script = NULL; +} + + +colvarproxy_script::~colvarproxy_script() {} + + +char *colvarproxy_script::script_obj_to_str(unsigned char *obj) +{ + return reinterpret_cast(obj); +} + + +int colvarproxy_script::run_force_callback() +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_script::run_colvar_callback( + std::string const &name, + std::vector const &cvcs, + colvarvalue &value) +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_script::run_colvar_gradient_callback( + std::string const &name, + std::vector const &cvcs, + std::vector > &gradient) +{ + return COLVARS_NOT_IMPLEMENTED; +} + + + + +colvarproxy_io::colvarproxy_io() {} + + +colvarproxy_io::~colvarproxy_io() {} + + +int colvarproxy_io::get_frame(long int&) +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +int colvarproxy_io::set_frame(long int) +{ + return COLVARS_NOT_IMPLEMENTED; +} + + +std::ostream * colvarproxy_io::output_stream(std::string const &output_name, + std::ios_base::openmode mode) +{ + if (cvm::debug()) { + cvm::log("Using colvarproxy::output_stream()\n"); + } + std::list::iterator osi = output_files.begin(); + std::list::iterator osni = output_stream_names.begin(); + for ( ; osi != output_files.end(); osi++, osni++) { + if (*osni == output_name) { + return *osi; + } + } + if (!(mode & (std::ios_base::app | std::ios_base::ate))) { + backup_file(output_name); + } + std::ofstream *os = new std::ofstream(output_name.c_str(), mode); + if (!os->is_open()) { + cvm::error("Error: cannot write to file/channel \""+output_name+"\".\n", + FILE_ERROR); + return NULL; + } + output_stream_names.push_back(output_name); + output_files.push_back(os); + return os; +} + + +int colvarproxy_io::flush_output_stream(std::ostream *os) +{ + std::list::iterator osi = output_files.begin(); + std::list::iterator osni = output_stream_names.begin(); + for ( ; osi != output_files.end(); osi++, osni++) { + if (*osi == os) { + ((std::ofstream *) (*osi))->flush(); + return COLVARS_OK; + } + } + return cvm::error("Error: trying to flush an output file/channel " + "that wasn't open.\n", BUG_ERROR); +} + + +int colvarproxy_io::close_output_stream(std::string const &output_name) +{ + std::list::iterator osi = output_files.begin(); + std::list::iterator osni = output_stream_names.begin(); + for ( ; osi != output_files.end(); osi++, osni++) { + if (*osni == output_name) { + ((std::ofstream *) (*osi))->close(); + output_files.erase(osi); + output_stream_names.erase(osni); + return COLVARS_OK; + } + } + return cvm::error("Error: trying to close an output file/channel " + "that wasn't open.\n", BUG_ERROR); +} + + +int colvarproxy_io::backup_file(char const *filename) +{ + return COLVARS_NOT_IMPLEMENTED; +} + + + +colvarproxy::colvarproxy() +{ + colvars = NULL; + b_simulation_running = true; +} + + +colvarproxy::~colvarproxy() {} + + +int colvarproxy::reset() +{ + int error_code = COLVARS_OK; + error_code |= colvarproxy_atoms::reset(); + error_code |= colvarproxy_atom_groups::reset(); + return error_code; +} + + +int colvarproxy::setup() +{ + return COLVARS_OK; +} + + +int colvarproxy::update_input() +{ + return COLVARS_OK; +} + + +int colvarproxy::update_output() +{ + return COLVARS_OK; +} + + +size_t colvarproxy::restart_frequency() +{ + return 0; +} + + + + + + + + + + + diff --git a/lib/colvars/colvarproxy.h b/lib/colvars/colvarproxy.h index 5b216c9d41..95d13cd7e0 100644 --- a/lib/colvars/colvarproxy.h +++ b/lib/colvars/colvarproxy.h @@ -16,55 +16,36 @@ #include "colvarmodule.h" #include "colvarvalue.h" + +/// \file colvarproxy.h +/// \brief Colvars proxy classes +/// +/// This file declares the class for the object responsible for interfacing +/// Colvars with other codes (MD engines, VMD, Python). The \link colvarproxy +/// \endlink class is a derivative of multiple classes, each devoted to a +/// specific task (e.g. \link colvarproxy_atoms \endlink to access data for +/// individual atoms). +/// +/// To interface to a new MD engine, the simplest solution is to derive a new +/// class from \link colvarproxy \endlink. Currently implemented are: \link +/// colvarproxy_lammps, \endlink, \link colvarproxy_namd, \endlink, \link +/// colvarproxy_vmd, \endlink. + + // forward declarations class colvarscript; -/// \brief Interface between the collective variables module and -/// the simulation or analysis program (NAMD, VMD, LAMMPS...). -/// This is the base class: each interfaced program is supported by a derived class. -/// Only pure virtual functions ("= 0") must be reimplemented to ensure baseline functionality. -class colvarproxy { +/// Methods for accessing the simulation system (PBCs, integrator, etc) +class colvarproxy_system { public: - /// Pointer to the main object - colvarmodule *colvars; - /// Constructor - colvarproxy() - { - colvars = NULL; - b_simulation_running = true; - b_smp_active = true; - script = NULL; - } + colvarproxy_system(); /// Destructor - virtual ~colvarproxy() - {} - - /// (Re)initialize required member data after construction - virtual int setup() - { - return COLVARS_OK; - } - - /// \brief Update data required by the colvars module (e.g. cache atom positions) - /// - /// TODO Break up colvarproxy_namd and colvarproxy_lammps function into these - virtual int update_input() - { - return COLVARS_OK; - } - - /// \brief Update data based from the results of a module update (e.g. send forces) - virtual int update_output() - { - return COLVARS_OK; - } - - // **************** SIMULATION PARAMETERS **************** + virtual ~colvarproxy_system(); /// \brief Value of the unit for atomic coordinates with respect to /// angstroms (used by some variables for hard-coded default values) @@ -73,7 +54,7 @@ public: /// \brief Boltzmann constant virtual cvm::real boltzmann() = 0; - /// \brief Temperature of the simulation (K) + /// \brief Target temperature of the simulation (K units) virtual cvm::real temperature() = 0; /// \brief Time step of the simulation (fs) @@ -82,299 +63,158 @@ public: /// \brief Pseudo-random number with Gaussian distribution virtual cvm::real rand_gaussian(void) = 0; - /// \brief Get the current frame number - // Returns error code - virtual int get_frame(long int&) { return COLVARS_NOT_IMPLEMENTED; } - - /// \brief Set the current frame number (as well as colvarmodule::it) - // Returns error code - virtual int set_frame(long int) { return COLVARS_NOT_IMPLEMENTED; } + /// Pass restraint energy value for current timestep to MD engine + virtual void add_energy(cvm::real energy) = 0; - /// \brief Prefix to be used for input files (restarts, not - /// configuration) - std::string input_prefix_str, output_prefix_str, restart_output_prefix_str; + /// \brief Get the PBC-aware distance vector between two positions + virtual cvm::rvector position_distance(cvm::atom_pos const &pos1, + cvm::atom_pos const &pos2) = 0; - inline std::string & input_prefix() - { - return input_prefix_str; - } + /// \brief Get the PBC-aware square distance between two positions; + /// may need to be reimplemented independently from position_distance() for optimization purposes + virtual cvm::real position_dist2(cvm::atom_pos const &pos1, + cvm::atom_pos const &pos2); - /// \brief Prefix to be used for output restart files - inline std::string restart_output_prefix() - { - return restart_output_prefix_str; - } + /// Tell the proxy whether total forces are needed (may not always be available) + virtual void request_total_force(bool yesno); - /// \brief Prefix to be used for output files (final system - /// configuration) - inline std::string output_prefix() - { - return output_prefix_str; - } + /// Are total forces being used? + virtual bool total_forces_enabled() const; +}; - /// \brief Restarts will be written each time this number of steps has passed - virtual size_t restart_frequency() - { - return 0; - } -protected: - - /// Whether a simulation is running (and try to prevent irrecovarable errors) - bool b_simulation_running; +/// \brief Container of atomic data for processing by Colvars +class colvarproxy_atoms { public: - /// Whether a simulation is running (and try to prevent irrecovarable errors) - virtual bool simulation_running() const - { - return b_simulation_running; - } - -protected: + /// Constructor + colvarproxy_atoms(); - /// \brief Currently opened output files: by default, these are ofstream objects. - /// Allows redefinition to implement different output mechanisms - std::list output_files; - /// \brief Identifiers for output_stream objects: by default, these are the names of the files - std::list output_stream_names; + /// Destructor + virtual ~colvarproxy_atoms(); -public: + /// Prepare this atom for collective variables calculation, selecting it by + /// numeric index (1-based) + virtual int init_atom(int atom_number) = 0; - // ***************** SHARED-MEMORY PARALLELIZATION ***************** + /// Check that this atom number is valid, but do not initialize the + /// corresponding atom yet + virtual int check_atom_id(int atom_number) = 0; - /// Whether threaded parallelization is available (TODO: make this a cvm::deps feature) - virtual int smp_enabled() - { - return COLVARS_NOT_IMPLEMENTED; - } + /// Select this atom for collective variables calculation, using name and + /// residue number. Not all programs support this: leave this function as + /// is in those cases. + virtual int init_atom(cvm::residue_id const &residue, + std::string const &atom_name, + std::string const &segment_id); - /// Whether threaded parallelization should be used (TODO: make this a cvm::deps feature) - bool b_smp_active; + /// Check that this atom is valid, but do not initialize it yet + virtual int check_atom_id(cvm::residue_id const &residue, + std::string const &atom_name, + std::string const &segment_id); - /// Distribute calculation of colvars (and their components) across threads - virtual int smp_colvars_loop() - { - return COLVARS_NOT_IMPLEMENTED; - } + /// \brief Used by the atom class destructor: rather than deleting the array slot + /// (costly) set the corresponding atoms_ncopies to zero + virtual void clear_atom(int index); - /// Distribute calculation of biases across threads - virtual int smp_biases_loop() - { - return COLVARS_NOT_IMPLEMENTED; - } + /// \brief Read atom identifiers from a file \param filename name of + /// the file (usually a PDB) \param atoms array to which atoms read + /// from "filename" will be appended \param pdb_field (optiona) if + /// "filename" is a PDB file, use this field to determine which are + /// the atoms to be set + virtual int load_atoms(char const *filename, + cvm::atom_group &atoms, + std::string const &pdb_field, + double const pdb_field_value = 0.0); - /// Distribute calculation of biases across threads 2nd through last, with all scripted biased on 1st thread - virtual int smp_biases_script_loop() - { - return COLVARS_NOT_IMPLEMENTED; - } + /// \brief Load the coordinates for a group of atoms from a file + /// (usually a PDB); if "pos" is already allocated, the number of its + /// elements must match the number of atoms in "filename" + virtual int load_coords(char const *filename, + std::vector &pos, + const std::vector &indices, + std::string const &pdb_field, + double const pdb_field_value = 0.0); - /// Index of this thread - virtual int smp_thread_id() - { - return COLVARS_NOT_IMPLEMENTED; - } + /// Clear atomic data + int reset(); - /// Number of threads sharing this address space - virtual int smp_num_threads() + /// Get the numeric ID of the given atom (for the program) + inline int get_atom_id(int index) const { - return COLVARS_NOT_IMPLEMENTED; + return atoms_ids[index]; } - /// Lock the proxy's shared data for access by a thread, if threads are implemented; if not implemented, does nothing - virtual int smp_lock() + /// Get the mass of the given atom + inline cvm::real get_atom_mass(int index) const { - return COLVARS_OK; + return atoms_masses[index]; } - /// Attempt to lock the proxy's shared data - virtual int smp_trylock() + /// Get the charge of the given atom + inline cvm::real get_atom_charge(int index) const { - return COLVARS_OK; + return atoms_charges[index]; } - /// Release the lock - virtual int smp_unlock() + /// Read the current position of the given atom + inline cvm::rvector get_atom_position(int index) const { - return COLVARS_OK; - } - - // **************** MULTIPLE REPLICAS COMMUNICATION **************** - - // Replica exchange commands: - - /// \brief Indicate if multi-replica support is available and active - virtual bool replica_enabled() { return false; } - - /// \brief Index of this replica - virtual int replica_index() { return 0; } - - /// \brief Total number of replica - virtual int replica_num() { return 1; } - - /// \brief Synchronize replica - virtual void replica_comm_barrier() {} - - /// \brief Receive data from other replica - virtual int replica_comm_recv(char* msg_data, int buf_len, int src_rep) { - return COLVARS_NOT_IMPLEMENTED; - } - - /// \brief Send data to other replica - virtual int replica_comm_send(char* msg_data, int msg_len, int dest_rep) { - return COLVARS_NOT_IMPLEMENTED; + return atoms_positions[index]; } - - // **************** SCRIPTING INTERFACE **************** - - /// Pointer to the scripting interface object - /// (does not need to be allocated in a new interface) - colvarscript *script; - - /// is a user force script defined? - bool force_script_defined; - - /// Do we have a scripting interface? - bool have_scripts; - - /// Run a user-defined colvar forces script - virtual int run_force_callback() { return COLVARS_NOT_IMPLEMENTED; } - - virtual int run_colvar_callback(std::string const &name, - std::vector const &cvcs, - colvarvalue &value) - { return COLVARS_NOT_IMPLEMENTED; } - - virtual int run_colvar_gradient_callback(std::string const &name, - std::vector const &cvcs, - std::vector > &gradient) - { return COLVARS_NOT_IMPLEMENTED; } - - - // **************** INPUT/OUTPUT **************** - - /// Print a message to the main log - virtual void log(std::string const &message) = 0; - - /// Print a message to the main log and let the rest of the program handle the error - virtual void error(std::string const &message) = 0; - - /// Print a message to the main log and exit with error code - virtual void fatal_error(std::string const &message) = 0; - - /// Print a message to the main log and exit normally - virtual void exit(std::string const &message) + /// Read the current total force of the given atom + inline cvm::rvector get_atom_total_force(int index) const { - cvm::error("Error: exiting without error is not implemented, returning error code.\n", - COLVARS_NOT_IMPLEMENTED); + return atoms_total_forces[index]; } - // TODO the following definitions may be moved to a .cpp file - - /// \brief Returns a reference to the given output channel; - /// if this is not open already, then open it - virtual std::ostream * output_stream(std::string const &output_name) + /// Request that this force is applied to the given atom + inline void apply_atom_force(int index, cvm::rvector const &new_force) { - std::list::iterator osi = output_files.begin(); - std::list::iterator osni = output_stream_names.begin(); - for ( ; osi != output_files.end(); osi++, osni++) { - if (*osni == output_name) { - return *osi; - } - } - output_stream_names.push_back(output_name); - std::ofstream * os = new std::ofstream(output_name.c_str()); - if (!os->is_open()) { - cvm::error("Error: cannot write to file \""+output_name+"\".\n", - FILE_ERROR); - } - output_files.push_back(os); - return os; + atoms_new_colvar_forces[index] += new_force; } - /// \brief Closes the given output channel - virtual int close_output_stream(std::string const &output_name) + /// Read the current velocity of the given atom + inline cvm::rvector get_atom_velocity(int index) { - std::list::iterator osi = output_files.begin(); - std::list::iterator osni = output_stream_names.begin(); - for ( ; osi != output_files.end(); osi++, osni++) { - if (*osni == output_name) { - ((std::ofstream *) (*osi))->close(); - output_files.erase(osi); - output_stream_names.erase(osni); - return COLVARS_OK; - } - } - cvm::error("Error: trying to close an output file or stream that wasn't open.\n", - BUG_ERROR); - return COLVARS_ERROR; + cvm::error("Error: reading the current velocity of an atom " + "is not yet implemented.\n", + COLVARS_NOT_IMPLEMENTED); + return cvm::rvector(0.0); } - /// \brief Rename the given file, before overwriting it - virtual int backup_file(char const *filename) + inline std::vector *modify_atom_ids() { - return COLVARS_NOT_IMPLEMENTED; + return &atoms_ids; } - - - // **************** ACCESS SYSTEM DATA **************** - - /// Pass restraint energy value for current timestep to MD engine - virtual void add_energy(cvm::real energy) = 0; - - /// Tell the proxy whether total forces are needed (may not always be available) - virtual void request_total_force(bool yesno) + inline std::vector *modify_atom_masses() { - if (yesno == true) - cvm::error("Error: total forces are currently not implemented.\n", - COLVARS_NOT_IMPLEMENTED); + return &atoms_masses; } - /// Are total forces being used? - virtual bool total_forces_enabled() const + inline std::vector *modify_atom_charges() { - return false; + return &atoms_charges; } - /// \brief Get the PBC-aware distance vector between two positions - virtual cvm::rvector position_distance(cvm::atom_pos const &pos1, - cvm::atom_pos const &pos2) = 0; - - /// \brief Get the PBC-aware square distance between two positions; - /// may need to be reimplemented independently from position_distance() for optimization purposes - virtual cvm::real position_dist2(cvm::atom_pos const &pos1, - cvm::atom_pos const &pos2) + inline std::vector *modify_atom_positions() { - return (position_distance(pos1, pos2)).norm2(); + return &atoms_positions; } - /// \brief Get the closest periodic image to a reference position - /// \param pos The position to look for the closest periodic image - /// \param ref_pos The reference position - virtual void select_closest_image(cvm::atom_pos &pos, - cvm::atom_pos const &ref_pos) + inline std::vector *modify_atom_total_forces() { - pos = position_distance(ref_pos, pos) + ref_pos; + return &atoms_total_forces; } - /// \brief Perform select_closest_image() on a set of atomic positions - /// - /// After that, distance vectors can then be calculated directly, - /// without using position_distance() - void select_closest_images(std::vector &pos, - cvm::atom_pos const &ref_pos) + inline std::vector *modify_atom_new_colvar_forces() { - for (std::vector::iterator pi = pos.begin(); - pi != pos.end(); ++pi) { - select_closest_image(*pi, ref_pos); - } + return &atoms_new_colvar_forces; } - - // **************** ACCESS ATOMIC DATA **************** protected: /// \brief Array of 0-based integers used to uniquely associate atoms @@ -393,143 +233,81 @@ protected: /// \brief Forces applied from colvars, to be communicated to the MD integrator std::vector atoms_new_colvar_forces; - /// Used by all init_atom() functions: create a slot for an atom not requested yet - inline int add_atom_slot(int atom_id) - { - atoms_ids.push_back(atom_id); - atoms_ncopies.push_back(1); - atoms_masses.push_back(1.0); - atoms_charges.push_back(0.0); - atoms_positions.push_back(cvm::rvector(0.0, 0.0, 0.0)); - atoms_total_forces.push_back(cvm::rvector(0.0, 0.0, 0.0)); - atoms_new_colvar_forces.push_back(cvm::rvector(0.0, 0.0, 0.0)); - return (atoms_ids.size() - 1); - } + /// Used by all init_atom() functions: create a slot for an atom not + /// requested yet; returns the index in the arrays + int add_atom_slot(int atom_id); + +}; + + +/// \brief Container of atom group data (allow collection of aggregated atomic +/// data) +class colvarproxy_atom_groups { public: - /// Prepare this atom for collective variables calculation, selecting it by numeric index (1-based) - virtual int init_atom(int atom_number) = 0; + /// Contructor + colvarproxy_atom_groups(); - /// Check that this atom number is valid, but do not initialize the corresponding atom yet - virtual int check_atom_id(int atom_number) = 0; + /// Destructor + virtual ~colvarproxy_atom_groups(); - /// Select this atom for collective variables calculation, using name and residue number. - /// Not all programs support this: leave this function as is in those cases. - virtual int init_atom(cvm::residue_id const &residue, - std::string const &atom_name, - std::string const &segment_id) - { - cvm::error("Error: initializing an atom by name and residue number is currently not supported.\n", - COLVARS_NOT_IMPLEMENTED); - return COLVARS_NOT_IMPLEMENTED; - } + /// Clear atom group data + int reset(); - /// Check that this atom is valid, but do not initialize it yet - virtual int check_atom_id(cvm::residue_id const &residue, - std::string const &atom_name, - std::string const &segment_id) - { - cvm::error("Error: initializing an atom by name and residue number is currently not supported.\n", - COLVARS_NOT_IMPLEMENTED); - return COLVARS_NOT_IMPLEMENTED; - } + /// \brief Whether this proxy implementation has capability for scalable groups + virtual int scalable_group_coms(); - /// \brief Used by the atom class destructor: rather than deleting the array slot - /// (costly) set the corresponding atoms_ncopies to zero - virtual void clear_atom(int index) - { - if (((size_t) index) >= atoms_ids.size()) { - cvm::error("Error: trying to disable an atom that was not previously requested.\n", - INPUT_ERROR); - } - if (atoms_ncopies[index] > 0) { - atoms_ncopies[index] -= 1; - } - } + /// Prepare this group for collective variables calculation, selecting atoms by internal ids (0-based) + virtual int init_atom_group(std::vector const &atoms_ids); - /// Get the numeric ID of the given atom (for the program) - inline int get_atom_id(int index) const - { - return atoms_ids[index]; - } + /// \brief Used by the atom_group class destructor + virtual void clear_atom_group(int index); - /// Get the mass of the given atom - inline cvm::real get_atom_mass(int index) const + /// Get the numeric ID of the given atom group (for the MD program) + inline int get_atom_group_id(int index) const { - return atoms_masses[index]; + return atom_groups_ids[index]; } - /// Get the charge of the given atom - inline cvm::real get_atom_charge(int index) const + /// Get the mass of the given atom group + inline cvm::real get_atom_group_mass(int index) const { - return atoms_charges[index]; + return atom_groups_masses[index]; } - /// Read the current position of the given atom - inline cvm::rvector get_atom_position(int index) const + /// Get the charge of the given atom group + inline cvm::real get_atom_group_charge(int index) const { - return atoms_positions[index]; + return atom_groups_charges[index]; } - /// Read the current total force of the given atom - inline cvm::rvector get_atom_total_force(int index) const + /// Read the current position of the center of mass given atom group + inline cvm::rvector get_atom_group_com(int index) const { - return atoms_total_forces[index]; + return atom_groups_coms[index]; } - /// Request that this force is applied to the given atom - inline void apply_atom_force(int index, cvm::rvector const &new_force) + /// Read the current total force of the given atom group + inline cvm::rvector get_atom_group_total_force(int index) const { - atoms_new_colvar_forces[index] += new_force; + return atom_groups_total_forces[index]; } - /// Read the current velocity of the given atom - virtual cvm::rvector get_atom_velocity(int index) + /// Request that this force is applied to the given atom group + inline void apply_atom_group_force(int index, cvm::rvector const &new_force) { - cvm::error("Error: reading the current velocity of an atom is not yet implemented.\n", - COLVARS_NOT_IMPLEMENTED); - return cvm::rvector(0.0); + atom_groups_new_colvar_forces[index] += new_force; } - // useful functions for data management outside this class - inline std::vector *modify_atom_ids() { return &atoms_ids; } - inline std::vector *modify_atom_masses() { return &atoms_masses; } - inline std::vector *modify_atom_charges() { return &atoms_charges; } - inline std::vector *modify_atom_positions() { return &atoms_positions; } - inline std::vector *modify_atom_total_forces() { return &atoms_total_forces; } - inline std::vector *modify_atom_new_colvar_forces() { return &atoms_new_colvar_forces; } - - /// \brief Read atom identifiers from a file \param filename name of - /// the file (usually a PDB) \param atoms array to which atoms read - /// from "filename" will be appended \param pdb_field (optiona) if - /// "filename" is a PDB file, use this field to determine which are - /// the atoms to be set - virtual int load_atoms(char const *filename, - cvm::atom_group &atoms, - std::string const &pdb_field, - double const pdb_field_value = 0.0) + /// Read the current velocity of the given atom group + inline cvm::rvector get_atom_group_velocity(int index) { - cvm::error("Error: loading atom identifiers from a file is currently not implemented.\n", + cvm::error("Error: reading the current velocity of an atom group is not yet implemented.\n", COLVARS_NOT_IMPLEMENTED); - return COLVARS_NOT_IMPLEMENTED; - } - - /// \brief Load the coordinates for a group of atoms from a file - /// (usually a PDB); if "pos" is already allocated, the number of its - /// elements must match the number of atoms in "filename" - virtual int load_coords(char const *filename, - std::vector &pos, - const std::vector &indices, - std::string const &pdb_field, - double const pdb_field_value = 0.0) - { - cvm::error("Error: loading atomic coordinates from a file is currently not implemented.\n"); - return COLVARS_NOT_IMPLEMENTED; + return cvm::rvector(0.0); } - // **************** ACCESS GROUP DATA **************** - protected: /// \brief Array of 0-based integers used to uniquely associate atom groups @@ -548,99 +326,263 @@ protected: /// \brief Forces applied from colvars, to be communicated to the MD integrator std::vector atom_groups_new_colvar_forces; - /// TODO Add here containers of handles to cvc objects that are computed in parallel + /// Used by all init_atom_group() functions: create a slot for an atom group not requested yet + int add_atom_group_slot(int atom_group_id); +}; + + +/// \brief Methods for SMP parallelization +class colvarproxy_smp { public: - /// \brief Whether this proxy implementation has capability for scalable groups - virtual int scalable_group_coms() - { - return COLVARS_NOT_IMPLEMENTED; - } + /// Constructor + colvarproxy_smp(); - /// Used by all init_atom_group() functions: create a slot for an atom group not requested yet - // TODO Add a handle to cvc objects - inline int add_atom_group_slot(int atom_group_id) - { - atom_groups_ids.push_back(atom_group_id); - atom_groups_ncopies.push_back(1); - atom_groups_masses.push_back(1.0); - atom_groups_charges.push_back(0.0); - atom_groups_coms.push_back(cvm::rvector(0.0, 0.0, 0.0)); - atom_groups_total_forces.push_back(cvm::rvector(0.0, 0.0, 0.0)); - atom_groups_new_colvar_forces.push_back(cvm::rvector(0.0, 0.0, 0.0)); - return (atom_groups_ids.size() - 1); - } + /// Destructor + virtual ~colvarproxy_smp(); - /// Prepare this group for collective variables calculation, selecting atoms by internal ids (0-based) - virtual int init_atom_group(std::vector const &atoms_ids) // TODO Add a handle to cvc objects - { - cvm::error("Error: initializing a group outside of the colvars module is currently not supported.\n", - COLVARS_NOT_IMPLEMENTED); - return COLVARS_NOT_IMPLEMENTED; - } + /// Whether threaded parallelization should be used (TODO: make this a + /// cvm::deps feature) + bool b_smp_active; - /// \brief Used by the atom_group class destructor - virtual void clear_atom_group(int index) - { - if (cvm::debug()) { - log("Trying to remove/disable atom group number "+cvm::to_str(index)+"\n"); - } - - if (((size_t) index) >= atom_groups_ids.size()) { - cvm::error("Error: trying to disable an atom group that was not previously requested.\n", - INPUT_ERROR); - } - - if (atom_groups_ncopies[index] > 0) { - atom_groups_ncopies[index] -= 1; - } - } + /// Whether threaded parallelization is available (TODO: make this a cvm::deps feature) + virtual int smp_enabled(); - /// Get the numeric ID of the given atom group (for the MD program) - inline cvm::real get_atom_group_id(int index) const - { - return atom_groups_ids[index]; - } + /// Distribute calculation of colvars (and their components) across threads + virtual int smp_colvars_loop(); - /// Get the mass of the given atom group - inline cvm::real get_atom_group_mass(int index) const - { - return atom_groups_masses[index]; - } + /// Distribute calculation of biases across threads + virtual int smp_biases_loop(); - /// Get the charge of the given atom group - inline cvm::real get_atom_group_charge(int index) const + /// Distribute calculation of biases across threads 2nd through last, with all scripted biased on 1st thread + virtual int smp_biases_script_loop(); + + /// Index of this thread + virtual int smp_thread_id(); + + /// Number of threads sharing this address space + virtual int smp_num_threads(); + + /// Lock the proxy's shared data for access by a thread, if threads are implemented; if not implemented, does nothing + virtual int smp_lock(); + + /// Attempt to lock the proxy's shared data + virtual int smp_trylock(); + + /// Release the lock + virtual int smp_unlock(); +}; + + +/// \brief Methods for multiple-replica communication +class colvarproxy_replicas { + +public: + + /// Constructor + colvarproxy_replicas(); + + /// Destructor + virtual ~colvarproxy_replicas(); + + /// \brief Indicate if multi-replica support is available and active + virtual bool replica_enabled(); + + /// \brief Index of this replica + virtual int replica_index(); + + /// \brief Total number of replica + virtual int replica_num(); + + /// \brief Synchronize replica + virtual void replica_comm_barrier(); + + /// \brief Receive data from other replica + virtual int replica_comm_recv(char* msg_data, int buf_len, int src_rep); + + /// \brief Send data to other replica + virtual int replica_comm_send(char* msg_data, int msg_len, int dest_rep); + +}; + + +/// Method for scripting language interface (Tcl or Python) +class colvarproxy_script { + +public: + + /// Constructor + colvarproxy_script(); + + /// Destructor + virtual ~colvarproxy_script(); + + /// Convert a script object (Tcl or Python call argument) to a C string + virtual char *script_obj_to_str(unsigned char *obj); + + /// Pointer to the scripting interface object + /// (does not need to be allocated in a new interface) + colvarscript *script; + + /// is a user force script defined? + bool force_script_defined; + + /// Do we have a scripting interface? + bool have_scripts; + + /// Run a user-defined colvar forces script + virtual int run_force_callback(); + + virtual int run_colvar_callback( + std::string const &name, + std::vector const &cvcs, + colvarvalue &value); + + virtual int run_colvar_gradient_callback( + std::string const &name, + std::vector const &cvcs, + std::vector > &gradient); +}; + + +/// Methods for data input/output +class colvarproxy_io { + +public: + + /// Constructor + colvarproxy_io(); + + /// Destructor + virtual ~colvarproxy_io(); + + /// \brief Save the current frame number in the argument given + // Returns error code + virtual int get_frame(long int &); + + /// \brief Set the current frame number (as well as colvarmodule::it) + // Returns error code + virtual int set_frame(long int); + + /// \brief Returns a reference to the given output channel; + /// if this is not open already, then open it + virtual std::ostream *output_stream(std::string const &output_name, + std::ios_base::openmode mode = + std::ios_base::out); + + /// \brief Flushes the given output channel + virtual int flush_output_stream(std::ostream *os); + + /// \brief Closes the given output channel + virtual int close_output_stream(std::string const &output_name); + + /// \brief Rename the given file, before overwriting it + virtual int backup_file(char const *filename); + + /// \brief Rename the given file, before overwriting it + inline int backup_file(std::string const &filename) { - return atom_groups_charges[index]; + return backup_file(filename.c_str()); } - /// Read the current position of the center of mass given atom group - inline cvm::rvector get_atom_group_com(int index) const + /// \brief Prefix of the input state file + inline std::string & input_prefix() { - return atom_groups_coms[index]; + return input_prefix_str; } - /// Read the current total force of the given atom group - inline cvm::rvector get_atom_group_total_force(int index) const + /// \brief Prefix to be used for output restart files + inline std::string & restart_output_prefix() { - return atom_groups_total_forces[index]; + return restart_output_prefix_str; } - /// Request that this force is applied to the given atom group - inline void apply_atom_group_force(int index, cvm::rvector const &new_force) + /// \brief Prefix to be used for output files (final system + /// configuration) + inline std::string & output_prefix() { - atom_groups_new_colvar_forces[index] += new_force; + return output_prefix_str; } - /// Read the current velocity of the given atom group - virtual cvm::rvector get_atom_group_velocity(int index) +protected: + + /// \brief Prefix to be used for input files (restarts, not + /// configuration) + std::string input_prefix_str, output_prefix_str, restart_output_prefix_str; + + /// \brief Currently opened output files: by default, these are ofstream objects. + /// Allows redefinition to implement different output mechanisms + std::list output_files; + /// \brief Identifiers for output_stream objects: by default, these are the names of the files + std::list output_stream_names; + +}; + + + +/// \brief Interface between the collective variables module and +/// the simulation or analysis program (NAMD, VMD, LAMMPS...). +/// This is the base class: each interfaced program is supported by a derived class. +/// Only pure virtual functions ("= 0") must be reimplemented to ensure baseline functionality. +class colvarproxy + : public colvarproxy_system, + public colvarproxy_atoms, + public colvarproxy_atom_groups, + public colvarproxy_smp, + public colvarproxy_replicas, + public colvarproxy_script, + public colvarproxy_io +{ + +public: + + /// Pointer to the main object + colvarmodule *colvars; + + /// Constructor + colvarproxy(); + + /// Destructor + virtual ~colvarproxy(); + + /// \brief Reset proxy state, e.g. requested atoms + virtual int reset(); + + /// (Re)initialize required member data after construction + virtual int setup(); + + /// \brief Update data required by the colvars module (e.g. cache atom positions) + /// + /// TODO Break up colvarproxy_namd and colvarproxy_lammps function into these + virtual int update_input(); + + /// \brief Update data based from the results of a module update (e.g. send forces) + virtual int update_output(); + + /// Print a message to the main log + virtual void log(std::string const &message) = 0; + + /// Print a message to the main log and let the rest of the program handle the error + virtual void error(std::string const &message) = 0; + + /// Print a message to the main log and exit with error code + virtual void fatal_error(std::string const &message) = 0; + + /// \brief Restarts will be written each time this number of steps has passed + virtual size_t restart_frequency(); + + /// Whether a simulation is running (warn against irrecovarable errors) + inline bool simulation_running() const { - cvm::error("Error: reading the current velocity of an atom group is not yet implemented.\n", - COLVARS_NOT_IMPLEMENTED); - return cvm::rvector(0.0); + return b_simulation_running; } +protected: + + /// Whether a simulation is running (warn against irrecovarable errors) + bool b_simulation_running; + }; diff --git a/lib/colvars/colvars_version.h b/lib/colvars/colvars_version.h new file mode 100644 index 0000000000..e544756428 --- /dev/null +++ b/lib/colvars/colvars_version.h @@ -0,0 +1,8 @@ +#define COLVARS_VERSION "2017-07-15" +// This file is part of the Collective Variables module (Colvars). +// The original version of Colvars and its updates are located at: +// https://github.com/colvars/colvars +// Please update all Colvars source files before making any changes. +// If you wish to distribute your changes, please submit them to the +// Colvars repository at GitHub. + diff --git a/lib/colvars/colvarscript.cpp b/lib/colvars/colvarscript.cpp index f192dcb7c0..5bb2faae24 100644 --- a/lib/colvars/colvarscript.cpp +++ b/lib/colvars/colvarscript.cpp @@ -12,6 +12,7 @@ #include #include "colvarscript.h" +#include "colvarproxy.h" #include "colvardeps.h" @@ -27,7 +28,7 @@ extern "C" { // Generic hooks; NAMD and VMD have Tcl-specific versions in the respective proxies - int run_colvarscript_command(int argc, const char **argv) + int run_colvarscript_command(int objc, unsigned char *const objv[]) { colvarproxy *cvp = cvm::proxy; if (!cvp) { @@ -37,7 +38,7 @@ extern "C" { cvm::error("Called run_colvarscript_command without a script object initialized.\n"); return -1; } - return cvp->script->run(argc, argv); + return cvp->script->run(objc, objv); } const char * get_colvarscript_result() @@ -53,30 +54,52 @@ extern "C" { /// Run method based on given arguments -int colvarscript::run(int argc, char const *argv[]) { - - result = ""; +int colvarscript::run(int objc, unsigned char *const objv[]) +{ + result.clear(); if (cvm::debug()) { - cvm::log("Called script run with " + cvm::to_str(argc) + " args"); - for (int i = 0; i < argc; i++) { cvm::log(argv[i]); } + cvm::log("Called script run with " + cvm::to_str(objc) + " args:"); + for (int i = 0; i < objc; i++) { + cvm::log(obj_to_str(objv[i])); + } } - if (argc < 2) { + if (objc < 2) { result = help_string(); return COLVARS_OK; } - std::string cmd = argv[1]; + std::string const cmd(obj_to_str(objv[1])); int error_code = COLVARS_OK; if (cmd == "colvar") { - return proc_colvar(argc-1, &(argv[1])); + if (objc < 3) { + result = "Missing parameters\n" + help_string(); + return COLVARSCRIPT_ERROR; + } + std::string const name(obj_to_str(objv[2])); + colvar *cv = cvm::colvar_by_name(name); + if (cv == NULL) { + result = "Colvar not found: " + name; + return COLVARSCRIPT_ERROR; + } + return proc_colvar(cv, objc-1, &(objv[1])); } if (cmd == "bias") { - return proc_bias(argc-1, &(argv[1])); + if (objc < 3) { + result = "Missing parameters\n" + help_string(); + return COLVARSCRIPT_ERROR; + } + std::string const name(obj_to_str(objv[2])); + colvarbias *b = cvm::bias_by_name(name); + if (b == NULL) { + result = "Bias not found: " + name; + return COLVARSCRIPT_ERROR; + } + return proc_bias(b, objc-1, &(objv[1])); } if (cmd == "version") { @@ -102,20 +125,20 @@ int colvarscript::run(int argc, char const *argv[]) { error_code |= colvars->calc(); error_code |= proxy->update_output(); if (error_code) { - result += "Error updating the colvars module.\n"; + result += "Error updating the Colvars module.\n"; } return error_code; } if (cmd == "list") { - if (argc == 2) { + if (objc == 2) { for (std::vector::iterator cvi = colvars->colvars.begin(); cvi != colvars->colvars.end(); ++cvi) { result += (cvi == colvars->colvars.begin() ? "" : " ") + (*cvi)->name; } return COLVARS_OK; - } else if (argc == 3 && !strcmp(argv[2], "biases")) { + } else if (objc == 3 && !strcmp(obj_to_str(objv[2]), "biases")) { for (std::vector::iterator bi = colvars->biases.begin(); bi != colvars->biases.end(); ++bi) { @@ -130,11 +153,11 @@ int colvarscript::run(int argc, char const *argv[]) { /// Parse config from file if (cmd == "configfile") { - if (argc < 3) { + if (objc < 3) { result = "Missing arguments\n" + help_string(); return COLVARSCRIPT_ERROR; } - if (colvars->read_config_file(argv[2]) == COLVARS_OK) { + if (colvars->read_config_file(obj_to_str(objv[2])) == COLVARS_OK) { return COLVARS_OK; } else { result = "Error parsing configuration file"; @@ -144,11 +167,11 @@ int colvarscript::run(int argc, char const *argv[]) { /// Parse config from string if (cmd == "config") { - if (argc < 3) { + if (objc < 3) { result = "Missing arguments\n" + help_string(); return COLVARSCRIPT_ERROR; } - std::string conf = argv[2]; + std::string const conf(obj_to_str(objv[2])); if (colvars->read_config_string(conf) == COLVARS_OK) { return COLVARS_OK; } else { @@ -159,11 +182,11 @@ int colvarscript::run(int argc, char const *argv[]) { /// Load an input state file if (cmd == "load") { - if (argc < 3) { + if (objc < 3) { result = "Missing arguments\n" + help_string(); return COLVARSCRIPT_ERROR; } - proxy->input_prefix() = argv[2]; + proxy->input_prefix() = obj_to_str(objv[2]); if (colvars->setup_input() == COLVARS_OK) { return COLVARS_OK; } else { @@ -174,11 +197,11 @@ int colvarscript::run(int argc, char const *argv[]) { /// Save to an output state file if (cmd == "save") { - if (argc < 3) { + if (objc < 3) { result = "Missing arguments"; return COLVARSCRIPT_ERROR; } - proxy->output_prefix_str = argv[2]; + proxy->output_prefix() = obj_to_str(objv[2]); int error = 0; error |= colvars->setup_output(); error |= colvars->write_output_files(); @@ -200,7 +223,7 @@ int colvarscript::run(int argc, char const *argv[]) { } if (cmd == "frame") { - if (argc == 2) { + if (objc == 2) { long int f; int error = proxy->get_frame(f); if (error == COLVARS_OK) { @@ -210,10 +233,10 @@ int colvarscript::run(int argc, char const *argv[]) { result = "Frame number is not available"; return COLVARSCRIPT_ERROR; } - } else if (argc == 3) { + } else if (objc == 3) { // Failure of this function does not trigger an error, but // returns nonzero, to let scripts detect available frames - int error = proxy->set_frame(strtol(argv[2], NULL, 10)); + int error = proxy->set_frame(strtol(obj_to_str(objv[2]), NULL, 10)); result = cvm::to_str(error == COLVARS_OK ? 0 : -1); return COLVARS_OK; } else { @@ -223,8 +246,8 @@ int colvarscript::run(int argc, char const *argv[]) { } if (cmd == "addenergy") { - if (argc == 3) { - colvars->total_bias_energy += strtod(argv[2], NULL); + if (objc == 3) { + colvars->total_bias_energy += strtod(obj_to_str(objv[2]), NULL); return COLVARS_OK; } else { result = "Wrong arguments to command \"addenergy\"\n" + help_string(); @@ -237,19 +260,9 @@ int colvarscript::run(int argc, char const *argv[]) { } -int colvarscript::proc_colvar(int argc, char const *argv[]) { - if (argc < 3) { - result = "Missing parameters\n" + help_string(); - return COLVARSCRIPT_ERROR; - } +int colvarscript::proc_colvar(colvar *cv, int objc, unsigned char *const objv[]) { - std::string name = argv[1]; - colvar *cv = cvm::colvar_by_name(name); - if (cv == NULL) { - result = "Colvar not found: " + name; - return COLVARSCRIPT_ERROR; - } - std::string subcmd = argv[2]; + std::string const subcmd(obj_to_str(objv[2])); if (subcmd == "value") { result = (cv->value()).to_simple_string(); @@ -278,11 +291,11 @@ int colvarscript::proc_colvar(int argc, char const *argv[]) { for (i = 0; i < cv->biases.size(); i++) { delete cv->biases[i]; } - cv->biases.resize(0); + cv->biases.clear(); // colvar destructor is tasked with the cleanup delete cv; // TODO this could be done by the destructors - colvars->write_traj_label(colvars->cv_traj_os); + colvars->write_traj_label(*(colvars->cv_traj_os)); return COLVARS_OK; } @@ -308,11 +321,11 @@ int colvarscript::proc_colvar(int argc, char const *argv[]) { } if (subcmd == "addforce") { - if (argc < 4) { + if (objc < 4) { result = "addforce: missing parameter: force value\n" + help_string(); return COLVARSCRIPT_ERROR; } - std::string f_str = argv[3]; + std::string const f_str(obj_to_str(objv[3])); std::istringstream is(f_str); is.width(cvm::cv_width); is.precision(cvm::cv_prec); @@ -328,11 +341,11 @@ int colvarscript::proc_colvar(int argc, char const *argv[]) { } if (subcmd == "cvcflags") { - if (argc < 4) { + if (objc < 4) { result = "cvcflags: missing parameter: vector of flags"; return COLVARSCRIPT_ERROR; } - std::string flags_str = argv[3]; + std::string const flags_str(obj_to_str(objv[3])); std::istringstream is(flags_str); std::vector flags; @@ -351,7 +364,7 @@ int colvarscript::proc_colvar(int argc, char const *argv[]) { } if ((subcmd == "get") || (subcmd == "set") || (subcmd == "state")) { - return proc_features(cv, argc, argv); + return proc_features(cv, objc, objv); } result = "Syntax error\n" + help_string(); @@ -359,20 +372,10 @@ int colvarscript::proc_colvar(int argc, char const *argv[]) { } -int colvarscript::proc_bias(int argc, char const *argv[]) { - if (argc < 3) { - result = "Missing parameters\n" + help_string(); - return COLVARSCRIPT_ERROR; - } - - std::string name = argv[1]; - colvarbias *b = cvm::bias_by_name(name); - if (b == NULL) { - result = "Bias not found: " + name; - return COLVARSCRIPT_ERROR; - } +int colvarscript::proc_bias(colvarbias *b, int objc, unsigned char *const objv[]) { - std::string subcmd = argv[2]; + std::string const key(obj_to_str(objv[0])); + std::string const subcmd(obj_to_str(objv[2])); if (subcmd == "energy") { result = cvm::to_str(b->get_energy()); @@ -422,16 +425,16 @@ int colvarscript::proc_bias(int argc, char const *argv[]) { // the bias destructor takes care of the cleanup at cvm level delete b; // TODO this could be done by the destructors - colvars->write_traj_label(colvars->cv_traj_os); + colvars->write_traj_label(*(colvars->cv_traj_os)); return COLVARS_OK; } if ((subcmd == "get") || (subcmd == "set") || (subcmd == "state")) { - return proc_features(b, argc, argv); + return proc_features(b, objc, objv); } - if (argc >= 4) { - std::string param = argv[3]; + if (objc >= 4) { + std::string const param(obj_to_str(objv[3])); if (subcmd == "count") { int index; if (!(std::istringstream(param) >> index)) { @@ -452,11 +455,11 @@ int colvarscript::proc_bias(int argc, char const *argv[]) { int colvarscript::proc_features(colvardeps *obj, - int argc, char const *argv[]) { + int objc, unsigned char *const objv[]) { // size was already checked before calling - std::string subcmd = argv[2]; + std::string const subcmd(obj_to_str(objv[2])); - if (argc == 3) { + if (objc == 3) { if (subcmd == "state") { // TODO make this returned as result? obj->print_state(); @@ -470,7 +473,7 @@ int colvarscript::proc_features(colvardeps *obj, if ((subcmd == "get") || (subcmd == "set")) { std::vector &features = obj->features(); - std::string const req_feature(argv[3]); + std::string const req_feature(obj_to_str(objv[3])); colvardeps::feature *f = NULL; int fid = 0; for (fid = 0; fid < int(features.size()); fid++) { @@ -499,9 +502,9 @@ int colvarscript::proc_features(colvardeps *obj, } if (subcmd == "set") { - if (argc == 5) { + if (objc == 5) { std::string const yesno = - colvarparse::to_lower_cppstr(std::string(argv[4])); + colvarparse::to_lower_cppstr(std::string(obj_to_str(objv[4]))); if ((yesno == std::string("yes")) || (yesno == std::string("on")) || (yesno == std::string("1"))) { @@ -510,10 +513,7 @@ int colvarscript::proc_features(colvardeps *obj, } else if ((yesno == std::string("no")) || (yesno == std::string("off")) || (yesno == std::string("0"))) { - // TODO disable() function does not exist yet, - // dependencies will not be resolved - // obj->disable(fid); - obj->set_enabled(fid, false); + obj->disable(fid); return COLVARS_OK; } } @@ -533,11 +533,11 @@ std::string colvarscript::help_string() std::string buf; buf = "Usage: cv [args...]\n\ \n\ -Managing the colvars module:\n\ +Managing the Colvars module:\n\ configfile -- read configuration from a file\n\ config -- read configuration from the given string\n\ reset -- delete all internal configuration\n\ - delete -- delete this colvars module instance\n\ + delete -- delete this Colvars module instance\n\ version -- return version of colvars code\n\ \n\ Input and output:\n\ diff --git a/lib/colvars/colvarscript.h b/lib/colvars/colvarscript.h index 46b1ddd203..94d451809c 100644 --- a/lib/colvars/colvarscript.h +++ b/lib/colvars/colvarscript.h @@ -41,22 +41,30 @@ public: /// If an error is returned by one of the methods, it should set this to the error message std::string result; - /// Run script command with given positional arguments - int run(int argc, char const *argv[]); + /// Run script command with given positional arguments (objects) + int run(int objc, unsigned char *const objv[]); private: /// Run subcommands on colvar - int proc_colvar(int argc, char const *argv[]); + int proc_colvar(colvar *cv, int argc, unsigned char *const argv[]); /// Run subcommands on bias - int proc_bias(int argc, char const *argv[]); + int proc_bias(colvarbias *b, int argc, unsigned char *const argv[]); /// Run subcommands on base colvardeps object (colvar, bias, ...) int proc_features(colvardeps *obj, - int argc, char const *argv[]); + int argc, unsigned char *const argv[]); - /// Builds and return a short help + /// Build and return a short help std::string help_string(void); + +public: + + inline char const *obj_to_str(unsigned char *const obj) + { + return cvm::proxy->script_obj_to_str(obj); + } + }; diff --git a/lib/colvars/colvartypes.h b/lib/colvars/colvartypes.h index e0cebb83bc..17c09a5095 100644 --- a/lib/colvars/colvartypes.h +++ b/lib/colvars/colvartypes.h @@ -91,6 +91,11 @@ public: data.resize(n); } + inline void clear() + { + data.clear(); + } + inline T & operator [] (size_t const i) { return data[i]; } diff --git a/lib/colvars/colvarvalue.cpp b/lib/colvars/colvarvalue.cpp index deccc6b7e0..7b498be6d6 100644 --- a/lib/colvars/colvarvalue.cpp +++ b/lib/colvars/colvarvalue.cpp @@ -16,6 +16,274 @@ +std::string const colvarvalue::type_desc(Type t) +{ + switch (t) { + case colvarvalue::type_scalar: + return "scalar number"; break; + case colvarvalue::type_3vector: + return "3-dimensional vector"; break; + case colvarvalue::type_unit3vector: + return "3-dimensional unit vector"; break; + case colvarvalue::type_unit3vectorderiv: + return "derivative of a 3-dimensional unit vector"; break; + case colvarvalue::type_quaternion: + return "4-dimensional unit quaternion"; break; + case colvarvalue::type_quaternionderiv: + return "4-dimensional tangent vector"; break; + case colvarvalue::type_vector: + return "n-dimensional vector"; break; + case colvarvalue::type_notset: + // fallthrough + default: + return "not set"; break; + } +} + + +std::string const colvarvalue::type_keyword(Type t) +{ + switch (t) { + case colvarvalue::type_notset: + default: + return "not_set"; break; + case colvarvalue::type_scalar: + return "scalar"; break; + case colvarvalue::type_3vector: + return "vector3"; break; + case colvarvalue::type_unit3vector: + return "unit_vector3"; break; + case colvarvalue::type_unit3vectorderiv: + return ""; break; + case colvarvalue::type_quaternion: + return "unit_quaternion"; break; + case colvarvalue::type_quaternionderiv: + return ""; break; + case colvarvalue::type_vector: + return "vector"; break; + } +} + + +size_t colvarvalue::num_df(Type t) +{ + switch (t) { + case colvarvalue::type_notset: + default: + return 0; break; + case colvarvalue::type_scalar: + return 1; break; + case colvarvalue::type_3vector: + return 3; break; + case colvarvalue::type_unit3vector: + case colvarvalue::type_unit3vectorderiv: + return 2; break; + case colvarvalue::type_quaternion: + case colvarvalue::type_quaternionderiv: + return 3; break; + case colvarvalue::type_vector: + // the size of a vector is unknown without its object + return 0; break; + } +} + + +size_t colvarvalue::num_dimensions(Type t) +{ + switch (t) { + case colvarvalue::type_notset: + default: + return 0; break; + case colvarvalue::type_scalar: + return 1; break; + case colvarvalue::type_3vector: + case colvarvalue::type_unit3vector: + case colvarvalue::type_unit3vectorderiv: + return 3; break; + case colvarvalue::type_quaternion: + case colvarvalue::type_quaternionderiv: + return 4; break; + case colvarvalue::type_vector: + // the size of a vector is unknown without its object + return 0; break; + } +} + + +void colvarvalue::reset() +{ + switch (value_type) { + case colvarvalue::type_scalar: + real_value = 0.0; + break; + case colvarvalue::type_3vector: + case colvarvalue::type_unit3vector: + case colvarvalue::type_unit3vectorderiv: + rvector_value.reset(); + break; + case colvarvalue::type_quaternion: + case colvarvalue::type_quaternionderiv: + quaternion_value.reset(); + break; + case colvarvalue::type_vector: + vector1d_value.reset(); + break; + case colvarvalue::type_notset: + default: + break; + } +} + + +void colvarvalue::apply_constraints() +{ + switch (value_type) { + case colvarvalue::type_scalar: + case colvarvalue::type_3vector: + case colvarvalue::type_unit3vectorderiv: + case colvarvalue::type_quaternionderiv: + break; + case colvarvalue::type_unit3vector: + rvector_value /= std::sqrt(rvector_value.norm2()); + break; + case colvarvalue::type_quaternion: + quaternion_value /= std::sqrt(quaternion_value.norm2()); + break; + case colvarvalue::type_vector: + if (elem_types.size() > 0) { + // if we have information about non-scalar types, use it + size_t i; + for (i = 0; i < elem_types.size(); i++) { + if (elem_sizes[i] == 1) continue; // TODO this can be optimized further + colvarvalue cvtmp(vector1d_value.slice(elem_indices[i], + elem_indices[i] + elem_sizes[i]), elem_types[i]); + cvtmp.apply_constraints(); + set_elem(i, cvtmp); + } + } + break; + case colvarvalue::type_notset: + default: + break; + } +} + + +void colvarvalue::type(Type const &vti) +{ + if (vti != value_type) { + // reset the value based on the previous type + reset(); + if ((value_type == type_vector) && (vti != type_vector)) { + vector1d_value.clear(); + } + value_type = vti; + } +} + + +void colvarvalue::type(colvarvalue const &x) +{ + if (x.type() != value_type) { + // reset the value based on the previous type + reset(); + if (value_type == type_vector) { + vector1d_value.clear(); + } + value_type = x.type(); + } + + if (x.type() == type_vector) { + vector1d_value.resize(x.vector1d_value.size()); + } +} + + +void colvarvalue::is_derivative() +{ + switch (value_type) { + case colvarvalue::type_scalar: + case colvarvalue::type_3vector: + case colvarvalue::type_unit3vectorderiv: + case colvarvalue::type_quaternionderiv: + break; + case colvarvalue::type_unit3vector: + type(colvarvalue::type_unit3vectorderiv); + break; + case colvarvalue::type_quaternion: + type(colvarvalue::type_quaternionderiv); + break; + case colvarvalue::type_vector: + // TODO + break; + case colvarvalue::type_notset: + default: + break; + } +} + + +colvarvalue::colvarvalue(colvarvalue const &x) + : value_type(x.type()) +{ + switch (x.type()) { + case type_scalar: + real_value = x.real_value; + break; + case type_3vector: + case type_unit3vector: + case type_unit3vectorderiv: + rvector_value = x.rvector_value; + break; + case type_quaternion: + case type_quaternionderiv: + quaternion_value = x.quaternion_value; + break; + case type_vector: + vector1d_value = x.vector1d_value; + elem_types = x.elem_types; + elem_indices = x.elem_indices; + elem_sizes = x.elem_sizes; + case type_notset: + default: + break; + } +} + + +colvarvalue::colvarvalue(cvm::vector1d const &v, Type vti) +{ + if ((vti != type_vector) && (v.size() != num_dimensions(vti))) { + cvm::error("Error: trying to initialize a variable of type \""+type_desc(vti)+ + "\" using a vector of size "+cvm::to_str(v.size())+ + ".\n"); + value_type = type_notset; + } else { + value_type = vti; + switch (vti) { + case type_scalar: + real_value = v[0]; + break; + case type_3vector: + case type_unit3vector: + case type_unit3vectorderiv: + rvector_value = cvm::rvector(v); + break; + case type_quaternion: + case type_quaternionderiv: + quaternion_value = cvm::quaternion(v); + break; + case type_vector: + vector1d_value = v; + break; + case type_notset: + default: + break; + } + } +} + + void colvarvalue::add_elem(colvarvalue const &x) { if (this->value_type != type_vector) { @@ -111,6 +379,13 @@ void colvarvalue::set_random() } +void colvarvalue::undef_op() const +{ + cvm::error("Error: Undefined operation on a colvar of type \""+ + type_desc(this->type())+"\".\n"); +} + + // binary operations between two colvarvalues colvarvalue operator + (colvarvalue const &x1, diff --git a/lib/colvars/colvarvalue.h b/lib/colvars/colvarvalue.h index e369feefcd..fce0e1a970 100644 --- a/lib/colvars/colvarvalue.h +++ b/lib/colvars/colvarvalue.h @@ -169,38 +169,14 @@ public: } /// Set the type explicitly - inline void type(Type const &vti) - { - if (vti != value_type) { - // reset the value based on the previous type - reset(); - if ((value_type == type_vector) && (vti != type_vector)) { - vector1d_value.resize(0); - } - value_type = vti; - } - } + void type(Type const &vti); /// Set the type after another \link colvarvalue \endlink - inline void type(colvarvalue const &x) - { - if (x.type() != value_type) { - // reset the value based on the previous type - reset(); - if (value_type == type_vector) { - vector1d_value.resize(0); - } - value_type = x.type(); - } - - if (x.type() == type_vector) { - vector1d_value.resize(x.vector1d_value.size()); - } - } + void type(colvarvalue const &x); /// Make the type a derivative of the original type /// (so that its constraints do not apply) - inline void is_derivative(); + void is_derivative(); /// Square norm of this colvarvalue cvm::real norm2() const; @@ -303,28 +279,10 @@ public: void set_elem(int const icv, colvarvalue const &x); /// Get a scalar number out of an element of the vector - inline cvm::real operator [] (int const i) const - { - if (vector1d_value.size() > 0) { - return vector1d_value[i]; - } else { - cvm::error("Error: trying to use as a vector a variable that is not initialized as such.\n"); - return 0.0; - } - } + cvm::real operator [] (int const i) const; /// Use an element of the vector as a scalar number - inline cvm::real & operator [] (int const i) - { - if (vector1d_value.size() > 0) { - return vector1d_value[i]; - } else { - cvm::error("Error: trying to use as a vector a variable that is not initialized as such.\n"); - real_value = 0.0; - return real_value; - } - } - + cvm::real & operator [] (int const i); /// Ensure that the two types are the same within a binary operator int static check_types(colvarvalue const &x1, colvarvalue const &x2); @@ -389,178 +347,69 @@ public: }; - -inline std::string const colvarvalue::type_desc(Type t) -{ - switch (t) { - case colvarvalue::type_scalar: - return "scalar number"; break; - case colvarvalue::type_3vector: - return "3-dimensional vector"; break; - case colvarvalue::type_unit3vector: - return "3-dimensional unit vector"; break; - case colvarvalue::type_unit3vectorderiv: - return "derivative of a 3-dimensional unit vector"; break; - case colvarvalue::type_quaternion: - return "4-dimensional unit quaternion"; break; - case colvarvalue::type_quaternionderiv: - return "4-dimensional tangent vector"; break; - case colvarvalue::type_vector: - return "n-dimensional vector"; break; - case colvarvalue::type_notset: - // fallthrough - default: - return "not set"; break; - } -} - - -inline std::string const colvarvalue::type_keyword(Type t) -{ - switch (t) { - case colvarvalue::type_notset: - default: - return "not_set"; break; - case colvarvalue::type_scalar: - return "scalar"; break; - case colvarvalue::type_3vector: - return "vector3"; break; - case colvarvalue::type_unit3vector: - return "unit_vector3"; break; - case colvarvalue::type_unit3vectorderiv: - return ""; break; - case colvarvalue::type_quaternion: - return "unit_quaternion"; break; - case colvarvalue::type_quaternionderiv: - return ""; break; - case colvarvalue::type_vector: - return "vector"; break; - } -} - - -inline size_t colvarvalue::num_df(Type t) +inline size_t colvarvalue::size() const { - switch (t) { + switch (value_type) { case colvarvalue::type_notset: default: return 0; break; case colvarvalue::type_scalar: return 1; break; case colvarvalue::type_3vector: - return 3; break; case colvarvalue::type_unit3vector: case colvarvalue::type_unit3vectorderiv: - return 2; break; + return 3; break; case colvarvalue::type_quaternion: case colvarvalue::type_quaternionderiv: - return 3; break; + return 4; break; case colvarvalue::type_vector: - // the size of a vector is unknown without its object - return 0; break; + return vector1d_value.size(); break; } } -inline size_t colvarvalue::num_dimensions(Type t) +inline cvm::real colvarvalue::operator [] (int const i) const { - switch (t) { + switch (value_type) { case colvarvalue::type_notset: default: - return 0; break; + cvm::error("Error: trying to access a colvar value " + "that is not initialized.\n", BUG_ERROR); + return 0.0; break; case colvarvalue::type_scalar: - return 1; break; + return real_value; break; case colvarvalue::type_3vector: case colvarvalue::type_unit3vector: case colvarvalue::type_unit3vectorderiv: - return 3; break; + return rvector_value[i]; break; case colvarvalue::type_quaternion: case colvarvalue::type_quaternionderiv: - return 4; break; + return quaternion_value[i]; break; case colvarvalue::type_vector: - // the size of a vector is unknown without its object - return 0; break; + return vector1d_value[i]; break; } } -inline size_t colvarvalue::size() const +inline cvm::real & colvarvalue::operator [] (int const i) { switch (value_type) { case colvarvalue::type_notset: default: - return 0; break; + cvm::error("Error: trying to access a colvar value " + "that is not initialized.\n", BUG_ERROR); + return real_value; break; case colvarvalue::type_scalar: - return 1; break; + return real_value; break; case colvarvalue::type_3vector: case colvarvalue::type_unit3vector: case colvarvalue::type_unit3vectorderiv: - return 3; break; + return rvector_value[i]; break; case colvarvalue::type_quaternion: case colvarvalue::type_quaternionderiv: - return 4; break; + return quaternion_value[i]; break; case colvarvalue::type_vector: - return vector1d_value.size(); break; - } -} - - -inline colvarvalue::colvarvalue(colvarvalue const &x) - : value_type(x.type()) -{ - switch (x.type()) { - case type_scalar: - real_value = x.real_value; - break; - case type_3vector: - case type_unit3vector: - case type_unit3vectorderiv: - rvector_value = x.rvector_value; - break; - case type_quaternion: - case type_quaternionderiv: - quaternion_value = x.quaternion_value; - break; - case type_vector: - vector1d_value = x.vector1d_value; - elem_types = x.elem_types; - elem_indices = x.elem_indices; - elem_sizes = x.elem_sizes; - case type_notset: - default: - break; - } -} - -inline colvarvalue::colvarvalue(cvm::vector1d const &v, Type vti) -{ - if ((vti != type_vector) && (v.size() != num_dimensions(vti))) { - cvm::error("Error: trying to initialize a variable of type \""+type_desc(vti)+ - "\" using a vector of size "+cvm::to_str(v.size())+ - ".\n"); - value_type = type_notset; - } else { - value_type = vti; - switch (vti) { - case type_scalar: - real_value = v[0]; - break; - case type_3vector: - case type_unit3vector: - case type_unit3vectorderiv: - rvector_value = cvm::rvector(v); - break; - case type_quaternion: - case type_quaternionderiv: - quaternion_value = cvm::quaternion(v); - break; - case type_vector: - vector1d_value = v; - break; - case type_notset: - default: - break; - } + return vector1d_value[i]; break; } } @@ -638,13 +487,6 @@ inline int colvarvalue::check_types_assign(colvarvalue::Type const &vt1, } -inline void colvarvalue::undef_op() const -{ - cvm::error("Error: Undefined operation on a colvar of type \""+ - type_desc(this->type())+"\".\n"); -} - - inline colvarvalue & colvarvalue::operator = (colvarvalue const &x) { check_types_assign(this->type(), x.type()); @@ -704,6 +546,7 @@ inline void colvarvalue::operator += (colvarvalue const &x) } } + inline void colvarvalue::operator -= (colvarvalue const &x) { colvarvalue::check_types(*this, x); @@ -802,89 +645,6 @@ inline cvm::vector1d const colvarvalue::as_vector() const } -inline void colvarvalue::reset() -{ - switch (value_type) { - case colvarvalue::type_scalar: - real_value = 0.0; - break; - case colvarvalue::type_3vector: - case colvarvalue::type_unit3vector: - case colvarvalue::type_unit3vectorderiv: - rvector_value.reset(); - break; - case colvarvalue::type_quaternion: - case colvarvalue::type_quaternionderiv: - quaternion_value.reset(); - break; - case colvarvalue::type_vector: - vector1d_value.reset(); - break; - case colvarvalue::type_notset: - default: - break; - } -} - - -inline void colvarvalue::apply_constraints() -{ - switch (value_type) { - case colvarvalue::type_scalar: - case colvarvalue::type_3vector: - case colvarvalue::type_unit3vectorderiv: - case colvarvalue::type_quaternionderiv: - break; - case colvarvalue::type_unit3vector: - rvector_value /= std::sqrt(rvector_value.norm2()); - break; - case colvarvalue::type_quaternion: - quaternion_value /= std::sqrt(quaternion_value.norm2()); - break; - case colvarvalue::type_vector: - if (elem_types.size() > 0) { - // if we have information about non-scalar types, use it - size_t i; - for (i = 0; i < elem_types.size(); i++) { - if (elem_sizes[i] == 1) continue; // TODO this can be optimized further - colvarvalue cvtmp(vector1d_value.slice(elem_indices[i], - elem_indices[i] + elem_sizes[i]), elem_types[i]); - cvtmp.apply_constraints(); - set_elem(i, cvtmp); - } - } - break; - case colvarvalue::type_notset: - default: - break; - } -} - - -inline void colvarvalue::is_derivative() -{ - switch (value_type) { - case colvarvalue::type_scalar: - case colvarvalue::type_3vector: - case colvarvalue::type_unit3vectorderiv: - case colvarvalue::type_quaternionderiv: - break; - case colvarvalue::type_unit3vector: - type(colvarvalue::type_unit3vectorderiv); - break; - case colvarvalue::type_quaternion: - type(colvarvalue::type_quaternionderiv); - break; - case colvarvalue::type_vector: - // TODO - break; - case colvarvalue::type_notset: - default: - break; - } -} - - inline cvm::real colvarvalue::norm2() const { switch (value_type) { diff --git a/src/USER-COLVARS/colvarproxy_lammps.cpp b/src/USER-COLVARS/colvarproxy_lammps.cpp index 89453ded9b..17dff30567 100644 --- a/src/USER-COLVARS/colvarproxy_lammps.cpp +++ b/src/USER-COLVARS/colvarproxy_lammps.cpp @@ -308,10 +308,6 @@ void colvarproxy_lammps::error(std::string const &message) void colvarproxy_lammps::fatal_error(std::string const &message) { log(message); - // if (!cvm::debug()) - // log("If this error message is unclear, try recompiling the " - // "colvars library and LAMMPS with -DCOLVARS_DEBUG.\n"); - _lmp->error->one(FLERR, "Fatal error in the collective variables module.\n"); } diff --git a/src/USER-COLVARS/colvarproxy_lammps.h b/src/USER-COLVARS/colvarproxy_lammps.h index ad63eb2f9e..6cdf0edfe8 100644 --- a/src/USER-COLVARS/colvarproxy_lammps.h +++ b/src/USER-COLVARS/colvarproxy_lammps.h @@ -7,10 +7,11 @@ // If you wish to distribute your changes, please submit them to the // Colvars repository at GitHub. - #ifndef COLVARPROXY_LAMMPS_H #define COLVARPROXY_LAMMPS_H +#include "colvarproxy_lammps_version.h" + #include "colvarmodule.h" #include "colvarproxy.h" #include "colvarvalue.h" @@ -28,10 +29,6 @@ #include #endif -#ifndef COLVARPROXY_VERSION -#define COLVARPROXY_VERSION "2017-01-09" -#endif - /* struct for packed data communication of coordinates and forces. */ struct commdata { int tag,type; diff --git a/src/USER-COLVARS/colvarproxy_lammps_version.h b/src/USER-COLVARS/colvarproxy_lammps_version.h new file mode 100644 index 0000000000..834bd1748a --- /dev/null +++ b/src/USER-COLVARS/colvarproxy_lammps_version.h @@ -0,0 +1,10 @@ +#ifndef COLVARPROXY_VERSION +#define COLVARPROXY_VERSION "2017-07-15" +// This file is part of the Collective Variables module (Colvars). +// The original version of Colvars and its updates are located at: +// https://github.com/colvars/colvars +// Please update all Colvars source files before making any changes. +// If you wish to distribute your changes, please submit them to the +// Colvars repository at GitHub. + +#endif -- GitLab From 355aad96916697277b1b4adbfc293d6093021b0b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 19 Jul 2017 17:19:44 -0400 Subject: [PATCH 511/593] restore python3 support. this now can run with python 2.7.13 and 3.5.3. --- lib/kim/Install.py | 45 +++++++++++++-------------------------------- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/lib/kim/Install.py b/lib/kim/Install.py index cb089e41e2..1405cc5fad 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -87,14 +87,15 @@ url = "https://s3.openkim.org/kim-api/%s.tgz" % version if buildflag: # set install directory + dir = os.path.join(os.path.abspath(dir), "installed-" + version) - # check to see if an installed kim-api already exists + # check to see if an installed kim-api already exists and wipe it out. if os.path.isdir(dir): - print("kim-api is already installed at %s" % dir) - print("Must remove this directory in order to resintall at this location") - sys.exit() + print("kim-api is already installed at %s.\nRemoving it for re-install" % dir) + cmd = "rm -rf %s" % dir + subprocess.check_output(cmd,shell=True) # configure LAMMPS to use kim-api to be installed @@ -110,19 +111,9 @@ if buildflag: print("Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir)) # download entire kim-api tarball - # try first via urllib - # if fails (probably due to no SSL support), use wget print("Downloading kim-api tarball ...") - - try: geturl(url,"%s/%s.tgz" % (thisdir,version)) - except: - cmd = "wget %s %s/%s.tgz" % (url,thisdir,version) - subprocess.check_output(cmd,shell=True) - if not os.path.isfile("%s/%s.tgz" % (thisdir,version)): - print("Both urllib and wget command failed to download") - sys.exit() - + geturl(url,"%s/%s.tgz" % (thisdir,version)) print("Unpacking kim-api tarball ...") cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (thisdir,version,version) subprocess.check_output(cmd,shell=True) @@ -182,17 +173,8 @@ if addflag: # if fails (probably due to no SSL support), use wget print("Downloading item tarball ...") - url = "https://openkim.org/download/%s.tgz" % addmodelname - - try: geturl(url,"%s/%s.tgz" % (thisdir,addmodelname)) - except: - cmd = "wget %s %s/%s.tgz" % (url,thisdir,addmodelname) - txt = subprocess.check_output(cmd,shell=True) - print(txt[1]) - if not os.path.isfile("%s/%s.tgz" % (thisdir,addmodelname)): - print("Both urllib.urlretrieve() and wget command failed to download") - sys.exit() + geturl(url,"%s/%s.tgz" % (thisdir,addmodelname)) print("Unpacking item tarball ...") cmd = "cd %s; tar zxvf %s.tgz" % (thisdir,addmodelname) @@ -205,19 +187,19 @@ if addflag: except subprocess.CalledProcessError as e: # Error: but first, check to see if it needs a driver - - firstRunOutput = e.output + firstRunOutput = e.output.decode() cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + txt = txt.decode().strip() if txt == "ParameterizedModel": # Get and install driver cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) - adddrivername = txt - print("First Installing model driver: %s" % adddrivername) + adddrivername = txt.decode().strip() + print("First installing model driver: %s" % adddrivername) cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) try: txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) @@ -225,17 +207,16 @@ if addflag: print(e.output) sys.exit() - print(txt) - # now install the model that needed the driver + print("Now installing model : %s" % addmodelname) cmd = "cd %s; python Install.py -a %s" % (thisdir,addmodelname) try: txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) except subprocess.CalledProcessError as e: print(e.output) sys.exit() - print(txt) + print(txt.decode()) sys.exit() else: print(firstRunOutput) -- GitLab From 187a80be7738b37c3c398d9274a23ade00cf9661 Mon Sep 17 00:00:00 2001 From: Giacomo Fiorin Date: Wed, 19 Jul 2017 22:21:49 -0400 Subject: [PATCH 512/593] Add forgotten decode() in Install.py --- lib/colvars/Install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/colvars/Install.py b/lib/colvars/Install.py index a367b8eeed..5b6b15dc3b 100644 --- a/lib/colvars/Install.py +++ b/lib/colvars/Install.py @@ -126,9 +126,9 @@ fp.close() print("Building lib%s.a ..." % lib) cmd = ["make -f Makefile.auto clean"] -print(subprocess.check_output(cmd, shell=True)) +print(subprocess.check_output(cmd, shell=True).decode()) cmd = ["make -f Makefile.auto -j12"] -print(subprocess.check_output(cmd, shell=True)) +print(subprocess.check_output(cmd, shell=True).decode()) if os.path.exists("lib%s.a" % lib): print("Build was successful") else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -- GitLab From ef9fb944c7272915b82832f4ac60749e5e0d96a6 Mon Sep 17 00:00:00 2001 From: Giacomo Fiorin Date: Thu, 20 Jul 2017 10:52:24 -0400 Subject: [PATCH 513/593] Detect number of processors for make --- lib/colvars/Install.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/colvars/Install.py b/lib/colvars/Install.py index 5b6b15dc3b..af658fa26c 100644 --- a/lib/colvars/Install.py +++ b/lib/colvars/Install.py @@ -124,10 +124,16 @@ fp.close() # make the library via Makefile.auto +try: + import multiprocessing + n_cpus = multiprocessing.cpu_count() +except: + n_cpus = 1 + print("Building lib%s.a ..." % lib) cmd = ["make -f Makefile.auto clean"] print(subprocess.check_output(cmd, shell=True).decode()) -cmd = ["make -f Makefile.auto -j12"] +cmd = ["make -f Makefile.auto -j%d" % n_cpus] print(subprocess.check_output(cmd, shell=True).decode()) if os.path.exists("lib%s.a" % lib): print("Build was successful") -- GitLab From 8499e72cdc91684549d77f4e154103a2df33af61 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 20 Jul 2017 12:11:46 -0400 Subject: [PATCH 514/593] updates to USER-REAXC code in USER-OMP from Chris Knight. addresses issues with multiple threads in use --- src/USER-OMP/reaxc_bonds_omp.cpp | 2 +- src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp | 8 -------- src/USER-OMP/reaxc_multi_body_omp.cpp | 9 --------- src/USER-OMP/reaxc_nonbonded_omp.cpp | 9 --------- src/USER-OMP/reaxc_torsion_angles_omp.cpp | 5 ----- src/USER-OMP/reaxc_valence_angles_omp.cpp | 9 --------- 6 files changed, 1 insertion(+), 41 deletions(-) diff --git a/src/USER-OMP/reaxc_bonds_omp.cpp b/src/USER-OMP/reaxc_bonds_omp.cpp index d079db6674..2b7ab7e5e8 100644 --- a/src/USER-OMP/reaxc_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_bonds_omp.cpp @@ -86,7 +86,7 @@ void BondsOMP( reax_system *system, control_params *control, class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, natoms, + system->pair_ptr->vflag_either, system->N, system->pair_ptr->eatom, system->pair_ptr->vatom, thr); #if defined(_OPENMP) diff --git a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp index be1444824b..c6486ae8e6 100644 --- a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp @@ -102,11 +102,6 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control, class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, - natoms, system->pair_ptr->eatom, - system->pair_ptr->vatom, thr); - /* loops below discover the Hydrogen bonds between i-j-k triplets. here j is H atom and there has to be some bond between i and j. Hydrogen bond is between j and k. @@ -242,9 +237,6 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control, { data->my_en.e_hb += e_hb_thr; } - - pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, thr); } #ifdef OMP_TIMING diff --git a/src/USER-OMP/reaxc_multi_body_omp.cpp b/src/USER-OMP/reaxc_multi_body_omp.cpp index 13d250750b..27779f8e85 100644 --- a/src/USER-OMP/reaxc_multi_body_omp.cpp +++ b/src/USER-OMP/reaxc_multi_body_omp.cpp @@ -59,7 +59,6 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, const double p_ovun7 = system->reax_param.gp.l[8]; const double p_ovun8 = system->reax_param.gp.l[9]; - const int natoms = system->n; reax_list *bonds = (*lists) + BONDS; double total_Elp = 0.0; @@ -99,10 +98,6 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, pair_reax_ptr = static_cast(system->pair_ptr); class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, natoms, - system->pair_ptr->eatom, system->pair_ptr->vatom, thr); - #if defined(_OPENMP) #pragma omp for schedule(guided) #endif @@ -280,10 +275,6 @@ void Atom_EnergyOMP( reax_system *system, control_params *control, (workspace->Delta[j] - dfvl*workspace->Delta_lp_temp[j]); // UnCoor-2b } } - - pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, thr); - } data->my_en.e_lp += total_Elp; diff --git a/src/USER-OMP/reaxc_nonbonded_omp.cpp b/src/USER-OMP/reaxc_nonbonded_omp.cpp index 0c595e07df..d131195ca0 100644 --- a/src/USER-OMP/reaxc_nonbonded_omp.cpp +++ b/src/USER-OMP/reaxc_nonbonded_omp.cpp @@ -87,10 +87,6 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control, pair_reax_ptr = static_cast(system->pair_ptr); class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, - natoms, system->pair_ptr->eatom, - system->pair_ptr->vatom, thr); e_core = 0; e_vdW = 0; e_lg = 0; @@ -291,11 +287,6 @@ void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *contro pair_reax_ptr = static_cast(system->pair_ptr); class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, - natoms, system->pair_ptr->eatom, - system->pair_ptr->vatom, thr); - #if defined(_OPENMP) #pragma omp for schedule(guided) #endif diff --git a/src/USER-OMP/reaxc_torsion_angles_omp.cpp b/src/USER-OMP/reaxc_torsion_angles_omp.cpp index b6920c6709..4227f62763 100644 --- a/src/USER-OMP/reaxc_torsion_angles_omp.cpp +++ b/src/USER-OMP/reaxc_torsion_angles_omp.cpp @@ -124,11 +124,6 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control, pair_reax_ptr = static_cast(system->pair_ptr); class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, - system->N, system->pair_ptr->eatom, - system->pair_ptr->vatom, thr); - #if defined(_OPENMP) #pragma omp for schedule(static) #endif diff --git a/src/USER-OMP/reaxc_valence_angles_omp.cpp b/src/USER-OMP/reaxc_valence_angles_omp.cpp index 888eeab4a1..6c15a529d3 100644 --- a/src/USER-OMP/reaxc_valence_angles_omp.cpp +++ b/src/USER-OMP/reaxc_valence_angles_omp.cpp @@ -173,12 +173,6 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, pair_reax_ptr = static_cast(system->pair_ptr); class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); - pair_reax_ptr->ev_setup_thr_proxy(system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, - system->N, system->pair_ptr->eatom, - system->pair_ptr->vatom, thr); - - // Run through a minimal for(jnum_intrs / nthreads; @@ -600,9 +594,6 @@ void Valence_AnglesOMP( reax_system *system, control_params *control, Set_End_Index(pi, my_offset, thb_intrs ); } // for(pi) } // for(j) - - pair_reax_ptr->reduce_thr_proxy(system->pair_ptr, system->pair_ptr->eflag_either, - system->pair_ptr->vflag_either, thr); } // end omp parallel data->my_en.e_ang = total_Eang; -- GitLab From a351977c59040745d5fcd1658441a1316ad37c8e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 12:55:55 -0400 Subject: [PATCH 515/593] update manual links that got broken when removing and renumbering a section --- doc/src/Manual.txt | 1 - doc/src/Section_accelerate.txt | 10 +- doc/src/Section_errors.txt | 2 +- doc/src/Section_howto.txt | 10 +- doc/src/Section_packages.txt | 30 +- doc/src/Section_python.txt | 6 +- doc/src/Section_start.txt | 12 +- doc/src/accelerate_gpu.txt | 10 +- doc/src/accelerate_intel.txt | 10 +- doc/src/accelerate_kokkos.txt | 24 +- doc/src/accelerate_omp.txt | 6 +- doc/src/accelerate_opt.txt | 4 +- doc/src/angle_charmm.txt | 2 +- doc/src/angle_class2.txt | 2 +- doc/src/angle_cosine.txt | 2 +- doc/src/angle_cosine_delta.txt | 2 +- doc/src/angle_cosine_periodic.txt | 2 +- doc/src/angle_cosine_shift.txt | 2 +- doc/src/angle_cosine_shift_exp.txt | 2 +- doc/src/angle_cosine_squared.txt | 2 +- doc/src/angle_fourier.txt | 2 +- doc/src/angle_fourier_simple.txt | 2 +- doc/src/angle_harmonic.txt | 2 +- doc/src/angle_quartic.txt | 2 +- doc/src/angle_table.txt | 2 +- doc/src/balance.txt | 2 +- doc/src/bond_class2.txt | 2 +- doc/src/bond_fene.txt | 2 +- doc/src/bond_fene_expand.txt | 2 +- doc/src/bond_harmonic.txt | 2 +- doc/src/bond_harmonic_shift.txt | 2 +- doc/src/bond_harmonic_shift_cut.txt | 2 +- doc/src/bond_morse.txt | 2 +- doc/src/bond_nonlinear.txt | 2 +- doc/src/bond_quartic.txt | 2 +- doc/src/bond_table.txt | 2 +- doc/src/compute_pressure.txt | 2 +- doc/src/compute_temp.txt | 2 +- doc/src/compute_temp_partial.txt | 2 +- doc/src/dihedral_charmm.txt | 2 +- doc/src/dihedral_class2.txt | 2 +- doc/src/dihedral_cosine_shift_exp.txt | 2 +- doc/src/dihedral_fourier.txt | 2 +- doc/src/dihedral_harmonic.txt | 2 +- doc/src/dihedral_helix.txt | 2 +- doc/src/dihedral_multi_harmonic.txt | 2 +- doc/src/dihedral_nharmonic.txt | 2 +- doc/src/dihedral_opls.txt | 2 +- doc/src/dihedral_quadratic.txt | 2 +- doc/src/echo.txt | 2 +- doc/src/fix_addforce.txt | 2 +- doc/src/fix_aveforce.txt | 2 +- doc/src/fix_deform.txt | 2 +- doc/src/fix_enforce2d.txt | 2 +- doc/src/fix_freeze.txt | 2 +- doc/src/fix_gravity.txt | 2 +- doc/src/fix_langevin.txt | 2 +- doc/src/fix_momentum.txt | 2 +- doc/src/fix_nh.txt | 2 +- doc/src/fix_nph_asphere.txt | 2 +- doc/src/fix_nph_body.txt | 2 +- doc/src/fix_nph_sphere.txt | 2 +- doc/src/fix_nphug.txt | 2 +- doc/src/fix_npt_asphere.txt | 2 +- doc/src/fix_npt_body.txt | 2 +- doc/src/fix_npt_sphere.txt | 2 +- doc/src/fix_nve.txt | 2 +- doc/src/fix_nve_asphere.txt | 2 +- doc/src/fix_nve_sphere.txt | 2 +- doc/src/fix_nvt_asphere.txt | 2 +- doc/src/fix_nvt_body.txt | 2 +- doc/src/fix_nvt_sllod.txt | 2 +- doc/src/fix_nvt_sphere.txt | 2 +- doc/src/fix_qeq_comb.txt | 2 +- doc/src/fix_qeq_reax.txt | 2 +- doc/src/fix_reax_bonds.txt | 2 +- doc/src/fix_reaxc_species.txt | 2 +- doc/src/fix_rigid.txt | 2 +- doc/src/fix_setforce.txt | 2 +- doc/src/fix_shake.txt | 2 +- doc/src/fix_wall_reflect.txt | 2 +- doc/src/improper_class2.txt | 2 +- doc/src/improper_cossq.txt | 2 +- doc/src/improper_cvff.txt | 2 +- doc/src/improper_fourier.txt | 2 +- doc/src/improper_harmonic.txt | 2 +- doc/src/improper_ring.txt | 2 +- doc/src/improper_umbrella.txt | 2 +- doc/src/jump.txt | 4 +- doc/src/log.txt | 2 +- doc/src/neb.txt | 2 +- doc/src/neighbor.txt | 2 +- doc/src/next.txt | 2 +- doc/src/package.txt | 28 +- doc/src/pair_adp.txt | 2 +- doc/src/pair_agni.txt | 2 +- doc/src/pair_airebo.txt | 2 +- doc/src/pair_beck.txt | 2 +- doc/src/pair_born.txt | 2 +- doc/src/pair_brownian.txt | 2 +- doc/src/pair_buck.txt | 2 +- doc/src/pair_buck_long.txt | 2 +- doc/src/pair_charmm.txt | 2 +- doc/src/pair_class2.txt | 2 +- doc/src/pair_colloid.txt | 2 +- doc/src/pair_comb.txt | 2 +- doc/src/pair_coul.txt | 2 +- doc/src/pair_dipole.txt | 2 +- doc/src/pair_dpd.txt | 2 +- doc/src/pair_eam.txt | 2 +- doc/src/pair_edip.txt | 2 +- doc/src/pair_eim.txt | 2 +- doc/src/pair_gayberne.txt | 2 +- doc/src/pair_gran.txt | 2 +- doc/src/pair_gromacs.txt | 2 +- doc/src/pair_hbond_dreiding.txt | 2 +- doc/src/pair_hybrid.txt | 2 +- doc/src/pair_lj.txt | 2 +- doc/src/pair_lj96.txt | 2 +- doc/src/pair_lj_cubic.txt | 2 +- doc/src/pair_lj_expand.txt | 2 +- doc/src/pair_lj_long.txt | 2 +- doc/src/pair_lj_smooth.txt | 2 +- doc/src/pair_lj_smooth_linear.txt | 2 +- doc/src/pair_lj_soft.txt | 2 +- doc/src/pair_lubricate.txt | 2 +- doc/src/pair_meam_spline.txt | 2 +- doc/src/pair_morse.txt | 2 +- doc/src/pair_nb3b_harmonic.txt | 2 +- doc/src/pair_nm.txt | 2 +- doc/src/pair_peri.txt | 2 +- doc/src/pair_reaxc.txt | 2 +- doc/src/pair_resquared.txt | 2 +- doc/src/pair_sdk.txt | 2 +- doc/src/pair_soft.txt | 2 +- doc/src/pair_sw.txt | 2 +- doc/src/pair_table.txt | 2 +- doc/src/pair_tersoff.txt | 2 +- doc/src/pair_tersoff_mod.txt | 2 +- doc/src/pair_tersoff_zbl.txt | 2 +- doc/src/pair_thole.txt | 2 +- doc/src/pair_vashishta.txt | 2 +- doc/src/pair_yukawa.txt | 2 +- doc/src/pair_yukawa_colloid.txt | 2 +- doc/src/pair_zbl.txt | 2 +- doc/src/partition.txt | 4 +- doc/src/prd.txt | 2 +- doc/src/processors.txt | 12 +- doc/src/read_data.txt | 2 +- doc/src/read_restart.txt | 2 +- doc/src/region.txt | 2 +- doc/src/restart.txt | 2 +- doc/src/run_style.txt | 6 +- doc/src/suffix.txt | 4 +- doc/src/temper.txt | 4 +- doc/src/thermo_style.txt | 2 +- doc/src/timer.txt | 2 +- doc/src/variable.txt | 8 +- doc/src/write_data.txt | 2 +- doc/src/write_restart.txt | 2 +- src/Make.py | 2378 ------------------------- 161 files changed, 237 insertions(+), 2616 deletions(-) delete mode 100755 src/Make.py diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index 36391731d0..359aa19edb 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -261,7 +261,6 @@ END_RST --> :link(start_6,Section_start.html#start_6) :link(start_7,Section_start.html#start_7) :link(start_8,Section_start.html#start_8) -:link(start_9,Section_start.html#start_9) :link(cmd_1,Section_commands.html#cmd_1) :link(cmd_2,Section_commands.html#cmd_2) diff --git a/doc/src/Section_accelerate.txt b/doc/src/Section_accelerate.txt index 64b80c1a55..8812358886 100644 --- a/doc/src/Section_accelerate.txt +++ b/doc/src/Section_accelerate.txt @@ -56,7 +56,7 @@ timings; you can simply extrapolate from short runs. For the set of runs, look at the timing data printed to the screen and log file at the end of each LAMMPS run. "This -section"_Section_start.html#start_8 of the manual has an overview. +section"_Section_start.html#start_7 of the manual has an overview. Running on one (or a few processors) should give a good estimate of the serial performance and what portions of the timestep are taking @@ -226,16 +226,16 @@ re-build LAMMPS | make machine | prepare and test a regular LAMMPS simulation | lmp_machine -in in.script; mpirun -np 32 lmp_machine -in in.script | -enable specific accelerator support via '-k on' "command-line switch"_Section_start.html#start_7, | +enable specific accelerator support via '-k on' "command-line switch"_Section_start.html#start_6, | only needed for KOKKOS package | -set any needed options for the package via "-pk" "command-line switch"_Section_start.html#start_7 or "package"_package.html command, | +set any needed options for the package via "-pk" "command-line switch"_Section_start.html#start_6 or "package"_package.html command, | only if defaults need to be changed | -use accelerated styles in your input via "-sf" "command-line switch"_Section_start.html#start_7 or "suffix"_suffix.html command | lmp_machine -in in.script -sf gpu +use accelerated styles in your input via "-sf" "command-line switch"_Section_start.html#start_6 or "suffix"_suffix.html command | lmp_machine -in in.script -sf gpu :tb(c=2,s=|) Note that the first 4 steps can be done as a single command, using the src/Make.py tool. This tool is discussed in "Section -2.4"_Section_start.html#start_4 of the manual, and its use is +4"_Section_packages.html of the manual, and its use is illustrated in the individual accelerator sections. Typically these steps only need to be done once, to create an executable that uses one or more accelerator packages. diff --git a/doc/src/Section_errors.txt b/doc/src/Section_errors.txt index 40e61a248e..408c01d52c 100644 --- a/doc/src/Section_errors.txt +++ b/doc/src/Section_errors.txt @@ -71,7 +71,7 @@ style", with ... being fix, compute, pair, etc, it means that you mistyped the style name or that the command is part of an optional package which was not compiled into your executable. The list of available styles in your executable can be listed by using "the -h -command-line argument"_Section_start.html#start_7. The installation +command-line argument"_Section_start.html#start_6. The installation and compilation of optional packages is explained in the "installation instructions"_Section_start.html#start_3. diff --git a/doc/src/Section_howto.txt b/doc/src/Section_howto.txt index f2f2561af8..6d699fe24b 100644 --- a/doc/src/Section_howto.txt +++ b/doc/src/Section_howto.txt @@ -54,7 +54,7 @@ restart files can be saved to disk using the "restart"_restart.html command. At a later time, these binary files can be read via a "read_restart"_read_restart.html command in a new script. Or they can be converted to text data files using the "-r command-line -switch"_Section_start.html#start_7 and read by a +switch"_Section_start.html#start_6 and read by a "read_data"_read_data.html command in a new script. Here we give examples of 2 scripts that read either a binary restart @@ -337,7 +337,7 @@ All of the above examples work whether you are running on 1 or multiple processors, but assumed you are running LAMMPS on a single partition of processors. LAMMPS can be run on multiple partitions via the "-partition" command-line switch as described in "this -section"_Section_start.html#start_7 of the manual. +section"_Section_start.html#start_6 of the manual. In the last 2 examples, if LAMMPS were run on 3 partitions, the same scripts could be used if the "index" and "loop" variables were @@ -387,7 +387,7 @@ for more info on packages. In all these cases, you must run with one or more processors per replica. The processors assigned to each replica are determined at run-time by using the "-partition command-line -switch"_Section_start.html#start_7 to launch LAMMPS on multiple +switch"_Section_start.html#start_6 to launch LAMMPS on multiple partitions, which in this context are the same as replicas. E.g. these commands: @@ -395,7 +395,7 @@ mpirun -np 16 lmp_linux -partition 8x2 -in in.temper mpirun -np 8 lmp_linux -partition 8x1 -in in.neb :pre would each run 8 replicas, on either 16 or 8 processors. Note the use -of the "-in command-line switch"_Section_start.html#start_7 to specify +of the "-in command-line switch"_Section_start.html#start_6 to specify the input script which is required when running in multi-replica mode. Also note that with MPI installed on a machine (e.g. your desktop), @@ -1872,7 +1872,7 @@ void lammps_free(void *) :pre The lammps_open() function is used to initialize LAMMPS, passing in a list of strings as if they were "command-line -arguments"_Section_start.html#start_7 when LAMMPS is run in +arguments"_Section_start.html#start_6 when LAMMPS is run in stand-alone mode from the command line, and a MPI communicator for LAMMPS to run under. It returns a ptr to the LAMMPS object that is created, and which is used in subsequent library calls. The diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index 76f88b8ab8..54a2685b86 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -369,7 +369,7 @@ suffix in their style name. "Section 5.3.1"_accelerate_gpu.html gives details of what hardware and Cuda software is required on your system, and details on how to build and use this package. Its styles can be invoked at run time via the "-sf gpu" or "-suffix gpu" "command-line -switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS +switches"_Section_start.html#start_6. See also the "KOKKOS"_#KOKKOS package, which has GPU-enabled styles. [Authors:] Mike Brown (Intel) while at Sandia and ORNL and Trung Nguyen @@ -427,8 +427,8 @@ src/GPU/README lib/gpu/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.1"_accelerate_gpu.html -"Section 2.7 -sf gpu"_Section_start.html#start_7 -"Section 2.7 -pk gpu"_Section_start.html#start_7 +"Section 2.6 -sf gpu"_Section_start.html#start_6 +"Section 2.6 -pk gpu"_Section_start.html#start_6 "package gpu"_package.html Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (g) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul @@ -529,7 +529,7 @@ style name. "Section 5.3.3"_accelerate_kokkos.html gives details of what hardware and software is required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf kk" or "-suffix kk" "command-line -switches"_Section_start.html#start_7. Also see the "GPU"_#GPU, +switches"_Section_start.html#start_6. Also see the "GPU"_#GPU, "OPT"_#OPT, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPUs, KNLs, and GPUs. @@ -597,9 +597,9 @@ src/KOKKOS/README lib/kokkos/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.3"_accelerate_kokkos.html -"Section 2.7 -k on ..."_Section_start.html#start_7 -"Section 2.7 -sf kk"_Section_start.html#start_7 -"Section 2.7 -pk kokkos"_Section_start.html#start_7 +"Section 2.6 -k on ..."_Section_start.html#start_6 +"Section 2.6 -sf kk"_Section_start.html#start_6 +"Section 2.6 -pk kokkos"_Section_start.html#start_6 "package kokkos"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (k) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul @@ -926,7 +926,7 @@ CHARMM, and Morse potentials. The styles have an "opt" suffix in their style name. "Section 5.3.5"_accelerate_opt.html gives details of how to build and use this package. Its styles can be invoked at run time via the "-sf opt" or "-suffix opt" "command-line -switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS, +switches"_Section_start.html#start_6. See also the "KOKKOS"_#KOKKOS, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPU performance. @@ -953,7 +953,7 @@ CCFLAGS: add -restrict :ul src/OPT: filenames -> commands "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.5"_accelerate_opt.html -"Section 2.7 -sf opt"_Section_start.html#start_7 +"Section 2.6 -sf opt"_Section_start.html#start_6 Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (t) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul @@ -1863,7 +1863,7 @@ All of them have an "intel" in their style name. "Section 5.3.2"_accelerate_intel.html gives details of what hardware and compilers are required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf intel" or -"-suffix intel" "command-line switches"_Section_start.html#start_7. +"-suffix intel" "command-line switches"_Section_start.html#start_6. Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPUs and KNLs. @@ -1919,8 +1919,8 @@ src/USER-INTEL: filenames -> commands src/USER-INTEL/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.2"_accelerate_gpu.html -"Section 2.7 -sf intel"_Section_start.html#start_7 -"Section 2.7 -pk intel"_Section_start.html#start_7 +"Section 2.6 -sf intel"_Section_start.html#start_6 +"Section 2.6 -pk intel"_Section_start.html#start_6 "package intel"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (i) src/USER-INTEL/TEST @@ -2193,7 +2193,7 @@ via OpenMP directives. All of them have an "omp" in their style name. "Section 5.3.4"_accelerate_omp.html gives details of what hardware and compilers are required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf omp" or -"-suffix omp" "command-line switches"_Section_start.html#start_7. +"-suffix omp" "command-line switches"_Section_start.html#start_6. Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-INTEL"_#USER-INTEL packages, which have styles optimized for CPUs. @@ -2226,8 +2226,8 @@ src/USER-OMP: filenames -> commands src/USER-OMP/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.4"_accelerate_omp.html -"Section 2.7 -sf omp"_Section_start.html#start_7 -"Section 2.7 -pk omp"_Section_start.html#start_7 +"Section 2.6 -sf omp"_Section_start.html#start_6 +"Section 2.6 -pk omp"_Section_start.html#start_6 "package omp"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (o) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul diff --git a/doc/src/Section_python.txt b/doc/src/Section_python.txt index 1e67fca321..f4b6bdad97 100644 --- a/doc/src/Section_python.txt +++ b/doc/src/Section_python.txt @@ -198,7 +198,7 @@ file and the shared library. 11.3 Building LAMMPS as a shared library :link(py_3),h4 Instructions on how to build LAMMPS as a shared library are given in -"Section 2.5"_Section_start.html#start_5. A shared library is one +"Section 2.4"_Section_start.html#start_4. A shared library is one that is dynamically loadable, which is what Python requires to wrap LAMMPS. On Linux this is a library file that ends in ".so", not ".a". @@ -217,7 +217,7 @@ NOTE: If you are building LAMMPS with an MPI or FFT library or other auxiliary libraries (used by various packages), then all of these extra libraries must also be shared libraries. If the LAMMPS shared-library build fails with an error complaining about this, see -"Section 2.5"_Section_start.html#start_5 for more details. +"Section 2.4"_Section_start.html#start_4 for more details. :line @@ -439,7 +439,7 @@ first importing from the lammps.py file: >>> CDLL("liblammps.so") :pre If an error occurs, carefully go thru the steps in "Section -2.5"_Section_start.html#start_5 and above about building a shared +2.4"_Section_start.html#start_4 and above about building a shared library and about insuring Python can find the necessary two files it needs. diff --git a/doc/src/Section_start.txt b/doc/src/Section_start.txt index b7a471c3fa..c798005f5e 100644 --- a/doc/src/Section_start.txt +++ b/doc/src/Section_start.txt @@ -14,11 +14,11 @@ experienced users. 2.1 "What's in the LAMMPS distribution"_#start_1 2.2 "Making LAMMPS"_#start_2 2.3 "Making LAMMPS with optional packages"_#start_3 -2.5 "Building LAMMPS as a library"_#start_4 -2.6 "Running LAMMPS"_#start_5 -2.7 "Command-line options"_#start_6 -2.8 "Screen output"_#start_7 -2.9 "Tips for users of previous versions"_#start_8 :all(b) +2.4 "Building LAMMPS as a library"_#start_4 +2.5 "Running LAMMPS"_#start_5 +2.6 "Command-line options"_#start_6 +2.7 "Screen output"_#start_7 +2.8 "Tips for users of previous versions"_#start_8 :all(b) :line @@ -714,7 +714,7 @@ type lmp_machine -h :pre to run your executable with the optional "-h command-line -switch"_#start_7 for "help", which will list the styles and commands +switch"_#start_6 for "help", which will list the styles and commands known to your executable, and immediately exit. :line diff --git a/doc/src/accelerate_gpu.txt b/doc/src/accelerate_gpu.txt index 2ac7d62f6c..68e9fa477a 100644 --- a/doc/src/accelerate_gpu.txt +++ b/doc/src/accelerate_gpu.txt @@ -54,7 +54,7 @@ specify the # of GPUs per node use GPU styles in your input script :ul The latter two steps can be done using the "-pk gpu" and "-sf gpu" -"command-line switches"_Section_start.html#start_7 respectively. Or +"command-line switches"_Section_start.html#start_6 respectively. Or the effect of the "-pk" or "-sf" switches can be duplicated by adding the "package gpu"_package.html or "suffix gpu"_suffix.html commands respectively to your input script. @@ -75,7 +75,7 @@ This requires two steps (a,b): build the GPU library, then build LAMMPS with the GPU package. You can do both these steps in one line, using the src/Make.py script, -described in "Section 2.4"_Section_start.html#start_4 of the manual. +described in "Section 4"_Section_packages.html of the manual. Type "Make.py -h" for help. If run from the src directory, this command will create src/lmp_gpu using src/MAKE/Makefile.mpi as the starting Makefile.machine: @@ -151,9 +151,9 @@ automatically if you create more MPI tasks/node than there are GPUs/mode. E.g. with 8 MPI tasks/node and 2 GPUs, each GPU will be shared by 4 MPI tasks. -Use the "-sf gpu" "command-line switch"_Section_start.html#start_7, +Use the "-sf gpu" "command-line switch"_Section_start.html#start_6, which will automatically append "gpu" to styles that support it. Use -the "-pk gpu Ng" "command-line switch"_Section_start.html#start_7 to +the "-pk gpu Ng" "command-line switch"_Section_start.html#start_6 to set Ng = # of GPUs/node to use. lmp_machine -sf gpu -pk gpu 1 -in in.script # 1 MPI task uses 1 GPU @@ -188,7 +188,7 @@ pair_style lj/cut/gpu 2.5 :pre You must also use the "package gpu"_package.html command to enable the GPU package, unless the "-sf gpu" or "-pk gpu" "command-line -switches"_Section_start.html#start_7 were used. It specifies the +switches"_Section_start.html#start_6 were used. It specifies the number of GPUs/node to use, as well as other options. [Speed-ups to expect:] diff --git a/doc/src/accelerate_intel.txt b/doc/src/accelerate_intel.txt index 155e29e367..74ae9d9a42 100644 --- a/doc/src/accelerate_intel.txt +++ b/doc/src/accelerate_intel.txt @@ -226,7 +226,7 @@ source /opt/intel/parallel_studio_xe_2016.3.067/psxevars.sh make intel_cpu_intelmpi :pre Alternatively, the build can be accomplished with the src/Make.py -script, described in "Section 2.4"_Section_start.html#start_4 of the +script, described in "Section 4"_Section_packages.html of the manual. Type "Make.py -h" for help. For an example: Make.py -v -p intel omp -intel cpu -a file intel_cpu_intelmpi :pre @@ -301,7 +301,7 @@ Hyper-Threading technology disabled. To enable USER-INTEL optimizations for all available styles used in the input script, the "-sf intel" -"command-line switch"_Section_start.html#start_7 can be used without +"command-line switch"_Section_start.html#start_6 can be used without any requirement for editing the input script. This switch will automatically append "intel" to styles that support it. It also invokes a default command: "package intel 1"_package.html. This @@ -314,7 +314,7 @@ support, that 1 coprocessor per node will be used with automatic balancing of work between the CPU and the coprocessor. You can specify different options for the USER-INTEL package by using -the "-pk intel Nphi" "command-line switch"_Section_start.html#start_7 +the "-pk intel Nphi" "command-line switch"_Section_start.html#start_6 with keyword/value pairs as specified in the documentation. Here, Nphi = # of Xeon Phi coprocessors/node (ignored without offload support). Common options to the USER-INTEL package include {omp} to @@ -387,7 +387,7 @@ can performed automatically by using "-sf hybrid intel opt" or and "omp" suffixes can be appended manually in the input script. For the latter, the "package omp"_package.html command must be in the input script or the "-pk omp Nt" "command-line -switch"_Section_start.html#start_7 must be used where Nt is the +switch"_Section_start.html#start_6 must be used where Nt is the number of OpenMP threads. The number of OpenMP threads should not be set differently for the different packages. Note that the "suffix hybrid intel omp"_suffix.html command can also be used within the @@ -486,7 +486,7 @@ sorting"_atom_modify.html is changed to 1 so that the per-atom data is effectively sorted at every rebuild of the neighbor lists. All the available coprocessor threads on each Phi will be divided among MPI tasks, unless the {tptask} option of the "-pk intel" "command-line -switch"_Section_start.html#start_7 is used to limit the coprocessor +switch"_Section_start.html#start_6 is used to limit the coprocessor threads per MPI task. [Restrictions:] diff --git a/doc/src/accelerate_kokkos.txt b/doc/src/accelerate_kokkos.txt index 602c3191f6..6ccd695841 100644 --- a/doc/src/accelerate_kokkos.txt +++ b/doc/src/accelerate_kokkos.txt @@ -136,7 +136,7 @@ You must choose at build time whether to build for CPUs (OpenMP), GPUs, or Phi. You can do any of these in one line, using the src/Make.py script, -described in "Section 2.4"_Section_start.html#start_4 of the manual. +described in "Section 4"_Section_packages.html of the manual. Type "Make.py -h" for help. If run from the src directory, these commands will create src/lmp_kokkos_omp, lmp_kokkos_cuda, and lmp_kokkos_phi. Note that the OMP and PHI options use @@ -144,7 +144,7 @@ src/MAKE/Makefile.mpi as the starting Makefile.machine. The CUDA option uses src/MAKE/OPTIONS/Makefile.kokkos_cuda. The latter two steps can be done using the "-k on", "-pk kokkos" and -"-sf kk" "command-line switches"_Section_start.html#start_7 +"-sf kk" "command-line switches"_Section_start.html#start_6 respectively. Or the effect of the "-pk" or "-sf" switches can be duplicated by adding the "package kokkos"_package.html or "suffix kk"_suffix.html commands respectively to your input script. @@ -280,10 +280,10 @@ specify how many Phi coprocessors there are per node; each coprocessors is simply treated as running some number of MPI tasks. You must use the "-k on" "command-line -switch"_Section_start.html#start_7 to enable the KOKKOS package. It +switch"_Section_start.html#start_6 to enable the KOKKOS package. It takes additional arguments for hardware settings appropriate to your system. Those arguments are "documented -here"_Section_start.html#start_7. The two most commonly used +here"_Section_start.html#start_6. The two most commonly used options are: -k on t Nt g Ng :pre @@ -304,12 +304,12 @@ The "-k on" switch also issues a "package kokkos" command (with no additional arguments) which sets various KOKKOS options to default values, as discussed on the "package"_package.html command doc page. -Use the "-sf kk" "command-line switch"_Section_start.html#start_7, +Use the "-sf kk" "command-line switch"_Section_start.html#start_6, which will automatically append "kk" to styles that support it. Use -the "-pk kokkos" "command-line switch"_Section_start.html#start_7 if +the "-pk kokkos" "command-line switch"_Section_start.html#start_6 if you wish to change any of the default "package kokkos"_package.html optionns set by the "-k on" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. @@ -323,7 +323,7 @@ However, when running in MPI-only mode with 1 thread per MPI task, it will typically be faster to use "half" neighbor lists and set the Newton flag to "on", just as is the case for non-accelerated pair styles. You can do this with the "-pk" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. [Or run with the KOKKOS package by editing an input script:] @@ -332,7 +332,7 @@ appropriate thread and GPU values for host=OMP or host=MIC or device=CUDA are the same. You must still use the "-k on" "command-line -switch"_Section_start.html#start_7 to enable the KOKKOS package, and +switch"_Section_start.html#start_6 to enable the KOKKOS package, and specify its additional arguments for hardware options appropriate to your system, as documented above. @@ -343,7 +343,7 @@ pair_style lj/cut/kk 2.5 :pre You only need to use the "package kokkos"_package.html command if you wish to change any of its option defaults, as set by the "-k on" -"command-line switch"_Section_start.html#start_7. +"command-line switch"_Section_start.html#start_6. [Speed-ups to expect:] @@ -389,7 +389,7 @@ If N is the number of physical cores/node, then the number of MPI tasks/node * number of threads/task should not exceed N, and should typically equal N. Note that the default threads/task is 1, as set by the "t" keyword of the "-k" "command-line -switch"_Section_start.html#start_7. If you do not change this, no +switch"_Section_start.html#start_6. If you do not change this, no additional parallelism (beyond MPI) will be invoked on the host CPU(s). @@ -429,7 +429,7 @@ details). The -np setting of the mpirun command should set the number of MPI tasks/node to be equal to the # of physical GPUs on the node. -Use the "-k" "command-line switch"_Section_commands.html#start_7 to +Use the "-k" "command-line switch"_Section_commands.html#start_6 to specify the number of GPUs per node, and the number of threads per MPI task. As above for multi-core CPUs (and no GPU), if N is the number of physical cores/node, then the number of MPI tasks/node * number of diff --git a/doc/src/accelerate_omp.txt b/doc/src/accelerate_omp.txt index c8dd343861..81b7a5adc2 100644 --- a/doc/src/accelerate_omp.txt +++ b/doc/src/accelerate_omp.txt @@ -41,7 +41,7 @@ each MPI task running on a CPU. The lines above illustrate how to include/build with the USER-OMP package in two steps, using the "make" command. Or how to do it with one command via the src/Make.py script, described in "Section -2.4"_Section_start.html#start_4 of the manual. Type "Make.py -h" for +4"_Section_packages.html of the manual. Type "Make.py -h" for help. Note that the CCFLAGS and LINKFLAGS settings in Makefile.machine must @@ -62,14 +62,14 @@ threads/task should not exceed the physical number of cores (on a node), otherwise performance will suffer. As in the lines above, use the "-sf omp" "command-line -switch"_Section_start.html#start_7, which will automatically append +switch"_Section_start.html#start_6, which will automatically append "omp" to styles that support it. The "-sf omp" switch also issues a default "package omp 0"_package.html command, which will set the number of threads per MPI task via the OMP_NUM_THREADS environment variable. You can also use the "-pk omp Nt" "command-line -switch"_Section_start.html#start_7, to explicitly set Nt = # of OpenMP +switch"_Section_start.html#start_6, to explicitly set Nt = # of OpenMP threads per MPI task to use, as well as additional options. Its syntax is the same as the "package omp"_package.html command whose doc page gives details, including the default values used if it is not diff --git a/doc/src/accelerate_opt.txt b/doc/src/accelerate_opt.txt index 704321ca07..5a2a5eac0a 100644 --- a/doc/src/accelerate_opt.txt +++ b/doc/src/accelerate_opt.txt @@ -36,7 +36,7 @@ None. The lines above illustrate how to build LAMMPS with the OPT package in two steps, using the "make" command. Or how to do it with one command via the src/Make.py script, described in "Section -2.4"_Section_start.html#start_4 of the manual. Type "Make.py -h" for +4"_Section_packages.html of the manual. Type "Make.py -h" for help. Note that if you use an Intel compiler to build with the OPT package, @@ -46,7 +46,7 @@ The Make.py command will add this automatically. [Run with the OPT package from the command line:] As in the lines above, use the "-sf opt" "command-line -switch"_Section_start.html#start_7, which will automatically append +switch"_Section_start.html#start_6, which will automatically append "opt" to styles that support it. [Or run with the OPT package by editing an input script:] diff --git a/doc/src/angle_charmm.txt b/doc/src/angle_charmm.txt index a02e604258..7ff7ef8fd4 100644 --- a/doc/src/angle_charmm.txt +++ b/doc/src/angle_charmm.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_class2.txt b/doc/src/angle_class2.txt index 74f2544cd4..71a508d691 100644 --- a/doc/src/angle_class2.txt +++ b/doc/src/angle_class2.txt @@ -94,7 +94,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine.txt b/doc/src/angle_cosine.txt index 4fb2ccaf7c..c0ce3c9301 100644 --- a/doc/src/angle_cosine.txt +++ b/doc/src/angle_cosine.txt @@ -50,7 +50,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_delta.txt b/doc/src/angle_cosine_delta.txt index 6ab214508c..830fd6db58 100644 --- a/doc/src/angle_cosine_delta.txt +++ b/doc/src/angle_cosine_delta.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_periodic.txt b/doc/src/angle_cosine_periodic.txt index c6cd57e419..b5c53b1b0f 100644 --- a/doc/src/angle_cosine_periodic.txt +++ b/doc/src/angle_cosine_periodic.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_shift.txt b/doc/src/angle_cosine_shift.txt index dc1a29a86b..6ed9fe2150 100644 --- a/doc/src/angle_cosine_shift.txt +++ b/doc/src/angle_cosine_shift.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_shift_exp.txt b/doc/src/angle_cosine_shift_exp.txt index 48af5ba76a..44a68c1087 100644 --- a/doc/src/angle_cosine_shift_exp.txt +++ b/doc/src/angle_cosine_shift_exp.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_squared.txt b/doc/src/angle_cosine_squared.txt index 23e1b150a8..065cdad542 100644 --- a/doc/src/angle_cosine_squared.txt +++ b/doc/src/angle_cosine_squared.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_fourier.txt b/doc/src/angle_fourier.txt index f58ae8e4f4..da39e7cf32 100644 --- a/doc/src/angle_fourier.txt +++ b/doc/src/angle_fourier.txt @@ -51,7 +51,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_fourier_simple.txt b/doc/src/angle_fourier_simple.txt index 9da8ffed28..5adda6cb32 100644 --- a/doc/src/angle_fourier_simple.txt +++ b/doc/src/angle_fourier_simple.txt @@ -50,7 +50,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_harmonic.txt b/doc/src/angle_harmonic.txt index 12ee805218..4c74763964 100644 --- a/doc/src/angle_harmonic.txt +++ b/doc/src/angle_harmonic.txt @@ -57,7 +57,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_quartic.txt b/doc/src/angle_quartic.txt index fea2eb9e03..f7640bdfbc 100644 --- a/doc/src/angle_quartic.txt +++ b/doc/src/angle_quartic.txt @@ -57,7 +57,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_table.txt b/doc/src/angle_table.txt index 61dd7b041e..bd6e167bd8 100644 --- a/doc/src/angle_table.txt +++ b/doc/src/angle_table.txt @@ -136,7 +136,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/balance.txt b/doc/src/balance.txt index 79728d6569..da6f59900d 100644 --- a/doc/src/balance.txt +++ b/doc/src/balance.txt @@ -394,7 +394,7 @@ weights. It assigns the same weight to each particle owned by a processor based on the total computational time spent by that processor. See details below on what time window is used. It uses the same timing information as is used for the "MPI task timing -breakdown"_Section_start.html#start_8, namely, for sections {Pair}, +breakdown"_Section_start.html#start_7, namely, for sections {Pair}, {Bond}, {Kspace}, and {Neigh}. The time spent in those portions of the timestep are measured for each MPI rank, summed, then divided by the number of particles owned by that processor. I.e. the weight is diff --git a/doc/src/bond_class2.txt b/doc/src/bond_class2.txt index aa05412387..9687a63168 100644 --- a/doc/src/bond_class2.txt +++ b/doc/src/bond_class2.txt @@ -56,7 +56,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_fene.txt b/doc/src/bond_fene.txt index 80d2a805c5..9050c3bf5c 100644 --- a/doc/src/bond_fene.txt +++ b/doc/src/bond_fene.txt @@ -59,7 +59,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_fene_expand.txt b/doc/src/bond_fene_expand.txt index 3908c16a7e..ff687444a9 100644 --- a/doc/src/bond_fene_expand.txt +++ b/doc/src/bond_fene_expand.txt @@ -62,7 +62,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_harmonic.txt b/doc/src/bond_harmonic.txt index 1cbd897dac..c18a7e0fd4 100644 --- a/doc/src/bond_harmonic.txt +++ b/doc/src/bond_harmonic.txt @@ -54,7 +54,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_harmonic_shift.txt b/doc/src/bond_harmonic_shift.txt index 8cb2d2ce7d..bf3b3c115a 100644 --- a/doc/src/bond_harmonic_shift.txt +++ b/doc/src/bond_harmonic_shift.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_harmonic_shift_cut.txt b/doc/src/bond_harmonic_shift_cut.txt index 836d6afda4..1918ce00b6 100644 --- a/doc/src/bond_harmonic_shift_cut.txt +++ b/doc/src/bond_harmonic_shift_cut.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_morse.txt b/doc/src/bond_morse.txt index 12e51f9bef..4f6a32e341 100644 --- a/doc/src/bond_morse.txt +++ b/doc/src/bond_morse.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_nonlinear.txt b/doc/src/bond_nonlinear.txt index ac9f3369c2..434af62506 100644 --- a/doc/src/bond_nonlinear.txt +++ b/doc/src/bond_nonlinear.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_quartic.txt b/doc/src/bond_quartic.txt index e61f4f0343..4dc7ad4a36 100644 --- a/doc/src/bond_quartic.txt +++ b/doc/src/bond_quartic.txt @@ -88,7 +88,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_table.txt b/doc/src/bond_table.txt index cb096fba11..906d3e5d76 100644 --- a/doc/src/bond_table.txt +++ b/doc/src/bond_table.txt @@ -133,7 +133,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/compute_pressure.txt b/doc/src/compute_pressure.txt index 292e779f72..f0691ad207 100644 --- a/doc/src/compute_pressure.txt +++ b/doc/src/compute_pressure.txt @@ -117,7 +117,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/compute_temp.txt b/doc/src/compute_temp.txt index 0bd2d4b121..b88be79e20 100644 --- a/doc/src/compute_temp.txt +++ b/doc/src/compute_temp.txt @@ -79,7 +79,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/compute_temp_partial.txt b/doc/src/compute_temp_partial.txt index 163a00af52..fe2420b4e4 100644 --- a/doc/src/compute_temp_partial.txt +++ b/doc/src/compute_temp_partial.txt @@ -86,7 +86,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_charmm.txt b/doc/src/dihedral_charmm.txt index 73dc67cdef..06abe054e4 100644 --- a/doc/src/dihedral_charmm.txt +++ b/doc/src/dihedral_charmm.txt @@ -128,7 +128,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_class2.txt b/doc/src/dihedral_class2.txt index 91ab6f3738..cb9fc72c22 100644 --- a/doc/src/dihedral_class2.txt +++ b/doc/src/dihedral_class2.txt @@ -153,7 +153,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_cosine_shift_exp.txt b/doc/src/dihedral_cosine_shift_exp.txt index 89614a3fdb..715682affc 100644 --- a/doc/src/dihedral_cosine_shift_exp.txt +++ b/doc/src/dihedral_cosine_shift_exp.txt @@ -64,7 +64,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_fourier.txt b/doc/src/dihedral_fourier.txt index 5682309b83..da892b59da 100644 --- a/doc/src/dihedral_fourier.txt +++ b/doc/src/dihedral_fourier.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_harmonic.txt b/doc/src/dihedral_harmonic.txt index c763dcce22..d9a48ff384 100644 --- a/doc/src/dihedral_harmonic.txt +++ b/doc/src/dihedral_harmonic.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_helix.txt b/doc/src/dihedral_helix.txt index fced983db0..1e907557b2 100644 --- a/doc/src/dihedral_helix.txt +++ b/doc/src/dihedral_helix.txt @@ -58,7 +58,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_multi_harmonic.txt b/doc/src/dihedral_multi_harmonic.txt index 5774a67685..7d3c2ea083 100644 --- a/doc/src/dihedral_multi_harmonic.txt +++ b/doc/src/dihedral_multi_harmonic.txt @@ -52,7 +52,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_nharmonic.txt b/doc/src/dihedral_nharmonic.txt index 0df28a05d4..8392d83899 100644 --- a/doc/src/dihedral_nharmonic.txt +++ b/doc/src/dihedral_nharmonic.txt @@ -52,7 +52,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_opls.txt b/doc/src/dihedral_opls.txt index afcc5d3514..d1a6ba3ff2 100644 --- a/doc/src/dihedral_opls.txt +++ b/doc/src/dihedral_opls.txt @@ -60,7 +60,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_quadratic.txt b/doc/src/dihedral_quadratic.txt index 526b469f63..ca2f5aed40 100644 --- a/doc/src/dihedral_quadratic.txt +++ b/doc/src/dihedral_quadratic.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/echo.txt b/doc/src/echo.txt index 8ef8ad05f8..3141c7a719 100644 --- a/doc/src/echo.txt +++ b/doc/src/echo.txt @@ -26,7 +26,7 @@ command to the screen and/or log file as it is read and processed. If an input script has errors, it can be useful to look at echoed output to see the last command processed. -The "command-line switch"_Section_start.html#start_5 -echo can be used +The "command-line switch"_Section_start.html#start_6 -echo can be used in place of this command. [Restrictions:] none diff --git a/doc/src/fix_addforce.txt b/doc/src/fix_addforce.txt index da9f98a6da..1cc0a15332 100644 --- a/doc/src/fix_addforce.txt +++ b/doc/src/fix_addforce.txt @@ -117,7 +117,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_aveforce.txt b/doc/src/fix_aveforce.txt index d980e9a211..5d7dec3e6a 100644 --- a/doc/src/fix_aveforce.txt +++ b/doc/src/fix_aveforce.txt @@ -77,7 +77,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_deform.txt b/doc/src/fix_deform.txt index d3254eece6..63d872eded 100644 --- a/doc/src/fix_deform.txt +++ b/doc/src/fix_deform.txt @@ -557,7 +557,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_enforce2d.txt b/doc/src/fix_enforce2d.txt index 1dce620033..5d04e96677 100644 --- a/doc/src/fix_enforce2d.txt +++ b/doc/src/fix_enforce2d.txt @@ -41,7 +41,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_freeze.txt b/doc/src/fix_freeze.txt index 6a4f6c2fcf..a63ee4cb32 100644 --- a/doc/src/fix_freeze.txt +++ b/doc/src/fix_freeze.txt @@ -45,7 +45,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_gravity.txt b/doc/src/fix_gravity.txt index 2cf1665c30..dae8ac5ed0 100644 --- a/doc/src/fix_gravity.txt +++ b/doc/src/fix_gravity.txt @@ -102,7 +102,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_langevin.txt b/doc/src/fix_langevin.txt index 534d83f6a9..93c73f5a5d 100644 --- a/doc/src/fix_langevin.txt +++ b/doc/src/fix_langevin.txt @@ -276,7 +276,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_momentum.txt b/doc/src/fix_momentum.txt index 4f94e2a857..bcf4465fb8 100644 --- a/doc/src/fix_momentum.txt +++ b/doc/src/fix_momentum.txt @@ -73,7 +73,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nh.txt b/doc/src/fix_nh.txt index c1cc3e560a..8fa30ac222 100644 --- a/doc/src/fix_nh.txt +++ b/doc/src/fix_nh.txt @@ -492,7 +492,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nph_asphere.txt b/doc/src/fix_nph_asphere.txt index 3d151a724b..8c35b6a1a7 100644 --- a/doc/src/fix_nph_asphere.txt +++ b/doc/src/fix_nph_asphere.txt @@ -93,7 +93,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nph_body.txt b/doc/src/fix_nph_body.txt index 3a273be595..1e590f1cb3 100644 --- a/doc/src/fix_nph_body.txt +++ b/doc/src/fix_nph_body.txt @@ -92,7 +92,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nph_sphere.txt b/doc/src/fix_nph_sphere.txt index 9258f40c76..62b45edfd7 100644 --- a/doc/src/fix_nph_sphere.txt +++ b/doc/src/fix_nph_sphere.txt @@ -102,7 +102,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nphug.txt b/doc/src/fix_nphug.txt index ef3ffc4955..292e46f94a 100644 --- a/doc/src/fix_nphug.txt +++ b/doc/src/fix_nphug.txt @@ -152,7 +152,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_npt_asphere.txt b/doc/src/fix_npt_asphere.txt index 8fe98f1818..5f3979e36e 100644 --- a/doc/src/fix_npt_asphere.txt +++ b/doc/src/fix_npt_asphere.txt @@ -117,7 +117,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_npt_body.txt b/doc/src/fix_npt_body.txt index 772920df61..d89bf19db2 100644 --- a/doc/src/fix_npt_body.txt +++ b/doc/src/fix_npt_body.txt @@ -116,7 +116,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_npt_sphere.txt b/doc/src/fix_npt_sphere.txt index 24a8fede57..c4cf2cb08d 100644 --- a/doc/src/fix_npt_sphere.txt +++ b/doc/src/fix_npt_sphere.txt @@ -127,7 +127,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nve.txt b/doc/src/fix_nve.txt index 7ad8301877..c04c17858e 100644 --- a/doc/src/fix_nve.txt +++ b/doc/src/fix_nve.txt @@ -46,7 +46,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nve_asphere.txt b/doc/src/fix_nve_asphere.txt index 03846a2558..1f31fb9679 100644 --- a/doc/src/fix_nve_asphere.txt +++ b/doc/src/fix_nve_asphere.txt @@ -57,7 +57,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nve_sphere.txt b/doc/src/fix_nve_sphere.txt index f91a41f515..21dc6cba8a 100644 --- a/doc/src/fix_nve_sphere.txt +++ b/doc/src/fix_nve_sphere.txt @@ -77,7 +77,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_asphere.txt b/doc/src/fix_nvt_asphere.txt index 77de1dea40..21b900f16a 100644 --- a/doc/src/fix_nvt_asphere.txt +++ b/doc/src/fix_nvt_asphere.txt @@ -98,7 +98,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_body.txt b/doc/src/fix_nvt_body.txt index 1f04b85c8b..6a5e09ba7f 100644 --- a/doc/src/fix_nvt_body.txt +++ b/doc/src/fix_nvt_body.txt @@ -97,7 +97,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_sllod.txt b/doc/src/fix_nvt_sllod.txt index 82631f22e3..392dbc281c 100644 --- a/doc/src/fix_nvt_sllod.txt +++ b/doc/src/fix_nvt_sllod.txt @@ -121,7 +121,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_sphere.txt b/doc/src/fix_nvt_sphere.txt index fa1c97bcce..ecf0922b79 100644 --- a/doc/src/fix_nvt_sphere.txt +++ b/doc/src/fix_nvt_sphere.txt @@ -108,7 +108,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_qeq_comb.txt b/doc/src/fix_qeq_comb.txt index 30c5003e72..7f82404127 100644 --- a/doc/src/fix_qeq_comb.txt +++ b/doc/src/fix_qeq_comb.txt @@ -74,7 +74,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_qeq_reax.txt b/doc/src/fix_qeq_reax.txt index a1a19b7368..18450c7cd5 100644 --- a/doc/src/fix_qeq_reax.txt +++ b/doc/src/fix_qeq_reax.txt @@ -92,7 +92,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_reax_bonds.txt b/doc/src/fix_reax_bonds.txt index aadb0a9cbc..54aa7faef8 100644 --- a/doc/src/fix_reax_bonds.txt +++ b/doc/src/fix_reax_bonds.txt @@ -82,7 +82,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section_accelerate"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_reaxc_species.txt b/doc/src/fix_reaxc_species.txt index 9a588356e0..7c920791f7 100644 --- a/doc/src/fix_reaxc_species.txt +++ b/doc/src/fix_reaxc_species.txt @@ -151,7 +151,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section_accelerate"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_rigid.txt b/doc/src/fix_rigid.txt index 87021b8551..62969112f7 100644 --- a/doc/src/fix_rigid.txt +++ b/doc/src/fix_rigid.txt @@ -676,7 +676,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_setforce.txt b/doc/src/fix_setforce.txt index 90766fc5bc..f5be0f93a5 100644 --- a/doc/src/fix_setforce.txt +++ b/doc/src/fix_setforce.txt @@ -82,7 +82,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_shake.txt b/doc/src/fix_shake.txt index 8b26aaa874..c187b17c6c 100644 --- a/doc/src/fix_shake.txt +++ b/doc/src/fix_shake.txt @@ -159,7 +159,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_wall_reflect.txt b/doc/src/fix_wall_reflect.txt index 5b425316e0..954ec65bf6 100644 --- a/doc/src/fix_wall_reflect.txt +++ b/doc/src/fix_wall_reflect.txt @@ -142,7 +142,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_class2.txt b/doc/src/improper_class2.txt index 0b41afe2db..14ec6258de 100644 --- a/doc/src/improper_class2.txt +++ b/doc/src/improper_class2.txt @@ -99,7 +99,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_cossq.txt b/doc/src/improper_cossq.txt index e238063a8f..138a6a1650 100644 --- a/doc/src/improper_cossq.txt +++ b/doc/src/improper_cossq.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_cvff.txt b/doc/src/improper_cvff.txt index 72f346ba04..5f69eccc60 100644 --- a/doc/src/improper_cvff.txt +++ b/doc/src/improper_cvff.txt @@ -66,7 +66,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_fourier.txt b/doc/src/improper_fourier.txt index 3a5354b1fe..f9062da207 100644 --- a/doc/src/improper_fourier.txt +++ b/doc/src/improper_fourier.txt @@ -60,7 +60,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_harmonic.txt b/doc/src/improper_harmonic.txt index b47b0ca41f..bb17e5a641 100644 --- a/doc/src/improper_harmonic.txt +++ b/doc/src/improper_harmonic.txt @@ -70,7 +70,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_ring.txt b/doc/src/improper_ring.txt index cba59399e7..c02d392474 100644 --- a/doc/src/improper_ring.txt +++ b/doc/src/improper_ring.txt @@ -69,7 +69,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_umbrella.txt b/doc/src/improper_umbrella.txt index fafa2e7e4c..d6df9ee6cc 100644 --- a/doc/src/improper_umbrella.txt +++ b/doc/src/improper_umbrella.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/jump.txt b/doc/src/jump.txt index 1b1a209511..4e3799f7b1 100644 --- a/doc/src/jump.txt +++ b/doc/src/jump.txt @@ -40,12 +40,12 @@ lmp_g++ < in.script :pre since the SELF option invokes the C-library rewind() call, which may not be supported for stdin on some systems or by some MPI implementations. This can be worked around by using the "-in -command-line argument"_Section_start.html#start_7, e.g. +command-line argument"_Section_start.html#start_6, e.g. lmp_g++ -in in.script :pre or by using the "-var command-line -argument"_Section_start.html#start_7 to pass the script name as a +argument"_Section_start.html#start_6 to pass the script name as a variable to the input script. In the latter case, a "variable"_variable.html called "fname" could be used in place of SELF, e.g. diff --git a/doc/src/log.txt b/doc/src/log.txt index 460482ea1e..92bb12e6db 100644 --- a/doc/src/log.txt +++ b/doc/src/log.txt @@ -34,7 +34,7 @@ the same log file. The file "log.lammps" is the default log file for a LAMMPS run. The name of the initial log file can also be set by the command-line -switch -log. See "Section 2.7"_Section_start.html#start_7 for +switch -log. See "Section 2.6"_Section_start.html#start_6 for details. [Restrictions:] none diff --git a/doc/src/neb.txt b/doc/src/neb.txt index d2e8be3f03..144fe8bdef 100644 --- a/doc/src/neb.txt +++ b/doc/src/neb.txt @@ -51,7 +51,7 @@ follows the discussion in these 4 papers: "(HenkelmanA)"_#HenkelmanA, Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the -partition command-line -switch; see "Section 2.7"_Section_start.html#start_7 of the manual. +switch; see "Section 2.6"_Section_start.html#start_6 of the manual. Note that if you have MPI installed, you can run a multi-replica simulation with more replicas (partitions) than you have physical processors, e.g you can run a 10-replica simulation on just one or two diff --git a/doc/src/neighbor.txt b/doc/src/neighbor.txt index 7b8f499ba8..062f79a5bb 100644 --- a/doc/src/neighbor.txt +++ b/doc/src/neighbor.txt @@ -66,7 +66,7 @@ stored in the list. When a run is finished, counts of the number of neighbors stored in the pairwise list and the number of times neighbor lists were built are printed to the screen and log file. See "this -section"_Section_start.html#start_8 for details. +section"_Section_start.html#start_7 for details. [Restrictions:] none diff --git a/doc/src/next.txt b/doc/src/next.txt index fe9dc97542..08f73b896c 100644 --- a/doc/src/next.txt +++ b/doc/src/next.txt @@ -71,7 +71,7 @@ next value (for each variable) is assigned to whichever processor partition executes the command first. All processors in the partition are assigned the same value(s). Running LAMMPS on multiple partitions of processors via the "-partition" command-line switch is described in -"this section"_Section_start.html#start_7 of the manual. {Universe}- +"this section"_Section_start.html#start_6 of the manual. {Universe}- and {uloop}-style variables are incremented using the files "tmp.lammps.variable" and "tmp.lammps.variable.lock" which you will see in your directory during and after such a LAMMPS run. diff --git a/doc/src/package.txt b/doc/src/package.txt index 18a26bd55c..1b9092644f 100644 --- a/doc/src/package.txt +++ b/doc/src/package.txt @@ -115,7 +115,7 @@ their initialization, before a simulation is defined. This command can also be specified from the command-line when launching LAMMPS, using the "-pk" "command-line -switch"_Section_start.html#start_7. The syntax is exactly the same as +switch"_Section_start.html#start_6. The syntax is exactly the same as when used in an input script. Note that all of the accelerator packages require the package command @@ -126,18 +126,18 @@ a default version of the command is typically invoked by other accelerator settings. The KOKKOS package requires a "-k on" "command-line -switch"_Section_start.html#start_7 respectively, which invokes a +switch"_Section_start.html#start_6 respectively, which invokes a "package kokkos" command with default settings. For the GPU, USER-INTEL, and USER-OMP packages, if a "-sf gpu" or "-sf -intel" or "-sf omp" "command-line switch"_Section_start.html#start_7 +intel" or "-sf omp" "command-line switch"_Section_start.html#start_6 is used to auto-append accelerator suffixes to various styles in the input script, then those switches also invoke a "package gpu", "package intel", or "package omp" command with default settings. NOTE: A package command for a particular style can be invoked multiple times when a simulation is setup, e.g. by the "-c on", "-k on", "-sf", -and "-pk" "command-line switches"_Section_start.html#start_7, and by +and "-pk" "command-line switches"_Section_start.html#start_6, and by using this command in an input script. Each time it is used all of the style options are set, either to default values or to specified settings. I.e. settings from previous invocations do not persist @@ -305,7 +305,7 @@ value via their package commands, but there is only a single global invoked, you should insure the two values are consistent. If they are not, the last one invoked will take precedence, for both packages. Also note that if the "-sf hybrid intel omp" "command-line -switch"_"_Section_start.html#start_7 is used, it invokes a "package +switch"_"_Section_start.html#start_6 is used, it invokes a "package intel" command, followed by a "package omp" command, both with a setting of {Nthreads} = 0. @@ -550,7 +550,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. [Related commands:] "suffix"_suffix.html, "-pk" "command-line -setting"_Section_start.html#start_7 +setting"_Section_start.html#start_6 [Default:] @@ -558,9 +558,9 @@ For the GPU package, the default is Ngpu = 1 and the option defaults are neigh = yes, newton = off, binsize = 0.0, split = 1.0, gpuID = 0 to Ngpu-1, tpa = 1, and device = not used. These settings are made automatically if the "-sf gpu" "command-line -switch"_Section_start.html#start_7 is used. If it is not used, you +switch"_Section_start.html#start_6 is used. If it is not used, you must invoke the package gpu command in your input script or via the -"-pk gpu" "command-line switch"_Section_start.html#start_7. +"-pk gpu" "command-line switch"_Section_start.html#start_6. For the USER-INTEL package, the default is Nphi = 1 and the option defaults are omp = 0, mode = mixed, lrt = no, balance = -1, tpc = 4, @@ -569,21 +569,21 @@ style being used. This value is output to the screen in the offload report at the end of each run. Note that all of these settings, except "omp" and "mode", are ignored if LAMMPS was not built with Xeon Phi coprocessor support. These settings are made automatically -if the "-sf intel" "command-line switch"_Section_start.html#start_7 +if the "-sf intel" "command-line switch"_Section_start.html#start_6 is used. If it is not used, you must invoke the package intel command in your input script or or via the "-pk intel" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. For the KOKKOS package, the option defaults neigh = full, neigh/qeq = full, newton = off, binsize = 0.0, and comm = device. These settings are made automatically by the required "-k on" "command-line -switch"_Section_start.html#start_7. You can change them bu using the +switch"_Section_start.html#start_6. You can change them bu using the package kokkos command in your input script or via the "-pk kokkos" -"command-line switch"_Section_start.html#start_7. +"command-line switch"_Section_start.html#start_6. For the OMP package, the default is Nthreads = 0 and the option defaults are neigh = yes. These settings are made automatically if -the "-sf omp" "command-line switch"_Section_start.html#start_7 is +the "-sf omp" "command-line switch"_Section_start.html#start_6 is used. If it is not used, you must invoke the package omp command in your input script or via the "-pk omp" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. diff --git a/doc/src/pair_adp.txt b/doc/src/pair_adp.txt index 457a797d95..9d2a48dcbc 100644 --- a/doc/src/pair_adp.txt +++ b/doc/src/pair_adp.txt @@ -137,7 +137,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_agni.txt b/doc/src/pair_agni.txt index 06dcccb9d9..402e537dad 100644 --- a/doc/src/pair_agni.txt +++ b/doc/src/pair_agni.txt @@ -70,7 +70,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated style explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_airebo.txt b/doc/src/pair_airebo.txt index 0c03eb3267..e66ecb637f 100644 --- a/doc/src/pair_airebo.txt +++ b/doc/src/pair_airebo.txt @@ -185,7 +185,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_beck.txt b/doc/src/pair_beck.txt index 4e792754b8..e160f09b3d 100644 --- a/doc/src/pair_beck.txt +++ b/doc/src/pair_beck.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_born.txt b/doc/src/pair_born.txt index d38d9e3191..a3cc744a22 100644 --- a/doc/src/pair_born.txt +++ b/doc/src/pair_born.txt @@ -152,7 +152,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_brownian.txt b/doc/src/pair_brownian.txt index 33eed77629..79b71e91c7 100644 --- a/doc/src/pair_brownian.txt +++ b/doc/src/pair_brownian.txt @@ -85,7 +85,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "this section"_Section_accelerate.html of the manual for more diff --git a/doc/src/pair_buck.txt b/doc/src/pair_buck.txt index e705e735fb..d18b39d5d9 100644 --- a/doc/src/pair_buck.txt +++ b/doc/src/pair_buck.txt @@ -152,7 +152,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_buck_long.txt b/doc/src/pair_buck_long.txt index ba18738e4d..05e760e1b2 100644 --- a/doc/src/pair_buck_long.txt +++ b/doc/src/pair_buck_long.txt @@ -114,7 +114,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_charmm.txt b/doc/src/pair_charmm.txt index 1e78607c08..ef4ef41c95 100644 --- a/doc/src/pair_charmm.txt +++ b/doc/src/pair_charmm.txt @@ -195,7 +195,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_class2.txt b/doc/src/pair_class2.txt index 23b90aae2d..36fae5068b 100644 --- a/doc/src/pair_class2.txt +++ b/doc/src/pair_class2.txt @@ -114,7 +114,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_colloid.txt b/doc/src/pair_colloid.txt index a0df1d464e..83b15b358b 100644 --- a/doc/src/pair_colloid.txt +++ b/doc/src/pair_colloid.txt @@ -139,7 +139,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_comb.txt b/doc/src/pair_comb.txt index 3a2f380bfa..f5461b1cbc 100644 --- a/doc/src/pair_comb.txt +++ b/doc/src/pair_comb.txt @@ -124,7 +124,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_coul.txt b/doc/src/pair_coul.txt index 4a601e90c0..29e5beed3c 100644 --- a/doc/src/pair_coul.txt +++ b/doc/src/pair_coul.txt @@ -274,7 +274,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_dipole.txt b/doc/src/pair_dipole.txt index 985581cac8..2516e5eae4 100644 --- a/doc/src/pair_dipole.txt +++ b/doc/src/pair_dipole.txt @@ -198,7 +198,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_dpd.txt b/doc/src/pair_dpd.txt index 62a5faffed..9dd204ad2d 100644 --- a/doc/src/pair_dpd.txt +++ b/doc/src/pair_dpd.txt @@ -121,7 +121,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_eam.txt b/doc/src/pair_eam.txt index 4d3c2b2dea..ce8495affd 100644 --- a/doc/src/pair_eam.txt +++ b/doc/src/pair_eam.txt @@ -381,7 +381,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for more diff --git a/doc/src/pair_edip.txt b/doc/src/pair_edip.txt index 86453859d3..e5b1420b59 100644 --- a/doc/src/pair_edip.txt +++ b/doc/src/pair_edip.txt @@ -121,7 +121,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_eim.txt b/doc/src/pair_eim.txt index 3f068d4040..75ad2d4683 100644 --- a/doc/src/pair_eim.txt +++ b/doc/src/pair_eim.txt @@ -148,7 +148,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_gayberne.txt b/doc/src/pair_gayberne.txt index 8639f220a4..c923578586 100644 --- a/doc/src/pair_gayberne.txt +++ b/doc/src/pair_gayberne.txt @@ -145,7 +145,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_gran.txt b/doc/src/pair_gran.txt index 62a58b3504..d7e87af013 100644 --- a/doc/src/pair_gran.txt +++ b/doc/src/pair_gran.txt @@ -191,7 +191,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_gromacs.txt b/doc/src/pair_gromacs.txt index 3aca8c3cd3..ec84a2d57a 100644 --- a/doc/src/pair_gromacs.txt +++ b/doc/src/pair_gromacs.txt @@ -103,7 +103,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_hbond_dreiding.txt b/doc/src/pair_hbond_dreiding.txt index 9641e294fa..d3cf90ec14 100644 --- a/doc/src/pair_hbond_dreiding.txt +++ b/doc/src/pair_hbond_dreiding.txt @@ -178,7 +178,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_hybrid.txt b/doc/src/pair_hybrid.txt index 5166fe1f84..fc1824cf62 100644 --- a/doc/src/pair_hybrid.txt +++ b/doc/src/pair_hybrid.txt @@ -330,7 +330,7 @@ LAMMPS was built with those packages. See the You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj.txt b/doc/src/pair_lj.txt index 5c8e31ac42..058d54fb59 100644 --- a/doc/src/pair_lj.txt +++ b/doc/src/pair_lj.txt @@ -253,7 +253,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj96.txt b/doc/src/pair_lj96.txt index 6e7c3cbaec..83f6ec063d 100644 --- a/doc/src/pair_lj96.txt +++ b/doc/src/pair_lj96.txt @@ -61,7 +61,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_cubic.txt b/doc/src/pair_lj_cubic.txt index d33e3ec09b..4ca8c3c141 100644 --- a/doc/src/pair_lj_cubic.txt +++ b/doc/src/pair_lj_cubic.txt @@ -75,7 +75,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_expand.txt b/doc/src/pair_lj_expand.txt index c5f0c88a75..e0838426f6 100644 --- a/doc/src/pair_lj_expand.txt +++ b/doc/src/pair_lj_expand.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_long.txt b/doc/src/pair_lj_long.txt index da9f37b9c3..6be4562d18 100644 --- a/doc/src/pair_lj_long.txt +++ b/doc/src/pair_lj_long.txt @@ -168,7 +168,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_smooth.txt b/doc/src/pair_lj_smooth.txt index 133773abd0..b1678cad58 100644 --- a/doc/src/pair_lj_smooth.txt +++ b/doc/src/pair_lj_smooth.txt @@ -74,7 +74,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_smooth_linear.txt b/doc/src/pair_lj_smooth_linear.txt index a48c441f54..5f7c226cee 100644 --- a/doc/src/pair_lj_smooth_linear.txt +++ b/doc/src/pair_lj_smooth_linear.txt @@ -61,7 +61,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_soft.txt b/doc/src/pair_lj_soft.txt index e372092cf0..2ef133da55 100644 --- a/doc/src/pair_lj_soft.txt +++ b/doc/src/pair_lj_soft.txt @@ -219,7 +219,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lubricate.txt b/doc/src/pair_lubricate.txt index 501a043801..b39c7545c7 100644 --- a/doc/src/pair_lubricate.txt +++ b/doc/src/pair_lubricate.txt @@ -154,7 +154,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "this section"_Section_accelerate.html of the manual for more diff --git a/doc/src/pair_meam_spline.txt b/doc/src/pair_meam_spline.txt index 2295a6640b..6653b397a0 100644 --- a/doc/src/pair_meam_spline.txt +++ b/doc/src/pair_meam_spline.txt @@ -118,7 +118,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_morse.txt b/doc/src/pair_morse.txt index 5fbb6d5c0a..3eb5ac5afe 100644 --- a/doc/src/pair_morse.txt +++ b/doc/src/pair_morse.txt @@ -113,7 +113,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_nb3b_harmonic.txt b/doc/src/pair_nb3b_harmonic.txt index 3f7066c826..2395707fb4 100644 --- a/doc/src/pair_nb3b_harmonic.txt +++ b/doc/src/pair_nb3b_harmonic.txt @@ -104,7 +104,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_nm.txt b/doc/src/pair_nm.txt index 9096bdc523..81cea1a38d 100644 --- a/doc/src/pair_nm.txt +++ b/doc/src/pair_nm.txt @@ -145,7 +145,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_peri.txt b/doc/src/pair_peri.txt index 6ffd8122aa..6fef445595 100644 --- a/doc/src/pair_peri.txt +++ b/doc/src/pair_peri.txt @@ -151,7 +151,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_reaxc.txt b/doc/src/pair_reaxc.txt index cfa88673d7..b9dc6e0ed8 100644 --- a/doc/src/pair_reaxc.txt +++ b/doc/src/pair_reaxc.txt @@ -311,7 +311,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_resquared.txt b/doc/src/pair_resquared.txt index 2e0034ed3b..9ad95eb5fc 100644 --- a/doc/src/pair_resquared.txt +++ b/doc/src/pair_resquared.txt @@ -157,7 +157,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_sdk.txt b/doc/src/pair_sdk.txt index 1c348eaaf7..360136a4ea 100644 --- a/doc/src/pair_sdk.txt +++ b/doc/src/pair_sdk.txt @@ -97,7 +97,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_soft.txt b/doc/src/pair_soft.txt index ec1c06729a..08fa88c477 100644 --- a/doc/src/pair_soft.txt +++ b/doc/src/pair_soft.txt @@ -94,7 +94,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_sw.txt b/doc/src/pair_sw.txt index 6025b9b11b..6ed8f00236 100644 --- a/doc/src/pair_sw.txt +++ b/doc/src/pair_sw.txt @@ -156,7 +156,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. When using the USER-INTEL package with this style, there is an diff --git a/doc/src/pair_table.txt b/doc/src/pair_table.txt index 01c577cd98..b99491b477 100644 --- a/doc/src/pair_table.txt +++ b/doc/src/pair_table.txt @@ -229,7 +229,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_tersoff.txt b/doc/src/pair_tersoff.txt index 23a20ad0fd..918e889924 100644 --- a/doc/src/pair_tersoff.txt +++ b/doc/src/pair_tersoff.txt @@ -191,7 +191,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_tersoff_mod.txt b/doc/src/pair_tersoff_mod.txt index ff703063b3..e0c2b5a5cb 100644 --- a/doc/src/pair_tersoff_mod.txt +++ b/doc/src/pair_tersoff_mod.txt @@ -143,7 +143,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_tersoff_zbl.txt b/doc/src/pair_tersoff_zbl.txt index 18e54749aa..21d57e4e88 100644 --- a/doc/src/pair_tersoff_zbl.txt +++ b/doc/src/pair_tersoff_zbl.txt @@ -201,7 +201,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_thole.txt b/doc/src/pair_thole.txt index 61ca0b5c35..41a4059cee 100644 --- a/doc/src/pair_thole.txt +++ b/doc/src/pair_thole.txt @@ -142,7 +142,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_vashishta.txt b/doc/src/pair_vashishta.txt index 9c275a61d3..d9c66d45c0 100644 --- a/doc/src/pair_vashishta.txt +++ b/doc/src/pair_vashishta.txt @@ -183,7 +183,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_yukawa.txt b/doc/src/pair_yukawa.txt index 26acdb2ccb..61d6bde6a9 100644 --- a/doc/src/pair_yukawa.txt +++ b/doc/src/pair_yukawa.txt @@ -60,7 +60,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_yukawa_colloid.txt b/doc/src/pair_yukawa_colloid.txt index ecdc1496ab..2037a9451f 100644 --- a/doc/src/pair_yukawa_colloid.txt +++ b/doc/src/pair_yukawa_colloid.txt @@ -92,7 +92,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_zbl.txt b/doc/src/pair_zbl.txt index 154fdc1c13..5ab672171b 100644 --- a/doc/src/pair_zbl.txt +++ b/doc/src/pair_zbl.txt @@ -82,7 +82,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/partition.txt b/doc/src/partition.txt index 9c1d560c83..610eee99b3 100644 --- a/doc/src/partition.txt +++ b/doc/src/partition.txt @@ -27,7 +27,7 @@ partition yes 6* fix all nvt temp 1.0 1.0 0.1 :pre This command invokes the specified command on a subset of the partitions of processors you have defined via the -partition -command-line switch. See "Section 2.6"_Section_start.html#start_7 +command-line switch. See "Section 2.6"_Section_start.html#start_6 for an explanation of the switch. Normally, every input script command in your script is invoked by @@ -49,7 +49,7 @@ argument. Partitions are numbered from 1 to Np, where Np is the number of partitions specified by the "-partition command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. {N} can be specified in one of two ways. An explicit numeric value can be used, as in the 1st example above. Or a wild-card asterisk can diff --git a/doc/src/prd.txt b/doc/src/prd.txt index 247d422b1c..3c0305e316 100644 --- a/doc/src/prd.txt +++ b/doc/src/prd.txt @@ -63,7 +63,7 @@ event to occur. Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the -partition command-line -switch; see "Section 2.7"_Section_start.html#start_7 of the manual. +switch; see "Section 2.6"_Section_start.html#start_6 of the manual. Note that if you have MPI installed, you can run a multi-replica simulation with more replicas (partitions) than you have physical processors, e.g you can run a 10-replica simulation on one or two diff --git a/doc/src/processors.txt b/doc/src/processors.txt index 781049af9c..e54b2cede3 100644 --- a/doc/src/processors.txt +++ b/doc/src/processors.txt @@ -82,7 +82,7 @@ sub-domain. Also note that if multiple partitions are being used then P is the number of processors in this partition; see "this -section"_Section_start.html#start_7 for an explanation of the +section"_Section_start.html#start_6 for an explanation of the -partition command-line switch. Also note that you can prefix the processors command with the "partition"_partition.html command to easily specify different Px,Py,Pz values for different partitions. @@ -249,7 +249,7 @@ partition {Precv} which is enforced when each is setting up their own mapping of their processors to the simulation box. Each of {Psend} and {Precv} must be integers from 1 to Np, where Np is the number of partitions you have defined via the "-partition command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. A "dependency" means that the sending partition will create its regular 3d grid as Px by Py by Pz and after it has done this, it will @@ -286,7 +286,7 @@ processors and their mapping to the 3d grid to the specified file processors in the manner you desired, which can be tricky to figure out, especially when running on multiple partitions or on, a multicore machine or when the processor ranks were reordered by use of the -"-reorder command-line switch"_Section_start.html#start_7 or due to +"-reorder command-line switch"_Section_start.html#start_6 or due to use of MPI-specific launch options such as a config file. If you have multiple partitions you should insure that each one writes @@ -300,9 +300,9 @@ The IDs are the processor's rank in this simulation (the world), the universe (of multiple simulations), and the original MPI communicator used to instantiate LAMMPS, respectively. The world and universe IDs will only be different if you are running on more than one partition; -see the "-partition command-line switch"_Section_start.html#start_7. +see the "-partition command-line switch"_Section_start.html#start_6. The universe and original IDs will only be different if you used the -"-reorder command-line switch"_Section_start.html#start_7 to reorder +"-reorder command-line switch"_Section_start.html#start_6 to reorder the processors differently than their rank in the original communicator LAMMPS was instantiated with. @@ -332,7 +332,7 @@ The {part} keyword (for the receiving partition) only works with the [Related commands:] -"partition"_partition.html, "-reorder command-line switch"_Section_start.html#start_7 +"partition"_partition.html, "-reorder command-line switch"_Section_start.html#start_6 [Default:] diff --git a/doc/src/read_data.txt b/doc/src/read_data.txt index 6785eb1066..a8aca53693 100644 --- a/doc/src/read_data.txt +++ b/doc/src/read_data.txt @@ -62,7 +62,7 @@ simulation. The file can be ASCII text or a gzipped text file atom coordinates; see the "read_restart"_read_restart.html and "create_atoms"_create_atoms.html commands for alternative methods. Also see the explanation of the "-restart command-line -switch"_Section_start.html#start_7 which can convert a restart file to +switch"_Section_start.html#start_6 which can convert a restart file to a data file. This command can be used multiple times to add new atoms and their diff --git a/doc/src/read_restart.txt b/doc/src/read_restart.txt index d0f4b16175..d1091542b8 100644 --- a/doc/src/read_restart.txt +++ b/doc/src/read_restart.txt @@ -81,7 +81,7 @@ wrong. Because restart files are binary, they may not be portable to other machines. In this case, you can use the "-restart command-line -switch"_Section_start.html#start_7 to convert a restart file to a data +switch"_Section_start.html#start_6 to convert a restart file to a data file. Similar to how restart files are written (see the diff --git a/doc/src/region.txt b/doc/src/region.txt index 885e5e45f8..5039e4a516 100644 --- a/doc/src/region.txt +++ b/doc/src/region.txt @@ -375,7 +375,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/restart.txt b/doc/src/restart.txt index 5e0c2a9ea5..7c39ae1404 100644 --- a/doc/src/restart.txt +++ b/doc/src/restart.txt @@ -125,7 +125,7 @@ Restart files can be read by a "read_restart"_read_restart.html command to restart a simulation from a particular state. Because the file is binary (to enable exact restarts), it may not be readable on another machine. In this case, you can use the "-r command-line -switch"_Section_start.html#start_7 to convert a restart file to a data +switch"_Section_start.html#start_6 to convert a restart file to a data file. NOTE: Although the purpose of restart files is to enable restarting a diff --git a/doc/src/run_style.txt b/doc/src/run_style.txt index a67899420b..ba836a07dd 100644 --- a/doc/src/run_style.txt +++ b/doc/src/run_style.txt @@ -69,7 +69,7 @@ The {verlet} style is a standard velocity-Verlet integrator. The {verlet/split} style is also a velocity-Verlet integrator, but it splits the force calculation within each timestep over 2 partitions of -processors. See "Section 2.7"_Section_start.html#start_7 for an +processors. See "Section 2.6"_Section_start.html#start_6 for an explanation of the -partition command-line switch. Specifically, this style performs all computation except the @@ -115,7 +115,7 @@ When you run in 2-partition mode with the {verlet/split} style, the thermodynamic data for the entire simulation will be output to the log and screen file of the 1st partition, which are log.lammps.0 and screen.0 by default; see the "-plog and -pscreen command-line -switches"_Section_start.html#start_7 to change this. The log and +switches"_Section_start.html#start_6 to change this. The log and screen file for the 2nd partition will not contain thermodynamic output beyond the 1st timestep of the run. @@ -259,7 +259,7 @@ Accelerated styles take the same arguments and should produce the same results, except for round-off and precision issues. You can specify {respa/omp} explicitly in your input script, or -you can use the "-suffix command-line switch"_Section_start.html#start_7 +you can use the "-suffix command-line switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. diff --git a/doc/src/suffix.txt b/doc/src/suffix.txt index 127719cdb5..7a4adb50b6 100644 --- a/doc/src/suffix.txt +++ b/doc/src/suffix.txt @@ -28,7 +28,7 @@ suffix kk :pre This command allows you to use variants of various styles if they exist. In that respect it operates the same as the "-suffix -command-line switch"_Section_start.html#start_7. It also has options +command-line switch"_Section_start.html#start_6. It also has options to turn off or back on any suffix setting made via the command line. The specified style can be {gpu}, {intel}, {kk}, {omp}, {opt} or @@ -105,6 +105,6 @@ input script. [Related commands:] -"Command-line switch -suffix"_Section_start.html#start_7 +"Command-line switch -suffix"_Section_start.html#start_6 [Default:] none diff --git a/doc/src/temper.txt b/doc/src/temper.txt index be7edfba43..b1c47c8076 100644 --- a/doc/src/temper.txt +++ b/doc/src/temper.txt @@ -32,7 +32,7 @@ replicas (ensembles) of a system. Two or more replicas must be used. Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the -partition command-line -switch; see "Section 2.7"_Section_start.html#start_7 of the +switch; see "Section 2.6"_Section_start.html#start_6 of the manual. Note that if you have MPI installed, you can run a multi-replica simulation with more replicas (partitions) than you have physical processors, e.g you can run a 10-replica simulation on one or @@ -70,7 +70,7 @@ As a tempering run proceeds, multiple log files and screen output files are created, one per replica. By default these files are named log.lammps.M and screen.M where M is the replica number from 0 to N-1, with N = # of replicas. See the "section on command-line -switches"_Section_start.html#start_7 for info on how to change these +switches"_Section_start.html#start_6 for info on how to change these names. The main screen and log file (log.lammps) will list information about diff --git a/doc/src/thermo_style.txt b/doc/src/thermo_style.txt index 36ec7bf12e..6102169ee3 100644 --- a/doc/src/thermo_style.txt +++ b/doc/src/thermo_style.txt @@ -255,7 +255,7 @@ The {part} keyword is useful for multi-replica or multi-partition simulations to indicate which partition this output and this file corresponds to, or for use in a "variable"_variable.html to append to a filename for output specific to this partition. See "Section -2.7"_Section_start.html#start_7 of the manual for details on running +2.6"_Section_start.html#start_6 of the manual for details on running in multi-partition mode. The {timeremain} keyword returns the remaining seconds when a diff --git a/doc/src/timer.txt b/doc/src/timer.txt index 39a6c542b7..768c3e1353 100644 --- a/doc/src/timer.txt +++ b/doc/src/timer.txt @@ -40,7 +40,7 @@ time is spent in different sections of the code and thus can provide information for determining performance and load imbalance problems. This can be done at different levels of detail and accuracy. For more information about the timing output, see this "discussion of screen -output in Section 2.8"_Section_start.html#start_8. +output in Section 2.7"_Section_start.html#start_7. The {off} setting will turn all time measurements off. The {loop} setting will only measure the total time for a run and not collect any diff --git a/doc/src/variable.txt b/doc/src/variable.txt index e32e82ef4d..e3b7c5de0d 100644 --- a/doc/src/variable.txt +++ b/doc/src/variable.txt @@ -178,7 +178,7 @@ This means variables can NOT be re-defined in an input script (with two exceptions, read further). This is to allow an input script to be processed multiple times without resetting the variables; see the "jump"_jump.html or "include"_include.html commands. It also means -that using the "command-line switch"_Section_start.html#start_7 -var +that using the "command-line switch"_Section_start.html#start_6 -var will override a corresponding index variable setting in the input script. @@ -248,7 +248,7 @@ variable. {Index} style variables with a single string value can also be set by using the command-line switch -var; see "this -section"_Section_start.html#start_7 for details. +section"_Section_start.html#start_6 for details. The {loop} style is identical to the {index} style except that the strings are the integers from 1 to N inclusive, if only one argument N @@ -264,7 +264,7 @@ N1 <= N2 and N2 >= 0 is required. For the {world} style, one or more strings are specified. There must be one string for each processor partition or "world". See "this -section"_Section_start.html#start_7 of the manual for information on +section"_Section_start.html#start_6 of the manual for information on running LAMMPS with multiple partitions via the "-partition" command-line switch. This variable command assigns one string to each world. All processors in the world are assigned the same string. The @@ -277,7 +277,7 @@ different partitions. For the {universe} style, one or more strings are specified. There must be at least as many strings as there are processor partitions or -"worlds". See "this page"_Section_start.html#start_7 for information +"worlds". See "this page"_Section_start.html#start_6 for information on running LAMMPS with multiple partitions via the "-partition" command-line switch. This variable command initially assigns one string to each world. When a "next"_next.html command is encountered diff --git a/doc/src/write_data.txt b/doc/src/write_data.txt index 033199e98b..39e5a7f811 100644 --- a/doc/src/write_data.txt +++ b/doc/src/write_data.txt @@ -59,7 +59,7 @@ If you want to do more exact restarts, using binary files, see the "restart"_restart.html, "write_restart"_write_restart.html, and "read_restart"_read_restart.html commands. You can also convert binary restart files to text data files, after a simulation has run, -using the "-r command-line switch"_Section_start.html#start_7. +using the "-r command-line switch"_Section_start.html#start_6. NOTE: Only limited information about a simulation is stored in a data file. For example, no information about atom "groups"_group.html and diff --git a/doc/src/write_restart.txt b/doc/src/write_restart.txt index 8160eec3df..ff3b652dba 100644 --- a/doc/src/write_restart.txt +++ b/doc/src/write_restart.txt @@ -66,7 +66,7 @@ Restart files can be read by a "read_restart"_read_restart.html command to restart a simulation from a particular state. Because the file is binary (to enable exact restarts), it may not be readable on another machine. In this case, you can use the "-r command-line -switch"_Section_start.html#start_7 to convert a restart file to a data +switch"_Section_start.html#start_6 to convert a restart file to a data file. NOTE: Although the purpose of restart files is to enable restarting a diff --git a/src/Make.py b/src/Make.py deleted file mode 100755 index 3030183e1a..0000000000 --- a/src/Make.py +++ /dev/null @@ -1,2378 +0,0 @@ -#!/usr/bin/env python2 - -# Make.py tool for managing packages and their auxiliary libs, -# auto-editing machine Makefiles, and building LAMMPS -# Syntax: Make.py -h (for help) -# Notes: should be compatible with python 2.7 and 3.x thanks to 'futurize' - -from __future__ import print_function -import sys,os,re,copy,subprocess,platform - -# switch abbrevs -# switch classes = created class for each switch -# lib classes = auxiliary package libs -# build classes = build options with defaults -# make classes = makefile options with no defaults -# setargs = makefile settings -# actionargs = allowed actions (also lib-dir and machine) -# lib build flags are set if lib is built, for use with zoutput - -abbrevs = "adhjmoprsvz" - -switchclasses = ("actions","dir","help","jmake","makefile", - "output","packages","redo","settings","verbose","zoutput") -libclasses = ("atc","awpmd","colvars","cuda","gpu","h5md", - "meam","poems","python","qmmm","reax","voronoi") -buildclasses = ("intel","kokkos") -makeclasses = ("cc","flags","mpi","fft","jpg","png") - -setargs = ("gzip","#gzip","ffmpeg","#ffmpeg","smallbig","bigbig", - "smallsmall","exceptions","#exceptions") -actionargs = ("lib-all","file","clean","exe") - -gpubuildflag = 0 - -# ---------------------------------------------------------------- -# functions -# ---------------------------------------------------------------- - -# if flag = 1, print txt and exit -# if flag = 0, print txt as warning and do not exit - -def error(txt,flag=1): - if flag: - print("ERROR:",txt) - sys.exit() - else: - print("WARNING:",txt) - -# store command-line args as sw = dict of key/value -# key = switch word, value = list of following args -# order = list of switches in order specified -# enforce no switch more than once - -def parse_args(args): - narg = len(args) - sw = {} - order = [] - iarg = 0 - while iarg < narg: - if args[iarg][0] != '-': error("Arg %s is not a switch" % args[iarg]) - switch = args[iarg][1:] - if switch in sw: error("Duplicate switch %s" % args[iarg]) - order.append(switch) - first = iarg+1 - last = first - while last < narg and args[last][0] != '-': last += 1 - sw[switch] = args[first:last] - iarg = last - return sw,order - -# convert info in switches dict back to a string, in switch_order - -def switch2str(switches,switch_order): - txt = "" - for switch in switch_order: - if txt: txt += ' ' - txt += "-%s" % switch - txt += ' ' + ' '.join(switches[switch]) - return txt - -# check if compiler works with ccflags on dummy one-line tmpauto.cpp file -# return 1 if successful, else 0 -# warn = 1 = print warning if not successful, warn = 0 = no warning -# NOTE: unrecognized -override-limits can leave verride-limits file - -def compile_check(compiler,ccflags,warn): - open("tmpauto.cpp",'w').write("int main(int, char **) {}\n") - tmp = "%s %s -c tmpauto.cpp" % (compiler,ccflags) - try: txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT, - shell=True).decode() - except subprocess.CalledProcessError as e: txt = e.output - flag = 1 - if txt or not os.path.isfile("tmpauto.o"): - flag = 0 - if warn: - print(tmp) - if txt: print(txt) - else: print("compile produced no output") - os.remove("tmpauto.cpp") - if os.path.isfile("tmpauto.o"): os.remove("tmpauto.o") - return flag - -# check if linker works with linkflags and libs on tmpauto.o file -# return 1 if successful, else 0 -# warn = 1 = print warning if not successful, warn = 0 = no warning - -def link_check(linker,linkflags,libs,warn): - open("tmpauto.cpp",'w').write("int main(int, char **) {}\n") - tmp = "%s %s -o tmpauto tmpauto.cpp %s" % (linker,linkflags,libs) - try: txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT, - shell=True).decode() - except subprocess.CalledProcessError as e: txt = e.output - flag = 1 - if txt or not os.path.isfile("tmpauto"): - flag = 0 - if warn: - print(tmp) - if txt: print(txt) - else: print("link produced no output") - os.remove("tmpauto.cpp") - if os.path.isfile("tmpauto"): os.remove("tmpauto") - return flag - -# ---------------------------------------------------------------- -# switch classes, one per single-letter switch -# ---------------------------------------------------------------- - -# actions - -class Actions(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --a action1 action2 ... - possible actions = lib-all, lib-dir, file, clean, exe or machine - machine is a Makefile.machine suffix - actions can be specified in any order - each action can appear only once - lib-dir can appear multiple times for different dirs - some actions depend on installed packages - installed packages = currently installed + result of -p switch - actions are invoked in this order, independent of specified order - (1) lib-all or lib-dir = build auxiliary libraries - lib-all builds all auxiliary libs needed by installed packages - lib-dir builds a specific lib whether package installed or not - dir is any dir in lib directory (atc, cuda, meam, etc) except linalg - (2) file = create a new src/MAKE/MINE/Makefile.auto - if file not specified, existing Makefile.auto is NOT changed - except by -m switch, which will copy Makefile.machine to Makefile.auto - note that exe action can add an -m switch, as described below - if file is specified, new Makefile.auto is created - if "-m machine" specified (or added by exe), - start with existing Makefile.machine, else existing Makefile.auto - if "-m none" specified, start Makefile.auto from scratch - must use -cc and -mpi switches to specify compiler and MPI - settings for these switches will alter Makefile.auto - -s, -intel, -kokkos, -cc, -mpi, -fft, -jpg, -png - if these accelerator packages are installed, they induce settings - that will alter Makefile.auto: opt, user-omp, user-intel, kokkos - use -z switch to copy final Makefile.auto to new filename - (3) clean = invoke "make clean-auto" to insure clean build on current files - useful if compiler flags have changed - (4) exe or machine = build LAMMPS - machine can be any existing Makefile.machine suffix - machine is converted to "exe" action, and additionally: - "-m machine" is added if -m switch is not specified - "-o machine" is added if -o switch is not specified - if either "-m" or "-o" are specified, they are not overridden - does not invoke any lib builds, since libs could be previously built - exe ALWAYS builds using src/MAKE/MINE/Makefile.auto - if file action also specified, it creates a new Makefile.auto - else if -m switch specified, - existing Makefile.machine is copied to create Makefile.auto - else Makefile.auto must already exist and is not changed - build produces src/lmp_auto, or error message if unsuccessful - use -o switch to copy src/lmp_auto to new filename - use -z switch to copy src/MAKE/MINE/Makefile.auto to new filename -""" - - def check(self): - if not self.inlist: error("-a args are invalid") - libs = [] - cleans = [] - files = [] - exes = [] - for one in self.inlist: - if one.startswith("lib-"): - lib = one[4:] - if lib != "all" and lib not in libclasses: error("Actions are invalid") - libs.append(one) - elif one == "file": - files.append(one) - elif one == "clean": - cleans.append(one) - elif one == "exe": - exes.append(one) - # one action can be unknown, must be a machine (checked in setup) - else: - exes.append(one) - if len(set(libs)) != len(libs) or \ - len(cleans) > 1 or len(files) > 1 or len(exes) > 1: - error("Actions are invalid") - self.alist = [action for actions in [libs,cleans,files,exes] \ - for action in actions] - - # dedup list of actions concatenated from two lists - # current self.inlist = specified -a switch + redo command -a switch - # specified exe/machine action replaces redo exe/machine action - # operates on and replaces self.inlist - - def dedup(self): - alist = [] - exemachine = 0 - for one in self.inlist: - if one == "exe" or (one not in actionargs and not one.startswith("lib-")): - if exemachine: continue - exemachine = 1 - if one not in alist: alist.append(one) - self.inlist = alist - - # if last action is unknown, assume machine and convert to exe - # only done if action is a suffix for an existing Makefile.machine - # return machine if conversion done, else None - - def setup(self): - machine = self.alist[-1] - if machine in actionargs or machine.startswith("lib-"): return None - make = MakeReader(machine,2) - self.alist[-1] = "exe" - return machine - - # build one or more auxiliary package libraries - - def lib(self,suffix): - if suffix != "all": - print("building",suffix,"library ...") - txt = "%s.build()" % suffix - exec(txt) - else: - final = packages.final - for one in packages.lib: - if final[one]: - if "user" in one: pkg = one[5:] - else: pkg = one - print("building",pkg,"library ...") - txt = "%s.build()" % pkg - exec(txt) - - # read Makefile.machine - # if caller = "file", edit via switches - # if caller = "exe", just read - # write out new Makefile.auto - - def file(self,caller): - - # if caller="file", create from mpi or read from Makefile.machine or auto - # if caller="exe" and "file" action already invoked, read from auto - # if caller="exe" and no "file" action, read from Makefile.machine or auto - - if caller == "file": - if makefile and makefile.machine == "none": - if cc and mpi: machine = "mpi" - else: error("Cannot create makefile unless -cc and -mpi are used") - elif makefile: machine = makefile.machine - else: machine = "auto" - elif caller == "exe" and "file" in self.alist: - machine = "auto" - elif caller == "exe" and "file" not in self.alist: - if makefile and makefile.machine == "none": - error("Cannot build with makefile = none") - elif makefile: machine = makefile.machine - else: machine = "auto" - - make = MakeReader(machine,1) - - # change makefile settings to user specifications - - precompiler = "" - if caller == "file": - - # add compiler/linker and default CCFLAGS,LINKFLAGS - # if cc.wrap, add wrapper setting for mpi = ompi/mpich - # precompiler = env variable setting for OpenMPI wrapper compiler - - if cc: - make.setvar("CC",cc.compiler) - make.setvar("LINK",cc.compiler) - if cc.wrap: - if cc.wrap == "nvcc": - wrapper = os.path.abspath("../lib/kokkos/config/nvcc_wrapper") - else: wrapper = cc.wrap - abbrev = cc.abbrev - if abbrev == "mpi": - if cc.parent == "mpich": - make.addvar("CC","-cxx=%s" % wrapper) - make.addvar("LINK","-cxx=%s" % wrapper) - elif cc.parent == "openmpi": - make.addvar("export OMPI_CXX",wrapper,"cc") - precompiler = "env OMPI_CXX=%s " % wrapper - else: error("Could not add MPI wrapper compiler, " + - "did not recognize OpenMPI or MPICH") - make.setvar("CCFLAGS","-g") - make.addvar("CCFLAGS","-O3") - make.setvar("LINKFLAGS","-g") - make.addvar("LINKFLAGS","-O") - - # add MPI settings - - if mpi: - make.delvar("MPI_INC","*") - make.delvar("MPI_PATH","*") - make.delvar("MPI_LIB","*") - if mpi.style == "mpi": - make.addvar("MPI_INC","-DMPICH_SKIP_MPICXX") - make.addvar("MPI_INC","-DOMPI_SKIP_MPICXX=1") - elif mpi.style == "mpich": - make.addvar("MPI_INC","-DMPICH_SKIP_MPICXX") - make.addvar("MPI_INC","-DOMPI_SKIP_MPICXX=1") - if mpi.dir: make.addvar("MPI_INC","-I%s/include" % mpi.dir) - if mpi.dir: make.addvar("MPI_PATH","-L%s/lib" % mpi.dir) - make.addvar("MPI_LIB","-lmpich") - make.addvar("MPI_LIB","-lmpl") - make.addvar("MPI_LIB","-lpthread") - elif mpi.style == "ompi": - make.addvar("MPI_INC","-DMPICH_SKIP_MPICXX") - make.addvar("MPI_INC","-DOMPI_SKIP_MPICXX=1") - if mpi.dir: make.addvar("MPI_INC","-I%s/include" % mpi.dir) - if mpi.dir: make.addvar("MPI_PATH","-L%s/lib" % mpi.dir) - make.addvar("MPI_LIB","-lmpi") - make.addvar("MPI_LIB","-lmpi_cxx") - elif mpi.style == "serial": - make.addvar("MPI_INC","-I../STUBS") - make.addvar("MPI_PATH","-L../STUBS") - make.addvar("MPI_LIB","-lmpi_stubs") - - # add accelerator package CCFLAGS and LINKFLAGS and variables - - compiler = precompiler + ' '.join(make.getvar("CC")) - linker = precompiler + ' '.join(make.getvar("LINK")) - - final = packages.final - if final["opt"]: - if compile_check(compiler,"-restrict",0): - make.addvar("CCFLAGS","-restrict") - - if final["user-omp"]: - if compile_check(compiler,"-fopenmp",1): - make.addvar("CCFLAGS","-fopenmp") - make.addvar("LINKFLAGS","-fopenmp") - if compile_check(compiler,"-restrict",0): - make.addvar("CCFLAGS","-restrict") - - if final["user-intel"]: - if intel.mode == "cpu": - make.delvar("CCFLAGS","-O*") - make.addvar("CCFLAGS","-O2") - if compile_check(compiler,"-openmp",1): - make.addvar("CCFLAGS","-openmp") - if compile_check(compiler,"-restrict",1): - make.addvar("CCFLAGS","-restrict") - if compile_check(compiler,"-no-offload",1): - make.addvar("CCFLAGS","-no-offload") - if compile_check(compiler,"-fno-alias",1): - make.addvar("CCFLAGS","-fno-alias") - if compile_check(compiler,"-ansi-alias",1): - make.addvar("CCFLAGS","-ansi-alias") - if compile_check(compiler,"-xAVX",1): - make.addvar("CCFLAGS","-xAVX") - if compile_check(compiler,"-fp-model fast=2",1): - make.addvar("CCFLAGS","-fp-model fast=2") - if compile_check(compiler,"-no-prec-div",1): - make.addvar("CCFLAGS","-no-prec-div") - if compile_check(compiler,"-override-limits",1): - make.addvar("CCFLAGS","-override-limits") - make.addvar("CCFLAGS","-DLAMMPS_MEMALIGN=64") - make.delvar("CCFLAGS","-DLMP_INTEL_OFFLOAD") - - make.delvar("LINKFLAGS","-O*") - make.addvar("LINKFLAGS","-O2") - if link_check(linker,"-openmp","",1): - make.addvar("LINKFLAGS","-openmp") - if link_check(linker,"-xAVX","",1): - make.addvar("LINKFLAGS","-xAVX") - if link_check(linker,"-fpmodel fast=2","",1): - make.addvar("LINKFLAGS","-fpmodel fast=2") - if link_check(linker,"-no-prec-div","",1): - make.addvar("LINKFLAGS","-no-prec-div") - if link_check(linker,"-override-limits","",1): - make.addvar("LINKFLAGS","-override-limits") - make.delvar("LINKFLAGS","-offload") - - if link_check(linker,"","-ltbbmalloc",1): - make.addvar("LIB","-ltbbmalloc") - if link_check(linker,"","-ltbbmalloc_proxy",1): - make.addvar("LIB","-ltbbmalloc_proxy") - - elif intel.mode == "phi": - if compile_check(compiler,"-fopenmp",1): - make.addvar("CCFLAGS","-fopenmp") - make.addvar("LINKFLAGS","-fopenmp") - make.addvar("CCFLAGS","-DLAMMPS_MEMALIGN=64") - if compile_check(compiler,"-restrict",1): - make.addvar("CCFLAGS","-restrict") - if compile_check(compiler,"-xHost",1): - make.addvar("CCFLAGS","-xHost") - make.addvar("CCFLAGS","-DLMP_INTEL_OFFLOAD") - if compile_check(compiler,"-fno-alias",1): - make.addvar("CCFLAGS","-fno-alias") - if compile_check(compiler,"-ansi-alias",1): - make.addvar("CCFLAGS","-ansi-alias") - if compile_check(compiler,"-override-limits",1): - make.addvar("CCFLAGS","-override-limits") - if compile_check(compiler,'-offload-option,mic,compiler,' + - '"-fp-model fast=2 -mGLOB_default_function_attrs=' + - '\\"gather_scatter_loop_unroll=4\\""',1): - make.addvar("CCFLAGS",'-offload-option,mic,compiler,' + - '"-fp-model fast=2 -mGLOB_default_function_attrs=' + - '\\"gather_scatter_loop_unroll=4\\""') - if link_check(linker,"-offload","",1): - make.addvar("LINKFLAGS","-offload") - - if final["kokkos"]: - if kokkos.mode == "omp": - make.delvar("KOKKOS_DEVICES","*") - make.delvar("KOKKOS_ARCH","*") - make.addvar("KOKKOS_DEVICES","OpenMP","lmp") - if kokkos.archcpu: - make.addvar("KOKKOS_ARCH",kokkos.archcpu,"lmp") - elif kokkos.mode == "cuda": - make.delvar("KOKKOS_DEVICES","*") - make.delvar("KOKKOS_ARCH","*") - make.addvar("KOKKOS_DEVICES","Cuda, OpenMP","lmp") - if kokkos.archgpu: - if kokkos.archgpu[0] == "3": value = "Kepler" + kokkos.archgpu - elif kokkos.archgpu[0] == "2": value = "Fermi" + kokkos.archgpu - else: error("Unrecognized Kokkos archgpu setting") - if kokkos.archcpu: value += ", %s" % kokkos.archcpu - make.addvar("KOKKOS_ARCH",value,"lmp") - elif kokkos.mode == "phi": - make.delvar("KOKKOS_DEVICES","*") - make.delvar("KOKKOS_ARCH","*") - make.addvar("KOKKOS_DEVICES","OpenMP","lmp") - make.addvar("KOKKOS_ARCH","KNC","lmp") - - # add LMP_INC ifdef settings - - if settings: - list = settings.inlist - for one in list: - if one == "gzip": make.addvar("LMP_INC","-DLAMMPS_GZIP") - elif one == "#gzip": make.delvar("LMP_INC","-DLAMMPS_GZIP") - elif one == "ffmpeg": make.addvar("LMP_INC","-DLAMMPS_FFMPEG") - elif one == "#ffmpeg": make.delvar("LMP_INC","-DLAMMPS_FFMPEG") - elif one == "smallbig": - make.delvar("LMP_INC","-DLAMMPS_BIGBIG") - make.delvar("LMP_INC","-DLAMMPS_SMALLSMALL") - elif one == "bigbig": - make.delvar("LMP_INC","-DLAMMPS_SMALLBIG") - make.delvar("LMP_INC","-DLAMMPS_SMALLSMALL") - make.addvar("LMP_INC","-DLAMMPS_BIGBIG") - elif one == "smallsmall": - make.delvar("LMP_INC","-DLAMMPS_SMALLBIG") - make.delvar("LMP_INC","-DLAMMPS_BIGBIG") - make.addvar("LMP_INC","-DLAMMPS_SMALLSMALL") - elif one == "exceptions": make.addvar("LMP_INC","-DLAMMPS_EXCEPTIONS") - elif one == "#exception": make.delvar("LMP_INC","-DLAMMPS_EXCEPTIONS") - - # add FFT, JPG, PNG settings - - if fft: - make.delvar("FFT_INC","*") - make.delvar("FFT_PATH","*") - make.delvar("FFT_LIB","*") - if fft.mode == "none": make.addvar("FFT_INC","-DFFT_NONE") - else: - make.addvar("FFT_INC","-DFFT_%s" % fft.mode.upper()) - make.addvar("FFT_LIB",fft.lib) - if fft.dir: - make.addvar("FFT_INC","-I%s/include" % fft.dir) - make.addvar("FFT_PATH","-L%s/lib" % fft.dir) - else: - if fft.incdir: make.addvar("FFT_INC","-I%s" % fft.incdir) - if fft.libdir: make.addvar("FFT_PATH","-L%s" % fft.libdir) - - if jpg: - if jpg.on == 0: - make.delvar("LMP_INC","-DLAMMPS_JPEG") - make.delvar("JPG_LIB","-ljpeg") - else: - make.addvar("LMP_INC","-DLAMMPS_JPEG") - make.addvar("JPG_LIB","-ljpeg") - if jpg.dir: - make.addvar("JPG_INC","-I%s/include" % jpg.dir) - make.addvar("JPG_PATH","-L%s/lib" % jpg.dir) - else: - if jpg.incdir: make.addvar("JPG_INC","-I%s" % jpg.incdir) - if jpg.libdir: make.addvar("JPG_PATH","-L%s" % jpg.libdir) - - if png: - if png.on == 0: - make.delvar("LMP_INC","-DLAMMPS_PNG") - make.delvar("JPG_LIB","-lpng") - else: - make.addvar("LMP_INC","-DLAMMPS_PNG") - make.addvar("JPG_LIB","-lpng") - if png.dir: - make.addvar("JPG_INC","-I%s/include" % png.dir) - make.addvar("JPG_PATH","-L%s/lib" % png.dir) - else: - if png.incdir: make.addvar("JPG_INC","-I%s" % png.incdir) - if png.libdir: make.addvar("JPG_PATH","-L%s" % png.libdir) - - # finally after all other settings, add explicit flags - - if flags: - for var,action,flist in flags.flags: - values = make.getvar(var) - if values == None: - error("Flags for a non-existent Makefile.auto variable") - for flag in flist: - flag = "-" + flag - if action == "add": make.addvar(var,flag) - elif action == "del": make.delvar(var,flag) - - # set self.stubs if Makefile.auto uses STUBS lib in MPI settings - - if make.getvar("MPI_LIB") and "-lmpi_stubs" in make.getvar("MPI_LIB"): - self.stubs = 1 - else: self.stubs = 0 - - # write out Makefile.auto - # unless caller = "exe" and "file" action already invoked - - if caller == "file" or "file" not in self.alist: - # make certain that 'MAKE/MINE' folder exists. - subprocess.check_output("mkdir -p %s/MAKE/MINE" % dir.src, - stderr=subprocess.STDOUT,shell=True) - make.write("%s/MAKE/MINE/Makefile.auto" % dir.src,1) - print("Created src/MAKE/MINE/Makefile.auto") - - # test full compile and link - # unless caller = "file" and "exe" action will be invoked later - - if caller == "file" and "exe" in self.alist: return - compiler = precompiler + ' '.join(make.getvar("CC")) - ccflags = ' '.join(make.getvar("CCFLAGS")) - linker = precompiler + ' '.join(make.getvar("LINK")) - linkflags = ' '.join(make.getvar("LINKFLAGS")) - libs = ' '.join(make.getvar("LIB")) - if not compile_check(compiler,ccflags,1): - error("Test of compilation failed") - if not link_check(linker,linkflags,libs,1): error("Test of link failed") - - # invoke "make clean-auto" to force clean before build - - def clean(self): - txt = "cd %s; make clean-auto" % dir.src - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Performed make clean-auto") - - # build LAMMPS using Makefile.auto and -j setting - # invoke self.file() first, to test makefile compile/link - # delete existing lmp_auto, so can detect if build fails - # build STUBS lib (if unbuilt) if Makefile.auto MPI settings need it - - def exe(self): - self.file("exe") - subprocess.check_output("cd %s; rm -f lmp_auto" % dir.src,stderr=subprocess.STDOUT,shell=True) - if self.stubs and not os.path.isfile("%s/STUBS/libmpi_stubs.a" % dir.src): - print("building serial STUBS library ...") - tmp = "cd %s/STUBS; make clean; make" % dir.src - txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True).decode() - if not os.path.isfile("%s/STUBS/libmpi_stubs.a" % dir.src): - print(txt) - error('Unsuccessful "make stubs"') - print("Created src/STUBS/libmpi_stubs.a") - - # special hack for shannon GPU cluster - # must use "srun make" if on it and building w/ GPU package, else just make - # this is b/c Cuda libs are not all available on host - - make = "make" - if "shannon" == platform.node() and packages.final["gpu"]: - make = "srun make" - - if jmake: tmp = "cd %s; %s -j %d auto" % (dir.src,make,jmake.n) - else: tmp = "cd %s; %s auto" % (dir.src,make) - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(tmp,shell=True) - else: - print(tmp) - try: subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/lmp_auto" % dir.src): - error('Unsuccessful "make auto"') - elif not output: print("Created src/lmp_auto") - -# dir switch - -class Dir(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --d dir - dir = LAMMPS home dir - if -d not specified, working dir must be lammps/src -""" - - def check(self): - if self.inlist != None and len(self.inlist) != 1: - error("-d args are invalid") - - # if inlist = None, check that cwd = lammps/src - # store cwd and lammps dir - # derive src,make,lib dirs from lammps dir - # check that they all exist - - def setup(self): - self.cwd = os.getcwd() - if self.inlist == None: self.lammps = ".." - else: self.lammps = self.inlist[0] - self.lammps = os.path.realpath(self.lammps) - self.src = self.lammps + "/src" - self.make = self.lammps + "/src/MAKE" - self.lib = self.lammps + "/lib" - if not os.path.isdir(self.lammps): error("LAMMPS home dir is invalid") - if not os.path.isdir(self.src): error("LAMMPS src dir is invalid") - if not os.path.isdir(self.lib): error("LAMMPS lib dir is invalid") - -# help switch - -class Help(object): - def __init__(self,list): pass - - def help(self): - return """ -Syntax: Make.py switch args ... - switches can be listed in any order - help switch: - -h prints help and syntax for all other specified switches - switch for actions: - -a lib-all, lib-dir, clean, file, exe or machine - list one or more actions, in any order - machine is a Makefile.machine suffix - one-letter switches: - -d (dir), -j (jmake), -m (makefile), -o (output), -p (packages), - -r (redo), -s (settings), -v (verbose), -z (makefile output) - switches for libs: - -atc, -awpmd, -colvars, -cuda, -gpu, -h5md, - -meam, -poems, -python, -qmmm, -reax, -voronoi - switches for build and makefile options: - -intel, -kokkos, -cc, -flags, -mpi, -fft, -jpg, -png -""" - -# jmake switch - -class Jmake(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --j N - use N procs for performing parallel make commands - used when building a lib or LAMMPS itself - if -j not specified, serial make commands run on single core -""" - - def check(self): - if len(self.inlist) != 1: error("-j args are invalid") - if not self.inlist[0].isdigit(): error("-j args are invalid") - n = int(self.inlist[0]) - if n <= 0: error("-j args are invalid") - self.n = n - -# makefile switch - -class Makefile(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --m machine - use Makefile.machine under src/MAKE as starting point to create Makefile.auto - if machine = "none", file action will create Makefile.auto from scratch - must use -cc and -mpi switches to specify compiler and MPI - if -m not specified, file/exe actions alter existing Makefile.auto -""" - - def check(self): - if len(self.inlist) != 1: error("-m args are invalid") - self.machine = self.inlist[0] - -# output switch - -class Output(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --o machine - copy final src/lmp_auto to lmp_machine in working dir - if -o not specified, exe action only produces src/lmp_auto -""" - - def check(self): - if len(self.inlist) != 1: error("-o args are invalid") - self.machine = self.inlist[0] - -# packages switch - -class Packages(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --p = package1 package2 ... - list of packages to install or uninstall in order specified - operates on set of packages currently installed - valid package names: - any LAMMPS standard or user package (type "make package" to see list) - prefix by yes/no to install/uninstall (see abbrevs) - yes-molecule, yes-user-atc, no-molecule, no-user-atc - can use LAMMPS categories (type "make package" to see list) - all = all standard and user packages (also none = no-all) - std (or standard) = all standard packages - user = all user packages - lib = all standard and user packages with auxiliary libs - can abbreviate package names and yes/no - omp = user-omp = yes-user-omp - ^omp = ^user-omp = no-user-omp - user = yes-user, ^user = no-user - all = yes-all, ^all = none = no-all - when action performed, list is processed in order, - as if typed "make yes/no" for each - if "orig" or "original" is last package in list, - set of installed packages will be restored to original (current) list - after "build" action is performed - if -p not specified, currently installed packages are not changed -""" - - def check(self): - if self.inlist != None and not self.inlist: error("-p args are invalid") - - def setup(self): - - # extract package lists from src/Makefile - # remove names from lib that there are not Make.py lib-classes for - # most don't actually have libs, so nothing to control from Make.py - - make = MakeReader("%s/Makefile" % dir.src) - std = make.getvar("PACKAGE") - user = make.getvar("PACKUSER") - lib = make.getvar("PACKLIB") - lib.remove("kim") - lib.remove("kokkos") - lib.remove("user-molfile") - lib.remove("python") - lib.remove("user-quip") - all = std + user - - # plist = command line args expanded to yes-package or no-package - - plist = [] - if self.inlist: - for one in self.inlist: - if one in std: - plist.append("yes-%s" % one) - elif one in user: - plist.append("yes-%s" % one) - elif "user-"+one in user: - plist.append("yes-user-%s" % one) - elif one == "std" or one == "standard" or one == "user" or \ - one == "lib" or one == "all": plist.append("yes-%s" % one) - elif one.startswith("yes-"): - if one[4:] in std: plist.append("yes-%s" % one[4:]) - elif one[4:] in user: plist.append("yes-%s" % one[4:]) - elif "user-"+one[4:] in user: plist.append("yes-user-%s" % one[4:]) - elif one == "yes-std" or one == "yes-standard" or \ - one == "yes-user" or one == "yes-lib" or one == "yes-all": - plist.append("yes-%s" % one[4:]) - else: error("Invalid package name %s" % one) - elif one.startswith("no-"): - if one[3:] in std: plist.append("no-%s" % one[3:]) - elif one[3:] in user: plist.append("no-%s" % one[3:]) - elif "user-"+one[3:] in user: plist.append("no-user-%s" % one[3:]) - elif one == "no-std" or one == "no-standard" or one == "no-user" or \ - one == "no-lib" or one == "no-all": - plist.append("no-%s" % one[3:]) - else: error("Invalid package name %s" % one) - elif one.startswith('^'): - if one[1:] in std: plist.append("no-%s" % one[1:]) - elif one[1:] in user: plist.append("no-%s" % one[1:]) - elif "user-"+one[1:] in user: plist.append("no-user-%s" % one[1:]) - elif one == "^std" or one == "^standard" or one == "^user" or \ - one == "^lib" or one == "^all": plist.append("no-%s" % one[1:]) - else: error("Invalid package name %s" % one) - elif one == "none": plist.append("no-all") - elif one == "orig": plist.append(one) - else: error("Invalid package name %s" % one) - if "orig" in plist and plist.index("orig") != len(plist)-1: - error('-p orig arg must be last') - if plist.count("orig") > 1: error('-p orig arg must be last') - - # original = dict of all packages - # key = package name, value = 1 if currently installed, else 0 - - original = {} - tmp = "cd %s; make ps" % dir.src - output = subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True).decode().split('\n') - pattern = "Installed\s+(\w+): package (\S+)" - for line in output: - m = re.search(pattern,line) - if not m: continue - pkg = m.group(2).lower() - if pkg not in all: error('Package list does not match "make ps" results') - if m.group(1) == "NO": original[pkg] = 0 - elif m.group(1) == "YES": original[pkg] = 1 - - # final = dict of all packages after plist applied to original - # key = package name, value = 1 if installed, else 0 - - final = copy.deepcopy(original) - for i,one in enumerate(plist): - if "yes" in one: - pkg = one[4:] - yes = 1 - else: - pkg = one[3:] - yes = 0 - if pkg in all: - final[pkg] = yes - elif pkg == "std" or pkg == "standard": - for pkg in std: final[pkg] = yes - elif pkg == "user": - for pkg in user: final[pkg] = yes - elif pkg == "lib": - for pkg in lib: final[pkg] = yes - elif pkg == "all": - for pkg in all: final[pkg] = yes - - self.std = std - self.user = user - self.lib = lib - self.all = all - self.plist = plist - self.original = original - self.final = final - - # install packages in plist - - def install(self): - if self.plist: print("Installing packages ...") - for one in self.plist: - if one == "orig": continue - subprocess.check_output("cd %s; make %s" % (dir.src,one), - stderr=subprocess.STDOUT,shell=True) - if self.plist and verbose: - txt = subprocess.check_output("cd %s; make ps" % dir.src, - stderr=subprocess.STDOUT, - shell=True).decode() - print("Package status after installation:") - print(txt) - - # restore packages to original list if requested - # order of re-install should not matter matter b/c of Depend.sh - - def uninstall(self): - if not self.plist or self.plist[-1] != "orig": return - print("Restoring packages to original state ...") - subprocess.check_output("cd %s; make no-all" % dir.src, - stderr=subprocess.STDOUT,shell=True) - for one in self.all: - if self.original[one]: - subprocess.check_output("cd %s; make yes-%s" % (dir.src,one), - stderr=subprocess.STDOUT,shell=True) - if verbose: - txt = subprocess.check_output("cd %s; make ps" % dir.src, - stderr=subprocess.STDOUT, - shell=True).decode() - print("Restored package status:") - print(txt) - -# redo switch - -class Redo(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --r file label1 label2 ... - all args are optional - invoke Make.py commands from a file - other specified switches are merged with file commands (see below) - redo file format: - blank lines and lines starting with "#" are skipped - other lines are treated as commands - each command is a list of Make.py args, as if typed at command-line - commands can have leading label, followed by ":" - commands cannot contain a "-r" switch - if no args, execute previous command, which is stored in src/Make.py.last - if one arg, execute all commands from specified file - unlabeled or labeled commands are all executed - if multiple args, execute only matching labeled commands from file - if other switches are specified, - if file command does not have the switch, it is added - if file command has the switch, the specified switch replaces it - except if -a (action) switch is both specified and in the file command, - two sets of actions are merged and duplicates removed - if both switches have "exe or machine" action, - the specified exe/machine overrides the file exe/machine -""" - - def check(self): - if len(self.inlist) == 0: - self.dir = 1 - self.file = "Make.py.last" - self.labels = [] - else: - self.dir = 0 - self.file = self.inlist[0] - self.labels = self.inlist[1:] - - # read redo file - # self.commands = list of commands to execute - - def setup(self): - file = self.file - if not os.path.isfile(file): error("Redo file %s does not exist" % file) - lines = open(file,'r').readlines() - - cmdlines = [] - for line in lines: - line = line.strip() - if not line or line[0] == '#' : continue - cmdlines.append(line) - - # if no labels, add all file commands to command list - # if labels, make a dict with key = label, value = command - # and discard unlabeled commands - - dict = {} - commands = [] - for line in cmdlines: - words = line.split() - if "-r" in words: error("Redo command cannot contain -r switch") - if words[0][-1] == ':': label = words[0][:-1] - else: label = None - if not self.labels: - if label: subprocess.append(' '.join(words[1:])) - else: subprocess.append(line) - else: - if not label: continue - dict[label] = ' '.join(words[1:]) - - # extract labeled commands from dict and add to command list - - for label in self.labels: - if label not in dict: error("Redo label not in redo file") - subprocess.append(dict[label]) - - self.commands = commands - -# settings switch - -class Settings(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --s set1 set2 ... - possible settings = gzip #gzip ffmpeg #ffmpeg - smallbig bigbig smallsmall exceptions #exceptions - alter LAMMPS ifdef settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - gzip and #gzip turn on/off LAMMPS_GZIP setting - ffmpeg and #ffmpeg turn on/off LAMMPS_FFMPEG setting - smallbig, bigbig, smallsmall turn on LAMMPS_SMALLBIG, etc - and turn off other two - exceptions and #exceptions turn on/off LAMMPS_EXCEPTIONS setting -""" - - def check(self): - if not self.inlist: error("-s args are invalid") - for one in self.inlist: - if one not in setargs: error("-s args are invalid") - -# verbose switch - -class Verbose(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --v (no arguments) - produce verbose output as Make.py executes - if -v not specified, minimal output is produced -""" - - def check(self): - if len(self.inlist): error("-v args are invalid") - -# zoutput switch for making copy of final Makefile.auto - -class Zoutput(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --z machine - copy created/used src/MAKE/MINE/Makefile.auto to Makefile.machine in same dir - copy created/used lib/*/Makefile.auto and lib/*/Makefile.lammps to - Makefile_lib.machine and Makefile_lib_lammps.machine in same dir - this can be used to preserve the machine Makefile and lib Makefiles -""" - - def check(self): - if len(self.inlist) != 1: error("-z args are invalid") - self.machine = self.inlist[0] - -# ---------------------------------------------------------------- -# lib classes, one per LAMMPS auxiliary lib -# ---------------------------------------------------------------- - -# ATC lib - -class ATC(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --atc make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = g++) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-atc args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-atc args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-atc args are invalid") - - def build(self): - libdir = dir.lib + "/atc" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libatc.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/atc library") - else: print("Created lib/atc library") - -# AWPMD lib - -class AWPMD(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "mpicc" - self.lammpsflag = 0 - - def help(self): - return """ --awpmd make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = mpicc) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-awpmd args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-awpmd args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-awpmd args are invalid") - - def build(self): - libdir = dir.lib + "/awpmd" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libawpmd.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/awpmd library") - else: print("Created lib/awpmd library") - -# COLVARS lib - -class COLVARS(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --colvars make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = g++) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-colvars args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-colvars args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-colvars args are invalid") - - def build(self): - libdir = dir.lib + "/colvars" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libcolvars.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/colvars library") - else: print("Created lib/colvars library") - -# CUDA lib - -class CUDA(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.mode = "double" - self.arch = "35" - - def help(self): - return """ --cuda mode=double arch=35 - all args are optional and can be in any order - mode = double or mixed or single (def = double) - arch = M (def = 35) - M = 31,35,37,etc for Kepler - M = 20 for CC2.0 (GF100/110, e.g. C2050,GTX580,GTX470) - M = 21 for CC2.1 (GF104/114, e.g. GTX560, GTX460, GTX450) - M = 13 for CC1.3 (GF200, e.g. C1060, GTX285) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-cuda args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-cuda args are invalid") - if words[0] == "mode": self.mode = words[1] - elif words[0] == "arch": self.arch = words[1] - else: error("-cuda args are invalid") - if self.mode != "double" and self.mode != "mixed" and \ - self.mode != "single": - error("-cuda args are invalid") - if not self.arch.isdigit(): error("-cuda args are invalid") - - def build(self): - libdir = dir.lib + "/cuda" - subprocess.check_output("cd %s; make clean" % libdir, - stderr=subprocess.STDOUT,shell=True) - if self.mode == "double": n = 2 - elif self.mode == "mixed": n = 3 - elif self.mode == "single": n = 1 - if jmake: txt = "cd %s; make -j %d precision=%d arch=%s" % \ - (libdir,jmake.n,n,self.arch) - else: txt = "cd %s; make precision=%d arch=%s" % \ - (libdir,n,self.arch) - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/liblammpscuda.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/cuda library") - else: print("Created lib/cuda library") - -# GPU lib - -class GPU(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "linux.double" - self.lammpsflag = self.modeflag = self.archflag = self.homeflag = 0 - - def help(self): - return """ --gpu make=suffix lammps=suffix2 mode=double arch=N home=path - all args are optional and can be in any order - make = use Makefile.suffix (def = linux.double) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) - mode = double or mixed or single (def = CUDA_PREC in makefile) - arch = 3x (x = digit for Kepler) or 2x (x = digit for Fermi) - (def = CUDA_ARCH in makefile) - home = path to Cuda, e.g. /usr/local/cuda (def = CUDA_HOME in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-gpu args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-gpu args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - elif words[0] == "mode": - self.mode = words[1] - self.modeflag = 1 - elif words[0] == "arch": - self.arch = words[1] - self.archflag = 1 - elif words[0] == "home": - self.home = words[1] - self.homeflag = 1 - else: error("-gpu args are invalid") - if self.modeflag and (self.mode != "double" and - self.mode != "mixed" and - self.mode != "single"): - error("-gpu args are invalid") - if self.archflag and not self.arch.isdigit(): - error("-gpu args are invalid") - - def build(self): - global gpubuildflag - gpubuildflag = 1 - libdir = dir.lib + "/gpu" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.modeflag: - if self.mode == "double": - make.setvar("CUDA_PRECISION","-D_DOUBLE_DOUBLE") - elif self.mode == "mixed": - make.setvar("CUDA_PRECISION","-D_SINGLE_DOUBLE") - elif self.mode == "single": - make.setvar("CUDA_PRECISION","-D_SINGLE_SINGLE") - if self.archflag: - make.setvar("CUDA_ARCH","-arch=sm_%s" % self.arch) - if self.homeflag: - make.setvar("CUDA_HOME",self.home) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - # special hack for shannon GPU cluster - # must use "srun make" if on it, else just make - # this is b/c Cuda libs are not all available on host - - make = "make" - if "shannon" == platform.node(): make = "srun make" - - subprocess.check_output("cd %s; %s -f Makefile.auto clean" % - (libdir,make),stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; %s -j %d -f Makefile.auto" % (libdir,make,jmake.n) - else: txt = "cd %s; %s -f Makefile.auto" % (libdir,make) - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libgpu.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/gpu library") - else: print("Created lib/gpu library") - -# H5MD lib - -class H5MD(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "h5cc" - self.lammpsflag = 0 - - def help(self): - return """ --h5md make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = h5cc) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-h5md args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-h5md args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-h5md args are invalid") - - def build(self): - libdir = dir.lib + "/h5md" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make clean" % libdir, - stderr=subprocess.STDOUT,shell=True) - txt = "cd %s; make" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libch5md.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/h5md library") - else: print("Created lib/h5md library") - -# MEAM lib - -class MEAM(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "gfortran" - self.lammpsflag = 0 - - def help(self): - return """ --meam make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = gfortran) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-meam args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-meam args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-meam args are invalid") - - def build(self): - libdir = dir.lib + "/meam" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - # do not use -j for MEAM build, parallel build does not work - txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libmeam.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/meam library") - else: print("Created lib/meam library") - -# POEMS lib - -class POEMS(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --poems make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = g++) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-poems args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-poems args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-poems args are invalid") - - def build(self): - libdir = dir.lib + "/poems" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % libdir, - stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libpoems.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/poems library") - else: print("Created lib/poems library") - -# PYTHON lib - -class PYTHON(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --python lammps=suffix - arg is optional, use Makefile.lammps if not specified - lammps = use Makefile.lammps.suffix -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-python args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-python args are invalid") - if words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-python args are invalid") - - def build(self): - libdir = dir.lib + "/python" - if self.lammpsflag: - subprocess.check_output("cd %s; cp Makefile.lammps.%s Makefile.lammps" % - (libdir,self.lammps)) - if not os.path.isfile("%s/Makefile.lammps.%s" % (libdir,self.lammps)): - error("Unsuccessful creation of lib/python/Makefile.lammps.%s file" % - self.lammps) - else: print("Created lib/python/Makefile.lammps file") - -# QMMM lib - -class QMMM(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "gfortran" - self.lammpsflag = 0 - - def help(self): - return """ --qmmm make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = gfortran) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-qmmm args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-qmmm args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-qmmm args are invalid") - - def build(self): - libdir = dir.lib + "/qmmm" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libqmmm.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/qmmm library") - else: print("Created lib/qmmm library") - -# REAX lib - -class REAX(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "gfortran" - self.lammpsflag = 0 - - def help(self): - return """ --reax make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = gfortran) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-reax args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-reax args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-reax args are invalid") - - def build(self): - libdir = dir.lib + "/reax" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - cmd = "cd %s; make -f Makefile.auto clean" % libdir - subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libreax.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/reax library") - else: print("Created lib/reax library") - -# VORONOI lib - -class VORONOI(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.install = "" - - def help(self): - return """ --voronoi install="-d dir -v version -g -b -i installdir -l incdir libdir" - arg is optional, only needed if want to run install.py script - install = args to use with lib/voronoi/install.py script - must enclose in quotes since install.py args have switches - install.py can download, build, install, setup links to the Voro++ library - see lib/voronoi/README for details on Voro++ and using install.py -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-voronoi args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-voronoi args are invalid") - if words[0] == "install": self.install = words[1] - else: error("-voronoi args are invalid") - - def build(self): - if not self.install: return - libdir = dir.lib + "/voronoi" - cmd = "cd %s; python install.py %s" % (libdir,self.install) - txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT, - shell=True).decode() - if verbose: print(txt) - print("Created lib/voronoi library") - -# ---------------------------------------------------------------- -# build classes for intel, kokkos build options -# ---------------------------------------------------------------- - -# Intel class - -class Intel(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.mode = "cpu" - - def help(self): - return """ --intel mode - mode = cpu or phi (def = cpu) - build Intel package for CPU or Xeon Phi -""" - - def check(self): - if self.inlist == None: return - if len(self.inlist) != 1: error("-intel args are invalid") - self.mode = self.inlist[0] - if self.mode != "cpu" and self.mode != "phi": - error("-intel args are invalid") - -# Kokkos class - -class Kokkos(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.mode = "" - self.archgpu = None - self.archcpu = None - - def help(self): - return """ --kokkos mode archgpu=N archcpu=SNB - mode is not optional, arch is optional - mode = omp or cuda or phi (def = KOKKOS_DEVICES setting in Makefile ) - build Kokkos package for omp or cuda or phi - sets KOKKOS_DEVICES to "OpenMP" (omp, phi) or "Cuda, OpenMP" (cuda) - archgpu = number like 35 (Kepler) or 21 (Fermi) (def = none) - sets KOKKOS_ARCH for GPU to appropriate value - archcpu = SNB or HSW or BGQ or Power7 or Power8 (def = none) - for CPU = SandyBridge, Haswell, BGQ, Power7, Power8 - sets KOKKOS_ARCH for GPU to appropriate value -""" - - def check(self): - print(self.inlist) - if self.inlist != None and len(self.inlist) == 0: - error("-kokkos args are invalid") - - if self.inlist == None: return - if len(self.inlist) < 1: error("-kokkos args are invalid") - self.mode = self.inlist[0] - if self.mode != "omp" and self.mode != "cuda" and self.mode != "phi": - error("-kokkos args are invalid") - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-kokkos args are invalid") - if words[0] == "archgpu": self.archgpu = words[1] - elif words[0] == "archcpu": self.archcpu = words[1] - else: error("-kokkos args are invalid") - -# ---------------------------------------------------------------- -# makefile classes for CC, FLAGS, MPI, JPG, PNG, FFT settings -# ---------------------------------------------------------------- - -# Cc class - -class Cc(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.compiler = self.abbrev = "" - self.wrap = "" - self.parent = "" - - def help(self): - return """ --cc compiler wrap=wcompiler,parent - alter CC setting in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - compiler is required, all other args are optional - compiler = any string with g++ or icc or icpc - or mpi (or mpicxx, mpiCC, mpiicpc, etc) - can be compiler name or full path to compiler - mpi by itself is changed to mpicxx - wcompiler = compiler for mpi wrapper to use - use nvcc for building for Kokkos/cuda with provided nvcc_wrapper - parent = openmpi or mpich - parent style determines syntax for setting low-level compiler -""" - - def check(self): - if len(self.inlist) < 1: error("-cc args are invalid") - self.compiler = self.inlist[0] - if self.compiler == "mpi": - self.compiler = "mpicxx" - self.abbrev = "mpi" - elif self.compiler.startswith("mpi"): - self.abbrev = "mpi" - elif self.compiler == "g++" or self.compiler == "icc" or \ - self.compiler == "icpc": - self.abbrev = self.compiler - elif "mpi" in self.compiler: self.abbrev = "mpi" - elif "g++" in self.compiler: self.abbrev = "g++" - elif "icc" in self.compiler: self.abbrev = "icc" - elif "icpc" in self.compiler: self.abbrev = "icpc" - else: error("-cc args are invalid") - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-cc args are invalid") - args = words[1].split(',') - if len(args) != 2: error("-cc args are invalid") - if words[0] == "wrap": - if self.abbrev != "mpi": error("-cc compiler is not a wrapper") - self.wrap = args[0] - self.parent = args[1] - else: error("-cc args are invalid") - -# Flags class - -class Flags(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.flags = [] - - def help(self): - return """ --flags var action N f1 f2 ... var action N f1 f2 ... - alter variable settings (flags) in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - var = CCFLAGS, LINKFLAGS, LIB, etc - any variable in Makefile.auto, must already exist - action = add or del - N = # of flags to follow - f1,f2,etc = flag to add or delete - "-" char will be prepended to each flag - for example: add 4 g O3 xHost "fp-model fast=2" - will add: -g -O3 -xHost -fp-model fast=2 - for add: if flag already exists, no change is made - for delete: flag of form "-O*", will delete any wildcard match - for -O,-O2,-O3,etc: existing -O* will first be removed -""" - - def check(self): - if len(self.inlist) < 1: error("-flags args are invalid") - narg = len(self.inlist) - i = 0 - while i < narg: - if i+3 > narg: error("-flags args are invalid") - var = self.inlist[i] - action = self.inlist[i+1] - if action != "add" and action != "del": error("-flags args are invalid") - nflag = int(self.inlist[i+2]) - i += 3 - if i+nflag > narg: error("-flags args are invalid") - flags = self.inlist[i:i+nflag] - self.flags.append([var,action,flags]) - i += nflag - -# Mpi class - -class Mpi(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.style = self.dir = "" - - def help(self): - return """ --mpi style dir=path - alter MPI settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - style is required, all other args are optional - style = mpi or mpich or ompi or serial - mpi = no MPI settings (assume compiler is MPI wrapper) - mpich = use explicit settings for MPICH - ompi = use explicit settings for OpenMPI - serial = use settings for src/STUBS library - dir = path for MPICH or OpenMPI directory - add -I and -L settings for include and lib sub-dirs -""" - - def check(self): - if len(self.inlist) < 1: error("-mpi args are invalid") - self.style = self.inlist[0] - if self.style != "mpi" and self.style != "mpich" and \ - self.style != "ompi" and self.style != "serial": - error("-mpi args are invalid") - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-mpi args are invalid") - if words[0] == "dir": self.dir = words[1] - else: error("-mpi args are invalid") - -# Fft class - -class Fft(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.dir = self.incdir = self.libdir = "" - - def help(self): - return """ --fft mode lib=libname dir=homedir idir=incdir ldir=libdir - alter FFT settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - mode is required, all other args are optional - first removes all current FFT variable settings - mode = none or fftw or fftw3 or ... - adds -DFFT_MODE setting - lib = name of FFT library to link with (def is libname = mode) - adds -llib{libname} setting, e.g. -llibfftw3 - dir = home dir for include and library files (def = none) - adds -Idir/include and -Ldir/lib settings - if set, overrides idir and ldir args - idir = dir for include file (def = none) - adds -Iidir setting - ldir = dir for library file (def = none) - adds -Lldir setting -""" - - def check(self): - if not len(self.inlist): error("-fft args are invalid") - self.mode = self.inlist[0] - self.lib = "-l%s" % self.mode - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-fft args are invalid") - if words[0] == "lib": self.lib = "-l%s" % words[1] - elif words[0] == "dir": self.dir = words[1] - elif words[0] == "idir": self.incdir = words[1] - elif words[0] == "ldir": self.libdir = words[1] - else: error("-fft args are invalid") - -# Jpg class - -class Jpg(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.on = 1 - self.dir = self.incdir = self.libdir = "" - - def help(self): - return """ --jpg flag dir=homedir idir=incdir ldir=libdir - alter JPG settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - change JPG settings in makefile - all args are optional, flag must come first if specified - flag = yes or no (def = yes) - include or exclude JPEG support - adds/removes -DLAMMPS_JPEG and -ljpeg settings - dir = home dir for include and library files (def = none) - adds -Idir/include and -Ldir/lib settings - if set, overrides idir and ldir args - idir = dir for include file (def = none) - adds -Iidir setting - ldir = dir for library file (def = none) - adds -Lldir setting -""" - - def check(self): - for i,one in enumerate(self.inlist): - if one == "no" and i == 0: self.on = 0 - elif one == "yes" and i == 0: self.on = 1 - else: - words = one.split('=') - if len(words) != 2: error("-jpeg args are invalid") - if words[0] == "dir": self.dir = words[1] - elif words[0] == "idir": self.incdir = words[1] - elif words[0] == "ldir": self.libdir = words[1] - else: error("-jpeg args are invalid") - -# Png class - -class Png(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.on = 1 - self.dir = self.incdir = self.libdir = "" - - def help(self): - return """ --png flag dir=homedir idir=incdir ldir=libdir - alter PNG settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - all args are optional, flag must come first if specified - flag = yes or no (def = yes) - include or exclude PNG support - adds/removes -DLAMMPS_PNG and -lpng settings - dir = home dir for include and library files (def = none) - adds -Idir/include and -Ldir/lib settings - if set, overrides idir and ldir args - idir = dir for include file (def = none) - adds -Iidir setting - ldir = dir for library file (def = none) - adds -Lldir setting -""" - - def check(self): - for i,one in enumerate(self.inlist): - if one == "no" and i == 0: self.on = 0 - elif one == "yes" and i == 0: self.on = 1 - else: - words = one.split('=') - if len(words) != 2: error("-png args are invalid") - if words[0] == "dir": self.dir = words[1] - elif words[0] == "idir": self.incdir = words[1] - elif words[0] == "ldir": self.libdir = words[1] - else: error("-png args are invalid") - -# ---------------------------------------------------------------- -# auxiliary classes -# ---------------------------------------------------------------- - -# read, tweak, and write a Makefile - -class MakeReader(object): - - # read a makefile - # flag = 0 if file is full path name - # flag = 1,2 if file is suffix for any Makefile.machine under src/MAKE - # look for this file in same order that src/Makefile does - # if flag = 1, read the file - # if flag = 2, just check if file exists - - def __init__(self,file,flag=0): - if flag == 0: - if not os.path.isfile(file): error("Makefile %s does not exist" % file) - lines = open(file,'r').readlines() - else: - mfile = "%s/MAKE/MINE/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - mfile = "%s/MAKE/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - mfile = "%s/MAKE/OPTIONS/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - mfile = "%s/MAKE/MACHINES/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - error("Makefile.%s does not exist" % file) - if flag == 1: lines = open(mfile,'r').readlines() - else: return - - # scan lines of makefile - # if not a variable line, just copy to newlines - # if a variable line, concatenate any continuation lines - # convert variable to var dict entry: key = name, value = list of words - # discard any portion of value string with a comment char - # varinfo = list of variable info: (name, name with whitespace for print) - # add index into varinfo to newlines - # ccindex = index of "CC =" line, to add OMPI var before it - # lmpindex = index of "LAMMPS-specific settings" - # line to add KOKKOS vars before it - - var = {} - varinfo = [] - newlines = [] - pattern = "(\S+\s+=\s+)(.*)" - conditional = 0 - multiline = 0 - self.ccindex = self.lmpindex = 0 - - for line in lines: - line = line[:-1] - if "CC =" in line: self.ccindex = len(newlines) - if "LAMMPS-specific settings" in line: self.lmpindex = len(newlines) - if "ifeq" in line: - conditional = 1 - continue - if conditional: - if "endif" in line: - conditional = 0 - continue - if multiline: - if '#' in line: line = line[:line.find('#')] - morevalues = line.split() - values = values[:-1] + morevalues - if values[-1] != '\\': - var[name] = values - multiline = 0 - newlines.append(str(len(varinfo))) - varinfo.append((name,namewhite)) - continue - varflag = 1 - if len(line.strip()) == 0: varflag = 0 - elif line.lstrip()[0] == '#': varflag = 0 - else: - m = re.match(pattern,line) - if not m: varflag = 0 - if varflag: - namewhite = m.group(1) - name = namewhite.split()[0] - if name in var: - error("Makefile variable %s appears more than once" % name) - remainder = m.group(2) - if '#' in remainder: remainder = remainder[:remainder.find('#')] - values = remainder.split() - if values and values[-1] == '\\': multiline = 1 - else: - var[name] = values - newlines.append(str(len(varinfo))) - varinfo.append((name,namewhite)) - else: - newlines.append(line) - - self.var = var - self.varinfo = varinfo - self.lines = newlines - - # return list of values associated with var - # return None if var not defined - - def getvar(self,var): - if var in self.var: return self.var[var] - else: return None - - # set var to single value - # if var not defined, error - - def setvar(self,var,value): - if var not in self.var: error("Variable %s not in makefile" % var) - self.var[var] = [value] - - # add value to var - # do not add if value already defined by var - # if var not defined, - # create new variable using "where" - # where="cc", line before "CC =" line, use ":=" - # where="lmp", 2 lines before "LAMMPS-specific settings" line, use "=" - - def addvar(self,var,value,where=""): - if var in self.var: - if value not in self.var[var]: self.var[var].append(value) - else: - if not where: - error("Variable %s with value %s is not in makefile" % (var,value)) - if where == "cc": - if not self.ccindex: error("No 'CC =' line in makefile to add variable") - index = self.ccindex - varwhite = "%s :=\t\t" % var - elif where == "lmp": - if not self.lmpindex: error("No 'LAMMPS-specific settings line' " + - "in makefile to add variable") - index = self.lmpindex - 2 - varwhite = "%s =\t\t" % var - self.var[var] = [value] - varwhite = "%s =\t\t" % var - self.lines.insert(index,str(len(self.varinfo))) - self.varinfo.append((var,varwhite)) - - # if value = None, remove entire var - # no need to update lines or varinfo, write() will ignore deleted vars - # else remove value from var - # value can have trailing '*' to remove wildcard match - # if var or value not defined, ignore it - - def delvar(self,var,value=None): - #if var == "KOKKOS_DEVICES": - # print self.var,value - if var not in self.var: return - if not value: - del self.var[var] - #print "AGAIN",self.var - elif value and value[-1] != '*': - if value not in self.var[var]: return - self.var[var].remove(value) - else: - value = value[:-1] - values = self.var[var] - dellist = [] - for i,one in enumerate(values): - if one.startswith(value): dellist.append(i) - while dellist: values.pop(dellist.pop()) - self.var[var] = values - - # write stored makefile lines to file, using vars that may have been updated - # do not write var if not in dict, since has been deleted - # wrap var values into multiple lines if needed - # file = 1 if this is Makefile.auto, change 1st line to use "auto" - - def write(self,file,flag=0): - fp = open(file,'w') - for i,line in enumerate(self.lines): - if not line.isdigit(): - if flag and i == 0: - line = "# auto = makefile auto-generated by Make.py" - print(line, file=fp) - else: - index = int(line) - name = self.varinfo[index][0] - txt = self.varinfo[index][1] - if name not in self.var: continue - values = self.var[name] - print("%s%s" % (txt,' '.join(values)), file=fp) - -# ---------------------------------------------------------------- -# main program -# ---------------------------------------------------------------- - -# parse command-line args -# switches dict: key = switch letter, value = list of args -# switch_order = list of switches in order -# will possibly be merged with redo file args below - -cmd_switches,cmd_switch_order = parse_args(sys.argv[1:]) - -if "v" in cmd_switches: - # debug - #print "Command-line parsing:" - #for switch in cmd_switch_order: - # print " %s: %s" % (switch,' '.join(cmd_switches[switch])) - pass - -# check for redo switch, process redo file -# redolist = list of commands to execute - -redoflag = 0 -redolist = [] - -if 'r' in cmd_switches and 'h' not in cmd_switches: - redoflag = 1 - redo = Redo(cmd_switches['r']) - redo.check() - redo.setup() - redolist = redo.commands - redoindex = 0 - del redo - if not redolist: error("No commands to execute from redo file") - -# loop over Make.py commands -# if no redo switch, loop once for command-line command -# if redo, loop over one or more commands from redo file - -while 1: - - # if redo: - # parse next command from redo file - # use command-line switches to add/replace file command switches - # do not add -r, since already processed - # and don't want -r swtich to appear in Make.py.last file - # if -a in both: concatenate, de-dup, - # specified exe/machine action replaces file exe/machine action - # print resulting new command - # else just use command-line switches - - if redoflag: - if redoindex == len(redolist): break - args = redolist[redoindex].split() - switches,switch_order = parse_args(args) - redoindex += 1 - - for switch in cmd_switches: - if switch == 'r': continue - if switch == 'a' and switch in switches: - tmp = Actions(cmd_switches[switch] + switches[switch]) - tmp.dedup() - switches[switch] = tmp.inlist - continue - if switch not in switches: switch_order.append(switch) - switches[switch] = cmd_switches[switch] - - argstr = switch2str(switches,switch_order) - print("Redo command: Make.py",argstr) - else: - switches = cmd_switches - switch_order = cmd_switch_order - - # initialize all class variables to None - - for one in switchclasses: exec("%s = None" % one) - for one in libclasses: exec("%s = None" % one) - for one in buildclasses: exec("%s = None" % one) - for one in makeclasses: exec("%s = None" % one) - - # classes = dictionary of created classes - # key = switch, value = class instance - - classes = {} - for switch in switches: - if len(switch) == 1 and switch in abbrevs: - i = abbrevs.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (switchclasses[i],switch,switchclasses[i].capitalize(),switch) - exec(txt) - elif switch in libclasses: - i = libclasses.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (libclasses[i],switch,libclasses[i].upper(),switch) - exec(txt) - elif switch in buildclasses: - i = buildclasses.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (buildclasses[i],switch,buildclasses[i].capitalize(),switch) - exec(txt) - elif switch in makeclasses: - i = makeclasses.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (makeclasses[i],switch,makeclasses[i].capitalize(),switch) - exec(txt) - else: error("Unknown command-line switch -%s" % switch) - - # print help messages and exit - - if help or (actions and "-h" in actions.inlist) or not switches: - if not help: help = Help(None) - print(help.help()) - for switch in switch_order: - if switch == "h": continue - print(classes[switch].help()[1:]) - sys.exit() - - # create needed default classes if not specified with switch - # dir and packages plus lib and build classes so defaults are set - - if not dir: dir = Dir(None) - if not packages: packages = Packages(None) - - for one in libclasses: - txt = "if not %s: %s = %s(None)" % (one,one,one.upper()) - exec(txt) - - for one in buildclasses: - txt = "if not %s: %s = %s(None)" % (one,one,one.capitalize()) - exec(txt) - - # error check on args for all classes - - for switch in classes: classes[switch].check() - - # prep for action - # actions.setup() detects if last action = machine - # if yes, induce addition of "-m" and "-o" switches - - dir.setup() - packages.setup() - - if actions: - machine = actions.setup() - if machine: - switches['a'][-1] = "exe" - if 'm' not in switches: - switches['m'] = [machine] - switch_order.insert(-1,'m') - makefile = classes['m'] = Makefile(switches['m']) - makefile.check() - if 'o' not in switches: - switches['o'] = [machine] - switch_order.insert(-1,'o') - output = classes['o'] = Output(switches['o']) - output.check() - - # perform actions - - packages.install() - - if actions: - for action in actions.alist: - print("Action %s ..." % action) - if action.startswith("lib-"): actions.lib(action[4:]) - elif action == "file": actions.file("file") - elif action == "clean": actions.clean() - elif action == "exe": actions.exe() - - packages.uninstall() - - # create copy of executable if requested, and exe action performed - - if output and actions and "exe" in actions.alist: - txt = "cp %s/lmp_auto %s/lmp_%s" % (dir.src,dir.cwd,output.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created lmp_%s in %s" % (output.machine,dir.cwd)) - - # create copy of Makefile.auto if requested, and file or exe action performed - # ditto for library Makefile.auto and Makefile.lammps files - - if zoutput and actions and \ - ("file" in actions.alist or "exe" in actions.alist): - txt = "cp %s/MAKE/MINE/Makefile.auto %s/MAKE/MINE/Makefile.%s" % \ - (dir.src,dir.src,zoutput.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created Makefile.%s in %s/MAKE/MINE" % (zoutput.machine,dir.src)) - if gpubuildflag: - txt = "cp %s/gpu/Makefile.auto %s/MAKE/MINE/Makefile_gpu.%s" % \ - (dir.lib,dir.src,zoutput.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created Makefile_gpu.%s in %s/MAKE/MINE" % \ - (zoutput.machine,dir.src)) - txt = "cp %s/gpu/Makefile.lammps %s/MAKE/MINE/Makefile_gpu_lammps.%s" % \ - (dir.lib,dir.src,zoutput.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created Makefile_gpu_lammps.%s in %s/MAKE/MINE" % \ - (zoutput.machine,dir.src)) - - # write current Make.py command to src/Make.py.last - - fp = open("%s/Make.py.last" % dir.src,'w') - print("# last invoked Make.py command", file=fp) - print(switch2str(switches,switch_order), file=fp) - fp.close() - - # if not redoflag, done - - if not redoflag: break -- GitLab From bdd2f3a6b2c70498c08c1c1b552f9c4ecc9742e0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 13:24:32 -0400 Subject: [PATCH 516/593] remove references to Make.py and USER-CUDA --- bench/FERMI/README | 66 ++++---------------------------------- bench/README | 46 +++++++++----------------- examples/README | 11 +------ examples/accelerate/README | 64 ++++-------------------------------- 4 files changed, 29 insertions(+), 158 deletions(-) diff --git a/bench/FERMI/README b/bench/FERMI/README index db3f527bdc..b66e560775 100644 --- a/bench/FERMI/README +++ b/bench/FERMI/README @@ -1,55 +1,21 @@ These are input scripts used to run versions of several of the -benchmarks in the top-level bench directory using the GPU and -USER-CUDA accelerator packages. The results of running these scripts -on two different machines (a desktop with 2 Tesla GPUs and the ORNL -Titan supercomputer) are shown on the "GPU (Fermi)" section of the -Benchmark page of the LAMMPS WWW site: lammps.sandia.gov/bench. +benchmarks in the top-level bench directory using the GPU accelerator +package. The results of running these scripts on two different machines +(a desktop with 2 Tesla GPUs and the ORNL Titan supercomputer) are shown +on the "GPU (Fermi)" section of the Benchmark page of the LAMMPS WWW +site: lammps.sandia.gov/bench. Examples are shown below of how to run these scripts. This assumes -you have built 3 executables with both the GPU and USER-CUDA packages +you have built 3 executables with the GPU package installed, e.g. lmp_linux_single lmp_linux_mixed lmp_linux_double -The precision (single, mixed, double) refers to the GPU and USER-CUDA -package precision. See the README files in the lib/gpu and lib/cuda -directories for instructions on how to build the packages with -different precisions. The GPU and USER-CUDA sub-sections of the -doc/Section_accelerate.html file also describes this process. - -Make.py -d ~/lammps -j 16 -p #all orig -m linux -o cpu -a exe -Make.py -d ~/lammps -j 16 -p #all opt orig -m linux -o opt -a exe -Make.py -d ~/lammps -j 16 -p #all omp orig -m linux -o omp -a exe -Make.py -d ~/lammps -j 16 -p #all gpu orig -m linux \ - -gpu mode=double arch=20 -o gpu_double -a libs exe -Make.py -d ~/lammps -j 16 -p #all gpu orig -m linux \ - -gpu mode=mixed arch=20 -o gpu_mixed -a libs exe -Make.py -d ~/lammps -j 16 -p #all gpu orig -m linux \ - -gpu mode=single arch=20 -o gpu_single -a libs exe -Make.py -d ~/lammps -j 16 -p #all cuda orig -m linux \ - -cuda mode=double arch=20 -o cuda_double -a libs exe -Make.py -d ~/lammps -j 16 -p #all cuda orig -m linux \ - -cuda mode=mixed arch=20 -o cuda_mixed -a libs exe -Make.py -d ~/lammps -j 16 -p #all cuda orig -m linux \ - -cuda mode=single arch=20 -o cuda_single -a libs exe -Make.py -d ~/lammps -j 16 -p #all intel orig -m linux -o intel_cpu -a exe -Make.py -d ~/lammps -j 16 -p #all kokkos orig -m linux -o kokkos_omp -a exe -Make.py -d ~/lammps -j 16 -p #all kokkos orig -kokkos cuda arch=20 \ - -m cuda -o kokkos_cuda -a exe - -Make.py -d ~/lammps -j 16 -p #all opt omp gpu cuda intel kokkos orig \ - -gpu mode=double arch=20 -cuda mode=double arch=20 -m linux \ - -o all -a libs exe - -Make.py -d ~/lammps -j 16 -p #all opt omp gpu cuda intel kokkos orig \ - -kokkos cuda arch=20 -gpu mode=double arch=20 \ - -cuda mode=double arch=20 -m cuda -o all_cuda -a libs exe - ------------------------------------------------------------------------ -To run on just CPUs (without using the GPU or USER-CUDA styles), +To run on just CPUs (without using the GPU styles), do something like the following: mpirun -np 1 lmp_linux_double -v x 8 -v y 8 -v z 8 -v t 100 < in.lj @@ -81,23 +47,5 @@ node via a "-ppn" setting. ------------------------------------------------------------------------ -To run with the USER-CUDA package, do something like the following: - -mpirun -np 1 lmp_linux_single -c on -sf cuda -v x 16 -v y 16 -v z 16 -v t 100 < in.lj -mpirun -np 2 lmp_linux_double -c on -sf cuda -pk cuda 2 -v x 32 -v y 64 -v z 64 -v t 100 < in.eam - -The "xyz" settings determine the problem size. The "t" setting -determines the number of timesteps. The "np" setting determines how -many MPI tasks (per node) the problem will run on. The numeric -argument to the "-pk" setting is the number of GPUs (per node); 1 GPU -is the default. Note that the number of MPI tasks must equal the -number of GPUs (both per node) with the USER-CUDA package. - -These mpirun commands run on a single node. To run on multiple nodes, -scale up the "-np" setting, and control the number of MPI tasks per -node via a "-ppn" setting. - ------------------------------------------------------------------------- - If the script has "titan" in its name, it was run on the Titan supercomputer at ORNL. diff --git a/bench/README b/bench/README index 85d71cbb5d..0806fcded6 100644 --- a/bench/README +++ b/bench/README @@ -71,49 +71,33 @@ integration ---------------------------------------------------------------------- -Here is a src/Make.py command which will perform a parallel build of a -LAMMPS executable "lmp_mpi" with all the packages needed by all the -examples. This assumes you have an MPI installed on your machine so -that "mpicxx" can be used as the wrapper compiler. It also assumes -you have an Intel compiler to use as the base compiler. You can leave -off the "-cc mpi wrap=icc" switch if that is not the case. You can -also leave off the "-fft fftw3" switch if you do not have the FFTW -(v3) installed as an FFT package, in which case the default KISS FFT -library will be used. - -cd src -Make.py -j 16 -p none molecule manybody kspace granular rigid orig \ - -cc mpi wrap=icc -fft fftw3 -a file mpi - ----------------------------------------------------------------------- - Here is how to run each problem, assuming the LAMMPS executable is named lmp_mpi, and you are using the mpirun command to launch parallel runs: Serial (one processor runs): -lmp_mpi < in.lj -lmp_mpi < in.chain -lmp_mpi < in.eam -lmp_mpi < in.chute -lmp_mpi < in.rhodo +lmp_mpi -in in.lj +lmp_mpi -in in.chain +lmp_mpi -in in.eam +lmp_mpi -in in.chute +lmp_mpi -in in.rhodo Parallel fixed-size runs (on 8 procs in this case): -mpirun -np 8 lmp_mpi < in.lj -mpirun -np 8 lmp_mpi < in.chain -mpirun -np 8 lmp_mpi < in.eam -mpirun -np 8 lmp_mpi < in.chute -mpirun -np 8 lmp_mpi < in.rhodo +mpirun -np 8 lmp_mpi -in in.lj +mpirun -np 8 lmp_mpi -in in.chain +mpirun -np 8 lmp_mpi -in in.eam +mpirun -np 8 lmp_mpi -in in.chute +mpirun -np 8 lmp_mpi -in in.rhodo Parallel scaled-size runs (on 16 procs in this case): -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.lj -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.chain.scaled -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.eam -mpirun -np 16 lmp_mpi -var x 4 -var y 4 < in.chute.scaled -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.rhodo.scaled +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.lj +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.chain.scaled +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.eam +mpirun -np 16 lmp_mpi -var x 4 -var y 4 -in in.chute.scaled +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.rhodo.scaled For each of the scaled-size runs you must set 3 variables as -var command line switches. The variables x,y,z are used in the input diff --git a/examples/README b/examples/README index e4312e2598..702ada790b 100644 --- a/examples/README +++ b/examples/README @@ -105,20 +105,11 @@ tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si vashishta: models using the Vashishta potential voronoi: Voronoi tesselation via compute voronoi/atom command -Here is a src/Make.py command which will perform a parallel build of a -LAMMPS executable "lmp_mpi" with all the packages needed by all the -examples, with the exception of the accelerate sub-directory. See the -accelerate/README for Make.py commands suitable for its example -scripts. - -cd src -Make.py -j 16 -p none std no-lib reax meam poems reaxc orig -a lib-all mpi - Here is how you might run and visualize one of the sample problems: cd indent cp ../../src/lmp_mpi . # copy LAMMPS executable to this dir -lmp_mpi < in.indent # run the problem +lmp_mpi -in in.indent # run the problem Running the simulation produces the files {dump.indent} and {log.lammps}. You can visualize the dump file as follows: diff --git a/examples/accelerate/README b/examples/accelerate/README index 1fab296a53..c4eb5dcc8d 100644 --- a/examples/accelerate/README +++ b/examples/accelerate/README @@ -1,14 +1,11 @@ These are example scripts that can be run with any of the acclerator packages in LAMMPS: -USER-CUDA, GPU, USER-INTEL, KOKKOS, USER-OMP, OPT +GPU, USER-INTEL, KOKKOS, USER-OMP, OPT The easiest way to build LAMMPS with these packages -is via the src/Make.py tool described in Section 2.4 -of the manual. You can also type "Make.py -h" to see -its options. The easiest way to run these scripts -is by using the appropriate - +is via the flags described in Section 4 of the manual. +The easiest way to run these scripts is by using the appropriate Details on the individual accelerator packages can be found in doc/Section_accelerate.html. @@ -16,21 +13,6 @@ can be found in doc/Section_accelerate.html. Build LAMMPS with one or more of the accelerator packages -The following command will invoke the src/Make.py tool with one of the -command-lines from the Make.list file: - -../../src/Make.py -r Make.list target - -target = one or more of the following: - cpu, omp, opt - cuda_double, cuda_mixed, cuda_single - gpu_double, gpu_mixed, gpu_single - intel_cpu, intel_phi - kokkos_omp, kokkos_cuda, kokkos_phi - -If successful, the build will produce the file lmp_target in this -directory. - Note that in addition to any accelerator packages, these packages also need to be installed to run all of the example scripts: ASPHERE, MOLECULE, KSPACE, RIGID. @@ -38,39 +20,11 @@ MOLECULE, KSPACE, RIGID. These two targets will build a single LAMMPS executable with all the CPU accelerator packages installed (USER-INTEL for CPU, KOKKOS for OMP, USER-OMP, OPT) or all the GPU accelerator packages installed -(USER-CUDA, GPU, KOKKOS for CUDA): - -target = all_cpu, all_gpu - -Note that the Make.py commands in Make.list assume an MPI environment -exists on your machine and use mpicxx as the wrapper compiler with -whatever underlying compiler it wraps by default. If you add "-cc mpi -wrap=g++" or "-cc mpi wrap=icc" after the target, you can choose the -underlying compiler for mpicxx to invoke. E.g. - -../../src/Make.py -r Make.list intel_cpu -cc mpi wrap=icc +(GPU, KOKKOS for CUDA): -You should do this for any build that includes the USER-INTEL -package, since it will perform best with the Intel compilers. - -Note that for kokkos_cuda, it needs to be "-cc nvcc" instead of "mpi", -since a KOKKOS for CUDA build requires NVIDIA nvcc as the wrapper -compiler. - -Also note that the Make.py commands in Make.list use the default -FFT support which is via the KISS library. If you want to -build with another FFT library, e.g. FFTW3, then you can add -"-fft fftw3" after the target, e.g. - -../../src/Make.py -r Make.list gpu -fft fftw3 - -For any build with USER-CUDA, GPU, or KOKKOS for CUDA, be sure to set +For any build with GPU, or KOKKOS for CUDA, be sure to set the arch=XX setting to the appropriate value for the GPUs and Cuda -environment on your system. What is defined in the Make.list file is -arch=21 for older Fermi GPUs. This can be overridden as follows, -e.g. for Kepler GPUs: - -../../src/Make.py -r Make.list gpu_double -gpu mode=double arch=35 +environment on your system. --------------------- @@ -118,12 +72,6 @@ Note that when running in.lj.5.0 (which has a long cutoff) with the GPU package, the "-pk tpa" setting should be > 1 (e.g. 8) for best performance. -** USER-CUDA package - -lmp_machine -c on -sf cuda < in.lj -mpirun -np 1 lmp_machine -c on -sf cuda < in.lj # 1 MPI, 1 MPI/GPU -mpirun -np 2 lmp_machine -c on -sf cuda -pk cuda 2 < in.lj # 2 MPI, 1 MPI/GPU - ** KOKKOS package for OMP lmp_kokkos_omp -k on t 1 -sf kk -pk kokkos neigh half < in.lj -- GitLab From 84065dde2112eb1094ffb40ef39bf8ee62caf26c Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Thu, 20 Jul 2017 12:02:50 -0500 Subject: [PATCH 517/593] Refactor lib/kim/Install.py; works with phtyon 3 2.7 --- lib/kim/Install.py | 100 ++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 46 deletions(-) diff --git a/lib/kim/Install.py b/lib/kim/Install.py index 1405cc5fad..1d022a5875 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# install.pa tool to setup the kim-api library +# install.py tool to setup the kim-api library # used to automate the steps described in the README file in this dir from __future__ import print_function import sys,os,re,subprocess @@ -8,28 +8,25 @@ try: from urllib.request import urlretrieve as geturl except: from urllib import urlretrieve as geturl help = """ -Syntax from src dir: make lib-kim args="-v version -b kim-install-dir kim-name -a kim-name" -Syntax from lib dir: python Install.py -v version -b kim-install-dir kim-name -a kim-name +Syntax from src dir: make lib-kim args="-v version -b -a kim-name" +Syntax from lib dir: python Install.py -v version -b -a kim-name specify one or more options, order does not matter -v = version of KIM API library to use default = kim-api-v1.8.2 (current as of June 2017) - -b = download and build KIM API library with KIM models - kim-dir = where to install/build the KIM API library - use "." to install in lib/kim - kim-name = none to install only the example KIM models - kim-name = KIM model name (see example below) + examples - kim-name = OpenKIM to install all models - from the openkim.org site (this can take 30 minutes or more) + -b = download and build KIM API library with example Models -a = add single KIM model or model driver with kim-name - to existing KIM API lib (see example below) + to existing KIM API lib (see example below). + If kim-name = everything, then rebuild KIM API library with + all available OpenKIM Models (this implies -b). + -vv = be more verbose about what is happening while the script runs Examples: -make lib-kim args="-b . none" # install KIM API lib with only example models -make lib-kim args="-b . Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model -make lib-kim args="-b . OpenKIM" # install KIM API lib with all models +make lib-kim args="-b" # install KIM API lib with only example models +make lib-kim args="-b -a Glue_Ercolessi_Adams_Al__MO_324507536345_001" # Ditto plus one model +make lib-kim args="-b -a everything" # install KIM API lib with all models make lib-kim args="-a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver See the list of KIM model drivers here: @@ -57,7 +54,9 @@ thisdir = os.environ['PWD'] version = "kim-api-v1.8.2" buildflag = False +everythingflag = False addflag = False +verboseflag = False iarg = 0 while iarg < len(args): @@ -67,15 +66,19 @@ while iarg < len(args): iarg += 2 elif args[iarg] == "-b": buildflag = True - if iarg+3 > len(args): error() - dir = args[iarg+1] - modelname = args[iarg+2] - iarg += 3 + iarg += 1 elif args[iarg] == "-a": addflag = True if iarg+2 > len(args): error() addmodelname = args[iarg+1] + if addmodelname == "everything": + buildflag = True + everythingflag = True + addflag = False iarg += 2 + elif args[iarg] == "-vv": + verboseflag = True + iarg += 1 else: error() thisdir = os.path.abspath(thisdir) @@ -88,14 +91,14 @@ if buildflag: # set install directory - dir = os.path.join(os.path.abspath(dir), "installed-" + version) + dir = os.path.join(os.path.abspath(thisdir), "installed-" + version) # check to see if an installed kim-api already exists and wipe it out. if os.path.isdir(dir): print("kim-api is already installed at %s.\nRemoving it for re-install" % dir) cmd = "rm -rf %s" % dir - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) # configure LAMMPS to use kim-api to be installed @@ -116,44 +119,48 @@ if buildflag: geturl(url,"%s/%s.tgz" % (thisdir,version)) print("Unpacking kim-api tarball ...") cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (thisdir,version,version) - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) # configure kim-api print("Configuring kim-api ...") cmd = "cd %s/%s; ./configure --prefix='%s'" % (thisdir,version,dir) - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) # build kim-api - print("Configuring model : %s" % modelname) - if modelname == "none": - cmd = "cd %s/%s; make add-examples" % (thisdir,version) - else: - if modelname == "OpenKIM": - print("configuring all OpenKIM models, this will take a while ...") - cmd = "cd %s/%s; make add-examples; make add-%s" % \ - (thisdir,version,modelname) - subprocess.check_output(cmd,shell=True) + print("Configuring example Models") + cmd = "cd %s/%s; make add-examples" % (thisdir,version) + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + if verboseflag: print (txt.decode("UTF-8")) + + if everythingflag: + print("Configuring all OpenKIM models, this will take a while ...") + cmd = "cd %s/%s; make add-OpenKIM" % (thisdir,version) + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + if verboseflag: print(txt.decode("UTF-8")) print("Building kim-api ...") cmd = "cd %s/%s; make" % (thisdir,version) - subprocess.check_output(cmd,shell=True) + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + if verboseflag: print(txt.decode("UTF-8")) # install kim-api print("Installing kim-api ...") cmd = "cd %s/%s; make install" % (thisdir,version) - subprocess.check_output(cmd,shell=True) + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + if verboseflag: print(txt.decode("UTF-8")) cmd = "cd %s/%s; make install-set-default-to-v1" %(thisdir,version) - subprocess.check_output(cmd,shell=True) + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + if verboseflag: print(txt.decode("UTF-8")) # remove source files print("Removing kim-api source and build files ...") cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" % (thisdir,version,version) - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) # add a single model (and possibly its driver) to existing KIM installation @@ -166,19 +173,18 @@ if addflag: error() else: cmd = "cd %s; make -f Makefile.KIM_DIR print_dir" % thisdir - dir = subprocess.check_output(cmd,shell=True)[1] + dir = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)[1] # download single model # try first via urllib - # if fails (probably due to no SSL support), use wget - print("Downloading item tarball ...") + print("Downloading tarball for %s..." % addmodelname) url = "https://openkim.org/download/%s.tgz" % addmodelname geturl(url,"%s/%s.tgz" % (thisdir,addmodelname)) print("Unpacking item tarball ...") cmd = "cd %s; tar zxvf %s.tgz" % (thisdir,addmodelname) - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) print("Building item ...") cmd = "cd %s/%s; make; make install" %(thisdir,addmodelname) @@ -187,19 +193,19 @@ if addflag: except subprocess.CalledProcessError as e: # Error: but first, check to see if it needs a driver - firstRunOutput = e.output.decode() + firstRunOutput = e.output.decode("UTF-8") cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) - txt = txt.decode().strip() + txt = txt.decode("UTF-8") if txt == "ParameterizedModel": # Get and install driver cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) - adddrivername = txt.decode().strip() - print("First installing model driver: %s" % adddrivername) + adddrivername = txt.decode("UTF-8").strip() + print("First installing model driver: %s..." % adddrivername) cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) try: txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) @@ -207,6 +213,8 @@ if addflag: print(e.output) sys.exit() + if verboseflag: print(txt.decode("UTF-8")) + # now install the model that needed the driver print("Now installing model : %s" % addmodelname) @@ -216,7 +224,7 @@ if addflag: except subprocess.CalledProcessError as e: print(e.output) sys.exit() - print(txt.decode()) + print(txt.decode("UTF-8")) sys.exit() else: print(firstRunOutput) @@ -226,7 +234,7 @@ if addflag: # success the first time - print(txt) + if verboseflag: print(txt.decode("UTF-8")) print("Removing kim item source and build files ...") cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) -- GitLab From 66154e8a8b31fcfa1ce512908a249d4175257a28 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 20 Jul 2017 15:05:58 -0400 Subject: [PATCH 518/593] avoid makefile failure, if LAMMPS has not been configured yet --- lib/colvars/Makefile.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/colvars/Makefile.common b/lib/colvars/Makefile.common index 818373abe1..6e05ca93f5 100644 --- a/lib/colvars/Makefile.common +++ b/lib/colvars/Makefile.common @@ -1,7 +1,7 @@ # Shared -*- makefile -*- for multiple architectures # Detect settings from PYTHON package (if defined) -include ../../src/Makefile.package.settings +sinclude ../../src/Makefile.package.settings ifeq ($(python_SYSINC),) COLVARS_PYTHON_INCFLAGS = else -- GitLab From 9d0d90c038604893c20f2737331d548f4fb188c7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 20 Jul 2017 15:25:27 -0400 Subject: [PATCH 519/593] README clarification from giacomo --- lib/colvars/README | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/colvars/README b/lib/colvars/README index a4f04221b3..ce1d319974 100644 --- a/lib/colvars/README +++ b/lib/colvars/README @@ -18,13 +18,17 @@ For a brief description see: This directory has source files to build a library that LAMMPS links against when using the USER-COLVARS package. -This library must be built with a C++ compiler, *before* LAMMPS is built, so -that LAMMPS can link against it. You can use the provided Makefile.* files or -create your own, specific to your compiler and system. For example: - +This library must be built with a C++ compiler, *before* LAMMPS is built and +*after* packages are configured, so that LAMMPS can link against it. +You can use the provided Makefile.* files or create your own, specific to your +compiler and system. For example: + + cd src + make yes-user-colvars + cd ../lib/colvars make -f Makefile.g++ -will use the GNU C++ compiler and is a good template to start. +where Makefile.g++ uses the GNU C++ compiler and is a good template to start. **Optional**: if you use the Install.py script provided in this folder, you can give the machine name as the '-m' argument. This can be the suffix of one -- GitLab From 5031f5b8079cb285b0cae910c32caab96e382b68 Mon Sep 17 00:00:00 2001 From: Giacomo Fiorin Date: Thu, 20 Jul 2017 15:46:58 -0400 Subject: [PATCH 520/593] Comment out use by Colvars of Makefile.lammps from other packages --- lib/colvars/Makefile.common | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/colvars/Makefile.common b/lib/colvars/Makefile.common index 818373abe1..f47403f771 100644 --- a/lib/colvars/Makefile.common +++ b/lib/colvars/Makefile.common @@ -1,12 +1,12 @@ # Shared -*- makefile -*- for multiple architectures -# Detect settings from PYTHON package (if defined) -include ../../src/Makefile.package.settings -ifeq ($(python_SYSINC),) -COLVARS_PYTHON_INCFLAGS = -else -COLVARS_PYTHON_INCFLAGS = -DCOLVARS_PYTHON $(python_SYSINC) -endif +# # Detect settings from PYTHON package (if defined) +# sinclude ../../src/Makefile.package.settings +# ifeq ($(python_SYSINC),) +# COLVARS_PYTHON_INCFLAGS = +# else +# COLVARS_PYTHON_INCFLAGS = -DCOLVARS_PYTHON $(python_SYSINC) +# endif # Detect debug settings ifeq ($(COLVARS_DEBUG),) -- GitLab From c98f6140e7555a0e6c2c5f5e429fc149ee52520c Mon Sep 17 00:00:00 2001 From: Giacomo Fiorin Date: Thu, 20 Jul 2017 15:49:31 -0400 Subject: [PATCH 521/593] Change order of targets in Makefiles for Colvars --- lib/colvars/Makefile.g++ | 4 ++-- lib/colvars/Makefile.mingw32-cross | 4 ++-- lib/colvars/Makefile.mingw64-cross | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/colvars/Makefile.g++ b/lib/colvars/Makefile.g++ index cd7f72a833..556e39d070 100644 --- a/lib/colvars/Makefile.g++ +++ b/lib/colvars/Makefile.g++ @@ -11,12 +11,12 @@ AR = ar ARFLAGS = -rscv SHELL = /bin/sh -include Makefile.common - .PHONY: default clean default: $(COLVARS_LIB) Makefile.lammps +include Makefile.common + clean: -rm -f $(COLVARS_OBJS) $(COLVARS_LIB) diff --git a/lib/colvars/Makefile.mingw32-cross b/lib/colvars/Makefile.mingw32-cross index e2873ecdad..29c64b26a2 100644 --- a/lib/colvars/Makefile.mingw32-cross +++ b/lib/colvars/Makefile.mingw32-cross @@ -14,12 +14,12 @@ AR = i686-w64-mingw32-ar ARFLAGS = -rscv SHELL = /bin/sh -include Makefile.common - .PHONY: default clean default: $(COLVARS_OBJ_DIR) $(COLVARS_LIB) Makefile.lammps +include Makefile.common + $(COLVARS_OBJ_DIR): mkdir $(COLVARS_OBJ_DIR) diff --git a/lib/colvars/Makefile.mingw64-cross b/lib/colvars/Makefile.mingw64-cross index 09d6bd4fa9..2fd1c6fc67 100644 --- a/lib/colvars/Makefile.mingw64-cross +++ b/lib/colvars/Makefile.mingw64-cross @@ -14,12 +14,12 @@ AR = x86_64-w64-mingw32-ar ARFLAGS = -rscv SHELL = /bin/sh -include Makefile.common - .PHONY: default clean default: $(COLVARS_OBJ_DIR) $(COLVARS_LIB) Makefile.lammps +include Makefile.common + $(COLVARS_OBJ_DIR): mkdir $(COLVARS_OBJ_DIR) -- GitLab From 59db5f6a1782b0cacdb28a36ffbfab6940f48afb Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 20 Jul 2017 14:40:35 -0600 Subject: [PATCH 522/593] update of Fortran-DFTB interface to be compatible with fix msst --- doc/src/fix_msst.txt | 46 ++++--- doc/src/pair_kim.txt | 33 ++++- examples/COUPLE/README | 4 +- .../LAMMPS-wrapper.cpp | 0 .../LAMMPS-wrapper.h | 0 .../LAMMPS-wrapper2.cpp | 26 +++- .../LAMMPS-wrapper2.h | 3 + .../{fortran3 => fortran_dftb}/LAMMPS.F90 | 30 +++- .../COUPLE/{fortran3 => fortran_dftb}/README | 12 +- .../{fortran3 => fortran_dftb}/data.diamond | 0 examples/COUPLE/fortran_dftb/dftb_in.hsd | 40 ++++++ examples/COUPLE/fortran_dftb/dftb_pin.hsd | 129 ++++++++++++++++++ .../{fortran3 => fortran_dftb}/in.simple | 0 examples/COUPLE/fortran_dftb/log.simple | 71 ++++++++++ .../{fortran3 => fortran_dftb}/makefile | 2 +- .../{fortran3 => fortran_dftb}/simple.f90 | 24 ++-- lib/colvars/Install.py | 110 ++++----------- 17 files changed, 396 insertions(+), 134 deletions(-) rename examples/COUPLE/{fortran3 => fortran_dftb}/LAMMPS-wrapper.cpp (100%) rename examples/COUPLE/{fortran3 => fortran_dftb}/LAMMPS-wrapper.h (100%) rename examples/COUPLE/{fortran3 => fortran_dftb}/LAMMPS-wrapper2.cpp (71%) rename examples/COUPLE/{fortran3 => fortran_dftb}/LAMMPS-wrapper2.h (89%) rename examples/COUPLE/{fortran3 => fortran_dftb}/LAMMPS.F90 (97%) rename examples/COUPLE/{fortran3 => fortran_dftb}/README (78%) rename examples/COUPLE/{fortran3 => fortran_dftb}/data.diamond (100%) create mode 100644 examples/COUPLE/fortran_dftb/dftb_in.hsd create mode 100644 examples/COUPLE/fortran_dftb/dftb_pin.hsd rename examples/COUPLE/{fortran3 => fortran_dftb}/in.simple (100%) create mode 100644 examples/COUPLE/fortran_dftb/log.simple rename examples/COUPLE/{fortran3 => fortran_dftb}/makefile (95%) rename examples/COUPLE/{fortran3 => fortran_dftb}/simple.f90 (91%) diff --git a/doc/src/fix_msst.txt b/doc/src/fix_msst.txt index 43f35d6880..025c733897 100644 --- a/doc/src/fix_msst.txt +++ b/doc/src/fix_msst.txt @@ -25,7 +25,7 @@ keyword = {q} or {mu} or {p0} or {v0} or {e0} or {tscale} or {beta} or {dftb} :l {e0} value = initial total energy (energy units) {tscale} value = reduction in initial temperature (unitless fraction between 0.0 and 1.0) {dftb} value = {yes} or {no} for whether using MSST in conjunction with DFTB+ - {beta} value = scale factor on energy contribution of DFTB+ :pre + {beta} value = scale factor for improved energy conservation :pre :ule [Examples:] @@ -72,6 +72,14 @@ be calculated on the first step, after the energy specified by {tscale} is removed. The value of {e0} is not used in the dynamical equations, but is used in calculating the deviation from the Hugoniot. +The keyword {beta} is a scaling term that can be added to the MSST +ionic equations of motion to account for drift in the conserved +quantity during long timescale simulations, similar to a Berendson +thermostat. See "(Reed)"_#Reed and "(Goldman)"_#Goldman for more +details. The value of {beta} must be between 0.0 and 1.0 inclusive. +A value of 0.0 means no contribution, a value of 1.0 means a full +contribution. + Values of shockvel less than a critical value determined by the material response will not have compressive solutions. This will be reflected in lack of significant change of the volume in the MSST. @@ -95,23 +103,15 @@ or "_MSST_pe". The group for the new computes is "all". :line -The {dftb} and {beta} keywords are to allow this fix to be used when -LAMMPS is being driven by DFTB+, a density-functional tight-binding -code. - -If the keyword {dftb} is used with a value of {yes}, then the MSST -equations are altered to account for an energy contribution compute by -DFTB+. In this case, you must define a "fix -external"_fix_external.html command in your input script, which is -used to callback to DFTB+ during the LAMMPS timestepping. DFTB+ will -communicate its info to LAMMPS via that fix. - -The keyword {beta} is a scale factor on the DFTB+ energy contribution. -The value of {beta} must be between 0.0 and 1.0 inclusive. A value of -0.0 means no contribution, a value of 1.0 means a full contribution. - -(July 2017) More information about these keywords and the use of -LAMMPS with DFTB+ will be added to the LAMMMPS documention soon. +The {dftb} keyword is to allow this fix to be used when LAMMPS is +being driven by DFTB+, a density-functional tight-binding code. If the +keyword {dftb} is used with a value of {yes}, then the MSST equations +are altered to account for the electron entropy contribution to the +Hugonio relations and total energy. See "(Reed2)"_#Reed2 and +"(Goldman)"_#Goldman for details on this contribution. In this case, +you must define a "fix external"_fix_external.html command in your +input script, which is used to callback to DFTB+ during the LAMMPS +timestepping. DFTB+ will communicate its info to LAMMPS via that fix. :line @@ -182,4 +182,12 @@ timestep. :line :link(Reed) -[(Reed)] Reed, Fried, and Joannopoulos, Phys. Rev. Lett., 90, 235503 (2003). +[(Reed)] Reed, Fried, and Joannopoulos, Phys. Rev. Lett., 90, 235503 +(2003). + +:link(Reed2) +[(Reed2)] Reed, J. Phys. Chem. C, 116, 2205 (2012). + +:link(Goldman) +[(Goldman)] Goldman, Srinivasan, Hamel, Fried, Gaus, and Elstner, +J. Phys. Chem. C, 117, 7885 (2013). diff --git a/doc/src/pair_kim.txt b/doc/src/pair_kim.txt index 5a623e5ece..5ee607c2b0 100644 --- a/doc/src/pair_kim.txt +++ b/doc/src/pair_kim.txt @@ -27,13 +27,34 @@ pair_coeff * * Ar Ar :pre [Description:] This pair style is a wrapper on the "Knowledge Base for Interatomic -Models (KIM)"_https://openkim.org repository of interatomic potentials, -so that they can be used by LAMMPS scripts. +Models (OpenKIM)"_https://openkim.org repository of interatomic +potentials, so that they can be used by LAMMPS scripts. -In KIM lingo, a potential is a "model" and a model contains both the -analytic formulas that define the potential as well as the parameters -needed to run it for one or more materials, including coefficients and -cutoffs. +Note that in LAMMPS lingo, a KIM model driver is a pair style +(e.g. EAM or Tersoff). A KIM model is a pair style for a particular +element or alloy and set of parameters, e.g. EAM for Cu with a +specific EAM potential file. + +See the current list of "KIM model +drivers"_https://openkim.org/kim-items/model-drivers/alphabetical. + +See the current list of all "KIM +models"_https://openkim.org/kim-items/models/by-model-drivers + +See the list of "example KIM models"_https://openkim.org/kim-api which +are included in the KIM library by default, in the "What is in the KIM +API source package?" section. + +To use this pair style, you must first download and install the KIM +API library from the "OpenKIM website"_https://openkim.org. The "KIM +section of Section packages"_Section_packages.html#kim-package has +instructions on how to do this with a simple make command, when +building LAMMPS. + +See the examples/kim dir for an input script that uses a KIM model +(potential) for Lennard-Jones. + +:line The argument {virialmode} determines how the global virial is calculated. If {KIMvirial} is specified, the KIM model performs the diff --git a/examples/COUPLE/README b/examples/COUPLE/README index c8c9e0e31b..83e7463531 100644 --- a/examples/COUPLE/README +++ b/examples/COUPLE/README @@ -41,8 +41,8 @@ fortran a simple wrapper on the LAMMPS library API that can be called from Fortran fortran2 a more sophisticated wrapper on the LAMMPS library API that can be called from Fortran -fortran3 wrapper written by Nir Goldman (LLNL), as an +fortran_dftb wrapper written by Nir Goldman (LLNL), as an extension to fortran2, used for calling LAMMPS - from Fortran DFTB+ code + from Fortran DFTB+ tight-binding code Each sub-directory has its own README with more details. diff --git a/examples/COUPLE/fortran3/LAMMPS-wrapper.cpp b/examples/COUPLE/fortran_dftb/LAMMPS-wrapper.cpp similarity index 100% rename from examples/COUPLE/fortran3/LAMMPS-wrapper.cpp rename to examples/COUPLE/fortran_dftb/LAMMPS-wrapper.cpp diff --git a/examples/COUPLE/fortran3/LAMMPS-wrapper.h b/examples/COUPLE/fortran_dftb/LAMMPS-wrapper.h similarity index 100% rename from examples/COUPLE/fortran3/LAMMPS-wrapper.h rename to examples/COUPLE/fortran_dftb/LAMMPS-wrapper.h diff --git a/examples/COUPLE/fortran3/LAMMPS-wrapper2.cpp b/examples/COUPLE/fortran_dftb/LAMMPS-wrapper2.cpp similarity index 71% rename from examples/COUPLE/fortran3/LAMMPS-wrapper2.cpp rename to examples/COUPLE/fortran_dftb/LAMMPS-wrapper2.cpp index f245c44d79..d16b49cc50 100644 --- a/examples/COUPLE/fortran3/LAMMPS-wrapper2.cpp +++ b/examples/COUPLE/fortran_dftb/LAMMPS-wrapper2.cpp @@ -47,11 +47,35 @@ void lammps_set_callback (void *ptr) { return; } +void lammps_set_external_vector_length (void *ptr, int n) { + class LAMMPS *lmp = (class LAMMPS *) ptr; + int ifix = lmp->modify->find_fix_by_style("external"); + FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix]; + fix->set_vector_length(n); + return; +} + +void lammps_set_external_vector (void *ptr, int n, double val) { + class LAMMPS *lmp = (class LAMMPS *) ptr; + int ifix = lmp->modify->find_fix_by_style("external"); + FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix]; + fix->set_vector (n, val); + return; +} + void lammps_set_user_energy (void *ptr, double energy) { class LAMMPS *lmp = (class LAMMPS *) ptr; int ifix = lmp->modify->find_fix_by_style("external"); FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix]; - fix->set_energy(energy); + fix->set_energy_global(energy); + return; +} + +void lammps_set_user_virial (void *ptr, double *virial) { + class LAMMPS *lmp = (class LAMMPS *) ptr; + int ifix = lmp->modify->find_fix_by_style("external"); + FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix]; + fix->set_virial_global(virial); return; } diff --git a/examples/COUPLE/fortran3/LAMMPS-wrapper2.h b/examples/COUPLE/fortran_dftb/LAMMPS-wrapper2.h similarity index 89% rename from examples/COUPLE/fortran3/LAMMPS-wrapper2.h rename to examples/COUPLE/fortran_dftb/LAMMPS-wrapper2.h index 794006e3af..ed79015e78 100644 --- a/examples/COUPLE/fortran3/LAMMPS-wrapper2.h +++ b/examples/COUPLE/fortran_dftb/LAMMPS-wrapper2.h @@ -26,6 +26,9 @@ extern "C" { /* Prototypes for auxiliary functions */ void lammps_set_callback (void *); void lammps_set_user_energy (void*, double); +void lammps_set_user_virial (void*, double*); +void lammps_set_external_vector_length (void*, int); +void lammps_set_external_vector (void*, int, double); #ifdef __cplusplus } diff --git a/examples/COUPLE/fortran3/LAMMPS.F90 b/examples/COUPLE/fortran_dftb/LAMMPS.F90 similarity index 97% rename from examples/COUPLE/fortran3/LAMMPS.F90 rename to examples/COUPLE/fortran_dftb/LAMMPS.F90 index eb5b7f825b..9b18bbfa5f 100644 --- a/examples/COUPLE/fortran3/LAMMPS.F90 +++ b/examples/COUPLE/fortran_dftb/LAMMPS.F90 @@ -52,12 +52,16 @@ module LAMMPS C_NULL_CHAR, C_loc, C_F_pointer, lammps_instance => C_ptr implicit none private + public :: lammps_set_user_virial + public :: lammps_set_external_vector_length + public :: lammps_set_external_vector + public :: lammps_set_user_energy public :: lammps_open, lammps_open_no_mpi, lammps_close, lammps_file, & lammps_command, lammps_free, lammps_extract_global, & lammps_extract_atom, lammps_extract_compute, lammps_extract_fix, & lammps_extract_variable, lammps_get_natoms, lammps_gather_atoms, & - lammps_scatter_atoms, lammps_set_callback, lammps_set_user_energy - public :: lammps_instance, C_ptr, C_double, C_int + lammps_set_callback + public :: lammps_scatter_atoms, lammps_instance, C_ptr, C_double, C_int !! Functions supplemental to the prototypes in library.h. {{{1 !! The function definitions (in C++) are contained in LAMMPS-wrapper.cpp. @@ -218,6 +222,28 @@ module LAMMPS real(C_double), value :: energy end subroutine lammps_set_user_energy + subroutine lammps_set_user_virial (ptr, virial) & + bind (C, name='lammps_set_user_virial') + import :: C_ptr, C_double + type (C_ptr), value :: ptr + real(C_double) :: virial(6) + end subroutine lammps_set_user_virial + + subroutine lammps_set_external_vector_length (ptr, n) & + bind (C, name='lammps_set_external_vector_length') + import :: C_ptr, C_double, C_int + type(C_ptr), value :: ptr + integer (C_int), value :: n + end subroutine lammps_set_external_vector_length + + subroutine lammps_set_external_vector (ptr, n, val) & + bind (C, name='lammps_set_external_vector') + import :: C_ptr, C_int, C_double + type (C_ptr), value :: ptr + integer (C_int), value :: n + real(C_double), value :: val + end subroutine lammps_set_external_vector + subroutine lammps_actual_gather_atoms (ptr, name, type, count, data) & bind (C, name='lammps_gather_atoms') import :: C_ptr, C_int, C_char diff --git a/examples/COUPLE/fortran3/README b/examples/COUPLE/fortran_dftb/README similarity index 78% rename from examples/COUPLE/fortran3/README rename to examples/COUPLE/fortran_dftb/README index 9effa35ec4..39a2f18169 100644 --- a/examples/COUPLE/fortran3/README +++ b/examples/COUPLE/fortran_dftb/README @@ -3,8 +3,9 @@ forces from a fortran code for a LAMMPS simulation. The reader should refer to the README file in COUPLE/fortran2 before proceeding. Here, the LAMMPS.F90 file has been modified slightly and additional files named LAMMPS-wrapper2.h and LAMMPS-wrapper2.cpp have been included in -order to supply wrapper functions to set the LAMMPS callback function -and total energy. +order to supply wrapper functions to set the LAMMPS callback function, +total energy, virial, and electronic entropy contribution (needed for +MSST simulations with a quantum code). In this example, the callback function is set to run the semi-empirical quantum code DFTB+ in serial and then read in the total @@ -20,11 +21,14 @@ etc. A few more important notes: --The stress tensor from DFTB+ is passed in to LAMMPS via pointer. -Calling the subroutine lammps_set_callback() is required in order to set a pointer to the callback function in LAMMPS. -The subroutine lammps_set_user_energy() passes in the potential energy - from DFTB+ to LAMMPS. + from DFTB+ to LAMMPS. Similarly, lammps_set_user_virial passes the stress tensor. + +-The electronic entropy contribution is set via lammps_set_external_vector(). Their needs + to be a call to lammps_set_external_vector_length() before this value can be + passed to LAMMPS. This example was created by Nir Goldman, whom you can contact with questions: diff --git a/examples/COUPLE/fortran3/data.diamond b/examples/COUPLE/fortran_dftb/data.diamond similarity index 100% rename from examples/COUPLE/fortran3/data.diamond rename to examples/COUPLE/fortran_dftb/data.diamond diff --git a/examples/COUPLE/fortran_dftb/dftb_in.hsd b/examples/COUPLE/fortran_dftb/dftb_in.hsd new file mode 100644 index 0000000000..104a4c04ce --- /dev/null +++ b/examples/COUPLE/fortran_dftb/dftb_in.hsd @@ -0,0 +1,40 @@ +#sample DFTB+ script to run this test code +Geometry = GenFormat { +<<< "lammps.gen" +} + +Driver = { +} + +Hamiltonian = DFTB { + LAMMPS = Yes # keyword to print energy, forces, and stress tensor to file(results.out) + SCC = No + MaxAngularMomentum = { + C = "p" + } + Charge = 0.0 + Eigensolver = Standard {} + Filling = Fermi { + Temperature [Kelvin] = 298.0 + } + SlaterKosterFiles = Type2FileNames { + Prefix = "~/slako/mio-1-1/" # the user must define the location of the skf files + Separator = "-" + Suffix = ".skf" + LowerCaseTypeName = No + } + KPointsAndWeights = { + 0.0000000000000 0.0000000000000 0.0000000000000 1.00000000000000 + } +} + +Options = { + CalculateForces = Yes + WriteDetailedOut = No + WriteBandOut = No + RandomSeed = 12345 +} + +ParserOptions = { + ParserVersion = 3 +} diff --git a/examples/COUPLE/fortran_dftb/dftb_pin.hsd b/examples/COUPLE/fortran_dftb/dftb_pin.hsd new file mode 100644 index 0000000000..6d9dea4a15 --- /dev/null +++ b/examples/COUPLE/fortran_dftb/dftb_pin.hsd @@ -0,0 +1,129 @@ +Geometry = GenFormat { +64 S +C +1 1 7.099007 7.117657 7.119139 +2 1 0.858709 0.867233 0.882294 +3 1 1.772527 1.811776 7.120239 +4 1 2.702145 2.681271 0.901362 +5 1 0.017539 1.794455 1.788454 +6 1 0.885593 2.694118 2.707994 +7 1 1.795055 7.120787 1.777896 +8 1 2.642849 0.868278 2.670699 +9 1 0.016060 0.017156 3.568644 +10 1 0.891891 0.896406 4.439286 +11 1 1.766086 1.764402 3.550134 +12 1 2.677349 2.648926 4.427174 +13 1 0.010133 1.771283 5.342173 +14 1 0.858153 2.653565 6.241596 +15 1 1.804087 0.020636 5.353268 +16 1 2.689680 0.907188 6.224575 +17 1 0.017845 3.577563 7.113016 +18 1 0.910027 4.459286 0.910286 +19 1 1.766394 5.376046 0.015526 +20 1 2.683727 6.220728 0.898553 +21 1 0.003357 5.363423 1.774139 +22 1 0.856735 6.238324 2.660213 +23 1 1.761079 3.549776 1.797054 +24 1 2.667227 4.463441 2.646074 +25 1 7.132499 3.551558 3.599764 +26 1 0.920387 4.482191 4.479257 +27 1 1.772194 5.337132 3.555569 +28 1 2.675010 6.251629 4.483124 +29 1 0.005702 5.371095 5.351147 +30 1 0.880807 6.249819 6.264231 +31 1 1.793177 3.592396 5.369939 +32 1 2.653179 4.463595 6.274044 +33 1 3.557243 7.118913 0.026006 +34 1 4.458971 0.889331 0.904950 +35 1 5.367903 1.759757 7.104941 +36 1 6.271565 2.658454 0.890168 +37 1 3.591915 1.768681 1.793880 +38 1 4.435612 2.662184 2.676722 +39 1 5.371040 0.000196 1.783464 +40 1 6.226453 0.886640 2.653384 +41 1 3.583339 0.005449 3.600177 +42 1 4.453692 0.909417 4.459713 +43 1 5.314554 1.805409 3.584215 +44 1 6.210181 2.642660 4.486206 +45 1 3.545704 1.802745 5.365369 +46 1 4.476660 2.701226 6.220451 +47 1 5.332820 0.029557 5.347965 +48 1 6.215725 0.915081 6.230289 +49 1 3.536446 3.551469 7.106600 +50 1 4.451181 4.426439 0.900180 +51 1 5.368735 5.377996 7.109524 +52 1 6.230666 6.220985 0.862175 +53 1 3.596626 5.372822 1.797613 +54 1 4.485613 6.221252 2.699652 +55 1 5.364421 3.549838 1.796281 +56 1 6.261739 4.459046 2.648152 +57 1 3.588752 3.581054 3.581755 +58 1 4.462342 4.467270 4.478800 +59 1 5.355202 5.318323 3.556531 +60 1 6.268570 6.259831 4.465795 +61 1 3.588636 5.354278 5.362327 +62 1 4.475747 6.263866 6.227803 +63 1 5.331158 3.554349 5.318368 +64 1 6.254581 4.436344 6.209681 +0.0 0.0 0.0 +7.13400000000000 0 0 +0 7.13400000000000 0 +0 0 7.13400000000000 +} +Driver = {} +Hamiltonian = DFTB { + LAMMPS = Yes + SCC = No + MaxAngularMomentum = { + C = "p" + } + Charge = 0.0 + Eigensolver = Standard {} + Filling = Fermi { + Temperature [Kelvin] = 298.0 + IndependentKFilling = No + } + SlaterKosterFiles = Type2FileNames { + Prefix = "~/slako/mio-1-1/" + Separator = "-" + Suffix = ".skf" + LowerCaseTypeName = No + } + KPointsAndWeights = { +0.0000000000000 0.0000000000000 0.0000000000000 1.00000000000000 + } + PolynomialRepulsive = {} + OldRepulsiveSum = No + OrbitalResolvedSCC = No + OldSKInterpolation = No + NoErep = No + Dispersion = {} + ThirdOrder = No + ThirdOrderFull = No +} +Options = { + CalculateForces = Yes + WriteDetailedOut = No + WriteBandOut = No + RandomSeed = 12345 + MullikenAnalysis = No + WriteEigenvectors = No + WriteAutotestTag = No + WriteDetailedXML = No + WriteResultsTag = No + AtomResolvedEnergies = No + WriteHS = No + WriteRealHS = No + MinimiseMemoryUsage = No + ShowFoldedCoords = No +} +ParserOptions = { + ParserVersion = 3 + WriteHSDInput = Yes + WriteXMLInput = No + StopAfterParsing = No + IgnoreUnprocessedNodes = No +} +Analysis = { + ProjectStates = {} +} diff --git a/examples/COUPLE/fortran3/in.simple b/examples/COUPLE/fortran_dftb/in.simple similarity index 100% rename from examples/COUPLE/fortran3/in.simple rename to examples/COUPLE/fortran_dftb/in.simple diff --git a/examples/COUPLE/fortran_dftb/log.simple b/examples/COUPLE/fortran_dftb/log.simple new file mode 100644 index 0000000000..3496e94ebe --- /dev/null +++ b/examples/COUPLE/fortran_dftb/log.simple @@ -0,0 +1,71 @@ +LAMMPS (6 Jul 2017) +units real +atom_style charge +atom_modify map array +atom_modify sort 0 0.0 +read_data data.diamond + triclinic box = (0 0 0) to (7.134 7.134 7.134) with tilt (0 0 0) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 64 atoms + reading velocities ... + 64 velocities +neighbor 1.0 bin +neigh_modify delay 0 every 5 check no +fix 1 all nve +fix 2 all external pf/callback 1 1 + +fix_modify 2 energy yes +thermo_style custom step temp etotal ke pe lx ly lz pxx pyy pzz press + +thermo 1 +timestep 0.5 + +run 10 +Neighbor list info ... + update every 5 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0 + ghost atom cutoff = 0 + binsize = 7.134, bins = 1 1 1 + 0 neighbor lists, perpetual/occasional/extra = 0 0 0 +Per MPI rank memory allocation (min/avg/max) = 2.3 | 2.3 | 2.3 Mbytes +Step Temp TotEng KinEng PotEng Lx Ly Lz Pxx Pyy Pzz Press + 0 298.24835 -69593.587 56.008365 -69649.595 7.134 7.134 7.134 -19980.19 -21024.038 -21097.458 -20700.562 + 1 295.24358 -69593.585 55.444098 -69649.029 7.134 7.134 7.134 -19778.833 -20799.657 -20854.156 -20477.549 + 2 286.37211 -69593.58 53.778115 -69647.358 7.134 7.134 7.134 -19227.52 -20177.28 -20176.12 -19860.306 + 3 272.062 -69593.572 51.090804 -69644.663 7.134 7.134 7.134 -18360.869 -19189.684 -19100.021 -18883.525 + 4 253.01834 -69593.561 47.514575 -69641.075 7.134 7.134 7.134 -17198.143 -17855.03 -17652.036 -17568.403 + 5 230.19242 -69593.547 43.228073 -69636.775 7.134 7.134 7.134 -15750.247 -16183.764 -15854.145 -15929.386 + 6 204.71787 -69593.533 38.44418 -69631.977 7.134 7.134 7.134 -14083.498 -14247.434 -13789.835 -14040.256 + 7 177.82397 -69593.518 33.393748 -69626.911 7.134 7.134 7.134 -12340.963 -12202.878 -11623.171 -12055.671 + 8 150.76736 -69593.503 28.312758 -69621.816 7.134 7.134 7.134 -10637.824 -10180.827 -9495.0496 -10104.567 + 9 124.7737 -69593.49 23.431383 -69616.921 7.134 7.134 7.134 -9113.3842 -8339.0492 -7572.8076 -8341.747 + 10 100.98183 -69593.478 18.963481 -69612.442 7.134 7.134 7.134 -7833.9349 -6756.9749 -5945.8968 -6845.6022 +Loop time of 2.20497 on 1 procs for 10 steps with 64 atoms + +Performance: 0.196 ns/day, 122.499 hours/ns, 4.535 timesteps/s +0.2% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 1.4305e-06 | 1.4305e-06 | 1.4305e-06 | 0.0 | 0.00 +Comm | 4.22e-05 | 4.22e-05 | 4.22e-05 | 0.0 | 0.00 +Output | 0.00067687 | 0.00067687 | 0.00067687 | 0.0 | 0.03 +Modify | 2.2042 | 2.2042 | 2.2042 | 0.0 | 99.96 +Other | | 6.533e-05 | | | 0.00 + +Nlocal: 64 ave 64 max 64 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 2 +Dangerous builds not checked +Total wall time: 0:00:02 diff --git a/examples/COUPLE/fortran3/makefile b/examples/COUPLE/fortran_dftb/makefile similarity index 95% rename from examples/COUPLE/fortran3/makefile rename to examples/COUPLE/fortran_dftb/makefile index 86dea30850..225bd0025a 100644 --- a/examples/COUPLE/fortran3/makefile +++ b/examples/COUPLE/fortran_dftb/makefile @@ -21,7 +21,7 @@ liblammps_fortran.so : LAMMPS.o LAMMPS-wrapper.o LAMMPS-wrapper2.o $(FC) $(FFLAGS) -shared -o $@ $^ simpleF.x: simple.o LAMMPS.o LAMMPS-wrapper.o LAMMPS-wrapper2.o - $(FC) $(FFLAGS) simple.o -o simpleF.x liblammps_fortran.a $(LAMMPS_SRC)/liblammps_mvapich.a -lstdc++ /usr/local/tools/fftw/lib/libfftw.a + $(FC) $(FFLAGS) simple.o -o simpleF.x liblammps_fortran.a $(LAMMPS_SRC)/liblammps_mvapich.a -lstdc++ /usr/lib64/libfftw3.a liblammps_fortran.a : LAMMPS.o LAMMPS-wrapper.o LAMMPS-wrapper2.o $(AR) rs $@ $^ diff --git a/examples/COUPLE/fortran3/simple.f90 b/examples/COUPLE/fortran_dftb/simple.f90 similarity index 91% rename from examples/COUPLE/fortran3/simple.f90 rename to examples/COUPLE/fortran_dftb/simple.f90 index 40f8bf8b86..4604b4e4a9 100644 --- a/examples/COUPLE/fortran3/simple.f90 +++ b/examples/COUPLE/fortran_dftb/simple.f90 @@ -13,7 +13,7 @@ type(c_ptr) :: c_pos, c_fext, c_ids double precision, pointer :: fext(:,:), pos(:,:) integer, intent(in) :: ids(nlocal) - real (C_double), dimension(:), pointer :: virial => NULL() + real(C_double) :: virial(6) real (C_double) :: etot real(C_double), pointer :: ts_lmp double precision :: stress(3,3), ts_dftb @@ -61,26 +61,21 @@ read(10,*)stress(i,:) enddo stress (:,:) = stress(:,:)*autoatm + virial(1) = stress(1,1)/(nktv2p/volume) + virial(2) = stress(2,2)/(nktv2p/volume) + virial(3) = stress(3,3)/(nktv2p/volume) + virial(4) = stress(1,2)/(nktv2p/volume) + virial(5) = stress(1,3)/(nktv2p/volume) + virial(6) = stress(2,3)/(nktv2p/volume) etot = etot*econv - call lammps_extract_global(ts_lmp, lmp, 'TS_dftb') - ts_lmp = ts_dftb + call lammps_set_external_vector(lmp,1,ts_dftb*econv) do i = 1, nlocal read(10,*)fext(:,ids(i)) fext(:,ids(i)) = fext(:,ids(i))*fconv enddo close(10) call lammps_set_user_energy (lmp, etot) - call lammps_extract_atom (virial, lmp, 'virial') - if (.not. associated(virial)) then - print*,'virial pointer not associated.' - STOP - endif - virial(1) = stress(1,1)/(nktv2p/volume) - virial(2) = stress(2,2)/(nktv2p/volume) - virial(3) = stress(3,3)/(nktv2p/volume) - virial(4) = stress(1,2)/(nktv2p/volume) - virial(5) = stress(1,3)/(nktv2p/volume) - virial(6) = stress(2,3)/(nktv2p/volume) + call lammps_set_user_virial (lmp, virial) end subroutine end module callback @@ -103,6 +98,7 @@ program simple_fortran_callback call lammps_open_no_mpi ('lmp -log log.simple', lmp) call lammps_file (lmp, 'in.simple') call lammps_set_callback(lmp) + call lammps_set_external_vector_length(lmp,2) call lammps_command (lmp, 'run 10') call lammps_close (lmp) diff --git a/lib/colvars/Install.py b/lib/colvars/Install.py index af658fa26c..18b426f928 100644 --- a/lib/colvars/Install.py +++ b/lib/colvars/Install.py @@ -1,34 +1,27 @@ #!/usr/bin/env python -# Install.py tool to do automate build of Colvars +# install.py tool to do a generic build of a library +# soft linked to by many of the lib/Install.py files +# used to automate the steps described in the corresponding lib/README -from __future__ import print_function -import sys,os,subprocess +import sys,commands,os # help message help = """ -Syntax from src dir: make lib-colvars args="-m machine -e suffix" -Syntax from lib/colvars dir: python Install.py -m machine -e suffix - -specify -m and optionally -e, order does not matter - +Syntax: python Install.py -m machine -e suffix + specify -m and optionally -e, order does not matter -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/colvars/Makefile.* or of a - src/MAKE/MACHINES/Makefile.* file + machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine - -Examples: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler """ # print error message or help def error(str=None): - if not str: print(help) - else: print("ERROR"),str + if not str: print help + else: print "ERROR",str sys.exit() # parse args @@ -38,17 +31,17 @@ nargs = len(args) if nargs == 0: error() machine = None -extraflag = False +extraflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-m": - if iarg+2 > len(args): error() + if iarg+2 > nargs: error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": - if iarg+2 > len(args): error() - extraflag = True + if iarg+2 > nargs: error() + extraflag = 1 suffix = args[iarg+1] iarg += 2 else: error() @@ -58,85 +51,32 @@ while iarg < nargs: cwd = os.getcwd() lib = os.path.basename(cwd) -def get_lammps_machine_flags(machine): - """Parse Makefile.machine from LAMMPS, return dictionary of compiler flags""" - if not os.path.exists("../../src/MAKE/MACHINES/Makefile.%s" % machine): - error("Cannot locate src/MAKE/MACHINES/Makefile.%s" % machine) - lines = open("../../src/MAKE/MACHINES/Makefile.%s" % machine, - 'r').readlines() - machine_flags = {} - for line in lines: - line = line.partition('#')[0] - line = line.rstrip() - words = line.split() - if (len(words) > 2): - if ((words[0] == 'CC') or (words[0] == 'CCFLAGS') or - (words[0] == 'SHFLAGS') or (words[0] == 'ARCHIVE') or - (words[0] == 'ARFLAGS') or (words[0] == 'SHELL')): - machine_flags[words[0]] = ' '.join(words[2:]) - return machine_flags - -def gen_colvars_makefile_machine(machine, machine_flags): - """Generate Makefile.machine for Colvars given the compiler flags""" - machine_makefile = open("Makefile.%s" % machine, 'w') - machine_makefile.write('''# -*- makefile -*- to build Colvars module with %s - -COLVARS_LIB = libcolvars.a -COLVARS_OBJ_DIR = - -CXX = %s -CXXFLAGS = %s %s -AR = %s -ARFLAGS = %s -SHELL = %s - -include Makefile.common - -.PHONY: default clean - -default: $(COLVARS_LIB) Makefile.lammps - -clean: - -rm -f $(COLVARS_OBJS) $(COLVARS_LIB) -''' % (machine, machine_flags['CC'], - machine_flags['CCFLAGS'], machine_flags['SHFLAGS'] , - machine_flags['ARCHIVE'], machine_flags['ARFLAGS'], - machine_flags['SHELL'])) - -if not os.path.exists("Makefile.%s" % machine): - machine_flags = get_lammps_machine_flags(machine) - gen_colvars_makefile_machine(machine, machine_flags) -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - # create Makefile.auto as copy of Makefile.machine # reset EXTRAMAKE if requested + +if not os.path.exists("Makefile.%s" % machine): + error("lib/%s/Makefile.%s does not exist" % (lib,machine)) lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') + for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - fp.write(line) + print >>fp,line, + fp.close() # make the library via Makefile.auto -try: - import multiprocessing - n_cpus = multiprocessing.cpu_count() -except: - n_cpus = 1 - -print("Building lib%s.a ..." % lib) -cmd = ["make -f Makefile.auto clean"] -print(subprocess.check_output(cmd, shell=True).decode()) -cmd = ["make -f Makefile.auto -j%d" % n_cpus] -print(subprocess.check_output(cmd, shell=True).decode()) +print "Building lib%s.a ..." % lib +cmd = "make -f Makefile.auto clean; make -f Makefile.auto" +txt = commands.getoutput(cmd) +print txt -if os.path.exists("lib%s.a" % lib): print("Build was successful") +if os.path.exists("lib%s.a" % lib): print "Build was successful" else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): - print("lib/%s/Makefile.lammps was NOT created" % lib) + print "lib/%s/Makefile.lammps was NOT created" % lib -- GitLab From 5dbe2df85455ee6c705f4bbdd835afdae4d3f93b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 20 Jul 2017 17:07:31 -0400 Subject: [PATCH 523/593] revert change that accidentally undoes part of PRs #583 and #588 --- lib/colvars/Install.py | 110 +++++++++++++++++++++++++++++++---------- 1 file changed, 85 insertions(+), 25 deletions(-) diff --git a/lib/colvars/Install.py b/lib/colvars/Install.py index 18b426f928..af658fa26c 100644 --- a/lib/colvars/Install.py +++ b/lib/colvars/Install.py @@ -1,27 +1,34 @@ #!/usr/bin/env python -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README +# Install.py tool to do automate build of Colvars -import sys,commands,os +from __future__ import print_function +import sys,os,subprocess # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-colvars args="-m machine -e suffix" +Syntax from lib/colvars dir: python Install.py -m machine -e suffix + +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file + machine = suffix of a lib/colvars/Makefile.* or of a + src/MAKE/MACHINES/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examples: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler """ # print error message or help def error(str=None): - if not str: print help - else: print "ERROR",str + if not str: print(help) + else: print("ERROR"),str sys.exit() # parse args @@ -31,17 +38,17 @@ nargs = len(args) if nargs == 0: error() machine = None -extraflag = 0 +extraflag = False iarg = 0 while iarg < nargs: if args[iarg] == "-m": - if iarg+2 > nargs: error() + if iarg+2 > len(args): error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 + if iarg+2 > len(args): error() + extraflag = True suffix = args[iarg+1] iarg += 2 else: error() @@ -51,32 +58,85 @@ while iarg < nargs: cwd = os.getcwd() lib = os.path.basename(cwd) -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - +def get_lammps_machine_flags(machine): + """Parse Makefile.machine from LAMMPS, return dictionary of compiler flags""" + if not os.path.exists("../../src/MAKE/MACHINES/Makefile.%s" % machine): + error("Cannot locate src/MAKE/MACHINES/Makefile.%s" % machine) + lines = open("../../src/MAKE/MACHINES/Makefile.%s" % machine, + 'r').readlines() + machine_flags = {} + for line in lines: + line = line.partition('#')[0] + line = line.rstrip() + words = line.split() + if (len(words) > 2): + if ((words[0] == 'CC') or (words[0] == 'CCFLAGS') or + (words[0] == 'SHFLAGS') or (words[0] == 'ARCHIVE') or + (words[0] == 'ARFLAGS') or (words[0] == 'SHELL')): + machine_flags[words[0]] = ' '.join(words[2:]) + return machine_flags + +def gen_colvars_makefile_machine(machine, machine_flags): + """Generate Makefile.machine for Colvars given the compiler flags""" + machine_makefile = open("Makefile.%s" % machine, 'w') + machine_makefile.write('''# -*- makefile -*- to build Colvars module with %s + +COLVARS_LIB = libcolvars.a +COLVARS_OBJ_DIR = + +CXX = %s +CXXFLAGS = %s %s +AR = %s +ARFLAGS = %s +SHELL = %s + +include Makefile.common + +.PHONY: default clean + +default: $(COLVARS_LIB) Makefile.lammps + +clean: + -rm -f $(COLVARS_OBJS) $(COLVARS_LIB) +''' % (machine, machine_flags['CC'], + machine_flags['CCFLAGS'], machine_flags['SHFLAGS'] , + machine_flags['ARCHIVE'], machine_flags['ARFLAGS'], + machine_flags['SHELL'])) + +if not os.path.exists("Makefile.%s" % machine): + machine_flags = get_lammps_machine_flags(machine) + gen_colvars_makefile_machine(machine, machine_flags) if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) +# create Makefile.auto as copy of Makefile.machine +# reset EXTRAMAKE if requested + lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') - for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - + fp.write(line) fp.close() # make the library via Makefile.auto -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt +try: + import multiprocessing + n_cpus = multiprocessing.cpu_count() +except: + n_cpus = 1 + +print("Building lib%s.a ..." % lib) +cmd = ["make -f Makefile.auto clean"] +print(subprocess.check_output(cmd, shell=True).decode()) +cmd = ["make -f Makefile.auto -j%d" % n_cpus] +print(subprocess.check_output(cmd, shell=True).decode()) -if os.path.exists("lib%s.a" % lib): print "Build was successful" +if os.path.exists("lib%s.a" % lib): print("Build was successful") else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib + print("lib/%s/Makefile.lammps was NOT created" % lib) -- GitLab From 551001f172a36790b7ff53453383d381b9e66ea5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 20 Jul 2017 17:08:19 -0400 Subject: [PATCH 524/593] revert change, that is part of the kim-install branch and changeset --- doc/src/pair_kim.txt | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/doc/src/pair_kim.txt b/doc/src/pair_kim.txt index 5ee607c2b0..5a623e5ece 100644 --- a/doc/src/pair_kim.txt +++ b/doc/src/pair_kim.txt @@ -27,34 +27,13 @@ pair_coeff * * Ar Ar :pre [Description:] This pair style is a wrapper on the "Knowledge Base for Interatomic -Models (OpenKIM)"_https://openkim.org repository of interatomic -potentials, so that they can be used by LAMMPS scripts. +Models (KIM)"_https://openkim.org repository of interatomic potentials, +so that they can be used by LAMMPS scripts. -Note that in LAMMPS lingo, a KIM model driver is a pair style -(e.g. EAM or Tersoff). A KIM model is a pair style for a particular -element or alloy and set of parameters, e.g. EAM for Cu with a -specific EAM potential file. - -See the current list of "KIM model -drivers"_https://openkim.org/kim-items/model-drivers/alphabetical. - -See the current list of all "KIM -models"_https://openkim.org/kim-items/models/by-model-drivers - -See the list of "example KIM models"_https://openkim.org/kim-api which -are included in the KIM library by default, in the "What is in the KIM -API source package?" section. - -To use this pair style, you must first download and install the KIM -API library from the "OpenKIM website"_https://openkim.org. The "KIM -section of Section packages"_Section_packages.html#kim-package has -instructions on how to do this with a simple make command, when -building LAMMPS. - -See the examples/kim dir for an input script that uses a KIM model -(potential) for Lennard-Jones. - -:line +In KIM lingo, a potential is a "model" and a model contains both the +analytic formulas that define the potential as well as the parameters +needed to run it for one or more materials, including coefficients and +cutoffs. The argument {virialmode} determines how the global virial is calculated. If {KIMvirial} is specified, the KIM model performs the -- GitLab From 3449d4226701ed7f11aa2908e9f29e240460904a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 20 Jul 2017 17:58:49 -0400 Subject: [PATCH 525/593] include pair style kim doc changes that were accidentally included in PR #590 --- doc/src/pair_kim.txt | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/doc/src/pair_kim.txt b/doc/src/pair_kim.txt index 5a623e5ece..5ee607c2b0 100644 --- a/doc/src/pair_kim.txt +++ b/doc/src/pair_kim.txt @@ -27,13 +27,34 @@ pair_coeff * * Ar Ar :pre [Description:] This pair style is a wrapper on the "Knowledge Base for Interatomic -Models (KIM)"_https://openkim.org repository of interatomic potentials, -so that they can be used by LAMMPS scripts. +Models (OpenKIM)"_https://openkim.org repository of interatomic +potentials, so that they can be used by LAMMPS scripts. -In KIM lingo, a potential is a "model" and a model contains both the -analytic formulas that define the potential as well as the parameters -needed to run it for one or more materials, including coefficients and -cutoffs. +Note that in LAMMPS lingo, a KIM model driver is a pair style +(e.g. EAM or Tersoff). A KIM model is a pair style for a particular +element or alloy and set of parameters, e.g. EAM for Cu with a +specific EAM potential file. + +See the current list of "KIM model +drivers"_https://openkim.org/kim-items/model-drivers/alphabetical. + +See the current list of all "KIM +models"_https://openkim.org/kim-items/models/by-model-drivers + +See the list of "example KIM models"_https://openkim.org/kim-api which +are included in the KIM library by default, in the "What is in the KIM +API source package?" section. + +To use this pair style, you must first download and install the KIM +API library from the "OpenKIM website"_https://openkim.org. The "KIM +section of Section packages"_Section_packages.html#kim-package has +instructions on how to do this with a simple make command, when +building LAMMPS. + +See the examples/kim dir for an input script that uses a KIM model +(potential) for Lennard-Jones. + +:line The argument {virialmode} determines how the global virial is calculated. If {KIMvirial} is specified, the KIM model performs the -- GitLab From 61b1487cbd9364423129de4b506edd413c2524bd Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 20 Jul 2017 18:17:19 -0400 Subject: [PATCH 526/593] avoid division by zero in reaxff bond interaction computations in very rare cases this addresses the issue reported by stan and ishan --- src/KOKKOS/pair_reaxc_kokkos.cpp | 3 ++- src/USER-REAXC/reaxc_bonds.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/KOKKOS/pair_reaxc_kokkos.cpp b/src/KOKKOS/pair_reaxc_kokkos.cpp index 6be09548da..841b7fbea9 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.cpp +++ b/src/KOKKOS/pair_reaxc_kokkos.cpp @@ -3335,7 +3335,8 @@ void PairReaxCKokkos::operator()(PairReaxComputeBond1select.bond_list[pj].bo_data ); /* calculate the constants */ - pow_BOs_be2 = pow( bo_ij->BO_s, twbp->p_be2 ); + if (bo_ij->BO_s == 0.0) pow_BOs_be2 = 0.0; + else pow_BOs_be2 = pow( bo_ij->BO_s, twbp->p_be2 ); exp_be12 = exp( twbp->p_be1 * ( 1.0 - pow_BOs_be2 ) ); CEbo = -twbp->De_s * exp_be12 * ( 1.0 - twbp->p_be1 * twbp->p_be2 * pow_BOs_be2 ); -- GitLab From ec23aef20b2257d825d982bef677889e5218f254 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 20 Jul 2017 18:19:53 -0400 Subject: [PATCH 527/593] fix reaxc division by zero bug also for USER-OMP variant --- src/USER-OMP/reaxc_bonds_omp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/USER-OMP/reaxc_bonds_omp.cpp b/src/USER-OMP/reaxc_bonds_omp.cpp index 2b7ab7e5e8..7522df2f60 100644 --- a/src/USER-OMP/reaxc_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_bonds_omp.cpp @@ -119,7 +119,8 @@ void BondsOMP( reax_system *system, control_params *control, bo_ij = &( bonds->select.bond_list[pj].bo_data ); /* calculate the constants */ - pow_BOs_be2 = pow( bo_ij->BO_s, twbp->p_be2 ); + if (bo_ij->BO_s == 0.0) pow_BOs_be2 = 0.0; + else pow_BOs_be2 = pow( bo_ij->BO_s, twbp->p_be2 ); exp_be12 = exp( twbp->p_be1 * ( 1.0 - pow_BOs_be2 ) ); CEbo = -twbp->De_s * exp_be12 * ( 1.0 - twbp->p_be1 * twbp->p_be2 * pow_BOs_be2 ); -- GitLab From 733ea61bf1073ac4c24c9a563b2386bdcc6b49e4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 21 Jul 2017 01:15:24 -0400 Subject: [PATCH 528/593] correct typo in USER-REAXC code --- src/USER-REAXC/reaxc_list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-REAXC/reaxc_list.cpp b/src/USER-REAXC/reaxc_list.cpp index e7fac4d418..c15ba7927c 100644 --- a/src/USER-REAXC/reaxc_list.cpp +++ b/src/USER-REAXC/reaxc_list.cpp @@ -37,7 +37,7 @@ int Make_List(int n, int num_intrs, int type, reax_list *l, MPI_Comm comm) l->num_intrs = num_intrs; if (l->index) sfree(l->index, "list:index"); - if (l->end_index) sfree(l->index, "list:end_index"); + if (l->end_index) sfree(l->end_index, "list:end_index"); l->index = (int*) smalloc( n * sizeof(int), "list:index", comm ); l->end_index = (int*) smalloc( n * sizeof(int), "list:end_index", comm ); -- GitLab From 00474ab09dcd9fbecc80287ae0ecd2e5da464a13 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 21 Jul 2017 10:30:11 -0400 Subject: [PATCH 529/593] handle one more case where allowing shifted potential with cutoff 0.0 would create NaNs --- src/USER-DRUDE/pair_lj_cut_thole_long.cpp | 2 +- src/USER-MISC/pair_morse_smooth_linear.cpp | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/USER-DRUDE/pair_lj_cut_thole_long.cpp b/src/USER-DRUDE/pair_lj_cut_thole_long.cpp index a74f51477c..ee9c0744d3 100644 --- a/src/USER-DRUDE/pair_lj_cut_thole_long.cpp +++ b/src/USER-DRUDE/pair_lj_cut_thole_long.cpp @@ -417,7 +417,7 @@ double PairLJCutTholeLong::init_one(int i, int j) lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); - if (offset_flag) { + if (offset_flag && (cut_lj[i][j] > 0.0)) { double ratio = sigma[i][j] / cut_lj[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; diff --git a/src/USER-MISC/pair_morse_smooth_linear.cpp b/src/USER-MISC/pair_morse_smooth_linear.cpp index 3e776e7e1c..0035338cd9 100644 --- a/src/USER-MISC/pair_morse_smooth_linear.cpp +++ b/src/USER-MISC/pair_morse_smooth_linear.cpp @@ -296,7 +296,6 @@ void PairMorseSmoothLinear::read_restart(FILE *fp) void PairMorseSmoothLinear::write_restart_settings(FILE *fp) { fwrite(&cut_global,sizeof(double),1,fp); - // fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); } @@ -308,11 +307,9 @@ void PairMorseSmoothLinear::read_restart_settings(FILE *fp) { if (comm->me == 0) { fread(&cut_global,sizeof(double),1,fp); - // fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); - // MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); } -- GitLab From b1b399d5c3dda315bb1546b1a1c4c1595a7f5db8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 Jul 2017 17:48:09 -0400 Subject: [PATCH 530/593] update readme for examples --- examples/README | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/README b/examples/README index 702ada790b..0b037f5c38 100644 --- a/examples/README +++ b/examples/README @@ -58,6 +58,7 @@ These are the sample problems and their output in the various sub-directories: accelerate: use of all the various accelerator packages +airebo: example for using AIREBO and AIREBO-M balance: dynamic load balancing, 2d system body: body particles, 2d system cmap: CMAP 5-body contributions to CHARMM force field -- GitLab From a477f26477fa2729ea92078eccefe13d5ddb5084 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 21 Jul 2017 15:37:40 -0400 Subject: [PATCH 531/593] add support for trapping floating point exception as an optional compile time feature we may make this a run time setting by connecting this code to a command. --- src/main.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index cc8f8be906..7401183fea 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,6 +18,10 @@ #include #include +#if defined(LAMMPS_TRAP_FPE) && defined(_GNU_SOURCE) +#include +#endif + using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- @@ -28,6 +32,18 @@ int main(int argc, char **argv) { MPI_Init(&argc,&argv); +// enable trapping selected floating point exceptions. +// this uses GNU extensions and is only tested on Linux +// therefore we make it depend on -D_GNU_SOURCE, too. + +#if defined(LAMMPS_TRAP_FPE) && defined(_GNU_SOURCE) + fesetenv(FE_NOMASK_ENV); + fedisableexcept(FE_ALL_EXCEPT); + feenableexcept(FE_DIVBYZERO); + feenableexcept(FE_INVALID); + feenableexcept(FE_OVERFLOW); +#endif + #ifdef LAMMPS_EXCEPTIONS try { LAMMPS *lammps = new LAMMPS(argc,argv,MPI_COMM_WORLD); -- GitLab From edc756a65f76ca56d7dd9a3bf567d7b8cf4a1871 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Fri, 21 Jul 2017 17:09:28 -0600 Subject: [PATCH 532/593] LICENSE: update address of Free Software Foundation --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index a0c2723a0c..f9489c8cf8 100644 --- a/LICENSE +++ b/LICENSE @@ -3,7 +3,7 @@ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -- GitLab From 4e0a249e2779e20e10d6bf363db80ee1b8d363be Mon Sep 17 00:00:00 2001 From: Max Veit Date: Sat, 22 Jul 2017 01:33:15 +0100 Subject: [PATCH 533/593] Add a (contrived) molecular example for USER-QUIP This example showcases the use of different 'special_bonds' settings for different pair styles, so quip gets all the bonded neighbours but lj can exclude them if it needs to. The results have been checked against a pure quip implementation of the potential; the expected lammps output is included. DISCLAIMER: This example mixes parameters for methane and silane and is NOT intended to be a realistic representation of either system. --- examples/USER/quip/in.molecular | 38 ++++++ examples/USER/quip/methane-box-8.data | 162 ++++++++++++++++++++++++++ examples/USER/quip/out.molecular | 93 +++++++++++++++ 3 files changed, 293 insertions(+) create mode 100644 examples/USER/quip/in.molecular create mode 100644 examples/USER/quip/methane-box-8.data create mode 100644 examples/USER/quip/out.molecular diff --git a/examples/USER/quip/in.molecular b/examples/USER/quip/in.molecular new file mode 100644 index 0000000000..ddec997955 --- /dev/null +++ b/examples/USER/quip/in.molecular @@ -0,0 +1,38 @@ +units metal +atom_style full +boundary p p p +processors 1 1 1 +timestep 0.0001 # 0.1 fs + +read_data methane-box-8.data + +pair_style hybrid/overlay lj/cut 8.0 quip +special_bonds lj/coul 0.999999999 0.999999999 0.999999999 # for quip + +# Intermolecular: OPLS (JACS 118 (45), p. 11225 (1996)) +pair_coeff 1 1 lj/cut 0.0028619844 3.5 # CT +pair_coeff 2 2 lj/cut 0.0013009018 2.5 # HC +pair_coeff 1 2 lj/cut 0.0019295487 2.95 +pair_modify shift no +pair_modify pair lj/cut special lj/coul 0.0 0.0 0.0 + +# Intramolecular +# Tell QUIP to pretend this is silane (which is covered by the parameter file) +pair_coeff * * quip ip.parms.SW.xml "IP SW" 14 1 +bond_style none +angle_style none + +fix 1 all nve + +# Include diagnostics that allow us to compare to a pure QUIP run +compute equip all pair quip +compute evdw all pair lj/cut +compute vir all pressure NULL virial + +thermo_style custom step epair ke etotal temp press c_vir c_evdw c_equip +thermo 1 + +dump 1 all custom 1 dump.molecular id type x y z fx fy fz +dump_modify 1 sort id + +run 10 diff --git a/examples/USER/quip/methane-box-8.data b/examples/USER/quip/methane-box-8.data new file mode 100644 index 0000000000..2a55fcf551 --- /dev/null +++ b/examples/USER/quip/methane-box-8.data @@ -0,0 +1,162 @@ +LAMMPS data file. CGCMM style. atom_style full generated by VMD/TopoTools v1.1 on Sat Oct 22 17:48:43 BST 2016. Original generated with Packmol + 40 atoms + 32 bonds + 48 angles + 0 dihedrals + 0 impropers + 2 atom types + 1 bond types + 1 angle types + 0 dihedral types + 0 improper types + -0.499095 8.410905 xlo xhi + -0.270629 8.639371 ylo yhi + 0.131683 9.041683 zlo zhi + +# Pair Coeffs +# +# 1 CT +# 2 HC + +# Bond Coeffs +# +# 1 CT-HC + +# Angle Coeffs +# +# 1 HC-CT-HC + + Masses + + 1 12.011000 # CT + 2 1.008000 # HC + + Atoms + +1 1 1 -0.240000 3.937038 0.677603 7.362249 # CT +2 1 2 0.060000 4.193022 1.709034 7.595834 # HC +3 1 2 0.060000 2.905136 0.486052 7.649386 # HC +4 1 2 0.060000 4.596317 0.007308 7.909996 # HC +5 1 2 0.060000 4.053670 0.507989 6.293814 # HC +6 2 1 -0.240000 6.131801 2.711096 0.901469 # CT +7 2 2 0.060000 6.787439 1.886720 0.628555 # HC +8 2 2 0.060000 5.728610 3.167652 -0.000171 # HC +9 2 2 0.060000 6.696346 3.453106 1.462433 # HC +10 2 2 0.060000 5.314820 2.336948 1.515051 # HC +11 3 1 -0.240000 5.723143 6.225007 1.430856 # CT +12 3 2 0.060000 5.585279 6.712817 2.393651 # HC +13 3 2 0.060000 5.584847 6.951755 0.632938 # HC +14 3 2 0.060000 4.994507 5.424203 1.322354 # HC +15 3 2 0.060000 6.727906 5.811248 1.374455 # HC +16 4 1 -0.240000 5.573754 5.038579 4.999124 # CT +17 4 2 0.060000 4.512787 5.184293 5.191620 # HC +18 4 2 0.060000 6.006150 5.966299 4.629893 # HC +19 4 2 0.060000 5.703088 4.256326 4.253924 # HC +20 4 2 0.060000 6.073008 4.747398 5.921016 # HC +21 5 1 -0.240000 2.108870 2.623461 3.348534 # CT +22 5 2 0.060000 2.886488 2.470897 2.602897 # HC +23 5 2 0.060000 1.382727 3.341833 2.973541 # HC +24 5 2 0.060000 2.554989 3.003606 4.265288 # HC +25 5 2 0.060000 1.611274 1.677549 3.552431 # HC +26 6 1 -0.240000 6.106165 2.015183 5.526875 # CT +27 6 2 0.060000 6.075817 2.038391 4.439456 # HC +28 6 2 0.060000 6.076127 0.982573 5.868599 # HC +29 6 2 0.060000 5.248943 2.554122 5.925227 # HC +30 6 2 0.060000 7.023739 2.485633 5.874240 # HC +31 7 1 -0.240000 0.644265 2.699668 7.212713 # CT +32 7 2 0.060000 0.403413 2.521819 6.166625 # HC +33 7 2 0.060000 0.098429 1.993976 7.835627 # HC +34 7 2 0.060000 0.361861 3.715309 7.482326 # HC +35 7 2 0.060000 1.713326 2.567585 7.366300 # HC +36 8 1 -0.240000 0.588072 6.428183 7.473536 # CT +37 8 2 0.060000 0.540903 6.363141 6.388417 # HC +38 8 2 0.060000 -0.008121 5.629967 7.910991 # HC +39 8 2 0.060000 0.197701 7.391140 7.796481 # HC +40 8 2 0.060000 1.621770 6.328495 7.798280 # HC + + Bonds + +1 1 1 3 +2 1 1 5 +3 1 1 2 +4 1 1 4 +5 1 6 7 +6 1 6 9 +7 1 6 8 +8 1 6 10 +9 1 11 14 +10 1 11 13 +11 1 11 12 +12 1 11 15 +13 1 16 17 +14 1 16 18 +15 1 16 19 +16 1 16 20 +17 1 21 22 +18 1 21 24 +19 1 21 25 +20 1 21 23 +21 1 26 27 +22 1 26 28 +23 1 26 29 +24 1 26 30 +25 1 31 33 +26 1 31 32 +27 1 31 34 +28 1 31 35 +29 1 36 38 +30 1 36 37 +31 1 36 39 +32 1 36 40 + + Angles + +1 1 3 1 5 +2 1 2 1 3 +3 1 3 1 4 +4 1 2 1 5 +5 1 4 1 5 +6 1 2 1 4 +7 1 7 6 9 +8 1 7 6 8 +9 1 7 6 10 +10 1 8 6 9 +11 1 9 6 10 +12 1 8 6 10 +13 1 13 11 14 +14 1 12 11 14 +15 1 14 11 15 +16 1 12 11 13 +17 1 13 11 15 +18 1 12 11 15 +19 1 17 16 18 +20 1 17 16 19 +21 1 17 16 20 +22 1 18 16 19 +23 1 18 16 20 +24 1 19 16 20 +25 1 22 21 24 +26 1 22 21 25 +27 1 22 21 23 +28 1 24 21 25 +29 1 23 21 24 +30 1 23 21 25 +31 1 27 26 28 +32 1 27 26 29 +33 1 27 26 30 +34 1 28 26 29 +35 1 28 26 30 +36 1 29 26 30 +37 1 32 31 33 +38 1 33 31 34 +39 1 33 31 35 +40 1 32 31 34 +41 1 32 31 35 +42 1 34 31 35 +43 1 37 36 38 +44 1 38 36 39 +45 1 38 36 40 +46 1 37 36 39 +47 1 37 36 40 +48 1 39 36 40 + diff --git a/examples/USER/quip/out.molecular b/examples/USER/quip/out.molecular new file mode 100644 index 0000000000..0e8d07d389 --- /dev/null +++ b/examples/USER/quip/out.molecular @@ -0,0 +1,93 @@ +LAMMPS (6 Jul 2017) +Reading data file ... + orthogonal box = (-0.499095 -0.270629 0.131683) to (8.4109 8.63937 9.04168) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 40 atoms + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + reading bonds ... + 32 bonds + reading angles ... + 48 angles +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 3 = max # of 1-3 neighbors + 3 = max # of 1-4 neighbors + 4 = max # of special neighbors +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 4 = max # of 1-2 neighbors + 3 = max # of 1-3 neighbors + 3 = max # of 1-4 neighbors + 4 = max # of special neighbors +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10 + ghost atom cutoff = 10 + binsize = 5, bins = 2 2 2 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair lj/cut, perpetual, half/full from (2) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none + (2) pair quip, perpetual + attributes: full, newton on + pair build: full/bin + stencil: full/bin/3d + bin: standard +Setting up Verlet run ... + Unit style : metal + Current step : 0 + Time step : 0.0001 +Per MPI rank memory allocation (min/avg/max) = 9.543 | 9.543 | 9.543 Mbytes +Step E_pair KinEng TotEng Temp Press c_vir c_evdw c_equip + 0 -5.3530213 0 -5.3530213 0 518847.56 518847.56 -0.10904079 -5.2439805 + 1 -5.9384459 0.58384822 -5.3545977 115.81657 517370.5 516488.87 -0.10783656 -5.8306093 + 2 -7.669616 2.3104051 -5.3592109 458.30954 512986.36 509497.58 -0.10422283 -7.5653932 + 3 -10.473314 5.1069211 -5.3663924 1013.0477 505833.04 498121.43 -0.098049469 -10.375264 + 4 -14.234705 8.859182 -5.3755227 1757.3747 496127.44 482749.79 -0.089147485 -14.145557 + 5 -18.806851 13.420941 -5.3859098 2662.28 484148.76 463882.72 -0.077305196 -18.729546 + 6 -24.021727 18.625147 -5.3965797 3694.6259 470219.95 442095.39 -0.06194509 -23.959782 + 7 -29.702647 24.295529 -5.4071176 4819.446 454683.57 417996.56 -0.042859727 -29.659787 + 8 -35.67405 30.257258 -5.4167913 6002.0599 437887.03 392197.62 -0.019248651 -35.654801 + 9 -41.771047 36.345757 -5.4252893 7209.8209 420163.51 365280.27 0.0096063065 -41.780653 + 10 -47.845522 42.413161 -5.4323614 8413.3973 401821.91 337776.7 0.044743702 -47.890266 +Loop time of 0.131692 on 1 procs for 10 steps with 40 atoms + +Performance: 0.656 ns/day, 36.581 hours/ns, 75.935 timesteps/s +97.2% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.12961 | 0.12961 | 0.12961 | 0.0 | 98.42 +Bond | 7.391e-06 | 7.391e-06 | 7.391e-06 | 0.0 | 0.01 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.00013185 | 0.00013185 | 0.00013185 | 0.0 | 0.10 +Output | 0.0018771 | 0.0018771 | 0.0018771 | 0.0 | 1.43 +Modify | 2.5988e-05 | 2.5988e-05 | 2.5988e-05 | 0.0 | 0.02 +Other | | 4.268e-05 | | | 0.03 + +Nlocal: 40 ave 40 max 40 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1175 ave 1175 max 1175 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4768 ave 4768 max 4768 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 9536 ave 9536 max 9536 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 9536 +Ave neighs/atom = 238.4 +Ave special neighs/atom = 4 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:00 -- GitLab From 1af937e99d7124057b31decfb0142d7c195ac249 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 21 Jul 2017 22:00:29 -0400 Subject: [PATCH 534/593] Update in.molecular - expand comments to provide more details on the choice of exclusion settings - comment out dump file generation --- examples/USER/quip/in.molecular | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/USER/quip/in.molecular b/examples/USER/quip/in.molecular index ddec997955..5af5647518 100644 --- a/examples/USER/quip/in.molecular +++ b/examples/USER/quip/in.molecular @@ -7,13 +7,17 @@ timestep 0.0001 # 0.1 fs read_data methane-box-8.data pair_style hybrid/overlay lj/cut 8.0 quip -special_bonds lj/coul 0.999999999 0.999999999 0.999999999 # for quip + +# exclusion setting for quip; cannot be exactly 1.0 1.0 1.0, +# since that would not flag 1-2, 1-3, and 1-4 pairs in lj/cut +special_bonds lj/coul 0.999999999 0.999999999 0.999999999 # Intermolecular: OPLS (JACS 118 (45), p. 11225 (1996)) pair_coeff 1 1 lj/cut 0.0028619844 3.5 # CT pair_coeff 2 2 lj/cut 0.0013009018 2.5 # HC pair_coeff 1 2 lj/cut 0.0019295487 2.95 pair_modify shift no +# change exclusion settings for lj/cut only: exclude bonded pairs pair_modify pair lj/cut special lj/coul 0.0 0.0 0.0 # Intramolecular @@ -32,7 +36,7 @@ compute vir all pressure NULL virial thermo_style custom step epair ke etotal temp press c_vir c_evdw c_equip thermo 1 -dump 1 all custom 1 dump.molecular id type x y z fx fy fz -dump_modify 1 sort id +# dump 1 all custom 1 dump.molecular id type x y z fx fy fz +# dump_modify 1 sort id run 10 -- GitLab From 1afab981b0226e53f8959861eb4a03b913882231 Mon Sep 17 00:00:00 2001 From: Max Veit Date: Sat, 22 Jul 2017 14:40:33 +0100 Subject: [PATCH 535/593] Clarified some points in in.molecular example --- examples/USER/quip/in.molecular | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/USER/quip/in.molecular b/examples/USER/quip/in.molecular index 5af5647518..24d21d6762 100644 --- a/examples/USER/quip/in.molecular +++ b/examples/USER/quip/in.molecular @@ -6,6 +6,11 @@ timestep 0.0001 # 0.1 fs read_data methane-box-8.data +# DISCLAIMER: This potential mixes parameters from methane and silane +# potentials and is NOT intended to be a realistic representation of either +# system. It is meant to demonstrate the use of hybrid QUIP/LAMMPS potentials, +# including the use of separate 'special_bonds' settings. + pair_style hybrid/overlay lj/cut 8.0 quip # exclusion setting for quip; cannot be exactly 1.0 1.0 1.0, @@ -13,6 +18,7 @@ pair_style hybrid/overlay lj/cut 8.0 quip special_bonds lj/coul 0.999999999 0.999999999 0.999999999 # Intermolecular: OPLS (JACS 118 (45), p. 11225 (1996)) +# Coulomb interactions ommitted for simplicity pair_coeff 1 1 lj/cut 0.0028619844 3.5 # CT pair_coeff 2 2 lj/cut 0.0013009018 2.5 # HC pair_coeff 1 2 lj/cut 0.0019295487 2.95 -- GitLab From 7b2182833fea75567add4342e3b7f2ab7a9a5095 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 22 Jul 2017 10:35:16 -0400 Subject: [PATCH 536/593] disallow binary output with dump style local. fixes #596 --- src/dump_local.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dump_local.cpp b/src/dump_local.cpp index 4843352ea2..a3e62907a6 100644 --- a/src/dump_local.cpp +++ b/src/dump_local.cpp @@ -49,6 +49,9 @@ DumpLocal::DumpLocal(LAMMPS *lmp, int narg, char **arg) : nevery = force->inumeric(FLERR,arg[3]); if (nevery <= 0) error->all(FLERR,"Illegal dump local command"); + if (binary) + error->all(FLERR,"Binary files are not supported with dump local"); + nfield = narg - 5; // expand args if any have wildcard character "*" -- GitLab From 2c6e177d5c55e640deef3bdf451b46380fdf0049 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 22 Jul 2017 23:14:17 -0400 Subject: [PATCH 537/593] avoid reporting negative memory allocation when memory_usage() is called before initialized --- src/USER-TALLY/compute_force_tally.cpp | 2 +- src/USER-TALLY/compute_heat_flux_tally.cpp | 2 +- src/USER-TALLY/compute_pe_tally.cpp | 2 +- src/USER-TALLY/compute_stress_tally.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/USER-TALLY/compute_force_tally.cpp b/src/USER-TALLY/compute_force_tally.cpp index cb7e3a4f23..5f29aea5b2 100644 --- a/src/USER-TALLY/compute_force_tally.cpp +++ b/src/USER-TALLY/compute_force_tally.cpp @@ -215,7 +215,7 @@ void ComputeForceTally::compute_peratom() double ComputeForceTally::memory_usage() { - double bytes = nmax*size_peratom_cols * sizeof(double); + double bytes = (nmax < 0) ? 0 : nmax*size_peratom_cols * sizeof(double); return bytes; } diff --git a/src/USER-TALLY/compute_heat_flux_tally.cpp b/src/USER-TALLY/compute_heat_flux_tally.cpp index b366b92be3..c090050b15 100644 --- a/src/USER-TALLY/compute_heat_flux_tally.cpp +++ b/src/USER-TALLY/compute_heat_flux_tally.cpp @@ -275,7 +275,7 @@ void ComputeHeatFluxTally::compute_vector() double ComputeHeatFluxTally::memory_usage() { - double bytes = nmax*comm_reverse * sizeof(double); + double bytes = (nmax < 0) ? 0 : nmax*comm_reverse * sizeof(double); return bytes; } diff --git a/src/USER-TALLY/compute_pe_tally.cpp b/src/USER-TALLY/compute_pe_tally.cpp index e7c0bdd03c..5b4644d4e1 100644 --- a/src/USER-TALLY/compute_pe_tally.cpp +++ b/src/USER-TALLY/compute_pe_tally.cpp @@ -199,7 +199,7 @@ void ComputePETally::compute_peratom() double ComputePETally::memory_usage() { - double bytes = nmax*size_peratom_cols * sizeof(double); + double bytes = (nmax < 0) ? 0 : nmax*size_peratom_cols * sizeof(double); return bytes; } diff --git a/src/USER-TALLY/compute_stress_tally.cpp b/src/USER-TALLY/compute_stress_tally.cpp index 28baafb9f8..32253d2cad 100644 --- a/src/USER-TALLY/compute_stress_tally.cpp +++ b/src/USER-TALLY/compute_stress_tally.cpp @@ -242,7 +242,7 @@ void ComputeStressTally::compute_peratom() double ComputeStressTally::memory_usage() { - double bytes = nmax*size_peratom_cols * sizeof(double); + double bytes = (nmax < 0) ? 0 : nmax*size_peratom_cols * sizeof(double); return bytes; } -- GitLab From c24e316baaa68e684d0bdd12c97f94301406bcd5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 22 Jul 2017 23:15:01 -0400 Subject: [PATCH 538/593] avoid floating point overflows in iterative solvers of fix shake --- src/RIGID/fix_shake.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 36f56aa295..f08228f3d3 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -1617,6 +1617,12 @@ void FixShake::shake3(int m) lamda01 = lamda01_new; lamda02 = lamda02_new; + + // stop iterations before we have a floating point overflow + // max double is < 1.0e308, so 1e150 is a reasonable cutoff + + if (fabs(lamda01) > 1e150 || fabs(lamda02) > 1e150) done = 1; + niter++; } @@ -1854,6 +1860,13 @@ void FixShake::shake4(int m) lamda01 = lamda01_new; lamda02 = lamda02_new; lamda03 = lamda03_new; + + // stop iterations before we have a floating point overflow + // max double is < 1.0e308, so 1e150 is a reasonable cutoff + + if (fabs(lamda01) > 1e150 || fabs(lamda02) > 1e150 + || fabs(lamda03) > 1e150) done = 1; + niter++; } @@ -2097,6 +2110,13 @@ void FixShake::shake3angle(int m) lamda01 = lamda01_new; lamda02 = lamda02_new; lamda12 = lamda12_new; + + // stop iterations before we have a floating point overflow + // max double is < 1.0e308, so 1e150 is a reasonable cutoff + + if (fabs(lamda01) > 1e150 || fabs(lamda02) > 1e150 + || fabs(lamda12) > 1e150) done = 1; + niter++; } -- GitLab From a59b7e4d56473bd202957c1c673795871e0fa290 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Mon, 24 Jul 2017 09:09:22 -0600 Subject: [PATCH 539/593] patch 24Jul17 --- doc/src/Manual.txt | 4 ++-- src/version.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index 359aa19edb..07f0c8df41 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -1,7 +1,7 @@ LAMMPS Users Manual - + @@ -21,7 +21,7 @@

      LAMMPS Documentation :c,h3 -6 Jul 2017 version :c,h4 +24 Jul 2017 version :c,h4 Version info: :h4 diff --git a/src/version.h b/src/version.h index 3fbe238325..c55566c88a 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "6 Jul 2017" +#define LAMMPS_VERSION "24 Jul 2017" -- GitLab From 60c67b07dc3785f3db79a417c1680796589abc0f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Jul 2017 10:45:11 -0400 Subject: [PATCH 540/593] import updated fix msst file with some additional cleanup and simplification --- src/SHOCK/fix_msst.cpp | 91 +++++++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 40 deletions(-) diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index b66f0ed4d3..66a648cd17 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -446,7 +446,7 @@ void FixMSST::initial_integrate(int vflag) { int i,k; double p_msst; // MSST driving pressure - double vol,TS,TS_term,escale_term; + double vol; int nlocal = atom->nlocal; int *mask = atom->mask; @@ -469,12 +469,16 @@ void FixMSST::initial_integrate(int vflag) // must convert energy to mv^2 units if (dftb) { - double TS_dftb = fix_external->compute_vector(0); - TS = force->ftm2v*TS_dftb; + const double TS_dftb = fix_external->compute_vector(0); + const double TS = force->ftm2v*TS_dftb; + // update S_elec terms and compute TS_dot via finite differences + S_elec_2 = S_elec_1; + S_elec_1 = S_elec; + const double Temp = temperature->compute_scalar(); + S_elec = TS/Temp; + TS_dot = Temp*(3.0*S_elec-4.0*S_elec_1+S_elec_2)/(2.0*update->dt); + TS_int += (update->dt*TS_dot); if (update->ntimestep == 1) T0S0 = TS; - } else { - TS = 0.0; - T0S0 = 0.0; } // compute new pressure and volume @@ -484,16 +488,6 @@ void FixMSST::initial_integrate(int vflag) couple(); vol = compute_vol(); - // update S_elec terms and compute TS_dot via finite differences - - S_elec_2 = S_elec_1; - S_elec_1 = S_elec; - double Temp = temperature->compute_scalar(); - S_elec = TS/Temp; - TS_dot = Temp*(3.0*S_elec-4.0*S_elec_1+S_elec_2)/(2.0*update->dt); - TS_int += (update->dt*TS_dot); - //TS_int += (update->dt*TS_dot)/total_mass; - // compute etot + extra terms for conserved quantity double e_scale = compute_etotal() + compute_scalar(); @@ -530,9 +524,9 @@ void FixMSST::initial_integrate(int vflag) for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { for ( k = 0; k < 3; k++ ) { - double C = f[i][k] * force->ftm2v / mass[type[i]]; - TS_term = TS_dot/(mass[type[i]]*velocity_sum); - escale_term = force->ftm2v*beta*(e0-e_scale) / + const double C = f[i][k] * force->ftm2v / mass[type[i]]; + const double TS_term = TS_dot/(mass[type[i]]*velocity_sum); + const double escale_term = force->ftm2v*beta*(e0-e_scale) / (mass[type[i]]*velocity_sum); double D = mu * omega[sd] * omega[sd] / (velocity_sum * mass[type[i]] * vol ); @@ -540,7 +534,7 @@ void FixMSST::initial_integrate(int vflag) old_velocity[i][k] = v[i][k]; if ( k == direction ) D -= 2.0 * omega[sd] / vol; if ( fabs(dthalf * D) > 1.0e-06 ) { - double expd = exp(D * dthalf); + const double expd = exp(D * dthalf); v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; } else { v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + @@ -553,15 +547,15 @@ void FixMSST::initial_integrate(int vflag) for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { for ( k = 0; k < 3; k++ ) { - double C = f[i][k] * force->ftm2v / mass[type[i]]; + const double C = f[i][k] * force->ftm2v / mass[type[i]]; double D = mu * omega[sd] * omega[sd] / (velocity_sum * mass[type[i]] * vol ); old_velocity[i][k] = v[i][k]; if ( k == direction ) { - D = D - 2.0 * omega[sd] / vol; + D -= 2.0 * omega[sd] / vol; } if ( fabs(dthalf * D) > 1.0e-06 ) { - double expd = exp(D * dthalf); + const double expd = exp(D * dthalf); v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; } else { v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + @@ -590,16 +584,16 @@ void FixMSST::initial_integrate(int vflag) for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { for ( k = 0; k < 3; k++ ) { - double C = f[i][k] * force->ftm2v / mass[type[i]]; - TS_term = TS_dot/(mass[type[i]]*velocity_sum); - escale_term = force->ftm2v*beta*(e0-e_scale) / + const double C = f[i][k] * force->ftm2v / mass[type[i]]; + const double TS_term = TS_dot/(mass[type[i]]*velocity_sum); + const double escale_term = force->ftm2v*beta*(e0-e_scale) / (mass[type[i]]*velocity_sum); double D = mu * omega[sd] * omega[sd] / (velocity_sum * mass[type[i]] * vol ); D += escale_term - TS_term; if ( k == direction ) D -= 2.0 * omega[sd] / vol; if ( fabs(dthalf * D) > 1.0e-06 ) { - double expd = exp(D * dthalf); + const double expd = exp(D * dthalf); v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; } else { v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + @@ -612,14 +606,14 @@ void FixMSST::initial_integrate(int vflag) for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { for ( k = 0; k < 3; k++ ) { - double C = f[i][k] * force->ftm2v / mass[type[i]]; + const double C = f[i][k] * force->ftm2v / mass[type[i]]; double D = mu * omega[sd] * omega[sd] / (velocity_sum * mass[type[i]] * vol ); if ( k == direction ) { - D = D - 2.0 * omega[sd] / vol; + D -= 2.0 * omega[sd] / vol; } if ( fabs(dthalf * D) > 1.0e-06 ) { - double expd = exp(D * dthalf); + const double expd = exp(D * dthalf); v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; } else { v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + @@ -669,7 +663,6 @@ void FixMSST::final_integrate() { int i; double p_msst; // MSST driving pressure - double TS_term,escale_term; // v update only for atoms in MSST group @@ -687,22 +680,38 @@ void FixMSST::final_integrate() double e_scale = compute_etotal() + compute_scalar(); + // for DFTB, extract TS_dftb from fix external + // must convert energy to mv^2 units + + if (dftb) { + const double TS_dftb = fix_external->compute_vector(0); + const double TS = force->ftm2v*TS_dftb; + S_elec_2 = S_elec_1; + S_elec_1 = S_elec; + const double Temp = temperature->compute_scalar(); + // update S_elec terms and compute TS_dot via finite differences + S_elec = TS/Temp; + TS_dot = Temp*(3.0*S_elec-4.0*S_elec_1+S_elec_2)/(2.0*update->dt); + TS_int += (update->dt*TS_dot); + if (update->ntimestep == 1) T0S0 = TS; + } + // propagate particle velocities 1/2 step if (dftb) { for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { for ( int k = 0; k < 3; k++ ) { - double C = f[i][k] * force->ftm2v / mass[type[i]]; - TS_term = TS_dot/(mass[type[i]]*velocity_sum); - escale_term = force->ftm2v*beta*(e0-e_scale) / + const double C = f[i][k] * force->ftm2v / mass[type[i]]; + const double TS_term = TS_dot/(mass[type[i]]*velocity_sum); + const double escale_term = force->ftm2v*beta*(e0-e_scale) / (mass[type[i]]*velocity_sum); double D = mu * omega[sd] * omega[sd] / (velocity_sum * mass[type[i]] * vol ); D += escale_term - TS_term; if ( k == direction ) D -= 2.0 * omega[sd] / vol; if ( fabs(dthalf * D) > 1.0e-06 ) { - double expd = exp(D * dthalf); + const double expd = exp(D * dthalf); v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; } else { v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + @@ -715,14 +724,14 @@ void FixMSST::final_integrate() for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { for ( int k = 0; k < 3; k++ ) { - double C = f[i][k] * force->ftm2v / mass[type[i]]; + const double C = f[i][k] * force->ftm2v / mass[type[i]]; double D = mu * omega[sd] * omega[sd] / (velocity_sum * mass[type[i]] * vol ); if ( k == direction ) { - D = D - 2.0 * omega[sd] / vol; + D -= 2.0 * omega[sd] / vol; } if ( fabs(dthalf * D) > 1.0e-06 ) { - double expd = exp(D * dthalf); + const double expd = exp(D * dthalf); v[i][k] = expd * ( C + D * v[i][k] - C / expd ) / D; } else { v[i][k] = v[i][k] + ( C + D * v[i][k] ) * dthalf + @@ -748,7 +757,7 @@ void FixMSST::final_integrate() ( v0 - vol )/( v0 * v0 ); double A = total_mass * ( p_current[sd] - p0 - p_msst ) / ( qmass * nktv2p * mvv2e ); - double B = total_mass * mu / ( qmass * vol ); + const double B = total_mass * mu / ( qmass * vol ); // prevent blow-up of the volume @@ -950,7 +959,9 @@ double FixMSST::compute_scalar() // subtract off precomputed TS_int integral value - energy -= TS_int; + if (dftb) { // TS_int == 0 for non DFTB calculations + energy -= TS_int; + } return energy; } -- GitLab From aa5ea95a0f34db29976151aad7fffc17c5257da1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Jul 2017 11:55:50 -0400 Subject: [PATCH 541/593] avoid integer overflow and remove unused function argument causing it --- src/balance.cpp | 7 +++---- src/balance.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/balance.cpp b/src/balance.cpp index 47e7c0969b..c184a72d32 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -936,7 +936,7 @@ int Balance::shift() // stop at this point in bstr if imbalance factor < threshold // this is a true 3d test of particle count per processor - double imbfactor = imbalance_splits(max); + double imbfactor = imbalance_splits(); if (imbfactor <= stopthresh) break; } @@ -1047,11 +1047,10 @@ int Balance::adjust(int n, double *split) calculate imbalance based on processor splits in 3 dims atoms must be in lamda coords (0-1) before called map particles to 3d grid of procs - return maxcost = max load per proc return imbalance factor = max load per proc / ave load per proc ------------------------------------------------------------------------- */ -double Balance::imbalance_splits(int &maxcost) +double Balance::imbalance_splits() { double *xsplit = comm->xsplit; double *ysplit = comm->ysplit; @@ -1088,7 +1087,7 @@ double Balance::imbalance_splits(int &maxcost) MPI_Allreduce(proccost,allproccost,nprocs,MPI_DOUBLE,MPI_SUM,world); - maxcost = 0.0; + double maxcost = 0.0; double totalcost = 0.0; for (int i = 0; i < nprocs; i++) { maxcost = MAX(maxcost,allproccost[i]); diff --git a/src/balance.h b/src/balance.h index 0f2f79bb15..43e8851ad9 100644 --- a/src/balance.h +++ b/src/balance.h @@ -81,7 +81,7 @@ class Balance : protected Pointers { FILE *fp; // balance output file int firststep; - double imbalance_splits(int &); + double imbalance_splits(); void shift_setup_static(char *); void tally(int, int, double *); int adjust(int, double *); -- GitLab From 51a06334ad84203d321e239e962171f392b461a6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Jul 2017 12:08:42 -0400 Subject: [PATCH 542/593] avoid invalid calls to memcpy(): when ndot == 0, pointers may be NULL --- src/rcb.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/rcb.cpp b/src/rcb.cpp index 919df98a19..7ad1e84d4c 100644 --- a/src/rcb.cpp +++ b/src/rcb.cpp @@ -288,7 +288,7 @@ void RCB::compute(int dimension, int n, double **x, double *wt, // use old value on 1st iteration if old cut dimension is the same // on 2nd option: could push valuehalf towards geometric center // with "1.0-factor" to force overshoot - + if (first_iteration && reuse && dim == tree[procmid].dim) { counters[5]++; valuehalf = tree[procmid].cut; @@ -310,7 +310,7 @@ void RCB::compute(int dimension, int n, double **x, double *wt, medme.wtlo = medme.wthi = 0.0; medme.countlo = medme.counthi = 0; medme.proclo = medme.prochi = me; - + // mark all active dots on one side or other of bisector // also set all fields in median data struct // save indices of closest dots on either side @@ -391,11 +391,11 @@ void RCB::compute(int dimension, int n, double **x, double *wt, wtlo += med.wthi; if (targetlo-wtlo <= tolerance) break; // close enough - + valuemin = med.valuehi; // iterate again markactive = 1; } - + else if (wthi + med.totalhi < targethi) { // upper half TOO SMALL wthi += med.totalhi; @@ -431,7 +431,7 @@ void RCB::compute(int dimension, int n, double **x, double *wt, } if (breakflag) break; // done if moved enough } - + wthi += med.wtlo; if (targethi-wthi <= tolerance) break; // close enough @@ -455,13 +455,13 @@ void RCB::compute(int dimension, int n, double **x, double *wt, // cut produces 2 sub-boxes with reduced size in dim // compare smaller of the 2 sizes to previous dims // keep dim that has the largest smaller - + smaller = MIN(valuehalf-lo[dim],hi[dim]-valuehalf); if (smaller > largest) { largest = smaller; dim_select = dim; valuehalf_select = valuehalf; - memcpy(dotmark_select,dotmark,ndot*sizeof(int)); + if (ndot > 0) memcpy(dotmark_select,dotmark,ndot*sizeof(int)); } } @@ -469,11 +469,11 @@ void RCB::compute(int dimension, int n, double **x, double *wt, dim = dim_select; valuehalf = valuehalf_select; - memcpy(dotmark,dotmark_select,ndot*sizeof(int)); + if (ndot > 0) memcpy(dotmark,dotmark_select,ndot*sizeof(int)); // found median // store cut info only if I am procmid - + if (me == procmid) { cut = valuehalf; cutdim = dim; -- GitLab From f0d286358ea096fcad656303a12addc777041d8b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Jul 2017 14:02:02 -0400 Subject: [PATCH 543/593] must not include system headers within 'extern "C"' blocks. breaks with MPICH --- lib/h5md/include/ch5md.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/h5md/include/ch5md.h b/lib/h5md/include/ch5md.h index 351e337ed4..8fefc9565d 100644 --- a/lib/h5md/include/ch5md.h +++ b/lib/h5md/include/ch5md.h @@ -9,13 +9,13 @@ #ifndef CH5MD_H #define CH5MD_H +#include "hdf5.h" +#include + #ifdef __cplusplus extern "C" { #endif -#include "hdf5.h" -#include - #define CH5MD_RANK_ERROR -10 typedef struct h5md_element_struct { -- GitLab From f7a243a4d9eeca7bc9fdb3346b9d8157ab81126f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Jul 2017 14:20:03 -0400 Subject: [PATCH 544/593] convert explicit copies back into symbolic links --- lib/atc/Install.py | 83 +------------------------------------------- lib/awpmd/Install.py | 83 +------------------------------------------- lib/h5md/Install.py | 83 +------------------------------------------- lib/meam/Install.py | 83 +------------------------------------------- lib/poems/Install.py | 83 +------------------------------------------- lib/qmmm/Install.py | 83 +------------------------------------------- lib/reax/Install.py | 83 +------------------------------------------- 7 files changed, 7 insertions(+), 574 deletions(-) mode change 100644 => 120000 lib/atc/Install.py mode change 100644 => 120000 lib/awpmd/Install.py mode change 100644 => 120000 lib/h5md/Install.py mode change 100644 => 120000 lib/meam/Install.py mode change 100644 => 120000 lib/poems/Install.py mode change 100644 => 120000 lib/qmmm/Install.py mode change 100644 => 120000 lib/reax/Install.py diff --git a/lib/atc/Install.py b/lib/atc/Install.py deleted file mode 100644 index 18b426f928..0000000000 --- a/lib/atc/Install.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/atc/Install.py b/lib/atc/Install.py new file mode 120000 index 0000000000..37041d2ea1 --- /dev/null +++ b/lib/atc/Install.py @@ -0,0 +1 @@ +Install.py \ No newline at end of file diff --git a/lib/awpmd/Install.py b/lib/awpmd/Install.py deleted file mode 100644 index 18b426f928..0000000000 --- a/lib/awpmd/Install.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/awpmd/Install.py b/lib/awpmd/Install.py new file mode 120000 index 0000000000..37041d2ea1 --- /dev/null +++ b/lib/awpmd/Install.py @@ -0,0 +1 @@ +Install.py \ No newline at end of file diff --git a/lib/h5md/Install.py b/lib/h5md/Install.py deleted file mode 100644 index 18b426f928..0000000000 --- a/lib/h5md/Install.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/h5md/Install.py b/lib/h5md/Install.py new file mode 120000 index 0000000000..37041d2ea1 --- /dev/null +++ b/lib/h5md/Install.py @@ -0,0 +1 @@ +Install.py \ No newline at end of file diff --git a/lib/meam/Install.py b/lib/meam/Install.py deleted file mode 100644 index 18b426f928..0000000000 --- a/lib/meam/Install.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/meam/Install.py b/lib/meam/Install.py new file mode 120000 index 0000000000..37041d2ea1 --- /dev/null +++ b/lib/meam/Install.py @@ -0,0 +1 @@ +Install.py \ No newline at end of file diff --git a/lib/poems/Install.py b/lib/poems/Install.py deleted file mode 100644 index 18b426f928..0000000000 --- a/lib/poems/Install.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/poems/Install.py b/lib/poems/Install.py new file mode 120000 index 0000000000..37041d2ea1 --- /dev/null +++ b/lib/poems/Install.py @@ -0,0 +1 @@ +Install.py \ No newline at end of file diff --git a/lib/qmmm/Install.py b/lib/qmmm/Install.py deleted file mode 100644 index 18b426f928..0000000000 --- a/lib/qmmm/Install.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/qmmm/Install.py b/lib/qmmm/Install.py new file mode 120000 index 0000000000..37041d2ea1 --- /dev/null +++ b/lib/qmmm/Install.py @@ -0,0 +1 @@ +Install.py \ No newline at end of file diff --git a/lib/reax/Install.py b/lib/reax/Install.py deleted file mode 100644 index 18b426f928..0000000000 --- a/lib/reax/Install.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/reax/Install.py b/lib/reax/Install.py new file mode 120000 index 0000000000..37041d2ea1 --- /dev/null +++ b/lib/reax/Install.py @@ -0,0 +1 @@ +Install.py \ No newline at end of file -- GitLab From fd6e11f8217a0a58002b3eef6a80cceee27e905c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Jul 2017 14:29:17 -0400 Subject: [PATCH 545/593] convert copies of Install.py files to symlinks --- lib/atc/Install.py | 92 +------------------------------------------- lib/awpmd/Install.py | 92 +------------------------------------------- lib/h5md/Install.py | 92 +------------------------------------------- lib/meam/Install.py | 92 +------------------------------------------- lib/poems/Install.py | 92 +------------------------------------------- lib/qmmm/Install.py | 92 +------------------------------------------- lib/reax/Install.py | 92 +------------------------------------------- 7 files changed, 7 insertions(+), 637 deletions(-) mode change 100644 => 120000 lib/atc/Install.py mode change 100644 => 120000 lib/awpmd/Install.py mode change 100644 => 120000 lib/h5md/Install.py mode change 100644 => 120000 lib/meam/Install.py mode change 100644 => 120000 lib/poems/Install.py mode change 100644 => 120000 lib/qmmm/Install.py mode change 100644 => 120000 lib/reax/Install.py diff --git a/lib/atc/Install.py b/lib/atc/Install.py deleted file mode 100644 index 29270560a6..0000000000 --- a/lib/atc/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/atc/Install.py b/lib/atc/Install.py new file mode 120000 index 0000000000..ffe709d44c --- /dev/null +++ b/lib/atc/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/awpmd/Install.py b/lib/awpmd/Install.py deleted file mode 100644 index 29270560a6..0000000000 --- a/lib/awpmd/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/awpmd/Install.py b/lib/awpmd/Install.py new file mode 120000 index 0000000000..ffe709d44c --- /dev/null +++ b/lib/awpmd/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/h5md/Install.py b/lib/h5md/Install.py deleted file mode 100644 index 29270560a6..0000000000 --- a/lib/h5md/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/h5md/Install.py b/lib/h5md/Install.py new file mode 120000 index 0000000000..ffe709d44c --- /dev/null +++ b/lib/h5md/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/meam/Install.py b/lib/meam/Install.py deleted file mode 100644 index 29270560a6..0000000000 --- a/lib/meam/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/meam/Install.py b/lib/meam/Install.py new file mode 120000 index 0000000000..ffe709d44c --- /dev/null +++ b/lib/meam/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/poems/Install.py b/lib/poems/Install.py deleted file mode 100644 index 29270560a6..0000000000 --- a/lib/poems/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/poems/Install.py b/lib/poems/Install.py new file mode 120000 index 0000000000..ffe709d44c --- /dev/null +++ b/lib/poems/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/qmmm/Install.py b/lib/qmmm/Install.py deleted file mode 100644 index 29270560a6..0000000000 --- a/lib/qmmm/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/qmmm/Install.py b/lib/qmmm/Install.py new file mode 120000 index 0000000000..ffe709d44c --- /dev/null +++ b/lib/qmmm/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/reax/Install.py b/lib/reax/Install.py deleted file mode 100644 index 29270560a6..0000000000 --- a/lib/reax/Install.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -# install.py tool to do a generic build of a library -# soft linked to by many of the lib/Install.py files -# used to automate the steps described in the corresponding lib/README - -import sys,commands,os - -# help message - -help = """ -Syntax from src dir: make lib-libname args="-m machine -e suffix" -Syntax from lib dir: python Install.py -m machine -e suffix - -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) -specify -m and optionally -e, order does not matter - - -m = peform a clean followed by "make -f Makefile.machine" - machine = suffix of a lib/Makefile.* file - -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix - does not alter existing Makefile.machine - -Examplesx: - -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler -""" - -# print error message or help - -def error(str=None): - if not str: print help - else: print "ERROR",str - sys.exit() - -# parse args - -args = sys.argv[1:] -nargs = len(args) -if nargs == 0: error() - -machine = None -extraflag = 0 - -iarg = 0 -while iarg < nargs: - if args[iarg] == "-m": - if iarg+2 > nargs: error() - machine = args[iarg+1] - iarg += 2 - elif args[iarg] == "-e": - if iarg+2 > nargs: error() - extraflag = 1 - suffix = args[iarg+1] - iarg += 2 - else: error() - -# set lib from working dir - -cwd = os.getcwd() -lib = os.path.basename(cwd) - -# create Makefile.auto as copy of Makefile.machine -# reset EXTRAMAKE if requested - -if not os.path.exists("Makefile.%s" % machine): - error("lib/%s/Makefile.%s does not exist" % (lib,machine)) - -lines = open("Makefile.%s" % machine,'r').readlines() -fp = open("Makefile.auto",'w') - -for line in lines: - words = line.split() - if len(words) == 3 and extraflag and \ - words[0] == "EXTRAMAKE" and words[1] == '=': - line = line.replace(words[2],"Makefile.lammps.%s" % suffix) - print >>fp,line, - -fp.close() - -# make the library via Makefile.auto - -print "Building lib%s.a ..." % lib -cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt - -if os.path.exists("lib%s.a" % lib): print "Build was successful" -else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) -if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/reax/Install.py b/lib/reax/Install.py new file mode 120000 index 0000000000..ffe709d44c --- /dev/null +++ b/lib/reax/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file -- GitLab From 715c797df051ef711310785c8c556eab4876927b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Jul 2017 15:14:12 -0400 Subject: [PATCH 546/593] simplify Install.py for voronoi --- lib/voronoi/.gitignore | 4 +++ lib/voronoi/Install.py | 76 ++++++++++++++++++++---------------------- lib/voronoi/README | 2 +- 3 files changed, 42 insertions(+), 40 deletions(-) create mode 100644 lib/voronoi/.gitignore diff --git a/lib/voronoi/.gitignore b/lib/voronoi/.gitignore new file mode 100644 index 0000000000..6ca01c094f --- /dev/null +++ b/lib/voronoi/.gitignore @@ -0,0 +1,4 @@ +# files to ignore +/liblink +/includelink +/voro++-* diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py index 1c4bc5cb6d..285e11fb9a 100644 --- a/lib/voronoi/Install.py +++ b/lib/voronoi/Install.py @@ -10,27 +10,23 @@ except: from urllib import urlretrieve as geturl # help message help = """ -Syntax from src dir: make lib-voronoi args="-v version -h hpath hdir -g -b -l" -Syntax from lib dir: python Install.py -v version -h hpath hdir -g -b -l +Syntax from src dir: make lib-voronoi + or: make lib-voronoi args="-p /usr/local/voro++-0.4.6" + or: make lib-voronoi args="-v voro++-0.4.6 -b" +Syntax from lib dir: python Install.py -v voro++-0.4.6 -b + or: python Install.py + or: python Install.py -p /usr/local/voro++-0.4.6 specify one or more options, order does not matter + -b = download and build the Voro++ library (default) + -p = specify folder of existing Voro++ installation -v = version of Voro++ to download and build default version = voro++-0.4.6 (current as of Jan 2015) - -h = set home dir of Voro++ to be hpath/hdir - hpath can be full path, contain '~' or '.' chars - default hpath = . = lib/voronoi - default hdir = voro++-0.4.6 = what tarball unpacks to - -g = grab (download) tarball from math.lbl.gov/voro++ website - unpack it to hpath/hdir - hpath must already exist - if hdir already exists, it will be deleted before unpack - -b = build Voro++ library in its src dir - -l = create 2 softlinks (includelink,liblink) in lib/voronoi to Voro++ src dir Example: -make lib-voronoi args="-g -b -l" # download/build in lib/voronoi/voro++-0.4.6 +make lib-voronoi args="-b" # download/build in lib/voronoi/voro++-0.4.6 """ # settings @@ -47,10 +43,10 @@ def error(str=None): # expand to full path name # process leading '~' or relative path - + def fullpath(path): return os.path.abspath(os.path.expanduser(path)) - + # parse args args = sys.argv[1:] @@ -60,9 +56,10 @@ if nargs == 0: error() homepath = "." homedir = version -grabflag = False -buildflag = False -linkflag = False +grabflag = True +buildflag = True +pathflag = False +linkflag = True iarg = 0 while iarg < nargs: @@ -70,42 +67,43 @@ while iarg < nargs: if iarg+2 > nargs: error() version = args[iarg+1] iarg += 2 - elif args[iarg] == "-h": - if iarg+3 > nargs: error() - homepath = args[iarg+1] - homedir = args[iarg+2] - iarg += 3 - elif args[iarg] == "-g": - grabflag = True - iarg += 1 + elif args[iarg] == "-p": + if iarg+2 > nargs: error() + voropath = fullpath(args[iarg+1]) + pathflag = True + buildflag = False + iarg += 2 elif args[iarg] == "-b": buildflag = True iarg += 1 - elif args[iarg] == "-l": - linkflag = True - iarg += 1 else: error() homepath = fullpath(homepath) -if not os.path.isdir(homepath): error("Voro++ path does not exist") -homedir = "%s/%s" % (homepath,homedir) +homedir = "%s/%s" % (homepath,version) + +if (pathflag): + if not os.path.isdir(voropath): error("Voro++ path does not exist") + homedir = voropath + +if (buildflag and pathflag): + error("Cannot use -b and -p flag at the same time") # download and unpack Voro++ tarball if grabflag: print("Downloading Voro++ ...") geturl(url,"%s/%s.tar.gz" % (homepath,version)) - + print("Unpacking Voro++ tarball ...") if os.path.exists("%s/%s" % (homepath,version)): cmd = 'rm -rf "%s/%s"' % (homepath,version) - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) cmd = 'cd "%s"; tar -xzvf %s.tar.gz' % (homepath,version) - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) if os.path.basename(homedir) != version: if os.path.exists(homedir): cmd = 'rm -rf "%s"' % homedir - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) os.rename("%s/%s" % (homepath,version),homedir) # build Voro++ @@ -113,8 +111,8 @@ if grabflag: if buildflag: print("Building Voro++ ...") cmd = 'cd "%s"; make' % homedir - txt = subprocess.check_output(cmd,shell=True) - print(txt) + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + print(txt.decode('UTF-8')) # create 2 links in lib/voronoi to Voro++ src dir @@ -125,6 +123,6 @@ if linkflag: if os.path.isfile("liblink") or os.path.islink("liblink"): os.remove("liblink") cmd = ['ln -s "%s/src" includelink' % homedir, 'includelink'] - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) cmd = ['ln -s "%s/src" liblink' % homedir] - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) diff --git a/lib/voronoi/README b/lib/voronoi/README index 9863632be0..2ca11c9221 100644 --- a/lib/voronoi/README +++ b/lib/voronoi/README @@ -22,7 +22,7 @@ Instructions: or somewhere else on your system. 2. compile Voro++ from within its home directory - % make + % make 3. There is no need to install Voro++ if you only wish to use it from LAMMPS. You can install it if you -- GitLab From 934cbbbecaffafb7050474bf24ac7537c4fcfe83 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 26 Jul 2017 16:07:08 -0600 Subject: [PATCH 547/593] restore lost KIM doc section in Section packages --- doc/src/Section_commands.txt | 4 ++-- doc/src/Section_packages.txt | 40 ++++++++++++++++++++++++------- src/SHOCK/fix_msst.cpp | 12 ++++------ src/SHOCK/fix_msst.h | 46 ++++++++++++++++++------------------ 4 files changed, 62 insertions(+), 40 deletions(-) diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index 7dc3d27b6a..f1eb225fe5 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -734,8 +734,8 @@ package"_Section_start.html#start_3. "smd/wall/surface"_fix_smd_wall_surface.html, "temp/rescale/eff"_fix_temp_rescale_eff.html, "ti/spring"_fix_ti_spring.html, -"ttm/mod"_fix_ttm.html -"wall/ees"_fix_wall_ees.html +"ttm/mod"_fix_ttm.html, +"wall/ees"_fix_wall_ees.html, "wall/region/ees"_fix_wall_ees.html :tb(c=6,ea=c) :line diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index 54a2685b86..6afcb2758d 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -492,14 +492,38 @@ Minnesota). [Install or un-install:] -Using this package requires the KIM library and its models -(interatomic potentials) to be downloaded and installed on your -system. The library can be downloaded and built in lib/kim or -elsewhere on your system. Details of the download, build, and install -process for KIM are given in the lib/kim/README file. - -Once that process is complete, you can then install/un-install the -package and build LAMMPS in the usual manner: +Before building LAMMPS with this package, you must first download and +build the KIM library and include the KIM models that you want to +use. You can do this manually if you prefer; follow the instructions +in lib/kim/README. You can also do it in one step from the lammps/src +dir, using a command like these, which simply invoke the +lib/kim/Install.py script with the specified args. + +make lib-kim # print help message +make lib-kim args="-b . none" # install KIM API lib with only example models +make lib-kim args="-b . Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model +make lib-kim args="-b . OpenKIM" # install KIM API lib with all models +make lib-kim args="-a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver :pre + +Note that in LAMMPS lingo, a KIM model driver is a pair style +(e.g. EAM or Tersoff). A KIM model is a pair style for a particular +element or alloy and set of parameters, e.g. EAM for Cu with a +specific EAM potential file. Also note that installing the KIM API +library with all its models, may take around 30 min to build. Of +course you only need to do that once. + +See the list of KIM model drivers here: +https://openkim.org/kim-items/model-drivers/alphabetical + +See the list of all KIM models here: +https://openkim.org/kim-items/models/by-model-drivers + +See the list of example KIM models included by default here: +https://openkim.org/kim-api in the "What is in the KIM API source +package?" section + +You can then install/un-install the package and build LAMMPS in the +usual manner: make yes-kim make machine :pre diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index 66a648cd17..d7e5723980 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -939,7 +939,7 @@ int FixMSST::modify_param(int narg, char **arg) double FixMSST::compute_scalar() { - // compute new pressure and volume. + // compute new pressure and volume temperature->compute_vector(); pressure->compute_vector(); @@ -958,10 +958,9 @@ double FixMSST::compute_scalar() energy -= p0 * ( v0 - volume ) / nktv2p; // subtract off precomputed TS_int integral value + // TS_int = 0 for non DFTB calculations - if (dftb) { // TS_int == 0 for non DFTB calculations - energy -= TS_int; - } + if (dftb) energy -= TS_int; return energy; } @@ -987,7 +986,7 @@ double FixMSST::compute_vector(int n) /* ---------------------------------------------------------------------- Computes the deviation of the current point - from the Hugoniot in Kelvin for the MSST. + from the Hugoniot in Kelvin for the MSST ------------------------------------------------------------------------- */ double FixMSST::compute_hugoniot() @@ -1012,7 +1011,7 @@ double FixMSST::compute_hugoniot() /* ---------------------------------------------------------------------- Computes the deviation of the current point from the Rayleigh - in pressure units for the MSST. + in pressure units for the MSST ------------------------------------------------------------------------- */ double FixMSST::compute_rayleigh() @@ -1108,4 +1107,3 @@ double FixMSST::memory_usage() double bytes = 3*atom->nmax * sizeof(double); return bytes; } - diff --git a/src/SHOCK/fix_msst.h b/src/SHOCK/fix_msst.h index 092017bfbb..b6229e7527 100644 --- a/src/SHOCK/fix_msst.h +++ b/src/SHOCK/fix_msst.h @@ -41,56 +41,56 @@ class FixMSST : public Fix { double memory_usage(); private: - double dtv,dtf,dthalf; // Full and half step sizes + double dtv,dtf,dthalf; // full and half step sizes double boltz,nktv2p, mvv2e; // Boltzmann factor and unit conversions - double total_mass; // Mass of the computational cell + double total_mass; // mass of the computational cell - double omega[3]; // Time derivative of the volume + double omega[3]; // time derivative of the volume double p_current[3],dilation[3]; - double qmass; // Effective cell mass - double mu; // Effective cell viscosity - double tscale; // Converts thermal energy to compressive + double qmass; // effective cell mass + double mu; // effective cell viscosity + double tscale; // converts thermal energy to compressive // strain ke at simulation start int dftb; // flag for use with DFTB+ - double velocity_sum; // Sum of the velocities squared - double damping; // Damping function for TS force term at + double velocity_sum; // sum of the velocities squared + double damping; // damping function for TS force term at // small volume difference (v0 - vol) - double T0S0; // Initial TS term for DFTB+ simulations + double T0S0; // initial TS term for DFTB+ simulations double S_elec,S_elec_1,S_elec_2; // time history of electron entropy // for DFTB+ simulaitons double TS_dot; // time derivative of TS term for // DFTB+ simulations - double **old_velocity; // Saved velocities + double **old_velocity; // saved velocities int kspace_flag; // 1 if KSpace invoked, 0 if not int nrigid; // number of rigid fixes int *rfix; // indices of rigid fixes - char *id_temp,*id_press; // Strings with identifiers of + char *id_temp,*id_press; // strings with identifiers of char *id_pe; // created computes - class Compute *temperature; // Computes created to evaluate + class Compute *temperature; // computes created to evaluate class Compute *pressure; // thermodynamic quantities class Compute *pe; - int tflag,pflag,vsflag,peflag; // Flags to keep track of computes that + int tflag,pflag,vsflag,peflag; // flags to keep track of computes that // were created // shock initial conditions - double e0; // Initial energy - double v0; // Initial volume - double p0; // Initial pressure - double velocity; // Velocity of the shock + double e0; // initial energy + double v0; // initial volume + double p0; // initial pressure + double velocity; // velocity of the shock double lagrangian_position; // Lagrangian location of computational cell - int direction; // Direction of shock - int p0_set; // Is pressure set - int v0_set; // Is volume set - int e0_set; // Is energy set - double TS_int; // Needed for conserved quantity + int direction; // direction of shock + int p0_set; // is pressure set + int v0_set; // is volume set + int e0_set; // is energy set + double TS_int; // needed for conserved quantity // with thermal electronic excitations - double beta; // Energy conservation scaling factor + double beta; // energy conservation scaling factor int maxold; // allocated size of old_velocity class FixExternal *fix_external; // ptr to fix external -- GitLab From 0427f6205ec51133bafcc528ede07fcc1e435739 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jul 2017 09:25:02 -0400 Subject: [PATCH 548/593] fix typo --- lib/colvars/Install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/colvars/Install.py b/lib/colvars/Install.py index af658fa26c..2fc207710c 100644 --- a/lib/colvars/Install.py +++ b/lib/colvars/Install.py @@ -28,7 +28,7 @@ make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler def error(str=None): if not str: print(help) - else: print("ERROR"),str + else: print("ERROR",str) sys.exit() # parse args -- GitLab From acf6d54ec1703d92e070b4c6ab47fb2b79334850 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jul 2017 09:25:39 -0400 Subject: [PATCH 549/593] python3 port, yet untested --- lib/Install.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/lib/Install.py b/lib/Install.py index 29270560a6..6b90254336 100644 --- a/lib/Install.py +++ b/lib/Install.py @@ -4,7 +4,8 @@ # soft linked to by many of the lib/Install.py files # used to automate the steps described in the corresponding lib/README -import sys,commands,os +from __future__ import print_function +import sys,os,subprocess # help message @@ -12,7 +13,7 @@ help = """ Syntax from src dir: make lib-libname args="-m machine -e suffix" Syntax from lib dir: python Install.py -m machine -e suffix -libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +libname = name of lib dir (e.g. atc, h5md, meam, poems, etc) specify -m and optionally -e, order does not matter -m = peform a clean followed by "make -f Makefile.machine" @@ -20,17 +21,17 @@ specify -m and optionally -e, order does not matter -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine -Examplesx: +Examples: -make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler -make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler +make lib-poems args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help def error(str=None): - if not str: print help - else: print "ERROR",str + if not str: print(help) + else: print("ERROR",str) sys.exit() # parse args @@ -47,12 +48,12 @@ while iarg < nargs: if args[iarg] == "-m": if iarg+2 > nargs: error() machine = args[iarg+1] - iarg += 2 + iarg += 2 elif args[iarg] == "-e": if iarg+2 > nargs: error() extraflag = 1 suffix = args[iarg+1] - iarg += 2 + iarg += 2 else: error() # set lib from working dir @@ -62,7 +63,7 @@ lib = os.path.basename(cwd) # create Makefile.auto as copy of Makefile.machine # reset EXTRAMAKE if requested - + if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) @@ -80,12 +81,12 @@ fp.close() # make the library via Makefile.auto -print "Building lib%s.a ..." % lib +print("Building lib%s.a ..." % lib) cmd = "make -f Makefile.auto clean; make -f Makefile.auto" -txt = commands.getoutput(cmd) -print txt +txt = subprocess.check_output(cmd,shell=True,stderr=subprocess.STDOUT) +print(txt) -if os.path.exists("lib%s.a" % lib): print "Build was successful" +if os.path.exists("lib%s.a" % lib): print("Build was successful") else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): - print "lib/%s/Makefile.lammps was NOT created" % lib + print("lib/%s/Makefile.lammps was NOT created" % lib) -- GitLab From c494ec35e2428caf964abb37fb424b543b8fe83c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jul 2017 12:48:32 -0400 Subject: [PATCH 550/593] correct symbolic links to shared Install.py file --- lib/atc/Install.py | 2 +- lib/awpmd/Install.py | 2 +- lib/h5md/Install.py | 2 +- lib/meam/Install.py | 2 +- lib/poems/Install.py | 2 +- lib/qmmm/Install.py | 2 +- lib/reax/Install.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/atc/Install.py b/lib/atc/Install.py index 37041d2ea1..ffe709d44c 120000 --- a/lib/atc/Install.py +++ b/lib/atc/Install.py @@ -1 +1 @@ -Install.py \ No newline at end of file +../Install.py \ No newline at end of file diff --git a/lib/awpmd/Install.py b/lib/awpmd/Install.py index 37041d2ea1..ffe709d44c 120000 --- a/lib/awpmd/Install.py +++ b/lib/awpmd/Install.py @@ -1 +1 @@ -Install.py \ No newline at end of file +../Install.py \ No newline at end of file diff --git a/lib/h5md/Install.py b/lib/h5md/Install.py index 37041d2ea1..ffe709d44c 120000 --- a/lib/h5md/Install.py +++ b/lib/h5md/Install.py @@ -1 +1 @@ -Install.py \ No newline at end of file +../Install.py \ No newline at end of file diff --git a/lib/meam/Install.py b/lib/meam/Install.py index 37041d2ea1..ffe709d44c 120000 --- a/lib/meam/Install.py +++ b/lib/meam/Install.py @@ -1 +1 @@ -Install.py \ No newline at end of file +../Install.py \ No newline at end of file diff --git a/lib/poems/Install.py b/lib/poems/Install.py index 37041d2ea1..ffe709d44c 120000 --- a/lib/poems/Install.py +++ b/lib/poems/Install.py @@ -1 +1 @@ -Install.py \ No newline at end of file +../Install.py \ No newline at end of file diff --git a/lib/qmmm/Install.py b/lib/qmmm/Install.py index 37041d2ea1..ffe709d44c 120000 --- a/lib/qmmm/Install.py +++ b/lib/qmmm/Install.py @@ -1 +1 @@ -Install.py \ No newline at end of file +../Install.py \ No newline at end of file diff --git a/lib/reax/Install.py b/lib/reax/Install.py index 37041d2ea1..ffe709d44c 120000 --- a/lib/reax/Install.py +++ b/lib/reax/Install.py @@ -1 +1 @@ -Install.py \ No newline at end of file +../Install.py \ No newline at end of file -- GitLab From e3973796bacc608e97968060ef5fc67c51ff3419 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jul 2017 15:51:45 -0400 Subject: [PATCH 551/593] fix bug in power operator in LAMMPS variable expressions --- src/variable.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/variable.cpp b/src/variable.cpp index 6e16597c63..a8f195dbc8 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -2148,8 +2148,10 @@ double Variable::evaluate(char *str, Tree **tree) argstack[nargstack++] = fmod(value1,value2); } else if (opprevious == CARAT) { if (value2 == 0.0) - error->all(FLERR,"Power by 0 in variable formula"); - argstack[nargstack++] = pow(value1,value2); + argstack[nargstack++] = 1.0; + else if ((value1 == 0.0) && (value2 < 0.0)) + error->all(FLERR,"Invalid power expression in variable formula"); + else argstack[nargstack++] = pow(value1,value2); } else if (opprevious == UNARY) { argstack[nargstack++] = -value2; } else if (opprevious == NOT) { -- GitLab From f3850da9fe9dd08924ef61ba319e560a922bdaa6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 28 Jul 2017 13:36:06 -0400 Subject: [PATCH 552/593] clean up makefiles provide "serial" and "mpi" targets for atc and awpmd --- lib/atc/Makefile.g++ | 6 ++ lib/atc/Makefile.lammps | 5 -- lib/atc/Makefile.mingw32-cross | 67 ------------------- lib/atc/Makefile.mingw32-cross-mpi | 68 ------------------- lib/atc/Makefile.mingw64-cross | 67 ------------------- lib/atc/Makefile.mingw64-cross-mpi | 68 ------------------- lib/atc/{Makefile.mpic++ => Makefile.mpi} | 38 +++++++---- lib/atc/Makefile.serial | 24 ++++--- lib/awpmd/Makefile.mingw32-cross | 80 ----------------------- lib/awpmd/Makefile.mingw32-cross-mpi | 13 ---- lib/awpmd/Makefile.mingw64-cross | 79 ---------------------- lib/awpmd/Makefile.mingw64-cross-mpi | 13 ---- lib/h5md/Makefile.mpi | 1 + lib/h5md/Makefile.serial | 1 + 14 files changed, 49 insertions(+), 481 deletions(-) delete mode 100644 lib/atc/Makefile.lammps delete mode 100644 lib/atc/Makefile.mingw32-cross delete mode 100644 lib/atc/Makefile.mingw32-cross-mpi delete mode 100644 lib/atc/Makefile.mingw64-cross delete mode 100644 lib/atc/Makefile.mingw64-cross-mpi rename lib/atc/{Makefile.mpic++ => Makefile.mpi} (59%) delete mode 100644 lib/awpmd/Makefile.mingw32-cross delete mode 100644 lib/awpmd/Makefile.mingw32-cross-mpi delete mode 100644 lib/awpmd/Makefile.mingw64-cross delete mode 100644 lib/awpmd/Makefile.mingw64-cross-mpi create mode 120000 lib/h5md/Makefile.mpi create mode 120000 lib/h5md/Makefile.serial diff --git a/lib/atc/Makefile.g++ b/lib/atc/Makefile.g++ index d15e6cb3b8..bb3028392a 100644 --- a/lib/atc/Makefile.g++ +++ b/lib/atc/Makefile.g++ @@ -1,3 +1,4 @@ +# library build -*- makefile -*- SHELL = /bin/sh # which file will be copied to Makefile.lammps @@ -5,6 +6,7 @@ SHELL = /bin/sh EXTRAMAKE = Makefile.lammps.installed # ------ FILES ------ + SRC = $(wildcard *.cpp) INC = $(wildcard *.h) @@ -47,5 +49,9 @@ DEPENDS = $(OBJ:.o=.d) # ------ CLEAN ------ +.PHONY: clean lib + clean: -rm *.o *.d *~ $(LIB) + +sinclude $(DEPENDS) diff --git a/lib/atc/Makefile.lammps b/lib/atc/Makefile.lammps deleted file mode 100644 index c8cd66af26..0000000000 --- a/lib/atc/Makefile.lammps +++ /dev/null @@ -1,5 +0,0 @@ -# Settings that the LAMMPS build will import when this package library is used - -user-atc_SYSINC = -user-atc_SYSLIB = -lblas -llapack -user-atc_SYSPATH = diff --git a/lib/atc/Makefile.mingw32-cross b/lib/atc/Makefile.mingw32-cross deleted file mode 100644 index 8b33540981..0000000000 --- a/lib/atc/Makefile.mingw32-cross +++ /dev/null @@ -1,67 +0,0 @@ -# library build -*- makefile -*- -SHELL = /bin/sh - -# which file will be copied to Makefile.lammps -EXTRAMAKE = Makefile.lammps.linalg - -# ------ FILES ------ - -SRC = $(wildcard *.cpp) -INC = $(wildcard *.h) - -# ------ DEFINITIONS ------ - -DIR = Obj_mingw32/ -LIB = $(DIR)libatc.a -OBJ = $(SRC:%.cpp=$(DIR)%.o) - -# ------ SETTINGS ------ - -# include any MPI settings needed for the ATC library to build with -# the same MPI library that LAMMPS is built with - -CC = i686-w64-mingw32-g++ -CCFLAGS = -I../../src -I../../src/STUBS -DMPICH_IGNORE_CXX_SEEK \ - -O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \ - -ffast-math -funroll-loops -fstrict-aliasing \ - -DLAMMPS_SMALLSMALL -Wno-uninitialized -ARCHIVE = i686-w64-mingw32-ar -ARCHFLAG = -rcs -DEPFLAGS = -M -LINK = $(CC) -LINKFLAGS = -O -USRLIB = -SYSLIB = - -# ------ MAKE PROCEDURE ------ - -default: $(DIR) $(LIB) Makefile.lammps - -$(DIR): - mkdir $(DIR) - -Makefile.lammps: - @cp $(EXTRAMAKE) Makefile.lammps - -$(LIB): $(OBJ) - $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) - @cp $(EXTRAMAKE) Makefile.lammps - -# ------ COMPILE RULES ------ - -$(DIR)%.o:%.cpp - $(CC) $(CCFLAGS) -c $< -o $@ -$(DIR)%.d:%.cpp - $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ - -# ------ DEPENDENCIES ------ - -DEPENDS = $(OBJ:.o=.d) - -# ------ CLEAN ------ - -clean: - -rm $(DIR)*.o $(DIR)*.d *~ $(LIB) - -$(DEPENDS) : $(DIR) -sinclude $(DEPENDS) diff --git a/lib/atc/Makefile.mingw32-cross-mpi b/lib/atc/Makefile.mingw32-cross-mpi deleted file mode 100644 index c5feeca81a..0000000000 --- a/lib/atc/Makefile.mingw32-cross-mpi +++ /dev/null @@ -1,68 +0,0 @@ -# library build -*- makefile -*- -SHELL = /bin/sh - -# which file will be copied to Makefile.lammps -EXTRAMAKE = Makefile.lammps.linalg - -# ------ FILES ------ - -SRC = $(wildcard *.cpp) -INC = $(wildcard *.h) - -# ------ DEFINITIONS ------ - -DIR = Obj_mingw32-mpi/ -LIB = $(DIR)libatc.a -OBJ = $(SRC:%.cpp=$(DIR)%.o) - -# ------ SETTINGS ------ - -# include any MPI settings needed for the ATC library to build with -# the same MPI library that LAMMPS is built with - -CC = i686-w64-mingw32-g++ -CCFLAGS = -I../../tools/mingw-cross/mpich2-win32/include/ \ - -I../../src -DMPICH_IGNORE_CXX_SEEK \ - -O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \ - -ffast-math -funroll-loops -fstrict-aliasing \ - -DLAMMPS_SMALLSMALL -Wno-uninitialized -ARCHIVE = i686-w64-mingw32-ar -ARCHFLAG = -rcs -DEPFLAGS = -M -LINK = $(CC) -LINKFLAGS = -O -USRLIB = -SYSLIB = - -# ------ MAKE PROCEDURE ------ - -default: $(DIR) $(LIB) Makefile.lammps - -$(DIR): - mkdir $(DIR) - -Makefile.lammps: - @cp $(EXTRAMAKE) Makefile.lammps - -$(LIB): $(OBJ) - $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) - @cp $(EXTRAMAKE) Makefile.lammps - -# ------ COMPILE RULES ------ - -$(DIR)%.o:%.cpp - $(CC) $(CCFLAGS) -c $< -o $@ -$(DIR)%.d:%.cpp - $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ - -# ------ DEPENDENCIES ------ - -DEPENDS = $(OBJ:.o=.d) - -# ------ CLEAN ------ - -clean: - -rm $(DIR)*.o $(DIR)*.d *~ $(LIB) - -$(DEPENDS) : $(DIR) -sinclude $(DEPENDS) diff --git a/lib/atc/Makefile.mingw64-cross b/lib/atc/Makefile.mingw64-cross deleted file mode 100644 index fbd3a02610..0000000000 --- a/lib/atc/Makefile.mingw64-cross +++ /dev/null @@ -1,67 +0,0 @@ -# library build -*- makefile -*- -SHELL = /bin/sh - -# which file will be copied to Makefile.lammps -EXTRAMAKE = Makefile.lammps.linalg - -# ------ FILES ------ - -SRC = $(wildcard *.cpp) -INC = $(wildcard *.h) - -# ------ DEFINITIONS ------ - -DIR = Obj_mingw64/ -LIB = $(DIR)libatc.a -OBJ = $(SRC:%.cpp=$(DIR)%.o) - -# ------ SETTINGS ------ - -# include any MPI settings needed for the ATC library to build with -# the same MPI library that LAMMPS is built with - -CC = x86_64-w64-mingw32-g++ -CCFLAGS = -I../../src -I../../src/STUBS -DMPICH_IGNORE_CXX_SEEK \ - -O3 -march=core2 -mtune=core2 -mpc64 -msse2 \ - -ffast-math -funroll-loops -fstrict-aliasing \ - -DLAMMPS_SMALLBIG -Wno-uninitialized -ARCHIVE = x86_64-w64-mingw32-ar -ARCHFLAG = -rcs -DEPFLAGS = -M -LINK = $(CC) -LINKFLAGS = -O -USRLIB = -SYSLIB = - -# ------ MAKE PROCEDURE ------ - -default: $(DIR) $(LIB) Makefile.lammps - -$(DIR): - mkdir $(DIR) - -Makefile.lammps: - @cp $(EXTRAMAKE) Makefile.lammps - -$(LIB): $(OBJ) - $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) - @cp $(EXTRAMAKE) Makefile.lammps - -# ------ COMPILE RULES ------ - -$(DIR)%.o:%.cpp - $(CC) $(CCFLAGS) -c $< -o $@ -$(DIR)%.d:%.cpp - $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ - -# ------ DEPENDENCIES ------ - -DEPENDS = $(OBJ:.o=.d) - -# ------ CLEAN ------ - -clean: - -rm $(DIR)*.o $(DIR)*.d *~ $(LIB) - -$(DEPENDS) : $(DIR) -sinclude $(DEPENDS) diff --git a/lib/atc/Makefile.mingw64-cross-mpi b/lib/atc/Makefile.mingw64-cross-mpi deleted file mode 100644 index f8dd64eae3..0000000000 --- a/lib/atc/Makefile.mingw64-cross-mpi +++ /dev/null @@ -1,68 +0,0 @@ -# library build -*- makefile -*- -SHELL = /bin/sh - -# which file will be copied to Makefile.lammps -EXTRAMAKE = Makefile.lammps.linalg - -# ------ FILES ------ - -SRC = $(wildcard *.cpp) -INC = $(wildcard *.h) - -# ------ DEFINITIONS ------ - -DIR = Obj_mingw64-mpi/ -LIB = $(DIR)libatc.a -OBJ = $(SRC:%.cpp=$(DIR)%.o) - -# ------ SETTINGS ------ - -# include any MPI settings needed for the ATC library to build with -# the same MPI library that LAMMPS is built with - -CC = x86_64-w64-mingw32-g++ -CCFLAGS = -I../../tools/mingw-cross/mpich2-win64/include/ \ - -I../../src -DMPICH_IGNORE_CXX_SEEK \ - -O3 -march=core2 -mtune=core2 -mpc64 -msse2 \ - -ffast-math -funroll-loops -fstrict-aliasing \ - -DLAMMPS_SMALLBIG -Wno-uninitialized -ARCHIVE = x86_64-w64-mingw32-ar -ARCHFLAG = -rcs -DEPFLAGS = -M -LINK = $(CC) -LINKFLAGS = -O -USRLIB = -SYSLIB = - -# ------ MAKE PROCEDURE ------ - -default: $(DIR) $(LIB) Makefile.lammps - -$(DIR): - mkdir $(DIR) - -Makefile.lammps: - @cp $(EXTRAMAKE) Makefile.lammps - -$(LIB): $(OBJ) - $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) - @cp $(EXTRAMAKE) Makefile.lammps - -# ------ COMPILE RULES ------ - -$(DIR)%.o:%.cpp - $(CC) $(CCFLAGS) -c $< -o $@ -$(DIR)%.d:%.cpp - $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ - -# ------ DEPENDENCIES ------ - -DEPENDS = $(OBJ:.o=.d) - -# ------ CLEAN ------ - -clean: - -rm $(DIR)*.o $(DIR)*.d *~ $(LIB) - -$(DEPENDS) : $(DIR) -sinclude $(DEPENDS) diff --git a/lib/atc/Makefile.mpic++ b/lib/atc/Makefile.mpi similarity index 59% rename from lib/atc/Makefile.mpic++ rename to lib/atc/Makefile.mpi index c9dfdb79c9..ec941efdcb 100644 --- a/lib/atc/Makefile.mpic++ +++ b/lib/atc/Makefile.mpi @@ -2,38 +2,54 @@ SHELL = /bin/sh # which file will be copied to Makefile.lammps -EXTRAMAKE = Makefile.lammps.installed +EXTRAMAKE = Makefile.lammps.linalg + # ------ FILES ------ + SRC = $(wildcard *.cpp) INC = $(wildcard *.h) + # ------ DEFINITIONS ------ + LIB = libatc.a OBJ = $(SRC:.cpp=.o) + +default: lib + # ------ SETTINGS ------ +.PHONY: clean lib depend + # include any MPI settings needed for the ATC library to build with # must be the same MPI library that LAMMPS is built with -CC = mpic++ -CCFLAGS = -O3 -Wall -g -I../../src -fPIC -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1 +CC = mpicxx +CCFLAGS = -O3 -Wall -g -fPIC +CPPFLAGS = -I../../src -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1 ARCHIVE = ar ARCHFLAG = -rc -DEPFLAGS = -M -LINK = $(CC) -LINKFLAGS = -O # ------ MAKE PROCEDURE ------ + lib: $(OBJ) $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) @cp $(EXTRAMAKE) Makefile.lammps + # ------ COMPILE RULES ------ + %.o:%.cpp - $(CC) $(CCFLAGS) -c $< -%.d:%.cpp - $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ + $(CC) $(CPPFLAGS) $(CCFLAGS) -c $< + # ------ DEPENDENCIES ------ -DEPENDS = $(OBJ:.o=.d) + +depend .depend : fastdep.exe $(SRC) + @./fastdep.exe $(INCFLAGS) -- $^ > .depend || exit 1 + +fastdep.exe: ../../src/DEPEND/fastdep.c + @cc -O -o $@ $< + # ------ CLEAN ------ + clean: - -rm *.o *.d *~ $(LIB) + -rm -f *.o *~ .depend $(LIB) fastdep.exe sinclude $(DEPENDS) diff --git a/lib/atc/Makefile.serial b/lib/atc/Makefile.serial index 44ce5fd341..70b786a6b8 100644 --- a/lib/atc/Makefile.serial +++ b/lib/atc/Makefile.serial @@ -14,18 +14,20 @@ INC = $(wildcard *.h) LIB = libatc.a OBJ = $(SRC:.cpp=.o) +default: lib + # ------ SETTINGS ------ +.PHONY: clean lib depend + # include any MPI settings needed for the ATC library to build with # must be the same MPI library that LAMMPS is built with CC = g++ -CCFLAGS = -O -g -fPIC -I../../src -I../../src/STUBS +CCFLAGS = -O3 -g -fPIC +CPPFLAGS = -I../../src -I../../src/STUBS ARCHIVE = ar ARCHFLAG = -rc -DEPFLAGS = -M -LINK = $(CC) -LINKFLAGS = -O # ------ MAKE PROCEDURE ------ lib: $(OBJ) @@ -35,17 +37,19 @@ lib: $(OBJ) # ------ COMPILE RULES ------ %.o:%.cpp - $(CC) $(CCFLAGS) -c $< -%.d:%.cpp - $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ + $(CC) $(CPPFLAGS) $(CCFLAGS) -c $< # ------ DEPENDENCIES ------ -DEPENDS = $(OBJ:.o=.d) +depend .depend : fastdep.exe $(SRC) + @./fastdep.exe $(INCFLAGS) -- $^ > .depend || exit 1 + +fastdep.exe: ../../src/DEPEND/fastdep.c + @cc -O -o $@ $< # ------ CLEAN ------ clean: - -rm *.o *.d *~ $(LIB) + -rm -f *.o *~ .depend $(LIB) fastdep.exe -sinclude $(DEPENDS) +sinclude .depend diff --git a/lib/awpmd/Makefile.mingw32-cross b/lib/awpmd/Makefile.mingw32-cross deleted file mode 100644 index 6a93987173..0000000000 --- a/lib/awpmd/Makefile.mingw32-cross +++ /dev/null @@ -1,80 +0,0 @@ -# library build -*- makefile -*- -SHELL = /bin/sh - -# which file will be copied to Makefile.lammps - -EXTRAMAKE = Makefile.lammps.linalg - -# ------ FILES ------ - -SRC = logexc.cpp wpmd.cpp wpmd_split.cpp -vpath %.cpp ivutils/src -vpath %.cpp systems/interact/TCP - -INC = \ - cerf.h \ - cerf2.h \ - cerf_octave.h \ - cvector_3.h \ - lapack_inter.h \ - logexc.h \ - pairhash.h \ - refobj.h \ - tcpdefs.h \ - vector_3.h \ - wavepacket.h \ - wpmd.h \ - wpmd_split.h - -# ------ DEFINITIONS ------ -DIR = Obj_mingw32/ -LIB = $(DIR)libawpmd.a -OBJ = $(SRC:%.cpp=$(DIR)%.o) - -# ------ SETTINGS ------ - -# include any MPI settings needed for the ATC library to build with -# the same MPI library that LAMMPS is built with - -CC = i686-w64-mingw32-g++ -CCFLAGS = -O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \ - -finline-functions \ - -ffast-math -funroll-loops -fstrict-aliasing \ - -Wall -W -Wno-uninitialized -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include -ARCHIVE = i686-w64-mingw32-ar -ARCHFLAG = -rscv -DEPFLAGS = -M -#LINK = -#LINKFLAGS = -USRLIB = -SYSLIB = - -# ------ MAKE PROCEDURE ------ - -default: $(DIR) $(LIB) Makefile.lammps - -$(DIR): - mkdir $(DIR) - -Makefile.lammps: - @cp $(EXTRAMAKE) Makefile.lammps - -$(LIB): $(OBJ) - $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) - @cp $(EXTRAMAKE) Makefile.lammps - -# ------ COMPILE RULES ------ - -$(DIR)%.o:%.cpp - $(CC) $(CCFLAGS) -c $< -o $@ -$(DIR)%.d:%.cpp - $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ - -# ------ DEPENDENCIES ------ - -DEPENDS = $(OBJ:.o=.d) - -# ------ CLEAN ------ - -clean: - -rm *.d *~ $(OBJ) $(LIB) diff --git a/lib/awpmd/Makefile.mingw32-cross-mpi b/lib/awpmd/Makefile.mingw32-cross-mpi deleted file mode 100644 index cc2a76111a..0000000000 --- a/lib/awpmd/Makefile.mingw32-cross-mpi +++ /dev/null @@ -1,13 +0,0 @@ -# -*- makefile -*- wrapper for non-MPI libraries - -SHELL=/bin/sh - -all: - $(MAKE) $(MFLAGS) mingw32-cross - rm -f Obj_mingw32-mpi - ln -s Obj_mingw32 Obj_mingw32-mpi - -clean: - $(MAKE) $(MFLAGS) clean-mingw32-cross - rm -f Obj_mingw32-mpi - diff --git a/lib/awpmd/Makefile.mingw64-cross b/lib/awpmd/Makefile.mingw64-cross deleted file mode 100644 index 1f3e608129..0000000000 --- a/lib/awpmd/Makefile.mingw64-cross +++ /dev/null @@ -1,79 +0,0 @@ -# library build -*- makefile -*- -SHELL = /bin/sh - -# which file will be copied to Makefile.lammps - -EXTRAMAKE = Makefile.lammps.linalg - -# ------ FILES ------ - -SRC = logexc.cpp wpmd.cpp wpmd_split.cpp -vpath %.cpp ivutils/src -vpath %.cpp systems/interact/TCP - -INC = \ - cerf.h \ - cerf2.h \ - cerf_octave.h \ - cvector_3.h \ - lapack_inter.h \ - logexc.h \ - pairhash.h \ - refobj.h \ - tcpdefs.h \ - vector_3.h \ - wavepacket.h \ - wpmd.h \ - wpmd_split.h - -# ------ DEFINITIONS ------ -DIR = Obj_mingw64/ -LIB = $(DIR)libawpmd.a -OBJ = $(SRC:%.cpp=$(DIR)%.o) - -# ------ SETTINGS ------ - -# include any MPI settings needed for the ATC library to build with -# the same MPI library that LAMMPS is built with - -CC = x86_64-w64-mingw32-g++ -CCFLAGS = -O3 -march=core2 -mtune=core2 -mpc64 -msse2 \ - -ffast-math -funroll-loops -fstrict-aliasing \ - -Wall -W -Wno-uninitialized -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include -ARCHIVE = x86_64-w64-mingw32-ar -ARCHFLAG = -rscv -DEPFLAGS = -M -#LINK = -#LINKFLAGS = -USRLIB = -SYSLIB = - -# ------ MAKE PROCEDURE ------ - -default: $(DIR) $(LIB) Makefile.lammps - -$(DIR): - mkdir $(DIR) - -Makefile.lammps: - @cp $(EXTRAMAKE) Makefile.lammps - -$(LIB): $(OBJ) - $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) - @cp $(EXTRAMAKE) Makefile.lammps - -# ------ COMPILE RULES ------ - -$(DIR)%.o:%.cpp - $(CC) $(CCFLAGS) -c $< -o $@ -$(DIR)%.d:%.cpp - $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ - -# ------ DEPENDENCIES ------ - -DEPENDS = $(OBJ:.o=.d) - -# ------ CLEAN ------ - -clean: - -rm *.d *~ $(OBJ) $(LIB) diff --git a/lib/awpmd/Makefile.mingw64-cross-mpi b/lib/awpmd/Makefile.mingw64-cross-mpi deleted file mode 100644 index 1ec1a0995b..0000000000 --- a/lib/awpmd/Makefile.mingw64-cross-mpi +++ /dev/null @@ -1,13 +0,0 @@ -# -*- makefile -*- wrapper for non-MPI libraries - -SHELL=/bin/sh - -all: - $(MAKE) $(MFLAGS) mingw64-cross - rm -f Obj_mingw64-mpi - ln -s Obj_mingw64 Obj_mingw64-mpi - -clean: - $(MAKE) $(MFLAGS) clean-mingw64-cross - rm -f Obj_mingw64-mpi - diff --git a/lib/h5md/Makefile.mpi b/lib/h5md/Makefile.mpi new file mode 120000 index 0000000000..df682a9547 --- /dev/null +++ b/lib/h5md/Makefile.mpi @@ -0,0 +1 @@ +Makefile.h5cc \ No newline at end of file diff --git a/lib/h5md/Makefile.serial b/lib/h5md/Makefile.serial new file mode 120000 index 0000000000..df682a9547 --- /dev/null +++ b/lib/h5md/Makefile.serial @@ -0,0 +1 @@ +Makefile.h5cc \ No newline at end of file -- GitLab From ffb778cf9b252cf42dc4c7522d88e6ff6f9892f6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 28 Jul 2017 14:03:29 -0400 Subject: [PATCH 553/593] make Install.py for lib/smd and lib/voronoi consistent --- lib/smd/.gitignore | 5 +++ lib/smd/Install.py | 88 +++++++++++++++++++++--------------------- lib/voronoi/Install.py | 5 +-- 3 files changed, 52 insertions(+), 46 deletions(-) create mode 100644 lib/smd/.gitignore diff --git a/lib/smd/.gitignore b/lib/smd/.gitignore new file mode 100644 index 0000000000..4ab7a789ec --- /dev/null +++ b/lib/smd/.gitignore @@ -0,0 +1,5 @@ +# ignore these entries with git +/eigen.tar.gz +/eigen-eigen-* +/includelink +/eigen3 diff --git a/lib/smd/Install.py b/lib/smd/Install.py index 0fa05375db..18986b4477 100644 --- a/lib/smd/Install.py +++ b/lib/smd/Install.py @@ -11,30 +11,28 @@ except: from urllib import urlretrieve as geturl # help message help = """ -Syntax from src dir: make lib-smd args="-h hpath hdir -g -l" -Syntax from lib dir: python Install.py -h hpath hdir -g -l +Syntax from src dir: make lib-smd + or: make lib-smd args="-p /usr/include/eigen3" + +Syntax from lib dir: python Install.py + or: python Install.py -p /usr/include/eigen3" + or: python Install.py -v 3.3.4 -b specify one or more options, order does not matter - -h = set home dir of Eigen to be hpath/hdir - hpath can be full path, contain '~' or '.' chars - default hpath = . = lib/smd - default hdir = "ee" = what tarball unpacks to (eigen-eigen-*) - -g = grab (download) tarball from http://eigen.tuxfamily.org website - unpack it to hpath/hdir - hpath must already exist - if hdir already exists, it will be deleted before unpack - -l = create softlink (includelink) in lib/smd to Eigen src dir + -b = download and unpack/configure the Eigen library (default) + -p = specify folder holding an existing installation of Eigen + -v = set version of Eigen library to download and set up (default = 3.3.4) + Example: -make lib-smd args="-g -l" # download/build in default lib/smd/eigen-eigen-* +make lib-smd args="-b" # download/build in default lib/smd/eigen-eigen-* """ # settings version = '3.3.4' -url = "http://bitbucket.org/eigen/eigen/get/%s.tar.gz" % version tarball = "eigen.tar.gz" # print error message or help @@ -46,59 +44,65 @@ def error(str=None): # expand to full path name # process leading '~' or relative path - + def fullpath(path): return os.path.abspath(os.path.expanduser(path)) - + # parse args args = sys.argv[1:] nargs = len(args) -if nargs == 0: error() homepath = "." -homedir = "ee" +homedir = "eigen3" -grabflag = 0 -linkflag = 0 +grabflag = True +buildflag = True +pathflag = False +linkflag = True iarg = 0 while iarg < nargs: - if args[iarg] == "-h": - if iarg+3 > nargs: error() - homepath = args[iarg+1] - homedir = args[iarg+2] - iarg += 3 - elif args[iarg] == "-g": - grabflag = 1 - iarg += 1 - elif args[iarg] == "-l": - linkflag = 1 + if args[iarg] == "-v": + if iarg+2 > nargs: error() + version = args[iarg+1] + iarg += 2 + elif args[iarg] == "-p": + if iarg+2 > nargs: error() + eigenpath = fullpath(args[iarg+1]) + pathflag = True + buildflag = False + iarg += 2 + elif args[iarg] == "-b": + buildflag = True iarg += 1 else: error() homepath = fullpath(homepath) -if not os.path.isdir(homepath): error("Eigen path does not exist") + +if (pathflag): + if not os.path.isdir(eigenpath): error("Eigen path does not exist") + +if (buildflag and pathflag): + error("Cannot use -b and -p flag at the same time") # download and unpack Eigen tarball -# glob to find name of dir it unpacks to +# use glob to find name of dir it unpacks to -if grabflag: +if buildflag: print("Downloading Eigen ...") + url = "http://bitbucket.org/eigen/eigen/get/%s.tar.gz" % version geturl(url,"%s/%s" % (homepath,tarball)) print("Unpacking Eigen tarball ...") edir = glob.glob("%s/eigen-eigen-*" % homepath) for one in edir: if os.path.isdir(one): - subprocess.check_output("rm -rf %s" % one,shell=True) + subprocess.check_output("rm -rf %s" % one,stderr=subprocess.STDOUT,shell=True) cmd = 'cd "%s"; tar -xzvf %s' % (homepath,tarball) - subprocess.check_output(cmd,shell=True) - if homedir != "ee": - if os.path.exists(homedir): - subprocess.check_output("rm -rf %s" % homedir,shell=True) - edir = glob.glob("%s/eigen-eigen-*" % homepath) - os.rename(edir[0],"%s/%s" % (homepath,homedir)) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + edir = glob.glob("%s/eigen-eigen-*" % homepath) + os.rename(edir[0],"%s/%s" % (homepath,homedir)) # create link in lib/smd to Eigen src dir @@ -106,9 +110,7 @@ if linkflag: print("Creating link to Eigen files") if os.path.isfile("includelink") or os.path.islink("includelink"): os.remove("includelink") - if homedir == "ee": - edir = glob.glob("%s/eigen-eigen-*" % homepath) - linkdir = edir[0] + if pathflag: linkdir = eigenpath else: linkdir = "%s/%s" % (homepath,homedir) cmd = "ln -s %s includelink" % linkdir - subprocess.check_output(cmd,shell=True) + subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py index 285e11fb9a..9d6c58d273 100644 --- a/lib/voronoi/Install.py +++ b/lib/voronoi/Install.py @@ -2,6 +2,7 @@ # Install.py tool to download, unpack, build, and link to the Voro++ library # used to automate the steps described in the README file in this dir + from __future__ import print_function import sys,os,re,subprocess try: from urllib.request import urlretrieve as geturl @@ -21,8 +22,7 @@ specify one or more options, order does not matter -b = download and build the Voro++ library (default) -p = specify folder of existing Voro++ installation - -v = version of Voro++ to download and build - default version = voro++-0.4.6 (current as of Jan 2015) + -v = set version of Voro++ to download and build (default voro++-0.4.6) Example: @@ -51,7 +51,6 @@ def fullpath(path): args = sys.argv[1:] nargs = len(args) -if nargs == 0: error() homepath = "." homedir = version -- GitLab From 3ebf561e0dea0da33383f13a898b325a5dbaf0e2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 28 Jul 2017 14:25:47 -0400 Subject: [PATCH 554/593] remove tarball after unpacking --- lib/smd/Install.py | 1 + lib/voronoi/Install.py | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/smd/Install.py b/lib/smd/Install.py index 18986b4477..337f993be5 100644 --- a/lib/smd/Install.py +++ b/lib/smd/Install.py @@ -103,6 +103,7 @@ if buildflag: subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) edir = glob.glob("%s/eigen-eigen-*" % homepath) os.rename(edir[0],"%s/%s" % (homepath,homedir)) + os.remove(tarball) # create link in lib/smd to Eigen src dir diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py index 9d6c58d273..17bba5e8eb 100644 --- a/lib/voronoi/Install.py +++ b/lib/voronoi/Install.py @@ -99,6 +99,7 @@ if grabflag: subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) cmd = 'cd "%s"; tar -xzvf %s.tar.gz' % (homepath,version) subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + os.remove("%s/%s.tar.gz" % (homepath,version)) if os.path.basename(homedir) != version: if os.path.exists(homedir): cmd = 'rm -rf "%s"' % homedir -- GitLab From 85120842dd8405d591c8780d012739fe4a37babe Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 28 Jul 2017 15:20:33 -0400 Subject: [PATCH 555/593] update QUIP examples to closer match typical LAMMPS examples --- examples/USER/quip/in.gap | 2 +- examples/USER/quip/in.molecular | 3 +- examples/USER/quip/in.sw | 5 +- .../USER/quip/log.24Jul17.molecular.g++.1 | 130 ++++++++++++++++++ .../USER/quip/log.24Jul17.molecular.g++.4 | 130 ++++++++++++++++++ examples/USER/quip/log.24Jul17.sw.g++.1 | 83 +++++++++++ examples/USER/quip/log.24Jul17.sw.g++.4 | 83 +++++++++++ 7 files changed, 431 insertions(+), 5 deletions(-) create mode 100644 examples/USER/quip/log.24Jul17.molecular.g++.1 create mode 100644 examples/USER/quip/log.24Jul17.molecular.g++.4 create mode 100644 examples/USER/quip/log.24Jul17.sw.g++.1 create mode 100644 examples/USER/quip/log.24Jul17.sw.g++.4 diff --git a/examples/USER/quip/in.gap b/examples/USER/quip/in.gap index 37667e39b9..dd049a4737 100644 --- a/examples/USER/quip/in.gap +++ b/examples/USER/quip/in.gap @@ -17,6 +17,6 @@ fix 1 all nve thermo 10 timestep 0.001 -dump 1 all custom 10 dump.gap id fx fy fz +#dump 1 all custom 10 dump.gap id fx fy fz run 40 diff --git a/examples/USER/quip/in.molecular b/examples/USER/quip/in.molecular index 24d21d6762..4253399d7c 100644 --- a/examples/USER/quip/in.molecular +++ b/examples/USER/quip/in.molecular @@ -1,7 +1,6 @@ units metal atom_style full boundary p p p -processors 1 1 1 timestep 0.0001 # 0.1 fs read_data methane-box-8.data @@ -28,7 +27,7 @@ pair_modify pair lj/cut special lj/coul 0.0 0.0 0.0 # Intramolecular # Tell QUIP to pretend this is silane (which is covered by the parameter file) -pair_coeff * * quip ip.parms.SW.xml "IP SW" 14 1 +pair_coeff * * quip sw_example.xml "IP SW" 14 1 bond_style none angle_style none diff --git a/examples/USER/quip/in.sw b/examples/USER/quip/in.sw index c1367ac805..aaa4217b2f 100644 --- a/examples/USER/quip/in.sw +++ b/examples/USER/quip/in.sw @@ -10,6 +10,7 @@ read_data data_sw pair_style quip pair_coeff * * sw_example.xml "IP SW" 14 +velocity all create 10.0 355311 neighbor 0.3 bin neigh_modify delay 10 @@ -17,6 +18,6 @@ fix 1 all nve thermo 10 timestep 0.001 -dump 1 all custom 10 dump.sw id fx fy fz +#dump 1 all custom 10 dump.sw id fx fy fz -run 1 +run 100 diff --git a/examples/USER/quip/log.24Jul17.molecular.g++.1 b/examples/USER/quip/log.24Jul17.molecular.g++.1 new file mode 100644 index 0000000000..28fc63579b --- /dev/null +++ b/examples/USER/quip/log.24Jul17.molecular.g++.1 @@ -0,0 +1,130 @@ +LAMMPS (24 Jul 2017) + using 1 OpenMP thread(s) per MPI task +units metal +atom_style full +boundary p p p +timestep 0.0001 # 0.1 fs + +read_data methane-box-8.data + orthogonal box = (-0.499095 -0.270629 0.131683) to (8.4109 8.63937 9.04168) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 40 atoms + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + reading bonds ... + 32 bonds + reading angles ... + 48 angles + 4 = max # of 1-2 neighbors + 3 = max # of 1-3 neighbors + 3 = max # of 1-4 neighbors + 4 = max # of special neighbors + +# DISCLAIMER: This potential mixes parameters from methane and silane +# potentials and is NOT intended to be a realistic representation of either +# system. It is meant to demonstrate the use of hybrid QUIP/LAMMPS potentials, +# including the use of separate 'special_bonds' settings. + +pair_style hybrid/overlay lj/cut 8.0 quip + +# exclusion setting for quip; cannot be exactly 1.0 1.0 1.0, +# since that would not flag 1-2, 1-3, and 1-4 pairs in lj/cut +special_bonds lj/coul 0.999999999 0.999999999 0.999999999 + 4 = max # of 1-2 neighbors + 3 = max # of 1-3 neighbors + 3 = max # of 1-4 neighbors + 4 = max # of special neighbors + +# Intermolecular: OPLS (JACS 118 (45), p. 11225 (1996)) +# Coulomb interactions ommitted for simplicity +pair_coeff 1 1 lj/cut 0.0028619844 3.5 # CT +pair_coeff 2 2 lj/cut 0.0013009018 2.5 # HC +pair_coeff 1 2 lj/cut 0.0019295487 2.95 +pair_modify shift no +# change exclusion settings for lj/cut only: exclude bonded pairs +pair_modify pair lj/cut special lj/coul 0.0 0.0 0.0 + +# Intramolecular +# Tell QUIP to pretend this is silane (which is covered by the parameter file) +pair_coeff * * quip sw_example.xml "IP SW" 14 1 +bond_style none +angle_style none + +fix 1 all nve + +# Include diagnostics that allow us to compare to a pure QUIP run +compute equip all pair quip +compute evdw all pair lj/cut +compute vir all pressure NULL virial + +thermo_style custom step epair ke etotal temp press c_vir c_evdw c_equip +thermo 1 + +# dump 1 all custom 1 dump.molecular id type x y z fx fy fz +# dump_modify 1 sort id + +run 10 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10 + ghost atom cutoff = 10 + binsize = 5, bins = 2 2 2 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair lj/cut, perpetual, half/full from (2) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none + (2) pair quip, perpetual + attributes: full, newton on + pair build: full/bin + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 8.288 | 8.288 | 8.288 Mbytes +Step E_pair KinEng TotEng Temp Press c_vir c_evdw c_equip + 0 -5.3530213 0 -5.3530213 0 518847.56 518847.56 -0.10904079 -5.2439805 + 1 -5.9384459 0.58384822 -5.3545977 115.81657 517370.5 516488.87 -0.10783656 -5.8306093 + 2 -7.669616 2.3104051 -5.3592109 458.30954 512986.36 509497.58 -0.10422283 -7.5653932 + 3 -10.473314 5.1069211 -5.3663924 1013.0477 505833.04 498121.43 -0.098049469 -10.375264 + 4 -14.234705 8.859182 -5.3755227 1757.3747 496127.44 482749.79 -0.089147485 -14.145557 + 5 -18.806851 13.420941 -5.3859098 2662.28 484148.76 463882.72 -0.077305196 -18.729546 + 6 -24.021727 18.625147 -5.3965797 3694.6259 470219.95 442095.39 -0.06194509 -23.959782 + 7 -29.702647 24.295529 -5.4071176 4819.446 454683.57 417996.56 -0.042859727 -29.659787 + 8 -35.67405 30.257258 -5.4167913 6002.0599 437887.03 392197.62 -0.019248651 -35.654801 + 9 -41.771047 36.345757 -5.4252893 7209.8209 420163.51 365280.27 0.0096063065 -41.780653 + 10 -47.845522 42.413161 -5.4323614 8413.3973 401821.91 337776.7 0.044743702 -47.890266 +Loop time of 0.0537777 on 1 procs for 10 steps with 40 atoms + +Performance: 1.607 ns/day, 14.938 hours/ns, 185.951 timesteps/s +90.3% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.053478 | 0.053478 | 0.053478 | 0.0 | 99.44 +Bond | 1.9073e-06 | 1.9073e-06 | 1.9073e-06 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 7.7724e-05 | 7.7724e-05 | 7.7724e-05 | 0.0 | 0.14 +Output | 0.00018263 | 0.00018263 | 0.00018263 | 0.0 | 0.34 +Modify | 1.5974e-05 | 1.5974e-05 | 1.5974e-05 | 0.0 | 0.03 +Other | | 2.122e-05 | | | 0.04 + +Nlocal: 40 ave 40 max 40 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1175 ave 1175 max 1175 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4768 ave 4768 max 4768 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 9536 ave 9536 max 9536 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 9536 +Ave neighs/atom = 238.4 +Ave special neighs/atom = 4 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/examples/USER/quip/log.24Jul17.molecular.g++.4 b/examples/USER/quip/log.24Jul17.molecular.g++.4 new file mode 100644 index 0000000000..a8be8e77bb --- /dev/null +++ b/examples/USER/quip/log.24Jul17.molecular.g++.4 @@ -0,0 +1,130 @@ +LAMMPS (24 Jul 2017) + using 1 OpenMP thread(s) per MPI task +units metal +atom_style full +boundary p p p +timestep 0.0001 # 0.1 fs + +read_data methane-box-8.data + orthogonal box = (-0.499095 -0.270629 0.131683) to (8.4109 8.63937 9.04168) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 40 atoms + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + reading bonds ... + 32 bonds + reading angles ... + 48 angles + 4 = max # of 1-2 neighbors + 3 = max # of 1-3 neighbors + 3 = max # of 1-4 neighbors + 4 = max # of special neighbors + +# DISCLAIMER: This potential mixes parameters from methane and silane +# potentials and is NOT intended to be a realistic representation of either +# system. It is meant to demonstrate the use of hybrid QUIP/LAMMPS potentials, +# including the use of separate 'special_bonds' settings. + +pair_style hybrid/overlay lj/cut 8.0 quip + +# exclusion setting for quip; cannot be exactly 1.0 1.0 1.0, +# since that would not flag 1-2, 1-3, and 1-4 pairs in lj/cut +special_bonds lj/coul 0.999999999 0.999999999 0.999999999 + 4 = max # of 1-2 neighbors + 3 = max # of 1-3 neighbors + 3 = max # of 1-4 neighbors + 4 = max # of special neighbors + +# Intermolecular: OPLS (JACS 118 (45), p. 11225 (1996)) +# Coulomb interactions ommitted for simplicity +pair_coeff 1 1 lj/cut 0.0028619844 3.5 # CT +pair_coeff 2 2 lj/cut 0.0013009018 2.5 # HC +pair_coeff 1 2 lj/cut 0.0019295487 2.95 +pair_modify shift no +# change exclusion settings for lj/cut only: exclude bonded pairs +pair_modify pair lj/cut special lj/coul 0.0 0.0 0.0 + +# Intramolecular +# Tell QUIP to pretend this is silane (which is covered by the parameter file) +pair_coeff * * quip sw_example.xml "IP SW" 14 1 +bond_style none +angle_style none + +fix 1 all nve + +# Include diagnostics that allow us to compare to a pure QUIP run +compute equip all pair quip +compute evdw all pair lj/cut +compute vir all pressure NULL virial + +thermo_style custom step epair ke etotal temp press c_vir c_evdw c_equip +thermo 1 + +# dump 1 all custom 1 dump.molecular id type x y z fx fy fz +# dump_modify 1 sort id + +run 10 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10 + ghost atom cutoff = 10 + binsize = 5, bins = 2 2 2 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair lj/cut, perpetual, half/full from (2) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none + (2) pair quip, perpetual + attributes: full, newton on + pair build: full/bin + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 8.26 | 8.386 | 8.762 Mbytes +Step E_pair KinEng TotEng Temp Press c_vir c_evdw c_equip + 0 -5.3530213 0 -5.3530213 0 518847.56 518847.56 -0.10904079 -5.2439805 + 1 -5.9384459 0.58384822 -5.3545977 115.81657 517370.5 516488.87 -0.10783656 -5.8306093 + 2 -7.669616 2.3104051 -5.3592109 458.30954 512986.36 509497.58 -0.10422283 -7.5653932 + 3 -10.473314 5.1069211 -5.3663924 1013.0477 505833.04 498121.43 -0.098049469 -10.375264 + 4 -14.234705 8.859182 -5.3755227 1757.3747 496127.44 482749.79 -0.089147485 -14.145557 + 5 -18.806851 13.420941 -5.3859098 2662.28 484148.76 463882.72 -0.077305196 -18.729546 + 6 -24.021727 18.625147 -5.3965797 3694.6259 470219.95 442095.39 -0.06194509 -23.959782 + 7 -29.702647 24.295529 -5.4071176 4819.446 454683.57 417996.56 -0.042859727 -29.659787 + 8 -35.67405 30.257258 -5.4167913 6002.0599 437887.03 392197.62 -0.019248651 -35.654801 + 9 -41.771047 36.345757 -5.4252893 7209.8209 420163.51 365280.27 0.0096063065 -41.780653 + 10 -47.845522 42.413161 -5.4323614 8413.3973 401821.91 337776.7 0.044743702 -47.890266 +Loop time of 0.0506847 on 4 procs for 10 steps with 40 atoms + +Performance: 1.705 ns/day, 14.079 hours/ns, 197.298 timesteps/s +94.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.04216 | 0.045656 | 0.049349 | 1.2 | 90.08 +Bond | 1.9073e-06 | 2.4438e-06 | 2.861e-06 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.00068545 | 0.004438 | 0.0079191 | 3.9 | 8.76 +Output | 0.00048304 | 0.00053334 | 0.00060964 | 0.0 | 1.05 +Modify | 1.1444e-05 | 1.4424e-05 | 1.9312e-05 | 0.0 | 0.03 +Other | | 4.047e-05 | | | 0.08 + +Nlocal: 10 ave 15 max 6 min +Histogram: 1 0 0 1 1 0 0 0 0 1 +Nghost: 878 ave 948 max 812 min +Histogram: 1 0 1 0 0 0 1 0 0 1 +Neighs: 1192 ave 1764 max 731 min +Histogram: 1 0 0 1 1 0 0 0 0 1 +FullNghs: 2384 ave 3527 max 1439 min +Histogram: 1 0 0 1 1 0 0 0 0 1 + +Total # of neighbors = 9536 +Ave neighs/atom = 238.4 +Ave special neighs/atom = 4 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/examples/USER/quip/log.24Jul17.sw.g++.1 b/examples/USER/quip/log.24Jul17.sw.g++.1 new file mode 100644 index 0000000000..c8115f4cfc --- /dev/null +++ b/examples/USER/quip/log.24Jul17.sw.g++.1 @@ -0,0 +1,83 @@ +LAMMPS (24 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# Test of SW potential for Si system + +units metal +boundary p p p + +atom_style atomic + +read_data data_sw + orthogonal box = (0 0 0) to (5.431 5.431 5.431) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 8 atoms + +pair_style quip +pair_coeff * * sw_example.xml "IP SW" 14 + +velocity all create 10.0 355311 +neighbor 0.3 bin +neigh_modify delay 10 + +fix 1 all nve +thermo 10 +timestep 0.001 + +#dump 1 all custom 10 dump.sw id fx fy fz + +run 100 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.2258 + ghost atom cutoff = 4.2258 + binsize = 2.1129, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair quip, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.684 | 2.684 | 2.684 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 10 -34.68 0 -34.670952 32.206289 + 10 4.5659178 -34.675073 0 -34.670942 46.253731 + 20 1.606683 -34.672391 0 -34.670937 44.736892 + 30 6.7007748 -34.677011 0 -34.670948 16.403049 + 40 5.682757 -34.676087 0 -34.670945 18.696408 + 50 2.2140716 -34.672942 0 -34.670939 37.592282 + 60 5.0475382 -34.675512 0 -34.670944 37.331666 + 70 7.0990979 -34.677369 0 -34.670946 40.533757 + 80 5.7306189 -34.676128 0 -34.670943 47.748813 + 90 5.0895648 -34.675549 0 -34.670944 38.092721 + 100 4.1070919 -34.674659 0 -34.670943 28.737864 +Loop time of 0.384233 on 1 procs for 100 steps with 8 atoms + +Performance: 22.486 ns/day, 1.067 hours/ns, 260.259 timesteps/s +94.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.38365 | 0.38365 | 0.38365 | 0.0 | 99.85 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.00017333 | 0.00017333 | 0.00017333 | 0.0 | 0.05 +Output | 0.00014162 | 0.00014162 | 0.00014162 | 0.0 | 0.04 +Modify | 7.081e-05 | 7.081e-05 | 7.081e-05 | 0.0 | 0.02 +Other | | 0.0001957 | | | 0.05 + +Nlocal: 8 ave 8 max 8 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 162 ave 162 max 162 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 128 ave 128 max 128 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 128 +Ave neighs/atom = 16 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/examples/USER/quip/log.24Jul17.sw.g++.4 b/examples/USER/quip/log.24Jul17.sw.g++.4 new file mode 100644 index 0000000000..d7306c7055 --- /dev/null +++ b/examples/USER/quip/log.24Jul17.sw.g++.4 @@ -0,0 +1,83 @@ +LAMMPS (24 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# Test of SW potential for Si system + +units metal +boundary p p p + +atom_style atomic + +read_data data_sw + orthogonal box = (0 0 0) to (5.431 5.431 5.431) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 8 atoms + +pair_style quip +pair_coeff * * sw_example.xml "IP SW" 14 + +velocity all create 10.0 355311 +neighbor 0.3 bin +neigh_modify delay 10 + +fix 1 all nve +thermo 10 +timestep 0.001 + +#dump 1 all custom 10 dump.sw id fx fy fz + +run 100 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.2258 + ghost atom cutoff = 4.2258 + binsize = 2.1129, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair quip, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.698 | 2.698 | 2.698 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 10 -34.68 0 -34.670952 32.206289 + 10 4.5659178 -34.675073 0 -34.670942 46.253731 + 20 1.606683 -34.672391 0 -34.670937 44.736892 + 30 6.7007748 -34.677011 0 -34.670948 16.403049 + 40 5.682757 -34.676087 0 -34.670945 18.696408 + 50 2.2140716 -34.672942 0 -34.670939 37.592282 + 60 5.0475382 -34.675512 0 -34.670944 37.331666 + 70 7.0990979 -34.677369 0 -34.670946 40.533757 + 80 5.7306189 -34.676128 0 -34.670943 47.748813 + 90 5.0895648 -34.675549 0 -34.670944 38.092721 + 100 4.1070919 -34.674659 0 -34.670943 28.737864 +Loop time of 0.423803 on 4 procs for 100 steps with 8 atoms + +Performance: 20.387 ns/day, 1.177 hours/ns, 235.959 timesteps/s +90.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.39332 | 0.40011 | 0.40704 | 0.8 | 94.41 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.015632 | 0.022605 | 0.029425 | 3.3 | 5.33 +Output | 0.00025702 | 0.00028491 | 0.00035429 | 0.0 | 0.07 +Modify | 7.3671e-05 | 8.1897e-05 | 8.9884e-05 | 0.0 | 0.02 +Other | | 0.0007259 | | | 0.17 + +Nlocal: 2 ave 2 max 2 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Nghost: 113 ave 113 max 113 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 32 ave 32 max 32 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 128 +Ave neighs/atom = 16 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:00 -- GitLab From 841a92c7fadadc62d340e02916a1ad65450a2c0e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 28 Jul 2017 16:03:24 -0400 Subject: [PATCH 556/593] remove unused variable --- src/balance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/balance.cpp b/src/balance.cpp index c184a72d32..8f994466ad 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -782,7 +782,7 @@ void Balance::shift_setup(char *str, int nitermax_in, double thresh_in) int Balance::shift() { - int i,j,k,m,np,max; + int i,j,k,m,np; double mycost,totalcost; double *split; -- GitLab From 7d0d701eaf0999c874fc820112923f29aed47f1d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 28 Jul 2017 16:05:16 -0400 Subject: [PATCH 557/593] add reference outputs for QUIP/GAP example --- examples/USER/quip/log.24Jul17.gap.g++.1 | 76 ++++++++++++++++++++++++ examples/USER/quip/log.24Jul17.gap.g++.4 | 76 ++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 examples/USER/quip/log.24Jul17.gap.g++.1 create mode 100644 examples/USER/quip/log.24Jul17.gap.g++.4 diff --git a/examples/USER/quip/log.24Jul17.gap.g++.1 b/examples/USER/quip/log.24Jul17.gap.g++.1 new file mode 100644 index 0000000000..348f2ae0cc --- /dev/null +++ b/examples/USER/quip/log.24Jul17.gap.g++.1 @@ -0,0 +1,76 @@ +LAMMPS (24 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# Test of GAP potential for Si system + +units metal +boundary p p p + +atom_style atomic + +read_data data_gap + orthogonal box = (0 0 0) to (10.9685 10.9685 10.9685) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 64 atoms + +pair_style quip +pair_coeff * * gap_example.xml "Potential xml_label=GAP_2015_2_20_0_10_54_35_765" 14 + +neighbor 0.3 bin +neigh_modify delay 10 + +fix 1 all nve +thermo 10 +timestep 0.001 + +#dump 1 all custom 10 dump.gap id fx fy fz + +run 40 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 6 6 6 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair quip, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.689 | 2.689 | 2.689 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -10412.677 0 -10412.677 -107490.01 + 10 173.98393 -10414.096 0 -10412.679 -91270.969 + 20 417.38493 -10416.08 0 -10412.681 -42816.133 + 30 434.34789 -10416.217 0 -10412.68 2459.83 + 40 423.05899 -10416.124 0 -10412.679 22936.209 +Loop time of 1.83555 on 1 procs for 40 steps with 64 atoms + +Performance: 1.883 ns/day, 12.747 hours/ns, 21.792 timesteps/s +98.1% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.8349 | 1.8349 | 1.8349 | 0.0 | 99.96 +Neigh | 0.00022817 | 0.00022817 | 0.00022817 | 0.0 | 0.01 +Comm | 0.00013709 | 0.00013709 | 0.00013709 | 0.0 | 0.01 +Output | 9.8228e-05 | 9.8228e-05 | 9.8228e-05 | 0.0 | 0.01 +Modify | 8.6308e-05 | 8.6308e-05 | 8.6308e-05 | 0.0 | 0.00 +Other | | 0.0001223 | | | 0.01 + +Nlocal: 64 ave 64 max 64 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 303 ave 303 max 303 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 1080 ave 1080 max 1080 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1080 +Ave neighs/atom = 16.875 +Neighbor list builds = 2 +Dangerous builds = 0 +Total wall time: 0:00:01 diff --git a/examples/USER/quip/log.24Jul17.gap.g++.4 b/examples/USER/quip/log.24Jul17.gap.g++.4 new file mode 100644 index 0000000000..a8127148b5 --- /dev/null +++ b/examples/USER/quip/log.24Jul17.gap.g++.4 @@ -0,0 +1,76 @@ +LAMMPS (24 Jul 2017) + using 1 OpenMP thread(s) per MPI task +# Test of GAP potential for Si system + +units metal +boundary p p p + +atom_style atomic + +read_data data_gap + orthogonal box = (0 0 0) to (10.9685 10.9685 10.9685) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 64 atoms + +pair_style quip +pair_coeff * * gap_example.xml "Potential xml_label=GAP_2015_2_20_0_10_54_35_765" 14 + +neighbor 0.3 bin +neigh_modify delay 10 + +fix 1 all nve +thermo 10 +timestep 0.001 + +#dump 1 all custom 10 dump.gap id fx fy fz + +run 40 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 6 6 6 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair quip, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 2.685 | 2.779 | 3.06 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -10412.677 0 -10412.677 -107490.01 + 10 173.98393 -10414.096 0 -10412.679 -91270.969 + 20 417.38493 -10416.08 0 -10412.681 -42816.133 + 30 434.34789 -10416.217 0 -10412.68 2459.83 + 40 423.05899 -10416.124 0 -10412.679 22936.209 +Loop time of 0.837345 on 4 procs for 40 steps with 64 atoms + +Performance: 4.127 ns/day, 5.815 hours/ns, 47.770 timesteps/s +96.0% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.73144 | 0.79214 | 0.83586 | 4.3 | 94.60 +Neigh | 5.7936e-05 | 6.5327e-05 | 7.1049e-05 | 0.0 | 0.01 +Comm | 0.00085807 | 0.044631 | 0.10532 | 18.0 | 5.33 +Output | 0.00013208 | 0.00013494 | 0.00013733 | 0.0 | 0.02 +Modify | 6.0558e-05 | 7.8678e-05 | 9.5129e-05 | 0.0 | 0.01 +Other | | 0.0002971 | | | 0.04 + +Nlocal: 16 ave 18 max 14 min +Histogram: 1 0 1 0 0 0 0 1 0 1 +Nghost: 174 ave 182 max 167 min +Histogram: 1 0 0 0 2 0 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 270 ave 294 max 237 min +Histogram: 1 0 0 0 1 0 0 0 1 1 + +Total # of neighbors = 1080 +Ave neighs/atom = 16.875 +Neighbor list builds = 2 +Dangerous builds = 0 +Total wall time: 0:00:00 -- GitLab From 9bfd9267fabb51d565a7689951d2424d8957ab18 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 28 Jul 2017 16:11:13 -0400 Subject: [PATCH 558/593] update and automate the QUIP configuration so that no environment variables are needed --- lib/quip/.gitignore | 1 + lib/quip/Makefile.lammps | 22 ++++++++++++++++------ lib/quip/README | 25 ++++++++++++++++++------- 3 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 lib/quip/.gitignore diff --git a/lib/quip/.gitignore b/lib/quip/.gitignore new file mode 100644 index 0000000000..d6797a67fe --- /dev/null +++ b/lib/quip/.gitignore @@ -0,0 +1 @@ +/QUIP diff --git a/lib/quip/Makefile.lammps b/lib/quip/Makefile.lammps index 19ff20b073..e471d3f6f4 100644 --- a/lib/quip/Makefile.lammps +++ b/lib/quip/Makefile.lammps @@ -1,17 +1,26 @@ # Settings that the LAMMPS build will import when this package library is used -# include ${QUIP_ROOT}/Makefiles/Makefile.${QUIP_ARCH} - -F95=$(shell egrep 'F95[ ]*=' ${QUIP_ROOT}/arch/Makefile.${QUIP_ARCH} | sed 's/.*F95[ ]*=[ ]*//') - +# try to guess settings assuming there is a configured QUIP git checkout inside the lib/quip directory +QUIPDIR=$(abspath ../../lib/quip/QUIP) ifeq (${QUIP_ROOT},) -$(error Environment variable QUIP_ROOT must be set.) + QUIP_ROOT=$(shell test -d $(QUIPDIR) && echo $(QUIPDIR)) + ifeq (${QUIP_ARCH},) + QUIP_ARCH=$(notdir $(wildcard $(QUIP_ROOT)/build/*)) + endif +else +# uncomment and set manually or set the corresponding environment variables +# QUIP_ROOT= +# QUIP_ARCH= endif +ifeq (${QUIP_ROOT},) +$(error Environment or make variable QUIP_ROOT must be set.) +endif ifeq (${QUIP_ARCH},) -$(error Environment variable QUIP_ARCH must be set.) +$(error Environment or make variable QUIP_ARCH must be set.) endif +F95=$(shell egrep 'F95[ ]*=' ${QUIP_ROOT}/arch/Makefile.${QUIP_ARCH} | sed 's/.*F95[ ]*=[ ]*//') include ${QUIP_ROOT}/build/${QUIP_ARCH}/Makefile.inc include ${QUIP_ROOT}/Makefile.rules @@ -28,3 +37,4 @@ $(error fortran compiler >>${F95}<< not recognised. Edit lib/quip/Makefile.lammp endif quip_SYSPATH = -L${QUIP_ROOT}/build/${QUIP_ARCH} + diff --git a/lib/quip/README b/lib/quip/README index 94039cfa17..e6cc3903bd 100644 --- a/lib/quip/README +++ b/lib/quip/README @@ -17,7 +17,7 @@ Building LAMMPS with QUIP support: 1) Building QUIP 1.1) Obtaining QUIP -The most current release of QUIP can be obtained from github: +The most current release of QUIP can be obtained from github: $ git clone https://github.com/libAtoms/QUIP.git QUIP @@ -59,7 +59,7 @@ necessary libraries will be built. for example: $ cd QUIP -$ export QUIP_ROOT=/path/to/QUIP +$ export QUIP_ROOT=${PWD} $ export QUIP_ARCH=linux_x86_64_gfortran $ make config $ make libquip @@ -70,21 +70,32 @@ to run a test suite. 2) Building LAMMPS -LAMMPS is now shipped with the interface necessary to use QUIP potentials, but -it should be enabled first. Enter the LAMMPS directory: +Edit Makefile.lammps in the lib/quip folder, if necessary. If you +have cloned, configured, and built QUIP inside this folder, QUIP_ROOT +and QUIP_ARCH should be autodetected, even without having to set +the environment variables. Otherwise export the environment variables +as shown above or edit Makefile.lammps + +LAMMPS ships with a user package containing the interface necessary +to use QUIP potentials, but it needs to be added to the compilation +first. To do that, enter the LAMMPS source directory and type: -$ cd LAMMPS -$ cd src $ make yes-user-quip 2.2) Build LAMMPS according to the instructions on the LAMMPS website. -3) There are two example sets in examples/USER/quip: +3) There are three example sets in examples/USER/quip: - a set of input files to compute the energy of an 8-atom cubic diamond cell of silicon with the Stillinger-Weber potential. Use this to benchmark that the interface is working correctly. +- a set of input files demonstrating the use of the QUIP pair style + for a molecular system with pair style hybrid/overlay and different + exclusion settings for different pair styles. This input is + for DEMONSTRATION purposes only, and does not simulate a physically + meaningful system. + - a set of input files to demonstrate how GAP potentials are specified in a LAMMPS input file to run a short MD. The GAP parameter file gap_example.xml is intended for TESTING purposes only. Potentials can be -- GitLab From 71553cf7328eabcf7936d8e0de94e7175f56545d Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 31 Jul 2017 13:53:41 -0600 Subject: [PATCH 559/593] Fix PyLammps regression after output.cpp change --- python/lammps.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/lammps.py b/python/lammps.py index d428a097a8..a512efdcda 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -556,9 +556,10 @@ def get_thermo_data(output): runs = [] columns = [] in_run = False + current_run = {} for line in lines: - if line.startswith("Memory usage per processor"): + if line.startswith("Per MPI rank memory allocation"): in_run = True elif in_run and len(columns) == 0: # first line after memory usage are column names -- GitLab From d3169eeab3e7b6b6e7c6af8041e33de894a8d17c Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 31 Jul 2017 13:56:20 -0600 Subject: [PATCH 560/593] Remove Make.py reference in PyLammps examples Also fixes some regressions due to command syntax changes --- python/examples/pylammps/.gitignore | 3 + .../pylammps/dihedrals/dihedral.ipynb | 1005 +---------------- .../examples/pylammps/interface_usage.ipynb | 43 +- .../pylammps/interface_usage_bonds.ipynb | 34 +- python/examples/pylammps/montecarlo/mc.ipynb | 117 +- python/examples/pylammps/simple.ipynb | 12 +- 6 files changed, 165 insertions(+), 1049 deletions(-) diff --git a/python/examples/pylammps/.gitignore b/python/examples/pylammps/.gitignore index 95ef7c6bd1..3f885f6a7a 100644 --- a/python/examples/pylammps/.gitignore +++ b/python/examples/pylammps/.gitignore @@ -1 +1,4 @@ *.orig +*-checkpoint.ipynb +*.png +*.mp4 diff --git a/python/examples/pylammps/dihedrals/dihedral.ipynb b/python/examples/pylammps/dihedrals/dihedral.ipynb index db7e81aaf6..6b919816d7 100644 --- a/python/examples/pylammps/dihedrals/dihedral.ipynb +++ b/python/examples/pylammps/dihedrals/dihedral.ipynb @@ -9,10 +9,8 @@ }, { "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "%matplotlib notebook" @@ -20,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": { "collapsed": true }, @@ -31,7 +29,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": { "collapsed": true }, @@ -42,29 +40,17 @@ }, { "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "LAMMPS output is captured by PyLammps wrapper\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "L = IPyLammps()" ] }, { "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "import math\n", @@ -80,47 +66,17 @@ }, { "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "['Reading data file ...',\n", - " ' triclinic box = (-5 -5 -5) to (5 5 5) with tilt (0 0 0)',\n", - " ' 1 by 1 by 1 MPI processor grid',\n", - " ' reading atoms ...',\n", - " ' 4 atoms',\n", - " ' scanning dihedrals ...',\n", - " ' 1 = max dihedrals/atom',\n", - " ' reading dihedrals ...',\n", - " ' 1 dihedrals',\n", - " 'Finding 1-2 1-3 1-4 neighbors ...',\n", - " ' Special bond factors lj: 0 0 0 ',\n", - " ' Special bond factors coul: 0 0 0 ',\n", - " ' 0 = max # of 1-2 neighbors',\n", - " ' 0 = max # of 1-3 neighbors',\n", - " ' 0 = max # of 1-4 neighbors',\n", - " ' 1 = max # of special neighbors']" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "L.read_data(\"data.dihedral\")" ] }, { "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "L.pair_style(\"zero\", 5)\n", @@ -129,10 +85,8 @@ }, { "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "L.mass(1, 1.0)" @@ -140,10 +94,8 @@ }, { "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "L.velocity(\"all\", \"set\", 0.0, 0.0, 0.0)" @@ -151,10 +103,8 @@ }, { "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "L.run(0);" @@ -162,55 +112,26 @@ }, { "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAAG3RFWHRTb2Z0d2FyZQBMQU1NUFMg\nMTMgQXVnIDIwMTZFN+maAAAgAElEQVR42uzdd3Ck133m++/pRiPHQQ6DfjugkSbngBkOR8EyrWxJ\nlmzJCiSVLCddB117r7131/Z6b23trd0ql69lW7ZFUVmyEpUFTOQQM8BgBjk3co6d83v/6G4AHFOi\nSA4w6fcplIpV4mCK3eecp0+/73lepes6QgghHj0GeQmEEEICQAghhASAEEIICQAhhBASAEIIISQA\nhBBCSAAIIYSQABBCCCEBIIQQQgJACCGEBIAQQggJACGEEBIAQgghJACEEEJIAAghhJAAEEIIIQEg\nhBBCAkAIIYQEgBBCCAkAIYQQEgBCCCEkAIQQQkgACCGEkAAQQggJACGEEBIAQgghJACEEE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GABERMQCIiBgARETEACAiIgYAERExAIiIiAFAREQM\nACIiYgAQEREDgIiIGABERMQAICIiBgARETEAiIiIAUBERAwAIiJiABAREQOAiIgYAERExAAgIiIG\nABERMQCIiIgBQEREDAAiImIAEBExAIiIiAFAREQMACIiYgAQEREDgIiIGABERMQAICIiBgARER0V\n/x+AnPCD2jXp5gAAAABJRU5ErkJggg==\n", - "text/plain": [ - "" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "L.image(zoom=1.0)" ] }, { "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "(1.0000000000000009, 1.0000000000000009, 0.0)" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "L.atoms[3].position" ] }, { "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "L.atoms[3].position = (1.0, 0.0, 1.0)" @@ -218,55 +139,26 @@ }, { "cell_type": "code", - "execution_count": 14, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAAG3RFWHRTb2Z0d2FyZQBMQU1NUFMg\nMTMgQXVnIDIwMTZFN+maAAAgAElEQVR42uzdZ3Sc133v++8e9EqC6IWYZwoGlb0TIEUysWMrdlxi\nO3ZiR7YlucWpN8UnyU1OSXJyzjrr3HXXOlm5cRw7sYqrHDe5C+yiQAIEid4Hvdfp9Xnui5kBIEa2\nJVkECfL/WXihZUsjamY/+4c9+9m/RxmGgRBCiIePSd4CIYSQABBCCCEBIIQQQgJACCGEBIAQQggJ\nACGEEBIAQgghJACEEEJIAAghhJAAEEIIIQEghBBCAkAIIYQEgBBCCAkAIYQQEgBCCCEkAIQQQkgA\n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wPo6urthNHL1JwYA0UFvCzIy\n/J10UyrVlCTdUSr/TaEoAE4CtcB7gd8BVhISOkpL60tL24BEl8ttsfje857//wru73ebm8PwMPr7\nMTfHfjdiABAdJgsLoW3B2bM7VVUrOt2KJNkk6XW9PjMuTh3spPtLIAYYLCxsKixsAnLW1hYdju2O\njl9bVX23381oxOoqlpbw0ktc/en+E3t/oiGidyk3V1y8iNJSqFRQKCJVqqSioiKgAqgDqoF8YAFo\nB+qBdmBsbMxjNvvm5xETIyYnfWYzPB489RSGhmA0wuPBwgL73YgBQHS0ppYQNTU4dQpaLSRJyHKs\nXp8VHa0Nbgv0QCRgAxqB5uvXW/YGQHU1+vuxuYnpafzoR5yhxAAgOrJOnBA1NSgthVIJhSJKrU7O\nzz8RrKo+A+Rcv160NwASEuD1YmwMv/gFpyftI54BEO27sbHAOh4ZKerqtisrF7VafyfdyyUl2ULo\n7vnzbjdsNty+zdWfGABED4qdndCarlSKCxfcBsOoUjkqy1Eu187d3/qP/+DST+HA/wIiOmDR0eLS\nJZSUYGUFGxts+CEGABER7bMIfgRERAwAIiJiABAREQOAiIgYAERExAAgIiIGABERMQCIiIgBQERE\nDAAiImIAEBERA4CIiBgARETEACAiIgYAERExAIiIiAFAREQMACIiYgAQEREDgIiIGABERMQAICIi\nBgARETEAiIgYAERExAAgIiIGABERMQCIiIgBQEREDAAiImIAEBERA4CIiBgARETEACAiIgYAEREx\nAIiIiAFAREQMACIiYgAQEREDgIiIGABERMQAICIiBgARETEAiIiIAUBERAwAIiJiABARMQCIiIgB\nQEREDAAiImIAEBERA4CIiBgARETEACAiIgYAEREdFf8PkjHA9hViIbwAAAAASUVORK5CYII=\n", - "text/plain": [ - "" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "L.image(zoom=1.0)" ] }, { "cell_type": "code", - "execution_count": 15, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "160.0" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "L.eval(\"pe\")" ] }, { "cell_type": "code", - "execution_count": 16, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "L.atoms[3].position = (1.0, 0.0, -1.0)" @@ -274,10 +166,8 @@ }, { "cell_type": "code", - "execution_count": 17, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "L.run(0);" @@ -285,10 +175,8 @@ }, { "cell_type": "code", - "execution_count": 18, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "phi = [d * math.pi / 180 for d in range(360)]" @@ -296,10 +184,8 @@ }, { "cell_type": "code", - "execution_count": 19, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "pos = [(1.0, math.cos(p), math.sin(p)) for p in phi]" @@ -307,7 +193,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "metadata": { "collapsed": true }, @@ -321,10 +207,8 @@ }, { "cell_type": "code", - "execution_count": 21, - "metadata": { - "collapsed": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "pe = []\n", @@ -336,798 +220,9 @@ }, { "cell_type": "code", - "execution_count": 22, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "application/javascript": [ - "/* Put everything inside the global mpl namespace */\n", - "window.mpl = {};\n", - "\n", - "mpl.get_websocket_type = function() {\n", - " if (typeof(WebSocket) !== 'undefined') {\n", - " return WebSocket;\n", - " } else if (typeof(MozWebSocket) !== 'undefined') {\n", - " return MozWebSocket;\n", - " } else {\n", - " alert('Your browser does not have WebSocket support.' +\n", - " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", - " 'Firefox 4 and 5 are also supported but you ' +\n", - " 'have to enable WebSockets in about:config.');\n", - " };\n", - "}\n", - "\n", - "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", - " this.id = figure_id;\n", - "\n", - " this.ws = websocket;\n", - "\n", - " this.supports_binary = (this.ws.binaryType != undefined);\n", - "\n", - " if (!this.supports_binary) {\n", - " var warnings = document.getElementById(\"mpl-warnings\");\n", - " if (warnings) {\n", - " warnings.style.display = 'block';\n", - " warnings.textContent = (\n", - " \"This browser does not support binary websocket messages. \" +\n", - " \"Performance may be slow.\");\n", - " }\n", - " }\n", - "\n", - " this.imageObj = new Image();\n", - "\n", - " this.context = undefined;\n", - " this.message = undefined;\n", - " this.canvas = undefined;\n", - " this.rubberband_canvas = undefined;\n", - " this.rubberband_context = undefined;\n", - " this.format_dropdown = undefined;\n", - "\n", - " this.image_mode = 'full';\n", - "\n", - " this.root = $('
      ');\n", - " this._root_extra_style(this.root)\n", - " this.root.attr('style', 'display: inline-block');\n", - "\n", - " $(parent_element).append(this.root);\n", - "\n", - " this._init_header(this);\n", - " this._init_canvas(this);\n", - " this._init_toolbar(this);\n", - "\n", - " var fig = this;\n", - "\n", - " this.waiting = false;\n", - "\n", - " this.ws.onopen = function () {\n", - " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", - " fig.send_message(\"send_image_mode\", {});\n", - " fig.send_message(\"refresh\", {});\n", - " }\n", - "\n", - " this.imageObj.onload = function() {\n", - " if (fig.image_mode == 'full') {\n", - " // Full images could contain transparency (where diff images\n", - " // almost always do), so we need to clear the canvas so that\n", - " // there is no ghosting.\n", - " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", - " }\n", - " fig.context.drawImage(fig.imageObj, 0, 0);\n", - " };\n", - "\n", - " this.imageObj.onunload = function() {\n", - " this.ws.close();\n", - " }\n", - "\n", - " this.ws.onmessage = this._make_on_message_function(this);\n", - "\n", - " this.ondownload = ondownload;\n", - "}\n", - "\n", - "mpl.figure.prototype._init_header = function() {\n", - " var titlebar = $(\n", - " '
      ');\n", - " var titletext = $(\n", - " '
      ');\n", - " titlebar.append(titletext)\n", - " this.root.append(titlebar);\n", - " this.header = titletext[0];\n", - "}\n", - "\n", - "\n", - "\n", - "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "\n", - "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", - "\n", - "}\n", - "\n", - "mpl.figure.prototype._init_canvas = function() {\n", - " var fig = this;\n", - "\n", - " var canvas_div = $('
      ');\n", - "\n", - " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", - "\n", - " function canvas_keyboard_event(event) {\n", - " return fig.key_event(event, event['data']);\n", - " }\n", - "\n", - " canvas_div.keydown('key_press', canvas_keyboard_event);\n", - " canvas_div.keyup('key_release', canvas_keyboard_event);\n", - " this.canvas_div = canvas_div\n", - " this._canvas_extra_style(canvas_div)\n", - " this.root.append(canvas_div);\n", - "\n", - " var canvas = $('');\n", - " canvas.addClass('mpl-canvas');\n", - " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", - "\n", - " this.canvas = canvas[0];\n", - " this.context = canvas[0].getContext(\"2d\");\n", - "\n", - " var rubberband = $('');\n", - " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", - "\n", - " var pass_mouse_events = true;\n", - "\n", - " canvas_div.resizable({\n", - " start: function(event, ui) {\n", - " pass_mouse_events = false;\n", - " },\n", - " resize: function(event, ui) {\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " stop: function(event, ui) {\n", - " pass_mouse_events = true;\n", - " fig.request_resize(ui.size.width, ui.size.height);\n", - " },\n", - " });\n", - "\n", - " function mouse_event_fn(event) {\n", - " if (pass_mouse_events)\n", - " return fig.mouse_event(event, event['data']);\n", - " }\n", - "\n", - " rubberband.mousedown('button_press', mouse_event_fn);\n", - " rubberband.mouseup('button_release', mouse_event_fn);\n", - " // Throttle sequential mouse events to 1 every 20ms.\n", - " rubberband.mousemove('motion_notify', mouse_event_fn);\n", - "\n", - " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", - " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", - "\n", - " canvas_div.on(\"wheel\", function (event) {\n", - " event = event.originalEvent;\n", - " event['data'] = 'scroll'\n", - " if (event.deltaY < 0) {\n", - " event.step = 1;\n", - " } else {\n", - " event.step = -1;\n", - " }\n", - " mouse_event_fn(event);\n", - " });\n", - "\n", - " canvas_div.append(canvas);\n", - " canvas_div.append(rubberband);\n", - "\n", - " this.rubberband = rubberband;\n", - " this.rubberband_canvas = rubberband[0];\n", - " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", - " this.rubberband_context.strokeStyle = \"#000000\";\n", - "\n", - " this._resize_canvas = function(width, height) {\n", - " // Keep the size of the canvas, canvas container, and rubber band\n", - " // canvas in synch.\n", - " canvas_div.css('width', width)\n", - " canvas_div.css('height', height)\n", - "\n", - " canvas.attr('width', width);\n", - " canvas.attr('height', height);\n", - "\n", - " rubberband.attr('width', width);\n", - " rubberband.attr('height', height);\n", - " }\n", - "\n", - " // Set the figure to an initial 600x600px, this will subsequently be updated\n", - " // upon first draw.\n", - " this._resize_canvas(600, 600);\n", - "\n", - " // Disable right mouse context menu.\n", - " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", - " return false;\n", - " });\n", - "\n", - " function set_focus () {\n", - " canvas.focus();\n", - " canvas_div.focus();\n", - " }\n", - "\n", - " window.setTimeout(set_focus, 100);\n", - "}\n", - "\n", - "mpl.figure.prototype._init_toolbar = function() {\n", - " var fig = this;\n", - "\n", - " var nav_element = $('
      ')\n", - " nav_element.attr('style', 'width: 100%');\n", - " this.root.append(nav_element);\n", - "\n", - " // Define a callback function for later on.\n", - " function toolbar_event(event) {\n", - " return fig.toolbar_button_onclick(event['data']);\n", - " }\n", - " function toolbar_mouse_event(event) {\n", - " return fig.toolbar_button_onmouseover(event['data']);\n", - " }\n", - "\n", - " for(var toolbar_ind in mpl.toolbar_items) {\n", - " var name = mpl.toolbar_items[toolbar_ind][0];\n", - " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", - " var image = mpl.toolbar_items[toolbar_ind][2];\n", - " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", - "\n", - " if (!name) {\n", - " // put a spacer in here.\n", - " continue;\n", - " }\n", - " var button = $('